Version 2.1.1-dev.1.0

Merge commit '2cb346bd0cce075a5b7988cedb678e822a1d50f4' into dev
diff --git a/.github/no-response.yml b/.github/no-response.yml
index 6db0fdf..81cec3e 100644
--- a/.github/no-response.yml
+++ b/.github/no-response.yml
@@ -4,7 +4,7 @@
 daysUntilClose: 21
 
 # Label requiring a response.
-responseRequiredLabel: "need-info"
+responseRequiredLabel: "needs-info"
 
 # Comment to post when closing an Issue for lack of response.
 closeComment: >-
diff --git a/.gitignore b/.gitignore
index 48a1d61..3e23d6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,13 @@
 .vscode
 .history
 
+# analysis server files
+analysis_options.yaml
+compile_commands.json
+
+# GDB files
+.gdb_history
+
 # Built by chromebot and downloaded from Google Storage
 client/tests/drt
 
diff --git a/.packages b/.packages
index f9f0641..597ffb9 100644
--- a/.packages
+++ b/.packages
@@ -61,7 +61,6 @@
 markdown:third_party/pkg/markdown/lib
 matcher:third_party/pkg/matcher/lib
 meta:pkg/meta/lib
-microlytics:pkg/microlytics/lib
 mime:third_party/pkg/mime/lib
 mockito:third_party/pkg/mockito/lib
 mustache4dart:third_party/pkg/mustache4dart/lib
@@ -103,7 +102,6 @@
 test_process:third_party/pkg/test_process/lib
 test_reflective_loader:third_party/pkg/test_reflective_loader/lib
 testing:pkg/testing/lib
-tuple:third_party/pkg/tuple/lib
 typed_data:third_party/pkg/typed_data/lib
 unittest:third_party/pkg/unittest/lib
 usage:third_party/pkg/usage/lib
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e01f11..165e23f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,104 @@
+## 2.1.1-dev.1.0
+
+### Tool Changes
+
+#### Analyzer
+
+*   Support for `declarations-casts` has been removed and the `implicit-casts`
+    option now has the combined semantics of both options. This means that
+    users that disable `implicit-casts` might now see errors that were not
+    previously being reported.
+
+*   New hints added:
+
+    *   `INVALID_LITERAL_ANNOTATION` when something other than a const
+        constructor is annotated with `@literal`.
+    *   `SUBTYPE_OF_SEALED_CLASS` when any class or mixin subclasses (extends,
+        implements, mixes in, or constrains to) a `@sealed` class, and the two
+        are declared in different packages.
+    *   `MIXIN_ON_SEALED_CLASS` when a `@sealed` class is used as a superclass
+        constraint of a mixin.
+
+#### dart2js
+
+* We fixed a bug in how deferred constructor calls were incorrectly not
+  marked as deferred. The old behavior didn't cause breakages, but was imprecise
+  and pushed more code to the main output unit.
+
+* A new deferred split algorithm implementation was added.
+
+  This implementation fixes a soundness bug and addresses performance issues of
+  the previous implementation, because of that it can have a visible impact
+  on apps. In particular,
+
+    * We fixed a performance issue which was introduced when we migrated to the
+      Common front-end. On large apps, the fix can cut down 2/3 of the time
+      spent on this task.
+
+    * We fixed a bug in how inferred types were miscategorized (#35311). The old
+      behavior was unsound and could produce broken programs. The fix may cause
+      more code to be pulled into the main output unit.
+
+      This shows up frequently when returning deferred values from closures
+      since the closure's inferred return type is the deferred type.
+      For example, if you have:
+
+      ```dart
+      () async {
+        await deferred_prefix.loadLibrary();
+        return new deferred_prefix.Foo();
+      }
+      ```
+
+      The closure's return type is `Future<Foo>`. The old implementation defers
+      `Foo`, and incorrectly makes the return type `Future<dynamic>`. This may
+      break in places where the correct type is expected.
+
+      The new implementation will not defer `Foo`, and will place it in the main
+      output unit. If your intent is to defer it, then you need to ensure the
+      return type is not inferred to be `Foo`. For example, you can do so by
+      changing the code to a named closure with a declared type, or by ensuring
+      that the return expression has the type you want, like:
+
+      ```dart
+      () async {
+        await deferred_prefix.loadLibrary();
+        return new deferred_prefix.Foo() as dynamic;
+      }
+      ```
+
+    * Because the new implementation might require you to inspect and fix
+      your app, we exposed two temporary flags:
+
+        * `--report-invalid-deferred-types`: when provided, we will run
+          both the old and new algorithm and report where the issue was
+          detected.
+
+        * `--new-deferred-split`: enables the new algorithm.
+
+#### dartdoc
+
+* dartdoc default styles now work much better on mobile.  Simple browsing
+  and searching of API docs now work in many cases.
+
+#### Linter
+
+The linter was bumped to `0.1.78` which introduces the following linter fixes to the SDK:
+
+* fixed `type_annotate_public_apis` false positives on local functions
+* fixed `avoid_shadowing_type_parameters` to report shadowed type parameters in generic typedefs
+* fixed `use_setters_to_change_properties` to not wrongly lint overriding methods
+* fixed `cascade_invocations` to not lint awaited targets
+* fixed `prefer_conditional_assignment` false positives
+* fixed `join_return_with_assignment` false positives
+* fixed `cascade_invocations` false positives
+* miscellaneous documentation improvements
+* updated `invariant_booleans` status to experimental
+
+and adds:
+
+* a new `prefer_final_in_for_each` lint rule to flag loop variables that could be declared final
+
 ## 2.1.1-dev.0.1
 
 * Cherry-pick 4914fe57ea9e034b948ef3ab5a4e7e511991f845 to dev
diff --git a/DEPS b/DEPS
index 8c59202..2798d2c 100644
--- a/DEPS
+++ b/DEPS
@@ -36,7 +36,7 @@
   "chromium_git": "https://chromium.googlesource.com",
   "fuchsia_git": "https://fuchsia.googlesource.com",
 
-  "co19_2_rev": "92eb86a60b26089eaffc4fa9703895f71a251a76",
+  "co19_2_rev": "9c03cd19b61a9307db192f174a7e7a1ec6759bb2",
 
   # As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision
   # should be kept up to date with the revisions pulled by the Flutter engine.
@@ -49,15 +49,15 @@
   # Scripts that make 'git cl format' work.
   "clang_format_scripts_rev": "c09c8deeac31f05bd801995c475e7c8070f9ecda",
 
-  "gperftools_revision": "9608fa3bcf8020d35f59fbf70cd3cbe4b015b972",
+  "gperftools_revision": "e9ab4c53041ac62feefbbb076d326e9a77dd1567",
 
   # Revisions of /third_party/* dependencies.
   "args_tag": "1.4.4",
   "async_tag": "2.0.8",
   "bazel_worker_tag": "0.1.14",
   "boolean_selector_tag" : "1.0.4",
-  "boringssl_gen_rev": "fc47eaa1a245d858bae462cd64d4155605b850ea",
-  "boringssl_rev" : "189270cd190267f5bd60cfe8f8ce7a61d07ba6f4",
+  "boringssl_gen_rev": "bbf52f18f425e29b1185f2f6753bec02ed8c5880",
+  "boringssl_rev" : "702e2b6d3831486535e958f262a05c75a5cb312e",
   "charcode_tag": "v1.1.2",
   "chrome_rev" : "19997",
   "cli_util_rev" : "4ad7ccbe3195fd2583b30f86a86697ef61e80f41",
@@ -79,9 +79,9 @@
   #     minutes later.
   #
   # For more details, see https://github.com/dart-lang/sdk/issues/30164
-  "dart_style_tag": "1.2.1",  # Please see the note above before updating.
+  "dart_style_tag": "1.2.2",  # Please see the note above before updating.
 
-  "dartdoc_tag" : "v0.24.1",
+  "dartdoc_tag" : "v0.27.0",
   "file_rev": "515ed1dd48740ab14b625de1be464cb2bca4fefd",  # 5.0.6
   "fixnum_tag": "0.10.9",
   "func_rev": "25eec48146a58967d75330075ab376b3838b18a8",
@@ -97,7 +97,7 @@
   "intl_tag": "0.15.7",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_tag": "2.0.9",
-  "linter_tag": "0.1.73",
+  "linter_tag": "0.1.78",
   "logging_tag": "0.11.3+2",
   "markdown_tag": "2.0.2",
   "matcher_tag": "0.12.3",
@@ -136,7 +136,6 @@
   "term_glyph_tag": "1.0.1",
   "test_reflective_loader_tag": "0.1.8",
   "test_tag": "1.3.4",
-  "tuple_tag": "v1.0.1",
   "typed_data_tag": "1.1.6",
   "unittest_rev": "2b8375bc98bb9dc81c539c91aaea6adce12e1072",
   "usage_tag": "3.4.0",
@@ -162,7 +161,7 @@
       "packages": [
           {
               "package": "dart/dart-sdk/${{platform}}",
-              "version": "version:2.2.0-dev.0.0",
+              "version": "version:2.1.1-dev.0.1",
           },
       ],
       "dep_type": "cipd",
@@ -355,8 +354,6 @@
   Var("dart_root") + "/third_party/pkg/test_reflective_loader":
       Var("dart_git") + "test_reflective_loader.git" +
       "@" + Var("test_reflective_loader_tag"),
-  Var("dart_root") + "/third_party/pkg/tuple":
-      Var("dart_git") + "tuple.git" + "@" + Var("tuple_tag"),
   Var("dart_root") + "/third_party/pkg/typed_data":
       Var("dart_git") + "typed_data.git" + "@" + Var("typed_data_tag"),
   # Unittest is an early version, 0.11.x, of the package "test"
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 1f2ebd4..6edb3b3 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -267,7 +267,8 @@
   # C++11 compiler flags setup.
   # ---------------------------
   if (is_win) {
-    cc_std = [ "/std:c++11" ]
+    # Up-to-date toolchain MSVC doesn't support c++11 flag any longer.
+    cc_std = [ "/std:c++14" ]
   } else {
     cc_std = [ "-std=c++11" ]
   }
diff --git a/docs/language/dart.sty b/docs/language/dart.sty
index 34a70b5..27433a7 100644
--- a/docs/language/dart.sty
+++ b/docs/language/dart.sty
@@ -90,12 +90,13 @@
 \definecolor{rationaleColor}{rgb}{0.5,0.5,0.5}
 
 % Environments for different kinds of text.
-\newenvironment{Q}[1]{{\bf #1}}{}
+\newenvironment{Q}[1]{{\bf{}Upcoming: {#1}}}{}
 \newenvironment{rationale}[1]{{\color{rationaleColor}\it{#1}}}{}
 \newenvironment{commentary}[1]{{\color{commentaryColor}\sf{#1}}}{}
 
 % Auxiliary functions.
 \newcommand{\flatten}[1]{\ensuremath{\mbox{\it flatten}({#1})}}
+\newcommand{\basetype}[1]{\ensuremath{\mbox{\it basetype}({#1})}}
 \newcommand{\overrides}[1]{\ensuremath{\mbox{\it overrides}({#1})}}
 \newcommand{\inherited}[1]{\ensuremath{\mbox{\it inherited}({#1})}}
 
@@ -104,6 +105,7 @@
 % specific topic in a list of similar topics (like many forms of
 % expressions of a similar nature).
 \newcommand{\Case}[1]{\textbf{Case }$\langle\hspace{0.1em}${#1}$\hspace{0.1em}\rangle$\textbf{.}}
+\newcommand{\EndCase}{\mbox{}\hfill$\scriptscriptstyle\Box$\xspace}
 
 \newenvironment{dartCode}[1][!ht] {
   \def\@programcr{\@addfield\strut}%
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 594801c..a781f90 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -3,7 +3,9 @@
 \usepackage{epsfig}
 \usepackage{xcolor}
 \usepackage{syntax}
+\usepackage{amssymb}
 \usepackage[fleqn]{amsmath}
+\usepackage{amssymb}
 \usepackage{semantic}
 \usepackage{dart}
 \usepackage{hyperref}
@@ -24,8 +26,12 @@
 % =======
 % Significant changes to the specification.
 % 2.2
-%  - Specify whether the values of literal expressions override Object.==.
-%  - Allow Type objects as case expressions and const map keys.
+% - Specify whether the values of literal expressions override Object.==.
+% - Allow Type objects as case expressions and const map keys.
+% - Introduce set literals.
+% - Specify that a getter/setter and a method with the same basename is
+%   an error, also in the case where a class obtains both from its
+%   superinterfaces.
 %
 % 2.1
 % - Remove 64-bit constraint on integer literals compiled to JavaScript numbers.
@@ -87,6 +93,8 @@
 %   adding the parts that are not captured by a function type subtype check.
 % - Introduced the notion of member signatures, specified that they are the
 %   kind of entity that a class interface contains.
+% - Corrected super-boundedness check to take variance into account at the
+%   top level.
 %
 % 2.0
 % - Don't allow functions as assert test values.
@@ -152,6 +160,15 @@
 %   which in particular means that the notion of being a more specific type
 %   is eliminated, and function types are made contravariant in their
 %   parameter types.
+% - Integrate instantiation to bound. This introduces the notions of raw
+%   types, the raw-depends relation, and simple bounds; and it specifies
+%   the algorithm which is used to expand a raw type (e.g., `C`) to a
+%   parameterized type (e.g., `C<int>`).
+% - Integrate invalid_returns.md. This replaces the rules about when it is
+%   an error to have `return;` or `return e;` in a function.
+% - Integrate generalized-void.md. Introduces syntactic support for using
+%   `void` in many new locations, including variable type annotations and
+%   actual type arguments; also adds errors for using values of type `void`.
 %
 % 1.15
 % - Change how language specification describes control flow.
@@ -720,7 +737,7 @@
 \LMHash{}%
 Whenever we say that an exception $ex$ is
 \IndexCustom{thrown}{throwing an exception},
-it acts like an expression had thrown (\ref{completion})
+it acts like an expression had thrown (\ref{statementCompletion})
 with $ex$ as exception object and with a stack trace
 corresponding to the current system state.
 When we say that a $C$ \IndexCustom{is thrown}{throwing a class},
@@ -1047,13 +1064,10 @@
 
 \begin{grammar}
 <functionSignature> ::= \gnewline{}
-  <metadata> <returnType>? <identifier> <formalParameterPart>
+  <metadata> <type>? <identifier> <formalParameterPart>
 
 <formalParameterPart> ::= <typeParameters>? <formalParameterList>
 
-<returnType> ::= \VOID{}
-  \alt <type>
-
 <functionBody> ::= \ASYNC{}? `=>' <expression> `;'
   \alt (\ASYNC{} | \ASYNC `*' | \SYNC `*')? <block>
 
@@ -1069,56 +1083,117 @@
 and they can be introduced by function literals (\ref{functionExpressions}).
 
 \LMHash{}%
-Each declaration that introduces a function has a signature that specifies its return type, name, and formal parameter part,
-except that the return type may be omitted, and getters never have a formal parameter part.
-Function literals have a formal parameter part, but no return type and no name.
-The formal parameter part optionally specifies the formal type parameter list of the function,
-and it always specifies its formal parameter list.
-A function body is either:
-\begin{itemize}
-\item A block statement (\ref{blocks}) containing the statements (\ref{statements}) executed by the function, optionally marked with one of the modifiers: \ASYNC, \code{\ASYNC*} or \code{\SYNC*}.
-
-  \commentary{
-  Because Dart is optionally typed, we cannot guarantee that a function that does not return a value will not be used in the context of an expression.
-  Therefore, every function must return a value.
-  A function body that ends without doing a throw or return will cause the function to return the null object (\ref{null}),
-  as will a \RETURN{} without an expression.
-  For generator functions, the situation is more subtle.
-  See further discussion in section \ref{return}.
-  }
-
-OR
-\item of the form \code{=> $e$} or the form \code{\ASYNC{} => $e$}, which both return the value of the expression $e$ as if by a \code{return $e$}.
-  \commentary{
-  The other modifiers do not apply here, because they apply only to generators, discussed below,
-  and generators are not allowed to return a value, values are added to the generated stream or iterable using \YIELD{} instead.
-  }
-  Let $R$ be the static type of $e$
-  and let $T$ be the declared return type of the function that has this body.
-  It is a compile-time error unless one of the following conditions hold:
-  \begin{itemize}
-  \item $T$ is \VOID{}.
-  \item The function is synchronous and $R$ is assignable to $T$.
-  \item The function is asynchronous and \code{Future<\flatten{R}>} is assignable to $T$.
-  \end{itemize}
-\end{itemize}
-
-\LMHash{}%
 A function is \IndexCustom{asynchronous}{function!asynchronous}
 if its body is marked with the \ASYNC{} or \code{\ASYNC*} modifier.
 Otherwise the function is \IndexCustom{synchronous}{function!synchronous}.
 A function is a \IndexCustom{generator}{function!generator}
 if its body is marked with the \code{\SYNC*} or \code{\ASYNC*} modifier.
+Further details about these concepts are given below.
 
-\commentary{
-Whether a function is synchronous or asynchronous is orthogonal to whether it is a generator or not.
-Generator functions are a sugar for functions that produce collections in a systematic way,
-by lazily applying a function that \emph{generates} individual elements of a collection.
-Dart provides such a sugar in both the synchronous case, where one returns an iterable, and in the asynchronous case, where one returns a stream.
-Dart also allows both synchronous and asynchronous functions that produce a single value.
+\commentary{%
+Whether a function is synchronous or asynchronous is orthogonal to
+whether it is a generator or not.
+Generator functions are a sugar for functions
+that produce collections in a systematic way,
+by lazily applying a function that \emph{generates}
+individual elements of a collection.
+Dart provides such a sugar in both the synchronous case,
+where one returns an iterable,
+and in the asynchronous case, where one returns a stream.
+Dart also allows both synchronous and asynchronous functions
+that produce a single value.%
 }
 
 \LMHash{}%
+Each declaration that introduces a function has a signature that specifies
+its return type, name, and formal parameter part,
+except that the return type may be omitted,
+and getters never have a formal parameter part.
+Function literals have a formal parameter part, but no return type and no name.
+The formal parameter part optionally specifies
+the formal type parameter list of the function,
+and it always specifies its formal parameter list.
+A function body is either:
+\begin{itemize}
+\item
+  a block statement (\ref{blocks}) containing
+  the statements (\ref{statements}) executed by the function,
+  optionally marked with one of the modifiers:
+  \ASYNC, \code{\ASYNC*} or \code{\SYNC*}.
+  %
+  Unless it is statically known that the body of the function
+  cannot complete normally
+  (\commentary{that is, it cannot reach the end and ``fall through''},
+  cf.~\ref{statementCompletion}),
+  it is a compile-time error if
+  the addition of \code{\RETURN;} at the end of the body
+  would be a compile-time error.
+  \commentary{%
+  For instance, it is an error if
+  the return type of a synchronous function is \code{int},
+  and the body may complete normally.
+  The precise rules are given in section~\ref{return}.%
+  }
+
+  \commentary{%
+  Because Dart supports dynamic function invocations,
+  we cannot guarantee that a function that does not return a value
+  will not be used in the context of an expression.
+  Therefore, every function must return a value.
+  A function body that ends without doing a throw or return
+  will cause the function to return the null object (\ref{null}),
+  as will a \RETURN{} without an expression.
+  For generator functions, the situation is more subtle.
+  See further discussion in section~\ref{return}.%
+  }
+
+OR
+\item
+  of the form \code{=> $e$} or the form \code{\ASYNC{} => $e$},
+  which both return the value of the expression $e$ as if by a
+  \code{return $e$}.
+  \commentary{%
+  The other modifiers do not apply here,
+  because they apply only to generators, discussed below.
+  Generators are not allowed to return a value,
+  values are added to the generated stream or iterable using
+  \YIELD{} or \YIELD*.%
+  }
+  Let $T$ be the declared return type of the function that has this body.
+  It is a compile-time error if one of the following conditions hold:
+  \begin{itemize}
+  \item The function is synchronous, $T$ is not \VOID{},
+    and it would have been a compile-time error to declare the function with the body
+    \code{\{ \RETURN{} $e$; \}}
+    rather than \code{=> $e$}.
+    \commentary{%
+    In particular, $e$ can have \emph{any} type when the return type is \VOID.%
+    }
+    \rationale{%
+    This enables concise declarations of \VOID{} functions.
+    It is reasonably easy to understand such a function,
+    because the return type is textually near to the returned expression $e$.
+    In contrast, \code{\RETURN{} $e$;} in a block body is only allowed
+    for an $e$ with one of a few specific static types,
+    because it is less likely that the developer understands
+    that the returned value will not be used
+    (\ref{return}).%
+    }
+  \item The function is asynchronous, \flatten{T} is not \VOID{},
+    and it would have been a compile-time error to declare the function with the body
+    \code{\ASYNC{} \{ \RETURN{} $e$; \}}
+    rather than \code{\ASYNC{} => $e$}.
+    \commentary{%
+    In particular, $e$ can have \emph{any} type
+    when the flattened return type is \VOID,%
+    }
+    \rationale{%
+    and the rationale is similar to the synchronous case.%
+    }
+  \end{itemize}
+\end{itemize}
+
+\LMHash{}%
 It is a compile-time error if an \ASYNC, \code{\ASYNC*} or \code{\SYNC*} modifier is attached to the body of a setter or constructor.
 
 \rationale{
@@ -1292,7 +1367,7 @@
   \alt <simpleFormalParameter>
 
 <functionFormalParameter> ::= \gnewline{}
-  <metadata> \COVARIANT{}? <returnType>? <identifier> <formalParameterPart>
+  <metadata> \COVARIANT{}? <type>? <identifier> <formalParameterPart>
 
 <simpleFormalParameter> ::= <declaredIdentifier>
   \alt <metadata> \COVARIANT{}? <identifier>
@@ -1609,7 +1684,7 @@
 If we had omitted the last requirement then
 \code{f \IS{} int\,\FUNCTION([int])}
 could evaluate to \TRUE{} with the declaration
-\code{void f()\,\{\}},
+\code{\VOID{} f()\,\{\}},
 e.g., by letting $u$ be \code{Null}.
 }
 
@@ -1671,7 +1746,9 @@
   \gnewline{} `{' (<metadata> <classMemberDefinition>)* `}'
   \alt <metadata> \ABSTRACT{}? \CLASS{} <mixinApplicationClass>
 
-<mixins> ::= \WITH{} <typeList>
+<mixins> ::= \WITH{} <typeNotVoidList>
+
+<typeNotVoidList> ::= <typeNotVoid> (`,' <typeNotVoid>)*
 
 <classMemberDefinition> ::= <declaration> `;'
   \alt <methodSignature> <functionBody>
@@ -1929,7 +2006,7 @@
 
 \begin{grammar}
 <operatorSignature> ::= \gnewline{}
-  <returnType>? \OPERATOR{} <operator> <formalParameterList>
+  <type>? \OPERATOR{} <operator> <formalParameterList>
 
 <operator> ::= `~'
   \alt <binaryOperator>
@@ -2346,7 +2423,7 @@
 Getters are functions (\ref{functions}) that are used to retrieve the values of object properties.
 
 \begin{grammar}
-<getterSignature> ::= <returnType>? \GET{} <identifier>
+<getterSignature> ::= <type>? \GET{} <identifier>
 \end{grammar}
 
 \LMHash{}%
@@ -2383,7 +2460,7 @@
 Setters are functions (\ref{functions}) that are used to set the values of object properties.
 
 \begin{grammar}
-<setterSignature> ::= <returnType>? \SET{} <identifier> <formalParameterList>
+<setterSignature> ::= <type>? \SET{} <identifier> <formalParameterList>
 \end{grammar}
 
 \commentary{
@@ -3027,7 +3104,7 @@
 \begin{grammar}
 <redirectingFactoryConstructorSignature> ::= \gnewline{}
   \CONST{}? \FACTORY{} <identifier> (`.' <identifier>)? <formalParameterList> `='
-  \gnewline{} <type> (`.' <identifier>)?
+  \gnewline{} <typeNotVoid> (`.' <identifier>)?
 \end{grammar}
 
 Assume that
@@ -3350,7 +3427,7 @@
 for class \code{Object}.
 
 \begin{grammar}
-<superclass> ::= \EXTENDS{} <type>
+<superclass> ::= \EXTENDS{} <typeNotVoid>
 \end{grammar}
 
 %The superclass clause of a class C is processed within the enclosing scope of the static scope of C.
@@ -3537,7 +3614,7 @@
 the \IMPLEMENTS{} clause of the class.
 
 \begin{grammar}
-<interfaces> ::= \IMPLEMENTS{} <typeList>
+<interfaces> ::= \IMPLEMENTS{} <typeNotVoidList>
 \end{grammar}
 
 \LMHash{}%
@@ -3585,16 +3662,32 @@
 
 \LMHash{}%
 Let $C$ be a class.
-It is a compile-time error if $C$ declares a
-\begin{itemize}
-\item constructor named \code{$C$.$n$} and a static member with basename $n$.
-\item getter or a setter with basename $n$, and has a method named $n$.
-\item method named $n$, and has a getter or a setter with basename $n$.
-\item static member with basename $n$, and has an instance member with basename $n$.
-\end{itemize}
+It is a compile-time error if $C$
+declares a constructor named \code{$C$.$n$} and
+a static member with basename $n$.
+It is a compile-time error if $C$
+declares a static member with basename $n$ and
+the interface of $C$ has an instance member with basename $n$.
+It is a compile-time error if the interface of $C$
+has a method named $n$ and a setter with basename $n$.
+
+\LMHash{}%
 These errors occur when the getters or setters are defined explicitly
 as well as when they are induced by variable declarations.
 
+\commentary{%
+Note that other errors which are similar in nature are covered elsewhere.
+For instance, if $C$ is a class that has two superinterfaces $I_1$ and $I_2$,
+where $I_1$ has a method named $m$
+and $I_2$ has a getter named $m$,
+then it is an error because the computation of the interface of $C$
+includes a computation of the combined member signature
+(\ref{combinedMemberSignatures})
+of that getter and that method,
+and it is an error for a combined member signature
+to include a getter and a non-getter.
+}
+
 
 \section{Interfaces}
 \LMLabel{interfaces}
@@ -3896,6 +3989,7 @@
 If $M_0$ contains at least one getter signature
 and at least one non-getter signature,
 the computation of the combined member signature failed.
+\EndCase
 
 \LMHash{}%
 \Case{Getters}
@@ -3904,7 +3998,7 @@
 for methods and setters,
 except that it uses the return type of the getter signature
 where methods and setters use the function type of the member signature.
-
+\EndCase
 
 \LMHash{}%
 \Case{Methods and setters}
@@ -3978,8 +4072,9 @@
 if any of the corresponding parameters are marked covariant,
 not just among the most specific signatures,
 but among \emph{all} signatures named \id{} (which are accessible to $L$)
-in the given list of interfaces.
+in the given list of interfaces.%
 }
+\EndCase
 
 
 \subsection{Superinterfaces}
@@ -4041,11 +4136,12 @@
 exactly one member is inherited, namely
 the combined member signature named \id{},
 from the direct superinterfaces
-%% TODO(eernst): This is only well-defined when $J$ is a class interface.
+% This is well-defined because $I$ is a class interface.
 in the textual order that they are declared,
 with respect to $L$
 (\ref{combinedMemberSignatures}).
-
+It is a compile-time error
+if the computation of said combined member signature fails.
 
 \subsubsection{Correct Member Overrides}
 \LMLabel{correctMemberOverrides}
@@ -4142,7 +4238,7 @@
 <mixinApplicationClass> ::= \gnewline{}
   <identifier> <typeParameters>? `=' <mixinApplication> `;'
 
-<mixinApplication> ::= <type> <mixins> <interfaces>?
+<mixinApplication> ::= <typeNotVoid> <mixins> <interfaces>?
 \end{grammar}
 
 \LMHash{}%
@@ -4477,7 +4573,7 @@
 }
 
 \begin{grammar}
-<typeParameter> ::= <metadata> <identifier> (\EXTENDS{} <type>)?
+<typeParameter> ::= <metadata> <identifier> (\EXTENDS{} <typeNotVoid>)?
 
 <typeParameters> ::= `<' <typeParameter> (`,' <typeParameter>)* `>'
 \end{grammar}
@@ -4826,14 +4922,11 @@
 \item
   $T$ is not regular-bounded.
 \item
-  For each $j \in 1 .. n$, let $S'_j$ be the result of replacing
-  every occurrence of a top type
-  in a covariant position in $S_j$ by \code{Null},
-  and every occurrence of \code{Null}
-  in a contravariant position in $S_j$ by \code{Object}.
-  It is then required that
-  \code{$G$<$S'_1, \ldots,\ S'_n$>}
-  is regular-bounded.
+  Let $T'$ be the result of replacing every occurrence in $T$
+  of a top type in a covariant position by \code{Null},
+  and every occurrence in $T$
+  of \code{Null} in a contravariant position by \code{Object}.
+  It is then required that $T'$ is regular-bounded.
   %
   Moreover, if $G$ denotes a generic type alias with body $U$,
   it is required that every type that occurs as a subterm of
@@ -4961,6 +5054,458 @@
 }
 
 
+\subsection{Instantiation to Bound}
+\LMLabel{instantiationToBound}
+
+\LMHash{}%
+This section describes how to compute type arguments
+that are omitted from a type,
+or from an invocation of a generic function.
+
+\commentary{%
+%% TODO(eernst): When we add a specification of type inference, we will adjust
+%% the specification of i2b such that it allows for taking initial values for
+%% the actual type arguments (that is, $U_{j,0}$ is given "from the caller" for
+%% some $j$; probably "the caller" will always be type inference), and all other
+%% parts of the algorithm remain unchanged.
+%% I think it will be more confusing than helpful to start writing this now,
+%% and it will be a small adjustment when we add a spec of type inference. So
+%% at this point we just specify i2b as a stand-alone algorithm.
+Note that type inference is assumed to have taken place already
+(\ref{overview}),
+so type arguments are not considered to be omitted if they are inferred.
+This means that instantiation to bound is a backup mechanism,
+which will be used when no information is available for inference.%
+}
+
+\LMHash{}%
+Consider the situation where a term $t$ of the form \synt{qualified}
+(\commentary{which is syntactically the same as \synt{typeName}})
+denotes a generic type declaration,
+and it is used as a type or as an expression in the enclosing program.
+\commentary{%
+This implies that type arguments are accepted, but not provided.%
+}
+We use the phrase
+\Index{raw type} respectively \Index{raw type expression}
+to identify such terms.
+In the following we only mention raw types,
+but everything said about raw types
+applies to raw type expressions in the obvious manner.
+
+\commentary{%
+For instance, with the declaration \code{Type listType() => List;},
+evaluation of the raw type expression \code{List} in the body yields
+an instance of class \code{Type} reifying \code{List<dynamic>},
+because \code{List} is subject to instantiation to bound.
+Note that \code{List<dynamic>} is not syntactically an expression,
+but it is still possible to get access to
+a \code{Type} instance reifying \code{List<dynamic>}
+without instantiation to bound,
+because it can be the value of a type variable.%
+}
+
+\rationale{%
+We can unambiguously define raw types to denote
+the result of applying the generic type
+to a list of implicitly provided actual type arguments,
+and instantiation to bound is a mechanism which does just that.
+This is because Dart does not, and will not, support higher-kinded types;
+for example, the value of a type variable $X$ will be a type,
+it cannot be the generic class \code{List} as such,
+and it cannot be applied to type arguments, e.g., \code{$X$<int>}.%
+}
+
+\rationale{%
+In the typical case where only covariance is encountered,
+instantiation to bound will yield a \emph{supertype} of
+all the regular-bounded types that can be expressed.
+This allows developers to consider a raw type as a type
+which is used to specify that
+``the actual type arguments do not matter''$\!$.%
+}
+\commentary{%
+For example, assuming the declaration
+\code{\CLASS{} C<X extends num> \{\ldots\}},
+instantiation to bound on \code{C} yields \code{C<num>},
+and this means that \code{C x;} can be used to declare a variable \code{x}
+whose value can be a \code{C<$T$>} for \emph{all possible} values of $T$.%
+}
+
+\rationale{%
+Conversely, consider the situation where
+a generic type alias denotes a function type,
+and it has one type parameter which is contravariant.
+Instantiation to bound on that type alias will then yield a \emph{subtype} of
+all the regular-bounded types that can be expressed
+by varying that type argument.
+This allows developers to consider such a type alias used as a raw type
+as a function type which allows the function to be passed to clients
+``where it does not matter which values
+for the type argument the client expects''$\!$.%
+}
+\commentary{%
+E.g., with
+\code{\TYPEDEF{} F<X> = \FUNCTION(X);}
+instantiation to bound on \code{F} yields \code{F<dynamic>},
+and this means that \code{F f;} can be used to declare a variable \code{f}
+whose value will be a function that can be passed to clients expecting
+an \code{F<$T$>} for \emph{all possible} values of $T$.
+}
+
+
+\subsubsection{Auxiliary Concepts for Instantiation to Bound}
+\LMLabel{auxiliaryConceptsForInstantiationToBound}
+
+\LMHash{}%
+Before we specify instantiation to bound we need to define two auxiliary concepts.
+Let $T$ be a raw type.
+A type $S$ then
+\IndexCustom{raw-depends on}{raw-depends on!type}
+$T$ if one or more of the following conditions hold:
+
+\begin{itemize}
+\item
+  $S$ is of the form \synt{typeName}, and $S$ is $T$.
+  \commentary{%
+  Note that this case is not applicable
+  if $S$ is a subterm of a term of the form
+  \syntax{$S$ <typeArguments>},
+  that is,
+  if $S$ receives any type arguments.
+  Also note that $S$ cannot be a type variable,
+  because then `$S$ is $T$' cannot hold.
+  See the discussion below and the reference to~\ref{subtypeRules}
+  for more details about why this is so.%
+  }
+\item
+  $S$ is of the form \syntax{<typeName> <typeArguments>},
+  and one of the type arguments raw-depends on $T$.
+\item
+  $S$ is of the form \syntax{<typeName> <typeArguments>?}\ where
+  \synt{typeName} denotes a type alias $F$,
+  and the body of $F$ raw-depends on $T$.
+\item
+  $S$ is of the form
+  \syntax{<type>? \FUNCTION{} <typeParameters>? <parameterTypeList>} and
+  \syntax{<type>?}\ raw-depends on $T$,
+  or a bound in \syntax{<typeParameters>?}\ raw-depends on $T$,
+  or a type in \synt{parameterTypeList} raw-depends on $T$.
+\end{itemize}
+
+\commentary{%
+Meta-variables
+(\ref{metaVariables})
+like $S$ and $T$ are understood to denote types,
+and they are considered to be equal (as in `$S$ is $T$')
+in the same sense as in the section about subtype rules
+(\ref{subtypeRules}).
+%
+In particular,
+even though two identical pieces of syntax may denote two distinct types,
+and two different pieces of syntax may denote the same type,
+the property of interest here is whether they denote the same type
+and not whether they are spelled identically.
+
+The intuition behind the situation where a type raw-depends on another type is
+that we need to compute any missing type arguments for the latter
+in order to be able to tell what the former means.
+
+In the rule about type aliases, $F$ may or may not be generic,
+and type arguments may or may not be present.
+However, there is no need to consider the result of substituting
+actual type arguments for formal type parameters in the body of $F$
+(or even the correctness of passing those type arguments to $F$),
+because we only need to inspect
+all types of the form \synt{typeName} in its body,
+and they are not affected by such a substitution.
+In other words, raw-dependency is a relation
+which is simple and cheap to compute.
+}
+
+\LMHash{}%
+Let $G$ be a generic class or a generic type alias
+with $k$ formal type parameter declarations
+containing formal type parameters \List{X}{1}{k} and bounds \List{B}{1}{k}.
+For any $j \in 1 .. k$,
+we say that the formal type parameter $X_j$ has a \Index{simple bound}
+when one of the following requirements is satisfied:
+
+\begin{itemize}
+\item $B_j$ is omitted.
+
+\item $B_j$ is included, but does not contain any of \List{X}{1}{k}.
+  If $B_j$ raw-depends on a raw type $T$
+  then every type parameter of $T$ must have a simple bound.
+\end{itemize}
+
+\LMHash{}%
+The notion of a simple bound must be interpreted inductively rather than
+coinductively, i.e., if a bound $B_j$ of a generic class or
+generic type alias $G$ is reached during an investigation of whether
+$B_j$ is a simple bound, the answer is no.
+
+\commentary{%
+For example, with
+\code{\CLASS{} C<X \EXTENDS{} C> \{\}},
+the type parameter \code{X} does not have a simple bound:
+A raw \code{C} is used as a bound for \code{X},
+so \code{C} must have simple bounds,
+but one of the bounds of \code{C} is the bound of \code{X},
+and that bound is \code{C}, so \code{C} must have simple bounds:
+That was a cycle, so the answer is ``no'',
+\code{C} does not have simple bounds.%
+}
+
+\LMHash{}%
+Let $G$ be a generic class or a generic type alias.
+We say that $G$
+\IndexCustom{has simple bounds}{type!generic, has simple bounds}
+if{}f every type parameter of $G$ has simple bounds.
+
+\commentary{%
+We can now specify in which sense instantiation to bound requires
+the involved types to be "simple enough".
+We impose the following constraint on all type parameter bounds,
+because all type parameters may be subject to instantiation to bound.%
+}
+
+\LMHash{}%
+It is a compile-time error
+if a formal type parameter bound $B$ contains a raw type $T$,
+unless $T$ has simple bounds.
+
+\commentary{%
+So type arguments on bounds can only be omitted
+if they themselves have simple bounds.
+In particular,
+\code{\CLASS{} C<X \EXTENDS{} C> \{\}}
+is a compile-time error,
+because the bound \code{C} is raw,
+and the formal type parameter \code{X}
+that corresponds to the omitted type argument
+does not have a simple bound.%
+}
+
+\LMHash{}%
+Let $T$ be a type of the form \synt{typeName}
+which denotes a generic class or a generic type alias
+(\commentary{so $T$ is raw}).
+Then $T$ is equivalent to the parameterized type which is
+the result obtained by applying instantiation to bound to $T$.
+It is a compile-time error if the instantiation to bound fails.
+
+\commentary{%
+This rule is applicable for all occurrences of raw types,
+e.g., when it occurs as a type annotation of a variable or a parameter,
+as a return type of a function,
+as a type which is tested in a type test,
+as the type in an \synt{onPart},
+etc.
+}
+
+\subsubsection{The Instantiation to Bound Algorithm}
+\LMLabel{theInstantiationToBoundAlgorithm}
+
+\LMHash{}%
+We now specify how the
+\Index{instantiation to bound}
+algorithm proceeds.
+Let $T$ be a raw type.
+Let \List{X}{1}{k} be the formal type parameters in the declaration of $G$,
+and let \List{B}{1}{k} be their bounds.
+For each $i \in 1 .. k$,
+let $S_i$ denote the result of instantiation to bound on $B_i$;
+in the case where the $i$th bound is omitted, let $S_i$ be \DYNAMIC.
+
+\commentary{%
+If $B_i$ for some $i$ is raw (in general: if it raw-depends on some type $U$)
+then all its (respectively $U$'s) omitted type arguments have simple bounds.
+This limits the complexity of instantiation to bound for $B_i$,
+and in particular it cannot involve a dependency cycle
+where we need the result from instantiation to bound for $G$
+in order to compute the instantiation to bound for $G$.%
+}
+
+\LMHash{}%
+Let $U_{i,0}$ be $S_i$, for all $i \in 1 .. k$.
+\commentary{%
+This is the "current value" of the bound for type variable $i$, at step 0;
+in general we will consider the current step, $m$, and use data for that step,
+e.g., the bound $U_{i,m}$, to compute the data for step $m + 1$.%
+}
+
+{ %% Scope for definitions of relations used during i2b
+
+\def\Depends{\ensuremath{\rightarrow_m}}
+\def\TransitivelyDepends{\ensuremath{\rightarrow^{+}_m}}
+
+\LMHash{}%
+Let \Depends{} be a relation among the type variables
+\List{X}{1}{k} such that
+$X_p \Depends X_q$ iff $X_q$ occurs in $U_{p,m}$.
+\commentary{%
+So each type variable is related to, that is, depends on,
+every type variable in its bound, which might include itself.%
+}
+Let \TransitivelyDepends{} be the transitive
+(\commentary{but not reflexive})
+closure of \Depends.
+For each $m$, let $U_{i,m+1}$, for $i \in 1 .. k$,
+be determined by the following iterative process, where $V_m$ denotes
+\code{$G$<$U_{1,m},\ \ldots,\ U_{k,m}$>}:
+
+\begin{itemize}
+\item[1.]
+  If there exists a $j \in 1 .. k$ such that
+  $X_j \TransitivelyDepends X_j$
+  (\commentary{that is, if the dependency graph has a cycle})
+  let \List{M}{1}{p} be the strongly connected components (SCCs)
+  with respect to \Depends{}.
+  \commentary{
+  That is, the maximal subsets of \List{X}{1}{k}
+  where every pair of variables in each subset
+  are related in both directions by \TransitivelyDepends;
+  note that the SCCs are pairwise disjoint;
+  also, they are uniquely defined up to reordering,
+  and the order does not matter for this algorithm.%
+  }
+  Let $M$ be the union of \List{M}{1}{p}
+  (\commentary{that is, all variables that participate in a dependency cycle}).
+  Let $i \in 1 .. k$.
+  If $X_i$ does not belong to $M$ then $U_{i,m+1}$ is $U_{i,m}$.
+  Otherwise there exists a $q$ such that $X_i \in M_q$;
+  $U_{i,m+1}$ is then obtained from $U_{i,m}$
+  by substituting \DYNAMIC{} for every occurrence of a variable in $M_q$
+  that is in a position in $V_m$ which is not contravariant,
+  and substituting \code{Null} for every occurrence of a variable in $M_q$
+  which is in a contravariant position in $V_m$.
+
+\item[2.]
+  Otherwise (\commentary{when there are no dependency cycles}),
+  let $j$ be the lowest number such that $X_j$ occurs in $U_{p,m}$ for some $p$
+  and $X_j \not\rightarrow_m X_q$ for all $q$ in $1 .. k$
+  (\commentary{%
+  that is, the bound of $X_j$ does not contain any type variables,
+  but $X_j$ occurs in the bound of some other type variable%
+  }).
+  Then, for all $i \in 1 .. k$,
+  $U_{i,m+1}$ is obtained from $U_{i,m}$
+  by substituting $U_{j,m}$ for every occurrence of $X_j$
+  that is in a position in $V_m$ which  is not contravariant,
+  and substituting \code{Null} for every occurrence of $X_j$
+  which is in a contravariant position in $V_m$.
+
+\item[3.]
+  Otherwise (\commentary{when there are no dependencies at all}),
+  terminate with the result \code{<$U_{1,m},\ \ldots,\ U_{k,m}$>}.
+\end{itemize}
+
+\commentary{%
+This process will always terminate, because the total number of
+occurrences of type variables from $\{\,\List{X}{1}{k}\,\}$ in
+the current bounds is strictly decreasing with each step, and we terminate
+when that number reaches zero.
+}
+
+\rationale{%
+It may seem somewhat arbitrary to treat unused and invariant parameters
+in the same way as covariant parameters,
+in particular because invariant parameters fail to satisfy the expectation that
+a raw type denotes a supertype of all the expressible regular-bounded types.
+
+We could easily have made every instantiation to bound an error
+when applied to a type where invariance occurs anywhere during the run of the algorithm.
+However, there are a number of cases where this choice produces a usable type,
+and we decided that it is not helpful to outlaw such cases.%
+}
+
+\begin{dartCode}
+\TYPEDEF{} Inv<X> = X \FUNCTION(X);
+\CLASS{} B<Y \EXTENDS{} num, Z \EXTENDS{} Inv<Y>{}> \{\}
+\\
+B b; // \comment{The raw B means} B<num, Inv<num>{}>.
+\end{dartCode}
+
+\commentary{%
+For example, the value of \code{b} can have dynamic type
+\code{B<int,\,int\,\FUNCTION(num)>}.
+However, the type arguments have to be chosen carefully,
+or the result will not be a subtype of \code{B}.
+For instance, \code{b} cannot have dynamic type
+\code{B<int, Inv<int>{}>},
+because \code{Inv<int>} is not a subtype of \code{Inv<num>}.%
+}
+
+\LMHash{}%
+A raw type $T$ is a compile-time error if instantiation to bound on $T$
+yields a type which is not well-bounded
+(\ref{superBoundedTypes}).
+
+\commentary{%
+This kind of error can occur, as demonstrated by the following example:%
+}
+
+\begin{dartCode}
+\CLASS{} C<X \EXTENDS{} C<X>{}> \{\}
+\TYPEDEF{} F<X \EXTENDS{} C<X>{}> = X \FUNCTION(X);
+\\
+F f; // \comment{Compile-time error.}
+\end{dartCode}
+
+\commentary{%
+With these declarations,
+the raw \code{F} which is used as a type annotation is a compile-time error:
+The algorithm yields \code{F<C<\DYNAMIC{}>{}>},
+and that is neither a regular-bounded nor a super-bounded type.
+%
+The resulting type can be specified explicitly as
+\code{C<\DYNAMIC{}> \FUNCTION(C<\DYNAMIC{}>)}.
+That type exists,
+we just cannot express it by passing a type argument to \code{F},
+so we make it an error rather than allowing it implicitly.%
+}
+
+\rationale{%
+The core reason why it makes sense to make such a raw type an error
+is that there is no subtype relationship
+between the relevant parameterized types.%
+}
+\commentary{%
+For instance, \code{F<T1>} and \code{F<T2>} are unrelated,
+even when \SubtypeNE{\code{T1}}{\code{T2}} or vice versa.
+In fact, there is no type \code{T} whatsoever
+such that a variable with declared type \code{F<T>}
+could be assigned to a variable of type
+\code{C<\DYNAMIC{}> \FUNCTION(C<\DYNAMIC{}>)}.
+%
+So the raw \code{F}, if permitted,
+would not be ``a supertype of \code{F<T>} for all possible \code{T}'',
+it would be a type which is unrelated to \code{F<T>}
+for \emph{every single} \code{T} that satisfies the bound of \code{F}.
+This is so useless that we made it an error.%
+}
+
+\LMHash{}%
+When instantiation to bound is applied to a type, it proceeds recursively:
+For a parameterized type \code{$G$<\List{T}{1}{k}>}
+it is applied to \List{T}{1}{k}.
+For a function type
+\FunctionTypePositionalStd{T_0}
+
+\noindent
+and a function type
+\FunctionTypeNamedStd{T_0}
+it is applied to \List{T}{0}{n+k}.
+
+\commentary{%
+This means that instantiation to bound has no effect on
+a type that does not contain any raw types.
+Conversely, instantiation to bound acts on types which are syntactic subterms,
+also when they are deeply nested.%
+}
+
+
 \section{Metadata}
 \LMLabel{metadata}
 
@@ -5182,6 +5727,12 @@
 that occurs in a constant context, is a potentially constant expression if $T$ is a constant type expression, and $e_1$, \ldots{} , $e_n$ are constant expressions.
 It is further a constant expression if the list literal evaluates to a value.
 
+\item A constant set literal (\ref{set}),
+\code{\CONST{} <$T$>\{$e_1$, \ldots{}, $e_n$\}}, or
+\code{<$T$>\{$e_1$, \ldots{}, $e_n$\}}
+that occurs in a constant context, is a potentially constant expression if $T$ is a constant type expression, and $e_1$, \ldots{} , $e_n$ are constant expressions.
+It is further a constant expression if the list literal evaluates to a value.
+
 \item A constant map literal (\ref{maps}),
 \code{\CONST{} <$K$, $V$>\{$k_1$: $v_1$, \ldots{}, $k_n$: $v_n$\}}, or
 \code{<$K$, $V$>\{$k_1$: $v_1$, \ldots{}, $k_n$: $v_n$\}} that occurs in a constant context,
@@ -5261,7 +5812,7 @@
 A constant type expression is one of:
 \begin{itemize}
 \item An simple or qualified identifier denoting a type declaration (a type alias, class or mixin declaration) that is not qualified by a deferred prefix,
-optionally followed by type arguments on the form
+optionally followed by type arguments of the form
 \code{<$T_1$,\ \ldots,\ $T_n$>}
 where $T_1$, \ldots{}, $T_n$ are constant type expressions.
 \item A type of the form \code{FutureOr<$T$>} where $T$ is a constant type expression.
@@ -5374,6 +5925,8 @@
   \alt <stringLiteral>
   \alt <symbolLiteral>
   \alt <mapLiteral>
+  \alt <setLiteral>
+  \alt <setOrMapLiteral>
   \alt <listLiteral>
 \end{grammar}
 
@@ -5966,15 +6519,35 @@
 
 \begin{grammar}
 <mapLiteral> ::= \CONST{}? <typeArguments>?
-  \gnewline{} `{' (<mapLiteralEntry> (`,' <mapLiteralEntry>)* `,'?)? `\}'
+  \gnewline{} `{' <mapLiteralEntry> (`,' <mapLiteralEntry>)* `,'? `}'
 
 <mapLiteralEntry> ::= <expression> `:' <expression>
+
+<setOrMapLiteral> ::= \CONST{}? <typeArguments>? `{' `}'
 \end{grammar}
 
 \LMHash{}%
+A \synt{setOrMapLiteral} $e$ is either a set literal (\ref {sets}) or a map literal,
+determined by the type parameters or static context type.
+If $e$ has exactly one type argument, then it is a set literal.
+If $e$ has two type arguments, then it is a map literal.
+If $e$ has three or more type arguments, it is a compile-time error.
+If $e$ has \emph{no} type arguments,
+then let $S$ be the static context type of the literal.
+If $\basetype{S}$ (\ref{typeFutureOr}) is a subtype of \code{Iterable<Object>}
+and $\basetype{S}$ is not a subtype of \code{Map<Object, Object>},
+then $e$ is set literal,
+and otherwise it is a map literal.
+A map literal derived from \synt{setOrMapLiteral}
+is treated the same way as one derived from \synt{mapLiteral},
+as described below.
+
+\LMHash{}%
 A map literal consists of zero or more entries.
 Each entry has a \Index{key} and a \Index{value}.
 Each key and each value is denoted by an expression.
+It is a compile-time error if a map literal has one type argument,
+or more than two type arguments.
 
 \LMHash{}%
 If a map literal begins with the reserved word \CONST{}, it is a
@@ -6028,6 +6601,10 @@
 }
 
 \LMHash{}%
+It is a compile-time error if two keys of a constant map literal are equal
+according to their \code{==} operator (\ref{equality}).
+
+\LMHash{}%
 A run-time map literal
 \code{<$K, V$>\{$k_1:e_1, \ldots, k_n:e_n$\}}
 is evaluated as follows:
@@ -6037,8 +6614,8 @@
 first the expression $k_i$ is evaluated producing object $u_i$,
 and then $e_i$ is evaluated producing object $o_i$.
 This produces all the objects $u_1, o_1, \ldots, u_n, o_n$.
-\item A fresh instance (\ref{generativeConstructors}) $m$ whose class implements the built-in class
-\code{Map<$K, V$>} is allocated.
+\item A fresh instance (\ref{generativeConstructors}) $m$
+whose class implements the built-in class \code{Map<$K, V$>}, is allocated.
 \item
 The operator \syntax{`[]='} is invoked on $m$ with first argument $u_i$ and second argument $o_i$ for each $i \in 1 .. n$.
 \item
@@ -6057,9 +6634,6 @@
 \code{<\DYNAMIC{}, \DYNAMIC{}>\{$k_1:e_1, \ldots, k_n:e_n$\}}.
 
 \LMHash{}%
-It is a compile-time error if two keys of a constant map literal are equal.
-
-\LMHash{}%
 A map literal is ordered: iterating over the keys and/or values of the maps always happens in the
  order the keys appeared in the source code.
 
@@ -6081,6 +6655,121 @@
 \code{Map<\DYNAMIC{}, \DYNAMIC{}>}.
 
 
+\subsection{Sets}
+\LMLabel{sets}
+
+\LMHash{}%
+A \IndexCustom{set literal}{literal!set} denotes a set object.
+
+\begin{grammar}
+<setLiteral> ::= \CONST{}? <typeArguments>?
+  \gnewline{} `{' <expression> (`,' <expression>)* `,'? `\}'
+\end{grammar}
+
+\LMHash{}%
+A \synt{setOrMapLiteral} is either set literal or a map literal (\ref {maps}).
+A set literal derived from \synt{setOrMapLiteral}
+is treated the same way as one derived from \synt{setLiteral},
+as described below.
+
+\LMHash{}%
+A set literal consists of zero or more element expressions.
+It is a compile-time error if a set literal has more than one type argument.
+
+\LMHash{}%
+\rationale{
+A set literal with no type argument is always converted to a literal
+with a type argument by type inference (\ref{overview}), so the following
+section only address the behavior of literals with type arguments.}
+
+\LMHash{}%
+If a set literal begins with the reserved word \CONST{},
+or if it occurs in a constant context, then it is a
+\IndexCustom{constant set literal}{literal!set!constant}
+which is a constant expression (\ref{constants}) and therefore evaluated at compile time.
+Otherwise, it is a
+\IndexCustom{run-time set literal}{literal!set!run-time}
+and it is evaluated at run time.
+Only run-time set literals can be mutated after they are created.
+Attempting to mutate a constant set literal will result in a dynamic error.
+
+\LMHash{}%
+It is a compile-time error if an element expression in a constant set literal is not a constant expression.
+It is a compile-time error if the element object in a constant set literal is an instance of
+a class that has a concrete operator \syntax{`=='} declaration different from the one in \code{Object},
+unless the element is a string or an integer,
+the element expression evaluates to an instance of the built-in
+class \code{Symbol} which was originally obtained by evaluation of a
+literal symbol or
+a constant invocation of a constructor of the \code{Symbol} class,
+or to an object implementing the built-in class \code{Type}
+which was originally obtained by evaluating a constant type literal
+(\ref{dynamicTypeSystem}).
+It is a compile-time error if the type argument of a constant set literal
+is not a constant type expression \ref{constants}.
+It is a compile-time error if two elements of a constant set literal are equal
+according to their \code{==} operator (\ref{equality}).
+
+\LMHash{}%
+The value of a constant set literal with element expressions
+$e_1, \dots, e_n$ and type argument $E$
+is an object $s$ whose class implements the built-in class
+\code{Set<$E$>}.
+The elements of $m$ are $v_i, i \in 1 .. n$, where $v_i$ is the value of the constant expression $e_i$.
+
+\LMHash{}%
+Let $set_1$ be a constant set literal with type argument $E$
+and element expressions, in source order, $e_{11}, \ldots, e_{1n}$ evaluating
+to values $v_{11}, \ldots, v_{1n}$.
+Let $set_2$ be a constant set literal with type argument $F$
+and element expressions, in source order, $e_{21}, \ldots, e_{2n}$ evaluating
+to values $v_{21}, \ldots, v_{2n}$.
+If{}f \code{identical($v_{1i}$, $v_{2i}$)}
+for $i \in 1 .. n$, and $E$ and $F$ is the same type,
+then \code{identical($set_1$, $set_2$)}.
+\commentary{
+In other words, constant set literals are canonicalized if they have
+the same type and the same values in the same order.
+}
+Two constant set literals are never identical if they have different numbers
+of elements.
+
+\LMHash{}%
+A run-time set literal with element expressions $e_1, \ldots, e_n$
+(in source order) and with type argument $E$
+is evaluated as follows:
+\begin{itemize}
+\item
+For each $i \in 1 .. n$ in numeric order,
+the expression $e_i$ is evaluated producing object $v_i$.
+\item A fresh object (\ref{generativeConstructors}) $s$
+implementing the built-in class \code{Set<$E$>}, is created.
+\item The set $s$ is made to have the values $v_1, \ldots{} , v_n$ as elements,
+iterated in numerical order.
+\item
+The result of the evaluation is $s$.
+\end{itemize}
+
+\LMHash{}%
+The objects created by set literals do not override
+the \code{==} operator inherited from the \code{Object} class.
+
+\LMHash{}%
+A set literal is ordered: iterating over the elements of the sets
+always happens in the order the elements first appeared in the source code.
+
+\commentary{
+If a value repeats, the order is defined by first occurrence, but the value is defined by the last.
+}
+
+\LMHash{}%
+The static type of a set literal of the form
+\code{\CONST{} <$E$>\{$e_1, \ldots, e_n$\}}
+or the form
+\code{<$E$>\{$e_1, \ldots, e_n$\}}
+is
+\code{Set<$E$>}.
+
 \subsection{Throw}
 \LMLabel{throw}
 
@@ -6198,6 +6887,7 @@
 \noindent
 %% TODO[inference]: The static type of the function literal may come from context.
 where $T_0$ is the static type of $e$.
+\EndCase
 
 \LMHash{}%
 \Case{Positional, arrow, future}
@@ -6215,6 +6905,7 @@
 
 \noindent
 where $T_0$ is the static type of $e$.
+\EndCase
 
 \LMHash{}%
 \Case{Named, arrow}
@@ -6232,6 +6923,7 @@
 
 \noindent
 where $T_0$ is the static type of $e$.
+\EndCase
 
 \LMHash{}%
 \Case{Named, arrow, future}
@@ -6249,6 +6941,7 @@
 
 \noindent
 where $T_0$ is the static type of $e$.
+\EndCase
 
 \LMHash{}%
 \Case{Positional, block}
@@ -6263,6 +6956,7 @@
 \noindent
 is
 \FunctionTypePositionalStdCr{\DYNAMIC}
+\EndCase
 
 \LMHash{}%
 \Case{Positional, block, future}
@@ -6278,6 +6972,7 @@
 is
 %% TODO(eernst): Adjust to take type inference into account.
 \FunctionTypePositionalStdCr{\code{Future}}.
+\EndCase
 
 \LMHash{}%
 \Case{Positional, block, stream}
@@ -6293,6 +6988,7 @@
 is
 %% TODO(eernst): Adjust to take type inference into account.
 \FunctionTypePositionalStdCr{\code{Stream}}.
+\EndCase
 
 \LMHash{}%
 \Case{Positional, block, iterable}
@@ -6308,6 +7004,7 @@
 is
 %% TODO(eernst): Adjust to take type inference into account.
 \FunctionTypePositionalStdCr{\code{Iterable}}.
+\EndCase
 
 \LMHash{}%
 \Case{Named, block}
@@ -6323,6 +7020,7 @@
 is
 %% TODO(eernst): Adjust to take type inference into account.
 \FunctionTypePositionalStdCr{\DYNAMIC}.
+\EndCase
 
 \LMHash{}%
 \Case{Named, block, future}
@@ -6338,6 +7036,7 @@
 is
 %% TODO(eernst): Adjust to take type inference into account.
 \FunctionTypeNamedStdCr{\code{Future}}.
+\EndCase
 
 \LMHash{}%
 \Case{Named, block, stream}
@@ -6353,6 +7052,7 @@
 is
 %% TODO(eernst): Adjust to take type inference into account.
 \FunctionTypeNamedStdCr{\code{Stream}}.
+\EndCase
 
 \LMHash{}%
 \Case{Named, block, iterable}
@@ -6368,6 +7068,7 @@
 is
 %% TODO(eernst): Adjust to take type inference into account.
 \FunctionTypeNamedStdCr{\code{Iterable}}.
+\EndCase
 
 \LMHash{}%
 In all of the above cases,
@@ -6453,7 +7154,7 @@
 The \Index{new expression} invokes a constructor (\ref{constructors}).
 
 \begin{grammar}
-<newExpression> ::= \NEW{} <type> (`.' <identifier>)? <arguments>
+<newExpression> ::= \NEW{} <typeNotVoid> (`.' <identifier>)? <arguments>
 \end{grammar}
 
 \LMHash{}%
@@ -6565,6 +7266,7 @@
 \LMHash{}%
 \Case{Non-loaded deferred constructors}
 If $T$ is a deferred type with prefix $p$, then if $p$ has not been successfully loaded, a dynamic error occurs.
+\EndCase
 
 \LMHash{}%
 \Case{Generative constructors}
@@ -6583,10 +7285,11 @@
 with its type parameters bound to $u_1, \ldots, u_m$.
 
 \LMHash{}%
-If execution of $q$ completes normally (\ref{completion}), $e$ evaluates to $i$.
+If execution of $q$ completes normally (\ref{statementCompletion}), $e$ evaluates to $i$.
 Otherwise execution of $q$ throws an exception object $x$ and stack trace $t$,
 and then evaluation of $e$ also throws exception object $x$ and stack trace $t$
 (\ref{evaluation}).
+\EndCase
 
 \LMHash{}%
 \Case{Redirecting factory constructors}
@@ -6601,9 +7304,10 @@
 in an environment where
 $v_j$ is a fresh variable bound to $o_j$ for $j \in 1 .. n + k$, and
 $X_j$ is bound to $u_j$ for $j \in 1 .. m$.
-\commentary{
-We need access to the type variables because $c$ may contain them.
+\commentary{%
+We need access to the type variables because $c$ may contain them.%
 }
+\EndCase
 
 \LMHash{}%
 \Case{Non-redirecting factory constructors}
@@ -6612,7 +7316,7 @@
 the bindings that resulted from the evaluation of the argument list,
 and with the type parameters, if any, of $q$ bound to
 the actual type arguments $u_1, \ldots, u_m$.
-If this execution returns a value (\ref{completion}),
+If this execution returns a value (\ref{statementCompletion}),
 then $e$ evaluates to the returned value.
 Otherwise, if the execution completes normally or returns with no value,
 then $e$ evaluates to the null object (\ref{null}).
@@ -6623,6 +7327,7 @@
 A factory constructor can be declared in an abstract class and used safely,
 as it will either produce a valid instance or throw.
 }
+\EndCase
 
 
 \subsubsection{Const}
@@ -6633,7 +7338,7 @@
 (\ref{constantConstructors}).
 
 \begin{grammar}
-<constObjectExpression> ::= \CONST{} <type> (`.' <identifier>)? <arguments>
+<constObjectExpression> ::= \CONST{} <typeNotVoid> (`.' <identifier>)? <arguments>
 \end{grammar}
 
 \LMHash{}%
@@ -6855,12 +7560,12 @@
 
 \LMHash{}%
 If $f$ is synchronous and is not a generator (\ref{functions}) then execution of the body of $f$ begins immediately.
-If the execution of the body of $f$ returns a value, $v$, (\ref{completion}), the invocation evaluates to $v$.
+If the execution of the body of $f$ returns a value, $v$, (\ref{statementCompletion}), the invocation evaluates to $v$.
 If the execution completes normally or it returns without a value, the invocation evaluates to the null object (\ref{null}).
 If the execution throws an exception object and stack trace, the invocation throws the same exception object and stack trace (\ref{evaluation}).
 
 \commentary{
-A complete function body can never break or contine (\ref{completion})
+A complete function body can never break or continue (\ref{statementCompletion})
 because a \BREAK{} or \CONTINUE{} statement must always occur inside the statement that is the target of the \BREAK{} or \CONTINUE{}.
 This means that a function body can only either complete normally, throw, or return.
 Completing normally or returning without a value is treated the same as returning the null object (\ref{null}), so the result of executing a function body can always be used as the result of evaluating an expression, either by evaluating to a value or by the evaluation throwing.
@@ -6894,9 +7599,9 @@
 
 \LMHash{}%
 When iteration over the iterable is started, by getting an iterator $j$ from the iterable and calling \code{moveNext()}, execution of the body of $f$ will begin.
-When execution of the body of $f$ completes (\ref{completion}),
+When execution of the body of $f$ completes (\ref{statementCompletion}),
 \begin{itemize}
-\item If it returns without a value or it completes normally (\ref{completion}), $j$ is positioned after its last element, so that its current value is the null object (\ref{null}) and the current call to \code{moveNext()} on $j$ returns false, as must all further calls.
+\item If it returns without a value or it completes normally (\ref{statementCompletion}), $j$ is positioned after its last element, so that its current value is the null object (\ref{null}) and the current call to \code{moveNext()} on $j$ returns false, as must all further calls.
 \item If it throws an exception object $e$ and stack trace $t$ then the current value of $j$ is the null object (\ref{null}) and the current call to \code{moveNext()} throws $e$ and $t$ as well.
 Further calls to \code{moveNext()} must return false.
 \end{itemize}
@@ -6931,7 +7636,7 @@
 \commentary{
 The body of $f$ may suspend during the evaluation of an \AWAIT{} expression or execution of an asynchronous \FOR{} loop.
 }
-The future $o$ is completed when execution of the body of $f$ completes (\ref{completion}).
+The future $o$ is completed when execution of the body of $f$ completes (\ref{statementCompletion}).
 If execution of the body returns a value, $o$ is completed with that value,
 if it completes normally or returns without a value,
 $o$ is completed with the null object (\ref{null}),
@@ -6955,7 +7660,7 @@
 When $s$ is listened to, execution of the body of $f$ will begin.
 When execution of the body of $f$ completes:
 \begin{itemize}
-\item If it completes normally or returns with no value (\ref{completion}), then if $s$ has been canceled then its cancellation future is completed with the null object (\ref{null}).
+\item If it completes normally or returns with no value (\ref{statementCompletion}), then if $s$ has been canceled then its cancellation future is completed with the null object (\ref{null}).
 \item If it throws an exception object $e$ and stack trace $t$:
   \begin{itemize}
   \item If $s$ has been canceled then its cancellation future is completed with error $e$ and stack trace $t$.
@@ -6964,7 +7669,7 @@
 \item $s$ is closed.
 \end{itemize}
 \commentary{
-The body of an asynchronous generator function cannot break, continue or return a value (\ref{completion}).
+The body of an asynchronous generator function cannot break, continue or return a value (\ref{statementCompletion}).
 The first two are only allowed in contexts that will handle the break or continue, and return statements with an expression are not allowed in generator functions.
 }
 
@@ -7567,7 +8272,7 @@
 and then execute the body of $f$
 in the captured scope amended with the bound parameter scope,
 yielding the same completion
-(\ref{completion})
+(\ref{statementCompletion})
 as the invocation of $f$ would have yielded.
 
 
@@ -7723,6 +8428,7 @@
 \code{$v$.$m$<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}
 to a value $r$.
 Then $e$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e$.$m$<$\cdots$>($\cdots$)}}
@@ -7845,6 +8551,7 @@
 when the static type of $e$ is \DYNAMIC{}.
 Notice that the wording avoids re-evaluating the receiver $o$ and the arguments $a_i$.
 }
+\EndCase
 
 
 \subsubsection{Cascaded Invocations}
@@ -8044,6 +8751,7 @@
 Otherwise let $x$ be a fresh variable bound to $o$
 and evaluate \code{$x$.\id} to a value $r$.
 Then $i$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{Unconditional}
@@ -8054,6 +8762,7 @@
 (\ref{getterAccessAndMethodExtraction}),
 or of the form \code{\SUPER.\id}
 (\ref{superGetterAccessAndMethodClosurization}).
+\EndCase
 
 
 \subsubsection{Getter Access and Method Extraction}
@@ -8559,6 +9268,7 @@
 and the dynamic type of $o$ is not a subtype of the actual type
 (\ref{actualTypeOfADeclaration})
 of $v$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$?.$v$ = $e_2$}}
@@ -8576,6 +9286,7 @@
 Otherwise let $x$ be a fresh variable bound to $o$
 and evaluate \code{$x$.$v$ = $e_2$} to an object $r$.
 Then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$.$v$ = $e_2$}}
@@ -8625,6 +9336,7 @@
 
 \LMHash{}%
 The value of the assignment expression is $o_2$ irrespective of whether setter lookup has failed or succeeded.
+\EndCase
 
 \LMHash{}%
 \Case{\code{\SUPER.$v$ = $e$}}
@@ -8658,6 +9370,7 @@
 and the dynamic type of $o$ is
 not a subtype of the actual type of the formal parameter of \code{$v$=}
 (\ref{actualTypeOfADeclaration}) in $S_{static}$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$[$e_2$] = $e_3$}}
@@ -8681,6 +9394,7 @@
 Call the method \code{[]=} on $a$ with $i$ as first argument and $v$ as second argument.
 Then $a$ evaluates to $v$.
 % Should we add: It is a dynamic error if $e_1$ evaluates to a constant list or map?
+\EndCase
 
 \LMHash{}%
 \Case{\code{\SUPER[$e_1$] = $e_2$}}
@@ -8697,6 +9411,7 @@
 \LMHash{}%
 For evaluation, an assignment of the form \code{\SUPER[$e_1$] = $e_2$}
 is equivalent to the expression \code{\SUPER.[$e_1$] = $e_2$}.
+\EndCase
 
 
 \subsubsection{Compound Assignment}
@@ -8718,6 +9433,7 @@
 If $o$ is not the null object (\ref{null}), $a$ evaluates to $o$.
 Otherwise evaluate \code{$v$ = $e$} to a value $r$,
 and then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$C$.$v$ ??= $e$}}
@@ -8736,6 +9452,7 @@
 If $o$ is not the null object (\ref{null}), $a$ evaluates to $o$.
 Otherwise evaluate \code{$C$.$v$ = $e$} to a value $r$,
 and then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$.$v$ ??= $e_2$}}
@@ -8755,6 +9472,7 @@
 If $o$ is not the null object (\ref{null}), $a$ evaluates to $o$.
 Otherwise evaluate \code{$x$.$v$ = $e_2$} to an object $r$,
 and then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$[$e_2$] ??= $e_3$}}
@@ -8772,6 +9490,7 @@
 Otherwise evaluate $e_3$ to an object $v$
 and then call the \code{[]=} method on $u$ with $i$ as first argument and $v$ as second argument.
 Then $a$ evaluates to $v$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{\SUPER.$v$ ??= $e$}}
@@ -8787,6 +9506,7 @@
 If $o$ is not the null object (\ref{null}) then $a$ evaluates to $o$.
 Otherwise evaluate \code{\SUPER.$v$ = $e$} to an object $r$,
 and then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$?.$v$ ??= $e_2$}}
@@ -8807,6 +9527,7 @@
 If $o$ is not the null object (\ref{null}) then $a$ evaluates to $o$.
 Otherwise evaluate \code{$x$.$v$ = $e_2$} to an object $r$,
 and then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$C$?.$v$ ??= $e_2$}}
@@ -8814,12 +9535,14 @@
 where $C$ is a type literal
 that may or may not be be qualified by an import prefix
 is equivalent to the expression \code{$C$.$v$ ??= $e$}.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$v$ $op$= $e$}}
 For any other valid operator $op$, a compound assignment of the form \code{$v$ $op$= $e$}
 is equivalent to \code{$v$ = $v$ $op$ $e$},
 where $v$ is an identifier or an identifier qualified by an import prefix.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$C$.$v$ $op$= $e$}}
@@ -8827,6 +9550,7 @@
 where $C$ is a type literal
 that may or may not be qualified by an import prefix
 is equivalent to \code{$C$.$v$ = $C$.$v$ $op$ $e$}.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$.$v$ $op$= $e_2$}}
@@ -8842,6 +9566,7 @@
 Evaluate $e_1$ to an object $u$ and let $x$ be a fresh variable bound to $u$.
 Evaluate \code{$x$.$v$ = $x$.$v$ $op$ $e_2$} to an object $r$
 and then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$[$e_2$] $op$= $e_3$}}
@@ -8860,6 +9585,7 @@
 Let $x$ and $i$ be fresh variables bound to $u$ and $v$ respectively.
 Evaluate \code{$x$[$i$] = $x$[$i$] $op$ $e_3$} to an object $r$,
 and then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$e_1$?.$v$ $op$= $e_2$}}
@@ -8875,6 +9601,7 @@
 Otherwise let $x$ be a fresh variable bound to $u$.
 Evaluate \code{$x$.$v$ $op$= $e_2$} to an object $r$.
 Then $a$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
 \Case{\code{$C$?.$v$ $op$ = $e_2$}}
@@ -8897,6 +9624,7 @@
   \alt `|='
   \alt `??='
 \end{grammar}
+\EndCase
 
 
 \subsection{Conditional}
@@ -9723,7 +10451,7 @@
 The \Index{is-expression} tests if an object is a member of a type.
 
 \begin{grammar}
-<typeTest> ::= <isOperator> <type>
+<typeTest> ::= <isOperator> <typeNotVoid>
 
 <isOperator> ::= \IS{} `!'?
 \end{grammar}
@@ -9750,13 +10478,19 @@
 \LMHash{}%
 The is-expression \code{$e$ \IS{}! $T$} is equivalent to \code{!($e$ \IS{} $T$)}.
 
-% Add flow dependent types
-
 \LMHash{}%
 Let $v$ be a local variable (\commentary{which can be a formal parameter}).
-%% TODO(eernst): Cf. issue https://github.com/dart-lang/sdk/issues/35314.
-An is-expression of the form \code{$v$ \IS{} $T$} shows that $v$ has type $T$
-if{}f $T$ is a subtype of the type $S$ of the expression $v$.
+An is-expression of the form \code{$v$ \IS{} $T$}
+shows that $v$ has type $T$
+if $T$ is a subtype of the type of the expression $v$.
+%
+Otherwise,
+if the declared type of $v$ is the type variable $X$,
+and $T$ is a subtype of the bound of $X$,
+and $X \& T$ is a subtype of the type of the expression $v$,
+then $e$ shows that $v$ has type $X \& T$.
+%
+Otherwise $e$ does not show that $v$ has type $T$ for any $T$.
 
 \rationale{
 The motivation for the ``shows that v has type T" relation is to reduce spurious errors thereby enabling a more natural coding style.
@@ -9767,10 +10501,12 @@
 
 It is pointless to deduce a weaker type than what is already known.
 Furthermore, this would lead to a situation where multiple types are associated with a variable at a given point, which complicates the specification.
-Hence the requirement that \SubtypeNE{T}{S}.
+Hence the requirement that the promoted type is a subtype of the current type.
 
-We do not want to refine the type of a variable of type \DYNAMIC{}, as this could lead to more errors rather than fewer.
-The opposite requirement, that $T \ne \DYNAMIC{}$ is a safeguard lest $S$ ever be $\bot$.
+In any case, it is not an error when a type test does not show
+that a given variable does not have a ``better'' type than previously known,
+but tools may choose to give a hint in such cases,
+if suitable heuristics indicate that a promotion is likely to be intended.
 }
 
 \LMHash{}%
@@ -9784,7 +10520,7 @@
 The \Index{cast expression} ensures that an object is a member of a type.
 
 \begin{grammar}
-<typeCast> ::= <asOperator> <type>
+<typeCast> ::= <asOperator> <typeNotVoid>
 
 <asOperator> ::= \AS{}
 \end{grammar}
@@ -9811,42 +10547,6 @@
 A \Index{statement} is a fragment of Dart code that can be executed at run time.
 Statements, unlike expressions, do not evaluate to a value, but are instead executed for their effect on the program state and control flow.
 
-\label{completion}
-Execution of a statement \IndexCustom{completes}{completion}
-in one of five ways:
-either it
-\IndexCustom{completes normally}{completion!normally},
-it \IndexCustom{breaks}{completion!breaks}
-or it \IndexCustom{continues}{completion!continues}
-(either to a label or without a label),
-it \IndexCustom{returns}{completion!returns} (with or without a value),
-or it \IndexCustom{throws}{completion!throws}
-an exception object and an associated stack trace.
-
-In the description of statement execution, the default is that the execution
-completes normally unless otherwise stated.
-
-If the execution of a statement, $s$, is defined in terms of executing
-another statement,
-and the execution of that other statement does not complete normally,
-then, unless otherwise stated, the execution of $s$ stops
-at that point and completes in the same way.
-\commentary{
-For example, if execution of the body of a \DO{} loop returns a value, so does execution of the \DO{} loop statement itself.
-}
-
-If the execution of a statement is defined in terms of evaluating an expression
-and the evaluation of that expression throws,
-then, unless otherwise stated, the execution of the statement stops
-at that point and throws the same exception object and stack trace.
-\commentary{
-For example, if evaluation of the condition expression of an \IF{} statement throws,
-then so does execution of the \IF{} statement.
-Likewise, if evaluation of the expression of a \RETURN{} statement throws, so does execution of the \RETURN{} statement.
-}
-
-\LMHash{}%
-
 \begin{grammar}
 <statements> ::= <statement>*
 
@@ -9872,6 +10572,59 @@
 \end{grammar}
 
 
+\subsubsection{Statement Completion}
+\LMLabel{statementCompletion}
+
+\LMHash{}%
+Execution of a statement \IndexCustom{completes}{completion}
+in one of five ways:
+either it
+\IndexCustom{completes normally}{completion!normally},
+it \IndexCustom{breaks}{completion!breaks}
+or it \IndexCustom{continues}{completion!continues}
+(either to a label or without a label),
+it \IndexCustom{returns}{completion!returns} (with or without a value),
+or it \IndexCustom{throws}{completion!throws}
+an exception object and an associated stack trace.
+
+\LMHash{}%
+In descriptions of statement execution the default is that
+the execution completes normally unless otherwise stated.
+
+\LMHash{}%
+If the execution of a statement, $s$,
+is defined in terms of executing another statement,
+and the execution of that other statement does not complete normally,
+then, unless otherwise stated, the execution of $s$ stops
+at that point and completes in the same way.
+\commentary{%
+For example, if execution of the body of a \DO{} loop returns a value,
+so does execution of the \DO{} loop statement itself.%
+}
+
+\LMHash{}%
+If the execution of a statement is defined in terms of evaluating an expression
+and the evaluation of that expression throws,
+then, unless otherwise stated, the execution of the statement stops
+at that point and throws the same exception object and stack trace.
+\commentary{
+For example,
+if evaluation of the condition expression of an \IF{} statement throws,
+then so does execution of the \IF{} statement.
+Likewise, if evaluation of the expression of a \RETURN{} statement throws,
+so does execution of the \RETURN{} statement.
+}
+
+%% TODO(eernst): Use proposal from Lasse to define the concept of a statement
+%% for which it is 'statically known that it will not complete normally': Cf.
+%% https://github.com/dart-lang/language/issues/139.
+\Q{%
+Definition of
+`it is statically known that this statement will not complete normally'
+will be inserted here.%
+}
+
+
 \subsection{Blocks}
 \LMLabel{blocks}
 
@@ -10266,7 +11019,7 @@
 The statement $[v'/v]\{s\}$ is executed.
 
 If this execution completes normally, continues without a label,
-or continues to a label (\ref{labels}) that prefixes this \FOR{} statement (\ref{completion}),
+or continues to a label (\ref{labels}) that prefixes this \FOR{} statement (\ref{statementCompletion}),
 then execution of the statement is treated as if it had completed normally.
 
 \label{allocateFreshVar}
@@ -10379,7 +11132,7 @@
 }
 
 \LMHash{}%
-If execution of $s$ continues without a label, or to a label (\ref{labels}) that prefixes the asynchronous for statement (\ref{completion}), then the execution of $s$ is treated as if it had completed normally.
+If execution of $s$ continues without a label, or to a label (\ref{labels}) that prefixes the asynchronous for statement (\ref{statementCompletion}), then the execution of $s$ is treated as if it had completed normally.
 
 If execution of $s$ otherwise does not complete normally, the subscription $u$ is canceled by evaluating \code{\AWAIT{} $v$.cancel()} where $v$ is a fresh variable referencing the stream subscription $u$.
 If that evaluation throws,
@@ -10434,11 +11187,11 @@
 It is a run-time error if the run-time type of $o$ is not \code{bool}.
 
 \LMHash{}%
-If $o$ is \FALSE{}, then execution of the while statement completes normally (\ref{completion}).
+If $o$ is \FALSE{}, then execution of the while statement completes normally (\ref{statementCompletion}).
 
 \LMHash{}%
 Otherwise $o$ is \TRUE{} and then the statement $\{s\}$ is executed.
-If that execution completes normally or it continues with no label or to a label (\ref{labels}) that prefixes the \WHILE{} statement (\ref{completion}), then the while statement is re-executed.
+If that execution completes normally or it continues with no label or to a label (\ref{labels}) that prefixes the \WHILE{} statement (\ref{statementCompletion}), then the while statement is re-executed.
 If the execution breaks without a label, execution of the while statement completes normally.
 \commentary{
 If the execution breaks with a label that prefixes the \WHILE{} statement,
@@ -10464,12 +11217,12 @@
 
 \LMHash{}%
 The statement $\{s\}$ is executed.
-If that execution continues with no label, or to a label (\ref{labels}) that prefixes the do statement (\ref{completion}), then the execution of $s$ is treated as if it had completed normally.
+If that execution continues with no label, or to a label (\ref{labels}) that prefixes the do statement (\ref{statementCompletion}), then the execution of $s$ is treated as if it had completed normally.
 
 \LMHash{}%
 Then, the expression $e$ is evaluated to an object $o$.
 It is a run-time error if the run-time type of $o$ is not \code{bool}.
-If $o$ is \FALSE{}, execution of the do statement completes normally (\ref{completion}).
+If $o$ is \FALSE{}, execution of the do statement completes normally (\ref{statementCompletion}).
 If $o$ is \TRUE{}, then the do statement is re-executed.
 
 \LMHash{}%
@@ -10630,7 +11383,7 @@
 If $o$ is \FALSE{} the following case, \CASE{} $e_{k+1}: s_{k+1}$ is matched against \id{} if $k < n$.
 If $o$ is \TRUE{}, let $h$ be the smallest integer such that $h \ge k$ and $s_h$ is non-empty.
 If such a $h$ exists, the case statements $s_h$ are executed (\ref{case-execute}).
-Otherwise the switch statement completes normally (\ref{completion}).
+Otherwise the switch statement completes normally (\ref{statementCompletion}).
 
 \LMHash{}%
 It is a compile-time error if the type of $e$ may not be assigned to the type of $e_k$.
@@ -10720,9 +11473,9 @@
 The last case in a switch (default or otherwise) can `fall-through' to the end of the statement.
 }
 
-If execution of $\{s_h\}$ breaks with no label (\ref{completion}), then the execution of the switch statement completes normally.
+If execution of $\{s_h\}$ breaks with no label (\ref{statementCompletion}), then the execution of the switch statement completes normally.
 
-If execution of $\{s_h\}$ continues to a label (\ref{completion}), and the label is $label_{ij}$, where $1 \le i \le n+1$ if the \SWITCH{} statement has a \DEFAULT{}, or $1 \le i \le n$ if there is no \DEFAULT{}, and where $1 \le j \le j_{i}$, then
+If execution of $\{s_h\}$ continues to a label (\ref{statementCompletion}), and the label is $label_{ij}$, where $1 \le i \le n+1$ if the \SWITCH{} statement has a \DEFAULT{}, or $1 \le i \le n$ if there is no \DEFAULT{}, and where $1 \le j \le j_{i}$, then
 let $h$ be the smallest number such that $h \ge i$ and $s_h$ is non-empty.
 If no such $h$ exists, let $h = n + 1$ if the \SWITCH{} statement has a \DEFAULT{}, otherwise let $h = n$.
 The case statements $s_h$ are then executed (\ref{case-execute}).
@@ -10752,7 +11505,7 @@
 }
 
 \LMHash{}%
-The \RETHROW{} statement throws (\ref{completion}) with $p_1$ as the exception object and $p_2$ as the stack trace.
+The \RETHROW{} statement throws (\ref{statementCompletion}) with $p_1$ as the exception object and $p_2$ as the stack trace.
 
 \LMHash{}%
 It is a compile-time error if a \code{\RETHROW{}} statement is not enclosed within an \ON-\CATCH{} clause.
@@ -10768,7 +11521,7 @@
 <tryStatement> ::= \TRY{} <block> (<onPart>+ <finallyPart>? | <finallyPart>)
 
 <onPart> ::= <catchPart> <block>
-  \alt \ON{} <type> <catchPart>? <block>
+  \alt \ON{} <typeNotVoid> <catchPart>? <block>
 
 <catchPart> ::= \CATCH{} `(' <identifier> (`,' <identifier>)? `)'
 
@@ -10822,13 +11575,13 @@
 
 \LMHash{}%
 First $b$ is executed.
-If execution of $b$ throws (\ref{completion}) with exception object $e$ and stack trace $t$, then $e$ and $t$ are matched against the \ON{}-\CATCH{} clauses to yield a new completion (\ref{on-catch}).
+If execution of $b$ throws (\ref{statementCompletion}) with exception object $e$ and stack trace $t$, then $e$ and $t$ are matched against the \ON{}-\CATCH{} clauses to yield a new completion (\ref{on-catch}).
 
 Then, even if execution of $b$ did not complete normally or matching against the \ON{}-\CATCH{} clauses did not complete normally, the $f$ block is executed.
 
 If execution of $f$ does not complete normally,
 execution of the \TRY{} statement completes in the same way.
-Otherwise if execution of $b$ threw (\ref{completion}), the \TRY{} statement completes in the same way as the matching against the \ON{}-\CATCH{} clauses.
+Otherwise if execution of $b$ threw (\ref{statementCompletion}), the \TRY{} statement completes in the same way as the matching against the \ON{}-\CATCH{} clauses.
 Otherwise the \TRY{} statement completes in the same way as the execution of $b$.
 
 \LMHash{}%
@@ -10850,7 +11603,7 @@
 proceeds as follows:
 
 \LMHash{}%
-If there are no \ON{}-\CATCH{} clauses ($n = 0$), matching throws the exception object $e$ and stack trace $t$ (\ref{completion}).
+If there are no \ON{}-\CATCH{} clauses ($n = 0$), matching throws the exception object $e$ and stack trace $t$ (\ref{statementCompletion}).
 
 \LMHash{}%
 Otherwise the exception is matched against the first clause.
@@ -10873,85 +11626,167 @@
 \LMLabel{return}
 
 \LMHash{}%
-The \Index{return statement} returns a result to the caller of a synchronous function,
+The \Index{return statement}
+returns a result to the caller of a synchronous function,
 completes the future associated with an asynchronous function,
-or terminates the stream or iterable associated with a generator (\ref{functions}).
+or terminates the stream or iterable associated with a generator
+(\ref{functions}).
 
 \begin{grammar}
 <returnStatement> ::= \RETURN{} <expression>? `;'
 \end{grammar}
 
 \LMHash{}%
-Consider a return statement of the form \code{\RETURN{} $e$;}.
-Let $T$ be the static type of $e$, let $f$ be the immediately enclosing function,
-and let $S$ be the declared return type of $f$.
+Consider a return statement $s$ of the form \code{\RETURN{} $e$?;}.
+Let $S$ be the static type of $e$, if $e$ is present,
+let $f$ be the immediately enclosing function,
+and let $T$ be the declared return type of $f$.
 
 \LMHash{}%
-It is a compile-time error if the body of $f$ is marked \ASYNC{}
-and the type \code{Future<\flatten{T}>} (\ref{functionExpressions}) may not be assigned to $S$.
-Otherwise, it is a compile-time error if $T$ may not be assigned to $S$.
+\Case{Synchronous non-generator functions}
+Consider the case where $f$ is a synchronous non-generator function
+(\ref{functions}).
+%
+% Returning without a value is only ok for "voidy" return types.
+It is a compile-time error if $s$ is \code{\RETURN{};},
+unless $T$ is \VOID, \DYNAMIC, or \code{Null}.
+%
+% Returning with a value in a void function only ok when that value is "voidy".
+It is a compile-time error if $s$ is \code{\RETURN{} $e$;},
+$T$ is \VOID,
+and $S$ is neither \VOID, \DYNAMIC, nor \code{Null}.
+%
+% Returning void in a "non-voidy" function is an error.
+It is a compile-time error if $s$ is \code{\RETURN{} $e$;},
+$T$ is neither \VOID, \DYNAMIC, nor \code{Null},
+and $S$ is \VOID.
+%
+% Otherwise, returning an unassignable value is an error.
+It is a compile-time error if $s$ is \code{\RETURN{} $e$;},
+$S$ is not \VOID,
+and $S$ is not assignable to $T$.
+
+\commentary{%
+Note that $T$ cannot be \VOID, \DYNAMIC, or \code{Null} in the last case,
+because all types are assignable to those types.
+An error will not be raised if $f$ has no declared return type,
+since the return type would be \DYNAMIC, to which every type is assignable.
+However, a synchronous non-generator function
+that declares a return type which is not ``voidy''
+must return an expression explicitly.%
+}
+\rationale{%
+This helps catch situations where users forget
+to return a value in a return statement.%
+}
+\EndCase
 
 \LMHash{}%
-It is a compile-time error if a return statement of the form \code{\RETURN{} $e$;} appears in a generative constructor (\ref{generativeConstructors}).
-
-\rationale{
-It is quite easy to forget to add the factory prefix for a constructor, accidentally converting a factory into a generative constructor.
-The static checker may detect a type mismatch in some, but not all, of these cases.
-The rule above helps catch such errors, which can otherwise be very hard to recognize.
-There is no real downside to it, as returning a value from a generative constructor is meaningless.
-}
-
-\LMHash{}%
-It is a compile-time error if a return statement of the form \code{\RETURN{} $e$;} appears in a generator function.
-
-\rationale{
-In the case of a generator function, the value returned by the function is the iterable or stream associated with it, and individual elements are added to that iterable using yield statements, and so returning a value makes no sense.
-}
-
-\LMHash{}%
-Let $f$ be the function immediately enclosing a return statement of the form \code{\RETURN{};}.
-It is a static warning if $f$ is neither a generator nor a generative constructor and either:
-\begin{itemize}
-%% TODO(eernst): Integrating generalized-void.md, "may not be assigned
-%% to void" is useless. Update, also considering invalid_returns.md.
-\item $f$ is synchronous and the return type of $f$ may not be assigned to \VOID{} (\ref{typeVoid}) or,
-%% TODO(eernst): Revisit when integrating invalid_returns.md.
-\item $f$ is asynchronous and the return type of $f$ may not be assigned to \code{Future<Null>}.
-\end{itemize}
-
-\commentary{
-Hence, a static warning will not be raised if $f$ has no declared return type,
-%% TODO(eernst): Update when integrating generalized-void.md!
-since the return type would be \DYNAMIC{} and \DYNAMIC{} may be assigned to \VOID{} and to \code{Future<Null>}.
-However, any synchronous non-generator function that declares a return type must return an expression explicitly.
-}
-\rationale{
-This helps catch situations where users forget to return a value in a return statement.
-}
-
-\rationale{
+\Case{Asynchronous non-generator functions}
+Consider the case where $f$ is an asynchronous non-generator function
+(\ref{functions}).
+%
+% Returning without a value is only ok for async-"voidy" return types.
+It is a compile-time error if $s$ is \code{\RETURN{};},
+unless \flatten{T}
+(\ref{functionExpressions})
+is \VOID{}, \DYNAMIC{}, or \code{Null}.
+%
+\rationale{%
 An asynchronous non-generator always returns a future of some sort.
-If no expression is given, the future will be completed with the null object (\ref{null}) and this motivates the requirement above.
+If no expression is given, the future will be completed with the null object
+(\ref{null})
+which motivates this rule.%
 }
+% Returning with a value in an void async function only ok
+% when that value is async-"voidy".
+It is a compile-time error if $s$ is \code{\RETURN{} $e$;},
+\flatten{T} is \VOID{},
+and \flatten{S} is neither \VOID{}, \DYNAMIC{}, nor \code{Null}.
+%
+% Returning async-void in a "non-async-voidy" function is an error.
+It is a compile-time error if $s$ is \code{\RETURN{} $e$;},
+\flatten{T} is neither \VOID{}, \DYNAMIC{}, nor \code{Null},
+and \flatten{S} is \VOID{}.
+%
+% Otherwise, returning an un-deasync-assignable value is an error.
+It is a compile-time error if $s$ is \code{\RETURN{} $e$;},
+\flatten{S} is not \VOID,
+and \code{Future<\flatten{S}>} is not assignable to $T$.
 
-\commentary{
-Leaving the return type of a function marked \ASYNC{} blank will be interpreted as \DYNAMIC{} as always, and cause no type error.
+\commentary{%
+Note that \flatten{T} cannot be \VOID, \DYNAMIC, or \code{Null}
+in the last case,
+because then \code{Future<$U$>} is assignable to $T$ for \emph{all} $U$.
+In particular, when $T$ is \code{FutureOr<Null>}
+(which is equivalent to \code{Future<Null>}),
+\code{Future<\flatten{S}>} is assignable to $T$ for all $S$.
+This means that no compile-time error is raised,
+but \emph{only} the null object (\ref{null})
+or an instance of \code{Future<Null>} can successfully be returned at run time.
+This is not an anomaly,
+it corresponds to the treatment of a synchronous function
+with return type \code{Null};
+but tools may choose to give a hint that a downcast is unlikely to succeed.
+
+An error will not be raised if $f$ has no declared return type,
+since the return type would be \DYNAMIC,
+and \code{Future<\flatten{S}>} is assignable to \DYNAMIC{} for all $S$.
+However, an asynchronous non-generator function
+that declares a return type which is not ``voidy''
+must return an expression explicitly.%
 }
+\rationale{%
+This helps catch situations where users forget
+to return a value in a return statement of an asynchronous function.%
+}
+\EndCase
+
+\LMHash{}%
+\Case{Generator functions}
+It is a compile-time error if a return statement of
+the form \code{\RETURN{} $e$;} appears in a generator function.
+
+\rationale{
+In the case of a generator function, the value returned by the function is
+the iterable or stream associated with it,
+and individual elements are added to that iterable using yield statements,
+and so returning a value makes no sense.
+}
+\EndCase
+
+\LMHash{}%
+\Case{Generative constructors}
+It is a compile-time error if a return statement of
+the form \code{\RETURN{} $e$;} appears in a generative constructor
+(\ref{generativeConstructors}).
+
+\rationale{
+It is quite easy to forget to add the \FACTORY{} modifier for a constructor,
+accidentally converting a factory into a generative constructor.
+The static checker may detect a type mismatch
+in some, but not all, of these cases.
+The rule above helps catch such errors,
+which can otherwise be very hard to recognize.
+There is no real downside to it,
+as returning a value from a generative constructor is meaningless.
+}
+\EndCase
 
 \LMHash{}%
 Executing a return statement \code{\RETURN{} $e$;} proceeds as follows:
 
 \LMHash{}%
 First the expression $e$ is evaluated, producing an object $o$.
-Let $T$ be the run-time type of $o$ and
-let $S$ be the actual return type of $f$
+Let $S$ be the run-time type of $o$ and
+let $T$ be the actual return type of $f$
 (\ref{actualTypeOfADeclaration}).
 If the body of $f$ is marked \ASYNC{} (\ref{functions})
-and $T$ is a subtype of \code{Future<\flatten{S}>}
+and $S$ is a subtype of \code{Future<\flatten{T}>}
 then let $r$ be the result of evaluating \code{await $v$}
 where $v$ is a fresh variable bound to $o$.
 Otherwise let $r$ be $o$.
-Then the return statement returns the value $r$ (\ref{completion}).
+Then the return statement returns the value $r$ (\ref{statementCompletion}).
 
 %% TODO(eernst): We have some special cases with the dynamic semantics
 %% specified above that we may wish to consider:
@@ -10971,12 +11806,12 @@
 %%
 %% Object /* or dynamic, etc. */ foo() async {
 %%   Object o;
-%%   if (someCondition) o = 42; else o = new Future<T>.value(42);
+%%   if (someCondition) o = 42; else o = new Future<S>.value(42);
 %%   return o;
 %% }
 %%
 %% Here we will interject an `await` on the returned value whenever
-%% we return a future (for all `T`). This means that we will `await o`
+%% we return a future (for all `S`). This means that we will `await o`
 %% in some situations and not in others. It may surprise developers
 %% that we can have this dynamic variation at a location in the code
 %% where there is no static justification for expecting a future.
@@ -10984,20 +11819,15 @@
 \LMHash{}%
 Let $U$ be the run-time type of $r$.
 \begin{itemize}
-\item If the body of $f$ is marked \ASYNC{} (\ref{functions})
-it is a dynamic type error if $o$ is not the null object (\ref{null}),
-% TODO(lrn): Remove the next line when void is a proper supertype of all types.
-$S$ is not \VOID,
-and \code{Future<$U$>} is not a subtype of $S$.
-\item Otherwise,
-it is a dynamic type error if $r$ is not the null object (\ref{null}),
-% TODO(lrn): Remove the next line when void is a proper supertype of all types.
-$S$ is not \VOID{},
-and $U$ is not a subtype of $S$.
+\item
+  If the body of $f$ is marked \ASYNC{} (\ref{functions})
+  it is a dynamic type error if \code{Future<$U$>} is not a subtype of $T$.
+\item
+  Otherwise, it is a dynamic type error if $U$ is not a subtype of $T$.
 \end{itemize}
 
 \LMHash{}%
-Executing a return statement with no expression, \code{\RETURN;} returns with no value (\ref{completion}).
+Executing a return statement with no expression, \code{\RETURN;} returns with no value (\ref{statementCompletion}).
 
 
 \subsection{Labels}
@@ -11018,7 +11848,7 @@
 
 \LMHash{}%
 Execution a labeled statement $s$, $label: s_l$, consists of executing $s_l$.
-If execution of $s_l$ breaks to the label $label$ (\ref{completion}),
+If execution of $s_l$ breaks to the label $label$ (\ref{statementCompletion}),
 then execution of $s$ completes normally,
 otherwise execution of $s$ completes in the same ways as the execution of $s_l$.
 
@@ -11057,8 +11887,8 @@
 or \WHILE{} (\ref{while}) statement within the innermost function in which $s_b$ occurs.
 
 \LMHash{}%
-Execution of a \BREAK{} statement \code{\BREAK{} $L$;} breaks to the label $L$ (\ref{completion}).
-Execution of a \BREAK{} statement \code{\BREAK{};} breaks without a label (\ref{completion}).
+Execution of a \BREAK{} statement \code{\BREAK{} $L$;} breaks to the label $L$ (\ref{statementCompletion}).
+Execution of a \BREAK{} statement \code{\BREAK{};} breaks without a label (\ref{statementCompletion}).
 
 
 \subsection{Continue}
@@ -11086,8 +11916,8 @@
 within the innermost function in which $s_c$ occurs.
 
 \LMHash{}%
-Execution of a \CONTINUE{} statement \code{\CONTINUE{} $L$;} continues to the label $L$ (\ref{completion}).
-Execution of a \CONTINUE{} statement \code{\CONTINUE{};} continues without a label (\ref{completion}).
+Execution of a \CONTINUE{} statement \code{\CONTINUE{} $L$;} continues to the label $L$ (\ref{statementCompletion}).
+Execution of a \CONTINUE{} statement \code{\CONTINUE{};} continues without a label (\ref{statementCompletion}).
 
 
 \subsection{Yield and Yield-Each}
@@ -11115,7 +11945,7 @@
 Next, $o$ is added to the iterable or stream associated with the immediately enclosing function.
 
 \LMHash{}%
-If the enclosing function $m$ is marked \code{\ASYNC*} and the stream $u$ associated with $m$ has been canceled, then the \YIELD{} statement returns without a value (\ref{completion}), otherwise it completes normally.
+If the enclosing function $m$ is marked \code{\ASYNC*} and the stream $u$ associated with $m$ has been canceled, then the \YIELD{} statement returns without a value (\ref{statementCompletion}), otherwise it completes normally.
 
 \rationale{
 The stream associated with an asynchronous generator could be canceled by any code with a reference to that stream at any point where the generator was passivated.
@@ -11185,7 +12015,7 @@
 If \code{moveNext} returns \FALSE{} execution of $s$ is complete.
 Otherwise
 \item The getter \code{current} is invoked on $i$.
-If the invocation throws (\ref{evaluation}), execution of $s$ throws the same exception object and stack trace (\ref{completion}).
+If the invocation throws (\ref{evaluation}), execution of $s$ throws the same exception object and stack trace (\ref{statementCompletion}).
 Otherwise, the result $x$ of the getter invocation is added to the iterable associated with $m$.
 Execution of the function $m$ immediately enclosing $s$ is suspended until the nullary method \code{moveNext()} is invoked upon the iterator used to initiate the current invocation of $m$, at which point execution of $s$ continues at \ref{moveNext}.
 \item
@@ -11205,7 +12035,7 @@
 \item
 If the stream $u$ associated with $m$ has been canceled,
 then $s$ is canceled by evaluating \code{\AWAIT{} v.cancel()} where $v$ is a fresh variable referencing the stream subscription $s$.
-Then, if the cancel completed normally, the stream execution of $s$ returns without a value (\ref{completion}).
+Then, if the cancel completed normally, the stream execution of $s$ returns without a value (\ref{statementCompletion}).
 \item
 Otherwise, $x$, or $e$ with $t$, are added to the stream associated with $m$ in the order they appear in $o$.
 The function $m$ may suspend.
@@ -11251,7 +12081,7 @@
 \LMHash{}%
 When assertions are not enabled,
 execution of an assertion immediately completes normally
-(\ref{completion}).
+(\ref{statementCompletion}).
 \commentary{That is, no subexpressions of the assertion are evaluated.}
 When assertions are enabled,
 execution of an assertion \code{\ASSERT{}($c$, $e$)} proceeds as follows:
@@ -11262,9 +12092,9 @@
 \commentary{
 Hence it is a compile-time error if that situation arises during evaluation of an assertion in a \CONST{} constructor invocation.
 }
-If $r$ is \TRUE{} then execution of the assert statement completes normally (\ref{completion}).
+If $r$ is \TRUE{} then execution of the assert statement completes normally (\ref{statementCompletion}).
 Otherwise, $e$ is evaluated to an object $m$
-and then the execution of the assert statement throws (\ref{completion}) an \code{AssertionError} containing $m$ and with a stack trace corresponding to the current execution state at the assertion.
+and then the execution of the assert statement throws (\ref{statementCompletion}) an \code{AssertionError} containing $m$ and with a stack trace corresponding to the current execution state at the assertion.
 
 \LMHash{}%
 It is a compile-time error if the type of $c$ may not be assigned to \code{bool}.
@@ -11319,8 +12149,8 @@
   \alt \EXTERNAL{}? <getterSignature> `;'
   \alt \EXTERNAL{}? <setterSignature> `;'
   \alt <functionSignature> <functionBody>
-  \alt <returnType>? \GET{} <identifier> <functionBody>
-  \alt <returnType>? \SET{} <identifier> <formalParameterList> <functionBody>
+  \alt <type>? \GET{} <identifier> <functionBody>
+  \alt <type>? \SET{} <identifier> <formalParameterList> <functionBody>
   \alt (\FINAL{} | \CONST{}) <type> <staticFinalDeclarationList> `;'
   \alt <variableDeclaration> `;'
 
@@ -11947,7 +12777,9 @@
 Type annotations are used during static checking and when running programs.
 
 \begin{grammar}
-<type> ::= <typeName> <typeArguments>?
+<type> ::= <typeNotVoid> | \VOID{}
+
+<typeNotVoid> ::= <typeName> <typeArguments>?
 
 <typeName> ::= <qualified>
 
@@ -12116,8 +12948,8 @@
 }
 
 \begin{dartCode}
-\TYPEDEF{} F = void Function<X>(X);
-\TYPEDEF{} G = void Function<Y>(Y);
+\TYPEDEF{} F = \VOID{} \FUNCTION{}<X>(X);
+\TYPEDEF{} G = \VOID{} \FUNCTION{}<Y>(Y);
 \\
 \VOID{} main() \{
   assert(F == G);
@@ -12161,7 +12993,7 @@
 <functionTypeAlias> ::= \gnewline{}
   <functionPrefix> <typeParameters>? <formalParameterList> `;'
 
-<functionPrefix> ::= <returnType>? <identifier>
+<functionPrefix> ::= <type>? <identifier>
 \end{grammar}
 
 % TODO(eernst): Introduce new type aliases and new function type syntax, then
@@ -12358,7 +13190,7 @@
 \end{figure}
 
 
-\paragraph{Meta-Variables}
+\subsubsection{Meta-Variables}
 \LMLabel{metaVariables}
 
 \LMHash{}%
@@ -12390,8 +13222,8 @@
 \end{itemize}
 
 
-\paragraph{Subtype Rules}
-\LMLabel{typeRules}
+\subsubsection{Subtype Rules}
+\LMLabel{subtypeRules}
 
 \LMHash{}%
 We define several rules about subtyping in this section.
@@ -12536,7 +13368,7 @@
 }
 
 
-\paragraph{Being a subtype}
+\subsubsection{Being a subtype}
 \LMLabel{beingASubtype}
 
 \LMHash{}%
@@ -12646,7 +13478,7 @@
 }
 
 
-\paragraph{Informal Subtype Rule Descriptions}
+\subsubsection{Informal Subtype Rule Descriptions}
 \LMLabel{informalSubtypeRuleDescriptions}
 
 \commentary{
@@ -12810,7 +13642,7 @@
 }
 
 
-\paragraph{Additional Subtyping Concepts}
+\subsubsection{Additional Subtyping Concepts}
 \LMLabel{additionalSubtypingConcepts}
 
 \LMHash{}%
@@ -13074,8 +13906,6 @@
 \subsection{Type FutureOr}
 \LMLabel{typeFutureOr}
 
-%% TODO(eernst): We should make this a separate section, or change the title of this section.
-
 \LMHash{}%
 The built-in type declaration \code{FutureOr},
 which is declared in the library \code{dart:async},
@@ -13132,50 +13962,331 @@
 only allow invocations of members inherited from \code{Object}.
 }
 
+\LMHash{}%
+We define the auxiliary function
+\IndexCustom{\basetype{T}}{basetype(t)@\emph{basetype}$(T)$}
+as follows:
+
+\begin{itemize}
+\item If $T$ is \code{FutureOr<$S$>} for some $S$ then $\basetype{T} = \basetype{S}$.
+\item Otherwise $\basetype{T} = T$.
+\end{itemize}
 
 \subsection{Type Void}
 \LMLabel{typeVoid}
 
-%% TODO(eernst): Adjust everything in this section when specifying generalized-void.
+\LMHash{}%
+The special type \VOID{} is used to indicate
+that the value of an expression is meaningless and intended to be discarded.
+
+\commentary{%
+A typical case is that the type \VOID{} is used as the return type
+of a function that ``does not return anything''.
+Technically, there will always be \emph{some} object
+which is the return value
+(\ref{functions}).
+But it is perfectly meaningful to have a function
+whose sole purpose is to create side-effects,
+such that \emph{any} use of the returned object
+would be misguided.
+%
+This does not mean that there is anything wrong
+with the returned object as such.
+It could be any object whatsoever.
+But the developer who chose the return type \VOID{}
+did that to indicate that it is a misunderstanding to
+ascribe any meaning to that object,
+or to use it for any purpose.
+}
+
+\commentary{%
+The type \VOID{} is a top type
+(\ref{superBoundedTypes}),
+so \VOID{} and \code{Object} are subtypes of each other
+(\ref{subtypes}),
+which also implies that any object can be
+the value of an expression of type \VOID.
+%
+Consequently, any instance of type \code{Type} which reifies the type \VOID{}
+must compare equal (according to the \code{==} operator \ref{equality})
+to any instance of \code{Type} which reifies the type \code{Object}
+(\ref{dynamicTypeSystem}).
+It is not guaranteed that \code{identical(\VOID, Object)} evaluates to true.
+In fact, it is not recommended that implementations strive to achieve this,
+because it may be more important to ensure that diagnostic messages
+(including stack traces and dynamic error messages)
+preserve enough information to use the word `void' when referring to types
+which are specified as such in source code.
+}
 
 \LMHash{}%
-The special type \VOID{} may only be used as the return type of a function: it is a compile-time error to use \VOID{} in any other context.
+In support of the notion
+that the value of an expression with static type \VOID{} should be discarded,
+such values can only be used in specific situations:
+The occurrence of an expression of type \VOID{} is a compile-time error
+unless it is permitted according to one of the following rules.
 
-\commentary{
-For example, as a type argument, or as the type of a variable or parameter
-
-Void is not an interface type.
-
-The only subtype relations that pertain to void are therefore:
 \begin{itemize}
-\item[$\bullet$]
-$\VOID{} <: \VOID{}$ (by reflexivity)
-\item[$\bullet$]
-$\bot <: \VOID{}$ (as bottom is a subtype of all types).
-\item[$\bullet$]
-$\VOID{} <: \DYNAMIC{}$ (as \DYNAMIC{} is a supertype of all types)
+\item
+  In an \synt{expressionStatement} \code{$e$;}, $e$ may have type \VOID.
+  \rationale{The value of $e$ is discarded.}
+\item
+  In the initialization and increment expressions of a for-loop,
+  \code{\FOR{} ($e_1$; $e_2$; $e_3$) {\ldots}},
+  $e_1$ may have type \VOID,
+  and each of the expressions in the expression list $e_3$ may have type \VOID.
+  \rationale{The values of $e_1$ and $e_3$ are discarded.}
+\item
+  In a type cast \code{$e$ as $T$}, $e$ may have type \VOID.
+  \rationale{%
+  Developers thus obtain the ability to \emph{override} the constraints
+  on usages of values with static type \VOID.
+  This means that it is not enforced that such values are discarded,
+  but they can only be used when the wish to do so
+  has been indicated explicitly.%
+  }
+\item
+  In a parenthesized expression \code{($e$)}, $e$ may have type \VOID.
+  \rationale{%
+  Note that \code{($e$)} itself has type \VOID,
+  which implies that it must occur in some context
+  where it is not an error to have it.%
+  }
+\item
+  In a conditional expression \code{$e$\,?\,$e_1$\,:\,$e_2$},
+  $e_1$ and $e_2$ may have type \VOID.
+  \rationale{%
+  The static type of the conditional expression is then \VOID,
+  even if one of the branches has a different type,
+  which means that the conditional expression must again occur
+  in some context where it is not an error to have it.%
+  }
+\item
+  In a null coalescing expression \code{$e_1$\,??\,$e_2$},
+  $e_2$ may have type \VOID.
+  \rationale{%
+  The static type of the null coalescing expression is then \VOID,
+  which in turn restricts where it can occur.%
+  }
+\item
+  \commentary{%
+  In a return statement \code{\RETURN\,$e$;},
+  $e$ may have type \VOID{} in a number of situations
+  (\ref{return}).%
+  }
+\item
+  \commentary{%
+  In an arrow function body \code{=> $e$},
+  the returned expression $e$ may have type \VOID{}
+  in a number of situations
+  (\ref{functions}).%
+  }
+\item
+  An initializing expression for a variable of type \VOID{}
+  may have type \VOID.
+  \rationale{Usages of that variable are constrained.}
+\item
+  An actual parameter expression corresponding to a formal parameter
+  whose statically known type annotation is \VOID{}
+  may have type \VOID.
+  \rationale{%
+  Usages of that parameter in the body of the callee
+  are statically expected to be constrained by having type \VOID.
+  See the discussion about soundness below
+  (\ref{voidSoundness}).
+  }
+\item
+  In an expression of the form \code{$e_1$\,=\,$e_2$}
+  where $e_1$ is an \synt{assignableExpression}
+  denoting a variable or formal parameter of type \VOID{},
+  $e_2$ may have type \VOID.
+  \rationale{%
+  Usages of that variable or formal parameter
+  are statically expected to be constrained by having type \VOID.
+  See the discussion about soundness below
+  (\ref{voidSoundness}).
+  }
+\item
+  Let $e$ be an expression ending in a \synt{cascadeSection}
+  of the form \code{..\,$S$\,$s$\;=\;$e_1$},
+  where $S$ is of the form
+
+  \noindent
+  \syntax{(<cascadeSelector> <argumentPart>*)
+    (<assignableSelector> <argumentPart>*)*}
+
+  \noindent
+  and $e_1$ is of the form \synt{expressionWithoutCascade}.
+
+  If $s$ is an \synt{assignableSelector} of the
+  form \code{.\id} or \code{?.\id}
+  where the static type of the identifier \id{} is \VOID,
+  $e_1$ may have type \VOID.
+  Otherwise, if $s$ is an \synt{assignableSelector} of the form
+  \code{[$\,e_0\,$]} where the static type of
+  the first formal parameter in the statically known declaration
+  of operator \code{[]=} is \VOID,
+  $e_0$ may have type \VOID.
+  Also, if the static type of the second formal parameter is \VOID,
+  $e_1$ may have type \VOID.
 \end{itemize}
 
-The analogous rules also hold for the $<<$ relation for similar reasons.
+\LMHash{}%
+Finally, we need to address situations involving implicit usage of
+a value whose static type can be \VOID{}.
+%
+It is a compile-time error for a for-in statement to have an iterator
+expression of type $T$ such that \code{Iterator<\VOID{}>}
+is the most specific instantiation of \code{Iterator}
+that is a superinterface of $T$, unless the
+iteration variable has type \VOID.
+%
+It is a compile-time error for an asynchronous for-in statement
+to have a stream expression of type $T$
+such that \code{Stream<\VOID{}>} is the most specific
+instantiation of \code{Stream} that is a superinterface of $T$,
+unless the iteration variable has type \VOID.
 
-Hence, the static checker will issue errors if one attempts to access a member of the result of a void method invocation (even for members of the null object (\ref{null}), such as \code{==}).
-Likewise, passing the result of a void method as a parameter or assigning it to a variable will raise an error unless the variable/formal parameter has type dynamic.
-
-On the other hand, it is possible to return the result of a void method from within a void method.
-One can also return the null object (\ref{null}); or a value of type \DYNAMIC{}.
-Returning any other result will cause a compile-time error.
-%% TODO(eernst): Correct this when integrating generalized-void.md.
-A dynamic type error would arise if a non-null object was returned from a void method (since no object has run-time type \DYNAMIC{}).
+\commentary{%
+Here are some examples:
 }
 
-\commentary{
-The name \VOID{} does not denote a \code{Type} object.
+\begin{dartCode}
+\FOR{} (Object x in <\VOID>[]) \{\} // \comment{Error.}
+\AWAIT{} \FOR{} (int x \IN{} new Stream<\VOID{}>.empty()) \{\} // \comment{Error.}
+\FOR{} (\VOID{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK.}
+\FOR (\VAR{} x \IN{} <\VOID{}>[]) \{\ldots\} // \comment{OK, type of x inferred.}
+\end{dartCode}
+
+\commentary{%
+However, in the examples that are not errors
+the usage of \code{x} in the loop body is constrained,
+because it has type \VOID.%
 }
 
-\rationale{
-It is syntacticly illegal to use \VOID{} as an expression, and it would make no sense to do so.
-Type objects reify the run-time types of instances.
-No instance ever has type \VOID{}.
+\paragraph{Void Soundness}
+\LMLabel{voidSoundness}
+
+\LMHash{}%
+The constraints on usage of a value obtained from the evaluation of
+an expression with static type \VOID{}
+are not strictly enforced.
+
+\commentary{%
+The usage of a ``void value'' is not a soundness issue, that is,
+no invariants needed for correct execution of a Dart program
+can be violated because of such a usage.
+}
+
+\rationale{%
+It could be said that the type \VOID{} is used
+to help developers maintain a certain self-imposed discipline
+about the fact that certain objects are not \emph{intended} to be used.
+%
+Because of the fact that enforcement is not necessary,
+and because of the treatment of \VOID{} in earlier versions of Dart,
+the language uses a \emph{best effort} approach to ensure
+that the value of an expression of type \VOID{}
+will not be used.%
+}
+
+\commentary{%
+In fact, there are numerous ways in addition to the type cast
+in which a developer can get access to such a value:%
+}
+
+\begin{dartCode}
+\ABSTRACT{} \CLASS A<X> \{
+  final X x;
+  A(this.x);
+  Object foo(X x);
+\}
+\\
+\CLASS{} B<X> \EXTENDS{} A<X> \{
+  B(X x): super(x);
+  Object foo(Object x) => x;
+\}
+\\
+Object f<X>(X x) => x;
+\\
+\VOID{} main() \{
+  \VOID x = 42;
+  print(f(x)); // \comment{(1)}
+  \\
+  A<\VOID{}> a = B<\VOID{}>(x);
+  A<Object> aObject = a;
+  print(aObject.x); // \comment{(2)}
+  print(a.foo(x)); // \comment{(3)}
+\}
+\end{dartCode}
+
+\commentary{%
+At (1), a variable \code{x} of type \VOID{} is passed to
+a generic function \code{f},
+which is allowed because the actual type argument \VOID{} is inferred,
+and it is allowed to pass an actual argument of type \VOID{} to
+a formal parameter with the same type.
+%
+However, no special treatment is given when an expression has a type
+which is or contains a type variable whose value could be \VOID{},
+so we are allowed to return \code{x} in the body of \code{f},
+even though this means that we indirectly get access to the value
+of an expression of type \VOID{}, under the static type \code{Object}.
+
+At (2), we indirectly obtain access to the value of
+the variable \code{x} with type \VOID{},
+because we use an assignment to get access to the instance of \code{B}
+which was created with type argument \VOID{} under the type
+\code{A<Object>}.
+Note that \code{A<Object>} and \code{A<\VOID{}>} are subtypes of each other,
+that is, they are equivalent according to the subtype rules,
+so neither static nor dynamic type checks will fail.
+
+At (3), we indirectly obtain access to the value of
+the variable \code{x} with type \VOID{}
+under the static type \code{Object},
+because the statically known method signature of \code{foo}
+has parameter type \VOID{},
+but the actual implementation of \code{foo} which is invoked
+is an override whose parameter type is \code{Object},
+which is allowed because \code{Object} and \VOID{} are both top types.%
+}
+
+\rationale{%
+Obviously, the support for preventing developers from using values
+obtained from expressions of type \VOID{} is far from sound,
+in the sense that there are many ways to circumvent the rule
+that such a value should be discarded.
+
+However, we have chosen to focus on the simple, first-order usage
+(where an expression has type \VOID, and the value is used),
+and we have left higher-order cases largely unchecked,
+relying on additional tools such as linters to perform an analysis
+which covers indirect data flows.
+
+It would certainly have been possible to define sound rules,
+such that the value of an expression of type \VOID{}
+would be guaranteed to be discarded after some number of transfers
+from one variable or parameter to the next one, all with type \VOID{},
+explicitly, or as the value of a type parameter.
+In particular, we could require that method overrides should
+never override return type \code{Object} by return type \VOID{},
+or parameter types in the opposite direction;
+parameterized types with type argument \VOID{} could not be assigned
+to variables where the corresponding type argument is anything other than
+\VOID, etc.\ etc.
+
+But this would be quite impractical.
+In particular, the need to either prevent a large number of type variables
+from ever having the value \VOID{},
+or preventing certain usages of values whose type is such a type variable,
+or whose type contains such a type variable,
+that would be severely constraining on a very large part of all Dart code.
+
+So we have chosen to help developers maintain this self-imposed discipline
+in simple and direct cases,
+and leave it to ad-hoc reasoning or separate tools to ensure
+that the indirect cases are covered as closely as needed in practice.%
 }
 
 
diff --git a/docs/language/informal/generalized-void.md b/docs/language/informal/generalized-void.md
index e3ae956..4b3bea1 100644
--- a/docs/language/informal/generalized-void.md
+++ b/docs/language/informal/generalized-void.md
@@ -4,7 +4,8 @@
 
 **Version**: 0.10 (2018-07-10)
 
-**Status**: Implemented.
+**Status**: This document is now background material.
+For normative text, please consult the language specification.
 
 **This document** is a feature specification of the generalized support
 in Dart 2 for the type `void`.
diff --git a/docs/language/informal/instantiate-to-bound.md b/docs/language/informal/instantiate-to-bound.md
index dfe36bc..e54f47d 100644
--- a/docs/language/informal/instantiate-to-bound.md
+++ b/docs/language/informal/instantiate-to-bound.md
@@ -2,7 +2,7 @@
 
 **Author**: eernst@
 
-**Version**: 0.8 (2018-09-26)
+**Version**: 0.10 (2018-10-31)
 
 **Status**: Implemented.
 
@@ -133,7 +133,7 @@
 never because `X` is contained in the body of a type alias, it will always
 be as a syntactic subterm of _B_.*
 
-Let _G_ be a generic class or parameterized type alias with _k_ formal type
+Let _G_ be a generic class or generic type alias with _k_ formal type
 parameter declarations containing formal type parameters
 _X<sub>1</sub> .. X<sub>k</sub>_ and bounds
 _B<sub>1</sub> .. B<sub>k</sub>_. We say that the formal type parameter
@@ -145,17 +145,17 @@
 2. _B<sub>j</sub>_ is included, but does not contain any of _X<sub>1</sub>
    .. X<sub>k</sub>_. If _B<sub>j</sub>_ contains a type _T_ of the form
    `typeName` (*for instance, `C` or `p.D`*) which denotes a generic class
-   or parameterized type alias _G<sub>1</sub>_ (*that is, _T_ is a raw type*),
+   or generic type alias _G<sub>1</sub>_ (*that is, _T_ is a raw type*),
    every type argument of _G<sub>1</sub>_ has a simple bound.
 
 The notion of a simple bound must be interpreted inductively rather than
 coinductively, i.e., if a bound _B<sub>j</sub>_ of a generic class or
-parameterized type alias _G_ is reached during an investigation of whether
+generic type alias _G_ is reached during an investigation of whether
 _B<sub>j</sub>_ is a simple bound, the answer is no.
 
 *For example, with `class C<X extends C> {}` the type parameter `X` does
-not have a simple bound: A raw `C` is used as a bound for `X`, so `C` 
-must have simple bounds, but one of the bounds of `C` is the bound of `X`, 
+not have a simple bound: A raw `C` is used as a bound for `X`, so `C`
+must have simple bounds, but one of the bounds of `C` is the bound of `X`,
 and that bound is `C`, so `C` must have simple bounds: Cycle, hence error!*
 
 *We can now specify in which sense instantiate to bound requires the
@@ -174,7 +174,7 @@
 simple bound.*
 
 When a type annotation _T_ on the form `typeName` denotes a generic class
-or parameterized type alias (*so _T_ is raw*), instantiate to bound is used
+or generic type alias (*so _T_ is raw*), instantiate to bound is used
 to provide the missing type argument list. It is a compile-time error if
 the instantiate to bound process fails.
 
@@ -200,7 +200,7 @@
 the actual type arguments must be computed.*
 
 Let _T_ be a `typeName` term which denotes a generic class or
-parameterized type alias _G_ (*so _T_ is a raw type*), let
+generic type alias _G_ (*so _T_ is a raw type*), let
 _F<sub>1</sub> .. F<sub>k</sub>_ be the formal type
 parameter declarations in the declaration of _G_, with type parameters
 _X<sub>1</sub> .. X<sub>k</sub>_ and bounds _B<sub>1</sub>
@@ -228,7 +228,8 @@
 on, every type variable in its bound, possibly including itself*).
 Let _==><sub>m</sub>_ be the transitive closure of _--><sub>m</sub>_.
 For each _m_, let _U<sub>i,m+1</sub>_, for _i_ in _1 .. k_, be determined
-by the following iterative process:
+by the following iterative process, where _V<sub>m</sub>_ denotes
+_G&lt;U<sub>1,m</sub>, U<sub>k,m</sub>&gt;_:
 
 1. If there exists a _j_ in _1 .. k_ such that
    _X<sub>j</sub> ==><sub>m</sub> X<sub>j</sub>_
@@ -246,9 +247,11 @@
    _U<sub>i,m+1</sub> = U<sub>i,m</sub>_.
    Otherwise there exists a _q_ such that _X<sub>i</sub>_ belongs to
    _M<sub>q</sub>_; _U<sub>i,m+1</sub>_ is then obtained from _U<sub>i,m</sub>_
-   by replacing every covariant occurrence of a variable in _M<sub>q</sub>_ by
-   `dynamic`, and replacing every contravariant occurence of a variable in
-   _M<sub>q</sub>_ by `Null`.
+   by substituting `dynamic` for every occurrence of a variable
+   in _M<sub>q</sub>_ that is in a covariant or invariant position
+   in _V<sub>m</sub>_, and substituting `Null` for every occurrence of
+   a variable in _M<sub>q</sub>_ that is in a contravariant position
+   in _V<sub>m</sub>_.
 
 2. Otherwise, (*if no dependency cycle exists*) let _j_ be the lowest number
    such that _X<sub>j</sub>_ occurs in _U<sub>p,m</sub>_ for some _p_ and
@@ -257,9 +260,11 @@
    _X<sub>j</sub>_ does not contain any type variables; but _X<sub>j</sub>_ is
    being depended on by the bound of some other type variable*).
    Then, for all _i_ in _1 .. k_, _U<sub>i,m+1</sub>_ is obtained from
-   _U<sub>i,m</sub>_ by replacing every covariant occurrence of _X<sub>j</sub>_
-   by _U<sub>j,m</sub>_, and replacing every contravariant occurrence of
-   _X<sub>j</sub>_ by `Null`.
+   _U<sub>i,m</sub>_ by substituting _U<sub>j,m</sub>_ for every occurrence
+   of _X<sub>j</sub>_ which occurs in a covariant or invariant position in
+   _V<sub>m</sub>_, and substituting `Null` for every occurrence of
+   _X<sub>j</sub>_ which occurs in a contravariant position in
+   _V<sub>m</sub>_.
 
 3. Otherwise, (*when no dependencies exist*) terminate with the result
    _&lt;U<sub>1,m</sub> ..., U<sub>k,m</sub>&gt;_.
@@ -272,6 +277,57 @@
 *Note that this process may produce a
 [super-bounded type](https://github.com/dart-lang/sdk/blob/master/docs/language/informal/super-bounded-types.md).*
 
+*It may seem somewhat arbitrary to treat unused and invariant parameters
+the same as covariant parameters. In particular, we could easily have made
+every attempt to use instantiate to bound an error, when applied to a type
+where invariance occurs anywhere during the run of the algorithm. However,
+there are a number of cases where this choice produces a usable type, and
+we decided that it is not helpful to outlaw such cases:*
+
+```dart
+typedef Inv<X> = X Function(X);
+class B<Y extends num, Z extends Inv<Y>> {}
+
+B b; // The raw `B` means `B<num, Inv<num>>`.
+```
+
+*It is then possible to store an instance of, say,
+`B<int, int Function(num)>` in `b`. It should be noted, however, that
+any occurrence of invariance during instantiate to bound is likely to
+cause the resulting type to not be a common supertype of all the types
+that may be expressed by passing explicit type arguments. This means that
+a raw type involving invariance cannot be considered to denote the type
+"that allows all values for the actual type arguments". For instance,
+`b` above cannot refer to an instance of `B<int, Inv<int>>`, because
+`Inv<int>` is not a subtype of `Inv<num>`.*
+
+It is a compile-time error if the above algorithm yields a type which is
+not well-bounded.
+
+*This kind of error can occur, as demonstrated by the following example:*
+
+```dart
+class C<X extends C<X>> {}
+typedef F<X extends C<X>> = X Function(X);
+F f; // Compile-time error.
+```
+
+*With these declarations, the raw `F` used as a type annotation is a
+compile-time error: The algorithm yields `F<C<dynamic>>`, and that is
+neither a regular-bounded nor a super-bounded type. It is conceptually
+meaningful to make this an error, even though the resulting type can be
+specified explicitly as `C<dynamic> Function(C<dynamic>)`. So that type
+exists, we just cannot obtain it by passing a type argument to `F`.
+The reason why it still makes sense to make the raw `F` an error is that
+there is no subtype relationship between `F<T1>` and `F<T2>`, even when
+`T1 <: T2` or vice versa. In particular there is no type `T` such that a
+function of type `F<T>` could be the value of a variable of type
+`C<dynamic> Function(C<dynamic>)`. So the raw `F`, if permitted, would
+not be "a supertype of `F<T>` for all possible `T`", it would be a type
+which is unrelated to `F<T>` for every single `T` that satisfies the
+bound of `F`. In that sense, it is just an extreme example of that kind
+of lack of usefulness that was mentioned for the raw `B` above.*
+
 When instantiate to bound is applied to a type it proceeds recursively: For
 a generic instantiation _G<T<sub>1</sub> .. T<sub>k</sub>>_ it is applied
 to _T<sub>1</sub> .. T<sub>k</sub>_; for a function type
@@ -297,9 +353,22 @@
 
 ## Updates
 
+*   Oct 31st 2018, version 0.10: When computing the variance of an
+    occurrence of a type variable in the instantiate-to-bound algorithm,
+    it was left implicit with respect to which type the variance was
+    computed. This update makes it explicit.
+
+*   Oct 16th 2018, version 0.9: Corrected initial value of type argument
+    to take variance into account. Corrected the value chosen at each step
+    such that the invariant case is also handled. Added requirement that
+    the parameterized type obtained from the algorithm must be checked for
+    well-boundedness. Corrected the terminology to use 'generic type alias'
+    rather than 'parameterized type alias', following the terminology used
+    in the language specification.
+
 *   Sep 26th 2018, version 0.8: Fixed unintended omission: the same rules
     that we specified for a generic class are now also specified to hold
-    for parameterized type aliases.
+    for generic type aliases.
 
 *   Feb 26th 2018, version 0.7: Revised cycle breaking algorithm for
     F-bounded type variables to avoid specifying orderings that do not matter.
diff --git a/docs/language/informal/invalid_returns.md b/docs/language/informal/invalid_returns.md
index 89215f6..6f10993 100644
--- a/docs/language/informal/invalid_returns.md
+++ b/docs/language/informal/invalid_returns.md
@@ -2,9 +2,8 @@
 
 **Owner**: leafp@google.com
 
-**Status**: Implemented.
-
-Status: Ready for implementation
+**Status**: This document is now background material.
+For normative text, please consult the language specification.
 
 **Note: Also see alternative presentation at the bottom for a dual presentation
 of these rules in terms of which things are errors, rather than which things are
diff --git a/docs/language/informal/subtyping.md b/docs/language/informal/subtyping.md
deleted file mode 100644
index 64c0f29..0000000
--- a/docs/language/informal/subtyping.md
+++ /dev/null
@@ -1,473 +0,0 @@
-# Dart 2.0 Static and Runtime Subtyping
-
-leafp@google.com
-
-**Status**: Implemented.
-
-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`, `U`, and `V` range over types.
-
-The meta-variable `C` ranges over classes.
-
-The meta-variable `B` ranges over types used as bounds for type variables.
-
-As a general rule, indices up to `k` are used for type parameters and type
-arguments, `n` for required value parameters, and `m` for all value parameters.
-
-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, ..., Tk>`
-- Function types
-  - `U Function<X0 extends B0, ...., Xk extends Bk>(T0 x0, ...., Tn xn, [Tn+1 xn+1, ..., Tm xm])`
-  - `U Function<X0 extends B0, ...., Xk extends Bk>(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 absence 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, ..., Tk/Yk]` for the result of performing a simultaneous
-capture-avoiding substitution of types `T0, ..., Tk` for the type variables
-`Y0, ..., Yk` 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 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.
-
-This makes the rules algorithmic, because they correspond in an obvious manner
-to an algorithm with an acceptable time complexity, and it makes them syntax
-directed because the overall structure of the algorithm corresponds to specific
-syntactic shapes. We will use the word _algorithmic_ to refer to this property.
-
-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, ..., Sk>`
-  and `T1` is `C0<U0, ..., Uk>`
-  - 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>(V0 x0, ..., Vn xn, [Vn+1 xn+1, ..., Vm 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] <: Vi[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>(V0 x0, ..., Vn xn, {Vn+1 xn+1, ..., Vm 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] <: Vi[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 algorithmic rules
-
-This section sketches out the derivation of the algorithmic rules from the
-interpretation of `FutureOr` as a union type, and promoted type bounds as
-intersection types, based on standard rules for such types that do not satisfy
-the requirements for being algorithmic.
-
-
-### Non-algorithmic rules
-
-The non-algorithmic 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-algorithmic rule is the variable bounds rule:
-
-Variable bounds:
-  - `X <: T` if `X extends B` and `B <: T`
-
-All other rules are algorithmic.
-
-Note: We 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.
-
-Showing that `A <: B => FutureOr<A> <: FutureOr<B>` is easy, but it is not
-immediately clear 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`.
-
-
-### Algorithmic 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
-algorithmic: 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-algorithmic rules: the remainder are strictly
-algorithmic.
diff --git a/pkg/analysis_server/benchmark/perf/memory_tests.dart b/pkg/analysis_server/benchmark/perf/memory_tests.dart
index ce762e8..6af8813 100644
--- a/pkg/analysis_server/benchmark/perf/memory_tests.dart
+++ b/pkg/analysis_server/benchmark/perf/memory_tests.dart
@@ -1,9 +1,8 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:math';
 
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/status/diagnostics.dart';
@@ -11,20 +10,6 @@
 
 import '../../test/integration/support/integration_tests.dart';
 
-void printMemoryResults(String id, String description, List<int> sizes) {
-  int minMemory = sizes.fold(sizes.first, min);
-  int maxMemory = sizes.fold(sizes.first, max);
-  String now = new DateTime.now().toUtc().toIso8601String();
-  print('$now ========== $id');
-  print('memory: $sizes');
-  print('min_memory: $minMemory');
-  print('max_memory: $maxMemory');
-  print(description.trim());
-  print('--------------------');
-  print('');
-  print('');
-}
-
 /**
  * Base class for analysis server memory usage tests.
  */
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index 5af3aa0..713507e 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -810,33 +810,16 @@
       </dd></dl></dd><dt class="request"><a name="request_analysis.reanalyze">analysis.reanalyze</a></dt><dd><div class="box"><pre>request: {
   "id": String
   "method": "analysis.reanalyze"
-  "params": {
-    "<b>roots</b>": <span style="color:#999999">optional</span> List&lt;<a href="#type_FilePath">FilePath</a>&gt;
-  }
 }</pre><br><pre>response: {
   "id": String
   "error": <span style="color:#999999">optional</span> <a href="#type_RequestError">RequestError</a>
 }</pre></div>
     <p>
-      Force the re-analysis of everything contained in the specified
-      analysis roots. This will cause all previously computed analysis
-      results to be discarded and recomputed, and will cause all subscribed
-      notifications to be re-sent.
+      Force re-reading of all potentially changed files, re-resolving of all
+      referenced URIs, and corresponding re-analysis of everything affected in
+      the current analysis roots.
     </p>
-    <p>
-      If no analysis roots are provided, then all current analysis roots
-      will be re-analyzed. If an empty list of analysis roots is provided,
-      then nothing will be re-analyzed. If the list contains one or more
-      paths that are not currently analysis roots, then an error of type
-      <tt>INVALID_ANALYSIS_ROOT</tt> will be generated.
-    </p>
-    
-  <h4>parameters:</h4><dl><dt class="field"><b>roots: List&lt;<a href="#type_FilePath">FilePath</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
-        
-        <p>
-          A list of the analysis roots that are to be re-analyzed.
-        </p>
-      </dd></dl></dd><dt class="request"><a name="request_analysis.setAnalysisRoots">analysis.setAnalysisRoots</a></dt><dd><div class="box"><pre>request: {
+  </dd><dt class="request"><a name="request_analysis.setAnalysisRoots">analysis.setAnalysisRoots</a></dt><dd><div class="box"><pre>request: {
   "id": String
   "method": "analysis.setAnalysisRoots"
   "params": {
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
index e1e4b90..55623c1 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
@@ -6,9 +6,18 @@
 // To regenerate the file, use the script
 // "pkg/analysis_server/tool/lsp_spec/generate_all.dart".
 
+// ignore_for_file: deprecated_member_use
+// ignore_for_file: unnecessary_brace_in_string_interps
+
 import 'dart:core' hide deprecated;
 import 'dart:core' as core show deprecated;
+import 'dart:convert' show JsonEncoder;
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/protocol/protocol_internal.dart'
+    show listEqual, mapEqual;
+import 'package:analyzer/src/generated/utilities_general.dart';
+
+const jsonEncoder = const JsonEncoder.withIndent('    ');
 
 class ApplyWorkspaceEditParams implements ToJsonable {
   ApplyWorkspaceEditParams(this.label, this.edit) {
@@ -16,10 +25,10 @@
       throw 'edit is required but was not provided';
     }
   }
-  factory ApplyWorkspaceEditParams.fromJson(Map<String, dynamic> json) {
+  static ApplyWorkspaceEditParams fromJson(Map<String, dynamic> json) {
     final label = json['label'];
     final edit =
-        json['edit'] != null ? new WorkspaceEdit.fromJson(json['edit']) : null;
+        json['edit'] != null ? WorkspaceEdit.fromJson(json['edit']) : null;
     return new ApplyWorkspaceEditParams(label, edit);
   }
 
@@ -44,6 +53,25 @@
         obj.containsKey('edit') &&
         WorkspaceEdit.canParse(obj['edit']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ApplyWorkspaceEditParams) {
+      return label == other.label && edit == other.edit && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ApplyWorkspaceEditResponse implements ToJsonable {
@@ -52,7 +80,7 @@
       throw 'applied is required but was not provided';
     }
   }
-  factory ApplyWorkspaceEditResponse.fromJson(Map<String, dynamic> json) {
+  static ApplyWorkspaceEditResponse fromJson(Map<String, dynamic> json) {
     final applied = json['applied'];
     return new ApplyWorkspaceEditResponse(applied);
   }
@@ -72,6 +100,24 @@
         obj.containsKey('applied') &&
         obj['applied'] is bool;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ApplyWorkspaceEditResponse) {
+      return applied == other.applied && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, applied.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class CancelParams implements ToJsonable {
@@ -80,12 +126,12 @@
       throw 'id is required but was not provided';
     }
   }
-  factory CancelParams.fromJson(Map<String, dynamic> json) {
+  static CancelParams fromJson(Map<String, dynamic> json) {
     final id = json['id'] is num
         ? new Either2<num, String>.t1(json['id'])
         : (json['id'] is String
             ? new Either2<num, String>.t2(json['id'])
-            : (throw '''${json['id']} was not one of (number, string)'''));
+            : (throw '''${json['id']} was not one of (num, String)'''));
     return new CancelParams(id);
   }
 
@@ -103,16 +149,34 @@
         obj.containsKey('id') &&
         (obj['id'] is num || obj['id'] is String);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CancelParams) {
+      return id == other.id && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ClientCapabilities implements ToJsonable {
   ClientCapabilities(this.workspace, this.textDocument, this.experimental);
-  factory ClientCapabilities.fromJson(Map<String, dynamic> json) {
+  static ClientCapabilities fromJson(Map<String, dynamic> json) {
     final workspace = json['workspace'] != null
-        ? new WorkspaceClientCapabilities.fromJson(json['workspace'])
+        ? WorkspaceClientCapabilities.fromJson(json['workspace'])
         : null;
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentClientCapabilities.fromJson(json['textDocument'])
+        ? TextDocumentClientCapabilities.fromJson(json['textDocument'])
         : null;
     final experimental = json['experimental'];
     return new ClientCapabilities(workspace, textDocument, experimental);
@@ -144,6 +208,29 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ClientCapabilities) {
+      return workspace == other.workspace &&
+          textDocument == other.textDocument &&
+          experimental == other.experimental &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workspace.hashCode);
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, experimental.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// A code action represents a change that can be performed in code, e.g. to fix
@@ -157,17 +244,18 @@
       throw 'title is required but was not provided';
     }
   }
-  factory CodeAction.fromJson(Map<String, dynamic> json) {
+  static CodeAction fromJson(Map<String, dynamic> json) {
     final title = json['title'];
-    final kind = json['kind'];
+    final kind =
+        json['kind'] != null ? CodeActionKind.fromJson(json['kind']) : null;
     final diagnostics = json['diagnostics']
-        ?.map((item) => item != null ? new Diagnostic.fromJson(item) : null)
+        ?.map((item) => item != null ? Diagnostic.fromJson(item) : null)
         ?.cast<Diagnostic>()
         ?.toList();
     final edit =
-        json['edit'] != null ? new WorkspaceEdit.fromJson(json['edit']) : null;
+        json['edit'] != null ? WorkspaceEdit.fromJson(json['edit']) : null;
     final command =
-        json['command'] != null ? new Command.fromJson(json['command']) : null;
+        json['command'] != null ? Command.fromJson(json['command']) : null;
     return new CodeAction(title, kind, diagnostics, edit, command);
   }
 
@@ -184,7 +272,7 @@
   /// The kind of the code action.
   ///
   /// Used to filter code actions.
-  final String kind;
+  final CodeActionKind kind;
 
   /// A short, human-readable, title for this code action.
   final String title;
@@ -212,6 +300,34 @@
         obj.containsKey('title') &&
         obj['title'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeAction) {
+      return title == other.title &&
+          kind == other.kind &&
+          listEqual(diagnostics, other.diagnostics,
+              (Diagnostic a, Diagnostic b) => a == b) &&
+          edit == other.edit &&
+          command == other.command &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, title.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, diagnostics.hashCode);
+    hash = JenkinsSmiHash.combine(hash, edit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, command.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Contains additional diagnostic information about the context in which a code
@@ -222,12 +338,15 @@
       throw 'diagnostics is required but was not provided';
     }
   }
-  factory CodeActionContext.fromJson(Map<String, dynamic> json) {
+  static CodeActionContext fromJson(Map<String, dynamic> json) {
     final diagnostics = json['diagnostics']
-        ?.map((item) => item != null ? new Diagnostic.fromJson(item) : null)
+        ?.map((item) => item != null ? Diagnostic.fromJson(item) : null)
         ?.cast<Diagnostic>()
         ?.toList();
-    final only = json['only']?.map((item) => item)?.cast<String>()?.toList();
+    final only = json['only']
+        ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
+        ?.cast<CodeActionKind>()
+        ?.toList();
     return new CodeActionContext(diagnostics, only);
   }
 
@@ -238,7 +357,7 @@
   ///
   /// Actions not of this kind are filtered out by the client before being
   /// shown. So servers can omit computing them.
-  final List<String> only;
+  final List<CodeActionKind> only;
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
@@ -254,18 +373,49 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('diagnostics') &&
         (obj['diagnostics'] is List &&
-            (obj['diagnostics'].length == 0 ||
-                obj['diagnostics'].every((item) => Diagnostic.canParse(item))));
+            (obj['diagnostics'].every((item) => Diagnostic.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeActionContext) {
+      return listEqual(diagnostics, other.diagnostics,
+              (Diagnostic a, Diagnostic b) => a == b) &&
+          listEqual(only, other.only,
+              (CodeActionKind a, CodeActionKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, diagnostics.hashCode);
+    hash = JenkinsSmiHash.combine(hash, only.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// A set of predefined code action kinds
-abstract class CodeActionKind {
+class CodeActionKind {
+  const CodeActionKind(this._value);
+  const CodeActionKind.fromJson(this._value);
+
+  final String _value;
+
+  static bool canParse(Object obj) {
+    return obj is String;
+  }
+
   /// Base kind for quickfix actions: 'quickfix'
-  static const QuickFix = 'quickfix';
+  static const QuickFix = const CodeActionKind('quickfix');
 
   /// Base kind for refactoring actions: 'refactor'
-  static const Refactor = 'refactor';
+  static const Refactor = const CodeActionKind('refactor');
 
   /// Base kind for refactoring extraction actions: 'refactor.extract'
   ///
@@ -276,7 +426,7 @@
   /// - Extract variable
   /// - Extract interface from class
   /// - ...
-  static const RefactorExtract = 'refactor.extract';
+  static const RefactorExtract = const CodeActionKind('refactor.extract');
 
   /// Base kind for refactoring inline actions: 'refactor.inline'
   ///
@@ -286,7 +436,7 @@
   /// - Inline variable
   /// - Inline constant
   /// - ...
-  static const RefactorInline = 'refactor.inline';
+  static const RefactorInline = const CodeActionKind('refactor.inline');
 
   /// Base kind for refactoring rewrite actions: 'refactor.rewrite'
   ///
@@ -298,23 +448,36 @@
   /// - Make method static
   /// - Move method to base class
   /// - ...
-  static const RefactorRewrite = 'refactor.rewrite';
+  static const RefactorRewrite = const CodeActionKind('refactor.rewrite');
 
   /// Base kind for source actions: `source`
   ///
   /// Source code actions apply to the entire file.
-  static const Source = 'source';
+  static const Source = const CodeActionKind('source');
 
   /// Base kind for an organize imports source action: `source.organizeImports`
-  static const SourceOrganizeImports = 'source.organizeImports';
+  static const SourceOrganizeImports =
+      const CodeActionKind('source.organizeImports');
+
+  Object toJson() => _value;
+
+  @override
+  String toString() => _value.toString();
+
+  @override
+  get hashCode => _value.hashCode;
+
+  bool operator ==(o) => o is CodeActionKind && o._value == _value;
 }
 
 /// Code Action options.
 class CodeActionOptions implements ToJsonable {
   CodeActionOptions(this.codeActionKinds);
-  factory CodeActionOptions.fromJson(Map<String, dynamic> json) {
-    final codeActionKinds =
-        json['codeActionKinds']?.map((item) => item)?.cast<String>()?.toList();
+  static CodeActionOptions fromJson(Map<String, dynamic> json) {
+    final codeActionKinds = json['codeActionKinds']
+        ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
+        ?.cast<CodeActionKind>()
+        ?.toList();
     return new CodeActionOptions(codeActionKinds);
   }
 
@@ -322,7 +485,7 @@
   ///
   /// The list of kinds may be generic, such as `CodeActionKind.Refactor`, or
   /// the server may list out every specific kind they provide.
-  final List<String> codeActionKinds;
+  final List<CodeActionKind> codeActionKinds;
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
@@ -335,6 +498,26 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeActionOptions) {
+      return listEqual(codeActionKinds, other.codeActionKinds,
+              (CodeActionKind a, CodeActionKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, codeActionKinds.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Params for the CodeActionRequest
@@ -350,14 +533,13 @@
       throw 'context is required but was not provided';
     }
   }
-  factory CodeActionParams.fromJson(Map<String, dynamic> json) {
+  static CodeActionParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final context = json['context'] != null
-        ? new CodeActionContext.fromJson(json['context'])
+        ? CodeActionContext.fromJson(json['context'])
         : null;
     return new CodeActionParams(textDocument, range, context);
   }
@@ -390,18 +572,43 @@
         obj.containsKey('context') &&
         CodeActionContext.canParse(obj['context']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeActionParams) {
+      return textDocument == other.textDocument &&
+          range == other.range &&
+          context == other.context &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, context.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class CodeActionRegistrationOptions
     implements TextDocumentRegistrationOptions, CodeActionOptions, ToJsonable {
   CodeActionRegistrationOptions(this.documentSelector, this.codeActionKinds);
-  factory CodeActionRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static CodeActionRegistrationOptions fromJson(Map<String, dynamic> json) {
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
-    final codeActionKinds =
-        json['codeActionKinds']?.map((item) => item)?.cast<String>()?.toList();
+    final codeActionKinds = json['codeActionKinds']
+        ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
+        ?.cast<CodeActionKind>()
+        ?.toList();
     return new CodeActionRegistrationOptions(documentSelector, codeActionKinds);
   }
 
@@ -409,7 +616,7 @@
   ///
   /// The list of kinds may be generic, such as `CodeActionKind.Refactor`, or
   /// the server may list out every specific kind they provide.
-  final List<String> codeActionKinds;
+  final List<CodeActionKind> codeActionKinds;
 
   /// A document selector to identify the scope of the registration. If set to
   /// null the document selector provided on the client side will be used.
@@ -428,10 +635,31 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeActionRegistrationOptions) {
+      return documentSelector == other.documentSelector &&
+          listEqual(codeActionKinds, other.codeActionKinds,
+              (CodeActionKind a, CodeActionKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    hash = JenkinsSmiHash.combine(hash, codeActionKinds.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// A code lens represents a command that should be shown along with source
@@ -446,11 +674,10 @@
       throw 'range is required but was not provided';
     }
   }
-  factory CodeLens.fromJson(Map<String, dynamic> json) {
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+  static CodeLens fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final command =
-        json['command'] != null ? new Command.fromJson(json['command']) : null;
+        json['command'] != null ? Command.fromJson(json['command']) : null;
     final data = json['data'];
     return new CodeLens(range, command, data);
   }
@@ -483,12 +710,35 @@
         obj.containsKey('range') &&
         Range.canParse(obj['range']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeLens) {
+      return range == other.range &&
+          command == other.command &&
+          data == other.data &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, command.hashCode);
+    hash = JenkinsSmiHash.combine(hash, data.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Code Lens options.
 class CodeLensOptions implements ToJsonable {
   CodeLensOptions(this.resolveProvider);
-  factory CodeLensOptions.fromJson(Map<String, dynamic> json) {
+  static CodeLensOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
     return new CodeLensOptions(resolveProvider);
   }
@@ -507,6 +757,24 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeLensOptions) {
+      return resolveProvider == other.resolveProvider && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class CodeLensParams implements ToJsonable {
@@ -515,9 +783,9 @@
       throw 'textDocument is required but was not provided';
     }
   }
-  factory CodeLensParams.fromJson(Map<String, dynamic> json) {
+  static CodeLensParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     return new CodeLensParams(textDocument);
   }
@@ -537,15 +805,33 @@
         obj.containsKey('textDocument') &&
         TextDocumentIdentifier.canParse(obj['textDocument']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeLensParams) {
+      return textDocument == other.textDocument && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class CodeLensRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
   CodeLensRegistrationOptions(this.resolveProvider, this.documentSelector);
-  factory CodeLensRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static CodeLensRegistrationOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new CodeLensRegistrationOptions(resolveProvider, documentSelector);
@@ -571,10 +857,30 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CodeLensRegistrationOptions) {
+      return resolveProvider == other.resolveProvider &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Represents a color in RGBA space.
@@ -593,7 +899,7 @@
       throw 'alpha is required but was not provided';
     }
   }
-  factory Color.fromJson(Map<String, dynamic> json) {
+  static Color fromJson(Map<String, dynamic> json) {
     final red = json['red'];
     final green = json['green'];
     final blue = json['blue'];
@@ -601,9 +907,16 @@
     return new Color(red, green, blue, alpha);
   }
 
+  /// The alpha component of this color in the range [0-1].
   final num alpha;
+
+  /// The blue component of this color in the range [0-1].
   final num blue;
+
+  /// The green component of this color in the range [0-1].
   final num green;
+
+  /// The red component of this color in the range [0-1].
   final num red;
 
   Map<String, dynamic> toJson() {
@@ -626,6 +939,31 @@
         obj.containsKey('alpha') &&
         obj['alpha'] is num;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Color) {
+      return red == other.red &&
+          green == other.green &&
+          blue == other.blue &&
+          alpha == other.alpha &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, red.hashCode);
+    hash = JenkinsSmiHash.combine(hash, green.hashCode);
+    hash = JenkinsSmiHash.combine(hash, blue.hashCode);
+    hash = JenkinsSmiHash.combine(hash, alpha.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ColorInformation implements ToJsonable {
@@ -637,11 +975,9 @@
       throw 'color is required but was not provided';
     }
   }
-  factory ColorInformation.fromJson(Map<String, dynamic> json) {
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
-    final color =
-        json['color'] != null ? new Color.fromJson(json['color']) : null;
+  static ColorInformation fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
+    final color = json['color'] != null ? Color.fromJson(json['color']) : null;
     return new ColorInformation(range, color);
   }
 
@@ -665,6 +1001,25 @@
         obj.containsKey('color') &&
         Color.canParse(obj['color']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ColorInformation) {
+      return range == other.range && color == other.color && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, color.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ColorPresentation implements ToJsonable {
@@ -673,13 +1028,12 @@
       throw 'label is required but was not provided';
     }
   }
-  factory ColorPresentation.fromJson(Map<String, dynamic> json) {
+  static ColorPresentation fromJson(Map<String, dynamic> json) {
     final label = json['label'];
-    final textEdit = json['textEdit'] != null
-        ? new TextEdit.fromJson(json['textEdit'])
-        : null;
+    final textEdit =
+        json['textEdit'] != null ? TextEdit.fromJson(json['textEdit']) : null;
     final additionalTextEdits = json['additionalTextEdits']
-        ?.map((item) => item != null ? new TextEdit.fromJson(item) : null)
+        ?.map((item) => item != null ? TextEdit.fromJson(item) : null)
         ?.cast<TextEdit>()
         ?.toList();
     return new ColorPresentation(label, textEdit, additionalTextEdits);
@@ -717,6 +1071,30 @@
         obj.containsKey('label') &&
         obj['label'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ColorPresentation) {
+      return label == other.label &&
+          textEdit == other.textEdit &&
+          listEqual(additionalTextEdits, other.additionalTextEdits,
+              (TextEdit a, TextEdit b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    hash = JenkinsSmiHash.combine(hash, textEdit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, additionalTextEdits.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ColorPresentationParams implements ToJsonable {
@@ -731,14 +1109,12 @@
       throw 'range is required but was not provided';
     }
   }
-  factory ColorPresentationParams.fromJson(Map<String, dynamic> json) {
+  static ColorPresentationParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final color =
-        json['color'] != null ? new Color.fromJson(json['color']) : null;
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+    final color = json['color'] != null ? Color.fromJson(json['color']) : null;
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     return new ColorPresentationParams(textDocument, color, range);
   }
 
@@ -769,10 +1145,37 @@
         obj.containsKey('range') &&
         Range.canParse(obj['range']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ColorPresentationParams) {
+      return textDocument == other.textDocument &&
+          color == other.color &&
+          range == other.range &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, color.hashCode);
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Color provider options.
 class ColorProviderOptions implements ToJsonable {
+  static ColorProviderOptions fromJson(Map<String, dynamic> json) {
+    return new ColorProviderOptions();
+  }
+
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
     return __result;
@@ -781,6 +1184,23 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ColorProviderOptions) {
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class Command implements ToJsonable {
@@ -792,7 +1212,7 @@
       throw 'command is required but was not provided';
     }
   }
-  factory Command.fromJson(Map<String, dynamic> json) {
+  static Command fromJson(Map<String, dynamic> json) {
     final title = json['title'];
     final command = json['command'];
     final arguments =
@@ -827,6 +1247,30 @@
         obj.containsKey('command') &&
         obj['command'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Command) {
+      return title == other.title &&
+          command == other.command &&
+          listEqual(
+              arguments, other.arguments, (dynamic a, dynamic b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, title.hashCode);
+    hash = JenkinsSmiHash.combine(hash, command.hashCode);
+    hash = JenkinsSmiHash.combine(hash, arguments.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Contains additional information about the context in which a completion
@@ -837,9 +1281,9 @@
       throw 'triggerKind is required but was not provided';
     }
   }
-  factory CompletionContext.fromJson(Map<String, dynamic> json) {
+  static CompletionContext fromJson(Map<String, dynamic> json) {
     final triggerKind = json['triggerKind'] != null
-        ? new CompletionTriggerKind.fromJson(json['triggerKind'])
+        ? CompletionTriggerKind.fromJson(json['triggerKind'])
         : null;
     final triggerCharacter = json['triggerCharacter'];
     return new CompletionContext(triggerKind, triggerCharacter);
@@ -865,8 +1309,29 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('triggerKind') &&
-        CompletionTriggerKind.canParse(obj['triggerKind']);
+        obj['triggerKind'] is num;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionContext) {
+      return triggerKind == other.triggerKind &&
+          triggerCharacter == other.triggerCharacter &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, triggerKind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, triggerCharacter.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class CompletionItem implements ToJsonable {
@@ -890,39 +1355,39 @@
       throw 'label is required but was not provided';
     }
   }
-  factory CompletionItem.fromJson(Map<String, dynamic> json) {
+  static CompletionItem fromJson(Map<String, dynamic> json) {
     final label = json['label'];
-    final kind = json['kind'] != null
-        ? new CompletionItemKind.fromJson(json['kind'])
-        : null;
+    final kind =
+        json['kind'] != null ? CompletionItemKind.fromJson(json['kind']) : null;
     final detail = json['detail'];
     final documentation = json['documentation'] is String
         ? new Either2<String, MarkupContent>.t1(json['documentation'])
         : (MarkupContent.canParse(json['documentation'])
             ? new Either2<String, MarkupContent>.t2(
                 json['documentation'] != null
-                    ? new MarkupContent.fromJson(json['documentation'])
+                    ? MarkupContent.fromJson(json['documentation'])
                     : null)
-            : (throw '''${json['documentation']} was not one of (string, MarkupContent)'''));
+            : (json['documentation'] == null
+                ? null
+                : (throw '''${json['documentation']} was not one of (String, MarkupContent)''')));
     final deprecated = json['deprecated'];
     final preselect = json['preselect'];
     final sortText = json['sortText'];
     final filterText = json['filterText'];
     final insertText = json['insertText'];
     final insertTextFormat = json['insertTextFormat'] != null
-        ? new InsertTextFormat.fromJson(json['insertTextFormat'])
+        ? InsertTextFormat.fromJson(json['insertTextFormat'])
         : null;
-    final textEdit = json['textEdit'] != null
-        ? new TextEdit.fromJson(json['textEdit'])
-        : null;
+    final textEdit =
+        json['textEdit'] != null ? TextEdit.fromJson(json['textEdit']) : null;
     final additionalTextEdits = json['additionalTextEdits']
-        ?.map((item) => item != null ? new TextEdit.fromJson(item) : null)
+        ?.map((item) => item != null ? TextEdit.fromJson(item) : null)
         ?.cast<TextEdit>()
         ?.toList();
     final commitCharacters =
         json['commitCharacters']?.map((item) => item)?.cast<String>()?.toList();
     final command =
-        json['command'] != null ? new Command.fromJson(json['command']) : null;
+        json['command'] != null ? Command.fromJson(json['command']) : null;
     final data = json['data'];
     return new CompletionItem(
         label,
@@ -1047,9 +1512,7 @@
     if (filterText != null) {
       __result['filterText'] = filterText;
     }
-    // ignore: deprecated_member_use
     if (insertText != null) {
-      // ignore: deprecated_member_use
       __result['insertText'] = insertText;
     }
     if (insertTextFormat != null) {
@@ -1078,6 +1541,55 @@
         obj.containsKey('label') &&
         obj['label'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionItem) {
+      return label == other.label &&
+          kind == other.kind &&
+          detail == other.detail &&
+          documentation == other.documentation &&
+          deprecated == other.deprecated &&
+          preselect == other.preselect &&
+          sortText == other.sortText &&
+          filterText == other.filterText &&
+          insertText == other.insertText &&
+          insertTextFormat == other.insertTextFormat &&
+          textEdit == other.textEdit &&
+          listEqual(additionalTextEdits, other.additionalTextEdits,
+              (TextEdit a, TextEdit b) => a == b) &&
+          listEqual(commitCharacters, other.commitCharacters,
+              (String a, String b) => a == b) &&
+          command == other.command &&
+          data == other.data &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, detail.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
+    hash = JenkinsSmiHash.combine(hash, deprecated.hashCode);
+    hash = JenkinsSmiHash.combine(hash, preselect.hashCode);
+    hash = JenkinsSmiHash.combine(hash, sortText.hashCode);
+    hash = JenkinsSmiHash.combine(hash, filterText.hashCode);
+    hash = JenkinsSmiHash.combine(hash, insertText.hashCode);
+    hash = JenkinsSmiHash.combine(hash, insertTextFormat.hashCode);
+    hash = JenkinsSmiHash.combine(hash, textEdit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, additionalTextEdits.hashCode);
+    hash = JenkinsSmiHash.combine(hash, commitCharacters.hashCode);
+    hash = JenkinsSmiHash.combine(hash, command.hashCode);
+    hash = JenkinsSmiHash.combine(hash, data.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// The kind of a completion entry.
@@ -1085,7 +1597,7 @@
   const CompletionItemKind._(this._value);
   const CompletionItemKind.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -1167,10 +1679,10 @@
       throw 'items is required but was not provided';
     }
   }
-  factory CompletionList.fromJson(Map<String, dynamic> json) {
+  static CompletionList fromJson(Map<String, dynamic> json) {
     final isIncomplete = json['isIncomplete'];
     final items = json['items']
-        ?.map((item) => item != null ? new CompletionItem.fromJson(item) : null)
+        ?.map((item) => item != null ? CompletionItem.fromJson(item) : null)
         ?.cast<CompletionItem>()
         ?.toList();
     return new CompletionList(isIncomplete, items);
@@ -1197,15 +1709,36 @@
         obj['isIncomplete'] is bool &&
         obj.containsKey('items') &&
         (obj['items'] is List &&
-            (obj['items'].length == 0 ||
-                obj['items'].every((item) => CompletionItem.canParse(item))));
+            (obj['items'].every((item) => CompletionItem.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionList) {
+      return isIncomplete == other.isIncomplete &&
+          listEqual(items, other.items,
+              (CompletionItem a, CompletionItem b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, isIncomplete.hashCode);
+    hash = JenkinsSmiHash.combine(hash, items.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Completion options.
 class CompletionOptions implements ToJsonable {
   CompletionOptions(this.resolveProvider, this.triggerCharacters);
-  factory CompletionOptions.fromJson(Map<String, dynamic> json) {
+  static CompletionOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
     final triggerCharacters = json['triggerCharacters']
         ?.map((item) => item)
@@ -1235,6 +1768,28 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionOptions) {
+      return resolveProvider == other.resolveProvider &&
+          listEqual(triggerCharacters, other.triggerCharacters,
+              (String a, String b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, triggerCharacters.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class CompletionParams implements TextDocumentPositionParams, ToJsonable {
@@ -1246,22 +1801,21 @@
       throw 'position is required but was not provided';
     }
   }
-  factory CompletionParams.fromJson(Map<String, dynamic> json) {
+  static CompletionParams fromJson(Map<String, dynamic> json) {
     final context = json['context'] != null
-        ? new CompletionContext.fromJson(json['context'])
+        ? CompletionContext.fromJson(json['context'])
         : null;
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final position = json['position'] != null
-        ? new Position.fromJson(json['position'])
-        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
     return new CompletionParams(context, textDocument, position);
   }
 
-  /// The completion context. This is only available if the client specifies
-  /// to send this using
-  /// `ClientCapabilities.textDocument.completion.contextSupport === true`
+  /// The completion context. This is only available if the client specifies to
+  /// send this using `ClientCapabilities.textDocument.completion.contextSupport
+  /// === true`
   final CompletionContext context;
 
   /// The position inside the text document.
@@ -1289,20 +1843,43 @@
         obj.containsKey('position') &&
         Position.canParse(obj['position']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionParams) {
+      return context == other.context &&
+          textDocument == other.textDocument &&
+          position == other.position &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, context.hashCode);
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class CompletionRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
   CompletionRegistrationOptions(
       this.triggerCharacters, this.resolveProvider, this.documentSelector);
-  factory CompletionRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static CompletionRegistrationOptions fromJson(Map<String, dynamic> json) {
     final triggerCharacters = json['triggerCharacters']
         ?.map((item) => item)
         ?.cast<String>()
         ?.toList();
     final resolveProvider = json['resolveProvider'];
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new CompletionRegistrationOptions(
@@ -1318,11 +1895,11 @@
   final bool resolveProvider;
 
   /// Most tools trigger completion request automatically without explicitly
-  /// requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically
-  /// they do so when the user starts to type an identifier. For example if
-  /// the user types `c` in a JavaScript file code complete will automatically
-  /// pop up present `console` besides others as a completion item. Characters
-  /// that make up identifiers don't need to be listed here.
+  /// requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they
+  /// do so when the user starts to type an identifier. For example if the user
+  /// types `c` in a JavaScript file code complete will automatically pop up
+  /// present `console` besides others as a completion item. Characters that
+  /// make up identifiers don't need to be listed here.
   ///
   /// If code complete should automatically be trigger on characters not being
   /// valid inside an identifier (for example `.` in JavaScript) list them in
@@ -1345,10 +1922,33 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionRegistrationOptions) {
+      return listEqual(triggerCharacters, other.triggerCharacters,
+              (String a, String b) => a == b) &&
+          resolveProvider == other.resolveProvider &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, triggerCharacters.hashCode);
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// How a completion was triggered
@@ -1356,7 +1956,7 @@
   const CompletionTriggerKind._(this._value);
   const CompletionTriggerKind.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -1376,8 +1976,7 @@
   /// `triggerCharacters` properties of the `CompletionRegistrationOptions`.
   static const TriggerCharacter = const CompletionTriggerKind._(2);
 
-  /// Completion was re-triggered as the current completion list is
-  /// incomplete.
+  /// Completion was re-triggered as the current completion list is incomplete.
   static const TriggerForIncompleteCompletions =
       const CompletionTriggerKind._(3);
 
@@ -1394,7 +1993,7 @@
 
 class ConfigurationItem implements ToJsonable {
   ConfigurationItem(this.scopeUri, this.section);
-  factory ConfigurationItem.fromJson(Map<String, dynamic> json) {
+  static ConfigurationItem fromJson(Map<String, dynamic> json) {
     final scopeUri = json['scopeUri'];
     final section = json['section'];
     return new ConfigurationItem(scopeUri, section);
@@ -1420,6 +2019,25 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ConfigurationItem) {
+      return scopeUri == other.scopeUri && section == other.section && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, scopeUri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, section.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ConfigurationParams implements ToJsonable {
@@ -1428,10 +2046,9 @@
       throw 'items is required but was not provided';
     }
   }
-  factory ConfigurationParams.fromJson(Map<String, dynamic> json) {
+  static ConfigurationParams fromJson(Map<String, dynamic> json) {
     final items = json['items']
-        ?.map((item) =>
-            item != null ? new ConfigurationItem.fromJson(item) : null)
+        ?.map((item) => item != null ? ConfigurationItem.fromJson(item) : null)
         ?.cast<ConfigurationItem>()
         ?.toList();
     return new ConfigurationParams(items);
@@ -1449,27 +2066,52 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('items') &&
         (obj['items'] is List &&
-            (obj['items'].length == 0 ||
-                obj['items']
-                    .every((item) => ConfigurationItem.canParse(item))));
+            (obj['items'].every((item) => ConfigurationItem.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ConfigurationParams) {
+      return listEqual(items, other.items,
+              (ConfigurationItem a, ConfigurationItem b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, items.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Create file operation
-class CreateFile implements FileOperation, ToJsonable {
-  CreateFile(this.uri, this.options) {
+class CreateFile implements ToJsonable {
+  CreateFile(this.kind, this.uri, this.options) {
+    if (kind == null) {
+      throw 'kind is required but was not provided';
+    }
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
   }
-  factory CreateFile.fromJson(Map<String, dynamic> json) {
+  static CreateFile fromJson(Map<String, dynamic> json) {
+    final kind = json['kind'];
     final uri = json['uri'];
     final options = json['options'] != null
-        ? new CreateFileOptions.fromJson(json['options'])
+        ? CreateFileOptions.fromJson(json['options'])
         : null;
-    return new CreateFile(uri, options);
+    return new CreateFile(kind, uri, options);
   }
 
+  /// A create
+  final String kind;
+
   /// Additional options
   final CreateFileOptions options;
 
@@ -1478,6 +2120,7 @@
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
+    __result['kind'] = kind ?? (throw 'kind is required but was not set');
     __result['uri'] = uri ?? (throw 'uri is required but was not set');
     if (options != null) {
       __result['options'] = options;
@@ -1487,15 +2130,40 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        obj.containsKey('kind') &&
+        obj['kind'] is String &&
         obj.containsKey('uri') &&
         obj['uri'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CreateFile) {
+      return kind == other.kind &&
+          uri == other.uri &&
+          options == other.options &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Options to create a file.
 class CreateFileOptions implements ToJsonable {
   CreateFileOptions(this.overwrite, this.ignoreIfExists);
-  factory CreateFileOptions.fromJson(Map<String, dynamic> json) {
+  static CreateFileOptions fromJson(Map<String, dynamic> json) {
     final overwrite = json['overwrite'];
     final ignoreIfExists = json['ignoreIfExists'];
     return new CreateFileOptions(overwrite, ignoreIfExists);
@@ -1521,23 +2189,51 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is CreateFileOptions) {
+      return overwrite == other.overwrite &&
+          ignoreIfExists == other.ignoreIfExists &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, overwrite.hashCode);
+    hash = JenkinsSmiHash.combine(hash, ignoreIfExists.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Delete file operation
-class DeleteFile implements FileOperation, ToJsonable {
-  DeleteFile(this.uri, this.options) {
+class DeleteFile implements ToJsonable {
+  DeleteFile(this.kind, this.uri, this.options) {
+    if (kind == null) {
+      throw 'kind is required but was not provided';
+    }
     if (uri == null) {
       throw 'uri is required but was not provided';
     }
   }
-  factory DeleteFile.fromJson(Map<String, dynamic> json) {
+  static DeleteFile fromJson(Map<String, dynamic> json) {
+    final kind = json['kind'];
     final uri = json['uri'];
     final options = json['options'] != null
-        ? new DeleteFileOptions.fromJson(json['options'])
+        ? DeleteFileOptions.fromJson(json['options'])
         : null;
-    return new DeleteFile(uri, options);
+    return new DeleteFile(kind, uri, options);
   }
 
+  /// A delete
+  final String kind;
+
   /// Delete options.
   final DeleteFileOptions options;
 
@@ -1546,6 +2242,7 @@
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
+    __result['kind'] = kind ?? (throw 'kind is required but was not set');
     __result['uri'] = uri ?? (throw 'uri is required but was not set');
     if (options != null) {
       __result['options'] = options;
@@ -1555,15 +2252,40 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        obj.containsKey('kind') &&
+        obj['kind'] is String &&
         obj.containsKey('uri') &&
         obj['uri'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DeleteFile) {
+      return kind == other.kind &&
+          uri == other.uri &&
+          options == other.options &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Delete file options
 class DeleteFileOptions implements ToJsonable {
   DeleteFileOptions(this.recursive, this.ignoreIfNotExists);
-  factory DeleteFileOptions.fromJson(Map<String, dynamic> json) {
+  static DeleteFileOptions fromJson(Map<String, dynamic> json) {
     final recursive = json['recursive'];
     final ignoreIfNotExists = json['ignoreIfNotExists'];
     return new DeleteFileOptions(recursive, ignoreIfNotExists);
@@ -1589,6 +2311,27 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DeleteFileOptions) {
+      return recursive == other.recursive &&
+          ignoreIfNotExists == other.ignoreIfNotExists &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, recursive.hashCode);
+    hash = JenkinsSmiHash.combine(hash, ignoreIfNotExists.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class Diagnostic implements ToJsonable {
@@ -1601,23 +2344,17 @@
       throw 'message is required but was not provided';
     }
   }
-  factory Diagnostic.fromJson(Map<String, dynamic> json) {
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+  static Diagnostic fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final severity = json['severity'] != null
-        ? new DiagnosticSeverity.fromJson(json['severity'])
+        ? DiagnosticSeverity.fromJson(json['severity'])
         : null;
-    final code = json['code'] is num
-        ? new Either2<num, String>.t1(json['code'])
-        : (json['code'] is String
-            ? new Either2<num, String>.t2(json['code'])
-            : (throw '''${json['code']} was not one of (number, string)'''));
+    final code = json['code'];
     final source = json['source'];
     final message = json['message'];
     final relatedInformation = json['relatedInformation']
-        ?.map((item) => item != null
-            ? new DiagnosticRelatedInformation.fromJson(item)
-            : null)
+        ?.map((item) =>
+            item != null ? DiagnosticRelatedInformation.fromJson(item) : null)
         ?.cast<DiagnosticRelatedInformation>()
         ?.toList();
     return new Diagnostic(
@@ -1625,7 +2362,7 @@
   }
 
   /// The diagnostic's code, which might appear in the user interface.
-  final Either2<num, String> code;
+  final String code;
 
   /// The diagnostic's message.
   final String message;
@@ -1633,9 +2370,8 @@
   /// The range at which the message applies.
   final Range range;
 
-  /// An array of related diagnostic information, e.g. when symbol-names
-  /// within a scope collide all definitions can be marked via this
-  /// property.
+  /// An array of related diagnostic information, e.g. when symbol-names within
+  /// a scope collide all definitions can be marked via this property.
   final List<DiagnosticRelatedInformation> relatedInformation;
 
   /// The diagnostic's severity. Can be omitted. If omitted it is up to the
@@ -1673,11 +2409,45 @@
         obj.containsKey('message') &&
         obj['message'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Diagnostic) {
+      return range == other.range &&
+          severity == other.severity &&
+          code == other.code &&
+          source == other.source &&
+          message == other.message &&
+          listEqual(
+              relatedInformation,
+              other.relatedInformation,
+              (DiagnosticRelatedInformation a,
+                      DiagnosticRelatedInformation b) =>
+                  a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, severity.hashCode);
+    hash = JenkinsSmiHash.combine(hash, code.hashCode);
+    hash = JenkinsSmiHash.combine(hash, source.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, relatedInformation.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Represents a related message and source code location for a diagnostic.
-/// This should be used to point to code locations that cause or related to
-/// a diagnostics, e.g when duplicating a symbol in a scope.
+/// Represents a related message and source code location for a diagnostic. This
+/// should be used to point to code locations that cause or related to a
+/// diagnostics, e.g when duplicating a symbol in a scope.
 class DiagnosticRelatedInformation implements ToJsonable {
   DiagnosticRelatedInformation(this.location, this.message) {
     if (location == null) {
@@ -1687,10 +2457,9 @@
       throw 'message is required but was not provided';
     }
   }
-  factory DiagnosticRelatedInformation.fromJson(Map<String, dynamic> json) {
-    final location = json['location'] != null
-        ? new Location.fromJson(json['location'])
-        : null;
+  static DiagnosticRelatedInformation fromJson(Map<String, dynamic> json) {
+    final location =
+        json['location'] != null ? Location.fromJson(json['location']) : null;
     final message = json['message'];
     return new DiagnosticRelatedInformation(location, message);
   }
@@ -1717,13 +2486,32 @@
         obj.containsKey('message') &&
         obj['message'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DiagnosticRelatedInformation) {
+      return location == other.location && message == other.message && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, location.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DiagnosticSeverity {
   const DiagnosticSeverity._(this._value);
   const DiagnosticSeverity.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -1765,7 +2553,7 @@
       throw 'settings is required but was not provided';
     }
   }
-  factory DidChangeConfigurationParams.fromJson(Map<String, dynamic> json) {
+  static DidChangeConfigurationParams fromJson(Map<String, dynamic> json) {
     final settings = json['settings'];
     return new DidChangeConfigurationParams(settings);
   }
@@ -1783,6 +2571,24 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> && obj.containsKey('settings') && true;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidChangeConfigurationParams) {
+      return settings == other.settings && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, settings.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DidChangeTextDocumentParams implements ToJsonable {
@@ -1794,27 +2600,25 @@
       throw 'contentChanges is required but was not provided';
     }
   }
-  factory DidChangeTextDocumentParams.fromJson(Map<String, dynamic> json) {
+  static DidChangeTextDocumentParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new VersionedTextDocumentIdentifier.fromJson(json['textDocument'])
+        ? VersionedTextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final contentChanges = json['contentChanges']
-        ?.map((item) => item != null
-            ? new TextDocumentContentChangeEvent.fromJson(item)
-            : null)
+        ?.map((item) =>
+            item != null ? TextDocumentContentChangeEvent.fromJson(item) : null)
         ?.cast<TextDocumentContentChangeEvent>()
         ?.toList();
     return new DidChangeTextDocumentParams(textDocument, contentChanges);
   }
 
-  /// The actual content changes. The content changes describe single
-  /// state changes to the document. So if there are two content changes
-  /// c1 and c2 for a document in state S then c1 move the document to S'
-  /// and c2 to S''.
+  /// The actual content changes. The content changes describe single state
+  /// changes to the document. So if there are two content changes c1 and c2 for
+  /// a document in state S then c1 move the document to S' and c2 to S''.
   final List<TextDocumentContentChangeEvent> contentChanges;
 
-  /// The document that did change. The version number points to the
-  /// version after all provided content changes have been applied.
+  /// The document that did change. The version number points to the version
+  /// after all provided content changes have been applied.
   final VersionedTextDocumentIdentifier textDocument;
 
   Map<String, dynamic> toJson() {
@@ -1832,10 +2636,35 @@
         VersionedTextDocumentIdentifier.canParse(obj['textDocument']) &&
         obj.containsKey('contentChanges') &&
         (obj['contentChanges'] is List &&
-            (obj['contentChanges'].length == 0 ||
-                obj['contentChanges'].every(
-                    (item) => TextDocumentContentChangeEvent.canParse(item))));
+            (obj['contentChanges'].every(
+                (item) => TextDocumentContentChangeEvent.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidChangeTextDocumentParams) {
+      return textDocument == other.textDocument &&
+          listEqual(
+              contentChanges,
+              other.contentChanges,
+              (TextDocumentContentChangeEvent a,
+                      TextDocumentContentChangeEvent b) =>
+                  a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, contentChanges.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DidChangeWatchedFilesParams implements ToJsonable {
@@ -1844,9 +2673,9 @@
       throw 'changes is required but was not provided';
     }
   }
-  factory DidChangeWatchedFilesParams.fromJson(Map<String, dynamic> json) {
+  static DidChangeWatchedFilesParams fromJson(Map<String, dynamic> json) {
     final changes = json['changes']
-        ?.map((item) => item != null ? new FileEvent.fromJson(item) : null)
+        ?.map((item) => item != null ? FileEvent.fromJson(item) : null)
         ?.cast<FileEvent>()
         ?.toList();
     return new DidChangeWatchedFilesParams(changes);
@@ -1866,9 +2695,28 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('changes') &&
         (obj['changes'] is List &&
-            (obj['changes'].length == 0 ||
-                obj['changes'].every((item) => FileEvent.canParse(item))));
+            (obj['changes'].every((item) => FileEvent.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidChangeWatchedFilesParams) {
+      return listEqual(
+              changes, other.changes, (FileEvent a, FileEvent b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, changes.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Describe options to be used when registering for text document change
@@ -1879,11 +2727,10 @@
       throw 'watchers is required but was not provided';
     }
   }
-  factory DidChangeWatchedFilesRegistrationOptions.fromJson(
+  static DidChangeWatchedFilesRegistrationOptions fromJson(
       Map<String, dynamic> json) {
     final watchers = json['watchers']
-        ?.map((item) =>
-            item != null ? new FileSystemWatcher.fromJson(item) : null)
+        ?.map((item) => item != null ? FileSystemWatcher.fromJson(item) : null)
         ?.cast<FileSystemWatcher>()
         ?.toList();
     return new DidChangeWatchedFilesRegistrationOptions(watchers);
@@ -1903,10 +2750,29 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('watchers') &&
         (obj['watchers'] is List &&
-            (obj['watchers'].length == 0 ||
-                obj['watchers']
-                    .every((item) => FileSystemWatcher.canParse(item))));
+            (obj['watchers']
+                .every((item) => FileSystemWatcher.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidChangeWatchedFilesRegistrationOptions) {
+      return listEqual(watchers, other.watchers,
+              (FileSystemWatcher a, FileSystemWatcher b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, watchers.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DidChangeWorkspaceFoldersParams implements ToJsonable {
@@ -1915,9 +2781,9 @@
       throw 'event is required but was not provided';
     }
   }
-  factory DidChangeWorkspaceFoldersParams.fromJson(Map<String, dynamic> json) {
+  static DidChangeWorkspaceFoldersParams fromJson(Map<String, dynamic> json) {
     final event = json['event'] != null
-        ? new WorkspaceFoldersChangeEvent.fromJson(json['event'])
+        ? WorkspaceFoldersChangeEvent.fromJson(json['event'])
         : null;
     return new DidChangeWorkspaceFoldersParams(event);
   }
@@ -1936,6 +2802,24 @@
         obj.containsKey('event') &&
         WorkspaceFoldersChangeEvent.canParse(obj['event']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidChangeWorkspaceFoldersParams) {
+      return event == other.event && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, event.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DidCloseTextDocumentParams implements ToJsonable {
@@ -1944,9 +2828,9 @@
       throw 'textDocument is required but was not provided';
     }
   }
-  factory DidCloseTextDocumentParams.fromJson(Map<String, dynamic> json) {
+  static DidCloseTextDocumentParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     return new DidCloseTextDocumentParams(textDocument);
   }
@@ -1966,6 +2850,24 @@
         obj.containsKey('textDocument') &&
         TextDocumentIdentifier.canParse(obj['textDocument']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidCloseTextDocumentParams) {
+      return textDocument == other.textDocument && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DidOpenTextDocumentParams implements ToJsonable {
@@ -1974,9 +2876,9 @@
       throw 'textDocument is required but was not provided';
     }
   }
-  factory DidOpenTextDocumentParams.fromJson(Map<String, dynamic> json) {
+  static DidOpenTextDocumentParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentItem.fromJson(json['textDocument'])
+        ? TextDocumentItem.fromJson(json['textDocument'])
         : null;
     return new DidOpenTextDocumentParams(textDocument);
   }
@@ -1996,6 +2898,24 @@
         obj.containsKey('textDocument') &&
         TextDocumentItem.canParse(obj['textDocument']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidOpenTextDocumentParams) {
+      return textDocument == other.textDocument && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DidSaveTextDocumentParams implements ToJsonable {
@@ -2004,16 +2924,16 @@
       throw 'textDocument is required but was not provided';
     }
   }
-  factory DidSaveTextDocumentParams.fromJson(Map<String, dynamic> json) {
+  static DidSaveTextDocumentParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final text = json['text'];
     return new DidSaveTextDocumentParams(textDocument, text);
   }
 
-  /// Optional the content when saved. Depends on the includeText value
-  /// when the save notification was requested.
+  /// Optional the content when saved. Depends on the includeText value when the
+  /// save notification was requested.
   final String text;
 
   /// The document that was saved.
@@ -2034,11 +2954,30 @@
         obj.containsKey('textDocument') &&
         TextDocumentIdentifier.canParse(obj['textDocument']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DidSaveTextDocumentParams) {
+      return textDocument == other.textDocument && text == other.text && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, text.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentFilter implements ToJsonable {
   DocumentFilter(this.language, this.scheme, this.pattern);
-  factory DocumentFilter.fromJson(Map<String, dynamic> json) {
+  static DocumentFilter fromJson(Map<String, dynamic> json) {
     final language = json['language'];
     final scheme = json['scheme'];
     final pattern = json['pattern'];
@@ -2049,6 +2988,18 @@
   final String language;
 
   /// A glob pattern, like `*.{ts,js}`.
+  ///
+  /// Glob patterns can have the following syntax:
+  /// - `*` to match one or more characters in a path segment
+  /// - `?` to match on one character in a path segment
+  /// - `**` to match any number of path segments, including none
+  /// - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript
+  /// and JavaScript files)
+  /// - `[]` to declare a range of characters to match in a path segment (e.g.,
+  /// `example.[0-9]` to match on `example.0`, `example.1`, …)
+  /// - `[!...]` to negate a range of characters to match in a path segment
+  /// (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not
+  /// `example.0`)
   final String pattern;
 
   /// A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
@@ -2071,6 +3022,29 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentFilter) {
+      return language == other.language &&
+          scheme == other.scheme &&
+          pattern == other.pattern &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, language.hashCode);
+    hash = JenkinsSmiHash.combine(hash, scheme.hashCode);
+    hash = JenkinsSmiHash.combine(hash, pattern.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentFormattingParams implements ToJsonable {
@@ -2082,12 +3056,12 @@
       throw 'options is required but was not provided';
     }
   }
-  factory DocumentFormattingParams.fromJson(Map<String, dynamic> json) {
+  static DocumentFormattingParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final options = json['options'] != null
-        ? new FormattingOptions.fromJson(json['options'])
+        ? FormattingOptions.fromJson(json['options'])
         : null;
     return new DocumentFormattingParams(textDocument, options);
   }
@@ -2114,22 +3088,42 @@
         obj.containsKey('options') &&
         FormattingOptions.canParse(obj['options']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentFormattingParams) {
+      return textDocument == other.textDocument &&
+          options == other.options &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// A document highlight is a range inside a text document which deserves
-/// special attention. Usually a document highlight is visualized by
-/// changing the background color of its range.
+/// special attention. Usually a document highlight is visualized by changing
+/// the background color of its range.
 class DocumentHighlight implements ToJsonable {
   DocumentHighlight(this.range, this.kind) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
   }
-  factory DocumentHighlight.fromJson(Map<String, dynamic> json) {
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+  static DocumentHighlight fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final kind = json['kind'] != null
-        ? new DocumentHighlightKind.fromJson(json['kind'])
+        ? DocumentHighlightKind.fromJson(json['kind'])
         : null;
     return new DocumentHighlight(range, kind);
   }
@@ -2154,6 +3148,25 @@
         obj.containsKey('range') &&
         Range.canParse(obj['range']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentHighlight) {
+      return range == other.range && kind == other.kind && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// A document highlight kind.
@@ -2161,7 +3174,7 @@
   const DocumentHighlightKind._(this._value);
   const DocumentHighlightKind.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -2193,18 +3206,16 @@
   bool operator ==(o) => o is DocumentHighlightKind && o._value == _value;
 }
 
-/// A document link is a range in a text document that links to an
-/// internal or external resource, like another text document or a web
-/// site.
+/// A document link is a range in a text document that links to an internal or
+/// external resource, like another text document or a web site.
 class DocumentLink implements ToJsonable {
   DocumentLink(this.range, this.target, this.data) {
     if (range == null) {
       throw 'range is required but was not provided';
     }
   }
-  factory DocumentLink.fromJson(Map<String, dynamic> json) {
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+  static DocumentLink fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final target = json['target'];
     final data = json['data'];
     return new DocumentLink(range, target, data);
@@ -2217,8 +3228,7 @@
   /// The range this link applies to.
   final Range range;
 
-  /// The uri this link points to. If missing a resolve request is sent
-  /// later.
+  /// The uri this link points to. If missing a resolve request is sent later.
   final String target;
 
   Map<String, dynamic> toJson() {
@@ -2238,12 +3248,35 @@
         obj.containsKey('range') &&
         Range.canParse(obj['range']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentLink) {
+      return range == other.range &&
+          target == other.target &&
+          data == other.data &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, target.hashCode);
+    hash = JenkinsSmiHash.combine(hash, data.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Document link options.
 class DocumentLinkOptions implements ToJsonable {
   DocumentLinkOptions(this.resolveProvider);
-  factory DocumentLinkOptions.fromJson(Map<String, dynamic> json) {
+  static DocumentLinkOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
     return new DocumentLinkOptions(resolveProvider);
   }
@@ -2262,6 +3295,24 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentLinkOptions) {
+      return resolveProvider == other.resolveProvider && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentLinkParams implements ToJsonable {
@@ -2270,9 +3321,9 @@
       throw 'textDocument is required but was not provided';
     }
   }
-  factory DocumentLinkParams.fromJson(Map<String, dynamic> json) {
+  static DocumentLinkParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     return new DocumentLinkParams(textDocument);
   }
@@ -2292,24 +3343,41 @@
         obj.containsKey('textDocument') &&
         TextDocumentIdentifier.canParse(obj['textDocument']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentLinkParams) {
+      return textDocument == other.textDocument && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentLinkRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
   DocumentLinkRegistrationOptions(this.resolveProvider, this.documentSelector);
-  factory DocumentLinkRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static DocumentLinkRegistrationOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new DocumentLinkRegistrationOptions(
         resolveProvider, documentSelector);
   }
 
-  /// A document selector to identify the scope of the registration. If
-  /// set to null the document selector provided on the client side will
-  /// be used.
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
   /// Document links have a resolve provider as well.
@@ -2328,10 +3396,30 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentLinkRegistrationOptions) {
+      return resolveProvider == other.resolveProvider &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, resolveProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Format document on type options.
@@ -2342,7 +3430,7 @@
       throw 'firstTriggerCharacter is required but was not provided';
     }
   }
-  factory DocumentOnTypeFormattingOptions.fromJson(Map<String, dynamic> json) {
+  static DocumentOnTypeFormattingOptions fromJson(Map<String, dynamic> json) {
     final firstTriggerCharacter = json['firstTriggerCharacter'];
     final moreTriggerCharacter = json['moreTriggerCharacter']
         ?.map((item) => item)
@@ -2373,6 +3461,28 @@
         obj.containsKey('firstTriggerCharacter') &&
         obj['firstTriggerCharacter'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentOnTypeFormattingOptions) {
+      return firstTriggerCharacter == other.firstTriggerCharacter &&
+          listEqual(moreTriggerCharacter, other.moreTriggerCharacter,
+              (String a, String b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, firstTriggerCharacter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, moreTriggerCharacter.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentOnTypeFormattingParams implements ToJsonable {
@@ -2391,16 +3501,15 @@
       throw 'options is required but was not provided';
     }
   }
-  factory DocumentOnTypeFormattingParams.fromJson(Map<String, dynamic> json) {
+  static DocumentOnTypeFormattingParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final position = json['position'] != null
-        ? new Position.fromJson(json['position'])
-        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
     final ch = json['ch'];
     final options = json['options'] != null
-        ? new FormattingOptions.fromJson(json['options'])
+        ? FormattingOptions.fromJson(json['options'])
         : null;
     return new DocumentOnTypeFormattingParams(
         textDocument, position, ch, options);
@@ -2441,6 +3550,31 @@
         obj.containsKey('options') &&
         FormattingOptions.canParse(obj['options']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentOnTypeFormattingParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          ch == other.ch &&
+          options == other.options &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, ch.hashCode);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentOnTypeFormattingRegistrationOptions
@@ -2451,7 +3585,7 @@
       throw 'firstTriggerCharacter is required but was not provided';
     }
   }
-  factory DocumentOnTypeFormattingRegistrationOptions.fromJson(
+  static DocumentOnTypeFormattingRegistrationOptions fromJson(
       Map<String, dynamic> json) {
     final firstTriggerCharacter = json['firstTriggerCharacter'];
     final moreTriggerCharacter = json['moreTriggerCharacter']
@@ -2459,16 +3593,15 @@
         ?.cast<String>()
         ?.toList();
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new DocumentOnTypeFormattingRegistrationOptions(
         firstTriggerCharacter, moreTriggerCharacter, documentSelector);
   }
 
-  /// A document selector to identify the scope of the registration. If
-  /// set to null the document selector provided on the client side will
-  /// be used.
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
   /// A character on which formatting should be triggered, like `}`.
@@ -2494,10 +3627,33 @@
         obj['firstTriggerCharacter'] is String &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentOnTypeFormattingRegistrationOptions) {
+      return firstTriggerCharacter == other.firstTriggerCharacter &&
+          listEqual(moreTriggerCharacter, other.moreTriggerCharacter,
+              (String a, String b) => a == b) &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, firstTriggerCharacter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, moreTriggerCharacter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentRangeFormattingParams implements ToJsonable {
@@ -2512,14 +3668,13 @@
       throw 'options is required but was not provided';
     }
   }
-  factory DocumentRangeFormattingParams.fromJson(Map<String, dynamic> json) {
+  static DocumentRangeFormattingParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final options = json['options'] != null
-        ? new FormattingOptions.fromJson(json['options'])
+        ? FormattingOptions.fromJson(json['options'])
         : null;
     return new DocumentRangeFormattingParams(textDocument, range, options);
   }
@@ -2552,13 +3707,35 @@
         obj.containsKey('options') &&
         FormattingOptions.canParse(obj['options']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentRangeFormattingParams) {
+      return textDocument == other.textDocument &&
+          range == other.range &&
+          options == other.options &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Represents programming constructs like variables, classes,
-/// interfaces etc. that appear in a document. Document symbols can be
-/// hierarchical and they have two ranges: one that encloses its
-/// definition and one that points to its most interesting range, e.g.
-/// the range of an identifier.
+/// Represents programming constructs like variables, classes, interfaces etc.
+/// that appear in a document. Document symbols can be hierarchical and they
+/// have two ranges: one that encloses its definition and one that points to its
+/// most interesting range, e.g. the range of an identifier.
 class DocumentSymbol implements ToJsonable {
   DocumentSymbol(this.name, this.detail, this.kind, this.deprecated, this.range,
       this.selectionRange, this.children) {
@@ -2575,19 +3752,18 @@
       throw 'selectionRange is required but was not provided';
     }
   }
-  factory DocumentSymbol.fromJson(Map<String, dynamic> json) {
+  static DocumentSymbol fromJson(Map<String, dynamic> json) {
     final name = json['name'];
     final detail = json['detail'];
     final kind =
-        json['kind'] != null ? new SymbolKind.fromJson(json['kind']) : null;
+        json['kind'] != null ? SymbolKind.fromJson(json['kind']) : null;
     final deprecated = json['deprecated'];
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final selectionRange = json['selectionRange'] != null
-        ? new Range.fromJson(json['selectionRange'])
+        ? Range.fromJson(json['selectionRange'])
         : null;
     final children = json['children']
-        ?.map((item) => item != null ? new DocumentSymbol.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentSymbol.fromJson(item) : null)
         ?.cast<DocumentSymbol>()
         ?.toList();
     return new DocumentSymbol(
@@ -2606,18 +3782,19 @@
   /// The kind of this symbol.
   final SymbolKind kind;
 
-  /// The name of this symbol.
+  /// The name of this symbol. Will be displayed in the user interface and
+  /// therefore must not be an empty string or a string only consisting of white
+  /// spaces.
   final String name;
 
-  /// The range enclosing this symbol not including leading/trailing
-  /// whitespace but everything else like comments. This information is
-  /// typically used to determine if the clients cursor is inside the
-  /// symbol to reveal in the symbol in the UI.
+  /// The range enclosing this symbol not including leading/trailing whitespace
+  /// but everything else like comments. This information is typically used to
+  /// determine if the clients cursor is inside the symbol to reveal in the
+  /// symbol in the UI.
   final Range range;
 
-  /// The range that should be selected and revealed when this symbol is
-  /// being picked, e.g the name of a function. Must be contained by the
-  /// `range`.
+  /// The range that should be selected and revealed when this symbol is being
+  /// picked, e.g the name of a function. Must be contained by the `range`.
   final Range selectionRange;
 
   Map<String, dynamic> toJson() {
@@ -2650,6 +3827,38 @@
         obj.containsKey('selectionRange') &&
         Range.canParse(obj['selectionRange']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentSymbol) {
+      return name == other.name &&
+          detail == other.detail &&
+          kind == other.kind &&
+          deprecated == other.deprecated &&
+          range == other.range &&
+          selectionRange == other.selectionRange &&
+          listEqual(children, other.children,
+              (DocumentSymbol a, DocumentSymbol b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, detail.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, deprecated.hashCode);
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, selectionRange.hashCode);
+    hash = JenkinsSmiHash.combine(hash, children.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class DocumentSymbolParams implements ToJsonable {
@@ -2658,9 +3867,9 @@
       throw 'textDocument is required but was not provided';
     }
   }
-  factory DocumentSymbolParams.fromJson(Map<String, dynamic> json) {
+  static DocumentSymbolParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     return new DocumentSymbolParams(textDocument);
   }
@@ -2680,19 +3889,59 @@
         obj.containsKey('textDocument') &&
         TextDocumentIdentifier.canParse(obj['textDocument']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is DocumentSymbolParams) {
+      return textDocument == other.textDocument && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-abstract class ErrorCodes {
-  static const InternalError = -32603;
-  static const InvalidParams = -32602;
-  static const InvalidRequest = -32600;
-  static const MethodNotFound = -32601;
-  static const ParseError = -32700;
-  static const RequestCancelled = -32800;
-  static const ServerNotInitialized = -32002;
-  static const UnknownErrorCode = -32001;
-  static const serverErrorEnd = -32000;
-  static const serverErrorStart = -32099;
+class ErrorCodes {
+  const ErrorCodes(this._value);
+  const ErrorCodes.fromJson(this._value);
+
+  final num _value;
+
+  static bool canParse(Object obj) {
+    return obj is num;
+  }
+
+  /// Defined by JSON RPC
+  static const ParseError = const ErrorCodes(-32700);
+  static const InvalidRequest = const ErrorCodes(-32600);
+  static const MethodNotFound = const ErrorCodes(-32601);
+  static const InvalidParams = const ErrorCodes(-32602);
+  static const InternalError = const ErrorCodes(-32603);
+  static const serverErrorStart = const ErrorCodes(-32099);
+  static const serverErrorEnd = const ErrorCodes(-32000);
+  static const ServerNotInitialized = const ErrorCodes(-32002);
+  static const UnknownErrorCode = const ErrorCodes(-32001);
+
+  /// Defined by the protocol.
+  static const RequestCancelled = const ErrorCodes(-32800);
+
+  Object toJson() => _value;
+
+  @override
+  String toString() => _value.toString();
+
+  @override
+  get hashCode => _value.hashCode;
+
+  bool operator ==(o) => o is ErrorCodes && o._value == _value;
 }
 
 /// Execute command options.
@@ -2702,7 +3951,7 @@
       throw 'commands is required but was not provided';
     }
   }
-  factory ExecuteCommandOptions.fromJson(Map<String, dynamic> json) {
+  static ExecuteCommandOptions fromJson(Map<String, dynamic> json) {
     final commands =
         json['commands']?.map((item) => item)?.cast<String>()?.toList();
     return new ExecuteCommandOptions(commands);
@@ -2722,9 +3971,28 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('commands') &&
         (obj['commands'] is List &&
-            (obj['commands'].length == 0 ||
-                obj['commands'].every((item) => item is String)));
+            (obj['commands'].every((item) => item is String)));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ExecuteCommandOptions) {
+      return listEqual(
+              commands, other.commands, (String a, String b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, commands.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ExecuteCommandParams implements ToJsonable {
@@ -2733,7 +4001,7 @@
       throw 'command is required but was not provided';
     }
   }
-  factory ExecuteCommandParams.fromJson(Map<String, dynamic> json) {
+  static ExecuteCommandParams fromJson(Map<String, dynamic> json) {
     final command = json['command'];
     final arguments =
         json['arguments']?.map((item) => item)?.cast<dynamic>()?.toList();
@@ -2761,6 +4029,28 @@
         obj.containsKey('command') &&
         obj['command'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ExecuteCommandParams) {
+      return command == other.command &&
+          listEqual(
+              arguments, other.arguments, (dynamic a, dynamic b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, command.hashCode);
+    hash = JenkinsSmiHash.combine(hash, arguments.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Execute command registration options.
@@ -2770,8 +4060,7 @@
       throw 'commands is required but was not provided';
     }
   }
-  factory ExecuteCommandRegistrationOptions.fromJson(
-      Map<String, dynamic> json) {
+  static ExecuteCommandRegistrationOptions fromJson(Map<String, dynamic> json) {
     final commands =
         json['commands']?.map((item) => item)?.cast<String>()?.toList();
     return new ExecuteCommandRegistrationOptions(commands);
@@ -2791,16 +4080,35 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('commands') &&
         (obj['commands'] is List &&
-            (obj['commands'].length == 0 ||
-                obj['commands'].every((item) => item is String)));
+            (obj['commands'].every((item) => item is String)));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ExecuteCommandRegistrationOptions) {
+      return listEqual(
+              commands, other.commands, (String a, String b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, commands.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class FailureHandlingKind {
   const FailureHandlingKind._(this._value);
   const FailureHandlingKind.fromJson(this._value);
 
-  final Object _value;
+  final String _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -2813,25 +4121,23 @@
     return false;
   }
 
-  /// Applying the workspace change is simply aborted if one of the
-  /// changes provided fails. All operations executed before the
-  /// failing operation stay executed.
+  /// Applying the workspace change is simply aborted if one of the changes
+  /// provided fails. All operations executed before the failing operation stay
+  /// executed.
   static const Abort = const FailureHandlingKind._('abort');
 
-  /// All operations are executed transactional. That means they
-  /// either all succeed or no changes at all are applied to the
-  /// workspace.
+  /// All operations are executed transactional. That means they either all
+  /// succeed or no changes at all are applied to the workspace.
   static const Transactional = const FailureHandlingKind._('transactional');
 
-  /// If the workspace edit contains only textual file changes they
-  /// are executed transactional. If resource changes (create, rename
-  /// or delete file) are part of the change the failure handling
-  /// startegy is abort.
+  /// If the workspace edit contains only textual file changes they are executed
+  /// transactional. If resource changes (create, rename or delete file) are
+  /// part of the change the failure handling strategy is abort.
   static const TextOnlyTransactional =
       const FailureHandlingKind._('textOnlyTransactional');
 
-  /// The client tries to undo the operations already executed. But
-  /// there is no guaruntee that this is succeeding.
+  /// The client tries to undo the operations already executed. But there is no
+  /// guarantee that this is succeeding.
   static const Undo = const FailureHandlingKind._('undo');
 
   Object toJson() => _value;
@@ -2850,7 +4156,7 @@
   const FileChangeType._(this._value);
   const FileChangeType.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -2892,7 +4198,7 @@
       throw 'type is required but was not provided';
     }
   }
-  factory FileEvent.fromJson(Map<String, dynamic> json) {
+  static FileEvent fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     final type = json['type'];
     return new FileEvent(uri, type);
@@ -2918,6 +4224,25 @@
         obj.containsKey('type') &&
         obj['type'] is num;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is FileEvent) {
+      return uri == other.uri && type == other.type && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class FileSystemWatcher implements ToJsonable {
@@ -2926,19 +4251,29 @@
       throw 'globPattern is required but was not provided';
     }
   }
-  factory FileSystemWatcher.fromJson(Map<String, dynamic> json) {
+  static FileSystemWatcher fromJson(Map<String, dynamic> json) {
     final globPattern = json['globPattern'];
-    final kind =
-        json['kind'] != null ? new WatchKind.fromJson(json['kind']) : null;
+    final kind = json['kind'] != null ? WatchKind.fromJson(json['kind']) : null;
     return new FileSystemWatcher(globPattern, kind);
   }
 
-  /// The  glob pattern to watch
+  /// The  glob pattern to watch.
+  ///
+  /// Glob patterns can have the following syntax:
+  /// - `*` to match one or more characters in a path segment
+  /// - `?` to match on one character in a path segment
+  /// - `**` to match any number of path segments, including none
+  /// - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript
+  /// and JavaScript files)
+  /// - `[]` to declare a range of characters to match in a path segment (e.g.,
+  /// `example.[0-9]` to match on `example.0`, `example.1`, …)
+  /// - `[!...]` to negate a range of characters to match in a path segment
+  /// (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not
+  /// `example.0`)
   final String globPattern;
 
-  /// The kind of events of interest. If omitted it defaults to
-  /// WatchKind.Create | WatchKind.Change | WatchKind.Delete which
-  /// is 7.
+  /// The kind of events of interest. If omitted it defaults to WatchKind.Create
+  /// | WatchKind.Change | WatchKind.Delete which is 7.
   final WatchKind kind;
 
   Map<String, dynamic> toJson() {
@@ -2956,6 +4291,25 @@
         obj.containsKey('globPattern') &&
         obj['globPattern'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is FileSystemWatcher) {
+      return globPattern == other.globPattern && kind == other.kind && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, globPattern.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Represents a folding range.
@@ -2969,34 +4323,32 @@
       throw 'endLine is required but was not provided';
     }
   }
-  factory FoldingRange.fromJson(Map<String, dynamic> json) {
+  static FoldingRange fromJson(Map<String, dynamic> json) {
     final startLine = json['startLine'];
     final startCharacter = json['startCharacter'];
     final endLine = json['endLine'];
     final endCharacter = json['endCharacter'];
-    final kind = json['kind'] != null
-        ? new FoldingRangeKind.fromJson(json['kind'])
-        : null;
+    final kind =
+        json['kind'] != null ? FoldingRangeKind.fromJson(json['kind']) : null;
     return new FoldingRange(
         startLine, startCharacter, endLine, endCharacter, kind);
   }
 
-  /// The zero-based character offset before the folded range ends.
-  /// If not defined, defaults to the length of the end line.
+  /// The zero-based character offset before the folded range ends. If not
+  /// defined, defaults to the length of the end line.
   final num endCharacter;
 
   /// The zero-based line number where the folded range ends.
   final num endLine;
 
-  /// Describes the kind of the folding range such as `comment' or
-  /// 'region'. The kind is used to categorize folding ranges and
-  /// used by commands like 'Fold all comments'. See
-  /// [FoldingRangeKind] for an enumeration of standardized kinds.
+  /// Describes the kind of the folding range such as `comment' or 'region'. The
+  /// kind is used to categorize folding ranges and used by commands like 'Fold
+  /// all comments'. See [FoldingRangeKind] for an enumeration of standardized
+  /// kinds.
   final FoldingRangeKind kind;
 
-  /// The zero-based character offset from where the folded range
-  /// starts. If not defined, defaults to the length of the start
-  /// line.
+  /// The zero-based character offset from where the folded range starts. If not
+  /// defined, defaults to the length of the start line.
   final num startCharacter;
 
   /// The zero-based line number from where the folded range starts.
@@ -3027,6 +4379,33 @@
         obj.containsKey('endLine') &&
         obj['endLine'] is num;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is FoldingRange) {
+      return startLine == other.startLine &&
+          startCharacter == other.startCharacter &&
+          endLine == other.endLine &&
+          endCharacter == other.endCharacter &&
+          kind == other.kind &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, startLine.hashCode);
+    hash = JenkinsSmiHash.combine(hash, startCharacter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, endLine.hashCode);
+    hash = JenkinsSmiHash.combine(hash, endCharacter.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Enum of known range kinds
@@ -3034,26 +4413,26 @@
   const FoldingRangeKind._(this._value);
   const FoldingRangeKind.fromJson(this._value);
 
-  final Object _value;
+  final String _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
-      case 'comment':
-      case 'imports':
-      case 'region':
+      case r'comment':
+      case r'imports':
+      case r'region':
         return true;
     }
     return false;
   }
 
   /// Folding range for a comment
-  static const Comment = const FoldingRangeKind._('comment');
+  static const Comment = const FoldingRangeKind._(r'comment');
 
   /// Folding range for a imports or includes
-  static const Imports = const FoldingRangeKind._('imports');
+  static const Imports = const FoldingRangeKind._(r'imports');
 
   /// Folding range for a region (e.g. `#region`)
-  static const Region = const FoldingRangeKind._('region');
+  static const Region = const FoldingRangeKind._(r'region');
 
   Object toJson() => _value;
 
@@ -3072,9 +4451,9 @@
       throw 'textDocument is required but was not provided';
     }
   }
-  factory FoldingRangeParams.fromJson(Map<String, dynamic> json) {
+  static FoldingRangeParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     return new FoldingRangeParams(textDocument);
   }
@@ -3094,10 +4473,32 @@
         obj.containsKey('textDocument') &&
         TextDocumentIdentifier.canParse(obj['textDocument']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is FoldingRangeParams) {
+      return textDocument == other.textDocument && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Folding range provider options.
 class FoldingRangeProviderOptions implements ToJsonable {
+  static FoldingRangeProviderOptions fromJson(Map<String, dynamic> json) {
+    return new FoldingRangeProviderOptions();
+  }
+
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
     return __result;
@@ -3106,6 +4507,23 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is FoldingRangeProviderOptions) {
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Value-object describing what options formatting should use.
@@ -3118,7 +4536,7 @@
       throw 'insertSpaces is required but was not provided';
     }
   }
-  factory FormattingOptions.fromJson(Map<String, dynamic> json) {
+  static FormattingOptions fromJson(Map<String, dynamic> json) {
     final tabSize = json['tabSize'];
     final insertSpaces = json['insertSpaces'];
     return new FormattingOptions(tabSize, insertSpaces);
@@ -3146,6 +4564,27 @@
         obj.containsKey('insertSpaces') &&
         obj['insertSpaces'] is bool;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is FormattingOptions) {
+      return tabSize == other.tabSize &&
+          insertSpaces == other.insertSpaces &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, tabSize.hashCode);
+    hash = JenkinsSmiHash.combine(hash, insertSpaces.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// The result of a hover request.
@@ -3155,38 +4594,23 @@
       throw 'contents is required but was not provided';
     }
   }
-  factory Hover.fromJson(Map<String, dynamic> json) {
-    final contents = MarkedString.canParse(json['contents'])
-        ? new Either3<MarkedString, List<MarkedString>, MarkupContent>.t1(
-            json['contents'] != null
-                ? new MarkedString.fromJson(json['contents'])
+  static Hover fromJson(Map<String, dynamic> json) {
+    final contents = json['contents'] is String
+        ? new Either2<String, MarkupContent>.t1(json['contents'])
+        : (MarkupContent.canParse(json['contents'])
+            ? new Either2<String, MarkupContent>.t2(json['contents'] != null
+                ? MarkupContent.fromJson(json['contents'])
                 : null)
-        : ((json['contents'] is List &&
-                (json['contents'].length == 0 ||
-                    json['contents']
-                        .every((item) => MarkedString.canParse(item))))
-            ? new Either3<MarkedString, List<MarkedString>, MarkupContent>.t2(json['contents']
-                ?.map((item) =>
-                    item != null ? new MarkedString.fromJson(item) : null)
-                ?.cast<MarkedString>()
-                ?.toList())
-            : (MarkupContent.canParse(json['contents'])
-                ? new Either3<MarkedString, List<MarkedString>, MarkupContent>.t3(
-                    json['contents'] != null
-                        ? new MarkupContent.fromJson(json['contents'])
-                        : null)
-                : (throw '''${json['contents']} was not one of (MarkedString, MarkedString[], MarkupContent)''')));
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+            : (throw '''${json['contents']} was not one of (String, MarkupContent)'''));
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     return new Hover(contents, range);
   }
 
   /// The hover's content
-  final Either3<MarkedString, List<MarkedString>, MarkupContent> contents;
+  final Either2<String, MarkupContent> contents;
 
-  /// An optional range is a range inside a text document that is
-  /// used to visualize a hover, e.g. by changing the background
-  /// color.
+  /// An optional range is a range inside a text document that is used to
+  /// visualize a hover, e.g. by changing the background color.
   final Range range;
 
   Map<String, dynamic> toJson() {
@@ -3202,49 +4626,74 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('contents') &&
-        (MarkedString.canParse(obj['contents']) ||
-            (obj['contents'] is List &&
-                (obj['contents'].length == 0 ||
-                    obj['contents']
-                        .every((item) => MarkedString.canParse(item)))) ||
-            MarkupContent.canParse(obj['contents']));
+        (obj['contents'] is String || MarkupContent.canParse(obj['contents']));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Hover) {
+      return contents == other.contents && range == other.range && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, contents.hashCode);
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class InitializeParams implements ToJsonable {
-  InitializeParams(this.processId, this.rootPath, this.rootUri,
-      this.initializationOptions, this.capabilities, this.workspaceFolders) {
+  InitializeParams(
+      this.processId,
+      this.rootPath,
+      this.rootUri,
+      this.initializationOptions,
+      this.capabilities,
+      this.trace,
+      this.workspaceFolders) {
     if (capabilities == null) {
       throw 'capabilities is required but was not provided';
     }
   }
-  factory InitializeParams.fromJson(Map<String, dynamic> json) {
+  static InitializeParams fromJson(Map<String, dynamic> json) {
     final processId = json['processId'];
     final rootPath = json['rootPath'];
     final rootUri = json['rootUri'];
     final initializationOptions = json['initializationOptions'];
     final capabilities = json['capabilities'] != null
-        ? new ClientCapabilities.fromJson(json['capabilities'])
+        ? ClientCapabilities.fromJson(json['capabilities'])
         : null;
+    final trace = json['trace'];
     final workspaceFolders = json['workspaceFolders']
-        ?.map(
-            (item) => item != null ? new WorkspaceFolder.fromJson(item) : null)
+        ?.map((item) => item != null ? WorkspaceFolder.fromJson(item) : null)
         ?.cast<WorkspaceFolder>()
         ?.toList();
     return new InitializeParams(processId, rootPath, rootUri,
-        initializationOptions, capabilities, workspaceFolders);
+        initializationOptions, capabilities, trace, workspaceFolders);
   }
 
   /// The capabilities provided by the client (editor or tool)
   final ClientCapabilities capabilities;
 
-  /// User provided initialization options.
+  /// Client provided initialization options. Usually these are options that
+  /// could equally be command line options passed when starting the server.
+  /// This property shouldn't be used to pass any user configuration to the
+  /// server. If a user configuration is needed the server should use
+  /// `workspace/configuration` requests together with dynamic registration to
+  /// obtain them.
   final dynamic initializationOptions;
 
-  /// The process Id of the parent process that started the
-  /// server. Is null if the process has not been started by
-  /// another process. If the parent process is not alive then the
-  /// server should exit (see exit notification) its process.
+  /// The process Id of the parent process that started the server. Is null if
+  /// the process has not been started by another process. If the parent process
+  /// is not alive then the server should exit (see exit notification) its
+  /// process.
   final num processId;
 
   /// The rootPath of the workspace. Is null if no folder is open.
@@ -3252,14 +4701,17 @@
   @core.deprecated
   final String rootPath;
 
-  /// The rootUri of the workspace. Is null if no folder is open.
-  /// If both `rootPath` and `rootUri` are set `rootUri` wins.
+  /// The rootUri of the workspace. Is null if no folder is open. If both
+  /// `rootPath` and `rootUri` are set `rootUri` wins.
   final String rootUri;
 
-  /// The workspace folders configured in the client when the
-  /// server starts. This property is only available if the client
-  /// supports workspace folders. It can be `null` if the client
-  /// supports workspace folders but none are configured.
+  /// The initial trace setting. If omitted trace is disabled ('off').
+  final String trace;
+
+  /// The workspace folders configured in the client when the server starts.
+  /// This property is only available if the client supports workspace folders.
+  /// It can be `null` if the client supports workspace folders but none are
+  /// configured.
   ///
   /// Since 3.6.0
   final List<WorkspaceFolder> workspaceFolders;
@@ -3267,9 +4719,7 @@
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
     __result['processId'] = processId;
-    // ignore: deprecated_member_use
     if (rootPath != null) {
-      // ignore: deprecated_member_use
       __result['rootPath'] = rootPath;
     }
     __result['rootUri'] = rootUri;
@@ -3278,6 +4728,9 @@
     }
     __result['capabilities'] =
         capabilities ?? (throw 'capabilities is required but was not set');
+    if (trace != null) {
+      __result['trace'] = trace;
+    }
     if (workspaceFolders != null) {
       __result['workspaceFolders'] = workspaceFolders;
     }
@@ -3293,6 +4746,38 @@
         obj.containsKey('capabilities') &&
         ClientCapabilities.canParse(obj['capabilities']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is InitializeParams) {
+      return processId == other.processId &&
+          rootPath == other.rootPath &&
+          rootUri == other.rootUri &&
+          initializationOptions == other.initializationOptions &&
+          capabilities == other.capabilities &&
+          trace == other.trace &&
+          listEqual(workspaceFolders, other.workspaceFolders,
+              (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, processId.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rootPath.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rootUri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, initializationOptions.hashCode);
+    hash = JenkinsSmiHash.combine(hash, capabilities.hashCode);
+    hash = JenkinsSmiHash.combine(hash, trace.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspaceFolders.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class InitializeResult implements ToJsonable {
@@ -3301,9 +4786,9 @@
       throw 'capabilities is required but was not provided';
     }
   }
-  factory InitializeResult.fromJson(Map<String, dynamic> json) {
+  static InitializeResult fromJson(Map<String, dynamic> json) {
     final capabilities = json['capabilities'] != null
-        ? new ServerCapabilities.fromJson(json['capabilities'])
+        ? ServerCapabilities.fromJson(json['capabilities'])
         : null;
     return new InitializeResult(capabilities);
   }
@@ -3323,9 +4808,31 @@
         obj.containsKey('capabilities') &&
         ServerCapabilities.canParse(obj['capabilities']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is InitializeResult) {
+      return capabilities == other.capabilities && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, capabilities.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class InitializedParams implements ToJsonable {
+  static InitializedParams fromJson(Map<String, dynamic> json) {
+    return new InitializedParams();
+  }
+
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
     return __result;
@@ -3334,15 +4841,32 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is InitializedParams) {
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Defines whether the insert text in a completion item should be
-/// interpreted as plain text or a snippet.
+/// Defines whether the insert text in a completion item should be interpreted
+/// as plain text or a snippet.
 class InsertTextFormat {
   const InsertTextFormat._(this._value);
   const InsertTextFormat.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -3353,17 +4877,15 @@
     return false;
   }
 
-  /// The primary text to be inserted is treated as a plain
-  /// string.
+  /// The primary text to be inserted is treated as a plain string.
   static const PlainText = const InsertTextFormat._(1);
 
   /// The primary text to be inserted is treated as a snippet.
   ///
-  /// A snippet can define tab stops and placeholders with `$1`,
-  /// `$2` and `${3:foo}`. `$0` defines the final tab stop, it
-  /// defaults to the end of the snippet. Placeholders with
-  /// equal identifiers are linked, that is typing in one will
-  /// update others too.
+  /// A snippet can define tab stops and placeholders with `$1`, `$2` and
+  /// `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of the
+  /// snippet. Placeholders with equal identifiers are linked, that is typing in
+  /// one will update others too.
   static const Snippet = const InsertTextFormat._(2);
 
   Object toJson() => _value;
@@ -3386,10 +4908,9 @@
       throw 'range is required but was not provided';
     }
   }
-  factory Location.fromJson(Map<String, dynamic> json) {
+  static Location fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     return new Location(uri, range);
   }
 
@@ -3410,6 +4931,114 @@
         obj.containsKey('range') &&
         Range.canParse(obj['range']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Location) {
+      return uri == other.uri && range == other.range && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class LocationLink implements ToJsonable {
+  LocationLink(this.originSelectionRange, this.targetUri, this.targetRange,
+      this.targetSelectionRange) {
+    if (targetUri == null) {
+      throw 'targetUri is required but was not provided';
+    }
+    if (targetRange == null) {
+      throw 'targetRange is required but was not provided';
+    }
+  }
+  static LocationLink fromJson(Map<String, dynamic> json) {
+    final originSelectionRange = json['originSelectionRange'] != null
+        ? Range.fromJson(json['originSelectionRange'])
+        : null;
+    final targetUri = json['targetUri'];
+    final targetRange = json['targetRange'] != null
+        ? Range.fromJson(json['targetRange'])
+        : null;
+    final targetSelectionRange = json['targetSelectionRange'] != null
+        ? Range.fromJson(json['targetSelectionRange'])
+        : null;
+    return new LocationLink(
+        originSelectionRange, targetUri, targetRange, targetSelectionRange);
+  }
+
+  /// Span of the origin of this link.
+  ///
+  /// Used as the underlined span for mouse interaction. Defaults to the word
+  /// range at the mouse position.
+  final Range originSelectionRange;
+
+  /// The full target range of this link.
+  final Range targetRange;
+
+  /// The span of this link.
+  final Range targetSelectionRange;
+
+  /// The target resource identifier of this link.
+  final String targetUri;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (originSelectionRange != null) {
+      __result['originSelectionRange'] = originSelectionRange;
+    }
+    __result['targetUri'] =
+        targetUri ?? (throw 'targetUri is required but was not set');
+    __result['targetRange'] =
+        targetRange ?? (throw 'targetRange is required but was not set');
+    if (targetSelectionRange != null) {
+      __result['targetSelectionRange'] = targetSelectionRange;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic> &&
+        obj.containsKey('targetUri') &&
+        obj['targetUri'] is String &&
+        obj.containsKey('targetRange') &&
+        Range.canParse(obj['targetRange']);
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is LocationLink) {
+      return originSelectionRange == other.originSelectionRange &&
+          targetUri == other.targetUri &&
+          targetRange == other.targetRange &&
+          targetSelectionRange == other.targetSelectionRange &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, originSelectionRange.hashCode);
+    hash = JenkinsSmiHash.combine(hash, targetUri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, targetRange.hashCode);
+    hash = JenkinsSmiHash.combine(hash, targetSelectionRange.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class LogMessageParams implements ToJsonable {
@@ -3421,9 +5050,9 @@
       throw 'message is required but was not provided';
     }
   }
-  factory LogMessageParams.fromJson(Map<String, dynamic> json) {
+  static LogMessageParams fromJson(Map<String, dynamic> json) {
     final type =
-        json['type'] != null ? new MessageType.fromJson(json['type']) : null;
+        json['type'] != null ? MessageType.fromJson(json['type']) : null;
     final message = json['message'];
     return new LogMessageParams(type, message);
   }
@@ -3449,55 +5078,37 @@
         obj.containsKey('message') &&
         obj['message'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is LogMessageParams) {
+      return type == other.type && message == other.message && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-class MarkedString implements ToJsonable {
-  MarkedString(this.language, this.value) {
-    if (language == null) {
-      throw 'language is required but was not provided';
-    }
-    if (value == null) {
-      throw 'value is required but was not provided';
-    }
-  }
-  factory MarkedString.fromJson(Map<String, dynamic> json) {
-    final language = json['language'];
-    final value = json['value'];
-    return new MarkedString(language, value);
-  }
-
-  final String language;
-  final String value;
-
-  Map<String, dynamic> toJson() {
-    Map<String, dynamic> __result = {};
-    __result['language'] =
-        language ?? (throw 'language is required but was not set');
-    __result['value'] = value ?? (throw 'value is required but was not set');
-    return __result;
-  }
-
-  static bool canParse(Object obj) {
-    return obj is Map<String, dynamic> &&
-        obj.containsKey('language') &&
-        obj['language'] is String &&
-        obj.containsKey('value') &&
-        obj['value'] is String;
-  }
-}
-
-/// A `MarkupContent` literal represents a string value which
-/// content is interpreted base on its kind flag. Currently the
-/// protocol supports `plaintext` and `markdown` as markup
-/// kinds.
+/// A `MarkupContent` literal represents a string value which content is
+/// interpreted base on its kind flag. Currently the protocol supports
+/// `plaintext` and `markdown` as markup kinds.
 ///
-/// If the kind is `markdown` then the value can contain fenced
-/// code blocks like in GitHub issues. See
+/// If the kind is `markdown` then the value can contain fenced code blocks like
+/// in GitHub issues. See
 /// https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
 ///
-/// Here is an example how such a string can be constructed
-/// using JavaScript / TypeScript: ```ts let markdown:
-/// MarkdownContent = {
+/// Here is an example how such a string can be constructed using JavaScript /
+/// TypeScript: ```ts let markdown: MarkdownContent = {
 ///
 /// kind: MarkupKind.Markdown,
 /// 	value: [
@@ -3508,9 +5119,8 @@
 /// 		'```'
 /// 	].join('\n') }; ```
 ///
-/// *Please Note* that clients might sanitize the return
-/// markdown. A client could decide to remove HTML from the
-/// markdown to avoid script execution.
+/// *Please Note* that clients might sanitize the return markdown. A client
+/// could decide to remove HTML from the markdown to avoid script execution.
 class MarkupContent implements ToJsonable {
   MarkupContent(this.kind, this.value) {
     if (kind == null) {
@@ -3520,9 +5130,9 @@
       throw 'value is required but was not provided';
     }
   }
-  factory MarkupContent.fromJson(Map<String, dynamic> json) {
+  static MarkupContent fromJson(Map<String, dynamic> json) {
     final kind =
-        json['kind'] != null ? new MarkupKind.fromJson(json['kind']) : null;
+        json['kind'] != null ? MarkupKind.fromJson(json['kind']) : null;
     final value = json['value'];
     return new MarkupContent(kind, value);
   }
@@ -3543,38 +5153,56 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('kind') &&
-        MarkupKind.canParse(obj['kind']) &&
+        obj['kind'] is String &&
         obj.containsKey('value') &&
         obj['value'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is MarkupContent) {
+      return kind == other.kind && value == other.value && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, value.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Describes the content type that a client supports in various
-/// result literals like `Hover`, `ParameterInfo` or
-/// `CompletionItem`.
+/// Describes the content type that a client supports in various result literals
+/// like `Hover`, `ParameterInfo` or `CompletionItem`.
 ///
-/// Please note that `MarkupKinds` must not start with a `$`.
-/// This kinds are reserved for internal usage.
+/// Please note that `MarkupKinds` must not start with a `$`. This kinds are
+/// reserved for internal usage.
 class MarkupKind {
   const MarkupKind._(this._value);
   const MarkupKind.fromJson(this._value);
 
-  final Object _value;
+  final String _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
-      case 'plaintext':
-      case 'markdown':
+      case r'plaintext':
+      case r'markdown':
         return true;
     }
     return false;
   }
 
   /// Plain text is supported as a content format
-  static const PlainText = const MarkupKind._('plaintext');
+  static const PlainText = const MarkupKind._(r'plaintext');
 
   /// Markdown is supported as a content format
-  static const Markdown = const MarkupKind._('markdown');
+  static const Markdown = const MarkupKind._(r'markdown');
 
   Object toJson() => _value;
 
@@ -3593,7 +5221,7 @@
       throw 'jsonrpc is required but was not provided';
     }
   }
-  factory Message.fromJson(Map<String, dynamic> json) {
+  static Message fromJson(Map<String, dynamic> json) {
     final jsonrpc = json['jsonrpc'];
     return new Message(jsonrpc);
   }
@@ -3612,6 +5240,24 @@
         obj.containsKey('jsonrpc') &&
         obj['jsonrpc'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Message) {
+      return jsonrpc == other.jsonrpc && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class MessageActionItem implements ToJsonable {
@@ -3620,7 +5266,7 @@
       throw 'title is required but was not provided';
     }
   }
-  factory MessageActionItem.fromJson(Map<String, dynamic> json) {
+  static MessageActionItem fromJson(Map<String, dynamic> json) {
     final title = json['title'];
     return new MessageActionItem(title);
   }
@@ -3639,13 +5285,31 @@
         obj.containsKey('title') &&
         obj['title'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is MessageActionItem) {
+      return title == other.title && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, title.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class MessageType {
   const MessageType._(this._value);
   const MessageType.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -3681,7 +5345,249 @@
   bool operator ==(o) => o is MessageType && o._value == _value;
 }
 
-class NotificationMessage implements Message, ToJsonable {
+/// Valid LSP methods known at the time of code generation from the spec.
+class Method {
+  const Method._(this._value);
+  const Method.fromJson(this._value);
+
+  final String _value;
+
+  static bool canParse(Object obj) {
+    switch (obj) {
+      case r'$/cancelRequest':
+      case r'initialize':
+      case r'initialized':
+      case r'shutdown':
+      case r'exit':
+      case r'window/showMessage':
+      case r'window/showMessageRequest':
+      case r'window/logMessage':
+      case r'telemetry/event':
+      case r'client/registerCapability':
+      case r'client/unregisterCapability':
+      case r'workspace/workspaceFolders':
+      case r'workspace/didChangeWorkspaceFolders':
+      case r'workspace/configuration':
+      case r'workspace/didChangeWatchedFiles':
+      case r'workspace/symbol':
+      case r'workspace/executeCommand':
+      case r'workspace/applyEdit':
+      case r'textDocument/didOpen':
+      case r'textDocument/didChange':
+      case r'textDocument/willSave':
+      case r'textDocument/willSaveWaitUntil':
+      case r'textDocument/didClose':
+      case r'textDocument/publishDiagnostics':
+      case r'textDocument/completion':
+      case r'completionItem/resolve':
+      case r'textDocument/hover':
+      case r'textDocument/signatureHelp':
+      case r'textDocument/declaration':
+      case r'textDocument/definition':
+      case r'textDocument/typeDefinition':
+      case r'textDocument/implementation':
+      case r'textDocument/references':
+      case r'textDocument/documentHighlight':
+      case r'textDocument/documentSymbol':
+      case r'textDocument/codeAction':
+      case r'textDocument/codeLens':
+      case r'codeLens/resolve':
+      case r'textDocument/documentLink':
+      case r'documentLink/resolve':
+      case r'textDocument/documentColor':
+      case r'textDocument/colorPresentation':
+      case r'textDocument/formatting':
+      case r'textDocument/onTypeFormatting':
+      case r'textDocument/rename':
+      case r'textDocument/prepareRename':
+      case r'textDocument/foldingRange':
+        return true;
+    }
+    return false;
+  }
+
+  /// Constant for the '$/cancelRequest' method.
+  static const cancelRequest = const Method._(r'$/cancelRequest');
+
+  /// Constant for the 'initialize' method.
+  static const initialize = const Method._(r'initialize');
+
+  /// Constant for the 'initialized' method.
+  static const initialized = const Method._(r'initialized');
+
+  /// Constant for the 'shutdown' method.
+  static const shutdown = const Method._(r'shutdown');
+
+  /// Constant for the 'exit' method.
+  static const exit = const Method._(r'exit');
+
+  /// Constant for the 'window/showMessage' method.
+  static const window_showMessage = const Method._(r'window/showMessage');
+
+  /// Constant for the 'window/showMessageRequest' method.
+  static const window_showMessageRequest =
+      const Method._(r'window/showMessageRequest');
+
+  /// Constant for the 'window/logMessage' method.
+  static const window_logMessage = const Method._(r'window/logMessage');
+
+  /// Constant for the 'telemetry/event' method.
+  static const telemetry_event = const Method._(r'telemetry/event');
+
+  /// Constant for the 'client/registerCapability' method.
+  static const client_registerCapability =
+      const Method._(r'client/registerCapability');
+
+  /// Constant for the 'client/unregisterCapability' method.
+  static const client_unregisterCapability =
+      const Method._(r'client/unregisterCapability');
+
+  /// Constant for the 'workspace/workspaceFolders' method.
+  static const workspace_workspaceFolders =
+      const Method._(r'workspace/workspaceFolders');
+
+  /// Constant for the 'workspace/didChangeWorkspaceFolders' method.
+  static const workspace_didChangeWorkspaceFolders =
+      const Method._(r'workspace/didChangeWorkspaceFolders');
+
+  /// Constant for the 'workspace/configuration' method.
+  static const workspace_configuration =
+      const Method._(r'workspace/configuration');
+
+  /// Constant for the 'workspace/didChangeWatchedFiles' method.
+  static const workspace_didChangeWatchedFiles =
+      const Method._(r'workspace/didChangeWatchedFiles');
+
+  /// Constant for the 'workspace/symbol' method.
+  static const workspace_symbol = const Method._(r'workspace/symbol');
+
+  /// Constant for the 'workspace/executeCommand' method.
+  static const workspace_executeCommand =
+      const Method._(r'workspace/executeCommand');
+
+  /// Constant for the 'workspace/applyEdit' method.
+  static const workspace_applyEdit = const Method._(r'workspace/applyEdit');
+
+  /// Constant for the 'textDocument/didOpen' method.
+  static const textDocument_didOpen = const Method._(r'textDocument/didOpen');
+
+  /// Constant for the 'textDocument/didChange' method.
+  static const textDocument_didChange =
+      const Method._(r'textDocument/didChange');
+
+  /// Constant for the 'textDocument/willSave' method.
+  static const textDocument_willSave = const Method._(r'textDocument/willSave');
+
+  /// Constant for the 'textDocument/willSaveWaitUntil' method.
+  static const textDocument_willSaveWaitUntil =
+      const Method._(r'textDocument/willSaveWaitUntil');
+
+  /// Constant for the 'textDocument/didClose' method.
+  static const textDocument_didClose = const Method._(r'textDocument/didClose');
+
+  /// Constant for the 'textDocument/publishDiagnostics' method.
+  static const textDocument_publishDiagnostics =
+      const Method._(r'textDocument/publishDiagnostics');
+
+  /// Constant for the 'textDocument/completion' method.
+  static const textDocument_completion =
+      const Method._(r'textDocument/completion');
+
+  /// Constant for the 'completionItem/resolve' method.
+  static const completionItem_resolve =
+      const Method._(r'completionItem/resolve');
+
+  /// Constant for the 'textDocument/hover' method.
+  static const textDocument_hover = const Method._(r'textDocument/hover');
+
+  /// Constant for the 'textDocument/signatureHelp' method.
+  static const textDocument_signatureHelp =
+      const Method._(r'textDocument/signatureHelp');
+
+  /// Constant for the 'textDocument/declaration' method.
+  static const textDocument_declaration =
+      const Method._(r'textDocument/declaration');
+
+  /// Constant for the 'textDocument/definition' method.
+  static const textDocument_definition =
+      const Method._(r'textDocument/definition');
+
+  /// Constant for the 'textDocument/typeDefinition' method.
+  static const textDocument_typeDefinition =
+      const Method._(r'textDocument/typeDefinition');
+
+  /// Constant for the 'textDocument/implementation' method.
+  static const textDocument_implementation =
+      const Method._(r'textDocument/implementation');
+
+  /// Constant for the 'textDocument/references' method.
+  static const textDocument_references =
+      const Method._(r'textDocument/references');
+
+  /// Constant for the 'textDocument/documentHighlight' method.
+  static const textDocument_documentHighlight =
+      const Method._(r'textDocument/documentHighlight');
+
+  /// Constant for the 'textDocument/documentSymbol' method.
+  static const textDocument_documentSymbol =
+      const Method._(r'textDocument/documentSymbol');
+
+  /// Constant for the 'textDocument/codeAction' method.
+  static const textDocument_codeAction =
+      const Method._(r'textDocument/codeAction');
+
+  /// Constant for the 'textDocument/codeLens' method.
+  static const textDocument_codeLens = const Method._(r'textDocument/codeLens');
+
+  /// Constant for the 'codeLens/resolve' method.
+  static const codeLens_resolve = const Method._(r'codeLens/resolve');
+
+  /// Constant for the 'textDocument/documentLink' method.
+  static const textDocument_documentLink =
+      const Method._(r'textDocument/documentLink');
+
+  /// Constant for the 'documentLink/resolve' method.
+  static const documentLink_resolve = const Method._(r'documentLink/resolve');
+
+  /// Constant for the 'textDocument/documentColor' method.
+  static const textDocument_documentColor =
+      const Method._(r'textDocument/documentColor');
+
+  /// Constant for the 'textDocument/colorPresentation' method.
+  static const textDocument_colorPresentation =
+      const Method._(r'textDocument/colorPresentation');
+
+  /// Constant for the 'textDocument/formatting' method.
+  static const textDocument_formatting =
+      const Method._(r'textDocument/formatting');
+
+  /// Constant for the 'textDocument/onTypeFormatting' method.
+  static const textDocument_onTypeFormatting =
+      const Method._(r'textDocument/onTypeFormatting');
+
+  /// Constant for the 'textDocument/rename' method.
+  static const textDocument_rename = const Method._(r'textDocument/rename');
+
+  /// Constant for the 'textDocument/prepareRename' method.
+  static const textDocument_prepareRename =
+      const Method._(r'textDocument/prepareRename');
+
+  /// Constant for the 'textDocument/foldingRange' method.
+  static const textDocument_foldingRange =
+      const Method._(r'textDocument/foldingRange');
+
+  Object toJson() => _value;
+
+  @override
+  String toString() => _value.toString();
+
+  @override
+  get hashCode => _value.hashCode;
+
+  bool operator ==(o) => o is Method && o._value == _value;
+}
+
+class NotificationMessage implements Message, IncomingMessage, ToJsonable {
   NotificationMessage(this.method, this.params, this.jsonrpc) {
     if (method == null) {
       throw 'method is required but was not provided';
@@ -3690,14 +5596,10 @@
       throw 'jsonrpc is required but was not provided';
     }
   }
-  factory NotificationMessage.fromJson(Map<String, dynamic> json) {
-    final method = json['method'];
-    final params = (json['params'] is List &&
-            (json['params'].length == 0 ||
-                json['params'].every((item) => true)))
-        ? new Either2<List<dynamic>, dynamic>.t1(
-            json['params']?.map((item) => item)?.cast<dynamic>()?.toList())
-        : (new Either2<List<dynamic>, dynamic>.t2(json['params']));
+  static NotificationMessage fromJson(Map<String, dynamic> json) {
+    final method =
+        json['method'] != null ? Method.fromJson(json['method']) : null;
+    final params = json['params'];
     final jsonrpc = json['jsonrpc'];
     return new NotificationMessage(method, params, jsonrpc);
   }
@@ -3705,10 +5607,10 @@
   final String jsonrpc;
 
   /// The method to be invoked.
-  final String method;
+  final Method method;
 
   /// The notification's params.
-  final Either2<List<dynamic>, dynamic> params;
+  final dynamic params;
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
@@ -3724,38 +5626,68 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('method') &&
-        obj['method'] is String &&
+        Method.canParse(obj['method']) &&
         obj.containsKey('jsonrpc') &&
         obj['jsonrpc'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is NotificationMessage) {
+      return method == other.method &&
+          params == other.params &&
+          jsonrpc == other.jsonrpc &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, method.hashCode);
+    hash = JenkinsSmiHash.combine(hash, params.hashCode);
+    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Represents a parameter of a callable-signature. A
-/// parameter can have a label and a doc-comment.
+/// Represents a parameter of a callable-signature. A parameter can have a label
+/// and a doc-comment.
 class ParameterInformation implements ToJsonable {
   ParameterInformation(this.label, this.documentation) {
     if (label == null) {
       throw 'label is required but was not provided';
     }
   }
-  factory ParameterInformation.fromJson(Map<String, dynamic> json) {
+  static ParameterInformation fromJson(Map<String, dynamic> json) {
     final label = json['label'];
     final documentation = json['documentation'] is String
         ? new Either2<String, MarkupContent>.t1(json['documentation'])
         : (MarkupContent.canParse(json['documentation'])
             ? new Either2<String, MarkupContent>.t2(
                 json['documentation'] != null
-                    ? new MarkupContent.fromJson(json['documentation'])
+                    ? MarkupContent.fromJson(json['documentation'])
                     : null)
-            : (throw '''${json['documentation']} was not one of (string, MarkupContent)'''));
+            : (json['documentation'] == null
+                ? null
+                : (throw '''${json['documentation']} was not one of (String, MarkupContent)''')));
     return new ParameterInformation(label, documentation);
   }
 
-  /// The human-readable doc-comment of this parameter. Will
-  /// be shown in the UI but can be omitted.
+  /// The human-readable doc-comment of this parameter. Will be shown in the UI
+  /// but can be omitted.
   final Either2<String, MarkupContent> documentation;
 
-  /// The label of this parameter. Will be shown in the UI.
+  /// The label of this parameter information.
+  ///
+  /// Either a string or an inclusive start and exclusive end offsets within its
+  /// containing signature label. (see SignatureInformation.label). *Note*: A
+  /// label of type string must be a substring of its containing signature
+  /// label.
   final String label;
 
   Map<String, dynamic> toJson() {
@@ -3772,6 +5704,27 @@
         obj.containsKey('label') &&
         obj['label'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ParameterInformation) {
+      return label == other.label &&
+          documentation == other.documentation &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class Position implements ToJsonable {
@@ -3783,19 +5736,18 @@
       throw 'character is required but was not provided';
     }
   }
-  factory Position.fromJson(Map<String, dynamic> json) {
+  static Position fromJson(Map<String, dynamic> json) {
     final line = json['line'];
     final character = json['character'];
     return new Position(line, character);
   }
 
-  /// Character offset on a line in a document (zero-based).
-  /// Assuming that the line is represented as a string, the
-  /// `character` value represents the gap between the
-  /// `character` and `character + 1`.
+  /// Character offset on a line in a document (zero-based). Assuming that the
+  /// line is represented as a string, the `character` value represents the gap
+  /// between the `character` and `character + 1`.
   ///
-  /// If the character value is greater than the line length
-  /// it defaults back to the line length.
+  /// If the character value is greater than the line length it defaults back to
+  /// the line length.
   final num character;
 
   /// Line position in a document (zero-based).
@@ -3816,6 +5768,25 @@
         obj.containsKey('character') &&
         obj['character'] is num;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Position) {
+      return line == other.line && character == other.character && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, line.hashCode);
+    hash = JenkinsSmiHash.combine(hash, character.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class PublishDiagnosticsParams implements ToJsonable {
@@ -3827,10 +5798,10 @@
       throw 'diagnostics is required but was not provided';
     }
   }
-  factory PublishDiagnosticsParams.fromJson(Map<String, dynamic> json) {
+  static PublishDiagnosticsParams fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     final diagnostics = json['diagnostics']
-        ?.map((item) => item != null ? new Diagnostic.fromJson(item) : null)
+        ?.map((item) => item != null ? Diagnostic.fromJson(item) : null)
         ?.cast<Diagnostic>()
         ?.toList();
     return new PublishDiagnosticsParams(uri, diagnostics);
@@ -3856,9 +5827,30 @@
         obj['uri'] is String &&
         obj.containsKey('diagnostics') &&
         (obj['diagnostics'] is List &&
-            (obj['diagnostics'].length == 0 ||
-                obj['diagnostics'].every((item) => Diagnostic.canParse(item))));
+            (obj['diagnostics'].every((item) => Diagnostic.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is PublishDiagnosticsParams) {
+      return uri == other.uri &&
+          listEqual(diagnostics, other.diagnostics,
+              (Diagnostic a, Diagnostic b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, diagnostics.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class Range implements ToJsonable {
@@ -3870,10 +5862,10 @@
       throw 'end is required but was not provided';
     }
   }
-  factory Range.fromJson(Map<String, dynamic> json) {
+  static Range fromJson(Map<String, dynamic> json) {
     final start =
-        json['start'] != null ? new Position.fromJson(json['start']) : null;
-    final end = json['end'] != null ? new Position.fromJson(json['end']) : null;
+        json['start'] != null ? Position.fromJson(json['start']) : null;
+    final end = json['end'] != null ? Position.fromJson(json['end']) : null;
     return new Range(start, end);
   }
 
@@ -3897,6 +5889,25 @@
         obj.containsKey('end') &&
         Position.canParse(obj['end']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Range) {
+      return start == other.start && end == other.end && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, start.hashCode);
+    hash = JenkinsSmiHash.combine(hash, end.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ReferenceContext implements ToJsonable {
@@ -3905,7 +5916,7 @@
       throw 'includeDeclaration is required but was not provided';
     }
   }
-  factory ReferenceContext.fromJson(Map<String, dynamic> json) {
+  static ReferenceContext fromJson(Map<String, dynamic> json) {
     final includeDeclaration = json['includeDeclaration'];
     return new ReferenceContext(includeDeclaration);
   }
@@ -3925,6 +5936,24 @@
         obj.containsKey('includeDeclaration') &&
         obj['includeDeclaration'] is bool;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ReferenceContext) {
+      return includeDeclaration == other.includeDeclaration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, includeDeclaration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ReferenceParams implements TextDocumentPositionParams, ToJsonable {
@@ -3939,16 +5968,15 @@
       throw 'position is required but was not provided';
     }
   }
-  factory ReferenceParams.fromJson(Map<String, dynamic> json) {
+  static ReferenceParams fromJson(Map<String, dynamic> json) {
     final context = json['context'] != null
-        ? new ReferenceContext.fromJson(json['context'])
+        ? ReferenceContext.fromJson(json['context'])
         : null;
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final position = json['position'] != null
-        ? new Position.fromJson(json['position'])
-        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
     return new ReferenceParams(context, textDocument, position);
   }
 
@@ -3980,6 +6008,29 @@
         obj.containsKey('position') &&
         Position.canParse(obj['position']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ReferenceParams) {
+      return context == other.context &&
+          textDocument == other.textDocument &&
+          position == other.position &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, context.hashCode);
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// General parameters to register for a capability.
@@ -3992,15 +6043,15 @@
       throw 'method is required but was not provided';
     }
   }
-  factory Registration.fromJson(Map<String, dynamic> json) {
+  static Registration fromJson(Map<String, dynamic> json) {
     final id = json['id'];
     final method = json['method'];
     final registerOptions = json['registerOptions'];
     return new Registration(id, method, registerOptions);
   }
 
-  /// The id used to register the request. The id can be
-  /// used to deregister the request again.
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again.
   final String id;
 
   /// The method / capability to register for.
@@ -4026,6 +6077,29 @@
         obj.containsKey('method') &&
         obj['method'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Registration) {
+      return id == other.id &&
+          method == other.method &&
+          registerOptions == other.registerOptions &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, method.hashCode);
+    hash = JenkinsSmiHash.combine(hash, registerOptions.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class RegistrationParams implements ToJsonable {
@@ -4034,9 +6108,9 @@
       throw 'registrations is required but was not provided';
     }
   }
-  factory RegistrationParams.fromJson(Map<String, dynamic> json) {
+  static RegistrationParams fromJson(Map<String, dynamic> json) {
     final registrations = json['registrations']
-        ?.map((item) => item != null ? new Registration.fromJson(item) : null)
+        ?.map((item) => item != null ? Registration.fromJson(item) : null)
         ?.cast<Registration>()
         ?.toList();
     return new RegistrationParams(registrations);
@@ -4055,15 +6129,37 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('registrations') &&
         (obj['registrations'] is List &&
-            (obj['registrations'].length == 0 ||
-                obj['registrations']
-                    .every((item) => Registration.canParse(item))));
+            (obj['registrations']
+                .every((item) => Registration.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is RegistrationParams) {
+      return listEqual(registrations, other.registrations,
+              (Registration a, Registration b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, registrations.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Rename file operation
-class RenameFile implements FileOperation, ToJsonable {
-  RenameFile(this.oldUri, this.newUri, this.options) {
+class RenameFile implements ToJsonable {
+  RenameFile(this.kind, this.oldUri, this.newUri, this.options) {
+    if (kind == null) {
+      throw 'kind is required but was not provided';
+    }
     if (oldUri == null) {
       throw 'oldUri is required but was not provided';
     }
@@ -4071,15 +6167,19 @@
       throw 'newUri is required but was not provided';
     }
   }
-  factory RenameFile.fromJson(Map<String, dynamic> json) {
+  static RenameFile fromJson(Map<String, dynamic> json) {
+    final kind = json['kind'];
     final oldUri = json['oldUri'];
     final newUri = json['newUri'];
     final options = json['options'] != null
-        ? new RenameFileOptions.fromJson(json['options'])
+        ? RenameFileOptions.fromJson(json['options'])
         : null;
-    return new RenameFile(oldUri, newUri, options);
+    return new RenameFile(kind, oldUri, newUri, options);
   }
 
+  /// A rename
+  final String kind;
+
   /// The new location.
   final String newUri;
 
@@ -4091,6 +6191,7 @@
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
+    __result['kind'] = kind ?? (throw 'kind is required but was not set');
     __result['oldUri'] = oldUri ?? (throw 'oldUri is required but was not set');
     __result['newUri'] = newUri ?? (throw 'newUri is required but was not set');
     if (options != null) {
@@ -4101,17 +6202,44 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        obj.containsKey('kind') &&
+        obj['kind'] is String &&
         obj.containsKey('oldUri') &&
         obj['oldUri'] is String &&
         obj.containsKey('newUri') &&
         obj['newUri'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is RenameFile) {
+      return kind == other.kind &&
+          oldUri == other.oldUri &&
+          newUri == other.newUri &&
+          options == other.options &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, oldUri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, newUri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, options.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Rename file options
 class RenameFileOptions implements ToJsonable {
   RenameFileOptions(this.overwrite, this.ignoreIfExists);
-  factory RenameFileOptions.fromJson(Map<String, dynamic> json) {
+  static RenameFileOptions fromJson(Map<String, dynamic> json) {
     final overwrite = json['overwrite'];
     final ignoreIfExists = json['ignoreIfExists'];
     return new RenameFileOptions(overwrite, ignoreIfExists);
@@ -4120,8 +6248,7 @@
   /// Ignores if target exists.
   final bool ignoreIfExists;
 
-  /// Overwrite target if existing. Overwrite wins over
-  /// `ignoreIfExists`
+  /// Overwrite target if existing. Overwrite wins over `ignoreIfExists`
   final bool overwrite;
 
   Map<String, dynamic> toJson() {
@@ -4138,18 +6265,38 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is RenameFileOptions) {
+      return overwrite == other.overwrite &&
+          ignoreIfExists == other.ignoreIfExists &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, overwrite.hashCode);
+    hash = JenkinsSmiHash.combine(hash, ignoreIfExists.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Rename options
 class RenameOptions implements ToJsonable {
   RenameOptions(this.prepareProvider);
-  factory RenameOptions.fromJson(Map<String, dynamic> json) {
+  static RenameOptions fromJson(Map<String, dynamic> json) {
     final prepareProvider = json['prepareProvider'];
     return new RenameOptions(prepareProvider);
   }
 
-  /// Renames should be checked and tested before being
-  /// executed.
+  /// Renames should be checked and tested before being executed.
   final bool prepareProvider;
 
   Map<String, dynamic> toJson() {
@@ -4163,6 +6310,24 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is RenameOptions) {
+      return prepareProvider == other.prepareProvider && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, prepareProvider.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class RenameParams implements ToJsonable {
@@ -4177,20 +6342,18 @@
       throw 'newName is required but was not provided';
     }
   }
-  factory RenameParams.fromJson(Map<String, dynamic> json) {
+  static RenameParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final position = json['position'] != null
-        ? new Position.fromJson(json['position'])
-        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
     final newName = json['newName'];
     return new RenameParams(textDocument, position, newName);
   }
 
-  /// The new name of the symbol. If the given name is not
-  /// valid the request must return a [ResponseError] with
-  /// an appropriate message set.
+  /// The new name of the symbol. If the given name is not valid the request
+  /// must return a [ResponseError] with an appropriate message set.
   final String newName;
 
   /// The position at which this request was sent.
@@ -4219,27 +6382,48 @@
         obj.containsKey('newName') &&
         obj['newName'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is RenameParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          newName == other.newName &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    hash = JenkinsSmiHash.combine(hash, newName.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class RenameRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
   RenameRegistrationOptions(this.prepareProvider, this.documentSelector);
-  factory RenameRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static RenameRegistrationOptions fromJson(Map<String, dynamic> json) {
     final prepareProvider = json['prepareProvider'];
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new RenameRegistrationOptions(prepareProvider, documentSelector);
   }
 
-  /// A document selector to identify the scope of the
-  /// registration. If set to null the document selector
-  /// provided on the client side will be used.
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
-  /// Renames should be checked and tested for validity
-  /// before being executed.
+  /// Renames should be checked and tested for validity before being executed.
   final bool prepareProvider;
 
   Map<String, dynamic> toJson() {
@@ -4255,13 +6439,33 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is RenameRegistrationOptions) {
+      return prepareProvider == other.prepareProvider &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, prepareProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-class RequestMessage implements Message, ToJsonable {
+class RequestMessage implements Message, IncomingMessage, ToJsonable {
   RequestMessage(this.id, this.method, this.params, this.jsonrpc) {
     if (id == null) {
       throw 'id is required but was not provided';
@@ -4273,19 +6477,15 @@
       throw 'jsonrpc is required but was not provided';
     }
   }
-  factory RequestMessage.fromJson(Map<String, dynamic> json) {
+  static RequestMessage fromJson(Map<String, dynamic> json) {
     final id = json['id'] is num
         ? new Either2<num, String>.t1(json['id'])
         : (json['id'] is String
             ? new Either2<num, String>.t2(json['id'])
-            : (throw '''${json['id']} was not one of (number, string)'''));
-    final method = json['method'];
-    final params = (json['params'] is List &&
-            (json['params'].length == 0 ||
-                json['params'].every((item) => true)))
-        ? new Either2<List<dynamic>, dynamic>.t1(
-            json['params']?.map((item) => item)?.cast<dynamic>()?.toList())
-        : (new Either2<List<dynamic>, dynamic>.t2(json['params']));
+            : (throw '''${json['id']} was not one of (num, String)'''));
+    final method =
+        json['method'] != null ? Method.fromJson(json['method']) : null;
+    final params = json['params'];
     final jsonrpc = json['jsonrpc'];
     return new RequestMessage(id, method, params, jsonrpc);
   }
@@ -4295,10 +6495,10 @@
   final String jsonrpc;
 
   /// The method to be invoked.
-  final String method;
+  final Method method;
 
   /// The method's params.
-  final Either2<List<dynamic>, dynamic> params;
+  final dynamic params;
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
@@ -4317,17 +6517,42 @@
         obj.containsKey('id') &&
         (obj['id'] is num || obj['id'] is String) &&
         obj.containsKey('method') &&
-        obj['method'] is String &&
+        Method.canParse(obj['method']) &&
         obj.containsKey('jsonrpc') &&
         obj['jsonrpc'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is RequestMessage) {
+      return id == other.id &&
+          method == other.method &&
+          params == other.params &&
+          jsonrpc == other.jsonrpc &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, method.hashCode);
+    hash = JenkinsSmiHash.combine(hash, params.hashCode);
+    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ResourceOperationKind {
   const ResourceOperationKind._(this._value);
   const ResourceOperationKind.fromJson(this._value);
 
-  final Object _value;
+  final String _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -4368,19 +6593,19 @@
       throw 'message is required but was not provided';
     }
   }
-  factory ResponseError.fromJson(Map<String, dynamic> json) {
-    final code = json['code'];
+  static ResponseError<D> fromJson<D>(Map<String, dynamic> json) {
+    final code =
+        json['code'] != null ? ErrorCodes.fromJson(json['code']) : null;
     final message = json['message'];
     final data = json['data'];
     return new ResponseError<D>(code, message, data);
   }
 
   /// A number indicating the error type that occurred.
-  final num code;
+  final ErrorCodes code;
 
-  /// A Primitive or Structured value that contains
-  /// additional information about the error. Can be
-  /// omitted.
+  /// A Primitive or Structured value that contains additional information about
+  /// the error. Can be omitted.
   final D data;
 
   /// A string providing a short description of the error.
@@ -4400,10 +6625,33 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('code') &&
-        obj['code'] is num &&
+        ErrorCodes.canParse(obj['code']) &&
         obj.containsKey('message') &&
         obj['message'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ResponseError) {
+      return code == other.code &&
+          message == other.message &&
+          data == other.data &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, code.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, data.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ResponseMessage implements Message, ToJsonable {
@@ -4412,14 +6660,18 @@
       throw 'jsonrpc is required but was not provided';
     }
   }
-  factory ResponseMessage.fromJson(Map<String, dynamic> json) {
+  static ResponseMessage fromJson(Map<String, dynamic> json) {
     final id = json['id'] is num
         ? new Either2<num, String>.t1(json['id'])
         : (json['id'] is String
             ? new Either2<num, String>.t2(json['id'])
-            : (throw '''${json['id']} was not one of (number, string)'''));
+            : (json['id'] == null
+                ? null
+                : (throw '''${json['id']} was not one of (num, String)''')));
     final result = json['result'];
-    final error = json['error'];
+    final error = json['error'] != null
+        ? ResponseError.fromJson<dynamic>(json['error'])
+        : null;
     final jsonrpc = json['jsonrpc'];
     return new ResponseMessage(id, result, error, jsonrpc);
   }
@@ -4431,8 +6683,7 @@
   final Either2<num, String> id;
   final String jsonrpc;
 
-  /// The result of a request. This can be omitted in the
-  /// case of an error.
+  /// The result of a request. This can be omitted in the case of an error.
   final dynamic result;
 
   Map<String, dynamic> toJson() {
@@ -4456,18 +6707,42 @@
         obj.containsKey('jsonrpc') &&
         obj['jsonrpc'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ResponseMessage) {
+      return id == other.id &&
+          result == other.result &&
+          error == other.error &&
+          jsonrpc == other.jsonrpc &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, result.hashCode);
+    hash = JenkinsSmiHash.combine(hash, error.hashCode);
+    hash = JenkinsSmiHash.combine(hash, jsonrpc.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Save options.
 class SaveOptions implements ToJsonable {
   SaveOptions(this.includeText);
-  factory SaveOptions.fromJson(Map<String, dynamic> json) {
+  static SaveOptions fromJson(Map<String, dynamic> json) {
     final includeText = json['includeText'];
     return new SaveOptions(includeText);
   }
 
-  /// The client is supposed to include the content on
-  /// save.
+  /// The client is supposed to include the content on save.
   final bool includeText;
 
   Map<String, dynamic> toJson() {
@@ -4481,6 +6756,24 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is SaveOptions) {
+      return includeText == other.includeText && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, includeText.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ServerCapabilities implements ToJsonable {
@@ -4490,6 +6783,8 @@
       this.completionProvider,
       this.signatureHelpProvider,
       this.definitionProvider,
+      this.typeDefinitionProvider,
+      this.implementationProvider,
       this.referencesProvider,
       this.documentHighlightProvider,
       this.documentSymbolProvider,
@@ -4501,28 +6796,38 @@
       this.documentOnTypeFormattingProvider,
       this.renameProvider,
       this.documentLinkProvider,
+      this.colorProvider,
+      this.foldingRangeProvider,
       this.executeCommandProvider,
-      this.supported,
-      this.changeNotifications);
-  factory ServerCapabilities.fromJson(Map<String, dynamic> json) {
+      this.workspace,
+      this.experimental);
+  static ServerCapabilities fromJson(Map<String, dynamic> json) {
     final textDocumentSync = TextDocumentSyncOptions.canParse(
             json['textDocumentSync'])
         ? new Either2<TextDocumentSyncOptions, num>.t1(
             json['textDocumentSync'] != null
-                ? new TextDocumentSyncOptions.fromJson(json['textDocumentSync'])
+                ? TextDocumentSyncOptions.fromJson(json['textDocumentSync'])
                 : null)
         : (json['textDocumentSync'] is num
             ? new Either2<TextDocumentSyncOptions, num>.t2(
                 json['textDocumentSync'])
-            : (throw '''${json['textDocumentSync']} was not one of (TextDocumentSyncOptions, number)'''));
+            : (json['textDocumentSync'] == null
+                ? null
+                : (throw '''${json['textDocumentSync']} was not one of (TextDocumentSyncOptions, num)''')));
     final hoverProvider = json['hoverProvider'];
     final completionProvider = json['completionProvider'] != null
-        ? new CompletionOptions.fromJson(json['completionProvider'])
+        ? CompletionOptions.fromJson(json['completionProvider'])
         : null;
     final signatureHelpProvider = json['signatureHelpProvider'] != null
-        ? new SignatureHelpOptions.fromJson(json['signatureHelpProvider'])
+        ? SignatureHelpOptions.fromJson(json['signatureHelpProvider'])
         : null;
     final definitionProvider = json['definitionProvider'];
+    final typeDefinitionProvider = json['typeDefinitionProvider'] is bool
+        ? new Either2<bool, dynamic>.t1(json['typeDefinitionProvider'])
+        : (new Either2<bool, dynamic>.t2(json['typeDefinitionProvider']));
+    final implementationProvider = json['implementationProvider'] is bool
+        ? new Either2<bool, dynamic>.t1(json['implementationProvider'])
+        : (new Either2<bool, dynamic>.t2(json['implementationProvider']));
     final referencesProvider = json['referencesProvider'];
     final documentHighlightProvider = json['documentHighlightProvider'];
     final documentSymbolProvider = json['documentSymbolProvider'];
@@ -4532,45 +6837,70 @@
         : (CodeActionOptions.canParse(json['codeActionProvider'])
             ? new Either2<bool, CodeActionOptions>.t2(
                 json['codeActionProvider'] != null
-                    ? new CodeActionOptions.fromJson(json['codeActionProvider'])
+                    ? CodeActionOptions.fromJson(json['codeActionProvider'])
                     : null)
-            : (throw '''${json['codeActionProvider']} was not one of (boolean, CodeActionOptions)'''));
+            : (json['codeActionProvider'] == null
+                ? null
+                : (throw '''${json['codeActionProvider']} was not one of (bool, CodeActionOptions)''')));
     final codeLensProvider = json['codeLensProvider'] != null
-        ? new CodeLensOptions.fromJson(json['codeLensProvider'])
+        ? CodeLensOptions.fromJson(json['codeLensProvider'])
         : null;
     final documentFormattingProvider = json['documentFormattingProvider'];
     final documentRangeFormattingProvider =
         json['documentRangeFormattingProvider'];
     final documentOnTypeFormattingProvider =
         json['documentOnTypeFormattingProvider'] != null
-            ? new DocumentOnTypeFormattingOptions.fromJson(
+            ? DocumentOnTypeFormattingOptions.fromJson(
                 json['documentOnTypeFormattingProvider'])
             : null;
     final renameProvider = json['renameProvider'] is bool
         ? new Either2<bool, RenameOptions>.t1(json['renameProvider'])
         : (RenameOptions.canParse(json['renameProvider'])
             ? new Either2<bool, RenameOptions>.t2(json['renameProvider'] != null
-                ? new RenameOptions.fromJson(json['renameProvider'])
+                ? RenameOptions.fromJson(json['renameProvider'])
                 : null)
-            : (throw '''${json['renameProvider']} was not one of (boolean, RenameOptions)'''));
+            : (json['renameProvider'] == null
+                ? null
+                : (throw '''${json['renameProvider']} was not one of (bool, RenameOptions)''')));
     final documentLinkProvider = json['documentLinkProvider'] != null
-        ? new DocumentLinkOptions.fromJson(json['documentLinkProvider'])
+        ? DocumentLinkOptions.fromJson(json['documentLinkProvider'])
         : null;
+    final colorProvider = json['colorProvider'] is bool
+        ? new Either3<bool, ColorProviderOptions, dynamic>.t1(
+            json['colorProvider'])
+        : (ColorProviderOptions.canParse(json['colorProvider'])
+            ? new Either3<bool, ColorProviderOptions, dynamic>.t2(
+                json['colorProvider'] != null
+                    ? ColorProviderOptions.fromJson(json['colorProvider'])
+                    : null)
+            : (new Either3<bool, ColorProviderOptions, dynamic>.t3(
+                json['colorProvider'])));
+    final foldingRangeProvider = json['foldingRangeProvider'] is bool
+        ? new Either3<bool, FoldingRangeProviderOptions, dynamic>.t1(
+            json['foldingRangeProvider'])
+        : (FoldingRangeProviderOptions.canParse(json['foldingRangeProvider'])
+            ? new Either3<bool, FoldingRangeProviderOptions, dynamic>.t2(
+                json['foldingRangeProvider'] != null
+                    ? FoldingRangeProviderOptions.fromJson(
+                        json['foldingRangeProvider'])
+                    : null)
+            : (new Either3<bool, FoldingRangeProviderOptions, dynamic>.t3(
+                json['foldingRangeProvider'])));
     final executeCommandProvider = json['executeCommandProvider'] != null
-        ? new ExecuteCommandOptions.fromJson(json['executeCommandProvider'])
+        ? ExecuteCommandOptions.fromJson(json['executeCommandProvider'])
         : null;
-    final supported = json['supported'];
-    final changeNotifications = json['changeNotifications'] is String
-        ? new Either2<String, bool>.t1(json['changeNotifications'])
-        : (json['changeNotifications'] is bool
-            ? new Either2<String, bool>.t2(json['changeNotifications'])
-            : (throw '''${json['changeNotifications']} was not one of (string, boolean)'''));
+    final workspace = json['workspace'] != null
+        ? ServerCapabilitiesWorkspace.fromJson(json['workspace'])
+        : null;
+    final experimental = json['experimental'];
     return new ServerCapabilities(
         textDocumentSync,
         hoverProvider,
         completionProvider,
         signatureHelpProvider,
         definitionProvider,
+        typeDefinitionProvider,
+        implementationProvider,
         referencesProvider,
         documentHighlightProvider,
         documentSymbolProvider,
@@ -4582,31 +6912,26 @@
         documentOnTypeFormattingProvider,
         renameProvider,
         documentLinkProvider,
+        colorProvider,
+        foldingRangeProvider,
         executeCommandProvider,
-        supported,
-        changeNotifications);
+        workspace,
+        experimental);
   }
 
-  /// Whether the server wants to receive workspace folder
-  /// change notifications.
-  ///
-  /// If a strings is provided the string is treated as a
-  /// ID under which the notification is registered on the
-  /// client side. The ID can be used to unregister for
-  /// these events using the `client/unregisterCapability`
-  /// request.
-  final Either2<String, bool> changeNotifications;
-
-  /// The server provides code actions. The
-  /// `CodeActionOptions` return type is only valid if the
-  /// client signals code action literal support via the
-  /// property
-  /// `textDocument.codeAction.codeActionLiteralSupport`.
+  /// The server provides code actions. The `CodeActionOptions` return type is
+  /// only valid if the client signals code action literal support via the
+  /// property `textDocument.codeAction.codeActionLiteralSupport`.
   final Either2<bool, CodeActionOptions> codeActionProvider;
 
   /// The server provides code lens.
   final CodeLensOptions codeLensProvider;
 
+  /// The server provides color provider support.
+  ///
+  /// Since 3.6.0
+  final Either3<bool, ColorProviderOptions, dynamic> colorProvider;
+
   /// The server provides completion support.
   final CompletionOptions completionProvider;
 
@@ -4634,31 +6959,48 @@
   /// The server provides execute command support.
   final ExecuteCommandOptions executeCommandProvider;
 
+  /// Experimental server capabilities.
+  final dynamic experimental;
+
+  /// The server provides folding provider support.
+  ///
+  /// Since 3.10.0
+  final Either3<bool, FoldingRangeProviderOptions, dynamic>
+      foldingRangeProvider;
+
   /// The server provides hover support.
   final bool hoverProvider;
 
+  /// The server provides Goto Implementation support.
+  ///
+  /// Since 3.6.0
+  final Either2<bool, dynamic> implementationProvider;
+
   /// The server provides find references support.
   final bool referencesProvider;
 
-  /// The server provides rename support. RenameOptions
-  /// may only be specified if the client states that it
-  /// supports `prepareSupport` in its initial
+  /// The server provides rename support. RenameOptions may only be specified if
+  /// the client states that it supports `prepareSupport` in its initial
   /// `initialize` request.
   final Either2<bool, RenameOptions> renameProvider;
 
   /// The server provides signature help support.
   final SignatureHelpOptions signatureHelpProvider;
 
-  /// The server has support for workspace folders
-  final bool supported;
-
-  /// Defines how text documents are synced. Is either a
-  /// detailed structure defining each notification or for
-  /// backwards compatibility the TextDocumentSyncKind
-  /// number. If omitted it defaults to
+  /// Defines how text documents are synced. Is either a detailed structure
+  /// defining each notification or for backwards compatibility the
+  /// TextDocumentSyncKind number. If omitted it defaults to
   /// `TextDocumentSyncKind.None`.
   final Either2<TextDocumentSyncOptions, num> textDocumentSync;
 
+  /// The server provides Goto Type Definition support.
+  ///
+  /// Since 3.6.0
+  final Either2<bool, dynamic> typeDefinitionProvider;
+
+  /// Workspace specific server capabilities
+  final ServerCapabilitiesWorkspace workspace;
+
   /// The server provides workspace symbol support.
   final bool workspaceSymbolProvider;
 
@@ -4679,6 +7021,12 @@
     if (definitionProvider != null) {
       __result['definitionProvider'] = definitionProvider;
     }
+    if (typeDefinitionProvider != null) {
+      __result['typeDefinitionProvider'] = typeDefinitionProvider;
+    }
+    if (implementationProvider != null) {
+      __result['implementationProvider'] = implementationProvider;
+    }
     if (referencesProvider != null) {
       __result['referencesProvider'] = referencesProvider;
     }
@@ -4714,9 +7062,170 @@
     if (documentLinkProvider != null) {
       __result['documentLinkProvider'] = documentLinkProvider;
     }
+    if (colorProvider != null) {
+      __result['colorProvider'] = colorProvider;
+    }
+    if (foldingRangeProvider != null) {
+      __result['foldingRangeProvider'] = foldingRangeProvider;
+    }
     if (executeCommandProvider != null) {
       __result['executeCommandProvider'] = executeCommandProvider;
     }
+    if (workspace != null) {
+      __result['workspace'] = workspace;
+    }
+    if (experimental != null) {
+      __result['experimental'] = experimental;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is ServerCapabilities) {
+      return textDocumentSync == other.textDocumentSync &&
+          hoverProvider == other.hoverProvider &&
+          completionProvider == other.completionProvider &&
+          signatureHelpProvider == other.signatureHelpProvider &&
+          definitionProvider == other.definitionProvider &&
+          typeDefinitionProvider == other.typeDefinitionProvider &&
+          implementationProvider == other.implementationProvider &&
+          referencesProvider == other.referencesProvider &&
+          documentHighlightProvider == other.documentHighlightProvider &&
+          documentSymbolProvider == other.documentSymbolProvider &&
+          workspaceSymbolProvider == other.workspaceSymbolProvider &&
+          codeActionProvider == other.codeActionProvider &&
+          codeLensProvider == other.codeLensProvider &&
+          documentFormattingProvider == other.documentFormattingProvider &&
+          documentRangeFormattingProvider ==
+              other.documentRangeFormattingProvider &&
+          documentOnTypeFormattingProvider ==
+              other.documentOnTypeFormattingProvider &&
+          renameProvider == other.renameProvider &&
+          documentLinkProvider == other.documentLinkProvider &&
+          colorProvider == other.colorProvider &&
+          foldingRangeProvider == other.foldingRangeProvider &&
+          executeCommandProvider == other.executeCommandProvider &&
+          workspace == other.workspace &&
+          experimental == other.experimental &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocumentSync.hashCode);
+    hash = JenkinsSmiHash.combine(hash, hoverProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, completionProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, signatureHelpProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, definitionProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, typeDefinitionProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, implementationProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, referencesProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentHighlightProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSymbolProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspaceSymbolProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, codeActionProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, codeLensProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentFormattingProvider.hashCode);
+    hash =
+        JenkinsSmiHash.combine(hash, documentRangeFormattingProvider.hashCode);
+    hash =
+        JenkinsSmiHash.combine(hash, documentOnTypeFormattingProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, renameProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentLinkProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, colorProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, foldingRangeProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, executeCommandProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspace.hashCode);
+    hash = JenkinsSmiHash.combine(hash, experimental.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ServerCapabilitiesWorkspace implements ToJsonable {
+  ServerCapabilitiesWorkspace(this.workspaceFolders);
+  static ServerCapabilitiesWorkspace fromJson(Map<String, dynamic> json) {
+    final workspaceFolders = json['workspaceFolders'] != null
+        ? ServerCapabilitiesWorkspaceFolders.fromJson(json['workspaceFolders'])
+        : null;
+    return new ServerCapabilitiesWorkspace(workspaceFolders);
+  }
+
+  /// The server supports workspace folder.
+  ///
+  /// Since 3.6.0
+  final ServerCapabilitiesWorkspaceFolders workspaceFolders;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (workspaceFolders != null) {
+      __result['workspaceFolders'] = workspaceFolders;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is ServerCapabilitiesWorkspace) {
+      return workspaceFolders == other.workspaceFolders && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, workspaceFolders.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class ServerCapabilitiesWorkspaceFolders implements ToJsonable {
+  ServerCapabilitiesWorkspaceFolders(this.supported, this.changeNotifications);
+  static ServerCapabilitiesWorkspaceFolders fromJson(
+      Map<String, dynamic> json) {
+    final supported = json['supported'];
+    final changeNotifications = json['changeNotifications'] is String
+        ? new Either2<String, bool>.t1(json['changeNotifications'])
+        : (json['changeNotifications'] is bool
+            ? new Either2<String, bool>.t2(json['changeNotifications'])
+            : (json['changeNotifications'] == null
+                ? null
+                : (throw '''${json['changeNotifications']} was not one of (String, bool)''')));
+    return new ServerCapabilitiesWorkspaceFolders(
+        supported, changeNotifications);
+  }
+
+  /// Whether the server wants to receive workspace folder change notifications.
+  ///
+  /// If a strings is provided the string is treated as a ID under which the
+  /// notification is registered on the client side. The ID can be used to
+  /// unregister for these events using the `client/unregisterCapability`
+  /// request.
+  final Either2<String, bool> changeNotifications;
+
+  /// The server has support for workspace folders
+  final bool supported;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
     if (supported != null) {
       __result['supported'] = supported;
     }
@@ -4729,6 +7238,27 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ServerCapabilitiesWorkspaceFolders) {
+      return supported == other.supported &&
+          changeNotifications == other.changeNotifications &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, supported.hashCode);
+    hash = JenkinsSmiHash.combine(hash, changeNotifications.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ShowMessageParams implements ToJsonable {
@@ -4740,9 +7270,9 @@
       throw 'message is required but was not provided';
     }
   }
-  factory ShowMessageParams.fromJson(Map<String, dynamic> json) {
+  static ShowMessageParams fromJson(Map<String, dynamic> json) {
     final type =
-        json['type'] != null ? new MessageType.fromJson(json['type']) : null;
+        json['type'] != null ? MessageType.fromJson(json['type']) : null;
     final message = json['message'];
     return new ShowMessageParams(type, message);
   }
@@ -4768,6 +7298,25 @@
         obj.containsKey('message') &&
         obj['message'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ShowMessageParams) {
+      return type == other.type && message == other.message && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class ShowMessageRequestParams implements ToJsonable {
@@ -4779,13 +7328,12 @@
       throw 'message is required but was not provided';
     }
   }
-  factory ShowMessageRequestParams.fromJson(Map<String, dynamic> json) {
+  static ShowMessageRequestParams fromJson(Map<String, dynamic> json) {
     final type =
-        json['type'] != null ? new MessageType.fromJson(json['type']) : null;
+        json['type'] != null ? MessageType.fromJson(json['type']) : null;
     final message = json['message'];
     final actions = json['actions']
-        ?.map((item) =>
-            item != null ? new MessageActionItem.fromJson(item) : null)
+        ?.map((item) => item != null ? MessageActionItem.fromJson(item) : null)
         ?.cast<MessageActionItem>()
         ?.toList();
     return new ShowMessageRequestParams(type, message, actions);
@@ -4818,21 +7366,44 @@
         obj.containsKey('message') &&
         obj['message'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is ShowMessageRequestParams) {
+      return type == other.type &&
+          message == other.message &&
+          listEqual(actions, other.actions,
+              (MessageActionItem a, MessageActionItem b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, message.hashCode);
+    hash = JenkinsSmiHash.combine(hash, actions.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Signature help represents the signature of something
-/// callable. There can be multiple signature but only one
-/// active and only one active parameter.
+/// Signature help represents the signature of something callable. There can be
+/// multiple signature but only one active and only one active parameter.
 class SignatureHelp implements ToJsonable {
   SignatureHelp(this.signatures, this.activeSignature, this.activeParameter) {
     if (signatures == null) {
       throw 'signatures is required but was not provided';
     }
   }
-  factory SignatureHelp.fromJson(Map<String, dynamic> json) {
+  static SignatureHelp fromJson(Map<String, dynamic> json) {
     final signatures = json['signatures']
-        ?.map((item) =>
-            item != null ? new SignatureInformation.fromJson(item) : null)
+        ?.map(
+            (item) => item != null ? SignatureInformation.fromJson(item) : null)
         ?.cast<SignatureInformation>()
         ?.toList();
     final activeSignature = json['activeSignature'];
@@ -4840,24 +7411,20 @@
     return new SignatureHelp(signatures, activeSignature, activeParameter);
   }
 
-  /// The active parameter of the active signature. If
-  /// omitted or the value lies outside the range of
-  /// `signatures[activeSignature].parameters` defaults to
-  /// 0 if the active signature has parameters. If the
-  /// active signature has no parameters it is ignored. In
-  /// future version of the protocol this property might
-  /// become mandatory to better express the active
-  /// parameter if the active signature does have any.
+  /// The active parameter of the active signature. If omitted or the value lies
+  /// outside the range of `signatures[activeSignature].parameters` defaults to
+  /// 0 if the active signature has parameters. If the active signature has no
+  /// parameters it is ignored. In future version of the protocol this property
+  /// might become mandatory to better express the active parameter if the
+  /// active signature does have any.
   final num activeParameter;
 
-  /// The active signature. If omitted or the value lies
-  /// outside the range of `signatures` the value defaults
-  /// to zero or is ignored if `signatures.length === 0`.
-  /// Whenever possible implementors should make an active
-  /// decision about the active signature and shouldn't
-  /// rely on a default value. In future version of the
-  /// protocol this property might become mandatory to
-  /// better express this.
+  /// The active signature. If omitted or the value lies outside the range of
+  /// `signatures` the value defaults to zero or is ignored if
+  /// `signatures.length === 0`. Whenever possible implementors should make an
+  /// active decision about the active signature and shouldn't rely on a default
+  /// value. In future version of the protocol this property might become
+  /// mandatory to better express this.
   final num activeSignature;
 
   /// One or more signatures.
@@ -4880,16 +7447,39 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('signatures') &&
         (obj['signatures'] is List &&
-            (obj['signatures'].length == 0 ||
-                obj['signatures']
-                    .every((item) => SignatureInformation.canParse(item))));
+            (obj['signatures']
+                .every((item) => SignatureInformation.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is SignatureHelp) {
+      return listEqual(signatures, other.signatures,
+              (SignatureInformation a, SignatureInformation b) => a == b) &&
+          activeSignature == other.activeSignature &&
+          activeParameter == other.activeParameter &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, signatures.hashCode);
+    hash = JenkinsSmiHash.combine(hash, activeSignature.hashCode);
+    hash = JenkinsSmiHash.combine(hash, activeParameter.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Signature help options.
 class SignatureHelpOptions implements ToJsonable {
   SignatureHelpOptions(this.triggerCharacters);
-  factory SignatureHelpOptions.fromJson(Map<String, dynamic> json) {
+  static SignatureHelpOptions fromJson(Map<String, dynamic> json) {
     final triggerCharacters = json['triggerCharacters']
         ?.map((item) => item)
         ?.cast<String>()
@@ -4897,8 +7487,7 @@
     return new SignatureHelpOptions(triggerCharacters);
   }
 
-  /// The characters that trigger signature help
-  /// automatically.
+  /// The characters that trigger signature help automatically.
   final List<String> triggerCharacters;
 
   Map<String, dynamic> toJson() {
@@ -4912,32 +7501,50 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is SignatureHelpOptions) {
+      return listEqual(triggerCharacters, other.triggerCharacters,
+              (String a, String b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, triggerCharacters.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class SignatureHelpRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
   SignatureHelpRegistrationOptions(
       this.triggerCharacters, this.documentSelector);
-  factory SignatureHelpRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static SignatureHelpRegistrationOptions fromJson(Map<String, dynamic> json) {
     final triggerCharacters = json['triggerCharacters']
         ?.map((item) => item)
         ?.cast<String>()
         ?.toList();
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new SignatureHelpRegistrationOptions(
         triggerCharacters, documentSelector);
   }
 
-  /// A document selector to identify the scope of the
-  /// registration. If set to null the document selector
-  /// provided on the client side will be used.
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
-  /// The characters that trigger signature help
-  /// automatically.
+  /// The characters that trigger signature help automatically.
   final List<String> triggerCharacters;
 
   Map<String, dynamic> toJson() {
@@ -4953,45 +7560,66 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is SignatureHelpRegistrationOptions) {
+      return listEqual(triggerCharacters, other.triggerCharacters,
+              (String a, String b) => a == b) &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, triggerCharacters.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Represents the signature of something callable. A
-/// signature can have a label, like a function-name, a
-/// doc-comment, and a set of parameters.
+/// Represents the signature of something callable. A signature can have a
+/// label, like a function-name, a doc-comment, and a set of parameters.
 class SignatureInformation implements ToJsonable {
   SignatureInformation(this.label, this.documentation, this.parameters) {
     if (label == null) {
       throw 'label is required but was not provided';
     }
   }
-  factory SignatureInformation.fromJson(Map<String, dynamic> json) {
+  static SignatureInformation fromJson(Map<String, dynamic> json) {
     final label = json['label'];
     final documentation = json['documentation'] is String
         ? new Either2<String, MarkupContent>.t1(json['documentation'])
         : (MarkupContent.canParse(json['documentation'])
             ? new Either2<String, MarkupContent>.t2(
                 json['documentation'] != null
-                    ? new MarkupContent.fromJson(json['documentation'])
+                    ? MarkupContent.fromJson(json['documentation'])
                     : null)
-            : (throw '''${json['documentation']} was not one of (string, MarkupContent)'''));
+            : (json['documentation'] == null
+                ? null
+                : (throw '''${json['documentation']} was not one of (String, MarkupContent)''')));
     final parameters = json['parameters']
-        ?.map((item) =>
-            item != null ? new ParameterInformation.fromJson(item) : null)
+        ?.map(
+            (item) => item != null ? ParameterInformation.fromJson(item) : null)
         ?.cast<ParameterInformation>()
         ?.toList();
     return new SignatureInformation(label, documentation, parameters);
   }
 
-  /// The human-readable doc-comment of this signature.
-  /// Will be shown in the UI but can be omitted.
+  /// The human-readable doc-comment of this signature. Will be shown in the UI
+  /// but can be omitted.
   final Either2<String, MarkupContent> documentation;
 
-  /// The label of this signature. Will be shown in the
-  /// UI.
+  /// The label of this signature. Will be shown in the UI.
   final String label;
 
   /// The parameters of this signature.
@@ -5014,20 +7642,42 @@
         obj.containsKey('label') &&
         obj['label'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is SignatureInformation) {
+      return label == other.label &&
+          documentation == other.documentation &&
+          listEqual(parameters, other.parameters,
+              (ParameterInformation a, ParameterInformation b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, label.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentation.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameters.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Static registration options to be returned in the
-/// initialize request.
+/// Static registration options to be returned in the initialize request.
 class StaticRegistrationOptions implements ToJsonable {
   StaticRegistrationOptions(this.id);
-  factory StaticRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static StaticRegistrationOptions fromJson(Map<String, dynamic> json) {
     final id = json['id'];
     return new StaticRegistrationOptions(id);
   }
 
-  /// The id used to register the request. The id can be
-  /// used to deregister the request again. See also
-  /// Registration#id.
+  /// The id used to register the request. The id can be used to deregister the
+  /// request again. See also Registration#id.
   final String id;
 
   Map<String, dynamic> toJson() {
@@ -5041,10 +7691,28 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is StaticRegistrationOptions) {
+      return id == other.id && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Represents information about programming constructs
-/// like variables, classes, interfaces etc.
+/// Represents information about programming constructs like variables, classes,
+/// interfaces etc.
 class SymbolInformation implements ToJsonable {
   SymbolInformation(this.name, this.kind, this.deprecated, this.location,
       this.containerName) {
@@ -5058,43 +7726,39 @@
       throw 'location is required but was not provided';
     }
   }
-  factory SymbolInformation.fromJson(Map<String, dynamic> json) {
+  static SymbolInformation fromJson(Map<String, dynamic> json) {
     final name = json['name'];
-    final kind = json['kind'];
+    final kind =
+        json['kind'] != null ? SymbolKind.fromJson(json['kind']) : null;
     final deprecated = json['deprecated'];
-    final location = json['location'] != null
-        ? new Location.fromJson(json['location'])
-        : null;
+    final location =
+        json['location'] != null ? Location.fromJson(json['location']) : null;
     final containerName = json['containerName'];
     return new SymbolInformation(
         name, kind, deprecated, location, containerName);
   }
 
-  /// The name of the symbol containing this symbol. This
-  /// information is for user interface purposes (e.g. to
-  /// render a qualifier in the user interface if
-  /// necessary). It can't be used to re-infer a hierarchy
-  /// for the document symbols.
+  /// The name of the symbol containing this symbol. This information is for
+  /// user interface purposes (e.g. to render a qualifier in the user interface
+  /// if necessary). It can't be used to re-infer a hierarchy for the document
+  /// symbols.
   final String containerName;
 
   /// Indicates if this symbol is deprecated.
   final bool deprecated;
 
   /// The kind of this symbol.
-  final num kind;
+  final SymbolKind kind;
 
-  /// The location of this symbol. The location's range is
-  /// used by a tool to reveal the location in the editor.
-  /// If the symbol is selected in the tool the range's
-  /// start information is used to position the cursor. So
-  /// the range usually spans more then the actual
-  /// symbol's name and does normally include things like
-  /// visibility modifiers.
+  /// The location of this symbol. The location's range is used by a tool to
+  /// reveal the location in the editor. If the symbol is selected in the tool
+  /// the range's start information is used to position the cursor. So the range
+  /// usually spans more then the actual symbol's name and does normally include
+  /// things like visibility modifiers.
   ///
-  /// The range doesn't have to denote a node range in the
-  /// sense of a abstract syntax tree. It can therefore
-  /// not be used to re-construct a hierarchy of the
-  /// symbols.
+  /// The range doesn't have to denote a node range in the sense of a abstract
+  /// syntax tree. It can therefore not be used to re-construct a hierarchy of
+  /// the symbols.
   final Location location;
 
   /// The name of this symbol.
@@ -5120,10 +7784,37 @@
         obj.containsKey('name') &&
         obj['name'] is String &&
         obj.containsKey('kind') &&
-        obj['kind'] is num &&
+        SymbolKind.canParse(obj['kind']) &&
         obj.containsKey('location') &&
         Location.canParse(obj['location']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is SymbolInformation) {
+      return name == other.name &&
+          kind == other.kind &&
+          deprecated == other.deprecated &&
+          location == other.location &&
+          containerName == other.containerName &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    hash = JenkinsSmiHash.combine(hash, kind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, deprecated.hashCode);
+    hash = JenkinsSmiHash.combine(hash, location.hashCode);
+    hash = JenkinsSmiHash.combine(hash, containerName.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// A symbol kind.
@@ -5131,7 +7822,7 @@
   const SymbolKind._(this._value);
   const SymbolKind.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -5204,8 +7895,8 @@
   bool operator ==(o) => o is SymbolKind && o._value == _value;
 }
 
-/// Describe options to be used when registering for
-/// text document change events.
+/// Describe options to be used when registering for text document change
+/// events.
 class TextDocumentChangeRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
   TextDocumentChangeRegistrationOptions(this.syncKind, this.documentSelector) {
@@ -5213,24 +7904,22 @@
       throw 'syncKind is required but was not provided';
     }
   }
-  factory TextDocumentChangeRegistrationOptions.fromJson(
+  static TextDocumentChangeRegistrationOptions fromJson(
       Map<String, dynamic> json) {
     final syncKind = json['syncKind'];
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new TextDocumentChangeRegistrationOptions(
         syncKind, documentSelector);
   }
 
-  /// A document selector to identify the scope of the
-  /// registration. If set to null the document selector
-  /// provided on the client side will be used.
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
-  /// How documents are synced to the server. See
-  /// TextDocumentSyncKind.Full and
+  /// How documents are synced to the server. See TextDocumentSyncKind.Full and
   /// TextDocumentSyncKind.Incremental.
   final num syncKind;
 
@@ -5248,39 +7937,1804 @@
         obj['syncKind'] is num &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentChangeRegistrationOptions) {
+      return syncKind == other.syncKind &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, syncKind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Text document specific client capabilities.
 class TextDocumentClientCapabilities implements ToJsonable {
-  TextDocumentClientCapabilities(this.dynamicRegistration, this.willSave,
-      this.willSaveWaitUntil, this.didSave);
-  factory TextDocumentClientCapabilities.fromJson(Map<String, dynamic> json) {
+  TextDocumentClientCapabilities(
+      this.synchronization,
+      this.completion,
+      this.hover,
+      this.signatureHelp,
+      this.references,
+      this.documentHighlight,
+      this.documentSymbol,
+      this.formatting,
+      this.rangeFormatting,
+      this.onTypeFormatting,
+      this.declaration,
+      this.definition,
+      this.typeDefinition,
+      this.implementation,
+      this.codeAction,
+      this.codeLens,
+      this.documentLink,
+      this.colorProvider,
+      this.rename,
+      this.publishDiagnostics,
+      this.foldingRange);
+  static TextDocumentClientCapabilities fromJson(Map<String, dynamic> json) {
+    final synchronization = json['synchronization'] != null
+        ? TextDocumentClientCapabilitiesSynchronization.fromJson(
+            json['synchronization'])
+        : null;
+    final completion = json['completion'] != null
+        ? TextDocumentClientCapabilitiesCompletion.fromJson(json['completion'])
+        : null;
+    final hover = json['hover'] != null
+        ? TextDocumentClientCapabilitiesHover.fromJson(json['hover'])
+        : null;
+    final signatureHelp = json['signatureHelp'] != null
+        ? TextDocumentClientCapabilitiesSignatureHelp.fromJson(
+            json['signatureHelp'])
+        : null;
+    final references = json['references'] != null
+        ? TextDocumentClientCapabilitiesReferences.fromJson(json['references'])
+        : null;
+    final documentHighlight = json['documentHighlight'] != null
+        ? TextDocumentClientCapabilitiesDocumentHighlight.fromJson(
+            json['documentHighlight'])
+        : null;
+    final documentSymbol = json['documentSymbol'] != null
+        ? TextDocumentClientCapabilitiesDocumentSymbol.fromJson(
+            json['documentSymbol'])
+        : null;
+    final formatting = json['formatting'] != null
+        ? TextDocumentClientCapabilitiesFormatting.fromJson(json['formatting'])
+        : null;
+    final rangeFormatting = json['rangeFormatting'] != null
+        ? TextDocumentClientCapabilitiesRangeFormatting.fromJson(
+            json['rangeFormatting'])
+        : null;
+    final onTypeFormatting = json['onTypeFormatting'] != null
+        ? TextDocumentClientCapabilitiesOnTypeFormatting.fromJson(
+            json['onTypeFormatting'])
+        : null;
+    final declaration = json['declaration'] != null
+        ? TextDocumentClientCapabilitiesDeclaration.fromJson(
+            json['declaration'])
+        : null;
+    final definition = json['definition'] != null
+        ? TextDocumentClientCapabilitiesDefinition.fromJson(json['definition'])
+        : null;
+    final typeDefinition = json['typeDefinition'] != null
+        ? TextDocumentClientCapabilitiesTypeDefinition.fromJson(
+            json['typeDefinition'])
+        : null;
+    final implementation = json['implementation'] != null
+        ? TextDocumentClientCapabilitiesImplementation.fromJson(
+            json['implementation'])
+        : null;
+    final codeAction = json['codeAction'] != null
+        ? TextDocumentClientCapabilitiesCodeAction.fromJson(json['codeAction'])
+        : null;
+    final codeLens = json['codeLens'] != null
+        ? TextDocumentClientCapabilitiesCodeLens.fromJson(json['codeLens'])
+        : null;
+    final documentLink = json['documentLink'] != null
+        ? TextDocumentClientCapabilitiesDocumentLink.fromJson(
+            json['documentLink'])
+        : null;
+    final colorProvider = json['colorProvider'] != null
+        ? TextDocumentClientCapabilitiesColorProvider.fromJson(
+            json['colorProvider'])
+        : null;
+    final rename = json['rename'] != null
+        ? TextDocumentClientCapabilitiesRename.fromJson(json['rename'])
+        : null;
+    final publishDiagnostics = json['publishDiagnostics'] != null
+        ? TextDocumentClientCapabilitiesPublishDiagnostics.fromJson(
+            json['publishDiagnostics'])
+        : null;
+    final foldingRange = json['foldingRange'] != null
+        ? TextDocumentClientCapabilitiesFoldingRange.fromJson(
+            json['foldingRange'])
+        : null;
+    return new TextDocumentClientCapabilities(
+        synchronization,
+        completion,
+        hover,
+        signatureHelp,
+        references,
+        documentHighlight,
+        documentSymbol,
+        formatting,
+        rangeFormatting,
+        onTypeFormatting,
+        declaration,
+        definition,
+        typeDefinition,
+        implementation,
+        codeAction,
+        codeLens,
+        documentLink,
+        colorProvider,
+        rename,
+        publishDiagnostics,
+        foldingRange);
+  }
+
+  /// Capabilities specific to the `textDocument/codeAction`
+  final TextDocumentClientCapabilitiesCodeAction codeAction;
+
+  /// Capabilities specific to the `textDocument/codeLens`
+  final TextDocumentClientCapabilitiesCodeLens codeLens;
+
+  /// Capabilities specific to the `textDocument/documentColor` and the
+  /// `textDocument/colorPresentation` request.
+  ///
+  /// Since 3.6.0
+  final TextDocumentClientCapabilitiesColorProvider colorProvider;
+
+  /// Capabilities specific to the `textDocument/completion`
+  final TextDocumentClientCapabilitiesCompletion completion;
+
+  /// Capabilities specific to the `textDocument/declaration`
+  final TextDocumentClientCapabilitiesDeclaration declaration;
+
+  /// Capabilities specific to the `textDocument/definition`
+  final TextDocumentClientCapabilitiesDefinition definition;
+
+  /// Capabilities specific to the `textDocument/documentHighlight`
+  final TextDocumentClientCapabilitiesDocumentHighlight documentHighlight;
+
+  /// Capabilities specific to the `textDocument/documentLink`
+  final TextDocumentClientCapabilitiesDocumentLink documentLink;
+
+  /// Capabilities specific to the `textDocument/documentSymbol`
+  final TextDocumentClientCapabilitiesDocumentSymbol documentSymbol;
+
+  /// Capabilities specific to `textDocument/foldingRange` requests.
+  ///
+  /// Since 3.10.0
+  final TextDocumentClientCapabilitiesFoldingRange foldingRange;
+
+  /// Capabilities specific to the `textDocument/formatting`
+  final TextDocumentClientCapabilitiesFormatting formatting;
+
+  /// Capabilities specific to the `textDocument/hover`
+  final TextDocumentClientCapabilitiesHover hover;
+
+  /// Capabilities specific to the `textDocument/implementation`.
+  ///
+  /// Since 3.6.0
+  final TextDocumentClientCapabilitiesImplementation implementation;
+
+  /// Capabilities specific to the `textDocument/onTypeFormatting`
+  final TextDocumentClientCapabilitiesOnTypeFormatting onTypeFormatting;
+
+  /// Capabilities specific to `textDocument/publishDiagnostics`.
+  final TextDocumentClientCapabilitiesPublishDiagnostics publishDiagnostics;
+
+  /// Capabilities specific to the `textDocument/rangeFormatting`
+  final TextDocumentClientCapabilitiesRangeFormatting rangeFormatting;
+
+  /// Capabilities specific to the `textDocument/references`
+  final TextDocumentClientCapabilitiesReferences references;
+
+  /// Capabilities specific to the `textDocument/rename`
+  final TextDocumentClientCapabilitiesRename rename;
+
+  /// Capabilities specific to the `textDocument/signatureHelp`
+  final TextDocumentClientCapabilitiesSignatureHelp signatureHelp;
+  final TextDocumentClientCapabilitiesSynchronization synchronization;
+
+  /// Capabilities specific to the `textDocument/typeDefinition`
+  ///
+  /// Since 3.6.0
+  final TextDocumentClientCapabilitiesTypeDefinition typeDefinition;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (synchronization != null) {
+      __result['synchronization'] = synchronization;
+    }
+    if (completion != null) {
+      __result['completion'] = completion;
+    }
+    if (hover != null) {
+      __result['hover'] = hover;
+    }
+    if (signatureHelp != null) {
+      __result['signatureHelp'] = signatureHelp;
+    }
+    if (references != null) {
+      __result['references'] = references;
+    }
+    if (documentHighlight != null) {
+      __result['documentHighlight'] = documentHighlight;
+    }
+    if (documentSymbol != null) {
+      __result['documentSymbol'] = documentSymbol;
+    }
+    if (formatting != null) {
+      __result['formatting'] = formatting;
+    }
+    if (rangeFormatting != null) {
+      __result['rangeFormatting'] = rangeFormatting;
+    }
+    if (onTypeFormatting != null) {
+      __result['onTypeFormatting'] = onTypeFormatting;
+    }
+    if (declaration != null) {
+      __result['declaration'] = declaration;
+    }
+    if (definition != null) {
+      __result['definition'] = definition;
+    }
+    if (typeDefinition != null) {
+      __result['typeDefinition'] = typeDefinition;
+    }
+    if (implementation != null) {
+      __result['implementation'] = implementation;
+    }
+    if (codeAction != null) {
+      __result['codeAction'] = codeAction;
+    }
+    if (codeLens != null) {
+      __result['codeLens'] = codeLens;
+    }
+    if (documentLink != null) {
+      __result['documentLink'] = documentLink;
+    }
+    if (colorProvider != null) {
+      __result['colorProvider'] = colorProvider;
+    }
+    if (rename != null) {
+      __result['rename'] = rename;
+    }
+    if (publishDiagnostics != null) {
+      __result['publishDiagnostics'] = publishDiagnostics;
+    }
+    if (foldingRange != null) {
+      __result['foldingRange'] = foldingRange;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilities) {
+      return synchronization == other.synchronization &&
+          completion == other.completion &&
+          hover == other.hover &&
+          signatureHelp == other.signatureHelp &&
+          references == other.references &&
+          documentHighlight == other.documentHighlight &&
+          documentSymbol == other.documentSymbol &&
+          formatting == other.formatting &&
+          rangeFormatting == other.rangeFormatting &&
+          onTypeFormatting == other.onTypeFormatting &&
+          declaration == other.declaration &&
+          definition == other.definition &&
+          typeDefinition == other.typeDefinition &&
+          implementation == other.implementation &&
+          codeAction == other.codeAction &&
+          codeLens == other.codeLens &&
+          documentLink == other.documentLink &&
+          colorProvider == other.colorProvider &&
+          rename == other.rename &&
+          publishDiagnostics == other.publishDiagnostics &&
+          foldingRange == other.foldingRange &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, synchronization.hashCode);
+    hash = JenkinsSmiHash.combine(hash, completion.hashCode);
+    hash = JenkinsSmiHash.combine(hash, hover.hashCode);
+    hash = JenkinsSmiHash.combine(hash, signatureHelp.hashCode);
+    hash = JenkinsSmiHash.combine(hash, references.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentHighlight.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSymbol.hashCode);
+    hash = JenkinsSmiHash.combine(hash, formatting.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rangeFormatting.hashCode);
+    hash = JenkinsSmiHash.combine(hash, onTypeFormatting.hashCode);
+    hash = JenkinsSmiHash.combine(hash, declaration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, definition.hashCode);
+    hash = JenkinsSmiHash.combine(hash, typeDefinition.hashCode);
+    hash = JenkinsSmiHash.combine(hash, implementation.hashCode);
+    hash = JenkinsSmiHash.combine(hash, codeAction.hashCode);
+    hash = JenkinsSmiHash.combine(hash, codeLens.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentLink.hashCode);
+    hash = JenkinsSmiHash.combine(hash, colorProvider.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rename.hashCode);
+    hash = JenkinsSmiHash.combine(hash, publishDiagnostics.hashCode);
+    hash = JenkinsSmiHash.combine(hash, foldingRange.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesCodeAction implements ToJsonable {
+  TextDocumentClientCapabilitiesCodeAction(
+      this.dynamicRegistration, this.codeActionLiteralSupport);
+  static TextDocumentClientCapabilitiesCodeAction fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final codeActionLiteralSupport = json['codeActionLiteralSupport'] != null
+        ? TextDocumentClientCapabilitiesCodeActionLiteralSupport.fromJson(
+            json['codeActionLiteralSupport'])
+        : null;
+    return new TextDocumentClientCapabilitiesCodeAction(
+        dynamicRegistration, codeActionLiteralSupport);
+  }
+
+  /// The client support code action literals as a valid response of the
+  /// `textDocument/codeAction` request.
+  ///
+  /// Since 3.8.0
+  final TextDocumentClientCapabilitiesCodeActionLiteralSupport
+      codeActionLiteralSupport;
+
+  /// Whether code action supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (codeActionLiteralSupport != null) {
+      __result['codeActionLiteralSupport'] = codeActionLiteralSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesCodeAction) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          codeActionLiteralSupport == other.codeActionLiteralSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, codeActionLiteralSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesCodeActionKind implements ToJsonable {
+  TextDocumentClientCapabilitiesCodeActionKind(this.valueSet) {
+    if (valueSet == null) {
+      throw 'valueSet is required but was not provided';
+    }
+  }
+  static TextDocumentClientCapabilitiesCodeActionKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? CodeActionKind.fromJson(item) : null)
+        ?.cast<CodeActionKind>()
+        ?.toList();
+    return new TextDocumentClientCapabilitiesCodeActionKind(valueSet);
+  }
+
+  /// The code action kind values the client supports. When this property exists
+  /// the client also guarantees that it will handle values outside its set
+  /// gracefully and falls back to a default value when unknown.
+  final List<CodeActionKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    __result['valueSet'] =
+        valueSet ?? (throw 'valueSet is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic> &&
+        obj.containsKey('valueSet') &&
+        (obj['valueSet'] is List &&
+            (obj['valueSet'].every((item) => item is String)));
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesCodeActionKind) {
+      return listEqual(valueSet, other.valueSet,
+              (CodeActionKind a, CodeActionKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, valueSet.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesCodeActionLiteralSupport
+    implements ToJsonable {
+  TextDocumentClientCapabilitiesCodeActionLiteralSupport(this.codeActionKind) {
+    if (codeActionKind == null) {
+      throw 'codeActionKind is required but was not provided';
+    }
+  }
+  static TextDocumentClientCapabilitiesCodeActionLiteralSupport fromJson(
+      Map<String, dynamic> json) {
+    final codeActionKind = json['codeActionKind'] != null
+        ? TextDocumentClientCapabilitiesCodeActionKind.fromJson(
+            json['codeActionKind'])
+        : null;
+    return new TextDocumentClientCapabilitiesCodeActionLiteralSupport(
+        codeActionKind);
+  }
+
+  /// The code action kind is support with the following value set.
+  final TextDocumentClientCapabilitiesCodeActionKind codeActionKind;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    __result['codeActionKind'] =
+        codeActionKind ?? (throw 'codeActionKind is required but was not set');
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic> &&
+        obj.containsKey('codeActionKind') &&
+        TextDocumentClientCapabilitiesCodeActionKind.canParse(
+            obj['codeActionKind']);
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesCodeActionLiteralSupport) {
+      return codeActionKind == other.codeActionKind && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, codeActionKind.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesCodeLens implements ToJsonable {
+  TextDocumentClientCapabilitiesCodeLens(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesCodeLens fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesCodeLens(dynamicRegistration);
+  }
+
+  /// Whether code lens supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesCodeLens) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesColorProvider implements ToJsonable {
+  TextDocumentClientCapabilitiesColorProvider(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesColorProvider fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesColorProvider(dynamicRegistration);
+  }
+
+  /// Whether colorProvider supports dynamic registration. If this is set to
+  /// `true` the client supports the new `(ColorProviderOptions &
+  /// TextDocumentRegistrationOptions & StaticRegistrationOptions)` return value
+  /// for the corresponding server capability as well.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesColorProvider) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesCompletion implements ToJsonable {
+  TextDocumentClientCapabilitiesCompletion(this.dynamicRegistration,
+      this.completionItem, this.completionItemKind, this.contextSupport);
+  static TextDocumentClientCapabilitiesCompletion fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final completionItem = json['completionItem'] != null
+        ? TextDocumentClientCapabilitiesCompletionItem.fromJson(
+            json['completionItem'])
+        : null;
+    final completionItemKind = json['completionItemKind'] != null
+        ? TextDocumentClientCapabilitiesCompletionItemKind.fromJson(
+            json['completionItemKind'])
+        : null;
+    final contextSupport = json['contextSupport'];
+    return new TextDocumentClientCapabilitiesCompletion(dynamicRegistration,
+        completionItem, completionItemKind, contextSupport);
+  }
+
+  /// The client supports the following `CompletionItem` specific capabilities.
+  final TextDocumentClientCapabilitiesCompletionItem completionItem;
+  final TextDocumentClientCapabilitiesCompletionItemKind completionItemKind;
+
+  /// The client supports to send additional context information for a
+  /// `textDocument/completion` request.
+  final bool contextSupport;
+
+  /// Whether completion supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (completionItem != null) {
+      __result['completionItem'] = completionItem;
+    }
+    if (completionItemKind != null) {
+      __result['completionItemKind'] = completionItemKind;
+    }
+    if (contextSupport != null) {
+      __result['contextSupport'] = contextSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesCompletion) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          completionItem == other.completionItem &&
+          completionItemKind == other.completionItemKind &&
+          contextSupport == other.contextSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, completionItem.hashCode);
+    hash = JenkinsSmiHash.combine(hash, completionItemKind.hashCode);
+    hash = JenkinsSmiHash.combine(hash, contextSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesCompletionItem implements ToJsonable {
+  TextDocumentClientCapabilitiesCompletionItem(
+      this.snippetSupport,
+      this.commitCharactersSupport,
+      this.documentationFormat,
+      this.deprecatedSupport,
+      this.preselectSupport);
+  static TextDocumentClientCapabilitiesCompletionItem fromJson(
+      Map<String, dynamic> json) {
+    final snippetSupport = json['snippetSupport'];
+    final commitCharactersSupport = json['commitCharactersSupport'];
+    final documentationFormat = json['documentationFormat']
+        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
+        ?.cast<MarkupKind>()
+        ?.toList();
+    final deprecatedSupport = json['deprecatedSupport'];
+    final preselectSupport = json['preselectSupport'];
+    return new TextDocumentClientCapabilitiesCompletionItem(
+        snippetSupport,
+        commitCharactersSupport,
+        documentationFormat,
+        deprecatedSupport,
+        preselectSupport);
+  }
+
+  /// The client supports commit characters on a completion item.
+  final bool commitCharactersSupport;
+
+  /// The client supports the deprecated property on a completion item.
+  final bool deprecatedSupport;
+
+  /// The client supports the following content formats for the documentation
+  /// property. The order describes the preferred format of the client.
+  final List<MarkupKind> documentationFormat;
+
+  /// The client supports the preselect property on a completion item.
+  final bool preselectSupport;
+
+  /// The client supports snippets as insert text.
+  ///
+  /// A snippet can define tab stops and placeholders with `$1`, `$2` and
+  /// `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of the
+  /// snippet. Placeholders with equal identifiers are linked, that is typing in
+  /// one will update others too.
+  final bool snippetSupport;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (snippetSupport != null) {
+      __result['snippetSupport'] = snippetSupport;
+    }
+    if (commitCharactersSupport != null) {
+      __result['commitCharactersSupport'] = commitCharactersSupport;
+    }
+    if (documentationFormat != null) {
+      __result['documentationFormat'] = documentationFormat;
+    }
+    if (deprecatedSupport != null) {
+      __result['deprecatedSupport'] = deprecatedSupport;
+    }
+    if (preselectSupport != null) {
+      __result['preselectSupport'] = preselectSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesCompletionItem) {
+      return snippetSupport == other.snippetSupport &&
+          commitCharactersSupport == other.commitCharactersSupport &&
+          listEqual(documentationFormat, other.documentationFormat,
+              (MarkupKind a, MarkupKind b) => a == b) &&
+          deprecatedSupport == other.deprecatedSupport &&
+          preselectSupport == other.preselectSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, snippetSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, commitCharactersSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentationFormat.hashCode);
+    hash = JenkinsSmiHash.combine(hash, deprecatedSupport.hashCode);
+    hash = JenkinsSmiHash.combine(hash, preselectSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesCompletionItemKind implements ToJsonable {
+  TextDocumentClientCapabilitiesCompletionItemKind(this.valueSet);
+  static TextDocumentClientCapabilitiesCompletionItemKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? CompletionItemKind.fromJson(item) : null)
+        ?.cast<CompletionItemKind>()
+        ?.toList();
+    return new TextDocumentClientCapabilitiesCompletionItemKind(valueSet);
+  }
+
+  /// The completion item kind values the client supports. When this property
+  /// exists the client also guarantees that it will handle values outside its
+  /// set gracefully and falls back to a default value when unknown.
+  ///
+  /// If this property is not present the client only supports the completion
+  /// items kinds from `Text` to `Reference` as defined in the initial version
+  /// of the protocol.
+  final List<CompletionItemKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (valueSet != null) {
+      __result['valueSet'] = valueSet;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesCompletionItemKind) {
+      return listEqual(valueSet, other.valueSet,
+              (CompletionItemKind a, CompletionItemKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, valueSet.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesDeclaration implements ToJsonable {
+  TextDocumentClientCapabilitiesDeclaration(
+      this.dynamicRegistration, this.linkSupport);
+  static TextDocumentClientCapabilitiesDeclaration fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return new TextDocumentClientCapabilitiesDeclaration(
+        dynamicRegistration, linkSupport);
+  }
+
+  /// Whether declaration supports dynamic registration. If this is set to
+  /// `true` the client supports the new `(TextDocumentRegistrationOptions &
+  /// StaticRegistrationOptions)` return value for the corresponding server
+  /// capability as well.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of declaration links.
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesDeclaration) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesDefinition implements ToJsonable {
+  TextDocumentClientCapabilitiesDefinition(
+      this.dynamicRegistration, this.linkSupport);
+  static TextDocumentClientCapabilitiesDefinition fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return new TextDocumentClientCapabilitiesDefinition(
+        dynamicRegistration, linkSupport);
+  }
+
+  /// Whether definition supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of definition links.
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesDefinition) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesDocumentHighlight implements ToJsonable {
+  TextDocumentClientCapabilitiesDocumentHighlight(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesDocumentHighlight fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesDocumentHighlight(
+        dynamicRegistration);
+  }
+
+  /// Whether document highlight supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesDocumentHighlight) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesDocumentLink implements ToJsonable {
+  TextDocumentClientCapabilitiesDocumentLink(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesDocumentLink fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesDocumentLink(dynamicRegistration);
+  }
+
+  /// Whether document link supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesDocumentLink) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesDocumentSymbol implements ToJsonable {
+  TextDocumentClientCapabilitiesDocumentSymbol(this.dynamicRegistration,
+      this.symbolKind, this.hierarchicalDocumentSymbolSupport);
+  static TextDocumentClientCapabilitiesDocumentSymbol fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final symbolKind = json['symbolKind'] != null
+        ? TextDocumentClientCapabilitiesSymbolKind.fromJson(json['symbolKind'])
+        : null;
+    final hierarchicalDocumentSymbolSupport =
+        json['hierarchicalDocumentSymbolSupport'];
+    return new TextDocumentClientCapabilitiesDocumentSymbol(
+        dynamicRegistration, symbolKind, hierarchicalDocumentSymbolSupport);
+  }
+
+  /// Whether document symbol supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports hierarchical document symbols.
+  final bool hierarchicalDocumentSymbolSupport;
+
+  /// Specific capabilities for the `SymbolKind`.
+  final TextDocumentClientCapabilitiesSymbolKind symbolKind;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (symbolKind != null) {
+      __result['symbolKind'] = symbolKind;
+    }
+    if (hierarchicalDocumentSymbolSupport != null) {
+      __result['hierarchicalDocumentSymbolSupport'] =
+          hierarchicalDocumentSymbolSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesDocumentSymbol) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          symbolKind == other.symbolKind &&
+          hierarchicalDocumentSymbolSupport ==
+              other.hierarchicalDocumentSymbolSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, symbolKind.hashCode);
+    hash = JenkinsSmiHash.combine(
+        hash, hierarchicalDocumentSymbolSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesFoldingRange implements ToJsonable {
+  TextDocumentClientCapabilitiesFoldingRange(
+      this.dynamicRegistration, this.rangeLimit, this.lineFoldingOnly);
+  static TextDocumentClientCapabilitiesFoldingRange fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final rangeLimit = json['rangeLimit'];
+    final lineFoldingOnly = json['lineFoldingOnly'];
+    return new TextDocumentClientCapabilitiesFoldingRange(
+        dynamicRegistration, rangeLimit, lineFoldingOnly);
+  }
+
+  /// Whether implementation supports dynamic registration for folding range
+  /// providers. If this is set to `true` the client supports the new
+  /// `(FoldingRangeProviderOptions & TextDocumentRegistrationOptions &
+  /// StaticRegistrationOptions)` return value for the corresponding server
+  /// capability as well.
+  final bool dynamicRegistration;
+
+  /// If set, the client signals that it only supports folding complete lines.
+  /// If set, client will ignore specified `startCharacter` and `endCharacter`
+  /// properties in a FoldingRange.
+  final bool lineFoldingOnly;
+
+  /// The maximum number of folding ranges that the client prefers to receive
+  /// per document. The value serves as a hint, servers are free to follow the
+  /// limit.
+  final num rangeLimit;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (rangeLimit != null) {
+      __result['rangeLimit'] = rangeLimit;
+    }
+    if (lineFoldingOnly != null) {
+      __result['lineFoldingOnly'] = lineFoldingOnly;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesFoldingRange) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          rangeLimit == other.rangeLimit &&
+          lineFoldingOnly == other.lineFoldingOnly &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rangeLimit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, lineFoldingOnly.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesFormatting implements ToJsonable {
+  TextDocumentClientCapabilitiesFormatting(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesFormatting fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesFormatting(dynamicRegistration);
+  }
+
+  /// Whether formatting supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesFormatting) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesHover implements ToJsonable {
+  TextDocumentClientCapabilitiesHover(
+      this.dynamicRegistration, this.contentFormat);
+  static TextDocumentClientCapabilitiesHover fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final contentFormat = json['contentFormat']
+        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
+        ?.cast<MarkupKind>()
+        ?.toList();
+    return new TextDocumentClientCapabilitiesHover(
+        dynamicRegistration, contentFormat);
+  }
+
+  /// The client supports the follow content formats for the content property.
+  /// The order describes the preferred format of the client.
+  final List<MarkupKind> contentFormat;
+
+  /// Whether hover supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (contentFormat != null) {
+      __result['contentFormat'] = contentFormat;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesHover) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          listEqual(contentFormat, other.contentFormat,
+              (MarkupKind a, MarkupKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, contentFormat.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesImplementation implements ToJsonable {
+  TextDocumentClientCapabilitiesImplementation(
+      this.dynamicRegistration, this.linkSupport);
+  static TextDocumentClientCapabilitiesImplementation fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return new TextDocumentClientCapabilitiesImplementation(
+        dynamicRegistration, linkSupport);
+  }
+
+  /// Whether implementation supports dynamic registration. If this is set to
+  /// `true` the client supports the new `(TextDocumentRegistrationOptions &
+  /// StaticRegistrationOptions)` return value for the corresponding server
+  /// capability as well.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of definition links.
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesImplementation) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesOnTypeFormatting implements ToJsonable {
+  TextDocumentClientCapabilitiesOnTypeFormatting(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesOnTypeFormatting fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesOnTypeFormatting(
+        dynamicRegistration);
+  }
+
+  /// Whether on type formatting supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesOnTypeFormatting) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesParameterInformation implements ToJsonable {
+  TextDocumentClientCapabilitiesParameterInformation(this.labelOffsetSupport);
+  static TextDocumentClientCapabilitiesParameterInformation fromJson(
+      Map<String, dynamic> json) {
+    final labelOffsetSupport = json['labelOffsetSupport'];
+    return new TextDocumentClientCapabilitiesParameterInformation(
+        labelOffsetSupport);
+  }
+
+  /// The client supports processing label offsets instead of a simple label
+  /// string.
+  final bool labelOffsetSupport;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (labelOffsetSupport != null) {
+      __result['labelOffsetSupport'] = labelOffsetSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesParameterInformation) {
+      return labelOffsetSupport == other.labelOffsetSupport && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, labelOffsetSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesPublishDiagnostics implements ToJsonable {
+  TextDocumentClientCapabilitiesPublishDiagnostics(this.relatedInformation);
+  static TextDocumentClientCapabilitiesPublishDiagnostics fromJson(
+      Map<String, dynamic> json) {
+    final relatedInformation = json['relatedInformation'];
+    return new TextDocumentClientCapabilitiesPublishDiagnostics(
+        relatedInformation);
+  }
+
+  /// Whether the clients accepts diagnostics with related information.
+  final bool relatedInformation;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (relatedInformation != null) {
+      __result['relatedInformation'] = relatedInformation;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesPublishDiagnostics) {
+      return relatedInformation == other.relatedInformation && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, relatedInformation.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesRangeFormatting implements ToJsonable {
+  TextDocumentClientCapabilitiesRangeFormatting(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesRangeFormatting fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesRangeFormatting(
+        dynamicRegistration);
+  }
+
+  /// Whether range formatting supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesRangeFormatting) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesReferences implements ToJsonable {
+  TextDocumentClientCapabilitiesReferences(this.dynamicRegistration);
+  static TextDocumentClientCapabilitiesReferences fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new TextDocumentClientCapabilitiesReferences(dynamicRegistration);
+  }
+
+  /// Whether references supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesReferences) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesRename implements ToJsonable {
+  TextDocumentClientCapabilitiesRename(
+      this.dynamicRegistration, this.prepareSupport);
+  static TextDocumentClientCapabilitiesRename fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final prepareSupport = json['prepareSupport'];
+    return new TextDocumentClientCapabilitiesRename(
+        dynamicRegistration, prepareSupport);
+  }
+
+  /// Whether rename supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports testing for validity of rename operations before
+  /// execution.
+  final bool prepareSupport;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (prepareSupport != null) {
+      __result['prepareSupport'] = prepareSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesRename) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          prepareSupport == other.prepareSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, prepareSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesSignatureHelp implements ToJsonable {
+  TextDocumentClientCapabilitiesSignatureHelp(
+      this.dynamicRegistration, this.signatureInformation);
+  static TextDocumentClientCapabilitiesSignatureHelp fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final signatureInformation = json['signatureInformation'] != null
+        ? TextDocumentClientCapabilitiesSignatureInformation.fromJson(
+            json['signatureInformation'])
+        : null;
+    return new TextDocumentClientCapabilitiesSignatureHelp(
+        dynamicRegistration, signatureInformation);
+  }
+
+  /// Whether signature help supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// The client supports the following `SignatureInformation` specific
+  /// properties.
+  final TextDocumentClientCapabilitiesSignatureInformation signatureInformation;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (signatureInformation != null) {
+      __result['signatureInformation'] = signatureInformation;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesSignatureHelp) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          signatureInformation == other.signatureInformation &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, signatureInformation.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesSignatureInformation implements ToJsonable {
+  TextDocumentClientCapabilitiesSignatureInformation(
+      this.documentationFormat, this.parameterInformation);
+  static TextDocumentClientCapabilitiesSignatureInformation fromJson(
+      Map<String, dynamic> json) {
+    final documentationFormat = json['documentationFormat']
+        ?.map((item) => item != null ? MarkupKind.fromJson(item) : null)
+        ?.cast<MarkupKind>()
+        ?.toList();
+    final parameterInformation = json['parameterInformation'] != null
+        ? TextDocumentClientCapabilitiesParameterInformation.fromJson(
+            json['parameterInformation'])
+        : null;
+    return new TextDocumentClientCapabilitiesSignatureInformation(
+        documentationFormat, parameterInformation);
+  }
+
+  /// The client supports the follow content formats for the documentation
+  /// property. The order describes the preferred format of the client.
+  final List<MarkupKind> documentationFormat;
+
+  /// Client capabilities specific to parameter information.
+  final TextDocumentClientCapabilitiesParameterInformation parameterInformation;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (documentationFormat != null) {
+      __result['documentationFormat'] = documentationFormat;
+    }
+    if (parameterInformation != null) {
+      __result['parameterInformation'] = parameterInformation;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesSignatureInformation) {
+      return listEqual(documentationFormat, other.documentationFormat,
+              (MarkupKind a, MarkupKind b) => a == b) &&
+          parameterInformation == other.parameterInformation &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, documentationFormat.hashCode);
+    hash = JenkinsSmiHash.combine(hash, parameterInformation.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesSymbolKind implements ToJsonable {
+  TextDocumentClientCapabilitiesSymbolKind(this.valueSet);
+  static TextDocumentClientCapabilitiesSymbolKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? SymbolKind.fromJson(item) : null)
+        ?.cast<SymbolKind>()
+        ?.toList();
+    return new TextDocumentClientCapabilitiesSymbolKind(valueSet);
+  }
+
+  /// The symbol kind values the client supports. When this property exists the
+  /// client also guarantees that it will handle values outside its set
+  /// gracefully and falls back to a default value when unknown.
+  ///
+  /// If this property is not present the client only supports the symbol kinds
+  /// from `File` to `Array` as defined in the initial version of the protocol.
+  final List<SymbolKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (valueSet != null) {
+      __result['valueSet'] = valueSet;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesSymbolKind) {
+      return listEqual(valueSet, other.valueSet,
+              (SymbolKind a, SymbolKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, valueSet.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class TextDocumentClientCapabilitiesSynchronization implements ToJsonable {
+  TextDocumentClientCapabilitiesSynchronization(this.dynamicRegistration,
+      this.willSave, this.willSaveWaitUntil, this.didSave);
+  static TextDocumentClientCapabilitiesSynchronization fromJson(
+      Map<String, dynamic> json) {
     final dynamicRegistration = json['dynamicRegistration'];
     final willSave = json['willSave'];
     final willSaveWaitUntil = json['willSaveWaitUntil'];
     final didSave = json['didSave'];
-    return new TextDocumentClientCapabilities(
+    return new TextDocumentClientCapabilitiesSynchronization(
         dynamicRegistration, willSave, willSaveWaitUntil, didSave);
   }
 
   /// The client supports did save notifications.
   final bool didSave;
 
-  /// Whether text document synchronization supports
-  /// dynamic registration.
+  /// Whether text document synchronization supports dynamic registration.
   final bool dynamicRegistration;
 
-  /// The client supports sending will save
-  /// notifications.
+  /// The client supports sending will save notifications.
   final bool willSave;
 
-  /// The client supports sending a will save request
-  /// and waits for a response providing text edits
-  /// which will be applied to the document before it is
+  /// The client supports sending a will save request and waits for a response
+  /// providing text edits which will be applied to the document before it is
   /// saved.
   final bool willSaveWaitUntil;
 
@@ -5304,20 +9758,101 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesSynchronization) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          willSave == other.willSave &&
+          willSaveWaitUntil == other.willSaveWaitUntil &&
+          didSave == other.didSave &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, willSave.hashCode);
+    hash = JenkinsSmiHash.combine(hash, willSaveWaitUntil.hashCode);
+    hash = JenkinsSmiHash.combine(hash, didSave.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// An event describing a change to a text document. If
-/// range and rangeLength are omitted the new text is
-/// considered to be the full content of the document.
+class TextDocumentClientCapabilitiesTypeDefinition implements ToJsonable {
+  TextDocumentClientCapabilitiesTypeDefinition(
+      this.dynamicRegistration, this.linkSupport);
+  static TextDocumentClientCapabilitiesTypeDefinition fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final linkSupport = json['linkSupport'];
+    return new TextDocumentClientCapabilitiesTypeDefinition(
+        dynamicRegistration, linkSupport);
+  }
+
+  /// Whether typeDefinition supports dynamic registration. If this is set to
+  /// `true` the client supports the new `(TextDocumentRegistrationOptions &
+  /// StaticRegistrationOptions)` return value for the corresponding server
+  /// capability as well.
+  final bool dynamicRegistration;
+
+  /// The client supports additional metadata in the form of definition links.
+  final bool linkSupport;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (linkSupport != null) {
+      __result['linkSupport'] = linkSupport;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentClientCapabilitiesTypeDefinition) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          linkSupport == other.linkSupport &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, linkSupport.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+/// An event describing a change to a text document. If range and rangeLength
+/// are omitted the new text is considered to be the full content of the
+/// document.
 class TextDocumentContentChangeEvent implements ToJsonable {
   TextDocumentContentChangeEvent(this.range, this.rangeLength, this.text) {
     if (text == null) {
       throw 'text is required but was not provided';
     }
   }
-  factory TextDocumentContentChangeEvent.fromJson(Map<String, dynamic> json) {
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+  static TextDocumentContentChangeEvent fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final rangeLength = json['rangeLength'];
     final text = json['text'];
     return new TextDocumentContentChangeEvent(range, rangeLength, text);
@@ -5349,9 +9884,32 @@
         obj.containsKey('text') &&
         obj['text'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentContentChangeEvent) {
+      return range == other.range &&
+          rangeLength == other.rangeLength &&
+          text == other.text &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, rangeLength.hashCode);
+    hash = JenkinsSmiHash.combine(hash, text.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-class TextDocumentEdit implements FileOperation, ToJsonable {
+class TextDocumentEdit implements ToJsonable {
   TextDocumentEdit(this.textDocument, this.edits) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -5360,12 +9918,12 @@
       throw 'edits is required but was not provided';
     }
   }
-  factory TextDocumentEdit.fromJson(Map<String, dynamic> json) {
+  static TextDocumentEdit fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new VersionedTextDocumentIdentifier.fromJson(json['textDocument'])
+        ? VersionedTextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final edits = json['edits']
-        ?.map((item) => item != null ? new TextEdit.fromJson(item) : null)
+        ?.map((item) => item != null ? TextEdit.fromJson(item) : null)
         ?.cast<TextEdit>()
         ?.toList();
     return new TextDocumentEdit(textDocument, edits);
@@ -5391,9 +9949,29 @@
         VersionedTextDocumentIdentifier.canParse(obj['textDocument']) &&
         obj.containsKey('edits') &&
         (obj['edits'] is List &&
-            (obj['edits'].length == 0 ||
-                obj['edits'].every((item) => TextEdit.canParse(item))));
+            (obj['edits'].every((item) => TextEdit.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentEdit) {
+      return textDocument == other.textDocument &&
+          listEqual(edits, other.edits, (TextEdit a, TextEdit b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, edits.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class TextDocumentIdentifier implements ToJsonable {
@@ -5402,7 +9980,7 @@
       throw 'uri is required but was not provided';
     }
   }
-  factory TextDocumentIdentifier.fromJson(Map<String, dynamic> json) {
+  static TextDocumentIdentifier fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     return new TextDocumentIdentifier(uri);
   }
@@ -5421,6 +9999,24 @@
         obj.containsKey('uri') &&
         obj['uri'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentIdentifier) {
+      return uri == other.uri && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class TextDocumentItem implements ToJsonable {
@@ -5438,7 +10034,7 @@
       throw 'text is required but was not provided';
     }
   }
-  factory TextDocumentItem.fromJson(Map<String, dynamic> json) {
+  static TextDocumentItem fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     final languageId = json['languageId'];
     final version = json['version'];
@@ -5455,8 +10051,8 @@
   /// The text document's URI.
   final String uri;
 
-  /// The version number of this document (it will
-  /// increase after each change, including undo/redo).
+  /// The version number of this document (it will increase after each change,
+  /// including undo/redo).
   final num version;
 
   Map<String, dynamic> toJson() {
@@ -5481,6 +10077,31 @@
         obj.containsKey('text') &&
         obj['text'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentItem) {
+      return uri == other.uri &&
+          languageId == other.languageId &&
+          version == other.version &&
+          text == other.text &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, languageId.hashCode);
+    hash = JenkinsSmiHash.combine(hash, version.hashCode);
+    hash = JenkinsSmiHash.combine(hash, text.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class TextDocumentPositionParams implements ToJsonable {
@@ -5492,13 +10113,12 @@
       throw 'position is required but was not provided';
     }
   }
-  factory TextDocumentPositionParams.fromJson(Map<String, dynamic> json) {
+  static TextDocumentPositionParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
-    final position = json['position'] != null
-        ? new Position.fromJson(json['position'])
-        : null;
+    final position =
+        json['position'] != null ? Position.fromJson(json['position']) : null;
     return new TextDocumentPositionParams(textDocument, position);
   }
 
@@ -5524,21 +10144,41 @@
         obj.containsKey('position') &&
         Position.canParse(obj['position']);
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentPositionParams) {
+      return textDocument == other.textDocument &&
+          position == other.position &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, position.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class TextDocumentRegistrationOptions implements ToJsonable {
   TextDocumentRegistrationOptions(this.documentSelector);
-  factory TextDocumentRegistrationOptions.fromJson(Map<String, dynamic> json) {
+  static TextDocumentRegistrationOptions fromJson(Map<String, dynamic> json) {
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new TextDocumentRegistrationOptions(documentSelector);
   }
 
-  /// A document selector to identify the scope of the
-  /// registration. If set to null the document selector
-  /// provided on the client side will be used.
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
   Map<String, dynamic> toJson() {
@@ -5551,10 +10191,27 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentRegistrationOptions) {
+      return documentSelector == other.documentSelector && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Represents reasons why a text document is saved.
@@ -5562,7 +10219,7 @@
   const TextDocumentSaveReason._(this._value);
   const TextDocumentSaveReason.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -5574,8 +10231,8 @@
     return false;
   }
 
-  /// Manually triggered, e.g. by the user pressing
-  /// save, by starting debugging, or by an API call.
+  /// Manually triggered, e.g. by the user pressing save, by starting debugging,
+  /// or by an API call.
   static const Manual = const TextDocumentSaveReason._(1);
 
   /// Automatic after a delay.
@@ -5598,25 +10255,22 @@
 class TextDocumentSaveRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
   TextDocumentSaveRegistrationOptions(this.includeText, this.documentSelector);
-  factory TextDocumentSaveRegistrationOptions.fromJson(
+  static TextDocumentSaveRegistrationOptions fromJson(
       Map<String, dynamic> json) {
     final includeText = json['includeText'];
     final documentSelector = json['documentSelector']
-        ?.map((item) => item != null ? new DocumentFilter.fromJson(item) : null)
+        ?.map((item) => item != null ? DocumentFilter.fromJson(item) : null)
         ?.cast<DocumentFilter>()
         ?.toList();
     return new TextDocumentSaveRegistrationOptions(
         includeText, documentSelector);
   }
 
-  /// A document selector to identify the scope of the
-  /// registration. If set to null the document
-  /// selector provided on the client side will be
-  /// used.
+  /// A document selector to identify the scope of the registration. If set to
+  /// null the document selector provided on the client side will be used.
   final List<DocumentFilter> documentSelector;
 
-  /// The client is supposed to include the content on
-  /// save.
+  /// The client is supposed to include the content on save.
   final bool includeText;
 
   Map<String, dynamic> toJson() {
@@ -5632,19 +10286,39 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
         (obj['documentSelector'] is List &&
-            (obj['documentSelector'].length == 0 ||
-                obj['documentSelector']
-                    .every((item) => DocumentFilter.canParse(item))));
+            (obj['documentSelector']
+                .every((item) => DocumentFilter.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentSaveRegistrationOptions) {
+      return includeText == other.includeText &&
+          documentSelector == other.documentSelector &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, includeText.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentSelector.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
-/// Defines how the host (editor) should sync document
-/// changes to the language server.
+/// Defines how the host (editor) should sync document changes to the language
+/// server.
 class TextDocumentSyncKind {
   const TextDocumentSyncKind._(this._value);
   const TextDocumentSyncKind.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -5659,13 +10333,11 @@
   /// Documents should not be synced at all.
   static const None = const TextDocumentSyncKind._(0);
 
-  /// Documents are synced by always sending the
-  /// full content of the document.
+  /// Documents are synced by always sending the full content of the document.
   static const Full = const TextDocumentSyncKind._(1);
 
-  /// Documents are synced by sending the full
-  /// content on open. After that only incremental
-  /// updates to the document are send.
+  /// Documents are synced by sending the full content on open. After that only
+  /// incremental updates to the document are send.
   static const Incremental = const TextDocumentSyncKind._(2);
 
   Object toJson() => _value;
@@ -5682,39 +10354,35 @@
 class TextDocumentSyncOptions implements ToJsonable {
   TextDocumentSyncOptions(this.openClose, this.change, this.willSave,
       this.willSaveWaitUntil, this.save);
-  factory TextDocumentSyncOptions.fromJson(Map<String, dynamic> json) {
+  static TextDocumentSyncOptions fromJson(Map<String, dynamic> json) {
     final openClose = json['openClose'];
     final change = json['change'] != null
-        ? new TextDocumentSyncKind.fromJson(json['change'])
+        ? TextDocumentSyncKind.fromJson(json['change'])
         : null;
     final willSave = json['willSave'];
     final willSaveWaitUntil = json['willSaveWaitUntil'];
     final save =
-        json['save'] != null ? new SaveOptions.fromJson(json['save']) : null;
+        json['save'] != null ? SaveOptions.fromJson(json['save']) : null;
     return new TextDocumentSyncOptions(
         openClose, change, willSave, willSaveWaitUntil, save);
   }
 
-  /// Change notifications are sent to the server.
-  /// See TextDocumentSyncKind.None,
-  /// TextDocumentSyncKind.Full and
-  /// TextDocumentSyncKind.Incremental. If omitted
-  /// it defaults to TextDocumentSyncKind.None.
+  /// Change notifications are sent to the server. See
+  /// TextDocumentSyncKind.None, TextDocumentSyncKind.Full and
+  /// TextDocumentSyncKind.Incremental. If omitted it defaults to
+  /// TextDocumentSyncKind.None.
   final TextDocumentSyncKind change;
 
-  /// Open and close notifications are sent to the
-  /// server.
+  /// Open and close notifications are sent to the server.
   final bool openClose;
 
   /// Save notifications are sent to the server.
   final SaveOptions save;
 
-  /// Will save notifications are sent to the
-  /// server.
+  /// Will save notifications are sent to the server.
   final bool willSave;
 
-  /// Will save wait until requests are sent to the
-  /// server.
+  /// Will save wait until requests are sent to the server.
   final bool willSaveWaitUntil;
 
   Map<String, dynamic> toJson() {
@@ -5740,6 +10408,33 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextDocumentSyncOptions) {
+      return openClose == other.openClose &&
+          change == other.change &&
+          willSave == other.willSave &&
+          willSaveWaitUntil == other.willSaveWaitUntil &&
+          save == other.save &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, openClose.hashCode);
+    hash = JenkinsSmiHash.combine(hash, change.hashCode);
+    hash = JenkinsSmiHash.combine(hash, willSave.hashCode);
+    hash = JenkinsSmiHash.combine(hash, willSaveWaitUntil.hashCode);
+    hash = JenkinsSmiHash.combine(hash, save.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class TextEdit implements ToJsonable {
@@ -5751,20 +10446,17 @@
       throw 'newText is required but was not provided';
     }
   }
-  factory TextEdit.fromJson(Map<String, dynamic> json) {
-    final range =
-        json['range'] != null ? new Range.fromJson(json['range']) : null;
+  static TextEdit fromJson(Map<String, dynamic> json) {
+    final range = json['range'] != null ? Range.fromJson(json['range']) : null;
     final newText = json['newText'];
     return new TextEdit(range, newText);
   }
 
-  /// The string to be inserted. For delete
-  /// operations use an empty string.
+  /// The string to be inserted. For delete operations use an empty string.
   final String newText;
 
-  /// The range of the text document to be
-  /// manipulated. To insert text into a document
-  /// create a range where start === end.
+  /// The range of the text document to be manipulated. To insert text into a
+  /// document create a range where start === end.
   final Range range;
 
   Map<String, dynamic> toJson() {
@@ -5782,6 +10474,25 @@
         obj.containsKey('newText') &&
         obj['newText'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is TextEdit) {
+      return range == other.range && newText == other.newText && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, range.hashCode);
+    hash = JenkinsSmiHash.combine(hash, newText.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// General parameters to unregister a capability.
@@ -5794,15 +10505,14 @@
       throw 'method is required but was not provided';
     }
   }
-  factory Unregistration.fromJson(Map<String, dynamic> json) {
+  static Unregistration fromJson(Map<String, dynamic> json) {
     final id = json['id'];
     final method = json['method'];
     return new Unregistration(id, method);
   }
 
-  /// The id used to unregister the request or
-  /// notification. Usually an id provided during
-  /// the register request.
+  /// The id used to unregister the request or notification. Usually an id
+  /// provided during the register request.
   final String id;
 
   /// The method / capability to unregister for.
@@ -5822,6 +10532,25 @@
         obj.containsKey('method') &&
         obj['method'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is Unregistration) {
+      return id == other.id && method == other.method && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, id.hashCode);
+    hash = JenkinsSmiHash.combine(hash, method.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class UnregistrationParams implements ToJsonable {
@@ -5830,9 +10559,9 @@
       throw 'unregisterations is required but was not provided';
     }
   }
-  factory UnregistrationParams.fromJson(Map<String, dynamic> json) {
+  static UnregistrationParams fromJson(Map<String, dynamic> json) {
     final unregisterations = json['unregisterations']
-        ?.map((item) => item != null ? new Unregistration.fromJson(item) : null)
+        ?.map((item) => item != null ? Unregistration.fromJson(item) : null)
         ?.cast<Unregistration>()
         ?.toList();
     return new UnregistrationParams(unregisterations);
@@ -5851,10 +10580,29 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('unregisterations') &&
         (obj['unregisterations'] is List &&
-            (obj['unregisterations'].length == 0 ||
-                obj['unregisterations']
-                    .every((item) => Unregistration.canParse(item))));
+            (obj['unregisterations']
+                .every((item) => Unregistration.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is UnregistrationParams) {
+      return listEqual(unregisterations, other.unregisterations,
+              (Unregistration a, Unregistration b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, unregisterations.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class VersionedTextDocumentIdentifier
@@ -5864,7 +10612,7 @@
       throw 'uri is required but was not provided';
     }
   }
-  factory VersionedTextDocumentIdentifier.fromJson(Map<String, dynamic> json) {
+  static VersionedTextDocumentIdentifier fromJson(Map<String, dynamic> json) {
     final version = json['version'];
     final uri = json['uri'];
     return new VersionedTextDocumentIdentifier(version, uri);
@@ -5873,19 +10621,14 @@
   /// The text document's URI.
   final String uri;
 
-  /// The version number of this document. If a
-  /// versioned text document identifier is sent
-  /// from the server to the client and the file is
-  /// not open in the editor (the server has not
-  /// received an open notification before) the
-  /// server can send `null` to indicate that the
-  /// version is known and the content on disk is
-  /// the truth (as speced with document content
-  /// ownership).
+  /// The version number of this document. If a versioned text document
+  /// identifier is sent from the server to the client and the file is not open
+  /// in the editor (the server has not received an open notification before)
+  /// the server can send `null` to indicate that the version is known and the
+  /// content on disk is the truth (as speced with document content ownership).
   ///
-  /// The version number of a document will increase
-  /// after each change, including undo/redo. The
-  /// number doesn't need to be consecutive.
+  /// The version number of a document will increase after each change,
+  /// including undo/redo. The number doesn't need to be consecutive.
   final num version;
 
   Map<String, dynamic> toJson() {
@@ -5902,13 +10645,32 @@
         obj.containsKey('uri') &&
         obj['uri'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is VersionedTextDocumentIdentifier) {
+      return version == other.version && uri == other.uri && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, version.hashCode);
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class WatchKind {
   const WatchKind._(this._value);
   const WatchKind.fromJson(this._value);
 
-  final Object _value;
+  final num _value;
 
   static bool canParse(Object obj) {
     switch (obj) {
@@ -5940,8 +10702,7 @@
   bool operator ==(o) => o is WatchKind && o._value == _value;
 }
 
-/// The parameters send in a will save text
-/// document notification.
+/// The parameters send in a will save text document notification.
 class WillSaveTextDocumentParams implements ToJsonable {
   WillSaveTextDocumentParams(this.textDocument, this.reason) {
     if (textDocument == null) {
@@ -5951,9 +10712,9 @@
       throw 'reason is required but was not provided';
     }
   }
-  factory WillSaveTextDocumentParams.fromJson(Map<String, dynamic> json) {
+  static WillSaveTextDocumentParams fromJson(Map<String, dynamic> json) {
     final textDocument = json['textDocument'] != null
-        ? new TextDocumentIdentifier.fromJson(json['textDocument'])
+        ? TextDocumentIdentifier.fromJson(json['textDocument'])
         : null;
     final reason = json['reason'];
     return new WillSaveTextDocumentParams(textDocument, reason);
@@ -5980,50 +10741,439 @@
         obj.containsKey('reason') &&
         obj['reason'] is num;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is WillSaveTextDocumentParams) {
+      return textDocument == other.textDocument &&
+          reason == other.reason &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, textDocument.hashCode);
+    hash = JenkinsSmiHash.combine(hash, reason.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// Workspace specific client capabilities.
 class WorkspaceClientCapabilities implements ToJsonable {
-  WorkspaceClientCapabilities(this.applyEdit, this.documentChanges,
-      this.resourceOperations, this.failureHandling);
-  factory WorkspaceClientCapabilities.fromJson(Map<String, dynamic> json) {
+  WorkspaceClientCapabilities(
+      this.applyEdit,
+      this.workspaceEdit,
+      this.didChangeConfiguration,
+      this.didChangeWatchedFiles,
+      this.symbol,
+      this.executeCommand,
+      this.workspaceFolders,
+      this.configuration);
+  static WorkspaceClientCapabilities fromJson(Map<String, dynamic> json) {
     final applyEdit = json['applyEdit'];
-    final documentChanges = json['documentChanges'];
-    final resourceOperations = json['resourceOperations']
-        ?.map((item) =>
-            item != null ? new ResourceOperationKind.fromJson(item) : null)
-        ?.cast<ResourceOperationKind>()
-        ?.toList();
-    final failureHandling = json['failureHandling'] != null
-        ? new FailureHandlingKind.fromJson(json['failureHandling'])
+    final workspaceEdit = json['workspaceEdit'] != null
+        ? WorkspaceClientCapabilitiesWorkspaceEdit.fromJson(
+            json['workspaceEdit'])
         : null;
+    final didChangeConfiguration = json['didChangeConfiguration'] != null
+        ? WorkspaceClientCapabilitiesDidChangeConfiguration.fromJson(
+            json['didChangeConfiguration'])
+        : null;
+    final didChangeWatchedFiles = json['didChangeWatchedFiles'] != null
+        ? WorkspaceClientCapabilitiesDidChangeWatchedFiles.fromJson(
+            json['didChangeWatchedFiles'])
+        : null;
+    final symbol = json['symbol'] != null
+        ? WorkspaceClientCapabilitiesSymbol.fromJson(json['symbol'])
+        : null;
+    final executeCommand = json['executeCommand'] != null
+        ? WorkspaceClientCapabilitiesExecuteCommand.fromJson(
+            json['executeCommand'])
+        : null;
+    final workspaceFolders = json['workspaceFolders'];
+    final configuration = json['configuration'];
     return new WorkspaceClientCapabilities(
-        applyEdit, documentChanges, resourceOperations, failureHandling);
+        applyEdit,
+        workspaceEdit,
+        didChangeConfiguration,
+        didChangeWatchedFiles,
+        symbol,
+        executeCommand,
+        workspaceFolders,
+        configuration);
   }
 
-  /// The client supports applying batch edits to
-  /// the workspace by supporting the request
-  /// 'workspace/applyEdit'
+  /// The client supports applying batch edits to the workspace by supporting
+  /// the request 'workspace/applyEdit'
   final bool applyEdit;
 
-  /// The client supports versioned document
-  /// changes in `WorkspaceEdit`s
-  final bool documentChanges;
+  /// The client supports `workspace/configuration` requests.
+  ///
+  /// Since 3.6.0
+  final bool configuration;
 
-  /// The failure handling strategy of a client if
-  /// applying the workspace edit failes.
-  final FailureHandlingKind failureHandling;
+  /// Capabilities specific to the `workspace/didChangeConfiguration`
+  /// notification.
+  final WorkspaceClientCapabilitiesDidChangeConfiguration
+      didChangeConfiguration;
 
-  /// The resource operations the client supports.
-  /// Clients should at least support 'create',
-  /// 'rename' and 'delete' files and folders.
-  final List<ResourceOperationKind> resourceOperations;
+  /// Capabilities specific to the `workspace/didChangeWatchedFiles`
+  /// notification.
+  final WorkspaceClientCapabilitiesDidChangeWatchedFiles didChangeWatchedFiles;
+
+  /// Capabilities specific to the `workspace/executeCommand` request.
+  final WorkspaceClientCapabilitiesExecuteCommand executeCommand;
+
+  /// Capabilities specific to the `workspace/symbol` request.
+  final WorkspaceClientCapabilitiesSymbol symbol;
+
+  /// Capabilities specific to `WorkspaceEdit`s
+  final WorkspaceClientCapabilitiesWorkspaceEdit workspaceEdit;
+
+  /// The client has support for workspace folders.
+  ///
+  /// Since 3.6.0
+  final bool workspaceFolders;
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
     if (applyEdit != null) {
       __result['applyEdit'] = applyEdit;
     }
+    if (workspaceEdit != null) {
+      __result['workspaceEdit'] = workspaceEdit;
+    }
+    if (didChangeConfiguration != null) {
+      __result['didChangeConfiguration'] = didChangeConfiguration;
+    }
+    if (didChangeWatchedFiles != null) {
+      __result['didChangeWatchedFiles'] = didChangeWatchedFiles;
+    }
+    if (symbol != null) {
+      __result['symbol'] = symbol;
+    }
+    if (executeCommand != null) {
+      __result['executeCommand'] = executeCommand;
+    }
+    if (workspaceFolders != null) {
+      __result['workspaceFolders'] = workspaceFolders;
+    }
+    if (configuration != null) {
+      __result['configuration'] = configuration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceClientCapabilities) {
+      return applyEdit == other.applyEdit &&
+          workspaceEdit == other.workspaceEdit &&
+          didChangeConfiguration == other.didChangeConfiguration &&
+          didChangeWatchedFiles == other.didChangeWatchedFiles &&
+          symbol == other.symbol &&
+          executeCommand == other.executeCommand &&
+          workspaceFolders == other.workspaceFolders &&
+          configuration == other.configuration &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, applyEdit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspaceEdit.hashCode);
+    hash = JenkinsSmiHash.combine(hash, didChangeConfiguration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, didChangeWatchedFiles.hashCode);
+    hash = JenkinsSmiHash.combine(hash, symbol.hashCode);
+    hash = JenkinsSmiHash.combine(hash, executeCommand.hashCode);
+    hash = JenkinsSmiHash.combine(hash, workspaceFolders.hashCode);
+    hash = JenkinsSmiHash.combine(hash, configuration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceClientCapabilitiesDidChangeConfiguration implements ToJsonable {
+  WorkspaceClientCapabilitiesDidChangeConfiguration(this.dynamicRegistration);
+  static WorkspaceClientCapabilitiesDidChangeConfiguration fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new WorkspaceClientCapabilitiesDidChangeConfiguration(
+        dynamicRegistration);
+  }
+
+  /// Did change configuration notification supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceClientCapabilitiesDidChangeConfiguration) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceClientCapabilitiesDidChangeWatchedFiles implements ToJsonable {
+  WorkspaceClientCapabilitiesDidChangeWatchedFiles(this.dynamicRegistration);
+  static WorkspaceClientCapabilitiesDidChangeWatchedFiles fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new WorkspaceClientCapabilitiesDidChangeWatchedFiles(
+        dynamicRegistration);
+  }
+
+  /// Did change watched files notification supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceClientCapabilitiesDidChangeWatchedFiles) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceClientCapabilitiesExecuteCommand implements ToJsonable {
+  WorkspaceClientCapabilitiesExecuteCommand(this.dynamicRegistration);
+  static WorkspaceClientCapabilitiesExecuteCommand fromJson(
+      Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    return new WorkspaceClientCapabilitiesExecuteCommand(dynamicRegistration);
+  }
+
+  /// Execute command supports dynamic registration.
+  final bool dynamicRegistration;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceClientCapabilitiesExecuteCommand) {
+      return dynamicRegistration == other.dynamicRegistration && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceClientCapabilitiesSymbol implements ToJsonable {
+  WorkspaceClientCapabilitiesSymbol(this.dynamicRegistration, this.symbolKind);
+  static WorkspaceClientCapabilitiesSymbol fromJson(Map<String, dynamic> json) {
+    final dynamicRegistration = json['dynamicRegistration'];
+    final symbolKind = json['symbolKind'] != null
+        ? WorkspaceClientCapabilitiesSymbolKind.fromJson(json['symbolKind'])
+        : null;
+    return new WorkspaceClientCapabilitiesSymbol(
+        dynamicRegistration, symbolKind);
+  }
+
+  /// Symbol request supports dynamic registration.
+  final bool dynamicRegistration;
+
+  /// Specific capabilities for the `SymbolKind` in the `workspace/symbol`
+  /// request.
+  final WorkspaceClientCapabilitiesSymbolKind symbolKind;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (dynamicRegistration != null) {
+      __result['dynamicRegistration'] = dynamicRegistration;
+    }
+    if (symbolKind != null) {
+      __result['symbolKind'] = symbolKind;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceClientCapabilitiesSymbol) {
+      return dynamicRegistration == other.dynamicRegistration &&
+          symbolKind == other.symbolKind &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, dynamicRegistration.hashCode);
+    hash = JenkinsSmiHash.combine(hash, symbolKind.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceClientCapabilitiesSymbolKind implements ToJsonable {
+  WorkspaceClientCapabilitiesSymbolKind(this.valueSet);
+  static WorkspaceClientCapabilitiesSymbolKind fromJson(
+      Map<String, dynamic> json) {
+    final valueSet = json['valueSet']
+        ?.map((item) => item != null ? SymbolKind.fromJson(item) : null)
+        ?.cast<SymbolKind>()
+        ?.toList();
+    return new WorkspaceClientCapabilitiesSymbolKind(valueSet);
+  }
+
+  /// The symbol kind values the client supports. When this property exists the
+  /// client also guarantees that it will handle values outside its set
+  /// gracefully and falls back to a default value when unknown.
+  ///
+  /// If this property is not present the client only supports the symbol kinds
+  /// from `File` to `Array` as defined in the initial version of the protocol.
+  final List<SymbolKind> valueSet;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
+    if (valueSet != null) {
+      __result['valueSet'] = valueSet;
+    }
+    return __result;
+  }
+
+  static bool canParse(Object obj) {
+    return obj is Map<String, dynamic>;
+  }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceClientCapabilitiesSymbolKind) {
+      return listEqual(valueSet, other.valueSet,
+              (SymbolKind a, SymbolKind b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, valueSet.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
+}
+
+class WorkspaceClientCapabilitiesWorkspaceEdit implements ToJsonable {
+  WorkspaceClientCapabilitiesWorkspaceEdit(
+      this.documentChanges, this.resourceOperations, this.failureHandling);
+  static WorkspaceClientCapabilitiesWorkspaceEdit fromJson(
+      Map<String, dynamic> json) {
+    final documentChanges = json['documentChanges'];
+    final resourceOperations = json['resourceOperations']
+        ?.map((item) =>
+            item != null ? ResourceOperationKind.fromJson(item) : null)
+        ?.cast<ResourceOperationKind>()
+        ?.toList();
+    final failureHandling = json['failureHandling'] != null
+        ? FailureHandlingKind.fromJson(json['failureHandling'])
+        : null;
+    return new WorkspaceClientCapabilitiesWorkspaceEdit(
+        documentChanges, resourceOperations, failureHandling);
+  }
+
+  /// The client supports versioned document changes in `WorkspaceEdit`s
+  final bool documentChanges;
+
+  /// The failure handling strategy of a client if applying the workspace edit
+  /// fails.
+  final FailureHandlingKind failureHandling;
+
+  /// The resource operations the client supports. Clients should at least
+  /// support 'create', 'rename' and 'delete' files and folders.
+  final List<ResourceOperationKind> resourceOperations;
+
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> __result = {};
     if (documentChanges != null) {
       __result['documentChanges'] = documentChanges;
     }
@@ -6039,16 +11189,61 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceClientCapabilitiesWorkspaceEdit) {
+      return documentChanges == other.documentChanges &&
+          listEqual(resourceOperations, other.resourceOperations,
+              (ResourceOperationKind a, ResourceOperationKind b) => a == b) &&
+          failureHandling == other.failureHandling &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, documentChanges.hashCode);
+    hash = JenkinsSmiHash.combine(hash, resourceOperations.hashCode);
+    hash = JenkinsSmiHash.combine(hash, failureHandling.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class WorkspaceEdit implements ToJsonable {
   WorkspaceEdit(this.changes, this.documentChanges);
-  factory WorkspaceEdit.fromJson(Map<String, dynamic> json) {
-    final changes = json['changes'];
-    final documentChanges = json['documentChanges']
-        ?.map((item) => item)
-        ?.cast<FileOperation>()
-        ?.toList();
+  static WorkspaceEdit fromJson(Map<String, dynamic> json) {
+    final changes = json['changes']
+        ?.map((key, value) => new MapEntry(
+            key,
+            value
+                ?.map((item) => item != null ? TextEdit.fromJson(item) : null)
+                ?.cast<TextEdit>()
+                ?.toList()))
+        ?.cast<String, List<TextEdit>>();
+    final documentChanges = (json['documentChanges'] is List && (json['documentChanges'].every((item) => TextDocumentEdit.canParse(item))))
+        ? new Either2<List<TextDocumentEdit>, List<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>>.t1(
+            json['documentChanges']
+                ?.map((item) =>
+                    item != null ? TextDocumentEdit.fromJson(item) : null)
+                ?.cast<TextDocumentEdit>()
+                ?.toList())
+        : ((json['documentChanges'] is List && (json['documentChanges'].every((item) => (TextDocumentEdit.canParse(item) || CreateFile.canParse(item) || RenameFile.canParse(item) || DeleteFile.canParse(item)))))
+            ? new Either2<List<TextDocumentEdit>, List<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>>.t2(json['documentChanges']
+                ?.map((item) => TextDocumentEdit.canParse(item)
+                    ? new Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>.t1(
+                        item != null ? TextDocumentEdit.fromJson(item) : null)
+                    : (CreateFile.canParse(item)
+                        ? new Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>.t2(item != null ? CreateFile.fromJson(item) : null)
+                        : (RenameFile.canParse(item) ? new Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>.t3(item != null ? RenameFile.fromJson(item) : null) : (DeleteFile.canParse(item) ? new Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>.t4(item != null ? DeleteFile.fromJson(item) : null) : (item == null ? null : (throw '''${item} was not one of (TextDocumentEdit, CreateFile, RenameFile, DeleteFile)'''))))))
+                ?.cast<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>()
+                ?.toList())
+            : (json['documentChanges'] == null ? null : (throw '''${json['documentChanges']} was not one of (List<TextDocumentEdit>, List<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>)''')));
     return new WorkspaceEdit(changes, documentChanges);
   }
 
@@ -6056,26 +11251,21 @@
   final Map<String, List<TextEdit>> changes;
 
   /// Depending on the client capability
-  /// `workspace.workspaceEdit.resourceOperations`
-  /// document changes are either an array of
-  /// `TextDocumentEdit`s to express changes to n
-  /// different text documents where each text
-  /// document edit addresses a specific version
-  /// of a text document. Or it can contain above
-  /// `TextDocumentEdit`s mixed with create,
-  /// rename and delete file / folder operations.
+  /// `workspace.workspaceEdit.resourceOperations` document changes are either
+  /// an array of `TextDocumentEdit`s to express changes to n different text
+  /// documents where each text document edit addresses a specific version of a
+  /// text document. Or it can contain above `TextDocumentEdit`s mixed with
+  /// create, rename and delete file / folder operations.
   ///
-  /// Whether a client supports versioned document
-  /// edits is expressed via
-  /// `workspace.workspaceEdit.documentChanges`
-  /// client capability.
+  /// Whether a client supports versioned document edits is expressed via
+  /// `workspace.workspaceEdit.documentChanges` client capability.
   ///
-  /// If a client neither supports
-  /// `documentChanges` nor
-  /// `workspace.workspaceEdit.resourceOperations`
-  /// then only plain `TextEdit`s using the
-  /// `changes` property are supported.
-  final List<FileOperation> documentChanges;
+  /// If a client neither supports `documentChanges` nor
+  /// `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s
+  /// using the `changes` property are supported.
+  final Either2<List<TextDocumentEdit>,
+          List<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>>>
+      documentChanges;
 
   Map<String, dynamic> toJson() {
     Map<String, dynamic> __result = {};
@@ -6091,6 +11281,28 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic>;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceEdit) {
+      return mapEqual(changes, other.changes,
+              (List<TextEdit> a, List<TextEdit> b) => a == b) &&
+          documentChanges == other.documentChanges &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, changes.hashCode);
+    hash = JenkinsSmiHash.combine(hash, documentChanges.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 class WorkspaceFolder implements ToJsonable {
@@ -6102,18 +11314,16 @@
       throw 'name is required but was not provided';
     }
   }
-  factory WorkspaceFolder.fromJson(Map<String, dynamic> json) {
+  static WorkspaceFolder fromJson(Map<String, dynamic> json) {
     final uri = json['uri'];
     final name = json['name'];
     return new WorkspaceFolder(uri, name);
   }
 
-  /// The name of the workspace folder. Defaults
-  /// to the uri's basename.
+  /// The name of the workspace folder. Defaults to the uri's basename.
   final String name;
 
-  /// The associated URI for this workspace
-  /// folder.
+  /// The associated URI for this workspace folder.
   final String uri;
 
   Map<String, dynamic> toJson() {
@@ -6130,6 +11340,25 @@
         obj.containsKey('name') &&
         obj['name'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceFolder) {
+      return uri == other.uri && name == other.name && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, uri.hashCode);
+    hash = JenkinsSmiHash.combine(hash, name.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// The workspace folder change event.
@@ -6142,15 +11371,13 @@
       throw 'removed is required but was not provided';
     }
   }
-  factory WorkspaceFoldersChangeEvent.fromJson(Map<String, dynamic> json) {
+  static WorkspaceFoldersChangeEvent fromJson(Map<String, dynamic> json) {
     final added = json['added']
-        ?.map(
-            (item) => item != null ? new WorkspaceFolder.fromJson(item) : null)
+        ?.map((item) => item != null ? WorkspaceFolder.fromJson(item) : null)
         ?.cast<WorkspaceFolder>()
         ?.toList();
     final removed = json['removed']
-        ?.map(
-            (item) => item != null ? new WorkspaceFolder.fromJson(item) : null)
+        ?.map((item) => item != null ? WorkspaceFolder.fromJson(item) : null)
         ?.cast<WorkspaceFolder>()
         ?.toList();
     return new WorkspaceFoldersChangeEvent(added, removed);
@@ -6174,15 +11401,34 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('added') &&
         (obj['added'] is List &&
-            (obj['added'].length == 0 ||
-                obj['added']
-                    .every((item) => WorkspaceFolder.canParse(item)))) &&
+            (obj['added'].every((item) => WorkspaceFolder.canParse(item)))) &&
         obj.containsKey('removed') &&
         (obj['removed'] is List &&
-            (obj['removed'].length == 0 ||
-                obj['removed']
-                    .every((item) => WorkspaceFolder.canParse(item))));
+            (obj['removed'].every((item) => WorkspaceFolder.canParse(item))));
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceFoldersChangeEvent) {
+      return listEqual(added, other.added,
+              (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
+          listEqual(removed, other.removed,
+              (WorkspaceFolder a, WorkspaceFolder b) => a == b) &&
+          true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, added.hashCode);
+    hash = JenkinsSmiHash.combine(hash, removed.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
 
 /// The parameters of a Workspace Symbol Request.
@@ -6192,7 +11438,7 @@
       throw 'query is required but was not provided';
     }
   }
-  factory WorkspaceSymbolParams.fromJson(Map<String, dynamic> json) {
+  static WorkspaceSymbolParams fromJson(Map<String, dynamic> json) {
     final query = json['query'];
     return new WorkspaceSymbolParams(query);
   }
@@ -6211,4 +11457,22 @@
         obj.containsKey('query') &&
         obj['query'] is String;
   }
+
+  @override
+  bool operator ==(other) {
+    if (other is WorkspaceSymbolParams) {
+      return query == other.query && true;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, query.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+
+  @override
+  String toString() => jsonEncoder.convert(toJson());
 }
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
index 35ae774..7a4edc4 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
@@ -2,7 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-Object id(Object obj) => obj;
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+
+const jsonRpcVersion = '2.0';
 
 Object specToJson(Object obj) {
   if (obj is ToJsonable) {
@@ -145,7 +149,45 @@
       map((t) => t == o, (t) => t == o, (t) => t == o, (t) => t == o);
 }
 
-class FileOperation {}
+class ErrorOr<T> extends Either2<ResponseError, T> {
+  ErrorOr.error(ResponseError error) : super.t1(error);
+  ErrorOr.success([T result]) : super.t2(result);
+
+  /// Returns the error or throws if object is not an error. Check [isError]
+  /// before accessing [error].
+  ResponseError get error {
+    return _which == 1 ? _t1 : (throw 'Value is not an error');
+  }
+
+  /// Returns true if this object is an error, false if it is a result. Prefer
+  /// [mapResult] instead of checking this flag if [errors] will simply be
+  /// propagated as-is.
+  bool get isError => _which == 1;
+
+  /// Returns the result or throws if this object is an error. Check [isError]
+  /// before accessing [result]. It is valid for this to return null is the
+  /// object does not represent an error but the resulting value was null.
+  T get result {
+    return _which == 2 ? _t2 : (throw 'Value is not a result');
+  }
+
+  /// If this object is a result, maps [result] through [f], otherwise returns
+  /// a new error object representing [error].
+  FutureOr<ErrorOr<N>> mapResult<N>(FutureOr<ErrorOr<N>> Function(T) f) {
+    return isError
+        // Re-wrap the error using our new type arg
+        ? new ErrorOr<N>.error(error)
+        // Otherwise call the map function
+        : f(result);
+  }
+}
+
+/// A base class containing the fields common to RequestMessage and
+/// NotificationMessage to simplify handling.
+abstract class IncomingMessage {
+  Method get method;
+  dynamic get params;
+}
 
 abstract class ToJsonable {
   Object toJson();
diff --git a/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart b/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
index 6e7020e..08fe4f3 100644
--- a/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
+++ b/pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart
@@ -2,9 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 
 /**
  * An object used to provide context information for Dart assist contributors.
@@ -13,9 +12,9 @@
  */
 abstract class DartAssistContext {
   /**
-   * The analysis driver used to access analysis results.
+   * The resolution result in which assist operates.
    */
-  AnalysisDriver get analysisDriver;
+  ResolvedUnitResult get resolveResult;
 
   /**
    * The length of the selection.
@@ -28,12 +27,7 @@
   int get selectionOffset;
 
   /**
-   * The source to get assists in.
+   * The workspace in which the fix contributor operates.
    */
-  Source get source;
-
-  /**
-   * The [CompilationUnit] to compute assists in.
-   */
-  CompilationUnit get unit;
+  ChangeWorkspace get workspace;
 }
diff --git a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
index af303ec..ccc79a9 100644
--- a/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_core.dart
@@ -5,8 +5,6 @@
 import 'dart:async';
 
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     show SourceChange;
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
@@ -64,25 +62,9 @@
  */
 abstract class FixContext {
   /**
-   * The analysis driver used to access analysis results.
-   */
-  AnalysisDriver get analysisDriver;
-
-  /**
-   * The error to fix, should be reported by the given [analysisDriver].
+   * The error to fix.
    */
   AnalysisError get error;
-
-  /**
-   * All of the errors in the file. This is used to compute additional fixes
-   * such "Fix all instances in file."
-   */
-  List<AnalysisError> get errors;
-
-  /**
-   * The [ResourceProvider] to access files and folders.
-   */
-  ResourceProvider get resourceProvider;
 }
 
 /**
@@ -96,5 +78,5 @@
   /**
    * Return a list of fixes for the given [context].
    */
-  Future<List<Fix>> computeFixes(FixContext context);
+  Future<List<Fix>> computeFixes(covariant FixContext context);
 }
diff --git a/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart b/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
index c4d54d1..1d115fa 100644
--- a/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
+++ b/pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart
@@ -2,24 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
-
 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
-import 'package:analysis_server/src/services/correction/fix_internal.dart'
-    show DartFixContextImpl;
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/analysis/top_level_declaration.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-
-/**
- * Complete with top-level declarations with the given [name].
- */
-typedef Future<List<TopLevelDeclarationInSource>> GetTopLevelDeclarations(
-    String name);
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 
 /**
  * An object used to provide context information for [DartFixContributor]s.
@@ -28,48 +13,12 @@
  */
 abstract class DartFixContext implements FixContext {
   /**
-   * The provider for parsed or resolved ASTs.
+   * The resolution result in which fix operates.
    */
-  AstProvider get astProvider;
+  ResolvedUnitResult get resolveResult;
 
   /**
-   * The function to get top-level declarations from.
+   * The workspace in which the fix contributor operates.
    */
-  GetTopLevelDeclarations get getTopLevelDeclarations;
-
-  /**
-   * The [CompilationUnit] to compute fixes in.
-   */
-  CompilationUnit get unit;
-}
-
-/**
- * A [FixContributor] that can be used to contribute fixes for errors in Dart
- * files.
- *
- * Clients may extend this class when implementing plugins.
- */
-abstract class DartFixContributor implements FixContributor {
-  @override
-  Future<List<Fix>> computeFixes(FixContext context) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    AnalysisDriver driver = context.analysisDriver;
-    Source source = context.error.source;
-    if (!AnalysisEngine.isDartFileName(source.fullName)) {
-      return const <Fix>[];
-    }
-    CompilationUnit unit = (await driver.getResult(source.fullName)).unit;
-    if (unit == null) {
-      return const <Fix>[];
-    }
-    DartFixContext dartContext =
-        new DartFixContextImpl(context, new AstProviderForDriver(driver), unit);
-    return internalComputeFixes(dartContext);
-  }
-
-  /**
-   * Return a list of fixes for the given [context].
-   */
-  Future<List<Fix>> internalComputeFixes(DartFixContext context);
+  ChangeWorkspace get workspace;
 }
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
index e4ab6d5..cab3a80 100644
--- a/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart
@@ -64,6 +64,9 @@
   if (kind == engine.ElementKind.FUNCTION_TYPE_ALIAS) {
     return ElementKind.FUNCTION_TYPE_ALIAS;
   }
+  if (kind == engine.ElementKind.GENERIC_FUNCTION_TYPE) {
+    return ElementKind.FUNCTION_TYPE_ALIAS;
+  }
   if (kind == engine.ElementKind.GETTER) {
     return ElementKind.GETTER;
   }
diff --git a/pkg/analysis_server/lib/protocol/protocol_constants.dart b/pkg/analysis_server/lib/protocol/protocol_constants.dart
index 38d52a9..15c626a 100644
--- a/pkg/analysis_server/lib/protocol/protocol_constants.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_constants.dart
@@ -72,7 +72,6 @@
 const String ANALYSIS_REQUEST_GET_SIGNATURE_FILE = 'file';
 const String ANALYSIS_REQUEST_GET_SIGNATURE_OFFSET = 'offset';
 const String ANALYSIS_REQUEST_REANALYZE = 'analysis.reanalyze';
-const String ANALYSIS_REQUEST_REANALYZE_ROOTS = 'roots';
 const String ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS = 'analysis.setAnalysisRoots';
 const String ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_EXCLUDED = 'excluded';
 const String ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_INCLUDED = 'included';
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index 3a0a480..5130033 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -3495,83 +3495,28 @@
 /**
  * analysis.reanalyze params
  *
- * {
- *   "roots": optional List<FilePath>
- * }
- *
  * Clients may not extend, implement or mix-in this class.
  */
 class AnalysisReanalyzeParams implements RequestParams {
-  List<String> _roots;
-
-  /**
-   * A list of the analysis roots that are to be re-analyzed.
-   */
-  List<String> get roots => _roots;
-
-  /**
-   * A list of the analysis roots that are to be re-analyzed.
-   */
-  void set roots(List<String> value) {
-    this._roots = value;
-  }
-
-  AnalysisReanalyzeParams({List<String> roots}) {
-    this.roots = roots;
-  }
-
-  factory AnalysisReanalyzeParams.fromJson(
-      JsonDecoder jsonDecoder, String jsonPath, Object json) {
-    if (json == null) {
-      json = {};
-    }
-    if (json is Map) {
-      List<String> roots;
-      if (json.containsKey("roots")) {
-        roots = jsonDecoder.decodeList(
-            jsonPath + ".roots", json["roots"], jsonDecoder.decodeString);
-      }
-      return new AnalysisReanalyzeParams(roots: roots);
-    } else {
-      throw jsonDecoder.mismatch(jsonPath, "analysis.reanalyze params", json);
-    }
-  }
-
-  factory AnalysisReanalyzeParams.fromRequest(Request request) {
-    return new AnalysisReanalyzeParams.fromJson(
-        new RequestDecoder(request), "params", request.params);
-  }
-
   @override
-  Map<String, dynamic> toJson() {
-    Map<String, dynamic> result = {};
-    if (roots != null) {
-      result["roots"] = roots;
-    }
-    return result;
-  }
+  Map<String, dynamic> toJson() => <String, dynamic>{};
 
   @override
   Request toRequest(String id) {
-    return new Request(id, "analysis.reanalyze", toJson());
+    return new Request(id, "analysis.reanalyze", null);
   }
 
   @override
-  String toString() => json.encode(toJson());
-
-  @override
   bool operator ==(other) {
     if (other is AnalysisReanalyzeParams) {
-      return listEqual(roots, other.roots, (String a, String b) => a == b);
+      return true;
     }
     return false;
   }
 
   @override
   int get hashCode {
-    int hash = 0;
-    hash = JenkinsSmiHash.combine(hash, roots.hashCode);
-    return JenkinsSmiHash.finish(hash);
+    return 613039876;
   }
 }
 
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index ae93b77..03fd356 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -14,6 +14,7 @@
 import 'package:analysis_server/protocol/protocol_generated.dart'
     hide AnalysisOptions;
 import 'package:analysis_server/src/analysis_logger.dart';
+import 'package:analysis_server/src/analysis_server_abstract.dart';
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/collections.dart';
 import 'package:analysis_server/src/computer/computer_highlights.dart';
@@ -42,36 +43,28 @@
 import 'package:analysis_server/src/search/search_domain.dart';
 import 'package:analysis_server/src/server/detachable_filesystem_manager.dart';
 import 'package:analysis_server/src/server/diagnostic_server.dart';
-import 'package:analysis_server/src/services/correction/namespace.dart';
-import 'package:analysis_server/src/services/search/element_visitors.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
 import 'package:analysis_server/src/utilities/null_string_sink.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/src/context/builder.dart';
 import 'package:analyzer/src/context/context_root.dart';
-import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart' as nd;
-import 'package:analyzer/src/dart/analysis/file_byte_store.dart'
-    show EvictingFileByteStore;
 import 'package:analyzer/src/dart/analysis/file_state.dart' as nd;
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/status.dart' as nd;
-import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/plugin/resolver_provider.dart';
-import 'package:analyzer/src/util/glob.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
 import 'package:telemetry/crash_reporting.dart';
@@ -80,179 +73,96 @@
 
 typedef void OptionUpdater(AnalysisOptionsImpl options);
 
-/**
- * Instances of the class [AnalysisServer] implement a server that listens on a
- * [CommunicationChannel] for analysis requests and process them.
- */
-class AnalysisServer {
-  /**
-   * The options of this server instance.
-   */
+/// Instances of the class [AnalysisServer] implement a server that listens on a
+/// [CommunicationChannel] for analysis requests and process them.
+class AnalysisServer extends AbstractAnalysisServer {
+  /// The options of this server instance.
   AnalysisServerOptions options;
 
-  /**
-   * The channel from which requests are received and to which responses should
-   * be sent.
-   */
+  /// The channel from which requests are received and to which responses should
+  /// be sent.
   final ServerCommunicationChannel channel;
 
-  /**
-   * The object used to manage sending a subset of notifications to the client.
-   * The subset of notifications are those to which plugins may contribute.
-   * This field is `null` when the new plugin support is disabled.
-   */
-  final NotificationManager notificationManager;
+  /// The object used to manage sending a subset of notifications to the client.
+  /// The subset of notifications are those to which plugins may contribute.
+  /// This field is `null` when the new plugin support is disabled.
+  NotificationManager notificationManager;
 
-  /**
-   * The object used to manage the execution of plugins.
-   */
+  /// The object used to manage the execution of plugins.
   PluginManager pluginManager;
 
-  /**
-   * The [ResourceProvider] using which paths are converted into [Resource]s.
-   */
-  final ResourceProvider resourceProvider;
-
-  /**
-   * The [SearchEngine] for this server, may be `null` if indexing is disabled.
-   */
+  /// The [SearchEngine] for this server, may be `null` if indexing is disabled.
   SearchEngine searchEngine;
 
-  /**
-   * A list of the globs used to determine which files should be analyzed. The
-   * list is lazily created and should be accessed using [analyzedFilesGlobs].
-   */
-  List<Glob> _analyzedFilesGlobs = null;
-
-  /**
-   * The [ContextManager] that handles the mapping from analysis roots to
-   * context directories.
-   */
-  ContextManager contextManager;
-
-  /**
-   * A flag indicating whether the server is running.  When false, contexts
-   * will no longer be added to [contextWorkQueue], and [performOperation] will
-   * discard any tasks it finds on [contextWorkQueue].
-   */
-  bool running;
-
-  /**
-   * A flag indicating the value of the 'analyzing' parameter sent in the last
-   * status message to the client.
-   */
+  /// A flag indicating the value of the 'analyzing' parameter sent in the last
+  /// status message to the client.
   bool statusAnalyzing = false;
 
-  /**
-   * A list of the request handlers used to handle the requests sent to this
-   * server.
-   */
+  /// A list of the request handlers used to handle the requests sent to this
+  /// server.
   List<RequestHandler> handlers;
 
-  /**
-   * The object used to manage the SDK's known to this server.
-   */
+  /// The object used to manage the SDK's known to this server.
   final DartSdkManager sdkManager;
 
-  /**
-   * The instrumentation service that is to be used by this analysis server.
-   */
+  /// The instrumentation service that is to be used by this analysis server.
   final InstrumentationService instrumentationService;
 
-  /**
-   * A set of the [ServerService]s to send notifications for.
-   */
+  /// A set of the [ServerService]s to send notifications for.
   Set<ServerService> serverServices = new HashSet<ServerService>();
 
-  /**
-   * A set of the [GeneralAnalysisService]s to send notifications for.
-   */
+  /// A set of the [GeneralAnalysisService]s to send notifications for.
   Set<GeneralAnalysisService> generalAnalysisServices =
       new HashSet<GeneralAnalysisService>();
 
-  /**
-   * A table mapping [AnalysisService]s to the file paths for which these
-   * notifications should be sent.
-   */
+  /// A table mapping [AnalysisService]s to the file paths for which these
+  /// notifications should be sent.
   Map<AnalysisService, Set<String>> analysisServices =
       new HashMap<AnalysisService, Set<String>>();
 
-  /**
-   * A table mapping [FlutterService]s to the file paths for which these
-   * notifications should be sent.
-   */
+  /// A table mapping [FlutterService]s to the file paths for which these
+  /// notifications should be sent.
   Map<FlutterService, Set<String>> flutterServices = {};
 
-  /**
-   * Performance information before initial analysis is complete.
-   */
+  /// Performance information before initial analysis is complete.
   final ServerPerformance performanceDuringStartup = new ServerPerformance();
 
-  /**
-   * Performance information after initial analysis is complete
-   * or `null` if the initial analysis is not yet complete
-   */
+  /// Performance information after initial analysis is complete
+  /// or `null` if the initial analysis is not yet complete
   ServerPerformance performanceAfterStartup;
 
-  /**
-   * A [RecentBuffer] of the most recent exceptions encountered by the analysis
-   * server.
-   */
+  /// A [RecentBuffer] of the most recent exceptions encountered by the analysis
+  /// server.
   final RecentBuffer<ServerException> exceptions = new RecentBuffer(10);
 
-  /**
-   * The class into which performance information is currently being recorded.
-   * During startup, this will be the same as [performanceDuringStartup]
-   * and after startup is complete, this switches to [performanceAfterStartup].
-   */
+  /// The class into which performance information is currently being recorded.
+  /// During startup, this will be the same as [performanceDuringStartup]
+  /// and after startup is complete, this switches to [performanceAfterStartup].
   ServerPerformance _performance;
 
-  /**
-   * The [Completer] that completes when analysis is complete.
-   */
+  /// The [Completer] that completes when analysis is complete.
   Completer _onAnalysisCompleteCompleter;
 
-  /**
-   * The controller that is notified when analysis is started.
-   */
+  /// The controller that is notified when analysis is started.
   StreamController<bool> _onAnalysisStartedController;
 
-  /**
-   * The content overlay for all analysis drivers.
-   */
-  final nd.FileContentOverlay fileContentOverlay = new nd.FileContentOverlay();
-
-  /**
-   * The current state of overlays from the client.  This is used as the
-   * content cache for all contexts.
-   */
-  final ContentCache overlayState = new ContentCache();
-
-  /**
-   * If the "analysis.analyzedFiles" notification is currently being subscribed
-   * to (see [generalAnalysisServices]), and at least one such notification has
-   * been sent since the subscription was enabled, the set of analyzed files
-   * that was delivered in the most recently sent notification.  Otherwise
-   * `null`.
-   */
+  /// If the "analysis.analyzedFiles" notification is currently being subscribed
+  /// to (see [generalAnalysisServices]), and at least one such notification has
+  /// been sent since the subscription was enabled, the set of analyzed files
+  /// that was delivered in the most recently sent notification.  Otherwise
+  /// `null`.
   Set<String> prevAnalyzedFiles;
 
-  /**
-   * The default options used to create new analysis contexts. This object is
-   * also referenced by the ContextManager.
-   */
+  /// The default options used to create new analysis contexts. This object is
+  /// also referenced by the ContextManager.
   final AnalysisOptionsImpl defaultContextOptions = new AnalysisOptionsImpl();
 
-  /**
-   * The file resolver provider used to override the way file URI's are
-   * resolved in some contexts.
-   */
+  /// The file resolver provider used to override the way file URI's are
+  /// resolved in some contexts.
   ResolverProvider fileResolverProvider;
 
-  /**
-   * The package resolver provider used to override the way package URI's are
-   * resolved in some contexts.
-   */
+  /// The package resolver provider used to override the way package URI's are
+  /// resolved in some contexts.
   ResolverProvider packageResolverProvider;
 
   PerformanceLog _analysisPerformanceLogger;
@@ -260,38 +170,27 @@
   ByteStore byteStore;
   nd.AnalysisDriverScheduler analysisDriverScheduler;
 
-  /**
-   * The controller for [onAnalysisSetChanged].
-   */
+  /// The controller for [onAnalysisSetChanged].
   final StreamController _onAnalysisSetChangedController =
       new StreamController.broadcast(sync: true);
 
-  /**
-   * The set of the files that are currently priority.
-   */
-  final Set<String> priorityFiles = new Set<String>();
-
-  /**
-   * The DiagnosticServer for this AnalysisServer. If available, it can be used
-   * to start an http diagnostics server or return the port for an existing
-   * server.
-   */
+  /// The DiagnosticServer for this AnalysisServer. If available, it can be used
+  /// to start an http diagnostics server or return the port for an existing
+  /// server.
   final DiagnosticServer diagnosticServer;
 
   final DetachableFileSystemManager detachableFileSystemManager;
 
-  /**
-   * Initialize a newly created server to receive requests from and send
-   * responses to the given [channel].
-   *
-   * If [rethrowExceptions] is true, then any exceptions thrown by analysis are
-   * propagated up the call stack.  The default is true to allow analysis
-   * exceptions to show up in unit tests, but it should be set to false when
-   * running a full analysis server.
-   */
+  /// Initialize a newly created server to receive requests from and send
+  /// responses to the given [channel].
+  ///
+  /// If [rethrowExceptions] is true, then any exceptions thrown by analysis are
+  /// propagated up the call stack.  The default is true to allow analysis
+  /// exceptions to show up in unit tests, but it should be set to false when
+  /// running a full analysis server.
   AnalysisServer(
     this.channel,
-    this.resourceProvider,
+    ResourceProvider baseResourceProvider,
     this.options,
     this.sdkManager,
     this.instrumentationService, {
@@ -299,8 +198,9 @@
     ResolverProvider fileResolverProvider: null,
     ResolverProvider packageResolverProvider: null,
     this.detachableFileSystemManager: null,
-  }) : notificationManager =
-            new NotificationManager(channel, resourceProvider) {
+  }) : super(baseResourceProvider) {
+    notificationManager = new NotificationManager(channel, resourceProvider);
+
     _performance = performanceDuringStartup;
 
     pluginManager = new PluginManager(
@@ -328,7 +228,7 @@
       }
       _analysisPerformanceLogger = new PerformanceLog(sink);
     }
-    byteStore = _createByteStore();
+    byteStore = createByteStore(resourceProvider);
     analysisDriverScheduler = new nd.AnalysisDriverScheduler(
         _analysisPerformanceLogger,
         driverWatcher: pluginWatcher);
@@ -337,7 +237,6 @@
 
     contextManager = new ContextManagerImpl(
         resourceProvider,
-        fileContentOverlay,
         sdkManager,
         packageResolverProvider,
         analyzedFilesGlobs,
@@ -350,7 +249,6 @@
     contextManager.callbacks = contextManagerCallbacks;
     AnalysisEngine.instance.logger = new AnalysisLogger(this);
     _onAnalysisStartedController = new StreamController.broadcast();
-    running = true;
     onAnalysisStarted.first.then((_) {
       onAnalysisComplete.then((_) {
         performanceAfterStartup = new ServerPerformance();
@@ -378,47 +276,10 @@
     ];
   }
 
-  /**
-   * The analytics instance; note, this object can be `null`.
-   */
+  /// The analytics instance; note, this object can be `null`.
   telemetry.Analytics get analytics => options.analytics;
 
-  /**
-   * Return a list of the globs used to determine which files should be analyzed.
-   */
-  List<Glob> get analyzedFilesGlobs {
-    if (_analyzedFilesGlobs == null) {
-      _analyzedFilesGlobs = <Glob>[];
-      List<String> patterns = <String>[
-        '**/*.${AnalysisEngine.SUFFIX_DART}',
-        '**/*.${AnalysisEngine.SUFFIX_HTML}',
-        '**/*.${AnalysisEngine.SUFFIX_HTM}',
-        '**/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}',
-        '**/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}',
-        '**/${AnalysisEngine.PUBSPEC_YAML_FILE}'
-      ];
-      for (String pattern in patterns) {
-        try {
-          _analyzedFilesGlobs
-              .add(new Glob(resourceProvider.pathContext.separator, pattern));
-        } catch (exception, stackTrace) {
-          AnalysisEngine.instance.logger.logError(
-              'Invalid glob pattern: "$pattern"',
-              new CaughtException(exception, stackTrace));
-        }
-      }
-    }
-    return _analyzedFilesGlobs;
-  }
-
-  /**
-   * A table mapping [Folder]s to the [AnalysisDriver]s associated with them.
-   */
-  Map<Folder, nd.AnalysisDriver> get driverMap => contextManager.driverMap;
-
-  /**
-   * The [Future] that completes when analysis is complete.
-   */
+  /// The [Future] that completes when analysis is complete.
   Future get onAnalysisComplete {
     if (isAnalysisComplete()) {
       return new Future.value();
@@ -429,50 +290,34 @@
     return _onAnalysisCompleteCompleter.future;
   }
 
-  /**
-   * The stream that is notified when the analysis set is changed - this might
-   * be a change to a file, external via a watch event, or internal via
-   * overlay. This means that the resolved world might have changed.
-   *
-   * The type of produced elements is not specified and should not be used.
-   */
+  /// The stream that is notified when the analysis set is changed - this might
+  /// be a change to a file, external via a watch event, or internal via
+  /// overlay. This means that the resolved world might have changed.
+  ///
+  /// The type of produced elements is not specified and should not be used.
   Stream get onAnalysisSetChanged => _onAnalysisSetChangedController.stream;
 
-  /**
-   * The stream that is notified with `true` when analysis is started.
-   */
+  /// The stream that is notified with `true` when analysis is started.
   Stream<bool> get onAnalysisStarted {
     return _onAnalysisStartedController.stream;
   }
 
-  /**
-   * Return the total time the server's been alive.
-   */
+  /// Return the total time the server's been alive.
   Duration get uptime {
     DateTime start = new DateTime.fromMillisecondsSinceEpoch(
         performanceDuringStartup.startTime);
     return new DateTime.now().difference(start);
   }
 
-  /**
-   * The socket from which requests are being read has been closed.
-   */
-  void done() {
-    running = false;
-  }
+  /// The socket from which requests are being read has been closed.
+  void done() {}
 
-  /**
-   * There was an error related to the socket from which requests are being
-   * read.
-   */
-  void error(argument) {
-    running = false;
-  }
+  /// There was an error related to the socket from which requests are being
+  /// read.
+  void error(argument) {}
 
-  /**
-   * Return one of the SDKs that has been created, or `null` if no SDKs have
-   * been created yet.
-   */
+  /// Return one of the SDKs that has been created, or `null` if no SDKs have
+  /// been created yet.
   DartSdk findSdk() {
     DartSdk sdk = sdkManager.anySdk;
     if (sdk != null) {
@@ -482,64 +327,9 @@
     return null;
   }
 
-  /**
-   * Return an analysis driver to which the file with the given [path] is
-   * added if one exists, otherwise a driver in which the file was analyzed if
-   * one exists, otherwise the first driver, otherwise `null`.
-   */
-  nd.AnalysisDriver getAnalysisDriver(String path) {
-    List<nd.AnalysisDriver> drivers = driverMap.values.toList();
-    if (drivers.isNotEmpty) {
-      // Sort the drivers so that more deeply nested contexts will be checked
-      // before enclosing contexts.
-      drivers.sort((first, second) =>
-          second.contextRoot.root.length - first.contextRoot.root.length);
-      nd.AnalysisDriver driver = drivers.firstWhere(
-          (driver) => driver.contextRoot.containsFile(path),
-          orElse: () => null);
-      driver ??= drivers.firstWhere(
-          (driver) => driver.knownFiles.contains(path),
-          orElse: () => null);
-      driver ??= drivers.first;
-      return driver;
-    }
-    return null;
-  }
-
-  /**
-   * Return the analysis result for the file with the given [path]. The file is
-   * analyzed in one of the analysis drivers to which the file was added,
-   * otherwise in the first driver, otherwise `null` is returned.
-   */
-  Future<nd.AnalysisResult> getAnalysisResult(String path,
-      {bool sendCachedToStream: false}) {
-    if (!AnalysisEngine.isDartFileName(path)) {
-      return null;
-    }
-
-    nd.AnalysisDriver driver = getAnalysisDriver(path);
-    if (driver == null) {
-      return new Future.value();
-    }
-
-    return driver
-        .getResult(path, sendCachedToStream: sendCachedToStream)
-        .catchError((_) => null);
-  }
-
-  /**
-   * Return the [AstProvider] for the given [path].
-   */
-  AstProvider getAstProvider(String path) {
-    nd.AnalysisDriver analysisDriver = getAnalysisDriver(path);
-    return new AstProviderForDriver(analysisDriver);
-  }
-
-  /**
-   * Return the cached analysis result for the file with the given [path].
-   * If there is no cached result, return `null`.
-   */
-  nd.AnalysisResult getCachedAnalysisResult(String path) {
+  /// Return the cached analysis result for the file with the given [path].
+  /// If there is no cached result, return `null`.
+  ResolvedUnitResult getCachedResolvedUnit(String path) {
     if (!AnalysisEngine.isDartFileName(path)) {
       return null;
     }
@@ -548,90 +338,7 @@
     return driver?.getCachedResult(path);
   }
 
-  /**
-   * Return a [Future] that completes with the [Element] at the given
-   * [offset] of the given [file], or with `null` if there is no node at the
-   * [offset] or the node does not have an element.
-   */
-  Future<Element> getElementAtOffset(String file, int offset) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    if (!priorityFiles.contains(file)) {
-      var driver = getAnalysisDriver(file);
-      if (driver == null) {
-        return null;
-      }
-
-      var unitElementResult = await driver.getUnitElement(file);
-      if (unitElementResult == null) {
-        return null;
-      }
-
-      var element = findElementByNameOffset(unitElementResult.element, offset);
-      if (element != null) {
-        return element;
-      }
-    }
-
-    AstNode node = await getNodeAtOffset(file, offset);
-    return getElementOfNode(node);
-  }
-
-  /**
-   * Return the [Element] of the given [node], or `null` if [node] is `null` or
-   * does not have an element.
-   */
-  Element getElementOfNode(AstNode node) {
-    if (node == null) {
-      return null;
-    }
-    if (node is SimpleIdentifier && node.parent is LibraryIdentifier) {
-      node = node.parent;
-    }
-    if (node is LibraryIdentifier) {
-      node = node.parent;
-    }
-    if (node is StringLiteral && node.parent is UriBasedDirective) {
-      return null;
-    }
-    Element element = ElementLocator.locate(node);
-    if (node is SimpleIdentifier && element is PrefixElement) {
-      element = getImportElement(node);
-    }
-    return element;
-  }
-
-  /**
-   * Return a [Future] that completes with the resolved [AstNode] at the
-   * given [offset] of the given [file], or with `null` if there is no node as
-   * the [offset].
-   */
-  Future<AstNode> getNodeAtOffset(String file, int offset) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    nd.AnalysisResult result = await getAnalysisResult(file);
-    CompilationUnit unit = result?.unit;
-    if (unit != null) {
-      return new NodeLocator(offset).searchWithin(unit);
-    }
-    return null;
-  }
-
-  /**
-   * Return a [Future] that completes with the resolved [CompilationUnit] for
-   * the Dart file with the given [path], or with `null` if the file is not a
-   * Dart file or cannot be resolved.
-   */
-  Future<CompilationUnit> getResolvedCompilationUnit(String path) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    nd.AnalysisResult result = await getAnalysisResult(path);
-    return result?.unit;
-  }
-
-  /**
-   * Handle a [request] that was read from the communication channel.
-   */
+  /// Handle a [request] that was read from the communication channel.
   void handleRequest(Request request) {
     _performance.logRequest(request);
     runZoned(() {
@@ -672,50 +379,38 @@
     });
   }
 
-  /**
-   * Return `true` if analysis is complete.
-   */
+  /// Return `true` if analysis is complete.
   bool isAnalysisComplete() {
     return !analysisDriverScheduler.isAnalyzing;
   }
 
-  /**
-   * Return `true` if the given path is a valid `FilePath`.
-   *
-   * This means that it is absolute and normalized.
-   */
+  /// Return `true` if the given path is a valid `FilePath`.
+  ///
+  /// This means that it is absolute and normalized.
   bool isValidFilePath(String path) {
     return resourceProvider.pathContext.isAbsolute(path) &&
         resourceProvider.pathContext.normalize(path) == path;
   }
 
-  /**
-   * Trigger reanalysis of all files in the given list of analysis [roots], or
-   * everything if the analysis roots is `null`.
-   */
-  void reanalyze(List<Resource> roots) {
-    // Instruct the contextDirectoryManager to rebuild all contexts from
-    // scratch.
-    contextManager.refresh(roots);
+  /// Read all files, resolve all URIs, and perform required analysis in
+  /// all current analysis drivers.
+  void reanalyze() {
+    for (var driver in driverMap.values) {
+      driver.resetUriResolution();
+    }
   }
 
-  /**
-   * Send the given [notification] to the client.
-   */
+  /// Send the given [notification] to the client.
   void sendNotification(Notification notification) {
     channel.sendNotification(notification);
   }
 
-  /**
-   * Send the given [response] to the client.
-   */
+  /// Send the given [response] to the client.
   void sendResponse(Response response) {
     channel.sendResponse(response);
   }
 
-  /**
-   * Sends a `server.error` notification.
-   */
+  /// Sends a `server.error` notification.
   void sendServerErrorNotification(
     String message,
     dynamic exception,
@@ -761,10 +456,8 @@
     ));
   }
 
-  /**
-   * Send status notification to the client. The state of analysis is given by
-   * the [status] information.
-   */
+  /// Send status notification to the client. The state of analysis is given by
+  /// the [status] information.
   void sendStatusNotificationNew(nd.AnalysisStatus status) {
     if (status.isAnalyzing) {
       _onAnalysisStartedController.add(true);
@@ -795,18 +488,16 @@
         new ServerStatusParams(analysis: analysis).toNotification());
   }
 
-  /**
-   * Implementation for `analysis.setAnalysisRoots`.
-   *
-   * TODO(scheglov) implement complete projects/contexts semantics.
-   *
-   * The current implementation is intentionally simplified and expected
-   * that only folders are given each given folder corresponds to the exactly
-   * one context.
-   *
-   * So, we can start working in parallel on adding services and improving
-   * projects/contexts support.
-   */
+  /// Implementation for `analysis.setAnalysisRoots`.
+  ///
+  /// TODO(scheglov) implement complete projects/contexts semantics.
+  ///
+  /// The current implementation is intentionally simplified and expected
+  /// that only folders are given each given folder corresponds to the exactly
+  /// one context.
+  ///
+  /// So, we can start working in parallel on adding services and improving
+  /// projects/contexts support.
   void setAnalysisRoots(String requestId, List<String> includedPaths,
       List<String> excludedPaths, Map<String, String> packageRoots) {
     if (notificationManager != null) {
@@ -820,9 +511,7 @@
     }
   }
 
-  /**
-   * Implementation for `analysis.setSubscriptions`.
-   */
+  /// Implementation for `analysis.setSubscriptions`.
   void setAnalysisSubscriptions(
       Map<AnalysisService, Set<String>> subscriptions) {
     if (notificationManager != null) {
@@ -836,14 +525,12 @@
       // the fully resolved unit, and processed with sending analysis
       // notifications as it happens after content changes.
       if (AnalysisEngine.isDartFileName(file)) {
-        getAnalysisResult(file, sendCachedToStream: true);
+        getResolvedUnit(file, sendCachedToStream: true);
       }
     }
   }
 
-  /**
-   * Implementation for `flutter.setSubscriptions`.
-   */
+  /// Implementation for `flutter.setSubscriptions`.
   void setFlutterSubscriptions(Map<FlutterService, Set<String>> subscriptions) {
     this.flutterServices = subscriptions;
     Set<String> allNewFiles =
@@ -853,14 +540,12 @@
       // the fully resolved unit, and processed with sending analysis
       // notifications as it happens after content changes.
       if (AnalysisEngine.isDartFileName(file)) {
-        getAnalysisResult(file, sendCachedToStream: true);
+        getResolvedUnit(file, sendCachedToStream: true);
       }
     }
   }
 
-  /**
-   * Implementation for `analysis.setGeneralSubscriptions`.
-   */
+  /// Implementation for `analysis.setGeneralSubscriptions`.
   void setGeneralAnalysisSubscriptions(
       List<GeneralAnalysisService> subscriptions) {
     Set<GeneralAnalysisService> newServices = subscriptions.toSet();
@@ -877,9 +562,7 @@
     generalAnalysisServices = newServices;
   }
 
-  /**
-   * Set the priority files to the given [files].
-   */
+  /// Set the priority files to the given [files].
   void setPriorityFiles(String requestId, List<String> files) {
     priorityFiles.clear();
     priorityFiles.addAll(files);
@@ -889,17 +572,13 @@
     });
   }
 
-  /**
-   * Returns `true` if errors should be reported for [file] with the given
-   * absolute path.
-   */
+  /// Returns `true` if errors should be reported for [file] with the given
+  /// absolute path.
   bool shouldSendErrorsNotificationFor(String file) {
     return contextManager.isInAnalysisRoot(file);
   }
 
   Future<void> shutdown() {
-    running = false;
-
     if (options.analytics != null) {
       options.analytics
           .waitForLastPing(timeout: new Duration(milliseconds: 200))
@@ -922,14 +601,19 @@
     return new Future.value();
   }
 
-  /**
-   * Implementation for `analysis.updateContent`.
-   */
+  /// Implementation for `analysis.updateContent`.
   void updateContent(String id, Map<String, dynamic> changes) {
     _onAnalysisSetChangedController.add(null);
     changes.forEach((file, change) {
+      // Prepare the old overlay contents.
+      String oldContents;
+      try {
+        if (resourceProvider.hasOverlay(file)) {
+          oldContents = resourceProvider.getFile(file).readAsStringSync();
+        }
+      } catch (_) {}
+
       // Prepare the new contents.
-      String oldContents = fileContentOverlay[file];
       String newContents;
       if (change is AddContentOverlay) {
         newContents = change.content;
@@ -955,7 +639,12 @@
         throw new AnalysisException('Illegal change type');
       }
 
-      fileContentOverlay[file] = newContents;
+      if (newContents != null) {
+        resourceProvider.setOverlay(file,
+            content: newContents, modificationStamp: 0);
+      } else {
+        resourceProvider.removeOverlay(file);
+      }
 
       driverMap.values.forEach((driver) {
         driver.changeFile(file);
@@ -969,10 +658,8 @@
     });
   }
 
-  /**
-   * Use the given updaters to update the values of the options in every
-   * existing analysis context.
-   */
+  /// Use the given updaters to update the values of the options in every
+  /// existing analysis context.
   void updateOptions(List<OptionUpdater> optionUpdaters) {
     // TODO(scheglov) implement for the new analysis driver
 //    //
@@ -996,32 +683,8 @@
 //    });
   }
 
-  /**
-   * If the state location can be accessed, return the file byte store,
-   * otherwise return the memory byte store.
-   */
-  ByteStore _createByteStore() {
-    const int M = 1024 * 1024 /*1 MiB*/;
-    const int G = 1024 * 1024 * 1024 /*1 GiB*/;
-
-    const int memoryCacheSize = 128 * M;
-
-    if (resourceProvider is PhysicalResourceProvider) {
-      Folder stateLocation =
-          resourceProvider.getStateLocation('.analysis-driver');
-      if (stateLocation != null) {
-        return new MemoryCachingByteStore(
-            new EvictingFileByteStore(stateLocation.path, G), memoryCacheSize);
-      }
-    }
-
-    return new MemoryCachingByteStore(new NullByteStore(), memoryCacheSize);
-  }
-
-  /**
-   * Return the path to the location of the byte store on disk, or `null` if
-   * there is no on-disk byte store.
-   */
+  /// Return the path to the location of the byte store on disk, or `null` if
+  /// there is no on-disk byte store.
   String _getByteStorePath() {
     if (resourceProvider is PhysicalResourceProvider) {
       Folder stateLocation =
@@ -1033,10 +696,8 @@
     return null;
   }
 
-  /**
-   * Returns `true` if there is a subscription for the given [service] and
-   * [file].
-   */
+  /// Returns `true` if there is a subscription for the given [service] and
+  /// [file].
   bool _hasAnalysisServiceSubscription(AnalysisService service, String file) {
     return analysisServices[service]?.contains(file) ?? false;
   }
@@ -1055,9 +716,7 @@
   }
 }
 
-/**
- * Various IDE options.
- */
+/// Various IDE options.
 class AnalysisServerOptions {
   bool useAnalysisHighlight2 = false;
 
@@ -1067,48 +726,37 @@
   String clientId;
   String clientVersion;
 
-  /**
-   * Base path where to cache data.
-   */
+  /// Base path where to cache data.
   String cacheFolder;
 
-  /**
-   * The analytics instance; note, this object can be `null`, and should be
-   * accessed via a null-aware operator.
-   */
+  /// The analytics instance; note, this object can be `null`, and should be
+  /// accessed via a null-aware operator.
   telemetry.Analytics analytics;
 
-  /**
-   * The crash report sender instance; note, this object can be `null`, and
-   * should be accessed via a null-aware operator.
-   */
+  /// The crash report sender instance; note, this object can be `null`, and
+  /// should be accessed via a null-aware operator.
   CrashReportSender crashReportSender;
 
-  /**
-   * Whether to enable parsing via the Fasta parser.
-   */
+  /// Whether to use the Language Server Protocol.
+  bool useLanguageServerProtocol = false;
+
+  /// Whether to enable parsing via the Fasta parser.
   bool useFastaParser = true;
 
-  /**
-   * User Experience, Experiment #1. This experiment changes the notion of
-   * what analysis roots are and priority files: the analysis root is set to be
-   * the priority files' containing directory.
-   */
+  /// User Experience, Experiment #1. This experiment changes the notion of
+  /// what analysis roots are and priority files: the analysis root is set to be
+  /// the priority files' containing directory.
   bool enableUXExperiment1 = false;
 
-  /**
-   * User Experience, Experiment #2. This experiment introduces the notion of an
-   * intermittent file system.
-   */
+  /// User Experience, Experiment #2. This experiment introduces the notion of
+  /// an intermittent file system.
   bool enableUXExperiment2 = false;
 }
 
 class ServerContextManagerCallbacks extends ContextManagerCallbacks {
   final AnalysisServer analysisServer;
 
-  /**
-   * The [ResourceProvider] by which paths are converted into [Resource]s.
-   */
+  /// The [ResourceProvider] by which paths are converted into [Resource]s.
   final ResourceProvider resourceProvider;
 
   ServerContextManagerCallbacks(this.analysisServer, this.resourceProvider);
@@ -1132,7 +780,7 @@
               NotificationManager.serverId,
               path,
               server.doAnalysisError_listFromEngine(
-                  result.driver.analysisOptions,
+                  result.session.analysisContext.analysisOptions,
                   result.lineInfo,
                   result.errors));
         } else {
@@ -1232,8 +880,8 @@
         if (analysisServer._hasFlutterServiceSubscription(
             FlutterService.OUTLINE, path)) {
           _runDelayed(() {
-            sendFlutterNotificationOutline(
-                analysisServer, path, result.content, result.lineInfo, unit);
+            sendFlutterNotificationOutline(analysisServer, path, result.content,
+                result.lineInfo, unit, result.typeProvider);
           });
         }
         // TODO(scheglov) Implement notifications for AnalysisService.IMPLEMENTED.
@@ -1303,15 +951,15 @@
     builderOptions.defaultOptions = options;
     builderOptions.defaultPackageFilePath = defaultPackageFilePath;
     builderOptions.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
-    ContextBuilder builder = new ContextBuilder(resourceProvider,
-        analysisServer.sdkManager, analysisServer.overlayState,
+    ContextBuilder builder = new ContextBuilder(
+        resourceProvider, analysisServer.sdkManager, null,
         options: builderOptions);
     builder.fileResolverProvider = analysisServer.fileResolverProvider;
     builder.packageResolverProvider = analysisServer.packageResolverProvider;
     builder.analysisDriverScheduler = analysisServer.analysisDriverScheduler;
     builder.performanceLog = analysisServer._analysisPerformanceLogger;
     builder.byteStore = analysisServer.byteStore;
-    builder.fileContentOverlay = analysisServer.fileContentOverlay;
+    builder.enableIndex = true;
     return builder;
   }
 
@@ -1347,7 +995,7 @@
   server.AnalysisNavigationParams _computeNavigationParams(
       String path, CompilationUnit unit) {
     NavigationCollectorImpl collector = new NavigationCollectorImpl();
-    computeDartNavigation(collector, unit, null, null);
+    computeDartNavigation(resourceProvider, collector, unit, null, null);
     collector.createRegions();
     return new server.AnalysisNavigationParams(
         path, collector.regions, collector.targets, collector.files);
@@ -1382,29 +1030,25 @@
         libraryName: libraryName);
   }
 
-  /**
-   * Run [f] in a new [Future].
-   *
-   * This method is used to delay sending notifications. If there is a more
-   * important consumer of an analysis results, specifically a code completion
-   * computer, we want it to run before spending time of sending notifications.
-   *
-   * TODO(scheglov) Consider replacing this with full priority based scheduler.
-   *
-   * TODO(scheglov) Alternatively, if code completion work in a way that does
-   * not produce (at first) fully resolved unit, but only part of it - a single
-   * method, or a top-level declaration, we would not have this problem - the
-   * completion computer would be the only consumer of the partial analysis
-   * result.
-   */
+  /// Run [f] in a new [Future].
+  ///
+  /// This method is used to delay sending notifications. If there is a more
+  /// important consumer of an analysis results, specifically a code completion
+  /// computer, we want it to run before spending time of sending notifications.
+  ///
+  /// TODO(scheglov) Consider replacing this with full priority based scheduler.
+  ///
+  /// TODO(scheglov) Alternatively, if code completion work in a way that does
+  /// not produce (at first) fully resolved unit, but only part of it - a single
+  /// method, or a top-level declaration, we would not have this problem - the
+  /// completion computer would be the only consumer of the partial analysis
+  /// result.
   void _runDelayed(f()) {
     new Future(f);
   }
 }
 
-/**
- * Used to record server exceptions.
- */
+/// Used to record server exceptions.
 class ServerException {
   final String message;
   final dynamic exception;
@@ -1417,40 +1061,26 @@
   String toString() => message;
 }
 
-/**
- * A class used by [AnalysisServer] to record performance information
- * such as request latency.
- */
+/// A class used by [AnalysisServer] to record performance information
+/// such as request latency.
 class ServerPerformance {
-  /**
-   * The creation time and the time when performance information
-   * started to be recorded here.
-   */
+  /// The creation time and the time when performance information
+  /// started to be recorded here.
   final int startTime = new DateTime.now().millisecondsSinceEpoch;
 
-  /**
-   * The number of requests.
-   */
+  /// The number of requests.
   int requestCount = 0;
 
-  /**
-   * The total latency (milliseconds) for all recorded requests.
-   */
+  /// The total latency (milliseconds) for all recorded requests.
   int requestLatency = 0;
 
-  /**
-   * The maximum latency (milliseconds) for all recorded requests.
-   */
+  /// The maximum latency (milliseconds) for all recorded requests.
   int maxLatency = 0;
 
-  /**
-   * The number of requests with latency > 150 milliseconds.
-   */
+  /// The number of requests with latency > 150 milliseconds.
   int slowRequestCount = 0;
 
-  /**
-   * Log performance information about the given request.
-   */
+  /// Log performance information about the given request.
   void logRequest(Request request) {
     ++requestCount;
     if (request.clientRequestTime != null) {
@@ -1465,34 +1095,22 @@
   }
 }
 
-/**
- * Container with global [AnalysisServer] performance statistics.
- */
+/// Container with global [AnalysisServer] performance statistics.
 class ServerPerformanceStatistics {
-  /**
-   * The [PerformanceTag] for `package:analysis_server`.
-   */
+  /// The [PerformanceTag] for `package:analysis_server`.
   static final PerformanceTag server = new PerformanceTag('server');
 
-  /**
-   * The [PerformanceTag] for time spent between calls to
-   * AnalysisServer.performOperation when the server is idle.
-   */
+  /// The [PerformanceTag] for time spent between calls to
+  /// AnalysisServer.performOperation when the server is idle.
   static final PerformanceTag idle = new PerformanceTag('idle');
 
-  /**
-   * The [PerformanceTag] for time spent in
-   * PerformAnalysisOperation._sendNotices.
-   */
+  /// The [PerformanceTag] for time spent in
+  /// PerformAnalysisOperation._sendNotices.
   static final PerformanceTag notices = server.createChild('notices');
 
-  /**
-   * The [PerformanceTag] for time spent in server communication channels.
-   */
+  /// The [PerformanceTag] for time spent in server communication channels.
   static final PerformanceTag serverChannel = server.createChild('channel');
 
-  /**
-   * The [PerformanceTag] for time spent in server request handlers.
-   */
+  /// The [PerformanceTag] for time spent in server request handlers.
   static final PerformanceTag serverRequests = server.createChild('requests');
 }
diff --git a/pkg/analysis_server/lib/src/analysis_server_abstract.dart b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
new file mode 100644
index 0000000..bdc364e
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
@@ -0,0 +1,212 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:core';
+
+import 'package:analysis_server/src/context_manager.dart';
+import 'package:analysis_server/src/services/correction/namespace.dart';
+import 'package:analysis_server/src/services/search/element_visitors.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/exception/exception.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/overlay_file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart' as nd;
+import 'package:analyzer/src/dart/analysis/file_byte_store.dart'
+    show EvictingFileByteStore;
+import 'package:analyzer/src/dart/analysis/file_state.dart' as nd;
+import 'package:analyzer/src/dart/analysis/status.dart' as nd;
+import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/util/glob.dart';
+
+/// Implementations of [AbstractAnalysisServer] implement a server that listens
+/// on a [CommunicationChannel] for analysis messages and process them.
+abstract class AbstractAnalysisServer {
+  /// The [ContextManager] that handles the mapping from analysis roots to
+  /// context directories.
+  ContextManager contextManager;
+
+  /// The set of the files that are currently priority.
+  final Set<String> priorityFiles = new Set<String>();
+
+  final List<String> analyzableFilePatterns = <String>[
+    '**/*.${AnalysisEngine.SUFFIX_DART}',
+    '**/*.${AnalysisEngine.SUFFIX_HTML}',
+    '**/*.${AnalysisEngine.SUFFIX_HTM}',
+    '**/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}',
+    '**/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}',
+    '**/${AnalysisEngine.PUBSPEC_YAML_FILE}'
+  ];
+
+  /// The [ResourceProvider] using which paths are converted into [Resource]s.
+  final OverlayResourceProvider resourceProvider;
+
+  /// A list of the globs used to determine which files should be analyzed. The
+  /// list is lazily created and should be accessed using [analyzedFilesGlobs].
+  List<Glob> _analyzedFilesGlobs = null;
+
+  AbstractAnalysisServer(ResourceProvider baseResourceProvider)
+      : resourceProvider = OverlayResourceProvider(baseResourceProvider);
+
+  /// Return a list of the globs used to determine which files should be
+  /// analyzed.
+  List<Glob> get analyzedFilesGlobs {
+    if (_analyzedFilesGlobs == null) {
+      _analyzedFilesGlobs = <Glob>[];
+      for (String pattern in analyzableFilePatterns) {
+        try {
+          _analyzedFilesGlobs
+              .add(new Glob(resourceProvider.pathContext.separator, pattern));
+        } catch (exception, stackTrace) {
+          AnalysisEngine.instance.logger.logError(
+              'Invalid glob pattern: "$pattern"',
+              new CaughtException(exception, stackTrace));
+        }
+      }
+    }
+    return _analyzedFilesGlobs;
+  }
+
+  /// The list of current analysis sessions in all contexts.
+  List<AnalysisSession> get currentSessions {
+    return driverMap.values.map((driver) => driver.currentSession).toList();
+  }
+
+  /// A table mapping [Folder]s to the [AnalysisDriver]s associated with them.
+  Map<Folder, nd.AnalysisDriver> get driverMap => contextManager.driverMap;
+
+  /// If the state location can be accessed, return the file byte store,
+  /// otherwise return the memory byte store.
+  ByteStore createByteStore(ResourceProvider resourceProvider) {
+    const int M = 1024 * 1024 /*1 MiB*/;
+    const int G = 1024 * 1024 * 1024 /*1 GiB*/;
+
+    const int memoryCacheSize = 128 * M;
+
+    if (resourceProvider is OverlayResourceProvider) {
+      OverlayResourceProvider overlay = resourceProvider;
+      resourceProvider = overlay.baseProvider;
+    }
+    if (resourceProvider is PhysicalResourceProvider) {
+      Folder stateLocation =
+          resourceProvider.getStateLocation('.analysis-driver');
+      if (stateLocation != null) {
+        return new MemoryCachingByteStore(
+            new EvictingFileByteStore(stateLocation.path, G), memoryCacheSize);
+      }
+    }
+
+    return new MemoryCachingByteStore(new NullByteStore(), memoryCacheSize);
+  }
+
+  /// Return an analysis driver to which the file with the given [path] is
+  /// added if one exists, otherwise a driver in which the file was analyzed if
+  /// one exists, otherwise the first driver, otherwise `null`.
+  nd.AnalysisDriver getAnalysisDriver(String path) {
+    List<nd.AnalysisDriver> drivers = driverMap.values.toList();
+    if (drivers.isNotEmpty) {
+      // Sort the drivers so that more deeply nested contexts will be checked
+      // before enclosing contexts.
+      drivers.sort((first, second) =>
+          second.contextRoot.root.length - first.contextRoot.root.length);
+      nd.AnalysisDriver driver = drivers.firstWhere(
+          (driver) => driver.contextRoot.containsFile(path),
+          orElse: () => null);
+      driver ??= drivers.firstWhere(
+          (driver) => driver.knownFiles.contains(path),
+          orElse: () => null);
+      driver ??= drivers.first;
+      return driver;
+    }
+    return null;
+  }
+
+  /// Return a [Future] that completes with the [Element] at the given
+  /// [offset] of the given [file], or with `null` if there is no node at the
+  /// [offset] or the node does not have an element.
+  Future<Element> getElementAtOffset(String file, int offset) async {
+    // TODO(brianwilkerson) Determine whether this await is necessary.
+    await null;
+    if (!priorityFiles.contains(file)) {
+      var driver = getAnalysisDriver(file);
+      if (driver == null) {
+        return null;
+      }
+
+      var unitElementResult = await driver.getUnitElement(file);
+      if (unitElementResult == null) {
+        return null;
+      }
+
+      var element = findElementByNameOffset(unitElementResult.element, offset);
+      if (element != null) {
+        return element;
+      }
+    }
+
+    AstNode node = await getNodeAtOffset(file, offset);
+    return getElementOfNode(node);
+  }
+
+  /// Return the [Element] of the given [node], or `null` if [node] is `null` or
+  /// does not have an element.
+  Element getElementOfNode(AstNode node) {
+    if (node == null) {
+      return null;
+    }
+    if (node is SimpleIdentifier && node.parent is LibraryIdentifier) {
+      node = node.parent;
+    }
+    if (node is LibraryIdentifier) {
+      node = node.parent;
+    }
+    if (node is StringLiteral && node.parent is UriBasedDirective) {
+      return null;
+    }
+    Element element = ElementLocator.locate(node);
+    if (node is SimpleIdentifier && element is PrefixElement) {
+      element = getImportElement(node);
+    }
+    return element;
+  }
+
+  /// Return a [Future] that completes with the resolved [AstNode] at the
+  /// given [offset] of the given [file], or with `null` if there is no node as
+  /// the [offset].
+  Future<AstNode> getNodeAtOffset(String file, int offset) async {
+    // TODO(brianwilkerson) Determine whether this await is necessary.
+    await null;
+    ResolvedUnitResult result = await getResolvedUnit(file);
+    CompilationUnit unit = result?.unit;
+    if (unit != null) {
+      return new NodeLocator(offset).searchWithin(unit);
+    }
+    return null;
+  }
+
+  /// Return the resolved unit for the file with the given [path]. The file is
+  /// analyzed in one of the analysis drivers to which the file was added,
+  /// otherwise in the first driver, otherwise `null` is returned.
+  Future<ResolvedUnitResult> getResolvedUnit(String path,
+      {bool sendCachedToStream: false}) {
+    if (!AnalysisEngine.isDartFileName(path)) {
+      return null;
+    }
+
+    nd.AnalysisDriver driver = getAnalysisDriver(path);
+    if (driver == null) {
+      return new Future.value();
+    }
+
+    return driver
+        .getResult(path, sendCachedToStream: sendCachedToStream)
+        .catchError((_) => null);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart b/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
index d1fe2d4..19ff554 100644
--- a/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_closingLabels.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -45,8 +45,7 @@
 /**
  * An AST visitor for [DartUnitClosingLabelsComputer].
  */
-class _DartUnitClosingLabelsComputerVisitor
-    extends RecursiveAstVisitor<Object> {
+class _DartUnitClosingLabelsComputerVisitor extends RecursiveAstVisitor<void> {
   final DartUnitClosingLabelsComputer computer;
 
   int interpolatedStringsEntered = 0;
@@ -57,7 +56,7 @@
   ClosingLabel get _currentLabel => labelStack.isEmpty ? null : labelStack.last;
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     ClosingLabel label;
 
     if (node.argumentList != null) {
@@ -75,14 +74,14 @@
     if (label != null) _pushLabel(label);
 
     try {
-      return super.visitInstanceCreationExpression(node);
+      super.visitInstanceCreationExpression(node);
     } finally {
       if (label != null) _popLabel();
     }
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     final NodeList<TypeAnnotation> args = node.typeArguments?.arguments;
     final String typeName = args != null ? args[0]?.toString() : null;
 
@@ -95,17 +94,17 @@
     if (label != null) _pushLabel(label);
 
     try {
-      return super.visitListLiteral(node);
+      super.visitListLiteral(node);
     } finally {
       if (label != null) _popLabel();
     }
   }
 
   @override
-  Object visitStringInterpolation(StringInterpolation node) {
+  void visitStringInterpolation(StringInterpolation node) {
     interpolatedStringsEntered++;
     try {
-      return super.visitStringInterpolation(node);
+      super.visitStringInterpolation(node);
     } finally {
       interpolatedStringsEntered--;
     }
diff --git a/pkg/analysis_server/lib/src/computer/computer_folding.dart b/pkg/analysis_server/lib/src/computer/computer_folding.dart
index 9488775..4edf2fc 100644
--- a/pkg/analysis_server/lib/src/computer/computer_folding.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_folding.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -105,129 +105,129 @@
 /**
  * An AST visitor for [DartUnitFoldingComputer].
  */
-class _DartUnitFoldingComputerVisitor extends RecursiveAstVisitor<Object> {
+class _DartUnitFoldingComputerVisitor extends RecursiveAstVisitor<void> {
   final DartUnitFoldingComputer _computer;
   _DartUnitFoldingComputerVisitor(this._computer);
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     _computer._addRegion(node.block.leftBracket.end,
         node.block.rightBracket.offset, FoldingKind.FUNCTION_BODY);
-    return super.visitBlockFunctionBody(node);
+    super.visitBlockFunctionBody(node);
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     _computer._addRegionForAnnotations(node.metadata);
     _computer._addRegion(
         node.leftBracket.end, node.rightBracket.offset, FoldingKind.CLASS_BODY);
-    return super.visitClassDeclaration(node);
+    super.visitClassDeclaration(node);
   }
 
   @override
-  Object visitComment(Comment node) {
+  void visitComment(Comment node) {
     if (node.isDocumentation) {
       _computer._addRegion(
           node.offset, node.end, FoldingKind.DOCUMENTATION_COMMENT);
     }
-    return super.visitComment(node);
+    super.visitComment(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     _computer._addRegionForAnnotations(node.metadata);
-    return super.visitConstructorDeclaration(node);
+    super.visitConstructorDeclaration(node);
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     _computer._recordDirective(node);
-    return super.visitExportDirective(node);
+    super.visitExportDirective(node);
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     _computer._addRegionForAnnotations(node.metadata);
-    return super.visitFieldDeclaration(node);
+    super.visitFieldDeclaration(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     _computer._addRegionForAnnotations(node.metadata);
-    return super.visitFunctionDeclaration(node);
+    super.visitFunctionDeclaration(node);
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     _computer._addRegion(node.argumentList.leftParenthesis.end,
         node.argumentList.rightParenthesis.offset, FoldingKind.INVOCATION);
-    return super.visitFunctionExpressionInvocation(node);
+    super.visitFunctionExpressionInvocation(node);
   }
 
   @override
-  visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     _computer._recordDirective(node);
-    return super.visitImportDirective(node);
+    super.visitImportDirective(node);
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     _computer._addRegion(node.argumentList.leftParenthesis.end,
         node.argumentList.rightParenthesis.offset, FoldingKind.INVOCATION);
-    return super.visitInstanceCreationExpression(node);
+    super.visitInstanceCreationExpression(node);
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     _computer._recordDirective(node);
-    return super.visitLibraryDirective(node);
+    super.visitLibraryDirective(node);
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     _computer._addRegion(
         node.leftBracket.end, node.rightBracket.offset, FoldingKind.LITERAL);
-    return super.visitListLiteral(node);
+    super.visitListLiteral(node);
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     _computer._addRegion(
         node.leftBracket.end, node.rightBracket.offset, FoldingKind.LITERAL);
-    return super.visitMapLiteral(node);
+    super.visitMapLiteral(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     _computer._addRegionForAnnotations(node.metadata);
-    return super.visitMethodDeclaration(node);
+    super.visitMethodDeclaration(node);
   }
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     _computer._addRegion(node.argumentList.leftParenthesis.end,
         node.argumentList.rightParenthesis.offset, FoldingKind.INVOCATION);
-    return super.visitMethodInvocation(node);
+    super.visitMethodInvocation(node);
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     _computer._addRegionForAnnotations(node.metadata);
     // TODO(brianwilkerson) Define `FoldingKind.MIXIN_BODY`?
     _computer._addRegion(
         node.leftBracket.end, node.rightBracket.offset, FoldingKind.CLASS_BODY);
-    return super.visitMixinDeclaration(node);
+    super.visitMixinDeclaration(node);
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     _computer._recordDirective(node);
-    return super.visitPartDirective(node);
+    super.visitPartDirective(node);
   }
 
   @override
-  Object visitPartOfDirective(PartOfDirective node) {
+  void visitPartOfDirective(PartOfDirective node) {
     _computer._recordDirective(node);
-    return super.visitPartOfDirective(node);
+    super.visitPartOfDirective(node);
   }
 }
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index b0b5d40..39c1e8e 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -344,251 +344,251 @@
 /**
  * An AST visitor for [DartUnitHighlightsComputer].
  */
-class _DartUnitHighlightsComputerVisitor extends RecursiveAstVisitor<Object> {
+class _DartUnitHighlightsComputerVisitor extends RecursiveAstVisitor<void> {
   final DartUnitHighlightsComputer computer;
 
   _DartUnitHighlightsComputerVisitor(this.computer);
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     computer._addIdentifierRegion_annotation(node);
-    return super.visitAnnotation(node);
+    super.visitAnnotation(node);
   }
 
   @override
-  Object visitAsExpression(AsExpression node) {
+  void visitAsExpression(AsExpression node) {
     computer._addRegion_token(node.asOperator, HighlightRegionType.BUILT_IN);
-    return super.visitAsExpression(node);
+    super.visitAsExpression(node);
   }
 
   @override
-  Object visitAssertStatement(AssertStatement node) {
+  void visitAssertStatement(AssertStatement node) {
     computer._addRegion_token(node.assertKeyword, HighlightRegionType.KEYWORD);
-    return super.visitAssertStatement(node);
+    super.visitAssertStatement(node);
   }
 
   @override
-  Object visitAwaitExpression(AwaitExpression node) {
+  void visitAwaitExpression(AwaitExpression node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitAwaitExpression(node);
+    super.visitAwaitExpression(node);
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     _addRegions_functionBody(node);
-    return super.visitBlockFunctionBody(node);
+    super.visitBlockFunctionBody(node);
   }
 
   @override
-  Object visitBooleanLiteral(BooleanLiteral node) {
+  void visitBooleanLiteral(BooleanLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.KEYWORD);
     computer._addRegion_node(node, HighlightRegionType.LITERAL_BOOLEAN);
-    return super.visitBooleanLiteral(node);
+    super.visitBooleanLiteral(node);
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     computer._addRegion_token(node.breakKeyword, HighlightRegionType.KEYWORD);
-    return super.visitBreakStatement(node);
+    super.visitBreakStatement(node);
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     computer._addRegion_token(node.catchKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.onKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitCatchClause(node);
+    super.visitCatchClause(node);
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     computer._addRegion_token(node.classKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(
         node.abstractKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitClassDeclaration(node);
+    super.visitClassDeclaration(node);
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     computer._addRegion_token(
         node.abstractKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitClassTypeAlias(node);
+    super.visitClassTypeAlias(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.factoryKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitConstructorDeclaration(node);
+    super.visitConstructorDeclaration(node);
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     computer._addRegion_token(
         node.continueKeyword, HighlightRegionType.KEYWORD);
-    return super.visitContinueStatement(node);
+    super.visitContinueStatement(node);
   }
 
   @override
-  Object visitDoStatement(DoStatement node) {
+  void visitDoStatement(DoStatement node) {
     computer._addRegion_token(node.doKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.whileKeyword, HighlightRegionType.KEYWORD);
-    return super.visitDoStatement(node);
+    super.visitDoStatement(node);
   }
 
   @override
-  Object visitDoubleLiteral(DoubleLiteral node) {
+  void visitDoubleLiteral(DoubleLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_DOUBLE);
-    return super.visitDoubleLiteral(node);
+    super.visitDoubleLiteral(node);
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     computer._addRegion_token(node.enumKeyword, HighlightRegionType.KEYWORD);
-    return super.visitEnumDeclaration(node);
+    super.visitEnumDeclaration(node);
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitExportDirective(node);
+    super.visitExportDirective(node);
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     _addRegions_functionBody(node);
-    return super.visitExpressionFunctionBody(node);
+    super.visitExpressionFunctionBody(node);
   }
 
   @override
-  Object visitExtendsClause(ExtendsClause node) {
+  void visitExtendsClause(ExtendsClause node) {
     computer._addRegion_token(node.extendsKeyword, HighlightRegionType.KEYWORD);
-    return super.visitExtendsClause(node);
+    super.visitExtendsClause(node);
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     computer._addRegion_token(node.staticKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitFieldDeclaration(node);
+    super.visitFieldDeclaration(node);
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.inKeyword, HighlightRegionType.KEYWORD);
-    return super.visitForEachStatement(node);
+    super.visitForEachStatement(node);
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    return super.visitForStatement(node);
+    super.visitForStatement(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.propertyKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitFunctionDeclaration(node);
+    super.visitFunctionDeclaration(node);
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     computer._addRegion_token(
         node.typedefKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitFunctionTypeAlias(node);
+    super.visitFunctionTypeAlias(node);
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) {
+  void visitGenericFunctionType(GenericFunctionType node) {
     computer._addRegion_token(
         node.functionKeyword, HighlightRegionType.KEYWORD);
-    return super.visitGenericFunctionType(node);
+    super.visitGenericFunctionType(node);
   }
 
   @override
-  Object visitGenericTypeAlias(GenericTypeAlias node) {
+  void visitGenericTypeAlias(GenericTypeAlias node) {
     computer._addRegion_token(node.typedefKeyword, HighlightRegionType.KEYWORD);
-    return super.visitGenericTypeAlias(node);
+    super.visitGenericTypeAlias(node);
   }
 
   @override
-  Object visitHideCombinator(HideCombinator node) {
+  void visitHideCombinator(HideCombinator node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitHideCombinator(node);
+    super.visitHideCombinator(node);
   }
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     computer._addRegion_token(node.ifKeyword, HighlightRegionType.KEYWORD);
-    return super.visitIfStatement(node);
+    super.visitIfStatement(node);
   }
 
   @override
-  Object visitImplementsClause(ImplementsClause node) {
+  void visitImplementsClause(ImplementsClause node) {
     computer._addRegion_token(
         node.implementsKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitImplementsClause(node);
+    super.visitImplementsClause(node);
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.deferredKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.asKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitImportDirective(node);
+    super.visitImportDirective(node);
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     if (node.keyword != null) {
       computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
     }
-    return super.visitInstanceCreationExpression(node);
+    super.visitInstanceCreationExpression(node);
   }
 
   @override
-  Object visitIntegerLiteral(IntegerLiteral node) {
+  void visitIntegerLiteral(IntegerLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_INTEGER);
-    return super.visitIntegerLiteral(node);
+    super.visitIntegerLiteral(node);
   }
 
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     computer._addRegion_token(node.isOperator, HighlightRegionType.KEYWORD);
-    return super.visitIsExpression(node);
+    super.visitIsExpression(node);
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitLibraryDirective(node);
+    super.visitLibraryDirective(node);
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_LIST);
     computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    return super.visitListLiteral(node);
+    super.visitListLiteral(node);
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
     computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    return super.visitMapLiteral(node);
+    super.visitMapLiteral(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
@@ -597,117 +597,117 @@
         node.operatorKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.propertyKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitMethodDeclaration(node);
+    super.visitMethodDeclaration(node);
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     computer._addRegion_token(node.mixinKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitMixinDeclaration(node);
+    super.visitMixinDeclaration(node);
   }
 
   @override
-  Object visitNativeClause(NativeClause node) {
+  void visitNativeClause(NativeClause node) {
     computer._addRegion_token(node.nativeKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitNativeClause(node);
+    super.visitNativeClause(node);
   }
 
   @override
-  Object visitNativeFunctionBody(NativeFunctionBody node) {
+  void visitNativeFunctionBody(NativeFunctionBody node) {
     computer._addRegion_token(node.nativeKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitNativeFunctionBody(node);
+    super.visitNativeFunctionBody(node);
   }
 
   @override
-  Object visitOnClause(OnClause node) {
+  void visitOnClause(OnClause node) {
     computer._addRegion_token(node.onKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitOnClause(node);
+    super.visitOnClause(node);
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitPartDirective(node);
+    super.visitPartDirective(node);
   }
 
   @override
-  Object visitPartOfDirective(PartOfDirective node) {
+  void visitPartOfDirective(PartOfDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_tokenStart_tokenEnd(
         node.partKeyword, node.ofKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitPartOfDirective(node);
+    super.visitPartOfDirective(node);
   }
 
   @override
-  Object visitRethrowExpression(RethrowExpression node) {
+  void visitRethrowExpression(RethrowExpression node) {
     computer._addRegion_token(node.rethrowKeyword, HighlightRegionType.KEYWORD);
-    return super.visitRethrowExpression(node);
+    super.visitRethrowExpression(node);
   }
 
   @override
-  Object visitReturnStatement(ReturnStatement node) {
+  void visitReturnStatement(ReturnStatement node) {
     computer._addRegion_token(node.returnKeyword, HighlightRegionType.KEYWORD);
-    return super.visitReturnStatement(node);
+    super.visitReturnStatement(node);
   }
 
   @override
-  Object visitShowCombinator(ShowCombinator node) {
+  void visitShowCombinator(ShowCombinator node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitShowCombinator(node);
+    super.visitShowCombinator(node);
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     computer._addIdentifierRegion(node);
-    return super.visitSimpleIdentifier(node);
+    super.visitSimpleIdentifier(node);
   }
 
   @override
-  Object visitSimpleStringLiteral(SimpleStringLiteral node) {
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_STRING);
-    return super.visitSimpleStringLiteral(node);
+    super.visitSimpleStringLiteral(node);
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     computer._addRegion_token(node.superKeyword, HighlightRegionType.KEYWORD);
-    return super.visitSuperConstructorInvocation(node);
+    super.visitSuperConstructorInvocation(node);
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
-    return super.visitSwitchCase(node);
+    super.visitSwitchCase(node);
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
-    return super.visitSwitchDefault(node);
+    super.visitSwitchDefault(node);
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSwitchStatement(SwitchStatement node) {
     computer._addRegion_token(node.switchKeyword, HighlightRegionType.KEYWORD);
-    return super.visitSwitchStatement(node);
+    super.visitSwitchStatement(node);
   }
 
   @override
-  Object visitThisExpression(ThisExpression node) {
+  void visitThisExpression(ThisExpression node) {
     computer._addRegion_token(node.thisKeyword, HighlightRegionType.KEYWORD);
-    return super.visitThisExpression(node);
+    super.visitThisExpression(node);
   }
 
   @override
-  Object visitTryStatement(TryStatement node) {
+  void visitTryStatement(TryStatement node) {
     computer._addRegion_token(node.tryKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.finallyKeyword, HighlightRegionType.KEYWORD);
-    return super.visitTryStatement(node);
+    super.visitTryStatement(node);
   }
 
   @override
-  Object visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     DartType type = node.type;
     if (type != null) {
       if (type.isDynamic && node.name.name == "dynamic") {
@@ -715,35 +715,35 @@
         return null;
       }
     }
-    return super.visitTypeName(node);
+    super.visitTypeName(node);
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
-    return super.visitVariableDeclarationList(node);
+    super.visitVariableDeclarationList(node);
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     computer._addRegion_token(node.whileKeyword, HighlightRegionType.KEYWORD);
-    return super.visitWhileStatement(node);
+    super.visitWhileStatement(node);
   }
 
   @override
-  Object visitWithClause(WithClause node) {
+  void visitWithClause(WithClause node) {
     computer._addRegion_token(node.withKeyword, HighlightRegionType.KEYWORD);
-    return super.visitWithClause(node);
+    super.visitWithClause(node);
   }
 
   @override
-  Object visitYieldStatement(YieldStatement node) {
+  void visitYieldStatement(YieldStatement node) {
     Token keyword = node.yieldKeyword;
     Token star = node.star;
     int offset = keyword.offset;
     int end = star != null ? star.end : keyword.end;
     computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN);
-    return super.visitYieldStatement(node);
+    super.visitYieldStatement(node);
   }
 
   void _addRegions_functionBody(FunctionBody node) {
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index dad226c..6ae85e2 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -435,257 +435,257 @@
 /**
  * An AST visitor for [DartUnitHighlightsComputer2].
  */
-class _DartUnitHighlightsComputerVisitor2 extends RecursiveAstVisitor<Object> {
+class _DartUnitHighlightsComputerVisitor2 extends RecursiveAstVisitor<void> {
   final DartUnitHighlightsComputer2 computer;
 
   _DartUnitHighlightsComputerVisitor2(this.computer);
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     computer._addIdentifierRegion_annotation(node);
-    return super.visitAnnotation(node);
+    super.visitAnnotation(node);
   }
 
   @override
-  Object visitAsExpression(AsExpression node) {
+  void visitAsExpression(AsExpression node) {
     computer._addRegion_token(node.asOperator, HighlightRegionType.BUILT_IN);
-    return super.visitAsExpression(node);
+    super.visitAsExpression(node);
   }
 
   @override
-  Object visitAssertStatement(AssertStatement node) {
+  void visitAssertStatement(AssertStatement node) {
     computer._addRegion_token(node.assertKeyword, HighlightRegionType.KEYWORD);
-    return super.visitAssertStatement(node);
+    super.visitAssertStatement(node);
   }
 
   @override
-  Object visitAwaitExpression(AwaitExpression node) {
+  void visitAwaitExpression(AwaitExpression node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitAwaitExpression(node);
+    super.visitAwaitExpression(node);
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     _addRegions_functionBody(node);
-    return super.visitBlockFunctionBody(node);
+    super.visitBlockFunctionBody(node);
   }
 
   @override
-  Object visitBooleanLiteral(BooleanLiteral node) {
+  void visitBooleanLiteral(BooleanLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.KEYWORD);
     computer._addRegion_node(node, HighlightRegionType.LITERAL_BOOLEAN);
-    return super.visitBooleanLiteral(node);
+    super.visitBooleanLiteral(node);
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     computer._addRegion_token(node.breakKeyword, HighlightRegionType.KEYWORD);
-    return super.visitBreakStatement(node);
+    super.visitBreakStatement(node);
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     computer._addRegion_token(node.catchKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.onKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitCatchClause(node);
+    super.visitCatchClause(node);
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     computer._addRegion_token(node.classKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(
         node.abstractKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitClassDeclaration(node);
+    super.visitClassDeclaration(node);
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     computer._addRegion_token(
         node.abstractKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitClassTypeAlias(node);
+    super.visitClassTypeAlias(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.factoryKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitConstructorDeclaration(node);
+    super.visitConstructorDeclaration(node);
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     computer._addRegion_token(
         node.continueKeyword, HighlightRegionType.KEYWORD);
-    return super.visitContinueStatement(node);
+    super.visitContinueStatement(node);
   }
 
   @override
-  Object visitDoStatement(DoStatement node) {
+  void visitDoStatement(DoStatement node) {
     computer._addRegion_token(node.doKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.whileKeyword, HighlightRegionType.KEYWORD);
-    return super.visitDoStatement(node);
+    super.visitDoStatement(node);
   }
 
   @override
-  Object visitDoubleLiteral(DoubleLiteral node) {
+  void visitDoubleLiteral(DoubleLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_DOUBLE);
-    return super.visitDoubleLiteral(node);
+    super.visitDoubleLiteral(node);
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     computer._addRegion_token(node.enumKeyword, HighlightRegionType.KEYWORD);
-    return super.visitEnumDeclaration(node);
+    super.visitEnumDeclaration(node);
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitExportDirective(node);
+    super.visitExportDirective(node);
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     _addRegions_functionBody(node);
-    return super.visitExpressionFunctionBody(node);
+    super.visitExpressionFunctionBody(node);
   }
 
   @override
-  Object visitExtendsClause(ExtendsClause node) {
+  void visitExtendsClause(ExtendsClause node) {
     computer._addRegion_token(node.extendsKeyword, HighlightRegionType.KEYWORD);
-    return super.visitExtendsClause(node);
+    super.visitExtendsClause(node);
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     computer._addRegion_token(node.staticKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitFieldDeclaration(node);
+    super.visitFieldDeclaration(node);
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.inKeyword, HighlightRegionType.KEYWORD);
-    return super.visitForEachStatement(node);
+    super.visitForEachStatement(node);
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    return super.visitForStatement(node);
+    super.visitForStatement(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.propertyKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitFunctionDeclaration(node);
+    super.visitFunctionDeclaration(node);
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     computer._addRegion_token(
         node.typedefKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitFunctionTypeAlias(node);
+    super.visitFunctionTypeAlias(node);
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) {
+  void visitGenericFunctionType(GenericFunctionType node) {
     computer._addRegion_token(
         node.functionKeyword, HighlightRegionType.KEYWORD);
-    return super.visitGenericFunctionType(node);
+    super.visitGenericFunctionType(node);
   }
 
   @override
-  Object visitGenericTypeAlias(GenericTypeAlias node) {
+  void visitGenericTypeAlias(GenericTypeAlias node) {
     computer._addRegion_token(node.typedefKeyword, HighlightRegionType.KEYWORD);
-    return super.visitGenericTypeAlias(node);
+    super.visitGenericTypeAlias(node);
   }
 
   @override
-  Object visitHideCombinator(HideCombinator node) {
+  void visitHideCombinator(HideCombinator node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitHideCombinator(node);
+    super.visitHideCombinator(node);
   }
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     computer._addRegion_token(node.ifKeyword, HighlightRegionType.KEYWORD);
-    return super.visitIfStatement(node);
+    super.visitIfStatement(node);
   }
 
   @override
-  Object visitImplementsClause(ImplementsClause node) {
+  void visitImplementsClause(ImplementsClause node) {
     computer._addRegion_token(
         node.implementsKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitImplementsClause(node);
+    super.visitImplementsClause(node);
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.deferredKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.asKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitImportDirective(node);
+    super.visitImportDirective(node);
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     if (node.keyword != null) {
       computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
     }
-    return super.visitInstanceCreationExpression(node);
+    super.visitInstanceCreationExpression(node);
   }
 
   @override
-  Object visitIntegerLiteral(IntegerLiteral node) {
+  void visitIntegerLiteral(IntegerLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_INTEGER);
-    return super.visitIntegerLiteral(node);
+    super.visitIntegerLiteral(node);
   }
 
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     computer._addRegion_token(node.isOperator, HighlightRegionType.KEYWORD);
-    return super.visitIsExpression(node);
+    super.visitIsExpression(node);
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitLibraryDirective(node);
+    super.visitLibraryDirective(node);
   }
 
   @override
-  Object visitLibraryIdentifier(LibraryIdentifier node) {
+  void visitLibraryIdentifier(LibraryIdentifier node) {
     computer._addRegion_node(node, HighlightRegionType.LIBRARY_NAME);
-    return null;
+    null;
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_LIST);
     computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    return super.visitListLiteral(node);
+    super.visitListLiteral(node);
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
     computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    return super.visitMapLiteral(node);
+    super.visitMapLiteral(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
@@ -694,117 +694,117 @@
         node.operatorKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(
         node.propertyKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitMethodDeclaration(node);
+    super.visitMethodDeclaration(node);
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     computer._addRegion_token(node.mixinKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitMixinDeclaration(node);
+    super.visitMixinDeclaration(node);
   }
 
   @override
-  Object visitNativeClause(NativeClause node) {
+  void visitNativeClause(NativeClause node) {
     computer._addRegion_token(node.nativeKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitNativeClause(node);
+    super.visitNativeClause(node);
   }
 
   @override
-  Object visitNativeFunctionBody(NativeFunctionBody node) {
+  void visitNativeFunctionBody(NativeFunctionBody node) {
     computer._addRegion_token(node.nativeKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitNativeFunctionBody(node);
+    super.visitNativeFunctionBody(node);
   }
 
   @override
-  Object visitOnClause(OnClause node) {
+  void visitOnClause(OnClause node) {
     computer._addRegion_token(node.onKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitOnClause(node);
+    super.visitOnClause(node);
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitPartDirective(node);
+    super.visitPartDirective(node);
   }
 
   @override
-  Object visitPartOfDirective(PartOfDirective node) {
+  void visitPartOfDirective(PartOfDirective node) {
     computer._addRegion_node(node, HighlightRegionType.DIRECTIVE);
     computer._addRegion_tokenStart_tokenEnd(
         node.partKeyword, node.ofKeyword, HighlightRegionType.BUILT_IN);
-    return super.visitPartOfDirective(node);
+    super.visitPartOfDirective(node);
   }
 
   @override
-  Object visitRethrowExpression(RethrowExpression node) {
+  void visitRethrowExpression(RethrowExpression node) {
     computer._addRegion_token(node.rethrowKeyword, HighlightRegionType.KEYWORD);
-    return super.visitRethrowExpression(node);
+    super.visitRethrowExpression(node);
   }
 
   @override
-  Object visitReturnStatement(ReturnStatement node) {
+  void visitReturnStatement(ReturnStatement node) {
     computer._addRegion_token(node.returnKeyword, HighlightRegionType.KEYWORD);
-    return super.visitReturnStatement(node);
+    super.visitReturnStatement(node);
   }
 
   @override
-  Object visitShowCombinator(ShowCombinator node) {
+  void visitShowCombinator(ShowCombinator node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN);
-    return super.visitShowCombinator(node);
+    super.visitShowCombinator(node);
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     computer._addIdentifierRegion(node);
-    return super.visitSimpleIdentifier(node);
+    super.visitSimpleIdentifier(node);
   }
 
   @override
-  Object visitSimpleStringLiteral(SimpleStringLiteral node) {
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
     computer._addRegion_node(node, HighlightRegionType.LITERAL_STRING);
-    return super.visitSimpleStringLiteral(node);
+    super.visitSimpleStringLiteral(node);
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     computer._addRegion_token(node.superKeyword, HighlightRegionType.KEYWORD);
-    return super.visitSuperConstructorInvocation(node);
+    super.visitSuperConstructorInvocation(node);
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
-    return super.visitSwitchCase(node);
+    super.visitSwitchCase(node);
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
-    return super.visitSwitchDefault(node);
+    super.visitSwitchDefault(node);
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSwitchStatement(SwitchStatement node) {
     computer._addRegion_token(node.switchKeyword, HighlightRegionType.KEYWORD);
-    return super.visitSwitchStatement(node);
+    super.visitSwitchStatement(node);
   }
 
   @override
-  Object visitThisExpression(ThisExpression node) {
+  void visitThisExpression(ThisExpression node) {
     computer._addRegion_token(node.thisKeyword, HighlightRegionType.KEYWORD);
-    return super.visitThisExpression(node);
+    super.visitThisExpression(node);
   }
 
   @override
-  Object visitTryStatement(TryStatement node) {
+  void visitTryStatement(TryStatement node) {
     computer._addRegion_token(node.tryKeyword, HighlightRegionType.KEYWORD);
     computer._addRegion_token(node.finallyKeyword, HighlightRegionType.KEYWORD);
-    return super.visitTryStatement(node);
+    super.visitTryStatement(node);
   }
 
   @override
-  Object visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     DartType type = node.type;
     if (type != null) {
       if (type.isDynamic && node.name.name == "dynamic") {
@@ -812,35 +812,35 @@
         return null;
       }
     }
-    return super.visitTypeName(node);
+    super.visitTypeName(node);
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     computer._addRegion_token(node.keyword, HighlightRegionType.KEYWORD);
-    return super.visitVariableDeclarationList(node);
+    super.visitVariableDeclarationList(node);
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     computer._addRegion_token(node.whileKeyword, HighlightRegionType.KEYWORD);
-    return super.visitWhileStatement(node);
+    super.visitWhileStatement(node);
   }
 
   @override
-  Object visitWithClause(WithClause node) {
+  void visitWithClause(WithClause node) {
     computer._addRegion_token(node.withKeyword, HighlightRegionType.KEYWORD);
-    return super.visitWithClause(node);
+    super.visitWithClause(node);
   }
 
   @override
-  Object visitYieldStatement(YieldStatement node) {
+  void visitYieldStatement(YieldStatement node) {
     Token keyword = node.yieldKeyword;
     Token star = node.star;
     int offset = keyword.offset;
     int end = star != null ? star.end : keyword.end;
     computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN);
-    return super.visitYieldStatement(node);
+    super.visitYieldStatement(node);
   }
 
   void _addRegions_functionBody(FunctionBody node) {
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index 490f5b5..24af9ba 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -63,6 +63,9 @@
       } else if (unitMember is FunctionTypeAlias) {
         FunctionTypeAlias alias = unitMember;
         unitContents.add(_newFunctionTypeAliasOutline(alias));
+      } else if (unitMember is GenericTypeAlias) {
+        GenericTypeAlias alias = unitMember;
+        unitContents.add(_newGenericTypeAliasOutline(alias));
       }
     }
     Outline unitOutline = _newUnitOutline(unitContents);
@@ -224,6 +227,27 @@
     return _nodeOutline(node, element);
   }
 
+  Outline _newGenericTypeAliasOutline(GenericTypeAlias node) {
+    var functionType = node.functionType;
+    TypeAnnotation returnType = functionType.returnType;
+    SimpleIdentifier nameNode = node.name;
+    String name = nameNode.name;
+    FormalParameterList parameters = functionType.parameters;
+    String parametersStr = _safeToSource(parameters);
+    String returnTypeStr = _safeToSource(returnType);
+    Element element = new Element(
+        ElementKind.FUNCTION_TYPE_ALIAS,
+        name,
+        Element.makeFlags(
+            isPrivate: Identifier.isPrivateName(name),
+            isDeprecated: _isDeprecated(node)),
+        location: _getLocationNode(nameNode),
+        parameters: parametersStr,
+        returnType: returnTypeStr,
+        typeParameters: _getTypeParametersStr(node.typeParameters));
+    return _nodeOutline(node, element);
+  }
+
   Outline _newMethodOutline(MethodDeclaration method) {
     TypeAnnotation returnType = method.returnType;
     SimpleIdentifier nameNode = method.name;
diff --git a/pkg/analysis_server/lib/src/computer/import_elements_computer.dart b/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
index 292b748..7973eed 100644
--- a/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
+++ b/pkg/analysis_server/lib/src/computer/import_elements_computer.dart
@@ -38,7 +38,7 @@
    * The resolution result associated with the defining compilation unit of the
    * library to which imports might be added.
    */
-  final ResolveResult libraryResult;
+  final ResolvedUnitResult libraryResult;
 
   /**
    * Initialize a newly created builder.
diff --git a/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart b/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart
index 6150a2c..a587098 100644
--- a/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart
+++ b/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -50,7 +50,7 @@
  * The visitor used by an [ImportedElementsComputer] to record the names of all
  * imported elements.
  */
-class _Visitor extends UnifyingAstVisitor<Object> {
+class _Visitor extends UnifyingAstVisitor<void> {
   /**
    * The element representing the library containing the code being visited.
    */
@@ -79,15 +79,14 @@
   _Visitor(this.containingLibrary, this.startOffset, this.endOffset);
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     if (node.offset <= endOffset && node.end >= startOffset) {
       node.visitChildren(this);
     }
-    return null;
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (!node.inDeclarationContext() &&
         node.offset <= endOffset &&
         node.end >= startOffset &&
@@ -119,7 +118,6 @@
         }
       }
     }
-    return null;
   }
 
   static bool _isConstructorDeclarationReturnType(SimpleIdentifier node) {
diff --git a/pkg/analysis_server/lib/src/computer/new_notifications.dart b/pkg/analysis_server/lib/src/computer/new_notifications.dart
index 0e11991..06aabc7 100644
--- a/pkg/analysis_server/lib/src/computer/new_notifications.dart
+++ b/pkg/analysis_server/lib/src/computer/new_notifications.dart
@@ -8,15 +8,16 @@
 import 'package:analysis_server/src/domains/analysis/occurrences.dart';
 import 'package:analysis_server/src/domains/analysis/occurrences_dart.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
 
 void new_sendDartNotificationNavigation(
-    AnalysisServer analysisServer, AnalysisResult result) {
+    AnalysisServer analysisServer, ResolvedUnitResult result) {
   var unit = result.unit;
   if (unit != null) {
     NavigationCollectorImpl collector = new NavigationCollectorImpl();
-    computeDartNavigation(collector, unit, null, null);
+    computeDartNavigation(
+        analysisServer.resourceProvider, collector, unit, null, null);
     collector.createRegions();
     var params = new protocol.AnalysisNavigationParams(
         result.path, collector.regions, collector.targets, collector.files);
@@ -25,7 +26,7 @@
 }
 
 void new_sendDartNotificationOccurrences(
-    AnalysisServer analysisServer, AnalysisResult result) {
+    AnalysisServer analysisServer, ResolvedUnitResult result) {
   var unit = result.unit;
   if (unit != null) {
     OccurrencesCollectorImpl collector = new OccurrencesCollectorImpl();
@@ -37,9 +38,12 @@
 }
 
 void new_sendErrorNotification(
-    AnalysisServer analysisServer, AnalysisResult result) {
+    AnalysisServer analysisServer, ResolvedUnitResult result) {
   var serverErrors = protocol.doAnalysisError_listFromEngine(
-      result.driver.analysisOptions, result.lineInfo, result.errors);
+    result.session.analysisContext.analysisOptions,
+    result.lineInfo,
+    result.errors,
+  );
   var params = new protocol.AnalysisErrorsParams(result.path, serverErrors);
   analysisServer.sendNotification(params.toNotification());
 }
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 32c9e00..7808ce0 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -15,7 +15,6 @@
 import 'package:analyzer/src/context/builder.dart';
 import 'package:analyzer/src/context/context_root.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -417,11 +416,6 @@
   final ResourceProvider resourceProvider;
 
   /**
-   * The file content overlay.
-   */
-  final FileContentOverlay fileContentOverlay;
-
-  /**
    * The manager used to access the SDK that should be associated with a
    * particular context.
    */
@@ -499,7 +493,6 @@
 
   ContextManagerImpl(
       this.resourceProvider,
-      this.fileContentOverlay,
       this.sdkManager,
       this.packageResolverProvider,
       this.analyzedFilesGlobs,
@@ -899,8 +892,7 @@
         convertedErrors ?? <protocol.AnalysisError>[]);
   }
 
-  void _checkForAnalysisOptionsUpdate(
-      String path, ContextInfo info, ChangeType changeType) {
+  void _checkForAnalysisOptionsUpdate(String path, ContextInfo info) {
     if (AnalysisEngine.isAnalysisOptionsFileName(path, pathContext)) {
       AnalysisDriver driver = info.analysisDriver;
       if (driver == null) {
@@ -909,39 +901,29 @@
         // yet created a driver for that context.
         return;
       }
-      String contextRoot = info.folder.path;
-      ContextBuilder builder =
-          callbacks.createContextBuilder(info.folder, defaultContextOptions);
-      AnalysisOptions options = builder.getAnalysisOptions(contextRoot,
-          contextRoot: driver.contextRoot);
-      SourceFactory factory = builder.createSourceFactory(contextRoot, options);
-      driver.configure(analysisOptions: options, sourceFactory: factory);
       // TODO(brianwilkerson) Set exclusion patterns.
       _analyzeAnalysisOptionsFile(driver, path);
+      _updateAnalysisOptions(info);
     }
   }
 
-  void _checkForPackagespecUpdate(
-      String path, ContextInfo info, Folder folder) {
+  void _checkForPackagespecUpdate(String path, ContextInfo info) {
     // Check to see if this is the .packages file for this context and if so,
     // update the context's source factory.
     if (pathContext.basename(path) == PACKAGE_SPEC_NAME) {
-      String contextRoot = info.folder.path;
-      ContextBuilder builder =
-          callbacks.createContextBuilder(info.folder, defaultContextOptions);
       AnalysisDriver driver = info.analysisDriver;
-      if (driver != null) {
-        AnalysisOptions options = builder.getAnalysisOptions(contextRoot,
-            contextRoot: driver.contextRoot);
-        SourceFactory factory =
-            builder.createSourceFactory(contextRoot, options);
-        driver.configure(analysisOptions: options, sourceFactory: factory);
+      if (driver == null) {
+        // I suspect that this happens as a result of a race condition: server
+        // has determined that the file (at [path]) is in a context, but hasn't
+        // yet created a driver for that context.
+        return;
       }
+
+      _updateAnalysisOptions(info);
     }
   }
 
-  void _checkForPubspecUpdate(
-      String path, ContextInfo info, ChangeType changeType) {
+  void _checkForPubspecUpdate(String path, ContextInfo info) {
     if (_isPubspec(path)) {
       AnalysisDriver driver = info.analysisDriver;
       if (driver == null) {
@@ -951,6 +933,7 @@
         return;
       }
       _analyzePubspecFile(driver, path);
+      _updateAnalysisOptions(info);
     }
   }
 
@@ -1424,9 +1407,9 @@
           }
         }
     }
-    _checkForPackagespecUpdate(path, info, info.folder);
-    _checkForAnalysisOptionsUpdate(path, info, type);
-    _checkForPubspecUpdate(path, info, type);
+    _checkForPackagespecUpdate(path, info);
+    _checkForAnalysisOptionsUpdate(path, info);
+    _checkForPubspecUpdate(path, info);
   }
 
   /**
@@ -1507,8 +1490,7 @@
    * the contents cannot be read.
    */
   String _readFile(String path) {
-    return fileContentOverlay[path] ??
-        resourceProvider.getFile(path).readAsStringSync();
+    return resourceProvider.getFile(path).readAsStringSync();
   }
 
   Packages _readPackagespec(File specFile) {
@@ -1555,6 +1537,17 @@
     return false;
   }
 
+  void _updateAnalysisOptions(ContextInfo info) {
+    AnalysisDriver driver = info.analysisDriver;
+    String contextRoot = info.folder.path;
+    ContextBuilder builder =
+        callbacks.createContextBuilder(info.folder, defaultContextOptions);
+    AnalysisOptions options = builder.getAnalysisOptions(contextRoot,
+        contextRoot: driver.contextRoot);
+    SourceFactory factory = builder.createSourceFactory(contextRoot, options);
+    driver.configure(analysisOptions: options, sourceFactory: factory);
+  }
+
   void _updateContextPackageUriResolver(Folder contextFolder) {
     ContextInfo info = getContextInfoFor(contextFolder);
     AnalysisDriver driver = info.analysisDriver;
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index a3e3257..fd6e154 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -17,12 +17,11 @@
 import 'package:analysis_server/src/plugin/result_merger.dart';
 import 'package:analysis_server/src/protocol/protocol_internal.dart';
 import 'package:analysis_server/src/protocol_server.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart' as engine;
-import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/generated/engine.dart' as engine;
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
@@ -47,24 +46,21 @@
    * Implement the `analysis.getErrors` request.
    */
   Future<void> getErrors(Request request) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     String file = new AnalysisGetErrorsParams.fromRequest(request).file;
+    ResolvedUnitResult result = await server.getResolvedUnit(file);
 
-    void send(engine.AnalysisOptions analysisOptions, LineInfo lineInfo,
-        List<engine.AnalysisError> errors) {
-      if (lineInfo == null) {
-        server.sendResponse(new Response.getErrorsInvalidFile(request));
-      } else {
-        List<AnalysisError> protocolErrors =
-            doAnalysisError_listFromEngine(analysisOptions, lineInfo, errors);
-        server.sendResponse(
-            new AnalysisGetErrorsResult(protocolErrors).toResponse(request.id));
-      }
+    if (result?.state != ResultState.VALID) {
+      server.sendResponse(new Response.getErrorsInvalidFile(request));
+      return;
     }
 
-    AnalysisResult result = await server.getAnalysisResult(file);
-    send(result?.driver?.analysisOptions, result?.lineInfo, result?.errors);
+    List<AnalysisError> protocolErrors = doAnalysisError_listFromEngine(
+      result.session.analysisContext.analysisOptions,
+      result.lineInfo,
+      result.errors,
+    );
+    server.sendResponse(
+        new AnalysisGetErrorsResult(protocolErrors).toResponse(request.id));
   }
 
   /**
@@ -76,7 +72,7 @@
     var params = new AnalysisGetHoverParams.fromRequest(request);
 
     // Prepare the resolved units.
-    AnalysisResult result = await server.getAnalysisResult(params.file);
+    ResolvedUnitResult result = await server.getResolvedUnit(params.file);
     CompilationUnit unit = result?.unit;
 
     // Prepare the hovers.
@@ -105,9 +101,10 @@
     //
     // Prepare the resolved unit.
     //
-    AnalysisResult result = await server.getAnalysisResult(params.file);
-    if (result == null) {
+    ResolvedUnitResult result = await server.getResolvedUnit(params.file);
+    if (result?.state != ResultState.VALID) {
       server.sendResponse(new Response.getImportedElementsInvalidFile(request));
+      return;
     }
 
     List<ImportedElements> elements;
@@ -179,11 +176,12 @@
       // Compute navigation data generated by server.
       //
       List<AnalysisNavigationParams> allResults = <AnalysisNavigationParams>[];
-      AnalysisResult result = await server.getAnalysisResult(file);
-      CompilationUnit unit = result?.unit;
-      if (unit != null && result.exists) {
+      ResolvedUnitResult result = await server.getResolvedUnit(file);
+      if (result?.state == ResultState.VALID) {
+        CompilationUnit unit = result?.unit;
         NavigationCollectorImpl collector = new NavigationCollectorImpl();
-        computeDartNavigation(collector, unit, offset, length);
+        computeDartNavigation(
+            server.resourceProvider, collector, unit, offset, length);
         collector.createRegions();
         allResults.add(new AnalysisNavigationParams(
             file, collector.regions, collector.targets, collector.files));
@@ -246,14 +244,15 @@
     var params = new AnalysisGetSignatureParams.fromRequest(request);
 
     // Prepare the resolved units.
-    AnalysisResult result = await server.getAnalysisResult(params.file);
-    CompilationUnit unit = result?.unit;
-    if (unit == null) {
+    ResolvedUnitResult result = await server.getResolvedUnit(params.file);
+
+    if (result?.state != ResultState.VALID) {
       server.sendResponse(new Response.getSignatureInvalidFile(request));
       return;
     }
 
     // Ensure the offset provided is a valid location in the file.
+    final unit = result.unit;
     final computer = new DartUnitSignatureComputer(unit, params.offset);
     if (!computer.offsetIsValid) {
       server.sendResponse(new Response.getSignatureInvalidOffset(request));
@@ -320,23 +319,8 @@
   Response reanalyze(Request request) {
     server.options.analytics?.sendEvent('analysis', 'reanalyze');
 
-    AnalysisReanalyzeParams params =
-        new AnalysisReanalyzeParams.fromRequest(request);
-    List<String> roots = params.roots;
-    if (roots == null || roots.isNotEmpty) {
-      List<String> includedPaths = server.contextManager.includedPaths;
-      List<Resource> rootResources = null;
-      if (roots != null) {
-        rootResources = <Resource>[];
-        for (String rootPath in roots) {
-          if (!includedPaths.contains(rootPath)) {
-            return new Response.invalidAnalysisRoot(request, rootPath);
-          }
-          rootResources.add(server.resourceProvider.getResource(rootPath));
-        }
-      }
-      server.reanalyze(rootResources);
-    }
+    server.reanalyze();
+
     //
     // Restart all of the plugins. This is an async operation that will happen
     // in the background.
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index 10597e3..ce73d98 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -15,6 +15,7 @@
 import 'package:analysis_server/src/services/completion/completion_core.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -172,9 +173,9 @@
     String filePath = params.file;
     int offset = params.offset;
 
-    AnalysisResult result = await server.getAnalysisResult(filePath);
+    ResolvedUnitResult result = await server.getResolvedUnit(filePath);
 
-    if (result != null && result.exists) {
+    if (result?.state == ResultState.VALID) {
       if (offset < 0 || offset > result.content.length) {
         server.sendResponse(new Response.invalidParameter(
             request,
diff --git a/pkg/analysis_server/lib/src/domain_kythe.dart b/pkg/analysis_server/lib/src/domain_kythe.dart
index c4fceb6..2bfc8c0 100644
--- a/pkg/analysis_server/lib/src/domain_kythe.dart
+++ b/pkg/analysis_server/lib/src/domain_kythe.dart
@@ -13,7 +13,7 @@
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
 import 'package:analysis_server/src/plugin/result_merger.dart';
 import 'package:analysis_server/src/services/kythe/kythe_visitors.dart';
-import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/generated/type_system.dart';
@@ -56,10 +56,9 @@
       //
       List<KytheGetKytheEntriesResult> allResults =
           <KytheGetKytheEntriesResult>[];
-      AnalysisResult result = await server.getAnalysisResult(file);
-      CompilationUnit unit = result?.unit;
-      TypeSystem typeSystem = result.libraryElement.context.typeSystem;
-      if (unit != null && result.exists) {
+      ResolvedUnitResult result = await server.getResolvedUnit(file);
+      if (result?.state == ResultState.VALID) {
+        TypeSystem typeSystem = await result.libraryElement.session.typeSystem;
         List<KytheEntry> entries = <KytheEntry>[];
         // TODO(brianwilkerson) Figure out how to get the list of files.
         List<String> files = <String>[];
diff --git a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
index 46a455e..74bbf87 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
@@ -8,17 +8,22 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 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/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/navigation/navigation.dart';
 
-NavigationCollector computeDartNavigation(NavigationCollector collector,
-    CompilationUnit unit, int offset, int length) {
+NavigationCollector computeDartNavigation(
+    ResourceProvider resourceProvider,
+    NavigationCollector collector,
+    CompilationUnit unit,
+    int offset,
+    int length) {
   _DartNavigationCollector dartCollector =
       new _DartNavigationCollector(collector);
   _DartNavigationComputerVisitor visitor =
-      new _DartNavigationComputerVisitor(dartCollector);
+      new _DartNavigationComputerVisitor(resourceProvider, dartCollector);
   if (offset == null || length == null) {
     unit.accept(visitor);
   } else {
@@ -87,9 +92,10 @@
 }
 
 class _DartNavigationComputerVisitor extends RecursiveAstVisitor {
+  final ResourceProvider resourceProvider;
   final _DartNavigationCollector computer;
 
-  _DartNavigationComputerVisitor(this.computer);
+  _DartNavigationComputerVisitor(this.resourceProvider, this.computer);
 
   @override
   visitAnnotation(Annotation node) {
@@ -352,7 +358,7 @@
   void _addUriDirectiveRegion(UriBasedDirective node, Element element) {
     if (element != null) {
       Source source = element.source;
-      if (element.context.exists(source)) {
+      if (resourceProvider.getResource(source.fullName).exists) {
         computer._addRegionForNode(node.uri, element);
       }
     }
diff --git a/pkg/analysis_server/lib/src/domains/execution/completion.dart b/pkg/analysis_server/lib/src/domains/execution/completion.dart
index c3a218e..a8a55f1 100644
--- a/pkg/analysis_server/lib/src/domains/execution/completion.dart
+++ b/pkg/analysis_server/lib/src/domains/execution/completion.dart
@@ -14,6 +14,7 @@
 import 'package:analysis_server/src/services/completion/completion_core.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
@@ -81,7 +82,7 @@
 
     // Update the context file content to include the code being completed.
     // Then resolve it, and restore the file to its initial state.
-    AnalysisResult targetResult;
+    ResolvedUnitResult targetResult;
     String contentFileOverlay = fileContentOverlay[contextFile];
     try {
       fileContentOverlay[contextFile] = targetCode;
diff --git a/pkg/analysis_server/lib/src/edit/edit_dartfix.dart b/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
index 2dc141b..073e434 100644
--- a/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
@@ -2,22 +2,24 @@
 // 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:analysis_server/plugin/edit/assist/assist_dart.dart';
 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/edit/fix/prefer_int_literals_fix.dart';
 import 'package:analysis_server/src/edit/fix/prefer_mixin_fix.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/lint/linter_visitor.dart';
@@ -118,38 +120,59 @@
       if (res is Folder) {
         for (Resource child in res.getChildren()) {
           if (!child.shortName.startsWith('.') &&
-              contextManager.isInAnalysisRoot(child.path)) {
+              contextManager.isInAnalysisRoot(child.path) &&
+              !contextManager.isIgnored(child.path)) {
             resources.add(child);
           }
         }
         continue;
       }
-      AnalysisResult result = await server.getAnalysisResult(res.path);
-      CompilationUnit unit = result?.unit;
-      if (unit != null) {
-        if (!hasErrors) {
-          for (AnalysisError error in result.errors) {
-            if (!(await fixError(result, error))) {
-              if (error.errorCode.type == ErrorType.SYNTACTIC_ERROR) {
-                hasErrors = true;
+
+      const maxAttempts = 3;
+      int attempt = 0;
+      while (attempt < maxAttempts) {
+        ResolvedUnitResult result = await server.getResolvedUnit(res.path);
+
+        // TODO(danrubel): Investigate why InconsistentAnalysisException occurs
+        // and whether this is an appropriate way to handle the situation
+        ++attempt;
+        try {
+          CompilationUnit unit = result?.unit;
+          if (unit != null) {
+            if (!hasErrors) {
+              for (AnalysisError error in result.errors) {
+                if (!(await fixError(result, error))) {
+                  if (error.errorCode.type == ErrorType.SYNTACTIC_ERROR) {
+                    hasErrors = true;
+                  }
+                }
               }
             }
+            Source source = result.unit.declaredElement.source;
+            for (Linter linter in linters) {
+              if (linter != null) {
+                linter.reporter.source = source;
+              }
+            }
+            var lintVisitors = lintVisitorsBySession[result.session] ??=
+                await _setupLintVisitors(result, linters);
+            if (lintVisitors.astVisitor != null) {
+              unit.accept(lintVisitors.astVisitor);
+            }
+            unit.accept(lintVisitors.linterVisitor);
+            for (LinterFix fix in fixes) {
+              await fix.applyLocalFixes(result);
+            }
           }
-        }
-        Source source = result.sourceFactory.forUri2(result.uri);
-        for (Linter linter in linters) {
-          if (linter != null) {
-            linter.reporter.source = source;
+          break;
+        } on InconsistentAnalysisException catch (_) {
+          if (attempt == maxAttempts) {
+            // TODO(danrubel): Consider improving the edit.dartfix protocol
+            // to gracefully report inconsistent results for a particular
+            // file rather than aborting the entire operation.
+            rethrow;
           }
-        }
-        var lintVisitors = lintVisitorsBySession[result.session] ??=
-            await _setupLintVisitors(result, linters);
-        if (lintVisitors.astVisitor != null) {
-          unit.accept(lintVisitors.astVisitor);
-        }
-        unit.accept(lintVisitors.linterVisitor);
-        for (LinterFix fix in fixes) {
-          await fix.applyLocalFixes(result);
+          // try again
         }
       }
     }
@@ -177,7 +200,7 @@
         .toResponse(request.id);
   }
 
-  Future<bool> fixError(AnalysisResult result, AnalysisError error) async {
+  Future<bool> fixError(ResolvedUnitResult result, AnalysisError error) async {
     if (error.errorCode ==
         StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR) {
       // TODO(danrubel): Rather than comparing the error codes individually,
@@ -190,11 +213,8 @@
       return false;
     }
 
-    final dartContext = new DartFixContextImpl(
-        new FixContextImpl(
-            server.resourceProvider, result.driver, error, result.errors),
-        new AstProviderForDriver(result.driver),
-        result.unit);
+    final workspace = DartChangeWorkspace(server.currentSessions);
+    final dartContext = new DartFixContextImpl(workspace, result, error);
     final processor = new FixProcessor(dartContext);
     Fix fix = await processor.computeFix();
     final location = locationFor(result, error.offset, error.length);
@@ -226,7 +246,7 @@
     return false;
   }
 
-  Location locationFor(AnalysisResult result, int offset, int length) {
+  Location locationFor(ResolvedUnitResult result, int offset, int length) {
     final locInfo = result.unit.lineInfo.getLocation(offset);
     final location = new Location(
         result.path, offset, length, locInfo.lineNumber, locInfo.columnNumber);
@@ -234,7 +254,7 @@
   }
 
   Future<_LintVisitors> _setupLintVisitors(
-      AnalysisResult result, List<Linter> linters) async {
+      ResolvedUnitResult result, List<Linter> linters) async {
     final visitors = <AstVisitor>[];
     final registry = new NodeLintRegistry(false);
     // TODO(paulberry): use an API that provides this information more readily
@@ -246,8 +266,11 @@
       if (identical(cu, unitElement)) {
         allUnits.add(currentUnit);
       } else {
-        var result = await session.getResolvedAst(cu.source.fullName);
-        allUnits.add(LinterContextUnit(result.content, result.unit));
+        Source source = cu.source;
+        if (source != null) {
+          var result = await session.getResolvedUnit(source.fullName);
+          allUnits.add(LinterContextUnit(result.content, result.unit));
+        }
       }
     }
     var context = LinterContextImpl(allUnits, currentUnit,
@@ -258,11 +281,8 @@
         if (visitor != null) {
           visitors.add(visitor);
         }
-        if (linter is NodeLintRuleWithContext) {
-          (linter as NodeLintRuleWithContext)
-              .registerNodeProcessors(registry, context);
-        } else if (linter is NodeLintRule) {
-          (linter as NodeLintRule).registerNodeProcessors(registry);
+        if (linter is NodeLintRule) {
+          (linter as NodeLintRule).registerNodeProcessors(registry, context);
         }
       }
     }
@@ -276,29 +296,6 @@
   }
 }
 
-class EditDartFixAssistContext implements DartAssistContext {
-  @override
-  final AnalysisDriver analysisDriver;
-
-  @override
-  final int selectionLength;
-
-  @override
-  final int selectionOffset;
-
-  @override
-  final Source source;
-
-  @override
-  final CompilationUnit unit;
-
-  EditDartFixAssistContext(
-      EditDartFix dartFix, this.source, this.unit, AstNode node)
-      : analysisDriver = dartFix.server.getAnalysisDriver(source.fullName),
-        selectionOffset = node.offset,
-        selectionLength = 0;
-}
-
 abstract class LinterFix implements ErrorReporter {
   final EditDartFix dartFix;
 
@@ -308,7 +305,7 @@
   LinterFix(this.dartFix);
 
   /// Apply fixes for the current compilation unit.
-  Future<void> applyLocalFixes(AnalysisResult result);
+  Future<void> applyLocalFixes(ResolvedUnitResult result);
 
   /// Apply any fixes remaining after analysis is complete.
   Future<void> applyRemainingFixes();
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index f7a28e7..f2a9cda 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -5,9 +5,7 @@
 import 'dart:async';
 
 import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
-import 'package:analysis_server/plugin/edit/assist/assist_dart.dart';
 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
-import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/collections.dart';
@@ -19,22 +17,22 @@
 import 'package:analysis_server/src/protocol_server.dart' hide Element;
 import 'package:analysis_server/src/services/completion/postfix/postfix_completion.dart';
 import 'package:analysis_server/src/services/completion/statement/statement_completion.dart';
+import 'package:analysis_server/src/services/correction/assist.dart';
 import 'package:analysis_server/src/services/correction/assist_internal.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
 import 'package:analysis_server/src/services/correction/organize_directives.dart';
 import 'package:analysis_server/src/services/correction/sort_members.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart' as engine;
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart' as engine;
 import 'package:analyzer/src/error/codes.dart' as engine;
 import 'package:analyzer/src/generated/engine.dart' as engine;
@@ -103,11 +101,10 @@
     EditFormatParams params = new EditFormatParams.fromRequest(request);
     String file = params.file;
 
-    String unformattedSource;
+    String unformattedCode;
     try {
-      Source source = server.resourceProvider.getFile(file).createSource();
-      unformattedSource =
-          server.fileContentOverlay[file] ?? source.contents.data;
+      var resource = server.resourceProvider.getFile(file);
+      unformattedCode = resource.readAsStringSync();
     } catch (e) {
       return new Response.formatInvalidFile(request);
     }
@@ -121,7 +118,7 @@
       length = null;
     }
 
-    SourceCode code = new SourceCode(unformattedSource,
+    SourceCode code = new SourceCode(unformattedCode,
         uri: null,
         isCompilationUnit: true,
         selectionStart: start,
@@ -137,10 +134,10 @@
 
     List<SourceEdit> edits = <SourceEdit>[];
 
-    if (formattedSource != unformattedSource) {
+    if (formattedSource != unformattedCode) {
       //TODO: replace full replacements with smaller, more targeted edits
       SourceEdit edit =
-          new SourceEdit(0, unformattedSource.length, formattedSource);
+          new SourceEdit(0, unformattedCode.length, formattedSource);
       edits.add(edit);
     }
 
@@ -175,7 +172,7 @@
     Map<PluginInfo, Future<plugin.Response>> pluginFutures;
     plugin.EditGetAssistsParams requestParams =
         new plugin.EditGetAssistsParams(file, offset, length);
-    AnalysisDriver driver = server.getAnalysisDriver(file);
+    var driver = server.getAnalysisDriver(file);
     if (driver == null) {
       pluginFutures = <PluginInfo, Future<plugin.Response>>{};
     } else {
@@ -185,15 +182,16 @@
     //
     // Compute fixes associated with server-generated errors.
     //
-    AnalysisResult result = await server.getAnalysisResult(file);
+    ResolvedUnitResult result = await server.getResolvedUnit(file);
     if (result != null) {
-      CompilationUnit unit = result.unit;
-      CompilationUnitElement compilationUnitElement =
-          resolutionMap.elementDeclaredByCompilationUnit(unit);
-      DartAssistContext dartAssistContext = new _DartAssistContextForValues(
-          compilationUnitElement.source, offset, length, driver, unit);
+      var context = new DartAssistContextImpl(
+        DartChangeWorkspace(server.currentSessions),
+        result,
+        offset,
+        length,
+      );
       try {
-        AssistProcessor processor = new AssistProcessor(dartAssistContext);
+        AssistProcessor processor = new AssistProcessor(context);
         List<Assist> assists = await processor.compute();
         assists.sort(Assist.SORT_BY_RELEVANCE);
         for (Assist assist in assists) {
@@ -236,7 +234,7 @@
     Map<PluginInfo, Future<plugin.Response>> pluginFutures;
     plugin.EditGetFixesParams requestParams =
         new plugin.EditGetFixesParams(file, offset);
-    AnalysisDriver driver = server.getAnalysisDriver(file);
+    var driver = server.getAnalysisDriver(file);
     if (driver == null) {
       pluginFutures = <PluginInfo, Future<plugin.Response>>{};
     } else {
@@ -249,7 +247,7 @@
     List<AnalysisErrorFixes> errorFixesList = null;
     while (errorFixesList == null) {
       try {
-        errorFixesList = await _computeServerErrorFixes(driver, file, offset);
+        errorFixesList = await _computeServerErrorFixes(file, offset);
       } on InconsistentAnalysisException {
         // Loop around to try again to compute the fixes.
       }
@@ -281,26 +279,17 @@
     var params = new EditGetPostfixCompletionParams.fromRequest(request);
     SourceChange change;
 
-    AnalysisResult result = await server.getAnalysisResult(params.file);
+    ResolvedUnitResult result = await server.getResolvedUnit(params.file);
     if (result != null) {
-      CompilationUnit unit = result.unit;
-      CompilationUnitElement unitElement =
-          resolutionMap.elementDeclaredByCompilationUnit(unit);
-      if (unitElement.context != null) {
-        PostfixCompletionContext context = new PostfixCompletionContext(
-            params.file,
-            result.lineInfo,
-            params.offset,
-            params.key,
-            result.driver,
-            unit,
-            unitElement,
-            result.errors);
-        PostfixCompletionProcessor processor =
-            new PostfixCompletionProcessor(context);
-        PostfixCompletion completion = await processor.compute();
-        change = completion?.change;
-      }
+      PostfixCompletionContext context = new PostfixCompletionContext(
+        result,
+        params.offset,
+        params.key,
+      );
+      PostfixCompletionProcessor processor =
+          new PostfixCompletionProcessor(context);
+      PostfixCompletion completion = await processor.compute();
+      change = completion?.change;
     }
     if (change == null) {
       change = new SourceChange("", edits: []);
@@ -317,24 +306,13 @@
     var params = new EditGetStatementCompletionParams.fromRequest(request);
     SourceChange change;
 
-    AnalysisResult result = await server.getAnalysisResult(params.file);
+    ResolvedUnitResult result = await server.getResolvedUnit(params.file);
     if (result != null) {
-      CompilationUnit unit = result.unit;
-      CompilationUnitElement unitElement =
-          resolutionMap.elementDeclaredByCompilationUnit(unit);
-      if (unitElement.context != null) {
-        StatementCompletionContext context = new StatementCompletionContext(
-            params.file,
-            result.lineInfo,
-            params.offset,
-            unit,
-            unitElement,
-            result.errors);
-        StatementCompletionProcessor processor =
-            new StatementCompletionProcessor(context);
-        StatementCompletion completion = await processor.compute();
-        change = completion.change;
-      }
+      var context = new StatementCompletionContext(result, params.offset);
+      StatementCompletionProcessor processor =
+          new StatementCompletionProcessor(context);
+      StatementCompletion completion = await processor.compute();
+      change = completion.change;
     }
     if (change == null) {
       change = new SourceChange("", edits: []);
@@ -404,7 +382,7 @@
     //
     // Prepare the resolved unit.
     //
-    AnalysisResult result = await server.getAnalysisResult(params.file);
+    ResolvedUnitResult result = await server.getResolvedUnit(params.file);
     if (result == null) {
       server.sendResponse(new Response.importElementsInvalidFile(request));
     }
@@ -413,7 +391,7 @@
     if (libraryUnit != result.unit.declaredElement) {
       // The file in the request is a part of a library. We need to pass the
       // defining compilation unit to the computer, not the part.
-      result = await server.getAnalysisResult(libraryUnit.source.fullName);
+      result = await server.getResolvedUnit(libraryUnit.source.fullName);
       if (result == null) {
         server.sendResponse(new Response.importElementsInvalidFile(request));
       }
@@ -439,25 +417,15 @@
     var params = new EditGetPostfixCompletionParams.fromRequest(request);
     bool value = false;
 
-    AnalysisResult result = await server.getAnalysisResult(params.file);
+    ResolvedUnitResult result = await server.getResolvedUnit(params.file);
     if (result != null) {
-      CompilationUnit unit = result.unit;
-      CompilationUnitElement unitElement =
-          resolutionMap.elementDeclaredByCompilationUnit(unit);
-      if (unitElement.context != null) {
-        PostfixCompletionContext context = new PostfixCompletionContext(
-            params.file,
-            result.lineInfo,
-            params.offset,
-            params.key,
-            result.driver,
-            unit,
-            unitElement,
-            result.errors);
-        PostfixCompletionProcessor processor =
-            new PostfixCompletionProcessor(context);
-        value = await processor.isApplicable();
-      }
+      var context = new PostfixCompletionContext(
+        result,
+        params.offset,
+        params.key,
+      );
+      var processor = new PostfixCompletionProcessor(context);
+      value = await processor.isApplicable();
     }
 
     Response response = new EditIsPostfixCompletionApplicableResult(value)
@@ -491,7 +459,7 @@
       return;
     }
     // Prepare the file information.
-    AnalysisResult result = await server.getAnalysisResult(file);
+    ResolvedUnitResult result = await server.getResolvedUnit(file);
     if (result == null) {
       server.sendResponse(new Response.fileNotAnalyzed(request, file));
       return;
@@ -526,8 +494,8 @@
       return;
     }
     // Prepare the file information.
-    AnalysisDriver driver = server.getAnalysisDriver(file);
-    ParseResult result = await driver?.parseFile(file);
+    var driver = server.getAnalysisDriver(file);
+    ParsedUnitResult result = await driver?.parseFile(file);
     if (result == null) {
       server.sendResponse(new Response.fileNotAnalyzed(request, file));
       return;
@@ -555,29 +523,21 @@
    * Compute and return the fixes associated with server-generated errors.
    */
   Future<List<AnalysisErrorFixes>> _computeServerErrorFixes(
-      AnalysisDriver driver, String file, int offset) async {
+      String file, int offset) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     List<AnalysisErrorFixes> errorFixesList = <AnalysisErrorFixes>[];
-    AnalysisResult result = await server.getAnalysisResult(file);
+    var result = await server.getResolvedUnit(file);
     if (result != null) {
-      CompilationUnit unit = result.unit;
       LineInfo lineInfo = result.lineInfo;
       int requestLine = lineInfo.getLocation(offset).lineNumber;
-      List<engine.AnalysisError> errorsCopy = new List.from(result.errors);
       for (engine.AnalysisError error in result.errors) {
         int errorLine = lineInfo.getLocation(error.offset).lineNumber;
         if (errorLine == requestLine) {
-          AstProvider astProvider = new AstProviderForDriver(driver);
-          DartFixContext context = new _DartFixContextImpl(
-              server.resourceProvider,
-              result.driver,
-              astProvider,
-              unit,
-              error,
-              errorsCopy);
+          var workspace = DartChangeWorkspace(server.currentSessions);
+          var context = new DartFixContextImpl(workspace, result, error);
           List<Fix> fixes =
-              await new DefaultFixContributor().internalComputeFixes(context);
+              await new DartFixContributor().computeFixes(context);
           if (fixes.isNotEmpty) {
             fixes.sort(Fix.SORT_BY_RELEVANCE);
             AnalysisError serverError =
@@ -611,22 +571,22 @@
     List<RefactoringKind> kinds = <RefactoringKind>[];
     // Check nodes.
     {
-      var analysisResult = await server.getAnalysisResult(file);
-      if (analysisResult != null) {
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
         // Try EXTRACT_LOCAL_VARIABLE.
-        if (new ExtractLocalRefactoring(analysisResult, offset, length)
+        if (new ExtractLocalRefactoring(resolvedUnit, offset, length)
             .isAvailable()) {
           kinds.add(RefactoringKind.EXTRACT_LOCAL_VARIABLE);
         }
         // Try EXTRACT_METHOD.
-        if (new ExtractMethodRefactoring(searchEngine,
-                server.getAstProvider(file), analysisResult, offset, length)
+        if (new ExtractMethodRefactoring(
+                searchEngine, resolvedUnit, offset, length)
             .isAvailable()) {
           kinds.add(RefactoringKind.EXTRACT_METHOD);
         }
         // Try EXTRACT_WIDGETS.
         if (new ExtractWidgetRefactoring(
-                searchEngine, analysisResult, offset, length)
+                searchEngine, resolvedUnit, offset, length)
             .isAvailable()) {
           kinds.add(RefactoringKind.EXTRACT_WIDGET);
         }
@@ -634,23 +594,28 @@
     }
     // check elements
     {
-      Element element = await server.getElementAtOffset(file, offset);
-      if (element != null) {
-        // try CONVERT_METHOD_TO_GETTER
-        if (element is ExecutableElement) {
-          Refactoring refactoring = new ConvertMethodToGetterRefactoring(
-              searchEngine, server.getAstProvider(file), element);
-          RefactoringStatus status = await refactoring.checkInitialConditions();
-          if (!status.hasFatalError) {
-            kinds.add(RefactoringKind.CONVERT_METHOD_TO_GETTER);
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
+        var node = new NodeLocator(offset).searchWithin(resolvedUnit.unit);
+        var element = server.getElementOfNode(node);
+        if (element != null) {
+          // try CONVERT_METHOD_TO_GETTER
+          if (element is ExecutableElement) {
+            Refactoring refactoring = new ConvertMethodToGetterRefactoring(
+                searchEngine, resolvedUnit.session, element);
+            RefactoringStatus status =
+                await refactoring.checkInitialConditions();
+            if (!status.hasFatalError) {
+              kinds.add(RefactoringKind.CONVERT_METHOD_TO_GETTER);
+            }
           }
-        }
-        // try RENAME
-        {
-          RenameRefactoring renameRefactoring = new RenameRefactoring(
-              refactoringWorkspace, server.getAstProvider(file), element);
-          if (renameRefactoring != null) {
-            kinds.add(RefactoringKind.RENAME);
+          // try RENAME
+          {
+            RenameRefactoring renameRefactoring = new RenameRefactoring(
+                refactoringWorkspace, resolvedUnit.session, element);
+            if (renameRefactoring != null) {
+              kinds.add(RefactoringKind.RENAME);
+            }
           }
         }
       }
@@ -689,60 +654,6 @@
 }
 
 /**
- * Implementation of [DartAssistContext] that is based on the values passed
- * in the constructor, as opposite to be partially based on [AssistContext].
- */
-class _DartAssistContextForValues implements DartAssistContext {
-  @override
-  final Source source;
-
-  @override
-  final int selectionOffset;
-
-  @override
-  final int selectionLength;
-
-  @override
-  final AnalysisDriver analysisDriver;
-
-  @override
-  final CompilationUnit unit;
-
-  _DartAssistContextForValues(this.source, this.selectionOffset,
-      this.selectionLength, this.analysisDriver, this.unit);
-}
-
-/**
- * And implementation of [DartFixContext].
- */
-class _DartFixContextImpl implements DartFixContext {
-  @override
-  final ResourceProvider resourceProvider;
-
-  @override
-  final AnalysisDriver analysisDriver;
-
-  @override
-  final AstProvider astProvider;
-
-  @override
-  final CompilationUnit unit;
-
-  @override
-  final engine.AnalysisError error;
-
-  @override
-  final List<engine.AnalysisError> errors;
-
-  _DartFixContextImpl(this.resourceProvider, this.analysisDriver,
-      this.astProvider, this.unit, this.error, this.errors);
-
-  @override
-  GetTopLevelDeclarations get getTopLevelDeclarations =>
-      analysisDriver.getTopLevelNameDeclarations;
-}
-
-/**
  * An object managing a single [Refactoring] instance.
  *
  * The instance is identified by its kind, file, offset and length.
@@ -871,8 +782,8 @@
       }
       // create change
       result.change = await refactoring.createChange();
-      result.potentialEdits = nullIfEmpty(refactoring.potentialEditIds);
       _checkForReset_afterCreateChange();
+      result.potentialEdits = nullIfEmpty(refactoring.potentialEditIds);
       _sendResultResponse();
     }, onError: (exception, stackTrace) {
       if (exception is _ResetError) {
@@ -940,28 +851,35 @@
     }
     // create a new Refactoring instance
     if (kind == RefactoringKind.CONVERT_GETTER_TO_METHOD) {
-      Element element = await server.getElementAtOffset(file, offset);
-      if (element != null) {
-        if (element is ExecutableElement) {
-          refactoring = new ConvertGetterToMethodRefactoring(
-              searchEngine, server.getAstProvider(file), element);
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
+        var node = new NodeLocator(offset).searchWithin(resolvedUnit.unit);
+        var element = server.getElementOfNode(node);
+        if (element != null) {
+          if (element is ExecutableElement) {
+            refactoring = new ConvertGetterToMethodRefactoring(
+                searchEngine, resolvedUnit.session, element);
+          }
         }
       }
     }
     if (kind == RefactoringKind.CONVERT_METHOD_TO_GETTER) {
-      Element element = await server.getElementAtOffset(file, offset);
-      if (element != null) {
-        if (element is ExecutableElement) {
-          refactoring = new ConvertMethodToGetterRefactoring(
-              searchEngine, server.getAstProvider(file), element);
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
+        var node = new NodeLocator(offset).searchWithin(resolvedUnit.unit);
+        var element = server.getElementOfNode(node);
+        if (element != null) {
+          if (element is ExecutableElement) {
+            refactoring = new ConvertMethodToGetterRefactoring(
+                searchEngine, resolvedUnit.session, element);
+          }
         }
       }
     }
     if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) {
-      var analysisResult = await server.getAnalysisResult(file);
-      if (analysisResult != null) {
-        refactoring =
-            new ExtractLocalRefactoring(analysisResult, offset, length);
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
+        refactoring = new ExtractLocalRefactoring(resolvedUnit, offset, length);
         feedback = new ExtractLocalVariableFeedback(
             <String>[], <int>[], <int>[],
             coveringExpressionOffsets: <int>[],
@@ -969,34 +887,40 @@
       }
     }
     if (kind == RefactoringKind.EXTRACT_METHOD) {
-      var analysisResult = await server.getAnalysisResult(file);
-      if (analysisResult != null) {
-        refactoring = new ExtractMethodRefactoring(searchEngine,
-            server.getAstProvider(file), analysisResult, offset, length);
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
+        refactoring = new ExtractMethodRefactoring(
+            searchEngine, resolvedUnit, offset, length);
         feedback = new ExtractMethodFeedback(offset, length, '', <String>[],
             false, <RefactoringMethodParameter>[], <int>[], <int>[]);
       }
     }
     if (kind == RefactoringKind.EXTRACT_WIDGET) {
-      var analysisResult = await server.getAnalysisResult(file);
-      if (analysisResult != null) {
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
         refactoring = new ExtractWidgetRefactoring(
-            searchEngine, analysisResult, offset, length);
+            searchEngine, resolvedUnit, offset, length);
         feedback = new ExtractWidgetFeedback();
       }
     }
     if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) {
-      var analysisResult = await server.getAnalysisResult(file);
-      if (analysisResult != null) {
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
         refactoring = new InlineLocalRefactoring(
-            searchEngine, server.getAstProvider(file), analysisResult, offset);
+          searchEngine,
+          resolvedUnit,
+          offset,
+        );
       }
     }
     if (kind == RefactoringKind.INLINE_METHOD) {
-      var analysisResult = await server.getAnalysisResult(file);
-      if (analysisResult != null) {
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
         refactoring = new InlineMethodRefactoring(
-            searchEngine, server.getAstProvider(file), analysisResult, offset);
+          searchEngine,
+          resolvedUnit,
+          offset,
+        );
       }
     }
     if (kind == RefactoringKind.MOVE_FILE) {
@@ -1009,41 +933,44 @@
 //          server.resourceProvider, searchEngine, context, source, file);
     }
     if (kind == RefactoringKind.RENAME) {
-      AstNode node = await server.getNodeAtOffset(file, offset);
-      Element element = server.getElementOfNode(node);
-      if (node != null && element != null) {
-        int feedbackOffset = node.offset;
-        int feedbackLength = node.length;
+      var resolvedUnit = await server.getResolvedUnit(file);
+      if (resolvedUnit != null) {
+        var node = new NodeLocator(offset).searchWithin(resolvedUnit.unit);
+        var element = server.getElementOfNode(node);
+        if (node != null && element != null) {
+          int feedbackOffset = node.offset;
+          int feedbackLength = node.length;
 
-        if (element is FieldFormalParameterElement) {
-          element = (element as FieldFormalParameterElement).field;
-        }
-
-        // Use the prefix offset/length when renaming an import directive.
-        if (node is ImportDirective && element is ImportElement) {
-          if (node.prefix != null) {
-            feedbackOffset = node.prefix.offset;
-            feedbackLength = node.prefix.length;
-          } else {
-            feedbackOffset = -1;
-            feedbackLength = 0;
+          if (element is FieldFormalParameterElement) {
+            element = (element as FieldFormalParameterElement).field;
           }
-        }
 
-        // Rename the class when on `new` in an instance creation.
-        if (node is InstanceCreationExpression) {
-          InstanceCreationExpression creation = node;
-          var typeIdentifier = creation.constructorName.type.name;
-          element = typeIdentifier.staticElement;
-          feedbackOffset = typeIdentifier.offset;
-          feedbackLength = typeIdentifier.length;
-        }
+          // Use the prefix offset/length when renaming an import directive.
+          if (node is ImportDirective && element is ImportElement) {
+            if (node.prefix != null) {
+              feedbackOffset = node.prefix.offset;
+              feedbackLength = node.prefix.length;
+            } else {
+              feedbackOffset = -1;
+              feedbackLength = 0;
+            }
+          }
 
-        // do create the refactoring
-        refactoring = new RenameRefactoring(
-            refactoringWorkspace, server.getAstProvider(file), element);
-        feedback = new RenameFeedback(
-            feedbackOffset, feedbackLength, 'kind', 'oldName');
+          // Rename the class when on `new` in an instance creation.
+          if (node is InstanceCreationExpression) {
+            InstanceCreationExpression creation = node;
+            var typeIdentifier = creation.constructorName.type.name;
+            element = typeIdentifier.staticElement;
+            feedbackOffset = typeIdentifier.offset;
+            feedbackLength = typeIdentifier.length;
+          }
+
+          // do create the refactoring
+          refactoring = new RenameRefactoring(
+              refactoringWorkspace, resolvedUnit.session, element);
+          feedback = new RenameFeedback(
+              feedbackOffset, feedbackLength, 'kind', 'oldName');
+        }
       }
     }
     if (refactoring == null) {
diff --git a/pkg/analysis_server/lib/src/edit/fix/prefer_int_literals_fix.dart b/pkg/analysis_server/lib/src/edit/fix/prefer_int_literals_fix.dart
index 52dda1f..619cad3 100644
--- a/pkg/analysis_server/lib/src/edit/fix/prefer_int_literals_fix.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/prefer_int_literals_fix.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -6,9 +6,10 @@
 import 'package:analysis_server/src/edit/edit_dartfix.dart';
 import 'package:analysis_server/src/services/correction/assist.dart';
 import 'package:analysis_server/src/services/correction/assist_internal.dart';
-import 'package:analyzer/analyzer.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/error/error.dart';
 
 class PreferIntLiteralsFix extends LinterFix {
   final literalsToConvert = <DoubleLiteral>[];
@@ -16,11 +17,17 @@
   PreferIntLiteralsFix(EditDartFix dartFix) : super(dartFix);
 
   @override
-  Future<void> applyLocalFixes(AnalysisResult result) async {
+  Future<void> applyLocalFixes(ResolvedUnitResult result) async {
     while (literalsToConvert.isNotEmpty) {
       DoubleLiteral literal = literalsToConvert.removeLast();
       AssistProcessor processor = new AssistProcessor(
-          new EditDartFixAssistContext(dartFix, source, result.unit, literal));
+        new DartAssistContextImpl(
+          DartChangeWorkspace(dartFix.server.currentSessions),
+          result,
+          literal.offset,
+          0,
+        ),
+      );
       List<Assist> assists =
           await processor.computeAssist(DartAssistKind.CONVERT_TO_INT_LITERAL);
       final location =
diff --git a/pkg/analysis_server/lib/src/edit/fix/prefer_mixin_fix.dart b/pkg/analysis_server/lib/src/edit/fix/prefer_mixin_fix.dart
index 52f924a..7f66a47 100644
--- a/pkg/analysis_server/lib/src/edit/fix/prefer_mixin_fix.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/prefer_mixin_fix.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -6,10 +6,11 @@
 import 'package:analysis_server/src/edit/edit_dartfix.dart';
 import 'package:analysis_server/src/services/correction/assist.dart';
 import 'package:analysis_server/src/services/correction/assist_internal.dart';
-import 'package:analyzer/analyzer.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/error/error.dart';
 
 class PreferMixinFix extends LinterFix {
   final classesToConvert = new Set<Element>();
@@ -17,7 +18,7 @@
   PreferMixinFix(EditDartFix dartFix) : super(dartFix);
 
   @override
-  Future<void> applyLocalFixes(AnalysisResult result) {
+  Future<void> applyLocalFixes(ResolvedUnitResult result) {
     // All fixes applied in [applyRemainingFixes]
     return null;
   }
@@ -30,15 +31,19 @@
   }
 
   Future<void> convertClassToMixin(Element elem) async {
-    AnalysisResult result =
-        await dartFix.server.getAnalysisResult(elem.source?.fullName);
+    ResolvedUnitResult result =
+        await dartFix.server.getResolvedUnit(elem.source?.fullName);
 
     for (CompilationUnitMember declaration in result.unit.declarations) {
       if (declaration is ClassOrMixinDeclaration &&
           declaration.name.name == elem.name) {
         AssistProcessor processor = new AssistProcessor(
-            new EditDartFixAssistContext(
-                dartFix, elem.source, result.unit, declaration.name));
+          new DartAssistContextImpl(
+              DartChangeWorkspace(dartFix.server.currentSessions),
+              result,
+              declaration.name.offset,
+              0),
+        );
         List<Assist> assists = await processor
             .computeAssist(DartAssistKind.CONVERT_CLASS_TO_MIXIN);
         final location =
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_correction.dart b/pkg/analysis_server/lib/src/flutter/flutter_correction.dart
index 459baf7..34e2864 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_correction.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_correction.dart
@@ -5,46 +5,34 @@
 import 'dart:async';
 
 import 'package:analysis_server/src/services/correction/util.dart';
-import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:meta/meta.dart';
 
 class FlutterCorrections {
-  final String file;
-  final String fileContent;
-
+  final ResolvedUnitResult resolveResult;
   final int selectionOffset;
   final int selectionLength;
   final int selectionEnd;
-  final SourceRange selectionRange;
 
-  final AnalysisSession session;
-  final CompilationUnit unit;
+  final CorrectionUtils utils;
 
   AstNode node;
-  CorrectionUtils utils;
 
   FlutterCorrections(
-      {@required this.file,
-      @required this.fileContent,
+      {@required this.resolveResult,
       @required this.selectionOffset,
-      @required this.selectionLength,
-      @required this.session,
-      @required this.unit})
-      : assert(file != null),
-        assert(fileContent != null),
+      @required this.selectionLength})
+      : assert(resolveResult != null),
         assert(selectionOffset != null),
         assert(selectionLength != null),
-        assert(session != null),
-        assert(unit != null),
         selectionEnd = selectionOffset + selectionLength,
-        selectionRange = new SourceRange(selectionOffset, selectionLength) {
-    node = new NodeLocator(selectionOffset, selectionEnd).searchWithin(unit);
-    utils = new CorrectionUtils(unit, buffer: fileContent);
+        utils = new CorrectionUtils(resolveResult) {
+    node = new NodeLocator(selectionOffset, selectionEnd)
+        .searchWithin(resolveResult.unit);
   }
 
   /**
@@ -59,8 +47,8 @@
     if (node is ClassDeclaration) {
       var className = node.name.name;
       var location = utils.prepareNewConstructorLocation(node);
-      var changeBuilder = new DartChangeBuilder(session);
-      await changeBuilder.addFileEdit(file, (builder) {
+      var changeBuilder = new DartChangeBuilder(resolveResult.session);
+      await changeBuilder.addFileEdit(resolveResult.path, (builder) {
         builder.addInsertion(location.offset, (builder) {
           builder.write(location.prefix);
 
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_domain.dart b/pkg/analysis_server/lib/src/flutter/flutter_domain.dart
index 45698c4..7bc3713 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_domain.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_domain.dart
@@ -33,15 +33,13 @@
     String file = params.file;
     int offset = params.offset;
 
-    ResolveResult result = await server.getAnalysisResult(file);
+    ResolvedUnitResult result = await server.getResolvedUnit(file);
     if (result != null) {
       var corrections = new FlutterCorrections(
-          file: file,
-          fileContent: result.content,
-          selectionOffset: offset,
-          selectionLength: 0,
-          session: result.session,
-          unit: result.unit);
+        resolveResult: result,
+        selectionOffset: offset,
+        selectionLength: 0,
+      );
       SourceChange change = await corrections.addForDesignTimeConstructor();
       if (change != null) {
         server.sendResponse(
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart b/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
index a468fd4..b387156 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
@@ -6,13 +6,19 @@
 import 'package:analysis_server/src/flutter/flutter_outline_computer.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 
-void sendFlutterNotificationOutline(AnalysisServer server, String file,
-    String content, LineInfo lineInfo, CompilationUnit dartUnit) {
+void sendFlutterNotificationOutline(
+    AnalysisServer server,
+    String file,
+    String content,
+    LineInfo lineInfo,
+    CompilationUnit dartUnit,
+    TypeProvider typeProvider) {
   _sendNotification(server, () {
-    var computer =
-        new FlutterOutlineComputer(file, content, lineInfo, dartUnit);
+    var computer = new FlutterOutlineComputer(
+        file, content, lineInfo, dartUnit, typeProvider);
     protocol.FlutterOutline outline = computer.compute();
     // send notification
     var params = new protocol.FlutterOutlineParams(file, outline,
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
index f1d5470..5d503b4 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
@@ -45,8 +45,8 @@
   final List<protocol.SourceEdit> instrumentationEdits = [];
   String instrumentedCode;
 
-  FlutterOutlineComputer(this.file, this.content, this.lineInfo, this.unit)
-      : typeProvider = unit.declaredElement.context.typeProvider;
+  FlutterOutlineComputer(
+      this.file, this.content, this.lineInfo, this.unit, this.typeProvider);
 
   protocol.FlutterOutline compute() {
     protocol.Outline dartOutline = new DartUnitOutlineComputer(
diff --git a/pkg/analysis_server/lib/src/lsp/channel/lsp_byte_stream_channel.dart b/pkg/analysis_server/lib/src/lsp/channel/lsp_byte_stream_channel.dart
new file mode 100644
index 0000000..b81c125
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/channel/lsp_byte_stream_channel.dart
@@ -0,0 +1,145 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analysis_server/src/lsp/channel/lsp_channel.dart';
+import 'package:analysis_server/src/lsp/lsp_packet_transformer.dart';
+import 'package:analyzer/instrumentation/instrumentation.dart';
+
+/**
+ * Instances of the class [LspByteStreamServerChannel] implement an
+ * [LspServerCommunicationChannel] that uses a stream and a sink (typically,
+ * standard input and standard output) to communicate with clients.
+ */
+class LspByteStreamServerChannel implements LspServerCommunicationChannel {
+  final Stream _input;
+
+  final IOSink _output;
+
+  final InstrumentationService _instrumentationService;
+
+  /**
+   * Completer that will be signalled when the input stream is closed.
+   */
+  final Completer _closed = new Completer();
+
+  /**
+   * True if [close] has been called.
+   */
+  bool _closeRequested = false;
+
+  LspByteStreamServerChannel(
+      this._input, this._output, this._instrumentationService);
+
+  /**
+   * Future that will be completed when the input stream is closed.
+   */
+  Future get closed {
+    return _closed.future;
+  }
+
+  @override
+  void close() {
+    if (!_closeRequested) {
+      _closeRequested = true;
+      assert(!_closed.isCompleted);
+      _closed.complete();
+    }
+  }
+
+  @override
+  void listen(void onMessage(Message message),
+      {Function onError, void onDone()}) {
+    _input.transform(new LspPacketTransformer()).listen(
+      (String data) => _readMessage(data, onMessage),
+      onError: onError,
+      onDone: () {
+        close();
+        onDone();
+      },
+    );
+  }
+
+  @override
+  void sendNotification(NotificationMessage notification) =>
+      _sendLsp(notification.toJson());
+
+  @override
+  void sendRequest(RequestMessage request) => _sendLsp(request.toJson());
+
+  @override
+  void sendResponse(ResponseMessage response) => _sendLsp(response.toJson());
+
+  /**
+   * Read a request from the given [data] and use the given function to handle
+   * the message.
+   */
+  void _readMessage(String data, void onMessage(Message request)) {
+    // Ignore any further requests after the communication channel is closed.
+    if (_closed.isCompleted) {
+      return;
+    }
+    ServerPerformanceStatistics.serverChannel.makeCurrentWhile(() {
+      _instrumentationService.logRequest(data);
+      final Map<String, Object> json = jsonDecode(data);
+      if (RequestMessage.canParse(json)) {
+        onMessage(RequestMessage.fromJson(json));
+      } else if (NotificationMessage.canParse(json)) {
+        onMessage(NotificationMessage.fromJson(json));
+      } else if (ResponseMessage.canParse(json)) {
+        onMessage(ResponseMessage.fromJson(json));
+      } else {
+        _sendParseError();
+      }
+    });
+  }
+
+  /// Sends a message prefixed with the required LSP headers.
+  void _sendLsp(Map<String, Object> json) {
+    // Don't send any further responses after the communication channel is
+    // closed.
+    if (_closeRequested) {
+      return;
+    }
+    ServerPerformanceStatistics.serverChannel.makeCurrentWhile(() {
+      final jsonEncodedBody = jsonEncode(json);
+      final utf8EncodedBody = utf8.encode(jsonEncodedBody);
+      final header = 'Content-Length: ${utf8EncodedBody.length}\r\n'
+          'Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n\r\n';
+      final asciiEncodedHeader = ascii.encode(header);
+
+      // Header is always ascii, body is always utf8!
+      _write(asciiEncodedHeader);
+      _write(utf8EncodedBody);
+
+      _instrumentationService.logResponse(jsonEncodedBody);
+    });
+  }
+
+  void _sendParseError() {
+    final error = new ResponseMessage(
+        null,
+        null,
+        new ResponseError(
+            ErrorCodes.ParseError, 'Unable to parse message', null),
+        jsonRpcVersion);
+    sendResponse(error);
+  }
+
+  /**
+   * Send [bytes] to [_output].
+   */
+  void _write(List<int> bytes) {
+    runZoned(
+      () => _output.add(bytes),
+      onError: (e) => close(),
+    );
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/channel/lsp_channel.dart b/pkg/analysis_server/lib/src/lsp/channel/lsp_channel.dart
new file mode 100644
index 0000000..5471e01
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/channel/lsp_channel.dart
@@ -0,0 +1,46 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+/**
+ * The abstract class [LspServerCommunicationChannel] defines the behavior of
+ * objects that allow an [LspAnalysisServer] to receive [RequestMessage]s and
+ * [NotificationMessage]s and to return both [ResponseMessage]s and
+ * [NotificationMessage]s.
+ */
+abstract class LspServerCommunicationChannel {
+  Future get closed;
+
+  /**
+   * Close the communication channel.
+   */
+  void close();
+
+  /**
+   * Listen to the channel for messages. If a message is received, invoke the
+   * [onMessage] function. If an error is encountered while trying to read from
+   * the socket, invoke the [onError] function. If the socket is closed by the
+   * client, invoke the [onDone] function.
+   * Only one listener is allowed per channel.
+   */
+  void listen(void onMessage(Message message),
+      {Function onError, void onDone()});
+
+  /**
+   * Send the given [notification] to the client.
+   */
+  void sendNotification(NotificationMessage notification);
+
+  /**
+   * Send the given [request] to the client.
+   */
+  void sendRequest(RequestMessage request);
+
+  /**
+   * Send the given [response] to the client.
+   */
+  void sendResponse(ResponseMessage response);
+}
diff --git a/pkg/analysis_server/lib/src/lsp/constants.dart b/pkg/analysis_server/lib/src/lsp/constants.dart
new file mode 100644
index 0000000..74a7949
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/constants.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+
+/// Constants for command IDs that are exchanged between LSP client/server.
+abstract class Commands {
+  /// A list of all commands IDs that can be sent to the client to inform which
+  /// commands should be sent to the server for execution (as opposed to being
+  /// executed in the local plugin).
+  static const serverSupportedCommands = [sortMembers, organizeImports];
+  static const sortMembers = 'edit.sortMembers';
+  static const organizeImports = 'edit.organizeImports';
+}
+
+/// CodeActionKinds supported by the server that are not declared in the LSP spec.
+abstract class DartCodeActionKind {
+  /// A list of all supported CodeAction kinds, supplied to the client during
+  /// initialization to allow enabling features based upon them.
+  static const serverSupportedKinds = [
+    CodeActionKind.Source,
+    // We have to explicitly list this for the client to enable built-in command.
+    CodeActionKind.SourceOrganizeImports,
+    SortMembers,
+  ];
+  static const SortMembers = const CodeActionKind('source.sortMembers');
+}
+
+abstract class ServerErrorCodes {
+  // JSON-RPC reserves -32000 to -32099 for implementation-defined server-errors.
+  static const ServerAlreadyStarted = const ErrorCodes(-32000);
+  static const UnhandledError = const ErrorCodes(-32001);
+  static const ServerAlreadyInitialized = const ErrorCodes(-32002);
+  static const InvalidFilePath = const ErrorCodes(-32003);
+  static const InvalidFileLineCol = const ErrorCodes(-32004);
+  static const UnknownCommand = const ErrorCodes(-32005);
+  static const InvalidCommandArguments = const ErrorCodes(-32006);
+  static const FileNotAnalyzed = const ErrorCodes(-32007);
+  static const FileHasErrors = const ErrorCodes(-32008);
+  static const ClientFailedToApplyEdit = const ErrorCodes(-32009);
+
+  /// An error raised when the server detects that the server and client are out
+  /// of sync and cannot recover. For example if a textDocument/didChange notification
+  /// has invalid offsets, suggesting the client and server have become out of sync
+  /// and risk invalid modifications to a file.
+  ///
+  /// The server should detect this error being returned, log it, then exit.
+  /// The client is expected to behave as suggested in the spec:
+  ///
+  ///  "If a client notices that a server exists unexpectedly it should try to
+  ///   restart the server. However clients should be careful to not restart a
+  ///   crashing server endlessly. VS Code for example doesn't restart a server
+  ///   if it crashes 5 times in the last 180 seconds."
+  static const ClientServerInconsistentState = const ErrorCodes(-32010);
+}
diff --git a/pkg/analysis_server/lib/src/lsp/dartdoc.dart b/pkg/analysis_server/lib/src/lsp/dartdoc.dart
new file mode 100644
index 0000000..dd2de9e
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/dartdoc.dart
@@ -0,0 +1,24 @@
+// 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.
+
+final _dartdocCodeBlockSections = new RegExp(r'(```\w+) +\w+');
+final _dartdocDirectives =
+    new RegExp(r'(\n *{@.*?}$)|(^{@.*?}\n)', multiLine: true);
+
+String cleanDartdoc(String doc) {
+  if (doc == null) {
+    return null;
+  }
+  // Remove any dartdoc directives like {@template xxx}
+  doc = doc.replaceAll(_dartdocDirectives, '');
+
+  // Remove any code block section names like ```dart preamble that Flutter
+  // docs contain.
+  doc = doc.replaceAllMapped(
+    _dartdocCodeBlockSections,
+    (match) => match.group(1),
+  );
+
+  return doc;
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
new file mode 100644
index 0000000..4161f20
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/commands/simple_edit_handler.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/services/correction/organize_directives.dart';
+
+class OrganizeImportsCommandHandler extends SimpleEditCommandHandler {
+  OrganizeImportsCommandHandler(LspAnalysisServer server) : super(server);
+
+  @override
+  String get commandName => 'Organize Imports';
+
+  @override
+  Future<ErrorOr<void>> handle(List<dynamic> arguments) async {
+    if (arguments == null || arguments.length != 1 || arguments[0] is! String) {
+      return ErrorOr.error(new ResponseError(
+        ServerErrorCodes.InvalidCommandArguments,
+        '$commandName requires a single String parameter containing the path of a Dart file',
+        null,
+      ));
+    }
+
+    // Get the version of the doc before we calculate edits so we can send it back
+    // to the client so that they can discard this edit if the document has been
+    // modified since.
+    final path = arguments.single;
+    final docIdentifier = server.getVersionedDocumentIdentifier(path);
+
+    final result = await requireUnit(path);
+    return result.mapResult((result) {
+      final code = result.content;
+      final unit = result.unit;
+
+      if (hasScanParseErrors(result.errors)) {
+        return ErrorOr.error(new ResponseError(
+          ServerErrorCodes.FileHasErrors,
+          'Unable to $commandName because the file contains parse errors',
+          path,
+        ));
+      }
+
+      final organizer = new DirectiveOrganizer(code, unit, result.errors);
+      final edits = organizer.organize();
+
+      return sendEditsToClient(docIdentifier, unit, edits);
+    });
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/simple_edit_handler.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/simple_edit_handler.dart
new file mode 100644
index 0000000..24c7b7d
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/simple_edit_handler.dart
@@ -0,0 +1,77 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/lsp/source_edits.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/error/error.dart' as engine;
+import 'package:analyzer/src/dart/scanner/scanner.dart' as engine;
+import 'package:analyzer/src/error/codes.dart' as engine;
+import 'package:analyzer/src/generated/engine.dart' as engine;
+import 'package:analyzer/src/generated/parser.dart' as engine;
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+
+abstract class SimpleEditCommandHandler
+    extends CommandHandler<ExecuteCommandParams, Object> {
+  SimpleEditCommandHandler(LspAnalysisServer server) : super(server);
+
+  String get commandName;
+
+  Future<ErrorOr<void>> sendEditsToClient(
+      VersionedTextDocumentIdentifier docIdentifier,
+      CompilationUnit unit,
+      List<SourceEdit> edits) async {
+    // If there are no edits to apply, just complete the command without going
+    // back to the client.
+    if (edits.length == 0) {
+      return success();
+    }
+
+    final workspaceEdit = toWorkspaceEdit(
+      server.clientCapabilities?.workspace,
+      [new FileEditInformation(docIdentifier, unit.lineInfo, edits)],
+    );
+
+    // Send the edit to the client via a applyEdit request (this is a request
+    // from server -> client and the client will provide a response).
+    final editResponse = await server.sendRequest(Method.workspace_applyEdit,
+        new ApplyWorkspaceEditParams(commandName, workspaceEdit));
+
+    if (editResponse.error != null) {
+      return error(
+        ServerErrorCodes.ClientFailedToApplyEdit,
+        'Client failed to apply workspace edit for $commandName',
+        editResponse.error,
+      );
+    }
+
+    // Now respond to this command request telling the client whether it was
+    // successful (since the client doesn't know that the workspace edit it was
+    // sent - and may have failed to apply - was related to this command
+    // execution).
+    // We need to fromJson to convert the JSON map to the real types.
+    final editResponseResult =
+        ApplyWorkspaceEditResponse.fromJson(editResponse.result);
+    if (editResponseResult.applied) {
+      return success();
+    } else {
+      return error(
+        ServerErrorCodes.ClientFailedToApplyEdit,
+        'Client failed to apply workspace edit for $commandName',
+        workspaceEdit,
+      );
+    }
+  }
+
+  bool hasScanParseErrors(List<engine.AnalysisError> errors) {
+    return errors.any((error) =>
+        error.errorCode is engine.ScannerErrorCode ||
+        error.errorCode is engine.ParserErrorCode);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
new file mode 100644
index 0000000..680d466
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/sort_members.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/commands/simple_edit_handler.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/services/correction/sort_members.dart';
+
+class SortMembersCommandHandler extends SimpleEditCommandHandler {
+  SortMembersCommandHandler(LspAnalysisServer server) : super(server);
+
+  @override
+  String get commandName => 'Sort Members';
+
+  @override
+  Future<ErrorOr<void>> handle(List<dynamic> arguments) async {
+    if (arguments == null || arguments.length != 1 || arguments[0] is! String) {
+      return ErrorOr.error(new ResponseError(
+        ServerErrorCodes.InvalidCommandArguments,
+        '$commandName requires a single String parameter containing the path of a Dart file',
+        null,
+      ));
+    }
+
+    // Get the version of the doc before we calculate edits so we can send it back
+    // to the client so that they can discard this edit if the document has been
+    // modified since.
+    final path = arguments.single;
+    final docIdentifier = server.getVersionedDocumentIdentifier(path);
+
+    var driver = server.getAnalysisDriver(path);
+    final result = await driver?.parseFile(path);
+    if (result == null) {
+      return ErrorOr.error(new ResponseError(
+        ServerErrorCodes.FileNotAnalyzed,
+        '$commandName is only available for analyzed files',
+        null,
+      ));
+    }
+    final code = result.content;
+    final unit = result.unit;
+
+    if (hasScanParseErrors(result.errors)) {
+      return ErrorOr.error(new ResponseError(
+        ServerErrorCodes.FileHasErrors,
+        'Unable to $commandName because the file contains parse errors',
+        path,
+      ));
+    }
+
+    final sorter = new MemberSorter(code, unit);
+    final edits = sorter.sort();
+    return await sendEditsToClient(docIdentifier, unit, edits);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
new file mode 100644
index 0000000..dc83f4f
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
@@ -0,0 +1,284 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:collection';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/lsp/source_edits.dart';
+import 'package:analysis_server/src/protocol_server.dart' show SourceChange;
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analysis_server/src/services/correction/assist_internal.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart'
+    show InconsistentAnalysisException;
+import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
+
+class CodeActionHandler extends MessageHandler<CodeActionParams,
+    List<Either2<Command, CodeAction>>> {
+  CodeActionHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_codeAction;
+
+  @override
+  CodeActionParams convertParams(Map<String, dynamic> json) =>
+      CodeActionParams.fromJson(json);
+
+  Future<ErrorOr<List<Either2<Command, CodeAction>>>> handle(
+      CodeActionParams params) async {
+    final capabilities = server?.clientCapabilities?.textDocument?.codeAction;
+
+    final clientSupportsLiteralCodeActions =
+        capabilities?.codeActionLiteralSupport != null;
+
+    final clientSupportedCodeActionKinds = new HashSet<CodeActionKind>.of(
+        capabilities?.codeActionLiteralSupport?.codeActionKind?.valueSet ?? []);
+
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+
+    return unit.mapResult((unit) {
+      final startOffset = toOffset(unit.lineInfo, params.range.start);
+      final endOffset = toOffset(unit.lineInfo, params.range.end);
+      return startOffset.mapResult((startOffset) {
+        return endOffset.mapResult((endOffset) {
+          final offset = startOffset;
+          final length = endOffset - startOffset;
+          return _getCodeActions(
+              clientSupportedCodeActionKinds,
+              clientSupportsLiteralCodeActions,
+              path.result,
+              params.range,
+              offset,
+              length,
+              unit);
+        });
+      });
+    });
+  }
+
+  /// Wraps a command in a CodeAction if the client supports it so that a
+  /// CodeActionKind can be supplied.
+  Either2<Command, CodeAction> _commandOrCodeAction(
+    bool clientSupportsLiteralCodeActions,
+    CodeActionKind kind,
+    Command command,
+  ) {
+    return clientSupportsLiteralCodeActions
+        ? Either2<Command, CodeAction>.t2(
+            new CodeAction(command.title, kind, null, null, command),
+          )
+        : Either2<Command, CodeAction>.t1(command);
+  }
+
+  /// Creates a CodeAction to apply this assist. Note: This code will fetch the
+  /// version of each document being modified so it's important to call this
+  /// immediately after computing edits to ensure the document is not modified
+  /// before the version number is read.
+  Either2<Command, CodeAction> _createAssistAction(Assist assist) {
+    return new Either2<Command, CodeAction>.t2(new CodeAction(
+      assist.change.message,
+      CodeActionKind.Refactor,
+      const [],
+      _createWorkspaceEdit(assist.change),
+      null,
+    ));
+  }
+
+  /// Creates a CodeAction to apply this fix. Note: This code will fetch the
+  /// version of each document being modified so it's important to call this
+  /// immediately after computing edits to ensure the document is not modified
+  /// before the version number is read.
+  Either2<Command, CodeAction> _createFixAction(
+      Fix fix, Diagnostic diagnostic) {
+    return new Either2<Command, CodeAction>.t2(new CodeAction(
+      fix.change.message,
+      CodeActionKind.QuickFix,
+      [diagnostic],
+      _createWorkspaceEdit(fix.change),
+      null,
+    ));
+  }
+
+  /// Note: This code will fetch the version of each document being modified so
+  /// it's important to call this immediately after computing edits to ensure
+  /// the document is not modified before the version number is read.
+  WorkspaceEdit _createWorkspaceEdit(SourceChange change) {
+    return toWorkspaceEdit(
+        server.clientCapabilities?.workspace,
+        change.edits
+            .map((e) => new FileEditInformation(
+                server.getVersionedDocumentIdentifier(e.file),
+                server.getLineInfo(e.file),
+                e.edits))
+            .toList());
+  }
+
+  Future<List<Either2<Command, CodeAction>>> _getAssistActions(
+    HashSet<CodeActionKind> clientSupportedCodeActionKinds,
+    bool clientSupportsLiteralCodeActions,
+    int offset,
+    int length,
+    ResolvedUnitResult unit,
+  ) async {
+    // TODO(dantup): Is it acceptable not to support these for clients that can't
+    // handle Code Action literals? (Doing so requires we encode this into a
+    // command/arguments set and allow the client to call us back later).
+    if (!clientSupportsLiteralCodeActions ||
+        !clientSupportedCodeActionKinds.contains(CodeActionKind.Refactor)) {
+      return const [];
+    }
+
+    try {
+      var context = new DartAssistContextImpl(
+        DartChangeWorkspace(server.currentSessions),
+        unit,
+        offset,
+        length,
+      );
+      final processor = new AssistProcessor(context);
+      final assists = await processor.compute();
+      assists.sort(Assist.SORT_BY_RELEVANCE);
+
+      return assists.map(_createAssistAction).toList();
+    } on InconsistentAnalysisException {
+      // If an InconsistentAnalysisException occurs, it's likely the user modified
+      // the source and therefore is no longer interested in the results, so
+      // just return an empty set.
+      return [];
+    }
+  }
+
+  Future<ErrorOr<List<Either2<Command, CodeAction>>>> _getCodeActions(
+    HashSet<CodeActionKind> kinds,
+    bool supportsLiterals,
+    String path,
+    Range range,
+    int offset,
+    int length,
+    ResolvedUnitResult unit,
+  ) async {
+    final results = await Future.wait([
+      _getSourceActions(kinds, supportsLiterals, path),
+      _getAssistActions(kinds, supportsLiterals, offset, length, unit),
+      _getRefactorActions(kinds, supportsLiterals, path, range, unit),
+      _getFixActions(kinds, supportsLiterals, range, unit),
+    ]);
+    final flatResults = results.expand((x) => x).toList();
+    return success(flatResults);
+  }
+
+  Future<List<Either2<Command, CodeAction>>> _getFixActions(
+    HashSet<CodeActionKind> clientSupportedCodeActionKinds,
+    bool clientSupportsLiteralCodeActions,
+    Range range,
+    ResolvedUnitResult unit,
+  ) async {
+    // TODO(dantup): Is it acceptable not to support these for clients that can't
+    // handle Code Action literals? (Doing so requires we encode this into a
+    // command/arguments set and allow the client to call us back later).
+    if (!clientSupportsLiteralCodeActions ||
+        !clientSupportedCodeActionKinds.contains(CodeActionKind.QuickFix)) {
+      return const [];
+    }
+
+    final lineInfo = unit.lineInfo;
+    final codeActions = <Either2<Command, CodeAction>>[];
+    final fixContributor = new DartFixContributor();
+
+    try {
+      for (final error in unit.errors) {
+        // Server lineNumber is one-based so subtract one.
+        int errorLine = lineInfo.getLocation(error.offset).lineNumber - 1;
+        if (errorLine >= range.start.line && errorLine <= range.end.line) {
+          var workspace = DartChangeWorkspace(server.currentSessions);
+          var context = new DartFixContextImpl(workspace, unit, error);
+          final fixes = await fixContributor.computeFixes(context);
+          if (fixes.isNotEmpty) {
+            fixes.sort(Fix.SORT_BY_RELEVANCE);
+
+            final diagnostic = toDiagnostic(lineInfo, error);
+            codeActions.addAll(
+              fixes.map((fix) => _createFixAction(fix, diagnostic)),
+            );
+          }
+        }
+      }
+      return codeActions;
+    } on InconsistentAnalysisException {
+      // If an InconsistentAnalysisException occurs, it's likely the user modified
+      // the source and therefore is no longer interested in the results, so
+      // just return an empty set.
+      return [];
+    }
+  }
+
+  Future<List<Either2<Command, CodeAction>>> _getRefactorActions(
+    HashSet<CodeActionKind> clientSupportedCodeActionKinds,
+    bool clientSupportsLiteralCodeActions,
+    String path,
+    Range range,
+    ResolvedUnitResult unit,
+  ) async {
+    // TODO(dantup): Is it acceptable not to support these for clients that can't
+    // handle Code Action literals? (Doing so requires we encode this into a
+    // command/arguments set and allow the client to call us back later).
+    if (!clientSupportsLiteralCodeActions ||
+        !clientSupportedCodeActionKinds.contains(CodeActionKind.Refactor)) {
+      return const [];
+    }
+
+    try {
+      // TODO(dantup): Implement refactors.
+      return [];
+    } on InconsistentAnalysisException {
+      // If an InconsistentAnalysisException occurs, it's likely the user modified
+      // the source and therefore is no longer interested in the results, so
+      // just return an empty set.
+      return [];
+    }
+  }
+
+  /// Gets "Source" CodeActions, which are actions that apply to whole files of
+  /// source such as Sort Members and Organise Imports.
+  Future<List<Either2<Command, CodeAction>>> _getSourceActions(
+    HashSet<CodeActionKind> clientSupportedCodeActionKinds,
+    bool clientSupportsLiteralCodeActions,
+    String path,
+  ) async {
+    // The source actions supported are only valid for Dart files.
+    if (!AnalysisEngine.isDartFileName(path)) {
+      return [];
+    }
+
+    // If the client told us what kinds they support but it does not include
+    // Source then don't return any.
+    if (clientSupportsLiteralCodeActions &&
+        !clientSupportedCodeActionKinds.contains(CodeActionKind.Source)) {
+      return [];
+    }
+
+    return [
+      _commandOrCodeAction(
+        clientSupportsLiteralCodeActions,
+        DartCodeActionKind.SortMembers,
+        new Command('Sort Members', Commands.sortMembers, [path]),
+      ),
+      _commandOrCodeAction(
+        clientSupportsLiteralCodeActions,
+        CodeActionKind.SourceOrganizeImports,
+        new Command('Organize Imports', Commands.organizeImports, [path]),
+      ),
+    ];
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
new file mode 100644
index 0000000..6bf8c1c
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
@@ -0,0 +1,100 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:collection';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/provisional/completion/completion_core.dart';
+import 'package:analysis_server/src/services/completion/completion_core.dart';
+import 'package:analysis_server/src/services/completion/completion_performance.dart';
+import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+
+// If the client does not provide capabilities.completion.completionItemKind.valueSet
+// then we must never send a kind that's not in this list.
+final defaultSupportedCompletionKinds = new HashSet<CompletionItemKind>.of([
+  CompletionItemKind.Text,
+  CompletionItemKind.Method,
+  CompletionItemKind.Function,
+  CompletionItemKind.Constructor,
+  CompletionItemKind.Field,
+  CompletionItemKind.Variable,
+  CompletionItemKind.Class,
+  CompletionItemKind.Interface,
+  CompletionItemKind.Module,
+  CompletionItemKind.Property,
+  CompletionItemKind.Unit,
+  CompletionItemKind.Value,
+  CompletionItemKind.Enum,
+  CompletionItemKind.Keyword,
+  CompletionItemKind.Snippet,
+  CompletionItemKind.Color,
+  CompletionItemKind.File,
+  CompletionItemKind.Reference,
+]);
+
+class CompletionHandler
+    extends MessageHandler<CompletionParams, List<CompletionItem>> {
+  CompletionHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_completion;
+
+  @override
+  CompletionParams convertParams(Map<String, dynamic> json) =>
+      CompletionParams.fromJson(json);
+
+  Future<ErrorOr<List<CompletionItem>>> handle(CompletionParams params) async {
+    final completionCapabilities =
+        server?.clientCapabilities?.textDocument?.completion;
+
+    final clientSupportedCompletionKinds =
+        completionCapabilities?.completionItemKind?.valueSet != null
+            ? new HashSet<CompletionItemKind>.of(
+                completionCapabilities.completionItemKind.valueSet)
+            : defaultSupportedCompletionKinds;
+
+    final pos = params.position;
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
+    return offset.mapResult((offset) => _getItems(
+          completionCapabilities,
+          clientSupportedCompletionKinds,
+          unit.result,
+          offset,
+        ));
+  }
+
+  Future<ErrorOr<List<CompletionItem>>> _getItems(
+    TextDocumentClientCapabilitiesCompletion completionCapabilities,
+    HashSet<CompletionItemKind> clientSupportedCompletionKinds,
+    ResolvedUnitResult unit,
+    int offset,
+  ) async {
+    final performance = new CompletionPerformance();
+    final completionRequest =
+        new CompletionRequestImpl(unit, offset, performance);
+
+    try {
+      CompletionContributor contributor = new DartCompletionManager();
+      final items = await contributor.computeSuggestions(completionRequest);
+      return success(items
+          .map((item) => toCompletionItem(
+                completionCapabilities,
+                clientSupportedCompletionKinds,
+                unit.lineInfo,
+                item,
+                completionRequest.replacementOffset,
+                completionRequest.replacementLength,
+              ))
+          .toList());
+    } on AbortCompletion {
+      return success([]);
+    }
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
new file mode 100644
index 0000000..c3e9246
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/domains/analysis/navigation_dart.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/protocol_server.dart' show NavigationTarget;
+import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
+
+class DefinitionHandler
+    extends MessageHandler<TextDocumentPositionParams, List<Location>> {
+  DefinitionHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_definition;
+
+  @override
+  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
+      TextDocumentPositionParams.fromJson(json);
+
+  Future<ErrorOr<List<Location>>> handle(
+      TextDocumentPositionParams params) async {
+    final pos = params.position;
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
+
+    return offset.mapResult((offset) {
+      NavigationCollectorImpl collector = new NavigationCollectorImpl();
+      computeDartNavigation(
+          server.resourceProvider, collector, unit.result.unit, offset, 0);
+
+      Location toLocation(NavigationTarget target) {
+        final targetFilePath = collector.files[target.fileIndex];
+        final lineInfo = server.getLineInfo(targetFilePath);
+        return navigationTargetToLocation(targetFilePath, target, lineInfo);
+      }
+
+      return success(convert(collector.targets, toLocation).toList());
+    });
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
new file mode 100644
index 0000000..e1fda79
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
@@ -0,0 +1,157 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:collection';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/computer/computer_outline.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/protocol_server.dart' show Outline;
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/source/line_info.dart';
+
+// If the client does not provide capabilities.documentSymbol.symbolKind.valueSet
+// then we must never send a kind that's not in this list.
+final defaultSupportedSymbolKinds = new HashSet<SymbolKind>.of([
+  SymbolKind.File,
+  SymbolKind.Module,
+  SymbolKind.Namespace,
+  SymbolKind.Package,
+  SymbolKind.Class,
+  SymbolKind.Method,
+  SymbolKind.Property,
+  SymbolKind.Field,
+  SymbolKind.Constructor,
+  SymbolKind.Enum,
+  SymbolKind.Interface,
+  SymbolKind.Function,
+  SymbolKind.Variable,
+  SymbolKind.Constant,
+  SymbolKind.Str,
+  SymbolKind.Number,
+  SymbolKind.Boolean,
+  SymbolKind.Array,
+]);
+
+class DocumentSymbolHandler extends MessageHandler<DocumentSymbolParams,
+    Either2<List<DocumentSymbol>, List<SymbolInformation>>> {
+  DocumentSymbolHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_documentSymbol;
+
+  @override
+  DocumentSymbolParams convertParams(Map<String, dynamic> json) =>
+      DocumentSymbolParams.fromJson(json);
+
+  Future<ErrorOr<Either2<List<DocumentSymbol>, List<SymbolInformation>>>>
+      handle(DocumentSymbolParams params) async {
+    final symbolCapabilities =
+        server?.clientCapabilities?.textDocument?.documentSymbol;
+
+    final clientSupportedSymbolKinds =
+        symbolCapabilities?.symbolKind?.valueSet != null
+            ? new HashSet<SymbolKind>.of(symbolCapabilities.symbolKind.valueSet)
+            : defaultSupportedSymbolKinds;
+
+    final clientSupportsDocumentSymbol =
+        symbolCapabilities?.hierarchicalDocumentSymbolSupport ?? false;
+
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    return unit.mapResult((unit) => _getSymbols(clientSupportedSymbolKinds,
+        clientSupportsDocumentSymbol, path.result, unit));
+  }
+
+  DocumentSymbol _asDocumentSymbol(
+    HashSet<SymbolKind> clientSupportedSymbolKinds,
+    LineInfo lineInfo,
+    Outline outline,
+  ) {
+    return new DocumentSymbol(
+      outline.element.name,
+      outline.element.parameters,
+      elementKindToSymbolKind(clientSupportedSymbolKinds, outline.element.kind),
+      outline.element.isDeprecated,
+      toRange(lineInfo, outline.codeOffset, outline.codeLength),
+      toRange(lineInfo, outline.element.location.offset,
+          outline.element.location.length),
+      outline.children
+          ?.map((child) =>
+              _asDocumentSymbol(clientSupportedSymbolKinds, lineInfo, child))
+          ?.toList(),
+    );
+  }
+
+  SymbolInformation _asSymbolInformation(
+    String containerName,
+    HashSet<SymbolKind> clientSupportedSymbolKinds,
+    String documentUri,
+    LineInfo lineInfo,
+    Outline outline,
+  ) {
+    return new SymbolInformation(
+      outline.element.name,
+      elementKindToSymbolKind(clientSupportedSymbolKinds, outline.element.kind),
+      outline.element.isDeprecated,
+      new Location(
+        documentUri,
+        toRange(lineInfo, outline.element.location.offset,
+            outline.element.location.length),
+      ),
+      containerName,
+    );
+  }
+
+  ErrorOr<Either2<List<DocumentSymbol>, List<SymbolInformation>>> _getSymbols(
+    HashSet<SymbolKind> clientSupportedSymbolKinds,
+    bool clientSupportsDocumentSymbol,
+    String path,
+    ResolvedUnitResult unit,
+  ) {
+    final computer =
+        new DartUnitOutlineComputer(path, unit.lineInfo, unit.unit);
+    final outline = computer.compute();
+
+    if (clientSupportsDocumentSymbol) {
+      // Return a tree of DocumentSymbol only if the client shows explicit support
+      // for it.
+      return success(
+        Either2<List<DocumentSymbol>, List<SymbolInformation>>.t1(
+          outline?.children
+              ?.map((child) => _asDocumentSymbol(
+                  clientSupportedSymbolKinds, unit.lineInfo, child))
+              ?.toList(),
+        ),
+      );
+    } else {
+      // Otherwise, we need to use the original flat SymbolInformation.
+      final allSymbols = <SymbolInformation>[];
+      final documentUri = new Uri.file(path).toString();
+
+      // Adds a symbol and it's children recursively, supplying the parent
+      // name as required by SymbolInformation.
+      addSymbol(Outline outline, {String parentName}) {
+        allSymbols.add(_asSymbolInformation(
+          parentName,
+          clientSupportedSymbolKinds,
+          documentUri,
+          unit.lineInfo,
+          outline,
+        ));
+        outline.children?.forEach(
+          (c) => addSymbol(c, parentName: outline.element.name),
+        );
+      }
+
+      outline?.children?.forEach(addSymbol);
+
+      return success(
+        Either2<List<DocumentSymbol>, List<SymbolInformation>>.t2(allSymbols),
+      );
+    }
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
new file mode 100644
index 0000000..a1bb950
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/commands/organize_imports.dart';
+import 'package:analysis_server/src/lsp/handlers/commands/sort_members.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+/// Handles workspace/executeCommand messages by delegating to a specific handler
+/// based on the command.
+class ExecuteCommandHandler
+    extends MessageHandler<ExecuteCommandParams, Object> {
+  final Map<String, CommandHandler> commandHandlers;
+  ExecuteCommandHandler(LspAnalysisServer server)
+      : commandHandlers = {
+          Commands.sortMembers: new SortMembersCommandHandler(server),
+          Commands.organizeImports: new OrganizeImportsCommandHandler(server),
+        },
+        super(server);
+
+  Method get handlesMessage => Method.workspace_executeCommand;
+
+  @override
+  ExecuteCommandParams convertParams(Map<String, dynamic> json) =>
+      ExecuteCommandParams.fromJson(json);
+
+  Future<ErrorOr<Object>> handle(ExecuteCommandParams params) async {
+    final handler = commandHandlers[params.command];
+    if (handler == null) {
+      return error(ServerErrorCodes.UnknownCommand,
+          '${params.command} is not a valid command identifier', null);
+    }
+    return handler.handle(params.arguments);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
new file mode 100644
index 0000000..f2b3579
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+class ExitMessageHandler extends MessageHandler<void, void> {
+  ExitMessageHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.exit;
+
+  @override
+  void convertParams(Map<String, dynamic> json) => null;
+
+  @override
+  Future<ErrorOr<void>> handle(void _) async {
+    await server.shutdown();
+    return success();
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
new file mode 100644
index 0000000..6fb1c2f
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/lsp/source_edits.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+
+class FormatOnTypeHandler
+    extends MessageHandler<DocumentOnTypeFormattingParams, List<TextEdit>> {
+  FormatOnTypeHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_onTypeFormatting;
+
+  @override
+  DocumentOnTypeFormattingParams convertParams(Map<String, dynamic> json) =>
+      DocumentOnTypeFormattingParams.fromJson(json);
+
+  ErrorOr<List<TextEdit>> formatFile(String path, ResolvedUnitResult unit) {
+    final unformattedSource =
+        server.resourceProvider.getFile(path).readAsStringSync();
+
+    return success(generateEditsForFormatting(unformattedSource));
+  }
+
+  Future<ErrorOr<List<TextEdit>>> handle(
+      DocumentOnTypeFormattingParams params) async {
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    return unit.mapResult((unit) => formatFile(path.result, unit));
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
new file mode 100644
index 0000000..e226bc4
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/lsp/source_edits.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+
+class FormattingHandler
+    extends MessageHandler<DocumentFormattingParams, List<TextEdit>> {
+  FormattingHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_formatting;
+
+  @override
+  DocumentFormattingParams convertParams(Map<String, dynamic> json) =>
+      DocumentFormattingParams.fromJson(json);
+
+  ErrorOr<List<TextEdit>> formatFile(String path, ResolvedUnitResult unit) {
+    final unformattedSource =
+        server.resourceProvider.getFile(path).readAsStringSync();
+
+    return success(generateEditsForFormatting(unformattedSource));
+  }
+
+  Future<ErrorOr<List<TextEdit>>> handle(
+      DocumentFormattingParams params) async {
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    return unit.mapResult((unit) => formatFile(path.result, unit));
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
new file mode 100644
index 0000000..a5396e5
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analysis_server/src/computer/computer_hover.dart';
+import 'package:analysis_server/src/lsp/dartdoc.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/source/line_info.dart';
+
+class HoverHandler extends MessageHandler<TextDocumentPositionParams, Hover> {
+  HoverHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_hover;
+
+  @override
+  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
+      TextDocumentPositionParams.fromJson(json);
+
+  Future<ErrorOr<Hover>> handle(TextDocumentPositionParams params) async {
+    final pos = params.position;
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
+    return offset.mapResult((offset) => _getHover(unit.result, offset));
+  }
+
+  Hover toHover(LineInfo lineInfo, HoverInformation hover) {
+    if (hover == null) {
+      return null;
+    }
+
+    // Import prefix tooltips are not useful currently.
+    // https://github.com/dart-lang/sdk/issues/32735
+    if (hover.elementKind == 'import prefix') {
+      return null;
+    }
+
+    final content = new StringBuffer();
+    const divider = '---';
+
+    // Description.
+    if (hover.elementDescription != null) {
+      content.writeln('```dart');
+      if (hover.isDeprecated) {
+        content.write('(deprecated) ');
+      }
+      content..writeln(hover.elementDescription)..writeln('```');
+    }
+
+    // Source library.
+    if (hover.containingLibraryName != null &&
+        hover.containingLibraryName.isNotEmpty) {
+      content..writeln('*${hover.containingLibraryName}*')..writeln();
+    } else if (hover.containingLibraryPath != null) {
+      // TODO(dantup): Support displaying the package name (probably by adding
+      // containingPackageName to the main hover?) once the analyzer work to
+      // support this (inc Bazel/Gn) is done.
+      // content..writeln('*${hover.containingPackageName}*')..writeln();
+    }
+
+    // Doc comments.
+    if (hover.dartdoc != null) {
+      if (content.length != 0) {
+        content.writeln(divider);
+      }
+      content.writeln(cleanDartdoc(hover.dartdoc));
+    }
+
+    final formats =
+        server?.clientCapabilities?.textDocument?.hover?.contentFormat;
+    return new Hover(
+      asStringOrMarkupContent(formats, content.toString().trimRight()),
+      toRange(lineInfo, hover.offset, hover.length),
+    );
+  }
+
+  ErrorOr<Hover> _getHover(ResolvedUnitResult unit, int offset) {
+    final hover = new DartUnitHoverComputer(unit.unit, offset).compute();
+    return success(toHover(unit.lineInfo, hover));
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
new file mode 100644
index 0000000..7783434
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
@@ -0,0 +1,86 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_states.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+class InitializeMessageHandler
+    extends MessageHandler<InitializeParams, InitializeResult> {
+  InitializeMessageHandler(LspAnalysisServer server) : super(server);
+
+  Method get handlesMessage => Method.initialize;
+
+  @override
+  InitializeParams convertParams(Map<String, dynamic> json) =>
+      InitializeParams.fromJson(json);
+
+  ErrorOr<InitializeResult> handle(InitializeParams params) {
+    final openWorkspacePaths = <String>[];
+
+    if (params.workspaceFolders != null) {
+      params.workspaceFolders.forEach((wf) {
+        openWorkspacePaths.add(Uri.parse(wf.uri).toFilePath());
+      });
+    }
+    if (params.rootUri != null) {
+      openWorkspacePaths.add(Uri.parse(params.rootUri).toFilePath());
+      // ignore: deprecated_member_use
+    } else if (params.rootPath != null) {
+      openWorkspacePaths.add(params.rootUri);
+    }
+
+    server.setClientCapabilities(params.capabilities);
+    server.messageHandler =
+        new InitializingStateMessageHandler(server, openWorkspacePaths);
+
+    return success(new InitializeResult(new ServerCapabilities(
+        Either2<TextDocumentSyncOptions, num>.t1(new TextDocumentSyncOptions(
+          true,
+          TextDocumentSyncKind.Incremental,
+          false,
+          false,
+          null,
+        )),
+        true, // hoverProvider
+        new CompletionOptions(
+          false,
+          // Set the characters that will cause the editor to automatically
+          // trigger completion.
+          // TODO(dantup): This is quite eager and may need filtering in the
+          // completion handler.
+          // See https://github.com/Dart-Code/Dart-Code/blob/c616c93c87972713454eb0518f97c0278201a99a/src/providers/dart_completion_item_provider.ts#L36
+          r'''.: =(${'"/\'''.split(''),
+        ),
+        new SignatureHelpOptions(
+          // TODO(dantup): Signature help triggering is even more sensitive to
+          // bad chars, so we'll need to implement the logic described here:
+          // https://github.com/dart-lang/sdk/issues/34241
+          [],
+        ),
+        true, // definitionProvider
+        null,
+        null,
+        true, // referencesProvider
+        null,
+        true, // documentSymbolProvider
+        null,
+        Either2<bool, CodeActionOptions>.t2(
+            new CodeActionOptions(DartCodeActionKind.serverSupportedKinds)),
+        null,
+        true, // documentFormattingProvider
+        false, // documentRangeFormattingProvider
+        new DocumentOnTypeFormattingOptions('}', [';']),
+        null,
+        null,
+        null,
+        null,
+        new ExecuteCommandOptions(Commands.serverSupportedCommands),
+        null,
+        null)));
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
new file mode 100644
index 0000000..8201ae8
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
@@ -0,0 +1,28 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_states.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+class IntializedMessageHandler extends MessageHandler<InitializedParams, void> {
+  final List<String> openWorkspacePaths;
+  IntializedMessageHandler(LspAnalysisServer server, this.openWorkspacePaths)
+      : super(server);
+  Method get handlesMessage => Method.initialized;
+
+  @override
+  InitializedParams convertParams(Map<String, dynamic> json) =>
+      InitializedParams.fromJson(json);
+
+  ErrorOr<void> handle(InitializedParams params) {
+    server.messageHandler = new InitializedStateMessageHandler(server);
+
+    server.setAnalysisRoots(openWorkspacePaths, [], {});
+
+    return success();
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_references.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_references.dart
new file mode 100644
index 0000000..f6f803f
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_references.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/domains/analysis/navigation_dart.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/protocol_server.dart' show SearchResult;
+import 'package:analysis_server/src/protocol_server.dart' show NavigationTarget;
+import 'package:analysis_server/src/search/element_references.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
+
+class ReferencesHandler
+    extends MessageHandler<ReferenceParams, List<Location>> {
+  ReferencesHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_references;
+
+  @override
+  ReferenceParams convertParams(Map<String, dynamic> json) =>
+      ReferenceParams.fromJson(json);
+
+  @override
+  Future<ErrorOr<List<Location>>> handle(ReferenceParams params) async {
+    final pos = params.position;
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
+    return offset.mapResult(
+        (offset) => _getRefererences(path.result, offset, params, unit.result));
+  }
+
+  List<Location> _getDeclarations(CompilationUnit unit, int offset) {
+    final collector = new NavigationCollectorImpl();
+    computeDartNavigation(server.resourceProvider, collector, unit, offset, 0);
+
+    return convert(collector.targets, (NavigationTarget target) {
+      final targetFilePath = collector.files[target.fileIndex];
+      final lineInfo = server.getLineInfo(targetFilePath);
+      return navigationTargetToLocation(targetFilePath, target, lineInfo);
+    }).toList();
+  }
+
+  Future<ErrorOr<List<Location>>> _getRefererences(String path, int offset,
+      ReferenceParams params, ResolvedUnitResult unit) async {
+    Element element = await server.getElementAtOffset(path, offset);
+    if (element is ImportElement) {
+      element = (element as ImportElement).prefix;
+    }
+    if (element is FieldFormalParameterElement) {
+      element = (element as FieldFormalParameterElement).field;
+    }
+    if (element is PropertyAccessorElement) {
+      element = (element as PropertyAccessorElement).variable;
+    }
+    if (element == null) {
+      return success();
+    }
+
+    final computer = new ElementReferencesComputer(server.searchEngine);
+    final results = await computer.compute(element, false);
+
+    Location toLocation(SearchResult result) {
+      final lineInfo = server.getLineInfo(result.location.file);
+      return searchResultToLocation(result, lineInfo);
+    }
+
+    final referenceResults = convert(results, toLocation).toList();
+
+    if (params.context?.includeDeclaration == true) {
+      // Also include the definition for the symbol at this location.
+      referenceResults.addAll(_getDeclarations(unit.unit, offset));
+    }
+
+    return success(referenceResults);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
new file mode 100644
index 0000000..8cd06e5
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
@@ -0,0 +1,27 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+/// A [MessageHandler] that rejects specific tpyes of messages with a given
+/// error code/message.
+class RejectMessageHandler extends MessageHandler<Object, void> {
+  final Method handlesMessage;
+  final ErrorCodes errorCode;
+  final String errorMessage;
+  RejectMessageHandler(LspAnalysisServer server, this.handlesMessage,
+      this.errorCode, this.errorMessage)
+      : super(server);
+
+  @override
+  void convertParams(Map<String, dynamic> json) => null;
+
+  @override
+  ErrorOr<void> handle(void _) {
+    return error(errorCode, errorMessage, null);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
new file mode 100644
index 0000000..82e50f6
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+class ShutdownMessageHandler extends MessageHandler<void, void> {
+  ShutdownMessageHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.shutdown;
+
+  @override
+  void convertParams(Map<String, dynamic> json) => null;
+
+  @override
+  ErrorOr<void> handle(void _) {
+    // We can clean up and shut down here, but we cannot terminate the server
+    // because that must be done after the exit notification.
+    return success();
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
new file mode 100644
index 0000000..2fe40ef
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/computer/computer_signature.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+
+class SignatureHelpHandler
+    extends MessageHandler<TextDocumentPositionParams, SignatureHelp> {
+  SignatureHelpHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_signatureHelp;
+
+  @override
+  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
+      TextDocumentPositionParams.fromJson(json);
+
+  Future<ErrorOr<SignatureHelp>> handle(
+      TextDocumentPositionParams params) async {
+    final pos = params.position;
+    final path = pathOfDoc(params.textDocument);
+    final unit = await path.mapResult(requireUnit);
+    final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
+
+    return offset.mapResult((offset) {
+      final computer = new DartUnitSignatureComputer(unit.result.unit, offset);
+      if (!computer.offsetIsValid) {
+        return success(); // No error, just no valid hover.
+      }
+      final signature = computer.compute();
+      if (signature == null) {
+        return success(); // No error, just no valid hover.
+      }
+      final formats = server?.clientCapabilities?.textDocument?.signatureHelp
+          ?.signatureInformation?.documentationFormat;
+      return success(toSignatureHelp(formats, signature));
+    });
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
new file mode 100644
index 0000000..b1e6c2b
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
@@ -0,0 +1,99 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_code_actions.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_completion.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_definition.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_document_symbols.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_execute_command.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_format_on_type.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_formatting.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_hover.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_initialize.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_initialized.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_references.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_signature_help.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_text_document_changes.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+
+/// The server moves to this state when a critical unrecoverrable error (for
+/// example, inconsistent document state between server/client) occurs and will
+/// reject all messages.
+class FailureStateMessageHandler extends ServerStateMessageHandler {
+  FailureStateMessageHandler(LspAnalysisServer server) : super(server);
+
+  @override
+  FutureOr<ErrorOr<Object>> handleUnknownMessage(IncomingMessage message) {
+    return failure(
+        ErrorCodes.InternalError,
+        'An unrecoverable error occurred and the server cannot process messages',
+        null);
+  }
+}
+
+class InitializedStateMessageHandler extends ServerStateMessageHandler {
+  InitializedStateMessageHandler(LspAnalysisServer server) : super(server) {
+    reject(Method.initialize, ServerErrorCodes.ServerAlreadyInitialized,
+        'Server already initialized');
+    reject(Method.initialized, ServerErrorCodes.ServerAlreadyInitialized,
+        'Server already initialized');
+    registerHandler(new TextDocumentOpenHandler(server));
+    registerHandler(new TextDocumentChangeHandler(server));
+    registerHandler(new TextDocumentCloseHandler(server));
+    registerHandler(new HoverHandler(server));
+    registerHandler(new CompletionHandler(server));
+    registerHandler(new SignatureHelpHandler(server));
+    registerHandler(new DefinitionHandler(server));
+    registerHandler(new ReferencesHandler(server));
+    registerHandler(new FormattingHandler(server));
+    registerHandler(new FormatOnTypeHandler(server));
+    registerHandler(new DocumentSymbolHandler(server));
+    registerHandler(new CodeActionHandler(server));
+    registerHandler(new ExecuteCommandHandler(server));
+  }
+}
+
+class InitializingStateMessageHandler extends ServerStateMessageHandler {
+  InitializingStateMessageHandler(
+      LspAnalysisServer server, List<String> openWorkspacePaths)
+      : super(server) {
+    reject(Method.initialize, ServerErrorCodes.ServerAlreadyInitialized,
+        'Server already initialized');
+    registerHandler(new IntializedMessageHandler(server, openWorkspacePaths));
+  }
+
+  @override
+  ErrorOr<void> handleUnknownMessage(IncomingMessage message) {
+    // Silently drop non-requests.
+    if (message is! RequestMessage) {
+      return success();
+    }
+    return failure(
+        ErrorCodes.ServerNotInitialized,
+        'Unable to handle ${message.method} before the server is initialized '
+        'and the client has sent the initialized notification');
+  }
+}
+
+class UninitializedStateMessageHandler extends ServerStateMessageHandler {
+  UninitializedStateMessageHandler(LspAnalysisServer server) : super(server) {
+    registerHandler(new InitializeMessageHandler(server));
+  }
+
+  @override
+  FutureOr<ErrorOr<Object>> handleUnknownMessage(IncomingMessage message) {
+    // Silently drop non-requests.
+    if (message is! RequestMessage) {
+      return success();
+    }
+    return failure(ErrorCodes.ServerNotInitialized,
+        'Unable to handle ${message.method} before client has sent initialize request');
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
new file mode 100644
index 0000000..ea42bec
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
@@ -0,0 +1,100 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/lsp/source_edits.dart';
+
+class TextDocumentChangeHandler
+    extends MessageHandler<DidChangeTextDocumentParams, void> {
+  TextDocumentChangeHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_didChange;
+
+  @override
+  DidChangeTextDocumentParams convertParams(Map<String, dynamic> json) =>
+      DidChangeTextDocumentParams.fromJson(json);
+
+  ErrorOr<void> handle(DidChangeTextDocumentParams params) {
+    final path = pathOfDoc(params.textDocument);
+    return path.mapResult((path) => _changeFile(path, params));
+  }
+
+  ErrorOr<void> _changeFile(String path, DidChangeTextDocumentParams params) {
+    String oldContents;
+    if (server.resourceProvider.hasOverlay(path)) {
+      oldContents = server.resourceProvider.getFile(path).readAsStringSync();
+    }
+    // If we didn't have the file contents, the server and client are out of sync
+    // and this is a serious failure.
+    if (oldContents == null) {
+      return error(
+        ServerErrorCodes.ClientServerInconsistentState,
+        'Unable to edit document because the file was not previously opened: $path',
+        null,
+      );
+    }
+    final newContents =
+        applyEdits(oldContents, params.contentChanges, failureIsCritical: true);
+    return newContents.mapResult((newcontents) {
+      server.documentVersions[path] = params.textDocument;
+      server.updateOverlay(path, newContents.result);
+      return success();
+    });
+  }
+}
+
+class TextDocumentCloseHandler
+    extends MessageHandler<DidCloseTextDocumentParams, void> {
+  TextDocumentCloseHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_didClose;
+
+  @override
+  DidCloseTextDocumentParams convertParams(Map<String, dynamic> json) =>
+      DidCloseTextDocumentParams.fromJson(json);
+
+  ErrorOr<void> handle(DidCloseTextDocumentParams params) {
+    final path = pathOfDoc(params.textDocument);
+    return path.mapResult((path) {
+      server.removePriorityFile(path);
+      server.documentVersions[path] = null;
+      server.updateOverlay(path, null);
+      return success();
+    });
+  }
+}
+
+class TextDocumentOpenHandler
+    extends MessageHandler<DidOpenTextDocumentParams, void> {
+  TextDocumentOpenHandler(LspAnalysisServer server) : super(server);
+  Method get handlesMessage => Method.textDocument_didOpen;
+
+  @override
+  DidOpenTextDocumentParams convertParams(Map<String, dynamic> json) =>
+      DidOpenTextDocumentParams.fromJson(json);
+
+  ErrorOr<void> handle(DidOpenTextDocumentParams params) {
+    final doc = params.textDocument;
+    final path = pathOfDocItem(doc);
+    return path.mapResult((path) {
+      server.addPriorityFile(path);
+      // We don't get a VersionedTextDocumentIdentifier with a didOpen but we
+      // do get the necessary info to create one.
+      server.documentVersions[path] = new VersionedTextDocumentIdentifier(
+        params.textDocument.version,
+        params.textDocument.uri,
+      );
+      server.updateOverlay(path, doc.text);
+
+      // If the file did not exist, and is "overlay only", it still should be
+      // analyzed. Add it to driver to which it should have been added.
+      server.contextManager.getDriverFor(path)?.addFile(path);
+
+      return success();
+    });
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart b/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
new file mode 100644
index 0000000..9fd98d8
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
@@ -0,0 +1,136 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_exit.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_reject.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_shutdown.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+
+/// Converts an iterable using the provided function and skipping over any
+/// null values.
+Iterable<T> convert<T, E>(Iterable<E> items, T Function(E) converter) {
+  // TODO(dantup): Now this is used outside of handlers, is there somewhere
+  // better to put it, and/or a better name for it?
+  return items.map(converter).where((item) => item != null);
+}
+
+abstract class CommandHandler<P, R> with Handler<P, R> {
+  CommandHandler(LspAnalysisServer server) {
+    this.server = server;
+  }
+
+  Future<ErrorOr<void>> handle(List<dynamic> arguments);
+}
+
+mixin Handler<P, R> {
+  LspAnalysisServer server;
+
+  ErrorOr<R> error<R>(ErrorCodes code, String message, Object data) =>
+      new ErrorOr<R>.error(new ResponseError(code, message, data));
+
+  ErrorOr<R> failure<R>(ErrorOr<dynamic> error) =>
+      new ErrorOr<R>.error(error.error);
+
+  Future<ErrorOr<ResolvedUnitResult>> requireUnit(String path) async {
+    final result = await server.getResolvedUnit(path);
+    if (result?.state != ResultState.VALID) {
+      return error(ServerErrorCodes.InvalidFilePath, 'Invalid file path', path);
+    }
+    return success(result);
+  }
+
+  ErrorOr<R> success<R>([R t]) => new ErrorOr<R>.success(t);
+}
+
+/// An object that can handle messages and produce responses for requests.
+///
+/// Clients may not extend, implement or mix-in this class.
+abstract class MessageHandler<P, R> with Handler<P, R> {
+  MessageHandler(LspAnalysisServer server) {
+    this.server = server;
+  }
+
+  /// The method that this handler can handle.
+  Method get handlesMessage;
+
+  P convertParams(Map<String, dynamic> json);
+
+  FutureOr<ErrorOr<R>> handle(P params);
+
+  /// Handle the given [message]. If the [message] is a [RequestMessage], then the
+  /// return value will be sent back in a [ResponseMessage].
+  /// [NotificationMessage]s are not expected to return results.
+  FutureOr<ErrorOr<R>> handleMessage(IncomingMessage message) {
+    final params = convertParams(message.params);
+    return handle(params);
+  }
+}
+
+/// A message handler that handles all messages for a given server state.
+abstract class ServerStateMessageHandler {
+  final LspAnalysisServer server;
+  final Map<Method, MessageHandler> _messageHandlers = {};
+
+  ServerStateMessageHandler(this.server) {
+    // All server states support shutdown and exit.
+    registerHandler(new ShutdownMessageHandler(server));
+    registerHandler(new ExitMessageHandler(server));
+  }
+
+  ErrorOr<Object> failure<Object>(ErrorCodes code, String message,
+          [Object data]) =>
+      new ErrorOr<Object>.error(new ResponseError(code, message, data));
+
+  /// Handle the given [message]. If the [message] is a [RequestMessage], then the
+  /// return value will be sent back in a [ResponseMessage].
+  /// [NotificationMessage]s are not expected to return results.
+  FutureOr<ErrorOr<Object>> handleMessage(IncomingMessage message) async {
+    final handler = _messageHandlers[message.method];
+    return handler != null
+        ? handler.handleMessage(message)
+        : handleUnknownMessage(message);
+  }
+
+  FutureOr<ErrorOr<Object>> handleUnknownMessage(IncomingMessage message) {
+    // If it's an optional *Notification* we can ignore it (return success).
+    // Otherwise respond with failure. Optional Requests must still be responded
+    // to so they don't leave open requests on the client.
+    return _isOptionalNotification(message)
+        ? success()
+        : failure(
+            ErrorCodes.MethodNotFound, 'Unknown method ${message.method}');
+  }
+
+  registerHandler(MessageHandler handler) {
+    assert(
+        handler.handlesMessage != null,
+        'Unable to register handler ${handler.runtimeType} because it does '
+        'not declare which messages it can handle');
+
+    _messageHandlers[handler.handlesMessage] = handler;
+  }
+
+  reject(Method method, ErrorCodes code, String message) {
+    registerHandler(new RejectMessageHandler(server, method, code, message));
+  }
+
+  ErrorOr<Object> success<Object>([Object t]) => new ErrorOr<Object>.success(t);
+
+  bool _isOptionalNotification(IncomingMessage message) {
+    // Not a notification.
+    if (message is! NotificationMessage) {
+      return false;
+    }
+
+    // Messages that start with $/ are optional.
+    final stringValue = message.method.toJson();
+    return stringValue is String && stringValue.startsWith(r'$/');
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
new file mode 100644
index 0000000..245c116a
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
@@ -0,0 +1,559 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:io' as io;
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart' as protocol;
+import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analysis_server/src/analysis_server_abstract.dart';
+import 'package:analysis_server/src/context_manager.dart';
+import 'package:analysis_server/src/lsp/channel/lsp_channel.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_states.dart';
+import 'package:analysis_server/src/lsp/handlers/handlers.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/plugin/notification_manager.dart';
+import 'package:analysis_server/src/protocol_server.dart' as protocol;
+import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analysis_server/src/services/search/search_engine_internal.dart';
+import 'package:analysis_server/src/utilities/null_string_sink.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/instrumentation/instrumentation.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/context/context_root.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/driver.dart' as nd;
+import 'package:analyzer/src/dart/analysis/file_state.dart' as nd;
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
+import 'package:analyzer/src/dart/analysis/status.dart' as nd;
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/plugin/resolver_provider.dart';
+import 'package:watcher/watcher.dart';
+
+/**
+ * Instances of the class [LspAnalysisServer] implement an LSP-based server that
+ * listens on a [CommunicationChannel] for LSP messages and processes them.
+ */
+class LspAnalysisServer extends AbstractAnalysisServer {
+  /// The capabilities of the LSP client. Will be null prior to initialization.
+  ClientCapabilities _clientCapabilities;
+
+  /**
+   * The options of this server instance.
+   */
+  AnalysisServerOptions options;
+
+  /**
+   * The channel from which messages are received and to which responses should
+   * be sent.
+   */
+  final LspServerCommunicationChannel channel;
+
+  /// The [SearchEngine] for this server, may be `null` if indexing is disabled.
+  SearchEngine searchEngine;
+
+  final NotificationManager notificationManager = new NullNotificationManager();
+
+  /**
+   * The object used to manage the SDK's known to this server.
+   */
+  final DartSdkManager sdkManager;
+
+  /**
+   * The instrumentation service that is to be used by this analysis server.
+   */
+  final InstrumentationService instrumentationService;
+
+  /**
+   * The default options used to create new analysis contexts. This object is
+   * also referenced by the ContextManager.
+   */
+  final AnalysisOptionsImpl defaultContextOptions = new AnalysisOptionsImpl();
+
+  /**
+   * The versions of each document known to the server (keyed by path), used to
+   * send back to the client for server-initiated edits so that the client can
+   * ensure they have a matching version of the document before applying them.
+   *
+   * Handlers should prefer to use the `getVersionedDocumentIdentifier` method
+   * which will return a null-versioned identifier if the document version is
+   * not known.
+   */
+  final Map<String, VersionedTextDocumentIdentifier> documentVersions = {};
+
+  /**
+   * The file resolver provider used to override the way file URI's are
+   * resolved in some contexts.
+   */
+  ResolverProvider fileResolverProvider;
+
+  /**
+   * The package resolver provider used to override the way package URI's are
+   * resolved in some contexts.
+   */
+  ResolverProvider packageResolverProvider;
+
+  PerformanceLog _analysisPerformanceLogger;
+
+  ByteStore byteStore;
+
+  nd.AnalysisDriverScheduler analysisDriverScheduler;
+
+  ServerStateMessageHandler messageHandler;
+
+  int nextRequestId = 1;
+
+  final Map<int, Completer<ResponseMessage>> completers = {};
+
+  /**
+   * Initialize a newly created server to send and receive messages to the given
+   * [channel].
+   */
+  LspAnalysisServer(
+    this.channel,
+    ResourceProvider baseResourceProvider,
+    this.options,
+    this.sdkManager,
+    this.instrumentationService, {
+    ResolverProvider packageResolverProvider: null,
+  }) : super(baseResourceProvider) {
+    messageHandler = new UninitializedStateMessageHandler(this);
+    defaultContextOptions.generateImplicitErrors = false;
+    defaultContextOptions.useFastaParser = options.useFastaParser;
+
+    {
+      String name = options.newAnalysisDriverLog;
+      StringSink sink = new NullStringSink();
+      if (name != null) {
+        if (name == 'stdout') {
+          sink = io.stdout;
+        } else if (name.startsWith('file:')) {
+          String path = name.substring('file:'.length);
+          sink = new io.File(path).openWrite(mode: io.FileMode.append);
+        }
+      }
+      _analysisPerformanceLogger = new PerformanceLog(sink);
+    }
+    byteStore = createByteStore(resourceProvider);
+    analysisDriverScheduler =
+        new nd.AnalysisDriverScheduler(_analysisPerformanceLogger);
+    analysisDriverScheduler.start();
+
+    contextManager = new ContextManagerImpl(
+        resourceProvider,
+        sdkManager,
+        packageResolverProvider,
+        analyzedFilesGlobs,
+        instrumentationService,
+        defaultContextOptions);
+    final contextManagerCallbacks =
+        new LspServerContextManagerCallbacks(this, resourceProvider);
+    contextManager.callbacks = contextManagerCallbacks;
+    searchEngine = new SearchEngineImpl(driverMap.values);
+
+    channel.listen(handleMessage, onDone: done, onError: error);
+  }
+
+  /// The capabilities of the LSP client. Will be null prior to initialization.
+  ClientCapabilities get clientCapabilities => _clientCapabilities;
+
+  Future<void> get exited => channel.closed;
+
+  addPriorityFile(String path) {
+    final didAdd = priorityFiles.add(path);
+    assert(didAdd);
+    if (didAdd) {
+      _updateDriversPriorityFiles();
+    }
+  }
+
+  /**
+   * The socket from which messages are being read has been closed.
+   */
+  void done() {}
+
+  /**
+   * There was an error related to the socket from which messages are being
+   * read.
+   */
+  void error(error, stack) {
+    sendServerErrorNotification('Server error', error, stack);
+  }
+
+  /// Return the LineInfo for the file with the given [path]. The file is
+  /// analyzed in one of the analysis drivers to which the file was added,
+  /// otherwise in the first driver, otherwise `null` is returned.
+  LineInfo getLineInfo(String path) {
+    if (!AnalysisEngine.isDartFileName(path)) {
+      return null;
+    }
+
+    return getAnalysisDriver(path)?.getFileSync(path)?.lineInfo;
+  }
+
+  /// Gets the version of a document known to the server, returning a
+  /// [VersionedTextDocumentIdentifier] with a version of `null` if the document
+  /// version is not known.
+  VersionedTextDocumentIdentifier getVersionedDocumentIdentifier(String path) {
+    return documentVersions[path] ??
+        new VersionedTextDocumentIdentifier(
+            null, new Uri.file(path).toString());
+  }
+
+  /// Handles a response from the client by invoking the completer that the
+  /// outbound request created.
+  void handleClientResponse(ResponseMessage message) {
+    // The ID from the client is an Either2<num, String>, though it's not valid
+    // for it to be a string because it should match a request we sent to the
+    // client (and we always use numeric IDs for outgoing requests).
+    message.id.map(
+      (id) {
+        // It's possible that even if we got a numeric ID that it's not valid.
+        // If it's not in our completers list (which is a list of the outstanding
+        // requests we've sent) then show an error.
+        final completer = completers[id];
+        if (completer == null) {
+          showError('Response with ID $id was unexpected');
+        } else {
+          completers.remove(id);
+          completer.complete(message);
+        }
+      },
+      (stringID) {
+        showError('Unexpected String ID for response $stringID');
+      },
+    );
+  }
+
+  /**
+   * Handle a [message] that was read from the communication channel.
+   */
+  void handleMessage(Message message) {
+    // TODO(dantup): Put in all the things this server is missing, like:
+    //     _performance.logRequest(message);
+    runZoned(() {
+      ServerPerformanceStatistics.serverRequests.makeCurrentWhile(() async {
+        try {
+          if (message is ResponseMessage) {
+            handleClientResponse(message);
+          } else if (message is RequestMessage) {
+            final result = await messageHandler.handleMessage(message);
+            if (result.isError) {
+              sendErrorResponse(message, result.error);
+            } else {
+              channel.sendResponse(new ResponseMessage(
+                  message.id, result.result, null, jsonRpcVersion));
+            }
+          } else if (message is NotificationMessage) {
+            final result = await messageHandler.handleMessage(message);
+            if (result.isError) {
+              sendErrorResponse(message, result.error);
+            }
+          } else {
+            showError('Unknown message type');
+          }
+        } catch (error, stackTrace) {
+          final errorMessage = message is ResponseMessage
+              ? 'An error occurred while handling the response to request ${message.id}'
+              : message is RequestMessage
+                  ? 'An error occurred while handling ${message.method} request'
+                  : message is NotificationMessage
+                      ? 'An error occurred while handling ${message.method} notification'
+                      : 'Unknown message type';
+          sendErrorResponse(
+              message,
+              new ResponseError(
+                ServerErrorCodes.UnhandledError,
+                errorMessage,
+                null,
+              ));
+          logError(error.toString());
+          if (stackTrace != null) {
+            logError(stackTrace.toString());
+          }
+        }
+      });
+    }, onError: error);
+  }
+
+  void logError(String message) {
+    channel.sendNotification(new NotificationMessage(
+      Method.window_logMessage,
+      new LogMessageParams(MessageType.Error, message),
+      jsonRpcVersion,
+    ));
+  }
+
+  removePriorityFile(String path) {
+    final didRemove = priorityFiles.remove(path);
+    assert(didRemove);
+    if (didRemove) {
+      _updateDriversPriorityFiles();
+    }
+  }
+
+  void sendErrorResponse(Message message, ResponseError error) {
+    if (message is RequestMessage) {
+      channel.sendResponse(
+          new ResponseMessage(message.id, null, error, jsonRpcVersion));
+      // Since the LSP client might not show the failed requests to the user,
+      // also ensure the error is logged to the client.
+      logError(error.message);
+    } else if (message is ResponseMessage) {
+      // For bad response messages where we can't respond with an error, send it as
+      // show instead of log.
+      showError(error.message);
+    } else {
+      // For notifications where we couldn't respond with an error, send it as
+      // show instead of log.
+      showError(error.message);
+    }
+
+    // Handle fatal errors where the client/server state is out of sync and we
+    // should not continue.
+    if (error.code == ServerErrorCodes.ClientServerInconsistentState) {
+      // Do not process any further messages.
+      messageHandler = new FailureStateMessageHandler(this);
+
+      final message = 'An unrecoverable error occurred.';
+      logError(
+          '$message\n\n${error.message}\n\n${error.code}\n\n${error.data}');
+
+      shutdown();
+    }
+  }
+
+  /**
+   * Send the given [notification] to the client.
+   */
+  void sendNotification(NotificationMessage notification) {
+    channel.sendNotification(notification);
+  }
+
+  /**
+   * Send the given [request] to the client and wait for a response.
+   */
+  Future<ResponseMessage> sendRequest(Method method, Object params) {
+    final requestId = nextRequestId++;
+    final completer = new Completer<ResponseMessage>();
+    completers[requestId] = completer;
+
+    channel.sendRequest(new RequestMessage(
+      Either2<num, String>.t1(requestId),
+      method,
+      params,
+      jsonRpcVersion,
+    ));
+
+    return completer.future;
+  }
+
+  /**
+   * Send the given [response] to the client.
+   */
+  void sendResponse(ResponseMessage response) {
+    channel.sendResponse(response);
+  }
+
+  void sendServerErrorNotification(String message, exception, stackTrace) {
+    final fullError = new StringBuffer();
+
+    fullError.writeln(exception == null ? message : '$message: $exception');
+
+    // Show message (without stack) to the user.
+    showError(fullError.toString());
+
+    if (stackTrace != null) {
+      fullError.writeln(stackTrace.toString());
+    }
+    // Log the full message since showMessage above may be truncated or formatted
+    // badly (eg. VS Code takes the newlines out).
+    logError(fullError.toString());
+  }
+
+  void setAnalysisRoots(List<String> includedPaths, List<String> excludedPaths,
+      Map<String, String> packageRoots) {
+    contextManager.setRoots(includedPaths, excludedPaths, packageRoots);
+  }
+
+  void setClientCapabilities(ClientCapabilities capabilities) {
+    _clientCapabilities = capabilities;
+  }
+
+  /**
+   * Returns `true` if errors should be reported for [file] with the given
+   * absolute path.
+   */
+  bool shouldSendErrorsNotificationFor(String file) {
+    return contextManager.isInAnalysisRoot(file);
+  }
+
+  void showError(String message) {
+    channel.sendNotification(new NotificationMessage(
+      Method.window_showMessage,
+      new ShowMessageParams(MessageType.Error, message),
+      jsonRpcVersion,
+    ));
+  }
+
+  Future<void> shutdown() {
+    // Defer closing the channel so that the shutdown response can be sent and
+    // logged.
+    new Future(() {
+      channel.close();
+    });
+
+    return new Future.value();
+  }
+
+  void updateOverlay(String path, String contents) {
+    if (contents != null) {
+      resourceProvider.setOverlay(path,
+          content: contents, modificationStamp: 0);
+    } else {
+      resourceProvider.removeOverlay(path);
+    }
+    driverMap.values.forEach((driver) => driver.changeFile(path));
+  }
+
+  _updateDriversPriorityFiles() {
+    driverMap.values.forEach((driver) {
+      driver.priorityFiles = priorityFiles.toList();
+    });
+  }
+}
+
+class LspServerContextManagerCallbacks extends ContextManagerCallbacks {
+  // TODO(dantup): Lots of copy/paste from the Analysis Server one here.
+
+  final LspAnalysisServer analysisServer;
+
+  /**
+   * The [ResourceProvider] by which paths are converted into [Resource]s.
+   */
+  final ResourceProvider resourceProvider;
+
+  LspServerContextManagerCallbacks(this.analysisServer, this.resourceProvider);
+
+  @override
+  NotificationManager get notificationManager =>
+      analysisServer.notificationManager;
+
+  @override
+  nd.AnalysisDriver addAnalysisDriver(
+      Folder folder, ContextRoot contextRoot, AnalysisOptions options) {
+    ContextBuilder builder = createContextBuilder(folder, options);
+    nd.AnalysisDriver analysisDriver = builder.buildDriver(contextRoot);
+    analysisDriver.results.listen((result) {
+      String path = result.path;
+      if (analysisServer.shouldSendErrorsNotificationFor(path)) {
+        final serverErrors = protocol.mapEngineErrors(
+            result.session.analysisContext.analysisOptions,
+            result.lineInfo,
+            result.errors,
+            toDiagnostic);
+
+        final params = new PublishDiagnosticsParams(
+            Uri.file(result.path).toString(), serverErrors);
+        final message = new NotificationMessage(
+          Method.textDocument_publishDiagnostics,
+          params,
+          jsonRpcVersion,
+        );
+        analysisServer.sendNotification(message);
+      }
+    });
+    analysisDriver.exceptions.listen((nd.ExceptionResult result) {
+      String message = 'Analysis failed: ${result.path}';
+      if (result.contextKey != null) {
+        message += ' context: ${result.contextKey}';
+      }
+      AnalysisEngine.instance.logger.logError(message, result.exception);
+    });
+    analysisServer.driverMap[folder] = analysisDriver;
+    return analysisDriver;
+  }
+
+  @override
+  void afterWatchEvent(WatchEvent event) {
+    // TODO: implement afterWatchEvent
+  }
+
+  @override
+  void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) {
+    nd.AnalysisDriver analysisDriver = analysisServer.driverMap[contextFolder];
+    if (analysisDriver != null) {
+      changeSet.addedSources.forEach((source) {
+        analysisDriver.addFile(source.fullName);
+      });
+      changeSet.changedSources.forEach((source) {
+        analysisDriver.changeFile(source.fullName);
+      });
+      changeSet.removedSources.forEach((source) {
+        analysisDriver.removeFile(source.fullName);
+      });
+    }
+  }
+
+  @override
+  void applyFileRemoved(nd.AnalysisDriver driver, String file) {
+    driver.removeFile(file);
+    // sendAnalysisNotificationFlushResults(analysisServer, [file]);
+  }
+
+  @override
+  void broadcastWatchEvent(WatchEvent event) {
+    // TODO: implement broadcastWatchEvent
+  }
+
+  @override
+  ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) {
+    String defaultPackageFilePath = null;
+    String defaultPackagesDirectoryPath = null;
+    String path = (analysisServer.contextManager as ContextManagerImpl)
+        .normalizedPackageRoots[folder.path];
+    if (path != null) {
+      Resource resource = resourceProvider.getResource(path);
+      if (resource.exists) {
+        if (resource is File) {
+          defaultPackageFilePath = path;
+        } else {
+          defaultPackagesDirectoryPath = path;
+        }
+      }
+    }
+
+    ContextBuilderOptions builderOptions = new ContextBuilderOptions();
+    builderOptions.defaultOptions = options;
+    builderOptions.defaultPackageFilePath = defaultPackageFilePath;
+    builderOptions.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
+    ContextBuilder builder = new ContextBuilder(
+        resourceProvider, analysisServer.sdkManager, null,
+        options: builderOptions);
+    builder.fileResolverProvider = analysisServer.fileResolverProvider;
+    builder.packageResolverProvider = analysisServer.packageResolverProvider;
+    builder.analysisDriverScheduler = analysisServer.analysisDriverScheduler;
+    builder.performanceLog = analysisServer._analysisPerformanceLogger;
+    builder.byteStore = analysisServer.byteStore;
+    builder.enableIndex = true;
+    return builder;
+  }
+
+  @override
+  void removeContext(Folder folder, List<String> flushedFiles) {
+    // sendAnalysisNotificationFlushResults(analysisServer, flushedFiles);
+    nd.AnalysisDriver driver = analysisServer.driverMap.remove(folder);
+    driver.dispose();
+  }
+}
+
+class NullNotificationManager implements NotificationManager {
+  @override
+  noSuchMethod(Invocation invocation) {}
+}
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_packet_transformer.dart b/pkg/analysis_server/lib/src/lsp/lsp_packet_transformer.dart
new file mode 100644
index 0000000..24a2d98
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/lsp_packet_transformer.dart
@@ -0,0 +1,108 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:convert';
+
+/// Transforms a stream of LSP data in the form:
+///
+///     Content-Length: xxx\r\n
+///     Content-Type: application/vscode-jsonrpc; charset=utf-8\r\n
+///     \r\n
+///     { JSON payload }
+///
+/// into just the JSON payload, decoded with the specified encoding. Line endings
+/// for headers must be \r\n on all platforms as defined in the LSP spec.
+class LspPacketTransformer extends StreamTransformerBase<List<int>, String> {
+  @override
+  Stream<String> bind(Stream<List<int>> stream) {
+    StreamSubscription<int> input;
+    StreamController<String> _output;
+    final buffer = <int>[];
+    bool isParsingHeaders = true;
+    LspHeaders headers;
+    _output = StreamController<String>(
+      onListen: () {
+        input = stream.expand((b) => b).listen(
+          (codeUnit) {
+            buffer.add(codeUnit);
+            if (isParsingHeaders && _endsWithCrLfCrLf(buffer)) {
+              headers = _parseHeaders(buffer);
+              buffer.clear();
+              isParsingHeaders = false;
+            } else if (!isParsingHeaders &&
+                buffer.length >= headers.contentLength) {
+              // UTF-8 is the default - and only supported - encoding for LSP.
+              // The string 'utf8' is valid since it was published in the original spec.
+              // Any other encodings should be rejected with an error.
+              if ([null, 'utf-8', 'utf8']
+                  .contains(headers.encoding?.toLowerCase())) {
+                _output.add(utf8.decode(buffer));
+              } else {
+                _output.addError(new InvalidEncodingError(headers.rawHeaders));
+              }
+              buffer.clear();
+              isParsingHeaders = true;
+            }
+          },
+          onError: _output.addError,
+          onDone: _output.close,
+        );
+      },
+      onPause: () => input.pause(),
+      onResume: () => input.resume(),
+      onCancel: () => input.cancel(),
+    );
+    return _output.stream;
+  }
+
+  /// Whether [buffer] ends in '\r\n\r\n'.
+  static bool _endsWithCrLfCrLf(List<int> buffer) {
+    var l = buffer.length;
+    return l > 4 &&
+        buffer[l - 1] == 10 &&
+        buffer[l - 2] == 13 &&
+        buffer[l - 3] == 10 &&
+        buffer[l - 4] == 13;
+  }
+
+  /// Decodes [buffer] into a String and returns the 'Content-Length' header value.
+  static LspHeaders _parseHeaders(List<int> buffer) {
+    // Headers are specified as always ASCII in LSP.
+    final asString = ascii.decode(buffer);
+    final headers = asString.split('\r\n');
+    final lengthHeader =
+        headers.firstWhere((h) => h.startsWith('Content-Length'));
+    final length = lengthHeader.split(':').last.trim();
+    final contentTypeHeader = headers
+        .firstWhere((h) => h.startsWith('Content-Type'), orElse: () => null);
+    final encoding = _extractEncoding(contentTypeHeader);
+    return new LspHeaders(asString, int.parse(length), encoding);
+  }
+
+  static String _extractEncoding(String header) {
+    final charset = header
+        ?.split(';')
+        ?.map((s) => s.trim().toLowerCase())
+        ?.firstWhere((s) => s.startsWith('charset='), orElse: () => null);
+
+    return charset == null ? null : charset.split('=')[1];
+  }
+}
+
+class LspHeaders {
+  final String rawHeaders;
+  final int contentLength;
+  final String encoding;
+  LspHeaders(this.rawHeaders, this.contentLength, this.encoding);
+}
+
+class InvalidEncodingError {
+  final String headers;
+  InvalidEncodingError(this.headers);
+
+  @override
+  String toString() =>
+      'Encoding in supplied headers is not supported.\n\nHeaders:\n$headers';
+}
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_socket_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_socket_server.dart
new file mode 100644
index 0000000..47261dc
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/lsp_socket_server.dart
@@ -0,0 +1,83 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analysis_server/src/lsp/channel/lsp_channel.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/socket_server.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/instrumentation/instrumentation.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+
+/**
+ * Instances of the class [SocketServer] implement the common parts of
+ * http-based and stdio-based analysis servers.  The primary responsibility of
+ * the SocketServer is to manage the lifetime of the AnalysisServer and to
+ * encode and decode the JSON messages exchanged with the client.
+ */
+class LspSocketServer {
+  final AnalysisServerOptions analysisServerOptions;
+  /**
+   * The analysis server that was created when a client established a
+   * connection, or `null` if no such connection has yet been established.
+   */
+  LspAnalysisServer analysisServer;
+
+  /**
+   * The function used to create a new SDK using the default SDK.
+   */
+  final DartSdkManager sdkManager;
+
+  final InstrumentationService instrumentationService;
+
+  LspSocketServer(
+    this.analysisServerOptions,
+    this.sdkManager,
+    this.instrumentationService,
+  );
+
+  /**
+   * Create an analysis server which will communicate with the client using the
+   * given serverChannel.
+   */
+  void createAnalysisServer(LspServerCommunicationChannel serverChannel) {
+    if (analysisServer != null) {
+      ResponseError error = new ResponseError<void>(
+          ServerErrorCodes.ServerAlreadyStarted,
+          'Server already started',
+          null);
+      serverChannel.sendNotification(new NotificationMessage(
+        Method.window_showMessage,
+        new ShowMessageParams(MessageType.Error, error.message),
+        jsonRpcVersion,
+      ));
+      serverChannel.listen((Message message) {
+        if (message is RequestMessage) {
+          serverChannel.sendResponse(
+              new ResponseMessage(message.id, null, error, jsonRpcVersion));
+        }
+      });
+      return;
+    }
+
+    PhysicalResourceProvider resourceProvider;
+    if (analysisServerOptions.fileReadMode == 'as-is') {
+      resourceProvider = new PhysicalResourceProvider(null,
+          stateLocation: analysisServerOptions.cacheFolder);
+    } else if (analysisServerOptions.fileReadMode == 'normalize-eol-always') {
+      resourceProvider = new PhysicalResourceProvider(
+          PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS,
+          stateLocation: analysisServerOptions.cacheFolder);
+    } else {
+      throw new Exception(
+          'File read mode was set to the unknown mode: $analysisServerOptions.fileReadMode');
+    }
+
+    analysisServer = new LspAnalysisServer(serverChannel, resourceProvider,
+        analysisServerOptions, sdkManager, instrumentationService);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/mapping.dart b/pkg/analysis_server/lib/src/lsp/mapping.dart
new file mode 100644
index 0000000..e97f557
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/mapping.dart
@@ -0,0 +1,577 @@
+import 'dart:collection';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart' as lsp;
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart' as lsp;
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/constants.dart' as lsp;
+import 'package:analysis_server/src/lsp/dartdoc.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart' as lsp;
+import 'package:analysis_server/src/lsp/source_edits.dart';
+import 'package:analysis_server/src/protocol_server.dart' as server
+    hide AnalysisError;
+import 'package:analyzer/dart/analysis/results.dart' as server;
+import 'package:analyzer/error/error.dart' as server;
+import 'package:analyzer/source/line_info.dart' as server;
+import 'package:analyzer/src/generated/source.dart' as server;
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart' as server;
+
+const languageSourceName = 'dart';
+
+lsp.Either2<String, lsp.MarkupContent> asStringOrMarkupContent(
+    List<lsp.MarkupKind> preferredFormats, String content) {
+  if (content == null) {
+    return null;
+  }
+
+  return preferredFormats == null
+      ? new lsp.Either2<String, lsp.MarkupContent>.t1(content)
+      : new lsp.Either2<String, lsp.MarkupContent>.t2(
+          _asMarkup(preferredFormats, content));
+}
+
+lsp.CompletionItemKind elementKindToCompletionItemKind(
+  HashSet<lsp.CompletionItemKind> clientSupportedCompletionKinds,
+  server.ElementKind kind,
+) {
+  bool isSupported(lsp.CompletionItemKind kind) =>
+      clientSupportedCompletionKinds.contains(kind);
+
+  List<lsp.CompletionItemKind> getKindPreferences() {
+    switch (kind) {
+      case server.ElementKind.CLASS:
+      case server.ElementKind.CLASS_TYPE_ALIAS:
+        return const [lsp.CompletionItemKind.Class];
+      case server.ElementKind.COMPILATION_UNIT:
+        return const [lsp.CompletionItemKind.Module];
+      case server.ElementKind.CONSTRUCTOR:
+      case server.ElementKind.CONSTRUCTOR_INVOCATION:
+        return const [lsp.CompletionItemKind.Constructor];
+      case server.ElementKind.ENUM:
+      case server.ElementKind.ENUM_CONSTANT:
+        return const [lsp.CompletionItemKind.Enum];
+      case server.ElementKind.FIELD:
+        return const [lsp.CompletionItemKind.Field];
+      case server.ElementKind.FILE:
+        return const [lsp.CompletionItemKind.File];
+      case server.ElementKind.FUNCTION:
+        return const [lsp.CompletionItemKind.Function];
+      case server.ElementKind.FUNCTION_TYPE_ALIAS:
+        return const [lsp.CompletionItemKind.Class];
+      case server.ElementKind.GETTER:
+        return const [lsp.CompletionItemKind.Property];
+      case server.ElementKind.LABEL:
+        // There isn't really a good CompletionItemKind for labels so we'll
+        // just use the Text option.
+        return const [lsp.CompletionItemKind.Text];
+      case server.ElementKind.LIBRARY:
+        return const [lsp.CompletionItemKind.Module];
+      case server.ElementKind.LOCAL_VARIABLE:
+        return const [lsp.CompletionItemKind.Variable];
+      case server.ElementKind.METHOD:
+        return const [lsp.CompletionItemKind.Method];
+      case server.ElementKind.PARAMETER:
+      case server.ElementKind.PREFIX:
+        return const [lsp.CompletionItemKind.Variable];
+      case server.ElementKind.SETTER:
+        return const [lsp.CompletionItemKind.Property];
+      case server.ElementKind.TOP_LEVEL_VARIABLE:
+        return const [lsp.CompletionItemKind.Variable];
+      case server.ElementKind.TYPE_PARAMETER:
+        return const [
+          lsp.CompletionItemKind.TypeParameter,
+          lsp.CompletionItemKind.Variable,
+        ];
+      case server.ElementKind.UNIT_TEST_GROUP:
+      case server.ElementKind.UNIT_TEST_TEST:
+        return const [lsp.CompletionItemKind.Method];
+      default:
+        return null;
+    }
+  }
+
+  return getKindPreferences().firstWhere(isSupported, orElse: () => null);
+}
+
+lsp.SymbolKind elementKindToSymbolKind(
+  HashSet<lsp.SymbolKind> clientSupportedSymbolKinds,
+  server.ElementKind kind,
+) {
+  bool isSupported(lsp.SymbolKind kind) =>
+      clientSupportedSymbolKinds.contains(kind);
+
+  List<lsp.SymbolKind> getKindPreferences() {
+    switch (kind) {
+      case server.ElementKind.CLASS:
+      case server.ElementKind.CLASS_TYPE_ALIAS:
+        return const [lsp.SymbolKind.Class];
+      case server.ElementKind.COMPILATION_UNIT:
+        return const [lsp.SymbolKind.Module];
+      case server.ElementKind.CONSTRUCTOR:
+      case server.ElementKind.CONSTRUCTOR_INVOCATION:
+        return const [lsp.SymbolKind.Constructor];
+      case server.ElementKind.ENUM:
+      case server.ElementKind.ENUM_CONSTANT:
+        return const [lsp.SymbolKind.Enum];
+      case server.ElementKind.FIELD:
+        return const [lsp.SymbolKind.Field];
+      case server.ElementKind.FILE:
+        return const [lsp.SymbolKind.File];
+      case server.ElementKind.FUNCTION:
+      case server.ElementKind.FUNCTION_INVOCATION:
+        return const [lsp.SymbolKind.Function];
+      case server.ElementKind.FUNCTION_TYPE_ALIAS:
+        return const [lsp.SymbolKind.Class];
+      case server.ElementKind.GETTER:
+        return const [lsp.SymbolKind.Property];
+      case server.ElementKind.LABEL:
+        // There isn't really a good SymbolKind for labels so we'll
+        // just use the Null option.
+        return const [lsp.SymbolKind.Null];
+      case server.ElementKind.LIBRARY:
+        return const [lsp.SymbolKind.Namespace];
+      case server.ElementKind.LOCAL_VARIABLE:
+        return const [lsp.SymbolKind.Variable];
+      case server.ElementKind.METHOD:
+        return const [lsp.SymbolKind.Method];
+      case server.ElementKind.MIXIN:
+        return const [lsp.SymbolKind.Class];
+      case server.ElementKind.PARAMETER:
+      case server.ElementKind.PREFIX:
+        return const [lsp.SymbolKind.Variable];
+      case server.ElementKind.SETTER:
+        return const [lsp.SymbolKind.Property];
+      case server.ElementKind.TOP_LEVEL_VARIABLE:
+        return const [lsp.SymbolKind.Variable];
+      case server.ElementKind.TYPE_PARAMETER:
+        return const [
+          lsp.SymbolKind.TypeParameter,
+          lsp.SymbolKind.Variable,
+        ];
+      case server.ElementKind.UNIT_TEST_GROUP:
+      case server.ElementKind.UNIT_TEST_TEST:
+        return const [lsp.SymbolKind.Method];
+      default:
+        assert(false, 'Unexpected element kind $kind');
+        return null;
+    }
+  }
+
+  return getKindPreferences().firstWhere(isSupported, orElse: () => null);
+}
+
+String getCompletionDetail(
+  server.CompletionSuggestion suggestion,
+  lsp.CompletionItemKind completionKind,
+  bool clientSupportsDeprecated,
+) {
+  final hasElement = suggestion.element != null;
+  final hasParameters = hasElement &&
+      suggestion.element.parameters != null &&
+      suggestion.element.parameters.isNotEmpty;
+  final hasReturnType = hasElement &&
+      suggestion.element.returnType != null &&
+      suggestion.element.returnType.isNotEmpty;
+  final hasParameterType =
+      suggestion.parameterType != null && suggestion.parameterType.isNotEmpty;
+
+  final prefix = clientSupportsDeprecated || !suggestion.isDeprecated
+      ? ''
+      : '(Deprecated) ';
+
+  if (completionKind == lsp.CompletionItemKind.Property) {
+    // Setters appear as methods with one arg but they also cause getters to not
+    // appear in the completion list, so displaying them as setters is misleading.
+    // To avoid this, always show only the return type, whether it's a getter
+    // or a setter.
+    return prefix +
+        (suggestion.element.kind == server.ElementKind.GETTER
+            ? suggestion.element.returnType
+            // Don't assume setters always have parameters
+            // See https://github.com/dart-lang/sdk/issues/27747
+            : suggestion.element.parameters != null &&
+                    suggestion.element.parameters.isNotEmpty
+                // Extract the type part from '(MyType value)`
+                ? suggestion.element.parameters.substring(
+                    1, suggestion.element.parameters.lastIndexOf(" "))
+                : '');
+  } else if (hasParameters && hasReturnType) {
+    return '$prefix${suggestion.element.parameters} → ${suggestion.element.returnType}';
+  } else if (hasReturnType) {
+    return '$prefix${suggestion.element.returnType}';
+  } else if (hasParameterType) {
+    return '$prefix${suggestion.parameterType}';
+  } else {
+    return prefix;
+  }
+}
+
+lsp.Location navigationTargetToLocation(String targetFilePath,
+    server.NavigationTarget target, server.LineInfo lineInfo) {
+  if (lineInfo == null) {
+    return null;
+  }
+
+  return new Location(
+    Uri.file(targetFilePath).toString(),
+    toRange(lineInfo, target.offset, target.length),
+  );
+}
+
+/// Returns the file system path for a TextDocumentIdentifier.
+ErrorOr<String> pathOfDoc(lsp.TextDocumentIdentifier doc) =>
+    pathOfUri(Uri.tryParse(doc?.uri));
+
+/// Returns the file system path for a TextDocumentItem.
+ErrorOr<String> pathOfDocItem(lsp.TextDocumentItem doc) =>
+    pathOfUri(Uri.tryParse(doc?.uri));
+
+/// Returns the file system path for a file URI.
+ErrorOr<String> pathOfUri(Uri uri) {
+  if (uri == null) {
+    return new ErrorOr<String>.error(new ResponseError(
+        lsp.ServerErrorCodes.InvalidFilePath,
+        'Document URI was not supplied',
+        null));
+  }
+  final isValidFileUri = (uri?.isScheme('file') ?? false);
+  if (!isValidFileUri) {
+    return new ErrorOr<String>.error(new ResponseError(
+        lsp.ServerErrorCodes.InvalidFilePath,
+        'URI was not a valid file:// URI',
+        uri));
+  }
+  try {
+    return new ErrorOr<String>.success(uri.toFilePath());
+  } catch (e) {
+    // Even if tryParse() works and file == scheme, toFilePath() can throw on
+    // Windows if there are invalid characters.
+    return new ErrorOr<String>.error(new ResponseError(
+        lsp.ServerErrorCodes.InvalidFilePath,
+        'File URI did not contain a valid file path',
+        uri));
+  }
+}
+
+lsp.Location searchResultToLocation(
+    server.SearchResult result, server.LineInfo lineInfo) {
+  final location = result.location;
+
+  if (lineInfo == null) {
+    return null;
+  }
+
+  return new Location(
+    Uri.file(result.location.file).toString(),
+    toRange(lineInfo, location.offset, location.length),
+  );
+}
+
+lsp.CompletionItemKind suggestionKindToCompletionItemKind(
+  HashSet<lsp.CompletionItemKind> clientSupportedCompletionKinds,
+  server.CompletionSuggestionKind kind,
+  String label,
+) {
+  bool isSupported(lsp.CompletionItemKind kind) =>
+      clientSupportedCompletionKinds.contains(kind);
+
+  List<lsp.CompletionItemKind> getKindPreferences() {
+    switch (kind) {
+      case server.CompletionSuggestionKind.ARGUMENT_LIST:
+        return const [lsp.CompletionItemKind.Variable];
+      case server.CompletionSuggestionKind.IMPORT:
+        // For package/relative URIs, we can send File/Folder kinds for better icons.
+        if (!label.startsWith('dart:')) {
+          return label.endsWith('.dart')
+              ? const [
+                  lsp.CompletionItemKind.File,
+                  lsp.CompletionItemKind.Module,
+                ]
+              : const [
+                  lsp.CompletionItemKind.Folder,
+                  lsp.CompletionItemKind.Module,
+                ];
+        }
+        return const [lsp.CompletionItemKind.Module];
+      case server.CompletionSuggestionKind.IDENTIFIER:
+        return const [lsp.CompletionItemKind.Variable];
+      case server.CompletionSuggestionKind.INVOCATION:
+        return const [lsp.CompletionItemKind.Method];
+      case server.CompletionSuggestionKind.KEYWORD:
+        return const [lsp.CompletionItemKind.Keyword];
+      case server.CompletionSuggestionKind.NAMED_ARGUMENT:
+        return const [lsp.CompletionItemKind.Variable];
+      case server.CompletionSuggestionKind.OPTIONAL_ARGUMENT:
+        return const [lsp.CompletionItemKind.Variable];
+      case server.CompletionSuggestionKind.PARAMETER:
+        return const [lsp.CompletionItemKind.Value];
+      default:
+        return null;
+    }
+  }
+
+  return getKindPreferences().firstWhere(isSupported, orElse: () => null);
+}
+
+lsp.CompletionItem toCompletionItem(
+  lsp.TextDocumentClientCapabilitiesCompletion completionCapabilities,
+  HashSet<lsp.CompletionItemKind> supportedCompletionItemKinds,
+  server.LineInfo lineInfo,
+  server.CompletionSuggestion suggestion,
+  int replacementOffset,
+  int replacementLength,
+) {
+  final label = suggestion.displayText != null
+      ? suggestion.displayText
+      : suggestion.completion;
+
+  final useDeprecated =
+      completionCapabilities?.completionItem?.deprecatedSupport == true;
+  final formats = completionCapabilities?.completionItem?.documentationFormat;
+
+  final completionKind = suggestion.element != null
+      ? elementKindToCompletionItemKind(
+          supportedCompletionItemKinds, suggestion.element.kind)
+      : suggestionKindToCompletionItemKind(
+          supportedCompletionItemKinds, suggestion.kind, label);
+
+  return new lsp.CompletionItem(
+    label,
+    completionKind,
+    getCompletionDetail(suggestion, completionKind, useDeprecated),
+    asStringOrMarkupContent(formats, cleanDartdoc(suggestion.docComplete)),
+    useDeprecated ? suggestion.isDeprecated : null,
+    false, // preselect
+    // Relevance is a number, highest being best. LSP does text sort so subtract
+    // from a large number so that a text sort will result in the correct order.
+    // 555 -> 999455
+    //  10 -> 999990
+    //   1 -> 999999
+    (1000000 - suggestion.relevance).toString(),
+    null, // filterText uses label if not set
+    null, // insertText is deprecated, but also uses label if not set
+    // We don't have completions that use snippets, so we always return PlainText.
+    lsp.InsertTextFormat.PlainText,
+    new lsp.TextEdit(
+      // TODO(dantup): If `clientSupportsSnippets == true` then we should map
+      // `selection` in to a snippet (see how Dart Code does this).
+      toRange(lineInfo, replacementOffset, replacementLength),
+      suggestion.completion,
+    ),
+    [], // additionalTextEdits, used for adding imports, etc.
+    [], // commitCharacters
+    null, // command
+    null, // data, useful for if using lazy resolve, this comes back to us
+  );
+}
+
+lsp.Diagnostic toDiagnostic(
+    server.LineInfo lineInfo, server.AnalysisError error,
+    [server.ErrorSeverity errorSeverity]) {
+  server.ErrorCode errorCode = error.errorCode;
+
+  // Default to the error's severity if none is specified.
+  errorSeverity ??= errorCode.errorSeverity;
+
+  return new lsp.Diagnostic(
+    toRange(lineInfo, error.offset, error.length),
+    toDiagnosticSeverity(errorSeverity),
+    errorCode.name.toLowerCase(),
+    languageSourceName,
+    error.message,
+    null,
+  );
+}
+
+lsp.DiagnosticSeverity toDiagnosticSeverity(server.ErrorSeverity severity) {
+  switch (severity) {
+    case server.ErrorSeverity.ERROR:
+      return lsp.DiagnosticSeverity.Error;
+    case server.ErrorSeverity.WARNING:
+      return lsp.DiagnosticSeverity.Warning;
+    case server.ErrorSeverity.INFO:
+      return lsp.DiagnosticSeverity.Information;
+    // Note: LSP also supports "Hint", but they won't render in things like the
+    // VS Code errors list as they're apparently intended to communicate
+    // non-visible diagnostics back (for example, if you wanted to grey out
+    // unreachable code without producing an item in the error list).
+    default:
+      throw 'Unknown AnalysisErrorSeverity: $severity';
+  }
+}
+
+ErrorOr<int> toOffset(
+  server.LineInfo lineInfo,
+  lsp.Position pos, {
+  failureIsCritial: false,
+}) {
+  if (pos.line > lineInfo.lineCount) {
+    return new ErrorOr<int>.error(new lsp.ResponseError(
+        failureIsCritial
+            ? lsp.ServerErrorCodes.ClientServerInconsistentState
+            : lsp.ServerErrorCodes.InvalidFileLineCol,
+        'Invalid line number',
+        pos.line));
+  }
+  // TODO(dantup): Is there any way to validate the character? We could ensure
+  // it's less than the offset of the next line, but that would only work for
+  // all lines except the last one.
+  return new ErrorOr<int>.success(
+      lineInfo.getOffsetOfLine(pos.line) + pos.character);
+}
+
+lsp.Position toPosition(server.CharacterLocation location) {
+  // LSP is zero-based, but analysis server is 1-based.
+  return new lsp.Position(location.lineNumber - 1, location.columnNumber - 1);
+}
+
+lsp.Range toRange(server.LineInfo lineInfo, int offset, int length) {
+  server.CharacterLocation start = lineInfo.getLocation(offset);
+  server.CharacterLocation end = lineInfo.getLocation(offset + length);
+
+  return new lsp.Range(
+    toPosition(start),
+    toPosition(end),
+  );
+}
+
+lsp.SignatureHelp toSignatureHelp(List<lsp.MarkupKind> preferredFormats,
+    server.AnalysisGetSignatureResult signature) {
+  // For now, we only support returning one (though we may wish to use named
+  // args. etc. to provide one for each possible "next" option when the cursor
+  // is at the end ready to provide another argument).
+
+  /// Gets the label for an individual parameter in the form
+  ///     String s = 'foo'
+  String getParamLabel(server.ParameterInfo p) {
+    final def = p.defaultValue != null ? ' = ${p.defaultValue}' : '';
+    return '${p.type} ${p.name}$def';
+  }
+
+  /// Gets the full signature label in the form
+  ///     foo(String s, int i, bool a = true)
+  String getSignatureLabel(server.AnalysisGetSignatureResult resp) {
+    final req = signature.parameters
+        .where((p) => p.kind == server.ParameterKind.REQUIRED)
+        .toList();
+    final opt = signature.parameters
+        .where((p) => p.kind == server.ParameterKind.OPTIONAL)
+        .toList();
+    final named = signature.parameters
+        .where((p) => p.kind == server.ParameterKind.NAMED)
+        .toList();
+    final params = [];
+    if (req.isNotEmpty) {
+      params.add(req.map(getParamLabel).join(", "));
+    }
+    if (opt.isNotEmpty) {
+      params.add("[" + opt.map(getParamLabel).join(", ") + "]");
+    }
+    if (named.isNotEmpty) {
+      params.add("{" + named.map(getParamLabel).join(", ") + "}");
+    }
+    return '${resp.name}(${params.join(", ")})';
+  }
+
+  lsp.ParameterInformation toParameterInfo(server.ParameterInfo param) {
+    // LSP 3.14.0 supports providing label offsets (to avoid clients having
+    // to guess based on substrings). We should check the
+    // signatureHelp.signatureInformation.parameterInformation.labelOffsetSupport
+    // capability when deciding to send that.
+    return new lsp.ParameterInformation(getParamLabel(param), null);
+  }
+
+  final cleanDoc = cleanDartdoc(signature.dartdoc);
+
+  return new lsp.SignatureHelp(
+    [
+      new lsp.SignatureInformation(
+        getSignatureLabel(signature),
+        asStringOrMarkupContent(preferredFormats, cleanDoc),
+        signature.parameters.map(toParameterInfo).toList(),
+      ),
+    ],
+    0, // activeSignature
+    // TODO(dantup): The LSP spec says this value will default to 0 if it's
+    // not supplied or outside of the value range. However, setting -1 results
+    // in no parameters being selected in VS Code, whereas null/0 will select the first.
+    // We'd like for none to be selected (since we don't support this yet) so
+    // we send -1. I've made a request for LSP to support not selecting a parameter
+    // (because you could also be on param 5 of an invalid call to a function
+    // taking only 3 arguments) here:
+    // https://github.com/Microsoft/language-server-protocol/issues/456#issuecomment-452318297
+    -1, // activeParameter
+  );
+}
+
+lsp.TextDocumentEdit toTextDocumentEdit(FileEditInformation edit) {
+  return new TextDocumentEdit(
+    edit.doc,
+    edit.edits.map((e) => toTextEdit(edit.lineInfo, e)).toList(),
+  );
+}
+
+lsp.TextEdit toTextEdit(server.LineInfo lineInfo, server.SourceEdit edit) {
+  return new TextEdit(
+    toRange(lineInfo, edit.offset, edit.length),
+    edit.replacement,
+  );
+}
+
+lsp.WorkspaceEdit toWorkspaceEdit(
+  WorkspaceClientCapabilities capabilities,
+  List<FileEditInformation> edits,
+) {
+  final clientSupportsTextDocumentEdits =
+      capabilities?.workspaceEdit?.documentChanges == true;
+  if (clientSupportsTextDocumentEdits) {
+    return new WorkspaceEdit(
+        null,
+        Either2<
+            List<TextDocumentEdit>,
+            List<
+                Either4<TextDocumentEdit, CreateFile, RenameFile,
+                    DeleteFile>>>.t1(
+          edits.map(toTextDocumentEdit).toList(),
+        ));
+  } else {
+    return new WorkspaceEdit(toWorkspaceEditChanges(edits), null);
+  }
+}
+
+Map<String, List<TextEdit>> toWorkspaceEditChanges(
+    List<FileEditInformation> edits) {
+  createEdit(FileEditInformation file) {
+    final edits =
+        file.edits.map((edit) => toTextEdit(file.lineInfo, edit)).toList();
+    return new MapEntry(file.doc.uri, edits);
+  }
+
+  return Map<String, List<TextEdit>>.fromEntries(edits.map(createEdit));
+}
+
+lsp.MarkupContent _asMarkup(
+    List<lsp.MarkupKind> preferredFormats, String content) {
+  // It's not valid to call this function with a null format, as null formats
+  // do not support MarkupContent. [asStringOrMarkupContent] is probably the
+  // better choice.
+  assert(preferredFormats != null);
+
+  if (content == null) {
+    return null;
+  }
+
+  if (preferredFormats.isEmpty) {
+    preferredFormats.add(lsp.MarkupKind.Markdown);
+  }
+
+  final supportsMarkdown = preferredFormats.contains(lsp.MarkupKind.Markdown);
+  final supportsPlain = preferredFormats.contains(lsp.MarkupKind.PlainText);
+  // Since our PlainText version is actually just Markdown, only advertise it
+  // as PlainText if the client explicitly supports PlainText and not Markdown.
+  final format = supportsPlain && !supportsMarkdown
+      ? lsp.MarkupKind.PlainText
+      : lsp.MarkupKind.Markdown;
+
+  return new lsp.MarkupContent(format, content);
+}
diff --git a/pkg/analysis_server/lib/src/lsp/source_edits.dart b/pkg/analysis_server/lib/src/lsp/source_edits.dart
new file mode 100644
index 0000000..a3361d9
--- /dev/null
+++ b/pkg/analysis_server/lib/src/lsp/source_edits.dart
@@ -0,0 +1,78 @@
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analysis_server/src/protocol_server.dart' as server
+    show SourceEdit;
+import 'package:analyzer/source/line_info.dart';
+import 'package:dart_style/dart_style.dart';
+
+final DartFormatter formatter = new DartFormatter();
+
+ErrorOr<String> applyEdits(
+  String oldContent,
+  List<TextDocumentContentChangeEvent> changes, {
+  failureIsCritical: false,
+}) {
+  String newContent = oldContent;
+  for (var change in changes) {
+    if (change.range == null && change.rangeLength == null) {
+      newContent = change.text;
+    } else {
+      final lines = LineInfo.fromContent(newContent);
+      final offsetStart = toOffset(lines, change.range.start,
+          failureIsCritial: failureIsCritical);
+      final offsetEnd = toOffset(lines, change.range.end,
+          failureIsCritial: failureIsCritical);
+      if (offsetStart.isError) {
+        return new ErrorOr<String>.error(offsetStart.error);
+      }
+      if (offsetEnd.isError) {
+        return new ErrorOr<String>.error(offsetEnd.error);
+      }
+      newContent = newContent.replaceRange(
+          offsetStart.result, offsetEnd.result, change.text);
+    }
+  }
+  return new ErrorOr<String>.success(newContent);
+}
+
+List<TextEdit> generateEditsForFormatting(String unformattedSource) {
+  final lineInfo = new LineInfo.fromContent(unformattedSource);
+  final code =
+      new SourceCode(unformattedSource, uri: null, isCompilationUnit: true);
+  SourceCode formattedResult;
+  try {
+    formattedResult = formatter.formatSource(code);
+  } on FormatterException {
+    // If the document fails to parse, just return no edits to avoid the the
+    // use seeing edits on every save with invalid code (if LSP gains the
+    // ability to pass a context to know if the format was manually invoked
+    // we may wish to change this to return an error for that case).
+    return null;
+  }
+  final formattedSource = formattedResult.text;
+
+  if (formattedSource == unformattedSource) {
+    return null;
+  }
+
+  // We don't currently support returning "minimal" edits, we just replace
+  // entire document.
+  final end = lineInfo.getLocation(unformattedSource.length);
+  return [
+    new TextEdit(
+      new Range(new Position(0, 0), toPosition(end)),
+      formattedSource,
+    )
+  ];
+}
+
+/// Helper class that bundles up all information required when converting server
+/// SourceEdits into LSP-compatible WorkspaceEdits.
+class FileEditInformation {
+  final VersionedTextDocumentIdentifier doc;
+  final LineInfo lineInfo;
+  final List<server.SourceEdit> edits;
+
+  FileEditInformation(this.doc, this.lineInfo, this.edits);
+}
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index 32b9153..9943cbd 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -27,7 +27,7 @@
     return;
   }
   for (String file in files) {
-    CompilationUnit unit = server.getCachedAnalysisResult(file)?.unit;
+    CompilationUnit unit = server.getCachedResolvedUnit(file)?.unit;
     CompilationUnitElement unitElement = unit?.declaredElement;
     if (unitElement != null) {
       try {
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
index 6f95fd4a..63be71f 100644
--- a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
+++ b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
@@ -12,11 +12,11 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/src/context/context_root.dart' as analyzer;
-import 'package:analyzer/src/generated/bazel.dart';
-import 'package:analyzer/src/generated/gn.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/workspace.dart';
 import 'package:analyzer/src/util/glob.dart';
+import 'package:analyzer/src/workspace/bazel.dart';
+import 'package:analyzer/src/workspace/gn.dart';
+import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:analyzer_plugin/channel/channel.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
diff --git a/pkg/analysis_server/lib/src/plugin/result_collector.dart b/pkg/analysis_server/lib/src/plugin/result_collector.dart
index c2e3274..04c3f09 100644
--- a/pkg/analysis_server/lib/src/plugin/result_collector.dart
+++ b/pkg/analysis_server/lib/src/plugin/result_collector.dart
@@ -30,7 +30,7 @@
    * the plugin that provided the partial results. The value is the partial
    * results contributed by the plugin for the file.
    */
-  Map<String, Map<String, E>> resultMap = <String, Map<String, E>>{};
+  final Map<String, Map<String, E>> resultMap = <String, Map<String, E>>{};
 
   /**
    * Initialize a newly created result manager.
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index 9ff7232..fc2d22a 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -35,7 +35,21 @@
     engine.AnalysisOptions analysisOptions,
     engine.LineInfo lineInfo,
     List<engine.AnalysisError> errors) {
-  List<AnalysisError> serverErrors = <AnalysisError>[];
+  return mapEngineErrors(
+      analysisOptions, lineInfo, errors, newAnalysisError_fromEngine);
+}
+
+/**
+ * Translates engine errors through the ErrorProcessor.
+ */
+List<T> mapEngineErrors<T>(
+    engine.AnalysisOptions analysisOptions,
+    engine.LineInfo lineInfo,
+    List<engine.AnalysisError> errors,
+    T Function(engine.LineInfo lineInfo, engine.AnalysisError error,
+            [engine.ErrorSeverity errorSeverity])
+        constructor) {
+  List<T> serverErrors = <T>[];
   for (engine.AnalysisError error in errors) {
     ErrorProcessor processor =
         ErrorProcessor.getProcessor(analysisOptions, error);
@@ -44,11 +58,10 @@
       // Errors with null severity are filtered out.
       if (severity != null) {
         // Specified severities override.
-        serverErrors
-            .add(newAnalysisError_fromEngine(lineInfo, error, severity));
+        serverErrors.add(constructor(lineInfo, error, severity));
       }
     } else {
-      serverErrors.add(newAnalysisError_fromEngine(lineInfo, error));
+      serverErrors.add(constructor(lineInfo, error));
     }
   }
   return serverErrors;
@@ -163,7 +176,7 @@
  */
 Location newLocation_fromNode(engine.AstNode node) {
   engine.CompilationUnit unit =
-      node.getAncestor((node) => node is engine.CompilationUnit);
+      node.thisOrAncestorOfType<engine.CompilationUnit>();
   engine.CompilationUnitElement unitElement = unit.declaredElement;
   engine.SourceRange range = new engine.SourceRange(node.offset, node.length);
   return _locationForArgs(unitElement, range);
diff --git a/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart b/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart
index f100d1e..2d6adce 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/completion_core.dart
@@ -4,8 +4,8 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 
@@ -53,7 +53,7 @@
    * The analysis result for the file in which the completion is being
    * requested.
    */
-  AnalysisResult get result;
+  ResolvedUnitResult get result;
 
   /**
    * Return the source in which the completion is being requested.
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index de0500c..21d5cc8 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -9,10 +9,13 @@
 import 'package:analysis_server/protocol/protocol_constants.dart'
     show PROTOCOL_VERSION;
 import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/lsp_socket_server.dart';
 import 'package:analysis_server/src/server/detachable_filesystem_manager.dart';
 import 'package:analysis_server/src/server/dev_server.dart';
 import 'package:analysis_server/src/server/diagnostic_server.dart';
 import 'package:analysis_server/src/server/http_server.dart';
+import 'package:analysis_server/src/server/lsp_stdio_server.dart';
 import 'package:analysis_server/src/server/stdio_server.dart';
 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dart'
     show UriContributor;
@@ -263,6 +266,11 @@
   static const String USE_FASTA_PARSER = "use-fasta-parser";
 
   /**
+   * The name of the flag to use the Language Server Protocol (LSP).
+   */
+  static const String USE_LSP = "lsp";
+
+  /**
    * A directory to analyze in order to train an analysis server snapshot.
    */
   static const String TRAIN_USING = "train-using";
@@ -303,20 +311,14 @@
    */
   DetachableFileSystemManager detachableFileSystemManager;
 
-  SocketServer socketServer;
-
   HttpAnalysisServer httpServer;
 
   Driver();
 
   /**
    * Use the given command-line [arguments] to start this server.
-   *
-   * At least temporarily returns AnalysisServer so that consumers of the
-   * starter API can then use the server, this is done as a stopgap for the
-   * angular plugin until the official plugin API is finished.
    */
-  AnalysisServer start(List<String> arguments) {
+  void start(List<String> arguments) {
     CommandLineParser parser = _createArgParser();
     ArgResults results = parser.parse(arguments, <String, String>{});
 
@@ -330,6 +332,7 @@
     analysisServerOptions.clientVersion = results[CLIENT_VERSION];
     analysisServerOptions.cacheFolder = results[CACHE_FOLDER];
     analysisServerOptions.useFastaParser = results[USE_FASTA_PARSER];
+    analysisServerOptions.useLanguageServerProtocol = results[USE_LSP];
     analysisServerOptions.enableUXExperiment1 = results[UX_EXPERIMENT_1];
     analysisServerOptions.enableUXExperiment2 = results[UX_EXPERIMENT_2];
 
@@ -372,6 +375,54 @@
       return null;
     }
 
+    final defaultSdkPath = _getSdkPath(results);
+    final dartSdkManager = new DartSdkManager(defaultSdkPath, true);
+
+    // TODO(brianwilkerson) It would be nice to avoid creating an SDK that
+    // cannot be re-used, but the SDK is needed to create a package map provider
+    // in the case where we need to run `pub` in order to get the package map.
+    DartSdk defaultSdk = _createDefaultSdk(defaultSdkPath, true);
+    //
+    // Initialize the instrumentation service.
+    //
+    String logFilePath = results[INSTRUMENTATION_LOG_FILE];
+    if (logFilePath != null) {
+      _rollLogFiles(logFilePath, 5);
+      FileInstrumentationServer fileBasedServer =
+          new FileInstrumentationServer(logFilePath);
+      instrumentationServer = instrumentationServer != null
+          ? new MulticastInstrumentationServer(
+              [instrumentationServer, fileBasedServer])
+          : fileBasedServer;
+    }
+    InstrumentationService instrumentationService =
+        new InstrumentationService(instrumentationServer);
+    instrumentationService.logVersion(
+        results[TRAIN_USING] != null
+            ? 'training-0'
+            : _readUuid(instrumentationService),
+        analysisServerOptions.clientId,
+        analysisServerOptions.clientVersion,
+        PROTOCOL_VERSION,
+        defaultSdk.sdkVersion);
+    AnalysisEngine.instance.instrumentationService = instrumentationService;
+
+    if (analysisServerOptions.useLanguageServerProtocol) {
+      startLspServer(results, analysisServerOptions, dartSdkManager,
+          instrumentationService);
+    } else {
+      startAnalysisServer(results, analysisServerOptions, parser,
+          dartSdkManager, instrumentationService, analytics);
+    }
+  }
+
+  void startAnalysisServer(
+      ArgResults results,
+      AnalysisServerOptions analysisServerOptions,
+      CommandLineParser parser,
+      DartSdkManager dartSdkManager,
+      InstrumentationService instrumentationService,
+      telemetry.Analytics analytics) {
     String trainDirectory = results[TRAIN_USING];
     if (trainDirectory != null) {
       if (!FileSystemEntity.isDirectorySync(trainDirectory)) {
@@ -403,45 +454,6 @@
     manager.processPlugins(AnalysisEngine.instance.requiredPlugins);
     linter.registerLintRules();
 
-    String defaultSdkPath;
-    if (results[SDK_OPTION] != null) {
-      defaultSdkPath = results[SDK_OPTION];
-    } else {
-      // No path to the SDK was provided.
-      // Use FolderBasedDartSdk.defaultSdkDirectory, which will make a guess.
-      defaultSdkPath = FolderBasedDartSdk.defaultSdkDirectory(
-              PhysicalResourceProvider.INSTANCE)
-          .path;
-    }
-    // TODO(brianwilkerson) It would be nice to avoid creating an SDK that
-    // cannot be re-used, but the SDK is needed to create a package map provider
-    // in the case where we need to run `pub` in order to get the package map.
-    DartSdk defaultSdk = _createDefaultSdk(defaultSdkPath, true);
-    //
-    // Initialize the instrumentation service.
-    //
-    String logFilePath = results[INSTRUMENTATION_LOG_FILE];
-    if (logFilePath != null) {
-      _rollLogFiles(logFilePath, 5);
-      FileInstrumentationServer fileBasedServer =
-          new FileInstrumentationServer(logFilePath);
-      instrumentationServer = instrumentationServer != null
-          ? new MulticastInstrumentationServer(
-              [instrumentationServer, fileBasedServer])
-          : fileBasedServer;
-    }
-    InstrumentationService instrumentationService =
-        new InstrumentationService(instrumentationServer);
-    instrumentationService.logVersion(
-        trainDirectory != null
-            ? 'training-0'
-            : _readUuid(instrumentationService),
-        analysisServerOptions.clientId,
-        analysisServerOptions.clientVersion,
-        PROTOCOL_VERSION,
-        defaultSdk.sdkVersion);
-    AnalysisEngine.instance.instrumentationService = instrumentationService;
-
     _DiagnosticServerImpl diagnosticServer = new _DiagnosticServerImpl();
 
     // Ping analytics with our initial call.
@@ -450,9 +462,9 @@
     //
     // Create the sockets and start listening for requests.
     //
-    socketServer = new SocketServer(
+    final socketServer = new SocketServer(
         analysisServerOptions,
-        new DartSdkManager(defaultSdkPath, true),
+        dartSdkManager,
         instrumentationService,
         diagnosticServer,
         fileResolverProvider,
@@ -502,7 +514,7 @@
         exit(exitCode);
       }();
     } else {
-      _captureExceptions(instrumentationService, () {
+      _captureExceptions(socketServer, instrumentationService, () {
         StdioAnalysisServer stdioServer = new StdioAnalysisServer(socketServer);
         stdioServer.serveStdio().then((_) async {
           // TODO(brianwilkerson) Determine whether this await is necessary.
@@ -520,8 +532,28 @@
               ? null
               : httpServer.recordPrint);
     }
+  }
 
-    return socketServer.analysisServer;
+  void startLspServer(
+    ArgResults args,
+    AnalysisServerOptions analysisServerOptions,
+    DartSdkManager dartSdkManager,
+    InstrumentationService instrumentationService,
+  ) {
+    final socketServer = new LspSocketServer(
+      analysisServerOptions,
+      dartSdkManager,
+      instrumentationService,
+    );
+
+    _captureLspExceptions(socketServer, instrumentationService, () {
+      LspStdioAnalysisServer stdioServer =
+          new LspStdioAnalysisServer(socketServer);
+      stdioServer.serveStdio().then((_) async {
+        socketServer.analysisServer.shutdown();
+        exit(0);
+      });
+    });
   }
 
   /**
@@ -530,13 +562,13 @@
    * instrumentation [service]. If a [print] function is provided, then also
    * capture any data printed by the callback and redirect it to the function.
    */
-  dynamic _captureExceptions(InstrumentationService service, dynamic callback(),
+  dynamic _captureExceptions(SocketServer socketServer,
+      InstrumentationService service, dynamic callback(),
       {void print(String line)}) {
     void errorFunction(Zone self, ZoneDelegate parent, Zone zone,
         dynamic exception, StackTrace stackTrace) {
       service.logPriorityException(exception, stackTrace);
-      AnalysisServer analysisServer = socketServer.analysisServer;
-      analysisServer.sendServerErrorNotification(
+      socketServer.analysisServer.sendServerErrorNotification(
           'Captured exception', exception, stackTrace);
       throw exception;
     }
@@ -554,6 +586,33 @@
   }
 
   /**
+   * Execute the given [callback] within a zone that will capture any unhandled
+   * exceptions and both report them to the client and send them to the given
+   * instrumentation [service]. If a [print] function is provided, then also
+   * capture any data printed by the callback and redirect it to the function.
+   */
+  dynamic _captureLspExceptions(
+      // TODO(dantup): This is a copy/paste of the above with some minor changes.
+      // We should either factor these out, or if we end up with an LspDriver, put
+      // this there.
+      LspSocketServer socketServer,
+      InstrumentationService service,
+      dynamic callback()) {
+    void errorFunction(Zone self, ZoneDelegate parent, Zone zone,
+        dynamic exception, StackTrace stackTrace) {
+      service.logPriorityException(exception, stackTrace);
+      LspAnalysisServer analysisServer = socketServer.analysisServer;
+      analysisServer.sendServerErrorNotification(
+          'Captured exception', exception, stackTrace);
+      throw exception;
+    }
+
+    ZoneSpecification zoneSpecification =
+        new ZoneSpecification(handleUncaughtError: errorFunction);
+    return runZoned(callback, zoneSpecification: zoneSpecification);
+  }
+
+  /**
    * Create and return the parser used to parse the command-line arguments.
    */
   CommandLineParser _createArgParser() {
@@ -615,6 +674,8 @@
     parser.addFlag(USE_FASTA_PARSER,
         defaultsTo: true,
         help: "Whether to enable parsing via the Fasta parser");
+    parser.addFlag(USE_LSP,
+        defaultsTo: false, help: "Whether to use the Language Server Protocol");
     parser.addOption(TRAIN_USING,
         help: "Pass in a directory to analyze for purposes of training an "
             "analysis server snapshot.");
@@ -641,6 +702,18 @@
     return sdk;
   }
 
+  String _getSdkPath(ArgResults args) {
+    if (args[SDK_OPTION] != null) {
+      return args[SDK_OPTION];
+    } else {
+      // No path to the SDK was provided.
+      // Use FolderBasedDartSdk.defaultSdkDirectory, which will make a guess.
+      return FolderBasedDartSdk.defaultSdkDirectory(
+        PhysicalResourceProvider.INSTANCE,
+      ).path;
+    }
+  }
+
   /**
    * Print information about how to use the server.
    */
@@ -667,10 +740,12 @@
    * Read the UUID from disk, generating and storing a new one if necessary.
    */
   String _readUuid(InstrumentationService service) {
-    File uuidFile = new File(PhysicalResourceProvider.INSTANCE
-        .getStateLocation('.instrumentation')
-        .getChild('uuid.txt')
-        .path);
+    final instrumentationLocation =
+        PhysicalResourceProvider.INSTANCE.getStateLocation('.instrumentation');
+    if (instrumentationLocation == null) {
+      return _generateUuidString();
+    }
+    File uuidFile = new File(instrumentationLocation.getChild('uuid.txt').path);
     try {
       if (uuidFile.existsSync()) {
         String uuid = uuidFile.readAsStringSync();
@@ -681,9 +756,7 @@
     } catch (exception, stackTrace) {
       service.logPriorityException(exception, stackTrace);
     }
-    int millisecondsSinceEpoch = new DateTime.now().millisecondsSinceEpoch;
-    int random = new Random().nextInt(0x3fffffff);
-    String uuid = '$millisecondsSinceEpoch$random';
+    String uuid = _generateUuidString();
     try {
       uuidFile.parent.createSync(recursive: true);
       uuidFile.writeAsStringSync(uuid);
@@ -696,6 +769,15 @@
   }
 
   /**
+   * Constructs a uuid combining the current date and a random integer.
+   */
+  String _generateUuidString() {
+    int millisecondsSinceEpoch = new DateTime.now().millisecondsSinceEpoch;
+    int random = new Random().nextInt(0x3fffffff);
+    return '$millisecondsSinceEpoch$random';
+  }
+
+  /**
    * Perform log files rolling.
    *
    * Rename existing files with names `[path].(x)` to `[path].(x+1)`.
diff --git a/pkg/analysis_server/lib/src/server/lsp_stdio_server.dart b/pkg/analysis_server/lib/src/server/lsp_stdio_server.dart
new file mode 100644
index 0000000..016bd11
--- /dev/null
+++ b/pkg/analysis_server/lib/src/server/lsp_stdio_server.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:io';
+
+import 'package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart';
+import 'package:analysis_server/src/lsp/lsp_socket_server.dart';
+
+/**
+ * Instances of the class [StdioServer] implement a simple server operating
+ * over standard input and output. The primary responsibility of this server
+ * is to split incoming messages on newlines and pass them along to the
+ * analysis server.
+ */
+class LspStdioAnalysisServer {
+  /**
+   * An object that can handle either a WebSocket connection or a connection
+   * to the client over stdio.
+   */
+  LspSocketServer socketServer;
+
+  /**
+   * Initialize a newly created stdio server.
+   */
+  LspStdioAnalysisServer(this.socketServer);
+
+  /**
+   * Begin serving requests over stdio.
+   *
+   * Return a future that will be completed when stdin closes.
+   */
+  Future serveStdio() {
+    LspByteStreamServerChannel serverChannel = new LspByteStreamServerChannel(
+        stdin, stdout, socketServer.instrumentationService);
+    socketServer.createAnalysisServer(serverChannel);
+    return serverChannel.closed;
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/completion/completion_core.dart b/pkg/analysis_server/lib/src/services/completion/completion_core.dart
index 1403f86..02e617b 100644
--- a/pkg/analysis_server/lib/src/services/completion/completion_core.dart
+++ b/pkg/analysis_server/lib/src/services/completion/completion_core.dart
@@ -4,8 +4,8 @@
 
 import 'package:analysis_server/src/provisional/completion/completion_core.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
@@ -13,7 +13,7 @@
  */
 class CompletionRequestImpl implements CompletionRequest {
   @override
-  final AnalysisResult result;
+  final ResolvedUnitResult result;
 
   @override
   final int offset;
diff --git a/pkg/analysis_server/lib/src/services/completion/completion_performance.dart b/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
index 24b952f..37ee54e 100644
--- a/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
+++ b/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
@@ -25,11 +25,6 @@
   int get elapsedInMilliseconds =>
       operations.length > 0 ? operations.last.elapsed.inMilliseconds : 0;
 
-  int get firstNotificationInMilliseconds =>
-      _firstNotification != null ? _firstNotification.inMilliseconds : 0;
-
-  String get startTimeAndMs => '${start.millisecondsSinceEpoch} - $start';
-
   String get suggestionCount {
     if (notificationCount < 1) return '';
     if (notificationCount == 1) return '$suggestionCountFirst';
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart
index 18ba66b..fc4e494 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/combinator_contributor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -27,7 +27,7 @@
     }
 
     // Build list of suggestions
-    var directive = node.getAncestor((parent) => parent is NamespaceDirective);
+    var directive = node.thisOrAncestorOfType<NamespaceDirective>();
     if (directive is NamespaceDirective) {
       LibraryElement library = directive.uriElement;
       if (library != null) {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
index 306c6b3..0989365 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
@@ -1,11 +1,11 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 
 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
-    show CompletionContributor, CompletionRequest;
+    show AbortCompletion, CompletionContributor, CompletionRequest;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/completion_core.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
@@ -29,11 +29,13 @@
 import 'package:analysis_server/src/services/completion/dart/type_member_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/variable_name_contributor.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/task/api/model.dart';
@@ -102,37 +104,43 @@
       new UriContributor(),
       new VariableNameContributor()
     ];
-    for (DartCompletionContributor contributor in contributors) {
-      String contributorTag =
-          'DartCompletionManager - ${contributor.runtimeType}';
-      performance.logStartTime(contributorTag);
-      List<CompletionSuggestion> contributorSuggestions =
-          await contributor.computeSuggestions(dartRequest);
-      performance.logElapseTime(contributorTag);
-      request.checkAborted();
+    try {
+      for (DartCompletionContributor contributor in contributors) {
+        String contributorTag =
+            'DartCompletionManager - ${contributor.runtimeType}';
+        performance.logStartTime(contributorTag);
+        List<CompletionSuggestion> contributorSuggestions =
+            await contributor.computeSuggestions(dartRequest);
+        performance.logElapseTime(contributorTag);
+        request.checkAborted();
 
-      for (CompletionSuggestion newSuggestion in contributorSuggestions) {
-        String key = newSuggestion.completion;
+        for (CompletionSuggestion newSuggestion in contributorSuggestions) {
+          String key = newSuggestion.completion;
 
-        // Append parenthesis for constructors to disambiguate from classes.
-        if (_isConstructor(newSuggestion)) {
-          key += '()';
-          String className = _getConstructorClassName(newSuggestion);
-          _ensureList(constructorMap, className).add(key);
-        }
+          // Append parenthesis for constructors to disambiguate from classes.
+          if (_isConstructor(newSuggestion)) {
+            key += '()';
+            String className = _getConstructorClassName(newSuggestion);
+            _ensureList(constructorMap, className).add(key);
+          }
 
-        // Local declarations hide both the class and its constructors.
-        if (!_isClass(newSuggestion)) {
-          List<String> constructorKeys = constructorMap[key];
-          constructorKeys?.forEach(suggestionMap.remove);
-        }
+          // Local declarations hide both the class and its constructors.
+          if (!_isClass(newSuggestion)) {
+            List<String> constructorKeys = constructorMap[key];
+            constructorKeys?.forEach(suggestionMap.remove);
+          }
 
-        CompletionSuggestion oldSuggestion = suggestionMap[key];
-        if (oldSuggestion == null ||
-            oldSuggestion.relevance < newSuggestion.relevance) {
-          suggestionMap[key] = newSuggestion;
+          CompletionSuggestion oldSuggestion = suggestionMap[key];
+          if (oldSuggestion == null ||
+              oldSuggestion.relevance < newSuggestion.relevance) {
+            suggestionMap[key] = newSuggestion;
+          }
         }
       }
+    } on InconsistentAnalysisException {
+      // The state of the code being analyzed has changed, so results are likely
+      // to be inconsistent. Just abort the operation.
+      throw new AbortCompletion();
     }
 
     // Adjust suggestion relevance before returning
@@ -178,7 +186,7 @@
  */
 class DartCompletionRequestImpl implements DartCompletionRequest {
   @override
-  final AnalysisResult result;
+  final ResolvedUnitResult result;
 
   @override
   final ResourceProvider resourceProvider;
@@ -249,7 +257,10 @@
   String get sourceContents => result.content;
 
   @override
-  SourceFactory get sourceFactory => result.sourceFactory;
+  SourceFactory get sourceFactory {
+    DriverBasedAnalysisContext context = result.session.analysisContext;
+    return context.driver.sourceFactory;
+  }
 
   /**
    * Throw [AbortCompletion] if the completion request has been aborted.
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
index 2a45ee0..64ed46a 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/field_formal_contributor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -28,7 +28,7 @@
     // If this is a constructor declaration
     // then compute fields already referenced
     ConstructorDeclaration constructorDecl =
-        node.getAncestor((p) => p is ConstructorDeclaration);
+        node.thisOrAncestorOfType<ConstructorDeclaration>();
     if (constructorDecl == null) {
       return const <CompletionSuggestion>[];
     }
@@ -53,7 +53,7 @@
 
     // Add suggestions for fields that are not already referenced
     ClassDeclaration classDecl =
-        constructorDecl.getAncestor((p) => p is ClassDeclaration);
+        constructorDecl.thisOrAncestorOfType<ClassDeclaration>();
     List<CompletionSuggestion> suggestions = <CompletionSuggestion>[];
     for (ClassMember member in classDecl.members) {
       if (member is FieldDeclaration && !member.isStatic) {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
index 1db3c05..64bac8e 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -329,7 +329,7 @@
   @override
   visitFormalParameterList(FormalParameterList node) {
     AstNode constructorDeclaration =
-        node.getAncestor((p) => p is ConstructorDeclaration);
+        node.thisOrAncestorOfType<ConstructorDeclaration>();
     if (constructorDeclaration != null) {
       _addSuggestions([Keyword.THIS]);
     }
@@ -746,21 +746,21 @@
   }
 
   bool _inAsyncMethodOrFunction(AstNode node) {
-    FunctionBody body = node.getAncestor((n) => n is FunctionBody);
+    FunctionBody body = node.thisOrAncestorOfType<FunctionBody>();
     return body != null && body.isAsynchronous && body.star == null;
   }
 
   bool _inAsyncStarOrSyncStarMethodOrFunction(AstNode node) {
-    FunctionBody body = node.getAncestor((n) => n is FunctionBody);
+    FunctionBody body = node.thisOrAncestorOfType<FunctionBody>();
     return body != null && body.keyword != null && body.star != null;
   }
 
   bool _inCatchClause(Block node) =>
-      node.getAncestor((p) => p is CatchClause) != null;
+      node.thisOrAncestorOfType<CatchClause>() != null;
 
   bool _inClassMemberBody(AstNode node) {
     while (true) {
-      AstNode body = node.getAncestor((n) => n is FunctionBody);
+      AstNode body = node.thisOrAncestorOfType<FunctionBody>();
       if (body == null) {
         return false;
       }
@@ -773,23 +773,24 @@
   }
 
   bool _inDoLoop(AstNode node) =>
-      node.getAncestor((p) => p is DoStatement) != null;
+      node.thisOrAncestorOfType<DoStatement>() != null;
 
   bool _inForLoop(AstNode node) =>
-      node.getAncestor((p) => p is ForStatement || p is ForEachStatement) !=
+      node.thisOrAncestorMatching(
+          (p) => p is ForStatement || p is ForEachStatement) !=
       null;
 
   bool _inLoop(AstNode node) =>
       _inDoLoop(node) || _inForLoop(node) || _inWhileLoop(node);
 
   bool _inSwitch(AstNode node) =>
-      node.getAncestor((p) => p is SwitchStatement) != null;
+      node.thisOrAncestorOfType<SwitchStatement>() != null;
 
   bool _inWhileLoop(AstNode node) =>
-      node.getAncestor((p) => p is WhileStatement) != null;
+      node.thisOrAncestorOfType<WhileStatement>() != null;
 
   bool _isEntityAfterIfWithoutElse(AstNode node) {
-    Block block = node?.getAncestor((n) => n is Block);
+    Block block = node?.thisOrAncestorOfType<Block>();
     if (block == null) {
       return false;
     }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
index 4dead0e..d580fcd 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
@@ -91,6 +91,11 @@
   }
 
   @override
+  void declaredGenericTypeAlias(GenericTypeAlias declaration) {
+    // ignored
+  }
+
+  @override
   void declaredLabel(Label label, bool isCaseLabel) {
     if (isCaseLabel ? includeCaseLabels : includeStatementLabels) {
       CompletionSuggestion suggestion = _addSuggestion(label.label);
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
index aeda775..4d8b351 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart
@@ -84,6 +84,9 @@
   void declaredFunctionTypeAlias(FunctionTypeAlias declaration) {}
 
   @override
+  void declaredGenericTypeAlias(GenericTypeAlias declaration) {}
+
+  @override
   void declaredLabel(Label label, bool isCaseLabel) {}
 
   @override
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 cee82af..66a5fc6 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
@@ -226,6 +226,20 @@
   }
 
   @override
+  void declaredGenericTypeAlias(GenericTypeAlias declaration) {
+    if (optype.includeTypeNameSuggestions) {
+      // TODO (danrubel) determine parameters and return type
+      _addLocalSuggestion_includeTypeNameSuggestions(
+          declaration.documentationComment,
+          declaration.name,
+          declaration.functionType.returnType,
+          protocol.ElementKind.FUNCTION_TYPE_ALIAS,
+          isAbstract: true,
+          isDeprecated: isDeprecated(declaration));
+    }
+  }
+
+  @override
   void declaredLabel(Label label, bool isCaseLabel) {
     // ignored
   }
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 34d1ffb..405b772 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
@@ -9,10 +9,10 @@
 import 'package:analysis_server/src/protocol_server.dart' as protocol
     hide CompletionSuggestion, CompletionSuggestionKind;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
@@ -34,13 +34,15 @@
       return const <CompletionSuggestion>[];
     }
     ClassDeclaration classDecl =
-        targetId.getAncestor((p) => p is ClassDeclaration);
+        targetId.thisOrAncestorOfType<ClassDeclaration>();
     if (classDecl == null) {
       return const <CompletionSuggestion>[];
     }
 
+    // TODO(brianwilkerson) Consider making the type system visible from the
+    // request.result.
     var inheritance = new InheritanceManager2(
-        request.result.libraryElement.context.typeSystem);
+        await request.result.libraryElement.session.typeSystem);
 
     // Generate a collection of inherited members
     ClassElement classElem = classDecl.declaredElement;
@@ -68,14 +70,13 @@
    * the template will replace [targetId].
    */
   Future<DartChangeBuilder> _buildReplacementText(
-      AnalysisResult result,
+      ResolvedUnitResult result,
       SimpleIdentifier targetId,
       FunctionType signature,
       StringBuffer displayTextBuffer) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    DartChangeBuilder builder =
-        new DartChangeBuilder(result.driver.currentSession);
+    DartChangeBuilder builder = new DartChangeBuilder(result.session);
     await builder.addFileEdit(result.path, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(targetId), (DartEditBuilder builder) {
         ExecutableElement element = signature.element;
@@ -205,12 +206,15 @@
    */
   List<Name> _namesToOverride(
       ClassElement classElement, Iterable<Name> interfaceNames) {
-    var notDefinedNames = <Name>[];
+    var libraryUri = classElement.library.source.uri;
+    var namesToOverride = <Name>[];
     for (var name in interfaceNames) {
-      if (!_hasMember(classElement, name.name)) {
-        notDefinedNames.add(name);
+      if (name.isAccessibleFor(libraryUri)) {
+        if (!_hasMember(classElement, name.name)) {
+          namesToOverride.add(name);
+        }
       }
     }
-    return notDefinedNames;
+    return namesToOverride;
   }
 }
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 ef91fd7..e1ba6f9 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
@@ -110,9 +110,9 @@
 }
 
 /**
- * Common mixin for sharing behavior
+ * Common mixin for sharing behavior.
  */
-abstract class ElementSuggestionBuilder {
+mixin ElementSuggestionBuilder {
   /**
    * A collection of completion suggestions.
    */
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
index d0b3d04..a4e03b3 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
@@ -83,7 +83,7 @@
       // Determine the name of the containing method because
       // the most likely completion is a super expression with same name
       MethodDeclaration containingMethod =
-          expression.getAncestor((p) => p is MethodDeclaration);
+          expression.thisOrAncestorOfType<MethodDeclaration>();
       if (containingMethod != null) {
         SimpleIdentifier id = containingMethod.name;
         if (id != null) {
@@ -174,6 +174,17 @@
   }
 
   @override
+  void declaredGenericTypeAlias(GenericTypeAlias declaration) {
+    if (declaration.name.name == targetName) {
+      TypeAnnotation typeName = declaration.functionType.returnType;
+      if (typeName != null) {
+        typeFound = typeName.type;
+      }
+      finished();
+    }
+  }
+
+  @override
   void declaredLabel(Label label, bool isCaseLabel) {
     if (label.label.name == targetName) {
       // no type
diff --git a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
index 1a690a8..1c15d65 100644
--- a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
@@ -6,12 +6,11 @@
 
 import 'package:analysis_server/src/protocol_server.dart' hide Element;
 import 'package:analysis_server/src/services/correction/util.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/error/error.dart' as engine;
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -256,21 +255,11 @@
  * The context for computing a postfix completion.
  */
 class PostfixCompletionContext {
-  final String file;
-  final LineInfo lineInfo;
+  final ResolvedUnitResult resolveResult;
   final int selectionOffset;
   final String key;
-  final AnalysisDriver driver;
-  final CompilationUnit unit;
-  final CompilationUnitElement unitElement;
-  final List<engine.AnalysisError> errors;
 
-  PostfixCompletionContext(this.file, this.lineInfo, this.selectionOffset,
-      this.key, this.driver, this.unit, this.unitElement, this.errors) {
-    if (unitElement.context == null) {
-      throw new Error(); // not reached
-    }
-  }
+  PostfixCompletionContext(this.resolveResult, this.selectionOffset, this.key);
 }
 
 /**
@@ -309,40 +298,25 @@
   AstNode node;
   PostfixCompletion completion;
   SourceChange change = new SourceChange('postfix-completion');
-  final Map<String, LinkedEditGroup> linkedPositionGroups =
-      <String, LinkedEditGroup>{};
+  final Map<String, LinkedEditGroup> linkedPositionGroups = {};
   Position exitPosition = null;
-  TypeProvider _typeProvider;
 
   PostfixCompletionProcessor(this.completionContext)
-      : utils = new CorrectionUtils(completionContext.unit);
-
-  AnalysisDriver get driver => completionContext.driver;
+      : utils = new CorrectionUtils(completionContext.resolveResult);
 
   String get eol => utils.endOfLine;
 
-  String get file => completionContext.file;
+  String get file => completionContext.resolveResult.path;
 
   String get key => completionContext.key;
 
-  LineInfo get lineInfo => completionContext.lineInfo;
+  LineInfo get lineInfo => completionContext.resolveResult.lineInfo;
 
   int get selectionOffset => completionContext.selectionOffset;
 
-  /**
-   * Return the analysis session to be used to create the change builder.
-   */
-  AnalysisSession get session => driver.currentSession;
+  AnalysisSession get session => completionContext.resolveResult.session;
 
-  Source get source => completionContext.unitElement.source;
-
-  TypeProvider get typeProvider {
-    return _typeProvider ??= unitElement.context.typeProvider;
-  }
-
-  CompilationUnit get unit => completionContext.unit;
-
-  CompilationUnitElement get unitElement => completionContext.unitElement;
+  TypeProvider get typeProvider => completionContext.resolveResult.typeProvider;
 
   Future<PostfixCompletion> compute() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
@@ -591,7 +565,8 @@
   }
 
   AstNode _selectedNode({int at: null}) =>
-      new NodeLocator(at == null ? selectionOffset : at).searchWithin(unit);
+      new NodeLocator(at == null ? selectionOffset : at)
+          .searchWithin(completionContext.resolveResult.unit);
 
   void _setCompletionFromBuilder(
       DartChangeBuilder builder, PostfixCompletionKind kind,
diff --git a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
index 929f1fe..303ddd5 100644
--- a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -8,6 +8,7 @@
 import 'package:analysis_server/src/protocol_server.dart' hide Element;
 import 'package:analysis_server/src/services/correction/source_buffer.dart';
 import 'package:analysis_server/src/services/correction/util.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -81,19 +82,10 @@
  * The context for computing a statement completion.
  */
 class StatementCompletionContext {
-  final String file;
-  final LineInfo lineInfo;
+  final ResolvedUnitResult resolveResult;
   final int selectionOffset;
-  final CompilationUnit unit;
-  final CompilationUnitElement unitElement;
-  final List<engine.AnalysisError> errors;
 
-  StatementCompletionContext(this.file, this.lineInfo, this.selectionOffset,
-      this.unit, this.unitElement, this.errors) {
-    if (unitElement.context == null) {
-      throw new Error(); // not reached; see getStatementCompletion()
-    }
-  }
+  StatementCompletionContext(this.resolveResult, this.selectionOffset);
 }
 
 /**
@@ -143,21 +135,22 @@
   Position exitPosition = null;
 
   StatementCompletionProcessor(this.statementContext)
-      : utils = new CorrectionUtils(statementContext.unit);
+      : utils = new CorrectionUtils(statementContext.resolveResult);
 
   String get eol => utils.endOfLine;
 
-  String get file => statementContext.file;
+  String get file => statementContext.resolveResult.path;
 
-  LineInfo get lineInfo => statementContext.lineInfo;
+  LineInfo get lineInfo => statementContext.resolveResult.lineInfo;
 
   int get selectionOffset => statementContext.selectionOffset;
 
-  Source get source => statementContext.unitElement.source;
+  Source get source => unitElement.source;
 
-  CompilationUnit get unit => statementContext.unit;
+  CompilationUnit get unit => statementContext.resolveResult.unit;
 
-  CompilationUnitElement get unitElement => statementContext.unitElement;
+  CompilationUnitElement get unitElement =>
+      statementContext.resolveResult.unit.declaredElement;
 
   Future<StatementCompletion> compute() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
@@ -166,8 +159,8 @@
     if (node == null) {
       return NO_COMPLETION;
     }
-    node = node
-        .getAncestor((n) => n is Statement || _isNonStatementDeclaration(n));
+    node = node.thisOrAncestorMatching(
+        (n) => n is Statement || _isNonStatementDeclaration(n));
     if (node == null) {
       return _complete_simpleEnter() ? completion : NO_COMPLETION;
     }
@@ -180,7 +173,7 @@
     if (_isEmptyStatementOrEmptyBlock(node)) {
       node = node.parent;
     }
-    for (engine.AnalysisError error in statementContext.errors) {
+    for (engine.AnalysisError error in statementContext.resolveResult.errors) {
       if (error.offset >= node.offset && error.offset <= node.end) {
         if (error.errorCode is! HintCode) {
           errors.add(error);
@@ -282,7 +275,7 @@
         return null;
       }
       AstNode expr = _selectedNode();
-      return (expr.getAncestor((n) => n is StringInterpolation) == null)
+      return (expr.thisOrAncestorOfType<StringInterpolation>() == null)
           ? expr
           : null;
     }
@@ -319,7 +312,7 @@
     expr = errorMatching(ParserErrorCode.EXPECTED_TOKEN, partialMatch: "']'") ??
         errorMatching(ScannerErrorCode.EXPECTED_TOKEN, partialMatch: "']'");
     if (expr != null) {
-      expr = expr.getAncestor((n) => n is ListLiteral);
+      expr = expr.thisOrAncestorOfType<ListLiteral>();
       if (expr != null) {
         ListLiteral lit = expr;
         if (lit.rightBracket.isSynthetic) {
@@ -861,13 +854,13 @@
     if (parenError == null) {
       return false;
     }
-    AstNode argList = _selectedNode(at: selectionOffset)
-        .getAncestor((n) => n is ArgumentList);
+    AstNode argList =
+        _selectedNode(at: selectionOffset).thisOrAncestorOfType<ArgumentList>();
     if (argList == null) {
       argList = _selectedNode(at: parenError.offset)
-          .getAncestor((n) => n is ArgumentList);
+          .thisOrAncestorOfType<ArgumentList>();
     }
-    if (argList?.getAncestor((n) => n == node) == null) {
+    if (argList?.thisOrAncestorMatching((n) => n == node) == null) {
       return false;
     }
     int previousInsertions = _lengthOfInsertions();
@@ -1107,31 +1100,12 @@
         orElse: () => null);
   }
 
-  LinkedEditGroup _getLinkedPosition(String groupId) {
-    LinkedEditGroup group = linkedPositionGroups[groupId];
-    if (group == null) {
-      group = new LinkedEditGroup.empty();
-      linkedPositionGroups[groupId] = group;
-    }
-    return group;
-  }
-
   void _insertBuilder(SourceBuilder builder, [int length = 0]) {
     {
       SourceRange range = new SourceRange(builder.offset, length);
       String text = builder.toString();
       _addReplaceEdit(range, text);
     }
-    // add linked positions
-    builder.linkedPositionGroups.forEach((String id, LinkedEditGroup group) {
-      LinkedEditGroup fixGroup = _getLinkedPosition(id);
-      group.positions.forEach((Position position) {
-        fixGroup.addPosition(position, group.length);
-      });
-      group.suggestions.forEach((LinkedEditSuggestion suggestion) {
-        fixGroup.addSuggestion(suggestion);
-      });
-    });
     // add exit position
     {
       int exitOffset = builder.exitOffset;
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 772299c..08a56a1 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -2,7 +2,30 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analysis_server/plugin/edit/assist/assist_dart.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
+
+/**
+ * The implementation of [DartAssistContext].
+ */
+class DartAssistContextImpl implements DartAssistContext {
+  @override
+  final ChangeWorkspace workspace;
+
+  @override
+  final ResolvedUnitResult resolveResult;
+
+  @override
+  final int selectionOffset;
+
+  @override
+  final int selectionLength;
+
+  DartAssistContextImpl(this.workspace, this.resolveResult,
+      this.selectionOffset, this.selectionLength);
+}
 
 /**
  * An enumeration of possible assist kinds.
@@ -28,10 +51,10 @@
       'dart.assist.convert.bodyToBlock', 30, "Convert to block body");
   static const CONVERT_INTO_EXPRESSION_BODY = const AssistKind(
       'dart.assist.convert.bodyToExpression', 30, "Convert to expression body");
-  static const CONVERT_INTO_FOR_INDEX = const AssistKind(
-      'dart.assist.convert.forEachToForIndex', 30, "Convert to for-index loop");
   static const CONVERT_INTO_FINAL_FIELD = const AssistKind(
       'dart.assist.convert.getterToFinalField', 30, "Convert to final field");
+  static const CONVERT_INTO_FOR_INDEX = const AssistKind(
+      'dart.assist.convert.forEachToForIndex', 30, "Convert to for-index loop");
   static const CONVERT_INTO_GENERIC_FUNCTION_SYNTAX = const AssistKind(
       'dart.assist.convert.toGenericFunctionSyntax',
       30,
@@ -96,6 +119,8 @@
       const AssistKind('dart.assist.flutter.wrap.padding', 30, "Add padding");
   static const FLUTTER_WRAP_ROW =
       const AssistKind('dart.assist.flutter.wrap.row', 30, "Wrap with Row");
+  static const FLUTTER_WRAP_STREAM_BUILDER = const AssistKind(
+      'dart.assist.flutter.wrap.streamBuilder', 30, "Wrap with StreamBuilder");
   static const IMPORT_ADD_SHOW = const AssistKind(
       'dart.assist.addShowCombinator', 30, "Add explicit 'show' combinator");
   static const INTRODUCE_LOCAL_CAST_TYPE = const AssistKind(
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index b9a6be5..135f6dc 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -16,12 +16,10 @@
 import 'package:analysis_server/src/utilities/flutter.dart' as flutter;
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
@@ -29,6 +27,7 @@
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
+import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/assist/assist.dart'
     hide AssistContributor;
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
@@ -42,73 +41,36 @@
  * The computer for Dart assists.
  */
 class AssistProcessor {
-  /**
-   * The analysis driver being used to perform analysis.
-   */
-  AnalysisDriver driver;
+  final DartAssistContext context;
+  final int selectionOffset;
+  final int selectionLength;
+  final int selectionEnd;
 
-  /**
-   * The analysis session to be used to create the change builder.
-   */
-  AnalysisSession session;
-
-  /**
-   * The helper wrapper around the [session].
-   */
-  AnalysisSessionHelper sessionHelper;
-
-  Source source;
-  String file;
-
-  CompilationUnit unit;
-  CompilationUnitElement unitElement;
-
-  LibraryElement unitLibraryElement;
-
-  int selectionOffset;
-  int selectionLength;
-  int selectionEnd;
+  final AnalysisSession session;
+  final AnalysisSessionHelper sessionHelper;
+  final TypeProvider typeProvider;
+  final String file;
+  final CorrectionUtils utils;
 
   final List<Assist> assists = <Assist>[];
 
-  CorrectionUtils utils;
-
   AstNode node;
 
-  TypeProvider _typeProvider;
-
-  AssistProcessor(DartAssistContext dartContext) {
-    driver = dartContext.analysisDriver;
-    session = driver.currentSession;
-    sessionHelper = new AnalysisSessionHelper(session);
-    // source
-    source = dartContext.source;
-    file = dartContext.source.fullName;
-    // unit
-    unit = dartContext.unit;
-    unitElement = dartContext.unit.declaredElement;
-    // library
-    unitLibraryElement = resolutionMap
-        .elementDeclaredByCompilationUnit(dartContext.unit)
-        .library;
-    // selection
-    selectionOffset = dartContext.selectionOffset;
-    selectionLength = dartContext.selectionLength;
-    selectionEnd = selectionOffset + selectionLength;
-  }
+  AssistProcessor(this.context)
+      : selectionOffset = context.selectionOffset,
+        selectionLength = context.selectionLength,
+        selectionEnd = context.selectionOffset + context.selectionLength,
+        session = context.resolveResult.session,
+        sessionHelper = AnalysisSessionHelper(context.resolveResult.session),
+        typeProvider = context.resolveResult.typeProvider,
+        file = context.resolveResult.path,
+        utils = new CorrectionUtils(context.resolveResult);
 
   /**
    * Returns the EOL to use for this [CompilationUnit].
    */
   String get eol => utils.endOfLine;
 
-  TypeProvider get typeProvider {
-    if (_typeProvider == null) {
-      _typeProvider = unitElement.context.typeProvider;
-    }
-    return _typeProvider;
-  }
-
   Future<List<Assist>> compute() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -149,6 +111,7 @@
     await _addProposal_flutterRemoveWidget_multipleChildren();
     await _addProposal_flutterSwapWithChild();
     await _addProposal_flutterSwapWithParent();
+    await _addProposal_flutterWrapStreamBuilder();
     await _addProposal_flutterWrapWidget();
     await _addProposal_flutterWrapWidgets();
     await _addProposal_importAddShow();
@@ -188,28 +151,27 @@
     // isn't just "return node.getAncestor((node) => node is FunctionBody);"
     {
       FunctionExpression function =
-          node.getAncestor((node) => node is FunctionExpression);
+          node.thisOrAncestorOfType<FunctionExpression>();
       if (function != null) {
         return function.body;
       }
     }
     {
       FunctionDeclaration function =
-          node.getAncestor((node) => node is FunctionDeclaration);
+          node.thisOrAncestorOfType<FunctionDeclaration>();
       if (function != null) {
         return function.functionExpression.body;
       }
     }
     {
       ConstructorDeclaration constructor =
-          node.getAncestor((node) => node is ConstructorDeclaration);
+          node.thisOrAncestorOfType<ConstructorDeclaration>();
       if (constructor != null) {
         return constructor.body;
       }
     }
     {
-      MethodDeclaration method =
-          node.getAncestor((node) => node is MethodDeclaration);
+      MethodDeclaration method = node.thisOrAncestorOfType<MethodDeclaration>();
       if (method != null) {
         return method.body;
       }
@@ -233,9 +195,9 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     DeclaredIdentifier declaredIdentifier =
-        node.getAncestor((n) => n is DeclaredIdentifier);
+        node.thisOrAncestorOfType<DeclaredIdentifier>();
     if (declaredIdentifier == null) {
-      ForEachStatement forEach = node.getAncestor((n) => n is ForEachStatement);
+      ForEachStatement forEach = node.thisOrAncestorOfType<ForEachStatement>();
       int offset = node.offset;
       if (forEach != null &&
           forEach.iterable != null &&
@@ -259,7 +221,7 @@
     }
     _configureTargetLocation(node);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     bool validChange = true;
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       Token keyword = declaredIdentifier.keyword;
@@ -309,7 +271,7 @@
     // prepare type source
     _configureTargetLocation(node);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     bool validChange = true;
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addInsertion(name.offset, (DartEditBuilder builder) {
@@ -328,7 +290,7 @@
     AstNode node = this.node;
     // prepare VariableDeclarationList
     VariableDeclarationList declarationList =
-        node.getAncestor((node) => node is VariableDeclarationList);
+        node.thisOrAncestorOfType<VariableDeclarationList>();
     if (declarationList == null) {
       _coverageMarker();
       return;
@@ -365,7 +327,7 @@
     }
     _configureTargetLocation(node);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     bool validChange = true;
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       Token keyword = declarationList.keyword;
@@ -385,33 +347,6 @@
     }
   }
 
-  Future<void> _addProposal_convertToIntLiteral() async {
-    if (node is! DoubleLiteral) {
-      _coverageMarker();
-      return;
-    }
-    DoubleLiteral literal = node;
-    int intValue;
-    try {
-      intValue = literal.value?.truncate();
-    } catch (e) {
-      // Double cannot be converted to int
-    }
-    if (intValue == null || intValue != literal.value) {
-      _coverageMarker();
-      return;
-    }
-
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
-    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addReplacement(new SourceRange(literal.offset, literal.length),
-          (DartEditBuilder builder) {
-        builder.write('$intValue');
-      });
-    });
-    _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_INT_LITERAL);
-  }
-
   Future<void> _addProposal_assignToLocalVariable() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -452,7 +387,7 @@
         getVariableNameSuggestionsForExpression(type, expression, excluded);
 
     if (suggestions.isNotEmpty) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addInsertion(offset, (DartEditBuilder builder) {
           builder.write('var ');
@@ -469,7 +404,7 @@
 
   Future<void> _addProposal_convertClassToMixin() async {
     ClassDeclaration classDeclaration =
-        node.getAncestor((n) => n is ClassDeclaration);
+        node.thisOrAncestorOfType<ClassDeclaration>();
     if (classDeclaration == null) {
       return;
     }
@@ -505,7 +440,7 @@
     }
     interfaces.addAll(classElement.interfaces);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(
           range.startStart(
@@ -513,6 +448,8 @@
               classDeclaration.leftBracket), (DartEditBuilder builder) {
         builder.write('mixin ');
         builder.write(classDeclaration.name.name);
+        builder.writeTypeParameters(
+            classDeclaration.declaredElement.typeParameters);
         builder.writeTypes(superclassConstraints, prefix: ' on ');
         builder.writeTypes(interfaces, prefix: ' implements ');
         builder.write(' ');
@@ -524,7 +461,7 @@
   Future<void> _addProposal_convertDocumentationIntoBlock() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    Comment comment = node.getAncestor((n) => n is Comment);
+    Comment comment = node.thisOrAncestorOfType<Comment>();
     if (comment == null || !comment.isDocumentation) {
       return;
     }
@@ -537,7 +474,7 @@
     }
     String prefix = utils.getNodePrefix(comment);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(comment), (DartEditBuilder builder) {
         builder.writeln('/**');
@@ -557,7 +494,7 @@
   Future<void> _addProposal_convertDocumentationIntoLine() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    Comment comment = node.getAncestor((n) => n is Comment);
+    Comment comment = node.thisOrAncestorOfType<Comment>();
     if (comment == null ||
         !comment.isDocumentation ||
         comment.tokens.length != 1) {
@@ -592,18 +529,22 @@
         if (line.startsWith(prefix + ' */')) {
           break;
         }
-        String expectedPrefix = prefix + ' * ';
+        String expectedPrefix = prefix + ' *';
         if (!line.startsWith(expectedPrefix)) {
           _coverageMarker();
           return;
         }
         line = line.substring(expectedPrefix.length).trim();
-        newLines.add('$linePrefix/// $line');
+        if (line.isEmpty) {
+          newLines.add('$linePrefix///');
+        } else {
+          newLines.add('$linePrefix/// $line');
+        }
         linePrefix = eol + prefix;
       }
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(comment), (DartEditBuilder builder) {
         for (String newLine in newLines) {
@@ -677,7 +618,7 @@
       code += ';';
       SourceRange replacementRange =
           range.startEnd(getter.returnType ?? getter.propertyKeyword, getter);
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addSimpleReplacement(replacementRange, code);
       });
@@ -730,7 +671,7 @@
     code += ';';
     SourceRange replacementRange =
         range.startEnd(fieldList.keyword, fieldDeclaration);
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(replacementRange, code);
     });
@@ -740,17 +681,16 @@
   Future<void> _addProposal_convertPartOfToUri() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    PartOfDirective directive =
-        node.getAncestor((node) => node is PartOfDirective);
+    PartOfDirective directive = node.thisOrAncestorOfType<PartOfDirective>();
     if (directive == null || directive.libraryName == null) {
       return;
     }
-    String libraryPath = unitLibraryElement.source.fullName;
-    String partPath = unit.declaredElement.source.fullName;
+    String libraryPath = context.resolveResult.libraryElement.source.fullName;
+    String partPath = context.resolveResult.path;
     String relativePath = relative(libraryPath, from: dirname(partPath));
     String uri = new Uri.file(relativePath).toString();
     SourceRange replacementRange = range.node(directive.libraryName);
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(replacementRange, "'$uri'");
     });
@@ -782,7 +722,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.convertFunctionFromSyncToAsync(body, typeProvider);
     });
@@ -815,7 +755,7 @@
     String prefix = utils.getNodePrefix(body.parent);
     String indent = utils.getIndent(1);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(body), (DartEditBuilder builder) {
         if (body.isAsynchronous) {
@@ -876,7 +816,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(body), (DartEditBuilder builder) {
         if (body.isAsynchronous) {
@@ -902,7 +842,7 @@
     }
     // prepare ConstructorDeclaration
     ConstructorDeclaration constructor =
-        node.getAncestor((node) => node is ConstructorDeclaration);
+        node.thisOrAncestorOfType<ConstructorDeclaration>();
     if (constructor == null) {
       return;
     }
@@ -964,7 +904,7 @@
       }
       String fieldName = parameterInitializer.fieldName.name;
 
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         // replace parameter
         builder.addSimpleReplacement(range.node(parameter), 'this.$fieldName');
@@ -993,7 +933,7 @@
     await null;
     // find enclosing ForEachStatement
     ForEachStatement forEachStatement =
-        node.getAncestor((n) => n is ForEachStatement);
+        node.thisOrAncestorOfType<ForEachStatement>();
     if (forEachStatement == null) {
       _coverageMarker();
       return;
@@ -1056,7 +996,7 @@
     String indent = utils.getIndent(1);
     int firstBlockLine = utils.getLineContentEnd(body.leftBracket.end);
     // add change
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       // TODO(brianwilkerson) Create linked positions for the loop variable.
       builder.addSimpleReplacement(
@@ -1088,6 +1028,33 @@
     }
   }
 
+  Future<void> _addProposal_convertToIntLiteral() async {
+    if (node is! DoubleLiteral) {
+      _coverageMarker();
+      return;
+    }
+    DoubleLiteral literal = node;
+    int intValue;
+    try {
+      intValue = literal.value?.truncate();
+    } catch (e) {
+      // Double cannot be converted to int
+    }
+    if (intValue == null || intValue != literal.value) {
+      _coverageMarker();
+      return;
+    }
+
+    var changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+      builder.addReplacement(new SourceRange(literal.offset, literal.length),
+          (DartEditBuilder builder) {
+        builder.write('$intValue');
+      });
+    });
+    _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_INT_LITERAL);
+  }
+
   Future<void> _addProposal_convertToIsNot_onIs() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -1125,7 +1092,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       if (getExpressionParentPrecedence(prefExpression) >=
           TokenClass.RELATIONAL_OPERATOR.precedence) {
@@ -1179,7 +1146,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       if (getExpressionParentPrecedence(prefExpression) >=
           TokenClass.RELATIONAL_OPERATOR.precedence) {
@@ -1248,7 +1215,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addDeletion(
           range.startStart(prefixExpression, prefixExpression.operand));
@@ -1273,7 +1240,7 @@
       // prepare type
       DartType type = parameterElement.type;
 
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         // replace parameter
         if (type.isDynamic) {
@@ -1310,7 +1277,7 @@
     await null;
     // find FieldDeclaration
     FieldDeclaration fieldDeclaration =
-        node.getAncestor((x) => x is FieldDeclaration);
+        node.thisOrAncestorOfType<FieldDeclaration>();
     if (fieldDeclaration == null) {
       _coverageMarker();
       return;
@@ -1351,7 +1318,7 @@
       _coverageMarker();
       return;
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       // rename field
       builder.addSimpleReplacement(range.node(nameNode), '_$name');
@@ -1451,7 +1418,7 @@
     } else if (operatorType == TokenType.GT_EQ) {
       newOperator = '<=';
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(leftRange, _getRangeText(rightRange));
       builder.addSimpleReplacement(rightRange, _getRangeText(leftRange));
@@ -1485,7 +1452,7 @@
       }
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       _convertFlutterChildToChildren(namedExp, eol, utils.getNodeText,
           utils.getLinePrefix, utils.getIndent, utils.getText, builder);
@@ -1496,7 +1463,7 @@
 
   Future<void> _addProposal_flutterConvertToStatefulWidget() async {
     ClassDeclaration widgetClass =
-        node.getAncestor((n) => n is ClassDeclaration);
+        node.thisOrAncestorOfType<ClassDeclaration>();
     TypeName superclass = widgetClass?.extendsClause?.superclass;
     if (widgetClass == null || superclass == null) {
       _coverageMarker();
@@ -1633,7 +1600,7 @@
     }
     var stateType = stateClass.type.instantiate([widgetClassElement.type]);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(superclass), (builder) {
         builder.writeType(statefulWidgetClass.type);
@@ -1743,7 +1710,7 @@
       List<Expression> parentElements = parentList.elements;
       int index = parentElements.indexOf(widget);
       if (index != parentElements.length - 1) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           Expression nextWidget = parentElements[index + 1];
           var nextRange = range.node(nextWidget);
@@ -1777,7 +1744,7 @@
       List<Expression> parentElements = parentList.elements;
       int index = parentElements.indexOf(widget);
       if (index > 0) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           Expression previousWidget = parentElements[index - 1];
           var previousRange = range.node(previousWidget);
@@ -1824,7 +1791,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       var firstChild = childrenExpressions.first;
       var lastChild = childrenExpressions.last;
@@ -1852,7 +1819,7 @@
 
     // child: new ThisWidget(child: ourChild)
     // children: [foo, new ThisWidget(child: ourChild), bar]
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       var childExpression = childArgument.expression;
       var childText = utils.getNodeText(childExpression);
@@ -1906,6 +1873,61 @@
         parent, child, DartAssistKind.FLUTTER_SWAP_WITH_PARENT);
   }
 
+  Future<void> _addProposal_flutterWrapStreamBuilder() async {
+    Expression widgetExpr = flutter.identifyWidgetExpression(node);
+    if (widgetExpr == null) {
+      return;
+    }
+    if (flutter.isExactWidgetTypeStreamBuilder(widgetExpr.staticType)) {
+      return;
+    }
+    String widgetSrc = utils.getNodeText(widgetExpr);
+
+    var streamBuilderElement = await sessionHelper.getClass(
+      flutter.WIDGETS_LIBRARY_URI,
+      'StreamBuilder',
+    );
+    if (streamBuilderElement == null) {
+      return;
+    }
+
+    var changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (builder) {
+      builder.addReplacement(range.node(widgetExpr), (builder) {
+        builder.writeType(streamBuilderElement.type);
+        builder.writeln('<Object>(');
+
+        String indentOld = utils.getLinePrefix(widgetExpr.offset);
+        String indentNew1 = indentOld + utils.getIndent(1);
+        String indentNew2 = indentOld + utils.getIndent(2);
+
+        builder.write(indentNew1);
+        builder.writeln('stream: null,');
+
+        builder.write(indentNew1);
+        builder.writeln('builder: (context, snapshot) {');
+
+        widgetSrc = widgetSrc.replaceAll(
+          new RegExp("^$indentOld", multiLine: true),
+          indentNew2,
+        );
+        builder.write(indentNew2);
+        builder.write('return $widgetSrc');
+        builder.writeln(';');
+
+        builder.write(indentNew1);
+        builder.writeln('}');
+
+        builder.write(indentOld);
+        builder.write(')');
+      });
+    });
+    _addAssistFromBuilder(
+      changeBuilder,
+      DartAssistKind.FLUTTER_WRAP_STREAM_BUILDER,
+    );
+  }
+
   Future<void> _addProposal_flutterWrapWidget() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -1963,7 +1985,7 @@
       }
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(widgetExpr), (DartEditBuilder builder) {
         if (parentClassElement == null) {
@@ -2006,7 +2028,7 @@
     await null;
     var selectionRange = new SourceRange(selectionOffset, selectionLength);
     var analyzer = new SelectionAnalyzer(selectionRange);
-    unit.accept(analyzer);
+    context.resolveResult.unit.accept(analyzer);
 
     List<Expression> widgetExpressions = [];
     if (analyzer.hasSelectedNodes) {
@@ -2045,7 +2067,7 @@
         return;
       }
 
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(selectedRange, (DartEditBuilder builder) {
           builder.writeType(parentClassElement.type);
@@ -2095,7 +2117,7 @@
     await null;
     // prepare ImportDirective
     ImportDirective importDirective =
-        node.getAncestor((node) => node is ImportDirective);
+        node.thisOrAncestorOfType<ImportDirective>();
     if (importDirective == null) {
       _coverageMarker();
       return;
@@ -2121,13 +2143,13 @@
         referencedNames.add(element.displayName);
       }
     });
-    unit.accept(visitor);
+    context.resolveResult.unit.accept(visitor);
     // ignore if unused
     if (referencedNames.isEmpty) {
       _coverageMarker();
       return;
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       String showCombinator = ' show ${referencedNames.join(', ')}';
       builder.addSimpleInsertion(importDirective.end - 1, showCombinator);
@@ -2157,7 +2179,7 @@
     String prefix;
     Block targetBlock;
     {
-      Statement statement = node.getAncestor((n) => n is Statement);
+      Statement statement = node.thisOrAncestorOfType<Statement>();
       if (statement is IfStatement && statement.thenStatement is Block) {
         targetBlock = statement.thenStatement;
       } else if (statement is WhileStatement && statement.body is Block) {
@@ -2188,7 +2210,7 @@
         getVariableNameSuggestionsForExpression(castType, null, excluded);
 
     if (suggestions.isNotEmpty) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addInsertion(offset, (DartEditBuilder builder) {
           builder.write(eol + prefix + statementPrefix);
@@ -2227,7 +2249,7 @@
     String thenSource = _getNodeText(thenStatement);
     String elseSource = _getNodeText(elseStatement);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(range.node(condition), invertedCondition);
       builder.addSimpleReplacement(range.node(thenStatement), elseSource);
@@ -2290,7 +2312,7 @@
     String oldSource = utils.getRangeText(lineRanges);
     String newSource = utils.indentSourceLeftRight(oldSource);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(range.node(targetIfStatement),
           'if ($condition) {$eol$newSource$prefix}');
@@ -2356,7 +2378,7 @@
     String oldSource = utils.getRangeText(lineRanges);
     String newSource = utils.indentSourceLeftRight(oldSource);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(range.node(outerIfStatement),
           'if ($condition) {$eol$newSource$prefix}');
@@ -2389,6 +2411,7 @@
       return;
     }
     int declOffset = element.nameOffset;
+    var unit = context.resolveResult.unit;
     AstNode declNode = new NodeLocator(declOffset).searchWithin(unit);
     if (declNode != null &&
         declNode.parent is VariableDeclaration &&
@@ -2432,7 +2455,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(
           range.endStart(declNode, assignExpression.operator), ' ');
@@ -2446,7 +2469,7 @@
     await null;
     // prepare enclosing VariableDeclarationList
     VariableDeclarationList declList =
-        node.getAncestor((node) => node is VariableDeclarationList);
+        node.thisOrAncestorOfType<VariableDeclarationList>();
     if (declList != null && declList.variables.length == 1) {
     } else {
       _coverageMarker();
@@ -2502,7 +2525,7 @@
       return;
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(
           range.endStart(decl.name, assignExpression.operator), ' ');
@@ -2515,7 +2538,7 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     VariableDeclarationList declarationList =
-        node.getAncestor((n) => n is VariableDeclarationList);
+        node.thisOrAncestorOfType<VariableDeclarationList>();
     if (declarationList == null) {
       _coverageMarker();
       return;
@@ -2545,7 +2568,7 @@
       return;
     }
     Token keyword = declarationList.keyword;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       SourceRange typeRange = range.startStart(typeNode, firstVariable);
       if (keyword != null && keyword.lexeme != 'var') {
@@ -2579,7 +2602,7 @@
     String indentArg = '$indentOld${utils.getIndent(1)}';
     String indentList = '$indentOld${utils.getIndent(2)}';
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(node), (DartEditBuilder builder) {
         builder.write('[');
@@ -2611,7 +2634,7 @@
     await null;
     ConditionalExpression conditional = null;
     // may be on Statement with Conditional
-    Statement statement = node.getAncestor((node) => node is Statement);
+    Statement statement = node.thisOrAncestorOfType<Statement>();
     if (statement == null) {
       _coverageMarker();
       return;
@@ -2657,7 +2680,7 @@
     String prefix = utils.getNodePrefix(statement);
 
     if (inVariable || inAssignment || inReturn) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         // Type v = Conditional;
         if (inVariable) {
@@ -2748,7 +2771,7 @@
     }
 
     if (hasReturnStatements || hasExpressionStatements) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         // returns
         if (hasReturnStatements) {
@@ -2801,7 +2824,7 @@
       return;
     }
     // prepare "if"
-    Statement statement = node.getAncestor((node) => node is Statement);
+    Statement statement = node.thisOrAncestorOfType<Statement>();
     if (statement is! IfStatement) {
       _coverageMarker();
       return;
@@ -2834,7 +2857,7 @@
       rightConditionSource = _getRangeText(rightConditionRange);
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       // remove "&& rightCondition"
       builder
@@ -2874,40 +2897,48 @@
   }
 
   Future<void> _addProposal_splitVariableDeclaration() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    // prepare DartVariableStatement, should be part of Block
-    VariableDeclarationStatement statement =
-        node.getAncestor((node) => node is VariableDeclarationStatement);
-    if (statement != null && statement.parent is Block) {
-    } else {
-      _coverageMarker();
+    var variableList = node?.thisOrAncestorOfType<VariableDeclarationList>();
+
+    // Must be a local variable declaration.
+    if (variableList?.parent is! VariableDeclarationStatement) {
       return;
     }
-    // check that statement declares single variable
-    List<VariableDeclaration> variables = statement.variables.variables;
+    VariableDeclarationStatement statement = variableList.parent;
+
+    // Cannot be `const` or `final`.
+    var keywordKind = variableList.keyword?.keyword;
+    if (keywordKind == Keyword.CONST || keywordKind == Keyword.FINAL) {
+      return;
+    }
+
+    var variables = variableList.variables;
     if (variables.length != 1) {
-      _coverageMarker();
       return;
     }
-    VariableDeclaration variable = variables[0];
-    // prepare initializer
-    Expression initializer = variable.initializer;
-    if (initializer == null) {
-      _coverageMarker();
+
+    // The caret must be between the type and the variable name.
+    var variable = variables[0];
+    if (!range.startEnd(statement, variable.name).contains(selectionOffset)) {
       return;
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
-    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-      // remove initializer value
-      builder.addDeletion(range.endStart(variable.name, statement.semicolon));
-      // add assignment statement
-      String indent = utils.getNodePrefix(statement);
-      String name = variable.name.name;
-      String initSrc = _getNodeText(initializer);
-      SourceRange assignRange = range.endLength(statement, 0);
-      builder.addSimpleReplacement(
-          assignRange, eol + indent + name + ' = ' + initSrc + ';');
+
+    // The variable must have an initializer.
+    if (variable.initializer == null) {
+      return;
+    }
+
+    var changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (builder) {
+      if (variableList.type == null) {
+        builder.addReplacement(range.token(variableList.keyword), (builder) {
+          var type = variable.declaredElement.type;
+          builder.writeType(type);
+        });
+      }
+
+      var indent = utils.getNodePrefix(statement);
+      var name = variable.name.name;
+      builder.addSimpleInsertion(variable.name.end, ';' + eol + indent + name);
     });
     _addAssistFromBuilder(
         changeBuilder, DartAssistKind.SPLIT_VARIABLE_DECLARATION);
@@ -2920,8 +2951,9 @@
     List<Statement> selectedStatements;
     {
       StatementAnalyzer selectionAnalyzer = new StatementAnalyzer(
-          unit, new SourceRange(selectionOffset, selectionLength));
-      unit.accept(selectionAnalyzer);
+          context.resolveResult,
+          new SourceRange(selectionOffset, selectionLength));
+      selectionAnalyzer.analyze();
       List<AstNode> selectedNodes = selectionAnalyzer.selectedNodes;
       // convert nodes to statements
       selectedStatements = [];
@@ -2947,7 +2979,7 @@
         utils.replaceSourceRangeIndent(statementsRange, indentOld, indentNew);
     // "block"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addSimpleInsertion(statementsRange.offset, '$indentOld{$eol');
         builder.addSimpleReplacement(
@@ -2960,7 +2992,7 @@
     }
     // "if"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(statementsRange, (DartEditBuilder builder) {
           builder.write(indentOld);
@@ -2979,7 +3011,7 @@
     }
     // "while"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(statementsRange, (DartEditBuilder builder) {
           builder.write(indentOld);
@@ -2998,7 +3030,7 @@
     }
     // "for-in"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(statementsRange, (DartEditBuilder builder) {
           builder.write(indentOld);
@@ -3019,7 +3051,7 @@
     }
     // "for"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(statementsRange, (DartEditBuilder builder) {
           builder.write(indentOld);
@@ -3044,7 +3076,7 @@
     }
     // "do-while"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(statementsRange, (DartEditBuilder builder) {
           builder.write(indentOld);
@@ -3064,7 +3096,7 @@
     }
     // "try-catch"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(statementsRange, (DartEditBuilder builder) {
           builder.write(indentOld);
@@ -3094,7 +3126,7 @@
     }
     // "try-finally"
     {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(statementsRange, (DartEditBuilder builder) {
           builder.write(indentOld);
@@ -3149,7 +3181,7 @@
     utils.targetClassElement = null;
     if (target is AstNode) {
       ClassDeclaration targetClassDeclaration =
-          target.getAncestor((node) => node is ClassDeclaration);
+          target.thisOrAncestorOfType<ClassDeclaration>();
       if (targetClassDeclaration != null) {
         utils.targetClassElement = targetClassDeclaration.declaredElement;
       }
@@ -3220,7 +3252,7 @@
       replacement = '$functionName = $returnType Function$parameters';
     }
     // add change
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(
           range.startStart(node.typedefKeyword.next, node.semicolon),
@@ -3251,7 +3283,7 @@
       replacement = '$returnType Function$parameters $functionName';
     }
     // add change
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(range.node(node), replacement);
     });
@@ -3271,7 +3303,7 @@
         int quoteLength = literal.isMultiline ? 3 : 1;
         String lexeme = literal.literal.lexeme;
         if (lexeme.indexOf(newQuote) < 0) {
-          DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+          var changeBuilder = _newDartChangeBuilder();
           await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
             builder.addSimpleReplacement(
                 new SourceRange(
@@ -3301,7 +3333,7 @@
             }
           }
         }
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleReplacement(
               new SourceRange(
@@ -3329,14 +3361,13 @@
     return utils.getRangeText(range);
   }
 
-  bool _setupCompute() {
-    try {
-      utils = new CorrectionUtils(unit);
-    } catch (e) {
-      throw new CancelCorrectionException(exception: e);
-    }
+  DartChangeBuilder _newDartChangeBuilder() {
+    return new DartChangeBuilderImpl.forWorkspace(context.workspace);
+  }
 
-    node = new NodeLocator(selectionOffset, selectionEnd).searchWithin(unit);
+  bool _setupCompute() {
+    var locator = new NodeLocator(selectionOffset, selectionEnd);
+    node = locator.searchWithin(context.resolveResult.unit);
     return node != null;
   }
 
@@ -3350,7 +3381,7 @@
       return;
     }
 
-    var changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (builder) {
       builder.addReplacement(range.node(parent), (builder) {
         var childArgs = child.argumentList;
diff --git a/pkg/analysis_server/lib/src/services/correction/change_workspace.dart b/pkg/analysis_server/lib/src/services/correction/change_workspace.dart
new file mode 100644
index 0000000..b7a2a23
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/change_workspace.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
+
+/// [ChangeWorkspace] based on sessions.
+class DartChangeWorkspace implements ChangeWorkspace {
+  final List<AnalysisSession> sessions;
+
+  DartChangeWorkspace(this.sessions);
+
+  @override
+  bool containsFile(String path) {
+    for (var session in sessions) {
+      if (session.analysisContext.contextRoot.isAnalyzed(path)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
+  AnalysisSession getSession(String path) {
+    for (var session in sessions) {
+      if (session.analysisContext.contextRoot.isAnalyzed(path)) {
+        return session;
+      }
+    }
+    throw StateError('Not in a context root: $path');
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index 21765cf..29c0b2f 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -2,13 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/parser.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
 /**
@@ -56,13 +56,10 @@
     errorCode == HintCode.DIVISION_OPTIMIZATION ||
     errorCode == HintCode.TYPE_CHECK_IS_NOT_NULL ||
     errorCode == HintCode.TYPE_CHECK_IS_NULL ||
-    errorCode == HintCode.UNDEFINED_GETTER ||
-    errorCode == HintCode.UNDEFINED_SETTER ||
     errorCode == HintCode.UNNECESSARY_CAST ||
     errorCode == HintCode.UNUSED_CATCH_CLAUSE ||
     errorCode == HintCode.UNUSED_CATCH_STACK ||
     errorCode == HintCode.UNUSED_IMPORT ||
-    errorCode == HintCode.UNDEFINED_METHOD ||
     errorCode == ParserErrorCode.EXPECTED_TOKEN ||
     errorCode == ParserErrorCode.GETTER_WITH_PARAMETERS ||
     errorCode == ParserErrorCode.VAR_AS_TYPE_NAME ||
@@ -86,6 +83,22 @@
             errorCode.name == LintNames.unnecessary_this));
 
 /**
+ * The implementation of [DartFixContext].
+ */
+class DartFixContextImpl implements DartFixContext {
+  @override
+  final ChangeWorkspace workspace;
+
+  @override
+  final ResolvedUnitResult resolveResult;
+
+  @override
+  final AnalysisError error;
+
+  DartFixContextImpl(this.workspace, this.resolveResult, this.error);
+}
+
+/**
  * An enumeration of possible quick fix kinds.
  */
 class DartFixKind {
@@ -96,20 +109,22 @@
       appliedTogetherMessage: "Add all casts in file");
   static const ADD_FIELD_FORMAL_PARAMETERS = const FixKind(
       'ADD_FIELD_FORMAL_PARAMETERS', 70, "Add final field formal parameters");
+  static const ADD_MISSING_PARAMETER_NAMED = const FixKind(
+      'ADD_MISSING_PARAMETER_NAMED', 70, "Add named parameter '{0}'");
   static const ADD_MISSING_PARAMETER_POSITIONAL = const FixKind(
       'ADD_MISSING_PARAMETER_POSITIONAL',
       69,
       "Add optional positional parameter");
-  static const ADD_MISSING_PARAMETER_NAMED = const FixKind(
-      'ADD_MISSING_PARAMETER_NAMED', 70, "Add named parameter '{0}'");
   static const ADD_MISSING_PARAMETER_REQUIRED = const FixKind(
       'ADD_MISSING_PARAMETER_REQUIRED', 70, "Add required parameter");
   static const ADD_MISSING_REQUIRED_ARGUMENT = const FixKind(
       'ADD_MISSING_REQUIRED_ARGUMENT', 70, "Add required argument '{0}'");
   static const ADD_NE_NULL = const FixKind('ADD_NE_NULL', 50, "Add != null",
       appliedTogetherMessage: "Add != null everywhere in file");
-  static const ADD_PACKAGE_DEPENDENCY = const FixKind(
-      'ADD_PACKAGE_DEPENDENCY', 50, "Add dependency on package '{0}'");
+  static const ADD_OVERRIDE =
+      const FixKind('ADD_OVERRIDE', 50, "Add '@override' annotation");
+  static const ADD_REQUIRED =
+      const FixKind('ADD_REQUIRED', 50, "Add '@required' annotation");
   static const ADD_STATIC =
       const FixKind('ADD_STATIC', 50, "Add 'static' modifier");
   static const ADD_SUPER_CONSTRUCTOR_INVOCATION = const FixKind(
@@ -129,6 +144,8 @@
       const FixKind('CONVERT_FLUTTER_CHILD', 50, "Convert to children:");
   static const CONVERT_FLUTTER_CHILDREN =
       const FixKind('CONVERT_FLUTTER_CHILDREN', 50, "Convert to child:");
+  static const CONVERT_TO_NAMED_ARGUMENTS = const FixKind(
+      'CONVERT_TO_NAMED_ARGUMENTS', 50, "Convert to named arguments");
   static const CREATE_CLASS =
       const FixKind('CREATE_CLASS', 50, "Create class '{0}'");
   static const CREATE_CONSTRUCTOR =
@@ -157,8 +174,10 @@
       const FixKind('CREATE_MIXIN', 50, "Create mixin '{0}'");
   static const CREATE_NO_SUCH_METHOD = const FixKind(
       'CREATE_NO_SUCH_METHOD', 49, "Create 'noSuchMethod' method");
-  static const CONVERT_TO_NAMED_ARGUMENTS = const FixKind(
-      'CONVERT_TO_NAMED_ARGUMENTS', 50, "Convert to named arguments");
+  static const EXTEND_CLASS_FOR_MIXIN =
+      const FixKind('EXTEND_CLASS_FOR_MIXIN', 50, "Extend the class '{0}'");
+  static const IMPORT_ASYNC =
+      const FixKind('IMPORT_ASYNC', 49, "Import 'dart:async'");
   static const IMPORT_LIBRARY_PREFIX = const FixKind('IMPORT_LIBRARY_PREFIX',
       49, "Use imported library '{0}' with prefix '{1}'");
   static const IMPORT_LIBRARY_PROJECT1 =
@@ -173,28 +192,18 @@
       const FixKind('IMPORT_LIBRARY_SHOW', 55, "Update library '{0}' import");
   static const INSERT_SEMICOLON =
       const FixKind('INSERT_SEMICOLON', 50, "Insert ';'");
-  static const INVOKE_CONSTRUCTOR_USING_NEW = const FixKind(
-      'INVOKE_CONSTRUCTOR_USING_NEW', 50, "Invoke constructor using 'new'");
-  static const LINT_ADD_OVERRIDE =
-      const FixKind('LINT_ADD_OVERRIDE', 50, "Add '@override' annotation");
-  static const LINT_ADD_REQUIRED =
-      const FixKind('LINT_ADD_REQUIRED', 50, "Add '@required' annotation");
-  static const LINT_REMOVE_INTERPOLATION_BRACES = const FixKind(
-      'LINT_REMOVE_INTERPOLATION_BRACES',
-      50,
-      "Remove unnecessary interpolation braces");
   static const MAKE_CLASS_ABSTRACT =
       const FixKind('MAKE_CLASS_ABSTRACT', 50, "Make class '{0}' abstract");
+  static const MAKE_FIELD_NOT_FINAL =
+      const FixKind('MAKE_FIELD_NOT_FINAL', 50, "Make field '{0}' not final");
+  static const MAKE_FINAL = const FixKind('MAKE_FINAL', 50, "Make final");
   static const MOVE_TYPE_ARGUMENTS_TO_CLASS = const FixKind(
       'MOVE_TYPE_ARGUMENTS_TO_CLASS',
       50,
       "Move type arguments to after class name");
+  static const REMOVE_AWAIT = const FixKind('REMOVE_AWAIT', 50, "Remove await");
   static const REMOVE_DEAD_CODE =
       const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code");
-  static const MAKE_FIELD_NOT_FINAL =
-      const FixKind('MAKE_FIELD_NOT_FINAL', 50, "Make field '{0}' not final");
-  static const MAKE_FINAL = const FixKind('MAKE_FINAL', 50, "Make final");
-  static const REMOVE_AWAIT = const FixKind('REMOVE_AWAIT', 50, "Remove await");
   static const REMOVE_EMPTY_CATCH =
       const FixKind('REMOVE_EMPTY_CATCH', 50, "Remove empty catch clause");
   static const REMOVE_EMPTY_CONSTRUCTOR_BODY = const FixKind(
@@ -205,6 +214,10 @@
       const FixKind('REMOVE_EMPTY_STATEMENT', 50, "Remove empty statement");
   static const REMOVE_INITIALIZER =
       const FixKind('REMOVE_INITIALIZER', 50, "Remove initializer");
+  static const REMOVE_INTERPOLATION_BRACES = const FixKind(
+      'REMOVE_INTERPOLATION_BRACES',
+      50,
+      "Remove unnecessary interpolation braces");
   static const REMOVE_METHOD_DECLARATION = const FixKind(
       'REMOVE_METHOD_DECLARATION', 50, "Remove method declaration");
   static const REMOVE_PARAMETERS_IN_GETTER_DECLARATION = const FixKind(
@@ -217,10 +230,10 @@
       "Remove parentheses in getter invocation");
   static const REMOVE_THIS_EXPRESSION =
       const FixKind('REMOVE_THIS_EXPRESSION', 50, "Remove this expression");
+  static const REMOVE_TYPE_ANNOTATION =
+      const FixKind('REMOVE_TYPE_ANNOTATION', 50, "Remove type annotation");
   static const REMOVE_TYPE_ARGUMENTS =
       const FixKind('REMOVE_TYPE_ARGUMENTS', 49, "Remove type arguments");
-  static const REMOVE_TYPE_NAME =
-      const FixKind('REMOVE_TYPE_NAME', 50, "Remove type name");
   static const REMOVE_UNNECESSARY_CAST = const FixKind(
       'REMOVE_UNNECESSARY_CAST', 50, "Remove unnecessary cast",
       appliedTogetherMessage: "Remove all unnecessary casts in file");
@@ -238,12 +251,12 @@
       appliedTogetherMessage: "Replace all 'boolean' with 'bool' in file");
   static const REPLACE_FINAL_WITH_CONST = const FixKind(
       'REPLACE_FINAL_WITH_CONST', 50, "Replace 'final' with 'const'");
-  static const REPLACE_VAR_WITH_DYNAMIC = const FixKind(
-      'REPLACE_VAR_WITH_DYNAMIC', 50, "Replace 'var' with 'dynamic'");
   static const REPLACE_RETURN_TYPE_FUTURE = const FixKind(
       'REPLACE_RETURN_TYPE_FUTURE',
       50,
       "Return 'Future' from 'async' function");
+  static const REPLACE_VAR_WITH_DYNAMIC = const FixKind(
+      'REPLACE_VAR_WITH_DYNAMIC', 50, "Replace 'var' with 'dynamic'");
   static const REPLACE_WITH_BRACKETS =
       const FixKind('REPLACE_WITH_BRACKETS', 50, "Replace with { }");
   static const REPLACE_WITH_CONDITIONAL_ASSIGNMENT = const FixKind(
@@ -258,6 +271,8 @@
       "Replace the '.' with a '?.' in the invocation");
   static const REPLACE_WITH_TEAR_OFF = const FixKind(
       'REPLACE_WITH_TEAR_OFF', 50, "Replace function literal with tear-off");
+  static const UPDATE_SDK_CONSTRAINTS =
+      const FixKind('UPDATE_SDK_CONSTRAINTS', 50, "Update the SDK constraints");
   static const USE_CONST = const FixKind('USE_CONST', 50, "Change to constant");
   static const USE_EFFECTIVE_INTEGER_DIVISION = const FixKind(
       'USE_EFFECTIVE_INTEGER_DIVISION',
@@ -274,29 +289,3 @@
       appliedTogetherMessage:
           "Use != null instead of 'is! Null' everywhere in file");
 }
-
-/**
- * The implementation of [FixContext].
- */
-class FixContextImpl implements FixContext {
-  @override
-  final ResourceProvider resourceProvider;
-
-  @override
-  final AnalysisDriver analysisDriver;
-
-  @override
-  final AnalysisError error;
-
-  @override
-  final List<AnalysisError> errors;
-
-  FixContextImpl(
-      this.resourceProvider, this.analysisDriver, this.error, this.errors);
-
-  FixContextImpl.from(FixContext other)
-      : resourceProvider = other.resourceProvider,
-        analysisDriver = other.analysisDriver,
-        error = other.error,
-        errors = other.errors;
-}
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 db40113..ebbf645 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -23,16 +23,12 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/context_root.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -44,9 +40,12 @@
 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/hint/sdk_constraint_extractor.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     hide AnalysisError, Element, ElementKind;
+import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/src/utilities/string_utilities.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart' hide FixContributor;
 import 'package:analyzer_plugin/utilities/range_factory.dart';
@@ -58,30 +57,11 @@
 typedef bool ElementPredicate(Element argument);
 
 /**
- * The implementation of [DartFixContext].
- *
- * Clients may not extend, implement or mix-in this class.
+ * A fix contributor that provides the default set of fixes for Dart files.
  */
-class DartFixContextImpl extends FixContextImpl implements DartFixContext {
+class DartFixContributor implements FixContributor {
   @override
-  final AstProvider astProvider;
-
-  @override
-  final CompilationUnit unit;
-
-  DartFixContextImpl(FixContext fixContext, this.astProvider, this.unit)
-      : super.from(fixContext);
-
-  GetTopLevelDeclarations get getTopLevelDeclarations =>
-      analysisDriver.getTopLevelNameDeclarations;
-}
-
-/**
- * A [FixContributor] that provides the default set of fixes.
- */
-class DefaultFixContributor extends DartFixContributor {
-  @override
-  Future<List<Fix>> internalComputeFixes(DartFixContext context) async {
+  Future<List<Fix>> computeFixes(DartFixContext context) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     try {
@@ -98,8 +78,8 @@
       DartFixContext context, List<Fix> fixes) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    final AnalysisError analysisError = context.error;
-    final List<AnalysisError> allAnalysisErrors = context.errors;
+    final analysisError = context.error;
+    final allAnalysisErrors = context.resolveResult.errors.toList();
 
     // Validate inputs:
     // - return if no fixes
@@ -123,14 +103,9 @@
     // one.
     // For each fix, put the fix into the HashMap.
     for (int i = 0; i < allAnalysisErrors.length; i++) {
-      final FixContext fixContextI = new FixContextImpl(
-          context.resourceProvider,
-          context.analysisDriver,
-          allAnalysisErrors[i],
-          allAnalysisErrors);
-      final DartFixContextImpl dartFixContextI = new DartFixContextImpl(
-          fixContextI, context.astProvider, context.unit);
-      final FixProcessor processorI = new FixProcessor(dartFixContextI);
+      final FixContext fixContextI = new DartFixContextImpl(
+          context.workspace, context.resolveResult, allAnalysisErrors[i]);
+      final FixProcessor processorI = new FixProcessor(fixContextI);
       final List<Fix> fixesListI = await processorI.compute();
       for (Fix f in fixesListI) {
         if (!map.containsKey(f.kind)) {
@@ -188,70 +163,40 @@
 class FixProcessor {
   static const int MAX_LEVENSHTEIN_DISTANCE = 3;
 
-  ResourceProvider resourceProvider;
-  AstProvider astProvider;
-  GetTopLevelDeclarations getTopLevelDeclarations;
-  CompilationUnit unit;
-  AnalysisError error;
+  final DartFixContext context;
+  final ResourceProvider resourceProvider;
+  final AnalysisSession session;
+  final AnalysisSessionHelper sessionHelper;
+  final TypeProvider typeProvider;
+  final TypeSystem typeSystem;
 
-  /**
-   * The analysis driver being used to perform analysis.
-   */
-  AnalysisDriver driver;
+  final String file;
+  final LibraryElement unitLibraryElement;
+  final CompilationUnit unit;
+  final CorrectionUtils utils;
 
-  /**
-   * The analysis session to be used to create the change builder.
-   */
-  AnalysisSession session;
-
-  /**
-   * The helper wrapper around the [session].
-   */
-  AnalysisSessionHelper sessionHelper;
-
-  String file;
-  CompilationUnitElement unitElement;
-  Source unitSource;
-  LibraryElement unitLibraryElement;
-  File unitLibraryFile;
-  Folder unitLibraryFolder;
+  final AnalysisError error;
+  final int errorOffset;
+  final int errorLength;
 
   final List<Fix> fixes = <Fix>[];
 
-  CorrectionUtils utils;
-  int errorOffset;
-  int errorLength;
-  int errorEnd;
-  SourceRange errorRange;
   AstNode node;
   AstNode coveredNode;
 
-  TypeProvider _typeProvider;
-  TypeSystem _typeSystem;
-
-  FixProcessor(DartFixContext dartContext) {
-    resourceProvider = dartContext.resourceProvider;
-    astProvider = dartContext.astProvider;
-    getTopLevelDeclarations = dartContext.getTopLevelDeclarations;
-
-    driver = dartContext.analysisDriver;
-    session = driver.currentSession;
-    sessionHelper = new AnalysisSessionHelper(session);
-
-    // unit
-    unit = dartContext.unit;
-    unitElement = unit.declaredElement;
-    unitSource = unitElement.source;
-    // file
-    file = unitSource.fullName;
-    // library
-    unitLibraryElement = unitElement.library;
-    String unitLibraryPath = unitLibraryElement.source.fullName;
-    unitLibraryFile = resourceProvider.getFile(unitLibraryPath);
-    unitLibraryFolder = unitLibraryFile.parent;
-    // error
-    error = dartContext.error;
-  }
+  FixProcessor(this.context)
+      : resourceProvider = context.resolveResult.session.resourceProvider,
+        session = context.resolveResult.session,
+        sessionHelper = AnalysisSessionHelper(context.resolveResult.session),
+        typeProvider = context.resolveResult.typeProvider,
+        typeSystem = context.resolveResult.typeSystem,
+        file = context.resolveResult.path,
+        unitLibraryElement = context.resolveResult.libraryElement,
+        unit = context.resolveResult.unit,
+        utils = CorrectionUtils(context.resolveResult),
+        error = context.error,
+        errorOffset = context.error.offset,
+        errorLength = context.error.length;
 
   DartType get coreTypeBool => _getCoreType('bool');
 
@@ -260,36 +205,13 @@
    */
   String get eol => utils.endOfLine;
 
-  TypeProvider get typeProvider {
-    if (_typeProvider == null) {
-      _typeProvider = unitElement.context.typeProvider;
-    }
-    return _typeProvider;
-  }
-
-  TypeSystem get typeSystem {
-    if (_typeSystem == null) {
-      _typeSystem = new StrongTypeSystemImpl(typeProvider);
-    }
-    return _typeSystem;
-  }
-
   Future<List<Fix>> compute() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    try {
-      utils = new CorrectionUtils(unit);
-    } catch (e) {
-      throw new CancelCorrectionException(exception: e);
-    }
 
-    errorOffset = error.offset;
-    errorLength = error.length;
-    errorEnd = errorOffset + errorLength;
-    errorRange = new SourceRange(errorOffset, errorLength);
     node = new NodeLocator2(errorOffset).searchWithin(unit);
-    coveredNode =
-        new NodeLocator2(errorOffset, errorEnd - 1).searchWithin(unit);
+    coveredNode = new NodeLocator2(errorOffset, errorOffset + errorLength - 1)
+        .searchWithin(unit);
     if (coveredNode == null) {
       // TODO(brianwilkerson) Figure out why the coveredNode is sometimes null.
       return fixes;
@@ -369,15 +291,6 @@
     if (errorCode == HintCode.TYPE_CHECK_IS_NULL) {
       await _addFix_isNull();
     }
-    if (errorCode == HintCode.UNDEFINED_GETTER) {
-      await _addFix_undefinedClassAccessor_useSimilar();
-      await _addFix_createField();
-      await _addFix_createGetter();
-    }
-    if (errorCode == HintCode.UNDEFINED_SETTER) {
-      await _addFix_undefinedClassAccessor_useSimilar();
-      await _addFix_createField();
-    }
     if (errorCode == HintCode.UNNECESSARY_CAST) {
       await _addFix_removeUnnecessaryCast();
     }
@@ -481,9 +394,6 @@
         errorCode == StaticWarningCode.UNDEFINED_NAMED_PARAMETER) {
       await _addFix_addMissingNamedArgument();
     }
-    if (errorCode == StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR) {
-      await _addFix_undefinedMethodWithContructor();
-    }
     if (errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE) {
       await _addFix_illegalAsyncReturnType();
     }
@@ -526,8 +436,7 @@
       await _addFix_importLibrary_withTopLevelVariable();
       await _addFix_importLibrary_withType();
     }
-    if (errorCode == HintCode.UNDEFINED_METHOD ||
-        errorCode == StaticTypeWarningCode.UNDEFINED_METHOD) {
+    if (errorCode == StaticTypeWarningCode.UNDEFINED_METHOD) {
       await _addFix_createClass();
       await _addFix_importLibrary_withFunction();
       await _addFix_importLibrary_withType();
@@ -556,6 +465,14 @@
       await _addFix_moveTypeArgumentsToClass();
       await _addFix_removeTypeArguments();
     }
+    if (errorCode ==
+        CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE) {
+      await _addFix_extendClassForMixin();
+    }
+    if (errorCode == HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE) {
+      await _addFix_importAsync();
+      await _addFix_updateSdkConstraints();
+    }
     // lints
     if (errorCode is LintCode) {
       String name = errorCode.name;
@@ -642,10 +559,10 @@
   Future<void> _addFix_addAsync() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    FunctionBody body = node.getAncestor((n) => n is FunctionBody);
+    FunctionBody body = node.thisOrAncestorOfType<FunctionBody>();
     if (body != null && body.keyword == null) {
       TypeProvider typeProvider = this.typeProvider;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.convertFunctionFromSyncToAsync(body, typeProvider);
       });
@@ -698,7 +615,7 @@
         // `cast` invocation.
         return;
       }
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         if (needsParentheses) {
           builder.addSimpleInsertion(target.offset, '(');
@@ -719,7 +636,7 @@
         // `cast` invocation.
         return;
       }
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         if (needsParentheses) {
           builder.addSimpleInsertion(target.offset, '(');
@@ -737,7 +654,7 @@
       });
       _addFixFromBuilder(changeBuilder, DartFixKind.ADD_EXPLICIT_CAST);
     } else {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         if (needsParentheses) {
           builder.addSimpleInsertion(target.offset, '(');
@@ -777,7 +694,7 @@
     AstNode argumentList = namedExpression.parent;
 
     // Prepare the invoked element.
-    var context = new _ExecutableParameters(astProvider, argumentList.parent);
+    var context = new _ExecutableParameters(sessionHelper, argumentList.parent);
     if (context == null) {
       return;
     }
@@ -791,7 +708,7 @@
       // TODO(brianwilkerson) Determine whether this await is necessary.
       await null;
       if (offset != null) {
-        var changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(context.file, (builder) {
           builder.addInsertion(offset, (builder) {
             builder.write(prefix);
@@ -829,7 +746,7 @@
     List<Expression> arguments = argumentList.arguments;
 
     // Prepare the invoked element.
-    var context = new _ExecutableParameters(astProvider, node.parent);
+    var context = new _ExecutableParameters(sessionHelper, node.parent);
     if (context == null) {
       return;
     }
@@ -846,7 +763,7 @@
       // TODO(brianwilkerson) Determine whether this await is necessary.
       await null;
       if (offset != null) {
-        var changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(context.file, (builder) {
           builder.addInsertion(offset, (builder) {
             builder.write(prefix);
@@ -902,7 +819,7 @@
         argumentList = invocation.argumentList;
       } else {
         creation =
-            invocation.getAncestor((p) => p is InstanceCreationExpression);
+            invocation.thisOrAncestorOfType<InstanceCreationExpression>();
         if (creation != null) {
           targetElement = creation.staticElement;
           argumentList = creation.argumentList;
@@ -936,7 +853,7 @@
         hasTrailingComma = lastArgument.endToken.next.type == TokenType.COMMA;
       }
 
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addInsertion(offset, (DartEditBuilder builder) {
           if (arguments.isNotEmpty) {
@@ -960,7 +877,7 @@
   Future<void> _addFix_addOverrideAnnotation() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    ClassMember member = node.getAncestor((n) => n is ClassMember);
+    ClassMember member = node.thisOrAncestorOfType<ClassMember>();
     if (member == null) {
       return;
     }
@@ -975,31 +892,31 @@
 
     Position exitPosition = new Position(file, token.offset - 1);
     String indent = utils.getIndent(1);
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(
           range.startLength(token, 0), '@override$eol$indent');
     });
     changeBuilder.setSelection(exitPosition);
-    _addFixFromBuilder(changeBuilder, DartFixKind.LINT_ADD_OVERRIDE);
+    _addFixFromBuilder(changeBuilder, DartFixKind.ADD_OVERRIDE);
   }
 
   Future<void> _addFix_addRequiredAnnotation() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleInsertion(node.parent.offset, '@required ');
     });
-    _addFixFromBuilder(changeBuilder, DartFixKind.LINT_ADD_REQUIRED);
+    _addFixFromBuilder(changeBuilder, DartFixKind.ADD_REQUIRED);
   }
 
   Future<void> _addFix_addStatic() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     FieldDeclaration declaration =
-        node.getAncestor((n) => n is FieldDeclaration);
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        node.thisOrAncestorOfType<FieldDeclaration>();
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleInsertion(declaration.offset, 'static ');
     });
@@ -1009,7 +926,7 @@
   Future<void> _addFix_boolInsteadOfBoolean() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(range.error(error), 'bool');
     });
@@ -1021,7 +938,7 @@
     await null;
     AstNode node = coveredNode;
     if (node is Expression) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         AstNode parent = node.parent;
         while (parent != null) {
@@ -1047,7 +964,7 @@
     String correction = lexeme.toLowerCase().contains('x')
         ? '0x${precise.toRadixString(16).toUpperCase()}'
         : precise.toString();
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(range.node(integer), correction);
     });
@@ -1070,7 +987,7 @@
           Expression initializer = coveredNode;
           DartType newType = initializer.staticType;
           if (newType is InterfaceType || newType is FunctionType) {
-            DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+            var changeBuilder = _newDartChangeBuilder();
             await changeBuilder.addFileEdit(file,
                 (DartFileEditBuilder builder) {
               builder.addReplacement(range.node(typeNode),
@@ -1100,7 +1017,7 @@
     // child: widget
     Expression expression = named.expression;
     if (flutter.isWidgetExpression(expression)) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         flutter.convertChildToChildren2(
             builder,
@@ -1120,7 +1037,7 @@
     // child: [widget1, widget2]
     if (expression is ListLiteral &&
         expression.elements.every(flutter.isWidgetExpression)) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addSimpleReplacement(range.node(named.name), 'children:');
         if (expression.typeArguments == null) {
@@ -1148,7 +1065,7 @@
           String indentNew = utils.getLinePrefix(named.offset);
           widgetText = _replaceSourceIndent(widgetText, indentOld, indentNew);
 
-          var builder = new DartChangeBuilder(session);
+          var builder = _newDartChangeBuilder();
           await builder.addFileEdit(file, (builder) {
             builder.addReplacement(range.node(named), (builder) {
               builder.write('child: ');
@@ -1220,7 +1137,7 @@
         return;
       }
 
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         for (var argument in argumentToParameter.keys) {
           var parameter = argumentToParameter[argument];
@@ -1265,9 +1182,10 @@
     int offset = -1;
     String filePath;
     if (prefixElement == null) {
-      targetUnit = unitElement;
-      CompilationUnitMember enclosingMember = node.getAncestor((node) =>
-          node is CompilationUnitMember && node.parent is CompilationUnit);
+      targetUnit = unit.declaredElement;
+      CompilationUnitMember enclosingMember = node.thisOrAncestorMatching(
+          (node) =>
+              node is CompilationUnitMember && node.parent is CompilationUnit);
       if (enclosingMember == null) {
         return;
       }
@@ -1298,7 +1216,7 @@
     if (offset < 0) {
       return;
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(filePath, (DartFileEditBuilder builder) {
       builder.addInsertion(offset, (DartEditBuilder builder) {
         builder.write(prefix);
@@ -1324,7 +1242,7 @@
     }
 
     ClassDeclaration classDeclaration =
-        node.getAncestor((node) => node is ClassDeclaration);
+        node.thisOrAncestorOfType<ClassDeclaration>();
     if (classDeclaration == null) {
       return;
     }
@@ -1347,7 +1265,7 @@
     ClassMemberLocation targetLocation =
         utils.prepareNewConstructorLocation(classDeclaration);
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     if (flutter.isExactlyStatelessWidgetType(superType) ||
         flutter.isExactlyStatefulWidgetType(superType)) {
       // Specialize for Flutter widgets.
@@ -1418,15 +1336,15 @@
     }
     ClassElement targetElement = constructorElement.enclosingElement;
     // prepare location for a new constructor
-    AstNode targetTypeNode = getParsedClassElementNode(targetElement);
-    if (targetTypeNode is! ClassDeclaration) {
+    var targetNode = await _getClassDeclaration(targetElement);
+    if (targetNode == null) {
       return;
     }
     ClassMemberLocation targetLocation =
-        utils.prepareNewConstructorLocation(targetTypeNode);
+        utils.prepareNewConstructorLocation(targetNode);
     Source targetSource = targetElement.source;
     String targetFile = targetSource.fullName;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
       builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
         builder.write(targetLocation.prefix);
@@ -1474,14 +1392,14 @@
     }
     // prepare location for a new constructor
     ClassElement targetElement = targetType.element as ClassElement;
-    AstNode targetTypeNode = getParsedClassElementNode(targetElement);
-    if (targetTypeNode is! ClassDeclaration) {
+    var targetNode = await _getClassDeclaration(targetElement);
+    if (targetNode == null) {
       return;
     }
     ClassMemberLocation targetLocation =
-        utils.prepareNewConstructorLocation(targetTypeNode);
+        utils.prepareNewConstructorLocation(targetNode);
     String targetFile = targetElement.source.fullName;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
         builder.write(targetLocation.prefix);
@@ -1533,7 +1451,7 @@
         prefix = ', ';
       }
       String proposalName = _getConstructorProposalName(superConstructor);
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addInsertion(insertOffset, (DartEditBuilder builder) {
           builder.write(prefix);
@@ -1574,7 +1492,7 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     ClassDeclaration targetClassNode =
-        node.getAncestor((parent) => parent is ClassDeclaration);
+        node.thisOrAncestorOfType<ClassDeclaration>();
     ClassElement targetClassElement = targetClassNode.declaredElement;
     InterfaceType superType = targetClassElement.supertype;
     String targetClassName = targetClassElement.name;
@@ -1594,7 +1512,7 @@
       ClassMemberLocation targetLocation =
           utils.prepareNewConstructorLocation(targetClassNode);
       String proposalName = _getConstructorProposalName(superConstructor);
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
           void writeParameters(bool includeType) {
@@ -1689,18 +1607,20 @@
     }
     utils.targetClassElement = targetClassElement;
     // prepare target ClassDeclaration
-    AstNode targetTypeNode = getParsedClassElementNode(targetClassElement);
-    if (targetTypeNode is! ClassDeclaration) {
+    var targetDeclarationResult =
+        await sessionHelper.getElementDeclaration(targetClassElement);
+    if (targetDeclarationResult.node is! ClassOrMixinDeclaration) {
       return;
     }
-    ClassDeclaration targetClassNode = targetTypeNode;
+    ClassOrMixinDeclaration targetNode = targetDeclarationResult.node;
     // prepare location
     ClassMemberLocation targetLocation =
-        _getUtilsFor(targetClassNode).prepareNewFieldLocation(targetClassNode);
+        CorrectionUtils(targetDeclarationResult.resolvedUnit)
+            .prepareNewFieldLocation(targetNode);
     // build field source
     Source targetSource = targetClassElement.source;
     String targetFile = targetSource.fullName;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
       Expression fieldTypeNode = climbPropertyAccess(nameNode);
       DartType fieldType = _inferUndefinedExpressionType(fieldTypeNode);
@@ -1724,12 +1644,12 @@
     // Ensure that we are in an initializing formal parameter.
     //
     FieldFormalParameter parameter =
-        node.getAncestor((node) => node is FieldFormalParameter);
+        node.thisOrAncestorOfType<FieldFormalParameter>();
     if (parameter == null) {
       return;
     }
     ClassDeclaration targetClassNode =
-        parameter.getAncestor((node) => node is ClassDeclaration);
+        parameter.thisOrAncestorOfType<ClassDeclaration>();
     if (targetClassNode == null) {
       return;
     }
@@ -1740,7 +1660,7 @@
     //
     // Add proposal.
     //
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       DartType fieldType = parameter.type?.type;
       builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
@@ -1772,8 +1692,8 @@
             return;
           }
         } else {
-          ClassDeclaration enclosingClass =
-              node.getAncestor((node) => node is ClassDeclaration);
+          ClassOrMixinDeclaration enclosingClass =
+              node.thisOrAncestorOfType<ClassOrMixinDeclaration>();
           targetElement = enclosingClass?.declaredElement;
           argument = nameNode;
         }
@@ -1851,19 +1771,21 @@
       return;
     }
     utils.targetClassElement = targetClassElement;
-    // prepare target ClassDeclaration
-    AstNode targetTypeNode = getParsedClassElementNode(targetClassElement);
-    if (targetTypeNode is! ClassDeclaration) {
+    // prepare target ClassOrMixinDeclaration
+    var targetDeclarationResult =
+        await sessionHelper.getElementDeclaration(targetClassElement);
+    if (targetDeclarationResult.node is! ClassOrMixinDeclaration) {
       return;
     }
-    ClassDeclaration targetClassNode = targetTypeNode;
+    ClassOrMixinDeclaration targetNode = targetDeclarationResult.node;
     // prepare location
     ClassMemberLocation targetLocation =
-        _getUtilsFor(targetClassNode).prepareNewGetterLocation(targetClassNode);
+        CorrectionUtils(targetDeclarationResult.resolvedUnit)
+            .prepareNewGetterLocation(targetNode);
     // build method source
     Source targetSource = targetClassElement.source;
     String targetFile = targetSource.fullName;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
       builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
         Expression fieldTypeNode = climbPropertyAccess(nameNode);
@@ -1891,18 +1813,15 @@
       if (source != null) {
         String file = source.fullName;
         if (isAbsolute(file) && AnalysisEngine.isDartFileName(file)) {
-          String libName = _computeLibraryName(file);
-          try {
-            DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
-            await changeBuilder.addFileEdit(source.fullName,
-                (DartFileEditBuilder builder) {
-              builder.addSimpleInsertion(0, 'library $libName;$eol$eol');
-            });
-            _addFixFromBuilder(changeBuilder, DartFixKind.CREATE_FILE,
-                args: [source.shortName]);
-          } on AnalysisException {
-            // Ignore the exception and just don't create a fix.
-          }
+          var changeBuilder = _newDartChangeBuilder();
+          await changeBuilder.addFileEdit(source.fullName, (builder) {
+            builder.addSimpleInsertion(0, '// TODO Implement this library.');
+          });
+          _addFixFromBuilder(
+            changeBuilder,
+            DartFixKind.CREATE_FILE,
+            args: [source.shortName],
+          );
         }
       }
     }
@@ -1922,7 +1841,7 @@
       if (assignment.leftHandSide == node &&
           assignment.operator.type == TokenType.EQ &&
           assignment.parent is ExpressionStatement) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleInsertion(node.offset, 'var ');
         });
@@ -1932,7 +1851,7 @@
       }
     }
     // prepare target Statement
-    Statement target = node.getAncestor((x) => x is Statement);
+    Statement target = node.thisOrAncestorOfType<Statement>();
     if (target == null) {
       return;
     }
@@ -1947,7 +1866,7 @@
       return;
     }
     // build variable declaration source
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addInsertion(target.offset, (DartEditBuilder builder) {
         builder.writeLocalVariableDeclaration(name,
@@ -1989,7 +1908,7 @@
         utils.prepareNewClassMemberLocation(targetClass, (_) => true);
 
     String prefix = utils.getIndent(1);
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addInsertion(location.offset, (DartEditBuilder builder) {
         // Separator management.
@@ -2083,9 +2002,10 @@
     int offset = -1;
     String filePath;
     if (prefixElement == null) {
-      targetUnit = unitElement;
-      CompilationUnitMember enclosingMember = node.getAncestor((node) =>
-          node is CompilationUnitMember && node.parent is CompilationUnit);
+      targetUnit = unit.declaredElement;
+      CompilationUnitMember enclosingMember = node.thisOrAncestorMatching(
+          (node) =>
+              node is CompilationUnitMember && node.parent is CompilationUnit);
       if (enclosingMember == null) {
         return;
       }
@@ -2116,7 +2036,7 @@
     if (offset < 0) {
       return;
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(filePath, (DartFileEditBuilder builder) {
       builder.addInsertion(offset, (DartEditBuilder builder) {
         builder.write(prefix);
@@ -2140,7 +2060,7 @@
     // prepare environment
     String prefix = utils.getIndent(1);
     int insertOffset = targetClass.end - 1;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addInsertion(insertOffset, (DartEditBuilder builder) {
         builder.selectHere();
@@ -2167,7 +2087,7 @@
       Source source = partDirective.uriSource;
       if (source != null) {
         String libName = unitLibraryElement.name;
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(source.fullName,
             (DartFileEditBuilder builder) {
           // TODO(brianwilkerson) Consider using the URI rather than name
@@ -2179,24 +2099,48 @@
     }
   }
 
+  Future<void> _addFix_extendClassForMixin() async {
+    ClassDeclaration declaration =
+        node.thisOrAncestorOfType<ClassDeclaration>();
+    if (declaration != null && declaration.extendsClause == null) {
+      String message = error.message;
+      int startIndex = message.indexOf("'", message.indexOf("'") + 1) + 1;
+      int endIndex = message.indexOf("'", startIndex);
+      String typeName = message.substring(startIndex, endIndex);
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addSimpleInsertion(
+            declaration.typeParameters?.end ?? declaration.name.end,
+            ' extends $typeName');
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.EXTEND_CLASS_FOR_MIXIN,
+          args: [typeName]);
+    }
+  }
+
   Future<void> _addFix_illegalAsyncReturnType() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     // prepare the existing type
-    TypeAnnotation typeName = node.getAncestor((n) => n is TypeAnnotation);
+    TypeAnnotation typeName = node.thisOrAncestorOfType<TypeAnnotation>();
     TypeProvider typeProvider = this.typeProvider;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.replaceTypeWithFuture(typeName, typeProvider);
     });
     _addFixFromBuilder(changeBuilder, DartFixKind.REPLACE_RETURN_TYPE_FUTURE);
   }
 
+  Future<void> _addFix_importAsync() async {
+    await _addFix_importLibrary(
+        DartFixKind.IMPORT_ASYNC, Uri.parse('dart:async'));
+  }
+
   Future<void> _addFix_importLibrary(FixKind kind, Uri library) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     String uriText;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       uriText = builder.importLibrary(library);
     });
@@ -2230,7 +2174,7 @@
       // may be apply prefix
       PrefixElement prefix = imp.prefix;
       if (prefix != null) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleReplacement(
               range.startLength(node, 0), '${prefix.displayName}.');
@@ -2260,8 +2204,9 @@
         String newShowCode = 'show ${showNames.join(', ')}';
         int offset = showCombinator.offset;
         int length = showCombinator.end - offset;
-        String libraryFile = unitLibraryElement.source.fullName;
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        String libraryFile =
+            context.resolveResult.libraryElement.source.fullName;
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(libraryFile,
             (DartFileEditBuilder builder) {
           builder.addSimpleReplacement(
@@ -2273,8 +2218,7 @@
     }
     // Find new top-level declarations.
     {
-      List<TopLevelDeclarationInSource> declarations =
-          await getTopLevelDeclarations(name);
+      var declarations = await session.getTopLevelDeclarations(name);
       for (TopLevelDeclarationInSource declaration in declarations) {
         // Check the kind.
         if (declaration.declaration.kind != kind2) {
@@ -2357,7 +2301,7 @@
         return;
       }
       int insertOffset = error.offset + error.length;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addSimpleInsertion(insertOffset, ';');
       });
@@ -2385,7 +2329,7 @@
     } else {
       return;
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addDeletion(range.token(negation));
       builder.addSimpleReplacement(range.node(identifier), 'isNotEmpty');
@@ -2398,7 +2342,7 @@
     await null;
     if (coveredNode is IsExpression) {
       IsExpression isExpression = coveredNode as IsExpression;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder
             .addReplacement(range.endEnd(isExpression.expression, isExpression),
@@ -2415,7 +2359,7 @@
     await null;
     if (coveredNode is IsExpression) {
       IsExpression isExpression = coveredNode as IsExpression;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder
             .addReplacement(range.endEnd(isExpression.expression, isExpression),
@@ -2431,12 +2375,12 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     ClassDeclaration enclosingClass =
-        node.getAncestor((node) => node is ClassDeclaration);
+        node.thisOrAncestorOfType<ClassDeclaration>();
     if (enclosingClass == null) {
       return;
     }
     String className = enclosingClass.name.name;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleInsertion(
           enclosingClass.classKeyword.offset, 'abstract ');
@@ -2457,9 +2401,9 @@
           !getter.variable.isSynthetic &&
           getter.variable.setter == null &&
           getter.enclosingElement is ClassElement) {
-        AstNode name =
-            await astProvider.getParsedNameForElement(getter.variable);
-        AstNode variable = name?.parent;
+        var declarationResult =
+            await sessionHelper.getElementDeclaration(getter.variable);
+        AstNode variable = declarationResult.node;
         if (variable is VariableDeclaration &&
             variable.parent is VariableDeclarationList &&
             variable.parent.parent is FieldDeclaration) {
@@ -2467,7 +2411,7 @@
           Token keywordToken = declarationList.keyword;
           if (declarationList.variables.length == 1 &&
               keywordToken.keyword == Keyword.FINAL) {
-            DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+            var changeBuilder = _newDartChangeBuilder();
             await changeBuilder.addFileEdit(file,
                 (DartFileEditBuilder builder) {
               if (declarationList.type != null) {
@@ -2498,7 +2442,7 @@
       VariableDeclaration declaration = node.parent;
       VariableDeclarationList list = declaration.parent;
       if (list.variables.length == 1) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           if (list.keyword == null) {
             builder.addSimpleInsertion(list.offset, 'final ');
@@ -2526,7 +2470,7 @@
       if (element is ClassElement &&
           element.typeParameters != null &&
           element.typeParameters.length == typeArguments.arguments.length) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           String argumentText = utils.getNodeText(typeArguments);
           builder.addSimpleInsertion(typeName.end, argumentText);
@@ -2541,7 +2485,7 @@
   Future<void> _addFix_nonBoolCondition_addNotNull() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleInsertion(error.offset + error.length, ' != null');
     });
@@ -2554,7 +2498,7 @@
     final awaitExpression = node;
     if (awaitExpression is AwaitExpression) {
       final awaitToken = awaitExpression.awaitKeyword;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(range.startStart(awaitToken, awaitToken.next));
       });
@@ -2570,7 +2514,7 @@
       AstNode parent = coveredNode.parent;
       if (parent is BinaryExpression) {
         if (parent.rightOperand == coveredNode) {
-          DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+          var changeBuilder = _newDartChangeBuilder();
           await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
             builder.addDeletion(range.endEnd(parent.leftOperand, coveredNode));
           });
@@ -2580,6 +2524,7 @@
     } else if (coveringNode is Block) {
       Block block = coveringNode;
       List<Statement> statementsToRemove = <Statement>[];
+      var errorRange = SourceRange(errorOffset, errorLength);
       for (Statement statement in block.statements) {
         if (range.node(statement).intersects(errorRange)) {
           statementsToRemove.add(statement);
@@ -2588,7 +2533,7 @@
       if (statementsToRemove.isNotEmpty) {
         SourceRange rangeToRemove =
             utils.getLinesRangeStatements(statementsToRemove);
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addDeletion(rangeToRemove);
         });
@@ -2597,7 +2542,7 @@
     } else if (coveringNode is Statement) {
       SourceRange rangeToRemove =
           utils.getLinesRangeStatements(<Statement>[coveringNode]);
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(rangeToRemove);
       });
@@ -2608,7 +2553,7 @@
   Future<void> _addFix_removeEmptyCatch() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addDeletion(utils.getLinesRange(range.node(node.parent)));
     });
@@ -2618,7 +2563,7 @@
   Future<void> _addFix_removeEmptyConstructorBody() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(
           utils.getLinesRange(range.node(node.parent)), ';');
@@ -2631,7 +2576,7 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     IfStatement ifStatement = node.parent;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addDeletion(utils.getLinesRange(
           range.startEnd(ifStatement.elseKeyword, ifStatement.elseStatement)));
@@ -2644,13 +2589,13 @@
     await null;
     EmptyStatement emptyStatement = node;
     if (emptyStatement.parent is Block) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(utils.getLinesRange(range.node(emptyStatement)));
       });
       _addFixFromBuilder(changeBuilder, DartFixKind.REMOVE_EMPTY_STATEMENT);
     } else {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         Token previous = emptyStatement.findPrevious(emptyStatement.beginToken);
         if (previous != null) {
@@ -2667,11 +2612,11 @@
     await null;
     // Retrieve the linted node.
     VariableDeclaration ancestor =
-        node.getAncestor((a) => a is VariableDeclaration);
+        node.thisOrAncestorOfType<VariableDeclaration>();
     if (ancestor == null) {
       return;
     }
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addDeletion(range.endEnd(ancestor.name, ancestor.initializer));
     });
@@ -2685,14 +2630,14 @@
     if (node is InterpolationExpression) {
       Token right = node.rightBracket;
       if (node.expression != null && right != null) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleReplacement(
               range.startStart(node, node.expression), r'$');
           builder.addDeletion(range.token(right));
         });
         _addFixFromBuilder(
-            changeBuilder, DartFixKind.LINT_REMOVE_INTERPOLATION_BRACES);
+            changeBuilder, DartFixKind.REMOVE_INTERPOLATION_BRACES);
       } else {}
     }
   }
@@ -2701,9 +2646,9 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     MethodDeclaration declaration =
-        node.getAncestor((node) => node is MethodDeclaration);
+        node.thisOrAncestorOfType<MethodDeclaration>();
     if (declaration != null) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(utils.getLinesRange(range.node(declaration)));
       });
@@ -2720,7 +2665,7 @@
       SimpleIdentifier name = method.name;
       FunctionBody body = method.body;
       if (name != null && body != null) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleReplacement(range.endStart(name, body), ' ');
         });
@@ -2729,7 +2674,7 @@
       }
     } else if (node is FormalParameterList) {
       // Support for the fasta error.
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(range.node(node));
       });
@@ -2744,7 +2689,7 @@
     if (node is SimpleIdentifier && node.parent is MethodInvocation) {
       MethodInvocation invocation = node.parent as MethodInvocation;
       if (invocation.methodName == node && invocation.target != null) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addDeletion(range.endEnd(node, invocation));
         });
@@ -2759,16 +2704,16 @@
     await null;
     final thisExpression = node is ThisExpression
         ? node
-        : node.getAncestor((node) => node is ThisExpression);
+        : node.thisOrAncestorOfType<ThisExpression>();
     final parent = thisExpression?.parent;
     if (parent is PropertyAccess) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(range.startEnd(parent, parent.operator));
       });
       _addFixFromBuilder(changeBuilder, DartFixKind.REMOVE_THIS_EXPRESSION);
     } else if (parent is MethodInvocation) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(range.startEnd(parent, parent.operator));
       });
@@ -2779,21 +2724,20 @@
   Future<void> _addFix_removeTypeAnnotation() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    final TypeAnnotation type =
-        node.getAncestor((node) => node is TypeAnnotation);
+    final TypeAnnotation type = node.thisOrAncestorOfType<TypeAnnotation>();
     if (type != null) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(range.startStart(type, type.endToken.next));
       });
-      _addFixFromBuilder(changeBuilder, DartFixKind.REMOVE_TYPE_NAME);
+      _addFixFromBuilder(changeBuilder, DartFixKind.REMOVE_TYPE_ANNOTATION);
     }
   }
 
   Future<void> _addFix_removeTypeArguments() async {
     if (coveredNode is TypeArgumentList) {
       TypeArgumentList typeArguments = coveredNode;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addDeletion(range.node(typeArguments));
       });
@@ -2811,7 +2755,7 @@
     Expression expression = asExpression.expression;
     int expressionPrecedence = getExpressionPrecedence(expression);
     // remove 'as T' from 'e as T'
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addDeletion(range.endEnd(expression, asExpression));
       _removeEnclosingParentheses(builder, asExpression, expressionPrecedence);
@@ -2826,7 +2770,7 @@
       AstNode catchClause = node.parent;
       if (catchClause is CatchClause &&
           catchClause.exceptionParameter == node) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addDeletion(
               range.startStart(catchClause.catchKeyword, catchClause.body));
@@ -2845,7 +2789,7 @@
       if (catchClause is CatchClause &&
           catchClause.stackTraceParameter == node &&
           catchClause.exceptionParameter != null) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder
               .addDeletion(range.endEnd(catchClause.exceptionParameter, node));
@@ -2861,12 +2805,12 @@
     await null;
     // prepare ImportDirective
     ImportDirective importDirective =
-        node.getAncestor((node) => node is ImportDirective);
+        node.thisOrAncestorOfType<ImportDirective>();
     if (importDirective == null) {
       return;
     }
     // remove the whole line with import
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addDeletion(utils.getLinesRange(range.node(importDirective)));
     });
@@ -2892,11 +2836,11 @@
     List<SimpleIdentifier> references;
     Element element = identifier.staticElement;
     if (element is LocalVariableElement) {
-      AstNode root = node.getAncestor((node) => node is Block);
+      AstNode root = node.thisOrAncestorOfType<Block>();
       references = findLocalElementReferences(root, element);
     } else if (element is ParameterElement) {
       if (!element.isNamed) {
-        AstNode root = node.getAncestor((node) =>
+        AstNode root = node.thisOrAncestorMatching((node) =>
             node.parent is ClassOrMixinDeclaration ||
             node.parent is CompilationUnit);
         references = findLocalElementReferences(root, element);
@@ -2907,7 +2851,7 @@
     }
 
     // Compute the change.
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       for (var reference in references) {
         builder.addSimpleReplacement(range.node(reference), newName);
@@ -2921,7 +2865,7 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     if (node is VariableDeclarationList) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addSimpleReplacement(
             range.token((node as VariableDeclarationList).keyword), 'const');
@@ -2933,7 +2877,7 @@
   Future<void> _addFix_replaceVarWithDynamic() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addSimpleReplacement(range.error(error), 'dynamic');
     });
@@ -2943,9 +2887,8 @@
   Future<void> _addFix_replaceWithConditionalAssignment() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    IfStatement ifStatement = node is IfStatement
-        ? node
-        : node.getAncestor((node) => node is IfStatement);
+    IfStatement ifStatement =
+        node is IfStatement ? node : node.thisOrAncestorOfType<IfStatement>();
     if (ifStatement == null) {
       return;
     }
@@ -2961,7 +2904,7 @@
     if (thenStatement is ExpressionStatement) {
       final expression = thenStatement.expression.unParenthesized;
       if (expression is AssignmentExpression) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addReplacement(range.node(ifStatement),
               (DartEditBuilder builder) {
@@ -2982,7 +2925,7 @@
     await null;
     if (coveredNode is InstanceCreationExpression) {
       var instanceCreation = coveredNode as InstanceCreationExpression;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         if (instanceCreation.keyword == null) {
           builder.addSimpleInsertion(
@@ -3000,9 +2943,9 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     final FunctionTypedFormalParameter functionTyped =
-        node.getAncestor((node) => node is FunctionTypedFormalParameter);
+        node.thisOrAncestorOfType<FunctionTypedFormalParameter>();
     if (functionTyped != null) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addSimpleReplacement(range.node(functionTyped),
             utils.getNodeText(functionTyped.identifier));
@@ -3017,10 +2960,10 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     final InstanceCreationExpression instanceCreation =
-        node.getAncestor((node) => node is InstanceCreationExpression);
+        node.thisOrAncestorOfType<InstanceCreationExpression>();
     final InterfaceType type = instanceCreation.staticType;
     final generics = instanceCreation.constructorName.type.typeArguments;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addReplacement(range.node(instanceCreation),
           (DartEditBuilder builder) {
@@ -3041,14 +2984,14 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     FunctionExpression ancestor =
-        node.getAncestor((a) => a is FunctionExpression);
+        node.thisOrAncestorOfType<FunctionExpression>();
     if (ancestor == null) {
       return;
     }
     Future<void> addFixOfExpression(InvocationExpression expression) async {
       // TODO(brianwilkerson) Determine whether this await is necessary.
       await null;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addReplacement(range.node(ancestor), (DartEditBuilder builder) {
           if (expression is MethodInvocation && expression.target != null) {
@@ -3117,7 +3060,7 @@
       if (finder._element != null) {
         String closestName = finder._element.name;
         if (closestName != null) {
-          DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+          var changeBuilder = _newDartChangeBuilder();
           await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
             builder.addSimpleReplacement(range.node(node), closestName);
           });
@@ -3168,8 +3111,7 @@
           new _ClosestElementFinder(name, predicate, MAX_LEVENSHTEIN_DISTANCE);
       // unqualified invocation
       if (target == null) {
-        ClassDeclaration clazz =
-            node.getAncestor((node) => node is ClassDeclaration);
+        ClassDeclaration clazz = node.thisOrAncestorOfType<ClassDeclaration>();
         if (clazz != null) {
           ClassElement classElement = clazz.declaredElement;
           _updateFinderWithClassMembers(finder, classElement);
@@ -3184,7 +3126,7 @@
       // if we have close enough element, suggest to use it
       if (finder._element != null) {
         String closestName = finder._element.name;
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleReplacement(range.node(node), closestName);
         });
@@ -3213,12 +3155,12 @@
     int insertOffset;
     String sourcePrefix;
     AstNode enclosingMember =
-        node.getAncestor((node) => node is CompilationUnitMember);
+        node.thisOrAncestorOfType<CompilationUnitMember>();
     insertOffset = enclosingMember.end;
     sourcePrefix = '$eol$eol';
     utils.targetClassElement = null;
     // build method source
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       builder.addInsertion(insertOffset, (DartEditBuilder builder) {
         builder.write(sourcePrefix);
@@ -3281,7 +3223,7 @@
       // If we have a close enough element, suggest to use it.
       if (finder._element != null) {
         String closestName = finder._element.name;
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleReplacement(range.node(node), closestName);
         });
@@ -3301,12 +3243,12 @@
       Element targetElement;
       bool staticModifier = false;
 
-      ClassDeclaration targetClassNode;
+      ClassOrMixinDeclaration targetClassNode;
       Expression target = invocation.realTarget;
+      CorrectionUtils utils = this.utils;
       if (target == null) {
-        targetElement = unitElement;
-        ClassMember enclosingMember =
-            node.getAncestor((node) => node is ClassMember);
+        targetElement = unit.declaredElement;
+        ClassMember enclosingMember = node.thisOrAncestorOfType<ClassMember>();
         if (enclosingMember == null) {
           // If the undefined identifier isn't inside a class member, then it
           // doesn't make sense to create a method.
@@ -3327,11 +3269,10 @@
         }
         targetElement = targetClassElement;
         // prepare target ClassDeclaration
-        AstNode targetTypeNode = getParsedClassElementNode(targetClassElement);
-        if (targetTypeNode is! ClassDeclaration) {
+        targetClassNode = await _getClassDeclaration(targetClassElement);
+        if (targetClassNode == null) {
           return;
         }
-        targetClassNode = targetTypeNode;
         // maybe static
         if (target is Identifier) {
           staticModifier =
@@ -3339,16 +3280,15 @@
                   ElementKind.CLASS;
         }
         // use different utils
-        CompilationUnitElement targetUnitElement =
-            getCompilationUnitElement(targetClassElement);
-        CompilationUnit targetUnit = getParsedUnit(targetUnitElement);
-        utils = new CorrectionUtils(targetUnit);
+        var targetPath = targetClassElement.source.fullName;
+        var targetResolveResult = await session.getResolvedUnit(targetPath);
+        utils = CorrectionUtils(targetResolveResult);
       }
       ClassMemberLocation targetLocation =
           utils.prepareNewMethodLocation(targetClassNode);
       String targetFile = targetElement.source.fullName;
       // build method source
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(targetFile,
           (DartFileEditBuilder builder) {
         builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
@@ -3392,22 +3332,6 @@
     }
   }
 
-  Future<void> _addFix_undefinedMethodWithContructor() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    if (node is SimpleIdentifier && node.parent is MethodInvocation) {
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
-      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addSimpleInsertion(node.parent.offset, 'new ');
-      });
-      _addFixFromBuilder(
-          changeBuilder, DartFixKind.INVOKE_CONSTRUCTOR_USING_NEW);
-      // TODO(brianwilkerson) Figure out whether the constructor is a `const`
-      // constructor and all of the parameters are constant expressions, and
-      // suggest inserting 'const ' if so.
-    }
-  }
-
   /**
    * Here we handle cases when a constructors does not initialize all of the
    * final fields.
@@ -3438,7 +3362,7 @@
     if (flutter.isExactlyStatelessWidgetType(superType) ||
         flutter.isExactlyStatefulWidgetType(superType)) {
       if (parameters.isNotEmpty && parameters.last.isNamed) {
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           builder.addSimpleInsertion(
               parameters.last.end, ', $fieldParametersCode');
@@ -3457,7 +3381,7 @@
       }
     }
 
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       // append new field formal initializers
       if (lastRequiredParameter != null) {
@@ -3474,6 +3398,52 @@
     _addFixFromBuilder(changeBuilder, DartFixKind.ADD_FIELD_FORMAL_PARAMETERS);
   }
 
+  Future<void> _addFix_updateSdkConstraints() async {
+    Context context = resourceProvider.pathContext;
+    File pubspecFile = null;
+    Folder folder = resourceProvider.getFolder(context.dirname(file));
+    while (folder != null) {
+      pubspecFile = folder.getChildAssumingFile('pubspec.yaml');
+      if (pubspecFile.exists) {
+        break;
+      }
+      pubspecFile = null;
+      folder = folder.parent;
+    }
+    if (pubspecFile == null) {
+      return;
+    }
+    SdkConstraintExtractor extractor = new SdkConstraintExtractor(pubspecFile);
+    String text = extractor.constraintText();
+    int offset = extractor.constraintOffset();
+    int length = text.length;
+    if (text == null || offset < 0) {
+      return;
+    }
+    String newText;
+    int spaceOffset = text.indexOf(' ');
+    if (spaceOffset >= 0) {
+      length = spaceOffset;
+    }
+    if (text == 'any') {
+      newText = '^2.1.0';
+    } else if (text.startsWith('^')) {
+      newText = '^2.1.0';
+    } else if (text.startsWith('>=')) {
+      newText = '>=2.1.0';
+    } else if (text.startsWith('>')) {
+      newText = '>=2.1.0';
+    }
+    if (newText == null) {
+      return;
+    }
+    var changeBuilder = new ChangeBuilder();
+    await changeBuilder.addFileEdit(pubspecFile.path, (builder) {
+      builder.addSimpleReplacement(new SourceRange(offset, length), newText);
+    });
+    _addFixFromBuilder(changeBuilder, DartFixKind.UPDATE_SDK_CONSTRAINTS);
+  }
+
   Future<void> _addFix_useEffectiveIntegerDivision() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3482,7 +3452,7 @@
           n.offset == errorOffset &&
           n.length == errorLength) {
         Expression target = (n as MethodInvocation).target.unParenthesized;
-        DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+        var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
           // replace "/" with "~/"
           BinaryExpression binary = target as BinaryExpression;
@@ -3509,7 +3479,7 @@
     Element declaringElement = element.enclosingElement;
     if (declaringElement is ClassElement) {
       DartType declaringType = declaringElement.type;
-      DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+      var changeBuilder = _newDartChangeBuilder();
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         // replace "target" with class name
         builder.addReplacement(range.node(target), (DartEditBuilder builder) {
@@ -3547,7 +3517,7 @@
     }
   }
 
-  void _addFixFromBuilder(DartChangeBuilder builder, FixKind kind,
+  void _addFixFromBuilder(ChangeBuilder builder, FixKind kind,
       {List args: null, bool importsOnly: false}) {
     SourceChange change = builder.sourceChange;
     if (change.edits.isEmpty && !importsOnly) {
@@ -3564,7 +3534,7 @@
   Future<DartChangeBuilder> _addProposal_createFunction(
       FunctionType functionType,
       String name,
-      Source targetSource,
+      String targetFile,
       int insertOffset,
       bool isStatic,
       String prefix,
@@ -3574,8 +3544,7 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     // build method source
-    String targetFile = targetSource.fullName;
-    DartChangeBuilder changeBuilder = new DartChangeBuilder(session);
+    var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(targetFile, (DartFileEditBuilder builder) {
       builder.addInsertion(insertOffset, (DartEditBuilder builder) {
         builder.write(sourcePrefix);
@@ -3622,7 +3591,7 @@
         builder.write(' {$eol$prefix}');
         builder.write(sourceSuffix);
       });
-      if (targetSource == unitSource) {
+      if (targetFile == file) {
         builder.addLinkedPosition(range.node(node), 'NAME');
       }
     });
@@ -3647,13 +3616,13 @@
     DartChangeBuilder changeBuilder = await _addProposal_createFunction(
         functionType,
         name,
-        unitSource,
+        file,
         insertOffset,
         false,
         prefix,
         sourcePrefix,
         sourceSuffix,
-        unitElement);
+        unit.declaredElement);
     _addFixFromBuilder(changeBuilder, DartFixKind.CREATE_FUNCTION,
         args: [name]);
   }
@@ -3670,13 +3639,15 @@
     // prepare environment
     Source targetSource = targetClassElement.source;
     // prepare insert offset
-    ClassDeclaration targetClassNode =
-        getParsedClassElementNode(targetClassElement);
-    int insertOffset = targetClassNode.end - 1;
+    var targetNode = await _getClassDeclaration(targetClassElement);
+    if (targetNode == null) {
+      return;
+    }
+    int insertOffset = targetNode.end - 1;
     // prepare prefix
     String prefix = '  ';
     String sourcePrefix;
-    if (targetClassNode.members.isEmpty) {
+    if (targetNode.members.isEmpty) {
       sourcePrefix = '';
     } else {
       sourcePrefix = eol;
@@ -3685,7 +3656,7 @@
     DartChangeBuilder changeBuilder = await _addProposal_createFunction(
         functionType,
         name,
-        targetSource,
+        targetSource.fullName,
         insertOffset,
         _inStaticContext(),
         prefix,
@@ -3696,48 +3667,15 @@
   }
 
   /**
-   * Computes the name of the library at the given [path].
-   * See https://www.dartlang.org/articles/style-guide/#names for conventions.
+   * Returns the [ClassOrMixinDeclaration] for the given [element].
    */
-  String _computeLibraryName(String path) {
-    Context pathContext = resourceProvider.pathContext;
-    String packageFolder = _computePackageFolder(path);
-    if (packageFolder == null) {
-      return pathContext.basenameWithoutExtension(path);
+  Future<ClassOrMixinDeclaration> _getClassDeclaration(
+      ClassElement element) async {
+    var result = await sessionHelper.getElementDeclaration(element);
+    if (result.node is ClassOrMixinDeclaration) {
+      return result.node;
     }
-    String packageName = pathContext.basename(packageFolder);
-    String relPath = pathContext.relative(path, from: packageFolder);
-    List<String> relPathParts = pathContext.split(relPath);
-    if (relPathParts.isNotEmpty) {
-      if (relPathParts[0].toLowerCase() == 'lib') {
-        relPathParts.removeAt(0);
-      }
-      if (relPathParts.isNotEmpty) {
-        String nameWithoutExt = pathContext.withoutExtension(relPathParts.last);
-        relPathParts[relPathParts.length - 1] = nameWithoutExt;
-      }
-    }
-    return packageName + '.' + relPathParts.join('.');
-  }
-
-  /**
-   * Returns the path of the folder which contains the given [path].
-   */
-  String _computePackageFolder(String path) {
-    Context pathContext = resourceProvider.pathContext;
-    String pubspecFolder = dirname(path);
-    while (true) {
-      if (resourceProvider
-          .getResource(pathContext.join(pubspecFolder, 'pubspec.yaml'))
-          .exists) {
-        return pubspecFolder;
-      }
-      String pubspecFolderNew = pathContext.dirname(pubspecFolder);
-      if (pubspecFolderNew == pubspecFolder) {
-        return null;
-      }
-      pubspecFolder = pubspecFolderNew;
-    }
+    return null;
   }
 
   /**
@@ -3774,26 +3712,6 @@
   }
 
   /**
-   * Return the correction utilities that should be used when creating an edit
-   * in the compilation unit containing the given [node].
-   */
-  CorrectionUtils _getUtilsFor(AstNode node) {
-    CompilationUnit targetUnit =
-        node.getAncestor((node) => node is CompilationUnit);
-    CompilationUnitElement targetUnitElement = targetUnit?.declaredElement;
-    CorrectionUtils realUtils = utils;
-    if (targetUnitElement != utils.unit.declaredElement) {
-      realUtils = new CorrectionUtils(targetUnit);
-      ClassDeclaration targetClass =
-          node.getAncestor((node) => node is ClassDeclaration);
-      if (targetClass != null) {
-        realUtils.targetClassElement = targetClass.declaredElement;
-      }
-    }
-    return realUtils;
-  }
-
-  /**
    * Returns an expected [DartType] of [expression], may be `null` if cannot be
    * inferred.
    */
@@ -3924,17 +3842,15 @@
    */
   bool _inStaticContext() {
     // constructor initializer cannot reference "this"
-    if (node.getAncestor((node) => node is ConstructorInitializer) != null) {
+    if (node.thisOrAncestorOfType<ConstructorInitializer>() != null) {
       return true;
     }
     // field initializer cannot reference "this"
-    if (node.getAncestor((node) => node is FieldDeclaration) != null) {
+    if (node.thisOrAncestorOfType<FieldDeclaration>() != null) {
       return true;
     }
     // static method
-    MethodDeclaration method = node.getAncestor((node) {
-      return node is MethodDeclaration;
-    });
+    MethodDeclaration method = node.thisOrAncestorOfType<MethodDeclaration>();
     return method != null && method.isStatic;
   }
 
@@ -3999,24 +3915,24 @@
   }
 
   /**
-   * Return `true` if the [source] can be imported into [unitLibraryFile].
+   * Return `true` if the [source] can be imported into current library.
    */
   bool _isSourceVisibleToLibrary(Source source) {
     String path = source.fullName;
 
-    ContextRoot contextRoot = driver.contextRoot;
+    var contextRoot = context.resolveResult.session.analysisContext.contextRoot;
     if (contextRoot == null) {
       return true;
     }
 
     // We don't want to use private libraries of other packages.
     if (source.uri.isScheme('package') && _isLibSrcPath(path)) {
-      return resourceProvider.pathContext.isWithin(contextRoot.root, path);
+      return contextRoot.root.contains(path);
     }
 
     // We cannot use relative URIs to reference files outside of our package.
     if (source.uri.isScheme('file')) {
-      return resourceProvider.pathContext.isWithin(contextRoot.root, path);
+      return contextRoot.root.contains(path);
     }
 
     return true;
@@ -4039,6 +3955,10 @@
     return false;
   }
 
+  DartChangeBuilder _newDartChangeBuilder() {
+    return new DartChangeBuilderImpl.forWorkspace(context.workspace);
+  }
+
   /**
    * Removes any [ParenthesizedExpression] enclosing [expr].
    *
@@ -4181,14 +4101,15 @@
  * [ExecutableElement], its parameters, and operations on them.
  */
 class _ExecutableParameters {
-  final AstProvider astProvider;
+  final AnalysisSessionHelper sessionHelper;
   final ExecutableElement executable;
 
   final List<ParameterElement> required = [];
   final List<ParameterElement> optionalPositional = [];
   final List<ParameterElement> named = [];
 
-  factory _ExecutableParameters(AstProvider astProvider, AstNode invocation) {
+  factory _ExecutableParameters(
+      AnalysisSessionHelper sessionHelper, AstNode invocation) {
     Element element;
     if (invocation is InstanceCreationExpression) {
       element = invocation.staticElement;
@@ -4196,14 +4117,14 @@
     if (invocation is MethodInvocation) {
       element = invocation.methodName.staticElement;
     }
-    if (element is ExecutableElement) {
-      return new _ExecutableParameters._(astProvider, element);
+    if (element is ExecutableElement && !element.isSynthetic) {
+      return new _ExecutableParameters._(sessionHelper, element);
     } else {
       return null;
     }
   }
 
-  _ExecutableParameters._(this.astProvider, this.executable) {
+  _ExecutableParameters._(this.sessionHelper, this.executable) {
     for (var parameter in executable.parameters) {
       if (parameter.isNotOptional) {
         required.add(parameter);
@@ -4222,10 +4143,8 @@
    * be found.
    */
   Future<FormalParameterList> getParameterList() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    var name = await astProvider.getParsedNameForElement(executable);
-    AstNode targetDeclaration = name?.parent;
+    var result = await sessionHelper.getElementDeclaration(executable);
+    var targetDeclaration = result.node;
     if (targetDeclaration is ConstructorDeclaration) {
       return targetDeclaration.parameters;
     } else if (targetDeclaration is FunctionDeclaration) {
@@ -4242,10 +4161,9 @@
    * or `null` is cannot be found.
    */
   Future<FormalParameter> getParameterNode(ParameterElement element) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    var name = await astProvider.getParsedNameForElement(element);
-    for (AstNode node = name; node != null; node = node.parent) {
+    var result = await sessionHelper.getElementDeclaration(element);
+    var declaration = result.node;
+    for (AstNode node = declaration; node != null; node = node.parent) {
       if (node is FormalParameter && node.parent is FormalParameterList) {
         return node;
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
index 46fa120..e8da43f 100644
--- a/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
+++ b/pkg/analysis_server/lib/src/services/correction/name_suggestion.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer_plugin/src/utilities/string_utilities.dart';
 
-List<String> _KNOWN_METHOD_NAME_PREFIXES = ['get', 'is', 'to'];
+final List<String> _KNOWN_METHOD_NAME_PREFIXES = ['get', 'is', 'to'];
 
 /**
  * Returns all variants of names by removing leading words one by one.
@@ -37,7 +37,7 @@
   if (isMethod) {
     // If we're in a build() method, use 'build' as the name prefix.
     MethodDeclaration method =
-        assignedExpression.getAncestor((n) => n is MethodDeclaration);
+        assignedExpression.thisOrAncestorOfType<MethodDeclaration>();
     if (method != null) {
       String enclosingName = method.name?.name;
       if (enclosingName != null && enclosingName.startsWith('build')) {
diff --git a/pkg/analysis_server/lib/src/services/correction/namespace.dart b/pkg/analysis_server/lib/src/services/correction/namespace.dart
index 1419922..a3bdd84 100644
--- a/pkg/analysis_server/lib/src/services/correction/namespace.dart
+++ b/pkg/analysis_server/lib/src/services/correction/namespace.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -18,15 +18,6 @@
 }
 
 /**
- * Returns the namespace of the given [ExportElement].
- */
-Map<String, Element> getExportNamespaceForDirective(ExportElement exp) {
-  Namespace namespace =
-      new NamespaceBuilder().createExportNamespaceForDirective(exp);
-  return namespace.definedNames;
-}
-
-/**
  * Returns the export namespace of the given [LibraryElement].
  */
 Map<String, Element> getExportNamespaceForLibrary(LibraryElement library) {
@@ -45,8 +36,7 @@
   if (parent is ImportDirective) {
     return parent.element;
   }
-  ImportElementInfo info = internal_getImportElementInfo(prefixNode);
-  return info?.element;
+  return internal_getImportElementInfo(prefixNode);
 }
 
 /**
@@ -130,15 +120,13 @@
 }
 
 /**
- * Returns the [ImportElementInfo] with the [ImportElement] that is referenced
- * by [prefixNode] with a [PrefixElement], maybe `null`.
+ * Returns the [ImportElement] that is referenced by [prefixNode] with a
+ * [PrefixElement], maybe `null`.
  */
-ImportElementInfo internal_getImportElementInfo(SimpleIdentifier prefixNode) {
-  ImportElementInfo info = new ImportElementInfo();
+ImportElement internal_getImportElementInfo(SimpleIdentifier prefixNode) {
   // prepare environment
   AstNode parent = prefixNode.parent;
-  CompilationUnit unit =
-      prefixNode.getAncestor((node) => node is CompilationUnit);
+  CompilationUnit unit = prefixNode.thisOrAncestorOfType<CompilationUnit>();
   LibraryElement libraryElement =
       resolutionMap.elementDeclaredByCompilationUnit(unit).library;
   // prepare used element
@@ -147,14 +135,12 @@
     PrefixedIdentifier prefixed = parent;
     if (prefixed.prefix == prefixNode) {
       usedElement = prefixed.staticElement;
-      info.periodEnd = prefixed.period.end;
     }
   }
   if (parent is MethodInvocation) {
     MethodInvocation invocation = parent;
     if (invocation.target == prefixNode) {
       usedElement = invocation.methodName.staticElement;
-      info.periodEnd = invocation.operator.end;
     }
   }
   // we need used Element
@@ -164,12 +150,8 @@
   // find ImportElement
   String prefix = prefixNode.name;
   Map<ImportElement, Set<Element>> importElementsMap = {};
-  info.element = internal_getImportElement(
+  return internal_getImportElement(
       libraryElement, prefix, usedElement, importElementsMap);
-  if (info.element == null) {
-    return null;
-  }
-  return info;
 }
 
 /**
@@ -178,5 +160,4 @@
  */
 class ImportElementInfo {
   ImportElement element;
-  int periodEnd;
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart b/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
index 9b026bd..3b9b505 100644
--- a/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -10,7 +10,7 @@
 /**
  * A visitor for visiting [AstNode]s covered by a selection [SourceRange].
  */
-class SelectionAnalyzer extends GeneralizingAstVisitor<Object> {
+class SelectionAnalyzer extends GeneralizingAstVisitor<void> {
   final SourceRange selection;
 
   AstNode _coveringNode;
@@ -57,19 +57,6 @@
   }
 
   /**
-   * Returns the [SourceRange] which covers selected [AstNode]s, may be `null`
-   * if there are no [AstNode]s under the selection.
-   */
-  SourceRange get selectedNodeRange {
-    if (_selectedNodes == null || _selectedNodes.isEmpty) {
-      return null;
-    }
-    AstNode firstNode = _selectedNodes[0];
-    AstNode lastNode = _selectedNodes[_selectedNodes.length - 1];
-    return range.startEnd(firstNode, lastNode);
-  }
-
-  /**
    * Return the [AstNode]s fully covered by the selection [SourceRange].
    */
   List<AstNode> get selectedNodes {
@@ -114,7 +101,7 @@
   }
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     SourceRange nodeRange = range.node(node);
     if (selection.covers(nodeRange)) {
       if (isFirstNode) {
@@ -122,21 +109,20 @@
       } else {
         handleNextSelectedNode(node);
       }
-      return null;
+      return;
     } else if (selection.coveredBy(nodeRange)) {
       _coveringNode = node;
       node.visitChildren(this);
-      return null;
+      return;
     } else if (selection.startsIn(nodeRange)) {
       handleSelectionStartsIn(node);
       node.visitChildren(this);
-      return null;
+      return;
     } else if (selection.endsIn(nodeRange)) {
       handleSelectionEndsIn(node);
       node.visitChildren(this);
-      return null;
+      return;
     }
     // no intersection
-    return null;
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/sort_members.dart b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
index 1bd8aef8..04baf5f 100644
--- a/pkg/analysis_server/lib/src/services/correction/sort_members.dart
+++ b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
@@ -20,6 +20,8 @@
     new _PriorityItem(false, _MemberKind.UNIT_ACCESSOR, true),
     new _PriorityItem(false, _MemberKind.UNIT_FUNCTION, false),
     new _PriorityItem(false, _MemberKind.UNIT_FUNCTION, true),
+    new _PriorityItem(false, _MemberKind.UNIT_GENERIC_TYPE_ALIAS, false),
+    new _PriorityItem(false, _MemberKind.UNIT_GENERIC_TYPE_ALIAS, true),
     new _PriorityItem(false, _MemberKind.UNIT_FUNCTION_TYPE, false),
     new _PriorityItem(false, _MemberKind.UNIT_FUNCTION_TYPE, true),
     new _PriorityItem(false, _MemberKind.UNIT_CLASS, false),
@@ -83,21 +85,20 @@
   }
 
   /**
-   * Sorts all members of all [ClassDeclaration]s.
+   * Sorts all members of all [ClassOrMixinDeclaration]s.
    */
   void _sortClassesMembers() {
     for (CompilationUnitMember unitMember in unit.declarations) {
-      if (unitMember is ClassDeclaration) {
-        ClassDeclaration classDeclaration = unitMember;
-        _sortClassMembers(classDeclaration);
+      if (unitMember is ClassOrMixinDeclaration) {
+        _sortClassMembers(unitMember);
       }
     }
   }
 
   /**
-   * Sorts all members of the given [ClassDeclaration].
+   * Sorts all members of the given [classDeclaration].
    */
-  void _sortClassMembers(ClassDeclaration classDeclaration) {
+  void _sortClassMembers(ClassOrMixinDeclaration classDeclaration) {
     List<_MemberInfo> members = <_MemberInfo>[];
     for (ClassMember member in classDeclaration.members) {
       _MemberKind kind = null;
@@ -272,7 +273,7 @@
     for (CompilationUnitMember member in unit.declarations) {
       _MemberKind kind = null;
       String name = null;
-      if (member is ClassDeclaration) {
+      if (member is ClassOrMixinDeclaration) {
         kind = _MemberKind.UNIT_CLASS;
         name = member.name.name;
       }
@@ -305,6 +306,10 @@
         kind = _MemberKind.UNIT_FUNCTION_TYPE;
         name = member.name.name;
       }
+      if (member is GenericTypeAlias) {
+        kind = _MemberKind.UNIT_GENERIC_TYPE_ALIAS;
+        name = member.name.name;
+      }
       if (member is TopLevelVariableDeclaration) {
         TopLevelVariableDeclaration variableDeclaration = member;
         List<VariableDeclaration> variables =
@@ -458,14 +463,16 @@
   static const UNIT_FUNCTION_MAIN = const _MemberKind('UNIT_FUNCTION_MAIN', 0);
   static const UNIT_ACCESSOR = const _MemberKind('UNIT_ACCESSOR', 1);
   static const UNIT_FUNCTION = const _MemberKind('UNIT_FUNCTION', 2);
-  static const UNIT_FUNCTION_TYPE = const _MemberKind('UNIT_FUNCTION_TYPE', 3);
-  static const UNIT_CLASS = const _MemberKind('UNIT_CLASS', 4);
-  static const UNIT_VARIABLE_CONST = const _MemberKind('UNIT_VARIABLE', 5);
-  static const UNIT_VARIABLE = const _MemberKind('UNIT_VARIABLE', 6);
-  static const CLASS_ACCESSOR = const _MemberKind('CLASS_ACCESSOR', 7);
-  static const CLASS_CONSTRUCTOR = const _MemberKind('CLASS_CONSTRUCTOR', 8);
-  static const CLASS_FIELD = const _MemberKind('CLASS_FIELD', 9);
-  static const CLASS_METHOD = const _MemberKind('CLASS_METHOD', 10);
+  static const UNIT_GENERIC_TYPE_ALIAS =
+      const _MemberKind('UNIT_GENERIC_TYPE_ALIAS', 3);
+  static const UNIT_FUNCTION_TYPE = const _MemberKind('UNIT_FUNCTION_TYPE', 4);
+  static const UNIT_CLASS = const _MemberKind('UNIT_CLASS', 5);
+  static const UNIT_VARIABLE_CONST = const _MemberKind('UNIT_VARIABLE', 6);
+  static const UNIT_VARIABLE = const _MemberKind('UNIT_VARIABLE', 7);
+  static const CLASS_ACCESSOR = const _MemberKind('CLASS_ACCESSOR', 8);
+  static const CLASS_CONSTRUCTOR = const _MemberKind('CLASS_CONSTRUCTOR', 9);
+  static const CLASS_FIELD = const _MemberKind('CLASS_FIELD', 10);
+  static const CLASS_METHOD = const _MemberKind('CLASS_METHOD', 11);
 
   final String name;
   final int ordinal;
diff --git a/pkg/analysis_server/lib/src/services/correction/source_buffer.dart b/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
index 24d6848..a414cd5 100644
--- a/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/source_buffer.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart';
-
 /**
  * Helper for building Dart source with linked positions.
  */
@@ -13,18 +10,10 @@
   final int offset;
   final StringBuffer _buffer = new StringBuffer();
 
-  final Map<String, LinkedEditGroup> linkedPositionGroups =
-      <String, LinkedEditGroup>{};
-  LinkedEditGroup _currentLinkedPositionGroup;
-  int _currentPositionStart;
   int _exitOffset;
 
   SourceBuilder(this.file, this.offset);
 
-  SourceBuilder.buffer()
-      : file = null,
-        offset = 0;
-
   /**
    * Returns the exit offset, maybe `null` if not set.
    */
@@ -37,15 +26,6 @@
 
   int get length => _buffer.length;
 
-  void addSuggestion(LinkedEditSuggestionKind kind, String value) {
-    var suggestion = new LinkedEditSuggestion(value, kind);
-    _currentLinkedPositionGroup.addSuggestion(suggestion);
-  }
-
-  void addSuggestions(LinkedEditSuggestionKind kind, List<String> values) {
-    values.forEach((value) => addSuggestion(kind, value));
-  }
-
   /**
    * Appends [s] to the buffer.
    */
@@ -55,45 +35,12 @@
   }
 
   /**
-   * Ends position started using [startPosition].
-   */
-  void endPosition() {
-    assert(_currentLinkedPositionGroup != null);
-    _addPosition();
-    _currentLinkedPositionGroup = null;
-  }
-
-  /**
    * Marks the current offset as an "exit" one.
    */
   void setExitOffset() {
     _exitOffset = _buffer.length;
   }
 
-  /**
-   * Marks start of a new linked position for the group with the given ID.
-   */
-  void startPosition(String id) {
-    assert(_currentLinkedPositionGroup == null);
-    _currentLinkedPositionGroup = linkedPositionGroups[id];
-    if (_currentLinkedPositionGroup == null) {
-      _currentLinkedPositionGroup = new LinkedEditGroup.empty();
-      linkedPositionGroups[id] = _currentLinkedPositionGroup;
-    }
-    _currentPositionStart = _buffer.length;
-  }
-
   @override
   String toString() => _buffer.toString();
-
-  /**
-   * Adds position location [SourceRange] using current fields.
-   */
-  void _addPosition() {
-    int start = offset + _currentPositionStart;
-    int end = offset + _buffer.length;
-    int length = end - start;
-    Position position = new Position(file, start);
-    _currentLinkedPositionGroup.addPosition(position, length);
-  }
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart b/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
index 3a5b1af..db39ca8 100644
--- a/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
@@ -6,9 +6,9 @@
 import 'package:analysis_server/src/services/correction/selection_analyzer.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/correction/util.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 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/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -37,11 +37,12 @@
  * Analyzer to check if a selection covers a valid set of statements of AST.
  */
 class StatementAnalyzer extends SelectionAnalyzer {
-  final CompilationUnit unit;
+  final ResolvedUnitResult resolveResult;
 
   final RefactoringStatus _status = new RefactoringStatus();
 
-  StatementAnalyzer(this.unit, SourceRange selection) : super(selection);
+  StatementAnalyzer(this.resolveResult, SourceRange selection)
+      : super(selection);
 
   /**
    * Returns the [RefactoringStatus] result of selection checking.
@@ -49,6 +50,13 @@
   RefactoringStatus get status => _status;
 
   /**
+   * Analyze the selection, compute [status] and nodes.
+   */
+  void analyze() {
+    resolveResult.unit.accept(this);
+  }
+
+  /**
    * Records fatal error with given message and [Location].
    */
   void invalidSelection(String message, [Location context]) {
@@ -68,7 +76,7 @@
     {
       int selectionStart = selection.offset;
       int selectionEnd = selection.end;
-      List<SourceRange> commentRanges = getCommentRanges(unit);
+      List<SourceRange> commentRanges = getCommentRanges(resolveResult.unit);
       for (SourceRange commentRange in commentRanges) {
         if (commentRange.contains(selectionStart)) {
           invalidSelection("Selection begins inside a comment.");
@@ -204,8 +212,7 @@
    * Returns `true` if there are [Token]s in the given [SourceRange].
    */
   bool _hasTokens(SourceRange range) {
-    CompilationUnitElement unitElement = unit.declaredElement;
-    String fullText = unitElement.context.getContents(unitElement.source).data;
+    String fullText = resolveResult.content;
     String rangeText = fullText.substring(range.offset, range.end);
     return _getTokens(rangeText).isNotEmpty;
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/strings.dart b/pkg/analysis_server/lib/src/services/correction/strings.dart
index 33a4c6a..125fc14 100644
--- a/pkg/analysis_server/lib/src/services/correction/strings.dart
+++ b/pkg/analysis_server/lib/src/services/correction/strings.dart
@@ -12,11 +12,6 @@
 const int CHAR_DOLLAR = 0x24;
 
 /**
- * "."
- */
-const int CHAR_DOT = 0x2E;
-
-/**
  * "_"
  */
 const int CHAR_UNDERSCORE = 0x5F;
@@ -98,39 +93,6 @@
 }
 
 /**
- * Returns the number of characters common to the end of [a] and the start
- * of [b].
- */
-int findCommonOverlap(String a, String b) {
-  int a_length = a.length;
-  int b_length = b.length;
-  // all empty
-  if (a_length == 0 || b_length == 0) {
-    return 0;
-  }
-  // truncate
-  if (a_length > b_length) {
-    a = a.substring(a_length - b_length);
-  } else if (a_length < b_length) {
-    b = b.substring(0, a_length);
-  }
-  int text_length = min(a_length, b_length);
-  // the worst case
-  if (a == b) {
-    return text_length;
-  }
-  // increase common length one by one
-  int length = 0;
-  while (length < text_length) {
-    if (a.codeUnitAt(text_length - 1 - length) != b.codeUnitAt(length)) {
-      break;
-    }
-    length++;
-  }
-  return length;
-}
-
-/**
  * Return the number of characters common to the start of [a] and [b].
  */
 int findCommonPrefix(String a, String b) {
@@ -193,13 +155,6 @@
   return isSpace(c) || isEOL(c);
 }
 
-String remove(String str, String remove) {
-  if (isEmpty(str) || isEmpty(remove)) {
-    return str;
-  }
-  return str.replaceAll(remove, '');
-}
-
 String removeEnd(String str, String remove) {
   if (isEmpty(str) || isEmpty(remove)) {
     return str;
@@ -233,24 +188,6 @@
 }
 
 /**
- * Gets the substring after the last occurrence of a separator.
- * The separator is not returned.
- */
-String substringAfterLast(String str, String separator) {
-  if (isEmpty(str)) {
-    return str;
-  }
-  if (isEmpty(separator)) {
-    return '';
-  }
-  int pos = str.lastIndexOf(separator);
-  if (pos == -1) {
-    return str;
-  }
-  return str.substring(pos + separator.length);
-}
-
-/**
  * Information about a single replacement that should be made to convert the
  * "old" string to the "new" one.
  */
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index f517e04..9ea11e0 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,6 +7,8 @@
 import 'package:analysis_server/src/protocol_server.dart'
     show doSourceChange_addElementEdit;
 import 'package:analysis_server/src/services/correction/strings.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
@@ -15,7 +17,6 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     show SourceChange, SourceEdit;
@@ -27,16 +28,11 @@
  * Adds edits to the given [change] that ensure that all the [libraries] are
  * imported into the given [targetLibrary].
  */
-void addLibraryImports(pathos.Context pathContext, SourceChange change,
-    LibraryElement targetLibrary, Set<Source> libraries) {
-  CorrectionUtils libUtils;
-  try {
-    CompilationUnitElement unitElement = targetLibrary.definingCompilationUnit;
-    CompilationUnit unitAst = getParsedUnit(unitElement);
-    libUtils = new CorrectionUtils(unitAst);
-  } catch (e) {
-    throw new CancelCorrectionException(exception: e);
-  }
+Future<void> addLibraryImports(AnalysisSession session, SourceChange change,
+    LibraryElement targetLibrary, Set<Source> libraries) async {
+  var libraryPath = targetLibrary.source.fullName;
+  var resolveResult = await session.getResolvedUnit(libraryPath);
+  var libUtils = new CorrectionUtils(resolveResult);
   String eol = libUtils.endOfLine;
   // Prepare information about existing imports.
   LibraryDirective libraryDirective;
@@ -46,14 +42,14 @@
       libraryDirective = directive;
     } else if (directive is ImportDirective) {
       importDirectives.add(new _ImportDirectiveInfo(
-          directive.uriContent, directive.offset, directive.end));
+          directive.uri.stringValue, directive.offset, directive.end));
     }
   }
 
   // Prepare all URIs to import.
   List<String> uriList = libraries
-      .map((library) =>
-          getLibrarySourceUri(pathContext, targetLibrary, library.uri))
+      .map((library) => getLibrarySourceUri(
+          session.resourceProvider.pathContext, targetLibrary, library.uri))
       .toList();
   uriList.sort((a, b) => a.compareTo(b));
 
@@ -235,12 +231,12 @@
 }
 
 /**
- * If the given [AstNode] is in a [ClassDeclaration], returns the
+ * If the given [AstNode] is in a [ClassOrMixinDeclaration], returns the
  * [ClassElement]. Otherwise returns `null`.
  */
 ClassElement getEnclosingClassElement(AstNode node) {
-  ClassDeclaration enclosingClassNode =
-      node.getAncestor((node) => node is ClassDeclaration);
+  ClassOrMixinDeclaration enclosingClassNode =
+      node.thisOrAncestorOfType<ClassOrMixinDeclaration>();
   if (enclosingClassNode != null) {
     return enclosingClassNode.declaredElement;
   }
@@ -470,40 +466,6 @@
 }
 
 /**
- * Returns a parsed [AstNode] for the given [classElement].
- *
- * The resulting AST structure may or may not be resolved.
- */
-AstNode getParsedClassElementNode(ClassElement classElement) {
-  CompilationUnitElement unitElement = getCompilationUnitElement(classElement);
-  CompilationUnit unit = getParsedUnit(unitElement);
-  int offset = classElement.nameOffset;
-  AstNode classNameNode = new NodeLocator(offset).searchWithin(unit);
-  if (classElement.isEnum) {
-    return classNameNode.getAncestor((node) => node is EnumDeclaration);
-  } else {
-    return classNameNode.getAncestor(
-        (node) => node is ClassDeclaration || node is ClassTypeAlias);
-  }
-}
-
-/**
- * Returns a parsed [CompilationUnit] for the given [unitElement].
- *
- * The resulting AST structure may or may not be resolved.
- * If it is not resolved, then at least the given [unitElement] will be set.
- */
-CompilationUnit getParsedUnit(CompilationUnitElement unitElement) {
-  AnalysisContext context = unitElement.context;
-  Source source = unitElement.source;
-  CompilationUnit unit = context.parseCompilationUnit(source);
-  if (unit.declaredElement == null) {
-    unit.element = unitElement;
-  }
-  return unit;
-}
-
-/**
  * If given [node] is name of qualified property extraction, returns target from
  * which this property is extracted, otherwise `null`.
  */
@@ -641,6 +603,8 @@
 
 class CorrectionUtils {
   final CompilationUnit unit;
+  final LibraryElement _library;
+  final String _buffer;
 
   /**
    * The [ClassElement] the generated code is inserted to, so we can decide if
@@ -650,19 +614,12 @@
 
   ExecutableElement targetExecutableElement;
 
-  LibraryElement _library;
-  String _buffer;
   String _endOfLine;
 
-  CorrectionUtils(this.unit, {String buffer}) {
-    CompilationUnitElement unitElement = unit.declaredElement;
-    AnalysisContext context = unitElement.context;
-    if (context == null) {
-      throw new CancelCorrectionException();
-    }
-    this._library = unitElement.library;
-    this._buffer = buffer ?? context.getContents(unitElement.source).data;
-  }
+  CorrectionUtils(ResolvedUnitResult result)
+      : unit = result.unit,
+        _library = result.libraryElement,
+        _buffer = result.content;
 
   /**
    * Returns the EOL to use for this [CompilationUnit].
@@ -690,7 +647,7 @@
   Set<String> findPossibleLocalVariableConflicts(int offset) {
     Set<String> conflicts = new Set<String>();
     AstNode enclosingNode = findNode(offset);
-    Block enclosingBlock = enclosingNode.getAncestor((node) => node is Block);
+    Block enclosingBlock = enclosingNode.thisOrAncestorOfType<Block>();
     if (enclosingBlock != null) {
       _CollectReferencedUnprefixedNames visitor =
           new _CollectReferencedUnprefixedNames();
@@ -1091,7 +1048,7 @@
    * Return `true` if the given [classDeclaration] has open '{' and close '}'
    * at the same line, e.g. `class X {}`.
    */
-  bool isClassWithEmptyBody(ClassDeclaration classDeclaration) {
+  bool isClassWithEmptyBody(ClassOrMixinDeclaration classDeclaration) {
     return getLineThis(classDeclaration.leftBracket.offset) ==
         getLineThis(classDeclaration.rightBracket.offset);
   }
@@ -1110,7 +1067,7 @@
   }
 
   ClassMemberLocation prepareNewClassMemberLocation(
-      ClassDeclaration classDeclaration,
+      ClassOrMixinDeclaration classDeclaration,
       bool shouldSkip(ClassMember existingMember)) {
     String indent = getIndent(1);
     // Find the last target member.
@@ -1145,13 +1102,13 @@
   }
 
   ClassMemberLocation prepareNewFieldLocation(
-      ClassDeclaration classDeclaration) {
+      ClassOrMixinDeclaration classDeclaration) {
     return prepareNewClassMemberLocation(
         classDeclaration, (member) => member is FieldDeclaration);
   }
 
   ClassMemberLocation prepareNewGetterLocation(
-      ClassDeclaration classDeclaration) {
+      ClassOrMixinDeclaration classDeclaration) {
     return prepareNewClassMemberLocation(
         classDeclaration,
         (member) =>
@@ -1161,7 +1118,7 @@
   }
 
   ClassMemberLocation prepareNewMethodLocation(
-      ClassDeclaration classDeclaration) {
+      ClassOrMixinDeclaration classDeclaration) {
     return prepareNewClassMemberLocation(
         classDeclaration,
         (member) =>
diff --git a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
index 23c804b..24d7722 100644
--- a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
+++ b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -14,8 +14,8 @@
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
-import 'package:analyzer/src/generated/bazel.dart';
-import 'package:analyzer/src/generated/gn.dart';
+import 'package:analyzer/src/workspace/bazel.dart';
+import 'package:analyzer/src/workspace/gn.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     show KytheEntry, KytheVName;
 
@@ -803,7 +803,7 @@
     // Most simple identifiers are "ref" edges.  In cases some cases, there may
     // be other ref/* edges.
 
-    if (node.getAncestor((node) => node is CommentReference) != null) {
+    if (node.thisOrAncestorOfType<CommentReference>() != null) {
       // The identifier is in a comment, add just the "ref" edge.
       _handleRefEdge(
         node.staticElement,
@@ -1106,7 +1106,7 @@
 /// This class is meant to be a mixin to concrete visitor methods to walk the
 /// [Element] or [AstNode]s produced by the Dart Analyzer to output Kythe
 /// [KytheEntry] protos.
-abstract class OutputUtils {
+mixin OutputUtils {
   /// A set of [String]s which have already had a name [KytheVName] created.
   final Set<String> nameNodes = new Set<String>();
 
diff --git a/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart b/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart
index 61dd338..94010f7 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/convert_getter_to_method.dart
@@ -10,10 +10,11 @@
 import 'package:analysis_server/src/services/refactoring/refactoring_internal.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 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/dart/element/ast_provider.dart';
+import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
@@ -23,13 +24,13 @@
 class ConvertGetterToMethodRefactoringImpl extends RefactoringImpl
     implements ConvertGetterToMethodRefactoring {
   final SearchEngine searchEngine;
-  final AstProvider astProvider;
+  final AnalysisSession session;
   final PropertyAccessorElement element;
 
   SourceChange change;
 
   ConvertGetterToMethodRefactoringImpl(
-      this.searchEngine, this.astProvider, this.element);
+      this.searchEngine, this.session, this.element);
 
   @override
   String get refactoringName => 'Convert Getter To Method';
@@ -92,8 +93,9 @@
     // prepare "get" keyword
     Token getKeyword = null;
     {
-      AstNode name = await astProvider.getParsedNameForElement(element);
-      AstNode declaration = name?.parent;
+      var sessionHelper = AnalysisSessionHelper(session);
+      var result = await sessionHelper.getElementDeclaration(element);
+      var declaration = result.node;
       if (declaration is MethodDeclaration) {
         getKeyword = declaration.propertyKeyword;
       } else if (declaration is FunctionDeclaration) {
diff --git a/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart b/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart
index 4f38b26..e7bc247 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/convert_method_to_getter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -12,8 +12,8 @@
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/analysis/session_helper.dart';
 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_plugin/utilities/range_factory.dart';
 
@@ -23,13 +23,13 @@
 class ConvertMethodToGetterRefactoringImpl extends RefactoringImpl
     implements ConvertMethodToGetterRefactoring {
   final SearchEngine searchEngine;
-  final AstProvider astProvider;
+  final AnalysisSessionHelper sessionHelper;
   final ExecutableElement element;
 
   SourceChange change;
 
-  ConvertMethodToGetterRefactoringImpl(
-      this.searchEngine, this.astProvider, this.element);
+  ConvertMethodToGetterRefactoringImpl(this.searchEngine, this.element)
+      : sessionHelper = AnalysisSessionHelper(element.session);
 
   @override
   String get refactoringName => 'Convert Method To Getter';
@@ -100,8 +100,8 @@
     // prepare parameters
     FormalParameterList parameters;
     {
-      AstNode name = await astProvider.getParsedNameForElement(element);
-      AstNode declaration = name?.parent;
+      var result = await sessionHelper.getElementDeclaration(element);
+      var declaration = result.node;
       if (declaration is MethodDeclaration) {
         parameters = declaration.parameters;
       } else if (declaration is FunctionDeclaration) {
@@ -133,11 +133,11 @@
       // prepare invocation
       MethodInvocation invocation;
       {
-        CompilationUnit refUnit =
-            await astProvider.getParsedUnitForElement(refElement);
-        AstNode refNode =
-            new NodeLocator(refRange.offset).searchWithin(refUnit);
-        invocation = refNode.getAncestor((node) => node is MethodInvocation);
+        var resolvedUnit =
+            await sessionHelper.getResolvedUnitByElement(refElement);
+        var refUnit = resolvedUnit.unit;
+        var refNode = new NodeLocator(refRange.offset).searchWithin(refUnit);
+        invocation = refNode.thisOrAncestorOfType<MethodInvocation>();
       }
       // we need invocation
       if (invocation != null) {
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
index cf9cd10..d8e0c05 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_local.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -31,7 +31,7 @@
  */
 class ExtractLocalRefactoringImpl extends RefactoringImpl
     implements ExtractLocalRefactoring {
-  final ResolveResult resolveResult;
+  final ResolvedUnitResult resolveResult;
   final int selectionOffset;
   final int selectionLength;
   SourceRange selectionRange;
@@ -56,7 +56,7 @@
   ExtractLocalRefactoringImpl(
       this.resolveResult, this.selectionOffset, this.selectionLength) {
     selectionRange = new SourceRange(selectionOffset, selectionLength);
-    utils = new CorrectionUtils(unit, buffer: resolveResult.content);
+    utils = new CorrectionUtils(resolveResult);
   }
 
   String get file => resolveResult.path;
@@ -319,7 +319,7 @@
     // into this block.  If it has an expression body, we can convert it into
     // the block body first.
     if (coveringNode == null ||
-        coveringNode.getAncestor((node) => node is FunctionBody) == null) {
+        coveringNode.thisOrAncestorOfType<FunctionBody>() == null) {
       return new RefactoringStatus.fatal(
           'An expression inside a function must be selected '
           'to activate this refactoring.');
@@ -414,7 +414,7 @@
       return expressionBody;
     }
     // single Statement
-    AstNode target = commonParent.getAncestor((node) => node is Statement);
+    AstNode target = commonParent.thisOrAncestorOfType<Statement>();
     while (target.parent is! Block) {
       target = target.parent;
     }
@@ -601,7 +601,7 @@
   }
 }
 
-class _OccurrencesVisitor extends GeneralizingAstVisitor<Object> {
+class _OccurrencesVisitor extends GeneralizingAstVisitor<void> {
   final ExtractLocalRefactoringImpl ref;
   final List<SourceRange> occurrences;
   final String selectionSource;
@@ -609,24 +609,24 @@
   _OccurrencesVisitor(this.ref, this.occurrences, this.selectionSource);
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     if (!_hasStatements(node)) {
       _tryToFindOccurrenceFragments(node);
-      return null;
+      return;
     }
-    return super.visitBinaryExpression(node);
+    super.visitBinaryExpression(node);
   }
 
   @override
-  Object visitExpression(Expression node) {
+  void visitExpression(Expression node) {
     if (ref._isExtractable(range.node(node))) {
       _tryToFindOccurrence(node);
     }
-    return super.visitExpression(node);
+    super.visitExpression(node);
   }
 
   @override
-  Object visitStringLiteral(StringLiteral node) {
+  void visitStringLiteral(StringLiteral node) {
     if (ref.stringLiteralPart != null) {
       int length = ref.stringLiteralPart.length;
       String value = ref.utils.getNodeText(node);
@@ -641,9 +641,9 @@
         SourceRange range = new SourceRange(start, length);
         occurrences.add(range);
       }
-      return null;
+      return;
     }
-    return visitExpression(node);
+    visitExpression(node);
   }
 
   void _addOccurrence(SourceRange range) {
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index 6969c41..bce5382 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -23,8 +23,8 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/resolver.dart' show ExitDetector;
 import 'package:analyzer/src/generated/resolver.dart';
@@ -74,8 +74,7 @@
       'execution flows exit. Semantics may not be preserved.';
 
   final SearchEngine searchEngine;
-  final AstProvider astProvider;
-  final ResolveResult resolveResult;
+  final ResolvedUnitResult resolveResult;
   final int selectionOffset;
   final int selectionLength;
   SourceRange selectionRange;
@@ -119,11 +118,10 @@
   List<_Occurrence> _occurrences = [];
   bool _staticContext = false;
 
-  ExtractMethodRefactoringImpl(this.searchEngine, this.astProvider,
-      this.resolveResult, this.selectionOffset, this.selectionLength) {
+  ExtractMethodRefactoringImpl(this.searchEngine, this.resolveResult,
+      this.selectionOffset, this.selectionLength) {
     selectionRange = new SourceRange(selectionOffset, selectionLength);
-    utils =
-        new CorrectionUtils(resolveResult.unit, buffer: resolveResult.content);
+    utils = new CorrectionUtils(resolveResult);
   }
 
   @override
@@ -138,8 +136,7 @@
   String get refactoringName {
     AstNode node =
         new NodeLocator(selectionOffset).searchWithin(resolveResult.unit);
-    if (node != null &&
-        node.getAncestor((node) => node is ClassDeclaration) != null) {
+    if (node != null && node.thisOrAncestorOfType<ClassDeclaration>() != null) {
       return 'Extract Method';
     }
     return 'Extract Function';
@@ -394,8 +391,8 @@
       }
     }
     // done
-    addLibraryImports(resolveResult.session.resourceProvider.pathContext,
-        change, resolveResult.libraryElement, librariesToImport);
+    await addLibraryImports(resolveResult.session, change,
+        resolveResult.libraryElement, librariesToImport);
     return change;
   }
 
@@ -454,8 +451,8 @@
     // method of class
     if (parent is ClassDeclaration) {
       ClassElement classElement = parent.declaredElement;
-      return validateCreateMethod(
-          searchEngine, astProvider, classElement, name);
+      return validateCreateMethod(searchEngine,
+          AnalysisSessionHelper(resolveResult.session), classElement, name);
     }
     // OK
     return new Future<RefactoringStatus>.value(result);
@@ -477,23 +474,20 @@
       }
     }
 
-    _ExtractMethodAnalyzer selectionAnalyzer =
-        new _ExtractMethodAnalyzer(resolveResult.unit, selectionRange);
-    resolveResult.unit.accept(selectionAnalyzer);
+    var analyzer = new _ExtractMethodAnalyzer(resolveResult, selectionRange);
+    analyzer.analyze();
     // May be a fatal error.
     {
-      if (selectionAnalyzer.status.hasFatalError) {
-        return selectionAnalyzer.status;
+      if (analyzer.status.hasFatalError) {
+        return analyzer.status;
       }
     }
 
-    List<AstNode> selectedNodes = selectionAnalyzer.selectedNodes;
+    List<AstNode> selectedNodes = analyzer.selectedNodes;
 
     // If no selected nodes, extract the smallest covering expression.
     if (selectedNodes.isEmpty) {
-      for (var node = selectionAnalyzer.coveringNode;
-          node != null;
-          node = node.parent) {
+      for (var node = analyzer.coveringNode; node != null; node = node.parent) {
         if (node is Statement) {
           break;
         }
@@ -586,7 +580,7 @@
     // Check for the parameter list of a FunctionExpression.
     {
       FunctionExpression function =
-          node?.getAncestor((n) => n is FunctionExpression);
+          node?.thisOrAncestorOfType<FunctionExpression>();
       if (function != null &&
           function.parameters != null &&
           range.node(function.parameters).contains(offset)) {
@@ -655,7 +649,7 @@
     // change indentation
     if (_selectionFunctionExpression != null) {
       AstNode baseNode =
-          _selectionFunctionExpression.getAncestor((node) => node is Statement);
+          _selectionFunctionExpression.thisOrAncestorOfType<Statement>();
       if (baseNode != null) {
         String baseIndent = utils.getNodePrefix(baseNode);
         String targetIndent = utils.getNodePrefix(_parentMember);
@@ -826,9 +820,8 @@
    * Checks if it is OK to extract the node with the given [SourceRange].
    */
   bool _isExtractable(SourceRange range) {
-    _ExtractMethodAnalyzer analyzer =
-        new _ExtractMethodAnalyzer(resolveResult.unit, range);
-    utils.unit.accept(analyzer);
+    var analyzer = new _ExtractMethodAnalyzer(resolveResult, range);
+    analyzer.analyze();
     return analyzer.status.isOK;
   }
 
@@ -929,8 +922,9 @@
  * [SelectionAnalyzer] for [ExtractMethodRefactoringImpl].
  */
 class _ExtractMethodAnalyzer extends StatementAnalyzer {
-  _ExtractMethodAnalyzer(CompilationUnit unit, SourceRange selection)
-      : super(unit, selection);
+  _ExtractMethodAnalyzer(
+      ResolvedUnitResult resolveResult, SourceRange selection)
+      : super(resolveResult, selection);
 
   @override
   void handleNextSelectedNode(AstNode node) {
@@ -1120,7 +1114,7 @@
   }
 }
 
-class _InitializeOccurrencesVisitor extends GeneralizingAstVisitor<Object> {
+class _InitializeOccurrencesVisitor extends GeneralizingAstVisitor<void> {
   final ExtractMethodRefactoringImpl ref;
   final _SourcePattern selectionPattern;
   final Map<String, String> patternToSelectionName;
@@ -1131,50 +1125,50 @@
       this.ref, this.selectionPattern, this.patternToSelectionName);
 
   @override
-  Object visitBlock(Block node) {
+  void visitBlock(Block node) {
     if (ref._selectionStatements != null) {
       _visitStatements(node.statements);
     }
-    return super.visitBlock(node);
+    super.visitBlock(node);
   }
 
   @override
-  Object visitConstructorInitializer(ConstructorInitializer node) {
+  void visitConstructorInitializer(ConstructorInitializer node) {
     forceStatic = true;
     try {
-      return super.visitConstructorInitializer(node);
+      super.visitConstructorInitializer(node);
     } finally {
       forceStatic = false;
     }
   }
 
   @override
-  Object visitExpression(Expression node) {
+  void visitExpression(Expression node) {
     if (ref._selectionFunctionExpression != null ||
         ref._selectionExpression != null &&
             node.runtimeType == ref._selectionExpression.runtimeType) {
       SourceRange nodeRange = range.node(node);
       _tryToFindOccurrence(nodeRange);
     }
-    return super.visitExpression(node);
+    super.visitExpression(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     forceStatic = node.isStatic;
     try {
-      return super.visitMethodDeclaration(node);
+      super.visitMethodDeclaration(node);
     } finally {
       forceStatic = false;
     }
   }
 
   @override
-  Object visitSwitchMember(SwitchMember node) {
+  void visitSwitchMember(SwitchMember node) {
     if (ref._selectionStatements != null) {
       _visitStatements(node.statements);
     }
-    return super.visitSwitchMember(node);
+    super.visitSwitchMember(node);
   }
 
   /**
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
index 8218754..b182f37 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -13,12 +13,13 @@
 import 'package:analysis_server/src/services/search/element_visitors.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analysis_server/src/utilities/flutter.dart';
-import 'package:analyzer/analyzer.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart' show SourceRange;
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
@@ -28,7 +29,7 @@
 class ExtractWidgetRefactoringImpl extends RefactoringImpl
     implements ExtractWidgetRefactoring {
   final SearchEngine searchEngine;
-  final ResolveResult resolveResult;
+  final ResolvedUnitResult resolveResult;
   final AnalysisSessionHelper sessionHelper;
   final int offset;
   final int length;
@@ -73,8 +74,7 @@
   ExtractWidgetRefactoringImpl(
       this.searchEngine, this.resolveResult, this.offset, this.length)
       : sessionHelper = new AnalysisSessionHelper(resolveResult.session) {
-    utils =
-        new CorrectionUtils(resolveResult.unit, buffer: resolveResult.content);
+    utils = new CorrectionUtils(resolveResult);
   }
 
   @override
@@ -103,7 +103,7 @@
     }
 
     AstNode astNode = _expression ?? _method ?? _statements.first;
-    _enclosingUnitMember = astNode.getAncestor((n) {
+    _enclosingUnitMember = astNode.thisOrAncestorMatching((n) {
       return n is CompilationUnitMember && n.parent is CompilationUnit;
     });
 
@@ -178,7 +178,7 @@
     }
 
     // Find the enclosing class.
-    _enclosingClassNode = node?.getAncestor((n) => n is ClassDeclaration);
+    _enclosingClassNode = node?.thisOrAncestorOfType<ClassDeclaration>();
     _enclosingClassElement = _enclosingClassNode?.declaredElement;
 
     // new MyWidget(...)
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
index eafbcaf..00b8883 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -14,8 +14,8 @@
 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/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
@@ -26,8 +26,7 @@
 class InlineLocalRefactoringImpl extends RefactoringImpl
     implements InlineLocalRefactoring {
   final SearchEngine searchEngine;
-  final AstProvider astProvider;
-  final ResolveResult resolveResult;
+  final ResolvedUnitResult resolveResult;
   final int offset;
   CorrectionUtils utils;
 
@@ -36,9 +35,8 @@
   List<SearchMatch> _references;
 
   InlineLocalRefactoringImpl(
-      this.searchEngine, this.astProvider, this.resolveResult, this.offset) {
-    utils =
-        new CorrectionUtils(resolveResult.unit, buffer: resolveResult.content);
+      this.searchEngine, this.resolveResult, this.offset) {
+    utils = new CorrectionUtils(resolveResult);
   }
 
   @override
@@ -79,8 +77,10 @@
         Element element = offsetNode.staticElement;
         if (element is LocalVariableElement) {
           _variableElement = element;
-          AstNode name = await astProvider.getResolvedNameForElement(element);
-          _variableNode = name.parent as VariableDeclaration;
+          var declarationResult =
+              await AnalysisSessionHelper(resolveResult.session)
+                  .getElementDeclaration(element);
+          _variableNode = declarationResult.node;
         }
       }
     }
@@ -121,8 +121,8 @@
     SourceChange change = new SourceChange(refactoringName);
     // remove declaration
     {
-      Statement declarationStatement = _variableNode
-          .getAncestor((node) => node is VariableDeclarationStatement);
+      Statement declarationStatement =
+          _variableNode.thisOrAncestorOfType<VariableDeclarationStatement>();
       SourceRange range = utils.getLinesRangeStatements([declarationStatement]);
       doSourceChange_addElementEdit(change, resolveResult.unit.declaredElement,
           newSourceEdit_range(range, ''));
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 05e5c1b..4d7b4e2 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -16,8 +16,8 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/analysis/session_helper.dart';
 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_plugin/utilities/range_factory.dart';
 
@@ -26,7 +26,7 @@
  */
 SourceRange _getLocalsConflictingRange(AstNode node) {
   // maybe Block
-  Block block = node.getAncestor((node) => node is Block);
+  Block block = node.thisOrAncestorOfType<Block>();
   if (block != null) {
     return range.startEnd(node, block);
   }
@@ -188,10 +188,9 @@
 class InlineMethodRefactoringImpl extends RefactoringImpl
     implements InlineMethodRefactoring {
   final SearchEngine searchEngine;
-  final AstProvider astProvider;
-  final ResolveResult resolveResult;
+  final ResolvedUnitResult resolveResult;
   final int offset;
-  ResolvedUnitCache _unitCache;
+  final AnalysisSessionHelper sessionHelper;
   CorrectionUtils utils;
   SourceChange change;
 
@@ -200,7 +199,6 @@
   bool inlineAll = true;
 
   ExecutableElement _methodElement;
-  bool _isAccessor;
   CompilationUnit _methodUnit;
   CorrectionUtils _methodUtils;
   AstNode _methodNode;
@@ -210,13 +208,12 @@
   _SourcePart _methodExpressionPart;
   _SourcePart _methodStatementsPart;
   final List<_ReferenceProcessor> _referenceProcessors = [];
-  final Set<FunctionBody> _alreadyMadeAsync = new Set<FunctionBody>();
+  final Set<Element> _alreadyMadeAsync = new Set<Element>();
 
   InlineMethodRefactoringImpl(
-      this.searchEngine, this.astProvider, this.resolveResult, this.offset) {
-    _unitCache = new ResolvedUnitCache(astProvider, resolveResult.unit);
-    utils =
-        new CorrectionUtils(resolveResult.unit, buffer: resolveResult.content);
+      this.searchEngine, this.resolveResult, this.offset)
+      : sessionHelper = AnalysisSessionHelper(resolveResult.session) {
+    utils = new CorrectionUtils(resolveResult);
   }
 
   @override
@@ -311,24 +308,6 @@
     return new Future.value(change);
   }
 
-  Future<FunctionDeclaration> _computeFunctionDeclaration() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    CompilationUnit unit = await _unitCache.getUnit(_methodElement);
-    return new NodeLocator(_methodElement.nameOffset)
-        .searchWithin(unit)
-        .getAncestor((n) => n is FunctionDeclaration) as FunctionDeclaration;
-  }
-
-  Future<MethodDeclaration> _computeMethodDeclaration() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    CompilationUnit unit = await _unitCache.getUnit(_methodElement);
-    return new NodeLocator(_methodElement.nameOffset)
-        .searchWithin(unit)
-        .getAncestor((n) => n is MethodDeclaration) as MethodDeclaration;
-  }
-
   _SourcePart _createSourcePart(SourceRange range) {
     String source = _methodUtils.getRangeText(range);
     String prefix = getLinePrefix(source);
@@ -368,38 +347,30 @@
       return fatalStatus;
     }
     _methodElement = element as ExecutableElement;
-    _isAccessor = element is PropertyAccessorElement;
-    _methodUnit = await _unitCache.getUnit(element);
-    _methodUtils = new CorrectionUtils(_methodUnit);
-    // class member
-    bool isClassMember = element.enclosingElement is ClassElement;
-    if (element is MethodElement || _isAccessor && isClassMember) {
-      MethodDeclaration methodDeclaration = await _computeMethodDeclaration();
-      _methodNode = methodDeclaration;
-      _methodParameters = methodDeclaration.parameters;
-      _methodBody = methodDeclaration.body;
-      // prepare mode
-      isDeclaration = node == methodDeclaration.name;
-      deleteSource = isDeclaration;
-      inlineAll = deleteSource;
-      return new RefactoringStatus();
+
+    var declaration = await sessionHelper.getElementDeclaration(_methodElement);
+    var methodNode = declaration.node;
+    _methodNode = methodNode;
+
+    var resolvedUnit = declaration.resolvedUnit;
+    _methodUnit = resolvedUnit.unit;
+    _methodUtils = new CorrectionUtils(resolvedUnit);
+
+    if (methodNode is MethodDeclaration) {
+      _methodParameters = methodNode.parameters;
+      _methodBody = methodNode.body;
+    } else if (methodNode is FunctionDeclaration) {
+      _methodParameters = methodNode.functionExpression.parameters;
+      _methodBody = methodNode.functionExpression.body;
+    } else {
+      return fatalStatus;
     }
-    // unit member
-    bool isUnitMember = element.enclosingElement is CompilationUnitElement;
-    if (element is FunctionElement || _isAccessor && isUnitMember) {
-      FunctionDeclaration functionDeclaration =
-          await _computeFunctionDeclaration();
-      _methodNode = functionDeclaration;
-      _methodParameters = functionDeclaration.functionExpression.parameters;
-      _methodBody = functionDeclaration.functionExpression.body;
-      // prepare mode
-      isDeclaration = node == functionDeclaration.name;
-      deleteSource = isDeclaration;
-      inlineAll = deleteSource;
-      return new RefactoringStatus();
-    }
-    // OK
-    return fatalStatus;
+
+    isDeclaration = resolveResult.uri == element.source.uri &&
+        node.offset == element.nameOffset;
+    deleteSource = isDeclaration;
+    inlineAll = deleteSource;
+    return new RefactoringStatus();
   }
 
   /**
@@ -467,12 +438,14 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     refElement = reference.element;
+
     // prepare CorrectionUtils
-    CompilationUnit refUnit = await ref._unitCache.getUnit(refElement);
-    _refUtils = new CorrectionUtils(refUnit);
+    var result = await ref.sessionHelper.getResolvedUnitByElement(refElement);
+    _refUtils = new CorrectionUtils(result);
+
     // prepare node and environment
     _node = _refUtils.findNode(reference.sourceRange.offset);
-    Statement refStatement = _node.getAncestor((node) => node is Statement);
+    Statement refStatement = _node.thisOrAncestorOfType<Statement>();
     if (refStatement != null) {
       _refLineRange = _refUtils.getLinesRangeStatements([refStatement]);
       _refPrefix = _refUtils.getNodePrefix(refStatement);
@@ -591,7 +564,7 @@
     // If the element being inlined is async, ensure that the function
     // body that encloses the method is also async.
     if (ref._methodElement.isAsynchronous) {
-      FunctionBody body = _node.getAncestor((n) => n is FunctionBody);
+      FunctionBody body = _node.thisOrAncestorOfType<FunctionBody>();
       if (body != null) {
         if (body.isSynchronous) {
           if (body.isGenerator) {
@@ -608,7 +581,7 @@
               return;
             }
           }
-          if (ref._alreadyMadeAsync.add(body)) {
+          if (ref._alreadyMadeAsync.add(refElement)) {
             SourceRange bodyStart = range.startLength(body, 0);
             _addRefEdit(newSourceEdit_range(bodyStart, 'async '));
           }
@@ -650,7 +623,7 @@
         List<Expression> arguments = [];
         if (_node.inSetterContext()) {
           AssignmentExpression assignment =
-              _node.getAncestor((node) => node is AssignmentExpression);
+              _node.thisOrAncestorOfType<AssignmentExpression>();
           arguments.add(assignment.rightHandSide);
         }
         // inline body
diff --git a/pkg/analysis_server/lib/src/services/refactoring/move_file.dart b/pkg/analysis_server/lib/src/services/refactoring/move_file.dart
index d2e3c69..a068451 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/move_file.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/move_file.dart
@@ -32,6 +32,8 @@
   String oldFile;
   String newFile;
 
+  final packagePrefixedStringPattern = new RegExp(r'''^r?['"]+package:''');
+
   MoveFileRefactoringImpl(ResourceProvider resourceProvider, this.workspace,
       this.source, this.oldFile)
       : resourceProvider = resourceProvider,
@@ -90,7 +92,8 @@
       });
     } else {
       // Otherwise, we need to update any relative part-of references.
-      Iterable<PartOfDirective> partOfs = element.unit.directives
+      final result = await driver.currentSession.getResolvedUnit(oldFile);
+      Iterable<PartOfDirective> partOfs = result.unit.directives
           .whereType<PartOfDirective>()
           .where((po) => po.uri != null && _isRelativeUri(po.uri.stringValue));
 
@@ -139,7 +142,12 @@
     return _getRelativeUri(newFile, refDir);
   }
 
-  final packagePrefixedStringPattern = new RegExp(r'''^r?['"]+package:''');
+  String _getRelativeUri(String path, String from) {
+    String uri = pathContext.relative(path, from: from);
+    List<String> parts = pathContext.split(uri);
+    return pathos.posix.joinAll(parts);
+  }
+
   bool _isPackageReference(SourceReference reference) {
     final Source source = reference.element.source;
     final String quotedImportUri = source.contents.data.substring(
@@ -148,12 +156,6 @@
     return packagePrefixedStringPattern.hasMatch(quotedImportUri);
   }
 
-  String _getRelativeUri(String path, String from) {
-    String uri = pathContext.relative(path, from: from);
-    List<String> parts = pathContext.split(uri);
-    return pathos.posix.joinAll(parts);
-  }
-
   /**
    * Checks if the given [path] represents a relative URI.
    *
diff --git a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
index 50e2344..223d699 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
@@ -22,11 +22,11 @@
 import 'package:analysis_server/src/services/refactoring/rename_unit_member.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     show RefactoringMethodParameter, SourceChange;
@@ -40,9 +40,9 @@
    * [element] and all the corresponding hierarchy elements.
    */
   factory ConvertGetterToMethodRefactoring(SearchEngine searchEngine,
-      AstProvider astProvider, PropertyAccessorElement element) {
+      AnalysisSession session, PropertyAccessorElement element) {
     return new ConvertGetterToMethodRefactoringImpl(
-        searchEngine, astProvider, element);
+        searchEngine, session, element);
   }
 }
 
@@ -55,9 +55,8 @@
    * [element] and all the corresponding hierarchy elements.
    */
   factory ConvertMethodToGetterRefactoring(SearchEngine searchEngine,
-      AstProvider astProvider, ExecutableElement element) {
-    return new ConvertMethodToGetterRefactoringImpl(
-        searchEngine, astProvider, element);
+      AnalysisSession session, ExecutableElement element) {
+    return new ConvertMethodToGetterRefactoringImpl(searchEngine, element);
   }
 }
 
@@ -68,7 +67,7 @@
   /**
    * Returns a new [ExtractLocalRefactoring] instance.
    */
-  factory ExtractLocalRefactoring(ResolveResult resolveResult,
+  factory ExtractLocalRefactoring(ResolvedUnitResult resolveResult,
       int selectionOffset, int selectionLength) = ExtractLocalRefactoringImpl;
 
   /**
@@ -144,12 +143,11 @@
    */
   factory ExtractMethodRefactoring(
       SearchEngine searchEngine,
-      AstProvider astProvider,
-      ResolveResult resolveResult,
+      ResolvedUnitResult resolveResult,
       int selectionOffset,
       int selectionLength) {
-    return new ExtractMethodRefactoringImpl(searchEngine, astProvider,
-        resolveResult, selectionOffset, selectionLength);
+    return new ExtractMethodRefactoringImpl(
+        searchEngine, resolveResult, selectionOffset, selectionLength);
   }
 
   /**
@@ -243,7 +241,7 @@
    * Returns a new [ExtractWidgetRefactoring] instance.
    */
   factory ExtractWidgetRefactoring(SearchEngine searchEngine,
-      ResolveResult resolveResult, int offset, int length) {
+      ResolvedUnitResult resolveResult, int offset, int length) {
     return new ExtractWidgetRefactoringImpl(
         searchEngine, resolveResult, offset, length);
   }
@@ -278,10 +276,9 @@
   /**
    * Returns a new [InlineLocalRefactoring] instance.
    */
-  factory InlineLocalRefactoring(SearchEngine searchEngine,
-      AstProvider astProvider, ResolveResult resolveResult, int offset) {
-    return new InlineLocalRefactoringImpl(
-        searchEngine, astProvider, resolveResult, offset);
+  factory InlineLocalRefactoring(
+      SearchEngine searchEngine, ResolvedUnitResult resolveResult, int offset) {
+    return new InlineLocalRefactoringImpl(searchEngine, resolveResult, offset);
   }
 
   /**
@@ -302,10 +299,9 @@
   /**
    * Returns a new [InlineMethodRefactoring] instance.
    */
-  factory InlineMethodRefactoring(SearchEngine searchEngine,
-      AstProvider astProvider, ResolveResult resolveResult, int offset) {
-    return new InlineMethodRefactoringImpl(
-        searchEngine, astProvider, resolveResult, offset);
+  factory InlineMethodRefactoring(
+      SearchEngine searchEngine, ResolvedUnitResult resolveResult, int offset) {
+    return new InlineMethodRefactoringImpl(searchEngine, resolveResult, offset);
   }
 
   /**
@@ -413,6 +409,13 @@
   RefactoringWorkspace(this.drivers, this.searchEngine);
 
   /**
+   * Whether the [element] is defined in a file that is in a context root.
+   */
+  bool containsElement(Element element) {
+    return containsFile(element.source.fullName);
+  }
+
+  /**
    * Whether the file with the given [path] is in a context root.
    */
   bool containsFile(String path) {
@@ -441,7 +444,7 @@
    * type.
    */
   factory RenameRefactoring(RefactoringWorkspace workspace,
-      AstProvider astProvider, Element element) {
+      AnalysisSession session, Element element) {
     if (element == null) {
       return null;
     }
@@ -452,11 +455,10 @@
       return new RenameUnitMemberRefactoringImpl(workspace, element);
     }
     if (element is ConstructorElement) {
-      return new RenameConstructorRefactoringImpl(
-          workspace, astProvider, element);
+      return new RenameConstructorRefactoringImpl(workspace, session, element);
     }
     if (element is ImportElement) {
-      return new RenameImportRefactoringImpl(workspace, astProvider, element);
+      return new RenameImportRefactoringImpl(workspace, session, element);
     }
     if (element is LabelElement) {
       return new RenameLabelRefactoringImpl(workspace, element);
@@ -465,11 +467,10 @@
       return new RenameLibraryRefactoringImpl(workspace, element);
     }
     if (element is LocalElement) {
-      return new RenameLocalRefactoringImpl(workspace, astProvider, element);
+      return new RenameLocalRefactoringImpl(workspace, element);
     }
     if (element.enclosingElement is ClassElement) {
-      return new RenameClassMemberRefactoringImpl(
-          workspace, astProvider, element);
+      return new RenameClassMemberRefactoringImpl(workspace, session, element);
     }
     return null;
   }
@@ -501,38 +502,3 @@
    */
   RefactoringStatus checkNewName();
 }
-
-/**
- * Cache for accessing resolved [CompilationUnit]s by [Element]s.
- *
- * Must by short-lived.
- *
- * TODO(scheglov) consider moving to request-bound object.
- */
-class ResolvedUnitCache {
-  final AstProvider _astProvider;
-  final Map<CompilationUnitElement, CompilationUnit> _map = {};
-
-  ResolvedUnitCache(this._astProvider, [CompilationUnit unit]) {
-    if (unit != null) {
-      _map[unit.declaredElement] = unit;
-    }
-  }
-
-  Future<CompilationUnit> getUnit(Element element) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    CompilationUnitElement unitElement = getUnitElement(element);
-    CompilationUnit unit = _map[unitElement];
-    if (unit == null) {
-      unit = await _astProvider.getResolvedUnitForElement(element);
-      _map[unitElement] = unit;
-    }
-    return unit;
-  }
-
-  CompilationUnitElement getUnitElement(Element element) {
-    return element.getAncestor((e) => e is CompilationUnitElement)
-        as CompilationUnitElement;
-  }
-}
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename.dart b/pkg/analysis_server/lib/src/services/refactoring/rename.dart
index d7f193c..b7663c0 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename.dart
@@ -18,17 +18,17 @@
  * Helper for renaming one or more [Element]s.
  */
 class RenameProcessor {
-  final SearchEngine searchEngine;
+  final RefactoringWorkspace workspace;
   final SourceChange change;
   final String newName;
 
-  RenameProcessor(this.searchEngine, this.change, this.newName);
+  RenameProcessor(this.workspace, this.change, this.newName);
 
   /**
    * Add the edit that updates the [element] declaration.
    */
   void addDeclarationEdit(Element element) {
-    if (element != null) {
+    if (element != null && workspace.containsElement(element)) {
       SourceEdit edit =
           newSourceEdit_range(range.elementName(element), newName);
       doSourceChange_addElementEdit(change, element, edit);
@@ -41,6 +41,9 @@
   void addReferenceEdits(List<SearchMatch> matches) {
     List<SourceReference> references = getSourceReferences(matches);
     for (SourceReference reference in references) {
+      if (!workspace.containsElement(reference.element)) {
+        continue;
+      }
       reference.addEdit(change, newName);
     }
   }
@@ -50,7 +53,9 @@
    */
   Future<void> renameElement(Element element) {
     addDeclarationEdit(element);
-    return searchEngine.searchReferences(element).then(addReferenceEdits);
+    return workspace.searchEngine
+        .searchReferences(element)
+        .then(addReferenceEdits);
   }
 }
 
@@ -86,7 +91,7 @@
           getElementQualifiedName(element));
       result.addFatalError(message);
     }
-    if (!workspace.containsFile(element.source.fullName)) {
+    if (!workspace.containsElement(element)) {
       String message = format(
           "The {0} '{1}' is defined outside of the project, so cannot be renamed.",
           getElementKindName(element),
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart
index d085e78..df98b9e 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_class_member.dart
@@ -14,10 +14,11 @@
 import 'package:analysis_server/src/services/refactoring/rename.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
+import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
 
@@ -25,10 +26,13 @@
  * Checks if creating a method with the given [name] in [classElement] will
  * cause any conflicts.
  */
-Future<RefactoringStatus> validateCreateMethod(SearchEngine searchEngine,
-    AstProvider astProvider, ClassElement classElement, String name) {
+Future<RefactoringStatus> validateCreateMethod(
+    SearchEngine searchEngine,
+    AnalysisSessionHelper sessionHelper,
+    ClassElement classElement,
+    String name) {
   return new _ClassMemberValidator.forCreate(
-          searchEngine, astProvider, classElement, name)
+          searchEngine, sessionHelper, classElement, name)
       .validate();
 }
 
@@ -36,13 +40,14 @@
  * A [Refactoring] for renaming class member [Element]s.
  */
 class RenameClassMemberRefactoringImpl extends RenameRefactoringImpl {
-  final AstProvider astProvider;
+  final AnalysisSessionHelper sessionHelper;
 
   _ClassMemberValidator _validator;
 
   RenameClassMemberRefactoringImpl(
-      RefactoringWorkspace workspace, this.astProvider, Element element)
-      : super(workspace, element);
+      RefactoringWorkspace workspace, AnalysisSession session, Element element)
+      : sessionHelper = AnalysisSessionHelper(session),
+        super(workspace, element);
 
   @override
   String get refactoringName {
@@ -58,7 +63,7 @@
   @override
   Future<RefactoringStatus> checkFinalConditions() {
     _validator = new _ClassMemberValidator.forRename(
-        searchEngine, astProvider, element, newName);
+        searchEngine, sessionHelper, element, newName);
     return _validator.validate();
   }
 
@@ -87,7 +92,7 @@
 
   @override
   Future<void> fillChange() async {
-    var processor = new RenameProcessor(searchEngine, change, newName);
+    var processor = new RenameProcessor(workspace, change, newName);
     // update declarations
     for (Element renameElement in _validator.elements) {
       if (renameElement.isSynthetic && renameElement is FieldElement) {
@@ -105,7 +110,7 @@
     List<SourceReference> nameRefs = getSourceReferences(nameMatches);
     for (SourceReference reference in nameRefs) {
       // ignore references from SDK and pub cache
-      if (!workspace.containsFile(reference.element.source.fullName)) {
+      if (!workspace.containsElement(reference.element)) {
         continue;
       }
       // check the element being renamed is accessible
@@ -132,7 +137,7 @@
  */
 class _ClassMemberValidator {
   final SearchEngine searchEngine;
-  final ResolvedUnitCache unitCache;
+  final AnalysisSessionHelper sessionHelper;
   final LibraryElement library;
   final Element element;
   final ClassElement elementClass;
@@ -145,17 +150,15 @@
   List<SearchMatch> references = <SearchMatch>[];
 
   _ClassMemberValidator.forCreate(
-      this.searchEngine, AstProvider astProvider, this.elementClass, this.name)
-      : unitCache = new ResolvedUnitCache(astProvider),
-        isRename = false,
+      this.searchEngine, this.sessionHelper, this.elementClass, this.name)
+      : isRename = false,
         library = null,
         element = null,
         elementKind = ElementKind.METHOD;
 
   _ClassMemberValidator.forRename(
-      this.searchEngine, AstProvider astProvider, Element element, this.name)
-      : unitCache = new ResolvedUnitCache(astProvider),
-        isRename = true,
+      this.searchEngine, this.sessionHelper, Element element, this.name)
+      : isRename = true,
         library = element.library,
         element = element,
         elementClass = element.enclosingElement,
@@ -260,12 +263,13 @@
     Future<List<LocalElement>> getLocalElements(Element element) async {
       // TODO(brianwilkerson) Determine whether this await is necessary.
       await null;
-      var unitElement = unitCache.getUnitElement(element);
+
+      var resolvedUnit = await sessionHelper.getResolvedUnitByElement(element);
+      var unitElement = resolvedUnit.unit.declaredElement;
       var localElements = localElementMap[unitElement];
       if (localElements == null) {
-        var unit = await unitCache.getUnit(unitElement);
         var collector = new _LocalElementsCollector(name);
-        unit.accept(collector);
+        resolvedUnit.unit.accept(collector);
         localElements = collector.elements;
         localElementMap[unitElement] = localElements;
       }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
index 755ebff..6baadf4 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_constructor.dart
@@ -14,9 +14,10 @@
 import 'package:analysis_server/src/services/search/hierarchy.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
+import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
@@ -25,10 +26,10 @@
  * A [Refactoring] for renaming [ConstructorElement]s.
  */
 class RenameConstructorRefactoringImpl extends RenameRefactoringImpl {
-  final AstProvider astProvider;
+  final AnalysisSession session;
 
-  RenameConstructorRefactoringImpl(RefactoringWorkspace workspace,
-      this.astProvider, ConstructorElement element)
+  RenameConstructorRefactoringImpl(
+      RefactoringWorkspace workspace, this.session, ConstructorElement element)
       : super(workspace, element);
 
   @override
@@ -117,11 +118,12 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     ClassElement classElement = element.enclosingElement;
-    AstNode name = await astProvider.getResolvedNameForElement(classElement);
-    ClassDeclaration classNode = name.parent as ClassDeclaration;
-    CorrectionUtils utils = new CorrectionUtils(classNode.parent);
-    ClassMemberLocation location =
-        utils.prepareNewConstructorLocation(classNode);
+
+    var result = await AnalysisSessionHelper(session)
+        .getElementDeclaration(classElement);
+    ClassDeclaration classNode = result.node;
+    var utils = new CorrectionUtils(result.resolvedUnit);
+    var location = utils.prepareNewConstructorLocation(classNode);
     doSourceChange_addElementEdit(
         change,
         classElement,
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart
index 53e382b..2bc3c99 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_import.dart
@@ -11,12 +11,10 @@
 import 'package:analysis_server/src/services/refactoring/refactoring_internal.dart';
 import 'package:analysis_server/src/services/refactoring/rename.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
-import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 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_plugin/utilities/range_factory.dart';
 
@@ -24,10 +22,10 @@
  * A [Refactoring] for renaming [ImportElement]s.
  */
 class RenameImportRefactoringImpl extends RenameRefactoringImpl {
-  final AstProvider astProvider;
+  final AnalysisSession session;
 
   RenameImportRefactoringImpl(
-      RefactoringWorkspace workspace, this.astProvider, ImportElement element)
+      RefactoringWorkspace workspace, this.session, ImportElement element)
       : super(workspace, element);
 
   @override
@@ -60,14 +58,14 @@
       PrefixElement prefix = element.prefix;
       SourceEdit edit = null;
       if (newName.isEmpty) {
-        ImportDirective node = await _findNode();
+        ImportDirective node = _findNode();
         int uriEnd = node.uri.end;
         int prefixEnd = element.prefixOffset + prefix.nameLength;
         edit = newSourceEdit_range(
             range.startOffsetEndOffset(uriEnd, prefixEnd), "");
       } else {
         if (prefix == null) {
-          ImportDirective node = await _findNode();
+          ImportDirective node = _findNode();
           int uriEnd = node.uri.end;
           edit =
               newSourceEdit_range(new SourceRange(uriEnd, 0), " as $newName");
@@ -89,7 +87,7 @@
         reference.addEdit(change, '');
       } else {
         SimpleIdentifier interpolationIdentifier =
-            await _getInterpolationIdentifier(reference);
+            _getInterpolationIdentifier(reference);
         if (interpolationIdentifier != null) {
           doSourceChange_addElementEdit(
               change,
@@ -108,11 +106,10 @@
   /**
    * Return the [ImportDirective] node that corresponds to the [element].
    */
-  Future<ImportDirective> _findNode() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  ImportDirective _findNode() {
     LibraryElement library = element.library;
-    CompilationUnit unit = await astProvider.getParsedUnitForElement(library);
+    String path = library.source.fullName;
+    CompilationUnit unit = session.getParsedUnit(path).unit;
     int index = library.imports.indexOf(element);
     return unit.directives.where((d) => d is ImportDirective).toList()[index];
   }
@@ -122,14 +119,9 @@
    * an [InterpolationExpression] without surrounding curly brackets, return it.
    * Otherwise return `null`.
    */
-  Future<SimpleIdentifier> _getInterpolationIdentifier(
-      SourceReference reference) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  SimpleIdentifier _getInterpolationIdentifier(SourceReference reference) {
     Source source = reference.element.source;
-    AnalysisSession currentSession = astProvider.driver.currentSession;
-    ParseResult result = await currentSession.getParsedAst(source.fullName);
-    CompilationUnit unit = result.unit;
+    CompilationUnit unit = session.getParsedUnit(source.fullName).unit;
     NodeLocator nodeLocator = new NodeLocator(reference.range.offset);
     AstNode node = nodeLocator.searchWithin(unit);
     if (node is SimpleIdentifier) {
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_label.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_label.dart
index 643be1f..012f500 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_label.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_label.dart
@@ -39,7 +39,7 @@
 
   @override
   Future<void> fillChange() {
-    var processor = new RenameProcessor(searchEngine, change, newName);
+    var processor = new RenameProcessor(workspace, change, newName);
     return processor.renameElement(element);
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart
index e270f82..8ad6912 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_library.dart
@@ -41,7 +41,7 @@
 
   @override
   Future<void> fillChange() async {
-    var processor = new RenameProcessor(searchEngine, change, newName);
+    var processor = new RenameProcessor(workspace, change, newName);
     await processor.renameElement(element);
   }
 }
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 369b832..7fac53a 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_local.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -15,21 +15,20 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
+import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /**
  * A [Refactoring] for renaming [LocalElement]s.
  */
 class RenameLocalRefactoringImpl extends RenameRefactoringImpl {
-  final AstProvider astProvider;
-  final ResolvedUnitCache unitCache;
+  final AnalysisSessionHelper sessionHelper;
 
   List<LocalElement> elements = [];
 
   RenameLocalRefactoringImpl(
-      RefactoringWorkspace workspace, this.astProvider, LocalElement element)
-      : unitCache = new ResolvedUnitCache(astProvider),
+      RefactoringWorkspace workspace, LocalElement element)
+      : sessionHelper = AnalysisSessionHelper(element.session),
         super(workspace, element);
 
   @override
@@ -53,10 +52,9 @@
     RefactoringStatus result = new RefactoringStatus();
     await _prepareElements();
     for (LocalElement element in elements) {
-      CompilationUnit unit = await unitCache.getUnit(element);
-      if (unit != null) {
-        unit.accept(new _ConflictValidatorVisitor(result, newName, element));
-      }
+      var resolvedUnit = await sessionHelper.getResolvedUnitByElement(element);
+      var unit = resolvedUnit.unit;
+      unit.accept(new _ConflictValidatorVisitor(result, newName, element));
     }
     return result;
   }
@@ -76,7 +74,7 @@
 
   @override
   Future<void> fillChange() async {
-    var processor = new RenameProcessor(searchEngine, change, newName);
+    var processor = new RenameProcessor(workspace, change, newName);
     for (Element element in elements) {
       processor.addDeclarationEdit(element);
       var references = await searchEngine.searchReferences(element);
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
index 88cac3a..5d20312 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
@@ -127,7 +127,7 @@
     }
 
     // Rename each element and references to it.
-    var processor = new RenameProcessor(searchEngine, change, newName);
+    var processor = new RenameProcessor(workspace, change, newName);
     for (var element in elements) {
       await processor.renameElement(element);
     }
@@ -136,7 +136,7 @@
     if (_flutterWidgetState != null) {
       _updateFlutterWidgetStateName();
       await new RenameProcessor(
-        searchEngine,
+        workspace,
         change,
         _flutterWidgetStateNewName,
       ).renameElement(_flutterWidgetState);
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine.dart b/pkg/analysis_server/lib/src/services/search/search_engine.dart
index df6e31c..74445c4 100644
--- a/pkg/analysis_server/lib/src/services/search/search_engine.dart
+++ b/pkg/analysis_server/lib/src/services/search/search_engine.dart
@@ -140,7 +140,7 @@
   MatchKind get kind;
 
   /**
-   * Return the [LibraryElement] for the [libraryUri] in the [context].
+   * Return the [LibraryElement] for the [file].
    */
   LibraryElement get libraryElement;
 
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index dc21222..44fff0a 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -12,7 +12,6 @@
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/domain_completion.dart';
-import 'package:analysis_server/src/domain_diagnostic.dart';
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
 import 'package:analysis_server/src/server/http_server.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
@@ -21,12 +20,12 @@
 import 'package:analysis_server/src/status/element_writer.dart';
 import 'package:analysis_server/src/status/pages.dart';
 import 'package:analysis_server/src/utilities/profiling.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/src/context/context_root.dart';
 import 'package:analyzer/src/context/source.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
 import 'package:analyzer/src/generated/sdk.dart';
@@ -187,7 +186,7 @@
           raw: true);
       return;
     }
-    AnalysisResult result = await driver.getResult(path);
+    ResolvedUnitResult result = await driver.getResult(path);
     if (result == null) {
       p(
           'An AST could not be produced for the file '
@@ -387,7 +386,6 @@
     b.write(writeOption('Strong mode', options.strongMode));
     b.write(writeOption('Implicit dynamic', options.implicitDynamic));
     b.write(writeOption('Implicit casts', options.implicitCasts));
-    b.write(writeOption('Declaration casts', options.declarationCasts));
 
     b.write(
         writeOption('Analyze function bodies', options.analyzeFunctionBodies));
@@ -400,6 +398,8 @@
     b.write(writeOption('Preserve comments', options.preserveComments));
     b.write(writeOption('Strong mode hints', options.strongModeHints));
 
+    b.write(writeOption('Enabled experiments', options.enabledExperiments));
+
     return b.toString();
   }
 
@@ -714,7 +714,7 @@
   SocketServer socketServer;
 
   /// The last few lines printed.
-  List<String> lastPrintedLines = <String>[];
+  final List<String> lastPrintedLines;
 
   DiagnosticsSite(this.socketServer, this.lastPrintedLines)
       : super('Analysis Server') {
@@ -724,7 +724,6 @@
     pages.add(new EnvironmentVariablesPage(this));
     pages.add(new ExceptionsPage(this));
     pages.add(new InstrumentationPage(this));
-    pages.add(new OverlaysPage(this));
     pages.add(new PluginsPage(this));
     pages.add(new ProfilePage(this));
     pages.add(new SubscriptionsPage(this));
@@ -783,7 +782,7 @@
           raw: true);
       return;
     }
-    AnalysisResult result = await driver.getResult(path);
+    ResolvedUnitResult result = await driver.getResult(path);
     if (result == null) {
       p(
           'An element model could not be produced for the file '
@@ -956,11 +955,6 @@
       : super(site, 'memory', 'Memory and CPU Usage',
             description: 'Memory and CPU usage for the analysis server.');
 
-  DiagnosticDomainHandler get diagnosticDomain {
-    return server.handlers
-        .firstWhere((handler) => handler is DiagnosticDomainHandler);
-  }
-
   @override
   Future generateContent(Map<String, String> params) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
@@ -1033,49 +1027,6 @@
   }
 }
 
-class OverlaysPage extends DiagnosticPageWithNav {
-  OverlaysPage(DiagnosticsSite site)
-      : super(site, 'overlays', 'Overlays',
-            description: 'Editing overlays - unsaved file changes.');
-
-  @override
-  Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    FileContentOverlay overlays = server.fileContentOverlay;
-    List<String> paths = overlays.paths.toList()..sort();
-
-    String overlayPath = params['overlay'];
-    if (overlayPath != null) {
-      p(overlayPath);
-
-      if (overlays[overlayPath] != null) {
-        buf.write('<pre><code>');
-        buf.write(escape(overlays[overlayPath]));
-        buf.writeln('</code></pre>');
-      } else {
-        p('<code>${escape(overlayPath)}</code> not found.', raw: true);
-      }
-
-      return;
-    }
-
-    if (paths.isEmpty) {
-      blankslate('No overlays.');
-    } else {
-      String lenCounter(List list) {
-        return '<span class="counter" style="float: right;">${list.length}</span>';
-      }
-
-      h3('Overlays ${lenCounter(paths)}', raw: true);
-      ul(paths, (String overlayPath) {
-        String uri = '$path?overlay=${Uri.encodeQueryComponent(overlayPath)}';
-        buf.writeln('<a href="$uri">${escape(overlayPath)}</a>');
-      });
-    }
-  }
-}
-
 // TODO(devoncarew): We're not currently tracking the time spent in specific
 // lints by default (analysisOptions / driverOptions enableTiming)
 class PluginsPage extends DiagnosticPageWithNav {
@@ -1246,7 +1197,7 @@
   final WebSocket socket;
 
   int _id = 0;
-  Map<String, Completer<Map>> _completers = {};
+  final Map<String, Completer<Map>> _completers = {};
 
   ServiceProtocol._(this.socket) {
     socket.listen(_handleMessage);
@@ -1304,8 +1255,6 @@
 
     buf.writeln('<div class="column one-half">');
     h3('Status');
-    buf.writeln(writeOption('Use fasta parser',
-        diagnosticsSite.socketServer.analysisServerOptions.useFastaParser));
     buf.writeln(writeOption('Instrumentation enabled',
         AnalysisEngine.instance.instrumentationService.isActive));
     bool uxExp1 =
diff --git a/pkg/analysis_server/lib/src/status/pages.dart b/pkg/analysis_server/lib/src/status/pages.dart
index b270a3c..41b9b80 100644
--- a/pkg/analysis_server/lib/src/status/pages.dart
+++ b/pkg/analysis_server/lib/src/status/pages.dart
@@ -136,7 +136,7 @@
 /// Contains a collection of Pages.
 abstract class Site {
   final String title;
-  List<Page> pages = [];
+  final List<Page> pages = [];
 
   Site(this.title);
 
diff --git a/pkg/analysis_server/lib/src/status/tree_writer.dart b/pkg/analysis_server/lib/src/status/tree_writer.dart
index 9feb8af..62b07f1 100644
--- a/pkg/analysis_server/lib/src/status/tree_writer.dart
+++ b/pkg/analysis_server/lib/src/status/tree_writer.dart
@@ -13,7 +13,7 @@
  * Utility methods that can be mixed in to classes that produce an HTML
  * representation of a tree structure.
  */
-abstract class TreeWriter {
+mixin TreeWriter {
   /**
    * The buffer on which the HTML is to be written.
    */
diff --git a/pkg/analysis_server/lib/src/utilities/flutter.dart b/pkg/analysis_server/lib/src/utilities/flutter.dart
index f116530..6e754c3 100644
--- a/pkg/analysis_server/lib/src/utilities/flutter.dart
+++ b/pkg/analysis_server/lib/src/utilities/flutter.dart
@@ -19,6 +19,8 @@
 const _STATE_NAME = "State";
 const _STATEFUL_WIDGET_NAME = "StatefulWidget";
 const _STATELESS_WIDGET_NAME = "StatelessWidget";
+const _STREAM_BUILDER_NAME = "StreamBuilder";
+const _STREAM_BUILDER_URI = "package:flutter/src/widgets/async.dart";
 const _WIDGET_NAME = "Widget";
 const _WIDGET_URI = "package:flutter/src/widgets/framework.dart";
 final _frameworkUri = Uri.parse('package:flutter/src/widgets/framework.dart');
@@ -307,6 +309,14 @@
 }
 
 /**
+ * Return `true` if the given [type] is the Flutter class `StreamBuilder`.
+ */
+bool isExactWidgetTypeStreamBuilder(DartType type) {
+  return type is InterfaceType &&
+      _isExactWidget(type.element, _STREAM_BUILDER_NAME, _STREAM_BUILDER_URI);
+}
+
+/**
  * Return `true` if the given [type] is the Flutter class `Widget`, or its
  * subtype.
  */
diff --git a/pkg/analysis_server/lib/src/utilities/profiling.dart b/pkg/analysis_server/lib/src/utilities/profiling.dart
index 7e2e49b..9dbd260 100644
--- a/pkg/analysis_server/lib/src/utilities/profiling.dart
+++ b/pkg/analysis_server/lib/src/utilities/profiling.dart
@@ -12,8 +12,6 @@
 
   Future<UsageInfo> getProcessUsage(int processId);
 
-  UsageInfo getProcessUsageSync(int processId);
-
   /// Return a [ProcessProfiler] instance suitable for the current host
   /// platform. This can return `null` if we're not able to gather memory and
   /// cpu information for the current platform.
@@ -65,17 +63,6 @@
     }
   }
 
-  UsageInfo getProcessUsageSync(int processId) {
-    try {
-      // Execution time is typically 2-4ms.
-      ProcessResult result =
-          Process.runSync('ps', ['-o', '%cpu=,rss=', processId.toString()]);
-      return result.exitCode == 0 ? _parse(result.stdout) : null;
-    } catch (e) {
-      return null;
-    }
-  }
-
   UsageInfo _parse(String psResults) {
     try {
       // "  0.0 378940"
diff --git a/pkg/analysis_server/lib/starter.dart b/pkg/analysis_server/lib/starter.dart
index aa4a30e..949e761 100644
--- a/pkg/analysis_server/lib/starter.dart
+++ b/pkg/analysis_server/lib/starter.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/server/detachable_filesystem_manager.dart';
 import 'package:analysis_server/src/server/driver.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
@@ -47,10 +46,6 @@
 
   /**
    * Use the given command-line [arguments] to start this server.
-   *
-   * At least temporarily returns AnalysisServer so that consumers of the
-   * starter API can then use the server, this is done as a stopgap for the
-   * angular plugin until the official plugin API is finished.
    */
-  AnalysisServer start(List<String> arguments);
+  void start(List<String> arguments);
 }
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
deleted file mode 100644
index f635e39..0000000
--- a/pkg/analysis_server/pubspec.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: analysis_server
-publish_to: none
-description: A server that performs analysis of Dart code over character streams using JSON-RPC encoded information.
-dependencies:
-  analyzer: ^0.33.0
-  args: '>=0.13.0 <2.0.0'
-  dart_style: '^1.0.6'
-  intl: ^0.15.0
-  linter: ^0.1.16
-  logging: any
-  package_config: '>=0.1.5 <2.0.0'
-  path: any
-  plugin: ^0.2.0
-  telemetry: ^0.0.1
-  usage: ^3.2.0+1
-  watcher: any
-  yaml: any
-dev_dependencies:
-  html: any
-  test_reflective_loader: ^0.1.8
-  test: ^1.0.0
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index ecbbbb32..2d94d63 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -1,29 +1,25 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/visitor.dart';
-import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/context_root.dart';
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/engine.dart' as engine;
-import 'package:analyzer/src/generated/parser.dart' as analyzer;
-import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 
-import 'mock_sdk.dart';
 import 'src/utilities/flutter_util.dart';
 
 /**
@@ -48,25 +44,27 @@
  */
 typedef void _ElementVisitorFunction(Element element);
 
-class AbstractContextTest extends Object with ResourceProviderMixin {
-  DartSdk sdk;
-  Map<String, List<Folder>> packageMap;
-  UriResolver resourceResolver;
-
-  StringBuffer _logBuffer = new StringBuffer();
+class AbstractContextTest with ResourceProviderMixin {
   FileContentOverlay fileContentOverlay = new FileContentOverlay();
+
+  AnalysisContextCollection _analysisContextCollection;
   AnalysisDriver _driver;
 
   AnalysisDriver get driver => _driver;
 
+  AnalysisSession get session => driver.currentSession;
+
+  /// The file system specific `/home/test/pubspec.yaml` path.
+  String get testPubspecPath => convertPath('/home/test/pubspec.yaml');
+
   void addFlutterPackage() {
-    addMetaPackageSource();
+    addMetaPackage();
     Folder libFolder = configureFlutterPackage(resourceProvider);
-    packageMap['flutter'] = [libFolder];
-    configureDriver();
+    addTestPackageDependency('flutter', libFolder.parent.path);
   }
 
-  Source addMetaPackageSource() => addPackageSource('meta', 'meta.dart', r'''
+  void addMetaPackage() {
+    addPackageFile('meta', 'meta.dart', r'''
 library meta;
 
 const _IsTest isTest = const _IsTest();
@@ -88,13 +86,15 @@
   const _IsTestGroup();
 }
 ''');
+  }
 
-  Source addPackageSource(String packageName, String filePath, String content) {
-    packageMap[packageName] = [newFolder('/pubcache/$packageName/lib')];
-    File file =
-        newFile('/pubcache/$packageName/lib/$filePath', content: content);
-    configureDriver();
-    return file.createSource();
+  /// Add a new file with the given [pathInLib] to the package with the
+  /// given [packageName].  Then ensure that the test package depends on the
+  /// [packageName].
+  File addPackageFile(String packageName, String pathInLib, String content) {
+    var packagePath = '/.pub-cache/$packageName';
+    addTestPackageDependency(packageName, packagePath);
+    return newFile('$packagePath/lib/$pathInLib', content: content);
   }
 
   Source addSource(String path, String content, [Uri uri]) {
@@ -102,56 +102,72 @@
     Source source = file.createSource(uri);
     driver.addFile(file.path);
     driver.changeFile(file.path);
-    fileContentOverlay[file.path] = content;
     return source;
   }
 
-  /**
-   * Re-configure the driver. This is necessary, for example, after defining a
-   * new package that test code will reference.
-   */
-  void configureDriver() {
-    driver.configure();
+  void addTestPackageDependency(String name, String rootPath) {
+    var packagesFile = getFile('/home/test/.packages');
+    var packagesContent = packagesFile.readAsStringSync();
+
+    // Ignore if there is already the same package dependency.
+    if (packagesContent.contains('$name:file://')) {
+      return;
+    }
+
+    rootPath = convertPath(rootPath);
+    packagesContent += '$name:${toUri('$rootPath/lib')}\n';
+
+    packagesFile.writeAsStringSync(packagesContent);
+
+    createAnalysisContexts();
   }
 
-  void configurePreviewDart2() {
-    driver.configure(
-        analysisOptions: new AnalysisOptionsImpl.from(driver.analysisOptions)
-          ..previewDart2 = true);
+  /// Create all analysis contexts in `/home`.
+  void createAnalysisContexts() {
+    _analysisContextCollection = AnalysisContextCollectionImpl(
+      includedPaths: [convertPath('/home')],
+      enableIndex: true,
+      fileContentOverlay: fileContentOverlay,
+      resourceProvider: resourceProvider,
+      sdkPath: convertPath('/sdk'),
+    );
+
+    var testPath = convertPath('/home/test');
+    _driver = getDriver(testPath);
   }
 
-  void processRequiredPlugins() {
-    AnalysisEngine.instance.processRequiredPlugins();
+  /// Return the existing analysis context that should be used to analyze the
+  /// given [path], or throw [StateError] if the [path] is not analyzed in any
+  /// of the created analysis contexts.
+  AnalysisContext getContext(String path) {
+    path = convertPath(path);
+    return _analysisContextCollection.contextFor(path);
+  }
+
+  /// Return the existing analysis driver that should be used to analyze the
+  /// given [path], or throw [StateError] if the [path] is not analyzed in any
+  /// of the created analysis contexts.
+  AnalysisDriver getDriver(String path) {
+    DriverBasedAnalysisContext context = getContext(path);
+    return context.driver;
   }
 
   Future<CompilationUnit> resolveLibraryUnit(Source source) async {
-    return (await driver.getResult(source.fullName))?.unit;
+    var resolveResult = await session.getResolvedUnit(source.fullName);
+    return resolveResult.unit;
   }
 
   void setUp() {
-    processRequiredPlugins();
     setupResourceProvider();
-    sdk = new MockSdk(resourceProvider: resourceProvider);
-    resourceResolver = new ResourceUriResolver(resourceProvider);
-    packageMap = new Map<String, List<Folder>>();
-    PackageMapUriResolver packageResolver =
-        new PackageMapUriResolver(resourceProvider, packageMap);
-    SourceFactory sourceFactory = new SourceFactory(
-        [new DartUriResolver(sdk), packageResolver, resourceResolver]);
-    PerformanceLog log = new PerformanceLog(_logBuffer);
-    AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
-    _driver = new AnalysisDriver(
-        scheduler,
-        log,
-        resourceProvider,
-        new MemoryByteStore(),
-        fileContentOverlay,
-        new ContextRoot(resourceProvider.convertPath('/project'), [],
-            pathContext: resourceProvider.pathContext),
-        sourceFactory,
-        new AnalysisOptionsImpl()..useFastaParser = analyzer.Parser.useFasta);
-    scheduler.start();
-    AnalysisEngine.instance.logger = PrintLogger.instance;
+
+    new MockSdk(resourceProvider: resourceProvider);
+
+    newFolder('/home/test');
+    newFile('/home/test/.packages', content: r'''
+test:file:///home/test/lib
+''');
+
+    createAnalysisContexts();
   }
 
   void setupResourceProvider() {}
@@ -160,28 +176,11 @@
     AnalysisEngine.instance.clearCaches();
     AnalysisEngine.instance.logger = null;
   }
-}
 
-/**
- * Instances of the class [PrintLogger] print all of the errors.
- */
-class PrintLogger implements Logger {
-  static final Logger instance = new PrintLogger();
-
-  @override
-  void logError(String message, [CaughtException exception]) {
-    print(message);
-    if (exception != null) {
-      print(exception);
-    }
-  }
-
-  @override
-  void logInformation(String message, [CaughtException exception]) {
-    print(message);
-    if (exception != null) {
-      print(exception);
-    }
+  /// Update `/home/test/pubspec.yaml` and create the driver.
+  void updateTestPubspecFile(String content) {
+    newFile(testPubspecPath, content: content);
+    createAnalysisContexts();
   }
 }
 
diff --git a/pkg/analysis_server/test/abstract_single_unit.dart b/pkg/analysis_server/test/abstract_single_unit.dart
index 78e2280..b0901725 100644
--- a/pkg/analysis_server/test/abstract_single_unit.dart
+++ b/pkg/analysis_server/test/abstract_single_unit.dart
@@ -1,14 +1,14 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
@@ -23,7 +23,7 @@
   String testCode;
   String testFile;
   Source testSource;
-  AnalysisResult testAnalysisResult;
+  ResolvedUnitResult testAnalysisResult;
   CompilationUnit testUnit;
   CompilationUnitElement testUnitElement;
   LibraryElement testLibraryElement;
@@ -64,7 +64,7 @@
   AstNode findNodeAtOffset(int offset, [Predicate<AstNode> predicate]) {
     AstNode result = new NodeLocator(offset).searchWithin(testUnit);
     if (result != null && predicate != null) {
-      result = result.getAncestor(predicate);
+      result = result.thisOrAncestorMatching(predicate);
     }
     return result;
   }
@@ -112,7 +112,7 @@
 
   Future<void> resolveTestUnit(String code) async {
     addTestSource(code);
-    testAnalysisResult = await driver.getResult(convertPath(testFile));
+    testAnalysisResult = await session.getResolvedUnit(testFile);
     testUnit = testAnalysisResult.unit;
     if (verifyNoTestUnitErrors) {
       expect(testAnalysisResult.errors.where((AnalysisError error) {
@@ -132,7 +132,7 @@
   @override
   void setUp() {
     super.setUp();
-    testFile = resourceProvider.convertPath('/project/test.dart');
+    testFile = convertPath('/home/test/lib/test.dart');
   }
 }
 
diff --git a/pkg/analysis_server/test/analysis/get_errors_test.dart b/pkg/analysis_server/test/analysis/get_errors_test.dart
index 8649fcc..cb0baa7 100644
--- a/pkg/analysis_server/test/analysis/get_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/get_errors_test.dart
@@ -67,13 +67,6 @@
   }
 
   @failingTest
-  test_fileDoesNotExist() {
-    // Broken under the new driver.
-    String file = convertPath('$projectPath/doesNotExist.dart');
-    return _checkInvalid(file);
-  }
-
-  @failingTest
   test_fileWithoutContext() {
     // Broken under the new driver.
     String file = convertPath('/outside.dart');
@@ -112,25 +105,6 @@
     expect(errors, isEmpty);
   }
 
-  @failingTest
-  test_removeContextAfterRequest() async {
-    // Broken under the new driver.
-    addTestFile('''
-main() {
-  print(42)
-}
-''');
-    // handle the request synchronously
-    Request request = _createGetErrorsRequest(testFile);
-    server.handleRequest(request);
-    // remove context, causes sending an "invalid file" error
-    deleteFolder(projectPath);
-    // wait for an error response
-    Response response = await serverChannel.waitForResponse(request);
-    expect(response.error, isNotNull);
-    expect(response.error.code, RequestErrorCode.GET_ERRORS_INVALID_FILE);
-  }
-
   Future _checkInvalid(String file) async {
     Request request = _createGetErrorsRequest(file);
     Response response = await serverChannel.sendRequest(request);
diff --git a/pkg/analysis_server/test/analysis/get_navigation_test.dart b/pkg/analysis_server/test/analysis/get_navigation_test.dart
index 20f6b0f..d620a0d 100644
--- a/pkg/analysis_server/test/analysis/get_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/get_navigation_test.dart
@@ -75,7 +75,7 @@
   }
 
   test_fileOutsideOfRoot() async {
-    testFile = resourceProvider.convertPath('/outside.dart');
+    testFile = convertPath('/outside.dart');
     addTestFile('''
 main() {
   var test = 0;
diff --git a/pkg/analysis_server/test/analysis/get_signature_test.dart b/pkg/analysis_server/test/analysis/get_signature_test.dart
index fdf651e..10567ce 100644
--- a/pkg/analysis_server/test/analysis/get_signature_test.dart
+++ b/pkg/analysis_server/test/analysis/get_signature_test.dart
@@ -116,6 +116,21 @@
         equals(new ParameterInfo(ParameterKind.NAMED, "length", "int")));
   }
 
+  test_does_not_walk_up_over_closure() async {
+    addTestFile('''
+one(String name, int length) {}
+main() {
+  one("Danny", () {
+    /*^*/
+  });
+}
+''');
+    var result = await prepareRawSignature('/*^*/');
+    expect(result.error, isNotNull);
+    expect(result.error.code,
+        equals(RequestErrorCode.GET_SIGNATURE_UNKNOWN_FUNCTION));
+  }
+
   test_error_file_invalid_path() async {
     var result = await prepareRawSignatureAt(0, file: ':\\/?*');
     expect(result.error, isNotNull);
@@ -125,10 +140,10 @@
 
   test_error_file_not_analyzed() async {
     var result = await prepareRawSignatureAt(0,
-        file: resourceProvider.convertPath('/not/in/project.dart'));
+        file: convertPath('/not/in/project.dart'));
     expect(result.error, isNotNull);
-    expect(result.error.code,
-        equals(RequestErrorCode.GET_SIGNATURE_UNKNOWN_FUNCTION));
+    expect(
+        result.error.code, equals(RequestErrorCode.GET_SIGNATURE_INVALID_FILE));
   }
 
   test_error_function_unknown() async {
@@ -438,19 +453,4 @@
     expect(result.parameters[1],
         equals(new ParameterInfo(ParameterKind.NAMED, "length", "int")));
   }
-
-  test_does_not_walk_up_over_closure() async {
-    addTestFile('''
-one(String name, int length) {}
-main() {
-  one("Danny", () {
-    /*^*/
-  });
-}
-''');
-    var result = await prepareRawSignature('/*^*/');
-    expect(result.error, isNotNull);
-    expect(result.error.code,
-        equals(RequestErrorCode.GET_SIGNATURE_UNKNOWN_FUNCTION));
-  }
 }
diff --git a/pkg/analysis_server/test/analysis/notification_errors_test.dart b/pkg/analysis_server/test/analysis/notification_errors_test.dart
index e281b04..773fd9f 100644
--- a/pkg/analysis_server/test/analysis/notification_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_errors_test.dart
@@ -5,9 +5,7 @@
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
-import 'package:analysis_server/src/context_manager.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -102,15 +100,15 @@
     handleSuccessfulRequest(request);
 
     await waitForTasksFinished();
-    List<Linter> lints;
-    AnalysisDriver testDriver = (server.contextManager as ContextManagerImpl)
-        .getContextInfoFor(getFolder(projectPath))
-        .analysisDriver;
-    lints = testDriver.analysisOptions.lintRules;
+
+    var testDriver = server.getAnalysisDriver(testFile);
+    List<Linter> lints = testDriver.analysisOptions.lintRules;
+
     // Registry should only contain single lint rule.
     expect(lints, hasLength(1));
     LintRule lint = lints.first as LintRule;
     expect(lint.name, camelCaseTypesLintName);
+
     // Verify lint error result.
     List<AnalysisError> errors = filesErrors[testFile];
     expect(errors, hasLength(1));
diff --git a/pkg/analysis_server/test/analysis/reanalyze_test.dart b/pkg/analysis_server/test/analysis/reanalyze_test.dart
index 886b200..1606a84 100644
--- a/pkg/analysis_server/test/analysis/reanalyze_test.dart
+++ b/pkg/analysis_server/test/analysis/reanalyze_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
-
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_constants.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
@@ -23,53 +21,39 @@
 class ReanalyzeTest extends AbstractAnalysisTest {
   Map<String, List<AnalysisError>> filesErrors = {};
 
-  Completer _resultsAvailable = new Completer();
-
   @override
   void processNotification(Notification notification) {
     if (notification.event == ANALYSIS_NOTIFICATION_ERRORS) {
       var decoded = new AnalysisErrorsParams.fromNotification(notification);
       filesErrors[decoded.file] = decoded.errors;
-      _resultsAvailable.complete(null);
     }
   }
 
-  test_reanalyze() {
-    createProject();
-    Map drivers = server.driverMap;
-    expect(drivers, hasLength(1));
-    Request request = new Request("0", ANALYSIS_REQUEST_REANALYZE);
-    handleSuccessfulRequest(request);
-    drivers = server.driverMap;
-    expect(drivers, hasLength(1));
-  }
+  test_reanalyze() async {
+    var b = convertPath('/other/b.dart');
 
-  test_reanalyze_with_overlay() async {
+    newFile(testFile, content: r'''
+import '../../other/b.dart';
+
+B b;
+''');
     createProject();
-    newFolder(testFolder);
-    newFile(testFile, content: 'main() {}');
-    // Update the content with an overlay that contains a syntax error.
-    server.updateContent('1', {testFile: new AddContentOverlay('main() {')});
-    await _resultsAvailable.future;
-    // Verify that the syntax error was detected.
-    {
-      List<AnalysisError> errors = filesErrors[testFile];
-      expect(errors, hasLength(1));
-    }
-    // Remove testFile from filesErrors so that we'll notice when the file is
-    // re-analyzed.
-    filesErrors.remove(testFile);
+
+    // b.dart does not exist, and `B` is unresolved.
+    await waitForTasksFinished();
+    expect(filesErrors[testFile], hasLength(2));
+
+    // Clear errors, so that we'll notice new results.
+    filesErrors.clear();
+
+    // Create b.dart, reanalyzing should fix the error.
+    newFile(b, content: 'class B {}');
+
     // Reanalyze.
-    _resultsAvailable = new Completer();
-    server.reanalyze(null);
-    await _resultsAvailable.future;
-    // The file should have been reanalyzed.
-    expect(filesErrors, contains(testFile));
-    // Verify that the syntax error is present (this indicates that the
-    // content introduced by the call to updateContent is still in effect).
-    {
-      List<AnalysisError> errors = filesErrors[testFile];
-      expect(errors, hasLength(1));
-    }
+    server.reanalyze();
+    await waitForTasksFinished();
+
+    // No errors.
+    expect(filesErrors[testFile], isEmpty);
   }
 }
diff --git a/pkg/analysis_server/test/analysis/update_content_test.dart b/pkg/analysis_server/test/analysis/update_content_test.dart
index 44161349..079ec1c 100644
--- a/pkg/analysis_server/test/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/analysis/update_content_test.dart
@@ -128,30 +128,33 @@
   }
 
   test_overlayOnly() async {
-    String filePath = convertPath('/User/project1/test.dart');
-    Folder folder1 = newFolder('/User/project1');
-    Folder folder2 = newFolder('/User/project2');
-    Request request =
-        new AnalysisSetAnalysisRootsParams([folder1.path, folder2.path], [])
-            .toRequest('0');
-    handleSuccessfulRequest(request);
+    var filePath1 = convertPath('/User/project1/test.dart');
+    var filePath2 = convertPath('/User/project2/test.dart');
+    var folderPath1 = newFolder('/User/project1').path;
+    var folderPath2 = newFolder('/User/project2').path;
+
+    handleSuccessfulRequest(new AnalysisSetAnalysisRootsParams(
+      [folderPath1, folderPath2],
+      [],
+    ).toRequest('0'));
+
     // exactly 2 contexts
     expect(server.driverMap, hasLength(2));
-    AnalysisDriver driver1 = server.driverMap[folder1];
-    AnalysisDriver driver2 = server.driverMap[folder2];
+    AnalysisDriver driver1 = server.getAnalysisDriver(filePath1);
+    AnalysisDriver driver2 = server.getAnalysisDriver(filePath2);
+
     // no sources
     expect(_getUserSources(driver1), isEmpty);
     expect(_getUserSources(driver2), isEmpty);
+
     // add an overlay - new Source in context1
-    server.updateContent('1', {filePath: new AddContentOverlay('')});
-    {
-      List<String> paths = _getUserSources(driver1);
-      expect(paths, hasLength(1));
-      expect(paths[0], filePath);
-    }
+    server.updateContent('1', {filePath1: new AddContentOverlay('')});
+    expect(_getUserSources(driver1), [filePath1]);
     expect(_getUserSources(driver2), isEmpty);
+
     // remove the overlay - no sources
-    server.updateContent('2', {filePath: new RemoveContentOverlay()});
+    server.updateContent('2', {filePath1: new RemoveContentOverlay()});
+
     // The file isn't removed from the list of added sources.
 //    expect(_getUserSources(driver1), isEmpty);
     expect(_getUserSources(driver2), isEmpty);
@@ -198,7 +201,7 @@
   }
 
   test_sentToPlugins() {
-    String filePath = '/project/target.dart';
+    String filePath = convertPath('/project/target.dart');
     String fileContent = 'import "none.dart";';
     //
     // Add
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index 3610b68..8415bc9 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -18,6 +18,7 @@
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
@@ -26,7 +27,6 @@
 import 'package:test/test.dart';
 import 'package:watcher/watcher.dart';
 
-import 'mock_sdk.dart';
 import 'mocks.dart';
 
 int findIdentifierLength(String search) {
@@ -47,7 +47,7 @@
 /**
  * An abstract base for all 'analysis' domain tests.
  */
-class AbstractAnalysisTest extends Object with ResourceProviderMixin {
+class AbstractAnalysisTest with ResourceProviderMixin {
   bool generateSummaryFiles = false;
   MockServerChannel serverChannel;
   TestPluginManager pluginManager;
@@ -120,7 +120,7 @@
         serverChannel,
         resourceProvider,
         options,
-        new DartSdkManager(resourceProvider.convertPath('/'), true),
+        new DartSdkManager(resourceProvider.convertPath('/sdk'), true),
         InstrumentationService.NULL_SERVICE);
   }
 
@@ -194,9 +194,9 @@
 
   void setUp() {
     serverChannel = new MockServerChannel();
-    projectPath = resourceProvider.convertPath('/project');
-    testFolder = resourceProvider.convertPath('/project/bin');
-    testFile = resourceProvider.convertPath('/project/bin/test.dart');
+    projectPath = convertPath('/project');
+    testFolder = convertPath('/project/bin');
+    testFile = convertPath('/project/bin/test.dart');
     pluginManager = new TestPluginManager();
     server = createAnalysisServer();
     server.pluginManager = pluginManager;
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 789f634..8a9ea74 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -11,15 +11,13 @@
 import 'package:analysis_server/src/domain_server.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:plugin/manager.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'mock_sdk.dart';
 import 'mocks.dart';
 
 main() {
@@ -29,7 +27,7 @@
 }
 
 @reflectiveTest
-class AnalysisServerTest extends Object with ResourceProviderMixin {
+class AnalysisServerTest with ResourceProviderMixin {
   MockServerChannel channel;
   AnalysisServer server;
 
@@ -82,13 +80,7 @@
     }
   }
 
-  void processRequiredPlugins() {
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(AnalysisEngine.instance.requiredPlugins);
-  }
-
   void setUp() {
-    processRequiredPlugins();
     channel = new MockServerChannel();
     // Create an SDK in the mock file system.
     new MockSdk(resourceProvider: resourceProvider);
@@ -96,7 +88,7 @@
         channel,
         resourceProvider,
         new AnalysisServerOptions(),
-        new DartSdkManager(convertPath('/'), false),
+        new DartSdkManager(convertPath('/sdk'), false),
         InstrumentationService.NULL_SERVICE);
   }
 
@@ -114,8 +106,7 @@
     var pkgFolder = convertPath('/pkg');
     newFolder(pkgFolder);
     newFolder(join(pkgFolder, 'lib'));
-    newFile(join(pkgFolder, 'lib', 'test.dart'),
-        content: 'class C {}');
+    newFile(join(pkgFolder, 'lib', 'test.dart'), content: 'class C {}');
     server.setAnalysisRoots('0', [pkgFolder], [], {});
     // Pump the event queue to make sure the server has finished any
     // analysis.
diff --git a/pkg/analysis_server/test/completion_test.dart b/pkg/analysis_server/test/completion_test.dart
index 5bed630..50b8449 100644
--- a/pkg/analysis_server/test/completion_test.dart
+++ b/pkg/analysis_server/test/completion_test.dart
@@ -1709,8 +1709,7 @@
     buildTests(
         'testLibrary002',
         '''t2() {var q=[0],z=q.!1length;q.!2clear();}''',
-        <String>["1+length", "1+isEmpty", "2+clear"],
-        failingTests: '1');
+        <String>["1+length", "1+isEmpty", "2+clear"]);
 
     // TODO Include corelib analysis
     buildTests('testLibrary003', '''class X{var q; f() {q.!1a!2}}''',
diff --git a/pkg/analysis_server/test/constants.dart b/pkg/analysis_server/test/constants.dart
index ab9accf..8b0282c 100644
--- a/pkg/analysis_server/test/constants.dart
+++ b/pkg/analysis_server/test/constants.dart
@@ -1,100 +1,23 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-const String ADD = 'add';
-const String ADDED = 'added';
-const String ASSISTS = 'assists';
-const String CHANGE = 'change';
-const String CHILDREN = 'children';
-const String CLASS_ELEMENT = 'classElement';
-const String CLASS_NAME = 'className';
 const String CODE = 'code';
-const String COMPLETION = 'completion';
 const String COMPLETION_RESULTS = 'completion.results';
-const String CONTAINING_LIBRARY_NAME = 'containingLibraryName';
-const String CONTAINING_LIBRARY_PATH = 'containingLibraryPath';
-const String CONTENT = 'content';
 const String CORRECTION = 'correction';
-const String DART_DOC = 'dartdoc';
-const String DEFAULT = 'default';
-const String DISPLAY_NAME = 'displayName';
 const String EDITS = 'edits';
-const String ELEMENT = 'element'; // boolean
-const String ELEMENT_DESCRIPTION = 'elementDescription'; // boolean
-const String ELEMENT_KIND = 'elementKind'; // boolean
-const String ENABLE_ASYNC = 'enableAsync'; // boolean
-const String ENABLE_DEFERRED_LOADING = 'enableDeferredLoading'; // boolean
-const String ENABLE_ENUMS = 'enableEnums';
-const String ERROR = 'error';
-const String ERRORS = 'errors';
-const String EXCLUDED = 'excluded';
-const String FATAL = 'fatal';
 const String FILE = 'file';
 const String FILE_STAMP = 'fileStamp';
-const String FILES = 'files';
-const String FIXES = 'fixes';
-const String FLAGS = 'flags';
-const String GENERATE_DART2JS_HINTS = 'generateDart2jsHints';
-const String GENERATE_HINTS = 'generateHints';
 const String HAS_FIX = 'hasFix';
-const String HIERARCHY_ITEMS = 'hierarchyItems';
-const String HOVERS = 'hovers';
-const String ID = 'id';
-const String INCLUDE_POTENTIAL = 'includePotential';
-const String INCLUDED = 'included';
-const String INTERFACE_MEMBERS = 'interfaceMembers';
-const String INTERFACES = 'interfaces';
-const String IS_ABSTRACT = 'isAbstract';
-const String IS_DEPRECATED = 'isDeprecated';
-const String IS_POTENTIAL = 'isPotential';
-const String IS_STATIC = 'isStatic';
-const String KIND = 'kind';
-const String KINDS = 'kinds';
-const String LAST = 'last';
 const String LENGTH = 'length';
-const String LINKED_EDIT_GROUPS = 'linkedEditGroups';
 const String LOCATION = 'location';
-const String MEMBER_ELEMENT = 'memberElement';
 const String MESSAGE = 'message';
-const String MIXINS = 'mixins';
-const String NAME = 'name';
-const String OCCURRENCES = 'occurrences';
 const String OFFSET = 'offset';
-const String OFFSETS = 'offsets';
-const String OPTIONS = 'options';
-const String OUTLINE = 'outline';
-const String OVERRIDES = 'overrides';
-const String PARAMETER = 'parameter';
-const String PARAMETERS = 'parameters';
-const String PATH = 'path';
-const String PATTERN = 'pattern';
-const String POSITIONS = 'positions';
-const String PROPAGATED_TYPE = 'propagatedType';
-const String REFACTORINGS = 'refactorings';
-const String REGIONS = 'regions';
-const String RELEVANCE = 'relevance';
-const String REMOVE = 'remove';
-const String REMOVED = 'removed';
 const String REPLACEMENT = 'replacement';
-const String REPLACEMENT_LENGTH = 'replacementLength';
-const String REPLACEMENT_OFFSET = 'replacementOffset';
-const String RESULTS = 'results';
-const String RETURN_TYPE = 'returnType';
-const String SELECTION = 'selection';
-const String SELECTION_LENGTH = 'selectionLength';
-const String SELECTION_OFFSET = 'selectionOffset';
 const String SEVERITY = 'severity';
 const String STACK_TRACE = 'stackTrace';
 const String START_COLUMN = 'startColumn';
 const String START_LINE = 'startLine';
-const String STATIC_TYPE = 'staticType';
-const String SUBCLASSES = 'subclasses';
 const String SUBSCRIPTIONS = 'subscriptions';
-const String SUGGESTIONS = 'suggestions';
-const String SUPER_CLASS_MEMBER = 'superclassMember';
-const String SUPERCLASS = 'superclass';
-const String TARGETS = 'targets';
 const String TYPE = 'type';
-const String VALUE = 'value';
 const String VERSION = 'version';
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index e04d0de..3c5a3e7 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -24,6 +24,7 @@
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/summary/summary_file_builder.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer/src/util/glob.dart';
 import 'package:linter/src/rules.dart';
@@ -34,7 +35,6 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:watcher/watcher.dart';
 
-import 'mock_sdk.dart';
 import 'src/plugin/plugin_manager_test.dart';
 
 main() {
@@ -500,7 +500,7 @@
     var testLibUri = resourceProvider.pathContext.toUri(testLib);
     resourceProvider.newFile(packagespecPath, 'unittest:$testLibUri');
     String libPath = '$projPath/${ContextManagerTest.LIB_NAME}';
-    File mainFile = newFile('$libPath/main.dart', content: '');
+    File mainFile = newFile('$libPath/main.dart');
     Source source = mainFile.createSource();
 
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
@@ -586,8 +586,8 @@
     // create files
     newFile('$subProjectA/pubspec.yaml', content: 'pubspec');
     newFile('$subProjectB/pubspec.yaml', content: 'pubspec');
-    newFile('$subProjectA/.packages', content: '');
-    newFile('$subProjectB/.packages', content: '');
+    newFile('$subProjectA/.packages');
+    newFile('$subProjectB/.packages');
 
     newFile(rootFile, content: 'library root;');
     newFile(subProjectA_file, content: 'library a;');
@@ -1641,7 +1641,7 @@
   }
 }
 
-abstract class ContextManagerTest extends Object with ResourceProviderMixin {
+abstract class ContextManagerTest with ResourceProviderMixin {
   /**
    * The name of the 'bin' directory.
    */
@@ -1675,24 +1675,19 @@
 
   String projPath = null;
 
-  AnalysisError missing_required_param = new AnalysisError(
-      new TestSource(), 0, 1, HintCode.MISSING_REQUIRED_PARAM, [
-    ['x']
-  ]);
-
   AnalysisError missing_return =
-      new AnalysisError(new TestSource(), 0, 1, HintCode.MISSING_RETURN, [
+      new AnalysisError(null, 0, 1, HintCode.MISSING_RETURN, [
     ['x']
   ]);
 
   AnalysisError invalid_assignment_error =
-      new AnalysisError(new TestSource(), 0, 1, HintCode.INVALID_ASSIGNMENT, [
+      new AnalysisError(null, 0, 1, HintCode.INVALID_ASSIGNMENT, [
     ['x'],
     ['y']
   ]);
 
-  AnalysisError unused_local_variable = new AnalysisError(
-      new TestSource(), 0, 1, HintCode.UNUSED_LOCAL_VARIABLE, [
+  AnalysisError unused_local_variable =
+      new AnalysisError(null, 0, 1, HintCode.UNUSED_LOCAL_VARIABLE, [
     ['x']
   ]);
 
@@ -1741,10 +1736,9 @@
     resourceProvider.newFolder(projPath);
     // Create an SDK in the mock file system.
     new MockSdk(generateSummaryFiles: true, resourceProvider: resourceProvider);
-    DartSdkManager sdkManager = new DartSdkManager(convertPath('/'), true);
+    DartSdkManager sdkManager = new DartSdkManager(convertPath('/sdk'), true);
     manager = new ContextManagerImpl(
         resourceProvider,
-        new FileContentOverlay(),
         sdkManager,
         providePackageResolver,
         analysisFilesGlobs,
@@ -2167,7 +2161,7 @@
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     await pumpEventQueue();
 
-    AnalysisResult result = await callbacks.currentDriver.getResult(file.path);
+    var result = await callbacks.currentDriver.getResult(file.path);
 
     // Not strong mode - both in the context and the SDK context.
 //    AnalysisContext sdkContext = sourceFactory.dartSdk.context;
@@ -2569,7 +2563,7 @@
     ContextBuilderOptions builderOptions = new ContextBuilderOptions();
     builderOptions.defaultOptions = options;
     ContextBuilder builder = new ContextBuilder(
-        resourceProvider, sdkManager, new ContentCache(),
+        resourceProvider, sdkManager, null,
         options: builderOptions);
     return builder;
   }
@@ -2611,24 +2605,3 @@
     lastFlushedFiles = flushedFiles;
   }
 }
-
-/**
- * A [Source] that knows it's [fullName].
- */
-class TestSource implements Source {
-  TestSource();
-
-  @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-}
-
-class TestUriResolver extends UriResolver {
-  Map<Uri, Source> uriMap;
-
-  TestUriResolver(this.uriMap);
-
-  @override
-  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
-    return uriMap[uri];
-  }
-}
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 6bb6343..e50b52f 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -10,17 +10,15 @@
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
-import 'package:plugin/manager.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'analysis_abstract.dart';
-import 'mock_sdk.dart';
 import 'mocks.dart';
 
 main() {
@@ -64,8 +62,8 @@
     expect(response, isResponseSuccess('0'));
     // verify that unit is resolved eventually
     await server.onAnalysisComplete;
-    var unit = await serverRef.getResolvedCompilationUnit(file);
-    expect(unit, isNotNull);
+    var resolvedUnit = await serverRef.getResolvedUnit(file);
+    expect(resolvedUnit, isNotNull);
   }
 
   test_setAnalysisRoots_included_nonexistentFolder() async {
@@ -78,8 +76,8 @@
     // Non-existence of /project_a should not prevent files in /project_b
     // from being analyzed.
     await server.onAnalysisComplete;
-    var unit = await serverRef.getResolvedCompilationUnit(fileB);
-    expect(unit, isNotNull);
+    var resolvedUnit = await serverRef.getResolvedUnit(fileB);
+    expect(resolvedUnit, isNotNull);
   }
 
   test_setAnalysisRoots_included_notAbsolute() async {
@@ -338,7 +336,7 @@
 /**
  * A helper to test 'analysis.*' requests.
  */
-class AnalysisTestHelper extends Object with ResourceProviderMixin {
+class AnalysisTestHelper with ResourceProviderMixin {
   MockServerChannel serverChannel;
   AnalysisServer server;
   AnalysisDomainHandler handler;
@@ -356,7 +354,6 @@
   AnalysisTestHelper() {
     projectPath = convertPath('/project');
     testFile = convertPath('/project/bin/test.dart');
-    processRequiredPlugins();
     serverChannel = new MockServerChannel();
     // Create an SDK in the mock file system.
     new MockSdk(resourceProvider: resourceProvider);
@@ -364,7 +361,7 @@
         serverChannel,
         resourceProvider,
         new AnalysisServerOptions(),
-        new DartSdkManager(convertPath('/'), false),
+        new DartSdkManager(convertPath('/sdk'), false),
         InstrumentationService.NULL_SERVICE);
     handler = new AnalysisDomainHandler(server);
     // listen for notifications
@@ -518,11 +515,6 @@
     expect(response, isResponseSuccess('0'));
   }
 
-  void processRequiredPlugins() {
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(AnalysisEngine.instance.requiredPlugins);
-  }
-
   /**
    * Send an `updateContent` request for [testFile].
    */
@@ -661,7 +653,7 @@
   }
 
   test_afterAnalysis_sdkFile() async {
-    String file = convertPath('/lib/core/core.dart');
+    String file = convertPath('/sdk/lib/core/core.dart');
     addTestFile('// no matter');
     createProject();
     // wait for analysis, no results initially
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index 0566e1f..5c57465 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -238,7 +238,7 @@
     //
     // We no longer support the analysis of non-dart files.
     //
-    testFile = resourceProvider.convertPath('/project/web/test.html');
+    testFile = convertPath('/project/web/test.html');
     addTestFile('''
       <html>^</html>
     ''');
@@ -647,9 +647,9 @@
   }
 
   test_local_override() {
-    newFile('/libA.dart', content: 'class A {m() {}}');
+    newFile('/project/bin/a.dart', content: 'class A {m() {}}');
     addTestFile('''
-import '../../libA.dart';
+import 'a.dart';
 class B extends A {
   m() {}
   x() {^}
@@ -718,9 +718,9 @@
   }
 
   test_overrides() {
-    newFile('/libA.dart', content: 'class A {m() {}}');
+    newFile('/project/bin/a.dart', content: 'class A {m() {}}');
     addTestFile('''
-import '../../libA.dart';
+import 'a.dart';
 class B extends A {m() {^}}
 ''');
     return getSuggestions().then((_) {
@@ -732,10 +732,10 @@
   }
 
   test_partFile() {
-    newFile('/project/bin/testA.dart', content: '''
+    newFile('/project/bin/a.dart', content: '''
       library libA;
-      part "${convertAbsolutePathToUri(testFile)}";
       import 'dart:html';
+      part 'test.dart';
       class A { }
     ''');
     addTestFile('''
@@ -755,12 +755,12 @@
   }
 
   test_partFile2() {
-    newFile('/testA.dart', content: '''
+    newFile('/project/bin/a.dart', content: '''
       part of libA;
       class A { }''');
     addTestFile('''
       library libA;
-      part "${convertAbsolutePathToUri("/testA.dart")}";
+      part "a.dart";
       import 'dart:html';
       main() {^}
     ''');
diff --git a/pkg/analysis_server/test/domain_edit_dartfix_test.dart b/pkg/analysis_server/test/domain_edit_dartfix_test.dart
index b7f6182..16bcdd2 100644
--- a/pkg/analysis_server/test/domain_edit_dartfix_test.dart
+++ b/pkg/analysis_server/test/domain_edit_dartfix_test.dart
@@ -20,8 +20,11 @@
 
 @reflectiveTest
 class EditDartfixDomainHandlerTest extends AbstractAnalysisTest {
+  int requestId = 30;
   String libPath;
 
+  String get nextRequestId => (++requestId).toString();
+
   void expectEdits(List<SourceFileEdit> fileEdits, String expectedSource) {
     expect(fileEdits, hasLength(1));
     expect(fileEdits[0].file, testFile);
@@ -41,11 +44,12 @@
   }
 
   Future<EditDartfixResult> performFix() async {
-    final request = new Request(
-        '33', 'edit.dartfix', new EditDartfixParams([libPath]).toJson());
+    final id = nextRequestId;
+    final params = new EditDartfixParams([projectPath]);
+    final request = new Request(id, 'edit.dartfix', params.toJson());
 
     final response = await new EditDartFix(server, request).compute();
-    expect(response.id, '33');
+    expect(response.id, id);
 
     return EditDartfixResult.fromResponse(response);
   }
@@ -54,12 +58,12 @@
   void setUp() {
     super.setUp();
     registerLintRules();
-    createProject();
     libPath = resourceProvider.convertPath('/project/lib');
     testFile = resourceProvider.convertPath('/project/lib/fileToBeFixed.dart');
   }
 
   test_dartfix_convertClassToMixin() async {
+    createProject();
     addTestFile('''
 class A {}
 class B extends A {}
@@ -76,6 +80,7 @@
   }
 
   test_dartfix_convertToIntLiteral() async {
+    createProject();
     addTestFile('''
 const double myDouble = 42.0;
     ''');
@@ -88,6 +93,7 @@
   }
 
   test_dartfix_moveTypeArgumentToClass() async {
+    createProject();
     addTestFile('''
 class A<T> { A.from(Object obj) { } }
 main() {
@@ -104,4 +110,61 @@
 }
     ''');
   }
+
+  test_dartfix_excludedSource() async {
+    // Add analysis options to exclude the lib directory then reanalyze
+    newFile('/project/analysis_options.yaml', content: '''
+analyzer:
+  exclude:
+    - lib/**
+''');
+
+    createProject();
+    addTestFile('''
+const double myDouble = 42.0;
+    ''');
+
+    // Assert no suggestions now that source has been excluded
+    final result = await performFix();
+    expect(result.suggestions, hasLength(0));
+    expect(result.edits, hasLength(0));
+  }
+
+  test_dartfix_partFile() async {
+    createProject();
+    newFile('/project/lib/lib.dart', content: '''
+library lib2;
+part 'fileToBeFixed.dart';
+    ''');
+    addTestFile('''
+part of lib2;
+const double myDouble = 42.0;
+    ''');
+
+    // Assert dartfix suggestions
+    EditDartfixResult result = await performFix();
+    expect(result.suggestions, hasLength(1));
+    expectSuggestion(result.suggestions[0], 'int literal', 38, 4);
+    expectEdits(result.edits, '''
+part of lib2;
+const double myDouble = 42;
+    ''');
+  }
+
+  test_dartfix_partFile_loose() async {
+    createProject();
+    addTestFile('''
+part of lib2;
+const double myDouble = 42.0;
+    ''');
+
+    // Assert dartfix suggestions
+    EditDartfixResult result = await performFix();
+    expect(result.suggestions, hasLength(1));
+    expectSuggestion(result.suggestions[0], 'int literal', 38, 4);
+    expectEdits(result.edits, '''
+part of lib2;
+const double myDouble = 42;
+    ''');
+  }
 }
diff --git a/pkg/analysis_server/test/domain_execution_test.dart b/pkg/analysis_server/test/domain_execution_test.dart
index 9805a59..d3d2908 100644
--- a/pkg/analysis_server/test/domain_execution_test.dart
+++ b/pkg/analysis_server/test/domain_execution_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -10,8 +10,6 @@
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -263,15 +261,3 @@
     return new ExecutionMapUriResult.fromResponse(response);
   }
 }
-
-/**
- * A [Source] that knows it's [fullName].
- */
-class TestSource implements Source {
-  String fullName;
-
-  TestSource(this.fullName);
-
-  @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-}
diff --git a/pkg/analysis_server/test/domain_server_test.dart b/pkg/analysis_server/test/domain_server_test.dart
index f7f1fda..1d8389f 100644
--- a/pkg/analysis_server/test/domain_server_test.dart
+++ b/pkg/analysis_server/test/domain_server_test.dart
@@ -67,14 +67,9 @@
     });
 
     test('shutdown', () async {
-      expect(server.running, isTrue);
-      // send request
       var request = new ServerShutdownParams().toRequest('0');
       var response = await serverChannel.sendRequest(request);
       expect(response, isResponseSuccess('0'));
-
-      // server is down
-      expect(server.running, isFalse);
     });
   });
 }
diff --git a/pkg/analysis_server/test/edit/fixes_test.dart b/pkg/analysis_server/test/edit/fixes_test.dart
index 4d07618..c9c5eaa 100644
--- a/pkg/analysis_server/test/edit/fixes_test.dart
+++ b/pkg/analysis_server/test/edit/fixes_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -35,11 +35,12 @@
     createProject();
     addTestFile('''
 main() {
-  Future<String> x = null;
+  Completer<String> x = null;
 }
 ''');
     await waitForTasksFinished();
-    List<AnalysisErrorFixes> errorFixes = await _getFixesAt('Future<String>');
+    List<AnalysisErrorFixes> errorFixes =
+        await _getFixesAt('Completer<String>');
     expect(errorFixes, hasLength(1));
     AnalysisError error = errorFixes[0].error;
     expect(error.severity, AnalysisErrorSeverity.WARNING);
@@ -130,7 +131,7 @@
         handler: analysisHandler);
 
     // Configure the test file.
-    testFile = resourceProvider.convertPath('/aaa/main.dart');
+    testFile = convertPath('/aaa/main.dart');
     testCode = 'main() { new Foo(); }';
     _addOverlay(testFile, testCode);
 
diff --git a/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart b/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart
index f7114c5..e27f275 100644
--- a/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/analysis_options_test.dart
@@ -15,24 +15,15 @@
   });
 }
 
-/// Wrapper around the test package's `fail` function.
-///
-/// Unlike the test package's `fail` function, this function is not annotated
-/// with @alwaysThrows, so we can call it at the top of a test method without
-/// causing the rest of the method to be flagged as dead code.
-void _fail(String message) {
-  fail(message);
-}
-
 @reflectiveTest
 class OptionsIntegrationTest extends AbstractAnalysisServerIntegrationTest {
-  @failingTest
+  void optionsAnalysisSetup() {
+    // Add an empty Dart file; required to trigger analysis (#35383).
+    writeFile(sourcePath('test.dart'), '');
+    standardAnalysisSetup();
+  }
+
   test_option_warning_newOptionFile() async {
-    // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds
-    // (#28868).
-
-    _fail('test timeout expected - #28868');
-
     String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
     writeFile(options, '''
 linter:
@@ -40,7 +31,7 @@
     - camel_case_typo # :)
 ''');
 
-    standardAnalysisSetup();
+    optionsAnalysisSetup();
 
     await analysisFinished;
 
@@ -57,21 +48,15 @@
     expect(error.location.startColumn, 7);
   }
 
-  @failingTest
   test_option_warning_oldOptionFile() async {
-    // TimeoutException after 0:00:30.000000: Test timed out after 30 seconds
-    // (#28868).
-
-    _fail('test timeout expected - #28868');
-
     String options = sourcePath(AnalysisEngine.ANALYSIS_OPTIONS_FILE);
     writeFile(options, '''
 linter:
   rules:
-    - camel_case_typo # :)
+    - camel_case_types
 ''');
 
-    standardAnalysisSetup();
+    optionsAnalysisSetup();
 
     await analysisFinished;
 
@@ -80,11 +65,13 @@
     expect(errors, hasLength(1));
     AnalysisError error = errors[0];
     expect(error.location.file, options);
-    expect(error.severity, AnalysisErrorSeverity.WARNING);
-    expect(error.type, AnalysisErrorType.STATIC_WARNING);
-    expect(error.location.offset, 23);
-    expect(error.location.length, 'camel_case_typo'.length);
-    expect(error.location.startLine, 3);
-    expect(error.location.startColumn, 7);
+    expect(error.severity, AnalysisErrorSeverity.INFO);
+    expect(error.type, AnalysisErrorType.HINT);
+    expect(error.location.offset, 0);
+    expect(error.location.length, 1);
+    expect(error.location.startLine, 1);
+    expect(error.location.startColumn, 1);
+    expect(error.message,
+        "The name of the analysis options file .analysis_options is deprecated; consider renaming it to analysis_options.yaml.");
   }
 }
diff --git a/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart b/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart
index be6e77a..4b102a6 100644
--- a/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart
@@ -5,13 +5,11 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../mock_sdk.dart';
 import '../support/integration_tests.dart';
 
 main() {
@@ -28,42 +26,56 @@
 class AnalysisDomainGetErrorsTest
     extends AbstractAnalysisServerIntegrationTest {
   String createNonStandardSdk() {
-    MockSdkLibrary fakeLibrary =
-        new MockSdkLibrary('dart:fake', '/lib/fake/fake.dart', '');
-    String sdkPath = path.join(sourceDirectory.path, 'sdk');
-    StringBuffer librariesContent = new StringBuffer();
-    librariesContent.writeln(
-        'final Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {');
-    MockSdk.LIBRARIES.toList()
-      ..add(fakeLibrary)
-      ..forEach((SdkLibrary library) {
-        List<String> components = path.posix.split(library.path);
-        components[0] = sdkPath;
-        String libraryPath = path.joinAll(components);
-        new Directory(path.dirname(libraryPath)).createSync(recursive: true);
-        new File(libraryPath)
-            .writeAsStringSync((library as MockSdkLibrary).content);
+    var sdkPath = path.join(sourceDirectory.path, 'sdk');
 
-        String relativePath = path.joinAll(components.sublist(2));
-        librariesContent.write('"');
-        librariesContent
-            .write(library.shortName.substring(5)); // Remove the 'dart:' prefix
-        librariesContent.write('": const LibraryInfo("');
-        librariesContent.write(relativePath);
-        librariesContent.writeln('"),');
-      });
-    librariesContent.writeln('};');
+    new Directory(path.join(sdkPath, 'lib', 'core'))
+        .createSync(recursive: true);
+    new Directory(path.join(sdkPath, 'lib', 'async'))
+        .createSync(recursive: true);
+    new Directory(path.join(sdkPath, 'lib', 'fake'))
+        .createSync(recursive: true);
 
-    String librariesPath = path.joinAll([
+    new File(path.join(sdkPath, 'lib', 'core', 'core.dart'))
+        .writeAsStringSync(r'''
+library dart.core;
+import 'dart:async';
+class bool {}
+class double {}
+class int {}
+class num {}
+class Object {}
+class Map<K, V> {}
+class Null {}
+class String {}
+class Type {}
+''');
+
+    new File(path.join(sdkPath, 'lib', 'async', 'async.dart'))
+        .writeAsStringSync(r'''
+library dart.async;
+class Future<T> {}
+''');
+
+    new File(path.join(sdkPath, 'lib', 'fake', 'fake.dart'))
+        .writeAsStringSync(r'''
+class Fake {} 
+''');
+
+    var libsDir = path.join(
       sdkPath,
       'lib',
       '_internal',
       'sdk_library_metadata',
       'lib',
-      'libraries.dart'
-    ]);
-    new Directory(path.dirname(librariesPath)).createSync(recursive: true);
-    new File(librariesPath).writeAsStringSync(librariesContent.toString());
+    );
+    new Directory(libsDir).createSync(recursive: true);
+    new File(path.join(libsDir, 'libraries.dart')).writeAsStringSync(r'''
+final LIBRARIES = const <String, LibraryInfo> {
+  "core":  const LibraryInfo("core/core.dart"),
+  "async": const LibraryInfo("async/async.dart"),
+  "fake":  const LibraryInfo("fake/fake.dart"),
+};
+''');
 
     return sdkPath;
   }
diff --git a/pkg/analysis_server/test/integration/analysis/hint_sdk_version_async_exported_from_core_test.dart b/pkg/analysis_server/test/integration/analysis/hint_sdk_version_async_exported_from_core_test.dart
new file mode 100644
index 0000000..6703374
--- /dev/null
+++ b/pkg/analysis_server/test/integration/analysis/hint_sdk_version_async_exported_from_core_test.dart
@@ -0,0 +1,65 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../support/integration_tests.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionAsyncExportedFromCoreIntegrationTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionAsyncExportedFromCoreIntegrationTest
+    extends AbstractAnalysisServerIntegrationTest {
+  test_update_pubspec() async {
+    var pubspecPath = sourcePath('pubspec.yaml');
+    writeFile(pubspecPath, r'''
+name: test
+environment:
+  sdk: ^2.0.0
+''');
+
+    var testPath = sourcePath('lib/test.dart');
+    writeFile(testPath, '''
+Future<int> zero() async => 0;
+''');
+    standardAnalysisSetup();
+
+    // There is a hint with this SDK version constraint.
+    await analysisFinished;
+    expect(currentAnalysisErrors[testPath], hasLength(1));
+
+    // 2.0.0 -> 2.1.0
+    {
+      writeFile(pubspecPath, r'''
+name: test
+environment:
+  sdk: ^2.1.0
+''');
+
+      // The pubspec.yaml file change has been noticed and processed.
+      // No more hints.
+      await analysisFinished;
+      expect(currentAnalysisErrors[testPath], isEmpty);
+    }
+
+    // 2.1.0 -> 2.0.0
+    {
+      writeFile(pubspecPath, r'''
+name: test
+environment:
+  sdk: ^2.0.0
+''');
+
+      // The pubspec.yaml file change has been noticed and processed.
+      // There is a hint again.
+      await analysisFinished;
+      expect(currentAnalysisErrors[testPath], hasLength(1));
+    }
+  }
+}
diff --git a/pkg/analysis_server/test/integration/analysis/test_all.dart b/pkg/analysis_server/test/integration/analysis/test_all.dart
index 99021da..d85814a 100644
--- a/pkg/analysis_server/test/integration/analysis/test_all.dart
+++ b/pkg/analysis_server/test/integration/analysis/test_all.dart
@@ -15,6 +15,8 @@
 import 'get_reachable_sources_test.dart' as get_reachable_sources_test;
 import 'highlights2_test.dart' as highlights2_test;
 import 'highlights_test.dart' as highlights_test;
+import 'hint_sdk_version_async_exported_from_core_test.dart'
+    as hint_sdk_version_async_exported_from_core_test;
 import 'lint_test.dart' as lint_test;
 import 'navigation_test.dart' as navigation_test;
 import 'occurrences_test.dart' as occurrences_test;
@@ -47,6 +49,7 @@
     get_reachable_sources_test.main();
     highlights2_test.main();
     highlights_test.main();
+    hint_sdk_version_async_exported_from_core_test.main();
     lint_test.main();
     navigation_test.main();
     occurrences_test.main();
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 401723d..65b4cec 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -460,26 +460,12 @@
   }
 
   /**
-   * Force the re-analysis of everything contained in the specified analysis
-   * roots. This will cause all previously computed analysis results to be
-   * discarded and recomputed, and will cause all subscribed notifications to
-   * be re-sent.
-   *
-   * If no analysis roots are provided, then all current analysis roots will be
-   * re-analyzed. If an empty list of analysis roots is provided, then nothing
-   * will be re-analyzed. If the list contains one or more paths that are not
-   * currently analysis roots, then an error of type INVALID_ANALYSIS_ROOT will
-   * be generated.
-   *
-   * Parameters
-   *
-   * roots: List<FilePath> (optional)
-   *
-   *   A list of the analysis roots that are to be re-analyzed.
+   * Force re-reading of all potentially changed files, re-resolving of all
+   * referenced URIs, and corresponding re-analysis of everything affected in
+   * the current analysis roots.
    */
-  Future sendAnalysisReanalyze({List<String> roots}) async {
-    var params = new AnalysisReanalyzeParams(roots: roots).toJson();
-    var result = await server.send("analysis.reanalyze", params);
+  Future sendAnalysisReanalyze() async {
+    var result = await server.send("analysis.reanalyze", null);
     outOfTestExpect(result, isNull);
     return null;
   }
diff --git a/pkg/analysis_server/test/integration/support/integration_tests.dart b/pkg/analysis_server/test/integration/support/integration_tests.dart
index d38cc56..16f7d4b 100644
--- a/pkg/analysis_server/test/integration/support/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/support/integration_tests.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -24,8 +24,6 @@
     'notification', const {'event': isString},
     optionalFields: const {'params': isMap});
 
-const Matcher isObject = isMap;
-
 const Matcher isString = const TypeMatcher<String>();
 
 final Matcher isResponse = new MatchesJsonObject('response', {'id': isString},
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index 13ba921..3e82faf 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -1849,14 +1849,8 @@
 
 /**
  * analysis.reanalyze params
- *
- * {
- *   "roots": optional List<FilePath>
- * }
  */
-final Matcher isAnalysisReanalyzeParams = new LazyMatcher(() =>
-    new MatchesJsonObject("analysis.reanalyze params", null,
-        optionalFields: {"roots": isListOf(isFilePath)}));
+final Matcher isAnalysisReanalyzeParams = isNull;
 
 /**
  * analysis.reanalyze result
diff --git a/pkg/analysis_server/test/lsp/code_actions_abstract.dart b/pkg/analysis_server/test/lsp/code_actions_abstract.dart
new file mode 100644
index 0000000..64aea35
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/code_actions_abstract.dart
@@ -0,0 +1,70 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:test/test.dart';
+
+import 'server_abstract.dart';
+
+abstract class AbstractCodeActionsTest extends AbstractLspAnalysisServerTest {
+  Future<void> checkCodeActionAvailable(
+    Uri uri,
+    String command,
+    String title, {
+    bool asCodeActionLiteral = false,
+    bool asCommand = false,
+  }) async {
+    final codeActions = await getCodeActions(uri.toString());
+    final codeAction = findCommand(codeActions, command);
+    expect(codeAction, isNotNull);
+
+    codeAction.map(
+      (command) {
+        if (!asCommand) {
+          throw 'Got Command but expected CodeAction literal';
+        }
+        expect(command.title, equals(title));
+        expect(command.arguments, equals([uri.toFilePath()]));
+      },
+      (codeAction) {
+        if (!asCodeActionLiteral) {
+          throw 'Got CodeAction literal but expected Command';
+        }
+        expect(codeAction, isNotNull);
+        expect(codeAction.title, equals(title));
+        expect(codeAction.command.title, equals(title));
+        expect(codeAction.command.arguments, equals([uri.toFilePath()]));
+      },
+    );
+  }
+
+  Either2<Command, CodeAction> findCommand(
+      List<Either2<Command, CodeAction>> actions, String commandID) {
+    for (var codeAction in actions) {
+      final id = codeAction.map(
+          (cmd) => cmd.command, (action) => action.command.command);
+      if (id == commandID) {
+        return codeAction;
+      }
+    }
+    return null;
+  }
+
+  CodeAction findEditAction(List<Either2<Command, CodeAction>> actions,
+      CodeActionKind actionKind, String title) {
+    for (var codeAction in actions) {
+      final codeActionLiteral =
+          codeAction.map((cmd) => null, (action) => action);
+      if (codeActionLiteral?.kind == actionKind &&
+          codeActionLiteral?.title == title) {
+        // We're specifically looking for an action that contains an edit.
+        assert(codeActionLiteral.command == null);
+        assert(codeActionLiteral.edit != null);
+        return codeActionLiteral;
+      }
+    }
+    return null;
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/code_actions_assists_test.dart b/pkg/analysis_server/test/lsp/code_actions_assists_test.dart
new file mode 100644
index 0000000..a42d083
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/code_actions_assists_test.dart
@@ -0,0 +1,94 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'code_actions_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AssistsCodeActionsTest);
+  });
+}
+
+@reflectiveTest
+class AssistsCodeActionsTest extends AbstractCodeActionsTest {
+  test_appliesCorrectEdits_withDocumentChangesSupport() async {
+    // This code should get an assist to add a show combinator.
+    const content = '''
+    import '[[dart:async]]';
+
+    Future f;
+    ''';
+
+    const expectedContent = '''
+    import 'dart:async' show Future;
+
+    Future f;
+    ''';
+    await newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.Refactor]),
+      workspaceCapabilities:
+          withDocumentChangesSupport(emptyWorkspaceClientCapabilities),
+    );
+
+    final codeActions = await getCodeActions(mainFileUri.toString(),
+        range: rangeFromMarkers(content));
+    final assist = findEditAction(
+        codeActions, CodeActionKind.Refactor, "Add explicit 'show' combinator");
+
+    // Ensure the edit came back, and using documentChanges.
+    expect(assist, isNotNull);
+    expect(assist.edit.documentChanges, isNotNull);
+    expect(assist.edit.changes, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: withoutMarkers(content),
+    };
+    applyDocumentChanges(contents, assist.edit.documentChanges);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+
+  test_appliesCorrectEdits_withoutDocumentChangesSupport() async {
+    // This code should get an assist to add a show combinator.
+    const content = '''
+    import '[[dart:async]]';
+
+    Future f;
+    ''';
+
+    const expectedContent = '''
+    import 'dart:async' show Future;
+
+    Future f;
+    ''';
+    await newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.Refactor]),
+    );
+
+    final codeActions = await getCodeActions(mainFileUri.toString(),
+        range: rangeFromMarkers(content));
+    final assistAction = findEditAction(
+        codeActions, CodeActionKind.Refactor, "Add explicit 'show' combinator");
+
+    // Ensure the edit came back, and using changes.
+    expect(assistAction, isNotNull);
+    expect(assistAction.edit.changes, isNotNull);
+    expect(assistAction.edit.documentChanges, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: withoutMarkers(content),
+    };
+    applyChanges(contents, assistAction.edit.changes);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart b/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
new file mode 100644
index 0000000..2f824c3
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
@@ -0,0 +1,96 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'code_actions_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FixesCodeActionsTest);
+  });
+}
+
+@reflectiveTest
+class FixesCodeActionsTest extends AbstractCodeActionsTest {
+  test_appliesCorrectEdits_withDocumentChangesSupport() async {
+    // This code should get a fix to remove the unused import.
+    const content = '''
+    import 'dart:async';
+    [[import]] 'dart:convert';
+
+    Future foo;
+    ''';
+
+    const expectedContent = '''
+    import 'dart:async';
+
+    Future foo;
+    ''';
+    await newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.QuickFix]),
+      workspaceCapabilities:
+          withDocumentChangesSupport(emptyWorkspaceClientCapabilities),
+    );
+
+    final codeActions = await getCodeActions(mainFileUri.toString(),
+        range: rangeFromMarkers(content));
+    final fixAction = findEditAction(
+        codeActions, CodeActionKind.QuickFix, 'Remove unused import');
+
+    // Ensure the edit came back, and using documentChanges.
+    expect(fixAction, isNotNull);
+    expect(fixAction.edit.documentChanges, isNotNull);
+    expect(fixAction.edit.changes, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: content,
+    };
+    applyDocumentChanges(contents, fixAction.edit.documentChanges);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+
+  test_appliesCorrectEdits_withoutDocumentChangesSupport() async {
+    // This code should get a fix to remove the unused import.
+    const content = '''
+    import 'dart:async';
+    [[import]] 'dart:convert';
+
+    Future foo;
+    ''';
+
+    const expectedContent = '''
+    import 'dart:async';
+
+    Future foo;
+    ''';
+    await newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.QuickFix]),
+    );
+
+    final codeActions = await getCodeActions(mainFileUri.toString(),
+        range: rangeFromMarkers(content));
+    final fixAction = findEditAction(
+        codeActions, CodeActionKind.QuickFix, 'Remove unused import');
+
+    // Ensure the edit came back, and using changes.
+    expect(fixAction, isNotNull);
+    expect(fixAction.edit.changes, isNotNull);
+    expect(fixAction.edit.documentChanges, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: content,
+    };
+    applyChanges(contents, fixAction.edit.changes);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/code_actions_source_test.dart b/pkg/analysis_server/test/lsp/code_actions_source_test.dart
new file mode 100644
index 0000000..e064771
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/code_actions_source_test.dart
@@ -0,0 +1,420 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../tool/lsp_spec/matchers.dart';
+import 'code_actions_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SortMembersSourceCodeActionsTest);
+    defineReflectiveTests(OrganizeImportsSourceCodeActionsTest);
+  });
+}
+
+@reflectiveTest
+class OrganizeImportsSourceCodeActionsTest extends AbstractCodeActionsTest {
+  test_appliesCorrectEdits_withDocumentChangesSupport() async {
+    const content = '''
+import 'dart:math';
+import 'dart:async';
+import 'dart:convert';
+
+Future foo;
+int minified(int x, int y) => min(x, y);
+    ''';
+    const expectedContent = '''
+import 'dart:async';
+import 'dart:math';
+
+Future foo;
+int minified(int x, int y) => min(x, y);
+    ''';
+    await newFile(mainFilePath, content: content);
+    await initialize(
+        workspaceCapabilities:
+            withDocumentChangesSupport(emptyWorkspaceClientCapabilities));
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.organizeImports);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    ApplyWorkspaceEditParams editParams;
+
+    final commandResponse = await handleExpectedRequest<Object,
+        ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse>(
+      Method.workspace_applyEdit,
+      () => executeCommand(command),
+      handler: (edit) {
+        // When the server sends the edit back, just keep a copy and say we
+        // applied successfully (it'll be verified below).
+        editParams = edit;
+        return new ApplyWorkspaceEditResponse(true);
+      },
+    );
+    // Successful edits return an empty success() response.
+    expect(commandResponse, isNull);
+
+    // Ensure the edit came back, and using the documentChanges.
+    expect(editParams, isNotNull);
+    expect(editParams.edit.documentChanges, isNotNull);
+    expect(editParams.edit.changes, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: content,
+    };
+    applyDocumentChanges(contents, editParams.edit.documentChanges);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+
+  test_appliesCorrectEdits_withoutDocumentChangesSupport() async {
+    const content = '''
+import 'dart:math';
+import 'dart:async';
+import 'dart:convert';
+
+Future foo;
+int minified(int x, int y) => min(x, y);
+    ''';
+    const expectedContent = '''
+import 'dart:async';
+import 'dart:math';
+
+Future foo;
+int minified(int x, int y) => min(x, y);
+    ''';
+    await newFile(mainFilePath, content: content);
+    await initialize();
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.organizeImports);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    ApplyWorkspaceEditParams editParams;
+
+    final commandResponse = await handleExpectedRequest<Object,
+        ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse>(
+      Method.workspace_applyEdit,
+      () => executeCommand(command),
+      handler: (edit) {
+        // When the server sends the edit back, just keep a copy and say we
+        // applied successfully (it'll be verified below).
+        editParams = edit;
+        return new ApplyWorkspaceEditResponse(true);
+      },
+    );
+    // Successful edits return an empty success() response.
+    expect(commandResponse, isNull);
+
+    // Ensure the edit came back, and using changes.
+    expect(editParams, isNotNull);
+    expect(editParams.edit.changes, isNotNull);
+    expect(editParams.edit.documentChanges, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: content,
+    };
+    applyChanges(contents, editParams.edit.changes);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+
+  test_availableAsCodeActionLiteral() async {
+    await newFile(mainFilePath);
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.Source]),
+    );
+
+    await checkCodeActionAvailable(
+      mainFileUri,
+      Commands.organizeImports,
+      'Organize Imports',
+      asCodeActionLiteral: true,
+    );
+  }
+
+  test_availableAsCommand() async {
+    await newFile(mainFilePath);
+    await initialize();
+
+    await checkCodeActionAvailable(
+      mainFileUri,
+      Commands.organizeImports,
+      'Organize Imports',
+      asCommand: true,
+    );
+  }
+
+  test_failsIfFileHasErrors() async {
+    final content = 'invalid dart code';
+    await newFile(mainFilePath, content: content);
+    await initialize();
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.organizeImports);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    // Ensure the request returned an error (error repsonses are thrown by
+    // the test helper to make consuming success results simpler).
+    await expectLater(executeCommand(command),
+        throwsA(isResponseError(ServerErrorCodes.FileHasErrors)));
+  }
+
+  test_noEdits() async {
+    const content = '''
+import 'dart:async';
+import 'dart:math';
+
+Future foo;
+int minified(int x, int y) => min(x, y);
+    ''';
+    await newFile(mainFilePath, content: content);
+    await initialize();
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.organizeImports);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    // Execute the command and it should return without needing us to process
+    // a workspace/applyEdit command because there were no edits.
+    final commandResponse = await executeCommand(command);
+    // Successful edits return an empty success() response.
+    expect(commandResponse, isNull);
+  }
+
+  test_unavailableWhenNotRequested() async {
+    await newFile(mainFilePath);
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.Refactor]),
+    );
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.organizeImports);
+    expect(codeAction, isNull);
+  }
+}
+
+@reflectiveTest
+class SortMembersSourceCodeActionsTest extends AbstractCodeActionsTest {
+  test_appliesCorrectEdits_withDocumentChangesSupport() async {
+    const content = '''
+    String b;
+    String a;
+    ''';
+    const expectedContent = '''
+    String a;
+    String b;
+    ''';
+    await newFile(mainFilePath, content: content);
+    await initialize(
+        workspaceCapabilities:
+            withDocumentChangesSupport(emptyWorkspaceClientCapabilities));
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.sortMembers);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    ApplyWorkspaceEditParams editParams;
+
+    final commandResponse = await handleExpectedRequest<Object,
+        ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse>(
+      Method.workspace_applyEdit,
+      () => executeCommand(command),
+      handler: (edit) {
+        // When the server sends the edit back, just keep a copy and say we
+        // applied successfully (it'll be verified below).
+        editParams = edit;
+        return new ApplyWorkspaceEditResponse(true);
+      },
+    );
+    // Successful edits return an empty success() response.
+    expect(commandResponse, isNull);
+
+    // Ensure the edit came back, and using the documentChanges.
+    expect(editParams, isNotNull);
+    expect(editParams.edit.documentChanges, isNotNull);
+    expect(editParams.edit.changes, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: content,
+    };
+    applyDocumentChanges(contents, editParams.edit.documentChanges);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+
+  test_appliesCorrectEdits_withoutDocumentChangesSupport() async {
+    const content = '''
+    String b;
+    String a;
+    ''';
+    const expectedContent = '''
+    String a;
+    String b;
+    ''';
+    await newFile(mainFilePath, content: content);
+    await initialize();
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.sortMembers);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    ApplyWorkspaceEditParams editParams;
+
+    final commandResponse = await handleExpectedRequest<Object,
+        ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse>(
+      Method.workspace_applyEdit,
+      () => executeCommand(command),
+      handler: (edit) {
+        // When the server sends the edit back, just keep a copy and say we
+        // applied successfully (it'll be verified below).
+        editParams = edit;
+        return new ApplyWorkspaceEditResponse(true);
+      },
+    );
+    // Successful edits return an empty success() response.
+    expect(commandResponse, isNull);
+
+    // Ensure the edit came back, and using changes.
+    expect(editParams, isNotNull);
+    expect(editParams.edit.changes, isNotNull);
+    expect(editParams.edit.documentChanges, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: content,
+    };
+    applyChanges(contents, editParams.edit.changes);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
+
+  test_availableAsCodeActionLiteral() async {
+    await newFile(mainFilePath);
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.Source]),
+    );
+
+    await checkCodeActionAvailable(
+      mainFileUri,
+      Commands.sortMembers,
+      'Sort Members',
+      asCodeActionLiteral: true,
+    );
+  }
+
+  test_availableAsCommand() async {
+    await newFile(mainFilePath);
+    await initialize();
+
+    await checkCodeActionAvailable(
+      mainFileUri,
+      Commands.sortMembers,
+      'Sort Members',
+      asCommand: true,
+    );
+  }
+
+  test_failsIfClientDoesntApplyEdits() async {
+    const content = '''
+    String b;
+    String a;
+    ''';
+    await newFile(mainFilePath, content: content);
+    await initialize();
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.sortMembers);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    final commandResponse = handleExpectedRequest<Object,
+        ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse>(
+      Method.workspace_applyEdit,
+      () => executeCommand(command),
+      // Claim that we failed tpo apply the edits. This is what the client
+      // would do if the edits provided were for an old version of the
+      // document.
+      handler: (edit) => new ApplyWorkspaceEditResponse(false),
+    );
+
+    // Ensure the request returned an error (error repsonses are thrown by
+    // the test helper to make consuming success results simpler).
+    await expectLater(commandResponse,
+        throwsA(isResponseError(ServerErrorCodes.ClientFailedToApplyEdit)));
+  }
+
+  test_failsIfFileHasErrors() async {
+    final content = 'invalid dart code';
+    await newFile(mainFilePath, content: content);
+    await initialize();
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.sortMembers);
+    expect(codeAction, isNotNull);
+
+    final command = codeAction.map(
+      (command) => command,
+      (codeAction) => codeAction.command,
+    );
+
+    // Ensure the request returned an error (error repsonses are thrown by
+    // the test helper to make consuming success results simpler).
+    await expectLater(executeCommand(command),
+        throwsA(isResponseError(ServerErrorCodes.FileHasErrors)));
+  }
+
+  test_unavailableWhenNotRequested() async {
+    await newFile(mainFilePath);
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.Refactor]),
+    );
+
+    final codeActions = await getCodeActions(mainFileUri.toString());
+    final codeAction = findCommand(codeActions, Commands.sortMembers);
+    expect(codeAction, isNull);
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/completion_test.dart b/pkg/analysis_server/test/lsp/completion_test.dart
new file mode 100644
index 0000000..23f9b39
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/completion_test.dart
@@ -0,0 +1,227 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CompletionTest);
+  });
+}
+
+@reflectiveTest
+class CompletionTest extends AbstractLspAnalysisServerTest {
+  test_completionKinds_default() async {
+    newFile(join(projectFolderPath, 'file.dart'));
+    newFolder(join(projectFolderPath, 'folder'));
+
+    final content = "import '^';";
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+
+    final file = res.singleWhere((c) => c.label == 'file.dart');
+    final folder = res.singleWhere((c) => c.label == 'folder/');
+    final builtin = res.singleWhere((c) => c.label == 'dart:core');
+    // Default capabilities include File + Module but not Folder.
+    expect(file.kind, equals(CompletionItemKind.File));
+    // We fall back to Module if Folder isn't supported.
+    expect(folder.kind, equals(CompletionItemKind.Module));
+    expect(builtin.kind, equals(CompletionItemKind.Module));
+  }
+
+  test_completionKinds_imports() async {
+    final content = "import '^';";
+
+    // Tell the server we support some specific CompletionItemKinds.
+    await initialize(
+      textDocumentCapabilities: withCompletionItemKinds(
+        emptyTextDocumentClientCapabilities,
+        [
+          CompletionItemKind.File,
+          CompletionItemKind.Folder,
+          CompletionItemKind.Module,
+        ],
+      ),
+    );
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+
+    final file = res.singleWhere((c) => c.label == 'file.dart');
+    final folder = res.singleWhere((c) => c.label == 'folder/');
+    final builtin = res.singleWhere((c) => c.label == 'dart:core');
+    expect(file.kind, equals(CompletionItemKind.File));
+    expect(folder.kind, equals(CompletionItemKind.Folder));
+    expect(builtin.kind, equals(CompletionItemKind.Module));
+  }
+
+  test_completionKinds_supportedSubset() async {
+    final content = '''
+    class MyClass {
+      String abcdefghij;
+    }
+
+    main() {
+      MyClass a;
+      a.abc^
+    }
+    ''';
+
+    // Tell the server we only support the Field CompletionItemKind.
+    await initialize(
+      textDocumentCapabilities: withCompletionItemKinds(
+          emptyTextDocumentClientCapabilities, [CompletionItemKind.Field]),
+    );
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    final kinds = res.map((item) => item.kind).toList();
+
+    // Ensure we only get nulls or Fields (the sample code contains Classes).
+    expect(
+      kinds,
+      everyElement(anyOf(isNull, equals(CompletionItemKind.Field))),
+    );
+  }
+
+  test_gettersAndSetters() async {
+    final content = '''
+    class MyClass {
+      String get justGetter => '';
+      String set justSetter(String value) {}
+      String get getterAndSetter => '';
+      String set getterAndSetter(String value) {}
+    }
+
+    main() {
+      MyClass a;
+      a.^
+    }
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    final getter = res.singleWhere((c) => c.label == 'justGetter');
+    final setter = res.singleWhere((c) => c.label == 'justSetter');
+    final both = res.singleWhere((c) => c.label == 'getterAndSetter');
+    expect(getter.detail, equals('String'));
+    expect(setter.detail, equals('String'));
+    expect(both.detail, equals('String'));
+    [getter, setter, both].forEach((item) {
+      expect(item.kind, equals(CompletionItemKind.Property));
+    });
+  }
+
+  test_insideString() async {
+    final content = '''
+    var a = "This is ^a test"
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    expect(res, isEmpty);
+  }
+
+  test_isDeprecated_notSupported() async {
+    final content = '''
+    class MyClass {
+      @deprecated
+      String abcdefghij;
+    }
+
+    main() {
+      MyClass a;
+      a.abc^
+    }
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    final item = res.singleWhere((c) => c.label == 'abcdefghij');
+    expect(item.deprecated, isNull);
+    // If the does not say it supports the deprecated flag, we should show
+    // '(deprecated)' in the details.
+    expect(item.detail.toLowerCase(), contains('deprecated'));
+  }
+
+  test_isDeprecated_supported() async {
+    final content = '''
+    class MyClass {
+      @deprecated
+      String abcdefghij;
+    }
+
+    main() {
+      MyClass a;
+      a.abc^
+    }
+    ''';
+
+    await initialize(
+        textDocumentCapabilities: withCompletionItemDeprecatedSupport(
+            emptyTextDocumentClientCapabilities));
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    final item = res.singleWhere((c) => c.label == 'abcdefghij');
+    expect(item.deprecated, isTrue);
+    // If the client says it supports the deprecated flag, we should not show
+    // deprecated in the details.
+    expect(item.detail, isNot(contains('deprecated')));
+  }
+
+  test_plainText() async {
+    final content = '''
+    class MyClass {
+      String abcdefghij;
+    }
+
+    main() {
+      MyClass a;
+      a.abc^
+    }
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    expect(res.any((c) => c.label == 'abcdefghij'), isTrue);
+    final item = res.singleWhere((c) => c.label == 'abcdefghij');
+    expect(item.insertTextFormat, equals(InsertTextFormat.PlainText));
+    // ignore: deprecated_member_use
+    expect(item.insertText, anyOf(equals('abcdefghij'), isNull));
+    final updated = applyTextEdits(withoutMarkers(content), [item.textEdit]);
+    expect(updated, contains('a.abcdefghij'));
+  }
+
+  test_unopenFile() async {
+    final content = '''
+    class MyClass {
+      String abcdefghij;
+    }
+
+    main() {
+      MyClass a;
+      a.abc^
+    }
+    ''';
+
+    newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize();
+    final res = await getCompletion(mainFileUri, positionFromMarker(content));
+    expect(res.any((c) => c.label == 'abcdefghij'), isTrue);
+    final item = res.singleWhere((c) => c.label == 'abcdefghij');
+    expect(item.insertTextFormat, equals(InsertTextFormat.PlainText));
+    // ignore: deprecated_member_use
+    expect(item.insertText, anyOf(equals('abcdefghij'), isNull));
+    final updated = applyTextEdits(withoutMarkers(content), [item.textEdit]);
+    expect(updated, contains('a.abcdefghij'));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/definition_test.dart b/pkg/analysis_server/test/lsp/definition_test.dart
new file mode 100644
index 0000000..4e99a7f
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/definition_test.dart
@@ -0,0 +1,89 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DefinitionTest);
+  });
+}
+
+@reflectiveTest
+class DefinitionTest extends AbstractLspAnalysisServerTest {
+  test_acrossFiles() async {
+    final mainContents = '''
+    import 'referenced.dart';
+
+    main() {
+      fo^o();
+    }
+    ''';
+
+    final referencedContents = '''
+    /// Ensure the function is on a line that
+    /// does not exist in the mainContents file
+    /// to ensure we're translating offsets to line/col
+    /// using the correct file's LineInfo
+    /// ...
+    /// ...
+    /// ...
+    /// ...
+    /// ...
+    [[foo]]() {}
+    ''';
+
+    final referencedFileUri =
+        Uri.file(join(projectFolderPath, 'lib', 'referenced.dart'));
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(mainContents));
+    await openFile(referencedFileUri, withoutMarkers(referencedContents));
+    final res =
+        await getDefinition(mainFileUri, positionFromMarker(mainContents));
+
+    expect(res, hasLength(1));
+    Location loc = res.single;
+    expect(loc.range, equals(rangeFromMarkers(referencedContents)));
+    expect(loc.uri, equals(referencedFileUri.toString()));
+  }
+
+  test_singleFile() async {
+    final contents = '''
+    [[foo]]() {
+      fo^o();
+    }
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(contents));
+    final res = await getDefinition(mainFileUri, positionFromMarker(contents));
+
+    expect(res, hasLength(1));
+    Location loc = res.single;
+    expect(loc.range, equals(rangeFromMarkers(contents)));
+    expect(loc.uri, equals(mainFileUri.toString()));
+  }
+
+  test_unopenFile() async {
+    final contents = '''
+    [[foo]]() {
+      fo^o();
+    }
+    ''';
+
+    newFile(mainFilePath, content: withoutMarkers(contents));
+    await initialize();
+    final res = await getDefinition(mainFileUri, positionFromMarker(contents));
+
+    expect(res, hasLength(1));
+    Location loc = res.single;
+    expect(loc.range, equals(rangeFromMarkers(contents)));
+    expect(loc.uri, equals(mainFileUri.toString()));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/diagnostic_test.dart b/pkg/analysis_server/test/lsp/diagnostic_test.dart
new file mode 100644
index 0000000..189b82b
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/diagnostic_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DiagnosticTest);
+  });
+}
+
+@reflectiveTest
+class DiagnosticTest extends AbstractLspAnalysisServerTest {
+  test_afterDocumentEdits() async {
+    const initialContents = 'int a = 1;';
+    newFile(mainFilePath, content: initialContents);
+
+    await initialize();
+    final initialDiagnostics = await waitForDiagnostics(mainFileUri);
+    expect(initialDiagnostics, hasLength(0));
+
+    await openFile(mainFileUri, initialContents);
+    await replaceFile(222, mainFileUri, 'String a = 1;');
+    final updatedDiagnostics = await waitForDiagnostics(mainFileUri);
+    expect(updatedDiagnostics, hasLength(1));
+  }
+
+  test_initialAnalysis() async {
+    newFile(mainFilePath, content: 'String a = 1;');
+
+    await initialize();
+    final diagnostics = await waitForDiagnostics(mainFileUri);
+    expect(diagnostics, hasLength(1));
+    final diagnostic = diagnostics.first;
+    expect(diagnostic.code, equals('invalid_assignment'));
+    expect(diagnostic.range.start.line, equals(0));
+    expect(diagnostic.range.start.character, equals(11));
+    expect(diagnostic.range.end.line, equals(0));
+    expect(diagnostic.range.end.character, equals(12));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/document_symbols_test.dart b/pkg/analysis_server/test/lsp/document_symbols_test.dart
new file mode 100644
index 0000000..b29ec7e
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/document_symbols_test.dart
@@ -0,0 +1,107 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DocumentSymbolsTest);
+  });
+}
+
+@reflectiveTest
+class DocumentSymbolsTest extends AbstractLspAnalysisServerTest {
+  test_hierarchical() async {
+    const content = '''
+    String topLevel = '';
+    class MyClass {
+      int myField;
+      MyClass(this.myField);
+      myMethod() {}
+    }
+    ''';
+    newFile(mainFilePath, content: content);
+    await initialize(
+        textDocumentCapabilities: withHierarchicalDocumentSymbolSupport(
+            emptyTextDocumentClientCapabilities));
+
+    final result = await getDocumentSymbols(mainFileUri.toString());
+    final symbols = result.map(
+      (docsymbols) => docsymbols,
+      (symbolInfos) => throw 'Expected DocumentSymbols, got SymbolInformations',
+    );
+
+    expect(symbols, hasLength(2));
+
+    final topLevel = symbols[0];
+    expect(topLevel.name, equals('topLevel'));
+    expect(topLevel.kind, equals(SymbolKind.Variable));
+
+    final myClass = symbols[1];
+    expect(myClass.name, equals('MyClass'));
+    expect(myClass.kind, equals(SymbolKind.Class));
+    expect(myClass.children, hasLength(3));
+
+    final field = myClass.children[0];
+    expect(field.name, equals('myField'));
+    expect(field.kind, equals(SymbolKind.Field));
+
+    final constructor = myClass.children[1];
+    expect(constructor.name, equals('MyClass'));
+    expect(constructor.kind, equals(SymbolKind.Constructor));
+
+    final method = myClass.children[2];
+    expect(method.name, equals('myMethod'));
+    expect(method.kind, equals(SymbolKind.Method));
+  }
+
+  test_flat() async {
+    const content = '''
+    String topLevel = '';
+    class MyClass {
+      int myField;
+      MyClass(this.myField);
+      myMethod() {}
+    }
+    ''';
+    newFile(mainFilePath, content: content);
+    await initialize();
+
+    final result = await getDocumentSymbols(mainFileUri.toString());
+    final symbols = result.map(
+      (docsymbols) => throw 'Expected SymbolInformations, got DocumentSymbols',
+      (symbolInfos) => symbolInfos,
+    );
+    expect(symbols, hasLength(5));
+
+    final topLevel = symbols[0];
+    expect(topLevel.name, equals('topLevel'));
+    expect(topLevel.kind, equals(SymbolKind.Variable));
+    expect(topLevel.containerName, isNull);
+
+    final myClass = symbols[1];
+    expect(myClass.name, equals('MyClass'));
+    expect(myClass.kind, equals(SymbolKind.Class));
+    expect(myClass.containerName, isNull);
+
+    final field = symbols[2];
+    expect(field.name, equals('myField'));
+    expect(field.kind, equals(SymbolKind.Field));
+    expect(field.containerName, equals(myClass.name));
+
+    final constructor = symbols[3];
+    expect(constructor.name, equals('MyClass'));
+    expect(constructor.kind, equals(SymbolKind.Constructor));
+    expect(constructor.containerName, equals(myClass.name));
+
+    final method = symbols[4];
+    expect(method.name, equals('myMethod'));
+    expect(method.kind, equals(SymbolKind.Method));
+    expect(method.containerName, equals(myClass.name));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/file_modification_test.dart b/pkg/analysis_server/test/lsp/file_modification_test.dart
new file mode 100644
index 0000000..5c5d8aa
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/file_modification_test.dart
@@ -0,0 +1,145 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FileModificationTest);
+  });
+}
+
+@reflectiveTest
+class FileModificationTest extends AbstractLspAnalysisServerTest {
+  test_change_badPosition() async {
+    final contents = '';
+    await initialize();
+    await openFile(mainFileUri, contents);
+
+    // Since this is a notification and not a request, the server cannot
+    // respond with an error, but instead sends a ShowMessage notification
+    // to alert the user to something failing.
+    final error = await expectErrorNotification<ShowMessageParams>(() async {
+      await changeFile(222, mainFileUri, [
+        new TextDocumentContentChangeEvent(
+          new Range(new Position(999, 999), new Position(999, 999)),
+          null,
+          '   ',
+        )
+      ]);
+    });
+
+    expect(error.message, contains('Invalid line'));
+  }
+
+  test_change_fullContents() async {
+    final initialContent = 'int a = 1;';
+    final updatedContent = 'int a = 2;';
+
+    await initialize();
+    await openFile(mainFileUri, initialContent);
+    await replaceFile(222, mainFileUri, updatedContent);
+    expect(_getOverlay(mainFilePath), equals(updatedContent));
+
+    final documentVersion = server.getVersionedDocumentIdentifier(mainFilePath);
+    expect(documentVersion.version, equals(222));
+  }
+
+  test_change_incremental() async {
+    final initialContent = '0123456789\n0123456789';
+    final expectedUpdatedContent = '0123456789\n01234   89';
+
+    await initialize();
+    await openFile(mainFileUri, initialContent);
+    await changeFile(222, mainFileUri, [
+      // Replace line1:5-1:8 with spaces.
+      new TextDocumentContentChangeEvent(
+        new Range(new Position(1, 5), new Position(1, 8)),
+        null,
+        '   ',
+      )
+    ]);
+    expect(_getOverlay(mainFilePath), equals(expectedUpdatedContent));
+
+    final documentVersion = server.getVersionedDocumentIdentifier(mainFilePath);
+    expect(documentVersion.version, equals(222));
+  }
+
+  test_change_unopenedFile() async {
+    // It's not valid for a client to send a request to modify a file that it
+    // has not opened, but Visual Studio has done it in the past so we should
+    // ensure it generates an obvious error that the user can understand.
+    final simpleEdit = new TextDocumentContentChangeEvent(
+      new Range(new Position(1, 1), new Position(1, 1)),
+      null,
+      'test',
+    );
+    await initialize();
+    final notificationParams = await expectErrorNotification<ShowMessageParams>(
+      () => changeFile(222, mainFileUri, [simpleEdit]),
+    );
+    expect(notificationParams, isNotNull);
+    expect(
+      notificationParams.message,
+      allOf(
+        contains('because the file was not previously opened'),
+        contains(mainFilePath),
+      ),
+    );
+  }
+
+  test_close() async {
+    final initialContent = 'int a = 1;';
+    final updatedContent = 'int a = 2;';
+
+    await initialize();
+    await openFile(mainFileUri, initialContent);
+    await replaceFile(222, mainFileUri, updatedContent);
+    await closeFile(mainFileUri);
+    expect(_getOverlay(mainFilePath), isNull);
+
+    // When we close a file, we expect the version in the versioned identifier to
+    // return to `null`.
+    final documentVersion = server.getVersionedDocumentIdentifier(mainFilePath);
+    expect(documentVersion.version, isNull);
+  }
+
+  test_open() async {
+    const testContent = 'CONTENT';
+
+    await initialize();
+    expect(_getOverlay(mainFilePath), isNull);
+    await openFile(mainFileUri, testContent, version: 2);
+    expect(_getOverlay(mainFilePath), equals(testContent));
+
+    // The version for a file that's just been opened (and never modified) is
+    // `null` (this means the contents match what's on disk).
+    final documentVersion = server.getVersionedDocumentIdentifier(mainFilePath);
+    expect(documentVersion.version, 2);
+  }
+
+  test_open_invalidPath() async {
+    await initialize();
+
+    final notificationParams = await expectErrorNotification<ShowMessageParams>(
+      () => openFile(new Uri.http('localhost', 'not-a-file'), ''),
+    );
+    expect(notificationParams, isNotNull);
+    expect(
+      notificationParams.message,
+      contains('URI was not a valid file:// URI'),
+    );
+  }
+
+  String _getOverlay(String path) {
+    if (server.resourceProvider.hasOverlay(path)) {
+      return server.resourceProvider.getFile(path).readAsStringSync();
+    }
+    return null;
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/format_test.dart b/pkg/analysis_server/test/lsp/format_test.dart
new file mode 100644
index 0000000..17a34b0
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/format_test.dart
@@ -0,0 +1,136 @@
+// 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:analysis_server/src/lsp/constants.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../tool/lsp_spec/matchers.dart';
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FormatTest);
+  });
+}
+
+@reflectiveTest
+class FormatTest extends AbstractLspAnalysisServerTest {
+  test_alreadyFormatted() async {
+    const contents = '''main() {
+  print('test');
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, contents);
+
+    final formatEdits = await formatDocument(mainFileUri.toString());
+    expect(formatEdits, isNull);
+  }
+
+  test_formatOnType_simple() async {
+    const contents = '''
+    main  ()
+    {
+
+        print('test');
+    ^}
+    ''';
+    final expected = '''main() {
+  print('test');
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(contents));
+
+    final formatEdits = await formatOnType(
+        mainFileUri.toString(), positionFromMarker(contents), '}');
+    expect(formatEdits, isNotNull);
+    final formattedContents = applyTextEdits(contents, formatEdits);
+    expect(formattedContents, equals(expected));
+  }
+
+  test_invalidSyntax() async {
+    const contents = '''main(((( {
+  print('test');
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, contents);
+
+    final formatEdits = await formatDocument(mainFileUri.toString());
+    expect(formatEdits, isNull);
+  }
+
+  test_path_doesNotExist() async {
+    await initialize();
+
+    await expectLater(
+      formatDocument(
+          new Uri.file(join(projectFolderPath, 'missing.dart')).toString()),
+      throwsA(isResponseError(ServerErrorCodes.InvalidFilePath)),
+    );
+  }
+
+  test_path_invalidFormat() async {
+    await initialize();
+
+    await expectLater(
+      // Add some invalid path characters to the end of a valid file:// URI.
+      formatDocument(mainFileUri.toString() + '***'),
+      throwsA(isResponseError(ServerErrorCodes.InvalidFilePath)),
+    );
+  }
+
+  test_path_notFileScheme() async {
+    await initialize();
+
+    await expectLater(
+      formatDocument('a:/a.a'),
+      throwsA(isResponseError(ServerErrorCodes.InvalidFilePath)),
+    );
+  }
+
+  test_simple() async {
+    const contents = '''
+    main  ()
+    {
+
+        print('test');
+    }
+    ''';
+    final expected = '''main() {
+  print('test');
+}
+''';
+    await initialize();
+    await openFile(mainFileUri, contents);
+
+    final formatEdits = await formatDocument(mainFileUri.toString());
+    expect(formatEdits, isNotNull);
+    final formattedContents = applyTextEdits(contents, formatEdits);
+    expect(formattedContents, equals(expected));
+  }
+
+  test_unopenFile() async {
+    const contents = '''
+    main  ()
+    {
+
+        print('test');
+    }
+    ''';
+    final expected = '''main() {
+  print('test');
+}
+''';
+    newFile(mainFilePath, content: contents);
+    await initialize();
+
+    final formatEdits = await formatDocument(mainFileUri.toString());
+    expect(formatEdits, isNotNull);
+    final formattedContents = applyTextEdits(contents, formatEdits);
+    expect(formattedContents, equals(expected));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/hover_test.dart b/pkg/analysis_server/test/lsp/hover_test.dart
new file mode 100644
index 0000000..f1312e2
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/hover_test.dart
@@ -0,0 +1,219 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../tool/lsp_spec/matchers.dart';
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(HoverTest);
+  });
+}
+
+@reflectiveTest
+class HoverTest extends AbstractLspAnalysisServerTest {
+  test_hover_bad_position() async {
+    await initialize();
+    await openFile(mainFileUri, '');
+    await expectLater(
+      () => getHover(mainFileUri, new Position(999, 999)),
+      throwsA(isResponseError(ServerErrorCodes.InvalidFileLineCol)),
+    );
+  }
+
+  test_markdown_isFormattedForDisplay() async {
+    final content = '''
+    /// This is a string.
+    ///
+    /// {@template foo}
+    /// With some [refs] and some
+    /// [links](https://www.dartlang.org/)
+    /// {@endTemplate foo}
+    ///
+    /// ```dart sample
+    /// print();
+    /// ```
+    String [[a^bc]];
+    ''';
+
+    final expectedHoverContent = '''
+```dart
+String abc
+```
+---
+This is a string.
+
+With some [refs] and some
+[links](https://www.dartlang.org/)
+
+```dart
+print();
+```
+    '''
+        .trim();
+
+    await initialize(
+        textDocumentCapabilities: withHoverContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    final hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover, isNotNull);
+    expect(hover.range, equals(rangeFromMarkers(content)));
+    expect(hover.contents, isNotNull);
+    final markup = _getMarkupContents(hover);
+    expect(markup.kind, equals(MarkupKind.Markdown));
+    expect(markup.value, equals(expectedHoverContent));
+  }
+
+  test_markdown_simple() async {
+    final content = '''
+    /// This is a string.
+    String [[a^bc]];
+    ''';
+
+    await initialize(
+        textDocumentCapabilities: withHoverContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    final hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover, isNotNull);
+    expect(hover.range, equals(rangeFromMarkers(content)));
+    expect(hover.contents, isNotNull);
+    final markup = _getMarkupContents(hover);
+    expect(markup.kind, equals(MarkupKind.Markdown));
+    expect(markup.value, contains('This is a string.'));
+  }
+
+  test_noElement() async {
+    final content = '''
+    String abc;
+
+    ^
+
+    int a;
+    ''';
+
+    await initialize(
+        textDocumentCapabilities: withHoverContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    var hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover, isNull);
+  }
+
+  test_plainText_simple() async {
+    final content = '''
+    /// This is a string.
+    String [[a^bc]];
+    ''';
+
+    await initialize(
+        textDocumentCapabilities: withHoverContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.PlainText]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    final hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover, isNotNull);
+    expect(hover.range, equals(rangeFromMarkers(content)));
+    expect(hover.contents, isNotNull);
+    // Ensure we got PlainText back as the type, even though we're sending the
+    // same markdown content.
+    final markup = _getMarkupContents(hover);
+    expect(markup.kind, equals(MarkupKind.PlainText));
+    expect(markup.value, contains('This is a string.'));
+  }
+
+  test_string_noDocComment() async {
+    final content = '''
+    String [[a^bc]];
+    ''';
+
+    final expectedHoverContent = '''
+```dart
+String abc
+```
+    '''
+        .trim();
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover, isNotNull);
+    expect(hover.range, equals(rangeFromMarkers(content)));
+    expect(hover.contents, isNotNull);
+    expect(_getStringContents(hover), equals(expectedHoverContent));
+  }
+
+  test_string_reflectsLatestEdits() async {
+    final original = '''
+    /// Original string.
+    String [[a^bc]];
+    ''';
+    final updated = '''
+    /// Updated string.
+    String [[a^bc]];
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(original));
+    var hover = await getHover(mainFileUri, positionFromMarker(original));
+    var contents = _getStringContents(hover);
+    expect(contents, contains('Original'));
+
+    await replaceFile(222, mainFileUri, withoutMarkers(updated));
+    hover = await getHover(mainFileUri, positionFromMarker(updated));
+    contents = _getStringContents(hover);
+    expect(contents, contains('Updated'));
+  }
+
+  test_string_simple() async {
+    final content = '''
+    /// This is a string.
+    String [[a^bc]];
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    final hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover, isNotNull);
+    expect(hover.range, equals(rangeFromMarkers(content)));
+    expect(hover.contents, isNotNull);
+    final contents = _getStringContents(hover);
+    expect(contents, contains('This is a string.'));
+  }
+
+  test_unopenFile() async {
+    final content = '''
+    /// This is a string.
+    String [[a^bc]];
+    ''';
+
+    newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize();
+    final hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover, isNotNull);
+    expect(hover.range, equals(rangeFromMarkers(content)));
+    expect(hover.contents, isNotNull);
+    final markup = _getStringContents(hover);
+    expect(markup, contains('This is a string.'));
+  }
+
+  MarkupContent _getMarkupContents(Hover hover) {
+    return hover.contents.map(
+      (t1) => throw 'Hover contents were String, not MarkupContent',
+      (t2) => t2,
+    );
+  }
+
+  String _getStringContents(Hover hover) {
+    return hover.contents.map(
+      (t1) => t1,
+      (t2) => throw 'Hover contents were MarkupContent, not String',
+    );
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/initialization_test.dart b/pkg/analysis_server/test/lsp/initialization_test.dart
new file mode 100644
index 0000000..86699ed
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/initialization_test.dart
@@ -0,0 +1,81 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/src/lsp/constants.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InitializationTest);
+  });
+}
+
+@reflectiveTest
+class InitializationTest extends AbstractLspAnalysisServerTest {
+  test_initialize() async {
+    final response = await initialize();
+    expect(response, isNotNull);
+    expect(response.error, isNull);
+    expect(response.result, isNotNull);
+    expect(response.result, TypeMatcher<InitializeResult>());
+    InitializeResult result = response.result;
+    expect(result.capabilities, isNotNull);
+    // Check some basic capabilities that are unlikely to change.
+    expect(result.capabilities.textDocumentSync, isNotNull);
+    result.capabilities.textDocumentSync.map(
+      (options) {
+        // We'll always request open/closed notifications and incremental updates.
+        expect(options.openClose, isTrue);
+        expect(options.change, equals(TextDocumentSyncKind.Incremental));
+      },
+      (_) =>
+          throw 'Expected textDocumentSync capabilities to be a $TextDocumentSyncOptions',
+    );
+  }
+
+  test_initialize_onlyAllowedOnce() async {
+    await initialize();
+    final response = await initialize();
+    expect(response, isNotNull);
+    expect(response.result, isNull);
+    expect(response.error, isNotNull);
+    expect(
+        response.error.code, equals(ServerErrorCodes.ServerAlreadyInitialized));
+  }
+
+  test_uninitialized_dropsNotifications() async {
+    final notification =
+        makeNotification(new Method.fromJson('randomNotification'), null);
+    final nextNotification = channel.errorNotificationsFromServer.first;
+    channel.sendNotificationToServer(notification);
+
+    // Wait up to 1sec to ensure no error/log notifications were sent back.
+    var didTimeout = false;
+    final notificationFromServer = await nextNotification.timeout(
+      const Duration(seconds: 1),
+      onTimeout: () {
+        didTimeout = true;
+      },
+    );
+
+    expect(notificationFromServer, isNull);
+    expect(didTimeout, isTrue);
+  }
+
+  test_uninitialized_rejectsRequests() async {
+    final request = makeRequest(new Method.fromJson('randomRequest'), null);
+    final logParams = await expectErrorNotification<LogMessageParams>(() async {
+      final response = await channel.sendRequestToServer(request);
+      expect(response.id, equals(request.id));
+      expect(response.result, isNull);
+      expect(response.error, isNotNull);
+      expect(response.error.code, ErrorCodes.ServerNotInitialized);
+    });
+    expect(logParams.type, equals(MessageType.Error));
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/priority_files_test.dart b/pkg/analysis_server/test/lsp/priority_files_test.dart
new file mode 100644
index 0000000..7a7b330
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/priority_files_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(PriorityFilesTest);
+  });
+}
+
+@reflectiveTest
+class PriorityFilesTest extends AbstractLspAnalysisServerTest {
+  test_close() async {
+    await initialize();
+    await openFile(mainFileUri, '');
+    await closeFile(mainFileUri);
+
+    expect(server.priorityFiles, isNot(contains(mainFilePath)));
+    server.driverMap.values.forEach((driver) {
+      expect(driver.priorityFiles, isNot(contains(mainFilePath)));
+    });
+  }
+
+  test_open() async {
+    await initialize();
+    await openFile(mainFileUri, '');
+
+    expect(server.priorityFiles, contains(mainFilePath));
+    server.driverMap.values.forEach((driver) {
+      expect(driver.priorityFiles, contains(mainFilePath));
+    });
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/references_test.dart b/pkg/analysis_server/test/lsp/references_test.dart
new file mode 100644
index 0000000..bd36c11
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/references_test.dart
@@ -0,0 +1,141 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReferencesTest);
+  });
+}
+
+@reflectiveTest
+class ReferencesTest extends AbstractLspAnalysisServerTest {
+  test_acrossFiles_includeDeclaration() async {
+    final mainContents = '''
+    import 'referenced.dart';
+
+    main() {
+      [[foo]]();
+    }
+    ''';
+
+    final referencedContents = '''
+    /// Ensure the function is on a line that
+    /// does not exist in the mainContents file
+    /// to ensure we're translating offsets to line/col
+    /// using the correct file's LineInfo
+    /// ...
+    /// ...
+    /// ...
+    /// ...
+    /// ...
+    [[^foo]]() {}
+    ''';
+
+    final referencedFileUri =
+        Uri.file(join(projectFolderPath, 'lib', 'referenced.dart'));
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(mainContents));
+    await openFile(referencedFileUri, withoutMarkers(referencedContents));
+    final res = await getReferences(
+      referencedFileUri,
+      positionFromMarker(referencedContents),
+      includeDeclarations: true,
+    );
+
+    // Ensure both the reference and the declaration are included.
+    expect(res, hasLength(2));
+    expect(
+        res,
+        contains(new Location(
+            mainFileUri.toString(), rangeFromMarkers(mainContents))));
+    expect(
+        res,
+        contains(new Location(referencedFileUri.toString(),
+            rangeFromMarkers(referencedContents))));
+  }
+
+  test_acrossFiles_withoutDeclaration() async {
+    final mainContents = '''
+    import 'referenced.dart';
+
+    main() {
+      [[foo]]();
+    }
+    ''';
+
+    final referencedContents = '''
+    /// Ensure the function is on a line that
+    /// does not exist in the mainContents file
+    /// to ensure we're translating offsets to line/col
+    /// using the correct file's LineInfo
+    /// ...
+    /// ...
+    /// ...
+    /// ...
+    /// ...
+    ^foo() {}
+    ''';
+
+    final referencedFileUri =
+        Uri.file(join(projectFolderPath, 'lib', 'referenced.dart'));
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(mainContents));
+    await openFile(referencedFileUri, withoutMarkers(referencedContents));
+    final res = await getReferences(
+        referencedFileUri, positionFromMarker(referencedContents));
+
+    expect(res, hasLength(1));
+    Location loc = res.single;
+    expect(loc.range, equals(rangeFromMarkers(mainContents)));
+    expect(loc.uri, equals(mainFileUri.toString()));
+  }
+
+  test_singleFile_withoutDeclaration() async {
+    final contents = '''
+    f^oo() {
+      [[foo]]();
+    }
+    ''';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(contents));
+    final res = await getReferences(mainFileUri, positionFromMarker(contents));
+
+    expect(res, hasLength(1));
+    expect(
+      res,
+      contains(
+        new Location(mainFileUri.toString(), rangeFromMarkers(contents)),
+      ),
+    );
+  }
+
+  test_unopenFile() async {
+    final contents = '''
+    f^oo() {
+      [[foo]]();
+    }
+    ''';
+
+    newFile(mainFilePath, content: withoutMarkers(contents));
+    await initialize();
+    final res = await getReferences(mainFileUri, positionFromMarker(contents));
+
+    expect(res, hasLength(1));
+    expect(
+      res,
+      contains(
+        new Location(mainFileUri.toString(), rangeFromMarkers(contents)),
+      ),
+    );
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/server_abstract.dart b/pkg/analysis_server/test/lsp/server_abstract.dart
new file mode 100644
index 0000000..45e2ad9
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/server_abstract.dart
@@ -0,0 +1,638 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
+import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analyzer/instrumentation/instrumentation.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:meta/meta.dart';
+import 'package:test/test.dart';
+
+import '../mocks.dart';
+
+const dartLanguageId = 'dart';
+
+/// Useful for debugging locally, setting this to true will cause all JSON
+/// communication to be printed to stdout.
+const debugPrintCommunication = false;
+
+final beginningOfDocument = new Range(new Position(0, 0), new Position(0, 0));
+
+abstract class AbstractLspAnalysisServerTest
+    with ResourceProviderMixin, ClientCapabilitiesHelperMixin {
+  static const positionMarker = '^';
+  static const rangeMarkerStart = '[[';
+  static const rangeMarkerEnd = ']]';
+  static const allMarkers = [positionMarker, rangeMarkerStart, rangeMarkerEnd];
+  static final allMarkersPattern =
+      new RegExp(allMarkers.map(RegExp.escape).join('|'));
+
+  MockLspServerChannel channel;
+  LspAnalysisServer server;
+
+  int _id = 0;
+  String projectFolderPath, mainFilePath;
+  Uri mainFileUri;
+
+  void applyChanges(
+    Map<String, String> fileContents,
+    Map<String, List<TextEdit>> changes,
+  ) {
+    changes.forEach((fileUri, edits) {
+      final path = Uri.parse(fileUri).toFilePath();
+      fileContents[path] = applyTextEdits(fileContents[path], edits);
+    });
+  }
+
+  void applyDocumentChanges(
+      Map<String, String> fileContents,
+      Either2<
+              List<TextDocumentEdit>,
+              List<
+                  Either4<TextDocumentEdit, CreateFile, RenameFile,
+                      DeleteFile>>>
+          documentChanges) {
+    documentChanges.map(
+      (edits) => applyTextDocumentEdits(fileContents, edits),
+      (changes) => applyResourceChanges(fileContents, changes),
+    );
+  }
+
+  void applyResourceChanges(
+    Map<String, String> oldFileContent,
+    List<Either4<TextDocumentEdit, CreateFile, RenameFile, DeleteFile>> changes,
+  ) {
+    // TODO(dantup): Implement handling of resource changes (not currently used).
+    throw 'Test helper applyResourceChanges not currently supported';
+  }
+
+  String applyTextDocumentEdit(String content, TextDocumentEdit edit) {
+    return edit.edits.fold(content, applyTextEdit);
+  }
+
+  void applyTextDocumentEdits(
+      Map<String, String> oldFileContent, List<TextDocumentEdit> edits) {
+    edits.forEach((edit) {
+      final path = Uri.parse(edit.textDocument.uri).toFilePath();
+      if (!oldFileContent.containsKey(path)) {
+        throw 'Recieved edits for $path which was not provided as a file to be edited';
+      }
+      oldFileContent[path] = applyTextDocumentEdit(oldFileContent[path], edit);
+    });
+  }
+
+  String applyTextEdit(String content, TextEdit change) {
+    final startPos = change.range.start;
+    final endPos = change.range.end;
+    final lineInfo = LineInfo.fromContent(content);
+    final start = lineInfo.getOffsetOfLine(startPos.line) + startPos.character;
+    final end = lineInfo.getOffsetOfLine(endPos.line) + endPos.character;
+    return content.replaceRange(start, end, change.newText);
+  }
+
+  String applyTextEdits(String oldContent, List<TextEdit> changes) {
+    String newContent = oldContent;
+    // Complex text manipulations are described with an array of TextEdit's,
+    // representing a single change to the document.
+    //
+    //  All text edits ranges refer to positions in the original document. Text
+    // edits ranges must never overlap, that means no part of the original
+    // document must be manipulated by more than one edit. However, it is possible
+    // that multiple edits have the same start position: multiple inserts, or any
+    // number of inserts followed by a single remove or replace edit. If multiple
+    // inserts have the same position, the order in the array defines the order in
+    // which the inserted strings appear in the resulting text.
+    if (changes.length > 1) {
+      // TODO(dantup): Implement multi-edit edits.
+      throw 'Test helper applyTextEdits does not support applying multiple edits';
+    } else if (changes.length == 1) {
+      newContent = applyTextEdit(newContent, changes.single);
+    }
+
+    return newContent;
+  }
+
+  Future changeFile(
+    int newVersion,
+    Uri uri,
+    List<TextDocumentContentChangeEvent> changes,
+  ) async {
+    var notification = makeNotification(
+      Method.textDocument_didChange,
+      new DidChangeTextDocumentParams(
+        new VersionedTextDocumentIdentifier(newVersion, uri.toString()),
+        changes,
+      ),
+    );
+    channel.sendNotificationToServer(notification);
+    await pumpEventQueue();
+  }
+
+  Future closeFile(Uri uri) async {
+    var notification = makeNotification(
+      Method.textDocument_didClose,
+      new DidCloseTextDocumentParams(
+          new TextDocumentIdentifier(uri.toString())),
+    );
+    channel.sendNotificationToServer(notification);
+    await pumpEventQueue();
+  }
+
+  Future<Object> executeCommand(Command command) async {
+    final request = makeRequest(
+      Method.workspace_executeCommand,
+      new ExecuteCommandParams(
+        command.command,
+        command.arguments,
+      ),
+    );
+    return expectSuccessfulResponseTo(request);
+  }
+
+  Future<T> expectErrorNotification<T>(
+    FutureOr<void> f(), {
+    Duration timeout = const Duration(seconds: 5),
+  }) async {
+    final firstError = channel.errorNotificationsFromServer.first;
+    await f();
+
+    final notificationFromServer = await firstError.timeout(timeout);
+
+    expect(notificationFromServer, isNotNull);
+    return notificationFromServer.params as T;
+  }
+
+  /// Expects a [method] request from the server after executing [f].
+  Future<RequestMessage> expectRequest(
+    Method method,
+    FutureOr<void> f(), {
+    Duration timeout = const Duration(seconds: 5),
+  }) async {
+    final firstRequest =
+        channel.requestsFromServer.firstWhere((n) => n.method == method);
+    await f();
+
+    final requestFromServer = await firstRequest.timeout(timeout);
+
+    expect(requestFromServer, isNotNull);
+    return requestFromServer;
+  }
+
+  /// Sends a request to the server and unwraps the result. Throws if the
+  /// response was not successful or returned an error.
+  Future<T> expectSuccessfulResponseTo<T>(RequestMessage request) async {
+    final resp = await channel.sendRequestToServer(request);
+    if (resp.error != null) {
+      throw resp.error;
+    } else {
+      return resp.result as T;
+    }
+  }
+
+  Future<List<TextEdit>> formatDocument(String fileUri) async {
+    final request = makeRequest(
+      Method.textDocument_formatting,
+      new DocumentFormattingParams(
+        new TextDocumentIdentifier(fileUri),
+        new FormattingOptions(2, true), // These currently don't do anything
+      ),
+    );
+    return expectSuccessfulResponseTo(request);
+  }
+
+  Future<List<TextEdit>> formatOnType(
+      String fileUri, Position pos, String character) async {
+    final request = makeRequest(
+      Method.textDocument_onTypeFormatting,
+      new DocumentOnTypeFormattingParams(
+        new TextDocumentIdentifier(fileUri),
+        pos,
+        character,
+        new FormattingOptions(2, true), // These currently don't do anything
+      ),
+    );
+    return expectSuccessfulResponseTo(request);
+  }
+
+  Future<List<Either2<Command, CodeAction>>> getCodeActions(
+    String fileUri, {
+    Range range,
+    List<CodeActionKind> kinds,
+  }) async {
+    final request = makeRequest(
+      Method.textDocument_codeAction,
+      new CodeActionParams(
+          new TextDocumentIdentifier(fileUri),
+          range ?? beginningOfDocument,
+          // TODO(dantup): We may need to revise the tests/implementation when
+          // it's clear how we're supposed to handle diagnostics:
+          // https://github.com/Microsoft/language-server-protocol/issues/583
+          new CodeActionContext([], kinds)),
+    );
+    return expectSuccessfulResponseTo(request);
+  }
+
+  Future<List<CompletionItem>> getCompletion(Uri uri, Position pos,
+      {CompletionContext context}) async {
+    final request = makeRequest(
+      Method.textDocument_completion,
+      new CompletionParams(
+        context,
+        new TextDocumentIdentifier(uri.toString()),
+        pos,
+      ),
+    );
+    return expectSuccessfulResponseTo<List<CompletionItem>>(request);
+  }
+
+  Future<List<Location>> getDefinition(Uri uri, Position pos) async {
+    final request = makeRequest(
+      Method.textDocument_definition,
+      new TextDocumentPositionParams(
+        new TextDocumentIdentifier(uri.toString()),
+        pos,
+      ),
+    );
+    return expectSuccessfulResponseTo<List<Location>>(request);
+  }
+
+  Future<Either2<List<DocumentSymbol>, List<SymbolInformation>>>
+      getDocumentSymbols(String fileUri) async {
+    final request = makeRequest(
+      Method.textDocument_documentSymbol,
+      new DocumentSymbolParams(
+        new TextDocumentIdentifier(fileUri),
+      ),
+    );
+    return expectSuccessfulResponseTo(request);
+  }
+
+  Future<Hover> getHover(Uri uri, Position pos) async {
+    final request = makeRequest(
+      Method.textDocument_hover,
+      new TextDocumentPositionParams(
+          new TextDocumentIdentifier(uri.toString()), pos),
+    );
+    return expectSuccessfulResponseTo<Hover>(request);
+  }
+
+  Future<List<Location>> getReferences(
+    Uri uri,
+    Position pos, {
+    includeDeclarations = false,
+  }) async {
+    final request = makeRequest(
+      Method.textDocument_references,
+      new ReferenceParams(
+        new ReferenceContext(includeDeclarations),
+        new TextDocumentIdentifier(uri.toString()),
+        pos,
+      ),
+    );
+    return expectSuccessfulResponseTo<List<Location>>(request);
+  }
+
+  Future<SignatureHelp> getSignatureHelp(Uri uri, Position pos) async {
+    final request = makeRequest(
+      Method.textDocument_signatureHelp,
+      new TextDocumentPositionParams(
+        new TextDocumentIdentifier(uri.toString()),
+        pos,
+      ),
+    );
+    return expectSuccessfulResponseTo<SignatureHelp>(request);
+  }
+
+  /// Executes [f] then waits for a request of type [method] from the server which
+  /// is passed to [handler] to process, then waits for (and returns) the
+  /// response to the original request.
+  ///
+  /// This is used for testing things like code actions, where the client initiates
+  /// a request but the server does not respond to it until it's sent its own
+  /// request to the client and it recieved a response.
+  ///
+  ///     Client                                 Server
+  ///     1. |- Req: textDocument/codeAction      ->
+  ///     1. <- Resp: textDocument/codeAction     -|
+  ///
+  ///     2. |- Req: workspace/executeCommand  ->
+  ///           3. <- Req: textDocument/applyEdits  -|
+  ///           3. |- Resp: textDocument/applyEdits ->
+  ///     2. <- Resp: workspace/executeCommand -|
+  ///
+  /// Request 2 from the client is not responded to until the server has its own
+  /// response to the request it sends (3).
+  Future<T> handleExpectedRequest<T, R, RR>(
+    Method method,
+    Future<T> f(), {
+    @required FutureOr<RR> handler(R params),
+    Duration timeout = const Duration(seconds: 5),
+  }) async {
+    FutureOr<T> outboundRequest;
+
+    // Run [f] and wait for the incoming request from the server.
+    final incomingRequest = await expectRequest(method, () {
+      // Don't return/await the response yet, as this may not complete until
+      // after we have handled the request that comes from the server.
+      outboundRequest = f();
+    });
+
+    // Handle the request from the server and send the response back.
+    final clientsResponse = await handler(incomingRequest.params as R);
+    respondTo(incomingRequest, clientsResponse);
+
+    // Return a future that completes when the response to the original request
+    // (from [f]) returns.
+    return outboundRequest;
+  }
+
+  /// A helper that initializes the server with common values, since the server
+  /// will reject any other requests until it is initialized.
+  /// Capabilities are overridden by providing JSON to avoid having to construct
+  /// full objects just to change one value (the types are immutable) so must
+  /// match the spec exactly and are not verified.
+  Future<ResponseMessage> initialize({
+    String rootPath,
+    TextDocumentClientCapabilities textDocumentCapabilities,
+    WorkspaceClientCapabilities workspaceCapabilities,
+  }) async {
+    final rootUri = Uri.file(rootPath ?? projectFolderPath).toString();
+    final request = makeRequest(
+        Method.initialize,
+        new InitializeParams(
+            null,
+            null,
+            rootUri,
+            null,
+            new ClientCapabilities(
+              workspaceCapabilities,
+              textDocumentCapabilities,
+              null,
+            ),
+            null,
+            null));
+    final response = await channel.sendRequestToServer(request);
+    expect(response.id, equals(request.id));
+
+    if (response.error == null) {
+      final notification = makeNotification(Method.initialized, null);
+      channel.sendNotificationToServer(notification);
+    }
+
+    return response;
+  }
+
+  NotificationMessage makeNotification(Method method, ToJsonable params) {
+    return new NotificationMessage(method, params, jsonRpcVersion);
+  }
+
+  RequestMessage makeRequest(Method method, ToJsonable params) {
+    final id = Either2<num, String>.t1(_id++);
+    return new RequestMessage(id, method, params, jsonRpcVersion);
+  }
+
+  Future openFile(Uri uri, String content, {num version = 1}) async {
+    var notification = makeNotification(
+      Method.textDocument_didOpen,
+      new DidOpenTextDocumentParams(new TextDocumentItem(
+          uri.toString(), dartLanguageId, version, content)),
+    );
+    channel.sendNotificationToServer(notification);
+    await pumpEventQueue();
+  }
+
+  Position positionFromMarker(String contents) =>
+      positionFromOffset(contents.indexOf('^'), contents);
+
+  Position positionFromOffset(int offset, String contents) {
+    final lineInfo = LineInfo.fromContent(contents);
+    return toPosition(lineInfo.getLocation(offset));
+  }
+
+  /// Returns the range surrounded by `[[markers]]` in the provided string,
+  /// excluding the markers themselves (as well as position markers `^` from
+  /// the offsets).
+  Range rangeFromMarkers(String contents) {
+    contents = contents.replaceAll(positionMarker, '');
+    final start = contents.indexOf(rangeMarkerStart);
+    if (start == -1) {
+      throw 'Contents did not contain $rangeMarkerStart';
+    }
+    final end = contents.indexOf(rangeMarkerEnd);
+    if (end == -1) {
+      throw 'Contents did not contain $rangeMarkerEnd';
+    }
+    return new Range(
+      positionFromOffset(start, contents),
+      positionFromOffset(end - rangeMarkerStart.length, contents),
+    );
+  }
+
+  Future replaceFile(int newVersion, Uri uri, String content) async {
+    await changeFile(
+      newVersion,
+      uri,
+      [new TextDocumentContentChangeEvent(null, null, content)],
+    );
+  }
+
+  /// Sends [responseParams] to the server as a successful response to
+  /// a server-initiated [request].
+  void respondTo<T>(RequestMessage request, T responseParams) async {
+    channel.sendResponseToServer(
+        new ResponseMessage(request.id, responseParams, null, jsonRpcVersion));
+  }
+
+  void setUp() {
+    channel = new MockLspServerChannel(debugPrintCommunication);
+    // Create an SDK in the mock file system.
+    new MockSdk(resourceProvider: resourceProvider);
+    server = new LspAnalysisServer(
+        channel,
+        resourceProvider,
+        new AnalysisServerOptions(),
+        new DartSdkManager(convertPath('/sdk'), false),
+        InstrumentationService.NULL_SERVICE);
+
+    projectFolderPath = convertPath('/project');
+    newFolder(projectFolderPath);
+    newFolder(join(projectFolderPath, 'lib'));
+    // Create a folder and file to aid testing that includes imports/completion.
+    newFolder(join(projectFolderPath, 'lib', 'folder'));
+    newFile(join(projectFolderPath, 'lib', 'file.dart'));
+    mainFilePath = join(projectFolderPath, 'lib', 'main.dart');
+    mainFileUri = Uri.file(mainFilePath);
+  }
+
+  Future tearDown() async {
+    channel.close();
+    await server.shutdown();
+  }
+
+  Future<List<Diagnostic>> waitForDiagnostics(Uri uri) async {
+    PublishDiagnosticsParams diagnosticParams;
+    await channel.serverToClient.firstWhere((message) {
+      if (message is NotificationMessage &&
+          message.method == Method.textDocument_publishDiagnostics) {
+        diagnosticParams = message.params;
+
+        return diagnosticParams.uri == uri.toString();
+      }
+      return false;
+    });
+    return diagnosticParams.diagnostics;
+  }
+
+  /// Removes markers like `[[` and `]]` and `^` that are used for marking
+  /// positions/ranges in strings to avoid hard-coding positions in tests.
+  String withoutMarkers(String contents) =>
+      contents.replaceAll(allMarkersPattern, '');
+}
+
+mixin ClientCapabilitiesHelperMixin {
+  final emptyTextDocumentClientCapabilities =
+      new TextDocumentClientCapabilities(
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null,
+          null);
+
+  final emptyWorkspaceClientCapabilities = new WorkspaceClientCapabilities(
+      null, null, null, null, null, null, null, null);
+
+  TextDocumentClientCapabilities extendTextDocumentCapabilities(
+    TextDocumentClientCapabilities source,
+    Map<String, dynamic> textDocumentCapabilities,
+  ) {
+    final json = source.toJson();
+    if (textDocumentCapabilities != null) {
+      textDocumentCapabilities.keys.forEach((key) {
+        json[key] = textDocumentCapabilities[key];
+      });
+    }
+    return TextDocumentClientCapabilities.fromJson(json);
+  }
+
+  WorkspaceClientCapabilities extendWorkspaceCapabilities(
+    WorkspaceClientCapabilities source,
+    Map<String, dynamic> workspaceCapabilities,
+  ) {
+    final json = source.toJson();
+    if (workspaceCapabilities != null) {
+      workspaceCapabilities.keys.forEach((key) {
+        json[key] = workspaceCapabilities[key];
+      });
+    }
+    return WorkspaceClientCapabilities.fromJson(json);
+  }
+
+  TextDocumentClientCapabilities withCodeActionKinds(
+    TextDocumentClientCapabilities source,
+    List<CodeActionKind> kinds,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'codeAction': {
+        'codeActionLiteralSupport': {
+          'codeActionKind': {'valueSet': kinds.map((k) => k.toJson()).toList()}
+        }
+      }
+    });
+  }
+
+  TextDocumentClientCapabilities withCompletionItemDeprecatedSupport(
+    TextDocumentClientCapabilities source,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'completion': {
+        'completionItem': {'deprecatedSupport': true}
+      }
+    });
+  }
+
+  TextDocumentClientCapabilities withCompletionItemSnippetSupport(
+    TextDocumentClientCapabilities source,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'completion': {
+        'completionItem': {'snippetSupport': true}
+      }
+    });
+  }
+
+  TextDocumentClientCapabilities withCompletionItemKinds(
+    TextDocumentClientCapabilities source,
+    List<CompletionItemKind> kinds,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'completion': {
+        'completionItemKind': {
+          'valueSet': kinds.map((k) => k.toJson()).toList()
+        }
+      }
+    });
+  }
+
+  TextDocumentClientCapabilities withHoverContentFormat(
+    TextDocumentClientCapabilities source,
+    List<MarkupKind> formats,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'hover': {'contentFormat': formats.map((k) => k.toJson()).toList()}
+    });
+  }
+
+  TextDocumentClientCapabilities withSignatureHelpContentFormat(
+    TextDocumentClientCapabilities source,
+    List<MarkupKind> formats,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'signatureHelp': {
+        'signatureInformation': {
+          'documentationFormat': formats.map((k) => k.toJson()).toList()
+        }
+      }
+    });
+  }
+
+  TextDocumentClientCapabilities withHierarchicalDocumentSymbolSupport(
+    TextDocumentClientCapabilities source,
+  ) {
+    return extendTextDocumentCapabilities(source, {
+      'documentSymbol': {'hierarchicalDocumentSymbolSupport': true}
+    });
+  }
+
+  WorkspaceClientCapabilities withDocumentChangesSupport(
+    WorkspaceClientCapabilities source,
+  ) {
+    return extendWorkspaceCapabilities(source, {
+      'workspaceEdit': {'documentChanges': true}
+    });
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/server_test.dart b/pkg/analysis_server/test/lsp/server_test.dart
new file mode 100644
index 0000000..233b57a
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/server_test.dart
@@ -0,0 +1,110 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ServerTest);
+  });
+}
+
+@reflectiveTest
+class ServerTest extends AbstractLspAnalysisServerTest {
+  test_inconsistentStateError() async {
+    await initialize();
+    await openFile(mainFileUri, '');
+    // Attempt to make an illegal modification to the file. This indicates the
+    // client and server are out of sync and we expect the server to shut down.
+    final error = await expectErrorNotification<ShowMessageParams>(() async {
+      await changeFile(222, mainFileUri, [
+        new TextDocumentContentChangeEvent(
+            new Range(new Position(99, 99), new Position(99, 99)), null, ' '),
+      ]);
+    });
+
+    expect(error, isNotNull);
+    expect(error.message, contains('Invalid line'));
+
+    // Wait for up to 10 seconds for the server to shutdown.
+    await server.exited.timeout(const Duration(seconds: 10));
+  }
+
+  test_shutdown_initialized() async {
+    await initialize();
+    final request = makeRequest(Method.shutdown, null);
+    final response = await channel.sendRequestToServer(request);
+    expect(response.id, equals(request.id));
+    expect(response.error, isNull);
+    expect(response.result, isNull);
+  }
+
+  test_shutdown_uninitialized() async {
+    final request = makeRequest(Method.shutdown, null);
+    final response = await channel.sendRequestToServer(request);
+    expect(response.id, equals(request.id));
+    expect(response.error, isNull);
+    expect(response.result, isNull);
+  }
+
+  test_unknownNotifications_logError() async {
+    await initialize();
+
+    final notification =
+        makeNotification(new Method.fromJson(r'some/randomNotification'), null);
+
+    final notificationParams = await expectErrorNotification<ShowMessageParams>(
+      () => channel.sendNotificationToServer(notification),
+    );
+    expect(notificationParams, isNotNull);
+    expect(
+      notificationParams.message,
+      contains('Unknown method some/randomNotification'),
+    );
+  }
+
+  test_unknownOptionalNotifications_silentlyDropped() async {
+    await initialize();
+    final notification =
+        makeNotification(new Method.fromJson(r'$/randomNotification'), null);
+    final firstError = channel.errorNotificationsFromServer.first;
+    channel.sendNotificationToServer(notification);
+
+    // Wait up to 1sec to ensure no error/log notifications were sent back.
+    var didTimeout = false;
+    final notificationFromServer = await firstError.timeout(
+      const Duration(seconds: 1),
+      onTimeout: () {
+        didTimeout = true;
+      },
+    );
+
+    expect(notificationFromServer, isNull);
+    expect(didTimeout, isTrue);
+  }
+
+  test_unknownRequest_rejected() async {
+    await initialize();
+    final request = makeRequest(new Method.fromJson('randomRequest'), null);
+    final response = await channel.sendRequestToServer(request);
+    expect(response.id, equals(request.id));
+    expect(response.error, isNotNull);
+    expect(response.error.code, equals(ErrorCodes.MethodNotFound));
+    expect(response.result, isNull);
+  }
+
+  test_unknownOptionalRequest_rejected() async {
+    await initialize();
+    final request = makeRequest(new Method.fromJson(r'$/randomRequest'), null);
+    final response = await channel.sendRequestToServer(request);
+    expect(response.id, equals(request.id));
+    expect(response.error, isNotNull);
+    expect(response.error.code, equals(ErrorCodes.MethodNotFound));
+    expect(response.result, isNull);
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/signature_help_test.dart b/pkg/analysis_server/test/lsp/signature_help_test.dart
new file mode 100644
index 0000000..e22eec0
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/signature_help_test.dart
@@ -0,0 +1,312 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'server_abstract.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SignatureHelpTest);
+  });
+}
+
+@reflectiveTest
+class SignatureHelpTest extends AbstractLspAnalysisServerTest {
+  test_formats_markdown() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, int i) {
+      foo(^);
+    }
+    ''';
+    final expectedLabel = 'foo(String s, int i)';
+    final expectedDoc = 'Does foo.';
+
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('int i', null),
+      ],
+      expectedFormat: MarkupKind.Markdown,
+    );
+  }
+
+  test_formats_notSupported() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, int i) {
+      foo(^);
+    }
+    ''';
+    final expectedLabel = 'foo(String s, int i)';
+    final expectedDoc = 'Does foo.';
+
+    await initialize();
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('int i', null),
+      ],
+      expectedFormat: null,
+    );
+  }
+
+  test_formats_plainTextOnly() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, int i) {
+      foo(^);
+    }
+    ''';
+    final expectedLabel = 'foo(String s, int i)';
+    final expectedDoc = 'Does foo.';
+
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.PlainText]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('int i', null),
+      ],
+      expectedFormat: MarkupKind.PlainText,
+    );
+  }
+
+  test_formats_plainTextPreferred() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, int i) {
+      foo(^);
+    }
+    ''';
+    final expectedLabel = 'foo(String s, int i)';
+    final expectedDoc = 'Does foo.';
+
+    // We say we prefer PlainText as a client, but since we only really
+    // support Markdown and the client supports it, we expect the server
+    // to provide Markdown.
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities,
+            [MarkupKind.PlainText, MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('int i', null),
+      ],
+      expectedFormat: MarkupKind.Markdown,
+    );
+  }
+
+  test_params_multipleNamed() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, {bool b = true, bool a}) {
+      foo(^);
+    }
+    ''';
+
+    final expectedLabel = 'foo(String s, {bool b = true, bool a})';
+    final expectedDoc = 'Does foo.';
+
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('bool b = true', null),
+        new ParameterInformation('bool a', null),
+      ],
+    );
+  }
+
+  test_params_multipleOptional() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, [bool b = true, bool a]) {
+      foo(^);
+    }
+    ''';
+
+    final expectedLabel = 'foo(String s, [bool b = true, bool a])';
+    final expectedDoc = 'Does foo.';
+
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('bool b = true', null),
+        new ParameterInformation('bool a', null),
+      ],
+    );
+  }
+
+  test_params_named() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, {bool b = true}) {
+      foo(^);
+    }
+    ''';
+
+    final expectedLabel = 'foo(String s, {bool b = true})';
+    final expectedDoc = 'Does foo.';
+
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('bool b = true', null),
+      ],
+    );
+  }
+
+  test_params_optional() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, [bool b = true]) {
+      foo(^);
+    }
+    ''';
+
+    final expectedLabel = 'foo(String s, [bool b = true])';
+    final expectedDoc = 'Does foo.';
+
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('bool b = true', null),
+      ],
+    );
+  }
+
+  test_simple() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, int i) {
+      foo(^);
+    }
+    ''';
+    final expectedLabel = 'foo(String s, int i)';
+    final expectedDoc = 'Does foo.';
+
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await openFile(mainFileUri, withoutMarkers(content));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('int i', null),
+      ],
+    );
+  }
+
+  test_unopenFile() async {
+    final content = '''
+    /// Does foo.
+    foo(String s, int i) {
+      foo(^);
+    }
+    ''';
+    final expectedLabel = 'foo(String s, int i)';
+    final expectedDoc = 'Does foo.';
+
+    newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize(
+        textDocumentCapabilities: withSignatureHelpContentFormat(
+            emptyTextDocumentClientCapabilities, [MarkupKind.Markdown]));
+    await testSignature(
+      content,
+      expectedLabel,
+      expectedDoc,
+      [
+        new ParameterInformation('String s', null),
+        new ParameterInformation('int i', null),
+      ],
+    );
+  }
+
+  Future<void> testSignature(
+    String fileContent,
+    String expectedLabel,
+    String expectedDoc,
+    List<ParameterInformation> expectedParams, {
+    MarkupKind expectedFormat = MarkupKind.Markdown,
+  }) async {
+    final res =
+        await getSignatureHelp(mainFileUri, positionFromMarker(fileContent));
+
+    // TODO(dantup): Update this when there is clarification on how to handle
+    // no valid selected parameter.
+    expect(res.activeParameter, -1);
+    expect(res.activeSignature, equals(0));
+    expect(res.signatures, hasLength(1));
+    final sig = res.signatures.first;
+    expect(sig.label, equals(expectedLabel));
+    expect(sig.parameters, equals(expectedParams));
+
+    // Test the format matches the tests expectation.
+    // For clients that don't support MarkupContent it'll be a plain string,
+    // but otherwise it'll be a MarkupContent of type PlainText or Markdown.
+    final doc = sig.documentation;
+    if (expectedFormat == null) {
+      // Plain string.
+      expect(doc.valueEquals(expectedDoc), isTrue);
+    } else {
+      final expected = new MarkupContent(expectedFormat, expectedDoc);
+      expect(doc.valueEquals(expected), isTrue);
+    }
+  }
+}
diff --git a/pkg/analysis_server/test/lsp/test_all.dart b/pkg/analysis_server/test/lsp/test_all.dart
new file mode 100644
index 0000000..c9942f1
--- /dev/null
+++ b/pkg/analysis_server/test/lsp/test_all.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../src/lsp/lsp_packet_transformer_test.dart'
+    as packet_transformer_tests;
+import 'code_actions_assists_test.dart' as assists_code_action_tests;
+import 'code_actions_fixes_test.dart' as fixes_code_action_tests;
+import 'code_actions_source_test.dart' as source_code_action_tests;
+import 'completion_test.dart' as completion_test;
+import 'definition_test.dart' as definition_test;
+import 'diagnostic_test.dart' as diagnostic_test;
+import 'document_symbols_test.dart' as document_symbols_test;
+import 'file_modification_test.dart' as file_modification_test;
+import 'format_test.dart' as format_test;
+import 'hover_test.dart' as hover_test;
+import 'initialization_test.dart' as initialization_test;
+import 'priority_files_test.dart' as priority_files_test;
+import 'references_test.dart' as references_test;
+import 'server_test.dart' as server_test;
+import 'signature_help_test.dart' as signature_help_test;
+
+main() {
+  defineReflectiveSuite(() {
+    completion_test.main();
+    definition_test.main();
+    diagnostic_test.main();
+    document_symbols_test.main();
+    file_modification_test.main();
+    priority_files_test.main();
+    format_test.main();
+    hover_test.main();
+    initialization_test.main();
+    references_test.main();
+    server_test.main();
+    signature_help_test.main();
+    source_code_action_tests.main();
+    fixes_code_action_tests.main();
+    assists_code_action_tests.main();
+    packet_transformer_tests.main();
+  }, name: 'lsp');
+}
diff --git a/pkg/analysis_server/test/mock_sdk.dart b/pkg/analysis_server/test/mock_sdk.dart
deleted file mode 100644
index 07f8f15..0000000
--- a/pkg/analysis_server/test/mock_sdk.dart
+++ /dev/null
@@ -1,452 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/file_system/file_system.dart' as resource;
-import 'package:analyzer/file_system/memory_file_system.dart' as resource;
-import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
-import 'package:analyzer/src/summary/summary_file_builder.dart';
-
-class MockSdk implements DartSdk {
-  static const MockSdkLibrary LIB_CORE =
-      const MockSdkLibrary('dart:core', '/lib/core/core.dart', '''
-library dart.core;
-
-import 'dart:async';
-import 'dart:_internal';
-
-class Object {
-  const Object();
-  bool operator ==(other) => identical(this, other);
-  String toString() => 'a string';
-  int get hashCode => 0;
-  Type get runtimeType => null;
-  dynamic noSuchMethod(Invocation invocation) => null;
-}
-
-class Function {}
-class StackTrace {}
-class Symbol {}
-class Type {}
-
-abstract class Comparable<T> {
-  int compareTo(T other);
-}
-
-abstract class String implements Comparable<String> {
-  external factory String.fromCharCodes(Iterable<int> charCodes,
-                                        [int start = 0, int end]);
-  bool get isEmpty => false;
-  bool get isNotEmpty => false;
-  int get length => 0;
-  String toUpperCase();
-  List<int> get codeUnits;
-}
-
-class bool extends Object {}
-
-abstract class num implements Comparable<num> {
-  bool operator <(num other);
-  bool operator <=(num other);
-  bool operator >(num other);
-  bool operator >=(num other);
-  num operator +(num other);
-  num operator -(num other);
-  num operator *(num other);
-  num operator /(num other);
-  int operator ^(int other);
-  int operator &(int other);
-  int operator |(int other);
-  int operator <<(int other);
-  int operator >>(int other);
-  int operator ~/(num other);
-  num operator %(num other);
-  int operator ~();
-  int toInt();
-  double toDouble();
-  num abs();
-  int round();
-}
-
-abstract class int extends num {
-  bool get isEven => false;
-  int operator -();
-  external static int parse(String source,
-                            { int radix,
-                              int onError(String source) });
-}
-
-abstract class double extends num {
-  static const double NAN = 0.0 / 0.0;
-  static const double INFINITY = 1.0 / 0.0;
-  static const double NEGATIVE_INFINITY = -INFINITY;
-  static const double MIN_POSITIVE = 5e-324;
-  static const double MAX_FINITE = 1.7976931348623157e+308;
-
-  double remainder(num other);
-  double operator +(num other);
-  double operator -(num other);
-  double operator *(num other);
-  double operator %(num other);
-  double operator /(num other);
-  int operator ~/(num other);
-  double operator -();
-  double abs();
-  double get sign;
-  int round();
-  int floor();
-  int ceil();
-  int truncate();
-  double roundToDouble();
-  double floorToDouble();
-  double ceilToDouble();
-  double truncateToDouble();
-  external static double parse(String source,
-                               [double onError(String source)]);
-}
-
-class DateTime extends Object {}
-class Null extends Object {}
-
-class Deprecated extends Object {
-  final String expires;
-  const Deprecated(this.expires);
-}
-const Object deprecated = const Deprecated("next release");
-
-class Exception {
-  factory Exception([var message]);
-}
-
-class Iterator<E> {
-  bool moveNext();
-  E get current;
-}
-
-abstract class Iterable<E> {
-  Iterator<E> get iterator;
-  bool get isEmpty;
-  void forEach(void f(E element));
-  Iterable<T> map<T>(T f(E e)) => null;
-  T fold<T>(T initialValue, T combine(T previousValue, E element));
-  List<E> toList({bool growable: true});
-}
-
-class List<E> implements Iterable<E> {
-  List();
-  void add(E value) {}
-  void addAll(Iterable<E> iterable) {}
-  List<R> cast<R>();
-  E operator [](int index) => null;
-  void operator []=(int index, E value) {}
-  Iterator<E> get iterator => null;
-  void clear() {}
-  Iterable<E> where(bool test(E element)) {}
-
-  bool get isEmpty => false;
-  E get first => null;
-  E get last => null;
-}
-
-abstract class Map<K, V> extends Object {
-  Iterable<K> get keys;
-  int get length;
-  Iterable<V> get values;
-  V operator [](K key) => null;
-  void operator []=(K key, V value) {}
-  Map<RK, RV> cast<RK, RV>();
-  bool containsKey(Object key);
-}
-
-external bool identical(Object a, Object b);
-
-void print(Object object) {}
-
-class Set<E> implements Iterable<E> {
-  Set<R> cast<R>();
-}
-
-class Uri {
-  static List<int> parseIPv6Address(String host, [int start = 0, int end]) {
-    int parseHex(int start, int end) {
-      return 0;
-    }
-    return null;
-  }
-}
-
-class _Override { const _Override(); }
-const Object override = const _Override();
-''');
-  static const MockSdkLibrary LIB_ASYNC =
-      const MockSdkLibrary('dart:async', '/lib/async/async.dart', '''
-library dart.async;
-
-import 'dart:math';
-
-class Future<T> {
-  factory Future(computation()) => null;
-  factory Future.delayed(Duration duration, [T computation()]) => null;
-  factory Future.value([value]) => null;
-  static Future wait(List<Future> futures) => null;
-}
-
-class FutureOr<T> {}
-
-class Stream<T> {}
-abstract class StreamTransformer<S, T> {}
-''');
-
-  static const MockSdkLibrary LIB_COLLECTION = const MockSdkLibrary(
-      'dart:collection', '/lib/collection/collection.dart', '''
-library dart.collection;
-
-abstract class HashMap<K, V> implements Map<K, V> {}
-abstract class LinkedHashMap<K, V> implements Map<K, V> {}
-''');
-
-  static const MockSdkLibrary LIB_CONVERT =
-      const MockSdkLibrary('dart:convert', '/lib/convert/convert.dart', '''
-library dart.convert;
-
-import 'dart:async';
-
-abstract class Converter<S, T> implements StreamTransformer {}
-class JsonDecoder extends Converter<String, Object> {}
-''');
-
-  static const MockSdkLibrary LIB_MATH =
-      const MockSdkLibrary('dart:math', '/lib/math/math.dart', '''
-library dart.math;
-const double E = 2.718281828459045;
-const double PI = 3.1415926535897932;
-const double LN10 =  2.302585092994046;
-T min<T extends num>(T a, T b) => null;
-T max<T extends num>(T a, T b) => null;
-external double cos(num radians);
-external num pow(num x, num exponent);
-external double sin(num radians);
-external double sqrt(num x);
-class Random {
-  bool nextBool() => true;
-  double nextDouble() => 2.0;
-  int nextInt() => 1;
-}
-''');
-
-  static const MockSdkLibrary LIB_HTML = const MockSdkLibrary(
-      'dart:html', '/lib/html/dartium/html_dartium.dart', '''
-library dart.html;
-class HtmlElement {}
-''');
-
-  static const MockSdkLibrary LIB_INTERNAL =
-      const MockSdkLibrary('dart:_internal', '/lib/internal/internal.dart', '''
-library dart._internal;
-external void printToConsole(String line);
-''');
-
-  static const List<SdkLibrary> LIBRARIES = const [
-    LIB_CORE,
-    LIB_ASYNC,
-    LIB_COLLECTION,
-    LIB_CONVERT,
-    LIB_MATH,
-    LIB_HTML,
-    LIB_INTERNAL,
-  ];
-
-  static const String librariesContent = r'''
-const Map<String, LibraryInfo> libraries = const {
-  "async": const LibraryInfo("async/async.dart"),
-  "collection": const LibraryInfo("collection/collection.dart"),
-  "convert": const LibraryInfo("convert/convert.dart"),
-  "core": const LibraryInfo("core/core.dart"),
-  "html": const LibraryInfo("html/dartium/html_dartium.dart"),
-  "math": const LibraryInfo("math/math.dart"),
-  "_internal": const LibraryInfo("internal/internal.dart"),
-};
-''';
-
-  final resource.MemoryResourceProvider provider;
-
-  /**
-   * The [AnalysisContext] which is used for all of the sources.
-   */
-  InternalAnalysisContext _analysisContext;
-
-  /**
-   * The cached linked bundle of the SDK.
-   */
-  PackageBundle _bundle;
-
-  MockSdk(
-      {bool generateSummaryFiles: false,
-      resource.ResourceProvider resourceProvider})
-      : provider = resourceProvider ?? new resource.MemoryResourceProvider() {
-    LIBRARIES.forEach((SdkLibrary library) {
-      provider.newFile(provider.convertPath(library.path),
-          (library as MockSdkLibrary).content);
-    });
-    provider.newFile(
-        provider.convertPath(
-            '/lib/_internal/sdk_library_metadata/lib/libraries.dart'),
-        librariesContent);
-    if (generateSummaryFiles) {
-      List<int> bytes = _computeLinkedBundleBytes();
-      provider.newFileWithBytes(
-          provider.convertPath('/lib/_internal/strong.sum'), bytes);
-    }
-  }
-
-  @override
-  AnalysisContext get context {
-    if (_analysisContext == null) {
-      _analysisContext = new SdkAnalysisContext(null);
-      SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
-      _analysisContext.sourceFactory = factory;
-    }
-    return _analysisContext;
-  }
-
-  @override
-  List<SdkLibrary> get sdkLibraries => LIBRARIES;
-
-  @override
-  String get sdkVersion => throw unimplemented;
-
-  UnimplementedError get unimplemented => new UnimplementedError();
-
-  @override
-  List<String> get uris {
-    List<String> uris = <String>[];
-    for (SdkLibrary library in LIBRARIES) {
-      uris.add(library.shortName);
-    }
-    return uris;
-  }
-
-  @override
-  Source fromFileUri(Uri uri) {
-    String filePath = provider.pathContext.fromUri(uri);
-    for (SdkLibrary library in sdkLibraries) {
-      String libraryPath = provider.convertPath(library.path);
-      if (filePath == libraryPath) {
-        try {
-          resource.File file = provider.getResource(filePath);
-          Uri dartUri = Uri.parse(library.shortName);
-          return file.createSource(dartUri);
-        } catch (exception) {
-          return null;
-        }
-      }
-      String libraryRootPath = provider.pathContext.dirname(libraryPath) +
-          provider.pathContext.separator;
-      if (filePath.startsWith(libraryRootPath)) {
-        String pathInLibrary = filePath.substring(libraryRootPath.length);
-        String uriStr = '${library.shortName}/$pathInLibrary';
-        try {
-          resource.File file = provider.getResource(filePath);
-          Uri dartUri = Uri.parse(uriStr);
-          return file.createSource(dartUri);
-        } catch (exception) {
-          return null;
-        }
-      }
-    }
-    return null;
-  }
-
-  @override
-  PackageBundle getLinkedBundle() {
-    if (_bundle == null) {
-      resource.File summaryFile =
-          provider.getFile(provider.convertPath('/lib/_internal/strong.sum'));
-      List<int> bytes;
-      if (summaryFile.exists) {
-        bytes = summaryFile.readAsBytesSync();
-      } else {
-        bytes = _computeLinkedBundleBytes();
-      }
-      _bundle = new PackageBundle.fromBuffer(bytes);
-    }
-    return _bundle;
-  }
-
-  @override
-  SdkLibrary getSdkLibrary(String dartUri) {
-    // getSdkLibrary() is only used to determine whether a library is internal
-    // to the SDK.  The mock SDK doesn't have any internals, so it's safe to
-    // return null.
-    return null;
-  }
-
-  @override
-  Source mapDartUri(String dartUri) {
-    const Map<String, String> uriToPath = const {
-      "dart:core": "/lib/core/core.dart",
-      "dart:html": "/lib/html/dartium/html_dartium.dart",
-      "dart:async": "/lib/async/async.dart",
-      "dart:collection": "/lib/collection/collection.dart",
-      "dart:convert": "/lib/convert/convert.dart",
-      "dart:math": "/lib/math/math.dart",
-      "dart:_internal": "/lib/internal/internal.dart",
-    };
-
-    String path = uriToPath[dartUri];
-    if (path != null) {
-      resource.File file = provider.getResource(provider.convertPath(path));
-      Uri uri = new Uri(scheme: 'dart', path: dartUri.substring(5));
-      return file.createSource(uri);
-    }
-
-    // If we reach here then we tried to use a dartUri that's not in the
-    // table above.
-    return null;
-  }
-
-  /**
-   * Compute the bytes of the linked bundle associated with this SDK.
-   */
-  List<int> _computeLinkedBundleBytes() {
-    List<Source> librarySources = sdkLibraries
-        .map((SdkLibrary library) => mapDartUri(library.shortName))
-        .toList();
-    return new SummaryBuilder(librarySources, context).build();
-  }
-}
-
-class MockSdkLibrary implements SdkLibrary {
-  final String shortName;
-  final String path;
-  final String content;
-
-  const MockSdkLibrary(this.shortName, this.path, this.content);
-
-  @override
-  String get category => throw unimplemented;
-
-  @override
-  bool get isDart2JsLibrary => throw unimplemented;
-
-  @override
-  bool get isDocumented => throw unimplemented;
-
-  @override
-  bool get isImplementation => false;
-
-  @override
-  bool get isInternal => shortName.startsWith('dart:_');
-
-  @override
-  bool get isShared => throw unimplemented;
-
-  @override
-  bool get isVmLibrary => throw unimplemented;
-
-  UnimplementedError get unimplemented => new UnimplementedError();
-}
diff --git a/pkg/analysis_server/test/mocks.dart b/pkg/analysis_server/test/mocks.dart
index 6c4b927..286da86 100644
--- a/pkg/analysis_server/test/mocks.dart
+++ b/pkg/analysis_server/test/mocks.dart
@@ -1,33 +1,23 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:io';
+import 'dart:convert';
 
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart' as lsp;
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart' as lsp;
 import 'package:analysis_server/protocol/protocol.dart';
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/channel/channel.dart';
+import 'package:analysis_server/src/lsp/channel/lsp_channel.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/timestamped_data.dart';
 import 'package:test/test.dart';
 
-/**
- * Answer the absolute path the SDK relative to the currently running
- * script or throw an exception if it cannot be found.
- */
-String get sdkPath {
-  Uri sdkUri = Platform.script.resolve('../../../sdk/');
-
-  // Verify the directory exists
-  Directory sdkDir = new Directory.fromUri(sdkUri);
-  if (!sdkDir.existsSync()) {
-    throw 'Specified Dart SDK does not exist: $sdkDir';
-  }
-
-  return sdkDir.path;
-}
+const _jsonEncoder = const JsonEncoder.withIndent('    ');
 
 /**
  * A [Matcher] that check that the given [Response] has an expected identifier
@@ -43,6 +33,186 @@
 Matcher isResponseSuccess(String id) => new _IsResponseSuccess(id);
 
 /**
+ * A mock [LspServerCommunicationChannel] for testing [LspAnalysisServer].
+ */
+class MockLspServerChannel implements LspServerCommunicationChannel {
+  final StreamController<lsp.Message> _clientToServer =
+      new StreamController<lsp.Message>.broadcast();
+  final StreamController<lsp.Message> _serverToClient =
+      new StreamController<lsp.Message>.broadcast();
+
+  String name;
+
+  /**
+   * Completer that will be signalled when the input stream is closed.
+   */
+  final Completer _closed = new Completer();
+
+  MockLspServerChannel(bool _printMessages) {
+    if (_printMessages) {
+      _serverToClient.stream
+          .listen((message) => print('<== ' + jsonEncode(message)));
+      _clientToServer.stream
+          .listen((message) => print('==> ' + jsonEncode(message)));
+    }
+  }
+
+  /**
+   * Future that will be completed when the input stream is closed.
+   */
+  Future get closed {
+    return _closed.future;
+  }
+
+  /**
+   * A stream of [NotificationMessage]s from the server that may be errors.
+   */
+  Stream<lsp.NotificationMessage> get errorNotificationsFromServer {
+    return notificationsFromServer.where(_isErrorNotification);
+  }
+
+  /**
+   * A stream of [NotificationMessage]s from the server.
+   */
+  Stream<lsp.NotificationMessage> get notificationsFromServer {
+    return _serverToClient.stream
+        .where((m) => m is lsp.NotificationMessage)
+        .cast<lsp.NotificationMessage>();
+  }
+
+  /**
+   * A stream of [RequestMessage]s from the server.
+   */
+  Stream<lsp.RequestMessage> get requestsFromServer {
+    return _serverToClient.stream
+        .where((m) => m is lsp.RequestMessage)
+        .cast<lsp.RequestMessage>();
+  }
+
+  Stream<lsp.Message> get serverToClient => _serverToClient.stream;
+
+  @override
+  void close() {
+    if (!_closed.isCompleted) {
+      _closed.complete();
+    }
+  }
+
+  @override
+  void listen(void Function(lsp.Message message) onMessage,
+      {Function onError, void Function() onDone}) {
+    _clientToServer.stream.listen(onMessage, onError: onError, onDone: onDone);
+  }
+
+  @override
+  void sendNotification(lsp.NotificationMessage notification) {
+    // Don't deliver notifications after the connection is closed.
+    if (_closed.isCompleted) {
+      return;
+    }
+    _serverToClient.add(notification);
+  }
+
+  void sendNotificationToServer(lsp.NotificationMessage notification) {
+    // Don't deliver notifications after the connection is closed.
+    if (_closed.isCompleted) {
+      return;
+    }
+    notification = _convertJson(notification, lsp.NotificationMessage.fromJson);
+    _clientToServer.add(notification);
+  }
+
+  @override
+  void sendRequest(lsp.RequestMessage request) {
+    // Don't deliver notifications after the connection is closed.
+    if (_closed.isCompleted) {
+      return;
+    }
+    _serverToClient.add(request);
+  }
+
+  /**
+   * Send the given [request] to the server and return a future that will
+   * complete when a response associated with the [request] has been received.
+   * The value of the future will be the received response.
+   */
+  Future<lsp.ResponseMessage> sendRequestToServer(lsp.RequestMessage request) {
+    // No further requests should be sent after the connection is closed.
+    if (_closed.isCompleted) {
+      throw new Exception('sendLspRequest after connection closed');
+    }
+    request = _convertJson(request, lsp.RequestMessage.fromJson);
+    // Wrap send request in future to simulate WebSocket.
+    new Future(() => _clientToServer.add(request));
+    return waitForResponse(request);
+  }
+
+  @override
+  void sendResponse(lsp.ResponseMessage response) {
+    // Don't deliver responses after the connection is closed.
+    if (_closed.isCompleted) {
+      return;
+    }
+    // Wrap send response in future to simulate WebSocket.
+    new Future(() => _serverToClient.add(response));
+  }
+
+  void sendResponseToServer(lsp.ResponseMessage response) {
+    // Don't deliver notifications after the connection is closed.
+    if (_closed.isCompleted) {
+      return;
+    }
+    response = _convertJson(response, lsp.ResponseMessage.fromJson);
+    _clientToServer.add(response);
+  }
+
+  /**
+   * Return a future that will complete when a response associated with the
+   * given [request] has been received. The value of the future will be the
+   * received response. The returned future will throw an exception if a server
+   * error is reported before the response has been received.
+   *
+   * Unlike [sendLspRequest], this method assumes that the [request] has already
+   * been sent to the server.
+   */
+  Future<lsp.ResponseMessage> waitForResponse(
+    lsp.RequestMessage request, {
+    bool throwOnError = true,
+  }) async {
+    final response = await _serverToClient.stream.firstWhere((message) =>
+        (message is lsp.ResponseMessage && message.id == request.id) ||
+        (throwOnError &&
+            message is lsp.NotificationMessage &&
+            message.method == Method.window_showMessage));
+
+    if (response is lsp.ResponseMessage) {
+      return response;
+    } else {
+      throw 'An error occurred while waiting for a response to ${request.method}: '
+          '${_jsonEncoder.convert(response.toJson())}';
+    }
+  }
+
+  /// Round trips the object to JSON and back to ensure it behaves the same as
+  /// when running over the real STDIO server. Without this, the object passed
+  /// to the handlers will have concrete types as constructed in tests rather
+  /// than the maps as they would be (the server expects to do the conversion).
+  T _convertJson<T>(
+      lsp.ToJsonable message, T Function(Map<String, dynamic>) constructor) {
+    return constructor(jsonDecode(jsonEncode(message.toJson())));
+  }
+
+  /// Checks whether a notification is likely an error from the server (for
+  /// example a window/showMessage). This is useful for tests that want to
+  /// ensure no errors come from the server in response to notifications (which
+  /// don't have their own responses).
+  bool _isErrorNotification(lsp.NotificationMessage notification) {
+    return notification.method == Method.window_logMessage ||
+        notification.method == Method.window_showMessage;
+  }
+}
+
+/**
  * A mock [ServerCommunicationChannel] for testing [AnalysisServer].
  */
 class MockServerChannel implements ServerCommunicationChannel {
@@ -55,6 +225,7 @@
 
   List<Response> responsesReceived = [];
   List<Notification> notificationsReceived = [];
+
   bool _closed = false;
 
   String name;
@@ -134,7 +305,7 @@
    * received response. If [throwOnError] is `true` (the default) then the
    * returned future will throw an exception if a server error is reported
    * before the response has been received.
-   * 
+   *
    * Unlike [sendRequest], this method assumes that the [request] has already
    * been sent to the server.
    */
@@ -157,45 +328,6 @@
   }
 }
 
-/**
- * A mock [WebSocket] for testing.
- */
-class MockSocket<T> implements WebSocket {
-  StreamController<T> controller = new StreamController<T>();
-  MockSocket<T> twin;
-  Stream<T> stream;
-
-  MockSocket();
-
-  factory MockSocket.pair() {
-    MockSocket<T> socket1 = new MockSocket<T>();
-    MockSocket<T> socket2 = new MockSocket<T>();
-    socket1.twin = socket2;
-    socket2.twin = socket1;
-    socket1.stream = socket2.controller.stream;
-    socket2.stream = socket1.controller.stream;
-    return socket1;
-  }
-
-  void add(dynamic text) => controller.add(text as T);
-
-  void allowMultipleListeners() {
-    stream = stream.asBroadcastStream();
-  }
-
-  Future close([int code, String reason]) =>
-      controller.close().then((_) => twin.controller.close());
-
-  StreamSubscription<T> listen(void onData(dynamic event),
-          {Function onError, void onDone(), bool cancelOnError}) =>
-      stream.listen((T data) => onData(data),
-          onError: onError, onDone: onDone, cancelOnError: cancelOnError);
-
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-
-  Stream<T> where(bool test(dynamic t)) => stream.where((T data) => test(data));
-}
-
 class MockSource extends StringTypedMock implements Source {
   @override
   TimestampedData<String> contents = null;
diff --git a/pkg/analysis_server/test/plugin/protocol_dart_test.dart b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
index 67f5ca5..ed8e850 100644
--- a/pkg/analysis_server/test/plugin/protocol_dart_test.dart
+++ b/pkg/analysis_server/test/plugin/protocol_dart_test.dart
@@ -39,6 +39,8 @@
         convertElementKind(engine.ElementKind.FUNCTION), ElementKind.FUNCTION);
     expect(convertElementKind(engine.ElementKind.FUNCTION_TYPE_ALIAS),
         ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(convertElementKind(engine.ElementKind.GENERIC_FUNCTION_TYPE),
+        ElementKind.FUNCTION_TYPE_ALIAS);
     expect(convertElementKind(engine.ElementKind.GETTER), ElementKind.GETTER);
     expect(convertElementKind(engine.ElementKind.LABEL), ElementKind.LABEL);
     expect(convertElementKind(engine.ElementKind.LIBRARY), ElementKind.LIBRARY);
@@ -169,7 +171,7 @@
   }
 
   test_fromElement_CONSTRUCTOR_required_parameters_1() async {
-    addMetaPackageSource();
+    addMetaPackage();
     engine.Source source = addSource('/test.dart', '''
 import 'package:meta/meta.dart';    
 class A {
@@ -186,7 +188,7 @@
 
   /// Verify parameter re-ordering for required params
   test_fromElement_CONSTRUCTOR_required_parameters_2() async {
-    addMetaPackageSource();
+    addMetaPackage();
     engine.Source source = addSource('/test.dart', '''
 import 'package:meta/meta.dart';    
 class A {
@@ -204,7 +206,7 @@
 
   /// Verify parameter re-ordering for required params
   test_fromElement_CONSTRUCTOR_required_parameters_3() async {
-    addMetaPackageSource();
+    addMetaPackage();
     engine.Source source = addSource('/test.dart', '''
 import 'package:meta/meta.dart';    
 class A {
@@ -408,6 +410,30 @@
     expect(element.flags, 0);
   }
 
+  test_fromElement_FUNCTION_TYPE_ALIAS_genericTypeAlias() async {
+    engine.Source source = addSource('/test.dart', '''
+typedef F<T> = int Function(String x);
+''');
+    engine.CompilationUnit unit = await resolveLibraryUnit(source);
+    engine.GenericTypeAliasElement engineElement = findElementInUnit(unit, 'F');
+    // create notification Element
+    Element element = convertElement(engineElement);
+    expect(element.kind, ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(element.name, 'F');
+    expect(element.typeParameters, '<T>');
+    {
+      Location location = element.location;
+      expect(location.file, convertPath('/test.dart'));
+      expect(location.offset, 8);
+      expect(location.length, 'F'.length);
+      expect(location.startLine, 1);
+      expect(location.startColumn, 9);
+    }
+    expect(element.parameters, '(String x)');
+    expect(element.returnType, 'int');
+    expect(element.flags, 0);
+  }
+
   test_fromElement_GETTER() async {
     engine.Source source = addSource('/test.dart', '''
 class A {
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index 7ac554b..9d2e9ca 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -128,7 +128,7 @@
       engine.ElementKind.DYNAMIC: ElementKind.UNKNOWN,
       engine.ElementKind.ERROR: ElementKind.UNKNOWN,
       engine.ElementKind.EXPORT: ElementKind.UNKNOWN,
-      engine.ElementKind.GENERIC_FUNCTION_TYPE: ElementKind.UNKNOWN,
+      engine.ElementKind.GENERIC_FUNCTION_TYPE: ElementKind.FUNCTION_TYPE_ALIAS,
       engine.ElementKind.IMPORT: ElementKind.UNKNOWN,
       engine.ElementKind.NAME: ElementKind.UNKNOWN,
       engine.ElementKind.UNIVERSE: ElementKind.UNKNOWN
diff --git a/pkg/analysis_server/test/protocol_test.dart b/pkg/analysis_server/test/protocol_test.dart
index d6d427d..3717573 100644
--- a/pkg/analysis_server/test/protocol_test.dart
+++ b/pkg/analysis_server/test/protocol_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -22,34 +22,6 @@
 }
 
 @reflectiveTest
-class InvalidParameterResponseMatcher extends Matcher {
-  static const String ERROR_CODE = 'INVALID_PARAMETER';
-
-  @override
-  Description describe(Description description) =>
-      description.add("an 'invalid parameter' response (code $ERROR_CODE)");
-
-  @override
-  bool matches(item, Map matchState) {
-    if (item is! RequestFailure) {
-      return false;
-    }
-    var response = item.response;
-    if (response is! Response) {
-      return false;
-    }
-    if (response.error is! RequestError) {
-      return false;
-    }
-    RequestError requestError = response.error;
-    if (requestError.code != ERROR_CODE) {
-      return false;
-    }
-    return true;
-  }
-}
-
-@reflectiveTest
 class NotificationTest {
   void test_fromJson() {
     Notification original = new Notification('foo');
diff --git a/pkg/analysis_server/test/search/element_references_test.dart b/pkg/analysis_server/test/search/element_references_test.dart
index fb3aa88..6473f65 100644
--- a/pkg/analysis_server/test/search/element_references_test.dart
+++ b/pkg/analysis_server/test/search/element_references_test.dart
@@ -693,6 +693,18 @@
     assertHasResult(SearchResultKind.REFERENCE, 'F f');
   }
 
+  Future<void> test_typeReference_genericTypeAlias_function() async {
+    addTestFile('''
+typedef F = Function();
+main(F f) {
+}
+''');
+    await findElementReferences('F =', false);
+    expect(searchElement.kind, ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(results, hasLength(1));
+    assertHasResult(SearchResultKind.REFERENCE, 'F f');
+  }
+
   Future<void> test_typeReference_typeVariable() async {
     addTestFile('''
 class A<T> {
diff --git a/pkg/analysis_server/test/search/top_level_declarations_test.dart b/pkg/analysis_server/test/search/top_level_declarations_test.dart
index 5e46628..7e1fd99 100644
--- a/pkg/analysis_server/test/search/top_level_declarations_test.dart
+++ b/pkg/analysis_server/test/search/top_level_declarations_test.dart
@@ -67,16 +67,18 @@
 class A {} // A
 class B = Object with A;
 typedef C();
-D() {}
-var E = null;
+typedef D();
+E() {}
+var F = null;
 class ABC {}
 ''');
-    await findTopLevelDeclarations('^[A-E]\$');
+    await findTopLevelDeclarations('^[A-F]\$');
     assertHasDeclaration(ElementKind.CLASS, 'A');
     assertHasDeclaration(ElementKind.CLASS, 'B');
     assertHasDeclaration(ElementKind.FUNCTION_TYPE_ALIAS, 'C');
-    assertHasDeclaration(ElementKind.FUNCTION, 'D');
-    assertHasDeclaration(ElementKind.TOP_LEVEL_VARIABLE, 'E');
+    assertHasDeclaration(ElementKind.FUNCTION_TYPE_ALIAS, 'D');
+    assertHasDeclaration(ElementKind.FUNCTION, 'E');
+    assertHasDeclaration(ElementKind.TOP_LEVEL_VARIABLE, 'F');
     assertNoDeclaration(ElementKind.CLASS, 'ABC');
   }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
index a75c2e4..a14a0a9 100644
--- a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
@@ -142,23 +142,22 @@
   }
 
   test_Annotation_imported_constructor_named_param() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library libA; class A { const A({int one, String two: 'defaultValue'}); }''');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libA.dart")}"; @A(^) main() { }');
+    addTestSource('import "a.dart"; @A(^) main() { }');
     await computeSuggestions();
     assertSuggestArgumentsAndTypes(
         namedArgumentsWithTypes: {'one': 'int', 'two': 'String'});
   }
 
   test_Annotation_importedConstructor_prefixed() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {
   const A({int value});
 }
 ''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/libA.dart")}" as p;
+import "a.dart" as p;
 @p.A(^)
 main() {}
 ''');
@@ -463,28 +462,26 @@
 
   test_ArgumentList_imported_constructor_named_param() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement
-    addSource('/libA.dart', 'library libA; class A{A({int one}); }');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libA.dart")}"; main() { new A(^);}');
+    addSource('/home/test/lib/a.dart', 'library libA; class A{A({int one}); }');
+    addTestSource('import "a.dart"; main() { new A(^);}');
     await computeSuggestions();
     assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
   }
 
   test_ArgumentList_imported_constructor_named_param2() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement
-    addSource('/libA.dart', 'library libA; class A{A.foo({int one}); }');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libA.dart")}"; main() { new A.foo(^);}');
+    addSource(
+        '/home/test/lib/a.dart', 'library libA; class A{A.foo({int one}); }');
+    addTestSource('import "a.dart"; main() { new A.foo(^);}');
     await computeSuggestions();
     assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
   }
 
   test_ArgumentList_imported_constructor_named_typed_param() async {
     // ArgumentList  InstanceCreationExpression  VariableDeclaration
-    addSource(
-        '/libA.dart', 'library libA; class A { A({int i, String s, d}) {} }}');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libA.dart")}"; main() { var a = new A(^);}');
+    addSource('/home/test/lib/a.dart',
+        'library libA; class A { A({int i, String s, d}) {} }}');
+    addTestSource('import "a.dart"; main() { var a = new A(^);}');
     await computeSuggestions();
     assertSuggestArgumentsAndTypes(
         namedArgumentsWithTypes: {'i': 'int', 's': 'String', 'd': 'dynamic'});
@@ -492,30 +489,27 @@
 
   test_ArgumentList_imported_factory_named_param() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement
-    addSource(
-        '/libA.dart', 'library libA; class A{factory A({int one}) => null;}');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libA.dart")}"; main() { new A(^);}');
+    addSource('/home/test/lib/a.dart',
+        'library libA; class A{factory A({int one}) => null;}');
+    addTestSource('import "a.dart"; main() { new A(^);}');
     await computeSuggestions();
     assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
   }
 
   test_ArgumentList_imported_factory_named_param2() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement
-    addSource('/libA.dart',
+    addSource('/home/test/lib/a.dart',
         'library libA; abstract class A{factory A.foo({int one});}');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libA.dart")}"; main() { new A.foo(^);}');
+    addTestSource('import "a.dart"; main() { new A.foo(^);}');
     await computeSuggestions();
     assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
   }
 
   test_ArgumentList_imported_factory_named_typed_param() async {
     // ArgumentList  InstanceCreationExpression  VariableDeclaration
-    addSource('/libA.dart',
+    addSource('/home/test/lib/a.dart',
         'library libA; class A {factory A({int i, String s, d}) {} }}');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libA.dart")}"; main() { var a = new A(^);}');
+    addTestSource('import "a.dart"; main() { var a = new A(^);}');
     await computeSuggestions();
     assertSuggestArgumentsAndTypes(
         namedArgumentsWithTypes: {'i': 'int', 's': 'String', 'd': 'dynamic'});
@@ -523,13 +517,13 @@
 
   test_ArgumentList_imported_function_0() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect() { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect(a^)}''');
@@ -539,13 +533,13 @@
 
   test_ArgumentList_imported_function_1() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect(String arg) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect(^)}''');
@@ -555,13 +549,13 @@
 
   test_ArgumentList_imported_function_2() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect(String arg1, int arg2) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect(^)}''');
@@ -571,13 +565,13 @@
 
   test_ArgumentList_imported_function_3() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect(String arg1, int arg2, {bool arg3}) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect(^)}''');
@@ -587,13 +581,13 @@
 
   test_ArgumentList_imported_function_3a() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect(String arg1, int arg2, {bool arg3}) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect('hello', ^)}''');
@@ -603,13 +597,13 @@
 
   test_ArgumentList_imported_function_3b() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect(String arg1, int arg2, {bool arg3}) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect('hello', ^x)}''');
@@ -619,13 +613,13 @@
 
   test_ArgumentList_imported_function_3c() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect(String arg1, int arg2, {bool arg3}) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect('hello', x^)}''');
@@ -635,13 +629,13 @@
 
   test_ArgumentList_imported_function_3d() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       expect(String arg1, int arg2, {bool arg3}) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B { }
       String bar() => true;
       void main() {expect('hello', x ^)}''');
@@ -896,7 +890,7 @@
   }
 
   test_ArgumentList_local_constructor_required_param_0() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 class A { A({int one, @required String two: 'defaultValue'}) { } }
@@ -1025,12 +1019,12 @@
 
   test_ArgumentList_local_method_0() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B {
         expect() { }
         void foo() {expect(^)}}
@@ -1041,12 +1035,12 @@
 
   test_ArgumentList_local_method_2() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
       library A;
       bool hasLength(int expected) { }
       void baz() { }''');
     addTestSource('''
-      import '${convertAbsolutePathToUri('/libA.dart')}'
+      import 'a.dart'
       class B {
         expect(arg, int blat) { }
         void foo() {expect(^)}}
diff --git a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
index 66d2115..44aae62 100644
--- a/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart
@@ -36,22 +36,22 @@
 
   test_Combinator_hide() async {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
       library libAB;
-      part "${convertAbsolutePathToUri('/partAB.dart')}";
+      part "ab_part.dart";
       class A { }
       class B { }''');
-    addSource('/partAB.dart', '''
+    addSource('/home/test/lib/ab_part.dart', '''
       part of libAB;
       var T1;
       PB F1() => new PB();
       class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
       class C { }
       class D { }''');
     addTestSource('''
-      import "${convertAbsolutePathToUri("/testAB.dart")}" hide ^;
-      import "${convertAbsolutePathToUri("/testCD.dart")}";
+      import "ab.dart" hide ^;
+      import "cd.dart";
       class X {}''');
 
     await computeSuggestions();
@@ -76,25 +76,25 @@
 
   test_Combinator_show() async {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
       library libAB;
-      part "${convertAbsolutePathToUri('/partAB.dart')}";
+      part "ab_part.dart";
       class A { }
       class B { }
       class _AB''');
-    addSource('/partAB.dart', '''
+    addSource('/home/test/lib/ab_part.dart', '''
       part of libAB;
       var T1;
       PB F1() => new PB();
       typedef PB2 F2(int blat);
       class Clz = Object with Object;
       class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
       class C { }
       class D { }''');
     addTestSource('''
-      import "${convertAbsolutePathToUri("/testAB.dart")}" show ^;
-      import "${convertAbsolutePathToUri("/testCD.dart")}";
+      import "ab.dart" show ^;
+      import "cd.dart";
       class X {}''');
 
     await computeSuggestions();
@@ -124,11 +124,11 @@
   }
 
   test_Combinator_show_export_withShow() async {
-    addSource('/a.dart', r'''
+    addSource('/home/test/lib/a.dart', r'''
 class A {}
 class B {}
 ''');
-    addSource('/b.dart', r'''
+    addSource('/home/test/lib/b.dart', r'''
 export 'a.dart' show A;
 ''');
     addTestSource(r'''
@@ -149,16 +149,16 @@
   }
 
   test_Combinator_show_recursive() async {
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {}
 ''');
-    addSource('/testB.dart', '''
-export 'testA.dart';
-export 'testB.dart';
+    addSource('/home/test/lib/b.dart', '''
+export 'a.dart';
+export 'b.dart';
 class B {}
 ''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}" show ^;
+import "b.dart" show ^;
 ''');
     await computeSuggestions();
     assertSuggestClass('A',
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
index fc67b56..7cf8eb5 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
@@ -9,7 +9,6 @@
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart'
     show DartCompletionRequestImpl;
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/generated/parser.dart' as analyzer;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:test/test.dart';
@@ -460,19 +459,10 @@
     return cs;
   }
 
-  /**
-   * Return a [Future] that completes with the containing library information
-   * after it is accessible via [context.getLibrariesContaining].
-   */
-  Future<void> computeLibrariesContaining([int times = 200]) {
-    return driver.getResult(testFile).then((result) => null);
-  }
-
   Future computeSuggestions({int times = 200}) async {
-    AnalysisResult analysisResult =
-        await driver.getResult(convertPath(testFile));
+    var resolveResult = await session.getResolvedUnit(testFile);
     CompletionRequestImpl baseRequest = new CompletionRequestImpl(
-        analysisResult, completionOffset, new CompletionPerformance());
+        resolveResult, completionOffset, new CompletionPerformance());
 
     // Build the request
     var request = await DartCompletionRequestImpl.from(baseRequest);
@@ -553,7 +543,7 @@
   @override
   void setUp() {
     super.setUp();
-    testFile = resourceProvider.convertPath('/completionTest.dart');
+    testFile = convertPath('/home/test/lib/test.dart');
     contributor = createContributor();
   }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
index 263f905..5f6e857 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
@@ -30,7 +30,7 @@
   }
 
   test_resolveDirectives() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library libA;
 /// My class.
 /// Short description.
@@ -38,16 +38,16 @@
 /// Longer description.
 class A {}
 ''');
-    addSource('/libB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 library libB;
-import "/libA.dart" as foo;
-part '${convertAbsolutePathToUri(testFile)}';
+import "a.dart" as foo;
+part 'test.dart';
 ''');
     addTestSource('part of libB; main() {^}');
 
     // Build the request
     CompletionRequestImpl baseRequest = new CompletionRequestImpl(
-        await driver.getResult(testFile),
+        await session.getResolvedUnit(testFile),
         completionOffset,
         new CompletionPerformance());
     Completer<DartCompletionRequest> requestCompleter =
@@ -83,6 +83,6 @@
 
     // Assert that the new imports each have an export namespace
     assertImportedLib('dart:core');
-    assertImportedLib('libA.dart');
+    assertImportedLib('a.dart');
   }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
index 26100ebf..0a1300f 100644
--- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
@@ -1,12 +1,10 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/imported_reference_contributor.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -30,9 +28,9 @@
 
   /// Sanity check.  Permutations tested in local_ref_contributor.
   test_ArgDefaults_function_with_required_named() async {
-    addMetaPackageSource();
+    addMetaPackage();
 
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib B;
 import 'package:meta/meta.dart';
 
@@ -40,7 +38,7 @@
 ''');
 
     addTestSource('''
-import "${convertAbsolutePathToUri('/testB.dart')}";
+import 'b.dart';
 
 void main() {f^}''');
     await computeSuggestions();
@@ -51,12 +49,12 @@
 
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import '${convertAbsolutePathToUri('/libA.dart')}';
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {expect(^)}''');
@@ -77,13 +75,13 @@
 
   test_ArgumentList_imported_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         expect(arg) { }
         void baz() { }''');
     addTestSource('''
-        import '${convertAbsolutePathToUri('/libA.dart')}'
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {expect(^)}''');
@@ -104,14 +102,14 @@
 
   test_ArgumentList_InstanceCreationExpression_functionalArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import '${convertAbsolutePathToUri('/libA.dart')}';
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {new A(^)}''');
@@ -135,7 +133,7 @@
 
   test_ArgumentList_InstanceCreationExpression_typedefArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         typedef Funct();
         class A { A(Funct f) { } }
@@ -143,7 +141,7 @@
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import '${convertAbsolutePathToUri('/libA.dart')}';
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {new A(^)}''');
@@ -167,12 +165,12 @@
 
   test_ArgumentList_local_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import '${convertAbsolutePathToUri('/libA.dart')}'
+        import 'a.dart';
         expect(arg) { }
         class B { }
         String bar() => true;
@@ -194,12 +192,12 @@
 
   test_ArgumentList_local_method() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import '${convertAbsolutePathToUri('/libA.dart')}'
+        import 'a.dart';
         class B {
           expect(arg) { }
           void foo() {expect(^)}}
@@ -221,14 +219,14 @@
 
   test_ArgumentList_MethodInvocation_functionalArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import '${convertAbsolutePathToUri('/libA.dart')}';
+        import 'a.dart';
         class B { }
         String bar(f()) => true;
         void main() {bar(^);}''');
@@ -252,14 +250,14 @@
 
   test_ArgumentList_MethodInvocation_methodArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import '${convertAbsolutePathToUri('/libA.dart')}';
+        import 'a.dart';
         class B { String bar(f()) => true; }
         void main() {new B().bar(^);}''');
 
@@ -282,11 +280,11 @@
   test_ArgumentList_namedParam() async {
     // SimpleIdentifier  NamedExpression  ArgumentList  MethodInvocation
     // ExpressionStatement
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }''');
     addTestSource('''
-        import '${convertAbsolutePathToUri('/libA.dart')}'
+        import 'a.dart';
         String bar() => true;
         void main() {expect(foo: ^)}''');
 
@@ -320,12 +318,12 @@
 
   test_AsExpression_type_subtype_extends_filter() async {
     // SimpleIdentifier  TypeName  AsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
           foo() { }
           class A {} class B extends A {} class C extends B {}
           class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-          import "${convertAbsolutePathToUri('/testB.dart')}";
+          import 'b.dart';
          main(){A a; if (a as ^)}''');
 
     await computeSuggestions();
@@ -342,12 +340,12 @@
 
   test_AsExpression_type_subtype_implements_filter() async {
     // SimpleIdentifier  TypeName  AsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
           foo() { }
           class A {} class B implements A {} class C implements B {}
           class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-          import "${convertAbsolutePathToUri('/testB.dart')}";
+          import 'b.dart';
           main(){A a; if (a as ^)}''');
 
     await computeSuggestions();
@@ -491,11 +489,11 @@
   }
 
   test_AwaitExpression_function() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 Future y() async {return 0;}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   int x;
   foo() async {await ^}
@@ -504,20 +502,20 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestFunction('y', 'dynamic');
+    assertSuggestFunction('y', 'Future<dynamic>');
     assertNotSuggested('A');
     assertSuggestClass('Object');
   }
 
   test_AwaitExpression_inherited() async {
     // SimpleIdentifier  AwaitExpression  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib libB;
 class A {
   Future y() async { return 0; }
 }''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/testB.dart')}";
+import 'b.dart';
 class B extends A {
   foo() async {await ^}
 }
@@ -565,29 +563,29 @@
 
   test_Block() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         export "dart:math" hide max;
         class A {int x;}
         @deprecated D1() {int x;}
         class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         String T1;
         var _T2;
         class C { }
         class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
         class EE { }
         class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
         class H { }
         int T3;
         var _T4;'''); // not imported
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testAB.dart')}";
-        import "${convertAbsolutePathToUri('/testCD.dart')}" hide D;
-        import "${convertAbsolutePathToUri('/testEEF.dart')}" show EE;
-        import "${convertAbsolutePathToUri('/testG.dart')}" as g;
+        import "ab.dart";
+        import "cd.dart" hide D;
+        import "eef.dart" show EE;
+        import "g.dart" as g;
         int T5;
         var _T6;
         String get T7 => 'hello';
@@ -620,7 +618,7 @@
     assertNotSuggested('x');
     assertNotSuggested('partT8');
 
-    assertSuggestClass('A', elemFile: '/testAB.dart');
+    assertSuggestClass('A', elemFile: '/home/test/lib/ab.dart');
     if (suggestConstructorsWithoutNew) {
       assertSuggestConstructor('A');
     }
@@ -668,29 +666,29 @@
 
   test_Block_final() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         export "dart:math" hide max;
         class A {int x;}
         @deprecated D1() {int x;}
         class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         String T1;
         var _T2;
         class C { }
         class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
         class EE { }
         class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
         class H { }
         int T3;
         var _T4;'''); // not imported
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testAB.dart')}";
-        import "${convertAbsolutePathToUri('/testCD.dart')}" hide D;
-        import "${convertAbsolutePathToUri('/testEEF.dart')}" show EE;
-        import "${convertAbsolutePathToUri('/testG.dart')}" as g;
+        import "ab.dart";
+        import "cd.dart" hide D;
+        import "eef.dart" show EE;
+        import "g.dart" as g;
         int T5;
         var _T6;
         String get T7 => 'hello';
@@ -781,29 +779,29 @@
 
   test_Block_final_final() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         export "dart:math" hide max;
         class A {int x;}
         @deprecated D1() {int x;}
         class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         String T1;
         var _T2;
         class C { }
         class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
         class EE { }
         class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
         class H { }
         int T3;
         var _T4;'''); // not imported
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testAB.dart')}";
-        import "${convertAbsolutePathToUri('/testCD.dart')}" hide D;
-        import "${convertAbsolutePathToUri('/testEEF.dart')}" show EE;
-        import "${convertAbsolutePathToUri('/testG.dart')}" as g hide G;
+        import "ab.dart";
+        import "cd.dart" hide D;
+        import "eef.dart" show EE;
+        import "g.dart" as g hide G;
         int T5;
         var _T6;
         String get T7 => 'hello';
@@ -882,29 +880,29 @@
 
   test_Block_final_var() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         export "dart:math" hide max;
         class A {int x;}
         @deprecated D1() {int x;}
         class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         String T1;
         var _T2;
         class C { }
         class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
         class EE { }
         class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
         class H { }
         int T3;
         var _T4;'''); // not imported
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testAB.dart')}";
-        import "${convertAbsolutePathToUri('/testCD.dart')}" hide D;
-        import "${convertAbsolutePathToUri('/testEEF.dart')}" show EE;
-        import "${convertAbsolutePathToUri('/testG.dart')}" as g;
+        import "ab.dart";
+        import "cd.dart" hide D;
+        import "eef.dart" show EE;
+        import "g.dart" as g;
         int T5;
         var _T6;
         String get T7 => 'hello';
@@ -980,30 +978,30 @@
   }
 
   test_Block_identifier_partial() async {
-    resolveSource('/testAB.dart', '''
+    resolveSource('/home/test/lib/ab.dart', '''
         export "dart:math" hide max;
         class A {int x;}
         @deprecated D1() {int x;}
         class _B { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         String T1;
         var _T2;
         class C { }
         class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
         class EE { }
         class DF { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
         class H { }
         class D3 { }
         int T3;
         var _T4;'''); // not imported
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testAB.dart')}";
-        import "${convertAbsolutePathToUri('/testCD.dart')}" hide D;
-        import "${convertAbsolutePathToUri('/testEEF.dart')}" show EE;
-        import "${convertAbsolutePathToUri('/testG.dart')}" as g;
+        import "ab.dart";
+        import "cd.dart" hide D;
+        import "eef.dart" show EE;
+        import "g.dart" as g;
         int T5;
         var _T6;
         Z D2() {int x;}
@@ -1058,14 +1056,14 @@
 
   test_Block_inherited_imported() async {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
         class E extends F { var e1; e2() { } }
         class I { int i1; i2() { } }
         class M { var m1; int m2() { } }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class A extends E implements I with M {a() {^}}''');
 
     await computeSuggestions();
@@ -1112,29 +1110,29 @@
   }
 
   test_Block_local_function() async {
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         export "dart:math" hide max;
         class A {int x;}
         @deprecated D1() {int x;}
         class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         String T1;
         var _T2;
         class C { }
         class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
         class EE { }
         class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
         class H { }
         int T3;
         var _T4;'''); // not imported
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testAB.dart')}";
-        import "${convertAbsolutePathToUri('/testCD.dart')}" hide D;
-        import "${convertAbsolutePathToUri('/testEEF.dart')}" show EE;
-        import "${convertAbsolutePathToUri('/testG.dart')}" as g;
+        import "ab.dart";
+        import "cd.dart" hide D;
+        import "eef.dart" show EE;
+        import "g.dart" as g;
         int T5;
         var _T6;
         String get T7 => 'hello';
@@ -1164,29 +1162,29 @@
 
   test_Block_partial_results() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         export "dart:math" hide max;
         class A {int x;}
         @deprecated D1() {int x;}
         class _B { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         String T1;
         var _T2;
         class C { }
         class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
         class EE { }
         class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
         class H { }
         int T3;
         var _T4;'''); // not imported
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
-        import "${convertAbsolutePathToUri('/testCD.dart')}" hide D;
-        import "${convertAbsolutePathToUri('/testEEF.dart')}" show EE;
-        import "${convertAbsolutePathToUri('/testG.dart')}" as g;
+        import 'b.dart';
+        import "cd.dart" hide D;
+        import "eef.dart" show EE;
+        import "g.dart" as g;
         int T5;
         var _T6;
         Z D2() {int x;}
@@ -1201,27 +1199,24 @@
   }
 
   test_Block_unimported() async {
-    addPackageSource('myBar', 'bar.dart', 'class Foo2 { Foo2() { } }');
-    addSource(
-        '/proj/testAB.dart', 'import "package:myBar/bar.dart"; class Foo { }');
-    testFile = '/proj/completionTest.dart';
-    addTestSource('class C {foo(){F^}}');
+    addPackageFile('aaa', 'a.dart', 'class A {}');
+    addTestSource('main() { ^ }');
 
     await computeSuggestions();
-    expect(replacementOffset, completionOffset - 1);
-    expect(replacementLength, 1);
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+
     // Not imported, so not suggested
-    assertNotSuggested('Foo');
-    assertNotSuggested('Foo2');
-    assertNotSuggested('Future');
+    assertNotSuggested('A');
+    assertNotSuggested('Completer');
   }
 
   test_CascadeExpression_selector1() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class A {var b; X _c;}
         class X{}
         // looks like a cascade to the parser
@@ -1243,10 +1238,10 @@
 
   test_CascadeExpression_selector2() async {
     // SimpleIdentifier  PropertyAccess  CascadeExpression  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class A {var b; X _c;}
         class X{}
         main() {A a; a..^z}''');
@@ -1266,10 +1261,10 @@
 
   test_CascadeExpression_selector2_withTrailingReturn() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class A {var b; X _c;}
         class X{}
         main() {A a; a..^ return}''');
@@ -1361,10 +1356,10 @@
 
   test_ClassDeclaration_body() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('testB.dart')}" as x;
+        import "b.dart" as x;
         @deprecated class A {^}
         class _B {}
         A T;''');
@@ -1386,10 +1381,10 @@
 
   test_ClassDeclaration_body_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('testB.dart')}" as x;
+        import "b.dart" as x;
         class A {final ^}
         class _B {}
         A T;''');
@@ -1407,10 +1402,10 @@
 
   test_ClassDeclaration_body_final_field() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('testB.dart')}" as x;
+        import "b.dart" as x;
         class A {final ^ A(){}}
         class _B {}
         A T;''');
@@ -1428,10 +1423,10 @@
 
   test_ClassDeclaration_body_final_field2() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('testB.dart')}" as Soo;
+        import "b.dart" as Soo;
         class A {final S^ A();}
         class _B {}
         A Sew;''');
@@ -1449,10 +1444,10 @@
 
   test_ClassDeclaration_body_final_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('testB.dart')}" as x;
+        import "b.dart" as x;
         class A {final ^ final foo;}
         class _B {}
         A T;''');
@@ -1470,10 +1465,10 @@
 
   test_ClassDeclaration_body_final_var() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('testB.dart')}" as x;
+        import "b.dart" as x;
         class A {final ^ var foo;}
         class _B {}
         A T;''');
@@ -1491,7 +1486,7 @@
 
   test_Combinator_hide() async {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         library libAB;
         part 'partAB.dart';
         class A { }
@@ -1501,12 +1496,12 @@
         var T1;
         PB F1() => new PB();
         class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         class C { }
         class D { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}" hide ^;
-        import "${convertAbsolutePathToUri('/testCD.dart')}";
+        import "b.dart" hide ^;
+        import "cd.dart";
         class X {}''');
 
     await computeSuggestions();
@@ -1515,7 +1510,7 @@
 
   test_Combinator_show() async {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
         library libAB;
         part 'partAB.dart';
         class A { }
@@ -1527,12 +1522,12 @@
         typedef PB2 F2(int blat);
         class Clz = Object with Object;
         class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
         class C { }
         class D { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}" show ^;
-        import "${convertAbsolutePathToUri('/testCD.dart')}";
+        import "b.dart" show ^;
+        import "cd.dart";
         class X {}''');
 
     await computeSuggestions();
@@ -1541,12 +1536,12 @@
 
   test_ConditionalExpression_elseExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         class B {int x;}
@@ -1561,12 +1556,12 @@
 
   test_ConditionalExpression_elseExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         class B {int x;}
@@ -1590,12 +1585,12 @@
 
   test_ConditionalExpression_partial_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         class B {int x;}
@@ -1610,12 +1605,12 @@
 
   test_ConditionalExpression_partial_thenExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         class B {int x;}
@@ -1639,12 +1634,12 @@
 
   test_ConditionalExpression_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         class B {int x;}
@@ -1660,13 +1655,13 @@
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         var m;
         main() {new X.^}''');
 
@@ -1685,13 +1680,13 @@
   test_ConstructorName_importedFactory() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         var m;
         main() {new X.^}''');
 
@@ -1786,7 +1781,7 @@
   }
 
   test_doc_class() async {
-    addSource('/libA.dart', r'''
+    addSource('/home/test/lib/a.dart', r'''
 library A;
 /// My class.
 /// Short description.
@@ -1794,8 +1789,7 @@
 /// Longer description.
 class A {}
 ''');
-    addTestSource(
-        'import "${convertAbsolutePathToUri('/libA.dart')}"; main() {^}');
+    addTestSource('import "a.dart"; main() {^}');
 
     await computeSuggestions();
 
@@ -1809,7 +1803,7 @@
   }
 
   test_doc_function() async {
-    resolveSource('/libA.dart', r'''
+    resolveSource('/home/test/lib/a.dart', r'''
 library A;
 /// My function.
 /// Short description.
@@ -1817,8 +1811,7 @@
 /// Longer description.
 int myFunc() {}
 ''');
-    addTestSource(
-        'import "${convertAbsolutePathToUri('/libA.dart')}"; main() {^}');
+    addTestSource('import "a.dart"; main() {^}');
 
     await computeSuggestions();
 
@@ -1829,7 +1822,7 @@
   }
 
   test_doc_function_c_style() async {
-    resolveSource('/libA.dart', r'''
+    resolveSource('/home/test/lib/a.dart', r'''
 library A;
 /**
  * My function.
@@ -1839,8 +1832,7 @@
  */
 int myFunc() {}
 ''');
-    addTestSource(
-        'import "${convertAbsolutePathToUri('/libA.dart')}"; main() {^}');
+    addTestSource('import "a.dart"; main() {^}');
 
     await computeSuggestions();
 
@@ -1851,9 +1843,8 @@
   }
 
   test_enum() async {
-    addSource('/libA.dart', 'library A; enum E { one, two }');
-    addTestSource(
-        'import "${convertAbsolutePathToUri('/libA.dart')}"; main() {^}');
+    addSource('/home/test/lib/a.dart', 'library A; enum E { one, two }');
+    addTestSource('import "a.dart"; main() {^}');
     await computeSuggestions();
     assertSuggestEnum('E');
     assertNotSuggested('one');
@@ -1861,9 +1852,9 @@
   }
 
   test_enum_deprecated() async {
-    addSource('/libA.dart', 'library A; @deprecated enum E { one, two }');
-    addTestSource(
-        'import "${convertAbsolutePathToUri('/libA.dart')}"; main() {^}');
+    addSource(
+        '/home/test/lib/a.dart', 'library A; @deprecated enum E { one, two }');
+    addTestSource('import "a.dart"; main() {^}');
     await computeSuggestions();
     // TODO(danrube) investigate why suggestion/element is not deprecated
     // when AST node has correct @deprecated annotation
@@ -1873,7 +1864,7 @@
   }
 
   test_enum_filter() async {
-    addSource('/a.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 enum E { one, two }
 enum F { three, four }
 ''');
@@ -1899,12 +1890,12 @@
 
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         _B F1() { }
         class A {int x;}
         class _B { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         typedef int F2(int blat);
         class Clz = Object with Object;
         class C {foo(){^} void bar() {}}''');
@@ -1929,11 +1920,11 @@
 
   test_ExpressionStatement_name() async {
     // ExpressionStatement  Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         B T1;
         class B{}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         class C {a() {C ^}}''');
 
     await computeSuggestions();
@@ -1943,9 +1934,9 @@
   test_FieldDeclaration_name_typed() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         class C {A ^}''');
 
     await computeSuggestions();
@@ -1955,9 +1946,9 @@
   test_FieldDeclaration_name_var() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         class C {var ^}''');
 
     await computeSuggestions();
@@ -2137,11 +2128,11 @@
   }
 
   test_function_parameters_mixed_required_and_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 int m(x, {int y}) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -2158,11 +2149,11 @@
   }
 
   test_function_parameters_mixed_required_and_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m(x, [int y]) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -2179,11 +2170,11 @@
   }
 
   test_function_parameters_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m({x, int y}) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -2200,11 +2191,11 @@
   }
 
   test_function_parameters_none() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m() {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -2219,11 +2210,11 @@
   }
 
   test_function_parameters_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m([x, int y]) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -2240,11 +2231,11 @@
   }
 
   test_function_parameters_required() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m(x, int y) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -2262,13 +2253,13 @@
 
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -2292,13 +2283,13 @@
 
   test_FunctionDeclaration_returnType_afterComment2() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -2322,13 +2313,13 @@
 
   test_FunctionDeclaration_returnType_afterComment3() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -2367,6 +2358,36 @@
     assertSuggestClass('Object');
   }
 
+  test_functionTypeAlias_genericTypeAlias() async {
+    addSource('/home/test/lib/a.dart', r'''
+typedef F = void Function();
+''');
+    addTestSource(r'''
+import 'a.dart';
+
+main() {
+  ^
+}
+''');
+    await computeSuggestions();
+    assertSuggestFunctionTypeAlias('F', 'void');
+  }
+
+  test_functionTypeAlias_old() async {
+    addSource('/home/test/lib/a.dart', r'''
+typedef void F();
+''');
+    addTestSource(r'''
+import 'a.dart';
+
+main() {
+  ^
+}
+''');
+    await computeSuggestions();
+    assertSuggestFunctionTypeAlias('F', 'void');
+  }
+
   test_IfStatement() async {
     // SimpleIdentifier  IfStatement
     addTestSource('''
@@ -2433,8 +2454,7 @@
   }
 
   test_implicitCreation() async {
-    configurePreviewDart2();
-    addSource('/a.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {
   A.a1();
   A.a2();
@@ -2474,12 +2494,12 @@
 
   test_IndexExpression() async {
     // ExpressionStatement  Block
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         class B {int x;}
@@ -2503,12 +2523,12 @@
 
   test_IndexExpression2() async {
     // SimpleIdentifier IndexExpression ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         class B {int x;}
@@ -2522,12 +2542,12 @@
   }
 
   test_InstanceCreationExpression() async {
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {foo(){var f; {var x;}}}
 class B {B(this.x, [String boo]) { } int x;}
 class C {C.bar({boo: 'hoo', int z: 0}) { } }''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/testA.dart')}";
+import 'a.dart';
 import "dart:math" as math;
 main() {new ^ String x = "hello";}''');
 
@@ -2571,7 +2591,7 @@
   }
 
   test_InstanceCreationExpression_abstractClass() async {
-    addSource('/a.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 abstract class A {
   A();
   A.generative();
@@ -2593,7 +2613,7 @@
   }
 
   test_InstanceCreationExpression_abstractClass_implicitConstructor() async {
-    addSource('/a.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 abstract class A {}
 ''');
     addTestSource('''
@@ -2609,8 +2629,7 @@
   }
 
   test_InstanceCreationExpression_filter() async {
-    configurePreviewDart2();
-    addSource('/a.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {}
 class B extends A {}
 class C implements A {}
@@ -2637,14 +2656,19 @@
     assertSuggestConstructor('D', elemOffset: -1);
   }
 
+  @failingTest
   test_InstanceCreationExpression_imported() async {
+    // This is failing because the constructor for Future is added twice. I
+    // suspect that we're adding it from both dart:core and dart:async and are
+    // not noticing that it's the same element.
+
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {A(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         import "dart:async";
         int T2;
         F2() { }
@@ -2676,15 +2700,15 @@
 
   test_InstanceCreationExpression_unimported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testAB.dart', 'class Foo { }');
-    addTestSource('class C {foo(){new F^}}');
+    addSource('/home/test/lib/ab.dart', 'class Clip { }');
+    addTestSource('class A {foo(){new C^}}');
 
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
     expect(replacementLength, 1);
     // Not imported, so not suggested
-    assertNotSuggested('Future');
-    assertNotSuggested('Foo');
+    assertNotSuggested('Completer');
+    assertNotSuggested('Clip');
   }
 
   test_internal_sdk_libs() async {
@@ -2700,13 +2724,13 @@
 
   test_InterpolationExpression() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -2735,13 +2759,13 @@
 
   test_InterpolationExpression_block() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -2809,12 +2833,12 @@
 
   test_IsExpression() async {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class Y {Y.c(); Y._d(); z() {}}
         main() {var x; if (x is ^) { }}''');
 
@@ -2879,12 +2903,12 @@
 
   test_IsExpression_type_subtype_extends_filter() async {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         foo() { }
         class A {} class B extends A {} class C extends B {}
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         main(){A a; if (a is ^)}''');
 
     await computeSuggestions();
@@ -2901,12 +2925,12 @@
 
   test_IsExpression_type_subtype_implements_filter() async {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         foo() { }
         class A {} class B implements A {} class C implements B {}
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         main(){A a; if (a is ^)}''');
 
     await computeSuggestions();
@@ -2922,14 +2946,14 @@
   }
 
   test_keyword() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
         lib B;
         int newT1;
         int T1;
         nowIsIt() { }
         class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         String newer() {}
         var m;
         main() {new^ X.c();}''');
@@ -2983,13 +3007,13 @@
 
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -3020,13 +3044,13 @@
 
   test_MapLiteralEntry1() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -3047,13 +3071,13 @@
 
   test_MapLiteralEntry2() async {
     // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -3068,11 +3092,11 @@
   }
 
   test_method_parameters_mixed_required_and_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m(x, {int y}) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3089,11 +3113,11 @@
   }
 
   test_method_parameters_mixed_required_and_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m(x, [int y]) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3110,11 +3134,11 @@
   }
 
   test_method_parameters_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m({x, int y}) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3131,11 +3155,11 @@
   }
 
   test_method_parameters_none() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m() {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3150,11 +3174,11 @@
   }
 
   test_method_parameters_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m([x, int y]) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3171,11 +3195,11 @@
   }
 
   test_method_parameters_required() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 void m(x, int y) {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B {
   main() {^}
 }
@@ -3205,14 +3229,14 @@
 
   test_MethodDeclaration_body_static() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testC.dart', '''
+    addSource('/home/test/lib/c.dart', '''
         class C {
           c1() {}
           var c2;
           static c3() {}
           static var c4;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testC.dart')}";
+        import "c.dart";
         class B extends C {
           b1() {}
           var b2;
@@ -3252,9 +3276,7 @@
     assertNotSuggested('_g');
     assertSuggestClass('bool');
     if (suggestConstructorsWithoutNew) {
-      // TODO(brianwilkerson) Should not suggest constructors for classes that
-      // cannot be instantiated.
-      assertSuggestConstructor('bool');
+      assertSuggestConstructor('List');
     }
   }
 
@@ -3293,13 +3315,13 @@
 
   test_MethodDeclaration_returnType() async {
     // ClassDeclaration  CompilationUnit
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -3322,13 +3344,13 @@
 
   test_MethodDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -3351,13 +3373,13 @@
 
   test_MethodDeclaration_returnType_afterComment2() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -3380,13 +3402,13 @@
 
   test_MethodDeclaration_returnType_afterComment3() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         int T2;
         F2() { }
         typedef D2();
@@ -3443,7 +3465,7 @@
   }
 
   test_mixin_ordering() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class B {}
 class M1 {
   void m() {}
@@ -3453,7 +3475,7 @@
 }
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class C extends B with M1, M2 {
   void f() {
     ^
@@ -3464,48 +3486,6 @@
     assertNotSuggested('m');
   }
 
-  /**
-   * Ensure that completions in one context don't appear in another
-   */
-  test_multiple_contexts() async {
-    // Create a 2nd context with source
-    var context2 = AnalysisEngine.instance.createAnalysisContext();
-    context2.sourceFactory =
-        new SourceFactory([new DartUriResolver(sdk), resourceResolver]);
-    String content2 = 'class ClassFromAnotherContext { }';
-    Source source2 =
-        newFile('/context2/foo.dart', content: content2).createSource();
-    ChangeSet changeSet = new ChangeSet();
-    changeSet.addedSource(source2);
-    context2.applyChanges(changeSet);
-    context2.setContents(source2, content2);
-
-    // Resolve the source in the 2nd context and update the index
-    var result = context2.performAnalysisTask();
-    while (result.hasMoreWork) {
-      result = context2.performAnalysisTask();
-    }
-
-    // Check that source in 2nd context does not appear in completion in 1st
-    addSource('/context1/libA.dart', '''
-      library libA;
-      class ClassInLocalContext {int x;}''');
-    testFile = '/context1/completionTest.dart';
-    addTestSource('''
-      import "${convertAbsolutePathToUri("/context1/libA.dart")}";
-      import "${convertAbsolutePathToUri("/foo.dart")}";
-      main() {C^}
-      ''');
-
-    await computeSuggestions();
-    assertSuggestClass('ClassInLocalContext');
-    if (suggestConstructorsWithoutNew) {
-      assertSuggestConstructor('ClassInLocalContext');
-    }
-    // Assert contributor does not include results from 2nd context.
-    assertNotSuggested('ClassFromAnotherContext');
-  }
-
   test_new_instance() async {
     addTestSource('import "dart:math"; class A {x() {new Random().^}}');
 
@@ -3519,11 +3499,11 @@
   }
 
   test_no_parameters_field() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int x;
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3534,11 +3514,11 @@
   }
 
   test_no_parameters_getter() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 int get x => null;
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3549,11 +3529,11 @@
   }
 
   test_no_parameters_setter() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 set x(int value) {};
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/libA.dart')}';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -3572,15 +3552,15 @@
 
   test_partFile_TypeName() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library libA;
-        import "${convertAbsolutePathToUri('/testB.dart')}";
-        part "${convertAbsolutePathToUri(testFile)}";
+        import 'b.dart';
+        part "test.dart";
         class A { }
         var m;''');
     addTestSource('''
@@ -3588,7 +3568,6 @@
         class B { factory B.bar(int x) => null; }
         main() {new ^}''');
 
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -3608,23 +3587,22 @@
 
   test_partFile_TypeName2() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib libB;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         part of libA;
         class B { }''');
     addTestSource('''
         library libA;
-        import "${convertAbsolutePathToUri('/testB.dart')}";
-        part "testA.dart";
+        import 'b.dart';
+        part "a.dart";
         class A { A({String boo: 'hoo'}) { } }
         main() {new ^}
         var m;''');
 
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -3644,7 +3622,7 @@
 
   test_PrefixedIdentifier_class_const() async {
     // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class I {
           static const scI = 'boo';
@@ -3658,7 +3636,7 @@
           m(X x) {} I _n(X x) {}}
         class X{}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class A extends B {
           static const String scA = 'foo';
           w() { }}
@@ -3691,7 +3669,7 @@
 
   test_PrefixedIdentifier_class_imported() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class I {X get f => new A();get _g => new A();}
         class A implements I {
@@ -3702,7 +3680,7 @@
           m(X x) {} I _n(X x) {}}
         class X{}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         main() {A a; a.^}''');
 
     await computeSuggestions();
@@ -3770,13 +3748,13 @@
 
   test_PrefixedIdentifier_library() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         main() {b.^}''');
@@ -3797,13 +3775,13 @@
 
   test_PrefixedIdentifier_library_typesOnly() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         foo(b.^ f) {}''');
@@ -3824,13 +3802,13 @@
 
   test_PrefixedIdentifier_library_typesOnly2() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         foo(b.^) {}''');
@@ -3851,13 +3829,13 @@
 
   test_PrefixedIdentifier_parameter() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class _W {M y; var _z;}
         class X extends _W {}
         class M{}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         foo(X x) {x.^}''');
 
     await computeSuggestions();
@@ -3870,11 +3848,11 @@
 
   test_PrefixedIdentifier_prefix() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class A {static int bar = 10;}
         _B() {}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";
+        import 'a.dart';
         class X {foo(){A^.bar}}''');
 
     await computeSuggestions();
@@ -4016,7 +3994,7 @@
 
   test_PropertyAccess_noTarget() async {
     // SimpleIdentifier  PropertyAccess  ExpressionStatement
-    addSource('/testAB.dart', 'class Foo { }');
+    addSource('/home/test/lib/ab.dart', 'class Foo { }');
     addTestSource('class C {foo(){.^}}');
 
     await computeSuggestions();
@@ -4025,7 +4003,7 @@
 
   test_PropertyAccess_noTarget2() async {
     // SimpleIdentifier  PropertyAccess  ExpressionStatement
-    addSource('/testAB.dart', 'class Foo { }');
+    addSource('/home/test/lib/ab.dart', 'class Foo { }');
     addTestSource('main() {.^}');
 
     await computeSuggestions();
@@ -4314,12 +4292,12 @@
 
   test_TypeArgumentList() async {
     // SimpleIdentifier  BinaryExpression  ExpressionStatement
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
         class C1 {int x;}
         F1() => 0;
         typedef String T1(int blat);''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";'
+        import 'a.dart';
         class C2 {int x;}
         F2() => 0;
         typedef int T2(int blat);
@@ -4340,12 +4318,12 @@
 
   test_TypeArgumentList2() async {
     // TypeName  TypeArgumentList  TypeName
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class C1 {int x;}
         F1() => 0;
         typedef String T1(int blat);''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testA.dart')}";'
+        import 'a.dart';
         class C2 {int x;}
         F2() => 0;
         typedef int T2(int blat);
@@ -4360,16 +4338,16 @@
   }
 
   test_TypeArgumentList_recursive() async {
-    resolveSource('/testA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {}
 ''');
-    resolveSource('/testB.dart', '''
-export 'testA.dart';
-export 'testB.dart';
+    resolveSource('/home/test/lib/b.dart', '''
+export 'a.dart';
+export 'b.dart';
 class B {}
 ''');
     addTestSource('''
-import '${convertAbsolutePathToUri('/testB.dart')}';
+import 'b.dart';
 List<^> x;
 ''');
     await computeSuggestions();
@@ -4382,13 +4360,13 @@
   test_VariableDeclaration_name() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class Y {Y.c(); Y._d(); z() {}}
         main() {var ^}''');
 
@@ -4409,13 +4387,13 @@
   test_VariableDeclarationStatement_RHS() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         class Y {Y.c(); Y._d(); z() {}}
         class C {bar(){var f; {var x;} var e = ^}}''');
 
@@ -4434,14 +4412,14 @@
   test_VariableDeclarationStatement_RHS_missing_semicolon() async {
     // VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
         lib B;
         foo1() { }
         void bar1() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri('/testB.dart')}";
+        import 'b.dart';
         foo2() { }
         void bar2() { }
         class Y {Y.c(); Y._d(); z() {}}
diff --git a/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
index d4689fe..d08e091 100644
--- a/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/inherited_reference_contributor_test.dart
@@ -1,6 +1,7 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+
 import 'dart:async';
 
 import 'package:analysis_server/src/protocol_server.dart';
@@ -29,8 +30,8 @@
 
   /// Sanity check.  Permutations tested in local_ref_contributor.
   test_ArgDefaults_inherited_method_with_required_named() async {
-    addMetaPackageSource();
-    resolveSource('/testB.dart', '''
+    addMetaPackage();
+    resolveSource('/home/test/lib/b.dart', '''
 import 'package:meta/meta.dart';
 
 lib libB;
@@ -38,7 +39,7 @@
    bool foo(int bar, {bool boo, @required int baz}) => false;
 }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class B extends A {
   b() => f^
 }
@@ -51,13 +52,13 @@
 
   test_AwaitExpression_inherited() async {
     // SimpleIdentifier  AwaitExpression  ExpressionStatement
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A {
   Future y() async {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class B extends A {
   Future a() async {return 0;}
   foo() async {await ^}
@@ -72,19 +73,19 @@
     assertNotSuggested('B');
     assertNotSuggested('A');
     assertNotSuggested('Object');
-    assertSuggestMethod('y', 'A', 'dynamic');
+    assertSuggestMethod('y', 'A', 'Future<dynamic>');
   }
 
   test_Block_inherited_imported() async {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
       lib B;
       class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
       class E extends F { var e1; e2() { } }
       class I { int i1; i2() { } }
       class M { var m1; int m2() { } }''');
     addTestSource('''
-      import "testB.dart";
+      import "b.dart";
       class A extends E implements I with M {a() {^}}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
@@ -163,7 +164,7 @@
   }
 
   test_inherited() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -172,7 +173,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A1 {
   int x;
   int y() {return 0;}
@@ -239,13 +240,13 @@
   }
 
   test_method_parameters_mixed_required_and_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m(x, {int y}) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -282,13 +283,13 @@
   }
 
   test_method_parameters_mixed_required_and_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m(x, [int y]) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -325,13 +326,13 @@
   }
 
   test_method_parameters_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m({x, int y}) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -368,13 +369,13 @@
   }
 
   test_method_parameters_none() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m() {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -405,13 +406,13 @@
   }
 
   test_method_parameters_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m([x, int y]) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -448,13 +449,13 @@
   }
 
   test_method_parameters_required() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m(x, int y) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -471,7 +472,7 @@
   }
 
   test_mixin_ordering() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class B {}
 class M1 {
   void m() {}
@@ -481,7 +482,7 @@
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class C extends B with M1, M2 {
   void f() {
     ^
@@ -493,13 +494,13 @@
   }
 
   test_no_parameters_field() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   int x;
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -510,13 +511,13 @@
   }
 
   test_no_parameters_getter() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   int get x => null;
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -527,13 +528,13 @@
   }
 
   test_no_parameters_setter() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   set x(int value) {};
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -544,7 +545,7 @@
   }
 
   test_outside_class() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -553,7 +554,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A1 {
   int x;
   int y() {return 0;}
@@ -585,7 +586,7 @@
   }
 
   test_static_field() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -594,7 +595,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A1 {
   int x;
   int y() {return 0;}
@@ -626,7 +627,7 @@
   }
 
   test_static_method() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -635,7 +636,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A1 {
   int x;
   int y() {return 0;}
diff --git a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
index 0bf6a76..09f41e9 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
@@ -87,14 +87,12 @@
 
   test_libraryPrefix_deferred_inPart() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    var libFile = '${testFile.substring(0, testFile.length - 5)}A.dart';
-    addSource(libFile, '''
+    addSource('/home/test/lib/a.dart', '''
         library testA;
         import "dart:async" deferred as bar;
-        part "${convertAbsolutePathToUri(testFile)}";''');
+        part "test.dart";''');
     addTestSource('part of testA; foo() {bar.^}');
     // Assume that libraries containing has been computed for part files
-    await computeLibrariesContaining();
     await computeSuggestions();
     assertSuggestClass('Future');
     assertSuggestFunction('loadLibrary', 'Future<dynamic>');
@@ -102,14 +100,13 @@
   }
 
   test_libraryPrefix_with_exports() async {
-    addSource('/libA.dart', 'library libA; class A { }');
-    addSource('/libB.dart', '''
+    addSource('/home/test/lib/a.dart', 'library libA; class A { }');
+    addSource('/home/test/lib/b.dart', '''
         library libB;
-        export "${convertAbsolutePathToUri("/libA.dart")}";
+        export "a.dart";
         class B { }
         @deprecated class B1 { }''');
-    addTestSource(
-        'import "${convertAbsolutePathToUri("/libB.dart")}" as foo; main() {foo.^} class C { }');
+    addTestSource('import "b.dart" as foo; main() {foo.^} class C { }');
     await computeSuggestions();
     assertSuggestClass('B');
     assertSuggestClass('B1', relevance: DART_RELEVANCE_LOW, isDeprecated: true);
@@ -119,13 +116,13 @@
 
   test_PrefixedIdentifier_library() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testB.dart")}" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         main() {b.^}''');
@@ -143,11 +140,11 @@
   }
 
   test_PrefixedIdentifier_library_export_withShow() async {
-    addSource('/a.dart', r'''
+    addSource('/home/test/lib/a.dart', r'''
 class A {}
 class B {}
 ''');
-    addSource('/b.dart', r'''
+    addSource('/home/test/lib/b.dart', r'''
 export 'a.dart' show A;
 ''');
     addTestSource(r'''
@@ -162,7 +159,7 @@
   }
 
   test_PrefixedIdentifier_library_import_withShow() async {
-    addSource('/a.dart', r'''
+    addSource('/home/test/lib/a.dart', r'''
 class A {}
 class B {}
 ''');
@@ -179,23 +176,21 @@
 
   test_PrefixedIdentifier_library_inPart() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    var libFile = '${testFile.substring(0, testFile.length - 5)}A.dart';
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
-    addSource(libFile, '''
+    addSource('/home/test/lib/a.dart', '''
         library testA;
-        import "${convertAbsolutePathToUri("/testB.dart")}" as b;
-        part "${convertAbsolutePathToUri(testFile)}";
+        import "b.dart" as b;
+        part "test.dart";
         var T2;
         class A { }''');
     addTestSource('''
         part of testA;
         main() {b.^}''');
     // Assume that libraries containing has been computed for part files
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -211,13 +206,13 @@
 
   test_PrefixedIdentifier_library_typesOnly() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testB.dart")}" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         foo(b.^ f) {}''');
@@ -236,13 +231,13 @@
 
   test_PrefixedIdentifier_library_typesOnly2() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testB.dart")}" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         foo(b.^) {}''');
@@ -261,13 +256,13 @@
 
   test_PrefixedIdentifier_parameter() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class _W {M y; var _z;}
         class X extends _W {}
         class M{}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testB.dart")}";
+        import "b.dart";
         foo(X x) {x.^}''');
     await computeSuggestions();
     assertNoSuggestions();
@@ -275,11 +270,11 @@
 
   test_PrefixedIdentifier_prefix() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class A {static int bar = 10;}
         _B() {}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testA.dart")}";
+        import "a.dart";
         class X {foo(){A^.bar}}''');
     await computeSuggestions();
     assertNoSuggestions();
diff --git a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
index 052103e..d4fb175 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_prefix_contributor_test.dart
@@ -42,29 +42,29 @@
 
   test_Block() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 export "dart:math" hide max;
 class A {int x;}
 @deprecated D1() {int x;}
 class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 String T1;
 var _T2;
 class C { }
 class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
 class EE { }
 class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
 class H { }
 int T3;
 var _T4;'''); // not imported
     addTestSource('''
-import "testAB.dart";
-import "testCD.dart" hide D;
-import "testEEF.dart" show EE;
-import "testG.dart" as g;
+import "ab.dart";
+import "cd.dart" hide D;
+import "eef.dart" show EE;
+import "g.dart" as g;
 int T5;
 var _T6;
 String get T7 => 'hello';
@@ -183,10 +183,10 @@
 
   test_ClassDeclaration_body() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 @deprecated class A {^}
 class _B {}
 A T;''');
@@ -198,10 +198,10 @@
 
   test_ClassDeclaration_body_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^}
 class _B {}
 A T;''');
@@ -213,10 +213,10 @@
 
   test_ClassDeclaration_body_final_field() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ A(){}}
 class _B {}
 A T;''');
@@ -228,10 +228,10 @@
 
   test_ClassDeclaration_body_final_field2() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as Soo;
+import "b.dart" as Soo;
 class A {final S^ A();}
 class _B {}
 A Sew;''');
@@ -243,10 +243,10 @@
 
   test_ClassDeclaration_body_final_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ final foo;}
 class _B {}
 A T;''');
@@ -258,10 +258,10 @@
 
   test_ClassDeclaration_body_final_var() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ var foo;}
 class _B {}
 A T;''');
@@ -272,12 +272,12 @@
   }
 
   test_InstanceCreationExpression() async {
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {foo(){var f; {var x;}}}
 class B {B(this.x, [String boo]) { } int x;}
 class C {C.bar({boo: 'hoo', int z: 0}) { } }''');
     addTestSource('''
-import "testA.dart" as t;
+import "a.dart" as t;
 import "dart:math" as math;
 main() {new ^ String x = "hello";}''');
     await computeSuggestions();
@@ -291,32 +291,31 @@
   }
 
   test_InstanceCreationExpression_inPart() async {
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {foo(){var f; {var x;}}}
 class B {B(this.x, [String boo]) { } int x;}
 class C {C.bar({boo: 'hoo', int z: 0}) { } }''');
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 library testB;
-import "${convertAbsolutePathToUri("/testA.dart")}" as t;
+import "a.dart" as t;
 import "dart:math" as math;
-part "${convertAbsolutePathToUri(testFile)}"
+part "test.dart";
 main() {new ^ String x = "hello";}''');
     addTestSource('''
 part of testB;
 main() {new ^ String x = "hello";}''');
-    await computeLibrariesContaining();
     await computeSuggestions();
     assertSuggestLibraryPrefixes(['math', 't']);
   }
 
   test_InstanceCreationExpression_inPart_detached() async {
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {foo(){var f; {var x;}}}
 class B {B(this.x, [String boo]) { } int x;}
 class C {C.bar({boo: 'hoo', int z: 0}) { } }''');
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 library testB;
-import "testA.dart" as t;
+import "a.dart" as t;
 import "dart:math" as math;
 //part "$testFile"
 main() {new ^ String x = "hello";}''');
diff --git a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
index d361dc9..d58e6fe 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_constructor_contributor_test.dart
@@ -57,7 +57,7 @@
 
   /// Sanity check.  Permutations tested in local_ref_contributor.
   test_ArgDefaults_cons_with_required_named() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -74,12 +74,12 @@
 
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B { }
 String bar() => true;
 void main() {expect(^)}''');
@@ -104,13 +104,13 @@
 
   test_ArgumentList_imported_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 expect(arg) { }
 void baz() { }''');
     addTestSource('''
-import 'libA.dart'
+import 'a.dart';
 class B { }
 String bar() => true;
 void main() {expect(^)}''');
@@ -135,14 +135,14 @@
 
   test_ArgumentList_InstanceCreationExpression_functionalArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 class A { A(f()) { } }
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import 'libA.dart';
+import 'a.dart';
 class B { }
 String bar() => true;
 void main() {new A(^)}''');
@@ -168,7 +168,7 @@
 
   test_ArgumentList_InstanceCreationExpression_typedefArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 typedef Funct();
 class A { A(Funct f) { } }
@@ -176,7 +176,7 @@
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import 'libA.dart';
+import 'a.dart';
 class B { }
 String bar() => true;
 void main() {new A(^)}''');
@@ -202,12 +202,12 @@
 
   test_ArgumentList_local_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
-import 'libA.dart'
+import 'a.dart';
 expect(arg) { }
 class B { }
 String bar() => true;
@@ -233,12 +233,12 @@
 
   test_ArgumentList_local_method() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
-import 'libA.dart'
+import 'a.dart';
 class B {
   expect(arg) { }
   void foo() {expect(^)}}
@@ -264,14 +264,14 @@
 
   test_ArgumentList_MethodInvocation_functionalArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 class A { A(f()) { } }
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import 'libA.dart';
+import 'a.dart';
 class B { }
 String bar(f()) => true;
 void main() {bar(^);}''');
@@ -297,14 +297,14 @@
 
   test_ArgumentList_MethodInvocation_methodArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 class A { A(f()) { } }
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import 'libA.dart';
+import 'a.dart';
 class B { String bar(f()) => true; }
 void main() {new B().bar(^);}''');
     await computeSuggestions();
@@ -329,11 +329,11 @@
   test_ArgumentList_namedParam() async {
     // SimpleIdentifier  NamedExpression  ArgumentList  MethodInvocation
     // ExpressionStatement
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }''');
     addTestSource('''
-import 'libA.dart'
+import 'a.dart';
 String bar() => true;
 void main() {expect(foo: ^)}''');
     await computeSuggestions();
@@ -1037,14 +1037,14 @@
 
   test_Block_inherited_imported() async {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
 class E extends F { var e1; e2() { } }
 class I { int i1; i2() { } }
 class M { var m1; int m2() { } }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A extends E implements I with M {a() {^}}''');
     await computeSuggestions();
 
@@ -1142,27 +1142,24 @@
   }
 
   test_Block_unimported() async {
-    addPackageSource('myBar', 'bar.dart', 'class Foo2 { Foo2() { } }');
-    addSource(
-        '/proj/testAB.dart', 'import "package:myBar/bar.dart"; class Foo { }');
-    testFile = '/proj/completionTest.dart';
-    addTestSource('class C {foo(){F^}}');
-    await computeSuggestions();
+    addPackageFile('aaa', 'a.dart', 'class A {}');
+    addTestSource('main() { ^ }');
 
-    expect(replacementOffset, completionOffset - 1);
-    expect(replacementLength, 1);
-    assertNotSuggested('Foo');
-    // TODO(danrubel) implement
-    assertNotSuggested('Foo2');
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+
+    // Not imported, so not suggested
+    assertNotSuggested('A');
     assertNotSuggested('Future');
   }
 
   test_CascadeExpression_selector1() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A {var b; X _c;}
 class X{}
 // looks like a cascade to the parser
@@ -1184,10 +1181,10 @@
 
   test_CascadeExpression_selector2() async {
     // SimpleIdentifier  PropertyAccess  CascadeExpression  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A {var b; X _c;}
 class X{}
 main() {A a; a..^z}''');
@@ -1207,10 +1204,10 @@
 
   test_CascadeExpression_selector2_withTrailingReturn() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A {var b; X _c;}
 class X{}
 main() {A a; a..^ return}''');
@@ -1307,10 +1304,10 @@
 
   test_ClassDeclaration_body() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 @deprecated class A {^}
 class _B {}
 A T;''');
@@ -1328,10 +1325,10 @@
 
   test_ClassDeclaration_body_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^}
 class _B {}
 A T;''');
@@ -1349,10 +1346,10 @@
 
   test_ClassDeclaration_body_final_field() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ A(){}}
 class _B {}
 A T;''');
@@ -1370,10 +1367,10 @@
 
   test_ClassDeclaration_body_final_field2() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as Soo;
+import "b.dart" as Soo;
 class A {final S^ A();}
 class _B {}
 A Sew;''');
@@ -1391,10 +1388,10 @@
 
   test_ClassDeclaration_body_final_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ final foo;}
 class _B {}
 A T;''');
@@ -1412,10 +1409,10 @@
 
   test_ClassDeclaration_body_final_var() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ var foo;}
 class _B {}
 A T;''');
@@ -1483,12 +1480,12 @@
 
   test_ConditionalExpression_elseExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1503,12 +1500,12 @@
 
   test_ConditionalExpression_elseExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1533,12 +1530,12 @@
 
   test_ConditionalExpression_partial_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1553,12 +1550,12 @@
 
   test_ConditionalExpression_partial_thenExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1583,12 +1580,12 @@
 
   test_ConditionalExpression_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1639,13 +1636,13 @@
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 var m;
 main() {new X.^}''');
     await computeSuggestions();
@@ -1664,13 +1661,13 @@
   test_ConstructorName_importedFactory() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 var m;
 main() {new X.^}''');
     await computeSuggestions();
@@ -1786,12 +1783,12 @@
 
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 _B F1() { }
 class A {int x;}
 class _B { }''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 typedef int F2(int blat);
 class Clz = Object with Object;
 class C {foo(){^} void bar() {}}''');
@@ -1816,11 +1813,11 @@
 
   test_ExpressionStatement_name() async {
     // ExpressionStatement  Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         B T1;
         class B{}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {a() {C ^}}''');
     await computeSuggestions();
 
@@ -1830,9 +1827,9 @@
   test_FieldDeclaration_name_typed() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {A ^}''');
     await computeSuggestions();
 
@@ -1842,9 +1839,9 @@
   test_FieldDeclaration_name_var() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {var ^}''');
     await computeSuggestions();
 
@@ -2074,13 +2071,13 @@
 
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2104,13 +2101,13 @@
 
   test_FunctionDeclaration_returnType_afterComment2() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2134,13 +2131,13 @@
 
   test_FunctionDeclaration_returnType_afterComment3() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2301,12 +2298,12 @@
 
   test_IndexExpression() async {
     // ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -2331,12 +2328,12 @@
 
   test_IndexExpression2() async {
     // SimpleIdentifier IndexExpression ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -2465,12 +2462,12 @@
 
   test_InstanceCreationExpression_imported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {A(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 import "dart:async";
 int T2;
 F2() { }
@@ -2584,13 +2581,13 @@
 
   test_InterpolationExpression() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2618,13 +2615,13 @@
 
   test_InterpolationExpression_block() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2694,12 +2691,12 @@
 
   test_IsExpression() async {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo() { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class Y {Y.c(); Y._d(); z() {}}
 main() {var x; if (x is ^) { }}''');
     await computeSuggestions();
@@ -2767,14 +2764,14 @@
   }
 
   test_keyword() async {
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int newT1;
 int T1;
 nowIsIt() { }
 class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 String newer() {}
 var m;
 main() {new^ X.c();}''');
@@ -2829,13 +2826,13 @@
 
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2862,13 +2859,13 @@
 
   test_MapLiteralEntry1() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2884,13 +2881,13 @@
 
   test_MapLiteralEntry2() async {
     // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3080,13 +3077,13 @@
 
   test_MethodDeclaration_returnType() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3109,13 +3106,13 @@
 
   test_MethodDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3138,13 +3135,13 @@
 
   test_MethodDeclaration_returnType_afterComment2() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3167,13 +3164,13 @@
 
   test_MethodDeclaration_returnType_afterComment3() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3275,14 +3272,14 @@
 
   test_partFile_TypeName() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library libA;
-import "testB.dart";
+import "b.dart";
 part "${resourceProvider.pathContext.basename(testFile)}";
 class A { }
 var m;''');
@@ -3290,7 +3287,6 @@
 part of libA;
 class B { factory B.bar(int x) => null; }
 main() {new ^}''');
-    await computeLibrariesContaining();
     await computeSuggestions();
 
     expect(replacementOffset, completionOffset);
@@ -3309,18 +3305,18 @@
 
   test_partFile_TypeName2() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 part of libA;
 class B { }''');
     addTestSource('''
 library libA;
-import "testB.dart";
-part "testA.dart";
+import "b.dart";
+part "a.dart";
 class A { A({String boo: 'hoo'}) { } }
 main() {new ^}
 var m;''');
@@ -3342,7 +3338,7 @@
 
   test_PrefixedIdentifier_class_const() async {
     // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 class I {
   static const scI = 'boo';
@@ -3356,7 +3352,7 @@
   m(X x) {} I _n(X x) {}}
 class X{}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class A extends B {
   static const String scA = 'foo';
   w() { }}
@@ -3389,7 +3385,7 @@
 
   test_PrefixedIdentifier_class_imported() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 class I {X get f => new A();get _g => new A();}
 class A implements I {
@@ -3400,7 +3396,7 @@
   m(X x) {} I _n(X x) {}}
 class X{}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 main() {A a; a.^}''');
     await computeSuggestions();
 
@@ -3468,13 +3464,13 @@
 
   test_PrefixedIdentifier_library() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 var T1;
 class X { }
 class Y { }''');
     addTestSource('''
-import "testB.dart" as b;
+import "b.dart" as b;
 var T2;
 class A { }
 main() {b.^}''');
@@ -3495,13 +3491,13 @@
 
   test_PrefixedIdentifier_library_typesOnly() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 var T1;
 class X { }
 class Y { }''');
     addTestSource('''
-import "testB.dart" as b;
+import "b.dart" as b;
 var T2;
 class A { }
 foo(b.^ f) {}''');
@@ -3522,13 +3518,13 @@
 
   test_PrefixedIdentifier_library_typesOnly2() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 var T1;
 class X { }
 class Y { }''');
     addTestSource('''
-import "testB.dart" as b;
+import "b.dart" as b;
 var T2;
 class A { }
 foo(b.^) {}''');
@@ -3549,13 +3545,13 @@
 
   test_PrefixedIdentifier_parameter() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 class _W {M y; var _z;}
 class X extends _W {}
 class M{}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 foo(X x) {x.^}''');
     await computeSuggestions();
 
@@ -3568,11 +3564,11 @@
 
   test_PrefixedIdentifier_prefix() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {static int bar = 10;}
 _B() {}''');
     addTestSource('''
-import "testA.dart";
+import "a.dart";
 class X {foo(){A^.bar}}''');
     await computeSuggestions();
 
@@ -4044,12 +4040,12 @@
 
   test_TypeArgumentList() async {
     // SimpleIdentifier  BinaryExpression  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class C1 {int x;}
 F1() => 0;
 typedef String T1(int blat);''');
     addTestSource('''
-import "testA.dart";'
+import "a.dart";'
 class C2 {int x;}
 F2() => 0;
 typedef int T2(int blat);
@@ -4070,12 +4066,12 @@
 
   test_TypeArgumentList2() async {
     // TypeName  TypeArgumentList  TypeName
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class C1 {int x;}
 F1() => 0;
 typedef String T1(int blat);''');
     addTestSource('''
-import "testA.dart";'
+import "a.dart";'
 class C2 {int x;}
 F2() => 0;
 typedef int T2(int blat);
@@ -4092,13 +4088,13 @@
   test_VariableDeclaration_name() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo() { }
 class _B { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class Y {Y.c(); Y._d(); z() {}}
 main() {var ^}''');
     await computeSuggestions();
@@ -4119,13 +4115,13 @@
   test_VariableDeclarationStatement_RHS() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo() { }
 class _B { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 class Y {Y.c(); Y._d(); z() {}}
 class C {bar(){var f; {var x;} var e = ^}}''');
     await computeSuggestions();
@@ -4148,14 +4144,14 @@
   test_VariableDeclarationStatement_RHS_missing_semicolon() async {
     // VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo1() { }
 void bar1() { }
 class _B { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "testB.dart";
+import "b.dart";
 foo2() { }
 void bar2() { }
 class Y {Y.c(); Y._d(); z() {}}
diff --git a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
index 07d9364..3191090 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
@@ -24,22 +24,21 @@
 
   test_partFile_Constructor() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library libA;
-        import "${convertAbsolutePathToUri("/testB.dart")}";
-        part "${convertAbsolutePathToUri(testFile)}";
+        import "b.dart";
+        part "test.dart";
         class A { }
         var m;''');
     addTestSource('''
         part of libA;
         class B { factory B.bar(int x) => null; }
         main() {new ^}''');
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -59,22 +58,21 @@
 
   test_partFile_Constructor2() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         part of libA;
         class B { }''');
     addTestSource('''
         library libA;
-        import "${convertAbsolutePathToUri("/testB.dart")}";
-        part "${convertAbsolutePathToUri("/testA.dart")}";
+        import "b.dart";
+        part "a.dart";
         class A { A({String boo: 'hoo'}) { } }
         main() {new ^}
         var m;''');
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -94,19 +92,19 @@
 
   test_partFile_InstanceCreationExpression_assignment_filter() async {
     // ConstructorName  InstanceCreationExpression  VariableDeclarationList
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         part of libA;
         class A {} class B extends A {} class C implements A {} class D {}
         ''');
     addTestSource('''
         library libA;
-        import "${convertAbsolutePathToUri("/testB.dart")}";
-        part "${convertAbsolutePathToUri("/testA.dart")}";
+        import "b.dart";
+        part "a.dart";
         class Local { }
         main() {
           A a;
@@ -114,7 +112,6 @@
           a = new ^
         }
         var m;''');
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -147,25 +144,24 @@
 
   test_partFile_InstanceCreationExpression_variable_declaration_filter() async {
     // ConstructorName  InstanceCreationExpression  VariableDeclarationList
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         part of libA;
         class A {} class B extends A {} class C implements A {} class D {}
         ''');
     addTestSource('''
         library libA;
-        import "${convertAbsolutePathToUri("/testB.dart")}";
-        part "${convertAbsolutePathToUri("/testA.dart")}";
+        import "b.dart";
+        part "a.dart";
         class Local { }
         main() {
           A a = new ^
         }
         var m;''');
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -197,15 +193,15 @@
   }
 
   test_partFile_TypeName() async {
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library libA;
-        import "${convertAbsolutePathToUri("/testB.dart")}";
-        part "${convertAbsolutePathToUri(testFile)}";
+        import "b.dart";
+        part "test.dart";
         class A { var a1; a2(){}}
         var m;
         typedef t1(int blue);
@@ -214,7 +210,6 @@
         part of libA;
         class B { factory B.bar(int x) => null; }
         main() {^}''');
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
@@ -243,12 +238,12 @@
   }
 
   test_partFile_TypeName2() async {
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         part of libA;
         class B { var b1; b2(){}}
         int bf() => 0;
@@ -256,12 +251,11 @@
         var n;''');
     addTestSource('''
         library libA;
-        import "${convertAbsolutePathToUri("/testB.dart")}";
-        part "${convertAbsolutePathToUri("/testA.dart")}";
+        import "b.dart";
+        part "a.dart";
         class A { A({String boo: 'hoo'}) { } }
         main() {^}
         var m;''');
-    await computeLibrariesContaining();
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
index e96883c..ffa3f3a 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -87,7 +87,7 @@
   }
 
   test_ArgDefaults_function_with_optional_positional() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -102,7 +102,7 @@
   }
 
   test_ArgDefaults_function_with_required_named() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -117,7 +117,7 @@
   }
 
   test_ArgDefaults_method_with_required_named() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -137,12 +137,12 @@
 
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 class B { }
 String bar() => true;
 void main() {expect(^)}''');
@@ -164,13 +164,13 @@
 
   test_ArgumentList_imported_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 expect(arg) { }
 void baz() { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}"
+import 'a.dart';
 class B { }
 String bar() => true;
 void main() {expect(^)}''');
@@ -192,14 +192,14 @@
 
   test_ArgumentList_InstanceCreationExpression_functionalArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 class A { A(f()) { } }
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 class B { }
 String bar() => true;
 void main() {new A(^)}''');
@@ -223,7 +223,7 @@
 
   test_ArgumentList_InstanceCreationExpression_typedefArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 typedef Funct();
 class A { A(Funct f) { } }
@@ -231,7 +231,7 @@
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 class B { }
 String bar() => true;
 void main() {new A(^)}''');
@@ -255,12 +255,12 @@
 
   test_ArgumentList_local_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}"
+import 'a.dart';
 expect(arg) { }
 class B { }
 String bar() => true;
@@ -283,12 +283,12 @@
 
   test_ArgumentList_local_method() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}"
+import 'a.dart';
 class B {
   expect(arg) { }
   void foo() {expect(^)}}
@@ -311,14 +311,14 @@
 
   test_ArgumentList_MethodInvocation_functionalArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 class A { A(f()) { } }
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 class B { }
 String bar(f()) => true;
 void main() {boo(){} bar(^);}''');
@@ -345,14 +345,14 @@
 
   test_ArgumentList_MethodInvocation_functionalArg2() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 class A { A(f()) { } }
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 class B { }
 String bar({inc()}) => true;
 void main() {boo(){} bar(inc: ^);}''');
@@ -381,14 +381,14 @@
 
   test_ArgumentList_MethodInvocation_methodArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 class A { A(f()) { } }
 bool hasLength(int expected) { }
 void baz() { }''');
     addTestSource('''
 import 'dart:async';
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 class B { String bar(f()) => true; }
 void main() {new B().bar(^);}''');
     await computeSuggestions();
@@ -407,7 +407,7 @@
   }
 
   test_ArgumentList_namedFieldParam_tear_off() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 typedef void VoidCallback();
         
 class Button {
@@ -416,7 +416,7 @@
 }
 ''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 
 class PageState {
   void _incrementCounter() { }
@@ -438,11 +438,11 @@
   test_ArgumentList_namedParam() async {
     // SimpleIdentifier  NamedExpression  ArgumentList  MethodInvocation
     // ExpressionStatement
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library A;
 bool hasLength(int expected) { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}"
+import 'a.dart';
 String bar() => true;
 void main() {expect(foo: ^)}''');
     await computeSuggestions();
@@ -493,7 +493,7 @@
   }
 
   test_ArgumentList_namedParam_tear_off() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 typedef void VoidCallback();
         
 class Button {
@@ -501,7 +501,7 @@
 }
 ''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 
 class PageState {
   void _incrementCounter() { }
@@ -521,7 +521,7 @@
   }
 
   test_ArgumentList_namedParam_tear_off_1() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 typedef void VoidCallback();
         
 class Button {
@@ -529,7 +529,7 @@
 }
 ''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 
 class PageState {
   void _incrementCounter() { }
@@ -549,7 +549,7 @@
   }
 
   test_ArgumentList_namedParam_tear_off_2() async {
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 typedef void VoidCallback();
         
 class Button {
@@ -557,7 +557,7 @@
 }
 ''');
     addTestSource('''
-import "${convertAbsolutePathToUri('/libA.dart')}";
+import 'a.dart';;
 
 class PageState {
   void _incrementCounter() { }
@@ -783,7 +783,7 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    assertSuggestMethod('y', 'A', 'Future',
+    assertSuggestMethod('y', 'A', 'Future<dynamic>',
         relevance: DART_RELEVANCE_LOCAL_METHOD);
     assertSuggestClass('A');
     assertNotSuggested('Object');
@@ -822,29 +822,29 @@
 
   test_Block() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 export "dart:math" hide max;
 class A {int x;}
 @deprecated D1() {int x;}
 class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 String T1;
 var _T2;
 class C { }
 class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
 class EE { }
 class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
 class H { }
 int T3;
 var _T4;'''); // not imported
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}";
-import "${convertAbsolutePathToUri("/testCD.dart")}" hide D;
-import "${convertAbsolutePathToUri("/testEEF.dart")}" show EE;
-import "${convertAbsolutePathToUri("/testG.dart")}" as g;
+import "ab.dart";
+import "cd.dart" hide D;
+import "eef.dart" show EE;
+import "g.dart" as g;
 int T5;
 var _T6;
 String get T7 => 'hello';
@@ -920,29 +920,29 @@
 
   test_Block_final() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 export "dart:math" hide max;
 class A {int x;}
 @deprecated D1() {int x;}
 class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 String T1;
 var _T2;
 class C { }
 class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
 class EE { }
 class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
 class H { }
 int T3;
 var _T4;'''); // not imported
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}";
-import "${convertAbsolutePathToUri("/testCD.dart")}" hide D;
-import "${convertAbsolutePathToUri("/testEEF.dart")}" show EE;
-import "${convertAbsolutePathToUri("/testG.dart")}" as g;
+import "ab.dart";
+import "cd.dart" hide D;
+import "eef.dart" show EE;
+import "g.dart" as g;
 int T5;
 var _T6;
 String get T7 => 'hello';
@@ -1033,29 +1033,29 @@
 
   test_Block_final_final() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 export "dart:math" hide max;
 class A {int x;}
 @deprecated D1() {int x;}
 class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 String T1;
 var _T2;
 class C { }
 class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
 class EE { }
 class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
 class H { }
 int T3;
 var _T4;'''); // not imported
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}";
-import "${convertAbsolutePathToUri("/testCD.dart")}" hide D;
-import "${convertAbsolutePathToUri("/testEEF.dart")}" show EE;
-import "${convertAbsolutePathToUri("/testG.dart")}" as g;
+import "ab.dart";
+import "cd.dart" hide D;
+import "eef.dart" show EE;
+import "g.dart" as g;
 int T5;
 var _T6;
 String get T7 => 'hello';
@@ -1132,29 +1132,29 @@
 
   test_Block_final_var() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 export "dart:math" hide max;
 class A {int x;}
 @deprecated D1() {int x;}
 class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 String T1;
 var _T2;
 class C { }
 class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
 class EE { }
 class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
 class H { }
 int T3;
 var _T4;'''); // not imported
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}";
-import "${convertAbsolutePathToUri("/testCD.dart")}" hide D;
-import "${convertAbsolutePathToUri("/testEEF.dart")}" show EE;
-import "${convertAbsolutePathToUri("/testG.dart")}" as g;
+import "ab.dart";
+import "cd.dart" hide D;
+import "eef.dart" show EE;
+import "g.dart" as g;
 int T5;
 var _T6;
 String get T7 => 'hello';
@@ -1230,30 +1230,30 @@
   }
 
   test_Block_identifier_partial() async {
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 export "dart:math" hide max;
 class A {int x;}
 @deprecated D1() {int x;}
 class _B { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 String T1;
 var _T2;
 class C { }
 class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
 class EE { }
 class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
 class H { }
 class D3 { }
 int T3;
 var _T4;'''); // not imported
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}";
-import "${convertAbsolutePathToUri("/testCD.dart")}" hide D;
-import "${convertAbsolutePathToUri("/testEEF.dart")}" show EE;
-import "${convertAbsolutePathToUri("/testG.dart")}" as g;
+import "ab.dart";
+import "cd.dart" hide D;
+import "eef.dart" show EE;
+import "g.dart" as g;
 int T5;
 var _T6;
 Z D2() {int x;}
@@ -1310,14 +1310,14 @@
 
   test_Block_inherited_imported() async {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib B;
 class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
 class E extends F { var e1; e2() { } }
 class I { int i1; i2() { } }
 class M { var m1; int m2() { } }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class A extends E implements I with M {a() {^}}''');
     await computeSuggestions();
 
@@ -1364,29 +1364,29 @@
   }
 
   test_Block_local_function() async {
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 export "dart:math" hide max;
 class A {int x;}
 @deprecated D1() {int x;}
 class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 String T1;
 var _T2;
 class C { }
 class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource('/home/test/lib/eef.dart', '''
 class EE { }
 class F { }''');
-    addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource('/home/test/lib/g.dart', 'class G { }');
+    addSource('/home/test/lib/h.dart', '''
 class H { }
 int T3;
 var _T4;'''); // not imported
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}";
-import "${convertAbsolutePathToUri("/testCD.dart")}" hide D;
-import "${convertAbsolutePathToUri("/testEEF.dart")}" show EE;
-import "${convertAbsolutePathToUri("/testG.dart")}" as g;
+import "ab.dart";
+import "cd.dart" hide D;
+import "eef.dart" show EE;
+import "g.dart" as g;
 int T5;
 var _T6;
 String get T7 => 'hello';
@@ -1415,27 +1415,24 @@
   }
 
   test_Block_unimported() async {
-    addPackageSource('myBar', 'bar.dart', 'class Foo2 { Foo2() { } }');
-    addSource(
-        '/proj/testAB.dart', 'import "package:myBar/bar.dart"; class Foo { }');
-    testFile = '/proj/completionTest.dart';
-    addTestSource('class C {foo(){F^}}');
-    await computeSuggestions();
+    addPackageFile('aaa', 'a.dart', 'class A {}');
+    addTestSource('main() { ^ }');
 
-    expect(replacementOffset, completionOffset - 1);
-    expect(replacementLength, 1);
-    assertNotSuggested('Foo');
-    // TODO(danrubel) implement
-    assertNotSuggested('Foo2');
+    await computeSuggestions();
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+
+    // Not imported, so not suggested
+    assertNotSuggested('A');
     assertNotSuggested('Future');
   }
 
   test_CascadeExpression_selector1() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class A {var b; X _c;}
 class X{}
 // looks like a cascade to the parser
@@ -1457,10 +1454,10 @@
 
   test_CascadeExpression_selector2() async {
     // SimpleIdentifier  PropertyAccess  CascadeExpression  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class A {var b; X _c;}
 class X{}
 main() {A a; a..^z}''');
@@ -1480,10 +1477,10 @@
 
   test_CascadeExpression_selector2_withTrailingReturn() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class A {var b; X _c;}
 class X{}
 main() {A a; a..^ return}''');
@@ -1575,10 +1572,10 @@
 
   test_ClassDeclaration_body() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 @deprecated class A {^}
 class _B {}
 A T;''');
@@ -1605,10 +1602,10 @@
 
   test_ClassDeclaration_body_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^}
 class _B {}
 A T;''');
@@ -1626,10 +1623,10 @@
 
   test_ClassDeclaration_body_final_field() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ A(){}}
 class _B {}
 A T;''');
@@ -1647,10 +1644,10 @@
 
   test_ClassDeclaration_body_final_field2() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as Soo;
+import "b.dart" as Soo;
 class A {final S^ A();}
 class _B {}
 A Sew;''');
@@ -1668,10 +1665,10 @@
 
   test_ClassDeclaration_body_final_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ final foo;}
 class _B {}
 A T;''');
@@ -1689,10 +1686,10 @@
 
   test_ClassDeclaration_body_final_var() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 class B { }''');
     addTestSource('''
-import "testB.dart" as x;
+import "b.dart" as x;
 class A {final ^ var foo;}
 class _B {}
 A T;''');
@@ -1710,7 +1707,7 @@
 
   test_Combinator_hide() async {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 library libAB;
 part 'partAB.dart';
 class A { }
@@ -1720,12 +1717,12 @@
 var T1;
 PB F1() => new PB();
 class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 class C { }
 class D { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}" hide ^;
-import "${convertAbsolutePathToUri("/testCD.dart")}";
+import "ab.dart" hide ^;
+import "cd.dart";
 class X {}''');
     await computeSuggestions();
 
@@ -1734,7 +1731,7 @@
 
   test_Combinator_show() async {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource('/home/test/lib/ab.dart', '''
 library libAB;
 part 'partAB.dart';
 class A { }
@@ -1746,12 +1743,12 @@
 typedef PB2 F2(int blat);
 class Clz = Object with Object;
 class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource('/home/test/lib/cd.dart', '''
 class C { }
 class D { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testAB.dart")}" show ^;
-import "${convertAbsolutePathToUri("/testCD.dart")}";
+import "ab.dart" show ^;
+import "cd.dart";
 class X {}''');
     await computeSuggestions();
 
@@ -1760,12 +1757,12 @@
 
   test_ConditionalExpression_elseExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1781,12 +1778,12 @@
 
   test_ConditionalExpression_elseExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1809,12 +1806,12 @@
 
   test_ConditionalExpression_partial_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1830,12 +1827,12 @@
 
   test_ConditionalExpression_partial_thenExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1858,12 +1855,12 @@
 
   test_ConditionalExpression_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -1912,16 +1909,50 @@
     assertSuggestParameter('y', 'int');
   }
 
+  test_ConstructorFieldInitializer_name() async {
+    addTestSource('''
+class A {
+  final int foo;
+  A() : ^
+}
+''');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestField('foo', 'int', relevance: DART_RELEVANCE_LOCAL_FIELD);
+  }
+
+  test_ConstructorFieldInitializer_value() async {
+    addTestSource('''
+var foo = 0;
+
+class A {
+  final int bar;
+  A() : bar = ^
+}
+''');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestTopLevelVar(
+      'foo',
+      'int',
+      relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE,
+    );
+  }
+
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 var m;
 main() {new X.^}''');
     await computeSuggestions();
@@ -1940,13 +1971,13 @@
   test_ConstructorName_importedFactory() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 var m;
 main() {new X.^}''');
     await computeSuggestions();
@@ -2271,12 +2302,12 @@
 
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 _B F1() { }
 class A {int x;}
 class _B { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 typedef int F2(int blat);
 class Clz = Object with Object;
 class C {foo(){^} void bar() {}}''');
@@ -2300,11 +2331,11 @@
 
   test_ExpressionStatement_name() async {
     // ExpressionStatement  Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         B T1;
         class B{}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testA.dart")}";
+        import "a.dart";
         class C {a() {C ^}}''');
     await computeSuggestions();
 
@@ -2314,9 +2345,9 @@
   test_FieldDeclaration_name_typed() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testA.dart")}";
+        import "a.dart";
         class C {A ^}''');
     await computeSuggestions();
 
@@ -2326,9 +2357,9 @@
   test_FieldDeclaration_name_var() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testA.dart")}";
+        import "a.dart";
         class C {var ^}''');
     await computeSuggestions();
 
@@ -2637,13 +2668,13 @@
 
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2667,13 +2698,13 @@
 
   test_FunctionDeclaration_returnType_afterComment2() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2697,13 +2728,13 @@
 
   test_FunctionDeclaration_returnType_afterComment3() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -2747,6 +2778,28 @@
     assertNotSuggested('Object');
   }
 
+  test_functionTypeAlias_genericTypeAlias() async {
+    addTestSource(r'''
+typedef F = void Function();
+main() {
+  ^
+}
+''');
+    await computeSuggestions();
+    assertSuggestFunctionTypeAlias('F', 'void');
+  }
+
+  test_functionTypeAlias_old() async {
+    addTestSource(r'''
+typedef void F();
+main() {
+  ^
+}
+''');
+    await computeSuggestions();
+    assertSuggestFunctionTypeAlias('F', 'void');
+  }
+
   test_IfStatement() async {
     // SimpleIdentifier  IfStatement
     addTestSource('''
@@ -2861,12 +2914,12 @@
 
   test_IndexExpression() async {
     // ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -2889,12 +2942,12 @@
 
   test_IndexExpression2() async {
     // SimpleIdentifier IndexExpression ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 class B {int x;}
@@ -2927,12 +2980,12 @@
 
   test_InstanceCreationExpression_imported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 class A {A(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 import "dart:async";
 int T2;
 F2() { }
@@ -2959,7 +3012,7 @@
 
   test_InstanceCreationExpression_unimported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testAB.dart', 'class Foo { }');
+    addSource('/home/test/lib/ab.dart', 'class Foo { }');
     addTestSource('class C {foo(){new F^}}');
     await computeSuggestions();
 
@@ -2971,13 +3024,13 @@
 
   test_InterpolationExpression() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3002,13 +3055,13 @@
 
   test_InterpolationExpression_block() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3075,12 +3128,12 @@
 
   test_IsExpression() async {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo() { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class Y {Y.c(); Y._d(); z() {}}
 main() {var x; if (x is ^) { }}''');
     await computeSuggestions();
@@ -3190,14 +3243,14 @@
   }
 
   test_keyword() async {
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int newT1;
 int T1;
 nowIsIt() { }
 class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 String newer() {}
 var m;
 main() {new^ X.c();}''');
@@ -3254,13 +3307,13 @@
 
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3284,13 +3337,13 @@
 
   test_MapLiteralEntry1() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3307,13 +3360,13 @@
 
   test_MapLiteralEntry2() async {
     // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3435,14 +3488,14 @@
 
   test_MethodDeclaration_body_static() async {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testC.dart', '''
+    addSource('/home/test/lib/c.dart', '''
 class C {
   c1() {}
   var c2;
   static c3() {}
   static var c4;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testC.dart")}";
+import "c.dart";
 class B extends C {
   b1() {}
   var b2;
@@ -3576,13 +3629,13 @@
 
   test_MethodDeclaration_returnType() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3605,13 +3658,13 @@
 
   test_MethodDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3634,13 +3687,13 @@
 
   test_MethodDeclaration_returnType_afterComment2() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3663,13 +3716,13 @@
 
   test_MethodDeclaration_returnType_afterComment3() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 int T1;
 F1() { }
 typedef D1();
 class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 int T2;
 F2() { }
 typedef D2();
@@ -3771,14 +3824,14 @@
 
   test_partFile_TypeName() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 library libA;
-import "testB.dart";
+import "b.dart";
 part "${resourceProvider.pathContext.basename(testFile)}";
 class A { }
 var m;''');
@@ -3805,22 +3858,21 @@
 
   test_partFile_TypeName2() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 int T1;
 F1() { }
 class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 part of libA;
 class B { }''');
     addTestSource('''
 library libA;
-import "testB.dart";
-part "testA.dart";
+import "b.dart";
+part "a.dart";
 class A { A({String boo: 'hoo'}) { } }
 main() {new ^}
 var m;''');
-    await computeLibrariesContaining();
     await computeSuggestions();
 
     expect(replacementOffset, completionOffset);
@@ -3840,7 +3892,7 @@
 
   test_PrefixedIdentifier_class_const() async {
     // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 class I {
   static const scI = 'boo';
@@ -3854,7 +3906,7 @@
   m(X x) {} I _n(X x) {}}
 class X{}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class A extends B {
   static const String scA = 'foo';
   w() { }}
@@ -3887,7 +3939,7 @@
 
   test_PrefixedIdentifier_class_imported() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 class I {X get f => new A();get _g => new A();}
 class A implements I {
@@ -3898,7 +3950,7 @@
   m(X x) {} I _n(X x) {}}
 class X{}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 main() {A a; a.^}''');
     await computeSuggestions();
 
@@ -3966,13 +4018,13 @@
 
   test_PrefixedIdentifier_library() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 var T1;
 class X { }
 class Y { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}" as b;
+import "b.dart" as b;
 var T2;
 class A { }
 main() {b.^}''');
@@ -3993,13 +4045,13 @@
 
   test_PrefixedIdentifier_library_typesOnly() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 var T1;
 class X { }
 class Y { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}" as b;
+import "b.dart" as b;
 var T2;
 class A { }
 foo(b.^ f) {}''');
@@ -4020,13 +4072,13 @@
 
   test_PrefixedIdentifier_library_typesOnly2() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 var T1;
 class X { }
 class Y { }''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}" as b;
+import "b.dart" as b;
 var T2;
 class A { }
 foo(b.^) {}''');
@@ -4047,13 +4099,13 @@
 
   test_PrefixedIdentifier_parameter() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 class _W {M y; var _z;}
 class X extends _W {}
 class M{}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 foo(X x) {x.^}''');
     await computeSuggestions();
 
@@ -4066,11 +4118,11 @@
 
   test_PrefixedIdentifier_prefix() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {static int bar = 10;}
 _B() {}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";
+import "a.dart";
 class X {foo(){A^.bar}}''');
     await computeSuggestions();
 
@@ -4231,7 +4283,7 @@
 
   test_PropertyAccess_noTarget() async {
     // SimpleIdentifier  PropertyAccess  ExpressionStatement
-    addSource('/testAB.dart', 'class Foo { }');
+    addSource('/home/test/lib/ab.dart', 'class Foo { }');
     addTestSource('class C {foo(){.^}}');
     await computeSuggestions();
 
@@ -4240,7 +4292,7 @@
 
   test_PropertyAccess_noTarget2() async {
     // SimpleIdentifier  PropertyAccess  ExpressionStatement
-    addSource('/testAB.dart', 'class Foo { }');
+    addSource('/home/test/lib/ab.dart', 'class Foo { }');
     addTestSource('main() {.^}');
     await computeSuggestions();
 
@@ -4549,12 +4601,12 @@
 
   test_TypeArgumentList() async {
     // SimpleIdentifier  BinaryExpression  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class C1 {int x;}
 F1() => 0;
 typedef String T1(int blat);''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";'
+import "a.dart";'
 class C2 {int x;}
 F2() => 0;
 typedef int T2(int blat);
@@ -4575,12 +4627,12 @@
 
   test_TypeArgumentList2() async {
     // TypeName  TypeArgumentList  TypeName
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class C1 {int x;}
 F1() => 0;
 typedef String T1(int blat);''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testA.dart")}";'
+import "a.dart";'
 class C2 {int x;}
 F2() => 0;
 typedef int T2(int blat);
@@ -4597,13 +4649,13 @@
   test_VariableDeclaration_name() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo() { }
 class _B { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class Y {Y.c(); Y._d(); z() {}}
 main() {var ^}''');
     await computeSuggestions();
@@ -4624,13 +4676,13 @@
   test_VariableDeclarationStatement_RHS() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo() { }
 class _B { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 class Y {Y.c(); Y._d(); z() {}}
 class C {bar(){var f; {var x;} var e = ^}}''');
     await computeSuggestions();
@@ -4649,14 +4701,14 @@
   test_VariableDeclarationStatement_RHS_missing_semicolon() async {
     // VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
 lib B;
 foo1() { }
 void bar1() { }
 class _B { }
 class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-import "${convertAbsolutePathToUri("/testB.dart")}";
+import "b.dart";
 foo2() { }
 void bar2() { }
 class Y {Y.c(); Y._d(); z() {}}
diff --git a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
index ea0d067..f4722d5 100644
--- a/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/named_constructor_contributor_test.dart
@@ -45,13 +45,13 @@
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testB.dart")}";
+        import 'b.dart';
         var m;
         main() {new X.^}''');
 
@@ -69,13 +69,13 @@
   test_ConstructorName_importedClass_unresolved() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testB.dart")}";
+        import 'b.dart';
         var m;
         main() {new X.^}''');
     // Assume that imported libraries are NOT resolved
@@ -94,13 +94,13 @@
   test_ConstructorName_importedFactory() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-        import "${convertAbsolutePathToUri("/testB.dart")}";
+        import 'b.dart';
         var m;
         main() {new X.^}''');
 
diff --git a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
index 8d5a329..52caf6e 100644
--- a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
@@ -93,16 +93,16 @@
   }
 
   test_fromPart() async {
-    addSource('/myLib.dart', '''
+    addSource('/home/test/lib/myLib.dart', '''
 library myLib;
-part '${convertAbsolutePathToUri(testFile)}'
-part '${convertAbsolutePathToUri('/otherPart.dart')}'
+part 'test.dart';
+part 'otherPart.dart';
 class A {
   A suggested1(int x) => null;
   B suggested2(String y) => null;
 }
 ''');
-    addSource('/otherPart.dart', '''
+    addSource('/home/test/lib/otherPart.dart', '''
 part of myLib;
 class B extends A {
   B suggested2(String y) => null;
@@ -116,7 +116,6 @@
 }
 ''');
     // assume information for context.getLibrariesContaining has been cached
-    await computeLibrariesContaining();
     await computeSuggestions();
     _assertOverride('''
 @override
@@ -176,6 +175,62 @@
         selectionLength: 22);
   }
 
+  test_private_otherLibrary() async {
+    addSource('/home/test/lib/a.dart', '''
+class A {
+  void foo() {}
+  void _bar() {}
+}
+''');
+    addTestSource(r'''
+import 'a.dart';
+
+class B extends A {
+  f^
+}
+''');
+    await computeSuggestions();
+
+    _assertOverride('''
+@override
+  void foo() {
+    // TODO: implement foo
+    super.foo();
+  }''', displayText: 'foo() { … }', selectionOffset: 56, selectionLength: 12);
+
+    expect(suggestions, _notSuggestedPredicate((suggestion) {
+      return suggestion.completion.contains('void _bar()');
+    }));
+  }
+
+  test_private_thisLibrary() async {
+    addTestSource(r'''
+class A {
+  void foo() {}
+  void _bar() {}
+}
+
+class B extends A {
+  f^
+}
+''');
+    await computeSuggestions();
+
+    _assertOverride('''
+@override
+  void foo() {
+    // TODO: implement foo
+    super.foo();
+  }''', displayText: 'foo() { … }', selectionOffset: 56, selectionLength: 12);
+
+    _assertOverride('''
+@override
+  void _bar() {
+    // TODO: implement _bar
+    super._bar();
+  }''', displayText: '_bar() { … }', selectionOffset: 58, selectionLength: 13);
+  }
+
   test_withExistingOverride() async {
     addTestSource('''
 class A {
@@ -245,4 +300,8 @@
     expect(cs.displayText, displayText);
     return cs;
   }
+
+  static Matcher _notSuggestedPredicate(bool Function(CompletionSuggestion) f) {
+    return isNot(contains(predicate(f)));
+  }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
index 2987710..256e647 100644
--- a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
@@ -98,8 +98,7 @@
   }
 
   test_implicitCreation() async {
-    configurePreviewDart2();
-    addSource('/a.dart', '''
+    addSource('/home/test/lib/a.dart', '''
 class A {
   A.foo();
   A.bar();
@@ -257,12 +256,12 @@
 import "dart:async" as async;
 void main() {async.Future.^.w()}''');
     await computeSuggestions();
-    assertSuggestMethod('wait', 'Future', 'Future<dynamic>');
+    assertSuggestMethod('wait', 'Future', 'Future<List<T>>');
   }
 
   test_PrefixedIdentifier_class_const() async {
     // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class I {
           static const scI = 'boo';
@@ -276,7 +275,7 @@
           m(X x) {} I _n(X x) {}}
         class X{}''');
     addTestSource('''
-        import "/testB.dart";
+        import "b.dart";
         class A extends B {
           static const String scA = 'foo';
           w() { }}
diff --git a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
index a39270d..c9da1a4 100644
--- a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
@@ -81,7 +81,7 @@
   }
 
   test_ArgDefaults_method_with_optional_positional() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -96,7 +96,7 @@
   }
 
   test_ArgDefaults_method_with_required_named() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -113,12 +113,12 @@
 
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart';
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {expect(^)}''');
@@ -138,13 +138,13 @@
 
   test_ArgumentList_imported_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         expect(arg) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {expect(^)}''');
@@ -164,14 +164,14 @@
 
   test_ArgumentList_InstanceCreationExpression_functionalArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {new A(^)}''');
@@ -192,7 +192,7 @@
 
   test_ArgumentList_InstanceCreationExpression_typedefArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         typedef Funct();
         class A { A(Funct f) { } }
@@ -200,7 +200,7 @@
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {new A(^)}''');
@@ -221,12 +221,12 @@
 
   test_ArgumentList_local_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         expect(arg) { }
         class B { }
         String bar() => true;
@@ -247,12 +247,12 @@
 
   test_ArgumentList_local_method() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         class B {
           expect(arg) { }
           void foo() {expect(^)}}
@@ -273,14 +273,14 @@
 
   test_ArgumentList_MethodInvocation_functionalArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';
         class B { }
         String bar(f()) => true;
         void main() {bar(^);}''');
@@ -301,14 +301,14 @@
 
   test_ArgumentList_MethodInvocation_methodArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';
         class B { String bar(f()) => true; }
         void main() {new B().bar(^);}''');
     await computeSuggestions();
@@ -328,11 +328,11 @@
   test_ArgumentList_namedParam() async {
     // SimpleIdentifier  NamedExpression  ArgumentList  MethodInvocation
     // ExpressionStatement
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         String bar() => true;
         void main() {expect(foo: ^)}''');
     await computeSuggestions();
@@ -983,14 +983,14 @@
 
   test_Block_inherited_imported() async {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
         class E extends F { var e1; e2() { } }
         class I { int i1; i2() { } }
         class M { var m1; int m2() { } }''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class A extends E implements I with M {a() {^}}''');
     await computeSuggestions();
 
@@ -1085,26 +1085,24 @@
   }
 
   test_Block_unimported() async {
-    addPackageSource('myBar', 'bar.dart', 'class Foo2 { Foo2() { } }');
-    addSource(
-        '/proj/testAB.dart', 'import "package:myBar/bar.dart"; class Foo { }');
-    testFile = resourceProvider.convertPath('/proj/completionTest.dart');
-    addTestSource('class C {foo(){F^}}');
+    addPackageFile('aaa', 'a.dart', 'class A {}');
+    addTestSource('main() { ^ }');
+
     await computeSuggestions();
-    expect(replacementOffset, completionOffset - 1);
-    expect(replacementLength, 1);
-    assertNotSuggested('Foo');
-    // TODO(danrubel) implement
-    assertNotSuggested('Foo2');
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+
+    // Not imported, so not suggested
+    assertNotSuggested('A');
     assertNotSuggested('Future');
   }
 
   test_CascadeExpression_method1() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class A {var b; X _c;}
         class X{}
         // looks like a cascade to the parser
@@ -1125,10 +1123,10 @@
 
   test_CascadeExpression_selector1() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class A {var b; X _c;}
         class X{}
         // looks like a cascade to the parser
@@ -1149,10 +1147,10 @@
 
   test_CascadeExpression_selector2() async {
     // SimpleIdentifier  PropertyAccess  CascadeExpression  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class A {var b; X _c;}
         class X{}
         main() {A a; a..^z}''');
@@ -1171,10 +1169,10 @@
 
   test_CascadeExpression_selector2_withTrailingReturn() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class A {var b; X _c;}
         class X{}
         main() {A a; a..^ return}''');
@@ -1260,10 +1258,10 @@
 
   test_ClassDeclaration_body() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import "b.dart" as x;
         @deprecated class A {^}
         class _B {}
         A T;''');
@@ -1279,10 +1277,10 @@
 
   test_ClassDeclaration_body_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import "b.dart" as x;
         class A {final ^}
         class _B {}
         A T;''');
@@ -1298,10 +1296,10 @@
 
   test_ClassDeclaration_body_final_field() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import "b.dart" as x;
         class A {final ^ A(){}}
         class _B {}
         A T;''');
@@ -1317,10 +1315,10 @@
 
   test_ClassDeclaration_body_final_field2() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as Soo;
+        import "b.dart" as Soo;
         class A {final S^ A();}
         class _B {}
         A Sew;''');
@@ -1336,10 +1334,10 @@
 
   test_ClassDeclaration_body_final_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import "b.dart" as x;
         class A {final ^ final foo;}
         class _B {}
         A T;''');
@@ -1355,10 +1353,10 @@
 
   test_ClassDeclaration_body_final_var() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import "b.dart" as x;
         class A {final ^ var foo;}
         class _B {}
         A T;''');
@@ -1422,12 +1420,12 @@
 
   test_ConditionalExpression_elseExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1441,12 +1439,12 @@
 
   test_ConditionalExpression_elseExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1466,12 +1464,12 @@
 
   test_ConditionalExpression_partial_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1485,12 +1483,12 @@
 
   test_ConditionalExpression_partial_thenExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1510,12 +1508,12 @@
 
   test_ConditionalExpression_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1530,13 +1528,13 @@
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         var m;
         main() {new X.^}''');
     await computeSuggestions();
@@ -1554,13 +1552,13 @@
   test_ConstructorName_importedFactory() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         var m;
         main() {new X.^}''');
     await computeSuggestions();
@@ -1714,12 +1712,12 @@
 
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         _B F1() { }
         class A {int x;}
         class _B { }''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         typedef int F2(int blat);
         class Clz = Object with Object;
         class C {foo(){^} void bar() {}}''');
@@ -1740,11 +1738,11 @@
 
   test_ExpressionStatement_name() async {
     // ExpressionStatement  Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         B T1;
         class B{}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {a() {C ^}}''');
     await computeSuggestions();
     assertNoSuggestions();
@@ -1753,9 +1751,9 @@
   test_FieldDeclaration_name_typed() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {A ^}''');
     await computeSuggestions();
     assertNoSuggestions();
@@ -1764,9 +1762,9 @@
   test_FieldDeclaration_name_var() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {var ^}''');
     await computeSuggestions();
     assertNoSuggestions();
@@ -1916,13 +1914,13 @@
 
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -1945,13 +1943,13 @@
 
   test_FunctionDeclaration_returnType_afterComment2() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -1974,13 +1972,13 @@
 
   test_FunctionDeclaration_returnType_afterComment3() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2143,12 +2141,12 @@
 
   test_IndexExpression() async {
     // ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -2168,12 +2166,12 @@
 
   test_IndexExpression2() async {
     // SimpleIdentifier IndexExpression ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -2187,12 +2185,12 @@
 
   test_InstanceCreationExpression_imported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {A(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         import "dart:async";
         int T2;
         F2() { }
@@ -2228,13 +2226,13 @@
 
   test_InterpolationExpression() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2257,13 +2255,13 @@
 
   test_InterpolationExpression_block() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2323,12 +2321,12 @@
 
   test_IsExpression() async {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class Y {Y.c(); Y._d(); z() {}}
         main() {var x; if (x is ^) { }}''');
     await computeSuggestions();
@@ -2395,14 +2393,14 @@
   }
 
   test_keyword2() async {
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int newT1;
         int T1;
         nowIsIt() { }
         class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         String newer() {}
         var m;
         main() {new^ X.c();}''');
@@ -2455,9 +2453,9 @@
   }
 
   test_libraryPrefix_with_exports() async {
-    addSource('/libA.dart', 'library libA; class A { }');
-    addSource('/libB.dart', 'library libB; export "libA.dart"; class B { }');
-    addTestSource('import "libB.dart" as foo; main() {foo.^} class C { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
+    addSource('/home/test/lib/b.dart', 'export "a.dart"; class B { }');
+    addTestSource('import "b.dart" as foo; main() {foo.^} class C { }');
     await computeSuggestions();
     // Suggested by LibraryMemberContributor
     assertNotSuggested('B');
@@ -2514,13 +2512,13 @@
 
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2541,13 +2539,13 @@
 
   test_MapLiteralEntry1() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2561,13 +2559,13 @@
 
   test_MapLiteralEntry2() async {
     // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2770,13 +2768,13 @@
 
   test_MethodDeclaration_returnType() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2798,13 +2796,13 @@
 
   test_MethodDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2826,13 +2824,13 @@
 
   test_MethodDeclaration_returnType_afterComment2() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2854,13 +2852,13 @@
 
   test_MethodDeclaration_returnType_afterComment3() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -3051,14 +3049,14 @@
 
   test_partFile_TypeName() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library libA;
-        import "testB.dart";
+        import "b.dart";
         part "${resourceProvider.pathContext.basename(testFile)}";
         class A { }
         var m;''');
@@ -3083,18 +3081,18 @@
 
   test_partFile_TypeName2() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         part of libA;
         class B { }''');
     addTestSource('''
         library libA;
-        import "testB.dart";
-        part "${convertAbsolutePathToUri('/testA.dart')}";
+        import "b.dart";
+        part "a.dart";
         class A { A({String boo: 'hoo'}) { } }
         main() {new ^}
         var m;''');
@@ -3115,7 +3113,7 @@
 
   test_PrefixedIdentifier_class_const() async {
     // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class I {
           static const scI = 'boo';
@@ -3129,7 +3127,7 @@
           m(X x) {} I _n(X x) {}}
         class X{}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class A extends B {
           static const String scA = 'foo';
           w() { }}
@@ -3161,7 +3159,7 @@
 
   test_PrefixedIdentifier_class_imported() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class I {X get f => new A();get _g => new A();}
         class A implements I {
@@ -3172,7 +3170,7 @@
           m(X x) {} I _n(X x) {}}
         class X{}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         main() {A a; a.^}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
@@ -3237,13 +3235,13 @@
 
   test_PrefixedIdentifier_library() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "testB.dart" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         main() {b.^}''');
@@ -3263,13 +3261,13 @@
 
   test_PrefixedIdentifier_library_typesOnly() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "testB.dart" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         foo(b.^ f) {}''');
@@ -3289,13 +3287,13 @@
 
   test_PrefixedIdentifier_library_typesOnly2() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "testB.dart" as b;
+        import "b.dart" as b;
         var T2;
         class A { }
         foo(b.^) {}''');
@@ -3315,13 +3313,13 @@
 
   test_PrefixedIdentifier_parameter() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class _W {M y; var _z;}
         class X extends _W {}
         class M{}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         foo(X x) {x.^}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
@@ -3333,11 +3331,11 @@
 
   test_PrefixedIdentifier_prefix() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class A {static int bar = 10;}
         _B() {}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class X {foo(){A^.bar}}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
@@ -3919,12 +3917,12 @@
 
   test_TypeArgumentList() async {
     // SimpleIdentifier  BinaryExpression  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class C1 {int x;}
         F1() => 0;
         typedef String T1(int blat);''');
     addTestSource('''
-        import "testA.dart";'
+        import "a.dart";'
         class C2 {int x;}
         F2() => 0;
         typedef int T2(int blat);
@@ -3944,12 +3942,12 @@
 
   test_TypeArgumentList2() async {
     // TypeName  TypeArgumentList  TypeName
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class C1 {int x;}
         F1() => 0;
         typedef String T1(int blat);''');
     addTestSource('''
-        import "testA.dart";'
+        import "a.dart";'
         class C2 {int x;}
         F2() => 0;
         typedef int T2(int blat);
@@ -3965,13 +3963,13 @@
   test_VariableDeclaration_name() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class Y {Y.c(); Y._d(); z() {}}
         main() {var ^}''');
     await computeSuggestions();
@@ -3990,13 +3988,13 @@
   test_VariableDeclarationStatement_RHS() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         class Y {Y.c(); Y._d(); z() {}}
         class C {bar(){var f; {var x;} var e = ^}}''');
     await computeSuggestions();
@@ -4014,14 +4012,14 @@
   test_VariableDeclarationStatement_RHS_missing_semicolon() async {
     // VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo1() { }
         void bar1() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import "b.dart";
         foo2() { }
         void bar2() { }
         class Y {Y.c(); Y._d(); z() {}}
diff --git a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
index 7d66b12..c283cde 100644
--- a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
@@ -67,9 +67,9 @@
   }
 
   test_export_package2() async {
-    addPackageSource('foo', 'foo.dart', 'library foo;');
-    addPackageSource('foo', 'baz/too.dart', 'library too;');
-    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addPackageFile('foo', 'foo.dart', 'library foo;');
+    addPackageFile('foo', 'baz/too.dart', 'library too;');
+    addPackageFile('bar', 'bar.dart', 'library bar;');
     addTestSource('export "package:foo/baz/^" import');
     await computeSuggestions();
     assertSuggest('package:foo/baz/too.dart',
@@ -79,9 +79,9 @@
   test_export_package2_off() async {
     try {
       UriContributor.suggestFilePaths = false;
-      addPackageSource('foo', 'foo.dart', 'library foo;');
-      addPackageSource('foo', 'baz/too.dart', 'library too;');
-      addPackageSource('bar', 'bar.dart', 'library bar;');
+      addPackageFile('foo', 'foo.dart', 'library foo;');
+      addPackageFile('foo', 'baz/too.dart', 'library too;');
+      addPackageFile('bar', 'bar.dart', 'library bar;');
       addTestSource('export "package:foo/baz/^" import');
       await computeSuggestions();
       assertNotSuggested('package:foo/baz/too.dart');
@@ -144,7 +144,7 @@
   }
 
   test_import_file() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -161,7 +161,7 @@
   }
 
   test_import_file2() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -180,7 +180,7 @@
   test_import_file2_off() async {
     try {
       UriContributor.suggestFilePaths = false;
-      testFile = '/proj/completion.dart';
+      testFile = convertPath('/proj/completion.dart');
       addSource('/proj/other.dart', 'library other;');
       addSource('/proj/foo/bar.dart', 'library bar;');
       addSource('/blat.dart', 'library blat;');
@@ -200,7 +200,7 @@
   }
 
   test_import_file_child() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -217,7 +217,7 @@
   }
 
   test_import_file_outside_lib() async {
-    testFile = '/proj/lib/completion.dart';
+    testFile = convertPath('/proj/lib/completion.dart');
     addSource('/proj/lib/other.dart', 'library other;');
     addSource('/proj/lib/foo/bar.dart', 'library bar;');
     addSource('/proj/blat.dart', 'library blat;');
@@ -237,7 +237,7 @@
   }
 
   test_import_file_parent() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -256,7 +256,7 @@
   }
 
   test_import_file_parent2() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -273,7 +273,7 @@
   }
 
   test_import_no_dot_folders() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     newFolder('/proj/.fooFolder');
     addTestSource('import "package:^";');
@@ -282,7 +282,7 @@
   }
 
   test_import_only_dart_files() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     newFile('/proj/analysis_options.yaml', content: '# analysis options');
     addTestSource('import "package:^";');
@@ -291,9 +291,9 @@
   }
 
   test_import_package() async {
-    addPackageSource('foo', 'foo.dart', 'library foo;');
-    addPackageSource('foo', 'baz/too.dart', 'library too;');
-    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addPackageFile('foo', 'foo.dart', 'library foo;');
+    addPackageFile('foo', 'baz/too.dart', 'library too;');
+    addPackageFile('bar', 'bar.dart', 'library bar;');
     addTestSource('import "p^" import');
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
@@ -310,9 +310,9 @@
   }
 
   test_import_package2() async {
-    addPackageSource('foo', 'foo.dart', 'library foo;');
-    addPackageSource('foo', 'baz/too.dart', 'library too;');
-    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addPackageFile('foo', 'foo.dart', 'library foo;');
+    addPackageFile('foo', 'baz/too.dart', 'library too;');
+    addPackageFile('bar', 'bar.dart', 'library bar;');
     addTestSource('import "package:foo/baz/^" import');
     await computeSuggestions();
     assertSuggest('package:foo/baz/too.dart',
@@ -322,9 +322,9 @@
   test_import_package2_off() async {
     try {
       UriContributor.suggestFilePaths = false;
-      addPackageSource('foo', 'foo.dart', 'library foo;');
-      addPackageSource('foo', 'baz/too.dart', 'library too;');
-      addPackageSource('bar', 'bar.dart', 'library bar;');
+      addPackageFile('foo', 'foo.dart', 'library foo;');
+      addPackageFile('foo', 'baz/too.dart', 'library too;');
+      addPackageFile('bar', 'bar.dart', 'library bar;');
       addTestSource('import "package:foo/baz/^" import');
       await computeSuggestions();
       assertNotSuggested('package:foo/baz/too.dart');
@@ -334,9 +334,9 @@
   }
 
   test_import_package2_raw() async {
-    addPackageSource('foo', 'foo.dart', 'library foo;');
-    addPackageSource('foo', 'baz/too.dart', 'library too;');
-    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addPackageFile('foo', 'foo.dart', 'library foo;');
+    addPackageFile('foo', 'baz/too.dart', 'library too;');
+    addPackageFile('bar', 'bar.dart', 'library bar;');
     addTestSource('import r"package:foo/baz/^" import');
     await computeSuggestions();
     assertSuggest('package:foo/baz/too.dart',
@@ -344,9 +344,9 @@
   }
 
   test_import_package2_with_trailing() async {
-    addPackageSource('foo', 'foo.dart', 'library foo;');
-    addPackageSource('foo', 'baz/too.dart', 'library too;');
-    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addPackageFile('foo', 'foo.dart', 'library foo;');
+    addPackageFile('foo', 'baz/too.dart', 'library too;');
+    addPackageFile('bar', 'bar.dart', 'library bar;');
     addTestSource('import "package:foo/baz/^.dart" import');
     await computeSuggestions();
     assertSuggest('package:foo/baz/too.dart',
@@ -356,8 +356,8 @@
   }
 
   test_import_package_missing_lib() async {
-    var pkgSrc = addPackageSource('bar', 'bar.dart', 'library bar;');
-    deleteFolder(dirname(pkgSrc.fullName));
+    var pkgFile = addPackageFile('bar', 'bar.dart', 'library bar;');
+    deleteFolder(pkgFile.parent.path);
     addTestSource('import "p^" class');
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
@@ -368,9 +368,9 @@
   }
 
   test_import_package_raw() async {
-    addPackageSource('foo', 'foo.dart', 'library foo;');
-    addPackageSource('foo', 'baz/too.dart', 'library too;');
-    addPackageSource('bar', 'bar.dart', 'library bar;');
+    addPackageFile('foo', 'foo.dart', 'library foo;');
+    addPackageFile('foo', 'baz/too.dart', 'library too;');
+    addPackageFile('bar', 'bar.dart', 'library bar;');
     addTestSource('import r"p^" import');
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
@@ -460,7 +460,7 @@
   }
 
   test_part_file() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -477,7 +477,7 @@
   }
 
   test_part_file2() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -494,7 +494,7 @@
   }
 
   test_part_file_child() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -511,7 +511,7 @@
   }
 
   test_part_file_parent() async {
-    testFile = '/proj/completion.dart';
+    testFile = convertPath('/proj/completion.dart');
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
     addSource('/blat.dart', 'library blat;');
@@ -541,7 +541,7 @@
   }
 
   test_import_file() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -558,7 +558,7 @@
   }
 
   test_import_file2() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -575,7 +575,7 @@
   }
 
   test_import_file_child() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -592,7 +592,7 @@
   }
 
   test_import_file_parent() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -609,7 +609,7 @@
   }
 
   test_import_file_parent2() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -626,7 +626,7 @@
   }
 
   test_part_file() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -643,7 +643,7 @@
   }
 
   test_part_file2() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -660,7 +660,7 @@
   }
 
   test_part_file_child() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
@@ -677,7 +677,7 @@
   }
 
   test_part_file_parent() async {
-    testFile = '\\proj\\completion.dart';
+    testFile = convertPath('\\proj\\completion.dart');
     addSource('\\proj\\other.dart', 'library other;');
     addSource('\\proj\\foo\\bar.dart', 'library bar;');
     addSource('\\blat.dart', 'library blat;');
diff --git a/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart b/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
index e72c2e8..1fa242e 100644
--- a/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
+++ b/pkg/analysis_server/test/services/completion/postfix/postfix_completion_test.dart
@@ -79,15 +79,7 @@
     verifyNoTestUnitErrors = false;
     await resolveTestUnit(code);
 
-    PostfixCompletionContext context = new PostfixCompletionContext(
-        testFile,
-        testAnalysisResult.lineInfo,
-        offset,
-        key,
-        testAnalysisResult.driver,
-        testUnit,
-        testUnitElement,
-        testAnalysisResult.errors);
+    var context = new PostfixCompletionContext(testAnalysisResult, offset, key);
     processor = new PostfixCompletionProcessor(context);
   }
 }
diff --git a/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart b/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart
index 9ef3195..3fb9792 100644
--- a/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart
+++ b/pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart
@@ -4,7 +4,7 @@
 
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/services/completion/statement/statement_completion.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -63,14 +63,8 @@
 
   _computeCompletion(int offset) async {
     driver.changeFile(testFile);
-    AnalysisResult result = await driver.getResult(testFile);
-    StatementCompletionContext context = new StatementCompletionContext(
-        testFile,
-        result.lineInfo,
-        offset,
-        testUnit,
-        testUnitElement,
-        result.errors);
+    ResolvedUnitResult result = await session.getResolvedUnit(testFile);
+    var context = new StatementCompletionContext(result, offset);
     StatementCompletionProcessor processor =
         new StatementCompletionProcessor(context);
     StatementCompletion completion = await processor.compute();
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
deleted file mode 100644
index b9e542f..0000000
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ /dev/null
@@ -1,6875 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
-import 'package:analysis_server/plugin/edit/assist/assist_dart.dart';
-import 'package:analysis_server/src/services/correction/assist.dart';
-import 'package:analysis_server/src/services/correction/assist_internal.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer_plugin/utilities/assist/assist.dart';
-import 'package:plugin/manager.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../abstract_single_unit.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(AssistProcessorTest);
-  });
-}
-
-@reflectiveTest
-class AssistProcessorTest extends AbstractSingleUnitTest {
-  int offset;
-  int length;
-
-  Assist assist;
-  SourceChange change;
-  String resultCode;
-  LinkedEditGroup linkedPositionGroup;
-
-  bool get omitNew => true;
-
-  /**
-   * Asserts that there is an [Assist] of the given [kind] at [offset] which
-   * produces the [expected] code when applied to [testCode].
-   */
-  assertHasAssist(AssistKind kind, String expected) async {
-    assist = await _assertHasAssist(kind);
-    change = assist.change;
-    expect(change.id, kind.id);
-    // apply to "file"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    resultCode = SourceEdit.applySequence(testCode, change.edits[0].edits);
-    // verify
-    expect(resultCode, expected);
-  }
-
-  /**
-   * Calls [assertHasAssist] at the offset of [offsetSearch] in [testCode].
-   */
-  assertHasAssistAt(
-      String offsetSearch, AssistKind kind, String expected) async {
-    offset = findOffset(offsetSearch);
-    await assertHasAssist(kind, expected);
-  }
-
-  /**
-   * Asserts that there is no [Assist] of the given [kind] at [offset].
-   */
-  assertNoAssist(AssistKind kind) async {
-    List<Assist> assists = await _computeAssists();
-    for (Assist assist in assists) {
-      if (assist.kind == kind) {
-        fail('Unexpected assist $kind in\n${assists.join('\n')}');
-      }
-    }
-  }
-
-  /**
-   * Calls [assertNoAssist] at the offset of [offsetSearch] in [testCode].
-   */
-  assertNoAssistAt(String offsetSearch, AssistKind kind) async {
-    offset = findOffset(offsetSearch);
-    await assertNoAssist(kind);
-  }
-
-  List<LinkedEditSuggestion> expectedSuggestions(
-      LinkedEditSuggestionKind kind, List<String> values) {
-    return values.map((value) {
-      return new LinkedEditSuggestion(value, kind);
-    }).toList();
-  }
-
-  void processRequiredPlugins() {
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(AnalysisEngine.instance.requiredPlugins);
-  }
-
-  void setUp() {
-    super.setUp();
-    offset = 0;
-    length = 0;
-  }
-
-  test_addTypeAnnotation_BAD_privateType_closureParameter() async {
-    addSource('/project/my_lib.dart', '''
-library my_lib;
-class A {}
-class _B extends A {}
-foo(f(_B p)) {}
-''');
-    await resolveTestUnit('''
-import 'my_lib.dart';
-main() {
-  foo((test) {});
-}
- ''');
-    await assertNoAssistAt('test)', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_BAD_privateType_declaredIdentifier() async {
-    addSource('/project/my_lib.dart', '''
-library my_lib;
-class A {}
-class _B extends A {}
-List<_B> getValues() => [];
-''');
-    await resolveTestUnit('''
-import 'my_lib.dart';
-class A<T> {
-  main() {
-    for (var item in getValues()) {
-    }
-  }
-}
-''');
-    await assertNoAssistAt('var item', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_BAD_privateType_list() async {
-    // This is now failing because we're suggesting "List" rather than nothing.
-    // Is it really better to produce nothing?
-    addSource('/project/my_lib.dart', '''
-library my_lib;
-class A {}
-class _B extends A {}
-List<_B> getValues() => [];
-''');
-    await resolveTestUnit('''
-import 'my_lib.dart';
-main() {
-  var v = getValues();
-}
-''');
-    await assertHasAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-import 'my_lib.dart';
-main() {
-  List v = getValues();
-}
-''');
-  }
-
-  test_addTypeAnnotation_BAD_privateType_variable() async {
-    addSource('/project/my_lib.dart', '''
-library my_lib;
-class A {}
-class _B extends A {}
-_B getValue() => new _B();
-''');
-    await resolveTestUnit('''
-import 'my_lib.dart';
-main() {
-  var v = getValue();
-}
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_classField_OK_final() async {
-    await resolveTestUnit('''
-class A {
-  final f = 0;
-}
-''');
-    await assertHasAssistAt('final ', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-class A {
-  final int f = 0;
-}
-''');
-  }
-
-  test_addTypeAnnotation_classField_OK_int() async {
-    await resolveTestUnit('''
-class A {
-  var f = 0;
-}
-''');
-    await await assertHasAssistAt(
-        'var ', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-class A {
-  int f = 0;
-}
-''');
-  }
-
-  test_addTypeAnnotation_declaredIdentifier_BAD_hasTypeAnnotation() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) {
-  }
-}
-''');
-    await assertNoAssistAt('item in', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_declaredIdentifier_BAD_inForEachBody() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (var item in items) {
-    42;
-  }
-}
-''');
-    await assertNoAssistAt('42;', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_declaredIdentifier_BAD_unknownType() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-main() {
-  for (var item in unknownList) {
-  }
-}
-''');
-    await assertNoAssistAt('item in', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_declaredIdentifier_generic_OK() async {
-    await resolveTestUnit('''
-class A<T> {
-  main(List<List<T>> items) {
-    for (var item in items) {
-    }
-  }
-}
-''');
-    await assertHasAssistAt('item in', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-class A<T> {
-  main(List<List<T>> items) {
-    for (List<T> item in items) {
-    }
-  }
-}
-''');
-  }
-
-  test_addTypeAnnotation_declaredIdentifier_OK() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (var item in items) {
-  }
-}
-''');
-    // on identifier
-    await assertHasAssistAt('item in', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main(List<String> items) {
-  for (String item in items) {
-  }
-}
-''');
-    // on "for"
-    await assertHasAssistAt('for (', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main(List<String> items) {
-  for (String item in items) {
-  }
-}
-''');
-  }
-
-  test_addTypeAnnotation_declaredIdentifier_OK_addImport_dartUri() async {
-    addSource('/project/my_lib.dart', r'''
-import 'dart:async';
-List<Future<int>> getFutures() => null;
-''');
-    await resolveTestUnit('''
-import 'my_lib.dart';
-main() {
-  for (var future in getFutures()) {
-  }
-}
-''');
-    await assertHasAssistAt('future in', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-import 'dart:async';
-
-import 'my_lib.dart';
-main() {
-  for (Future<int> future in getFutures()) {
-  }
-}
-''');
-  }
-
-  test_addTypeAnnotation_declaredIdentifier_OK_final() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (final item in items) {
-  }
-}
-''');
-    await assertHasAssistAt('item in', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main(List<String> items) {
-  for (final String item in items) {
-  }
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_BAD_bottom() async {
-    await resolveTestUnit('''
-main() {
-  var v = throw 42;
-}
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_local_BAD_hasTypeAnnotation() async {
-    await resolveTestUnit('''
-main() {
-  int v = 42;
-}
-''');
-    await assertNoAssistAt(' = 42', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_local_BAD_multiple() async {
-    await resolveTestUnit('''
-main() {
-  var a = 1, b = '';
-}
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_local_BAD_noValue() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-main() {
-  var v;
-}
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_local_BAD_null() async {
-    await resolveTestUnit('''
-main() {
-  var v = null;
-}
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_local_BAD_onInitializer() async {
-    await resolveTestUnit('''
-main() {
-  var abc = 0;
-}
-''');
-    await assertNoAssistAt('0;', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_local_BAD_unknown() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-main() {
-  var v = unknownVar;
-}
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_local_generic_OK_literal() async {
-    await resolveTestUnit('''
-class A {
-  main(List<int> items) {
-    var v = items;
-  }
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-class A {
-  main(List<int> items) {
-    List<int> v = items;
-  }
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_generic_OK_local() async {
-    await resolveTestUnit('''
-class A<T> {
-  main(List<T> items) {
-    var v = items;
-  }
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-class A<T> {
-  main(List<T> items) {
-    List<T> v = items;
-  }
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_addImport_dartUri() async {
-    addSource('/project/my_lib.dart', r'''
-import 'dart:async';
-Future<int> getFutureInt() => null;
-''');
-    await resolveTestUnit('''
-import 'my_lib.dart';
-main() {
-  var v = getFutureInt();
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-import 'dart:async';
-
-import 'my_lib.dart';
-main() {
-  Future<int> v = getFutureInt();
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_addImport_notLibraryUnit() async {
-    // prepare library
-    addSource('/project/my_lib.dart', r'''
-import 'dart:async';
-Future<int> getFutureInt() => null;
-''');
-    // prepare code
-    String appCode = r'''
-library my_app;
-import 'my_lib.dart';
-part 'test.dart';
-''';
-    testCode = r'''
-part of my_app;
-main() {
-  var v = getFutureInt();
-}
-''';
-    // add sources
-    addSource('/project/app.dart', appCode);
-    testSource = addSource('/project/test.dart', testCode);
-    // resolve
-    await resolveTestUnit(testCode);
-    // prepare the assist
-    offset = findOffset('v = ');
-    assist = await _assertHasAssist(DartAssistKind.ADD_TYPE_ANNOTATION);
-    change = assist.change;
-    // verify
-    {
-      var testFileEdit = change.getFileEdit(convertPath('/project/app.dart'));
-      var resultCode = SourceEdit.applySequence(appCode, testFileEdit.edits);
-      expect(resultCode, '''
-library my_app;
-import 'dart:async';
-
-import 'my_lib.dart';
-part 'test.dart';
-''');
-    }
-    {
-      var testFileEdit = change.getFileEdit(convertPath('/project/test.dart'));
-      var resultCode = SourceEdit.applySequence(testCode, testFileEdit.edits);
-      expect(resultCode, '''
-part of my_app;
-main() {
-  Future<int> v = getFutureInt();
-}
-''');
-    }
-  }
-
-  test_addTypeAnnotation_local_OK_addImport_relUri() async {
-    addSource('/project/aa/bbb/lib_a.dart', r'''
-class MyClass {}
-''');
-    addSource('/project/ccc/lib_b.dart', r'''
-import '../aa/bbb/lib_a.dart';
-MyClass newMyClass() => null;
-''');
-    await resolveTestUnit('''
-import 'ccc/lib_b.dart';
-main() {
-  var v = newMyClass();
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-import 'aa/bbb/lib_a.dart';
-import 'ccc/lib_b.dart';
-main() {
-  MyClass v = newMyClass();
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_Function() async {
-    await resolveTestUnit('''
-main() {
-  var v = () => 1;
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main() {
-  int Function() v = () => 1;
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_int() async {
-    await resolveTestUnit('''
-main() {
-  var v = 0;
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main() {
-  int v = 0;
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_List() async {
-    await resolveTestUnit('''
-main() {
-  var v = <String>[];
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main() {
-  List<String> v = <String>[];
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_localType() async {
-    await resolveTestUnit('''
-class C {}
-C f() => null;
-main() {
-  var x = f();
-}
-''');
-    await assertHasAssistAt('x =', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-class C {}
-C f() => null;
-main() {
-  C x = f();
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_onName() async {
-    await resolveTestUnit('''
-main() {
-  var abc = 0;
-}
-''');
-    await assertHasAssistAt('bc', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main() {
-  int abc = 0;
-}
-''');
-  }
-
-  test_addTypeAnnotation_local_OK_onVar() async {
-    await resolveTestUnit('''
-main() {
-  var v = 0;
-}
-''');
-    await assertHasAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-main() {
-  int v = 0;
-}
-''');
-  }
-
-  test_addTypeAnnotation_OK_privateType_sameLibrary() async {
-    await resolveTestUnit('''
-class _A {}
-_A getValue() => new _A();
-main() {
-  var v = getValue();
-}
-''');
-    await assertHasAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-class _A {}
-_A getValue() => new _A();
-main() {
-  _A v = getValue();
-}
-''');
-  }
-
-  test_addTypeAnnotation_parameter_BAD_hasExplicitType() async {
-    await resolveTestUnit('''
-foo(f(int p)) {}
-main() {
-  foo((num test) {});
-}
-''');
-    await assertNoAssistAt('test', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_parameter_BAD_noPropagatedType() async {
-    await resolveTestUnit('''
-foo(f(p)) {}
-main() {
-  foo((test) {});
-}
-''');
-    await assertNoAssistAt('test', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_parameter_OK() async {
-    await resolveTestUnit('''
-foo(f(int p)) {}
-main() {
-  foo((test) {});
-}
-''');
-    await assertHasAssistAt('test', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-foo(f(int p)) {}
-main() {
-  foo((int test) {});
-}
-''');
-  }
-
-  test_addTypeAnnotation_topLevelField_BAD_multiple() async {
-    await resolveTestUnit('''
-var A = 1, V = '';
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_topLevelField_BAD_noValue() async {
-    await resolveTestUnit('''
-var V;
-''');
-    await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
-  }
-
-  test_addTypeAnnotation_topLevelField_OK_int() async {
-    await resolveTestUnit('''
-var V = 0;
-''');
-    await assertHasAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION, '''
-int V = 0;
-''');
-  }
-
-  test_assignToLocalVariable() async {
-    await resolveTestUnit('''
-main() {
-  List<int> bytes;
-  readBytes();
-}
-List<int> readBytes() => <int>[];
-''');
-    await assertHasAssistAt(
-        'readBytes();', DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE, '''
-main() {
-  List<int> bytes;
-  var readBytes = readBytes();
-}
-List<int> readBytes() => <int>[];
-''');
-    _assertLinkedGroup(
-        change.linkedEditGroups[0],
-        ['readBytes = '],
-        expectedSuggestions(LinkedEditSuggestionKind.VARIABLE,
-            ['list', 'bytes2', 'readBytes']));
-  }
-
-  test_assignToLocalVariable_alreadyAssignment() async {
-    await resolveTestUnit('''
-main() {
-  var vvv;
-  vvv = 42;
-}
-''');
-    await assertNoAssistAt('vvv =', DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE);
-  }
-
-  test_assignToLocalVariable_inClosure() async {
-    await resolveTestUnit(r'''
-main() {
-  print(() {
-    12345;
-  });
-}
-''');
-    await assertHasAssistAt('345', DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE, '''
-main() {
-  print(() {
-    var i = 12345;
-  });
-}
-''');
-  }
-
-  test_assignToLocalVariable_invocationArgument() async {
-    await resolveTestUnit(r'''
-main() {
-  f(12345);
-}
-void f(p) {}
-''');
-    await assertNoAssistAt('345', DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE);
-  }
-
-  test_assignToLocalVariable_throw() async {
-    await resolveTestUnit('''
-main() {
-  throw 42;
-}
-''');
-    await assertNoAssistAt('throw ', DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE);
-  }
-
-  test_assignToLocalVariable_void() async {
-    await resolveTestUnit('''
-main() {
-  f();
-}
-void f() {}
-''');
-    await assertNoAssistAt('f();', DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE);
-  }
-
-  test_convertClassToMixin_abstract() async {
-    await resolveTestUnit('''
-abstract class A {}
-''');
-    await assertHasAssistAt('A', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-mixin A {}
-''');
-  }
-
-  test_convertClassToMixin_extends_noSuper() async {
-    await resolveTestUnit('''
-class A {}
-class B extends A {}
-''');
-    await assertHasAssistAt('B', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {}
-mixin B implements A {}
-''');
-  }
-
-  test_convertClassToMixin_extends_super() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B extends A {
-  b() {
-    super.a();
-  }
-}
-''');
-    await assertHasAssistAt('B', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-mixin B on A {
-  b() {
-    super.a();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extends_superSuper() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B extends A {}
-class C extends B {
-  c() {
-    super.a();
-  }
-}
-''');
-    await assertHasAssistAt('C', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B extends A {}
-mixin C on B {
-  c() {
-    super.a();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extendsImplements_noSuper() async {
-    await resolveTestUnit('''
-class A {}
-class B {}
-class C extends A implements B {}
-''');
-    await assertHasAssistAt('C', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {}
-class B {}
-mixin C implements A, B {}
-''');
-  }
-
-  test_convertClassToMixin_extendsImplements_super_extends() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B {}
-class C extends A implements B {
-  c() {
-    super.a();
-  }
-}
-''');
-    await assertHasAssistAt('C', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B {}
-mixin C on A implements B {
-  c() {
-    super.a();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extendsWith_noSuper() async {
-    await resolveTestUnit('''
-class A {}
-class B {}
-class C extends A with B {}
-''');
-    await assertHasAssistAt('C', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {}
-class B {}
-mixin C implements A, B {}
-''');
-  }
-
-  test_convertClassToMixin_extendsWith_super_both() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C extends A with B {
-  c() {
-    super.a();
-    super.b();
-  }
-}
-''');
-    await assertHasAssistAt('C', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-mixin C on A, B {
-  c() {
-    super.a();
-    super.b();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extendsWith_super_extends() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C extends A with B {
-  c() {
-    super.a();
-  }
-}
-''');
-    await assertHasAssistAt('C', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-mixin C on A implements B {
-  c() {
-    super.a();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extendsWith_super_with() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C extends A with B {
-  c() {
-    super.b();
-  }
-}
-''');
-    await assertHasAssistAt('C', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-mixin C on B implements A {
-  c() {
-    super.b();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extendsWithImplements_noSuper() async {
-    await resolveTestUnit('''
-class A {}
-class B {}
-class C {}
-class D extends A with B implements C {}
-''');
-    await assertHasAssistAt('D', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {}
-class B {}
-class C {}
-mixin D implements A, B, C {}
-''');
-  }
-
-  test_convertClassToMixin_extendsWithImplements_super_both() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C {}
-class D extends A with B implements C {
-  d() {
-    super.a();
-    super.b();
-  }
-}
-''');
-    await assertHasAssistAt('D', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C {}
-mixin D on A, B implements C {
-  d() {
-    super.a();
-    super.b();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extendsWithImplements_super_extends() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C {}
-class D extends A with B implements C {
-  d() {
-    super.a();
-  }
-}
-''');
-    await assertHasAssistAt('D', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C {}
-mixin D on A implements B, C {
-  d() {
-    super.a();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_extendsWithImplements_super_with() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C {}
-class D extends A with B implements C {
-  d() {
-    super.b();
-  }
-}
-''');
-    await assertHasAssistAt('D', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-class B {
-  b() {}
-}
-class C {}
-mixin D on B implements A, C {
-  d() {
-    super.b();
-  }
-}
-''');
-  }
-
-  test_convertClassToMixin_implements() async {
-    await resolveTestUnit('''
-class A {}
-class B implements A {}
-''');
-    await assertHasAssistAt('B', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {}
-mixin B implements A {}
-''');
-  }
-
-  test_convertClassToMixin_noClauses_invalidSelection() async {
-    await resolveTestUnit('''
-class A {}
-''');
-    await assertNoAssistAt(
-      '{}',
-      DartAssistKind.CONVERT_CLASS_TO_MIXIN,
-    );
-  }
-
-  test_convertClassToMixin_noClauses_selectKeyword() async {
-    await resolveTestUnit('''
-class A {}
-''');
-    await assertHasAssistAt('class', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-mixin A {}
-''');
-  }
-
-  test_convertClassToMixin_noClauses_selectName() async {
-    await resolveTestUnit('''
-class A {}
-''');
-    await assertHasAssistAt('A', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-mixin A {}
-''');
-  }
-
-  test_convertClassToMixin_with_noSuper() async {
-    await resolveTestUnit('''
-class A {}
-class B with A {}
-''');
-    await assertHasAssistAt('B', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {}
-mixin B implements A {}
-''');
-  }
-
-  test_convertClassToMixin_with_super() async {
-    await resolveTestUnit('''
-class A {
-  a() {}
-}
-class B with A {
-  b() {
-    super.a();
-  }
-}
-''');
-    await assertHasAssistAt('B', DartAssistKind.CONVERT_CLASS_TO_MIXIN, '''
-class A {
-  a() {}
-}
-mixin B on A {
-  b() {
-    super.a();
-  }
-}
-''');
-  }
-
-  test_convertDocumentationIntoBlock_BAD_alreadyBlock() async {
-    await resolveTestUnit('''
-/**
- * AAAAAAA
- */
-class A {}
-''');
-    await assertNoAssistAt(
-        'AAA', DartAssistKind.CONVERT_DOCUMENTATION_INTO_BLOCK);
-  }
-
-  test_convertDocumentationIntoBlock_BAD_notDocumentation() async {
-    await resolveTestUnit('''
-// AAAA
-class A {}
-''');
-    await assertNoAssistAt(
-        'AAA', DartAssistKind.CONVERT_DOCUMENTATION_INTO_BLOCK);
-  }
-
-  test_convertDocumentationIntoBlock_OK_noSpaceBeforeText() async {
-    await resolveTestUnit('''
-class A {
-  /// AAAAA
-  ///BBBBB
-  ///
-  /// CCCCC
-  mmm() {}
-}
-''');
-    await assertHasAssistAt(
-        'AAAAA', DartAssistKind.CONVERT_DOCUMENTATION_INTO_BLOCK, '''
-class A {
-  /**
-   * AAAAA
-   *BBBBB
-   *
-   * CCCCC
-   */
-  mmm() {}
-}
-''');
-  }
-
-  test_convertDocumentationIntoBlock_OK_onReference() async {
-    await resolveTestUnit('''
-/// AAAAAAA [int] AAAAAAA
-class A {}
-''');
-    await assertHasAssistAt(
-        'nt]', DartAssistKind.CONVERT_DOCUMENTATION_INTO_BLOCK, '''
-/**
- * AAAAAAA [int] AAAAAAA
- */
-class A {}
-''');
-  }
-
-  test_convertDocumentationIntoBlock_OK_onText() async {
-    await resolveTestUnit('''
-class A {
-  /// AAAAAAA [int] AAAAAAA
-  /// BBBBBBBB BBBB BBBB
-  /// CCC [A] CCCCCCCCCCC
-  mmm() {}
-}
-''');
-    await assertHasAssistAt(
-        'AAA [', DartAssistKind.CONVERT_DOCUMENTATION_INTO_BLOCK, '''
-class A {
-  /**
-   * AAAAAAA [int] AAAAAAA
-   * BBBBBBBB BBBB BBBB
-   * CCC [A] CCCCCCCCCCC
-   */
-  mmm() {}
-}
-''');
-  }
-
-  test_convertDocumentationIntoLine_BAD_alreadyLine() async {
-    await resolveTestUnit('''
-/// AAAAAAA
-class A {}
-''');
-    await assertNoAssistAt(
-        'AAA', DartAssistKind.CONVERT_DOCUMENTATION_INTO_LINE);
-  }
-
-  test_convertDocumentationIntoLine_BAD_notDocumentation() async {
-    await resolveTestUnit('''
-/* AAAA */
-class A {}
-''');
-    await assertNoAssistAt(
-        'AAA', DartAssistKind.CONVERT_DOCUMENTATION_INTO_LINE);
-  }
-
-  test_convertDocumentationIntoLine_OK_onReference() async {
-    await resolveTestUnit('''
-/**
- * AAAAAAA [int] AAAAAAA
- */
-class A {}
-''');
-    await assertHasAssistAt(
-        'nt]', DartAssistKind.CONVERT_DOCUMENTATION_INTO_LINE, '''
-/// AAAAAAA [int] AAAAAAA
-class A {}
-''');
-  }
-
-  test_convertDocumentationIntoLine_OK_onText() async {
-    await resolveTestUnit('''
-class A {
-  /**
-   * AAAAAAA [int] AAAAAAA
-   * BBBBBBBB BBBB BBBB
-   * CCC [A] CCCCCCCCCCC
-   */
-  mmm() {}
-}
-''');
-    await assertHasAssistAt(
-        'AAA [', DartAssistKind.CONVERT_DOCUMENTATION_INTO_LINE, '''
-class A {
-  /// AAAAAAA [int] AAAAAAA
-  /// BBBBBBBB BBBB BBBB
-  /// CCC [A] CCCCCCCCCCC
-  mmm() {}
-}
-''');
-  }
-
-  test_convertDocumentationIntoLine_OK_onText_hasFirstLine() async {
-    await resolveTestUnit('''
-class A {
-  /** AAAAAAA [int] AAAAAAA
-   * BBBBBBBB BBBB BBBB
-   * CCC [A] CCCCCCCCCCC
-   */
-  mmm() {}
-}
-''');
-    await assertHasAssistAt(
-        'AAA [', DartAssistKind.CONVERT_DOCUMENTATION_INTO_LINE, '''
-class A {
-  /// AAAAAAA [int] AAAAAAA
-  /// BBBBBBBB BBBB BBBB
-  /// CCC [A] CCCCCCCCCCC
-  mmm() {}
-}
-''');
-  }
-
-  test_convertPartOfToUri_file_nonSibling() async {
-    addSource('/pkg/lib/foo.dart', '''
-library foo;
-part 'src/bar.dart';
-''');
-    testFile = resourceProvider.convertPath('/pkg/lib/src/bar.dart');
-    await resolveTestUnit('''
-part of foo;
-''');
-    await assertHasAssistAt('foo', DartAssistKind.CONVERT_PART_OF_TO_URI, '''
-part of '../foo.dart';
-''');
-  }
-
-  test_convertPartOfToUri_file_sibling() async {
-    addSource('/pkg/foo.dart', '''
-library foo;
-part 'bar.dart';
-''');
-    testFile = resourceProvider.convertPath('/pkg/bar.dart');
-    await resolveTestUnit('''
-part of foo;
-''');
-    await assertHasAssistAt('foo', DartAssistKind.CONVERT_PART_OF_TO_URI, '''
-part of 'foo.dart';
-''');
-  }
-
-  test_convertToAsyncBody_BAD_async() async {
-    await resolveTestUnit('''
-import 'dart:async';
-Future<String> f() async => '';
-''');
-    await assertNoAssistAt('=>', DartAssistKind.CONVERT_INTO_ASYNC_BODY);
-  }
-
-  test_convertToAsyncBody_BAD_asyncStar() async {
-    await resolveTestUnit('''
-import 'dart:async';
-Stream<String> f() async* {}
-''');
-    await assertNoAssistAt('{}', DartAssistKind.CONVERT_INTO_ASYNC_BODY);
-  }
-
-  test_convertToAsyncBody_BAD_constructor() async {
-    await resolveTestUnit('''
-class C {
-  C() {}
-}
-''');
-    await assertNoAssistAt('{}', DartAssistKind.CONVERT_INTO_ASYNC_BODY);
-  }
-
-  test_convertToAsyncBody_BAD_inBody_block() async {
-    await resolveTestUnit('''
-class C {
-  void foo() {
-    print(42);
-  }
-}
-''');
-    await assertNoAssistAt('print', DartAssistKind.CONVERT_INTO_ASYNC_BODY);
-  }
-
-  test_convertToAsyncBody_BAD_inBody_expression() async {
-    await resolveTestUnit('''
-class C {
-  void foo() => print(42);
-}
-''');
-    await assertNoAssistAt('print', DartAssistKind.CONVERT_INTO_ASYNC_BODY);
-  }
-
-  test_convertToAsyncBody_BAD_syncStar() async {
-    await resolveTestUnit('''
-Iterable<String> f() sync* {}
-''');
-    await assertNoAssistAt('{}', DartAssistKind.CONVERT_INTO_ASYNC_BODY);
-  }
-
-  test_convertToAsyncBody_OK_closure() async {
-    await resolveTestUnit('''
-main() {
-  f(() => 123);
-}
-f(g) {}
-''');
-    await assertHasAssistAt('=>', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
-main() {
-  f(() async => 123);
-}
-f(g) {}
-''');
-  }
-
-  test_convertToAsyncBody_OK_function() async {
-    // TODO(brianwilkerson) Remove the "class C {}" when the bug in the builder
-    // is fixed that causes the import to be incorrectly inserted when the first
-    // character in the file is also being modified.
-    await resolveTestUnit('''
-class C {}
-String f() => '';
-''');
-    await assertHasAssistAt('=>', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
-import 'dart:async';
-
-class C {}
-Future<String> f() async => '';
-''');
-  }
-
-  test_convertToAsyncBody_OK_getter_expression_noSpace() async {
-    await resolveTestUnit('''
-class C {
-  int get g=>0;
-}
-''');
-    await assertHasAssistAt('get g', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
-import 'dart:async';
-
-class C {
-  Future<int> get g async =>0;
-}
-''');
-  }
-
-  test_convertToAsyncBody_OK_method() async {
-    await resolveTestUnit('''
-class C {
-  int m() { return 0; }
-}
-''');
-    await assertHasAssistAt(
-        '{ return', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
-import 'dart:async';
-
-class C {
-  Future<int> m() async { return 0; }
-}
-''');
-  }
-
-  test_convertToAsyncBody_OK_method_abstract() async {
-    await resolveTestUnit('''
-abstract class C {
-  int m();
-}
-''');
-    await assertHasAssistAt('m()', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
-import 'dart:async';
-
-abstract class C {
-  Future<int> m();
-}
-''');
-  }
-
-  test_convertToAsyncBody_OK_method_noReturnType() async {
-    await resolveTestUnit('''
-class C {
-  m() { return 0; }
-}
-''');
-    await assertHasAssistAt(
-        '{ return', DartAssistKind.CONVERT_INTO_ASYNC_BODY, '''
-class C {
-  m() async { return 0; }
-}
-''');
-  }
-
-  test_convertToBlockBody_BAD_inExpression() async {
-    await resolveTestUnit('''
-main() => 123;
-''');
-    await assertNoAssistAt('123;', DartAssistKind.CONVERT_INTO_BLOCK_BODY);
-  }
-
-  test_convertToBlockBody_BAD_noEnclosingFunction() async {
-    await resolveTestUnit('''
-var v = 123;
-''');
-    await assertNoAssistAt('v =', DartAssistKind.CONVERT_INTO_BLOCK_BODY);
-  }
-
-  test_convertToBlockBody_BAD_notExpressionBlock() async {
-    await resolveTestUnit('''
-fff() {
-  return 123;
-}
-''');
-    await assertNoAssistAt('fff() {', DartAssistKind.CONVERT_INTO_BLOCK_BODY);
-  }
-
-  test_convertToBlockBody_OK_async() async {
-    await resolveTestUnit('''
-class A {
-  mmm() async => 123;
-}
-''');
-    await assertHasAssistAt('mmm()', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-class A {
-  mmm() async {
-    return 123;
-  }
-}
-''');
-  }
-
-  test_convertToBlockBody_OK_closure() async {
-    await resolveTestUnit('''
-setup(x) {}
-main() {
-  setup(() => 42);
-}
-''');
-    await assertHasAssistAt(
-        '() => 42', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-setup(x) {}
-main() {
-  setup(() {
-    return 42;
-  });
-}
-''');
-    {
-      Position exitPos = change.selection;
-      expect(exitPos, isNotNull);
-      expect(exitPos.file, testFile);
-      expect(exitPos.offset - 3, resultCode.indexOf('42;'));
-    }
-  }
-
-  test_convertToBlockBody_OK_closure_voidExpression() async {
-    await resolveTestUnit('''
-setup(x) {}
-main() {
-  setup(() => print('done'));
-}
-''');
-    await assertHasAssistAt(
-        '() => print', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-setup(x) {}
-main() {
-  setup(() {
-    print('done');
-  });
-}
-''');
-    {
-      Position exitPos = change.selection;
-      expect(exitPos, isNotNull);
-      expect(exitPos.file, testFile);
-      expect(exitPos.offset - 3, resultCode.indexOf("');"));
-    }
-  }
-
-  test_convertToBlockBody_OK_constructor() async {
-    await resolveTestUnit('''
-class A {
-  factory A() => null;
-}
-''');
-    await assertHasAssistAt('A()', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-class A {
-  factory A() {
-    return null;
-  }
-}
-''');
-  }
-
-  test_convertToBlockBody_OK_method() async {
-    await resolveTestUnit('''
-class A {
-  mmm() => 123;
-}
-''');
-    await assertHasAssistAt('mmm()', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-class A {
-  mmm() {
-    return 123;
-  }
-}
-''');
-  }
-
-  test_convertToBlockBody_OK_onArrow() async {
-    await resolveTestUnit('''
-fff() => 123;
-''');
-    await assertHasAssistAt('=>', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-fff() {
-  return 123;
-}
-''');
-  }
-
-  test_convertToBlockBody_OK_onName() async {
-    await resolveTestUnit('''
-fff() => 123;
-''');
-    await assertHasAssistAt('fff()', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-fff() {
-  return 123;
-}
-''');
-  }
-
-  test_convertToBlockBody_OK_throw() async {
-    await resolveTestUnit('''
-class A {
-  mmm() => throw 'error';
-}
-''');
-    await assertHasAssistAt('mmm()', DartAssistKind.CONVERT_INTO_BLOCK_BODY, '''
-class A {
-  mmm() {
-    throw 'error';
-  }
-}
-''');
-  }
-
-  test_convertToDoubleQuotedString_BAD_one_embeddedTarget() async {
-    await resolveTestUnit('''
-main() {
-  print('a"b"c');
-}
-''');
-    await assertNoAssistAt(
-        "'a", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING);
-  }
-
-  test_convertToDoubleQuotedString_BAD_one_enclosingTarget() async {
-    await resolveTestUnit('''
-main() {
-  print("abc");
-}
-''');
-    await assertNoAssistAt(
-        '"ab', DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING);
-  }
-
-  test_convertToDoubleQuotedString_BAD_three_embeddedTarget() async {
-    await resolveTestUnit("""
-main() {
-  print('''a""\"c''');
-}
-""");
-    await assertNoAssistAt(
-        "'a", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING);
-  }
-
-  test_convertToDoubleQuotedString_BAD_three_enclosingTarget() async {
-    await resolveTestUnit('''
-main() {
-  print("""abc""");
-}
-''');
-    await assertNoAssistAt(
-        '"ab', DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING);
-  }
-
-  test_convertToDoubleQuotedString_OK_one_interpolation() async {
-    await resolveTestUnit(r'''
-main() {
-  var b = 'b';
-  var c = 'c';
-  print('a $b-${c} d');
-}
-''');
-    await assertHasAssistAt(
-        r"'a $b", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING, r'''
-main() {
-  var b = 'b';
-  var c = 'c';
-  print("a $b-${c} d");
-}
-''');
-  }
-
-  test_convertToDoubleQuotedString_OK_one_raw() async {
-    await resolveTestUnit('''
-main() {
-  print(r'abc');
-}
-''');
-    await assertHasAssistAt(
-        "'ab", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING, '''
-main() {
-  print(r"abc");
-}
-''');
-  }
-
-  test_convertToDoubleQuotedString_OK_one_simple() async {
-    await resolveTestUnit('''
-main() {
-  print('abc');
-}
-''');
-    await assertHasAssistAt(
-        "'ab", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING, '''
-main() {
-  print("abc");
-}
-''');
-  }
-
-  test_convertToDoubleQuotedString_OK_three_interpolation() async {
-    await resolveTestUnit(r"""
-main() {
-  var b = 'b';
-  var c = 'c';
-  print('''a $b-${c} d''');
-}
-""");
-    await assertHasAssistAt(
-        r"'a $b", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING, r'''
-main() {
-  var b = 'b';
-  var c = 'c';
-  print("""a $b-${c} d""");
-}
-''');
-  }
-
-  test_convertToDoubleQuotedString_OK_three_raw() async {
-    await resolveTestUnit("""
-main() {
-  print(r'''abc''');
-}
-""");
-    await assertHasAssistAt(
-        "'ab", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING, '''
-main() {
-  print(r"""abc""");
-}
-''');
-  }
-
-  test_convertToDoubleQuotedString_OK_three_simple() async {
-    await resolveTestUnit("""
-main() {
-  print('''abc''');
-}
-""");
-    await assertHasAssistAt(
-        "'ab", DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING, '''
-main() {
-  print("""abc""");
-}
-''');
-  }
-
-  test_convertToExpressionBody_BAD_already() async {
-    await resolveTestUnit('''
-fff() => 42;
-''');
-    await assertNoAssistAt(
-        'fff()', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY);
-  }
-
-  test_convertToExpressionBody_BAD_inExpression() async {
-    await resolveTestUnit('''
-main() {
-  return 42;
-}
-''');
-    await assertNoAssistAt('42;', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY);
-  }
-
-  test_convertToExpressionBody_BAD_moreThanOneStatement() async {
-    await resolveTestUnit('''
-fff() {
-  var v = 42;
-  return v;
-}
-''');
-    await assertNoAssistAt(
-        'fff()', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY);
-  }
-
-  test_convertToExpressionBody_BAD_noEnclosingFunction() async {
-    await resolveTestUnit('''
-var V = 42;
-''');
-    await assertNoAssistAt('V = ', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY);
-  }
-
-  test_convertToExpressionBody_BAD_noReturn() async {
-    await resolveTestUnit('''
-fff() {
-  var v = 42;
-}
-''');
-    await assertNoAssistAt(
-        'fff()', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY);
-  }
-
-  test_convertToExpressionBody_BAD_noReturnValue() async {
-    await resolveTestUnit('''
-fff() {
-  return;
-}
-''');
-    await assertNoAssistAt(
-        'fff()', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY);
-  }
-
-  test_convertToExpressionBody_OK_async() async {
-    await resolveTestUnit('''
-class A {
-  mmm() async {
-    return 42;
-  }
-}
-''');
-    await assertHasAssistAt(
-        'mmm', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-class A {
-  mmm() async => 42;
-}
-''');
-  }
-
-  test_convertToExpressionBody_OK_closure() async {
-    await resolveTestUnit('''
-setup(x) {}
-main() {
-  setup(() {
-    return 42;
-  });
-}
-''');
-    await assertHasAssistAt(
-        'return', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-setup(x) {}
-main() {
-  setup(() => 42);
-}
-''');
-  }
-
-  test_convertToExpressionBody_OK_closure_voidExpression() async {
-    await resolveTestUnit('''
-setup(x) {}
-main() {
-  setup((_) {
-    print('test');
-  });
-}
-''');
-    await assertHasAssistAt(
-        '(_) {', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-setup(x) {}
-main() {
-  setup((_) => print('test'));
-}
-''');
-  }
-
-  test_convertToExpressionBody_OK_constructor() async {
-    await resolveTestUnit('''
-class A {
-  factory A() {
-    return null;
-  }
-}
-''');
-    await assertHasAssistAt(
-        'A()', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-class A {
-  factory A() => null;
-}
-''');
-  }
-
-  test_convertToExpressionBody_OK_function_onBlock() async {
-    await resolveTestUnit('''
-fff() {
-  return 42;
-}
-''');
-    await assertHasAssistAt(
-        '{', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-fff() => 42;
-''');
-  }
-
-  test_convertToExpressionBody_OK_function_onName() async {
-    await resolveTestUnit('''
-fff() {
-  return 42;
-}
-''');
-    await assertHasAssistAt(
-        'ff()', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-fff() => 42;
-''');
-  }
-
-  test_convertToExpressionBody_OK_method_onBlock() async {
-    await resolveTestUnit('''
-class A {
-  m() { // marker
-    return 42;
-  }
-}
-''');
-    await assertHasAssistAt(
-        '{ // marker', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-class A {
-  m() => 42;
-}
-''');
-  }
-
-  test_convertToExpressionBody_OK_topFunction_onReturnStatement() async {
-    await resolveTestUnit('''
-fff() {
-  return 42;
-}
-''');
-    await assertHasAssistAt(
-        'return', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY, '''
-fff() => 42;
-''');
-  }
-
-  test_convertToFieldParameter_BAD_additionalUse() async {
-    await resolveTestUnit('''
-class A {
-  int aaa2;
-  int bbb2;
-  A(int aaa) : aaa2 = aaa, bbb2 = aaa;
-}
-''');
-    await assertNoAssistAt('aaa)', DartAssistKind.CONVERT_TO_FIELD_PARAMETER);
-  }
-
-  test_convertToFieldParameter_BAD_notPureAssignment() async {
-    await resolveTestUnit('''
-class A {
-  int aaa2;
-  A(int aaa) : aaa2 = aaa * 2;
-}
-''');
-    await assertNoAssistAt('aaa)', DartAssistKind.CONVERT_TO_FIELD_PARAMETER);
-  }
-
-  test_convertToFieldParameter_OK_firstInitializer() async {
-    await resolveTestUnit('''
-class A {
-  int aaa2;
-  int bbb2;
-  A(int aaa, int bbb) : aaa2 = aaa, bbb2 = bbb;
-}
-''');
-    await assertHasAssistAt(
-        'aaa, ', DartAssistKind.CONVERT_TO_FIELD_PARAMETER, '''
-class A {
-  int aaa2;
-  int bbb2;
-  A(this.aaa2, int bbb) : bbb2 = bbb;
-}
-''');
-  }
-
-  test_convertToFieldParameter_OK_onParameterName_inInitializer() async {
-    await resolveTestUnit('''
-class A {
-  int test2;
-  A(int test) : test2 = test {
-  }
-}
-''');
-    await assertHasAssistAt(
-        'test {', DartAssistKind.CONVERT_TO_FIELD_PARAMETER, '''
-class A {
-  int test2;
-  A(this.test2) {
-  }
-}
-''');
-  }
-
-  test_convertToFieldParameter_OK_onParameterName_inParameters() async {
-    await resolveTestUnit('''
-class A {
-  int test;
-  A(int test) : test = test {
-  }
-}
-''');
-    await assertHasAssistAt(
-        'test)', DartAssistKind.CONVERT_TO_FIELD_PARAMETER, '''
-class A {
-  int test;
-  A(this.test) {
-  }
-}
-''');
-  }
-
-  test_convertToFieldParameter_OK_secondInitializer() async {
-    await resolveTestUnit('''
-class A {
-  int aaa2;
-  int bbb2;
-  A(int aaa, int bbb) : aaa2 = aaa, bbb2 = bbb;
-}
-''');
-    await assertHasAssistAt(
-        'bbb)', DartAssistKind.CONVERT_TO_FIELD_PARAMETER, '''
-class A {
-  int aaa2;
-  int bbb2;
-  A(int aaa, this.bbb2) : aaa2 = aaa;
-}
-''');
-  }
-
-  test_convertToFinalField_BAD_hasSetter_inThisClass() async {
-    await resolveTestUnit('''
-class A {
-  int get foo => null;
-  void set foo(_) {}
-}
-''');
-    await assertNoAssistAt('get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD);
-  }
-
-  test_convertToFinalField_BAD_notExpressionBody() async {
-    await resolveTestUnit('''
-class A {
-  int get foo {
-    int v = 1 + 2;
-    return v + 3;
-  }
-}
-''');
-    await assertNoAssistAt('get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD);
-  }
-
-  test_convertToFinalField_BAD_notGetter() async {
-    await resolveTestUnit('''
-class A {
-  int foo() => 42;
-}
-''');
-    await assertNoAssistAt('foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD);
-  }
-
-  test_convertToFinalField_OK_blockBody_onlyReturnStatement() async {
-    await resolveTestUnit('''
-class A {
-  int get foo {
-    return 1 + 2;
-  }
-}
-''');
-    await assertHasAssistAt(
-        'get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  final int foo = 1 + 2;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_hasOverride() async {
-    await resolveTestUnit('''
-const myAnnotation = const Object();
-class A {
-  @myAnnotation
-  int get foo => 42;
-}
-''');
-    await assertHasAssistAt(
-        'get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-const myAnnotation = const Object();
-class A {
-  @myAnnotation
-  final int foo = 42;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_hasSetter_inSuper() async {
-    await resolveTestUnit('''
-class A {
-  void set foo(_) {}
-}
-class B extends A {
-  int get foo => null;
-}
-''');
-    await assertHasAssistAt(
-        'get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  void set foo(_) {}
-}
-class B extends A {
-  final int foo;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_noReturnType() async {
-    await resolveTestUnit('''
-class A {
-  get foo => 42;
-}
-''');
-    await assertHasAssistAt(
-        'get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  final foo = 42;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_noReturnType_static() async {
-    await resolveTestUnit('''
-class A {
-  static get foo => 42;
-}
-''');
-    await assertHasAssistAt(
-        'get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  static final foo = 42;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_notNull() async {
-    await resolveTestUnit('''
-class A {
-  int get foo => 1 + 2;
-}
-''');
-    await assertHasAssistAt(
-        'get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  final int foo = 1 + 2;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_null() async {
-    await resolveTestUnit('''
-class A {
-  int get foo => null;
-}
-''');
-    await assertHasAssistAt(
-        'get foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  final int foo;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_onName() async {
-    await resolveTestUnit('''
-class A {
-  int get foo => 42;
-}
-''');
-    await assertHasAssistAt('foo', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  final int foo = 42;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_onReturnType_parameterized() async {
-    await resolveTestUnit('''
-class A {
-  List<int> get foo => null;
-}
-''');
-    await assertHasAssistAt(
-        'nt> get', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  final List<int> foo;
-}
-''');
-  }
-
-  test_convertToFinalField_OK_onReturnType_simple() async {
-    await resolveTestUnit('''
-class A {
-  int get foo => 42;
-}
-''');
-    await assertHasAssistAt(
-        'int get', DartAssistKind.CONVERT_INTO_FINAL_FIELD, '''
-class A {
-  final int foo = 42;
-}
-''');
-  }
-
-  test_convertToForIndex_BAD_bodyNotBlock() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) print(item);
-}
-''');
-    await assertNoAssistAt(
-        'for (String', DartAssistKind.CONVERT_INTO_FOR_INDEX);
-  }
-
-  test_convertToForIndex_BAD_doesNotDeclareVariable() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  String item;
-  for (item in items) {
-    print(item);
-  }
-}
-''');
-    await assertNoAssistAt('for (item', DartAssistKind.CONVERT_INTO_FOR_INDEX);
-  }
-
-  test_convertToForIndex_BAD_iterableIsNotVariable() async {
-    await resolveTestUnit('''
-main() {
-  for (String item in ['a', 'b', 'c']) {
-    print(item);
-  }
-}
-''');
-    await assertNoAssistAt(
-        'for (String', DartAssistKind.CONVERT_INTO_FOR_INDEX);
-  }
-
-  test_convertToForIndex_BAD_iterableNotList() async {
-    await resolveTestUnit('''
-main(Iterable<String> items) {
-  for (String item in items) {
-    print(item);
-  }
-}
-''');
-    await assertNoAssistAt(
-        'for (String', DartAssistKind.CONVERT_INTO_FOR_INDEX);
-  }
-
-  test_convertToForIndex_BAD_usesIJK() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) {
-    print(item);
-    int i, j, k;
-  }
-}
-''');
-    await assertNoAssistAt(
-        'for (String', DartAssistKind.CONVERT_INTO_FOR_INDEX);
-  }
-
-  test_convertToForIndex_OK_onDeclaredIdentifier_name() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) {
-    print(item);
-  }
-}
-''');
-    await assertHasAssistAt(
-        'item in', DartAssistKind.CONVERT_INTO_FOR_INDEX, '''
-main(List<String> items) {
-  for (int i = 0; i < items.length; i++) {
-    String item = items[i];
-    print(item);
-  }
-}
-''');
-  }
-
-  test_convertToForIndex_OK_onDeclaredIdentifier_type() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) {
-    print(item);
-  }
-}
-''');
-    await assertHasAssistAt(
-        'tring item', DartAssistKind.CONVERT_INTO_FOR_INDEX, '''
-main(List<String> items) {
-  for (int i = 0; i < items.length; i++) {
-    String item = items[i];
-    print(item);
-  }
-}
-''');
-  }
-
-  test_convertToForIndex_OK_onFor() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) {
-    print(item);
-  }
-}
-''');
-    await assertHasAssistAt(
-        'for (String', DartAssistKind.CONVERT_INTO_FOR_INDEX, '''
-main(List<String> items) {
-  for (int i = 0; i < items.length; i++) {
-    String item = items[i];
-    print(item);
-  }
-}
-''');
-  }
-
-  test_convertToForIndex_OK_usesI() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) {
-    int i = 0;
-  }
-}
-''');
-    await assertHasAssistAt(
-        'for (String', DartAssistKind.CONVERT_INTO_FOR_INDEX, '''
-main(List<String> items) {
-  for (int j = 0; j < items.length; j++) {
-    String item = items[j];
-    int i = 0;
-  }
-}
-''');
-  }
-
-  test_convertToForIndex_OK_usesIJ() async {
-    await resolveTestUnit('''
-main(List<String> items) {
-  for (String item in items) {
-    print(item);
-    int i = 0, j = 1;
-  }
-}
-''');
-    await assertHasAssistAt(
-        'for (String', DartAssistKind.CONVERT_INTO_FOR_INDEX, '''
-main(List<String> items) {
-  for (int k = 0; k < items.length; k++) {
-    String item = items[k];
-    print(item);
-    int i = 0, j = 1;
-  }
-}
-''');
-  }
-
-  test_convertToFunctionSyntax_BAD_functionTypeAlias_insideParameterList() async {
-    await resolveTestUnit('''
-typedef String F(int x, int y);
-''');
-    await assertNoAssistAt(
-        'x,', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX);
-  }
-
-  test_convertToFunctionSyntax_BAD_functionTypeAlias_noParameterTypes() async {
-    await resolveTestUnit('''
-typedef String F(x);
-''');
-    await assertNoAssistAt(
-        'def', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX);
-  }
-
-  test_convertToFunctionSyntax_BAD_functionTypedParameter_insideParameterList() async {
-    await resolveTestUnit('''
-g(String f(int x, int y)) {}
-''');
-    await assertNoAssistAt(
-        'x,', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX);
-  }
-
-  test_convertToFunctionSyntax_BAD_functionTypedParameter_noParameterTypes() async {
-    await resolveTestUnit('''
-g(String f(x)) {}
-''');
-    await assertNoAssistAt(
-        'f(', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX);
-  }
-
-  test_convertToFunctionSyntax_OK_functionTypeAlias_noReturnType_noTypeParameters() async {
-    await resolveTestUnit('''
-typedef String F(int x);
-''');
-    await assertHasAssistAt(
-        'def', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX, '''
-typedef F = String Function(int x);
-''');
-  }
-
-  test_convertToFunctionSyntax_OK_functionTypeAlias_noReturnType_typeParameters() async {
-    await resolveTestUnit('''
-typedef F<P, R>(P x);
-''');
-    await assertHasAssistAt(
-        'def', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX, '''
-typedef F<P, R> = Function(P x);
-''');
-  }
-
-  test_convertToFunctionSyntax_OK_functionTypeAlias_returnType_noTypeParameters() async {
-    await resolveTestUnit('''
-typedef String F(int x);
-''');
-    await assertHasAssistAt(
-        'def', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX, '''
-typedef F = String Function(int x);
-''');
-  }
-
-  test_convertToFunctionSyntax_OK_functionTypeAlias_returnType_typeParameters() async {
-    await resolveTestUnit('''
-typedef R F<P, R>(P x);
-''');
-    await assertHasAssistAt(
-        'def', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX, '''
-typedef F<P, R> = R Function(P x);
-''');
-  }
-
-  test_convertToFunctionSyntax_OK_functionTypedParameter_noReturnType_noTypeParameters() async {
-    await resolveTestUnit('''
-g(f(int x)) {}
-''');
-    await assertHasAssistAt(
-        'f(', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX, '''
-g(Function(int x) f) {}
-''');
-  }
-
-  test_convertToFunctionSyntax_OK_functionTypedParameter_returnType() async {
-    await resolveTestUnit('''
-g(String f(int x)) {}
-''');
-    await assertHasAssistAt(
-        'f(', DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX, '''
-g(String Function(int x) f) {}
-''');
-  }
-
-  test_convertToGetter_BAD_noInitializer() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-class A {
-  final int foo;
-}
-''');
-    await assertNoAssistAt('foo', DartAssistKind.CONVERT_INTO_GETTER);
-  }
-
-  test_convertToGetter_BAD_notFinal() async {
-    await resolveTestUnit('''
-class A {
-  int foo = 1;
-}
-''');
-    await assertNoAssistAt('foo', DartAssistKind.CONVERT_INTO_GETTER);
-  }
-
-  test_convertToGetter_BAD_notSingleField() async {
-    await resolveTestUnit('''
-class A {
-  final int foo = 1, bar = 2;
-}
-''');
-    await assertNoAssistAt('foo', DartAssistKind.CONVERT_INTO_GETTER);
-  }
-
-  test_convertToGetter_OK() async {
-    await resolveTestUnit('''
-const myAnnotation = const Object();
-class A {
-  @myAnnotation
-  final int foo = 1 + 2;
-}
-''');
-    await assertHasAssistAt('foo =', DartAssistKind.CONVERT_INTO_GETTER, '''
-const myAnnotation = const Object();
-class A {
-  @myAnnotation
-  int get foo => 1 + 2;
-}
-''');
-  }
-
-  test_convertToGetter_OK_noType() async {
-    await resolveTestUnit('''
-class A {
-  final foo = 42;
-}
-''');
-    await assertHasAssistAt('foo =', DartAssistKind.CONVERT_INTO_GETTER, '''
-class A {
-  get foo => 42;
-}
-''');
-  }
-
-  test_convertToIntLiteral() async {
-    await resolveTestUnit('''
-const double myDouble = 42.0;
-''');
-    await assertHasAssistAt('42.0', DartAssistKind.CONVERT_TO_INT_LITERAL, '''
-const double myDouble = 42;
-''');
-  }
-
-  test_convertToIntLiteral_e() async {
-    await resolveTestUnit('''
-const double myDouble = 4.2e1;
-''');
-    await assertHasAssistAt('4.2e1', DartAssistKind.CONVERT_TO_INT_LITERAL, '''
-const double myDouble = 42;
-''');
-  }
-
-  test_convertToIntLiteral_eBig() async {
-    await resolveTestUnit('''
-const double myDouble = 4.2e99999;
-''');
-    await assertNoAssistAt('4.2e99999', DartAssistKind.CONVERT_TO_INT_LITERAL);
-  }
-
-  test_convertToIntLiteral_notDouble() async {
-    await resolveTestUnit('''
-const double myDouble = 42;
-''');
-    await assertNoAssistAt('42', DartAssistKind.CONVERT_TO_INT_LITERAL);
-  }
-
-  test_convertToIsNot_BAD_is_alreadyIsNot() async {
-    await resolveTestUnit('''
-main(p) {
-  p is! String;
-}
-''');
-    await assertNoAssistAt('is!', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_is_noEnclosingParenthesis() async {
-    await resolveTestUnit('''
-main(p) {
-  p is String;
-}
-''');
-    await assertNoAssistAt('is String', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_is_noPrefix() async {
-    await resolveTestUnit('''
-main(p) {
-  (p is String);
-}
-''');
-    await assertNoAssistAt('is String', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_is_notIsExpression() async {
-    await resolveTestUnit('''
-main(p) {
-  123 + 456;
-}
-''');
-    await assertNoAssistAt('123 +', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_is_notTheNotOperator() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-main(p) {
-  ++(p is String);
-}
-''');
-    await assertNoAssistAt('is String', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_not_alreadyIsNot() async {
-    await resolveTestUnit('''
-main(p) {
-  !(p is! String);
-}
-''');
-    await assertNoAssistAt('!(p', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_not_noEnclosingParenthesis() async {
-    await resolveTestUnit('''
-main(p) {
-  !p;
-}
-''');
-    await assertNoAssistAt('!p', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_not_notIsExpression() async {
-    await resolveTestUnit('''
-main(p) {
-  !(p == null);
-}
-''');
-    await assertNoAssistAt('!(p', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_BAD_not_notTheNotOperator() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-main(p) {
-  ++(p is String);
-}
-''');
-    await assertNoAssistAt('++(', DartAssistKind.CONVERT_INTO_IS_NOT);
-  }
-
-  test_convertToIsNot_OK_childOfIs_left() async {
-    await resolveTestUnit('''
-main(p) {
-  !(p is String);
-}
-''');
-    await assertHasAssistAt('p is', DartAssistKind.CONVERT_INTO_IS_NOT, '''
-main(p) {
-  p is! String;
-}
-''');
-  }
-
-  test_convertToIsNot_OK_childOfIs_right() async {
-    await resolveTestUnit('''
-main(p) {
-  !(p is String);
-}
-''');
-    await assertHasAssistAt('String)', DartAssistKind.CONVERT_INTO_IS_NOT, '''
-main(p) {
-  p is! String;
-}
-''');
-  }
-
-  test_convertToIsNot_OK_is() async {
-    await resolveTestUnit('''
-main(p) {
-  !(p is String);
-}
-''');
-    await assertHasAssistAt('is String', DartAssistKind.CONVERT_INTO_IS_NOT, '''
-main(p) {
-  p is! String;
-}
-''');
-  }
-
-  test_convertToIsNot_OK_is_higherPrecedencePrefix() async {
-    await resolveTestUnit('''
-main(p) {
-  !!(p is String);
-}
-''');
-    await assertHasAssistAt('is String', DartAssistKind.CONVERT_INTO_IS_NOT, '''
-main(p) {
-  !(p is! String);
-}
-''');
-  }
-
-  test_convertToIsNot_OK_is_not_higherPrecedencePrefix() async {
-    await resolveTestUnit('''
-main(p) {
-  !!(p is String);
-}
-''');
-    await assertHasAssistAt('!(p', DartAssistKind.CONVERT_INTO_IS_NOT, '''
-main(p) {
-  !(p is! String);
-}
-''');
-  }
-
-  test_convertToIsNot_OK_not() async {
-    await resolveTestUnit('''
-main(p) {
-  !(p is String);
-}
-''');
-    await assertHasAssistAt('!(p', DartAssistKind.CONVERT_INTO_IS_NOT, '''
-main(p) {
-  p is! String;
-}
-''');
-  }
-
-  test_convertToIsNot_OK_parentheses() async {
-    await resolveTestUnit('''
-main(p) {
-  !(p is String);
-}
-''');
-    await assertHasAssistAt('(p is', DartAssistKind.CONVERT_INTO_IS_NOT, '''
-main(p) {
-  p is! String;
-}
-''');
-  }
-
-  test_convertToIsNotEmpty_BAD_noBang() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-main(String str) {
-  ~str.isEmpty;
-}
-''');
-    await assertNoAssistAt(
-        'isEmpty;', DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY);
-  }
-
-  test_convertToIsNotEmpty_BAD_noIsNotEmpty() async {
-    await resolveTestUnit('''
-class A {
-  bool get isEmpty => false;
-}
-main(A a) {
-  !a.isEmpty;
-}
-''');
-    await assertNoAssistAt(
-        'isEmpty;', DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY);
-  }
-
-  test_convertToIsNotEmpty_BAD_notInPrefixExpression() async {
-    await resolveTestUnit('''
-main(String str) {
-  str.isEmpty;
-}
-''');
-    await assertNoAssistAt(
-        'isEmpty;', DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY);
-  }
-
-  test_convertToIsNotEmpty_BAD_notIsEmpty() async {
-    await resolveTestUnit('''
-main(int p) {
-  !p.isEven;
-}
-''');
-    await assertNoAssistAt('isEven;', DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY);
-  }
-
-  test_convertToIsNotEmpty_OK_on_isEmpty() async {
-    await resolveTestUnit('''
-main(String str) {
-  !str.isEmpty;
-}
-''');
-    await assertHasAssistAt(
-        'isEmpty', DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY, '''
-main(String str) {
-  str.isNotEmpty;
-}
-''');
-  }
-
-  test_convertToIsNotEmpty_OK_on_str() async {
-    await resolveTestUnit('''
-main(String str) {
-  !str.isEmpty;
-}
-''');
-    await assertHasAssistAt(
-        'str.', DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY, '''
-main(String str) {
-  str.isNotEmpty;
-}
-''');
-  }
-
-  test_convertToIsNotEmpty_OK_propertyAccess() async {
-    await resolveTestUnit('''
-main(String str) {
-  !'text'.isEmpty;
-}
-''');
-    await assertHasAssistAt(
-        'isEmpty', DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY, '''
-main(String str) {
-  'text'.isNotEmpty;
-}
-''');
-  }
-
-  test_convertToNormalParameter_OK_dynamic() async {
-    await resolveTestUnit('''
-class A {
-  var test;
-  A(this.test) {
-  }
-}
-''');
-    await assertHasAssistAt(
-        'test)', DartAssistKind.CONVERT_TO_NORMAL_PARAMETER, '''
-class A {
-  var test;
-  A(test) : test = test {
-  }
-}
-''');
-  }
-
-  test_convertToNormalParameter_OK_firstInitializer() async {
-    await resolveTestUnit('''
-class A {
-  int test;
-  A(this.test) {
-  }
-}
-''');
-    await assertHasAssistAt(
-        'test)', DartAssistKind.CONVERT_TO_NORMAL_PARAMETER, '''
-class A {
-  int test;
-  A(int test) : test = test {
-  }
-}
-''');
-  }
-
-  test_convertToNormalParameter_OK_secondInitializer() async {
-    await resolveTestUnit('''
-class A {
-  double aaa;
-  int bbb;
-  A(this.bbb) : aaa = 1.0;
-}
-''');
-    await assertHasAssistAt(
-        'bbb)', DartAssistKind.CONVERT_TO_NORMAL_PARAMETER, '''
-class A {
-  double aaa;
-  int bbb;
-  A(int bbb) : aaa = 1.0, bbb = bbb;
-}
-''');
-  }
-
-  test_convertToSingleQuotedString_BAD_one_embeddedTarget() async {
-    await resolveTestUnit('''
-main() {
-  print("a'b'c");
-}
-''');
-    await assertNoAssistAt(
-        '"a', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING);
-  }
-
-  test_convertToSingleQuotedString_BAD_one_enclosingTarget() async {
-    await resolveTestUnit('''
-main() {
-  print('abc');
-}
-''');
-    await assertNoAssistAt(
-        "'ab", DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING);
-  }
-
-  test_convertToSingleQuotedString_BAD_three_embeddedTarget() async {
-    await resolveTestUnit('''
-main() {
-  print("""a''\'bc""");
-}
-''');
-    await assertNoAssistAt(
-        '"a', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING);
-  }
-
-  test_convertToSingleQuotedString_BAD_three_enclosingTarget() async {
-    await resolveTestUnit("""
-main() {
-  print('''abc''');
-}
-""");
-    await assertNoAssistAt(
-        "'ab", DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING);
-  }
-
-  test_convertToSingleQuotedString_OK_one_interpolation() async {
-    await resolveTestUnit(r'''
-main() {
-  var b = 'b';
-  var c = 'c';
-  print("a $b-${c} d");
-}
-''');
-    await assertHasAssistAt(
-        r'"a $b', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING, r'''
-main() {
-  var b = 'b';
-  var c = 'c';
-  print('a $b-${c} d');
-}
-''');
-  }
-
-  test_convertToSingleQuotedString_OK_one_raw() async {
-    await resolveTestUnit('''
-main() {
-  print(r"abc");
-}
-''');
-    await assertHasAssistAt(
-        '"ab', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING, '''
-main() {
-  print(r'abc');
-}
-''');
-  }
-
-  test_convertToSingleQuotedString_OK_one_simple() async {
-    await resolveTestUnit('''
-main() {
-  print("abc");
-}
-''');
-    await assertHasAssistAt(
-        '"ab', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING, '''
-main() {
-  print('abc');
-}
-''');
-  }
-
-  test_convertToSingleQuotedString_OK_three_interpolation() async {
-    await resolveTestUnit(r'''
-main() {
-  var b = 'b';
-  var c = 'c';
-  print("""a $b-${c} d""");
-}
-''');
-    await assertHasAssistAt(
-        r'"a $b', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING, r"""
-main() {
-  var b = 'b';
-  var c = 'c';
-  print('''a $b-${c} d''');
-}
-""");
-  }
-
-  test_convertToSingleQuotedString_OK_three_raw() async {
-    await resolveTestUnit('''
-main() {
-  print(r"""abc""");
-}
-''');
-    await assertHasAssistAt(
-        '"ab', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING, """
-main() {
-  print(r'''abc''');
-}
-""");
-  }
-
-  test_convertToSingleQuotedString_OK_three_simple() async {
-    await resolveTestUnit('''
-main() {
-  print("""abc""");
-}
-''');
-    await assertHasAssistAt(
-        '"ab', DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING, """
-main() {
-  print('''abc''');
-}
-""");
-  }
-
-  test_encapsulateField_BAD_alreadyPrivate() async {
-    await resolveTestUnit('''
-class A {
-  int _test = 42;
-}
-main(A a) {
-  print(a._test);
-}
-''');
-    await assertNoAssistAt('_test =', DartAssistKind.ENCAPSULATE_FIELD);
-  }
-
-  test_encapsulateField_BAD_final() async {
-    await resolveTestUnit('''
-class A {
-  final int test = 42;
-}
-''');
-    await assertNoAssistAt('test =', DartAssistKind.ENCAPSULATE_FIELD);
-  }
-
-  test_encapsulateField_BAD_multipleFields() async {
-    await resolveTestUnit('''
-class A {
-  int aaa, bbb, ccc;
-}
-main(A a) {
-  print(a.bbb);
-}
-''');
-    await assertNoAssistAt('bbb, ', DartAssistKind.ENCAPSULATE_FIELD);
-  }
-
-  test_encapsulateField_BAD_notOnName() async {
-    await resolveTestUnit('''
-class A {
-  int test = 1 + 2 + 3;
-}
-''');
-    await assertNoAssistAt('+ 2', DartAssistKind.ENCAPSULATE_FIELD);
-  }
-
-  test_encapsulateField_BAD_parseError() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-class A {
-  int; // marker
-}
-main(A a) {
-  print(a.test);
-}
-''');
-    await assertNoAssistAt('; // marker', DartAssistKind.ENCAPSULATE_FIELD);
-  }
-
-  test_encapsulateField_BAD_static() async {
-    await resolveTestUnit('''
-class A {
-  static int test = 42;
-}
-''');
-    await assertNoAssistAt('test =', DartAssistKind.ENCAPSULATE_FIELD);
-  }
-
-  test_encapsulateField_OK_documentation() async {
-    await resolveTestUnit('''
-class A {
-  /// AAA
-  /// BBB
-  int test;
-}
-''');
-    await assertHasAssistAt('test;', DartAssistKind.ENCAPSULATE_FIELD, '''
-class A {
-  /// AAA
-  /// BBB
-  int _test;
-
-  /// AAA
-  /// BBB
-  int get test => _test;
-
-  /// AAA
-  /// BBB
-  set test(int test) {
-    _test = test;
-  }
-}
-''');
-  }
-
-  test_encapsulateField_OK_hasType() async {
-    await resolveTestUnit('''
-class A {
-  int test = 42;
-  A(this.test);
-}
-main(A a) {
-  print(a.test);
-}
-''');
-    await assertHasAssistAt('test = 42', DartAssistKind.ENCAPSULATE_FIELD, '''
-class A {
-  int _test = 42;
-
-  int get test => _test;
-
-  set test(int test) {
-    _test = test;
-  }
-  A(this._test);
-}
-main(A a) {
-  print(a.test);
-}
-''');
-  }
-
-  test_encapsulateField_OK_noType() async {
-    await resolveTestUnit('''
-class A {
-  var test = 42;
-}
-main(A a) {
-  print(a.test);
-}
-''');
-    await assertHasAssistAt('test = 42', DartAssistKind.ENCAPSULATE_FIELD, '''
-class A {
-  var _test = 42;
-
-  get test => _test;
-
-  set test(test) {
-    _test = test;
-  }
-}
-main(A a) {
-  print(a.test);
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_BAD_extraLength() async {
-    await resolveTestUnit('''
-main() {
-  111 + 222;
-}
-''');
-    length = 3;
-    await assertNoAssistAt('+ 222', DartAssistKind.EXCHANGE_OPERANDS);
-  }
-
-  test_exchangeBinaryExpressionArguments_BAD_onOperand() async {
-    await resolveTestUnit('''
-main() {
-  111 + 222;
-}
-''');
-    length = 3;
-    await assertNoAssistAt('11 +', DartAssistKind.EXCHANGE_OPERANDS);
-  }
-
-  test_exchangeBinaryExpressionArguments_BAD_selectionWithBinary() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2 + 3;
-}
-''');
-    length = '1 + 2 + 3'.length;
-    await assertNoAssistAt('1 + 2 + 3', DartAssistKind.EXCHANGE_OPERANDS);
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_compare() async {
-    const initialOperators = const ['<', '<=', '>', '>='];
-    const resultOperators = const ['>', '>=', '<', '<='];
-    for (int i = 0; i <= 0; i++) {
-      String initialOperator = initialOperators[i];
-      String resultOperator = resultOperators[i];
-      await resolveTestUnit('''
-bool main(int a, int b) {
-  return a $initialOperator b;
-}
-''');
-      await assertHasAssistAt(
-          initialOperator, DartAssistKind.EXCHANGE_OPERANDS, '''
-bool main(int a, int b) {
-  return b $resultOperator a;
-}
-''');
-    }
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_extended_mixOperator_1() async {
-    await resolveTestUnit('''
-main() {
-  1 * 2 * 3 + 4;
-}
-''');
-    await assertHasAssistAt('* 2', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  2 * 3 * 1 + 4;
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_extended_mixOperator_2() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2 - 3 + 4;
-}
-''');
-    await assertHasAssistAt('+ 2', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  2 + 1 - 3 + 4;
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_extended_sameOperator_afterFirst() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2 + 3;
-}
-''');
-    await assertHasAssistAt('+ 2', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  2 + 3 + 1;
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_extended_sameOperator_afterSecond() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2 + 3;
-}
-''');
-    await assertHasAssistAt('+ 3', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  3 + 1 + 2;
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_simple_afterOperator() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2;
-}
-''');
-    await assertHasAssistAt(' 2', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  2 + 1;
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_simple_beforeOperator() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2;
-}
-''');
-    await assertHasAssistAt('+ 2', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  2 + 1;
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_simple_fullSelection() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2;
-}
-''');
-    length = '1 + 2'.length;
-    await assertHasAssistAt('1 + 2', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  2 + 1;
-}
-''');
-  }
-
-  test_exchangeBinaryExpressionArguments_OK_simple_withLength() async {
-    await resolveTestUnit('''
-main() {
-  1 + 2;
-}
-''');
-    length = 2;
-    await assertHasAssistAt('+ 2', DartAssistKind.EXCHANGE_OPERANDS, '''
-main() {
-  2 + 1;
-}
-''');
-  }
-
-  test_flutterConvertToChildren_BAD_childUnresolved() async {
-    addFlutterPackage();
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Row(
-    /*caret*/child: new Container()
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_CONVERT_TO_CHILDREN);
-  }
-
-  test_flutterConvertToChildren_BAD_notOnChild() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-    body: /*caret*/new Center(
-      child: new Container(),
-    ),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_CONVERT_TO_CHILDREN);
-  }
-
-  test_flutterConvertToChildren_OK_multiLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      /*caret*/child: new Container(
-        width: 200.0,
-        height: 300.0,
-      ),
-      key: null,
-    ),
-// end
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_CONVERT_TO_CHILDREN, '''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      /*caret*/children: <Widget>[
-        new Container(
-          width: 200.0,
-          height: 300.0,
-        ),
-      ],
-      key: null,
-    ),
-// end
-  );
-}
-''');
-  }
-
-  test_flutterConvertToChildren_OK_newlineChild() async {
-    // This case could occur with deeply nested constructors, common in Flutter.
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      /*caret*/child:
-          new Container(
-        width: 200.0,
-        height: 300.0,
-      ),
-      key: null,
-    ),
-// end
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_CONVERT_TO_CHILDREN, '''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      /*caret*/children: <Widget>[
-        new Container(
-          width: 200.0,
-          height: 300.0,
-        ),
-      ],
-      key: null,
-    ),
-// end
-  );
-}
-''');
-  }
-
-  test_flutterConvertToChildren_OK_singleLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      /*caret*/child: new GestureDetector(),
-      key: null,
-    ),
-// end
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_CONVERT_TO_CHILDREN, '''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      /*caret*/children: <Widget>[new GestureDetector()],
-      key: null,
-    ),
-// end
-  );
-}
-''');
-  }
-
-  test_flutterConvertToStatefulWidget_BAD_notClass() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-/*caret*/main() {}
-''');
-    _setCaretLocation();
-    assertNoAssist(DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET);
-  }
-
-  test_flutterConvertToStatefulWidget_BAD_notStatelessWidget() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-class /*caret*/MyWidget extends Text {
-  MyWidget() : super('');
-}
-''');
-    _setCaretLocation();
-    assertNoAssist(DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET);
-  }
-
-  test_flutterConvertToStatefulWidget_BAD_notWidget() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-class /*caret*/MyWidget {}
-''');
-    _setCaretLocation();
-    assertNoAssist(DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET);
-  }
-
-  test_flutterConvertToStatefulWidget_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit(r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatelessWidget {
-  final String aaa;
-  final String bbb;
-
-  const MyWidget(this.aaa, this.bbb);
-
-  @override
-  Widget build(BuildContext context) {
-    return new Row(
-      children: [
-        new Text(aaa),
-        new Text(bbb),
-        new Text('$aaa'),
-        new Text('${bbb}'),
-      ],
-    );
-  }
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(
-        DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET, r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatefulWidget {
-  final String aaa;
-  final String bbb;
-
-  const MyWidget(this.aaa, this.bbb);
-
-  @override
-  MyWidgetState createState() {
-    return new MyWidgetState();
-  }
-}
-
-class MyWidgetState extends State<MyWidget> {
-  @override
-  Widget build(BuildContext context) {
-    return new Row(
-      children: [
-        new Text(widget.aaa),
-        new Text(widget.bbb),
-        new Text('${widget.aaa}'),
-        new Text('${widget.bbb}'),
-      ],
-    );
-  }
-}
-''');
-  }
-
-  test_flutterConvertToStatefulWidget_OK_empty() async {
-    addFlutterPackage();
-    await resolveTestUnit(r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatelessWidget {
-  @override
-  Widget build(BuildContext context) {
-    return new Container();
-  }
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(
-        DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET, r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatefulWidget {
-  @override
-  MyWidgetState createState() {
-    return new MyWidgetState();
-  }
-}
-
-class MyWidgetState extends State<MyWidget> {
-  @override
-  Widget build(BuildContext context) {
-    return new Container();
-  }
-}
-''');
-  }
-
-  test_flutterConvertToStatefulWidget_OK_fields() async {
-    addFlutterPackage();
-    await resolveTestUnit(r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatelessWidget {
-  static String staticField1;
-  final String instanceField1;
-  final String instanceField2;
-  String instanceField3;
-  static String staticField2;
-  String instanceField4;
-  String instanceField5;
-  static String staticField3;
-
-  MyWidget(this.instanceField1) : instanceField2 = '' {
-    instanceField3 = '';
-  }
-
-  @override
-  Widget build(BuildContext context) {
-    instanceField4 = instanceField1;
-    return new Row(
-      children: [
-        new Text(instanceField1),
-        new Text(instanceField2),
-        new Text(instanceField3),
-        new Text(instanceField4),
-        new Text(instanceField5),
-        new Text(staticField1),
-        new Text(staticField2),
-        new Text(staticField3),
-      ],
-    );
-  }
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(
-        DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET, r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatefulWidget {
-  static String staticField1;
-  final String instanceField1;
-  final String instanceField2;
-  String instanceField3;
-  static String staticField2;
-  static String staticField3;
-
-  MyWidget(this.instanceField1) : instanceField2 = '' {
-    instanceField3 = '';
-  }
-
-  @override
-  MyWidgetState createState() {
-    return new MyWidgetState();
-  }
-}
-
-class MyWidgetState extends State<MyWidget> {
-  String instanceField4;
-
-  String instanceField5;
-
-  @override
-  Widget build(BuildContext context) {
-    instanceField4 = widget.instanceField1;
-    return new Row(
-      children: [
-        new Text(widget.instanceField1),
-        new Text(widget.instanceField2),
-        new Text(widget.instanceField3),
-        new Text(instanceField4),
-        new Text(instanceField5),
-        new Text(MyWidget.staticField1),
-        new Text(MyWidget.staticField2),
-        new Text(MyWidget.staticField3),
-      ],
-    );
-  }
-}
-''');
-  }
-
-  test_flutterConvertToStatefulWidget_OK_getters() async {
-    addFlutterPackage();
-    await resolveTestUnit(r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatelessWidget {
-  @override
-  Widget build(BuildContext context) {
-    return new Row(
-      children: [
-        new Text(staticGetter1),
-        new Text(staticGetter2),
-        new Text(instanceGetter1),
-        new Text(instanceGetter2),
-      ],
-    );
-  }
-
-  static String get staticGetter1 => '';
-
-  String get instanceGetter1 => '';
-
-  static String get staticGetter2 => '';
-
-  String get instanceGetter2 => '';
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(
-        DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET, r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatefulWidget {
-  @override
-  MyWidgetState createState() {
-    return new MyWidgetState();
-  }
-
-  static String get staticGetter1 => '';
-
-  static String get staticGetter2 => '';
-}
-
-class MyWidgetState extends State<MyWidget> {
-  @override
-  Widget build(BuildContext context) {
-    return new Row(
-      children: [
-        new Text(MyWidget.staticGetter1),
-        new Text(MyWidget.staticGetter2),
-        new Text(instanceGetter1),
-        new Text(instanceGetter2),
-      ],
-    );
-  }
-
-  String get instanceGetter1 => '';
-
-  String get instanceGetter2 => '';
-}
-''');
-  }
-
-  test_flutterConvertToStatefulWidget_OK_methods() async {
-    addFlutterPackage();
-    await resolveTestUnit(r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatelessWidget {
-  static String staticField;
-  final String instanceField1;
-  String instanceField2;
-
-  MyWidget(this.instanceField1);
-
-  @override
-  Widget build(BuildContext context) {
-    return new Row(
-      children: [
-        new Text(instanceField1),
-        new Text(instanceField2),
-        new Text(staticField),
-      ],
-    );
-  }
-
-  void instanceMethod1() {
-    instanceMethod1();
-    instanceMethod2();
-    staticMethod1();
-  }
-
-  static void staticMethod1() {
-    print('static 1');
-  }
-
-  void instanceMethod2() {
-    print('instance 2');
-  }
-
-  static void staticMethod2() {
-    print('static 2');
-  }
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(
-        DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET, r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatefulWidget {
-  static String staticField;
-  final String instanceField1;
-
-  MyWidget(this.instanceField1);
-
-  @override
-  MyWidgetState createState() {
-    return new MyWidgetState();
-  }
-
-  static void staticMethod1() {
-    print('static 1');
-  }
-
-  static void staticMethod2() {
-    print('static 2');
-  }
-}
-
-class MyWidgetState extends State<MyWidget> {
-  String instanceField2;
-
-  @override
-  Widget build(BuildContext context) {
-    return new Row(
-      children: [
-        new Text(widget.instanceField1),
-        new Text(instanceField2),
-        new Text(MyWidget.staticField),
-      ],
-    );
-  }
-
-  void instanceMethod1() {
-    instanceMethod1();
-    instanceMethod2();
-    MyWidget.staticMethod1();
-  }
-
-  void instanceMethod2() {
-    print('instance 2');
-  }
-}
-''');
-  }
-
-  test_flutterConvertToStatefulWidget_OK_tail() async {
-    addFlutterPackage();
-    await resolveTestUnit(r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatelessWidget {
-  @override
-  Widget build(BuildContext context) {
-    return new Container();
-  }
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(
-        DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET, r'''
-import 'package:flutter/material.dart';
-
-class /*caret*/MyWidget extends StatefulWidget {
-  @override
-  MyWidgetState createState() {
-    return new MyWidgetState();
-  }
-}
-
-class MyWidgetState extends State<MyWidget> {
-  @override
-  Widget build(BuildContext context) {
-    return new Container();
-  }
-}
-''');
-  }
-
-  test_flutterMoveWidgetDown_BAD_last() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('aaa'),
-      new Text('bbb'),
-      /*caret*/new Text('ccc'),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_MOVE_DOWN);
-  }
-
-  test_flutterMoveWidgetDown_BAD_notInList() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Center(
-    child: /*caret*/new Text('aaa'),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_MOVE_DOWN);
-  }
-
-  test_flutterMoveWidgetDown_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('aaa'),
-      /*caret*/new Text('bbbbbb'),
-      new Text('ccccccccc'),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_MOVE_DOWN, '''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('aaa'),
-      /*caret*/new Text('ccccccccc'),
-      new Text('bbbbbb'),
-    ],
-  );
-}
-''');
-    _assertExitPosition(before: "new Text('bbbbbb')");
-  }
-
-  test_flutterMoveWidgetUp_BAD_first() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      /*caret*/new Text('aaa'),
-      new Text('bbb'),
-      new Text('ccc'),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_MOVE_UP);
-  }
-
-  test_flutterMoveWidgetUp_BAD_notInList() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Center(
-    child: /*caret*/new Text('aaa'),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_MOVE_UP);
-  }
-
-  test_flutterMoveWidgetUp_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('aaa'),
-      /*caret*/new Text('bbbbbb'),
-      new Text('ccccccccc'),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_MOVE_UP, '''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('bbbbbb'),
-      /*caret*/new Text('aaa'),
-      new Text('ccccccccc'),
-    ],
-  );
-}
-''');
-    _assertExitPosition(before: "new Text('bbbbbb')");
-  }
-
-  test_flutterRemoveWidget_BAD_childrenMultipleIntoChild() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Center(
-    child: new /*caret*/Row(
-      children: [
-        new Text('aaa'),
-        new Text('bbb'),
-      ],
-    ),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_REMOVE_WIDGET);
-  }
-
-  test_flutterRemoveWidget_OK_childIntoChild_multiLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Center(
-        child: new /*caret*/Padding(
-          padding: const EdgeInsets.all(8.0),
-          child: new Center(
-            heightFactor: 0.5,
-            child: new Text('foo'),
-          ),
-        ),
-      ),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_REMOVE_WIDGET, '''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Center(
-        child: new Center(
-          heightFactor: 0.5,
-          child: new Text('foo'),
-        ),
-      ),
-    ],
-  );
-}
-''');
-  }
-
-  test_flutterRemoveWidget_OK_childIntoChild_singleLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Padding(
-    padding: const EdgeInsets.all(8.0),
-    child: new /*caret*/Center(
-      heightFactor: 0.5,
-      child: new Text('foo'),
-    ),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_REMOVE_WIDGET, '''
-import 'package:flutter/material.dart';
-main() {
-  new Padding(
-    padding: const EdgeInsets.all(8.0),
-    child: new Text('foo'),
-  );
-}
-''');
-  }
-
-  test_flutterRemoveWidget_OK_childIntoChildren() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('foo'),
-      new /*caret*/Center(
-        heightFactor: 0.5,
-        child: new Padding(
-          padding: const EdgeInsets.all(8.0),
-          child: new Text('bar'),
-        ),
-      ),
-      new Text('baz'),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_REMOVE_WIDGET, '''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('foo'),
-      new Padding(
-        padding: const EdgeInsets.all(8.0),
-        child: new Text('bar'),
-      ),
-      new Text('baz'),
-    ],
-  );
-}
-''');
-  }
-
-  test_flutterRemoveWidget_OK_childrenOneIntoChild() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Center(
-    child: /*caret*/new Column(
-      children: [
-        new Text('foo'),
-      ],
-    ),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_REMOVE_WIDGET, '''
-import 'package:flutter/material.dart';
-main() {
-  new Center(
-    child: /*caret*/new Text('foo'),
-  );
-}
-''');
-  }
-
-  test_flutterRemoveWidget_OK_childrenOneIntoReturn() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  return /*caret*/new Column(
-    children: [
-      new Text('foo'),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_REMOVE_WIDGET, '''
-import 'package:flutter/material.dart';
-main() {
-  return /*caret*/new Text('foo');
-}
-''');
-  }
-
-  test_flutterRemoveWidget_OK_intoChildren() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('aaa'),
-      new /*caret*/Column(
-        children: [
-          new Row(
-            children: [
-              new Text('bbb'),
-              new Text('ccc'),
-            ],
-          ),
-          new Row(
-            children: [
-              new Text('ddd'),
-              new Text('eee'),
-            ],
-          ),
-        ],
-      ),
-      new Text('fff'),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_REMOVE_WIDGET, '''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: <Widget>[
-      new Text('aaa'),
-      new Row(
-        children: [
-          new Text('bbb'),
-          new Text('ccc'),
-        ],
-      ),
-      new Row(
-        children: [
-          new Text('ddd'),
-          new Text('eee'),
-        ],
-      ),
-      new Text('fff'),
-    ],
-  );
-}
-''');
-  }
-
-  test_flutterSwapWithChild_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new /*caret*/GestureDetector(
-      onTap: () => startResize(),
-      child: new Center(
-        child: new Container(
-          width: 200.0,
-          height: 300.0,
-        ),
-        key: null,
-      ),
-    ),
-// end
-  );
-}
-startResize() {}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_SWAP_WITH_CHILD, '''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      key: null,
-      child: new /*caret*/GestureDetector(
-        onTap: () => startResize(),
-        child: new Container(
-          width: 200.0,
-          height: 300.0,
-        ),
-      ),
-    ),
-// end
-  );
-}
-startResize() {}
-''');
-  }
-
-  test_flutterSwapWithChild_OK_notFormatted() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-
-class Foo extends StatefulWidget {
-  @override
-  _State createState() => new _State();
-}
-
-class _State extends State<Foo> {
-  @override
-  Widget build(BuildContext context) {
-    return new /*caret*/Expanded(
-      flex: 2,
-      child: new GestureDetector(
-        child: new Text(
-          'foo',
-        ), onTap: () {
-          print(42);
-      },
-      ),
-    );
-  }
-}''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_SWAP_WITH_CHILD, '''
-import 'package:flutter/material.dart';
-
-class Foo extends StatefulWidget {
-  @override
-  _State createState() => new _State();
-}
-
-class _State extends State<Foo> {
-  @override
-  Widget build(BuildContext context) {
-    return new GestureDetector(
-      onTap: () {
-        print(42);
-    },
-      child: new /*caret*/Expanded(
-        flex: 2,
-        child: new Text(
-          'foo',
-        ),
-      ),
-    );
-  }
-}''');
-  }
-
-  test_flutterSwapWithParent_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new Center(
-      child: new /*caret*/GestureDetector(
-        onTap: () => startResize(),
-        child: new Container(
-          width: 200.0,
-          height: 300.0,
-        ),
-      ),
-      key: null,
-    ),
-// end
-  );
-}
-startResize() {}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_SWAP_WITH_PARENT, '''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-// start
-    body: new /*caret*/GestureDetector(
-      onTap: () => startResize(),
-      child: new Center(
-        key: null,
-        child: new Container(
-          width: 200.0,
-          height: 300.0,
-        ),
-      ),
-    ),
-// end
-  );
-}
-startResize() {}
-''');
-  }
-
-  test_flutterSwapWithParent_OK_notFormatted() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-
-class Foo extends StatefulWidget {
-  @override
-  _State createState() => new _State();
-}
-
-class _State extends State<Foo> {
-  @override
-  Widget build(BuildContext context) {
-    return new GestureDetector(
-      child: new /*caret*/Expanded(
-        child: new Text(
-          'foo',
-        ),
-        flex: 2,
-      ), onTap: () {
-        print(42);
-    },
-    );
-  }
-}''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_SWAP_WITH_PARENT, '''
-import 'package:flutter/material.dart';
-
-class Foo extends StatefulWidget {
-  @override
-  _State createState() => new _State();
-}
-
-class _State extends State<Foo> {
-  @override
-  Widget build(BuildContext context) {
-    return new /*caret*/Expanded(
-      flex: 2,
-      child: new GestureDetector(
-        onTap: () {
-          print(42);
-      },
-        child: new Text(
-          'foo',
-        ),
-      ),
-    );
-  }
-}''');
-  }
-
-  test_flutterSwapWithParent_OK_outerIsInChildren() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: [
-      new Column(
-        children: [
-          new Padding(
-            padding: new EdgeInsets.all(16.0),
-            child: new /*caret*/Center(
-              child: new Column(
-                crossAxisAlignment: CrossAxisAlignment.start,
-                children: <Widget>[],
-              ),
-            ),
-          ),
-        ],
-      ),
-    ],
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_SWAP_WITH_PARENT, '''
-import 'package:flutter/material.dart';
-main() {
-  new Column(
-    children: [
-      new Column(
-        children: [
-          new /*caret*/Center(
-            child: new Padding(
-              padding: new EdgeInsets.all(16.0),
-              child: new Column(
-                crossAxisAlignment: CrossAxisAlignment.start,
-                children: <Widget>[],
-              ),
-            ),
-          ),
-        ],
-      ),
-    ],
-  );
-}
-''');
-  }
-
-  test_flutterWrapCenter_BAD_onCenter() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/new Center();
-  }
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_WRAP_CENTER);
-  }
-
-  test_flutterWrapCenter_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/new Container();
-  }
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CENTER, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/Center(child: new Container());
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CENTER, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/new Center(child: new Container());
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapCenter_OK_implicitNew() async {
-    configurePreviewDart2();
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/Container();
-  }
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CENTER, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/Center(child: Container());
-  }
-}
-''');
-  }
-
-  test_flutterWrapCenter_OK_namedConstructor() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  MyWidget.named();
-
-  Widget build(BuildContext context) => null;
-}
-
-main() {
-  return MyWidget./*caret*/named();
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CENTER, '''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  MyWidget.named();
-
-  Widget build(BuildContext context) => null;
-}
-
-main() {
-  return Center(child: MyWidget./*caret*/named());
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CENTER, '''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  MyWidget.named();
-
-  Widget build(BuildContext context) => null;
-}
-
-main() {
-  return new Center(child: MyWidget./*caret*/named());
-}
-''');
-    }
-  }
-
-  test_flutterWrapColumn_OK_coveredByWidget() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Container(
-      child: new /*caret*/Text('aaa'),
-    );
-  }
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_COLUMN, '''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Container(
-      child: Column(
-        children: <Widget>[
-          new /*caret*/Text('aaa'),
-        ],
-      ),
-    );
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_COLUMN, '''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Container(
-      child: new Column(
-        children: <Widget>[
-          new /*caret*/Text('aaa'),
-        ],
-      ),
-    );
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapColumn_OK_coversWidgets() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Row(children: [
-      new Text('aaa'),
-// start
-      new Text('bbb'),
-      new Text('ccc'),
-// end
-      new Text('ddd'),
-    ]);
-  }
-}
-''');
-    _setStartEndSelection();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_COLUMN, '''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Row(children: [
-      new Text('aaa'),
-// start
-      Column(
-        children: <Widget>[
-          new Text('bbb'),
-          new Text('ccc'),
-        ],
-      ),
-// end
-      new Text('ddd'),
-    ]);
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_COLUMN, '''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Row(children: [
-      new Text('aaa'),
-// start
-      new Column(
-        children: <Widget>[
-          new Text('bbb'),
-          new Text('ccc'),
-        ],
-      ),
-// end
-      new Text('ddd'),
-    ]);
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapColumn_OK_implicitNew() async {
-    configurePreviewDart2();
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-main() {
-  return Container(
-    child: /*caret*/Text('aaa'),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_WRAP_COLUMN, '''
-import 'package:flutter/widgets.dart';
-
-main() {
-  return Container(
-    child: /*caret*/Column(
-      children: <Widget>[
-        Text('aaa'),
-      ],
-    ),
-  );
-}
-''');
-  }
-
-  test_flutterWrapContainer_BAD_onContainer() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-main() {
-  return /*caret*/new Container();
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_WRAP_CONTAINER);
-  }
-
-  test_flutterWrapContainer_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-main() {
-  /*caret*/new Text('a');
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CONTAINER, '''
-import 'package:flutter/widgets.dart';
-main() {
-  /*caret*/Container(child: new Text('a'));
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_CONTAINER, '''
-import 'package:flutter/widgets.dart';
-main() {
-  /*caret*/new Center(child: new Text('a'));
-}
-''');
-    }
-  }
-
-  test_flutterWrapPadding_BAD_onPadding() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/new Padding();
-  }
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_WRAP_PADDING);
-  }
-
-  test_flutterWrapPadding_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/new Container();
-  }
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_PADDING, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/Padding(
-      padding: const EdgeInsets.all(8.0),
-      child: new Container(),
-    );
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_PADDING, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return /*caret*/new Padding(
-      padding: const EdgeInsets.all(8.0),
-      child: new Container(),
-    );
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapRow_OK() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Column(children: [
-      new Text('aaa'),
-// start
-      new Text('bbb'),
-      new Text('ccc'),
-// end
-      new Text('ddd'),
-    ]);
-  }
-}
-''');
-    _setStartEndSelection();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_ROW, '''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Column(children: [
-      new Text('aaa'),
-// start
-      Row(
-        children: <Widget>[
-          new Text('bbb'),
-          new Text('ccc'),
-        ],
-      ),
-// end
-      new Text('ddd'),
-    ]);
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_ROW, '''
-import 'package:flutter/widgets.dart';
-
-class FakeFlutter {
-  main() {
-    return new Column(children: [
-      new Text('aaa'),
-// start
-      new Row(
-        children: <Widget>[
-          new Text('bbb'),
-          new Text('ccc'),
-        ],
-      ),
-// end
-      new Text('ddd'),
-    ]);
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapWidget_BAD_minimal() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-/*caret*/x(){}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_WRAP_GENERIC);
-  }
-
-  test_flutterWrapWidget_BAD_multiLine() async {
-    verifyNoTestUnitErrors = false;
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-      children: [/*caret*/
-// start
-        new Transform(),
-        new Object(),
-        new AspectRatio(),
-// end
-      ],
-    ),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_WRAP_GENERIC);
-  }
-
-  test_flutterWrapWidget_BAD_singleLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-  var obj;
-// start
-    return new Row(children: [/*caret*/ new Container()]);
-// end
-  }
-}
-''');
-    _setCaretLocation();
-    await assertNoAssist(DartAssistKind.FLUTTER_WRAP_GENERIC);
-  }
-
-  test_flutterWrapWidget_OK_multiLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-// start
-      children: [/*caret*/
-        new Text('111'),
-        new Text('222'),
-        new Container(),
-      ],
-// end
-    ),
-  );
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-// start
-      children: [
-        new widget(
-          children: [/*caret*/
-            new Text('111'),
-            new Text('222'),
-            new Container(),
-          ],
-        ),
-      ],
-// end
-    ),
-  );
-}
-''');
-  }
-
-  test_flutterWrapWidget_OK_multiLines() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return new Container(
-// start
-      child: new /*caret*/DefaultTextStyle(
-        child: new Row(
-          children: <Widget>[
-            new Container(
-            ),
-          ],
-        ),
-      ),
-// end
-    );
-  }
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return new Container(
-// start
-      child: widget(
-        child: new /*caret*/DefaultTextStyle(
-          child: new Row(
-            children: <Widget>[
-              new Container(
-              ),
-            ],
-          ),
-        ),
-      ),
-// end
-    );
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return new Container(
-// start
-      child: new widget(
-        child: new /*caret*/DefaultTextStyle(
-          child: new Row(
-            children: <Widget>[
-              new Container(
-              ),
-            ],
-          ),
-        ),
-      ),
-// end
-    );
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapWidget_OK_multiLines_eol2() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {\r
-  main() {\r
-    return new Container(\r
-// start\r
-      child: new /*caret*/DefaultTextStyle(\r
-        child: new Row(\r
-          children: <Widget>[\r
-            new Container(\r
-            ),\r
-          ],\r
-        ),\r
-      ),\r
-// end\r
-    );\r
-  }\r
-}\r
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {\r
-  main() {\r
-    return new Container(\r
-// start\r
-      child: widget(\r
-        child: new /*caret*/DefaultTextStyle(\r
-          child: new Row(\r
-            children: <Widget>[\r
-              new Container(\r
-              ),\r
-            ],\r
-          ),\r
-        ),\r
-      ),\r
-// end\r
-    );\r
-  }\r
-}\r
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {\r
-  main() {\r
-    return new Container(\r
-// start\r
-      child: new widget(\r
-        child: new /*caret*/DefaultTextStyle(\r
-          child: new Row(\r
-            children: <Widget>[\r
-              new Container(\r
-              ),\r
-            ],\r
-          ),\r
-        ),\r
-      ),\r
-// end\r
-    );\r
-  }\r
-}\r
-''');
-    }
-  }
-
-  test_flutterWrapWidget_OK_prefixedIdentifier_identifier() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-abstract class Foo extends Widget {
-  Widget bar;
-}
-
-main(Foo foo) {
-  return foo./*caret*/bar;
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-
-abstract class Foo extends Widget {
-  Widget bar;
-}
-
-main(Foo foo) {
-  return widget(child: foo./*caret*/bar);
-}
-''');
-  }
-
-  test_flutterWrapWidget_OK_prefixedIdentifier_prefix() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-abstract class Foo extends Widget {
-  Widget bar;
-}
-
-main(Foo foo) {
-  return /*caret*/foo.bar;
-}
-''');
-    _setCaretLocation();
-    await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-
-abstract class Foo extends Widget {
-  Widget bar;
-}
-
-main(Foo foo) {
-  return /*caret*/widget(child: foo.bar);
-}
-''');
-  }
-
-  test_flutterWrapWidget_OK_singleLine1() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-// start
-    return /*caret*/new Container();
-// end
-  }
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-// start
-    return /*caret*/widget(child: new Container());
-// end
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-// start
-    return /*caret*/new widget(child: new Container());
-// end
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapWidget_OK_singleLine2() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return new ClipRect./*caret*/rect();
-  }
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return widget(child: new ClipRect./*caret*/rect());
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    return new widget(child: new ClipRect./*caret*/rect());
-  }
-}
-''');
-    }
-  }
-
-  test_flutterWrapWidget_OK_variable() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    var container = new Container();
-    return /*caret*/container;
-  }
-}
-''');
-    _setCaretLocation();
-    if (omitNew) {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    var container = new Container();
-    return /*caret*/widget(child: container);
-  }
-}
-''');
-    } else {
-      await assertHasAssist(DartAssistKind.FLUTTER_WRAP_GENERIC, '''
-import 'package:flutter/widgets.dart';
-class FakeFlutter {
-  main() {
-    var container = new Container();
-    return /*caret*/new widget(child: container);
-  }
-}
-''');
-    }
-  }
-
-  test_importAddShow_BAD_hasShow() async {
-    await resolveTestUnit('''
-import 'dart:math' show PI;
-main() {
-  PI;
-}
-''');
-    await assertNoAssistAt('import ', DartAssistKind.IMPORT_ADD_SHOW);
-  }
-
-  test_importAddShow_BAD_unresolvedUri() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-import '/no/such/lib.dart';
-''');
-    await assertNoAssistAt('import ', DartAssistKind.IMPORT_ADD_SHOW);
-  }
-
-  test_importAddShow_BAD_unused() async {
-    await resolveTestUnit('''
-import 'dart:math';
-''');
-    await assertNoAssistAt('import ', DartAssistKind.IMPORT_ADD_SHOW);
-  }
-
-  test_importAddShow_OK_hasUnresolvedIdentifier() async {
-    await resolveTestUnit('''
-import 'dart:math';
-main(x) {
-  PI;
-  return x.foo();
-}
-''');
-    await assertHasAssistAt('import ', DartAssistKind.IMPORT_ADD_SHOW, '''
-import 'dart:math' show PI;
-main(x) {
-  PI;
-  return x.foo();
-}
-''');
-  }
-
-  test_importAddShow_OK_onDirective() async {
-    await resolveTestUnit('''
-import 'dart:math';
-main() {
-  PI;
-  E;
-  max(1, 2);
-}
-''');
-    await assertHasAssistAt('import ', DartAssistKind.IMPORT_ADD_SHOW, '''
-import 'dart:math' show E, PI, max;
-main() {
-  PI;
-  E;
-  max(1, 2);
-}
-''');
-  }
-
-  test_importAddShow_OK_onUri() async {
-    await resolveTestUnit('''
-import 'dart:math';
-main() {
-  PI;
-  E;
-  max(1, 2);
-}
-''');
-    await assertHasAssistAt('art:math', DartAssistKind.IMPORT_ADD_SHOW, '''
-import 'dart:math' show E, PI, max;
-main() {
-  PI;
-  E;
-  max(1, 2);
-}
-''');
-  }
-
-  test_introduceLocalTestedType_BAD_notBlock() async {
-    await resolveTestUnit('''
-main(p) {
-  if (p is String)
-    print('not a block');
-}
-''');
-    await assertNoAssistAt('if (p', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE);
-  }
-
-  test_introduceLocalTestedType_BAD_notIsExpression() async {
-    await resolveTestUnit('''
-main(p) {
-  if (p == null) {
-  }
-}
-''');
-    await assertNoAssistAt('if (p', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE);
-  }
-
-  test_introduceLocalTestedType_BAD_notStatement() async {
-    await resolveTestUnit('''
-class C {
-  bool b;
-  C(v) : b = v is int;
-}''');
-    await assertNoAssistAt('is int', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE);
-  }
-
-  test_introduceLocalTestedType_OK_if_is() async {
-    await resolveTestUnit('''
-class MyTypeName {}
-main(p) {
-  if (p is MyTypeName) {
-  }
-  p = null;
-}
-''');
-    String expected = '''
-class MyTypeName {}
-main(p) {
-  if (p is MyTypeName) {
-    MyTypeName myTypeName = p;
-  }
-  p = null;
-}
-''';
-    await assertHasAssistAt(
-        'is MyType', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE, expected);
-    _assertLinkedGroup(
-        change.linkedEditGroups[0],
-        ['myTypeName = '],
-        expectedSuggestions(LinkedEditSuggestionKind.VARIABLE,
-            ['myTypeName', 'typeName', 'name']));
-    // another good location
-    await assertHasAssistAt(
-        'if (p', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE, expected);
-  }
-
-  test_introduceLocalTestedType_OK_if_isNot() async {
-    await resolveTestUnit('''
-class MyTypeName {}
-main(p) {
-  if (p is! MyTypeName) {
-    return;
-  }
-}
-''');
-    String expected = '''
-class MyTypeName {}
-main(p) {
-  if (p is! MyTypeName) {
-    return;
-  }
-  MyTypeName myTypeName = p;
-}
-''';
-    await assertHasAssistAt(
-        'is! MyType', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE, expected);
-    _assertLinkedGroup(
-        change.linkedEditGroups[0],
-        ['myTypeName = '],
-        expectedSuggestions(LinkedEditSuggestionKind.VARIABLE,
-            ['myTypeName', 'typeName', 'name']));
-    // another good location
-    await assertHasAssistAt(
-        'if (p', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE, expected);
-  }
-
-  test_introduceLocalTestedType_OK_while() async {
-    await resolveTestUnit('''
-main(p) {
-  while (p is String) {
-  }
-  p = null;
-}
-''');
-    String expected = '''
-main(p) {
-  while (p is String) {
-    String s = p;
-  }
-  p = null;
-}
-''';
-    await assertHasAssistAt(
-        'is String', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE, expected);
-    await assertHasAssistAt(
-        'while (p', DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE, expected);
-  }
-
-  test_invalidSelection() async {
-    await resolveTestUnit('');
-    offset = -1;
-    length = 0;
-    List<Assist> assists = await _computeAssists();
-    expect(assists, isEmpty);
-  }
-
-  test_invertIfStatement_blocks() async {
-    await resolveTestUnit('''
-main() {
-  if (true) {
-    0;
-  } else {
-    1;
-  }
-}
-''');
-    await assertHasAssistAt('if (', DartAssistKind.INVERT_IF_STATEMENT, '''
-main() {
-  if (false) {
-    1;
-  } else {
-    0;
-  }
-}
-''');
-  }
-
-  test_invertIfStatement_statements() async {
-    await resolveTestUnit('''
-main() {
-  if (true)
-    0;
-  else
-    1;
-}
-''');
-    await assertHasAssistAt('if (', DartAssistKind.INVERT_IF_STATEMENT, '''
-main() {
-  if (false)
-    1;
-  else
-    0;
-}
-''');
-  }
-
-  test_joinIfStatementInner_BAD_innerNotIf() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    print(0);
-  }
-}
-''');
-    await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER);
-  }
-
-  test_joinIfStatementInner_BAD_innerWithElse() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    } else {
-      print(1);
-    }
-  }
-}
-''');
-    await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER);
-  }
-
-  test_joinIfStatementInner_BAD_statementAfterInner() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(2);
-    }
-    print(1);
-  }
-}
-''');
-    await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER);
-  }
-
-  test_joinIfStatementInner_BAD_statementBeforeInner() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    print(1);
-    if (2 == 2) {
-      print(2);
-    }
-  }
-}
-''');
-    await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER);
-  }
-
-  test_joinIfStatementInner_BAD_targetNotIf() async {
-    await resolveTestUnit('''
-main() {
-  print(0);
-}
-''');
-    await assertNoAssistAt('print', DartAssistKind.JOIN_IF_WITH_INNER);
-  }
-
-  test_joinIfStatementInner_BAD_targetWithElse() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    }
-  } else {
-    print(1);
-  }
-}
-''');
-    await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER);
-  }
-
-  test_joinIfStatementInner_OK_conditionAndOr() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2 || 3 == 3) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if (1 == 1 && (2 == 2 || 3 == 3)) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementInner_OK_conditionInvocation() async {
-    await resolveTestUnit('''
-main() {
-  if (isCheck()) {
-    if (2 == 2) {
-      print(0);
-    }
-  }
-}
-bool isCheck() => false;
-''');
-    await assertHasAssistAt(
-        'if (isCheck', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if (isCheck() && 2 == 2) {
-    print(0);
-  }
-}
-bool isCheck() => false;
-''');
-  }
-
-  test_joinIfStatementInner_OK_conditionOrAnd() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1 || 2 == 2) {
-    if (3 == 3) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if ((1 == 1 || 2 == 2) && 3 == 3) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementInner_OK_onCondition() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('1 ==', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementInner_OK_simpleConditions_block_block() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementInner_OK_simpleConditions_block_single() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2)
-      print(0);
-  }
-}
-''');
-    await assertHasAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementInner_OK_simpleConditions_single_blockMulti() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(1);
-      print(2);
-      print(3);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(1);
-    print(2);
-    print(3);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementInner_OK_simpleConditions_single_blockOne() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1)
-    if (2 == 2) {
-      print(0);
-    }
-}
-''');
-    await assertHasAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementOuter_BAD_outerNotIf() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    print(0);
-  }
-}
-''');
-    await assertNoAssistAt('if (1 == 1', DartAssistKind.JOIN_IF_WITH_OUTER);
-  }
-
-  test_joinIfStatementOuter_BAD_outerWithElse() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    }
-  } else {
-    print(1);
-  }
-}
-''');
-    await assertNoAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER);
-  }
-
-  test_joinIfStatementOuter_BAD_statementAfterInner() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(2);
-    }
-    print(1);
-  }
-}
-''');
-    await assertNoAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER);
-  }
-
-  test_joinIfStatementOuter_BAD_statementBeforeInner() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    print(1);
-    if (2 == 2) {
-      print(2);
-    }
-  }
-}
-''');
-    await assertNoAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER);
-  }
-
-  test_joinIfStatementOuter_BAD_targetNotIf() async {
-    await resolveTestUnit('''
-main() {
-  print(0);
-}
-''');
-    await assertNoAssistAt('print', DartAssistKind.JOIN_IF_WITH_OUTER);
-  }
-
-  test_joinIfStatementOuter_BAD_targetWithElse() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    } else {
-      print(1);
-    }
-  }
-}
-''');
-    await assertNoAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER);
-  }
-
-  test_joinIfStatementOuter_OK_conditionAndOr() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2 || 3 == 3) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (2 ==', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if (1 == 1 && (2 == 2 || 3 == 3)) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementOuter_OK_conditionInvocation() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (isCheck()) {
-      print(0);
-    }
-  }
-}
-bool isCheck() => false;
-''');
-    await assertHasAssistAt(
-        'if (isCheck', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if (1 == 1 && isCheck()) {
-    print(0);
-  }
-}
-bool isCheck() => false;
-''');
-  }
-
-  test_joinIfStatementOuter_OK_conditionOrAnd() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1 || 2 == 2) {
-    if (3 == 3) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (3 == 3', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if ((1 == 1 || 2 == 2) && 3 == 3) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementOuter_OK_onCondition() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementOuter_OK_simpleConditions_block_block() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(0);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementOuter_OK_simpleConditions_block_single() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2)
-      print(0);
-  }
-}
-''');
-    await assertHasAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementOuter_OK_simpleConditions_single_blockMulti() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1) {
-    if (2 == 2) {
-      print(1);
-      print(2);
-      print(3);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(1);
-    print(2);
-    print(3);
-  }
-}
-''');
-  }
-
-  test_joinIfStatementOuter_OK_simpleConditions_single_blockOne() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1)
-    if (2 == 2) {
-      print(0);
-    }
-}
-''');
-    await assertHasAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER, '''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-}
-''');
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_hasInitializer() async {
-    await resolveTestUnit('''
-main() {
-  var v = 1;
-  v = 2;
-}
-''');
-    await assertNoAssistAt('v = 2', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_notAdjacent() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  var bar;
-  v = 1;
-}
-''');
-    await assertNoAssistAt('v = 1', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_notAssignment() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  v += 1;
-}
-''');
-    await assertNoAssistAt('v += 1', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_notDeclaration() async {
-    await resolveTestUnit('''
-main(var v) {
-  v = 1;
-}
-''');
-    await assertNoAssistAt('v = 1', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_notLeftArgument() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  1 + v; // marker
-}
-''');
-    await assertNoAssistAt(
-        'v; // marker', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_notOneVariable() async {
-    await resolveTestUnit('''
-main() {
-  var v, v2;
-  v = 1;
-}
-''');
-    await assertNoAssistAt('v = 1', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_notResolved() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-main() {
-  var v;
-  x = 1;
-}
-''');
-    await assertNoAssistAt('x = 1', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_BAD_notSameBlock() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  {
-    v = 1;
-  }
-}
-''');
-    await assertNoAssistAt('v = 1', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onAssignment_OK() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  v = 1;
-}
-''');
-    await assertHasAssistAt('v =', DartAssistKind.JOIN_VARIABLE_DECLARATION, '''
-main() {
-  var v = 1;
-}
-''');
-  }
-
-  test_joinVariableDeclaration_onDeclaration_BAD_hasInitializer() async {
-    await resolveTestUnit('''
-main() {
-  var v = 1;
-  v = 2;
-}
-''');
-    await assertNoAssistAt('v = 1', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onDeclaration_BAD_lastStatement() async {
-    await resolveTestUnit('''
-main() {
-  if (true)
-    var v;
-}
-''');
-    await assertNoAssistAt('v;', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onDeclaration_BAD_nextNotAssignmentExpression() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  42;
-}
-''');
-    await assertNoAssistAt('v;', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onDeclaration_BAD_nextNotExpressionStatement() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  if (true) return;
-}
-''');
-    await assertNoAssistAt('v;', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onDeclaration_BAD_nextNotPureAssignment() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  v += 1;
-}
-''');
-    await assertNoAssistAt('v;', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onDeclaration_BAD_notOneVariable() async {
-    await resolveTestUnit('''
-main() {
-  var v, v2;
-  v = 1;
-}
-''');
-    await assertNoAssistAt('v, ', DartAssistKind.JOIN_VARIABLE_DECLARATION);
-  }
-
-  test_joinVariableDeclaration_onDeclaration_OK_onName() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  v = 1;
-}
-''');
-    await assertHasAssistAt('v;', DartAssistKind.JOIN_VARIABLE_DECLARATION, '''
-main() {
-  var v = 1;
-}
-''');
-  }
-
-  test_joinVariableDeclaration_onDeclaration_OK_onType() async {
-    await resolveTestUnit('''
-main() {
-  int v;
-  v = 1;
-}
-''');
-    await assertHasAssistAt(
-        'int v', DartAssistKind.JOIN_VARIABLE_DECLARATION, '''
-main() {
-  int v = 1;
-}
-''');
-  }
-
-  test_joinVariableDeclaration_onDeclaration_OK_onVar() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  v = 1;
-}
-''');
-    await assertHasAssistAt(
-        'var v', DartAssistKind.JOIN_VARIABLE_DECLARATION, '''
-main() {
-  var v = 1;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_classField_OK() async {
-    await resolveTestUnit('''
-class A {
-  int v = 1;
-}
-''');
-    await assertHasAssistAt('v = ', DartAssistKind.REMOVE_TYPE_ANNOTATION, '''
-class A {
-  var v = 1;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_classField_OK_final() async {
-    await resolveTestUnit('''
-class A {
-  final int v = 1;
-}
-''');
-    await assertHasAssistAt('v = ', DartAssistKind.REMOVE_TYPE_ANNOTATION, '''
-class A {
-  final v = 1;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_field_BAD_noInitializer() async {
-    await resolveTestUnit('''
-class A {
-  int v;
-}
-''');
-    await assertNoAssistAt('v;', DartAssistKind.REMOVE_TYPE_ANNOTATION);
-  }
-
-  test_removeTypeAnnotation_localVariable_BAD_noInitializer() async {
-    await resolveTestUnit('''
-main() {
-  int v;
-}
-''');
-    await assertNoAssistAt('v;', DartAssistKind.REMOVE_TYPE_ANNOTATION);
-  }
-
-  test_removeTypeAnnotation_localVariable_BAD_onInitializer() async {
-    await resolveTestUnit('''
-main() {
-  final int v = 1;
-}
-''');
-    await assertNoAssistAt('1;', DartAssistKind.REMOVE_TYPE_ANNOTATION);
-  }
-
-  test_removeTypeAnnotation_localVariable_OK() async {
-    await resolveTestUnit('''
-main() {
-  int a = 1, b = 2;
-}
-''');
-    await assertHasAssistAt('int ', DartAssistKind.REMOVE_TYPE_ANNOTATION, '''
-main() {
-  var a = 1, b = 2;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_localVariable_OK_const() async {
-    await resolveTestUnit('''
-main() {
-  const int v = 1;
-}
-''');
-    await assertHasAssistAt('int ', DartAssistKind.REMOVE_TYPE_ANNOTATION, '''
-main() {
-  const v = 1;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_localVariable_OK_final() async {
-    await resolveTestUnit('''
-main() {
-  final int v = 1;
-}
-''');
-    await assertHasAssistAt('int ', DartAssistKind.REMOVE_TYPE_ANNOTATION, '''
-main() {
-  final v = 1;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_topLevelVariable_BAD_noInitializer() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-int v;
-''');
-    await assertNoAssistAt('v;', DartAssistKind.REMOVE_TYPE_ANNOTATION);
-  }
-
-  test_removeTypeAnnotation_topLevelVariable_BAD_syntheticName() async {
-    verifyNoTestUnitErrors = false;
-    await resolveTestUnit('''
-MyType
-''');
-    await assertNoAssistAt('MyType', DartAssistKind.REMOVE_TYPE_ANNOTATION);
-  }
-
-  test_removeTypeAnnotation_topLevelVariable_OK() async {
-    await resolveTestUnit('''
-int V = 1;
-''');
-    await assertHasAssistAt('int ', DartAssistKind.REMOVE_TYPE_ANNOTATION, '''
-var V = 1;
-''');
-  }
-
-  test_removeTypeAnnotation_topLevelVariable_OK_final() async {
-    await resolveTestUnit('''
-final int V = 1;
-''');
-    await assertHasAssistAt('int ', DartAssistKind.REMOVE_TYPE_ANNOTATION, '''
-final V = 1;
-''');
-  }
-
-  test_replaceConditionalWithIfElse_BAD_noEnclosingStatement() async {
-    await resolveTestUnit('''
-var v = true ? 111 : 222;
-''');
-    await assertNoAssistAt(
-        '? 111', DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE);
-  }
-
-  test_replaceConditionalWithIfElse_BAD_notConditional() async {
-    await resolveTestUnit('''
-main() {
-  var v = 42;
-}
-''');
-    await assertNoAssistAt(
-        'v = 42', DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE);
-  }
-
-  test_replaceConditionalWithIfElse_OK_assignment() async {
-    await resolveTestUnit('''
-main() {
-  var v;
-  v = true ? 111 : 222;
-}
-''');
-    // on conditional
-    await assertHasAssistAt(
-        '11 :', DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE, '''
-main() {
-  var v;
-  if (true) {
-    v = 111;
-  } else {
-    v = 222;
-  }
-}
-''');
-    // on variable
-    await assertHasAssistAt(
-        'v =', DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE, '''
-main() {
-  var v;
-  if (true) {
-    v = 111;
-  } else {
-    v = 222;
-  }
-}
-''');
-  }
-
-  test_replaceConditionalWithIfElse_OK_return() async {
-    await resolveTestUnit('''
-main() {
-  return true ? 111 : 222;
-}
-''');
-    await assertHasAssistAt(
-        'return ', DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE, '''
-main() {
-  if (true) {
-    return 111;
-  } else {
-    return 222;
-  }
-}
-''');
-  }
-
-  test_replaceConditionalWithIfElse_OK_variableDeclaration() async {
-    await resolveTestUnit('''
-main() {
-  int a = 1, vvv = true ? 111 : 222, b = 2;
-}
-''');
-    await assertHasAssistAt(
-        '11 :', DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE, '''
-main() {
-  int a = 1, vvv, b = 2;
-  if (true) {
-    vvv = 111;
-  } else {
-    vvv = 222;
-  }
-}
-''');
-  }
-
-  test_replaceIfElseWithConditional_BAD_expressionVsReturn() async {
-    await resolveTestUnit('''
-main() {
-  if (true) {
-    print(42);
-  } else {
-    return;
-  }
-}
-''');
-    await assertNoAssistAt(
-        'else', DartAssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL);
-  }
-
-  test_replaceIfElseWithConditional_BAD_notIfStatement() async {
-    await resolveTestUnit('''
-main() {
-  print(0);
-}
-''');
-    await assertNoAssistAt(
-        'print', DartAssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL);
-  }
-
-  test_replaceIfElseWithConditional_BAD_notSingleStatement() async {
-    await resolveTestUnit('''
-main() {
-  int vvv;
-  if (true) {
-    print(0);
-    vvv = 111;
-  } else {
-    print(0);
-    vvv = 222;
-  }
-}
-''');
-    await assertNoAssistAt(
-        'if (true)', DartAssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL);
-  }
-
-  test_replaceIfElseWithConditional_OK_assignment() async {
-    await resolveTestUnit('''
-main() {
-  int vvv;
-  if (true) {
-    vvv = 111;
-  } else {
-    vvv = 222;
-  }
-}
-''');
-    await assertHasAssistAt(
-        'if (true)', DartAssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL, '''
-main() {
-  int vvv;
-  vvv = true ? 111 : 222;
-}
-''');
-  }
-
-  test_replaceIfElseWithConditional_OK_return() async {
-    await resolveTestUnit('''
-main() {
-  if (true) {
-    return 111;
-  } else {
-    return 222;
-  }
-}
-''');
-    await assertHasAssistAt(
-        'if (true)', DartAssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL, '''
-main() {
-  return true ? 111 : 222;
-}
-''');
-  }
-
-  test_splitAndCondition_BAD_hasElse() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(1);
-  } else {
-    print(2);
-  }
-}
-''');
-    await assertNoAssistAt('&& 2', DartAssistKind.SPLIT_AND_CONDITION);
-  }
-
-  test_splitAndCondition_BAD_notAnd() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1 || 2 == 2) {
-    print(0);
-  }
-}
-''');
-    await assertNoAssistAt('|| 2', DartAssistKind.SPLIT_AND_CONDITION);
-  }
-
-  test_splitAndCondition_BAD_notPartOfIf() async {
-    await resolveTestUnit('''
-main() {
-  print(1 == 1 && 2 == 2);
-}
-''');
-    await assertNoAssistAt('&& 2', DartAssistKind.SPLIT_AND_CONDITION);
-  }
-
-  test_splitAndCondition_BAD_notTopLevelAnd() async {
-    await resolveTestUnit('''
-main() {
-  if (true || (1 == 1 && 2 == 2)) {
-    print(0);
-  }
-  if (true && (3 == 3 && 4 == 4)) {
-    print(0);
-  }
-}
-''');
-    await assertNoAssistAt('&& 2', DartAssistKind.SPLIT_AND_CONDITION);
-    await assertNoAssistAt('&& 4', DartAssistKind.SPLIT_AND_CONDITION);
-  }
-
-  test_splitAndCondition_OK_innerAndExpression() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1 && 2 == 2 && 3 == 3) {
-    print(0);
-  }
-}
-''');
-    await assertHasAssistAt('&& 2 == 2', DartAssistKind.SPLIT_AND_CONDITION, '''
-main() {
-  if (1 == 1) {
-    if (2 == 2 && 3 == 3) {
-      print(0);
-    }
-  }
-}
-''');
-  }
-
-  test_splitAndCondition_OK_thenBlock() async {
-    await resolveTestUnit('''
-main() {
-  if (true && false) {
-    print(0);
-    if (3 == 3) {
-      print(1);
-    }
-  }
-}
-''');
-    await assertHasAssistAt('&& false', DartAssistKind.SPLIT_AND_CONDITION, '''
-main() {
-  if (true) {
-    if (false) {
-      print(0);
-      if (3 == 3) {
-        print(1);
-      }
-    }
-  }
-}
-''');
-  }
-
-  test_splitAndCondition_OK_thenStatement() async {
-    await resolveTestUnit('''
-main() {
-  if (true && false)
-    print(0);
-}
-''');
-    await assertHasAssistAt('&& false', DartAssistKind.SPLIT_AND_CONDITION, '''
-main() {
-  if (true)
-    if (false)
-      print(0);
-}
-''');
-  }
-
-  test_splitAndCondition_wrong() async {
-    await resolveTestUnit('''
-main() {
-  if (1 == 1 && 2 == 2) {
-    print(0);
-  }
-  print(3 == 3 && 4 == 4);
-}
-''');
-    // not binary expression
-    await assertNoAssistAt('main() {', DartAssistKind.SPLIT_AND_CONDITION);
-    // selection is not empty and includes more than just operator
-    {
-      length = 5;
-      await assertNoAssistAt('&& 2 == 2', DartAssistKind.SPLIT_AND_CONDITION);
-    }
-  }
-
-  test_splitVariableDeclaration_BAD_notOneVariable() async {
-    await resolveTestUnit('''
-main() {
-  var v = 1, v2;
-}
-''');
-    await assertNoAssistAt('v = 1', DartAssistKind.SPLIT_VARIABLE_DECLARATION);
-  }
-
-  test_splitVariableDeclaration_OK_onName() async {
-    await resolveTestUnit('''
-main() {
-  var v = 1;
-}
-''');
-    await assertHasAssistAt(
-        'v =', DartAssistKind.SPLIT_VARIABLE_DECLARATION, '''
-main() {
-  var v;
-  v = 1;
-}
-''');
-  }
-
-  test_splitVariableDeclaration_OK_onType() async {
-    await resolveTestUnit('''
-main() {
-  int v = 1;
-}
-''');
-    await assertHasAssistAt(
-        'int ', DartAssistKind.SPLIT_VARIABLE_DECLARATION, '''
-main() {
-  int v;
-  v = 1;
-}
-''');
-  }
-
-  test_splitVariableDeclaration_OK_onVar() async {
-    await resolveTestUnit('''
-main() {
-  var v = 1;
-}
-''');
-    await assertHasAssistAt(
-        'var ', DartAssistKind.SPLIT_VARIABLE_DECLARATION, '''
-main() {
-  var v;
-  v = 1;
-}
-''');
-  }
-
-  test_surroundWith_block() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_BLOCK, '''
-main() {
-// start
-  {
-    print(0);
-    print(1);
-  }
-// end
-}
-''');
-  }
-
-  test_surroundWith_doWhile() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_DO_WHILE, '''
-main() {
-// start
-  do {
-    print(0);
-    print(1);
-  } while (condition);
-// end
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['condition);']);
-    _assertExitPosition(after: 'condition);');
-  }
-
-  test_surroundWith_for() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_FOR, '''
-main() {
-// start
-  for (var v = init; condition; increment) {
-    print(0);
-    print(1);
-  }
-// end
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['v =']);
-    _assertLinkedGroup(change.linkedEditGroups[1], ['init;']);
-    _assertLinkedGroup(change.linkedEditGroups[2], ['condition;']);
-    _assertLinkedGroup(change.linkedEditGroups[3], ['increment']);
-    _assertExitPosition(after: '  }');
-  }
-
-  test_surroundWith_forIn() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_FOR_IN, '''
-main() {
-// start
-  for (var item in iterable) {
-    print(0);
-    print(1);
-  }
-// end
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['item']);
-    _assertLinkedGroup(change.linkedEditGroups[1], ['iterable']);
-    _assertExitPosition(after: '  }');
-  }
-
-  test_surroundWith_if() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_IF, '''
-main() {
-// start
-  if (condition) {
-    print(0);
-    print(1);
-  }
-// end
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['condition']);
-    _assertExitPosition(after: '  }');
-  }
-
-  test_surroundWith_tryCatch() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_TRY_CATCH, '''
-main() {
-// start
-  try {
-    print(0);
-    print(1);
-  } on Exception catch (e) {
-    // TODO
-  }
-// end
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Exception']);
-    _assertLinkedGroup(change.linkedEditGroups[1], ['e) {']);
-    _assertLinkedGroup(change.linkedEditGroups[2], ['// TODO']);
-    _assertExitPosition(after: '// TODO');
-  }
-
-  test_surroundWith_tryFinally() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_TRY_FINALLY, '''
-main() {
-// start
-  try {
-    print(0);
-    print(1);
-  } finally {
-    // TODO
-  }
-// end
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['// TODO']);
-    _assertExitPosition(after: '// TODO');
-  }
-
-  test_surroundWith_while() async {
-    await resolveTestUnit('''
-main() {
-// start
-  print(0);
-  print(1);
-// end
-}
-''');
-    _setStartEndSelection();
-    await assertHasAssist(DartAssistKind.SURROUND_WITH_WHILE, '''
-main() {
-// start
-  while (condition) {
-    print(0);
-    print(1);
-  }
-// end
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['condition']);
-    _assertExitPosition(after: '  }');
-  }
-
-  void _assertExitPosition({String before, String after}) {
-    Position exitPosition = change.selection;
-    expect(exitPosition, isNotNull);
-    expect(exitPosition.file, testFile);
-    if (before != null) {
-      expect(exitPosition.offset, resultCode.indexOf(before));
-    } else if (after != null) {
-      expect(exitPosition.offset, resultCode.indexOf(after) + after.length);
-    } else {
-      fail("One of 'before' or 'after' expected.");
-    }
-  }
-
-  /**
-   * Computes assists and verifies that there is an assist of the given kind.
-   */
-  Future<Assist> _assertHasAssist(AssistKind kind) async {
-    List<Assist> assists = await _computeAssists();
-    for (Assist assist in assists) {
-      if (assist.kind == kind) {
-        return assist;
-      }
-    }
-    fail('Expected to find assist $kind in\n${assists.join('\n')}');
-  }
-
-  void _assertLinkedGroup(LinkedEditGroup group, List<String> expectedStrings,
-      [List<LinkedEditSuggestion> expectedSuggestions]) {
-    List<Position> expectedPositions = _findResultPositions(expectedStrings);
-    expect(group.positions, unorderedEquals(expectedPositions));
-    if (expectedSuggestions != null) {
-      expect(group.suggestions, unorderedEquals(expectedSuggestions));
-    }
-  }
-
-  Future<List<Assist>> _computeAssists() async {
-    CompilationUnitElement testUnitElement =
-        resolutionMap.elementDeclaredByCompilationUnit(testUnit);
-    DartAssistContext assistContext;
-    assistContext = new _DartAssistContextForValues(
-        testUnitElement.source, offset, length, driver, testUnit);
-    AssistProcessor processor = new AssistProcessor(assistContext);
-    return await processor.compute();
-  }
-
-  List<Position> _findResultPositions(List<String> searchStrings) {
-    List<Position> positions = <Position>[];
-    for (String search in searchStrings) {
-      int offset = resultCode.indexOf(search);
-      positions.add(new Position(testFile, offset));
-    }
-    return positions;
-  }
-
-  void _setCaretLocation() {
-    offset = findOffset('/*caret*/') + '/*caret*/'.length;
-    length = 0;
-  }
-
-  void _setStartEndSelection() {
-    offset = findOffset('// start\n') + '// start\n'.length;
-    length = findOffset('// end') - offset;
-  }
-}
-
-class _DartAssistContextForValues implements DartAssistContext {
-  @override
-  final Source source;
-
-  @override
-  final int selectionOffset;
-
-  @override
-  final int selectionLength;
-
-  @override
-  final AnalysisDriver analysisDriver;
-
-  @override
-  final CompilationUnit unit;
-
-  _DartAssistContextForValues(this.source, this.selectionOffset,
-      this.selectionLength, this.analysisDriver, this.unit);
-}
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
deleted file mode 100644
index db6d6b7..0000000
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ /dev/null
@@ -1,8840 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
-import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
-import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analysis_server/src/services/correction/fix_internal.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/parser.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart'
-    hide AnalysisError;
-import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../abstract_single_unit.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(FixProcessorTest);
-    defineReflectiveTests(LintFixTest);
-  });
-}
-
-typedef bool AnalysisErrorFilter(AnalysisError error);
-
-/**
- * Base class for fix processor tests.
- */
-class BaseFixProcessorTest extends AbstractSingleUnitTest {
-  AnalysisErrorFilter errorFilter = (AnalysisError error) {
-    return error.errorCode != HintCode.UNUSED_CATCH_CLAUSE &&
-        error.errorCode != HintCode.UNUSED_CATCH_STACK &&
-        error.errorCode != HintCode.UNUSED_ELEMENT &&
-        error.errorCode != HintCode.UNUSED_FIELD &&
-        error.errorCode != HintCode.UNUSED_LOCAL_VARIABLE;
-  };
-
-  String myPkgLibPath = '/packages/my_pkg/lib';
-
-  String flutterPkgLibPath = '/packages/flutter/lib';
-
-  Fix fix;
-
-  SourceChange change;
-  String resultCode;
-
-  assert_undefinedFunction_create_returnType_bool(String lineWithTest) async {
-    await resolveTestUnit('''
-main() {
-  bool b = true;
-  $lineWithTest
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  bool b = true;
-  $lineWithTest
-}
-
-bool test() {
-}
-''');
-  }
-
-  assertHasFix(FixKind kind, String expected, {String target}) async {
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(kind, error);
-    change = fix.change;
-
-    // apply to "file"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-
-    String fileContent = testCode;
-    if (target != null) {
-      expect(fileEdits.first.file, convertPath(target));
-      fileContent = getFile(target).readAsStringSync();
-    }
-
-    resultCode = SourceEdit.applySequence(fileContent, change.edits[0].edits);
-    // verify
-    expect(resultCode, expected);
-  }
-
-  assertHasFixAllFix(ErrorCode errorCode, FixKind kind, String expected,
-      {String target}) async {
-    AnalysisError error = await _findErrorToFixOfType(errorCode);
-    fix = await _assertHasFix(kind, error, hasFixAllFix: true);
-    change = fix.change;
-
-    // apply to "file"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-
-    String fileContent = testCode;
-    if (target != null) {
-      expect(fileEdits.first.file, convertPath(target));
-      fileContent = getFile(target).readAsStringSync();
-    }
-
-    resultCode = SourceEdit.applySequence(fileContent, change.edits[0].edits);
-    // verify
-    expect(resultCode, expected);
-  }
-
-  assertNoFix(FixKind kind) async {
-    AnalysisError error = await _findErrorToFix();
-    await _assertNoFix(kind, error);
-  }
-
-  List<LinkedEditSuggestion> expectedSuggestions(
-      LinkedEditSuggestionKind kind, List<String> values) {
-    return values.map((value) {
-      return new LinkedEditSuggestion(value, kind);
-    }).toList();
-  }
-
-  void setUp() {
-    super.setUp();
-    verifyNoTestUnitErrors = false;
-  }
-
-  /**
-   * Computes fixes and verifies that there is a fix of the given kind.
-   */
-  Future<Fix> _assertHasFix(FixKind kind, AnalysisError error,
-      {bool hasFixAllFix: false}) async {
-    if (hasFixAllFix && !kind.canBeAppliedTogether()) {
-      fail('Expected to find and return fix-all FixKind for $kind, '
-          'but kind.canBeAppliedTogether is ${kind.canBeAppliedTogether}');
-    }
-
-    // Compute the fixes for this AnalysisError
-    final List<Fix> fixes = await _computeFixes(error);
-
-    // If hasFixAllFix is false, assert that none of the fixes are a fix-all fix
-    if (!hasFixAllFix) {
-      for (Fix fix in fixes) {
-        if (fix.isFixAllFix()) {
-          fail('The boolean hasFixAllFix is false, but such a fix was found '
-              'in the computed set of fixes: $fixes, error: $error.');
-        }
-      }
-    }
-    // If hasFixAllFix is true, assert that there exists such a fix in the list
-    else {
-      bool foundFixAllFix = false;
-      for (Fix fix in fixes) {
-        if (fix.isFixAllFix()) {
-          foundFixAllFix = true;
-          break;
-        }
-      }
-      if (!foundFixAllFix) {
-        fail('The boolean hasFixAllFix is true, but no fix-all fix was found '
-            'in the computed set of fixes: $fixes, error: $error.');
-      }
-    }
-
-    Fix foundFix = null;
-    if (!hasFixAllFix) {
-      foundFix = fixes.firstWhere(
-        (fix) => fix.kind == kind && !fix.isFixAllFix(),
-        orElse: () => null,
-      );
-    } else {
-      foundFix = fixes.lastWhere(
-        (fix) => fix.kind == kind && fix.isFixAllFix(),
-        orElse: () => null,
-      );
-    }
-    if (foundFix == null) {
-      fail('Expected to find fix $kind in\n${fixes.join('\n')}, hasFixAllFix = '
-          '$hasFixAllFix');
-    }
-    return foundFix;
-  }
-
-  void _assertLinkedGroup(LinkedEditGroup group, List<String> expectedStrings,
-      [List<LinkedEditSuggestion> expectedSuggestions]) {
-    List<Position> expectedPositions = _findResultPositions(expectedStrings);
-    expect(group.positions, unorderedEquals(expectedPositions));
-    if (expectedSuggestions != null) {
-      expect(group.suggestions, unorderedEquals(expectedSuggestions));
-    }
-  }
-
-  Future _assertNoFix(FixKind kind, AnalysisError error) async {
-    List<Fix> fixes = await _computeFixes(error);
-    for (Fix fix in fixes) {
-      if (fix.kind == kind) {
-        fail('Unexpected fix $kind in\n${fixes.join('\n')}');
-      }
-    }
-  }
-
-  Future<List<AnalysisError>> _computeErrors() async {
-    return (await driver.getResult(convertPath(testFile))).errors;
-  }
-
-  /**
-   * Computes fixes for the given [error] in [testUnit].
-   */
-  Future<List<Fix>> _computeFixes(AnalysisError error) async {
-    DartFixContext fixContext = new _DartFixContextImpl(
-        resourceProvider,
-        driver,
-        new AstProviderForDriver(driver),
-        testUnit,
-        error,
-        await _computeErrors());
-    return await new DefaultFixContributor().internalComputeFixes(fixContext);
-  }
-
-  /**
-   * Configures the [SourceFactory] to have the `my_pkg` package in
-   * `/packages/my_pkg/lib` folder.
-   */
-  void _configureMyPkg(Map<String, String> pathToCode) {
-    pathToCode.forEach((path, code) {
-      newFile('$myPkgLibPath/$path', content: code);
-    });
-    // configure SourceFactory
-    Folder myPkgFolder = getFolder(myPkgLibPath);
-    UriResolver pkgResolver = new PackageMapUriResolver(resourceProvider, {
-      'my_pkg': [myPkgFolder]
-    });
-    SourceFactory sourceFactory = new SourceFactory(
-        [new DartUriResolver(sdk), pkgResolver, resourceResolver]);
-    driver.configure(sourceFactory: sourceFactory);
-    // force 'my_pkg' resolution
-    addSource(
-        '/tmp/other.dart',
-        pathToCode.keys
-            .map((path) => "import 'package:my_pkg/$path';")
-            .join('\n'));
-  }
-
-  Future<AnalysisError> _findErrorToFix() async {
-    List<AnalysisError> errors = await _computeErrors();
-    List<AnalysisError> filteredErrors = errors;
-    if (errorFilter != null) {
-      filteredErrors = filteredErrors.where(errorFilter).toList();
-    }
-    if (filteredErrors.length != 1) {
-      StringBuffer buffer = new StringBuffer();
-      buffer.writeln('Expected one error, found:');
-      for (AnalysisError error in errors) {
-        buffer.writeln('  $error [${error.errorCode}]');
-      }
-      fail(buffer.toString());
-    }
-    return filteredErrors[0];
-  }
-
-  Future<AnalysisError> _findErrorToFixOfType(ErrorCode errorCode) async {
-    List<AnalysisError> errors = await _computeErrors();
-    if (errorFilter != null) {
-      errors = errors.where(errorFilter).toList();
-    }
-    return errors.firstWhere((error) => errorCode == error.errorCode);
-  }
-
-  List<Position> _findResultPositions(List<String> searchStrings) {
-    List<Position> positions = <Position>[];
-    for (String search in searchStrings) {
-      int offset = resultCode.indexOf(search);
-      positions.add(new Position(testFile, offset));
-    }
-    return positions;
-  }
-}
-
-@reflectiveTest
-class FixProcessorTest extends BaseFixProcessorTest {
-  test_addAsync_asyncFor() async {
-    await resolveTestUnit('''
-import 'dart:async';
-void main(Stream<String> names) {
-  await for (String name in names) {
-    print(name);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-import 'dart:async';
-Future main(Stream<String> names) async {
-  await for (String name in names) {
-    print(name);
-  }
-}
-''');
-  }
-
-  test_addAsync_BAD_nullFunctionBody() async {
-    await resolveTestUnit('''
-var F = await;
-''');
-    await assertNoFix(DartFixKind.ADD_ASYNC);
-  }
-
-  test_addAsync_blockFunctionBody() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    };
-    await resolveTestUnit('''
-foo() {}
-main() {
-  await foo();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-foo() {}
-main() async {
-  await foo();
-}
-''');
-  }
-
-  test_addAsync_blockFunctionBody_getter() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    };
-    await resolveTestUnit('''
-int get foo => null;
-int f() {
-  await foo;
-  return 1;
-}
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-import \'dart:async\';
-
-int get foo => null;
-Future<int> f() async {
-  await foo;
-  return 1;
-}
-''');
-  }
-
-  test_addAsync_closure() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
-    };
-    await resolveTestUnit('''
-import 'dart:async';
-
-void takeFutureCallback(Future callback()) {}
-
-void doStuff() => takeFutureCallback(() => await 1);
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-import 'dart:async';
-
-void takeFutureCallback(Future callback()) {}
-
-void doStuff() => takeFutureCallback(() async => await 1);
-''');
-  }
-
-  test_addAsync_expressionFunctionBody() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == ParserErrorCode.UNEXPECTED_TOKEN;
-    };
-    await resolveTestUnit('''
-foo() {}
-main() => await foo();
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-foo() {}
-main() async => await foo();
-''');
-  }
-
-  test_addAsync_returnFuture() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    };
-    await resolveTestUnit('''
-foo() {}
-int main() {
-  await foo();
-  return 42;
-}
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-import 'dart:async';
-
-foo() {}
-Future<int> main() async {
-  await foo();
-  return 42;
-}
-''');
-  }
-
-  test_addAsync_returnFuture_alreadyFuture() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    };
-    await resolveTestUnit('''
-import 'dart:async';
-foo() {}
-Future<int> main() {
-  await foo();
-  return 42;
-}
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-import 'dart:async';
-foo() {}
-Future<int> main() async {
-  await foo();
-  return 42;
-}
-''');
-  }
-
-  test_addAsync_returnFuture_dynamic() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    };
-    await resolveTestUnit('''
-foo() {}
-dynamic main() {
-  await foo();
-  return 42;
-}
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-foo() {}
-dynamic main() async {
-  await foo();
-  return 42;
-}
-''');
-  }
-
-  test_addAsync_returnFuture_noType() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    };
-    await resolveTestUnit('''
-foo() {}
-main() {
-  await foo();
-  return 42;
-}
-''');
-    await assertHasFix(DartFixKind.ADD_ASYNC, '''
-foo() {}
-main() async {
-  await foo();
-  return 42;
-}
-''');
-  }
-
-  test_addExplicitCast_assignment_general() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b;
-  b = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b;
-  b = a as B;
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_general_all() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b, b2;
-  b = a;
-  b2 = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b, b2;
-  b = a as B;
-  b2 = a as B;
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_list() async {
-    await resolveTestUnit('''
-f(List<A> a) {
-  List<B> b;
-  b = a.where((e) => e is B).toList();
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(List<A> a) {
-  List<B> b;
-  b = a.where((e) => e is B).cast<B>().toList();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_list_all() async {
-    await resolveTestUnit('''
-f(List<A> a) {
-  List<B> b, b2;
-  b = a.where((e) => e is B).toList();
-  b2 = a.where((e) => e is B).toList();
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(List<A> a) {
-  List<B> b, b2;
-  b = a.where((e) => e is B).cast<B>().toList();
-  b2 = a.where((e) => e is B).cast<B>().toList();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_map() async {
-    await resolveTestUnit('''
-f(Map<A, B> a) {
-  Map<B, A> b;
-  b = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Map<A, B> a) {
-  Map<B, A> b;
-  b = a.cast<B, A>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_map_all() async {
-    await resolveTestUnit('''
-f(Map<A, B> a) {
-  Map<B, A> b, b2;
-  b = a;
-  b2 = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Map<A, B> a) {
-  Map<B, A> b, b2;
-  b = a.cast<B, A>();
-  b2 = a.cast<B, A>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_needsParens() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b;
-  b = a..m();
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b;
-  b = (a..m()) as B;
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_needsParens_all() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b, b2;
-  b = a..m();
-  b2 = a..m();
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b, b2;
-  b = (a..m()) as B;
-  b2 = (a..m()) as B;
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_set() async {
-    await resolveTestUnit('''
-f(Set<A> a) {
-  Set<B> b;
-  b = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Set<A> a) {
-  Set<B> b;
-  b = a.cast<B>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_assignment_set_all() async {
-    await resolveTestUnit('''
-f(Set<A> a) {
-  Set<B> b, b2;
-  b = a;
-  b2 = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Set<A> a) {
-  Set<B> b, b2;
-  b = a.cast<B>();
-  b2 = a.cast<B>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_BAD_as() async {
-    await resolveTestUnit('''
-f(A a) {
-  C c = a as B;
-}
-class A {}
-class B {}
-class C {}
-''');
-    await assertNoFix(DartFixKind.ADD_EXPLICIT_CAST);
-  }
-
-  test_addExplicitCast_BAD_cast() async {
-    await resolveTestUnit('''
-f(List<A> a) {
-  List<B> b = a.cast<A>();
-}
-class A {}
-class B {}
-''');
-    await assertNoFix(DartFixKind.ADD_EXPLICIT_CAST);
-  }
-
-  test_addExplicitCast_declaration_general() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b = a as B;
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_general_all() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b = a;
-  B b2 = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b = a as B;
-  B b2 = a as B;
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_list() async {
-    await resolveTestUnit('''
-f(List<A> a) {
-  List<B> b = a.where((e) => e is B).toList();
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(List<A> a) {
-  List<B> b = a.where((e) => e is B).cast<B>().toList();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_list_all() async {
-    await resolveTestUnit('''
-f(List<A> a) {
-  List<B> b = a.where((e) => e is B).toList();
-  List<B> b2 = a.where((e) => e is B).toList();
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(List<A> a) {
-  List<B> b = a.where((e) => e is B).cast<B>().toList();
-  List<B> b2 = a.where((e) => e is B).cast<B>().toList();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_map() async {
-    await resolveTestUnit('''
-f(Map<A, B> a) {
-  Map<B, A> b = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Map<A, B> a) {
-  Map<B, A> b = a.cast<B, A>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_map_all() async {
-    await resolveTestUnit('''
-f(Map<A, B> a) {
-  Map<B, A> b = a;
-  Map<B, A> b2 = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Map<A, B> a) {
-  Map<B, A> b = a.cast<B, A>();
-  Map<B, A> b2 = a.cast<B, A>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_needsParens() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b = a..m();
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b = (a..m()) as B;
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_needsParens_all() async {
-    await resolveTestUnit('''
-f(A a) {
-  B b = a..m();
-  B b2 = a..m();
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(A a) {
-  B b = (a..m()) as B;
-  B b2 = (a..m()) as B;
-}
-class A {
-  int m() => 0;
-}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_set() async {
-    await resolveTestUnit('''
-f(Set<A> a) {
-  Set<B> b = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFix(DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Set<A> a) {
-  Set<B> b = a.cast<B>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addExplicitCast_declaration_set_all() async {
-    await resolveTestUnit('''
-f(Set<A> a) {
-  Set<B> b = a;
-  Set<B> b2 = a;
-}
-class A {}
-class B {}
-''');
-    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        DartFixKind.ADD_EXPLICIT_CAST, '''
-f(Set<A> a) {
-  Set<B> b = a.cast<B>();
-  Set<B> b2 = a.cast<B>();
-}
-class A {}
-class B {}
-''');
-  }
-
-  test_addFieldFormalParameters_flutter() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final int b;
-  final int c;
-
-  MyWidget({Key key, this.a}) : super(key: key);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final int b;
-  final int c;
-
-  MyWidget({Key key, this.a, this.b, this.c}) : super(key: key);
-}
-''');
-  }
-
-  test_addFieldFormalParameters_hasRequiredParameter() async {
-    await resolveTestUnit('''
-class Test {
-  final int a;
-  final int b;
-  final int c;
-  Test(this.a);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
-class Test {
-  final int a;
-  final int b;
-  final int c;
-  Test(this.a, this.b, this.c);
-}
-''');
-  }
-
-  test_addFieldFormalParameters_noParameters() async {
-    await resolveTestUnit('''
-class Test {
-  final int a;
-  final int b;
-  final int c;
-  Test();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
-class Test {
-  final int a;
-  final int b;
-  final int c;
-  Test(this.a, this.b, this.c);
-}
-''');
-  }
-
-  test_addFieldFormalParameters_noRequiredParameter() async {
-    await resolveTestUnit('''
-class Test {
-  final int a;
-  final int b;
-  final int c;
-  Test([this.c]);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
-class Test {
-  final int a;
-  final int b;
-  final int c;
-  Test(this.a, this.b, [this.c]);
-}
-''');
-  }
-
-  test_addFieldFormalParameters_notAllFinal() async {
-    await resolveTestUnit('''
-class Test {
-  final int a;
-  int b;
-  final int c;
-  Test();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
-class Test {
-  final int a;
-  int b;
-  final int c;
-  Test(this.a, this.c);
-}
-''');
-  }
-
-  test_addMissingParameter_constructor_named_required_hasOne() async {
-    await resolveTestUnit('''
-class A {
-  A.named(int a) {}
-}
-main() {
-  new A.named(1, 2.0);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_REQUIRED, '''
-class A {
-  A.named(int a, double d) {}
-}
-main() {
-  new A.named(1, 2.0);
-}
-''');
-  }
-
-  test_addMissingParameter_constructor_unnamed_required_hasOne() async {
-    await resolveTestUnit('''
-class A {
-  A(int a) {}
-}
-main() {
-  new A(1, 2.0);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_REQUIRED, '''
-class A {
-  A(int a, double d) {}
-}
-main() {
-  new A(1, 2.0);
-}
-''');
-  }
-
-  test_addMissingParameter_function_positional_hasNamed() async {
-    await resolveTestUnit('''
-test({int a}) {}
-main() {
-  test(1);
-}
-''');
-    await assertNoFix(DartFixKind.ADD_MISSING_PARAMETER_POSITIONAL);
-  }
-
-  test_addMissingParameter_function_positional_hasZero() async {
-    await resolveTestUnit('''
-test() {}
-main() {
-  test(1);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_POSITIONAL, '''
-test([int i]) {}
-main() {
-  test(1);
-}
-''');
-  }
-
-  test_addMissingParameter_function_required_hasNamed() async {
-    await resolveTestUnit('''
-test({int a}) {}
-main() {
-  test(1);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_REQUIRED, '''
-test(int i, {int a}) {}
-main() {
-  test(1);
-}
-''');
-  }
-
-  test_addMissingParameter_function_required_hasOne() async {
-    await resolveTestUnit('''
-test(int a) {}
-main() {
-  test(1, 2.0);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_REQUIRED, '''
-test(int a, double d) {}
-main() {
-  test(1, 2.0);
-}
-''');
-  }
-
-  test_addMissingParameter_function_required_hasZero() async {
-    await resolveTestUnit('''
-test() {}
-main() {
-  test(1);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_REQUIRED, '''
-test(int i) {}
-main() {
-  test(1);
-}
-''');
-  }
-
-  test_addMissingParameter_method_positional_hasOne() async {
-    await resolveTestUnit('''
-class A {
-  test(int a) {}
-  main() {
-    test(1, 2.0);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_POSITIONAL, '''
-class A {
-  test(int a, [double d]) {}
-  main() {
-    test(1, 2.0);
-  }
-}
-''');
-  }
-
-  test_addMissingParameter_method_required_hasOne() async {
-    await resolveTestUnit('''
-class A {
-  test(int a) {}
-  main() {
-    test(1, 2.0);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_REQUIRED, '''
-class A {
-  test(int a, double d) {}
-  main() {
-    test(1, 2.0);
-  }
-}
-''');
-  }
-
-  test_addMissingParameter_method_required_hasZero() async {
-    await resolveTestUnit('''
-class A {
-  test() {}
-  main() {
-    test(1);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_REQUIRED, '''
-class A {
-  test(int i) {}
-  main() {
-    test(1);
-  }
-}
-''');
-  }
-
-  test_addMissingParameterNamed_constructor_hasNamed() async {
-    await resolveTestUnit('''
-class A {
-  A(int a, {int b}) {}
-}
-
-main() {
-  new A(1, b: 2, named: 3.0);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-class A {
-  A(int a, {int b, double named}) {}
-}
-
-main() {
-  new A(1, b: 2, named: 3.0);
-}
-''');
-  }
-
-  test_addMissingParameterNamed_constructor_hasRequired() async {
-    await resolveTestUnit('''
-class A {
-  A(int a) {}
-}
-
-main() {
-  new A(1, named: 2.0);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-class A {
-  A(int a, {double named}) {}
-}
-
-main() {
-  new A(1, named: 2.0);
-}
-''');
-  }
-
-  test_addMissingParameterNamed_constructor_noParameters() async {
-    await resolveTestUnit('''
-class A {
-  A() {}
-}
-
-main() {
-  new A(named: 42);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-class A {
-  A({int named}) {}
-}
-
-main() {
-  new A(named: 42);
-}
-''');
-  }
-
-  test_addMissingParameterNamed_constructor_noParameters_named() async {
-    await resolveTestUnit('''
-class A {
-  A.aaa() {}
-}
-
-main() {
-  new A.aaa(named: 42);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-class A {
-  A.aaa({int named}) {}
-}
-
-main() {
-  new A.aaa(named: 42);
-}
-''');
-  }
-
-  test_addMissingParameterNamed_function_hasNamed() async {
-    await resolveTestUnit('''
-test(int a, {int b: 0}) {}
-
-main() {
-  test(1, b: 2, named: 3.0);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-test(int a, {int b: 0, double named}) {}
-
-main() {
-  test(1, b: 2, named: 3.0);
-}
-''');
-  }
-
-  test_addMissingParameterNamed_function_hasRequired() async {
-    await resolveTestUnit('''
-test(int a) {}
-
-main() {
-  test(1, named: 2.0);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-test(int a, {double named}) {}
-
-main() {
-  test(1, named: 2.0);
-}
-''');
-  }
-
-  test_addMissingParameterNamed_function_noParameters() async {
-    await resolveTestUnit('''
-test() {}
-
-main() {
-  test(named: 42);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-test({int named}) {}
-
-main() {
-  test(named: 42);
-}
-''');
-  }
-
-  test_addMissingParameterNamed_method_hasNamed() async {
-    await resolveTestUnit('''
-class A {
-  test(int a, {int b: 0}) {}
-
-  main() {
-    test(1, b: 2, named: 3.0);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-class A {
-  test(int a, {int b: 0, double named}) {}
-
-  main() {
-    test(1, b: 2, named: 3.0);
-  }
-}
-''');
-  }
-
-  test_addMissingParameterNamed_method_hasOptionalPositional() async {
-    await resolveTestUnit('''
-class A {
-  test(int a, [int b]) {}
-
-  main() {
-    test(1, 2, named: 3.0);
-  }
-}
-''');
-    await assertNoFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED);
-  }
-
-  test_addMissingParameterNamed_method_hasRequired() async {
-    await resolveTestUnit('''
-class A {
-  test(int a) {}
-
-  main() {
-    test(1, named: 2.0);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-class A {
-  test(int a, {double named}) {}
-
-  main() {
-    test(1, named: 2.0);
-  }
-}
-''');
-  }
-
-  test_addMissingParameterNamed_method_noParameters() async {
-    await resolveTestUnit('''
-class A {
-  test() {}
-
-  main() {
-    test(named: 42);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_PARAMETER_NAMED, '''
-class A {
-  test({int named}) {}
-
-  main() {
-    test(named: 42);
-  }
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_flutter_children() async {
-    addFlutterPackage();
-    _addMetaPackageSource();
-
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-import 'package:meta/meta.dart';
-
-class MyWidget extends Widget {
-  MyWidget({@required List<Widget> children});
-}
-
-build() {
-  return new MyWidget();
-}
-''');
-
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'package:flutter/widgets.dart';
-import 'package:meta/meta.dart';
-
-class MyWidget extends Widget {
-  MyWidget({@required List<Widget> children});
-}
-
-build() {
-  return new MyWidget(children: <Widget>[],);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_flutter_hasTrailingComma() async {
-    addFlutterPackage();
-    _addMetaPackageSource();
-
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-import 'package:meta/meta.dart';
-
-class MyWidget extends Widget {
-  MyWidget({@required int a, @required int b});
-}
-
-build() {
-  return new MyWidget(a: 1,);
-}
-''');
-
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'package:flutter/widgets.dart';
-import 'package:meta/meta.dart';
-
-class MyWidget extends Widget {
-  MyWidget({@required int a, @required int b});
-}
-
-build() {
-  return new MyWidget(a: 1, b: null,);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_single() async {
-    _addMetaPackageSource();
-    addSource('/project/libA.dart', r'''
-library libA;
-import 'package:meta/meta.dart';
-
-class A {
-  A({@required int a}) {}
-}
-''');
-
-    await resolveTestUnit('''
-import 'libA.dart';
-
-main() {
-  A a = new A();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'libA.dart';
-
-main() {
-  A a = new A(a: null);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_single_closure() async {
-    _addMetaPackageSource();
-
-    addSource('/project/libA.dart', r'''
-library libA;
-import 'package:meta/meta.dart';
-
-typedef void VoidCallback();
-
-class A {
-  A({@required VoidCallback onPressed}) {}
-}
-''');
-
-    await resolveTestUnit('''
-import 'libA.dart';
-
-main() {
-  A a = new A();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'libA.dart';
-
-main() {
-  A a = new A(onPressed: () {});
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_single_closure_2() async {
-    _addMetaPackageSource();
-
-    addSource('/project/libA.dart', r'''
-library libA;
-import 'package:meta/meta.dart';
-
-typedef void Callback(e);
-
-class A {
-  A({@required Callback callback}) {}
-}
-''');
-
-    await resolveTestUnit('''
-import 'libA.dart';
-
-main() {
-  A a = new A();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'libA.dart';
-
-main() {
-  A a = new A(callback: (e) {});
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_single_closure_3() async {
-    _addMetaPackageSource();
-
-    addSource('/project/libA.dart', r'''
-library libA;
-import 'package:meta/meta.dart';
-
-typedef void Callback(a,b,c);
-
-class A {
-  A({@required Callback callback}) {}
-}
-''');
-
-    await resolveTestUnit('''
-import 'libA.dart';
-
-main() {
-  A a = new A();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'libA.dart';
-
-main() {
-  A a = new A(callback: (a, b, c) {});
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_single_closure_4() async {
-    _addMetaPackageSource();
-
-    addSource('/project/libA.dart', r'''
-library libA;
-import 'package:meta/meta.dart';
-
-typedef int Callback(int a, String b,c);
-
-class A {
-  A({@required Callback callback}) {}
-}
-''');
-
-    await resolveTestUnit('''
-import 'libA.dart';
-
-main() {
-  A a = new A();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'libA.dart';
-
-main() {
-  A a = new A(callback: (int a, String b, c) {});
-}
-''');
-  }
-
-  test_addMissingRequiredArg_cons_single_list() async {
-    _addMetaPackageSource();
-
-    addSource('/project/libA.dart', r'''
-library libA;
-import 'package:meta/meta.dart';
-
-class A {
-  A({@required List<String> names}) {}
-}
-''');
-
-    await resolveTestUnit('''
-import 'libA.dart';
-
-main() {
-  A a = new A();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'libA.dart';
-
-main() {
-  A a = new A(names: <String>[]);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_multiple() async {
-    _addMetaPackageSource();
-
-    await resolveTestUnit('''
-import 'package:meta/meta.dart';
-
-test({@required int a, @required int bcd}) {}
-main() {
-  test(a: 3);
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'package:meta/meta.dart';
-
-test({@required int a, @required int bcd}) {}
-main() {
-  test(a: 3, bcd: null);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_multiple_2() async {
-    _addMetaPackageSource();
-
-    await resolveTestUnit('''
-import 'package:meta/meta.dart';
-
-test({@required int a, @required int bcd}) {}
-main() {
-  test();
-}
-''');
-
-    // For now we expect one error per missing arg (dartbug.com/28830).
-    List<AnalysisError> errors = await _computeErrors();
-    expect(errors, hasLength(2));
-
-    List<AnalysisError> filteredErrors = errors
-        .where((e) => e.message == "The parameter 'a' is required.")
-        .toList();
-    expect(filteredErrors, hasLength(1));
-
-    List<Fix> fixes = await _computeFixes(filteredErrors.first);
-
-    List<Fix> filteredFixes = fixes
-        .where((fix) => fix.change.message == "Add required argument 'a'")
-        .toList();
-    expect(filteredFixes, hasLength(1));
-    change = filteredFixes.first.change;
-    resultCode = SourceEdit.applySequence(testCode, change.edits[0].edits);
-    // verify
-    expect(resultCode, '''
-import 'package:meta/meta.dart';
-
-test({@required int a, @required int bcd}) {}
-main() {
-  test(a: null);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_single() async {
-    _addMetaPackageSource();
-
-    await resolveTestUnit('''
-import 'package:meta/meta.dart';
-
-test({@required int abc}) {}
-main() {
-  test();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'package:meta/meta.dart';
-
-test({@required int abc}) {}
-main() {
-  test(abc: null);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_single_normal() async {
-    _addMetaPackageSource();
-
-    await resolveTestUnit('''
-import 'package:meta/meta.dart';
-
-test(String x, {@required int abc}) {}
-main() {
-  test("foo");
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'package:meta/meta.dart';
-
-test(String x, {@required int abc}) {}
-main() {
-  test("foo", abc: null);
-}
-''');
-  }
-
-  test_addMissingRequiredArg_single_with_details() async {
-    _addMetaPackageSource();
-
-    await resolveTestUnit('''
-import 'package:meta/meta.dart';
-
-test({@Required("Really who doesn't need an abc?") int abc}) {}
-main() {
-  test();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT, '''
-import 'package:meta/meta.dart';
-
-test({@Required("Really who doesn't need an abc?") int abc}) {}
-main() {
-  test(abc: null);
-}
-''');
-  }
-
-  test_addStatic_multipleFields() async {
-    await resolveTestUnit('''
-class C {
-  const int x = 0, y = 0;
-}
-''');
-    await assertHasFix(DartFixKind.ADD_STATIC, '''
-class C {
-  static const int x = 0, y = 0;
-}
-''');
-  }
-
-  test_addStatic_oneField() async {
-    await resolveTestUnit('''
-class C {
-  const int x = 0;
-}
-''');
-    await assertHasFix(DartFixKind.ADD_STATIC, '''
-class C {
-  static const int x = 0;
-}
-''');
-  }
-
-  test_boolean() async {
-    await resolveTestUnit('''
-main() {
-  boolean v;
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_BOOLEAN_WITH_BOOL, '''
-main() {
-  bool v;
-}
-''');
-  }
-
-  test_boolean_all() async {
-    await resolveTestUnit('''
-main() {
-  boolean v;
-  boolean w;
-}
-''');
-    await assertHasFixAllFix(StaticWarningCode.UNDEFINED_CLASS_BOOLEAN,
-        DartFixKind.REPLACE_BOOLEAN_WITH_BOOL, '''
-main() {
-  bool v;
-  bool w;
-}
-''');
-  }
-
-  test_canBeNullAfterNullAware_chain() async {
-    await resolveTestUnit('''
-main(x) {
-  x?.a.b.c;
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_WITH_NULL_AWARE, '''
-main(x) {
-  x?.a?.b?.c;
-}
-''');
-  }
-
-  test_canBeNullAfterNullAware_methodInvocation() async {
-    await resolveTestUnit('''
-main(x) {
-  x?.a.b();
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_WITH_NULL_AWARE, '''
-main(x) {
-  x?.a?.b();
-}
-''');
-  }
-
-  test_canBeNullAfterNullAware_propertyAccess() async {
-    await resolveTestUnit('''
-main(x) {
-  x?.a().b;
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_WITH_NULL_AWARE, '''
-main(x) {
-  x?.a()?.b;
-}
-''');
-  }
-
-  test_changeToStaticAccess_method() async {
-    await resolveTestUnit('''
-class A {
-  static foo() {}
-}
-main(A a) {
-  a.foo();
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_STATIC_ACCESS, '''
-class A {
-  static foo() {}
-}
-main(A a) {
-  A.foo();
-}
-''');
-  }
-
-  test_changeToStaticAccess_method_importType() async {
-    addSource('/project/libA.dart', r'''
-library libA;
-class A {
-  static foo() {}
-}
-''');
-    addSource('/project/libB.dart', r'''
-library libB;
-import 'libA.dart';
-class B extends A {}
-''');
-    await resolveTestUnit('''
-import 'libB.dart';
-main(B b) {
-  b.foo();
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_STATIC_ACCESS, '''
-import 'libA.dart';
-import 'libB.dart';
-main(B b) {
-  A.foo();
-}
-''');
-  }
-
-  test_changeToStaticAccess_method_prefixLibrary() async {
-    await resolveTestUnit('''
-import 'dart:async' as pref;
-main(pref.Future f) {
-  f.wait([]);
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_STATIC_ACCESS, '''
-import 'dart:async' as pref;
-main(pref.Future f) {
-  pref.Future.wait([]);
-}
-''');
-  }
-
-  test_changeToStaticAccess_property() async {
-    await resolveTestUnit('''
-class A {
-  static get foo => 42;
-}
-main(A a) {
-  a.foo;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_STATIC_ACCESS, '''
-class A {
-  static get foo => 42;
-}
-main(A a) {
-  A.foo;
-}
-''');
-  }
-
-  test_changeToStaticAccess_property_importType() async {
-    addSource('/project/libA.dart', r'''
-library libA;
-class A {
-  static get foo => null;
-}
-''');
-    addSource('/project/libB.dart', r'''
-library libB;
-import 'libA.dart';
-class B extends A {}
-''');
-    await resolveTestUnit('''
-import 'libB.dart';
-main(B b) {
-  b.foo;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_STATIC_ACCESS, '''
-import 'libA.dart';
-import 'libB.dart';
-main(B b) {
-  A.foo;
-}
-''');
-  }
-
-  test_changeTypeAnnotation_BAD_multipleVariables() async {
-    await resolveTestUnit('''
-main() {
-  String a, b = 42;
-}
-''');
-    await assertNoFix(DartFixKind.CHANGE_TYPE_ANNOTATION);
-  }
-
-  test_changeTypeAnnotation_BAD_notVariableDeclaration() async {
-    await resolveTestUnit('''
-main() {
-  String v;
-  v = 42;
-}
-''');
-    await assertNoFix(DartFixKind.CHANGE_TYPE_ANNOTATION);
-  }
-
-  test_changeTypeAnnotation_OK_generic() async {
-    await resolveTestUnit('''
-main() {
-  String v = <int>[];
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TYPE_ANNOTATION, '''
-main() {
-  List<int> v = <int>[];
-}
-''');
-  }
-
-  test_changeTypeAnnotation_OK_simple() async {
-    await resolveTestUnit('''
-main() {
-  String v = 'abc'.length;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TYPE_ANNOTATION, '''
-main() {
-  int v = 'abc'.length;
-}
-''');
-  }
-
-  test_convertToNamedArguments_BAD_ambiguous() async {
-    await resolveTestUnit('''
-class A {
-  A({int a, int b});
-}
-
-main() {
-  new A(1, 2);
-}
-''');
-    await assertNoFix(DartFixKind.CONVERT_TO_NAMED_ARGUMENTS);
-  }
-
-  test_convertToNamedArguments_BAD_noCompatibleParameter() async {
-    await resolveTestUnit('''
-class A {
-  A({String a});
-}
-
-main() {
-  new A(1);
-}
-''');
-    await assertNoFix(DartFixKind.CONVERT_TO_NAMED_ARGUMENTS);
-  }
-
-  test_convertToNamedArguments_OK_instanceCreation() async {
-    await resolveTestUnit('''
-class A {
-  A({int a, double b});
-}
-
-main() {
-  new A(1.2, 3);
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_TO_NAMED_ARGUMENTS, '''
-class A {
-  A({int a, double b});
-}
-
-main() {
-  new A(b: 1.2, a: 3);
-}
-''');
-  }
-
-  test_convertToNamedArguments_OK_instanceCreation_hasPositional() async {
-    await resolveTestUnit('''
-class A {
-  A(int a, {int b});
-}
-
-main() {
-  new A(1, 2);
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_TO_NAMED_ARGUMENTS, '''
-class A {
-  A(int a, {int b});
-}
-
-main() {
-  new A(1, b: 2);
-}
-''');
-  }
-
-  test_convertToNamedArguments_OK_methodInvocation() async {
-    await resolveTestUnit('''
-class C {
-  void foo({int a}) {}
-}
-
-main(C c) {
-  c.foo(1);
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_TO_NAMED_ARGUMENTS, '''
-class C {
-  void foo({int a}) {}
-}
-
-main(C c) {
-  c.foo(a: 1);
-}
-''');
-  }
-
-  test_createClass() async {
-    await resolveTestUnit('''
-main() {
-  Test v = null;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CLASS, '''
-main() {
-  Test v = null;
-}
-
-class Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
-  }
-
-  test_createClass_BAD_hasUnresolvedPrefix() async {
-    await resolveTestUnit('''
-main() {
-  prefix.Test v = null;
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_CLASS);
-  }
-
-  test_createClass_inLibraryOfPrefix() async {
-    String libCode = r'''
-library my.lib;
-
-class A {}
-''';
-    addSource('/project/lib.dart', libCode);
-    await resolveTestUnit('''
-import 'lib.dart' as lib;
-
-main() {
-  lib.A a = null;
-  lib.Test t = null;
-}
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_CLASS, error);
-    change = fix.change;
-    // apply to "lib.dart"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file, convertPath('/project/lib.dart'));
-    expect(SourceEdit.applySequence(libCode, fileEdit.edits), r'''
-library my.lib;
-
-class A {}
-
-class Test {
-}
-''');
-    expect(change.linkedEditGroups, hasLength(1));
-  }
-
-  test_createClass_innerLocalFunction() async {
-    await resolveTestUnit('''
-f() {
-  g() {
-    Test v = null;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CLASS, '''
-f() {
-  g() {
-    Test v = null;
-  }
-}
-
-class Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
-  }
-
-  test_createClass_instanceCreation_withoutNew_fromFunction() async {
-    await resolveTestUnit('''
-main() {
-  Test ();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CLASS, '''
-main() {
-  Test ();
-}
-
-class Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test ()', 'Test {']);
-  }
-
-  test_createClass_instanceCreation_withoutNew_fromMethod() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    Test ();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CLASS, '''
-class A {
-  main() {
-    Test ();
-  }
-}
-
-class Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test ()', 'Test {']);
-  }
-
-  test_createClass_itemOfList() async {
-    await resolveTestUnit('''
-main() {
-  var a = [Test];
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CLASS, '''
-main() {
-  var a = [Test];
-}
-
-class Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test];', 'Test {']);
-  }
-
-  test_createClass_itemOfList_inAnnotation() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
-    };
-    await resolveTestUnit('''
-class MyAnnotation {
-  const MyAnnotation(a, b);
-}
-@MyAnnotation(int, const [Test])
-main() {}
-''');
-    await assertHasFix(DartFixKind.CREATE_CLASS, '''
-class MyAnnotation {
-  const MyAnnotation(a, b);
-}
-@MyAnnotation(int, const [Test])
-main() {}
-
-class Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test])', 'Test {']);
-  }
-
-  test_createConstructor_forFinalFields() async {
-    errorFilter = (AnalysisError error) {
-      return error.message.contains("'a'");
-    };
-    await resolveTestUnit('''
-class Test {
-  final int a;
-  final int b = 2;
-  final int c;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS, '''
-class Test {
-  final int a;
-  final int b = 2;
-  final int c;
-
-  Test(this.a, this.c);
-}
-''');
-  }
-
-  test_createConstructor_forFinalFields_flutter() async {
-    addFlutterPackage();
-    errorFilter = (AnalysisError error) {
-      return error.message.contains("'a'");
-    };
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final int b = 2;
-  final int c;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS, '''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final int b = 2;
-  final int c;
-
-  const MyWidget({Key key, this.a, this.c}) : super(key: key);
-}
-''');
-  }
-
-  test_createConstructor_forFinalFields_flutter_childLast() async {
-    addFlutterPackage();
-    errorFilter = (AnalysisError error) {
-      return error.message.contains("'a'");
-    };
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final Widget child;
-  final int b;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS, '''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final Widget child;
-  final int b;
-
-  const MyWidget({Key key, this.a, this.b, this.child}) : super(key: key);
-}
-''');
-  }
-
-  test_createConstructor_forFinalFields_flutter_childrenLast() async {
-    addFlutterPackage();
-    errorFilter = (AnalysisError error) {
-      return error.message.contains("'a'");
-    };
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final List<Widget> children;
-  final int b;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS, '''
-import 'package:flutter/widgets.dart';
-
-class MyWidget extends StatelessWidget {
-  final int a;
-  final List<Widget> children;
-  final int b;
-
-  const MyWidget({Key key, this.a, this.b, this.children}) : super(key: key);
-}
-''');
-  }
-
-  test_createConstructor_insteadOfSyntheticDefault() async {
-    await resolveTestUnit('''
-class A {
-  int field;
-
-  method() {}
-}
-main() {
-  new A(1, 2.0);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR, '''
-class A {
-  int field;
-
-  A(int i, double d);
-
-  method() {}
-}
-main() {
-  new A(1, 2.0);
-}
-''');
-  }
-
-  test_createConstructor_named() async {
-    await resolveTestUnit('''
-class A {
-  method() {}
-}
-main() {
-  new A.named(1, 2.0);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR, '''
-class A {
-  A.named(int i, double d);
-
-  method() {}
-}
-main() {
-  new A.named(1, 2.0);
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['named(int ', 'named(1']);
-  }
-
-  test_createConstructor_named_emptyClassBody() async {
-    await resolveTestUnit('''
-class A {}
-main() {
-  new A.named(1);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR, '''
-class A {
-  A.named(int i);
-}
-main() {
-  new A.named(1);
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['named(int ', 'named(1']);
-  }
-
-  test_createConstructorForFinalFields_inTopLevelMethod() async {
-    await resolveTestUnit('''
-main() {
-  final int v;
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS);
-  }
-
-  test_createConstructorForFinalFields_topLevelField() async {
-    await resolveTestUnit('''
-final int v;
-''');
-    await assertNoFix(DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS);
-  }
-
-  test_createConstructorSuperExplicit() async {
-    await resolveTestUnit('''
-class A {
-  A(bool p1, int p2, double p3, String p4, {p5});
-}
-class B extends A {
-  B() {}
-}
-''');
-    await assertHasFix(DartFixKind.ADD_SUPER_CONSTRUCTOR_INVOCATION, '''
-class A {
-  A(bool p1, int p2, double p3, String p4, {p5});
-}
-class B extends A {
-  B() : super(false, 0, 0.0, '') {}
-}
-''');
-  }
-
-  test_createConstructorSuperExplicit_hasInitializers() async {
-    await resolveTestUnit('''
-class A {
-  A(int p);
-}
-class B extends A {
-  int field;
-  B() : field = 42 {}
-}
-''');
-    await assertHasFix(DartFixKind.ADD_SUPER_CONSTRUCTOR_INVOCATION, '''
-class A {
-  A(int p);
-}
-class B extends A {
-  int field;
-  B() : field = 42, super(0) {}
-}
-''');
-  }
-
-  test_createConstructorSuperExplicit_named() async {
-    await resolveTestUnit('''
-class A {
-  A.named(int p);
-}
-class B extends A {
-  B() {}
-}
-''');
-    await assertHasFix(DartFixKind.ADD_SUPER_CONSTRUCTOR_INVOCATION, '''
-class A {
-  A.named(int p);
-}
-class B extends A {
-  B() : super.named(0) {}
-}
-''');
-  }
-
-  test_createConstructorSuperExplicit_named_private() async {
-    await resolveTestUnit('''
-class A {
-  A._named(int p);
-}
-class B extends A {
-  B() {}
-}
-''');
-    await assertNoFix(DartFixKind.ADD_SUPER_CONSTRUCTOR_INVOCATION);
-  }
-
-  test_createConstructorSuperExplicit_typeArgument() async {
-    await resolveTestUnit('''
-class A<T> {
-  A(T p);
-}
-class B extends A<int> {
-  B();
-}
-''');
-    await assertHasFix(DartFixKind.ADD_SUPER_CONSTRUCTOR_INVOCATION, '''
-class A<T> {
-  A(T p);
-}
-class B extends A<int> {
-  B() : super(0);
-}
-''');
-  }
-
-  test_createConstructorSuperImplicit() async {
-    await resolveTestUnit('''
-class A {
-  A(p1, int p2, List<String> p3, [int p4]);
-}
-class B extends A {
-  int existingField;
-
-  void existingMethod() {}
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_SUPER, '''
-class A {
-  A(p1, int p2, List<String> p3, [int p4]);
-}
-class B extends A {
-  int existingField;
-
-  B(p1, int p2, List<String> p3) : super(p1, p2, p3);
-
-  void existingMethod() {}
-}
-''');
-  }
-
-  test_createConstructorSuperImplicit_fieldInitializer() async {
-    await resolveTestUnit('''
-class A {
-  int _field;
-  A(this._field);
-}
-class B extends A {
-  int existingField;
-
-  void existingMethod() {}
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_SUPER, '''
-class A {
-  int _field;
-  A(this._field);
-}
-class B extends A {
-  int existingField;
-
-  B(int field) : super(field);
-
-  void existingMethod() {}
-}
-''');
-  }
-
-  test_createConstructorSuperImplicit_importType() async {
-    addSource('/project/libA.dart', r'''
-library libA;
-class A {}
-''');
-    addSource('/project/libB.dart', r'''
-library libB;
-import 'libA.dart';
-class B {
-  B(A a);
-}
-''');
-    await resolveTestUnit('''
-import 'libB.dart';
-class C extends B {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_SUPER, '''
-import 'libA.dart';
-import 'libB.dart';
-class C extends B {
-  C(A a) : super(a);
-}
-''');
-  }
-
-  test_createConstructorSuperImplicit_named() async {
-    await resolveTestUnit('''
-class A {
-  A.named(p1, int p2);
-}
-class B extends A {
-  int existingField;
-
-  void existingMethod() {}
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_SUPER, '''
-class A {
-  A.named(p1, int p2);
-}
-class B extends A {
-  int existingField;
-
-  B.named(p1, int p2) : super.named(p1, p2);
-
-  void existingMethod() {}
-}
-''');
-  }
-
-  test_createConstructorSuperImplicit_private() async {
-    await resolveTestUnit('''
-class A {
-  A._named(p);
-}
-class B extends A {
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_CONSTRUCTOR_SUPER);
-  }
-
-  test_createConstructorSuperImplicit_typeArgument() async {
-    await resolveTestUnit('''
-class C<T> {
-  final T x;
-  C(this.x);
-}
-class D extends C<int> {
-}''');
-    await assertHasFix(DartFixKind.CREATE_CONSTRUCTOR_SUPER, '''
-class C<T> {
-  final T x;
-  C(this.x);
-}
-class D extends C<int> {
-  D(int x) : super(x);
-}''');
-  }
-
-  test_createField_BAD_inEnum() async {
-    await resolveTestUnit('''
-enum MyEnum {
-  AAA, BBB
-}
-main() {
-  MyEnum.foo;
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_FIELD);
-  }
-
-  test_createField_BAD_inSDK() async {
-    await resolveTestUnit('''
-main(List p) {
-  p.foo = 1;
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_FIELD);
-  }
-
-  test_createField_getter_multiLevel() async {
-    await resolveTestUnit('''
-class A {
-}
-class B {
-  A a;
-}
-class C {
-  B b;
-}
-main(C c) {
-  int v = c.b.a.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-}
-class B {
-  A a;
-}
-class C {
-  B b;
-}
-main(C c) {
-  int v = c.b.a.test;
-}
-''');
-  }
-
-  test_createField_getter_qualified_instance() async {
-    await resolveTestUnit('''
-class A {
-}
-main(A a) {
-  int v = a.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-}
-main(A a) {
-  int v = a.test;
-}
-''');
-  }
-
-  test_createField_getter_qualified_instance_differentLibrary() async {
-    addSource('/project/other.dart', '''
-/**
- * A comment to push the offset of the braces for the following class
- * declaration past the end of the content of the test file. Used to catch an
- * index out of bounds exception that occurs when using the test source instead
- * of the target source to compute the location at which to insert the field.
- */
-class A {
-}
-''');
-    await resolveTestUnit('''
-import 'other.dart';
-main(A a) {
-  int v = a.test;
-}
-''');
-    await assertHasFix(
-        DartFixKind.CREATE_FIELD,
-        '''
-/**
- * A comment to push the offset of the braces for the following class
- * declaration past the end of the content of the test file. Used to catch an
- * index out of bounds exception that occurs when using the test source instead
- * of the target source to compute the location at which to insert the field.
- */
-class A {
-  int test;
-}
-''',
-        target: '/project/other.dart');
-  }
-
-  test_createField_getter_qualified_instance_dynamicType() async {
-    await resolveTestUnit('''
-class A {
-  B b;
-  void f(Object p) {
-    p == b.test;
-  }
-}
-class B {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  B b;
-  void f(Object p) {
-    p == b.test;
-  }
-}
-class B {
-  var test;
-}
-''');
-  }
-
-  test_createField_getter_qualified_propagatedType() async {
-    await resolveTestUnit('''
-class A {
-  A get self => this;
-}
-main() {
-  var a = new A();
-  int v = a.self.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-
-  A get self => this;
-}
-main() {
-  var a = new A();
-  int v = a.self.test;
-}
-''');
-  }
-
-  test_createField_getter_unqualified_instance_asInvocationArgument() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    f(test);
-  }
-}
-f(String s) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  String test;
-
-  main() {
-    f(test);
-  }
-}
-f(String s) {}
-''');
-  }
-
-  test_createField_getter_unqualified_instance_assignmentRhs() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    int v = test;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-
-  main() {
-    int v = test;
-  }
-}
-''');
-  }
-
-  test_createField_getter_unqualified_instance_asStatement() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    test;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  var test;
-
-  main() {
-    test;
-  }
-}
-''');
-  }
-
-  test_createField_hint() async {
-    await resolveTestUnit('''
-class A {
-}
-main(A a) {
-  var x = a;
-  int v = x.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-}
-main(A a) {
-  var x = a;
-  int v = x.test;
-}
-''');
-  }
-
-  test_createField_hint_setter() async {
-    await resolveTestUnit('''
-class A {
-}
-main(A a) {
-  var x = a;
-  x.test = 0;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-}
-main(A a) {
-  var x = a;
-  x.test = 0;
-}
-''');
-  }
-
-  test_createField_importType() async {
-    addSource('/project/libA.dart', r'''
-library libA;
-class A {}
-''');
-    addSource('/project/libB.dart', r'''
-library libB;
-import 'libA.dart';
-A getA() => null;
-''');
-    await resolveTestUnit('''
-import 'libB.dart';
-class C {
-}
-main(C c) {
-  c.test = getA();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-import 'libA.dart';
-import 'libB.dart';
-class C {
-  A test;
-}
-main(C c) {
-  c.test = getA();
-}
-''');
-  }
-
-  test_createField_invalidInitializer_withoutType() async {
-    await resolveTestUnit('''
-class C {
-  C(this.text);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class C {
-  var text;
-
-  C(this.text);
-}
-''');
-  }
-
-  test_createField_invalidInitializer_withType() async {
-    await resolveTestUnit('''
-class C {
-  C(String this.text);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class C {
-  String text;
-
-  C(String this.text);
-}
-''');
-  }
-
-  test_createField_setter_generic_BAD() async {
-    await resolveTestUnit('''
-class A {
-}
-class B<T> {
-  List<T> items;
-  main(A a) {
-    a.test = items;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  List test;
-}
-class B<T> {
-  List<T> items;
-  main(A a) {
-    a.test = items;
-  }
-}
-''');
-  }
-
-  test_createField_setter_generic_OK_local() async {
-    await resolveTestUnit('''
-class A<T> {
-  List<T> items;
-
-  main(A a) {
-    test = items;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A<T> {
-  List<T> items;
-
-  List<T> test;
-
-  main(A a) {
-    test = items;
-  }
-}
-''');
-  }
-
-  test_createField_setter_qualified_instance_hasField() async {
-    await resolveTestUnit('''
-class A {
-  int aaa;
-  int zzz;
-
-  existingMethod() {}
-}
-main(A a) {
-  a.test = 5;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int aaa;
-  int zzz;
-
-  int test;
-
-  existingMethod() {}
-}
-main(A a) {
-  a.test = 5;
-}
-''');
-  }
-
-  test_createField_setter_qualified_instance_hasMethod() async {
-    await resolveTestUnit('''
-class A {
-  existingMethod() {}
-}
-main(A a) {
-  a.test = 5;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-
-  existingMethod() {}
-}
-main(A a) {
-  a.test = 5;
-}
-''');
-  }
-
-  test_createField_setter_qualified_static() async {
-    await resolveTestUnit('''
-class A {
-}
-main() {
-  A.test = 5;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  static int test;
-}
-main() {
-  A.test = 5;
-}
-''');
-  }
-
-  test_createField_setter_unqualified_instance() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    test = 5;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  int test;
-
-  main() {
-    test = 5;
-  }
-}
-''');
-  }
-
-  test_createField_setter_unqualified_static() async {
-    await resolveTestUnit('''
-class A {
-  static main() {
-    test = 5;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FIELD, '''
-class A {
-  static int test;
-
-  static main() {
-    test = 5;
-  }
-}
-''');
-  }
-
-  test_createFile_forImport() async {
-    testFile = '/my/project/bin/test.dart';
-    await resolveTestUnit('''
-import 'my_file.dart';
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_FILE, error);
-    change = fix.change;
-    // validate change
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file, convertPath('/my/project/bin/my_file.dart'));
-    expect(fileEdit.fileStamp, -1);
-    expect(fileEdit.edits, hasLength(1));
-    expect(fileEdit.edits[0].replacement, contains('library my_file;'));
-  }
-
-  test_createFile_forImport_BAD_inPackage_lib_justLib() async {
-    newFile('/projects/my_package/pubspec.yaml', content: 'name: my_package');
-    testFile = '/projects/my_package/test.dart';
-    await resolveTestUnit('''
-import 'lib';
-''');
-    await assertNoFix(DartFixKind.CREATE_FILE);
-  }
-
-  test_createFile_forImport_BAD_notDart() async {
-    testFile = '/my/project/bin/test.dart';
-    await resolveTestUnit('''
-import 'my_file.txt';
-''');
-    await assertNoFix(DartFixKind.CREATE_FILE);
-  }
-
-  test_createFile_forImport_inPackage_lib() async {
-    newFile('/projects/my_package/pubspec.yaml', content: 'name: my_package');
-    testFile = '/projects/my_package/lib/test.dart';
-    newFolder('/projects/my_package/lib');
-    await resolveTestUnit('''
-import 'a/bb/c_cc/my_lib.dart';
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_FILE, error);
-    change = fix.change;
-    // validate change
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file,
-        convertPath('/projects/my_package/lib/a/bb/c_cc/my_lib.dart'));
-    expect(fileEdit.fileStamp, -1);
-    expect(fileEdit.edits, hasLength(1));
-    expect(fileEdit.edits[0].replacement,
-        contains('library my_package.a.bb.c_cc.my_lib;'));
-  }
-
-  test_createFile_forImport_inPackage_test() async {
-    newFile('/projects/my_package/pubspec.yaml', content: 'name: my_package');
-    testFile = '/projects/my_package/test/misc/test_all.dart';
-    await resolveTestUnit('''
-import 'a/bb/my_lib.dart';
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_FILE, error);
-    change = fix.change;
-    // validate change
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file,
-        convertPath('/projects/my_package/test/misc/a/bb/my_lib.dart'));
-    expect(fileEdit.fileStamp, -1);
-    expect(fileEdit.edits, hasLength(1));
-    expect(fileEdit.edits[0].replacement,
-        contains('library my_package.test.misc.a.bb.my_lib;'));
-  }
-
-  test_createFile_forPart() async {
-    testFile = convertPath('/my/project/bin/test.dart');
-    await resolveTestUnit('''
-library my.lib;
-part 'my_part.dart';
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_FILE, error);
-    change = fix.change;
-    // validate change
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file, convertPath('/my/project/bin/my_part.dart'));
-    expect(fileEdit.fileStamp, -1);
-    expect(fileEdit.edits, hasLength(1));
-    expect(fileEdit.edits[0].replacement, contains('part of my.lib;'));
-  }
-
-  test_createFile_forPart_inPackageLib() async {
-    newFile('/my/pubspec.yaml', content: r'''
-name: my_test
-''');
-    testFile = '/my/lib/test.dart';
-    addTestSource('''
-library my.lib;
-part 'my_part.dart';
-''', Uri.parse('package:my/test.dart'));
-    // configure SourceFactory
-    UriResolver pkgResolver = new PackageMapUriResolver(resourceProvider, {
-      'my': <Folder>[getFolder('/my/lib')],
-    });
-    SourceFactory sourceFactory = new SourceFactory(
-        [new DartUriResolver(sdk), pkgResolver, resourceResolver]);
-    driver.configure(sourceFactory: sourceFactory);
-    testUnit = (await driver.getResult(convertPath(testFile))).unit;
-    // prepare fix
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_FILE, error);
-    change = fix.change;
-    // validate change
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file, convertPath('/my/lib/my_part.dart'));
-    expect(fileEdit.fileStamp, -1);
-    expect(fileEdit.edits, hasLength(1));
-    expect(fileEdit.edits[0].replacement, contains('part of my.lib;'));
-  }
-
-  test_createGetter_BAD_inSDK() async {
-    await resolveTestUnit('''
-main(List p) {
-  int v = p.foo;
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_GETTER);
-  }
-
-  test_createGetter_hint_getter() async {
-    await resolveTestUnit('''
-class A {
-}
-main(A a) {
-  var x = a;
-  int v = x.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  int get test => null;
-}
-main(A a) {
-  var x = a;
-  int v = x.test;
-}
-''');
-  }
-
-  test_createGetter_location_afterLastGetter() async {
-    await resolveTestUnit('''
-class A {
-  int existingField;
-
-  int get existingGetter => null;
-
-  existingMethod() {}
-}
-main(A a) {
-  int v = a.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  int existingField;
-
-  int get existingGetter => null;
-
-  int get test => null;
-
-  existingMethod() {}
-}
-main(A a) {
-  int v = a.test;
-}
-''');
-  }
-
-  test_createGetter_multiLevel() async {
-    await resolveTestUnit('''
-class A {
-}
-class B {
-  A a;
-}
-class C {
-  B b;
-}
-main(C c) {
-  int v = c.b.a.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  int get test => null;
-}
-class B {
-  A a;
-}
-class C {
-  B b;
-}
-main(C c) {
-  int v = c.b.a.test;
-}
-''');
-  }
-
-  test_createGetter_qualified_instance() async {
-    await resolveTestUnit('''
-class A {
-}
-main(A a) {
-  int v = a.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  int get test => null;
-}
-main(A a) {
-  int v = a.test;
-}
-''');
-  }
-
-  test_createGetter_qualified_instance_differentLibrary() async {
-    addSource('/project/other.dart', '''
-/**
- * A comment to push the offset of the braces for the following class
- * declaration past the end of the content of the test file. Used to catch an
- * index out of bounds exception that occurs when using the test source instead
- * of the target source to compute the location at which to insert the field.
- */
-class A {
-}
-''');
-    await resolveTestUnit('''
-import 'other.dart';
-main(A a) {
-  int v = a.test;
-}
-''');
-    await assertHasFix(
-        DartFixKind.CREATE_GETTER,
-        '''
-/**
- * A comment to push the offset of the braces for the following class
- * declaration past the end of the content of the test file. Used to catch an
- * index out of bounds exception that occurs when using the test source instead
- * of the target source to compute the location at which to insert the field.
- */
-class A {
-  int get test => null;
-}
-''',
-        target: '/project/other.dart');
-  }
-
-  test_createGetter_qualified_instance_dynamicType() async {
-    await resolveTestUnit('''
-class A {
-  B b;
-  void f(Object p) {
-    p == b.test;
-  }
-}
-class B {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  B b;
-  void f(Object p) {
-    p == b.test;
-  }
-}
-class B {
-  get test => null;
-}
-''');
-  }
-
-  test_createGetter_qualified_propagatedType() async {
-    await resolveTestUnit('''
-class A {
-  A get self => this;
-}
-main() {
-  var a = new A();
-  int v = a.self.test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  A get self => this;
-
-  int get test => null;
-}
-main() {
-  var a = new A();
-  int v = a.self.test;
-}
-''');
-  }
-
-  test_createGetter_setterContext() async {
-    await resolveTestUnit('''
-class A {
-}
-main(A a) {
-  a.test = 42;
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_GETTER);
-  }
-
-  test_createGetter_unqualified_instance_asInvocationArgument() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    f(test);
-  }
-}
-f(String s) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  String get test => null;
-
-  main() {
-    f(test);
-  }
-}
-f(String s) {}
-''');
-  }
-
-  test_createGetter_unqualified_instance_assignmentLhs() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    test = 42;
-  }
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_GETTER);
-  }
-
-  test_createGetter_unqualified_instance_assignmentRhs() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    int v = test;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  int get test => null;
-
-  main() {
-    int v = test;
-  }
-}
-''');
-  }
-
-  test_createGetter_unqualified_instance_asStatement() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    test;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_GETTER, '''
-class A {
-  get test => null;
-
-  main() {
-    test;
-  }
-}
-''');
-  }
-
-  test_createLocalVariable_functionType_named() async {
-    await resolveTestUnit('''
-typedef MY_FUNCTION(int p);
-foo(MY_FUNCTION f) {}
-main() {
-  foo(bar);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-typedef MY_FUNCTION(int p);
-foo(MY_FUNCTION f) {}
-main() {
-  MY_FUNCTION bar;
-  foo(bar);
-}
-''');
-  }
-
-  test_createLocalVariable_functionType_named_generic() async {
-    await resolveTestUnit('''
-typedef MY_FUNCTION<T>(T p);
-foo(MY_FUNCTION<int> f) {}
-main() {
-  foo(bar);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-typedef MY_FUNCTION<T>(T p);
-foo(MY_FUNCTION<int> f) {}
-main() {
-  MY_FUNCTION<int> bar;
-  foo(bar);
-}
-''');
-  }
-
-  test_createLocalVariable_functionType_synthetic() async {
-    await resolveTestUnit('''
-foo(f(int p)) {}
-main() {
-  foo(bar);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-foo(f(int p)) {}
-main() {
-  Function(int p) bar;
-  foo(bar);
-}
-''');
-  }
-
-  test_createLocalVariable_read_typeAssignment() async {
-    await resolveTestUnit('''
-main() {
-  int a = test;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-main() {
-  int test;
-  int a = test;
-}
-''');
-  }
-
-  test_createLocalVariable_read_typeCondition() async {
-    await resolveTestUnit('''
-main() {
-  if (!test) {
-    print(42);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-main() {
-  bool test;
-  if (!test) {
-    print(42);
-  }
-}
-''');
-  }
-
-  test_createLocalVariable_read_typeInvocationArgument() async {
-    await resolveTestUnit('''
-main() {
-  f(test);
-}
-f(String p) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-main() {
-  String test;
-  f(test);
-}
-f(String p) {}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['String test;']);
-    _assertLinkedGroup(change.linkedEditGroups[1], ['test;', 'test);']);
-  }
-
-  test_createLocalVariable_read_typeInvocationTarget() async {
-    await resolveTestUnit('''
-main() {
-  test.add('hello');
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-main() {
-  var test;
-  test.add('hello');
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['test;', 'test.add(']);
-  }
-
-  test_createLocalVariable_withImport() async {
-    addPackageSource('pkg', 'a/a.dart', '''
-class A {}
-''');
-    addPackageSource('pkg', 'b/b.dart', '''
-class B {}
-''');
-    addPackageSource('pkg', 'c/c.dart', '''
-import 'package:pkg/a/a.dart';
-import 'package:pkg/b/b.dart';
-
-class C {
-  C(A a, B b);
-}
-''');
-
-    await resolveTestUnit('''
-import 'package:pkg/a/a.dart';
-import 'package:pkg/c/c.dart';
-
-main() {
-  A a;
-  new C(a, b);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-import 'package:pkg/a/a.dart';
-import 'package:pkg/b/b.dart';
-import 'package:pkg/c/c.dart';
-
-main() {
-  A a;
-  B b;
-  new C(a, b);
-}
-''');
-
-    List<LinkedEditGroup> groups = change.linkedEditGroups;
-    expect(groups, hasLength(2));
-    LinkedEditGroup typeGroup = groups[0];
-    List<Position> typePositions = typeGroup.positions;
-    expect(typePositions, hasLength(1));
-    expect(typePositions[0].offset, 112);
-    LinkedEditGroup nameGroup = groups[1];
-    List<Position> groupPositions = nameGroup.positions;
-    expect(groupPositions, hasLength(2));
-    expect(groupPositions[0].offset, 114);
-    expect(groupPositions[1].offset, 128);
-  }
-
-  test_createLocalVariable_write_assignment() async {
-    await resolveTestUnit('''
-main() {
-  test = 42;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-main() {
-  var test = 42;
-}
-''');
-  }
-
-  test_createLocalVariable_write_assignment_compound() async {
-    await resolveTestUnit('''
-main() {
-  test += 42;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_LOCAL_VARIABLE, '''
-main() {
-  int test;
-  test += 42;
-}
-''');
-  }
-
-  test_createMissingOverrides_field_untyped() async {
-    await resolveTestUnit('''
-class A {
-  var f;
-}
-
-class B implements A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-class A {
-  var f;
-}
-
-class B implements A {
-  @override
-  var f;
-}
-''');
-  }
-
-  test_createMissingOverrides_functionTypeAlias() async {
-    await resolveTestUnit('''
-typedef int Binary(int left, int right);
-
-abstract class Emulator {
-  void performBinary(Binary binary);
-}
-
-class MyEmulator extends Emulator {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-typedef int Binary(int left, int right);
-
-abstract class Emulator {
-  void performBinary(Binary binary);
-}
-
-class MyEmulator extends Emulator {
-  @override
-  void performBinary(Binary binary) {
-    // TODO: implement performBinary
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_functionTypedParameter() async {
-    await resolveTestUnit('''
-abstract class A {
-  void forEach(int f(double p1, String p2));
-}
-
-class B extends A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class A {
-  void forEach(int f(double p1, String p2));
-}
-
-class B extends A {
-  @override
-  void forEach(int Function(double p1, String p2) f) {
-    // TODO: implement forEach
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_generics_typeArguments() async {
-    await resolveTestUnit('''
-class Iterator<T> {
-}
-
-abstract class IterableMixin<T> {
-  Iterator<T> get iterator;
-}
-
-class Test extends IterableMixin<int> {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-class Iterator<T> {
-}
-
-abstract class IterableMixin<T> {
-  Iterator<T> get iterator;
-}
-
-class Test extends IterableMixin<int> {
-  @override
-  // TODO: implement iterator
-  Iterator<int> get iterator => null;
-}
-''');
-  }
-
-  test_createMissingOverrides_generics_typeParameters() async {
-    await resolveTestUnit('''
-abstract class ItemProvider<T> {
-  List<T> getItems();
-}
-
-class Test<V> extends ItemProvider<V> {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class ItemProvider<T> {
-  List<T> getItems();
-}
-
-class Test<V> extends ItemProvider<V> {
-  @override
-  List<V> getItems() {
-    // TODO: implement getItems
-    return null;
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_getter() async {
-    await resolveTestUnit('''
-abstract class A {
-  get g1;
-  int get g2;
-}
-
-class B extends A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class A {
-  get g1;
-  int get g2;
-}
-
-class B extends A {
-  @override
-  // TODO: implement g1
-  get g1 => null;
-
-  @override
-  // TODO: implement g2
-  int get g2 => null;
-}
-''');
-  }
-
-  test_createMissingOverrides_importPrefix() async {
-    await resolveTestUnit('''
-import 'dart:async' as aaa;
-abstract class A {
-  Map<aaa.Future, List<aaa.Future>> g(aaa.Future p);
-}
-
-class B extends A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-import 'dart:async' as aaa;
-abstract class A {
-  Map<aaa.Future, List<aaa.Future>> g(aaa.Future p);
-}
-
-class B extends A {
-  @override
-  Map<aaa.Future, List<aaa.Future>> g(aaa.Future p) {
-    // TODO: implement g
-    return null;
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_mergeToField_getterSetter() async {
-    await resolveTestUnit('''
-class A {
-  int ma;
-  void mb() {}
-  double mc;
-}
-
-class B implements A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-class A {
-  int ma;
-  void mb() {}
-  double mc;
-}
-
-class B implements A {
-  @override
-  int ma;
-
-  @override
-  double mc;
-
-  @override
-  void mb() {
-    // TODO: implement mb
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_method() async {
-    await resolveTestUnit('''
-abstract class A {
-  void m1();
-  int m2();
-  String m3(int p1, double p2, Map<int, List<String>> p3);
-  String m4(p1, p2);
-  String m5(p1, [int p2 = 2, int p3, p4 = 4]);
-  String m6(p1, {int p2 = 2, int p3, p4: 4});
-}
-
-class B extends A {
-}
-''');
-    String expectedCode = '''
-abstract class A {
-  void m1();
-  int m2();
-  String m3(int p1, double p2, Map<int, List<String>> p3);
-  String m4(p1, p2);
-  String m5(p1, [int p2 = 2, int p3, p4 = 4]);
-  String m6(p1, {int p2 = 2, int p3, p4: 4});
-}
-
-class B extends A {
-  @override
-  void m1() {
-    // TODO: implement m1
-  }
-
-  @override
-  int m2() {
-    // TODO: implement m2
-    return null;
-  }
-
-  @override
-  String m3(int p1, double p2, Map<int, List<String>> p3) {
-    // TODO: implement m3
-    return null;
-  }
-
-  @override
-  String m4(p1, p2) {
-    // TODO: implement m4
-    return null;
-  }
-
-  @override
-  String m5(p1, [int p2 = 2, int p3, p4 = 4]) {
-    // TODO: implement m5
-    return null;
-  }
-
-  @override
-  String m6(p1, {int p2 = 2, int p3, p4 = 4}) {
-    // TODO: implement m6
-    return null;
-  }
-}
-''';
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, expectedCode);
-    // end position should be on "m1", not on "m2", "m3", etc
-    {
-      Position endPosition = change.selection;
-      expect(endPosition, isNotNull);
-      expect(endPosition.file, testFile);
-      int endOffset = endPosition.offset;
-      String endString = expectedCode.substring(endOffset, endOffset + 25);
-      expect(endString, contains('m1'));
-      expect(endString, isNot(contains('m2')));
-      expect(endString, isNot(contains('m3')));
-      expect(endString, isNot(contains('m4')));
-      expect(endString, isNot(contains('m5')));
-      expect(endString, isNot(contains('m6')));
-    }
-  }
-
-  test_createMissingOverrides_method_emptyClassBody() async {
-    await resolveTestUnit('''
-abstract class A {
-  void foo();
-}
-
-class B extends A {}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class A {
-  void foo();
-}
-
-class B extends A {
-  @override
-  void foo() {
-    // TODO: implement foo
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_method_generic() async {
-    await resolveTestUnit('''
-class C<T> {}
-class V<E> {}
-
-abstract class A {
-  E1 foo<E1, E2 extends C<int>>(V<E2> v);
-}
-
-class B implements A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-class C<T> {}
-class V<E> {}
-
-abstract class A {
-  E1 foo<E1, E2 extends C<int>>(V<E2> v);
-}
-
-class B implements A {
-  @override
-  E1 foo<E1, E2 extends C<int>>(V<E2> v) {
-    // TODO: implement foo
-    return null;
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_method_genericClass2() async {
-    await resolveTestUnit('''
-class A<R> {
-  R foo(int a) => null;
-}
-
-class B<R> extends A<R> {
-  R bar(double b) => null;
-}
-
-class X implements B<bool> {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-class A<R> {
-  R foo(int a) => null;
-}
-
-class B<R> extends A<R> {
-  R bar(double b) => null;
-}
-
-class X implements B<bool> {
-  @override
-  bool bar(double b) {
-    // TODO: implement bar
-    return null;
-  }
-
-  @override
-  bool foo(int a) {
-    // TODO: implement foo
-    return null;
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_method_generic_withBounds() async {
-    // https://github.com/dart-lang/sdk/issues/31199
-    await resolveTestUnit('''
-abstract class A<K, V> {
-  List<T> foo<T extends V>(K key);
-}
-
-class B<K, V> implements A<K, V> {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class A<K, V> {
-  List<T> foo<T extends V>(K key);
-}
-
-class B<K, V> implements A<K, V> {
-  @override
-  List<T> foo<T extends V>(K key) {
-    // TODO: implement foo
-    return null;
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_method_notEmptyClassBody() async {
-    await resolveTestUnit('''
-abstract class A {
-  void foo();
-}
-
-class B extends A {
-  void bar() {}
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class A {
-  void foo();
-}
-
-class B extends A {
-  void bar() {}
-
-  @override
-  void foo() {
-    // TODO: implement foo
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_operator() async {
-    await resolveTestUnit('''
-abstract class A {
-  int operator [](int index);
-  void operator []=(int index, String value);
-}
-
-class B extends A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class A {
-  int operator [](int index);
-  void operator []=(int index, String value);
-}
-
-class B extends A {
-  @override
-  int operator [](int index) {
-    // TODO: implement []
-    return null;
-  }
-
-  @override
-  void operator []=(int index, String value) {
-    // TODO: implement []=
-  }
-}
-''');
-  }
-
-  test_createMissingOverrides_setter() async {
-    await resolveTestUnit('''
-abstract class A {
-  set s1(x);
-  set s2(int x);
-  void set s3(String x);
-}
-
-class B extends A {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MISSING_OVERRIDES, '''
-abstract class A {
-  set s1(x);
-  set s2(int x);
-  void set s3(String x);
-}
-
-class B extends A {
-  @override
-  void set s1(x) {
-    // TODO: implement s1
-  }
-
-  @override
-  void set s2(int x) {
-    // TODO: implement s2
-  }
-
-  @override
-  void set s3(String x) {
-    // TODO: implement s3
-  }
-}
-''');
-  }
-
-  test_createMixin() async {
-    await resolveTestUnit('''
-main() {
-  Test v = null;
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MIXIN, '''
-main() {
-  Test v = null;
-}
-
-mixin Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
-  }
-
-  test_createMixin_BAD_hasUnresolvedPrefix() async {
-    await resolveTestUnit('''
-main() {
-  prefix.Test v = null;
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_MIXIN);
-  }
-
-  test_createMixin_BAD_instanceCreation_withNew() async {
-    await resolveTestUnit('''
-main() {
-  new Test();
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_MIXIN);
-  }
-
-  test_createMixin_BAD_instanceCreation_withoutNew() async {
-    await resolveTestUnit('''
-main() {
-  Test();
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_MIXIN);
-  }
-
-  test_createMixin_inLibraryOfPrefix() async {
-    String libCode = r'''
-library my.lib;
-
-class A {}
-''';
-    addSource('/project/lib.dart', libCode);
-    await resolveTestUnit('''
-import 'lib.dart' as lib;
-
-main() {
-  lib.A a = null;
-  lib.Test t = null;
-}
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_MIXIN, error);
-    change = fix.change;
-    // apply to "lib.dart"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file, convertPath('/project/lib.dart'));
-    expect(SourceEdit.applySequence(libCode, fileEdit.edits), r'''
-library my.lib;
-
-class A {}
-
-mixin Test {
-}
-''');
-    expect(change.linkedEditGroups, hasLength(1));
-  }
-
-  test_createMixin_innerLocalFunction() async {
-    await resolveTestUnit('''
-f() {
-  g() {
-    Test v = null;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MIXIN, '''
-f() {
-  g() {
-    Test v = null;
-  }
-}
-
-mixin Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
-  }
-
-  test_createMixin_itemOfList() async {
-    await resolveTestUnit('''
-main() {
-  var a = [Test];
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_MIXIN, '''
-main() {
-  var a = [Test];
-}
-
-mixin Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test];', 'Test {']);
-  }
-
-  test_createMixin_itemOfList_inAnnotation() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
-    };
-    await resolveTestUnit('''
-class MyAnnotation {
-  const MyAnnotation(a, b);
-}
-@MyAnnotation(int, const [Test])
-main() {}
-''');
-    await assertHasFix(DartFixKind.CREATE_MIXIN, '''
-class MyAnnotation {
-  const MyAnnotation(a, b);
-}
-@MyAnnotation(int, const [Test])
-main() {}
-
-mixin Test {
-}
-''');
-    _assertLinkedGroup(change.linkedEditGroups[0], ['Test])', 'Test {']);
-  }
-
-  test_createNoSuchMethod_BAD_classTypeAlias() async {
-    await resolveTestUnit('''
-abstract class A {
-  m();
-}
-
-class B = Object with A;
-''');
-    await assertNoFix(
-      DartFixKind.CREATE_NO_SUCH_METHOD,
-    );
-  }
-
-  test_createNoSuchMethod_OK() async {
-    await resolveTestUnit('''
-abstract class A {
-  m1();
-  int m2();
-}
-
-class B extends A {
-  existing() {}
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_NO_SUCH_METHOD, '''
-abstract class A {
-  m1();
-  int m2();
-}
-
-class B extends A {
-  existing() {}
-
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-}
-''');
-  }
-
-  test_creationFunction_forFunctionType_cascadeSecond() async {
-    await resolveTestUnit('''
-class A {
-  B ma() => null;
-}
-class B {
-  useFunction(int g(double a, String b)) {}
-}
-
-main() {
-  A a = new A();
-  a..ma().useFunction(test);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-class A {
-  B ma() => null;
-}
-class B {
-  useFunction(int g(double a, String b)) {}
-}
-
-main() {
-  A a = new A();
-  a..ma().useFunction(test);
-}
-
-int test(double a, String b) {
-}
-''');
-  }
-
-  test_creationFunction_forFunctionType_coreFunction() async {
-    await resolveTestUnit('''
-main() {
-  useFunction(g: test);
-}
-useFunction({Function g}) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  useFunction(g: test);
-}
-useFunction({Function g}) {}
-
-test() {
-}
-''');
-  }
-
-  test_creationFunction_forFunctionType_dynamicArgument() async {
-    await resolveTestUnit('''
-main() {
-  useFunction(test);
-}
-useFunction(int g(a, b)) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  useFunction(test);
-}
-useFunction(int g(a, b)) {}
-
-int test(a, b) {
-}
-''');
-  }
-
-  test_creationFunction_forFunctionType_function() async {
-    await resolveTestUnit('''
-main() {
-  useFunction(test);
-}
-useFunction(int g(double a, String b)) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  useFunction(test);
-}
-useFunction(int g(double a, String b)) {}
-
-int test(double a, String b) {
-}
-''');
-  }
-
-  test_creationFunction_forFunctionType_function_namedArgument() async {
-    await resolveTestUnit('''
-main() {
-  useFunction(g: test);
-}
-useFunction({int g(double a, String b)}) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  useFunction(g: test);
-}
-useFunction({int g(double a, String b)}) {}
-
-int test(double a, String b) {
-}
-''');
-  }
-
-  test_creationFunction_forFunctionType_importType() async {
-    addSource('/project/libA.dart', r'''
-library libA;
-class A {}
-''');
-    addSource('/project/libB.dart', r'''
-library libB;
-import 'libA.dart';
-useFunction(int g(A a)) {}
-''');
-    await resolveTestUnit('''
-import 'libB.dart';
-main() {
-  useFunction(test);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-import 'libA.dart';
-import 'libB.dart';
-main() {
-  useFunction(test);
-}
-
-int test(A a) {
-}
-''');
-  }
-
-  test_creationFunction_forFunctionType_method_enclosingClass_static() async {
-    await resolveTestUnit('''
-class A {
-  static foo() {
-    useFunction(test);
-  }
-}
-useFunction(int g(double a, String b)) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  static foo() {
-    useFunction(test);
-  }
-
-  static int test(double a, String b) {
-  }
-}
-useFunction(int g(double a, String b)) {}
-''');
-  }
-
-  test_creationFunction_forFunctionType_method_enclosingClass_static2() async {
-    await resolveTestUnit('''
-class A {
-  var f;
-  A() : f = useFunction(test);
-}
-useFunction(int g(double a, String b)) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  var f;
-  A() : f = useFunction(test);
-
-  static int test(double a, String b) {
-  }
-}
-useFunction(int g(double a, String b)) {}
-''');
-  }
-
-  test_creationFunction_forFunctionType_method_targetClass() async {
-    await resolveTestUnit('''
-main(A a) {
-  useFunction(a.test);
-}
-class A {
-}
-useFunction(int g(double a, String b)) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-main(A a) {
-  useFunction(a.test);
-}
-class A {
-  int test(double a, String b) {
-  }
-}
-useFunction(int g(double a, String b)) {}
-''');
-  }
-
-  test_creationFunction_forFunctionType_method_targetClass_hasOtherMember() async {
-    await resolveTestUnit('''
-main(A a) {
-  useFunction(a.test);
-}
-class A {
-  m() {}
-}
-useFunction(int g(double a, String b)) {}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-main(A a) {
-  useFunction(a.test);
-}
-class A {
-  m() {}
-
-  int test(double a, String b) {
-  }
-}
-useFunction(int g(double a, String b)) {}
-''');
-  }
-
-  test_creationFunction_forFunctionType_notFunctionType() async {
-    await resolveTestUnit('''
-main(A a) {
-  useFunction(a.test);
-}
-typedef A();
-useFunction(g) {}
-''');
-    await assertNoFix(DartFixKind.CREATE_METHOD);
-    await assertNoFix(DartFixKind.CREATE_FUNCTION);
-  }
-
-  test_creationFunction_forFunctionType_unknownTarget() async {
-    await resolveTestUnit('''
-main(A a) {
-  useFunction(a.test);
-}
-class A {
-}
-useFunction(g) {}
-''');
-    await assertNoFix(DartFixKind.CREATE_METHOD);
-  }
-
-  test_expectedToken_semicolon() async {
-    await resolveTestUnit('''
-main() {
-  print(0)
-}
-''');
-    await assertHasFix(DartFixKind.INSERT_SEMICOLON, '''
-main() {
-  print(0);
-}
-''');
-  }
-
-  test_illegalAsyncReturnType_adjacentNodes() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
-    };
-    await resolveTestUnit('''
-import 'dart:async';
-var v;int main() async => 0;
-''');
-    await assertHasFix(DartFixKind.REPLACE_RETURN_TYPE_FUTURE, '''
-import 'dart:async';
-var v;Future<int> main() async => 0;
-''');
-  }
-
-  test_illegalAsyncReturnType_asyncLibrary_import() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
-    };
-    await resolveTestUnit('''
-library main;
-int main() async {
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_RETURN_TYPE_FUTURE, '''
-library main;
-
-import 'dart:async';
-
-Future<int> main() async {
-}
-''');
-  }
-
-  test_illegalAsyncReturnType_asyncLibrary_usePrefix() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
-    };
-    await resolveTestUnit('''
-import 'dart:async' as al;
-int main() async {
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_RETURN_TYPE_FUTURE, '''
-import 'dart:async' as al;
-al.Future<int> main() async {
-}
-''');
-  }
-
-  test_illegalAsyncReturnType_complexTypeName() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
-    };
-    await resolveTestUnit('''
-import 'dart:async';
-List<int> main() async {
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_RETURN_TYPE_FUTURE, '''
-import 'dart:async';
-Future<List<int>> main() async {
-}
-''');
-  }
-
-  test_importLibraryPackage_preferDirectOverExport() async {
-    _configureMyPkg({'b.dart': 'class Test {}', 'a.dart': "export 'b.dart';"});
-    await resolveTestUnit('''
-main() {
-  Test test = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'package:my_pkg/b.dart';
-
-main() {
-  Test test = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT2, '''
-import 'package:my_pkg/a.dart';
-
-main() {
-  Test test = null;
-}
-''');
-  }
-
-  test_importLibraryPackage_preferDirectOverExport_src() async {
-    myPkgLibPath = '/my/src/packages/my_pkg/lib';
-    _configureMyPkg({'b.dart': 'class Test {}', 'a.dart': "export 'b.dart';"});
-    await resolveTestUnit('''
-main() {
-  Test test = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'package:my_pkg/b.dart';
-
-main() {
-  Test test = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT2, '''
-import 'package:my_pkg/a.dart';
-
-main() {
-  Test test = null;
-}
-''');
-  }
-
-  test_importLibraryProject_BAD_inLibSrc_differentContextRoot() async {
-    addPackageSource('bbb', 'b1.dart', r'''
-import 'src/b2.dart';
-''');
-    addPackageSource('bbb', 'src/b2.dart', 'class Test {}');
-    await resolveTestUnit('''
-import 'package:bbb/b1.dart';
-main() {
-  Test t;
-}
-''');
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_CLASS;
-    };
-    await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT3);
-  }
-
-  test_importLibraryProject_BAD_notInLib_BUILD() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/other/test/lib.dart', 'class Test {}');
-    await resolveTestUnit('''
-main() {
-  Test t;
-}
-''');
-    await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT1);
-  }
-
-  test_importLibraryProject_BAD_notInLib_pubspec() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/other/test/lib.dart', 'class Test {}');
-    await resolveTestUnit('''
-main() {
-  Test t;
-}
-''');
-    await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT1);
-  }
-
-  test_importLibraryProject_OK_inLibSrc_thisContextRoot() async {
-    testFile = '/project/lib/test.dart';
-    packageMap['project'] = [newFolder('/project/lib')];
-    addSource('/project/lib/src/lib.dart', 'class Test {}');
-    configureDriver();
-    await resolveTestUnit('''
-main() {
-  Test t;
-}
-''');
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_CLASS;
-    };
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT3, '''
-import 'package:project/src/lib.dart';
-
-main() {
-  Test t;
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_annotation() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-library lib;
-class Test {
-  const Test(int p);
-}
-''');
-    await resolveTestUnit('''
-@Test(0)
-main() {
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-@Test(0)
-main() {
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_hasOtherLibraryWithPrefix() async {
-    testFile = '/project/bin/test.dart';
-    addSource('/project/bin/a.dart', '''
-library a;
-class One {}
-''');
-    addSource('/project/bin/b.dart', '''
-library b;
-class One {}
-class Two {}
-''');
-    await resolveTestUnit('''
-import 'b.dart' show Two;
-main () {
-  new Two();
-  new One();
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'a.dart';
-import 'b.dart' show Two;
-main () {
-  new Two();
-  new One();
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_inParentFolder() async {
-    testFile = '/project/bin/test.dart';
-    addSource('/project/lib.dart', '''
-library lib;
-class Test {}
-''');
-    await resolveTestUnit('''
-main() {
-  Test t = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import '../lib.dart';
-
-main() {
-  Test t = null;
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_inRelativeFolder() async {
-    testFile = '/project/bin/test.dart';
-    addSource('/project/lib/sub/folder/lib.dart', '''
-library lib;
-class Test {}
-''');
-    await resolveTestUnit('''
-main() {
-  Test t = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import '../lib/sub/folder/lib.dart';
-
-main() {
-  Test t = null;
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_inSameFolder() async {
-    testFile = '/project/bin/test.dart';
-    addSource('/project/bin/lib.dart', '''
-library lib;
-class Test {}
-''');
-    await resolveTestUnit('''
-main() {
-  Test t = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  Test t = null;
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_instanceCreation_const() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-class Test {
-  const Test();
-}
-''');
-    await resolveTestUnit('''
-main() {
-  return const Test();
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  return const Test();
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_instanceCreation_const_namedConstructor() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-class Test {
-  const Test.named();
-}
-''');
-    await resolveTestUnit('''
-main() {
-  const Test.named();
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  const Test.named();
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_instanceCreation_implicit() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-class Test {
-  const Test();
-}
-''');
-    await resolveTestUnit('''
-main() {
-  return Test();
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  return Test();
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_instanceCreation_new() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-class Test {
-  const Test();
-}
-''');
-    await resolveTestUnit('''
-main() {
-  return new Test();
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  return new Test();
-}
-''');
-  }
-
-  test_importLibraryProject_withClass_instanceCreation_new_namedConstructor() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-class Test {
-  Test.named();
-}
-''');
-    await resolveTestUnit('''
-main() {
-  new Test.named();
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  new Test.named();
-}
-''');
-  }
-
-  test_importLibraryProject_withFunction() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-library lib;
-myFunction() {}
-''');
-    await resolveTestUnit('''
-main() {
-  myFunction();
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  myFunction();
-}
-''');
-  }
-
-  test_importLibraryProject_withFunction_unresolvedMethod() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-library lib;
-myFunction() {}
-''');
-    await resolveTestUnit('''
-class A {
-  main() {
-    myFunction();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-class A {
-  main() {
-    myFunction();
-  }
-}
-''');
-  }
-
-  test_importLibraryProject_withFunctionTypeAlias() async {
-    testFile = '/project/bin/test.dart';
-    addSource('/project/bin/lib.dart', '''
-library lib;
-typedef MyFunction();
-''');
-    await resolveTestUnit('''
-main() {
-  MyFunction t = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  MyFunction t = null;
-}
-''');
-  }
-
-  test_importLibraryProject_withTopLevelVariable() async {
-    testFile = '/project/lib/test.dart';
-    addSource('/project/lib/lib.dart', '''
-library lib;
-int MY_VAR = 42;
-''');
-    await resolveTestUnit('''
-main() {
-  print(MY_VAR);
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PROJECT1, '''
-import 'lib.dart';
-
-main() {
-  print(MY_VAR);
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_AsExpression() async {
-    await resolveTestUnit('''
-main(p) {
-  p as Future;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-main(p) {
-  p as Future;
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_instanceCreation_explicitNew() async {
-    await resolveTestUnit('''
-class C {
-  foo() {
-    new Future();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-class C {
-  foo() {
-    new Future();
-  }
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_instanceCreation_explicitNew_namedConstructor() async {
-    await resolveTestUnit('''
-class C {
-  foo() {
-    new Future.value(0);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-class C {
-  foo() {
-    new Future.value(0);
-  }
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_instanceCreation_implicitNew() async {
-    configurePreviewDart2();
-    await resolveTestUnit('''
-class C {
-  foo() {
-    Future();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-class C {
-  foo() {
-    Future();
-  }
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_instanceCreation_implicitNew_namedConstructor() async {
-    configurePreviewDart2();
-    await resolveTestUnit('''
-class C {
-  foo() {
-    Future.value(0);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-class C {
-  foo() {
-    Future.value(0);
-  }
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_invocationTarget() async {
-    await resolveTestUnit('''
-main() {
-  Future.wait(null);
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-main() {
-  Future.wait(null);
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_IsExpression() async {
-    await resolveTestUnit('''
-main(p) {
-  p is Future;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-main(p) {
-  p is Future;
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_itemOfList() async {
-    await resolveTestUnit('''
-main() {
-  var a = [Future];
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-main() {
-  var a = [Future];
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_itemOfList_inAnnotation() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
-    };
-    await resolveTestUnit('''
-class MyAnnotation {
-  const MyAnnotation(a, b);
-}
-@MyAnnotation(int, const [Future])
-main() {}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-class MyAnnotation {
-  const MyAnnotation(a, b);
-}
-@MyAnnotation(int, const [Future])
-main() {}
-''');
-  }
-
-  test_importLibrarySdk_withClass_typeAnnotation() async {
-    await resolveTestUnit('''
-main() {
-  Future f = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-main() {
-  Future f = null;
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_typeAnnotation_PrefixedIdentifier() async {
-    await resolveTestUnit('''
-main() {
-  Future.wait;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-main() {
-  Future.wait;
-}
-''');
-  }
-
-  test_importLibrarySdk_withClass_typeArgument() async {
-    await resolveTestUnit('''
-main() {
-  List<Future> futures = [];
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:async';
-
-main() {
-  List<Future> futures = [];
-}
-''');
-  }
-
-  test_importLibrarySdk_withTopLevelVariable() async {
-    await resolveTestUnit('''
-main() {
-  print(PI);
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:math';
-
-main() {
-  print(PI);
-}
-''');
-  }
-
-  test_importLibrarySdk_withTopLevelVariable_annotation() async {
-    await resolveTestUnit('''
-@PI
-main() {
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SDK, '''
-import 'dart:math';
-
-@PI
-main() {
-}
-''');
-  }
-
-  test_importLibraryShow_project() async {
-    testFile = '/project/bin/test.dart';
-    addSource('/project/bin/lib.dart', '''
-class A {}
-class B {}
-''');
-    await resolveTestUnit('''
-import 'lib.dart' show A;
-main() {
-  A a;
-  B b;
-}
-''');
-    await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT1);
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SHOW, '''
-import 'lib.dart' show A, B;
-main() {
-  A a;
-  B b;
-}
-''');
-  }
-
-  test_importLibraryShow_sdk() async {
-    await resolveTestUnit('''
-import 'dart:async' show Stream;
-main() {
-  Stream s = null;
-  Future f = null;
-}
-''');
-    await assertNoFix(DartFixKind.IMPORT_LIBRARY_SDK);
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_SHOW, '''
-import 'dart:async' show Future, Stream;
-main() {
-  Stream s = null;
-  Future f = null;
-}
-''');
-  }
-
-  test_impreciseIntAsDouble() async {
-    await resolveTestUnit('''
-double x = 1000000000000000000000000;
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_NEAREST_PRECISE_VALUE, '''
-double x = 999999999999999983222784;
-''');
-  }
-
-  test_impreciseIntAsDouble_asCapitalHex() async {
-    await resolveTestUnit('''
-double x = 0X1000000000000000000000001;
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_NEAREST_PRECISE_VALUE, '''
-double x = 0x1000000000000000000000000;
-''');
-  }
-
-  test_impreciseIntAsDouble_asHex() async {
-    await resolveTestUnit('''
-double x = 0x1000000000000000000000001;
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_NEAREST_PRECISE_VALUE, '''
-double x = 0x1000000000000000000000000;
-''');
-  }
-
-  test_impreciseIntAsDouble_maxValue() async {
-    await resolveTestUnit('''
-double x = 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_NEAREST_PRECISE_VALUE, '''
-double x = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368;
-''');
-  }
-
-  test_impreciseIntAsDouble_maxValue_asHex() async {
-    await resolveTestUnit('''
-double x = 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO_NEAREST_PRECISE_VALUE, '''
-double x = 0xFFFFFFFFFFFFF800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
-''');
-  }
-
-  test_isNotNull() async {
-    await resolveTestUnit('''
-main(p) {
-  p is! Null;
-}
-''');
-    await assertHasFix(DartFixKind.USE_NOT_EQ_NULL, '''
-main(p) {
-  p != null;
-}
-''');
-  }
-
-  test_isNotNull_all() async {
-    await resolveTestUnit('''
-main(p, q) {
-  p is! Null;
-  q is! Null;
-}
-''');
-    await assertHasFixAllFix(
-        HintCode.TYPE_CHECK_IS_NOT_NULL, DartFixKind.USE_NOT_EQ_NULL, '''
-main(p, q) {
-  p != null;
-  q != null;
-}
-''');
-  }
-
-  test_isNull() async {
-    await resolveTestUnit('''
-main(p) {
-  p is Null;
-}
-''');
-    await assertHasFix(DartFixKind.USE_EQ_EQ_NULL, '''
-main(p) {
-  p == null;
-}
-''');
-  }
-
-  test_isNull_all() async {
-    await resolveTestUnit('''
-main(p, q) {
-  p is Null;
-  q is Null;
-}
-''');
-    await assertHasFixAllFix(
-        HintCode.TYPE_CHECK_IS_NULL, DartFixKind.USE_EQ_EQ_NULL, '''
-main(p, q) {
-  p == null;
-  q == null;
-}
-''');
-  }
-
-  test_makeEnclosingClassAbstract_declaresAbstractMethod() async {
-    await resolveTestUnit('''
-class A {
-  m();
-}
-''');
-    await assertHasFix(DartFixKind.MAKE_CLASS_ABSTRACT, '''
-abstract class A {
-  m();
-}
-''');
-  }
-
-  test_makeEnclosingClassAbstract_inheritsAbstractMethod() async {
-    await resolveTestUnit('''
-abstract class A {
-  m();
-}
-class B extends A {
-}
-''');
-    await assertHasFix(DartFixKind.MAKE_CLASS_ABSTRACT, '''
-abstract class A {
-  m();
-}
-abstract class B extends A {
-}
-''');
-  }
-
-  test_makeFieldNotFinal_hasType() async {
-    await resolveTestUnit('''
-class A {
-  final int fff = 1;
-  main() {
-    fff = 2;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.MAKE_FIELD_NOT_FINAL, '''
-class A {
-  int fff = 1;
-  main() {
-    fff = 2;
-  }
-}
-''');
-  }
-
-  test_makeFieldNotFinal_noType() async {
-    await resolveTestUnit('''
-class A {
-  final fff = 1;
-  main() {
-    fff = 2;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.MAKE_FIELD_NOT_FINAL, '''
-class A {
-  var fff = 1;
-  main() {
-    fff = 2;
-  }
-}
-''');
-  }
-
-  test_moveTypeArgumentsToClass_explicitConst() async {
-    await resolveTestUnit('''
-main() {
-  const C.named<int>();
-}
-class C<E> {
-  const C.named();
-}
-''');
-    await assertHasFix(DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS, '''
-main() {
-  const C<int>.named();
-}
-class C<E> {
-  const C.named();
-}
-''');
-  }
-
-  test_moveTypeArgumentsToClass_explicitNew() async {
-    await resolveTestUnit('''
-main() {
-  new C.named<int>();
-}
-class C<E> {
-  C.named();
-}
-''');
-    await assertHasFix(DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS, '''
-main() {
-  new C<int>.named();
-}
-class C<E> {
-  C.named();
-}
-''');
-  }
-
-  test_moveTypeArgumentsToClass_explicitNew_BAD_alreadyThere() async {
-    await resolveTestUnit('''
-main() {
-  new C<String>.named<int>();
-}
-class C<E> {
-  C.named();
-}
-''');
-    await assertNoFix(DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS);
-  }
-
-  test_moveTypeArgumentsToClass_explicitNew_BAD_wrongNumber() async {
-    await resolveTestUnit('''
-main() {
-  new C.named<int, String>();
-}
-class C<E> {
-  C.named();
-}
-''');
-    await assertNoFix(DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS);
-  }
-
-  test_moveTypeArgumentsToClass_implicitConst() async {
-    await resolveTestUnit('''
-main() {
-  const C c = C.named<int>();
-}
-class C<E> {
-  const C.named();
-}
-''');
-    await assertHasFix(DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS, '''
-main() {
-  const C c = C<int>.named();
-}
-class C<E> {
-  const C.named();
-}
-''');
-  }
-
-  test_moveTypeArgumentsToClass_implicitNew() async {
-    await resolveTestUnit('''
-main() {
-  C.named<int>();
-}
-class C<E> {
-  C.named();
-}
-''');
-    await assertHasFix(DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS, '''
-main() {
-  C<int>.named();
-}
-class C<E> {
-  C.named();
-}
-''');
-  }
-
-  test_noException_1() async {
-    await resolveTestUnit('''
-main(p) {
-  p i s Null;
-}''');
-    List<AnalysisError> errors = await _computeErrors();
-    for (var error in errors) {
-      await _computeFixes(error);
-    }
-  }
-
-  test_nonBoolCondition_addNotNull() async {
-    await resolveTestUnit('''
-main(String p) {
-  if (p) {
-    print(p);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.ADD_NE_NULL, '''
-main(String p) {
-  if (p != null) {
-    print(p);
-  }
-}
-''');
-  }
-
-  test_nonBoolCondition_addNotNull_all() async {
-    await resolveTestUnit('''
-main(String p, String q) {
-  if (p) {
-    print(p);
-  }
-  if (q) {
-    print(q);
-  }
-}
-''');
-    await assertHasFixAllFix(
-        StaticTypeWarningCode.NON_BOOL_CONDITION, DartFixKind.ADD_NE_NULL, '''
-main(String p, String q) {
-  if (p != null) {
-    print(p);
-  }
-  if (q != null) {
-    print(q);
-  }
-}
-''');
-  }
-
-  test_removeDeadCode_condition() async {
-    await resolveTestUnit('''
-main(int p) {
-  if (true || p > 5) {
-    print(1);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_DEAD_CODE, '''
-main(int p) {
-  if (true) {
-    print(1);
-  }
-}
-''');
-  }
-
-  test_removeDeadCode_statements_one() async {
-    await resolveTestUnit('''
-int main() {
-  print(0);
-  return 42;
-  print(1);
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_DEAD_CODE, '''
-int main() {
-  print(0);
-  return 42;
-}
-''');
-  }
-
-  test_removeDeadCode_statements_two() async {
-    await resolveTestUnit('''
-int main() {
-  print(0);
-  return 42;
-  print(1);
-  print(2);
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_DEAD_CODE, '''
-int main() {
-  print(0);
-  return 42;
-}
-''');
-  }
-
-  test_removeParentheses_inGetterDeclaration() async {
-    await resolveTestUnit('''
-class A {
-  int get foo() => 0;
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_PARAMETERS_IN_GETTER_DECLARATION, '''
-class A {
-  int get foo => 0;
-}
-''');
-  }
-
-  test_removeParentheses_inGetterInvocation() async {
-    await resolveTestUnit('''
-class A {
-  int get foo => 0;
-}
-main(A a) {
-  a.foo();
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_PARENTHESIS_IN_GETTER_INVOCATION, '''
-class A {
-  int get foo => 0;
-}
-main(A a) {
-  a.foo;
-}
-''');
-  }
-
-  test_removeTypeArguments_explicitConst() async {
-    await resolveTestUnit('''
-main() {
-  const C.named<int>();
-}
-class C<E> {
-  const C.named();
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_TYPE_ARGUMENTS, '''
-main() {
-  const C.named();
-}
-class C<E> {
-  const C.named();
-}
-''');
-  }
-
-  test_removeTypeArguments_explicitNew() async {
-    await resolveTestUnit('''
-main() {
-  new C.named<int>();
-}
-class C<E> {
-  C.named();
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_TYPE_ARGUMENTS, '''
-main() {
-  new C.named();
-}
-class C<E> {
-  C.named();
-}
-''');
-  }
-
-  test_removeTypeArguments_implicitConst() async {
-    await resolveTestUnit('''
-main() {
-  const C c = C.named<int>();
-}
-class C<E> {
-  const C.named();
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_TYPE_ARGUMENTS, '''
-main() {
-  const C c = C.named();
-}
-class C<E> {
-  const C.named();
-}
-''');
-  }
-
-  test_removeTypeArguments_implicitNew() async {
-    await resolveTestUnit('''
-main() {
-  C.named<int>();
-}
-class C<E> {
-  C.named();
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_TYPE_ARGUMENTS, '''
-main() {
-  C.named();
-}
-class C<E> {
-  C.named();
-}
-''');
-  }
-
-  test_removeUnnecessaryCast_assignment() async {
-    await resolveTestUnit('''
-main(Object p) {
-  if (p is String) {
-    String v = ((p as String));
-  }
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_UNNECESSARY_CAST, '''
-main(Object p) {
-  if (p is String) {
-    String v = p;
-  }
-}
-''');
-  }
-
-  test_removeUnnecessaryCast_assignment_all() async {
-    await resolveTestUnit('''
-main(Object p, Object q) {
-  if (p is String) {
-    String v = ((p as String));
-  }
-  if (q is int) {
-    int v = ((q as int));
-  }
-}
-''');
-    await assertHasFixAllFix(
-        HintCode.UNNECESSARY_CAST, DartFixKind.REMOVE_UNNECESSARY_CAST, '''
-main(Object p, Object q) {
-  if (p is String) {
-    String v = p;
-  }
-  if (q is int) {
-    int v = q;
-  }
-}
-''');
-  }
-
-  test_removeUnusedCatchClause() async {
-    errorFilter = (AnalysisError error) => true;
-    await resolveTestUnit('''
-main() {
-  try {
-    throw 42;
-  } on int catch (e) {
-  }
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_UNUSED_CATCH_CLAUSE, '''
-main() {
-  try {
-    throw 42;
-  } on int {
-  }
-}
-''');
-  }
-
-  test_removeUnusedCatchStack() async {
-    errorFilter = (AnalysisError error) => true;
-    await resolveTestUnit('''
-main() {
-  try {
-    throw 42;
-  } catch (e, stack) {
-  }
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_UNUSED_CATCH_STACK, '''
-main() {
-  try {
-    throw 42;
-  } catch (e) {
-  }
-}
-''');
-  }
-
-  test_removeUnusedImport() async {
-    await resolveTestUnit('''
-import 'dart:math';
-main() {
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_UNUSED_IMPORT, '''
-main() {
-}
-''');
-  }
-
-  test_removeUnusedImport_all() async {
-    await resolveTestUnit('''
-import 'dart:math';
-import 'dart:math';
-import 'dart:math';
-main() {
-}
-''');
-    await assertHasFixAllFix(
-        HintCode.UNUSED_IMPORT, DartFixKind.REMOVE_UNUSED_IMPORT, '''
-main() {
-}
-''');
-  }
-
-  test_removeUnusedImport_all_diverseImports() async {
-    await resolveTestUnit('''
-import 'dart:math';
-import 'dart:math';
-import 'dart:async';
-main() {
-}
-''');
-    await assertHasFixAllFix(
-        HintCode.UNUSED_IMPORT, DartFixKind.REMOVE_UNUSED_IMPORT, '''
-main() {
-}
-''');
-  }
-
-  test_removeUnusedImport_all_diverseImports2() async {
-    await resolveTestUnit('''
-import 'dart:async';
-import 'dart:math' as math;
-import 'dart:async';
-
-var tau = math.pi * 2;
-
-main() {
-}
-''');
-    await assertHasFixAllFix(
-        HintCode.UNUSED_IMPORT, DartFixKind.REMOVE_UNUSED_IMPORT, '''
-import 'dart:math' as math;
-
-var tau = math.pi * 2;
-
-main() {
-}
-''');
-  }
-
-  test_removeUnusedImport_all_singleLine() async {
-    await resolveTestUnit('''
-import 'dart:math'; import 'dart:math'; import 'dart:math';
-main() {
-}
-''');
-    await assertHasFixAllFix(
-        HintCode.UNUSED_IMPORT, DartFixKind.REMOVE_UNUSED_IMPORT, '''
-main() {
-}
-''');
-  }
-
-  test_removeUnusedImport_anotherImportOnLine() async {
-    await resolveTestUnit('''
-import 'dart:math'; import 'dart:async';
-
-main() {
-  Future f;
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_UNUSED_IMPORT, '''
-import 'dart:async';
-
-main() {
-  Future f;
-}
-''');
-  }
-
-  test_removeUnusedImport_severalLines() async {
-    await resolveTestUnit('''
-import
-  'dart:math';
-main() {
-}
-''');
-    await assertHasFix(DartFixKind.REMOVE_UNUSED_IMPORT, '''
-main() {
-}
-''');
-  }
-
-  test_replaceVarWithDynamic() async {
-    errorFilter = (AnalysisError error) {
-      return error.errorCode == ParserErrorCode.VAR_AS_TYPE_NAME;
-    };
-    await resolveTestUnit('''
-class A {
-  Map<String, var> m;
-}
-''');
-    await assertHasFix(DartFixKind.REPLACE_VAR_WITH_DYNAMIC, '''
-class A {
-  Map<String, dynamic> m;
-}
-''');
-  }
-
-  test_replaceWithConstInstanceCreation_explicitNew() async {
-    await resolveTestUnit('''
-class A {
-  const A();
-}
-const a = new A();
-''');
-    await assertHasFix(DartFixKind.USE_CONST, '''
-class A {
-  const A();
-}
-const a = const A();
-''');
-  }
-
-  test_undefinedClass_useSimilar_BAD_prefixed() async {
-    await resolveTestUnit('''
-import 'dart:async' as c;
-main() {
-  c.Fture v = null;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-import 'dart:async' as c;
-main() {
-  c.Future v = null;
-}
-''');
-  }
-
-  test_undefinedClass_useSimilar_fromImport() async {
-    await resolveTestUnit('''
-main() {
-  Stirng s = 'abc';
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-main() {
-  String s = 'abc';
-}
-''');
-  }
-
-  test_undefinedClass_useSimilar_fromThisLibrary() async {
-    await resolveTestUnit('''
-class MyClass {}
-main() {
-  MyCalss v = null;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class MyClass {}
-main() {
-  MyClass v = null;
-}
-''');
-  }
-
-  test_undefinedFunction_create_bottomArgument() async {
-    await resolveTestUnit('''
-main() {
-  test(throw 42);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  test(throw 42);
-}
-
-void test(param0) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_duplicateArgumentNames() async {
-    await resolveTestUnit('''
-class C {
-  int x;
-}
-
-foo(C c1, C c2) {
-  bar(c1.x, c2.x);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-class C {
-  int x;
-}
-
-foo(C c1, C c2) {
-  bar(c1.x, c2.x);
-}
-
-void bar(int x, int x2) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_dynamicArgument() async {
-    await resolveTestUnit('''
-main() {
-  dynamic v;
-  test(v);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  dynamic v;
-  test(v);
-}
-
-void test(v) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_dynamicReturnType() async {
-    await resolveTestUnit('''
-main() {
-  dynamic v = test();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  dynamic v = test();
-}
-
-test() {
-}
-''');
-  }
-
-  test_undefinedFunction_create_fromFunction() async {
-    await resolveTestUnit('''
-main() {
-  int v = myUndefinedFunction(1, 2.0, '3');
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  int v = myUndefinedFunction(1, 2.0, '3');
-}
-
-int myUndefinedFunction(int i, double d, String s) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_fromMethod() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    int v = myUndefinedFunction(1, 2.0, '3');
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-class A {
-  main() {
-    int v = myUndefinedFunction(1, 2.0, '3');
-  }
-}
-
-int myUndefinedFunction(int i, double d, String s) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_generic_BAD() async {
-    await resolveTestUnit('''
-class A<T> {
-  Map<int, T> items;
-  main() {
-    process(items);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-class A<T> {
-  Map<int, T> items;
-  main() {
-    process(items);
-  }
-}
-
-void process(Map items) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_generic_OK() async {
-    await resolveTestUnit('''
-class A {
-  List<int> items;
-  main() {
-    process(items);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-class A {
-  List<int> items;
-  main() {
-    process(items);
-  }
-}
-
-void process(List<int> items) {
-}
-''');
-    _assertLinkedGroup(
-        change.linkedEditGroups[2],
-        ['List<int> items) {'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['List<int>', 'Iterable<int>', 'Object']));
-  }
-
-  test_undefinedFunction_create_importType() async {
-    addSource('/project/lib.dart', r'''
-library lib;
-import 'dart:async';
-Future getFuture() => null;
-''');
-    await resolveTestUnit('''
-import 'lib.dart';
-main() {
-  test(getFuture());
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-import 'dart:async';
-
-import 'lib.dart';
-main() {
-  test(getFuture());
-}
-
-void test(Future future) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_nullArgument() async {
-    await resolveTestUnit('''
-main() {
-  test(null);
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  test(null);
-}
-
-void test(param0) {
-}
-''');
-  }
-
-  test_undefinedFunction_create_returnType_bool_expressions() async {
-    await assert_undefinedFunction_create_returnType_bool("!test();");
-    await assert_undefinedFunction_create_returnType_bool("b && test();");
-    await assert_undefinedFunction_create_returnType_bool("test() && b;");
-    await assert_undefinedFunction_create_returnType_bool("b || test();");
-    await assert_undefinedFunction_create_returnType_bool("test() || b;");
-  }
-
-  test_undefinedFunction_create_returnType_bool_statements() async {
-    await assert_undefinedFunction_create_returnType_bool("assert ( test() );");
-    await assert_undefinedFunction_create_returnType_bool("if ( test() ) {}");
-    await assert_undefinedFunction_create_returnType_bool(
-        "while ( test() ) {}");
-    await assert_undefinedFunction_create_returnType_bool(
-        "do {} while ( test() );");
-  }
-
-  test_undefinedFunction_create_returnType_fromAssignment_eq() async {
-    await resolveTestUnit('''
-main() {
-  int v;
-  v = myUndefinedFunction();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  int v;
-  v = myUndefinedFunction();
-}
-
-int myUndefinedFunction() {
-}
-''');
-  }
-
-  test_undefinedFunction_create_returnType_fromAssignment_plusEq() async {
-    await resolveTestUnit('''
-main() {
-  int v;
-  v += myUndefinedFunction();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  int v;
-  v += myUndefinedFunction();
-}
-
-num myUndefinedFunction() {
-}
-''');
-  }
-
-  test_undefinedFunction_create_returnType_fromBinary_right() async {
-    await resolveTestUnit('''
-main() {
-  0 + myUndefinedFunction();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  0 + myUndefinedFunction();
-}
-
-num myUndefinedFunction() {
-}
-''');
-  }
-
-  test_undefinedFunction_create_returnType_fromInitializer() async {
-    await resolveTestUnit('''
-main() {
-  int v = myUndefinedFunction();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  int v = myUndefinedFunction();
-}
-
-int myUndefinedFunction() {
-}
-''');
-  }
-
-  test_undefinedFunction_create_returnType_fromInvocationArgument() async {
-    await resolveTestUnit('''
-foo(int p) {}
-main() {
-  foo( myUndefinedFunction() );
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-foo(int p) {}
-main() {
-  foo( myUndefinedFunction() );
-}
-
-int myUndefinedFunction() {
-}
-''');
-  }
-
-  test_undefinedFunction_create_returnType_fromReturn() async {
-    await resolveTestUnit('''
-int main() {
-  return myUndefinedFunction();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-int main() {
-  return myUndefinedFunction();
-}
-
-int myUndefinedFunction() {
-}
-''');
-  }
-
-  test_undefinedFunction_create_returnType_void() async {
-    await resolveTestUnit('''
-main() {
-  myUndefinedFunction();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_FUNCTION, '''
-main() {
-  myUndefinedFunction();
-}
-
-void myUndefinedFunction() {
-}
-''');
-  }
-
-  test_undefinedFunction_useSimilar_fromImport() async {
-    await resolveTestUnit('''
-main() {
-  pritn(0);
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-main() {
-  print(0);
-}
-''');
-  }
-
-  test_undefinedFunction_useSimilar_prefixed_fromImport() async {
-    await resolveTestUnit('''
-import 'dart:core' as c;
-main() {
-  c.prnt(42);
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-import 'dart:core' as c;
-main() {
-  c.print(42);
-}
-''');
-  }
-
-  test_undefinedFunction_useSimilar_prefixed_ignoreLocal() async {
-    await resolveTestUnit('''
-import 'dart:async' as c;
-main() {
-  c.main();
-}
-''');
-    await assertNoFix(DartFixKind.CHANGE_TO);
-  }
-
-  test_undefinedFunction_useSimilar_thisLibrary() async {
-    await resolveTestUnit('''
-myFunction() {}
-main() {
-  myFuntcion();
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-myFunction() {}
-main() {
-  myFunction();
-}
-''');
-  }
-
-  test_undefinedGetter_useSimilar_hint() async {
-    await resolveTestUnit('''
-class A {
-  int myField;
-}
-main(A a) {
-  var x = a;
-  print(x.myFild);
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  int myField;
-}
-main(A a) {
-  var x = a;
-  print(x.myField);
-}
-''');
-  }
-
-  test_undefinedGetter_useSimilar_qualified() async {
-    await resolveTestUnit('''
-class A {
-  int myField;
-}
-main(A a) {
-  print(a.myFild);
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  int myField;
-}
-main(A a) {
-  print(a.myField);
-}
-''');
-  }
-
-  test_undefinedGetter_useSimilar_qualified_static() async {
-    await resolveTestUnit('''
-class A {
-  static int MY_NAME = 1;
-}
-main() {
-  A.MY_NAM;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  static int MY_NAME = 1;
-}
-main() {
-  A.MY_NAME;
-}
-''');
-  }
-
-  test_undefinedGetter_useSimilar_unqualified() async {
-    await resolveTestUnit('''
-class A {
-  int myField;
-  main() {
-    print(myFild);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  int myField;
-  main() {
-    print(myField);
-  }
-}
-''');
-  }
-
-  test_undefinedMethod_create_BAD_inSDK() async {
-    await resolveTestUnit('''
-main() {
-  List.foo();
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_METHOD);
-  }
-
-  test_undefinedMethod_create_BAD_targetIsEnum() async {
-    await resolveTestUnit('''
-enum MyEnum {A, B}
-main() {
-  MyEnum.foo();
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_METHOD);
-  }
-
-  test_undefinedMethod_create_generic_BAD_argumentType() async {
-    await resolveTestUnit('''
-class A<T> {
-  B b;
-  Map<int, T> items;
-  main() {
-    b.process(items);
-  }
-}
-
-class B {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A<T> {
-  B b;
-  Map<int, T> items;
-  main() {
-    b.process(items);
-  }
-}
-
-class B {
-  void process(Map items) {}
-}
-''');
-  }
-
-  test_undefinedMethod_create_generic_BAD_returnType() async {
-    await resolveTestUnit('''
-class A<T> {
-  main() {
-    T t = new B().compute();
-  }
-}
-
-class B {
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A<T> {
-  main() {
-    T t = new B().compute();
-  }
-}
-
-class B {
-  compute() {}
-}
-''');
-  }
-
-  test_undefinedMethod_create_generic_OK_literal() async {
-    await resolveTestUnit('''
-class A {
-  B b;
-  List<int> items;
-  main() {
-    b.process(items);
-  }
-}
-
-class B {}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  B b;
-  List<int> items;
-  main() {
-    b.process(items);
-  }
-}
-
-class B {
-  void process(List<int> items) {}
-}
-''');
-  }
-
-  test_undefinedMethod_create_generic_OK_local() async {
-    await resolveTestUnit('''
-class A<T> {
-  List<T> items;
-  main() {
-    process(items);
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A<T> {
-  List<T> items;
-  main() {
-    process(items);
-  }
-
-  void process(List<T> items) {}
-}
-''');
-  }
-
-  test_undefinedMethod_createQualified_emptyClassBody() async {
-    await resolveTestUnit('''
-class A {}
-main() {
-  A.myUndefinedMethod();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  static void myUndefinedMethod() {}
-}
-main() {
-  A.myUndefinedMethod();
-}
-''');
-  }
-
-  test_undefinedMethod_createQualified_fromClass() async {
-    await resolveTestUnit('''
-class A {
-}
-main() {
-  A.myUndefinedMethod();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  static void myUndefinedMethod() {}
-}
-main() {
-  A.myUndefinedMethod();
-}
-''');
-  }
-
-  test_undefinedMethod_createQualified_fromClass_hasOtherMember() async {
-    await resolveTestUnit('''
-class A {
-  foo() {}
-}
-main() {
-  A.myUndefinedMethod();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  foo() {}
-
-  static void myUndefinedMethod() {}
-}
-main() {
-  A.myUndefinedMethod();
-}
-''');
-  }
-
-  test_undefinedMethod_createQualified_fromInstance() async {
-    await resolveTestUnit('''
-class A {
-}
-main(A a) {
-  a.myUndefinedMethod();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  void myUndefinedMethod() {}
-}
-main(A a) {
-  a.myUndefinedMethod();
-}
-''');
-  }
-
-  test_undefinedMethod_createQualified_targetIsFunctionType() async {
-    await resolveTestUnit('''
-typedef A();
-main() {
-  A.myUndefinedMethod();
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_METHOD);
-  }
-
-  test_undefinedMethod_createQualified_targetIsUnresolved() async {
-    await resolveTestUnit('''
-main() {
-  NoSuchClass.myUndefinedMethod();
-}
-''');
-    await assertNoFix(DartFixKind.CREATE_METHOD);
-  }
-
-  test_undefinedMethod_createUnqualified_duplicateArgumentNames() async {
-    await resolveTestUnit('''
-class C {
-  int x;
-}
-
-class D {
-  foo(C c1, C c2) {
-    bar(c1.x, c2.x);
-  }
-}''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class C {
-  int x;
-}
-
-class D {
-  foo(C c1, C c2) {
-    bar(c1.x, c2.x);
-  }
-
-  void bar(int x, int x2) {}
-}''');
-  }
-
-  test_undefinedMethod_createUnqualified_parameters() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    myUndefinedMethod(0, 1.0, '3');
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  main() {
-    myUndefinedMethod(0, 1.0, '3');
-  }
-
-  void myUndefinedMethod(int i, double d, String s) {}
-}
-''');
-    // linked positions
-    int index = 0;
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++], ['void myUndefinedMethod(']);
-    _assertLinkedGroup(change.linkedEditGroups[index++],
-        ['myUndefinedMethod(0', 'myUndefinedMethod(int']);
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++],
-        ['int i'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['int', 'num', 'Object', 'Comparable<num>']));
-    _assertLinkedGroup(change.linkedEditGroups[index++], ['i,']);
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++],
-        ['double d'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['double', 'num', 'Object', 'Comparable<num>']));
-    _assertLinkedGroup(change.linkedEditGroups[index++], ['d,']);
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++],
-        ['String s'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['String', 'Object', 'Comparable<String>']));
-    _assertLinkedGroup(change.linkedEditGroups[index++], ['s)']);
-  }
-
-  test_undefinedMethod_createUnqualified_parameters_named() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    myUndefinedMethod(0, bbb: 1.0, ccc: '2');
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  main() {
-    myUndefinedMethod(0, bbb: 1.0, ccc: '2');
-  }
-
-  void myUndefinedMethod(int i, {double bbb, String ccc}) {}
-}
-''');
-    // linked positions
-    int index = 0;
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++], ['void myUndefinedMethod(']);
-    _assertLinkedGroup(change.linkedEditGroups[index++],
-        ['myUndefinedMethod(0', 'myUndefinedMethod(int']);
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++],
-        ['int i'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['int', 'num', 'Object', 'Comparable<num>']));
-    _assertLinkedGroup(change.linkedEditGroups[index++], ['i,']);
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++],
-        ['double bbb'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['double', 'num', 'Object', 'Comparable<num>']));
-    _assertLinkedGroup(
-        change.linkedEditGroups[index++],
-        ['String ccc'],
-        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
-            ['String', 'Object', 'Comparable<String>']));
-  }
-
-  test_undefinedMethod_createUnqualified_returnType() async {
-    await resolveTestUnit('''
-class A {
-  main() {
-    int v = myUndefinedMethod();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  main() {
-    int v = myUndefinedMethod();
-  }
-
-  int myUndefinedMethod() {}
-}
-''');
-    // linked positions
-    _assertLinkedGroup(change.linkedEditGroups[0], ['int myUndefinedMethod(']);
-    _assertLinkedGroup(change.linkedEditGroups[1],
-        ['myUndefinedMethod();', 'myUndefinedMethod() {']);
-  }
-
-  test_undefinedMethod_createUnqualified_staticFromField() async {
-    await resolveTestUnit('''
-class A {
-  static var f = myUndefinedMethod();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  static var f = myUndefinedMethod();
-
-  static myUndefinedMethod() {}
-}
-''');
-  }
-
-  test_undefinedMethod_createUnqualified_staticFromMethod() async {
-    await resolveTestUnit('''
-class A {
-  static main() {
-    myUndefinedMethod();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  static main() {
-    myUndefinedMethod();
-  }
-
-  static void myUndefinedMethod() {}
-}
-''');
-  }
-
-  test_undefinedMethod_hint_createQualified_fromInstance() async {
-    await resolveTestUnit('''
-class A {
-}
-main() {
-  var a = new A();
-  a.myUndefinedMethod();
-}
-''');
-    await assertHasFix(DartFixKind.CREATE_METHOD, '''
-class A {
-  void myUndefinedMethod() {}
-}
-main() {
-  var a = new A();
-  a.myUndefinedMethod();
-}
-''');
-  }
-
-  test_undefinedMethod_parameterType_differentPrefixInTargetUnit() async {
-    String code2 = r'''
-library test2;
-import 'test3.dart' as bbb;
-export 'test3.dart';
-class D {
-}
-''';
-    addSource('/project/test2.dart', code2);
-    addSource('/project/test3.dart', r'''
-library test3;
-class E {}
-''');
-    await resolveTestUnit('''
-library test;
-import 'test2.dart' as aaa;
-main(aaa.D d, aaa.E e) {
-  d.foo(e);
-}
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_METHOD, error);
-    change = fix.change;
-    // apply to "test2.dart"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file, convertPath('/project/test2.dart'));
-    expect(SourceEdit.applySequence(code2, fileEdit.edits), r'''
-library test2;
-import 'test3.dart' as bbb;
-export 'test3.dart';
-class D {
-  void foo(bbb.E e) {}
-}
-''');
-  }
-
-  test_undefinedMethod_parameterType_inTargetUnit() async {
-    String code2 = r'''
-library test2;
-class D {
-}
-class E {}
-''';
-    addSource('/project/test2.dart', code2);
-    await resolveTestUnit('''
-library test;
-import 'test2.dart' as test2;
-main(test2.D d, test2.E e) {
-  d.foo(e);
-}
-''');
-    AnalysisError error = await _findErrorToFix();
-    fix = await _assertHasFix(DartFixKind.CREATE_METHOD, error);
-    change = fix.change;
-    // apply to "test2.dart"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    SourceFileEdit fileEdit = change.edits[0];
-    expect(fileEdit.file, convertPath('/project/test2.dart'));
-    expect(SourceEdit.applySequence(code2, fileEdit.edits), r'''
-library test2;
-class D {
-  void foo(E e) {}
-}
-class E {}
-''');
-  }
-
-  test_undefinedMethod_useSimilar_ignoreOperators() async {
-    await resolveTestUnit('''
-main(Object object) {
-  object.then();
-}
-''');
-    await assertNoFix(DartFixKind.CHANGE_TO);
-  }
-
-  test_undefinedMethod_useSimilar_qualified() async {
-    await resolveTestUnit('''
-class A {
-  myMethod() {}
-}
-main() {
-  A a = new A();
-  a.myMehtod();
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  myMethod() {}
-}
-main() {
-  A a = new A();
-  a.myMethod();
-}
-''');
-  }
-
-  test_undefinedMethod_useSimilar_unqualified_superClass() async {
-    await resolveTestUnit('''
-class A {
-  myMethod() {}
-}
-class B extends A {
-  main() {
-    myMehtod();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  myMethod() {}
-}
-class B extends A {
-  main() {
-    myMethod();
-  }
-}
-''');
-  }
-
-  test_undefinedMethod_useSimilar_unqualified_thisClass() async {
-    await resolveTestUnit('''
-class A {
-  myMethod() {}
-  main() {
-    myMehtod();
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  myMethod() {}
-  main() {
-    myMethod();
-  }
-}
-''');
-  }
-
-  test_undefinedParameter_convertFlutterChild_BAD_listNotWidget() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-      child: <Widget>[
-        new Container(),
-        null,
-      ],
-    ),
-  );
-}
-''');
-    await assertNoFix(DartFixKind.CONVERT_FLUTTER_CHILD);
-  }
-
-  test_undefinedParameter_convertFlutterChild_OK_hasList() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-      child: [
-        new Text('111'),
-        new Text('222'),
-      ],
-    ),
-  );
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_FLUTTER_CHILD, '''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-      children: <Widget>[
-        new Text('111'),
-        new Text('222'),
-      ],
-    ),
-  );
-}
-''');
-  }
-
-  test_undefinedParameter_convertFlutterChild_OK_hasTypedList() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-      child: <Widget>[
-        new Text('111'),
-        new Text('222'),
-      ],
-    ),
-  );
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_FLUTTER_CHILD, '''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Container(
-    child: new Row(
-      children: <Widget>[
-        new Text('111'),
-        new Text('222'),
-      ],
-    ),
-  );
-}
-''');
-  }
-
-  test_undefinedParameter_convertFlutterChild_OK_multiLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-    body: new Row(
-      child: new Container(
-        width: 200.0,
-        height: 300.0,
-      ),
-    ),
-  );
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_FLUTTER_CHILD, '''
-import 'package:flutter/material.dart';
-build() {
-  return new Scaffold(
-    body: new Row(
-      children: <Widget>[
-        new Container(
-          width: 200.0,
-          height: 300.0,
-        ),
-      ],
-    ),
-  );
-}
-''');
-  }
-
-  test_undefinedParameter_convertFlutterChild_OK_widgetVariable() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/material.dart';
-build() {
-  var text = new Text('foo');
-  new Row(
-    child: text,
-  );
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_FLUTTER_CHILD, '''
-import 'package:flutter/material.dart';
-build() {
-  var text = new Text('foo');
-  new Row(
-    children: <Widget>[text],
-  );
-}
-''');
-  }
-
-  test_undefinedParameter_convertFlutterChildren_BAD_notWidget() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Center(
-    children: [
-      new Object(),
-    ],
-  );
-}
-''');
-    await assertNoFix(DartFixKind.CONVERT_FLUTTER_CHILDREN);
-  }
-
-  test_undefinedParameter_convertFlutterChildren_OK_multiLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Center(
-    children: [
-      new Container(
-        width: 200.0,
-        height: 300.0,
-      ),
-    ],
-  );
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_FLUTTER_CHILDREN, '''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Center(
-    child: new Container(
-      width: 200.0,
-      height: 300.0,
-    ),
-  );
-}
-''');
-  }
-
-  test_undefinedParameter_convertFlutterChildren_OK_singleLine() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Center(
-    children: [
-      new Text('foo'),
-    ],
-  );
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_FLUTTER_CHILDREN, '''
-import 'package:flutter/widgets.dart';
-build() {
-  return new Center(
-    child: new Text('foo'),
-  );
-}
-''');
-  }
-
-  test_undefinedParameter_convertFlutterChildren_OK_singleLine2() async {
-    addFlutterPackage();
-    await resolveTestUnit('''
-import 'package:flutter/widgets.dart';
-build() {
-  var text = new Text('foo');
-  new Center(
-    children: [text],
-  );
-}
-''');
-    await assertHasFix(DartFixKind.CONVERT_FLUTTER_CHILDREN, '''
-import 'package:flutter/widgets.dart';
-build() {
-  var text = new Text('foo');
-  new Center(
-    child: text,
-  );
-}
-''');
-  }
-
-  test_undefinedSetter_useSimilar_hint() async {
-    await resolveTestUnit('''
-class A {
-  int myField;
-}
-main(A a) {
-  var x = a;
-  x.myFild = 42;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  int myField;
-}
-main(A a) {
-  var x = a;
-  x.myField = 42;
-}
-''');
-  }
-
-  test_undefinedSetter_useSimilar_qualified() async {
-    await resolveTestUnit('''
-class A {
-  int myField;
-}
-main(A a) {
-  a.myFild = 42;
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  int myField;
-}
-main(A a) {
-  a.myField = 42;
-}
-''');
-  }
-
-  test_undefinedSetter_useSimilar_unqualified() async {
-    await resolveTestUnit('''
-class A {
-  int myField;
-  main() {
-    myFild = 42;
-  }
-}
-''');
-    await assertHasFix(DartFixKind.CHANGE_TO, '''
-class A {
-  int myField;
-  main() {
-    myField = 42;
-  }
-}
-''');
-  }
-
-  test_useEffectiveIntegerDivision() async {
-    await resolveTestUnit('''
-main() {
-  var a = 5;
-  var b = 2;
-  print((a / b).toInt());
-}
-''');
-    await assertHasFix(DartFixKind.USE_EFFECTIVE_INTEGER_DIVISION, '''
-main() {
-  var a = 5;
-  var b = 2;
-  print(a ~/ b);
-}
-''');
-  }
-
-  test_useImportPrefix_withClass() async {
-    await resolveTestUnit('''
-import 'dart:async' as pref;
-main() {
-  pref.Stream s = null;
-  Future f = null;
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PREFIX, '''
-import 'dart:async' as pref;
-main() {
-  pref.Stream s = null;
-  pref.Future f = null;
-}
-''');
-  }
-
-  test_useImportPrefix_withTopLevelVariable() async {
-    await resolveTestUnit('''
-import 'dart:math' as pref;
-main() {
-  print(pref.E);
-  print(PI);
-}
-''');
-    await assertHasFix(DartFixKind.IMPORT_LIBRARY_PREFIX, '''
-import 'dart:math' as pref;
-main() {
-  print(pref.E);
-  print(pref.PI);
-}
-''');
-  }
-
-  void _addMetaPackageSource() {
-    addPackageSource('meta', 'meta.dart', r'''
-library meta;
-
-const Required required = const Required();
-
-class Required {
-  final String reason;
-  const Required([this.reason]);
-}
-''');
-  }
-}
-
-@reflectiveTest
-class LintFixTest extends BaseFixProcessorTest {
-  AnalysisError error;
-
-  Future applyFix(FixKind kind) async {
-    fix = await _assertHasFix(kind, error);
-    change = fix.change;
-    // apply to "file"
-    List<SourceFileEdit> fileEdits = change.edits;
-    expect(fileEdits, hasLength(1));
-    resultCode = SourceEdit.applySequence(testCode, change.edits[0].edits);
-  }
-
-  @override
-  assertNoFix(FixKind kind) async {
-    await _assertNoFix(kind, error);
-  }
-
-  Future<void> findLint(String src, String lintCode, {int length: 1}) async {
-    int errorOffset = src.indexOf('/*LINT*/');
-    await resolveTestUnit(src.replaceAll('/*LINT*/', ''));
-    error = new AnalysisError(
-        resolutionMap.elementDeclaredByCompilationUnit(testUnit).source,
-        errorOffset,
-        length,
-        new LintCode(lintCode, '<ignored>'));
-  }
-
-  test_addRequiredAnnotation() async {
-    String src = '''
-void function({String /*LINT*/param}) {
-  assert(param != null);
-}
-''';
-    await findLint(src, LintNames.always_require_non_null_named_parameters);
-    await applyFix(DartFixKind.LINT_ADD_REQUIRED);
-    verifyResult('''
-void function({@required String param}) {
-  assert(param != null);
-}
-''');
-  }
-
-  test_isNotEmpty() async {
-    String src = '''
-f(c) {
-  if (/*LINT*/!c.isEmpty) {}
-}
-''';
-    await findLint(src, LintNames.prefer_is_not_empty);
-
-    await applyFix(DartFixKind.USE_IS_NOT_EMPTY);
-
-    verifyResult('''
-f(c) {
-  if (c.isNotEmpty) {}
-}
-''');
-  }
-
-  test_lint_addMissingOverride_field() async {
-    String src = '''
-class abstract Test {
-  int get t;
-}
-class Sub extends Test {
-  int /*LINT*/t = 42;
-}
-''';
-    await findLint(src, LintNames.annotate_overrides);
-
-    await applyFix(DartFixKind.LINT_ADD_OVERRIDE);
-
-    verifyResult('''
-class abstract Test {
-  int get t;
-}
-class Sub extends Test {
-  @override
-  int t = 42;
-}
-''');
-  }
-
-  test_lint_addMissingOverride_getter() async {
-    String src = '''
-class Test {
-  int get t => null;
-}
-class Sub extends Test {
-  int get /*LINT*/t => null;
-}
-''';
-    await findLint(src, LintNames.annotate_overrides);
-
-    await applyFix(DartFixKind.LINT_ADD_OVERRIDE);
-
-    verifyResult('''
-class Test {
-  int get t => null;
-}
-class Sub extends Test {
-  @override
-  int get t => null;
-}
-''');
-  }
-
-  test_lint_addMissingOverride_method() async {
-    String src = '''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  void /*LINT*/t() { }
-}
-''';
-    await findLint(src, LintNames.annotate_overrides);
-
-    await applyFix(DartFixKind.LINT_ADD_OVERRIDE);
-
-    verifyResult('''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  @override
-  void t() { }
-}
-''');
-  }
-
-  test_lint_addMissingOverride_method_with_doc_comment() async {
-    String src = '''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  /// Doc comment.
-  void /*LINT*/t() { }
-}
-''';
-    await findLint(src, LintNames.annotate_overrides);
-
-    await applyFix(DartFixKind.LINT_ADD_OVERRIDE);
-
-    verifyResult('''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  /// Doc comment.
-  @override
-  void t() { }
-}
-''');
-  }
-
-  test_lint_addMissingOverride_method_with_doc_comment_2() async {
-    String src = '''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  /**
-   * Doc comment.
-   */
-  void /*LINT*/t() { }
-}
-''';
-    await findLint(src, LintNames.annotate_overrides);
-
-    await applyFix(DartFixKind.LINT_ADD_OVERRIDE);
-
-    verifyResult('''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  /**
-   * Doc comment.
-   */
-  @override
-  void t() { }
-}
-''');
-  }
-
-  test_lint_addMissingOverride_method_with_doc_comment_and_metadata() async {
-    String src = '''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  /// Doc comment.
-  @foo
-  void /*LINT*/t() { }
-}
-''';
-    await findLint(src, LintNames.annotate_overrides);
-
-    await applyFix(DartFixKind.LINT_ADD_OVERRIDE);
-
-    verifyResult('''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  /// Doc comment.
-  @override
-  @foo
-  void t() { }
-}
-''');
-  }
-
-  test_lint_addMissingOverride_method_with_non_doc_comment() async {
-    String src = '''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  // Non-doc comment.
-  void /*LINT*/t() { }
-}
-''';
-    await findLint(src, LintNames.annotate_overrides);
-
-    await applyFix(DartFixKind.LINT_ADD_OVERRIDE);
-
-    verifyResult('''
-class Test {
-  void t() { }
-}
-class Sub extends Test {
-  // Non-doc comment.
-  @override
-  void t() { }
-}
-''');
-  }
-
-  test_lint_removeInterpolationBraces() async {
-    String src = r'''
-main() {
-  var v = 42;
-  print('v: /*LINT*/${ v}');
-}
-''';
-    await findLint(src, LintNames.unnecessary_brace_in_string_interp,
-        length: 4);
-    await applyFix(DartFixKind.LINT_REMOVE_INTERPOLATION_BRACES);
-    verifyResult(r'''
-main() {
-  var v = 42;
-  print('v: $v');
-}
-''');
-  }
-
-  test_makeFieldFinal_noKeyword() async {
-    String src = '''
-class C {
-  /*LINT*/f = 2;
-}
-''';
-    await findLint(src, LintNames.prefer_final_fields);
-
-    await applyFix(DartFixKind.MAKE_FINAL);
-
-    verifyResult('''
-class C {
-  final f = 2;
-}
-''');
-  }
-
-  test_makeFieldFinal_type() async {
-    String src = '''
-class C {
-  int /*LINT*/f = 2;
-}
-''';
-    await findLint(src, LintNames.prefer_final_fields);
-
-    await applyFix(DartFixKind.MAKE_FINAL);
-
-    verifyResult('''
-class C {
-  final int f = 2;
-}
-''');
-  }
-
-  test_makeFieldFinal_var() async {
-    String src = '''
-class C {
-  var /*LINT*/f = 2;
-}
-''';
-    await findLint(src, LintNames.prefer_final_fields);
-
-    await applyFix(DartFixKind.MAKE_FINAL);
-
-    verifyResult('''
-class C {
-  final f = 2;
-}
-''');
-  }
-
-  test_makeLocalFinal_type() async {
-    String src = '''
-bad() {
-  int /*LINT*/x = 2;
-}
-''';
-    await findLint(src, LintNames.prefer_final_locals);
-
-    await applyFix(DartFixKind.MAKE_FINAL);
-
-    verifyResult('''
-bad() {
-  final int x = 2;
-}
-''');
-  }
-
-  test_makeLocalFinal_var() async {
-    String src = '''
-bad() {
-  var /*LINT*/x = 2;
-}
-''';
-    await findLint(src, LintNames.prefer_final_locals);
-
-    await applyFix(DartFixKind.MAKE_FINAL);
-
-    verifyResult('''
-bad() {
-  final x = 2;
-}
-''');
-  }
-
-  test_removeAwait_intLiteral() async {
-    String src = '''
-bad() async {
-  print(/*LINT*/await 23);
-}
-''';
-    await findLint(src, LintNames.await_only_futures);
-
-    await applyFix(DartFixKind.REMOVE_AWAIT);
-
-    verifyResult('''
-bad() async {
-  print(23);
-}
-''');
-  }
-
-  test_removeAwait_StringLiteral() async {
-    String src = '''
-bad() async {
-  print(/*LINT*/await 'hola');
-}
-''';
-    await findLint(src, LintNames.await_only_futures);
-
-    await applyFix(DartFixKind.REMOVE_AWAIT);
-
-    verifyResult('''
-bad() async {
-  print('hola');
-}
-''');
-  }
-
-  test_removeEmptyCatch_newLine() async {
-    String src = '''
-void foo() {
-  try {}
-  catch (e) {/*LINT*/}
-  finally {}
-}
-''';
-    await findLint(src, LintNames.empty_catches);
-
-    await applyFix(DartFixKind.REMOVE_EMPTY_CATCH);
-
-    verifyResult('''
-void foo() {
-  try {}
-  finally {}
-}
-''');
-  }
-
-  test_removeEmptyCatch_sameLine() async {
-    String src = '''
-void foo() {
-  try {} catch (e) {/*LINT*/} finally {}
-}
-''';
-    await findLint(src, LintNames.empty_catches);
-
-    await applyFix(DartFixKind.REMOVE_EMPTY_CATCH);
-
-    verifyResult('''
-void foo() {
-  try {} finally {}
-}
-''');
-  }
-
-  test_removeEmptyConstructorBody() async {
-    String src = '''
-class C {
-  C() {/*LINT*/}
-}
-''';
-    await findLint(src, LintNames.empty_constructor_bodies);
-
-    await applyFix(DartFixKind.REMOVE_EMPTY_CONSTRUCTOR_BODY);
-
-    verifyResult('''
-class C {
-  C();
-}
-''');
-  }
-
-  test_removeEmptyElse_newLine() async {
-    String src = '''
-void foo(bool cond) {
-  if (cond) {
-    //
-  }
-  else /*LINT*/;
-}
-''';
-    await findLint(src, LintNames.avoid_empty_else);
-
-    await applyFix(DartFixKind.REMOVE_EMPTY_ELSE);
-
-    verifyResult('''
-void foo(bool cond) {
-  if (cond) {
-    //
-  }
-}
-''');
-  }
-
-  test_removeEmptyElse_sameLine() async {
-    String src = '''
-void foo(bool cond) {
-  if (cond) {
-    //
-  } else /*LINT*/;
-}
-''';
-    await findLint(src, LintNames.avoid_empty_else);
-
-    await applyFix(DartFixKind.REMOVE_EMPTY_ELSE);
-
-    verifyResult('''
-void foo(bool cond) {
-  if (cond) {
-    //
-  }
-}
-''');
-  }
-
-  test_removeEmptyStatement_insideBlock() async {
-    String src = '''
-void foo() {
-  while(true) {
-    /*LINT*/;
-  }
-}
-''';
-    await findLint(src, LintNames.empty_statements);
-
-    await applyFix(DartFixKind.REMOVE_EMPTY_STATEMENT);
-
-    verifyResult('''
-void foo() {
-  while(true) {
-  }
-}
-''');
-  }
-
-  test_removeEmptyStatement_outOfBlock_otherLine() async {
-    String src = '''
-void foo() {
-  while(true)
-  /*LINT*/;
-  print('hi');
-}
-''';
-    await findLint(src, LintNames.empty_statements);
-
-    await applyFix(DartFixKind.REPLACE_WITH_BRACKETS);
-
-    verifyResult('''
-void foo() {
-  while(true) {}
-  print('hi');
-}
-''');
-  }
-
-  test_removeEmptyStatement_outOfBlock_sameLine() async {
-    String src = '''
-void foo() {
-  while(true)/*LINT*/;
-  print('hi');
-}
-''';
-    await findLint(src, LintNames.empty_statements);
-
-    await applyFix(DartFixKind.REPLACE_WITH_BRACKETS);
-
-    verifyResult('''
-void foo() {
-  while(true) {}
-  print('hi');
-}
-''');
-  }
-
-  test_removeInitializer_field() async {
-    String src = '''
-class Test {
-  int /*LINT*/x = null;
-}
-''';
-    await findLint(src, LintNames.avoid_init_to_null);
-
-    await applyFix(DartFixKind.REMOVE_INITIALIZER);
-
-    verifyResult('''
-class Test {
-  int x;
-}
-''');
-  }
-
-  test_removeInitializer_listOfVariableDeclarations() async {
-    String src = '''
-String a = 'a', /*LINT*/b = null, c = 'c';
-''';
-    await findLint(src, LintNames.avoid_init_to_null);
-
-    await applyFix(DartFixKind.REMOVE_INITIALIZER);
-
-    verifyResult('''
-String a = 'a', b, c = 'c';
-''');
-  }
-
-  test_removeInitializer_topLevel() async {
-    String src = '''
-var /*LINT*/x = null;
-''';
-    await findLint(src, LintNames.avoid_init_to_null);
-
-    await applyFix(DartFixKind.REMOVE_INITIALIZER);
-
-    verifyResult('''
-var x;
-''');
-  }
-
-  test_removeMethodDeclaration_getter() async {
-    String src = '''
-class A {
-  int x;
-}
-class B extends A {
-  @override
-  int get /*LINT*/x => super.x;
-}
-''';
-    await findLint(src, LintNames.unnecessary_override);
-
-    await applyFix(DartFixKind.REMOVE_METHOD_DECLARATION);
-
-    verifyResult('''
-class A {
-  int x;
-}
-class B extends A {
-}
-''');
-  }
-
-  test_removeMethodDeclaration_method() async {
-    String src = '''
-class A {
-  @override
-  String /*LINT*/toString() => super.toString();
-}
-''';
-    await findLint(src, LintNames.unnecessary_override);
-
-    await applyFix(DartFixKind.REMOVE_METHOD_DECLARATION);
-
-    verifyResult('''
-class A {
-}
-''');
-  }
-
-  test_removeMethodDeclaration_setter() async {
-    String src = '''
-class A {
-  int x;
-}
-class B extends A {
-  @override
-  set /*LINT*/x(int other) {
-    this.x = other;
-  }
-}
-''';
-    await findLint(src, LintNames.unnecessary_override);
-
-    await applyFix(DartFixKind.REMOVE_METHOD_DECLARATION);
-
-    verifyResult('''
-class A {
-  int x;
-}
-class B extends A {
-}
-''');
-  }
-
-  test_removeThisExpression_methodInvocation_oneCharacterOperator() async {
-    String src = '''
-class A {
-  void foo() {
-    /*LINT*/this.foo();
-  }
-}
-''';
-    await findLint(src, LintNames.unnecessary_this);
-
-    await applyFix(DartFixKind.REMOVE_THIS_EXPRESSION);
-
-    verifyResult('''
-class A {
-  void foo() {
-    foo();
-  }
-}
-''');
-  }
-
-  test_removeThisExpression_methodInvocation_twoCharactersOperator() async {
-    String src = '''
-class A {
-  void foo() {
-    /*LINT*/this?.foo();
-  }
-}
-''';
-    await findLint(src, LintNames.unnecessary_this);
-
-    await applyFix(DartFixKind.REMOVE_THIS_EXPRESSION);
-
-    verifyResult('''
-class A {
-  void foo() {
-    foo();
-  }
-}
-''');
-  }
-
-  test_removeThisExpression_notAThisExpression() async {
-    String src = '''
-void foo() {
-  final /*LINT*/this.id;
-}
-''';
-    await findLint(src, LintNames.unnecessary_this);
-
-    await assertNoFix(DartFixKind.REMOVE_THIS_EXPRESSION);
-  }
-
-  test_removeThisExpression_propertyAccess_oneCharacterOperator() async {
-    String src = '''
-class A {
-  int x;
-  void foo() {
-    /*LINT*/this.x = 2;
-  }
-}
-''';
-    await findLint(src, LintNames.unnecessary_this);
-
-    await applyFix(DartFixKind.REMOVE_THIS_EXPRESSION);
-
-    verifyResult('''
-class A {
-  int x;
-  void foo() {
-    x = 2;
-  }
-}
-''');
-  }
-
-  test_removeThisExpression_propertyAccess_twoCharactersOperator() async {
-    String src = '''
-class A {
-  int x;
-  void foo() {
-    /*LINT*/this?.x = 2;
-  }
-}
-''';
-    await findLint(src, LintNames.unnecessary_this);
-
-    await applyFix(DartFixKind.REMOVE_THIS_EXPRESSION);
-
-    verifyResult('''
-class A {
-  int x;
-  void foo() {
-    x = 2;
-  }
-}
-''');
-  }
-
-  test_removeTypeAnnotation_avoidAnnotatingWithDynamic_InsideFunctionTypedFormalParameter() async {
-    String src = '''
-bad(void foo(/*LINT*/dynamic x)) {
-  return null;
-}
-''';
-    await findLint(src, LintNames.avoid_annotating_with_dynamic);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-bad(void foo(x)) {
-  return null;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_avoidAnnotatingWithDynamic_NamedParameter() async {
-    String src = '''
-bad({/*LINT*/dynamic defaultValue}) {
-  return null;
-}
-''';
-    await findLint(src, LintNames.avoid_annotating_with_dynamic);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-bad({defaultValue}) {
-  return null;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_avoidAnnotatingWithDynamic_NormalParameter() async {
-    String src = '''
-bad(/*LINT*/dynamic defaultValue) {
-  return null;
-}
-''';
-    await findLint(src, LintNames.avoid_annotating_with_dynamic);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-bad(defaultValue) {
-  return null;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_avoidAnnotatingWithDynamic_OptionalParameter() async {
-    String src = '''
-bad([/*LINT*/dynamic defaultValue]) {
-  return null;
-}
-''';
-    await findLint(src, LintNames.avoid_annotating_with_dynamic);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-bad([defaultValue]) {
-  return null;
-}
-''');
-  }
-
-  test_removeTypeAnnotation_avoidReturnTypesOnSetters_void() async {
-    String src = '''
-/*LINT*/void set speed2(int ms) {}
-''';
-    await findLint(src, LintNames.avoid_return_types_on_setters);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-set speed2(int ms) {}
-''');
-  }
-
-  test_removeTypeAnnotation_avoidTypesOnClosureParameters_FunctionTypedFormalParameter() async {
-    String src = '''
-var functionWithFunction = (/*LINT*/int f(int x)) => f(0);
-''';
-    await findLint(src, LintNames.avoid_types_on_closure_parameters);
-
-    await applyFix(DartFixKind.REPLACE_WITH_IDENTIFIER);
-
-    verifyResult('''
-var functionWithFunction = (f) => f(0);
-''');
-  }
-
-  test_removeTypeAnnotation_avoidTypesOnClosureParameters_NamedParameter() async {
-    String src = '''
-var x = ({/*LINT*/Future<int> defaultValue}) {
-  return null;
-};
-''';
-    await findLint(src, LintNames.avoid_types_on_closure_parameters);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-var x = ({defaultValue}) {
-  return null;
-};
-''');
-  }
-
-  test_removeTypeAnnotation_avoidTypesOnClosureParameters_NormalParameter() async {
-    String src = '''
-var x = (/*LINT*/Future<int> defaultValue) {
-  return null;
-};
-''';
-    await findLint(src, LintNames.avoid_types_on_closure_parameters);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-var x = (defaultValue) {
-  return null;
-};
-''');
-  }
-
-  test_removeTypeAnnotation_avoidTypesOnClosureParameters_OptionalParameter() async {
-    String src = '''
-var x = ([/*LINT*/Future<int> defaultValue]) {
-  return null;
-};
-''';
-    await findLint(src, LintNames.avoid_types_on_closure_parameters);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-var x = ([defaultValue]) {
-  return null;
-};
-''');
-  }
-
-  test_removeTypeAnnotation_typeInitFormals_void() async {
-    String src = '''
-class C {
-  int f;
-  C(/*LINT*/int this.f);
-}
-''';
-    await findLint(src, LintNames.type_init_formals);
-
-    await applyFix(DartFixKind.REMOVE_TYPE_NAME);
-
-    verifyResult('''
-class C {
-  int f;
-  C(this.f);
-}
-''');
-  }
-
-  test_renameToCamelCase_BAD_parameter_optionalNamed() async {
-    String src = '''
-foo({int /*LINT*/my_integer_variable}) {
-  print(my_integer_variable);
-}
-''';
-    await findLint(src, LintNames.non_constant_identifier_names);
-    await assertNoFix(DartFixKind.RENAME_TO_CAMEL_CASE);
-  }
-
-  test_renameToCamelCase_OK_localVariable() async {
-    String src = '''
-main() {
-  int /*LINT*/my_integer_variable = 42;
-  int foo;
-  print(my_integer_variable);
-  print(foo);
-}
-''';
-    await findLint(src, LintNames.non_constant_identifier_names);
-
-    await applyFix(DartFixKind.RENAME_TO_CAMEL_CASE);
-
-    verifyResult('''
-main() {
-  int myIntegerVariable = 42;
-  int foo;
-  print(myIntegerVariable);
-  print(foo);
-}
-''');
-  }
-
-  test_renameToCamelCase_OK_parameter_closure() async {
-    String src = '''
-main() {
-  [0, 1, 2].forEach((/*LINT*/my_integer_variable) {
-    print(my_integer_variable);
-  });
-}
-''';
-    await findLint(src, LintNames.non_constant_identifier_names);
-
-    await applyFix(DartFixKind.RENAME_TO_CAMEL_CASE);
-
-    verifyResult('''
-main() {
-  [0, 1, 2].forEach((myIntegerVariable) {
-    print(myIntegerVariable);
-  });
-}
-''');
-  }
-
-  test_renameToCamelCase_OK_parameter_function() async {
-    String src = '''
-main(int /*LINT*/my_integer_variable) {
-  print(my_integer_variable);
-}
-''';
-    await findLint(src, LintNames.non_constant_identifier_names);
-
-    await applyFix(DartFixKind.RENAME_TO_CAMEL_CASE);
-
-    verifyResult('''
-main(int myIntegerVariable) {
-  print(myIntegerVariable);
-}
-''');
-  }
-
-  test_renameToCamelCase_OK_parameter_method() async {
-    String src = '''
-class A {
-  main(int /*LINT*/my_integer_variable) {
-    print(my_integer_variable);
-  }
-}
-''';
-    await findLint(src, LintNames.non_constant_identifier_names);
-
-    await applyFix(DartFixKind.RENAME_TO_CAMEL_CASE);
-
-    verifyResult('''
-class A {
-  main(int myIntegerVariable) {
-    print(myIntegerVariable);
-  }
-}
-''');
-  }
-
-  test_renameToCamelCase_OK_parameter_optionalPositional() async {
-    String src = '''
-main([int /*LINT*/my_integer_variable]) {
-  print(my_integer_variable);
-}
-''';
-    await findLint(src, LintNames.non_constant_identifier_names);
-
-    await applyFix(DartFixKind.RENAME_TO_CAMEL_CASE);
-
-    verifyResult('''
-main([int myIntegerVariable]) {
-  print(myIntegerVariable);
-}
-''');
-  }
-
-  test_replaceFinalWithConst_method() async {
-    String src = '''
-/*LINT*/final int a = 1;
-''';
-    await findLint(src, LintNames.prefer_const_declarations);
-
-    await applyFix(DartFixKind.REPLACE_FINAL_WITH_CONST);
-
-    verifyResult('''
-const int a = 1;
-''');
-  }
-
-  test_replaceWithConditionalAssignment_withCodeBeforeAndAfter() async {
-    String src = '''
-class Person {
-  String _fullName;
-  void foo() {
-    print('hi');
-    /*LINT*/if (_fullName == null) {
-      _fullName = getFullUserName(this);
-    }
-    print('hi');
-  }
-}
-''';
-    await findLint(src, LintNames.prefer_conditional_assignment);
-
-    await applyFix(DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT);
-
-    verifyResult('''
-class Person {
-  String _fullName;
-  void foo() {
-    print('hi');
-    _fullName ??= getFullUserName(this);
-    print('hi');
-  }
-}
-''');
-  }
-
-  test_replaceWithConditionalAssignment_withOneBlock() async {
-    String src = '''
-class Person {
-  String _fullName;
-  void foo() {
-    /*LINT*/if (_fullName == null) {
-      _fullName = getFullUserName(this);
-    }
-  }
-}
-''';
-    await findLint(src, LintNames.prefer_conditional_assignment);
-
-    await applyFix(DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT);
-
-    verifyResult('''
-class Person {
-  String _fullName;
-  void foo() {
-    _fullName ??= getFullUserName(this);
-  }
-}
-''');
-  }
-
-  test_replaceWithConditionalAssignment_withoutBlock() async {
-    String src = '''
-class Person {
-  String _fullName;
-  void foo() {
-    /*LINT*/if (_fullName == null)
-      _fullName = getFullUserName(this);
-  }
-}
-''';
-    await findLint(src, LintNames.prefer_conditional_assignment);
-
-    await applyFix(DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT);
-
-    verifyResult('''
-class Person {
-  String _fullName;
-  void foo() {
-    _fullName ??= getFullUserName(this);
-  }
-}
-''');
-  }
-
-  test_replaceWithConditionalAssignment_withTwoBlock() async {
-    String src = '''
-class Person {
-  String _fullName;
-  void foo() {
-    /*LINT*/if (_fullName == null) {{
-      _fullName = getFullUserName(this);
-    }}
-  }
-}
-''';
-    await findLint(src, LintNames.prefer_conditional_assignment);
-
-    await applyFix(DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT);
-
-    verifyResult('''
-class Person {
-  String _fullName;
-  void foo() {
-    _fullName ??= getFullUserName(this);
-  }
-}
-''');
-  }
-
-  test_replaceWithLiteral_linkedHashMap_withCommentsInGeneric() async {
-    String src = '''
-import 'dart:collection';
-
-final a = /*LINT*/new LinkedHashMap<int,/*comment*/int>();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-import 'dart:collection';
-
-final a = <int,/*comment*/int>{};
-''');
-  }
-
-  test_replaceWithLiteral_linkedHashMap_withDynamicGenerics() async {
-    String src = '''
-import 'dart:collection';
-
-final a = /*LINT*/new LinkedHashMap<dynamic,dynamic>();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-import 'dart:collection';
-
-final a = <dynamic,dynamic>{};
-''');
-  }
-
-  test_replaceWithLiteral_linkedHashMap_withGeneric() async {
-    String src = '''
-import 'dart:collection';
-
-final a = /*LINT*/new LinkedHashMap<int,int>();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-import 'dart:collection';
-
-final a = <int,int>{};
-''');
-  }
-
-  test_replaceWithLiteral_linkedHashMap_withoutGeneric() async {
-    String src = '''
-import 'dart:collection';
-
-final a = /*LINT*/new LinkedHashMap();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-import 'dart:collection';
-
-final a = {};
-''');
-  }
-
-  test_replaceWithLiteral_list_withGeneric() async {
-    String src = '''
-final a = /*LINT*/new List<int>();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-final a = <int>[];
-''');
-  }
-
-  test_replaceWithLiteral_list_withoutGeneric() async {
-    String src = '''
-final a = /*LINT*/new List();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-final a = [];
-''');
-  }
-
-  test_replaceWithLiteral_map_withGeneric() async {
-    String src = '''
-final a = /*LINT*/new Map<int,int>();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-final a = <int,int>{};
-''');
-  }
-
-  test_replaceWithLiteral_map_withoutGeneric() async {
-    String src = '''
-final a = /*LINT*/new Map();
-''';
-    await findLint(src, LintNames.prefer_collection_literals);
-
-    await applyFix(DartFixKind.REPLACE_WITH_LITERAL);
-
-    verifyResult('''
-final a = {};
-''');
-  }
-
-  test_replaceWithTearOff_function_oneParameter() async {
-    String src = '''
-final x = /*LINT*/(name) {
-  print(name);
-};
-''';
-    await findLint(src, LintNames.unnecessary_lambdas);
-
-    await applyFix(DartFixKind.REPLACE_WITH_TEAR_OFF);
-
-    verifyResult('''
-final x = print;
-''');
-  }
-
-  test_replaceWithTearOff_function_zeroParameters() async {
-    String src = '''
-void foo(){}
-Function finalVar() {
-  return /*LINT*/() {
-    foo();
-  };
-}
-''';
-    await findLint(src, LintNames.unnecessary_lambdas);
-
-    await applyFix(DartFixKind.REPLACE_WITH_TEAR_OFF);
-
-    verifyResult('''
-void foo(){}
-Function finalVar() {
-  return foo;
-}
-''');
-  }
-
-  test_replaceWithTearOff_lambda_asArgument() async {
-    String src = '''
-void foo() {
-  bool isPair(int a) => a % 2 == 0;
-  final finalList = <int>[];
-  finalList.where(/*LINT*/(number) =>
-    isPair(number));
-}
-''';
-    await findLint(src, LintNames.unnecessary_lambdas);
-
-    await applyFix(DartFixKind.REPLACE_WITH_TEAR_OFF);
-
-    verifyResult('''
-void foo() {
-  bool isPair(int a) => a % 2 == 0;
-  final finalList = <int>[];
-  finalList.where(isPair);
-}
-''');
-  }
-
-  test_replaceWithTearOff_method_oneParameter() async {
-    String src = '''
-var a = /*LINT*/(x) => finalList.remove(x);
-''';
-    await findLint(src, LintNames.unnecessary_lambdas);
-
-    await applyFix(DartFixKind.REPLACE_WITH_TEAR_OFF);
-
-    verifyResult('''
-var a = finalList.remove;
-''');
-  }
-
-  test_replaceWithTearOff_method_zeroParameter() async {
-    String src = '''
-final Object a;
-Function finalVar() {
-  return /*LINT*/() {
-    return a.toString();
-  };
-}
-''';
-    await findLint(src, LintNames.unnecessary_lambdas);
-
-    await applyFix(DartFixKind.REPLACE_WITH_TEAR_OFF);
-
-    verifyResult('''
-final Object a;
-Function finalVar() {
-  return a.toString;
-}
-''');
-  }
-
-  void verifyResult(String expectedResult) {
-    expect(resultCode, expectedResult);
-  }
-}
-
-class _DartFixContextImpl implements DartFixContext {
-  @override
-  final ResourceProvider resourceProvider;
-
-  @override
-  final AnalysisDriver analysisDriver;
-
-  @override
-  final AstProvider astProvider;
-
-  @override
-  final CompilationUnit unit;
-
-  @override
-  final AnalysisError error;
-
-  @override
-  final List<AnalysisError> errors;
-
-  _DartFixContextImpl(this.resourceProvider, this.analysisDriver,
-      this.astProvider, this.unit, this.error, this.errors);
-
-  @override
-  GetTopLevelDeclarations get getTopLevelDeclarations =>
-      analysisDriver.getTopLevelNameDeclarations;
-}
diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
index d2b6796..ff56f55 100644
--- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart
+++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
@@ -5,8 +5,8 @@
 import 'dart:async';
 
 import 'package:analysis_server/src/services/correction/organize_directives.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     hide AnalysisError;
 import 'package:test/test.dart';
@@ -96,8 +96,8 @@
   }
 
   test_remove_unresolvedDirectives() async {
-    addSource('/project/existing_part1.dart', 'part of lib;');
-    addSource('/project/existing_part2.dart', 'part of lib;');
+    addSource('/home/test/lib/existing_part1.dart', 'part of lib;');
+    addSource('/home/test/lib/existing_part2.dart', 'part of lib;');
     await _computeUnitAndErrors(r'''
 library lib;
 
@@ -335,7 +335,8 @@
 
   Future<void> _computeUnitAndErrors(String code) async {
     addTestSource(code);
-    AnalysisResult result = await driver.getResult(testSource.fullName);
+    ResolvedUnitResult result =
+        await session.getResolvedUnit(testSource.fullName);
     testUnit = result.unit;
     testErrors = result.errors;
   }
diff --git a/pkg/analysis_server/test/services/correction/sort_members_test.dart b/pkg/analysis_server/test/services/correction/sort_members_test.dart
index d89bb36..81001fa 100644
--- a/pkg/analysis_server/test/services/correction/sort_members_test.dart
+++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart
@@ -5,7 +5,7 @@
 import 'dart:async';
 
 import 'package:analysis_server/src/services/correction/sort_members.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -512,6 +512,24 @@
 ''');
   }
 
+  test_mixinMembers_method() async {
+    await _parseTestUnit(r'''
+mixin A {
+  c() {}
+  a() {}
+  b() {}
+}
+''');
+    // validate change
+    _assertSort(r'''
+mixin A {
+  a() {}
+  b() {}
+  c() {}
+}
+''');
+  }
+
   test_unitMembers_class() async {
     await _parseTestUnit(r'''
 class C {}
@@ -664,6 +682,20 @@
 ''');
   }
 
+  test_unitMembers_genericTypeAlias() async {
+    await _parseTestUnit(r'''
+typedef FC = void Function();
+typedef FA = void Function();
+typedef FB = void Function();
+''');
+    // validate change
+    _assertSort(r'''
+typedef FA = void Function();
+typedef FB = void Function();
+typedef FC = void Function();
+''');
+  }
+
   test_unitMembers_importsAndDeclarations() async {
     await _parseTestUnit(r'''
 import 'dart:a';
@@ -711,6 +743,8 @@
     await _parseTestUnit(r'''
 _mmm() {}
 typedef nnn();
+typedef GTAF3 = void Function();
+typedef _GTAF2 = void Function();
 _nnn() {}
 typedef mmm();
 typedef _nnn();
@@ -724,6 +758,7 @@
 var nnn;
 var _mmm;
 var _nnn;
+typedef GTAF1 = void Function();
 set nnn(x) {}
 get mmm => null;
 set mmm(x) {}
@@ -752,6 +787,9 @@
 nnn() {}
 _mmm() {}
 _nnn() {}
+typedef GTAF1 = void Function();
+typedef GTAF3 = void Function();
+typedef _GTAF2 = void Function();
 typedef mmm();
 typedef nnn();
 typedef _mmm();
@@ -763,6 +801,19 @@
 ''');
   }
 
+  test_unitMembers_mixin() async {
+    await _parseTestUnit(r'''
+mixin C {}
+mixin A {}
+mixin B {}
+''');
+    _assertSort(r'''
+mixin A {}
+mixin B {}
+mixin C {}
+''');
+  }
+
   test_unitMembers_topLevelVariable() async {
     await _parseTestUnit(r'''
 int c;
@@ -804,7 +855,7 @@
 
   Future<void> _parseTestUnit(String code) async {
     addTestSource(code);
-    ParseResult result = await driver.parseFile(testSource.fullName);
+    ParsedUnitResult result = session.getParsedUnit(testSource.fullName);
     testUnit = result.unit;
   }
 }
diff --git a/pkg/analysis_server/test/services/correction/status_test.dart b/pkg/analysis_server/test/services/correction/status_test.dart
index cce27cd..eb27ec2 100644
--- a/pkg/analysis_server/test/services/correction/status_test.dart
+++ b/pkg/analysis_server/test/services/correction/status_test.dart
@@ -29,7 +29,7 @@
     Element element = findElement('MyClass');
     // check
     Location location = newLocation_fromElement(element);
-    expect(location.file, convertPath('/project/test.dart'));
+    expect(location.file, testFile);
     expect(location.offset, 6);
     expect(location.length, 7);
     expect(location.startLine, 1);
@@ -52,7 +52,7 @@
         sourceRange);
     // check
     Location location = newLocation_fromMatch(match);
-    expect(location.file, convertPath('/project/test.dart'));
+    expect(location.file, testFile);
     expect(location.offset, sourceRange.offset);
     expect(location.length, sourceRange.length);
   }
@@ -65,7 +65,7 @@
     AstNode node = findNodeAtString('main');
     // check
     Location location = newLocation_fromNode(node);
-    expect(location.file, convertPath('/project/test.dart'));
+    expect(location.file, testFile);
     expect(location.offset, node.offset);
     expect(location.length, node.length);
   }
@@ -75,7 +75,7 @@
     SourceRange sourceRange = new SourceRange(10, 20);
     // check
     Location location = newLocation_fromUnit(testUnit, sourceRange);
-    expect(location.file, convertPath('/project/test.dart'));
+    expect(location.file, testFile);
     expect(location.offset, sourceRange.offset);
     expect(location.length, sourceRange.length);
   }
diff --git a/pkg/analysis_server/test/services/correction/strings_test.dart b/pkg/analysis_server/test/services/correction/strings_test.dart
index abd4493..a7a68e7 100644
--- a/pkg/analysis_server/test/services/correction/strings_test.dart
+++ b/pkg/analysis_server/test/services/correction/strings_test.dart
@@ -133,13 +133,6 @@
     expect(isWhitespace('A'.codeUnitAt(0)), isFalse);
   }
 
-  void test_remove() {
-    expect(remove(null, 'x'), null);
-    expect(remove('abc', null), 'abc');
-    expect(remove('abc abbc abbbc', 'b'), 'ac ac ac');
-    expect(remove('abc abbc abbbc', 'bc'), 'a ab abb');
-  }
-
   void test_removeEnd() {
     expect(removeEnd(null, 'x'), null);
     expect(removeEnd('abc', null), 'abc');
@@ -165,11 +158,4 @@
     expect(shorten('0123456789abcdef', 11), '0123...cdef');
     expect(shorten('0123456789abcdef', 12), '01234...cdef');
   }
-
-  void test_substringAfterLast() {
-    expect(substringAfterLast('', '/'), '');
-    expect(substringAfterLast('abc', ''), '');
-    expect(substringAfterLast('abc', 'd'), 'abc');
-    expect(substringAfterLast('abcbde', 'b'), 'de');
-  }
 }
diff --git a/pkg/analysis_server/test/services/correction/test_all.dart b/pkg/analysis_server/test/services/correction/test_all.dart
index 4183ef1..e098648 100644
--- a/pkg/analysis_server/test/services/correction/test_all.dart
+++ b/pkg/analysis_server/test/services/correction/test_all.dart
@@ -1,12 +1,10 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'assist_test.dart' as assist_test;
 import 'change_test.dart' as change_test;
-import 'fix_test.dart' as fix_test;
 import 'levenshtein_test.dart' as levenshtein_test;
 import 'name_suggestion_test.dart' as name_suggestion_test;
 import 'organize_directives_test.dart' as organize_directives_test;
@@ -18,9 +16,7 @@
 /// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
-    assist_test.main();
     change_test.main();
-    fix_test.main();
     levenshtein_test.main();
     name_suggestion_test.main();
     organize_directives_test.main();
diff --git a/pkg/analysis_server/test/services/correction/util_test.dart b/pkg/analysis_server/test/services/correction/util_test.dart
index 3e1981c..53eaa7c 100644
--- a/pkg/analysis_server/test/services/correction/util_test.dart
+++ b/pkg/analysis_server/test/services/correction/util_test.dart
@@ -35,7 +35,8 @@
 ''');
     IfStatement ifStatement = findNodeAtString('if (');
     Expression condition = ifStatement.condition;
-    String result = new CorrectionUtils(testUnit).invertCondition(condition);
+    String result =
+        new CorrectionUtils(testAnalysisResult).invertCondition(condition);
     expect(result, expected);
   }
 
@@ -45,7 +46,7 @@
 import 'dart:math';
 ''');
     Source newLibrary = _getDartSource('dart:collection');
-    _assertAddLibraryImport(<Source>[newLibrary], '''
+    await _assertAddLibraryImport(<Source>[newLibrary], '''
 import 'dart:async';
 import 'dart:collection';
 import 'dart:math';
@@ -58,7 +59,7 @@
 import 'dart:math';
 ''');
     Source newLibrary = _getDartSource('dart:async');
-    _assertAddLibraryImport(<Source>[newLibrary], '''
+    await _assertAddLibraryImport(<Source>[newLibrary], '''
 import 'dart:async';
 import 'dart:collection';
 import 'dart:math';
@@ -71,7 +72,7 @@
 import 'dart:collection';
 ''');
     Source newLibrary = _getDartSource('dart:math');
-    _assertAddLibraryImport(<Source>[newLibrary], '''
+    await _assertAddLibraryImport(<Source>[newLibrary], '''
 import 'dart:async';
 import 'dart:collection';
 import 'dart:math';
@@ -85,7 +86,7 @@
 ''');
     Source newLibrary1 = _getDartSource('dart:async');
     Source newLibrary2 = _getDartSource('dart:html');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 import 'dart:async';
 import 'dart:collection';
 import 'dart:html';
@@ -100,7 +101,7 @@
 ''');
     Source newLibrary1 = _getDartSource('dart:async');
     Source newLibrary2 = _getDartSource('dart:collection');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 import 'dart:async';
 import 'dart:collection';
 import 'dart:html';
@@ -115,7 +116,7 @@
 ''');
     Source newLibrary1 = _getDartSource('dart:html');
     Source newLibrary2 = _getDartSource('dart:math');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 import 'dart:async';
 import 'dart:collection';
 import 'dart:html';
@@ -131,7 +132,7 @@
 ''');
     Source newLibrary1 = _getDartSource('dart:math');
     Source newLibrary2 = _getDartSource('dart:async');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 library test;
 
 import 'dart:async';
@@ -149,7 +150,7 @@
 ''');
     Source newLibrary1 = _getDartSource('dart:math');
     Source newLibrary2 = _getDartSource('dart:async');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 /// Comment.
 
 import 'dart:async';
@@ -167,7 +168,7 @@
 ''');
     Source newLibrary1 = _getDartSource('dart:math');
     Source newLibrary2 = _getDartSource('dart:async');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 #!/bin/dart
 
 import 'dart:async';
@@ -183,7 +184,7 @@
 ''');
     Source newLibrary1 = _getDartSource('dart:math');
     Source newLibrary2 = _getDartSource('dart:async');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 import 'dart:async';
 import 'dart:math';
 
@@ -192,14 +193,14 @@
   }
 
   test_addLibraryImports_package_hasDart_hasPackages_insertAfter() async {
-    addPackageSource('aaa', 'aaa.dart', '');
+    addPackageFile('aaa', 'aaa.dart', '');
     await resolveTestUnit('''
 import 'dart:async';
 
 import 'package:aaa/aaa.dart';
 ''');
     Source newLibrary = _getSource('/lib/bbb.dart', 'package:bbb/bbb.dart');
-    _assertAddLibraryImport(<Source>[newLibrary], '''
+    await _assertAddLibraryImport(<Source>[newLibrary], '''
 import 'dart:async';
 
 import 'package:aaa/aaa.dart';
@@ -208,14 +209,14 @@
   }
 
   test_addLibraryImports_package_hasDart_hasPackages_insertBefore() async {
-    addPackageSource('bbb', 'bbb.dart', '');
+    addPackageFile('bbb', 'bbb.dart', '');
     await resolveTestUnit('''
 import 'dart:async';
 
 import 'package:bbb/bbb.dart';
 ''');
     Source newLibrary = _getSource('/lib/aaa.dart', 'package:aaa/aaa.dart');
-    _assertAddLibraryImport(<Source>[newLibrary], '''
+    await _assertAddLibraryImport(<Source>[newLibrary], '''
 import 'dart:async';
 
 import 'package:aaa/aaa.dart';
@@ -224,15 +225,15 @@
   }
 
   test_addLibraryImports_package_hasImports_between() async {
-    addPackageSource('aaa', 'aaa.dart', '');
-    addPackageSource('ddd', 'ddd.dart', '');
+    addPackageFile('aaa', 'aaa.dart', '');
+    addPackageFile('ddd', 'ddd.dart', '');
     await resolveTestUnit('''
 import 'package:aaa/aaa.dart';
 import 'package:ddd/ddd.dart';
 ''');
     Source newLibrary1 = _getSource('/lib/bbb.dart', 'package:bbb/bbb.dart');
     Source newLibrary2 = _getSource('/lib/ccc.dart', 'package:ccc/ccc.dart');
-    _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
+    await _assertAddLibraryImport(<Source>[newLibrary1, newLibrary2], '''
 import 'package:aaa/aaa.dart';
 import 'package:bbb/bbb.dart';
 import 'package:ccc/ccc.dart';
@@ -285,10 +286,11 @@
     await assert_invertCondition('(((b1)))', '!b1');
   }
 
-  void _assertAddLibraryImport(List<Source> newLibraries, String expectedCode) {
+  Future<void> _assertAddLibraryImport(
+      List<Source> newLibraries, String expectedCode) async {
     SourceChange change = new SourceChange('');
-    addLibraryImports(resourceProvider.pathContext, change, testLibraryElement,
-        newLibraries.toSet());
+    await addLibraryImports(testAnalysisResult.session, change,
+        testLibraryElement, newLibraries.toSet());
     SourceFileEdit testEdit = change.getFileEdit(testFile);
     expect(testEdit, isNotNull);
     String resultCode = SourceEdit.applySequence(testCode, testEdit.edits);
diff --git a/pkg/analysis_server/test/services/linter/linter_test.dart b/pkg/analysis_server/test/services/linter/linter_test.dart
index 19272d8..3965bba 100644
--- a/pkg/analysis_server/test/services/linter/linter_test.dart
+++ b/pkg/analysis_server/test/services/linter/linter_test.dart
@@ -1,8 +1,9 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
index 7acb0ce..213972f 100644
--- a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
+++ b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
@@ -8,11 +8,7 @@
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart' show Element;
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/ast_provider_driver.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     show
@@ -44,7 +40,6 @@
  */
 abstract class RefactoringTest extends AbstractSingleUnitTest {
   SearchEngine searchEngine;
-  AstProvider astProvider;
 
   SourceChange refactoringChange;
 
@@ -151,14 +146,6 @@
     expect(actualCode, expectedCode);
   }
 
-  /**
-   * Completes with a fully resolved unit that contains the [element].
-   */
-  Future<CompilationUnit> getResolvedUnitWithElement(Element element) async {
-    return element.context
-        .resolveCompilationUnit(element.source, element.library);
-  }
-
   Future<void> indexTestUnit(String code) async {
     await resolveTestUnit(code);
   }
@@ -170,6 +157,5 @@
   void setUp() {
     super.setUp();
     searchEngine = new SearchEngineImpl([driver]);
-    astProvider = new AstProviderForDriver(driver);
   }
 }
diff --git a/pkg/analysis_server/test/services/refactoring/abstract_rename.dart b/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
index 400bb3d..fec6d34 100644
--- a/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
+++ b/pkg/analysis_server/test/services/refactoring/abstract_rename.dart
@@ -56,7 +56,8 @@
    */
   void createRenameRefactoringForElement(Element element) {
     var workspace = new RefactoringWorkspace([driver], searchEngine);
-    refactoring = new RenameRefactoring(workspace, astProvider, element);
+    var session = testAnalysisResult.session;
+    refactoring = new RenameRefactoring(workspace, session, element);
     expect(refactoring, isNotNull, reason: "No refactoring for '$element'.");
   }
 
diff --git a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
index 6702055..abac0c8 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
@@ -87,7 +87,7 @@
   }
 
   test_change_multipleFiles() async {
-    await indexUnit('/project/other.dart', r'''
+    await indexUnit('/home/test/lib/other.dart', r'''
 class A {
   int get test => 1;
 }
@@ -153,7 +153,7 @@
 
   void _createRefactoringForElement(ExecutableElement element) {
     refactoring = new ConvertGetterToMethodRefactoring(
-        searchEngine, astProvider, element);
+        searchEngine, testAnalysisResult.session, element);
   }
 
   void _createRefactoringForString(String search) {
diff --git a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
index 60f38f8..129cf15 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
@@ -89,7 +89,7 @@
   }
 
   test_change_multipleFiles() async {
-    await indexUnit('/project/other.dart', r'''
+    await indexUnit('/home/test/lib/other.dart', r'''
 class A {
   int test() => 1;
 }
@@ -205,7 +205,7 @@
 
   void _createRefactoringForElement(ExecutableElement element) {
     refactoring = new ConvertMethodToGetterRefactoring(
-        searchEngine, astProvider, element);
+        searchEngine, testAnalysisResult.session, element);
   }
 
   void _createRefactoringForString(String search) {
diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
index 35a31ee..420f69a 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -1516,10 +1516,10 @@
     await indexTestUnit('''
 import 'asyncLib.dart';
 main() {
-  var a = newFuture();
+  var a = newCompleter();
 }
 ''');
-    _createRefactoringForString('newFuture()');
+    _createRefactoringForString('newCompleter()');
     // apply refactoring
     return _assertSuccessfulRefactoring('''
 import 'asyncLib.dart';
@@ -1528,7 +1528,7 @@
   var a = res();
 }
 
-Future<int> res() => newFuture();
+Completer<int> res() => newCompleter();
 ''');
   }
 
@@ -2527,7 +2527,7 @@
     await indexTestUnit('''
 import 'asyncLib.dart';
 main() {
-  var v = newFuture();
+  var v = newCompleter();
 // start
   print(v);
 // end
@@ -2539,20 +2539,19 @@
 import 'asyncLib.dart';
 import 'dart:async';
 main() {
-  var v = newFuture();
+  var v = newCompleter();
 // start
   res(v);
 // end
 }
 
-void res(Future<int> v) {
+void res(Completer<int> v) {
   print(v);
 }
 ''');
   }
 
   test_statements_parameters_localFunction() async {
-    _addLibraryReturningAsync();
     await indexTestUnit('''
 class C {
   int f(int a) {
@@ -2837,10 +2836,10 @@
   }
 
   void _addLibraryReturningAsync() {
-    addSource('/project/asyncLib.dart', r'''
-library asyncLib;
+    addSource('/home/test/lib/asyncLib.dart', r'''
 import 'dart:async';
-Future<int> newFuture() => null;
+
+Completer<int> newCompleter() => null;
 ''');
   }
 
@@ -2880,7 +2879,7 @@
 
   void _createRefactoring(int offset, int length) {
     refactoring = new ExtractMethodRefactoring(
-        searchEngine, astProvider, testAnalysisResult, offset, length);
+        searchEngine, testAnalysisResult, offset, length);
     refactoring.name = 'res';
   }
 
diff --git a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
index 0c4ac76..41e32b8 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
@@ -634,6 +634,9 @@
   void _createRefactoring(String search) {
     int offset = findOffset(search);
     refactoring = new InlineLocalRefactoring(
-        searchEngine, astProvider, testAnalysisResult, offset);
+      searchEngine,
+      testAnalysisResult,
+      offset,
+    );
   }
 }
diff --git a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
index a508984..077035c 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
@@ -1756,6 +1756,9 @@
   void _createRefactoring(String search) {
     int offset = findOffset(search);
     refactoring = new InlineMethodRefactoring(
-        searchEngine, astProvider, testAnalysisResult, offset);
+      searchEngine,
+      testAnalysisResult,
+      offset,
+    );
   }
 }
diff --git a/pkg/analysis_server/test/services/refactoring/move_file_test.dart b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
index 2616261..dd52924 100644
--- a/pkg/analysis_server/test/services/refactoring/move_file_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
@@ -23,10 +23,10 @@
   MoveFileRefactoring refactoring;
 
   test_file_containing_imports_exports_parts() async {
-    String pathA = '/project/000/1111/a.dart';
-    String pathB = '/project/000/1111/b.dart';
-    String pathC = '/project/000/1111/22/c.dart';
-    testFile = '/project/000/1111/test.dart';
+    String pathA = '/home/test/000/1111/a.dart';
+    String pathB = '/home/test/000/1111/b.dart';
+    String pathC = '/home/test/000/1111/22/c.dart';
+    testFile = '/home/test/000/1111/test.dart';
     addSource('/absolute/uri.dart', '');
     addSource(pathA, 'part of lib;');
     addSource(pathB, "import 'test.dart';");
@@ -40,7 +40,7 @@
 part '${convertAbsolutePathToUri('/absolute/uri.dart')}';
 ''');
     // perform refactoring
-    _createRefactoring('/project/000/1111/22/new_name.dart');
+    _createRefactoring('/home/test/000/1111/22/new_name.dart');
     await _assertSuccessfulRefactoring();
     assertNoFileChange(pathA);
     assertFileChangeResult(pathB, "import '22/new_name.dart';");
@@ -55,15 +55,30 @@
 ''');
   }
 
+  test_file_imported_with_package_uri() async {
+    newFile('/home/test/lib/old_name.dart', content: '');
+    addTestSource(r'''
+import 'package:test/old_name.dart';
+''');
+
+    _createRefactoring('/home/test/lib/222/new_name.dart',
+        oldName: '/home/test/lib/old_name.dart');
+    await _assertSuccessfulRefactoring();
+
+    assertFileChangeResult(testFile, '''
+import 'package:test/222/new_name.dart';
+''');
+  }
+
   test_file_importedLibrary_down() async {
-    String pathA = '/project/000/1111/a.dart';
-    testFile = '/project/000/1111/test.dart';
+    String pathA = '/home/test/000/1111/a.dart';
+    testFile = '/home/test/000/1111/test.dart';
     addSource(pathA, '''
 import 'test.dart';
 ''');
     addTestSource('');
     // perform refactoring
-    _createRefactoring('/project/000/1111/22/new_name.dart');
+    _createRefactoring('/home/test/000/1111/22/new_name.dart');
     await _assertSuccessfulRefactoring();
     assertFileChangeResult(pathA, '''
 import '22/new_name.dart';
@@ -72,14 +87,14 @@
   }
 
   test_file_importedLibrary_sideways() async {
-    String pathA = '/project/000/1111/a.dart';
-    testFile = '/project/000/1111/sub/folder/test.dart';
+    String pathA = '/home/test/000/1111/a.dart';
+    testFile = '/home/test/000/1111/sub/folder/test.dart';
     addSource(pathA, '''
 import 'sub/folder/test.dart';
 ''');
     addTestSource('');
     // perform refactoring
-    _createRefactoring('/project/000/new/folder/name/new_name.dart');
+    _createRefactoring('/home/test/000/new/folder/name/new_name.dart');
     await _assertSuccessfulRefactoring();
     assertFileChangeResult(pathA, '''
 import '../new/folder/name/new_name.dart';
@@ -88,14 +103,14 @@
   }
 
   test_file_importedLibrary_up() async {
-    String pathA = '/project/000/1111/a.dart';
-    testFile = '/project/000/1111/22/test.dart';
+    String pathA = '/home/test/000/1111/a.dart';
+    testFile = '/home/test/000/1111/22/test.dart';
     addSource(pathA, '''
 import '22/test.dart';
 ''');
     addTestSource('');
     // perform refactoring
-    _createRefactoring('/project/000/1111/new_name.dart');
+    _createRefactoring('/home/test/000/1111/new_name.dart');
     await _assertSuccessfulRefactoring();
     assertFileChangeResult(pathA, '''
 import 'new_name.dart';
@@ -103,33 +118,13 @@
     assertNoFileChange(testFile);
   }
 
-  test_file_imported_with_package_uri() async {
-    // Set up package uri resolution for local package.
-    packageMap['my_package'] = [getFolder('/project/lib')];
-    configureDriver();
-
-    String pathA = '/project/000/1111/a.dart';
-    testFile = '/project/lib/test.dart';
-    addSource(pathA, '''
-  import 'package:my_package/test.dart';
-  ''');
-    addTestSource('');
-    // perform refactoring
-    _createRefactoring('/project/lib/222/new_name.dart');
-    await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pathA, '''
-  import 'package:my_package/222/new_name.dart';
-  ''');
-    assertNoFileChange(testFile);
-  }
-
   @failingTest
   test_file_referenced_by_multiple_libraries() async {
     // This test fails because the search index doesn't support multiple uris for
     // a library, so only one of them is updated.
-    String pathA = '/project/000/1111/a.dart';
-    String pathB = '/project/000/b.dart';
-    testFile = '/project/000/1111/22/test.dart';
+    String pathA = '/home/test/000/1111/a.dart';
+    String pathB = '/home/test/000/b.dart';
+    testFile = '/home/test/000/1111/22/test.dart';
     addSource(pathA, '''
 library lib;
 part '22/test.dart';
@@ -142,7 +137,7 @@
 part of lib;
 ''');
     // perform refactoring
-    _createRefactoring('/project/000/1111/22/new_name.dart');
+    _createRefactoring('/home/test/000/1111/22/new_name.dart');
     await _assertSuccessfulRefactoring();
     assertFileChangeResult(pathA, '''
 library lib;
@@ -156,8 +151,8 @@
   }
 
   test_file_referenced_by_part() async {
-    String pathA = '/project/000/1111/a.dart';
-    testFile = '/project/000/1111/22/test.dart';
+    String pathA = '/home/test/000/1111/a.dart';
+    testFile = '/home/test/000/1111/22/test.dart';
     addSource(pathA, '''
 library lib;
 part '22/test.dart';
@@ -166,7 +161,7 @@
 part of lib;
 ''');
     // perform refactoring
-    _createRefactoring('/project/000/1111/22/new_name.dart');
+    _createRefactoring('/home/test/000/1111/22/new_name.dart');
     await _assertSuccessfulRefactoring();
     assertFileChangeResult(pathA, '''
 library lib;
@@ -190,11 +185,11 @@
   }
 
   test_nonexistent_file_returns_failure() async {
-    _createRefactoring(convertPath('/project/test_missing_new.dart'),
-        oldName: convertPath('/project/test_missing.dart'));
+    _createRefactoring(convertPath('/home/test/test_missing_new.dart'),
+        oldName: convertPath('/home/test/test_missing.dart'));
     await _assertFailedRefactoring(RefactoringProblemSeverity.FATAL,
         expectedMessage:
-            '${convertPath('/project/test_missing.dart')} does not exist.');
+            '${convertPath('/home/test/test_missing.dart')} does not exist.');
   }
 
   @failingTest
@@ -205,18 +200,18 @@
   }
 
   test_projectFolder() async {
-    _createRefactoring('/project2', oldName: '/project');
+    _createRefactoring('/home/test2', oldName: '/home/test');
     await _assertFailedRefactoring(RefactoringProblemSeverity.FATAL,
-        expectedMessage:
-            'Renaming an analysis root is not supported (${convertPath('/project')})');
+        expectedMessage: 'Renaming an analysis root is not supported '
+            '(${convertPath('/home/test')})');
   }
 
   test_renaming_part_that_uses_uri_in_part_of() async {
     // If the file is a part in a library, and the part-of directive uses a URI
     // rather than a library name, that will need updating too (if the relative
     // path to the parent changes).
-    String pathA = '/project/000/1111/a.dart';
-    testFile = '/project/000/1111/22/test.dart';
+    String pathA = '/home/test/000/1111/a.dart';
+    testFile = '/home/test/000/1111/22/test.dart';
     addSource(pathA, '''
 library lib;
 part '22/test.dart';
@@ -225,7 +220,7 @@
 part of '../a.dart';
 ''');
     // perform refactoring
-    _createRefactoring('/project/000/1111/22/33/test.dart');
+    _createRefactoring('/home/test/000/1111/22/33/test.dart');
     await _assertSuccessfulRefactoring();
     assertFileChangeResult(pathA, '''
 library lib;
@@ -236,6 +231,13 @@
 ''');
   }
 
+  Future _assertFailedRefactoring(RefactoringProblemSeverity expectedSeverity,
+      {String expectedMessage}) async {
+    RefactoringStatus status = await refactoring.checkAllConditions();
+    assertRefactoringStatus(status, expectedSeverity,
+        expectedMessage: expectedMessage);
+  }
+
   /**
    * Checks that all conditions are OK.
    */
@@ -257,11 +259,4 @@
     }
     refactoring.newFile = convertPath(newName);
   }
-
-  Future _assertFailedRefactoring(RefactoringProblemSeverity expectedSeverity,
-      {String expectedMessage}) async {
-    RefactoringStatus status = await refactoring.checkAllConditions();
-    assertRefactoringStatus(status, expectedSeverity,
-        expectedMessage: expectedMessage);
-  }
 }
diff --git a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
index a7e9148..90957df 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
@@ -157,7 +157,7 @@
   test() {}
 }
 ''');
-    await indexUnit('/project/lib.dart', '''
+    await indexUnit('/home/test/lib/lib.dart', '''
 library my.lib;
 import 'test.dart';
 
@@ -356,7 +356,7 @@
   newName() {} // marker
 }
 ''';
-    await indexUnit('/project/lib.dart', libCode);
+    await indexUnit('/home/test/lib/lib.dart', libCode);
     await indexTestUnit('''
 import 'lib.dart';
 class B extends A {
@@ -715,17 +715,18 @@
   }
 
   test_createChange_MethodElement_potential_inPubCache() async {
-    String pkgLib = '/.pub-cache/lib.dart';
-    await indexUnit(pkgLib, r'''
+    var externalPath = addPackageFile('aaa', 'lib.dart', r'''
 processObj(p) {
   p.test();
 }
-''');
+''').path;
     await indexTestUnit('''
-import '${convertAbsolutePathToUri(pkgLib)}';
+import 'package:aaa/lib.dart';
+
 class A {
   test() {}
 }
+
 main(var a) {
   a.test();
 }
@@ -737,15 +738,17 @@
     refactoring.newName = 'newName';
     // validate change
     await assertSuccessfulRefactoring('''
-import '${convertAbsolutePathToUri('/.pub-cache/lib.dart')}';
+import 'package:aaa/lib.dart';
+
 class A {
   newName() {}
 }
+
 main(var a) {
   a.newName();
 }
 ''');
-    SourceFileEdit fileEdit = refactoringChange.getFileEdit(pkgLib);
+    SourceFileEdit fileEdit = refactoringChange.getFileEdit(externalPath);
     expect(fileEdit, isNull);
   }
 
@@ -783,6 +786,94 @@
     assertNoFileChange('/lib.dart');
   }
 
+  test_createChange_outsideOfProject_declarationInPackage() async {
+    addPackageFile('aaa', 'aaa.dart', r'''
+class A {
+  void test() {}
+}
+
+void foo(A a) {
+  a.test();
+}
+''');
+    await indexTestUnit('''
+import 'package:aaa/aaa.dart';
+
+class B extends A {
+  void test() {}
+}
+
+main(A a, B b) {
+  a.test();
+  b.test();
+}
+''');
+    createRenameRefactoringAtString('test() {}');
+    refactoring.newName = 'newName';
+
+    await assertSuccessfulRefactoring('''
+import 'package:aaa/aaa.dart';
+
+class B extends A {
+  void newName() {}
+}
+
+main(A a, B b) {
+  a.newName();
+  b.newName();
+}
+''');
+
+    expect(refactoringChange.edits, hasLength(1));
+    expect(refactoringChange.edits[0].file, testFile);
+  }
+
+  test_createChange_outsideOfProject_referenceInPart() async {
+    newFile('/home/part.dart', content: r'''
+part of test;
+
+void foo(A a) {
+  a.test();
+}
+''');
+
+    // To use file:// URI.
+    testFile = convertPath('/home/test/bin/test.dart');
+
+    await indexTestUnit('''
+library test;
+
+part '../../part.dart';
+
+class A {
+  void test() {}
+}
+
+main(A a) {
+  a.test();
+}
+''');
+    createRenameRefactoringAtString('test() {}');
+    refactoring.newName = 'newName';
+
+    await assertSuccessfulRefactoring('''
+library test;
+
+part '../../part.dart';
+
+class A {
+  void newName() {}
+}
+
+main(A a) {
+  a.newName();
+}
+''');
+
+    expect(refactoringChange.edits, hasLength(1));
+    expect(refactoringChange.edits[0].file, testFile);
+  }
+
   test_createChange_PropertyAccessorElement_getter() async {
     await indexTestUnit('''
 class A {
diff --git a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
index 19d2a4d..dc1df38 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
@@ -40,7 +40,7 @@
   }
 
   test_createChange() async {
-    addSource('/project/part.dart', '''
+    addSource('/home/test/lib/part.dart', '''
 part of my.app;
 ''');
     await indexTestUnit('''
@@ -57,13 +57,13 @@
 library the.new.name;
 part 'part.dart';
 ''');
-    assertFileChangeResult('/project/part.dart', '''
+    assertFileChangeResult('/home/test/lib/part.dart', '''
 part of the.new.name;
 ''');
   }
 
   test_createChange_hasWhitespaces() async {
-    addSource('/project/part.dart', '''
+    addSource('/home/test/lib/part.dart', '''
 part of my .  app;
 ''');
     await indexTestUnit('''
@@ -80,7 +80,7 @@
 library the.new.name;
 part 'part.dart';
 ''');
-    assertFileChangeResult('/project/part.dart', '''
+    assertFileChangeResult('/home/test/lib/part.dart', '''
 part of the.new.name;
 ''');
   }
diff --git a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
index 6b8c273..25359cd 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
@@ -442,29 +442,42 @@
   }
 
   test_createChange_parameter_named_inOtherFile() async {
-    await indexTestUnit('''
+    var a = convertPath('/home/test/lib/a.dart');
+    var b = convertPath('/home/test/lib/b.dart');
+
+    newFile(a, content: r'''
 class A {
   A({test});
 }
 ''');
-    await indexUnit('/project/test2.dart', '''
-import 'test.dart';
+    newFile(b, content: r'''
+import 'a.dart';
+
 main() {
   new A(test: 2);
 }
 ''');
-    // configure refactoring
+    driver.addFile(a);
+    driver.addFile(b);
+
+    var session = driver.currentSession;
+    testAnalysisResult = await session.getResolvedUnit(a);
+    testFile = testAnalysisResult.path;
+    testCode = testAnalysisResult.content;
+    testUnit = testAnalysisResult.unit;
+
     createRenameRefactoringAtString('test});');
     expect(refactoring.refactoringName, 'Rename Parameter');
     refactoring.newName = 'newName';
-    // validate change
+
     await assertSuccessfulRefactoring('''
 class A {
   A({newName});
 }
 ''');
-    assertFileChangeResult('/project/test2.dart', '''
-import 'test.dart';
+    assertFileChangeResult(b, '''
+import 'a.dart';
+
 main() {
   new A(newName: 2);
 }
@@ -472,7 +485,7 @@
   }
 
   test_createChange_parameter_named_updateHierarchy() async {
-    await indexUnit('/project/test2.dart', '''
+    await indexUnit('/home/test/lib/test2.dart', '''
 library test2;
 class A {
   void foo({int test: 1}) {
@@ -516,7 +529,7 @@
   }
 }
 ''');
-    assertFileChangeResult('/project/test2.dart', '''
+    assertFileChangeResult('/home/test/lib/test2.dart', '''
 library test2;
 class A {
   void foo({int newName: 1}) {
diff --git a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
index 7ace7de..1f23392 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
@@ -69,7 +69,7 @@
     await indexTestUnit('''
 class Test {}
 ''');
-    await indexUnit(convertPath('/project/lib.dart'), '''
+    await indexUnit('/home/test/lib/lib.dart', '''
 library my.lib;
 import 'test.dart';
 
@@ -109,7 +109,7 @@
     await indexTestUnit('''
 class Test {}
 ''');
-    await indexUnit(convertPath('/project/lib.dart'), '''
+    await indexUnit('/home/test/lib/lib.dart', '''
 library my.lib;
 import 'test.dart';
 class A {
@@ -230,11 +230,11 @@
   }
 
   test_checkInitialConditions_outsideOfProject() async {
-    addSource('/other/lib.dart', r'''
+    addPackageFile('aaa', 'lib.dart', r'''
 class A {}
 ''');
     await indexTestUnit('''
-import "${convertAbsolutePathToUri('/other/lib.dart')}";
+import "package:aaa/lib.dart";
 main() {
   A a;
 }
@@ -587,7 +587,7 @@
   }
 
   test_createChange_FunctionElement_imported() async {
-    await indexUnit('/project/foo.dart', r'''
+    await indexUnit('/home/test/lib/foo.dart', r'''
 test() {}
 foo() {}
 ''');
@@ -614,7 +614,7 @@
   foo();
 }
 ''');
-    assertFileChangeResult('/project/foo.dart', '''
+    assertFileChangeResult('/home/test/lib/foo.dart', '''
 newName() {}
 foo() {}
 ''');
@@ -644,6 +644,42 @@
 ''');
   }
 
+  test_createChange_outsideOfProject_referenceInPart() async {
+    newFile('/home/part.dart', content: r'''
+part of test;
+
+Test test2;
+''');
+
+    // To use file:// URI.
+    testFile = convertPath('/home/test/bin/test.dart');
+
+    await indexTestUnit('''
+library test;
+
+part '../../part.dart';
+
+class Test {}
+
+Test test;
+''');
+    createRenameRefactoringAtString('Test {}');
+    refactoring.newName = 'NewName';
+
+    await assertSuccessfulRefactoring('''
+library test;
+
+part '../../part.dart';
+
+class NewName {}
+
+NewName test;
+''');
+
+    expect(refactoringChange.edits, hasLength(1));
+    expect(refactoringChange.edits[0].file, testFile);
+  }
+
   test_createChange_PropertyAccessorElement_getter_declaration() async {
     await _test_createChange_PropertyAccessorElement("test {}");
   }
diff --git a/pkg/analysis_server/test/services/search/search_engine_test.dart b/pkg/analysis_server/test/services/search/search_engine_test.dart
index 009e5fc..16488d7 100644
--- a/pkg/analysis_server/test/services/search/search_engine_test.dart
+++ b/pkg/analysis_server/test/services/search/search_engine_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,21 +7,20 @@
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analysis_server/src/services/search/search_engine_internal.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(SearchEngineImplTest);
@@ -29,7 +28,7 @@
 }
 
 @reflectiveTest
-class SearchEngineImplTest extends Object with ResourceProviderMixin {
+class SearchEngineImplTest with ResourceProviderMixin {
   DartSdk sdk;
   final ByteStore byteStore = new MemoryByteStore();
   final FileContentOverlay contentOverlay = new FileContentOverlay();
@@ -496,7 +495,8 @@
         contentOverlay,
         null,
         new SourceFactory(resolvers, null, resourceProvider),
-        new AnalysisOptionsImpl());
+        new AnalysisOptionsImpl(),
+        enableIndex: true);
   }
 
   static void _assertContainsClass(Set<ClassElement> subtypes, String name) {
diff --git a/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart b/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
index 1c5ec8d..f748909 100644
--- a/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/closingLabels_computer_test.dart
@@ -24,7 +24,7 @@
 
   setUp() {
     super.setUp();
-    sourcePath = resourceProvider.convertPath('/p/lib/source.dart');
+    sourcePath = convertPath('/home/test/lib/test.dart');
   }
 
   test_adjacentLinesExcluded() async {
@@ -400,7 +400,7 @@
 
   Future<List<ClosingLabel>> _computeElements(String sourceContent) async {
     newFile(sourcePath, content: sourceContent);
-    ResolveResult result = await driver.getResult(sourcePath);
+    ResolvedUnitResult result = await session.getResolvedUnit(sourcePath);
     DartUnitClosingLabelsComputer computer =
         new DartUnitClosingLabelsComputer(result.lineInfo, result.unit);
     return computer.compute();
diff --git a/pkg/analysis_server/test/src/computer/folding_computer_test.dart b/pkg/analysis_server/test/src/computer/folding_computer_test.dart
index dee139a..8fcde2d 100644
--- a/pkg/analysis_server/test/src/computer/folding_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/folding_computer_test.dart
@@ -24,7 +24,7 @@
 
   setUp() {
     super.setUp();
-    sourcePath = resourceProvider.convertPath('/p/lib/source.dart');
+    sourcePath = convertPath('/home/test/lib/test.dart');
   }
 
   test_annotations() async {
@@ -449,7 +449,7 @@
 
   Future<List<FoldingRegion>> _computeRegions(String sourceContent) async {
     newFile(sourcePath, content: sourceContent);
-    ResolveResult result = await driver.getResult(sourcePath);
+    ResolvedUnitResult result = await session.getResolvedUnit(sourcePath);
     DartUnitFoldingComputer computer =
         new DartUnitFoldingComputer(result.lineInfo, result.unit);
     return computer.compute();
diff --git a/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart b/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
index 3d5f23b..731ca5f 100644
--- a/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/import_elements_computer_test.dart
@@ -6,9 +6,8 @@
 
 import 'package:analysis_server/protocol/protocol_generated.dart';
 import 'package:analysis_server/src/computer/import_elements_computer.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -52,13 +51,13 @@
   Future<void> createBuilder(String content) async {
     originalContent = content;
     newFile(path, content: content);
-    AnalysisResult result = await driver.getResult(path);
+    ResolvedUnitResult result = await session.getResolvedUnit(path);
     computer = new ImportElementsComputer(resourceProvider, result);
   }
 
   void setUp() {
     super.setUp();
-    path = resourceProvider.convertPath('/test.dart');
+    path = convertPath('/home/test/lib/test.dart');
   }
 
   test_createEdits_addImport_noDirectives() async {
@@ -69,7 +68,7 @@
 ''');
     await computeChanges(<ImportedElements>[
       new ImportedElements(
-          convertPath('/lib/math/math.dart'), '', <String>['Random'])
+          convertPath('/sdk/lib/math/math.dart'), '', <String>['Random'])
     ]);
     assertChanges('''
 import 'dart:math';
@@ -81,12 +80,12 @@
   }
 
   test_createEdits_addImport_noPrefix() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' as foo;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A'])
+      new ImportedElements(fooFile.path, '', <String>['A'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' as foo;
@@ -95,12 +94,12 @@
   }
 
   test_createEdits_addImport_prefix() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart';
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, 'foo', <String>['A'])
+      new ImportedElements(fooFile.path, 'foo', <String>['A'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart';
@@ -109,13 +108,13 @@
   }
 
   test_createEdits_addShow_multipleNames() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' show B;
 import 'package:pkg/foo.dart' as foo;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A', 'C'])
+      new ImportedElements(fooFile.path, '', <String>['A', 'C'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' show B, A, C;
@@ -124,12 +123,12 @@
   }
 
   test_createEdits_addShow_removeHide() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' show A, B hide C, D;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['C'])
+      new ImportedElements(fooFile.path, '', <String>['C'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' show A, B, C hide D;
@@ -137,12 +136,12 @@
   }
 
   test_createEdits_addShow_singleName_noPrefix() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' show B;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A'])
+      new ImportedElements(fooFile.path, '', <String>['A'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' show B, A;
@@ -150,13 +149,13 @@
   }
 
   test_createEdits_addShow_singleName_prefix() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' show C;
 import 'package:pkg/foo.dart' as foo show B;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, 'foo', <String>['A'])
+      new ImportedElements(fooFile.path, 'foo', <String>['A'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' show C;
@@ -165,34 +164,34 @@
   }
 
   test_createEdits_alreadyImported_noCombinators() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart';
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A', 'B'])
+      new ImportedElements(fooFile.path, '', <String>['A', 'B'])
     ]);
     assertNoChanges();
   }
 
   test_createEdits_alreadyImported_withPrefix() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' as foo;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, 'foo', <String>['A', 'B'])
+      new ImportedElements(fooFile.path, 'foo', <String>['A', 'B'])
     ]);
     assertNoChanges();
   }
 
   test_createEdits_alreadyImported_withShow() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' show A;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A'])
+      new ImportedElements(fooFile.path, '', <String>['A'])
     ]);
     assertNoChanges();
   }
@@ -210,12 +209,12 @@
   }
 
   test_createEdits_invalidUri() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'pakage:pkg/foo.dart';
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A'])
+      new ImportedElements(fooFile.path, '', <String>['A'])
     ]);
     assertChanges('''
 import 'pakage:pkg/foo.dart';
@@ -230,12 +229,12 @@
   }
 
   test_createEdits_removeHide_firstInCombinator() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A, B, C;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A'])
+      new ImportedElements(fooFile.path, '', <String>['A'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide B, C;
@@ -243,12 +242,12 @@
   }
 
   test_createEdits_removeHide_lastInCombinator() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A, B, C;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['C'])
+      new ImportedElements(fooFile.path, '', <String>['C'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide A, B;
@@ -256,12 +255,12 @@
   }
 
   test_createEdits_removeHide_middleInCombinator() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A, B, C;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['B'])
+      new ImportedElements(fooFile.path, '', <String>['B'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide A, C;
@@ -269,12 +268,12 @@
   }
 
   test_createEdits_removeHide_multipleCombinators() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A, B, C hide A, B, C;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['B'])
+      new ImportedElements(fooFile.path, '', <String>['B'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide A, C hide A, C;
@@ -282,12 +281,12 @@
   }
 
   test_createEdits_removeHide_multipleNames() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A, B, C hide D, E, F hide G, H, I;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A', 'E', 'I'])
+      new ImportedElements(fooFile.path, '', <String>['A', 'E', 'I'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide B, C hide D, F hide G, H;
@@ -295,12 +294,12 @@
   }
 
   test_createEdits_removeHideCombinator_first() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A hide B hide C;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A'])
+      new ImportedElements(fooFile.path, '', <String>['A'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide B hide C;
@@ -308,12 +307,12 @@
   }
 
   test_createEdits_removeHideCombinator_last() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A hide B hide C;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['C'])
+      new ImportedElements(fooFile.path, '', <String>['C'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide A hide B;
@@ -321,12 +320,12 @@
   }
 
   test_createEdits_removeHideCombinator_middle() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A hide B hide C;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['B'])
+      new ImportedElements(fooFile.path, '', <String>['B'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart' hide A hide C;
@@ -334,12 +333,12 @@
   }
 
   test_createEdits_removeHideCombinator_only() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A'])
+      new ImportedElements(fooFile.path, '', <String>['A'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart';
@@ -347,12 +346,12 @@
   }
 
   test_createEdits_removeHideCombinator_only_multiple() async {
-    Source fooSource = addPackageSource('pkg', 'foo.dart', '');
+    var fooFile = addPackageFile('pkg', 'foo.dart', '');
     await createBuilder('''
 import 'package:pkg/foo.dart' hide A, B;
 ''');
     await computeChanges(<ImportedElements>[
-      new ImportedElements(fooSource.fullName, '', <String>['A', 'B'])
+      new ImportedElements(fooFile.path, '', <String>['A', 'B'])
     ]);
     assertChanges('''
 import 'package:pkg/foo.dart';
diff --git a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
index 55c106b..8a5dad4 100644
--- a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
@@ -24,7 +24,7 @@
 
   setUp() {
     super.setUp();
-    sourcePath = resourceProvider.convertPath('/p/lib/source.dart');
+    sourcePath = convertPath('/home/test/lib/test.dart');
   }
 
   test_dartAsync_noPrefix() async {
@@ -43,7 +43,7 @@
     ImportedElements elements2 = elementsList[1];
     ImportedElements asyncElements;
     ImportedElements coreElements;
-    if (elements1.path == convertPath('/lib/core/core.dart')) {
+    if (elements1.path == convertPath('/sdk/lib/core/core.dart')) {
       coreElements = elements1;
       asyncElements = elements2;
     } else {
@@ -51,12 +51,12 @@
       asyncElements = elements1;
     }
     expect(coreElements, isNotNull);
-    expect(coreElements.path, convertPath('/lib/core/core.dart'));
+    expect(coreElements.path, convertPath('/sdk/lib/core/core.dart'));
     expect(coreElements.prefix, '');
     expect(coreElements.elements, unorderedEquals(['String']));
 
     expect(asyncElements, isNotNull);
-    expect(asyncElements.path, convertPath('/lib/async/async.dart'));
+    expect(asyncElements.path, convertPath('/sdk/lib/async/async.dart'));
     expect(asyncElements.prefix, '');
     expect(asyncElements.elements, unorderedEquals(['Future']));
   }
@@ -77,7 +77,7 @@
     ImportedElements elements2 = elementsList[1];
     ImportedElements asyncElements;
     ImportedElements coreElements;
-    if (elements1.path == convertPath('/lib/core/core.dart')) {
+    if (elements1.path == convertPath('/sdk/lib/core/core.dart')) {
       coreElements = elements1;
       asyncElements = elements2;
     } else {
@@ -85,12 +85,12 @@
       asyncElements = elements1;
     }
     expect(coreElements, isNotNull);
-    expect(coreElements.path, convertPath('/lib/core/core.dart'));
+    expect(coreElements.path, convertPath('/sdk/lib/core/core.dart'));
     expect(coreElements.prefix, '');
     expect(coreElements.elements, unorderedEquals(['String']));
 
     expect(asyncElements, isNotNull);
-    expect(asyncElements.path, convertPath('/lib/async/async.dart'));
+    expect(asyncElements.path, convertPath('/sdk/lib/async/async.dart'));
     expect(asyncElements.prefix, 'a');
     expect(asyncElements.elements, unorderedEquals(['Future']));
   }
@@ -108,7 +108,7 @@
     expect(elementsList, hasLength(1));
     ImportedElements elements = elementsList[0];
     expect(elements, isNotNull);
-    expect(elements.path, convertPath('/lib/core/core.dart'));
+    expect(elements.path, convertPath('/sdk/lib/core/core.dart'));
     expect(elements.prefix, '');
     expect(elements.elements, unorderedEquals(['String']));
   }
@@ -127,7 +127,7 @@
     expect(elementsList, hasLength(1));
     ImportedElements elements = elementsList[0];
     expect(elements, isNotNull);
-    expect(elements.path, convertPath('/lib/core/core.dart'));
+    expect(elements.path, convertPath('/sdk/lib/core/core.dart'));
     expect(elements.prefix, 'core');
     expect(elements.elements, unorderedEquals(['String']));
   }
@@ -146,7 +146,7 @@
     expect(elementsList, hasLength(1));
     ImportedElements elements = elementsList[0];
     expect(elements, isNotNull);
-    expect(elements.path, convertPath('/lib/math/math.dart'));
+    expect(elements.path, convertPath('/sdk/lib/math/math.dart'));
     expect(elements.prefix, '');
     expect(elements.elements, unorderedEquals(['Random']));
   }
@@ -170,13 +170,13 @@
 
     ImportedElements mathElements = elementsList[0];
     expect(mathElements, isNotNull);
-    expect(mathElements.path, convertPath('/lib/math/math.dart'));
+    expect(mathElements.path, convertPath('/sdk/lib/math/math.dart'));
     expect(mathElements.prefix, '');
     expect(mathElements.elements, unorderedEquals(['Random']));
 
     ImportedElements coreElements = elementsList[1];
     expect(coreElements, isNotNull);
-    expect(coreElements.path, convertPath('/lib/core/core.dart'));
+    expect(coreElements.path, convertPath('/sdk/lib/core/core.dart'));
     expect(coreElements.prefix, '');
     expect(coreElements.elements, unorderedEquals(['String', 'print']));
   }
@@ -236,7 +236,7 @@
   }
 
   test_package_multipleInSame() async {
-    addPackageSource('foo', 'foo.dart', '''
+    addPackageFile('foo', 'foo.dart', '''
 class A {
   static String a = '';
 }
@@ -256,13 +256,13 @@
     expect(elementsList, hasLength(1));
     ImportedElements elements = elementsList[0];
     expect(elements, isNotNull);
-    expect(elements.path, convertPath('/pubcache/foo/lib/foo.dart'));
+    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
     expect(elements.prefix, '');
     expect(elements.elements, unorderedEquals(['A', 'B']));
   }
 
   test_package_noPrefix() async {
-    addPackageSource('foo', 'foo.dart', '''
+    addPackageFile('foo', 'foo.dart', '''
 class Foo {
   static String first = '';
 }
@@ -279,13 +279,13 @@
     expect(elementsList, hasLength(1));
     ImportedElements elements = elementsList[0];
     expect(elements, isNotNull);
-    expect(elements.path, convertPath('/pubcache/foo/lib/foo.dart'));
+    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
     expect(elements.prefix, '');
     expect(elements.elements, unorderedEquals(['Foo']));
   }
 
   test_package_prefix_selected() async {
-    addPackageSource('foo', 'foo.dart', '''
+    addPackageFile('foo', 'foo.dart', '''
 class Foo {
   static String first = '';
 }
@@ -302,13 +302,13 @@
     expect(elementsList, hasLength(1));
     ImportedElements elements = elementsList[0];
     expect(elements, isNotNull);
-    expect(elements.path, convertPath('/pubcache/foo/lib/foo.dart'));
+    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
     expect(elements.prefix, 'f');
     expect(elements.elements, unorderedEquals(['Foo']));
   }
 
   test_package_prefix_unselected() async {
-    addPackageSource('foo', 'foo.dart', '''
+    addPackageFile('foo', 'foo.dart', '''
 class Foo {
   static String first = '';
 }
@@ -325,13 +325,13 @@
     expect(elementsList, hasLength(1));
     ImportedElements elements = elementsList[0];
     expect(elements, isNotNull);
-    expect(elements.path, convertPath('/pubcache/foo/lib/foo.dart'));
+    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
     expect(elements.prefix, '');
     expect(elements.elements, unorderedEquals(['Foo']));
   }
 
   test_package_prefixedAndNot() async {
-    addPackageSource('foo', 'foo.dart', '''
+    addPackageFile('foo', 'foo.dart', '''
 class Foo {
   static String first = '';
   static String second = '';
@@ -362,12 +362,13 @@
     }
 
     expect(notPrefixedElements, isNotNull);
-    expect(notPrefixedElements.path, convertPath('/pubcache/foo/lib/foo.dart'));
+    expect(
+        notPrefixedElements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
     expect(notPrefixedElements.prefix, '');
     expect(notPrefixedElements.elements, unorderedEquals(['Foo']));
 
     expect(prefixedElements, isNotNull);
-    expect(prefixedElements.path, convertPath('/pubcache/foo/lib/foo.dart'));
+    expect(prefixedElements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
     expect(prefixedElements.prefix, 'f');
     expect(prefixedElements.elements, unorderedEquals(['Foo']));
   }
@@ -392,7 +393,7 @@
   Future<List<ImportedElements>> _computeElements(
       String sourceContent, int offset, int length) async {
     newFile(sourcePath, content: sourceContent);
-    ResolveResult result = await driver.getResult(sourcePath);
+    ResolvedUnitResult result = await session.getResolvedUnit(sourcePath);
     ImportedElementsComputer computer =
         new ImportedElementsComputer(result.unit, offset, length);
     return computer.compute();
diff --git a/pkg/analysis_server/test/src/computer/outline_computer_test.dart b/pkg/analysis_server/test/src/computer/outline_computer_test.dart
index 340045a..eb45aad 100644
--- a/pkg/analysis_server/test/src/computer/outline_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/outline_computer_test.dart
@@ -5,7 +5,6 @@
 import 'dart:async';
 
 import 'package:analysis_server/src/computer/computer_outline.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:meta/meta.dart';
 import 'package:test/test.dart';
@@ -27,15 +26,15 @@
   @override
   void setUp() {
     super.setUp();
-    testPath = resourceProvider.convertPath('/test.dart');
+    testPath = convertPath('/home/test/lib/test.dart');
   }
 
   Future<Outline> _computeOutline(String code) async {
     testCode = code;
     newFile(testPath, content: code);
-    AnalysisResult analysisResult = await driver.getResult(testPath);
+    var resolveResult = await session.getResolvedUnit(testPath);
     return new DartUnitOutlineComputer(
-            testPath, analysisResult.lineInfo, analysisResult.unit,
+            testPath, resolveResult.lineInfo, resolveResult.unit,
             withBasicFlutter: true)
         .compute();
   }
@@ -558,7 +557,7 @@
   }
 
   test_isTest_isTestGroup() async {
-    addMetaPackageSource();
+    addMetaPackage();
     Outline outline = await _computeOutline('''
 import 'package:meta/meta.dart';
 
@@ -1057,6 +1056,7 @@
     Outline unitOutline = await _computeOutline('''
 typedef String FTA<K, V>(int i, String s);
 typedef FTB(int p);
+typedef GTAF<T> = void Function<S>(T t, S s);
 class A<T> {}
 class B {}
 class CTA<T> = A<T> with B;
@@ -1067,7 +1067,7 @@
 set propB(int v) {}
 ''');
     List<Outline> topOutlines = unitOutline.children;
-    expect(topOutlines, hasLength(10));
+    expect(topOutlines, hasLength(11));
     // FTA
     {
       Outline outline = topOutlines[0];
@@ -1098,9 +1098,24 @@
       expect(element.parameters, "(int p)");
       expect(element.returnType, "");
     }
+    // GenericTypeAlias - function
+    {
+      Outline outline = topOutlines[2];
+      Element element = outline.element;
+      expect(element.kind, ElementKind.FUNCTION_TYPE_ALIAS);
+      expect(element.name, "GTAF");
+      expect(element.typeParameters, '<T>');
+      {
+        Location location = element.location;
+        expect(location.offset, testCode.indexOf("GTAF<T> ="));
+        expect(location.length, "GTAF".length);
+      }
+      expect(element.parameters, "(T t, S s)");
+      expect(element.returnType, "void");
+    }
     // CTA
     {
-      Outline outline = topOutlines[4];
+      Outline outline = topOutlines[5];
       Element element = outline.element;
       expect(element.kind, ElementKind.CLASS_TYPE_ALIAS);
       expect(element.name, "CTA");
@@ -1115,7 +1130,7 @@
     }
     // CTB
     {
-      Outline outline = topOutlines[5];
+      Outline outline = topOutlines[6];
       Element element = outline.element;
       expect(element.kind, ElementKind.CLASS_TYPE_ALIAS);
       expect(element.name, 'CTB');
@@ -1124,7 +1139,7 @@
     }
     // fA
     {
-      Outline outline = topOutlines[6];
+      Outline outline = topOutlines[7];
       Element element = outline.element;
       expect(element.kind, ElementKind.FUNCTION);
       expect(element.name, "fA");
@@ -1138,7 +1153,7 @@
     }
     // fB
     {
-      Outline outline = topOutlines[7];
+      Outline outline = topOutlines[8];
       Element element = outline.element;
       expect(element.kind, ElementKind.FUNCTION);
       expect(element.name, "fB");
@@ -1152,7 +1167,7 @@
     }
     // propA
     {
-      Outline outline = topOutlines[8];
+      Outline outline = topOutlines[9];
       Element element = outline.element;
       expect(element.kind, ElementKind.GETTER);
       expect(element.name, "propA");
@@ -1166,7 +1181,7 @@
     }
     // propB
     {
-      Outline outline = topOutlines[9];
+      Outline outline = topOutlines[10];
       Element element = outline.element;
       expect(element.kind, ElementKind.SETTER);
       expect(element.name, "propB");
diff --git a/pkg/analysis_server/test/src/domains/execution/completion_test.dart b/pkg/analysis_server/test/src/domains/execution/completion_test.dart
index 4ba0ecd..41529c6 100644
--- a/pkg/analysis_server/test/src/domains/execution/completion_test.dart
+++ b/pkg/analysis_server/test/src/domains/execution/completion_test.dart
@@ -25,7 +25,7 @@
   RuntimeCompletionResult result;
 
   void addContextFile(String content) {
-    contextFile = convertPath('/test/lib/context.dart');
+    contextFile = convertPath('/home/test/lib/context.dart');
     addSource(contextFile, content);
 
     contextOffset = content.indexOf('// context line');
@@ -131,13 +131,13 @@
   }
 
   test_inPart() async {
-    addSource('/test/lib/a.dart', r'''
+    addSource('/home/test/lib/a.dart', r'''
 part 'b.dart';
 part 'context.dart';
 
 int a;
 ''');
-    addSource('/test/lib/b.dart', r'''
+    addSource('/home/test/lib/b.dart', r'''
 part of 'a.dart';
 
 double b;
diff --git a/pkg/analysis_server/test/src/domains/execution/test_all.dart b/pkg/analysis_server/test/src/domains/execution/test_all.dart
new file mode 100644
index 0000000..20e6141
--- /dev/null
+++ b/pkg/analysis_server/test/src/domains/execution/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'completion_test.dart' as completion_test;
+
+main() {
+  defineReflectiveSuite(() {
+    completion_test.main();
+  });
+}
diff --git a/pkg/analysis_server/test/src/domains/test_all.dart b/pkg/analysis_server/test/src/domains/test_all.dart
new file mode 100644
index 0000000..81a4c82
--- /dev/null
+++ b/pkg/analysis_server/test/src/domains/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'execution/test_all.dart' as execution_test;
+
+main() {
+  defineReflectiveSuite(() {
+    execution_test.main();
+  });
+}
diff --git a/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart b/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart
index 4501d68..1d7ba263 100644
--- a/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart
+++ b/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart
@@ -125,11 +125,9 @@
 
   void _createCorrections() {
     corrections = new FlutterCorrections(
-        file: testFile,
-        fileContent: testCode,
-        selectionOffset: offset,
-        selectionLength: length,
-        session: testAnalysisResult.session,
-        unit: testUnit);
+      resolveResult: testAnalysisResult,
+      selectionOffset: offset,
+      selectionLength: length,
+    );
   }
 }
diff --git a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
index e4b62c4..947fb79 100644
--- a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
+++ b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
@@ -6,7 +6,7 @@
 
 import 'package:analysis_server/src/flutter/flutter_outline_computer.dart';
 import 'package:analysis_server/src/protocol_server.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -22,13 +22,13 @@
 class FlutterOutlineComputerTest extends AbstractContextTest {
   String testPath;
   String testCode;
-  AnalysisResult analysisResult;
+  ResolvedUnitResult resolveResult;
   FlutterOutlineComputer computer;
 
   @override
   void setUp() {
     super.setUp();
-    testPath = resourceProvider.convertPath('/test.dart');
+    testPath = convertPath('/home/test/lib/test.dart');
     addFlutterPackage();
   }
 
@@ -288,7 +288,7 @@
   }
 
   test_parentAssociationLabel() async {
-    newFile('/a.dart', content: r'''
+    newFile('/home/test/lib/a.dart', content: r'''
 import 'package:flutter/widgets.dart';
 
 class WidgetA extends StatelessWidget {
@@ -359,7 +359,7 @@
   test_render_BAD_part() async {
     // Use test.dart as a part of a library.
     // Add the library to the driver so that it is analyzed before the part.
-    var libPath = newFile('/test_lib.dart', content: r'''
+    var libPath = newFile('/home/test/lib/test_lib.dart', content: r'''
 part 'test.dart';
 import 'package:flutter/widgets.dart';
 ''').path;
@@ -379,7 +379,7 @@
 ''');
 
     // Analysis is successful, no errors.
-    expect(analysisResult.errors, isEmpty);
+    expect(resolveResult.errors, isEmpty);
 
     // No instrumentation, because not a library.
     expect(computer.instrumentedCode, isNull);
@@ -431,8 +431,7 @@
   }
 
   test_render_instrumentedCode_rewriteUri_file() async {
-    testPath = resourceProvider.convertPath('/home/user/test/test.dart');
-    var libFile = newFile('/home/user/test/my_lib.dart', content: '');
+    newFile('/home/test/lib/my_lib.dart');
 
     await _computeOutline('''
 import 'package:flutter/widgets.dart';
@@ -451,7 +450,7 @@
         computer.instrumentedCode,
         '''
 import 'package:flutter/widgets.dart';
-import '${libFile.toUri()}';
+import 'package:test/my_lib.dart';
 
 class MyWidget extends StatelessWidget {
   MyWidget.forDesignTime();
@@ -466,11 +465,7 @@
   }
 
   test_render_instrumentedCode_rewriteUri_package() async {
-    packageMap['test'] = [newFolder('/home/user/test/lib')];
-
-    testPath = resourceProvider.convertPath('/home/user/test/lib/test.dart');
-    newFile('/home/user/test/lib/my_lib.dart', content: '');
-    configureDriver();
+    newFile('/home/test/lib/my_lib.dart');
 
     await _computeOutline('''
 import 'package:flutter/widgets.dart';
@@ -630,9 +625,9 @@
   Future<FlutterOutline> _computeOutline(String code) async {
     testCode = code;
     newFile(testPath, content: code);
-    analysisResult = await driver.getResult(testPath);
-    computer = new FlutterOutlineComputer(
-        testPath, testCode, analysisResult.lineInfo, analysisResult.unit);
+    resolveResult = await session.getResolvedUnit(testPath);
+    computer = new FlutterOutlineComputer(testPath, testCode,
+        resolveResult.lineInfo, resolveResult.unit, resolveResult.typeProvider);
     return computer.compute();
   }
 
diff --git a/pkg/analysis_server/test/src/lsp/lsp_packet_transformer_test.dart b/pkg/analysis_server/test/src/lsp/lsp_packet_transformer_test.dart
new file mode 100644
index 0000000..caba741
--- /dev/null
+++ b/pkg/analysis_server/test/src/lsp/lsp_packet_transformer_test.dart
@@ -0,0 +1,94 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:convert';
+
+import 'package:analysis_server/src/lsp/lsp_packet_transformer.dart';
+import 'package:test/test.dart';
+
+main() {
+  group('lsp_packet_transformer', () {
+    test('transforms data received as individual bytes', () async {
+      final payload = '{ json payload }';
+      final lspPacket = makeLspPacket(payload);
+      final output = await new Stream.fromIterable([lspPacket])
+          .transform(new LspPacketTransformer())
+          .toList();
+      expect(output, equals([payload]));
+    });
+
+    test('transforms data received in chunks', () async {
+      final payload = '{ json\n payload\n  }';
+      final lspPacket = makeLspPacket(payload);
+      // Separate each byte into it's own "packet" to simulate chunked data
+      // where all the bytes for a single LSP packet don't arrive in one
+      // item to the stream.
+      final dataPackets = lspPacket.map((b) => [b]);
+      final output = await new Stream.fromIterable(dataPackets)
+          .transform(new LspPacketTransformer())
+          .toList();
+      expect(output, equals([payload]));
+    });
+
+    test('handles unicode characters', () async {
+      // This file is saved as UTF8.
+      final payload = '{ json payload 🎉 }';
+      final lspPacket = makeLspPacket(payload);
+      final output = await new Stream.fromIterable([lspPacket])
+          .transform(new LspPacketTransformer())
+          .toList();
+      expect(output, equals([payload]));
+    });
+
+    test('accepts "utf-8" as an encoding', () async {
+      final payload = '{ json payload 🎉 }';
+      final lspPacket =
+          makeLspPacket(payload, 'application/vscode-jsonrpc; charset=utf-8');
+      final output = await new Stream.fromIterable([lspPacket])
+          .transform(new LspPacketTransformer())
+          .toList();
+      expect(output, equals([payload]));
+    });
+
+    test('accepts "utf8" as an encoding', () async {
+      final payload = '{ json payload 🎉 }';
+      final lspPacket =
+          makeLspPacket(payload, 'application/vscode-jsonrpc; charset=utf8');
+      final output = await new Stream.fromIterable([lspPacket])
+          .transform(new LspPacketTransformer())
+          .toList();
+      expect(output, equals([payload]));
+    });
+
+    test('accepts no encoding', () async {
+      final payload = '{ json payload 🎉 }';
+      final lspPacket = makeLspPacket(payload, 'application/vscode-jsonrpc;');
+      final output = await new Stream.fromIterable([lspPacket])
+          .transform(new LspPacketTransformer())
+          .toList();
+      expect(output, equals([payload]));
+    });
+
+    test('rejects invalid encoding', () async {
+      final payload = '{ json payload }';
+      final lspPacket =
+          makeLspPacket(payload, 'application/vscode-jsonrpc; charset=ascii');
+      final outputStream = await new Stream.fromIterable([lspPacket])
+          .transform(new LspPacketTransformer());
+
+      expectLater(outputStream.toList(),
+          throwsA(const TypeMatcher<InvalidEncodingError>()));
+    });
+  });
+}
+
+List<int> makeLspPacket(String json, [String contentType]) {
+  final utf8EncodedBody = utf8.encode(json);
+  final header = 'Content-Length: ${utf8EncodedBody.length}' +
+      (contentType != null ? '\r\nContent-Type: $contentType' : '') +
+      '\r\n\r\n';
+  final asciiEncodedHeader = ascii.encode(header);
+
+  return asciiEncodedHeader.followedBy(utf8EncodedBody).toList();
+}
diff --git a/pkg/analysis_server/test/src/plugin/plugin_locator_test.dart b/pkg/analysis_server/test/src/plugin/plugin_locator_test.dart
index db3d3f9..a01ca1f 100644
--- a/pkg/analysis_server/test/src/plugin/plugin_locator_test.dart
+++ b/pkg/analysis_server/test/src/plugin/plugin_locator_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class PluginLocatorTest extends Object with ResourceProviderMixin {
+class PluginLocatorTest with ResourceProviderMixin {
   String packageRoot;
   String pubspecPath;
   String defaultDirPath;
diff --git a/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart b/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
index 6837470..186e284 100644
--- a/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
+++ b/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -405,7 +405,7 @@
 }
 
 @reflectiveTest
-class PluginManagerTest extends Object with ResourceProviderMixin {
+class PluginManagerTest with ResourceProviderMixin {
   String byteStorePath;
   String sdkPath;
   TestNotificationManager notificationManager;
@@ -535,7 +535,7 @@
 }
 
 @reflectiveTest
-class PluginSessionTest extends Object with ResourceProviderMixin {
+class PluginSessionTest with ResourceProviderMixin {
   TestNotificationManager notificationManager;
   String pluginPath;
   String executionPath;
diff --git a/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart b/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart
index 058ee15..d81f23b 100644
--- a/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart
+++ b/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -8,24 +8,24 @@
 import 'package:analysis_server/src/plugin/plugin_locator.dart';
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
 import 'package:analysis_server/src/plugin/plugin_watcher.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/context/context_root.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(PluginWatcherTest);
@@ -33,7 +33,7 @@
 }
 
 @reflectiveTest
-class PluginWatcherTest extends Object with ResourceProviderMixin {
+class PluginWatcherTest with ResourceProviderMixin {
   TestPluginManager manager;
   PluginWatcher watcher;
 
@@ -119,7 +119,7 @@
   AnalysisSession currentSession;
   AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl();
 
-  final _resultController = new StreamController<AnalysisResult>();
+  final _resultController = new StreamController<ResolvedUnitResult>();
 
   TestDriver(this.resourceProvider, ContextRoot contextRoot) {
     path.Context pathContext = resourceProvider.pathContext;
@@ -147,15 +147,7 @@
     currentSession = new AnalysisSessionImpl(this);
   }
 
-  Stream<AnalysisResult> get results => _resultController.stream;
-
-  Future<void> computeResult(String uri) {
-    FileState file = fsState.getFileForUri(Uri.parse(uri));
-    AnalysisResult result = new AnalysisResult(this, null, file.path, null,
-        true, null, null, false, null, null, null, null);
-    _resultController.add(result);
-    return new Future.delayed(new Duration(milliseconds: 1));
-  }
+  Stream<ResolvedUnitResult> get results => _resultController.stream;
 
   noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
diff --git a/pkg/analysis_server/test/src/services/correction/assist/add_type_annotation_test.dart b/pkg/analysis_server/test/src/services/correction/assist/add_type_annotation_test.dart
new file mode 100644
index 0000000..9d1e8fb
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/add_type_annotation_test.dart
@@ -0,0 +1,576 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddTypeAnnotationTest);
+  });
+}
+
+@reflectiveTest
+class AddTypeAnnotationTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.ADD_TYPE_ANNOTATION;
+
+  test_classField_final() async {
+    await resolveTestUnit('''
+class A {
+  final f = 0;
+}
+''');
+    await assertHasAssistAt('final ', '''
+class A {
+  final int f = 0;
+}
+''');
+  }
+
+  test_classField_int() async {
+    await resolveTestUnit('''
+class A {
+  var f = 0;
+}
+''');
+    await await assertHasAssistAt('var ', '''
+class A {
+  int f = 0;
+}
+''');
+  }
+
+  test_declaredIdentifier() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (var item in items) {
+  }
+}
+''');
+    // on identifier
+    await assertHasAssistAt('item in', '''
+main(List<String> items) {
+  for (String item in items) {
+  }
+}
+''');
+    // on "for"
+    await assertHasAssistAt('for (', '''
+main(List<String> items) {
+  for (String item in items) {
+  }
+}
+''');
+  }
+
+  test_declaredIdentifier_addImport_dartUri() async {
+    addSource('/home/test/lib/my_lib.dart', r'''
+import 'dart:collection';
+List<HashMap<String, int>> getMap() => null;
+''');
+    await resolveTestUnit('''
+import 'my_lib.dart';
+main() {
+  for (var map in getMap()) {
+  }
+}
+''');
+    await assertHasAssistAt('map in', '''
+import 'dart:collection';
+
+import 'my_lib.dart';
+main() {
+  for (HashMap<String, int> map in getMap()) {
+  }
+}
+''');
+  }
+
+  test_declaredIdentifier_final() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (final item in items) {
+  }
+}
+''');
+    await assertHasAssistAt('item in', '''
+main(List<String> items) {
+  for (final String item in items) {
+  }
+}
+''');
+  }
+
+  test_declaredIdentifier_generic() async {
+    await resolveTestUnit('''
+class A<T> {
+  main(List<List<T>> items) {
+    for (var item in items) {
+    }
+  }
+}
+''');
+    await assertHasAssistAt('item in', '''
+class A<T> {
+  main(List<List<T>> items) {
+    for (List<T> item in items) {
+    }
+  }
+}
+''');
+  }
+
+  test_declaredIdentifier_hasTypeAnnotation() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) {
+  }
+}
+''');
+    await assertNoAssistAt('item in');
+  }
+
+  test_declaredIdentifier_inForEachBody() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (var item in items) {
+    42;
+  }
+}
+''');
+    await assertNoAssistAt('42;');
+  }
+
+  test_declaredIdentifier_unknownType() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+main() {
+  for (var item in unknownList) {
+  }
+}
+''');
+    await assertNoAssistAt('item in');
+  }
+
+  test_local_addImport_dartUri() async {
+    addSource('/home/test/lib/my_lib.dart', r'''
+import 'dart:collection';
+HashMap<String, int> getMap() => null;
+''');
+    await resolveTestUnit('''
+import 'my_lib.dart';
+main() {
+  var v = getMap();
+}
+''');
+    await assertHasAssistAt('v =', '''
+import 'dart:collection';
+
+import 'my_lib.dart';
+main() {
+  HashMap<String, int> v = getMap();
+}
+''');
+  }
+
+  test_local_addImport_notLibraryUnit() async {
+    addSource('/home/test/lib/my_lib.dart', r'''
+import 'dart:collection';
+HashMap<String, int> getMap() => null;
+''');
+
+    var appCode = r'''
+library my_app;
+import 'my_lib.dart';
+part 'test.dart';
+''';
+    var partCode = r'''
+part of my_app;
+main() {
+  var /*caret*/v = getMap();
+}
+''';
+
+    var appPath = convertPath('/home/test/lib/app.dart');
+    addSource(appPath, appCode);
+    addSource(testFile, partCode);
+    await resolveTestUnit(partCode);
+
+    await assertHasAssist('''
+part of my_app;
+main() {
+  HashMap<String, int> /*caret*/v = getMap();
+}
+''', additionallyChangedFiles: {
+      appPath: [
+        appCode,
+        '''
+library my_app;
+import 'dart:collection';
+
+import 'my_lib.dart';
+part 'test.dart';
+'''
+      ]
+    });
+  }
+
+  test_local_addImport_relUri() async {
+    testFile = convertPath('/home/test/bin/test.dart');
+    addSource('/home/test/bin/aa/bbb/lib_a.dart', r'''
+class MyClass {}
+''');
+    addSource('/home/test/bin/ccc/lib_b.dart', r'''
+import '../aa/bbb/lib_a.dart';
+MyClass newMyClass() => null;
+''');
+    await resolveTestUnit('''
+import 'ccc/lib_b.dart';
+main() {
+  var v = newMyClass();
+}
+''');
+    await assertHasAssistAt('v =', '''
+import 'aa/bbb/lib_a.dart';
+import 'ccc/lib_b.dart';
+main() {
+  MyClass v = newMyClass();
+}
+''');
+  }
+
+  test_local_bottom() async {
+    await resolveTestUnit('''
+main() {
+  var v = throw 42;
+}
+''');
+    await assertNoAssistAt('var ');
+  }
+
+  test_local_Function() async {
+    await resolveTestUnit('''
+main() {
+  var v = () => 1;
+}
+''');
+    await assertHasAssistAt('v =', '''
+main() {
+  int Function() v = () => 1;
+}
+''');
+  }
+
+  test_local_generic_literal() async {
+    await resolveTestUnit('''
+class A {
+  main(List<int> items) {
+    var v = items;
+  }
+}
+''');
+    await assertHasAssistAt('v =', '''
+class A {
+  main(List<int> items) {
+    List<int> v = items;
+  }
+}
+''');
+  }
+
+  test_local_generic_local() async {
+    await resolveTestUnit('''
+class A<T> {
+  main(List<T> items) {
+    var v = items;
+  }
+}
+''');
+    await assertHasAssistAt('v =', '''
+class A<T> {
+  main(List<T> items) {
+    List<T> v = items;
+  }
+}
+''');
+  }
+
+  test_local_hasTypeAnnotation() async {
+    await resolveTestUnit('''
+main() {
+  int v = 42;
+}
+''');
+    await assertNoAssistAt(' = 42');
+  }
+
+  test_local_int() async {
+    await resolveTestUnit('''
+main() {
+  var v = 0;
+}
+''');
+    await assertHasAssistAt('v =', '''
+main() {
+  int v = 0;
+}
+''');
+  }
+
+  test_local_List() async {
+    await resolveTestUnit('''
+main() {
+  var v = <String>[];
+}
+''');
+    await assertHasAssistAt('v =', '''
+main() {
+  List<String> v = <String>[];
+}
+''');
+  }
+
+  test_local_localType() async {
+    await resolveTestUnit('''
+class C {}
+C f() => null;
+main() {
+  var x = f();
+}
+''');
+    await assertHasAssistAt('x =', '''
+class C {}
+C f() => null;
+main() {
+  C x = f();
+}
+''');
+  }
+
+  test_local_multiple() async {
+    await resolveTestUnit('''
+main() {
+  var a = 1, b = '';
+}
+''');
+    await assertNoAssistAt('var ');
+  }
+
+  test_local_noValue() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+main() {
+  var v;
+}
+''');
+    await assertNoAssistAt('var ');
+  }
+
+  test_local_null() async {
+    await resolveTestUnit('''
+main() {
+  var v = null;
+}
+''');
+    await assertNoAssistAt('var ');
+  }
+
+  test_local_onInitializer() async {
+    await resolveTestUnit('''
+main() {
+  var abc = 0;
+}
+''');
+    await assertNoAssistAt('0;');
+  }
+
+  test_local_onName() async {
+    await resolveTestUnit('''
+main() {
+  var abc = 0;
+}
+''');
+    await assertHasAssistAt('bc', '''
+main() {
+  int abc = 0;
+}
+''');
+  }
+
+  test_local_onVar() async {
+    await resolveTestUnit('''
+main() {
+  var v = 0;
+}
+''');
+    await assertHasAssistAt('var ', '''
+main() {
+  int v = 0;
+}
+''');
+  }
+
+  test_local_unknown() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+main() {
+  var v = unknownVar;
+}
+''');
+    await assertNoAssistAt('var ');
+  }
+
+  test_parameter() async {
+    await resolveTestUnit('''
+foo(f(int p)) {}
+main() {
+  foo((test) {});
+}
+''');
+    await assertHasAssistAt('test', '''
+foo(f(int p)) {}
+main() {
+  foo((int test) {});
+}
+''');
+  }
+
+  test_parameter_hasExplicitType() async {
+    await resolveTestUnit('''
+foo(f(int p)) {}
+main() {
+  foo((num test) {});
+}
+''');
+    await assertNoAssistAt('test');
+  }
+
+  test_parameter_noPropagatedType() async {
+    await resolveTestUnit('''
+foo(f(p)) {}
+main() {
+  foo((test) {});
+}
+''');
+    await assertNoAssistAt('test');
+  }
+
+  test_privateType_closureParameter() async {
+    addSource('/home/test/lib/my_lib.dart', '''
+library my_lib;
+class A {}
+class _B extends A {}
+foo(f(_B p)) {}
+''');
+    await resolveTestUnit('''
+import 'my_lib.dart';
+main() {
+  foo((test) {});
+}
+ ''');
+    await assertNoAssistAt('test)');
+  }
+
+  test_privateType_declaredIdentifier() async {
+    addSource('/home/test/lib/my_lib.dart', '''
+library my_lib;
+class A {}
+class _B extends A {}
+List<_B> getValues() => [];
+''');
+    await resolveTestUnit('''
+import 'my_lib.dart';
+class A<T> {
+  main() {
+    for (var item in getValues()) {
+    }
+  }
+}
+''');
+    await assertNoAssistAt('var item');
+  }
+
+  test_privateType_list() async {
+    // This is now failing because we're suggesting "List" rather than nothing.
+    // Is it really better to produce nothing?
+    addSource('/home/test/lib/my_lib.dart', '''
+library my_lib;
+class A {}
+class _B extends A {}
+List<_B> getValues() => [];
+''');
+    await resolveTestUnit('''
+import 'my_lib.dart';
+main() {
+  var v = getValues();
+}
+''');
+    await assertHasAssistAt('var ', '''
+import 'my_lib.dart';
+main() {
+  List v = getValues();
+}
+''');
+  }
+
+  test_privateType_sameLibrary() async {
+    await resolveTestUnit('''
+class _A {}
+_A getValue() => new _A();
+main() {
+  var v = getValue();
+}
+''');
+    await assertHasAssistAt('var ', '''
+class _A {}
+_A getValue() => new _A();
+main() {
+  _A v = getValue();
+}
+''');
+  }
+
+  test_privateType_variable() async {
+    addSource('/home/test/lib/my_lib.dart', '''
+library my_lib;
+class A {}
+class _B extends A {}
+_B getValue() => new _B();
+''');
+    await resolveTestUnit('''
+import 'my_lib.dart';
+main() {
+  var v = getValue();
+}
+''');
+    await assertNoAssistAt('var ');
+  }
+
+  test_topLevelField_int() async {
+    await resolveTestUnit('''
+var V = 0;
+''');
+    await assertHasAssistAt('var ', '''
+int V = 0;
+''');
+  }
+
+  test_topLevelField_multiple() async {
+    await resolveTestUnit('''
+var A = 1, V = '';
+''');
+    await assertNoAssistAt('var ');
+  }
+
+  test_topLevelField_noValue() async {
+    await resolveTestUnit('''
+var V;
+''');
+    await assertNoAssistAt('var ');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/assign_to_local_variable_test.dart b/pkg/analysis_server/test/src/services/correction/assist/assign_to_local_variable_test.dart
new file mode 100644
index 0000000..1668ea4
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/assign_to_local_variable_test.dart
@@ -0,0 +1,100 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AssignToLocalVariableTest);
+  });
+}
+
+@reflectiveTest
+class AssignToLocalVariableTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE;
+
+  test_alreadyAssignment() async {
+    await resolveTestUnit('''
+main() {
+  var vvv;
+  vvv = 42;
+}
+''');
+    await assertNoAssistAt('vvv =');
+  }
+
+  test_inClosure() async {
+    await resolveTestUnit(r'''
+main() {
+  print(() {
+    12345;
+  });
+}
+''');
+    await assertHasAssistAt('345', '''
+main() {
+  print(() {
+    var i = 12345;
+  });
+}
+''');
+  }
+
+  test_invocation() async {
+    await resolveTestUnit('''
+main() {
+  List<int> bytes;
+  readBytes();
+}
+List<int> readBytes() => <int>[];
+''');
+    await assertHasAssistAt('readBytes();', '''
+main() {
+  List<int> bytes;
+  var readBytes = readBytes();
+}
+List<int> readBytes() => <int>[];
+''');
+    assertLinkedGroup(
+        0,
+        ['readBytes = '],
+        expectedSuggestions(LinkedEditSuggestionKind.VARIABLE,
+            ['list', 'bytes2', 'readBytes']));
+  }
+
+  test_invocationArgument() async {
+    await resolveTestUnit(r'''
+main() {
+  f(12345);
+}
+void f(p) {}
+''');
+    await assertNoAssistAt('345');
+  }
+
+  test_throw() async {
+    await resolveTestUnit('''
+main() {
+  throw 42;
+}
+''');
+    await assertNoAssistAt('throw ');
+  }
+
+  test_void() async {
+    await resolveTestUnit('''
+main() {
+  f();
+}
+void f() {}
+''');
+    await assertNoAssistAt('f();');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/assist_processor.dart b/pkg/analysis_server/test/src/services/correction/assist/assist_processor.dart
new file mode 100644
index 0000000..1ff780c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/assist_processor.dart
@@ -0,0 +1,186 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analysis_server/src/services/correction/assist_internal.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    hide AnalysisError;
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
+import 'package:test/test.dart';
+
+import '../../../../abstract_single_unit.dart';
+
+/// A base class defining support for writing assist processor tests.
+abstract class AssistProcessorTest extends AbstractSingleUnitTest {
+  int _offset;
+  int _length;
+
+  SourceChange _change;
+  String _resultCode;
+
+  /// Return the kind of assist expected by this class.
+  AssistKind get kind;
+
+  /// The workspace in which fixes contributor operates.
+  ChangeWorkspace get workspace {
+    return DartChangeWorkspace([session]);
+  }
+
+  void assertExitPosition({String before, String after}) {
+    Position exitPosition = _change.selection;
+    expect(exitPosition, isNotNull);
+    expect(exitPosition.file, testFile);
+    if (before != null) {
+      expect(exitPosition.offset, _resultCode.indexOf(before));
+    } else if (after != null) {
+      expect(exitPosition.offset, _resultCode.indexOf(after) + after.length);
+    } else {
+      fail("One of 'before' or 'after' expected.");
+    }
+  }
+
+  /// Asserts that there is an assist of the given [kind] at [_offset] which
+  /// produces the [expected] code when applied to [testCode]. The map of
+  /// [additionallyChangedFiles] can be used to test assists that can modify
+  /// more than the test file. The keys are expected to be the paths to the
+  /// files that are modified (other than the test file) and the values are
+  /// pairs of source code: the states of the code before and after the edits
+  /// have been applied.
+  Future<void> assertHasAssist(String expected,
+      {Map<String, List<String>> additionallyChangedFiles}) async {
+    _setSelection();
+    Assist assist = await _assertHasAssist();
+    _change = assist.change;
+    expect(_change.id, kind.id);
+    // apply to "file"
+    List<SourceFileEdit> fileEdits = _change.edits;
+    if (additionallyChangedFiles == null) {
+      expect(fileEdits, hasLength(1));
+      _resultCode = SourceEdit.applySequence(testCode, _change.edits[0].edits);
+      expect(_resultCode, expected);
+    } else {
+      expect(fileEdits, hasLength(additionallyChangedFiles.length + 1));
+      _resultCode = SourceEdit.applySequence(
+          testCode, _change.getFileEdit(testFile).edits);
+      expect(_resultCode, expected);
+      for (String filePath in additionallyChangedFiles.keys) {
+        List<String> pair = additionallyChangedFiles[filePath];
+        String resultCode = SourceEdit.applySequence(
+            pair[0], _change.getFileEdit(filePath).edits);
+        expect(resultCode, pair[1]);
+      }
+    }
+  }
+
+  /// Asserts that there is an [Assist] of the given [kind] at the offset of the
+  /// given [snippet] which produces the [expected] code when applied to [testCode].
+  Future<void> assertHasAssistAt(String snippet, String expected,
+      {int length = 0}) async {
+    _offset = findOffset(snippet);
+    _length = length;
+    Assist assist = await _assertHasAssist();
+    _change = assist.change;
+    expect(_change.id, kind.id);
+    // apply to "file"
+    List<SourceFileEdit> fileEdits = _change.edits;
+    expect(fileEdits, hasLength(1));
+    _resultCode = SourceEdit.applySequence(testCode, _change.edits[0].edits);
+    expect(_resultCode, expected);
+  }
+
+  void assertLinkedGroup(int groupIndex, List<String> expectedStrings,
+      [List<LinkedEditSuggestion> expectedSuggestions]) {
+    LinkedEditGroup group = _change.linkedEditGroups[groupIndex];
+    List<Position> expectedPositions = _findResultPositions(expectedStrings);
+    expect(group.positions, unorderedEquals(expectedPositions));
+    if (expectedSuggestions != null) {
+      expect(group.suggestions, unorderedEquals(expectedSuggestions));
+    }
+  }
+
+  /// Asserts that there is no [Assist] of the given [kind] at [_offset].
+  Future<void> assertNoAssist() async {
+    _setSelection();
+    List<Assist> assists = await _computeAssists();
+    for (Assist assist in assists) {
+      if (assist.kind == kind) {
+        fail('Unexpected assist $kind in\n${assists.join('\n')}');
+      }
+    }
+  }
+
+  /// Asserts that there is no [Assist] of the given [kind] at the offset of the
+  /// given [snippet].
+  Future<void> assertNoAssistAt(String snippet, {int length = 0}) async {
+    _offset = findOffset(snippet);
+    _length = length;
+    List<Assist> assists = await _computeAssists();
+    for (Assist assist in assists) {
+      if (assist.kind == kind) {
+        fail('Unexpected assist $kind in\n${assists.join('\n')}');
+      }
+    }
+  }
+
+  List<LinkedEditSuggestion> expectedSuggestions(
+      LinkedEditSuggestionKind kind, List<String> values) {
+    return values.map((value) {
+      return new LinkedEditSuggestion(value, kind);
+    }).toList();
+  }
+
+  /// Computes assists and verifies that there is an assist of the given kind.
+  Future<Assist> _assertHasAssist() async {
+    List<Assist> assists = await _computeAssists();
+    for (Assist assist in assists) {
+      if (assist.kind == kind) {
+        return assist;
+      }
+    }
+    fail('Expected to find assist $kind in\n${assists.join('\n')}');
+  }
+
+  Future<List<Assist>> _computeAssists() async {
+    var context = new DartAssistContextImpl(
+      workspace,
+      testAnalysisResult,
+      _offset,
+      _length,
+    );
+    var processor = new AssistProcessor(context);
+    return await processor.compute();
+  }
+
+  List<Position> _findResultPositions(List<String> searchStrings) {
+    List<Position> positions = <Position>[];
+    for (String search in searchStrings) {
+      int offset = _resultCode.indexOf(search);
+      positions.add(new Position(testFile, offset));
+    }
+    return positions;
+  }
+
+  void _setSelection() {
+    _offset = testCode.indexOf('/*caret*/');
+    if (_offset >= 0) {
+      _offset += '/*caret*/'.length;
+      _length = 0;
+    } else {
+      _offset = testCode.indexOf('// start\n');
+      if (_offset >= 0) {
+        _offset += '// start\n'.length;
+        _length = testCode.indexOf('// end') - _offset;
+      } else {
+        _offset = 0;
+        _length = 0;
+      }
+    }
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_class_to_mixin_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_class_to_mixin_test.dart
new file mode 100644
index 0000000..d2dd242
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_class_to_mixin_test.dart
@@ -0,0 +1,418 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertClassToMixinTest);
+  });
+}
+
+@reflectiveTest
+class ConvertClassToMixinTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_CLASS_TO_MIXIN;
+
+  test_abstract() async {
+    await resolveTestUnit('''
+abstract class A {}
+''');
+    await assertHasAssistAt('A', '''
+mixin A {}
+''');
+  }
+
+  test_extends_noSuper() async {
+    await resolveTestUnit('''
+class A {}
+class B extends A {}
+''');
+    await assertHasAssistAt('B', '''
+class A {}
+mixin B implements A {}
+''');
+  }
+
+  test_extends_super() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B extends A {
+  b() {
+    super.a();
+  }
+}
+''');
+    await assertHasAssistAt('B', '''
+class A {
+  a() {}
+}
+mixin B on A {
+  b() {
+    super.a();
+  }
+}
+''');
+  }
+
+  test_extends_superSuper() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B extends A {}
+class C extends B {
+  c() {
+    super.a();
+  }
+}
+''');
+    await assertHasAssistAt('C', '''
+class A {
+  a() {}
+}
+class B extends A {}
+mixin C on B {
+  c() {
+    super.a();
+  }
+}
+''');
+  }
+
+  test_extendsImplements_noSuper() async {
+    await resolveTestUnit('''
+class A {}
+class B {}
+class C extends A implements B {}
+''');
+    await assertHasAssistAt('C', '''
+class A {}
+class B {}
+mixin C implements A, B {}
+''');
+  }
+
+  test_extendsImplements_super_extends() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B {}
+class C extends A implements B {
+  c() {
+    super.a();
+  }
+}
+''');
+    await assertHasAssistAt('C', '''
+class A {
+  a() {}
+}
+class B {}
+mixin C on A implements B {
+  c() {
+    super.a();
+  }
+}
+''');
+  }
+
+  test_extendsWith_noSuper() async {
+    await resolveTestUnit('''
+class A {}
+class B {}
+class C extends A with B {}
+''');
+    await assertHasAssistAt('C', '''
+class A {}
+class B {}
+mixin C implements A, B {}
+''');
+  }
+
+  test_extendsWith_super_both() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C extends A with B {
+  c() {
+    super.a();
+    super.b();
+  }
+}
+''');
+    await assertHasAssistAt('C', '''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+mixin C on A, B {
+  c() {
+    super.a();
+    super.b();
+  }
+}
+''');
+  }
+
+  test_extendsWith_super_extends() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C extends A with B {
+  c() {
+    super.a();
+  }
+}
+''');
+    await assertHasAssistAt('C', '''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+mixin C on A implements B {
+  c() {
+    super.a();
+  }
+}
+''');
+  }
+
+  test_extendsWith_super_with() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C extends A with B {
+  c() {
+    super.b();
+  }
+}
+''');
+    await assertHasAssistAt('C', '''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+mixin C on B implements A {
+  c() {
+    super.b();
+  }
+}
+''');
+  }
+
+  test_extendsWithImplements_noSuper() async {
+    await resolveTestUnit('''
+class A {}
+class B {}
+class C {}
+class D extends A with B implements C {}
+''');
+    await assertHasAssistAt('D', '''
+class A {}
+class B {}
+class C {}
+mixin D implements A, B, C {}
+''');
+  }
+
+  test_extendsWithImplements_super_both() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C {}
+class D extends A with B implements C {
+  d() {
+    super.a();
+    super.b();
+  }
+}
+''');
+    await assertHasAssistAt('D', '''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C {}
+mixin D on A, B implements C {
+  d() {
+    super.a();
+    super.b();
+  }
+}
+''');
+  }
+
+  test_extendsWithImplements_super_extends() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C {}
+class D extends A with B implements C {
+  d() {
+    super.a();
+  }
+}
+''');
+    await assertHasAssistAt('D', '''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C {}
+mixin D on A implements B, C {
+  d() {
+    super.a();
+  }
+}
+''');
+  }
+
+  test_extendsWithImplements_super_with() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C {}
+class D extends A with B implements C {
+  d() {
+    super.b();
+  }
+}
+''');
+    await assertHasAssistAt('D', '''
+class A {
+  a() {}
+}
+class B {
+  b() {}
+}
+class C {}
+mixin D on B implements A, C {
+  d() {
+    super.b();
+  }
+}
+''');
+  }
+
+  test_implements() async {
+    await resolveTestUnit('''
+class A {}
+class B implements A {}
+''');
+    await assertHasAssistAt('B', '''
+class A {}
+mixin B implements A {}
+''');
+  }
+
+  test_noClauses_invalidSelection() async {
+    await resolveTestUnit('''
+class A {}
+''');
+    await assertNoAssistAt('{}');
+  }
+
+  test_noClauses_selectKeyword() async {
+    await resolveTestUnit('''
+class A {}
+''');
+    await assertHasAssistAt('class', '''
+mixin A {}
+''');
+  }
+
+  test_noClauses_selectName() async {
+    await resolveTestUnit('''
+class A {}
+''');
+    await assertHasAssistAt('A', '''
+mixin A {}
+''');
+  }
+
+  test_typeParameters() async {
+    await resolveTestUnit('''
+class A<T> {}
+''');
+    await assertHasAssistAt('A', '''
+mixin A<T> {}
+''');
+  }
+
+  test_with_noSuper() async {
+    await resolveTestUnit('''
+class A {}
+class B with A {}
+''');
+    await assertHasAssistAt('B', '''
+class A {}
+mixin B implements A {}
+''');
+  }
+
+  test_with_super() async {
+    await resolveTestUnit('''
+class A {
+  a() {}
+}
+class B with A {
+  b() {
+    super.a();
+  }
+}
+''');
+    await assertHasAssistAt('B', '''
+class A {
+  a() {}
+}
+mixin B on A {
+  b() {
+    super.a();
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_documentation_into_block_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_documentation_into_block_test.dart
new file mode 100644
index 0000000..895f645
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_documentation_into_block_test.dart
@@ -0,0 +1,96 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertDocumentationIntoBlockTest);
+  });
+}
+
+@reflectiveTest
+class ConvertDocumentationIntoBlockTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_DOCUMENTATION_INTO_BLOCK;
+
+  test_alreadyBlock() async {
+    await resolveTestUnit('''
+/**
+ * AAAAAAA
+ */
+class A {}
+''');
+    await assertNoAssistAt('AAA');
+  }
+
+  test_noSpaceBeforeText() async {
+    await resolveTestUnit('''
+class A {
+  /// AAAAA
+  ///BBBBB
+  ///
+  /// CCCCC
+  mmm() {}
+}
+''');
+    await assertHasAssistAt('AAAAA', '''
+class A {
+  /**
+   * AAAAA
+   *BBBBB
+   *
+   * CCCCC
+   */
+  mmm() {}
+}
+''');
+  }
+
+  test_notDocumentation() async {
+    await resolveTestUnit('''
+// AAAA
+class A {}
+''');
+    await assertNoAssistAt('AAA');
+  }
+
+  test_onReference() async {
+    await resolveTestUnit('''
+/// AAAAAAA [int] AAAAAAA
+class A {}
+''');
+    await assertHasAssistAt('nt]', '''
+/**
+ * AAAAAAA [int] AAAAAAA
+ */
+class A {}
+''');
+  }
+
+  test_onText() async {
+    await resolveTestUnit('''
+class A {
+  /// AAAAAAA [int] AAAAAAA
+  /// BBBBBBBB BBBB BBBB
+  /// CCC [A] CCCCCCCCCCC
+  mmm() {}
+}
+''');
+    await assertHasAssistAt('AAA [', '''
+class A {
+  /**
+   * AAAAAAA [int] AAAAAAA
+   * BBBBBBBB BBBB BBBB
+   * CCC [A] CCCCCCCCCCC
+   */
+  mmm() {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_documentation_into_line_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_documentation_into_line_test.dart
new file mode 100644
index 0000000..535bf55
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_documentation_into_line_test.dart
@@ -0,0 +1,112 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertDocumentationIntoLineTest);
+  });
+}
+
+@reflectiveTest
+class ConvertDocumentationIntoLineTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_DOCUMENTATION_INTO_LINE;
+
+  test_alreadyLine() async {
+    await resolveTestUnit('''
+/// AAAAAAA
+class A {}
+''');
+    await assertNoAssistAt('AAA');
+  }
+
+  test_hasEmptyLine() async {
+    await resolveTestUnit('''
+class A {
+  /**
+   * AAAAAAA [int] AAAAAAA
+   *
+   * BBBBBBBB BBBB BBBB
+   */
+  mmm() {}
+}
+''');
+    await assertHasAssistAt('AAA [', '''
+class A {
+  /// AAAAAAA [int] AAAAAAA
+  ///
+  /// BBBBBBBB BBBB BBBB
+  mmm() {}
+}
+''');
+  }
+
+  test_notDocumentation() async {
+    await resolveTestUnit('''
+/* AAAA */
+class A {}
+''');
+    await assertNoAssistAt('AAA');
+  }
+
+  test_onReference() async {
+    await resolveTestUnit('''
+/**
+ * AAAAAAA [int] AAAAAAA
+ */
+class A {}
+''');
+    await assertHasAssistAt('nt]', '''
+/// AAAAAAA [int] AAAAAAA
+class A {}
+''');
+  }
+
+  test_onText() async {
+    await resolveTestUnit('''
+class A {
+  /**
+   * AAAAAAA [int] AAAAAAA
+   * BBBBBBBB BBBB BBBB
+   * CCC [A] CCCCCCCCCCC
+   */
+  mmm() {}
+}
+''');
+    await assertHasAssistAt('AAA [', '''
+class A {
+  /// AAAAAAA [int] AAAAAAA
+  /// BBBBBBBB BBBB BBBB
+  /// CCC [A] CCCCCCCCCCC
+  mmm() {}
+}
+''');
+  }
+
+  test_onText_hasFirstLine() async {
+    await resolveTestUnit('''
+class A {
+  /** AAAAAAA [int] AAAAAAA
+   * BBBBBBBB BBBB BBBB
+   * CCC [A] CCCCCCCCCCC
+   */
+  mmm() {}
+}
+''');
+    await assertHasAssistAt('AAA [', '''
+class A {
+  /// AAAAAAA [int] AAAAAAA
+  /// BBBBBBBB BBBB BBBB
+  /// CCC [A] CCCCCCCCCCC
+  mmm() {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_async_body_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_async_body_test.dart
new file mode 100644
index 0000000..170a3c4
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_async_body_test.dart
@@ -0,0 +1,149 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoAsyncBodyTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoAsyncBodyTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_ASYNC_BODY;
+
+  test_async() async {
+    await resolveTestUnit('''
+import 'dart:async';
+Future<String> f() async => '';
+''');
+    await assertNoAssistAt('=>');
+  }
+
+  test_asyncStar() async {
+    await resolveTestUnit('''
+import 'dart:async';
+Stream<String> f() async* {}
+''');
+    await assertNoAssistAt('{}');
+  }
+
+  test_closure() async {
+    await resolveTestUnit('''
+main() {
+  f(() => 123);
+}
+f(g) {}
+''');
+    await assertHasAssistAt('=>', '''
+main() {
+  f(() async => 123);
+}
+f(g) {}
+''');
+  }
+
+  test_constructor() async {
+    await resolveTestUnit('''
+class C {
+  C() {}
+}
+''');
+    await assertNoAssistAt('{}');
+  }
+
+  test_function() async {
+    await resolveTestUnit('''
+String f() => '';
+''');
+    await assertHasAssistAt('=>', '''
+Future<String> f() async => '';
+''');
+  }
+
+  test_getter_expression_noSpace() async {
+    await resolveTestUnit('''
+class C {
+  int get g=>0;
+}
+''');
+    await assertHasAssistAt('get g', '''
+class C {
+  Future<int> get g async =>0;
+}
+''');
+  }
+
+  test_inBody_block() async {
+    await resolveTestUnit('''
+class C {
+  void foo() {
+    print(42);
+  }
+}
+''');
+    await assertNoAssistAt('print');
+  }
+
+  test_inBody_expression() async {
+    await resolveTestUnit('''
+class C {
+  void foo() => print(42);
+}
+''');
+    await assertNoAssistAt('print');
+  }
+
+  test_method() async {
+    await resolveTestUnit('''
+class C {
+  int m() { return 0; }
+}
+''');
+    await assertHasAssistAt('{ return', '''
+class C {
+  Future<int> m() async { return 0; }
+}
+''');
+  }
+
+  test_method_abstract() async {
+    await resolveTestUnit('''
+abstract class C {
+  int m();
+}
+''');
+    await assertHasAssistAt('m()', '''
+abstract class C {
+  Future<int> m();
+}
+''');
+  }
+
+  test_method_noReturnType() async {
+    await resolveTestUnit('''
+class C {
+  m() { return 0; }
+}
+''');
+    await assertHasAssistAt('{ return', '''
+class C {
+  m() async { return 0; }
+}
+''');
+  }
+
+  test_syncStar() async {
+    await resolveTestUnit('''
+Iterable<String> f() sync* {}
+''');
+    await assertNoAssistAt('{}');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_block_body_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_block_body_test.dart
new file mode 100644
index 0000000..4d3fa9c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_block_body_test.dart
@@ -0,0 +1,162 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoBlockBodyTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoBlockBodyTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_BLOCK_BODY;
+
+  test_async() async {
+    await resolveTestUnit('''
+class A {
+  mmm() async => 123;
+}
+''');
+    await assertHasAssistAt('mmm()', '''
+class A {
+  mmm() async {
+    return 123;
+  }
+}
+''');
+  }
+
+  test_closure() async {
+    await resolveTestUnit('''
+setup(x) {}
+main() {
+  setup(() => 42);
+}
+''');
+    await assertHasAssistAt('() => 42', '''
+setup(x) {}
+main() {
+  setup(() {
+    return 42;
+  });
+}
+''');
+    assertExitPosition(after: '42;');
+  }
+
+  test_closure_voidExpression() async {
+    await resolveTestUnit('''
+setup(x) {}
+main() {
+  setup(() => print('done'));
+}
+''');
+    await assertHasAssistAt('() => print', '''
+setup(x) {}
+main() {
+  setup(() {
+    print('done');
+  });
+}
+''');
+    assertExitPosition(after: "');");
+  }
+
+  test_constructor() async {
+    await resolveTestUnit('''
+class A {
+  factory A() => null;
+}
+''');
+    await assertHasAssistAt('A()', '''
+class A {
+  factory A() {
+    return null;
+  }
+}
+''');
+  }
+
+  test_inExpression() async {
+    await resolveTestUnit('''
+main() => 123;
+''');
+    await assertNoAssistAt('123;');
+  }
+
+  test_method() async {
+    await resolveTestUnit('''
+class A {
+  mmm() => 123;
+}
+''');
+    await assertHasAssistAt('mmm()', '''
+class A {
+  mmm() {
+    return 123;
+  }
+}
+''');
+  }
+
+  test_noEnclosingFunction() async {
+    await resolveTestUnit('''
+var v = 123;
+''');
+    await assertNoAssistAt('v =');
+  }
+
+  test_notExpressionBlock() async {
+    await resolveTestUnit('''
+fff() {
+  return 123;
+}
+''');
+    await assertNoAssistAt('fff() {');
+  }
+
+  test_onArrow() async {
+    await resolveTestUnit('''
+fff() => 123;
+''');
+    await assertHasAssistAt('=>', '''
+fff() {
+  return 123;
+}
+''');
+  }
+
+  test_onName() async {
+    await resolveTestUnit('''
+fff() => 123;
+''');
+    await assertHasAssistAt('fff()', '''
+fff() {
+  return 123;
+}
+''');
+  }
+
+  test_throw() async {
+    await resolveTestUnit('''
+class A {
+  mmm() => throw 'error';
+}
+''');
+    await assertHasAssistAt('mmm()', '''
+class A {
+  mmm() {
+    throw 'error';
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_expression_body_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_expression_body_test.dart
new file mode 100644
index 0000000..cb7e2e2
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_expression_body_test.dart
@@ -0,0 +1,184 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoExpressionBodyTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoExpressionBodyTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_EXPRESSION_BODY;
+
+  test_already() async {
+    await resolveTestUnit('''
+fff() => 42;
+''');
+    await assertNoAssistAt('fff()');
+  }
+
+  test_async() async {
+    await resolveTestUnit('''
+class A {
+  mmm() async {
+    return 42;
+  }
+}
+''');
+    await assertHasAssistAt('mmm', '''
+class A {
+  mmm() async => 42;
+}
+''');
+  }
+
+  test_closure() async {
+    await resolveTestUnit('''
+setup(x) {}
+main() {
+  setup(() {
+    return 42;
+  });
+}
+''');
+    await assertHasAssistAt('return', '''
+setup(x) {}
+main() {
+  setup(() => 42);
+}
+''');
+  }
+
+  test_closure_voidExpression() async {
+    await resolveTestUnit('''
+setup(x) {}
+main() {
+  setup((_) {
+    print('test');
+  });
+}
+''');
+    await assertHasAssistAt('(_) {', '''
+setup(x) {}
+main() {
+  setup((_) => print('test'));
+}
+''');
+  }
+
+  test_constructor() async {
+    await resolveTestUnit('''
+class A {
+  factory A() {
+    return null;
+  }
+}
+''');
+    await assertHasAssistAt('A()', '''
+class A {
+  factory A() => null;
+}
+''');
+  }
+
+  test_function_onBlock() async {
+    await resolveTestUnit('''
+fff() {
+  return 42;
+}
+''');
+    await assertHasAssistAt('{', '''
+fff() => 42;
+''');
+  }
+
+  test_function_onName() async {
+    await resolveTestUnit('''
+fff() {
+  return 42;
+}
+''');
+    await assertHasAssistAt('ff()', '''
+fff() => 42;
+''');
+  }
+
+  test_inExpression() async {
+    await resolveTestUnit('''
+main() {
+  return 42;
+}
+''');
+    await assertNoAssistAt('42;');
+  }
+
+  test_method_onBlock() async {
+    await resolveTestUnit('''
+class A {
+  m() { // marker
+    return 42;
+  }
+}
+''');
+    await assertHasAssistAt('{ // marker', '''
+class A {
+  m() => 42;
+}
+''');
+  }
+
+  test_moreThanOneStatement() async {
+    await resolveTestUnit('''
+fff() {
+  var v = 42;
+  return v;
+}
+''');
+    await assertNoAssistAt('fff()');
+  }
+
+  test_noEnclosingFunction() async {
+    await resolveTestUnit('''
+var V = 42;
+''');
+    await assertNoAssistAt('V = ');
+  }
+
+  test_noReturn() async {
+    await resolveTestUnit('''
+fff() {
+  var v = 42;
+}
+''');
+    await assertNoAssistAt('fff()');
+  }
+
+  test_noReturnValue() async {
+    await resolveTestUnit('''
+fff() {
+  return;
+}
+''');
+    await assertNoAssistAt('fff()');
+  }
+
+  test_topFunction_onReturnStatement() async {
+    await resolveTestUnit('''
+fff() {
+  return 42;
+}
+''');
+    await assertHasAssistAt('return', '''
+fff() => 42;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_final_field_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_final_field_test.dart
new file mode 100644
index 0000000..4fa51fa
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_final_field_test.dart
@@ -0,0 +1,194 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoFinalFieldTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoFinalFieldTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_FINAL_FIELD;
+
+  test_blockBody_onlyReturnStatement() async {
+    await resolveTestUnit('''
+class A {
+  int get foo {
+    return 1 + 2;
+  }
+}
+''');
+    await assertHasAssistAt('get foo', '''
+class A {
+  final int foo = 1 + 2;
+}
+''');
+  }
+
+  test_hasOverride() async {
+    await resolveTestUnit('''
+const myAnnotation = const Object();
+class A {
+  @myAnnotation
+  int get foo => 42;
+}
+''');
+    await assertHasAssistAt('get foo', '''
+const myAnnotation = const Object();
+class A {
+  @myAnnotation
+  final int foo = 42;
+}
+''');
+  }
+
+  test_hasSetter_inSuper() async {
+    await resolveTestUnit('''
+class A {
+  void set foo(_) {}
+}
+class B extends A {
+  int get foo => null;
+}
+''');
+    await assertHasAssistAt('get foo', '''
+class A {
+  void set foo(_) {}
+}
+class B extends A {
+  final int foo;
+}
+''');
+  }
+
+  test_hasSetter_inThisClass() async {
+    await resolveTestUnit('''
+class A {
+  int get foo => null;
+  void set foo(_) {}
+}
+''');
+    await assertNoAssistAt('get foo');
+  }
+
+  test_noReturnType() async {
+    await resolveTestUnit('''
+class A {
+  get foo => 42;
+}
+''');
+    await assertHasAssistAt('get foo', '''
+class A {
+  final foo = 42;
+}
+''');
+  }
+
+  test_noReturnType_static() async {
+    await resolveTestUnit('''
+class A {
+  static get foo => 42;
+}
+''');
+    await assertHasAssistAt('get foo', '''
+class A {
+  static final foo = 42;
+}
+''');
+  }
+
+  test_notExpressionBody() async {
+    await resolveTestUnit('''
+class A {
+  int get foo {
+    int v = 1 + 2;
+    return v + 3;
+  }
+}
+''');
+    await assertNoAssistAt('get foo');
+  }
+
+  test_notGetter() async {
+    await resolveTestUnit('''
+class A {
+  int foo() => 42;
+}
+''');
+    await assertNoAssistAt('foo');
+  }
+
+  test_notNull() async {
+    await resolveTestUnit('''
+class A {
+  int get foo => 1 + 2;
+}
+''');
+    await assertHasAssistAt('get foo', '''
+class A {
+  final int foo = 1 + 2;
+}
+''');
+  }
+
+  test_null() async {
+    await resolveTestUnit('''
+class A {
+  int get foo => null;
+}
+''');
+    await assertHasAssistAt('get foo', '''
+class A {
+  final int foo;
+}
+''');
+  }
+
+  test_onName() async {
+    await resolveTestUnit('''
+class A {
+  int get foo => 42;
+}
+''');
+    await assertHasAssistAt('foo', '''
+class A {
+  final int foo = 42;
+}
+''');
+  }
+
+  test_onReturnType_parameterized() async {
+    await resolveTestUnit('''
+class A {
+  List<int> get foo => null;
+}
+''');
+    await assertHasAssistAt('nt> get', '''
+class A {
+  final List<int> foo;
+}
+''');
+  }
+
+  test_onReturnType_simple() async {
+    await resolveTestUnit('''
+class A {
+  int get foo => 42;
+}
+''');
+    await assertHasAssistAt('int get', '''
+class A {
+  final int foo = 42;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_for_index_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_for_index_test.dart
new file mode 100644
index 0000000..5816d3a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_for_index_test.dart
@@ -0,0 +1,168 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoForIndexTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoForIndexTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_FOR_INDEX;
+
+  test_bodyNotBlock() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) print(item);
+}
+''');
+    await assertNoAssistAt('for (String');
+  }
+
+  test_doesNotDeclareVariable() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  String item;
+  for (item in items) {
+    print(item);
+  }
+}
+''');
+    await assertNoAssistAt('for (item');
+  }
+
+  test_iterableIsNotVariable() async {
+    await resolveTestUnit('''
+main() {
+  for (String item in ['a', 'b', 'c']) {
+    print(item);
+  }
+}
+''');
+    await assertNoAssistAt('for (String');
+  }
+
+  test_iterableNotList() async {
+    await resolveTestUnit('''
+main(Iterable<String> items) {
+  for (String item in items) {
+    print(item);
+  }
+}
+''');
+    await assertNoAssistAt('for (String');
+  }
+
+  test_onDeclaredIdentifier_name() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) {
+    print(item);
+  }
+}
+''');
+    await assertHasAssistAt('item in', '''
+main(List<String> items) {
+  for (int i = 0; i < items.length; i++) {
+    String item = items[i];
+    print(item);
+  }
+}
+''');
+  }
+
+  test_onDeclaredIdentifier_type() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) {
+    print(item);
+  }
+}
+''');
+    await assertHasAssistAt('tring item', '''
+main(List<String> items) {
+  for (int i = 0; i < items.length; i++) {
+    String item = items[i];
+    print(item);
+  }
+}
+''');
+  }
+
+  test_onFor() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) {
+    print(item);
+  }
+}
+''');
+    await assertHasAssistAt('for (String', '''
+main(List<String> items) {
+  for (int i = 0; i < items.length; i++) {
+    String item = items[i];
+    print(item);
+  }
+}
+''');
+  }
+
+  test_usesI() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) {
+    int i = 0;
+  }
+}
+''');
+    await assertHasAssistAt('for (String', '''
+main(List<String> items) {
+  for (int j = 0; j < items.length; j++) {
+    String item = items[j];
+    int i = 0;
+  }
+}
+''');
+  }
+
+  test_usesIJ() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) {
+    print(item);
+    int i = 0, j = 1;
+  }
+}
+''');
+    await assertHasAssistAt('for (String', '''
+main(List<String> items) {
+  for (int k = 0; k < items.length; k++) {
+    String item = items[k];
+    print(item);
+    int i = 0, j = 1;
+  }
+}
+''');
+  }
+
+  test_usesIJK() async {
+    await resolveTestUnit('''
+main(List<String> items) {
+  for (String item in items) {
+    print(item);
+    int i, j, k;
+  }
+}
+''');
+    await assertNoAssistAt('for (String');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_generic_function_syntax_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_generic_function_syntax_test.dart
new file mode 100644
index 0000000..e9b034e
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_generic_function_syntax_test.dart
@@ -0,0 +1,103 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoGenericFunctionSyntaxTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoGenericFunctionSyntaxTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_GENERIC_FUNCTION_SYNTAX;
+
+  test_functionTypeAlias_insideParameterList() async {
+    await resolveTestUnit('''
+typedef String F(int x, int y);
+''');
+    await assertNoAssistAt('x,');
+  }
+
+  test_functionTypeAlias_noParameterTypes() async {
+    await resolveTestUnit('''
+typedef String F(x);
+''');
+    await assertNoAssistAt('def');
+  }
+
+  test_functionTypeAlias_noReturnType_noTypeParameters() async {
+    await resolveTestUnit('''
+typedef String F(int x);
+''');
+    await assertHasAssistAt('def', '''
+typedef F = String Function(int x);
+''');
+  }
+
+  test_functionTypeAlias_noReturnType_typeParameters() async {
+    await resolveTestUnit('''
+typedef F<P, R>(P x);
+''');
+    await assertHasAssistAt('def', '''
+typedef F<P, R> = Function(P x);
+''');
+  }
+
+  test_functionTypeAlias_returnType_noTypeParameters() async {
+    await resolveTestUnit('''
+typedef String F(int x);
+''');
+    await assertHasAssistAt('def', '''
+typedef F = String Function(int x);
+''');
+  }
+
+  test_functionTypeAlias_returnType_typeParameters() async {
+    await resolveTestUnit('''
+typedef R F<P, R>(P x);
+''');
+    await assertHasAssistAt('def', '''
+typedef F<P, R> = R Function(P x);
+''');
+  }
+
+  test_functionTypedParameter_insideParameterList() async {
+    await resolveTestUnit('''
+g(String f(int x, int y)) {}
+''');
+    await assertNoAssistAt('x,');
+  }
+
+  test_functionTypedParameter_noParameterTypes() async {
+    await resolveTestUnit('''
+g(String f(x)) {}
+''');
+    await assertNoAssistAt('f(');
+  }
+
+  test_functionTypedParameter_noReturnType_noTypeParameters() async {
+    await resolveTestUnit('''
+g(f(int x)) {}
+''');
+    await assertHasAssistAt('f(', '''
+g(Function(int x) f) {}
+''');
+  }
+
+  test_functionTypedParameter_returnType() async {
+    await resolveTestUnit('''
+g(String f(int x)) {}
+''');
+    await assertHasAssistAt('f(', '''
+g(String Function(int x) f) {}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_getter_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_getter_test.dart
new file mode 100644
index 0000000..f3348c2
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_getter_test.dart
@@ -0,0 +1,79 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoGetterTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoGetterTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_GETTER;
+
+  test_noInitializer() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+class A {
+  final int foo;
+}
+''');
+    await assertNoAssistAt('foo');
+  }
+
+  test_notFinal() async {
+    await resolveTestUnit('''
+class A {
+  int foo = 1;
+}
+''');
+    await assertNoAssistAt('foo');
+  }
+
+  test_notSingleField() async {
+    await resolveTestUnit('''
+class A {
+  final int foo = 1, bar = 2;
+}
+''');
+    await assertNoAssistAt('foo');
+  }
+
+  test_noType() async {
+    await resolveTestUnit('''
+class A {
+  final foo = 42;
+}
+''');
+    await assertHasAssistAt('foo =', '''
+class A {
+  get foo => 42;
+}
+''');
+  }
+
+  test_type() async {
+    await resolveTestUnit('''
+const myAnnotation = const Object();
+class A {
+  @myAnnotation
+  final int foo = 1 + 2;
+}
+''');
+    await assertHasAssistAt('foo =', '''
+const myAnnotation = const Object();
+class A {
+  @myAnnotation
+  int get foo => 1 + 2;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_is_not_empty_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_is_not_empty_test.dart
new file mode 100644
index 0000000..cd522a7
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_is_not_empty_test.dart
@@ -0,0 +1,100 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoIsNotEmptyTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoIsNotEmptyTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_IS_NOT_EMPTY;
+
+  test_noBang() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+main(String str) {
+  ~str.isEmpty;
+}
+''');
+    await assertNoAssistAt('isEmpty;');
+  }
+
+  test_noIsNotEmpty() async {
+    await resolveTestUnit('''
+class A {
+  bool get isEmpty => false;
+}
+main(A a) {
+  !a.isEmpty;
+}
+''');
+    await assertNoAssistAt('isEmpty;');
+  }
+
+  test_notInPrefixExpression() async {
+    await resolveTestUnit('''
+main(String str) {
+  str.isEmpty;
+}
+''');
+    await assertNoAssistAt('isEmpty;');
+  }
+
+  test_notIsEmpty() async {
+    await resolveTestUnit('''
+main(int p) {
+  !p.isEven;
+}
+''');
+    await assertNoAssistAt('isEven;');
+  }
+
+  test_on_isEmpty() async {
+    await resolveTestUnit('''
+main(String str) {
+  !str.isEmpty;
+}
+''');
+    await assertHasAssistAt('isEmpty', '''
+main(String str) {
+  str.isNotEmpty;
+}
+''');
+  }
+
+  test_on_str() async {
+    await resolveTestUnit('''
+main(String str) {
+  !str.isEmpty;
+}
+''');
+    await assertHasAssistAt('str.', '''
+main(String str) {
+  str.isNotEmpty;
+}
+''');
+  }
+
+  test_propertyAccess() async {
+    await resolveTestUnit('''
+main(String str) {
+  !'text'.isEmpty;
+}
+''');
+    await assertHasAssistAt('isEmpty', '''
+main(String str) {
+  'text'.isNotEmpty;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_is_not_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_is_not_test.dart
new file mode 100644
index 0000000..f7e1ae1
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_is_not_test.dart
@@ -0,0 +1,195 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoIsNotTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoIsNotTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_IS_NOT;
+
+  test_childOfIs_left() async {
+    await resolveTestUnit('''
+main(p) {
+  !(p is String);
+}
+''');
+    await assertHasAssistAt('p is', '''
+main(p) {
+  p is! String;
+}
+''');
+  }
+
+  test_childOfIs_right() async {
+    await resolveTestUnit('''
+main(p) {
+  !(p is String);
+}
+''');
+    await assertHasAssistAt('String)', '''
+main(p) {
+  p is! String;
+}
+''');
+  }
+
+  test_is() async {
+    await resolveTestUnit('''
+main(p) {
+  !(p is String);
+}
+''');
+    await assertHasAssistAt('is String', '''
+main(p) {
+  p is! String;
+}
+''');
+  }
+
+  test_is_alreadyIsNot() async {
+    await resolveTestUnit('''
+main(p) {
+  p is! String;
+}
+''');
+    await assertNoAssistAt('is!');
+  }
+
+  test_is_higherPrecedencePrefix() async {
+    await resolveTestUnit('''
+main(p) {
+  !!(p is String);
+}
+''');
+    await assertHasAssistAt('is String', '''
+main(p) {
+  !(p is! String);
+}
+''');
+  }
+
+  test_is_noEnclosingParenthesis() async {
+    await resolveTestUnit('''
+main(p) {
+  p is String;
+}
+''');
+    await assertNoAssistAt('is String');
+  }
+
+  test_is_noPrefix() async {
+    await resolveTestUnit('''
+main(p) {
+  (p is String);
+}
+''');
+    await assertNoAssistAt('is String');
+  }
+
+  test_is_not_higherPrecedencePrefix() async {
+    await resolveTestUnit('''
+main(p) {
+  !!(p is String);
+}
+''');
+    await assertHasAssistAt('!(p', '''
+main(p) {
+  !(p is! String);
+}
+''');
+  }
+
+  test_is_notIsExpression() async {
+    await resolveTestUnit('''
+main(p) {
+  123 + 456;
+}
+''');
+    await assertNoAssistAt('123 +');
+  }
+
+  test_is_notTheNotOperator() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+main(p) {
+  ++(p is String);
+}
+''');
+    await assertNoAssistAt('is String');
+  }
+
+  test_not() async {
+    await resolveTestUnit('''
+main(p) {
+  !(p is String);
+}
+''');
+    await assertHasAssistAt('!(p', '''
+main(p) {
+  p is! String;
+}
+''');
+  }
+
+  test_not_alreadyIsNot() async {
+    await resolveTestUnit('''
+main(p) {
+  !(p is! String);
+}
+''');
+    await assertNoAssistAt('!(p');
+  }
+
+  test_not_noEnclosingParenthesis() async {
+    await resolveTestUnit('''
+main(p) {
+  !p;
+}
+''');
+    await assertNoAssistAt('!p');
+  }
+
+  test_not_notIsExpression() async {
+    await resolveTestUnit('''
+main(p) {
+  !(p == null);
+}
+''');
+    await assertNoAssistAt('!(p');
+  }
+
+  test_not_notTheNotOperator() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+main(p) {
+  ++(p is String);
+}
+''');
+    await assertNoAssistAt('++(');
+  }
+
+  test_parentheses() async {
+    await resolveTestUnit('''
+main(p) {
+  !(p is String);
+}
+''');
+    await assertHasAssistAt('(p is', '''
+main(p) {
+  p is! String;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_part_of_to_uri_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_part_of_to_uri_test.dart
new file mode 100644
index 0000000..0dc747a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_part_of_to_uri_test.dart
@@ -0,0 +1,49 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertPartOfToUriTest);
+  });
+}
+
+@reflectiveTest
+class ConvertPartOfToUriTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_PART_OF_TO_URI;
+
+  test_nonSibling() async {
+    addSource('/home/test/lib/foo.dart', '''
+library foo;
+part 'src/bar.dart';
+''');
+    testFile = convertPath('/home/test/lib/src/bar.dart');
+    await resolveTestUnit('''
+part of foo;
+''');
+    await assertHasAssistAt('foo', '''
+part of '../foo.dart';
+''');
+  }
+
+  test_sibling() async {
+    addSource('/home/test/lib/foo.dart', '''
+library foo;
+part 'bar.dart';
+''');
+    testFile = convertPath('/home/test/lib/bar.dart');
+    await resolveTestUnit('''
+part of foo;
+''');
+    await assertHasAssistAt('foo', '''
+part of 'foo.dart';
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_double_quoted_string_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_double_quoted_string_test.dart
new file mode 100644
index 0000000..5711b07
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_double_quoted_string_test.dart
@@ -0,0 +1,143 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToDoubleQuotedStringTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToDoubleQuotedStringTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_TO_DOUBLE_QUOTED_STRING;
+
+  test_one_embeddedTarget() async {
+    await resolveTestUnit('''
+main() {
+  print('a"b"c');
+}
+''');
+    await assertNoAssistAt("'a");
+  }
+
+  test_one_enclosingTarget() async {
+    await resolveTestUnit('''
+main() {
+  print("abc");
+}
+''');
+    await assertNoAssistAt('"ab');
+  }
+
+  test_one_interpolation() async {
+    await resolveTestUnit(r'''
+main() {
+  var b = 'b';
+  var c = 'c';
+  print('a $b-${c} d');
+}
+''');
+    await assertHasAssistAt(r"'a $b", r'''
+main() {
+  var b = 'b';
+  var c = 'c';
+  print("a $b-${c} d");
+}
+''');
+  }
+
+  test_one_raw() async {
+    await resolveTestUnit('''
+main() {
+  print(r'abc');
+}
+''');
+    await assertHasAssistAt("'ab", '''
+main() {
+  print(r"abc");
+}
+''');
+  }
+
+  test_one_simple() async {
+    await resolveTestUnit('''
+main() {
+  print('abc');
+}
+''');
+    await assertHasAssistAt("'ab", '''
+main() {
+  print("abc");
+}
+''');
+  }
+
+  test_three_embeddedTarget() async {
+    await resolveTestUnit("""
+main() {
+  print('''a""\"c''');
+}
+""");
+    await assertNoAssistAt("'a");
+  }
+
+  test_three_enclosingTarget() async {
+    await resolveTestUnit('''
+main() {
+  print("""abc""");
+}
+''');
+    await assertNoAssistAt('"ab');
+  }
+
+  test_three_interpolation() async {
+    await resolveTestUnit(r"""
+main() {
+  var b = 'b';
+  var c = 'c';
+  print('''a $b-${c} d''');
+}
+""");
+    await assertHasAssistAt(r"'a $b", r'''
+main() {
+  var b = 'b';
+  var c = 'c';
+  print("""a $b-${c} d""");
+}
+''');
+  }
+
+  test_three_raw() async {
+    await resolveTestUnit("""
+main() {
+  print(r'''abc''');
+}
+""");
+    await assertHasAssistAt("'ab", '''
+main() {
+  print(r"""abc""");
+}
+''');
+  }
+
+  test_three_simple() async {
+    await resolveTestUnit("""
+main() {
+  print('''abc''');
+}
+""");
+    await assertHasAssistAt("'ab", '''
+main() {
+  print("""abc""");
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_field_parameter_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_field_parameter_test.dart
new file mode 100644
index 0000000..2cf9958
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_field_parameter_test.dart
@@ -0,0 +1,110 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToFieldParameterTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToFieldParameterTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_TO_FIELD_PARAMETER;
+
+  test_additionalUse() async {
+    await resolveTestUnit('''
+class A {
+  int aaa2;
+  int bbb2;
+  A(int aaa) : aaa2 = aaa, bbb2 = aaa;
+}
+''');
+    await assertNoAssistAt('aaa)');
+  }
+
+  test_firstInitializer() async {
+    await resolveTestUnit('''
+class A {
+  int aaa2;
+  int bbb2;
+  A(int aaa, int bbb) : aaa2 = aaa, bbb2 = bbb;
+}
+''');
+    await assertHasAssistAt('aaa, ', '''
+class A {
+  int aaa2;
+  int bbb2;
+  A(this.aaa2, int bbb) : bbb2 = bbb;
+}
+''');
+  }
+
+  test_notPureAssignment() async {
+    await resolveTestUnit('''
+class A {
+  int aaa2;
+  A(int aaa) : aaa2 = aaa * 2;
+}
+''');
+    await assertNoAssistAt('aaa)');
+  }
+
+  test_onParameterName_inInitializer() async {
+    await resolveTestUnit('''
+class A {
+  int test2;
+  A(int test) : test2 = test {
+  }
+}
+''');
+    await assertHasAssistAt('test {', '''
+class A {
+  int test2;
+  A(this.test2) {
+  }
+}
+''');
+  }
+
+  test_onParameterName_inParameters() async {
+    await resolveTestUnit('''
+class A {
+  int test;
+  A(int test) : test = test {
+  }
+}
+''');
+    await assertHasAssistAt('test)', '''
+class A {
+  int test;
+  A(this.test) {
+  }
+}
+''');
+  }
+
+  test_secondInitializer() async {
+    await resolveTestUnit('''
+class A {
+  int aaa2;
+  int bbb2;
+  A(int aaa, int bbb) : aaa2 = aaa, bbb2 = bbb;
+}
+''');
+    await assertHasAssistAt('bbb)', '''
+class A {
+  int aaa2;
+  int bbb2;
+  A(int aaa, this.bbb2) : aaa2 = aaa;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_int_literal_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_int_literal_test.dart
new file mode 100644
index 0000000..d76730c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_int_literal_test.dart
@@ -0,0 +1,53 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToIntLiteralTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToIntLiteralTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_TO_INT_LITERAL;
+
+  test_decimal() async {
+    await resolveTestUnit('''
+const double myDouble = /*caret*/42.0;
+''');
+    await assertHasAssist('''
+const double myDouble = /*caret*/42;
+''');
+  }
+
+  test_notDouble() async {
+    await resolveTestUnit('''
+const double myDouble = /*caret*/42;
+''');
+    await assertNoAssist();
+  }
+
+  test_scientific() async {
+    await resolveTestUnit('''
+const double myDouble = /*caret*/4.2e1;
+''');
+    await assertHasAssist('''
+const double myDouble = /*caret*/42;
+''');
+  }
+
+  test_tooBig() async {
+    await resolveTestUnit('''
+const double myDouble = /*caret*/4.2e99999;
+''');
+    await assertNoAssist();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_normal_parameter_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_normal_parameter_test.dart
new file mode 100644
index 0000000..f5ddc23
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_normal_parameter_test.dart
@@ -0,0 +1,72 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToNormalParameterTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToNormalParameterTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_TO_NORMAL_PARAMETER;
+
+  test_dynamic() async {
+    await resolveTestUnit('''
+class A {
+  var test;
+  A(this.test) {
+  }
+}
+''');
+    await assertHasAssistAt('test)', '''
+class A {
+  var test;
+  A(test) : test = test {
+  }
+}
+''');
+  }
+
+  test_firstInitializer() async {
+    await resolveTestUnit('''
+class A {
+  int test;
+  A(this.test) {
+  }
+}
+''');
+    await assertHasAssistAt('test)', '''
+class A {
+  int test;
+  A(int test) : test = test {
+  }
+}
+''');
+  }
+
+  test_secondInitializer() async {
+    await resolveTestUnit('''
+class A {
+  double aaa;
+  int bbb;
+  A(this.bbb) : aaa = 1.0;
+}
+''');
+    await assertHasAssistAt('bbb)', '''
+class A {
+  double aaa;
+  int bbb;
+  A(int bbb) : aaa = 1.0, bbb = bbb;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_single_quoted_string_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_single_quoted_string_test.dart
new file mode 100644
index 0000000..161f62c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_single_quoted_string_test.dart
@@ -0,0 +1,143 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToSingleQuotedStringTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToSingleQuotedStringTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_TO_SINGLE_QUOTED_STRING;
+
+  test_one_embeddedTarget() async {
+    await resolveTestUnit('''
+main() {
+  print("a'b'c");
+}
+''');
+    await assertNoAssistAt('"a');
+  }
+
+  test_one_enclosingTarget() async {
+    await resolveTestUnit('''
+main() {
+  print('abc');
+}
+''');
+    await assertNoAssistAt("'ab");
+  }
+
+  test_one_interpolation() async {
+    await resolveTestUnit(r'''
+main() {
+  var b = 'b';
+  var c = 'c';
+  print("a $b-${c} d");
+}
+''');
+    await assertHasAssistAt(r'"a $b', r'''
+main() {
+  var b = 'b';
+  var c = 'c';
+  print('a $b-${c} d');
+}
+''');
+  }
+
+  test_one_raw() async {
+    await resolveTestUnit('''
+main() {
+  print(r"abc");
+}
+''');
+    await assertHasAssistAt('"ab', '''
+main() {
+  print(r'abc');
+}
+''');
+  }
+
+  test_one_simple() async {
+    await resolveTestUnit('''
+main() {
+  print("abc");
+}
+''');
+    await assertHasAssistAt('"ab', '''
+main() {
+  print('abc');
+}
+''');
+  }
+
+  test_three_embeddedTarget() async {
+    await resolveTestUnit('''
+main() {
+  print("""a''\'bc""");
+}
+''');
+    await assertNoAssistAt('"a');
+  }
+
+  test_three_enclosingTarget() async {
+    await resolveTestUnit("""
+main() {
+  print('''abc''');
+}
+""");
+    await assertNoAssistAt("'ab");
+  }
+
+  test_three_interpolation() async {
+    await resolveTestUnit(r'''
+main() {
+  var b = 'b';
+  var c = 'c';
+  print("""a $b-${c} d""");
+}
+''');
+    await assertHasAssistAt(r'"a $b', r"""
+main() {
+  var b = 'b';
+  var c = 'c';
+  print('''a $b-${c} d''');
+}
+""");
+  }
+
+  test_three_raw() async {
+    await resolveTestUnit('''
+main() {
+  print(r"""abc""");
+}
+''');
+    await assertHasAssistAt('"ab', """
+main() {
+  print(r'''abc''');
+}
+""");
+  }
+
+  test_three_simple() async {
+    await resolveTestUnit('''
+main() {
+  print("""abc""");
+}
+''');
+    await assertHasAssistAt('"ab', """
+main() {
+  print('''abc''');
+}
+""");
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/encapsulate_field_test.dart b/pkg/analysis_server/test/src/services/correction/assist/encapsulate_field_test.dart
new file mode 100644
index 0000000..98e3baf
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/encapsulate_field_test.dart
@@ -0,0 +1,164 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(EncapsulateFieldTest);
+  });
+}
+
+@reflectiveTest
+class EncapsulateFieldTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.ENCAPSULATE_FIELD;
+
+  test_alreadyPrivate() async {
+    await resolveTestUnit('''
+class A {
+  int _test = 42;
+}
+main(A a) {
+  print(a._test);
+}
+''');
+    await assertNoAssistAt('_test =');
+  }
+
+  test_documentation() async {
+    await resolveTestUnit('''
+class A {
+  /// AAA
+  /// BBB
+  int test;
+}
+''');
+    await assertHasAssistAt('test;', '''
+class A {
+  /// AAA
+  /// BBB
+  int _test;
+
+  /// AAA
+  /// BBB
+  int get test => _test;
+
+  /// AAA
+  /// BBB
+  set test(int test) {
+    _test = test;
+  }
+}
+''');
+  }
+
+  test_final() async {
+    await resolveTestUnit('''
+class A {
+  final int test = 42;
+}
+''');
+    await assertNoAssistAt('test =');
+  }
+
+  test_hasType() async {
+    await resolveTestUnit('''
+class A {
+  int test = 42;
+  A(this.test);
+}
+main(A a) {
+  print(a.test);
+}
+''');
+    await assertHasAssistAt('test = 42', '''
+class A {
+  int _test = 42;
+
+  int get test => _test;
+
+  set test(int test) {
+    _test = test;
+  }
+  A(this._test);
+}
+main(A a) {
+  print(a.test);
+}
+''');
+  }
+
+  test_multipleFields() async {
+    await resolveTestUnit('''
+class A {
+  int aaa, bbb, ccc;
+}
+main(A a) {
+  print(a.bbb);
+}
+''');
+    await assertNoAssistAt('bbb, ');
+  }
+
+  test_notOnName() async {
+    await resolveTestUnit('''
+class A {
+  int test = 1 + 2 + 3;
+}
+''');
+    await assertNoAssistAt('+ 2');
+  }
+
+  test_noType() async {
+    await resolveTestUnit('''
+class A {
+  var test = 42;
+}
+main(A a) {
+  print(a.test);
+}
+''');
+    await assertHasAssistAt('test = 42', '''
+class A {
+  var _test = 42;
+
+  get test => _test;
+
+  set test(test) {
+    _test = test;
+  }
+}
+main(A a) {
+  print(a.test);
+}
+''');
+  }
+
+  test_parseError() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+class A {
+  int; // marker
+}
+main(A a) {
+  print(a.test);
+}
+''');
+    await assertNoAssistAt('; // marker');
+  }
+
+  test_static() async {
+    await resolveTestUnit('''
+class A {
+  static int test = 42;
+}
+''');
+    await assertNoAssistAt('test =');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/exchange_operands_test.dart b/pkg/analysis_server/test/src/services/correction/assist/exchange_operands_test.dart
new file mode 100644
index 0000000..8bbcd52
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/exchange_operands_test.dart
@@ -0,0 +1,177 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ExchangeOperandsTest);
+  });
+}
+
+@reflectiveTest
+class ExchangeOperandsTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.EXCHANGE_OPERANDS;
+
+  test_compare() async {
+    const initialOperators = const ['<', '<=', '>', '>='];
+    const resultOperators = const ['>', '>=', '<', '<='];
+    for (int i = 0; i <= 0; i++) {
+      String initialOperator = initialOperators[i];
+      String resultOperator = resultOperators[i];
+      await resolveTestUnit('''
+bool main(int a, int b) {
+  return a $initialOperator b;
+}
+''');
+      await assertHasAssistAt(initialOperator, '''
+bool main(int a, int b) {
+  return b $resultOperator a;
+}
+''');
+    }
+  }
+
+  test_extended_mixOperator_1() async {
+    await resolveTestUnit('''
+main() {
+  1 * 2 * 3 + 4;
+}
+''');
+    await assertHasAssistAt('* 2', '''
+main() {
+  2 * 3 * 1 + 4;
+}
+''');
+  }
+
+  test_extended_mixOperator_2() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2 - 3 + 4;
+}
+''');
+    await assertHasAssistAt('+ 2', '''
+main() {
+  2 + 1 - 3 + 4;
+}
+''');
+  }
+
+  test_extended_sameOperator_afterFirst() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2 + 3;
+}
+''');
+    await assertHasAssistAt('+ 2', '''
+main() {
+  2 + 3 + 1;
+}
+''');
+  }
+
+  test_extended_sameOperator_afterSecond() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2 + 3;
+}
+''');
+    await assertHasAssistAt('+ 3', '''
+main() {
+  3 + 1 + 2;
+}
+''');
+  }
+
+  test_extraLength() async {
+    await resolveTestUnit('''
+main() {
+  111 + 222;
+}
+''');
+    await assertNoAssistAt('+ 222', length: 3);
+  }
+
+  test_onOperand() async {
+    await resolveTestUnit('''
+main() {
+  111 + 222;
+}
+''');
+    await assertNoAssistAt('11 +', length: 3);
+  }
+
+  test_selectionWithBinary() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2 + 3;
+}
+''');
+    await assertNoAssistAt('1 + 2 + 3', length: '1 + 2 + 3'.length);
+  }
+
+  test_simple_afterOperator() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2;
+}
+''');
+    await assertHasAssistAt(' 2', '''
+main() {
+  2 + 1;
+}
+''');
+  }
+
+  test_simple_beforeOperator() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2;
+}
+''');
+    await assertHasAssistAt('+ 2', '''
+main() {
+  2 + 1;
+}
+''');
+  }
+
+  test_simple_fullSelection() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2;
+}
+''');
+    await assertHasAssistAt(
+        '1 + 2',
+        '''
+main() {
+  2 + 1;
+}
+''',
+        length: '1 + 2'.length);
+  }
+
+  test_simple_withLength() async {
+    await resolveTestUnit('''
+main() {
+  1 + 2;
+}
+''');
+    await assertHasAssistAt(
+        '+ 2',
+        '''
+main() {
+  2 + 1;
+}
+''',
+        length: 2);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_children_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_children_test.dart
new file mode 100644
index 0000000..8d34099
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_children_test.dart
@@ -0,0 +1,158 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterConvertToChildrenTest);
+  });
+}
+
+@reflectiveTest
+class FlutterConvertToChildrenTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_CONVERT_TO_CHILDREN;
+
+  test_childUnresolved() async {
+    addFlutterPackage();
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Row(
+    /*caret*/child: new Container()
+  );
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_multiLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+// start
+    body: new Center(
+      /*caret*/child: new Container(
+        width: 200.0,
+        height: 300.0,
+      ),
+      key: null,
+    ),
+// end
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+// start
+    body: new Center(
+      /*caret*/children: <Widget>[
+        new Container(
+          width: 200.0,
+          height: 300.0,
+        ),
+      ],
+      key: null,
+    ),
+// end
+  );
+}
+''');
+  }
+
+  test_newlineChild() async {
+    // This case could occur with deeply nested constructors, common in Flutter.
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+// start
+    body: new Center(
+      /*caret*/child:
+          new Container(
+        width: 200.0,
+        height: 300.0,
+      ),
+      key: null,
+    ),
+// end
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+// start
+    body: new Center(
+      /*caret*/children: <Widget>[
+        new Container(
+          width: 200.0,
+          height: 300.0,
+        ),
+      ],
+      key: null,
+    ),
+// end
+  );
+}
+''');
+  }
+
+  test_notOnChild() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+    body: /*caret*/new Center(
+      child: new Container(),
+    ),
+  );
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_singleLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+// start
+    body: new Center(
+      /*caret*/child: new GestureDetector(),
+      key: null,
+    ),
+// end
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+// start
+    body: new Center(
+      /*caret*/children: <Widget>[new GestureDetector()],
+      key: null,
+    ),
+// end
+  );
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart
new file mode 100644
index 0000000..977ea72
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart
@@ -0,0 +1,403 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterConvertToStatefulWidgetTest);
+  });
+}
+
+@reflectiveTest
+class FlutterConvertToStatefulWidgetTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_CONVERT_TO_STATEFUL_WIDGET;
+
+  test_empty() async {
+    addFlutterPackage();
+    await resolveTestUnit(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  @override
+  Widget build(BuildContext context) {
+    return new Container();
+  }
+}
+''');
+    await assertHasAssist(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatefulWidget {
+  @override
+  MyWidgetState createState() {
+    return new MyWidgetState();
+  }
+}
+
+class MyWidgetState extends State<MyWidget> {
+  @override
+  Widget build(BuildContext context) {
+    return new Container();
+  }
+}
+''');
+  }
+
+  test_fields() async {
+    addFlutterPackage();
+    await resolveTestUnit(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  static String staticField1;
+  final String instanceField1;
+  final String instanceField2;
+  String instanceField3;
+  static String staticField2;
+  String instanceField4;
+  String instanceField5;
+  static String staticField3;
+
+  MyWidget(this.instanceField1) : instanceField2 = '' {
+    instanceField3 = '';
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    instanceField4 = instanceField1;
+    return new Row(
+      children: [
+        new Text(instanceField1),
+        new Text(instanceField2),
+        new Text(instanceField3),
+        new Text(instanceField4),
+        new Text(instanceField5),
+        new Text(staticField1),
+        new Text(staticField2),
+        new Text(staticField3),
+      ],
+    );
+  }
+}
+''');
+    await assertHasAssist(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatefulWidget {
+  static String staticField1;
+  final String instanceField1;
+  final String instanceField2;
+  String instanceField3;
+  static String staticField2;
+  static String staticField3;
+
+  MyWidget(this.instanceField1) : instanceField2 = '' {
+    instanceField3 = '';
+  }
+
+  @override
+  MyWidgetState createState() {
+    return new MyWidgetState();
+  }
+}
+
+class MyWidgetState extends State<MyWidget> {
+  String instanceField4;
+
+  String instanceField5;
+
+  @override
+  Widget build(BuildContext context) {
+    instanceField4 = widget.instanceField1;
+    return new Row(
+      children: [
+        new Text(widget.instanceField1),
+        new Text(widget.instanceField2),
+        new Text(widget.instanceField3),
+        new Text(instanceField4),
+        new Text(instanceField5),
+        new Text(MyWidget.staticField1),
+        new Text(MyWidget.staticField2),
+        new Text(MyWidget.staticField3),
+      ],
+    );
+  }
+}
+''');
+  }
+
+  test_getters() async {
+    addFlutterPackage();
+    await resolveTestUnit(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  @override
+  Widget build(BuildContext context) {
+    return new Row(
+      children: [
+        new Text(staticGetter1),
+        new Text(staticGetter2),
+        new Text(instanceGetter1),
+        new Text(instanceGetter2),
+      ],
+    );
+  }
+
+  static String get staticGetter1 => '';
+
+  String get instanceGetter1 => '';
+
+  static String get staticGetter2 => '';
+
+  String get instanceGetter2 => '';
+}
+''');
+    await assertHasAssist(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatefulWidget {
+  @override
+  MyWidgetState createState() {
+    return new MyWidgetState();
+  }
+
+  static String get staticGetter1 => '';
+
+  static String get staticGetter2 => '';
+}
+
+class MyWidgetState extends State<MyWidget> {
+  @override
+  Widget build(BuildContext context) {
+    return new Row(
+      children: [
+        new Text(MyWidget.staticGetter1),
+        new Text(MyWidget.staticGetter2),
+        new Text(instanceGetter1),
+        new Text(instanceGetter2),
+      ],
+    );
+  }
+
+  String get instanceGetter1 => '';
+
+  String get instanceGetter2 => '';
+}
+''');
+  }
+
+  test_methods() async {
+    addFlutterPackage();
+    await resolveTestUnit(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  static String staticField;
+  final String instanceField1;
+  String instanceField2;
+
+  MyWidget(this.instanceField1);
+
+  @override
+  Widget build(BuildContext context) {
+    return new Row(
+      children: [
+        new Text(instanceField1),
+        new Text(instanceField2),
+        new Text(staticField),
+      ],
+    );
+  }
+
+  void instanceMethod1() {
+    instanceMethod1();
+    instanceMethod2();
+    staticMethod1();
+  }
+
+  static void staticMethod1() {
+    print('static 1');
+  }
+
+  void instanceMethod2() {
+    print('instance 2');
+  }
+
+  static void staticMethod2() {
+    print('static 2');
+  }
+}
+''');
+    await assertHasAssist(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatefulWidget {
+  static String staticField;
+  final String instanceField1;
+
+  MyWidget(this.instanceField1);
+
+  @override
+  MyWidgetState createState() {
+    return new MyWidgetState();
+  }
+
+  static void staticMethod1() {
+    print('static 1');
+  }
+
+  static void staticMethod2() {
+    print('static 2');
+  }
+}
+
+class MyWidgetState extends State<MyWidget> {
+  String instanceField2;
+
+  @override
+  Widget build(BuildContext context) {
+    return new Row(
+      children: [
+        new Text(widget.instanceField1),
+        new Text(instanceField2),
+        new Text(MyWidget.staticField),
+      ],
+    );
+  }
+
+  void instanceMethod1() {
+    instanceMethod1();
+    instanceMethod2();
+    MyWidget.staticMethod1();
+  }
+
+  void instanceMethod2() {
+    print('instance 2');
+  }
+}
+''');
+  }
+
+  test_notClass() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+/*caret*/main() {}
+''');
+    assertNoAssist();
+  }
+
+  test_notStatelessWidget() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+class /*caret*/MyWidget extends Text {
+  MyWidget() : super('');
+}
+''');
+    assertNoAssist();
+  }
+
+  test_notWidget() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+class /*caret*/MyWidget {}
+''');
+    assertNoAssist();
+  }
+
+  test_simple() async {
+    addFlutterPackage();
+    await resolveTestUnit(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  final String aaa;
+  final String bbb;
+
+  const MyWidget(this.aaa, this.bbb);
+
+  @override
+  Widget build(BuildContext context) {
+    return new Row(
+      children: [
+        new Text(aaa),
+        new Text(bbb),
+        new Text('$aaa'),
+        new Text('${bbb}'),
+      ],
+    );
+  }
+}
+''');
+    await assertHasAssist(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatefulWidget {
+  final String aaa;
+  final String bbb;
+
+  const MyWidget(this.aaa, this.bbb);
+
+  @override
+  MyWidgetState createState() {
+    return new MyWidgetState();
+  }
+}
+
+class MyWidgetState extends State<MyWidget> {
+  @override
+  Widget build(BuildContext context) {
+    return new Row(
+      children: [
+        new Text(widget.aaa),
+        new Text(widget.bbb),
+        new Text('${widget.aaa}'),
+        new Text('${widget.bbb}'),
+      ],
+    );
+  }
+}
+''');
+  }
+
+  test_tail() async {
+    addFlutterPackage();
+    await resolveTestUnit(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatelessWidget {
+  @override
+  Widget build(BuildContext context) {
+    return new Container();
+  }
+}
+''');
+    await assertHasAssist(r'''
+import 'package:flutter/material.dart';
+
+class /*caret*/MyWidget extends StatefulWidget {
+  @override
+  MyWidgetState createState() {
+    return new MyWidgetState();
+  }
+}
+
+class MyWidgetState extends State<MyWidget> {
+  @override
+  Widget build(BuildContext context) {
+    return new Container();
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_move_down_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_move_down_test.dart
new file mode 100644
index 0000000..5885e70
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_move_down_test.dart
@@ -0,0 +1,80 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterMoveDownTest);
+  });
+}
+
+@reflectiveTest
+class FlutterMoveDownTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_MOVE_DOWN;
+
+  test_first() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('aaa'),
+      /*caret*/new Text('bbbbbb'),
+      new Text('ccccccccc'),
+    ],
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('aaa'),
+      /*caret*/new Text('ccccccccc'),
+      new Text('bbbbbb'),
+    ],
+  );
+}
+''');
+    assertExitPosition(before: "new Text('bbbbbb')");
+  }
+
+  test_last() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('aaa'),
+      new Text('bbb'),
+      /*caret*/new Text('ccc'),
+    ],
+  );
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_notInList() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Center(
+    child: /*caret*/new Text('aaa'),
+  );
+}
+''');
+    await assertNoAssist();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_move_up_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_move_up_test.dart
new file mode 100644
index 0000000..771bb73
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_move_up_test.dart
@@ -0,0 +1,80 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterMoveUpTest);
+  });
+}
+
+@reflectiveTest
+class FlutterMoveUpTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_MOVE_UP;
+
+  test_first() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      /*caret*/new Text('aaa'),
+      new Text('bbb'),
+      new Text('ccc'),
+    ],
+  );
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_last() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('aaa'),
+      /*caret*/new Text('bbbbbb'),
+      new Text('ccccccccc'),
+    ],
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('bbbbbb'),
+      /*caret*/new Text('aaa'),
+      new Text('ccccccccc'),
+    ],
+  );
+}
+''');
+    assertExitPosition(before: "new Text('bbbbbb')");
+  }
+
+  test_notInList() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Center(
+    child: /*caret*/new Text('aaa'),
+  );
+}
+''');
+    await assertNoAssist();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_remove_widget_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_remove_widget_test.dart
new file mode 100644
index 0000000..842b191
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_remove_widget_test.dart
@@ -0,0 +1,236 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterRemoveWidgetTest);
+  });
+}
+
+@reflectiveTest
+class FlutterRemoveWidgetTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_REMOVE_WIDGET;
+
+  test_childIntoChild_multiLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Center(
+        child: new /*caret*/Padding(
+          padding: const EdgeInsets.all(8.0),
+          child: new Center(
+            heightFactor: 0.5,
+            child: new Text('foo'),
+          ),
+        ),
+      ),
+    ],
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Center(
+        child: new Center(
+          heightFactor: 0.5,
+          child: new Text('foo'),
+        ),
+      ),
+    ],
+  );
+}
+''');
+  }
+
+  test_childIntoChild_singleLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Padding(
+    padding: const EdgeInsets.all(8.0),
+    child: new /*caret*/Center(
+      heightFactor: 0.5,
+      child: new Text('foo'),
+    ),
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Padding(
+    padding: const EdgeInsets.all(8.0),
+    child: new Text('foo'),
+  );
+}
+''');
+  }
+
+  test_childIntoChildren() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('foo'),
+      new /*caret*/Center(
+        heightFactor: 0.5,
+        child: new Padding(
+          padding: const EdgeInsets.all(8.0),
+          child: new Text('bar'),
+        ),
+      ),
+      new Text('baz'),
+    ],
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('foo'),
+      new Padding(
+        padding: const EdgeInsets.all(8.0),
+        child: new Text('bar'),
+      ),
+      new Text('baz'),
+    ],
+  );
+}
+''');
+  }
+
+  test_childrenMultipleIntoChild() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Center(
+    child: new /*caret*/Row(
+      children: [
+        new Text('aaa'),
+        new Text('bbb'),
+      ],
+    ),
+  );
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_childrenOneIntoChild() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Center(
+    child: /*caret*/new Column(
+      children: [
+        new Text('foo'),
+      ],
+    ),
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Center(
+    child: /*caret*/new Text('foo'),
+  );
+}
+''');
+  }
+
+  test_childrenOneIntoReturn() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  return /*caret*/new Column(
+    children: [
+      new Text('foo'),
+    ],
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  return /*caret*/new Text('foo');
+}
+''');
+  }
+
+  test_intoChildren() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('aaa'),
+      new /*caret*/Column(
+        children: [
+          new Row(
+            children: [
+              new Text('bbb'),
+              new Text('ccc'),
+            ],
+          ),
+          new Row(
+            children: [
+              new Text('ddd'),
+              new Text('eee'),
+            ],
+          ),
+        ],
+      ),
+      new Text('fff'),
+    ],
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: <Widget>[
+      new Text('aaa'),
+      new Row(
+        children: [
+          new Text('bbb'),
+          new Text('ccc'),
+        ],
+      ),
+      new Row(
+        children: [
+          new Text('ddd'),
+          new Text('eee'),
+        ],
+      ),
+      new Text('fff'),
+    ],
+  );
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_swap_with_child_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_swap_with_child_test.dart
new file mode 100644
index 0000000..03b6f84
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_swap_with_child_test.dart
@@ -0,0 +1,112 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterSwapWithChildTest);
+  });
+}
+
+@reflectiveTest
+class FlutterSwapWithChildTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_SWAP_WITH_CHILD;
+
+  test_aroundCenter() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+    body: new /*caret*/GestureDetector(
+      onTap: () => startResize(),
+      child: new Center(
+        child: new Container(
+          width: 200.0,
+          height: 300.0,
+        ),
+        key: null,
+      ),
+    ),
+  );
+}
+startResize() {}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+    body: new Center(
+      key: null,
+      child: new /*caret*/GestureDetector(
+        onTap: () => startResize(),
+        child: new Container(
+          width: 200.0,
+          height: 300.0,
+        ),
+      ),
+    ),
+  );
+}
+startResize() {}
+''');
+  }
+
+  test_notFormatted() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+
+class Foo extends StatefulWidget {
+  @override
+  _State createState() => new _State();
+}
+
+class _State extends State<Foo> {
+  @override
+  Widget build(BuildContext context) {
+    return new /*caret*/Expanded(
+      flex: 2,
+      child: new GestureDetector(
+        child: new Text(
+          'foo',
+        ), onTap: () {
+          print(42);
+      },
+      ),
+    );
+  }
+}''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+
+class Foo extends StatefulWidget {
+  @override
+  _State createState() => new _State();
+}
+
+class _State extends State<Foo> {
+  @override
+  Widget build(BuildContext context) {
+    return new GestureDetector(
+      onTap: () {
+        print(42);
+    },
+      child: new /*caret*/Expanded(
+        flex: 2,
+        child: new Text(
+          'foo',
+        ),
+      ),
+    );
+  }
+}''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_swap_with_parent_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_swap_with_parent_test.dart
new file mode 100644
index 0000000..d5ad1d3
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_swap_with_parent_test.dart
@@ -0,0 +1,160 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterSwapWithParentTest);
+  });
+}
+
+@reflectiveTest
+class FlutterSwapWithParentTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_SWAP_WITH_PARENT;
+
+  test_inCenter() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+    body: new Center(
+      child: new /*caret*/GestureDetector(
+        onTap: () => startResize(),
+        child: new Container(
+          width: 200.0,
+          height: 300.0,
+        ),
+      ),
+      key: null,
+    ),
+  );
+}
+startResize() {}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+    body: new /*caret*/GestureDetector(
+      onTap: () => startResize(),
+      child: new Center(
+        key: null,
+        child: new Container(
+          width: 200.0,
+          height: 300.0,
+        ),
+      ),
+    ),
+  );
+}
+startResize() {}
+''');
+  }
+
+  test_notFormatted() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+
+class Foo extends StatefulWidget {
+  @override
+  _State createState() => new _State();
+}
+
+class _State extends State<Foo> {
+  @override
+  Widget build(BuildContext context) {
+    return new GestureDetector(
+      child: new /*caret*/Expanded(
+        child: new Text(
+          'foo',
+        ),
+        flex: 2,
+      ), onTap: () {
+        print(42);
+    },
+    );
+  }
+}''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+
+class Foo extends StatefulWidget {
+  @override
+  _State createState() => new _State();
+}
+
+class _State extends State<Foo> {
+  @override
+  Widget build(BuildContext context) {
+    return new /*caret*/Expanded(
+      flex: 2,
+      child: new GestureDetector(
+        onTap: () {
+          print(42);
+      },
+        child: new Text(
+          'foo',
+        ),
+      ),
+    );
+  }
+}''');
+  }
+
+  test_outerIsInChildren() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: [
+      new Column(
+        children: [
+          new Padding(
+            padding: new EdgeInsets.all(16.0),
+            child: new /*caret*/Center(
+              child: new Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: <Widget>[],
+              ),
+            ),
+          ),
+        ],
+      ),
+    ],
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/material.dart';
+main() {
+  new Column(
+    children: [
+      new Column(
+        children: [
+          new /*caret*/Center(
+            child: new Padding(
+              padding: new EdgeInsets.all(16.0),
+              child: new Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: <Widget>[],
+              ),
+            ),
+          ),
+        ],
+      ),
+    ],
+  );
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_center_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_center_test.dart
new file mode 100644
index 0000000..4e300e2
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_center_test.dart
@@ -0,0 +1,84 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapCenterTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapCenterTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_CENTER;
+
+  test_aroundCenter() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/new Center();
+  }
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_aroundContainer() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/new Container();
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/Center(child: new Container());
+  }
+}
+''');
+  }
+
+  test_aroundNamedConstructor() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  MyWidget.named();
+
+  Widget build(BuildContext context) => null;
+}
+
+main() {
+  return MyWidget./*caret*/named();
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  MyWidget.named();
+
+  Widget build(BuildContext context) => null;
+}
+
+main() {
+  return Center(child: MyWidget./*caret*/named());
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_column_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_column_test.dart
new file mode 100644
index 0000000..cad4036
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_column_test.dart
@@ -0,0 +1,91 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapColumnTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapColumnTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_COLUMN;
+
+  test_coveredByWidget() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+  main() {
+    return new Container(
+      child: new /*caret*/Text('aaa'),
+    );
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+  main() {
+    return new Container(
+      child: Column(
+        children: <Widget>[
+          new /*caret*/Text('aaa'),
+        ],
+      ),
+    );
+  }
+}
+''');
+  }
+
+  test_coversWidgets() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+  main() {
+    return new Row(children: [
+      new Text('aaa'),
+// start
+      new Text('bbb'),
+      new Text('ccc'),
+// end
+      new Text('ddd'),
+    ]);
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+  main() {
+    return new Row(children: [
+      new Text('aaa'),
+// start
+      Column(
+        children: <Widget>[
+          new Text('bbb'),
+          new Text('ccc'),
+        ],
+      ),
+// end
+      new Text('ddd'),
+    ]);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_container_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_container_test.dart
new file mode 100644
index 0000000..15f8433
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_container_test.dart
@@ -0,0 +1,48 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapContainerTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapContainerTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_CONTAINER;
+
+  test_aroundContainer() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+main() {
+  return /*caret*/new Container();
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_aroundText() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+main() {
+  /*caret*/new Text('a');
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+main() {
+  /*caret*/Container(child: new Text('a'));
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_generic_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_generic_test.dart
new file mode 100644
index 0000000..30b416b
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_generic_test.dart
@@ -0,0 +1,313 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapGenericTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapGenericTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_GENERIC;
+
+  test_minimal() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+/*caret*/x(){}
+''');
+    await assertNoAssist();
+  }
+
+  test_multiLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+// start
+      children: [/*caret*/
+        new Text('111'),
+        new Text('222'),
+        new Container(),
+      ],
+// end
+    ),
+  );
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+// start
+      children: [
+        new widget(
+          children: [/*caret*/
+            new Text('111'),
+            new Text('222'),
+            new Container(),
+          ],
+        ),
+      ],
+// end
+    ),
+  );
+}
+''');
+  }
+
+  test_multiLine_inListLiteral() async {
+    verifyNoTestUnitErrors = false;
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+      children: [/*caret*/
+// start
+        new Transform(),
+        new Object(),
+        new AspectRatio(),
+// end
+      ],
+    ),
+  );
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_multiLines() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return new Container(
+// start
+      child: new /*caret*/DefaultTextStyle(
+        child: new Row(
+          children: <Widget>[
+            new Container(
+            ),
+          ],
+        ),
+      ),
+// end
+    );
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return new Container(
+// start
+      child: widget(
+        child: new /*caret*/DefaultTextStyle(
+          child: new Row(
+            children: <Widget>[
+              new Container(
+              ),
+            ],
+          ),
+        ),
+      ),
+// end
+    );
+  }
+}
+''');
+  }
+
+  test_multiLines_eol2() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {\r
+  main() {\r
+    return new Container(\r
+// start\r
+      child: new /*caret*/DefaultTextStyle(\r
+        child: new Row(\r
+          children: <Widget>[\r
+            new Container(\r
+            ),\r
+          ],\r
+        ),\r
+      ),\r
+// end\r
+    );\r
+  }\r
+}\r
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {\r
+  main() {\r
+    return new Container(\r
+// start\r
+      child: widget(\r
+        child: new /*caret*/DefaultTextStyle(\r
+          child: new Row(\r
+            children: <Widget>[\r
+              new Container(\r
+              ),\r
+            ],\r
+          ),\r
+        ),\r
+      ),\r
+// end\r
+    );\r
+  }\r
+}\r
+''');
+  }
+
+  test_prefixedIdentifier_identifier() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+abstract class Foo extends Widget {
+  Widget bar;
+}
+
+main(Foo foo) {
+  return foo./*caret*/bar;
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+abstract class Foo extends Widget {
+  Widget bar;
+}
+
+main(Foo foo) {
+  return widget(child: foo./*caret*/bar);
+}
+''');
+  }
+
+  test_prefixedIdentifier_prefix() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+abstract class Foo extends Widget {
+  Widget bar;
+}
+
+main(Foo foo) {
+  return /*caret*/foo.bar;
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+abstract class Foo extends Widget {
+  Widget bar;
+}
+
+main(Foo foo) {
+  return /*caret*/widget(child: foo.bar);
+}
+''');
+  }
+
+  test_singleLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+  var obj;
+// start
+    return new Row(children: [/*caret*/ new Container()]);
+// end
+  }
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_singleLine1() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+// start
+    return /*caret*/new Container();
+// end
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+// start
+    return /*caret*/widget(child: new Container());
+// end
+  }
+}
+''');
+  }
+
+  test_singleLine2() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return new ClipRect./*caret*/rect();
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return widget(child: new ClipRect./*caret*/rect());
+  }
+}
+''');
+  }
+
+  test_variable() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    var container = new Container();
+    return /*caret*/container;
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    var container = new Container();
+    return /*caret*/widget(child: container);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_padding_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_padding_test.dart
new file mode 100644
index 0000000..50b927b
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_padding_test.dart
@@ -0,0 +1,57 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapPaddingTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapPaddingTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_PADDING;
+
+  test_aroundContainer() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/new Container();
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/Padding(
+      padding: const EdgeInsets.all(8.0),
+      child: new Container(),
+    );
+  }
+}
+''');
+  }
+
+  test_aroundPadding() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+class FakeFlutter {
+  main() {
+    return /*caret*/new Padding();
+  }
+}
+''');
+    await assertNoAssist();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_row_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_row_test.dart
new file mode 100644
index 0000000..c18ac34
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_row_test.dart
@@ -0,0 +1,61 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapRowTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapRowTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_ROW;
+
+  test_twoWidgets() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+  main() {
+    return new Column(children: [
+      new Text('aaa'),
+// start
+      new Text('bbb'),
+      new Text('ccc'),
+// end
+      new Text('ddd'),
+    ]);
+  }
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+class FakeFlutter {
+  main() {
+    return new Column(children: [
+      new Text('aaa'),
+// start
+      Row(
+        children: <Widget>[
+          new Text('bbb'),
+          new Text('ccc'),
+        ],
+      ),
+// end
+      new Text('ddd'),
+    ]);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_stream_builder_test.dart b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_stream_builder_test.dart
new file mode 100644
index 0000000..be7d5c2
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/flutter_wrap_stream_builder_test.dart
@@ -0,0 +1,59 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FlutterWrapStreamBuilderTest);
+  });
+}
+
+@reflectiveTest
+class FlutterWrapStreamBuilderTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.FLUTTER_WRAP_STREAM_BUILDER;
+
+  test_aroundStreamBuilder() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  /*caret*/StreamBuilder(
+    stream: null,
+    builder: (context, snapshot) => null,
+  );
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_aroundText() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  /*caret*/new Text('a');
+}
+''');
+    await assertHasAssist('''
+import 'package:flutter/widgets.dart';
+
+main() {
+  /*caret*/StreamBuilder<Object>(
+    stream: null,
+    builder: (context, snapshot) {
+      return new Text('a');
+    }
+  );
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/import_add_show_test.dart b/pkg/analysis_server/test/src/services/correction/assist/import_add_show_test.dart
new file mode 100644
index 0000000..4c62dde
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/import_add_show_test.dart
@@ -0,0 +1,101 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportAddShowTest);
+  });
+}
+
+@reflectiveTest
+class ImportAddShowTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.IMPORT_ADD_SHOW;
+
+  test_hasShow() async {
+    await resolveTestUnit('''
+import 'dart:math' show PI;
+main() {
+  PI;
+}
+''');
+    await assertNoAssistAt('import ');
+  }
+
+  test_hasUnresolvedIdentifier() async {
+    await resolveTestUnit('''
+import 'dart:math';
+main(x) {
+  PI;
+  return x.foo();
+}
+''');
+    await assertHasAssistAt('import ', '''
+import 'dart:math' show PI;
+main(x) {
+  PI;
+  return x.foo();
+}
+''');
+  }
+
+  test_onDirective() async {
+    await resolveTestUnit('''
+import 'dart:math';
+main() {
+  PI;
+  E;
+  max(1, 2);
+}
+''');
+    await assertHasAssistAt('import ', '''
+import 'dart:math' show E, PI, max;
+main() {
+  PI;
+  E;
+  max(1, 2);
+}
+''');
+  }
+
+  test_onUri() async {
+    await resolveTestUnit('''
+import 'dart:math';
+main() {
+  PI;
+  E;
+  max(1, 2);
+}
+''');
+    await assertHasAssistAt('art:math', '''
+import 'dart:math' show E, PI, max;
+main() {
+  PI;
+  E;
+  max(1, 2);
+}
+''');
+  }
+
+  test_unresolvedUri() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+import '/no/such/lib.dart';
+''');
+    await assertNoAssistAt('import ');
+  }
+
+  test_unused() async {
+    await resolveTestUnit('''
+import 'dart:math';
+''');
+    await assertNoAssistAt('import ');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/introduce_local_cast_type_test.dart b/pkg/analysis_server/test/src/services/correction/assist/introduce_local_cast_type_test.dart
new file mode 100644
index 0000000..2201266
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/introduce_local_cast_type_test.dart
@@ -0,0 +1,127 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(IntroduceLocalCastTypeTest);
+  });
+}
+
+@reflectiveTest
+class IntroduceLocalCastTypeTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.INTRODUCE_LOCAL_CAST_TYPE;
+
+  test_introduceLocalTestedType_notBlock() async {
+    await resolveTestUnit('''
+main(p) {
+  if (p is String)
+    print('not a block');
+}
+''');
+    await assertNoAssistAt('if (p');
+  }
+
+  test_introduceLocalTestedType_notIsExpression() async {
+    await resolveTestUnit('''
+main(p) {
+  if (p == null) {
+  }
+}
+''');
+    await assertNoAssistAt('if (p');
+  }
+
+  test_introduceLocalTestedType_notStatement() async {
+    await resolveTestUnit('''
+class C {
+  bool b;
+  C(v) : b = v is int;
+}''');
+    await assertNoAssistAt('is int');
+  }
+
+  test_introduceLocalTestedType_if_is() async {
+    await resolveTestUnit('''
+class MyTypeName {}
+main(p) {
+  if (p is MyTypeName) {
+  }
+  p = null;
+}
+''');
+    String expected = '''
+class MyTypeName {}
+main(p) {
+  if (p is MyTypeName) {
+    MyTypeName myTypeName = p;
+  }
+  p = null;
+}
+''';
+    await assertHasAssistAt('is MyType', expected);
+    assertLinkedGroup(
+        0,
+        ['myTypeName = '],
+        expectedSuggestions(LinkedEditSuggestionKind.VARIABLE,
+            ['myTypeName', 'typeName', 'name']));
+    // another good location
+    await assertHasAssistAt('if (p', expected);
+  }
+
+  test_introduceLocalTestedType_if_isNot() async {
+    await resolveTestUnit('''
+class MyTypeName {}
+main(p) {
+  if (p is! MyTypeName) {
+    return;
+  }
+}
+''');
+    String expected = '''
+class MyTypeName {}
+main(p) {
+  if (p is! MyTypeName) {
+    return;
+  }
+  MyTypeName myTypeName = p;
+}
+''';
+    await assertHasAssistAt('is! MyType', expected);
+    assertLinkedGroup(
+        0,
+        ['myTypeName = '],
+        expectedSuggestions(LinkedEditSuggestionKind.VARIABLE,
+            ['myTypeName', 'typeName', 'name']));
+    // another good location
+    await assertHasAssistAt('if (p', expected);
+  }
+
+  test_introduceLocalTestedType_while() async {
+    await resolveTestUnit('''
+main(p) {
+  while (p is String) {
+  }
+  p = null;
+}
+''');
+    String expected = '''
+main(p) {
+  while (p is String) {
+    String s = p;
+  }
+  p = null;
+}
+''';
+    await assertHasAssistAt('is String', expected);
+    await assertHasAssistAt('while (p', expected);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/invert_if_statement_test.dart b/pkg/analysis_server/test/src/services/correction/assist/invert_if_statement_test.dart
new file mode 100644
index 0000000..54ba0aa
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/invert_if_statement_test.dart
@@ -0,0 +1,61 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvertIfStatementTest);
+  });
+}
+
+@reflectiveTest
+class InvertIfStatementTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.INVERT_IF_STATEMENT;
+
+  test_blocks() async {
+    await resolveTestUnit('''
+main() {
+  if (true) {
+    0;
+  } else {
+    1;
+  }
+}
+''');
+    await assertHasAssistAt('if (', '''
+main() {
+  if (false) {
+    1;
+  } else {
+    0;
+  }
+}
+''');
+  }
+
+  test_statements() async {
+    await resolveTestUnit('''
+main() {
+  if (true)
+    0;
+  else
+    1;
+}
+''');
+    await assertHasAssistAt('if (', '''
+main() {
+  if (false)
+    1;
+  else
+    0;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/join_if_with_inner_test.dart b/pkg/analysis_server/test/src/services/correction/assist/join_if_with_inner_test.dart
new file mode 100644
index 0000000..a57c603
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/join_if_with_inner_test.dart
@@ -0,0 +1,255 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(JoinInWithInnerTest);
+  });
+}
+
+@reflectiveTest
+class JoinInWithInnerTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.JOIN_IF_WITH_INNER;
+
+  test_conditionAndOr() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2 || 3 == 3) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (1 ==', '''
+main() {
+  if (1 == 1 && (2 == 2 || 3 == 3)) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_conditionInvocation() async {
+    await resolveTestUnit('''
+main() {
+  if (isCheck()) {
+    if (2 == 2) {
+      print(0);
+    }
+  }
+}
+bool isCheck() => false;
+''');
+    await assertHasAssistAt('if (isCheck', '''
+main() {
+  if (isCheck() && 2 == 2) {
+    print(0);
+  }
+}
+bool isCheck() => false;
+''');
+  }
+
+  test_conditionOrAnd() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1 || 2 == 2) {
+    if (3 == 3) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (1 ==', '''
+main() {
+  if ((1 == 1 || 2 == 2) && 3 == 3) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_innerNotIf() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    print(0);
+  }
+}
+''');
+    await assertNoAssistAt('if (1 ==');
+  }
+
+  test_innerWithElse() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    } else {
+      print(1);
+    }
+  }
+}
+''');
+    await assertNoAssistAt('if (1 ==');
+  }
+
+  test_onCondition() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('1 ==', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_simpleConditions_block_block() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (1 ==', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_simpleConditions_block_single() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2)
+      print(0);
+  }
+}
+''');
+    await assertHasAssistAt('if (1 ==', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_simpleConditions_single_blockMulti() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(1);
+      print(2);
+      print(3);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (1 ==', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(1);
+    print(2);
+    print(3);
+  }
+}
+''');
+  }
+
+  test_simpleConditions_single_blockOne() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1)
+    if (2 == 2) {
+      print(0);
+    }
+}
+''');
+    await assertHasAssistAt('if (1 ==', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_statementAfterInner() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(2);
+    }
+    print(1);
+  }
+}
+''');
+    await assertNoAssistAt('if (1 ==');
+  }
+
+  test_statementBeforeInner() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    print(1);
+    if (2 == 2) {
+      print(2);
+    }
+  }
+}
+''');
+    await assertNoAssistAt('if (1 ==');
+  }
+
+  test_targetNotIf() async {
+    await resolveTestUnit('''
+main() {
+  print(0);
+}
+''');
+    await assertNoAssistAt('print');
+  }
+
+  test_targetWithElse() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    }
+  } else {
+    print(1);
+  }
+}
+''');
+    await assertNoAssistAt('if (1 ==');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/join_if_with_outer_test.dart b/pkg/analysis_server/test/src/services/correction/assist/join_if_with_outer_test.dart
new file mode 100644
index 0000000..ffbd3ab
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/join_if_with_outer_test.dart
@@ -0,0 +1,255 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(JoinIfWithOuterTest);
+  });
+}
+
+@reflectiveTest
+class JoinIfWithOuterTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.JOIN_IF_WITH_OUTER;
+
+  test_conditionAndOr() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2 || 3 == 3) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (2 ==', '''
+main() {
+  if (1 == 1 && (2 == 2 || 3 == 3)) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_conditionInvocation() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (isCheck()) {
+      print(0);
+    }
+  }
+}
+bool isCheck() => false;
+''');
+    await assertHasAssistAt('if (isCheck', '''
+main() {
+  if (1 == 1 && isCheck()) {
+    print(0);
+  }
+}
+bool isCheck() => false;
+''');
+  }
+
+  test_conditionOrAnd() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1 || 2 == 2) {
+    if (3 == 3) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (3 == 3', '''
+main() {
+  if ((1 == 1 || 2 == 2) && 3 == 3) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_onCondition() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (2 == 2', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_outerNotIf() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    print(0);
+  }
+}
+''');
+    await assertNoAssistAt('if (1 == 1');
+  }
+
+  test_outerWithElse() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    }
+  } else {
+    print(1);
+  }
+}
+''');
+    await assertNoAssistAt('if (2 == 2');
+  }
+
+  test_simpleConditions_block_block() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (2 == 2', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_simpleConditions_block_single() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2)
+      print(0);
+  }
+}
+''');
+    await assertHasAssistAt('if (2 == 2', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_simpleConditions_single_blockMulti() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(1);
+      print(2);
+      print(3);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('if (2 == 2', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(1);
+    print(2);
+    print(3);
+  }
+}
+''');
+  }
+
+  test_simpleConditions_single_blockOne() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1)
+    if (2 == 2) {
+      print(0);
+    }
+}
+''');
+    await assertHasAssistAt('if (2 == 2', '''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+}
+''');
+  }
+
+  test_statementAfterInner() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(2);
+    }
+    print(1);
+  }
+}
+''');
+    await assertNoAssistAt('if (2 == 2');
+  }
+
+  test_statementBeforeInner() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    print(1);
+    if (2 == 2) {
+      print(2);
+    }
+  }
+}
+''');
+    await assertNoAssistAt('if (2 == 2');
+  }
+
+  test_targetNotIf() async {
+    await resolveTestUnit('''
+main() {
+  print(0);
+}
+''');
+    await assertNoAssistAt('print');
+  }
+
+  test_targetWithElse() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1) {
+    if (2 == 2) {
+      print(0);
+    } else {
+      print(1);
+    }
+  }
+}
+''');
+    await assertNoAssistAt('if (2 == 2');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/join_variable_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/assist/join_variable_declaration_test.dart
new file mode 100644
index 0000000..3216240
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/join_variable_declaration_test.dart
@@ -0,0 +1,220 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(JoinVariableDeclarationTest);
+  });
+}
+
+@reflectiveTest
+class JoinVariableDeclarationTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.JOIN_VARIABLE_DECLARATION;
+
+  test_onAssignment() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  v = 1;
+}
+''');
+    await assertHasAssistAt('v =', '''
+main() {
+  var v = 1;
+}
+''');
+  }
+
+  test_onAssignment_hasInitializer() async {
+    await resolveTestUnit('''
+main() {
+  var v = 1;
+  v = 2;
+}
+''');
+    await assertNoAssistAt('v = 2');
+  }
+
+  test_onAssignment_notAdjacent() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  var bar;
+  v = 1;
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_onAssignment_notAssignment() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  v += 1;
+}
+''');
+    await assertNoAssistAt('v += 1');
+  }
+
+  test_onAssignment_notDeclaration() async {
+    await resolveTestUnit('''
+main(var v) {
+  v = 1;
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_onAssignment_notLeftArgument() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  1 + v; // marker
+}
+''');
+    await assertNoAssistAt('v; // marker');
+  }
+
+  test_onAssignment_notOneVariable() async {
+    await resolveTestUnit('''
+main() {
+  var v, v2;
+  v = 1;
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_onAssignment_notResolved() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+main() {
+  var v;
+  x = 1;
+}
+''');
+    await assertNoAssistAt('x = 1');
+  }
+
+  test_onAssignment_notSameBlock() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  {
+    v = 1;
+  }
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_onDeclaration_hasInitializer() async {
+    await resolveTestUnit('''
+main() {
+  var v = 1;
+  v = 2;
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_onDeclaration_lastStatement() async {
+    await resolveTestUnit('''
+main() {
+  if (true)
+    var v;
+}
+''');
+    await assertNoAssistAt('v;');
+  }
+
+  test_onDeclaration_nextNotAssignmentExpression() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  42;
+}
+''');
+    await assertNoAssistAt('v;');
+  }
+
+  test_onDeclaration_nextNotExpressionStatement() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  if (true) return;
+}
+''');
+    await assertNoAssistAt('v;');
+  }
+
+  test_onDeclaration_nextNotPureAssignment() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  v += 1;
+}
+''');
+    await assertNoAssistAt('v;');
+  }
+
+  test_onDeclaration_notOneVariable() async {
+    await resolveTestUnit('''
+main() {
+  var v, v2;
+  v = 1;
+}
+''');
+    await assertNoAssistAt('v, ');
+  }
+
+  test_onDeclaration_onName() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  v = 1;
+}
+''');
+    await assertHasAssistAt('v;', '''
+main() {
+  var v = 1;
+}
+''');
+  }
+
+  test_onDeclaration_onType() async {
+    await resolveTestUnit('''
+main() {
+  int v;
+  v = 1;
+}
+''');
+    await assertHasAssistAt('int v', '''
+main() {
+  int v = 1;
+}
+''');
+  }
+
+  test_onDeclaration_onVar() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  v = 1;
+}
+''');
+    await assertHasAssistAt('var v', '''
+main() {
+  var v = 1;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/remove_type_annotation_test.dart b/pkg/analysis_server/test/src/services/correction/assist/remove_type_annotation_test.dart
new file mode 100644
index 0000000..f57eee3
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/remove_type_annotation_test.dart
@@ -0,0 +1,147 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveTypeAnnotationTest);
+  });
+}
+
+@reflectiveTest
+class RemoveTypeAnnotationTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.REMOVE_TYPE_ANNOTATION;
+
+  test_classField() async {
+    await resolveTestUnit('''
+class A {
+  int v = 1;
+}
+''');
+    await assertHasAssistAt('v = ', '''
+class A {
+  var v = 1;
+}
+''');
+  }
+
+  test_classField_final() async {
+    await resolveTestUnit('''
+class A {
+  final int v = 1;
+}
+''');
+    await assertHasAssistAt('v = ', '''
+class A {
+  final v = 1;
+}
+''');
+  }
+
+  test_field_noInitializer() async {
+    await resolveTestUnit('''
+class A {
+  int v;
+}
+''');
+    await assertNoAssistAt('v;');
+  }
+
+  test_localVariable_noInitializer() async {
+    await resolveTestUnit('''
+main() {
+  int v;
+}
+''');
+    await assertNoAssistAt('v;');
+  }
+
+  test_localVariable_onInitializer() async {
+    await resolveTestUnit('''
+main() {
+  final int v = 1;
+}
+''');
+    await assertNoAssistAt('1;');
+  }
+
+  test_localVariable() async {
+    await resolveTestUnit('''
+main() {
+  int a = 1, b = 2;
+}
+''');
+    await assertHasAssistAt('int ', '''
+main() {
+  var a = 1, b = 2;
+}
+''');
+  }
+
+  test_localVariable_const() async {
+    await resolveTestUnit('''
+main() {
+  const int v = 1;
+}
+''');
+    await assertHasAssistAt('int ', '''
+main() {
+  const v = 1;
+}
+''');
+  }
+
+  test_localVariable_final() async {
+    await resolveTestUnit('''
+main() {
+  final int v = 1;
+}
+''');
+    await assertHasAssistAt('int ', '''
+main() {
+  final v = 1;
+}
+''');
+  }
+
+  test_topLevelVariable_noInitializer() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+int v;
+''');
+    await assertNoAssistAt('v;');
+  }
+
+  test_topLevelVariable_syntheticName() async {
+    verifyNoTestUnitErrors = false;
+    await resolveTestUnit('''
+MyType
+''');
+    await assertNoAssistAt('MyType');
+  }
+
+  test_topLevelVariable() async {
+    await resolveTestUnit('''
+int V = 1;
+''');
+    await assertHasAssistAt('int ', '''
+var V = 1;
+''');
+  }
+
+  test_topLevelVariable_final() async {
+    await resolveTestUnit('''
+final int V = 1;
+''');
+    await assertHasAssistAt('int ', '''
+final V = 1;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/replace_conditional_with_if_else_test.dart b/pkg/analysis_server/test/src/services/correction/assist/replace_conditional_with_if_else_test.dart
new file mode 100644
index 0000000..4ef97dd
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/replace_conditional_with_if_else_test.dart
@@ -0,0 +1,103 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceConditionalWithIfElseTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceConditionalWithIfElseTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.REPLACE_CONDITIONAL_WITH_IF_ELSE;
+
+  test_assignment() async {
+    await resolveTestUnit('''
+main() {
+  var v;
+  v = true ? 111 : 222;
+}
+''');
+    // on conditional
+    await assertHasAssistAt('11 :', '''
+main() {
+  var v;
+  if (true) {
+    v = 111;
+  } else {
+    v = 222;
+  }
+}
+''');
+    // on variable
+    await assertHasAssistAt('v =', '''
+main() {
+  var v;
+  if (true) {
+    v = 111;
+  } else {
+    v = 222;
+  }
+}
+''');
+  }
+
+  test_noEnclosingStatement() async {
+    await resolveTestUnit('''
+var v = true ? 111 : 222;
+''');
+    await assertNoAssistAt('? 111');
+  }
+
+  test_notConditional() async {
+    await resolveTestUnit('''
+main() {
+  var v = 42;
+}
+''');
+    await assertNoAssistAt('v = 42');
+  }
+
+  test_return() async {
+    await resolveTestUnit('''
+main() {
+  return true ? 111 : 222;
+}
+''');
+    await assertHasAssistAt('return ', '''
+main() {
+  if (true) {
+    return 111;
+  } else {
+    return 222;
+  }
+}
+''');
+  }
+
+  test_variableDeclaration() async {
+    await resolveTestUnit('''
+main() {
+  int a = 1, vvv = true ? 111 : 222, b = 2;
+}
+''');
+    await assertHasAssistAt('11 :', '''
+main() {
+  int a = 1, vvv, b = 2;
+  if (true) {
+    vvv = 111;
+  } else {
+    vvv = 222;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/replace_if_else_with_conditional_test.dart b/pkg/analysis_server/test/src/services/correction/assist/replace_if_else_with_conditional_test.dart
new file mode 100644
index 0000000..a21af08
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/replace_if_else_with_conditional_test.dart
@@ -0,0 +1,95 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceIfElseWithConditionalTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceIfElseWithConditionalTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL;
+
+  test_assignment() async {
+    await resolveTestUnit('''
+main() {
+  int vvv;
+  if (true) {
+    vvv = 111;
+  } else {
+    vvv = 222;
+  }
+}
+''');
+    await assertHasAssistAt('if (true)', '''
+main() {
+  int vvv;
+  vvv = true ? 111 : 222;
+}
+''');
+  }
+
+  test_expressionVsReturn() async {
+    await resolveTestUnit('''
+main() {
+  if (true) {
+    print(42);
+  } else {
+    return;
+  }
+}
+''');
+    await assertNoAssistAt('else');
+  }
+
+  test_notIfStatement() async {
+    await resolveTestUnit('''
+main() {
+  print(0);
+}
+''');
+    await assertNoAssistAt('print');
+  }
+
+  test_notSingleStatement() async {
+    await resolveTestUnit('''
+main() {
+  int vvv;
+  if (true) {
+    print(0);
+    vvv = 111;
+  } else {
+    print(0);
+    vvv = 222;
+  }
+}
+''');
+    await assertNoAssistAt('if (true)');
+  }
+
+  test_return() async {
+    await resolveTestUnit('''
+main() {
+  if (true) {
+    return 111;
+  } else {
+    return 222;
+  }
+}
+''');
+    await assertHasAssistAt('if (true)', '''
+main() {
+  return true ? 111 : 222;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/split_and_condition_test.dart b/pkg/analysis_server/test/src/services/correction/assist/split_and_condition_test.dart
new file mode 100644
index 0000000..31127f0
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/split_and_condition_test.dart
@@ -0,0 +1,158 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SplitAndConditionTest);
+  });
+}
+
+@reflectiveTest
+class SplitAndConditionTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SPLIT_AND_CONDITION;
+
+  test_hasElse() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(1);
+  } else {
+    print(2);
+  }
+}
+''');
+    await assertNoAssistAt('&& 2');
+  }
+
+  test_innerAndExpression() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1 && 2 == 2 && 3 == 3) {
+    print(0);
+  }
+}
+''');
+    await assertHasAssistAt('&& 2 == 2', '''
+main() {
+  if (1 == 1) {
+    if (2 == 2 && 3 == 3) {
+      print(0);
+    }
+  }
+}
+''');
+  }
+
+  test_notAnd() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1 || 2 == 2) {
+    print(0);
+  }
+}
+''');
+    await assertNoAssistAt('|| 2');
+  }
+
+  test_notOnOperator() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1 && 2 == 2) {
+    print(0);
+  }
+  print(3 == 3 && 4 == 4);
+}
+''');
+    await assertNoAssistAt('main() {');
+  }
+
+  test_notPartOfIf() async {
+    await resolveTestUnit('''
+main() {
+  print(1 == 1 && 2 == 2);
+}
+''');
+    await assertNoAssistAt('&& 2');
+  }
+
+  test_notTopLevelAnd() async {
+    await resolveTestUnit('''
+main() {
+  if (true || (1 == 1 && 2 == 2)) {
+    print(0);
+  }
+  if (true && (3 == 3 && 4 == 4)) {
+    print(0);
+  }
+}
+''');
+    await assertNoAssistAt('&& 2');
+    await assertNoAssistAt('&& 4');
+  }
+
+  test_selectionTooLarge() async {
+    await resolveTestUnit('''
+main() {
+  if (1 == 1
+// start
+&& 2 
+// end
+== 2
+) {
+    print(0);
+  }
+  print(3 == 3 && 4 == 4);
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_thenBlock() async {
+    await resolveTestUnit('''
+main() {
+  if (true && false) {
+    print(0);
+    if (3 == 3) {
+      print(1);
+    }
+  }
+}
+''');
+    await assertHasAssistAt('&& false', '''
+main() {
+  if (true) {
+    if (false) {
+      print(0);
+      if (3 == 3) {
+        print(1);
+      }
+    }
+  }
+}
+''');
+  }
+
+  test_thenStatement() async {
+    await resolveTestUnit('''
+main() {
+  if (true && false)
+    print(0);
+}
+''');
+    await assertHasAssistAt('&& false', '''
+main() {
+  if (true)
+    if (false)
+      print(0);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/split_variable_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/assist/split_variable_declaration_test.dart
new file mode 100644
index 0000000..aed39c3
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/split_variable_declaration_test.dart
@@ -0,0 +1,105 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SplitVariableDeclarationTest);
+  });
+}
+
+@reflectiveTest
+class SplitVariableDeclarationTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SPLIT_VARIABLE_DECLARATION;
+
+  test_const() async {
+    await resolveTestUnit('''
+main() {
+  const v = 1;
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_final() async {
+    await resolveTestUnit('''
+main() {
+  final v = 1;
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_notOneVariable() async {
+    await resolveTestUnit('''
+main() {
+  var v = 1, v2;
+}
+''');
+    await assertNoAssistAt('v = 1');
+  }
+
+  test_onName() async {
+    await resolveTestUnit('''
+main() {
+  var v = 1;
+}
+''');
+    await assertHasAssistAt('v =', '''
+main() {
+  int v;
+  v = 1;
+}
+''');
+  }
+
+  test_onType() async {
+    await resolveTestUnit('''
+main() {
+  int v = 1;
+}
+''');
+    await assertHasAssistAt('int ', '''
+main() {
+  int v;
+  v = 1;
+}
+''');
+  }
+
+  @failingTest
+  test_onType_prefixedByComment() async {
+    await resolveTestUnit('''
+main() {
+  /*comment*/int v = 1;
+}
+''');
+    await assertHasAssistAt('int ', '''
+main() {
+  /*comment*/int v;
+  v = 1;
+}
+''');
+  }
+
+  test_onVar() async {
+    await resolveTestUnit('''
+main() {
+  var v = 1;
+}
+''');
+    await assertHasAssistAt('var ', '''
+main() {
+  int v;
+  v = 1;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_block_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_block_test.dart
new file mode 100644
index 0000000..f4647be
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_block_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithBlockTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithBlockTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_BLOCK;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  {
+    print(0);
+    print(1);
+  }
+// end
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_do_while_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_do_while_test.dart
new file mode 100644
index 0000000..96fbd14
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_do_while_test.dart
@@ -0,0 +1,44 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithDoWhileTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithDoWhileTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_DO_WHILE;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  do {
+    print(0);
+    print(1);
+  } while (condition);
+// end
+}
+''');
+    assertLinkedGroup(0, ['condition);']);
+    assertExitPosition(after: 'condition);');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_for_in_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_for_in_test.dart
new file mode 100644
index 0000000..c775e1c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_for_in_test.dart
@@ -0,0 +1,45 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithForInTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithForInTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_FOR_IN;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  for (var item in iterable) {
+    print(0);
+    print(1);
+  }
+// end
+}
+''');
+    assertLinkedGroup(0, ['item']);
+    assertLinkedGroup(1, ['iterable']);
+    assertExitPosition(after: '  }');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_for_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_for_test.dart
new file mode 100644
index 0000000..770684c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_for_test.dart
@@ -0,0 +1,47 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithForTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithForTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_FOR;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  for (var v = init; condition; increment) {
+    print(0);
+    print(1);
+  }
+// end
+}
+''');
+    assertLinkedGroup(0, ['v =']);
+    assertLinkedGroup(1, ['init;']);
+    assertLinkedGroup(2, ['condition;']);
+    assertLinkedGroup(3, ['increment']);
+    assertExitPosition(after: '  }');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_if_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_if_test.dart
new file mode 100644
index 0000000..de8df15
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_if_test.dart
@@ -0,0 +1,44 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithIfTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithIfTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_IF;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  if (condition) {
+    print(0);
+    print(1);
+  }
+// end
+}
+''');
+    assertLinkedGroup(0, ['condition']);
+    assertExitPosition(after: '  }');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_try_catch_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_try_catch_test.dart
new file mode 100644
index 0000000..f39a5e0
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_try_catch_test.dart
@@ -0,0 +1,48 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithTryCatchTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithTryCatchTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_TRY_CATCH;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  try {
+    print(0);
+    print(1);
+  } on Exception catch (e) {
+    // TODO
+  }
+// end
+}
+''');
+    assertLinkedGroup(0, ['Exception']);
+    assertLinkedGroup(1, ['e) {']);
+    assertLinkedGroup(2, ['// TODO']);
+    assertExitPosition(after: '// TODO');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_try_finally_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_try_finally_test.dart
new file mode 100644
index 0000000..7e9267c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_try_finally_test.dart
@@ -0,0 +1,46 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithTryFinallyTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithTryFinallyTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_TRY_FINALLY;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  try {
+    print(0);
+    print(1);
+  } finally {
+    // TODO
+  }
+// end
+}
+''');
+    assertLinkedGroup(0, ['// TODO']);
+    assertExitPosition(after: '// TODO');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/surround_with_while_test.dart b/pkg/analysis_server/test/src/services/correction/assist/surround_with_while_test.dart
new file mode 100644
index 0000000..939e211
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/surround_with_while_test.dart
@@ -0,0 +1,44 @@
+// 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:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SurroundWithWhileTest);
+  });
+}
+
+@reflectiveTest
+class SurroundWithWhileTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.SURROUND_WITH_WHILE;
+
+  test_twoStatements() async {
+    await resolveTestUnit('''
+main() {
+// start
+  print(0);
+  print(1);
+// end
+}
+''');
+    await assertHasAssist('''
+main() {
+// start
+  while (condition) {
+    print(0);
+    print(1);
+  }
+// end
+}
+''');
+    assertLinkedGroup(0, ['condition']);
+    assertExitPosition(after: '  }');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/test_all.dart b/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
new file mode 100644
index 0000000..be58fce
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
@@ -0,0 +1,129 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'add_type_annotation_test.dart' as add_type_annotation;
+import 'assign_to_local_variable_test.dart' as assign_to_local_variable;
+import 'convert_class_to_mixin_test.dart' as convert_class_to_mixin;
+import 'convert_documentation_into_block_test.dart'
+    as convert_documentation_into_block;
+import 'convert_documentation_into_line_test.dart'
+    as convert_documentation_into_line;
+import 'convert_into_async_body_test.dart' as convert_into_async_body;
+import 'convert_into_block_body_test.dart' as convert_into_block_body;
+import 'convert_into_expression_body_test.dart' as convert_into_expression_body;
+import 'convert_into_final_field_test.dart' as convert_into_final_field;
+import 'convert_into_for_index_test.dart' as convert_into_for_index;
+import 'convert_into_generic_function_syntax_test.dart'
+    as convert_into_generic_function_syntax;
+import 'convert_into_getter_test.dart' as convert_into_getter;
+import 'convert_into_is_not_empty_test.dart' as convert_into_is_not_empty;
+import 'convert_into_is_not_test.dart' as convert_into_is_not;
+import 'convert_part_of_to_uri_test.dart' as convert_part_of_to_uri;
+import 'convert_to_double_quoted_string_test.dart'
+    as convert_to_double_quoted_string;
+import 'convert_to_field_parameter_test.dart' as convert_to_field_parameter;
+import 'convert_to_int_literal_test.dart' as convert_to_int_literal;
+import 'convert_to_normal_parameter_test.dart' as convert_to_normal_parameter;
+import 'convert_to_single_quoted_string_test.dart'
+    as convert_to_single_quoted_string;
+import 'encapsulate_field_test.dart' as encapsulate_field;
+import 'exchange_operands_test.dart' as exchange_operands;
+import 'flutter_convert_to_children_test.dart' as flutter_convert_to_children;
+import 'flutter_convert_to_stateful_widget_test.dart'
+    as flutter_convert_to_stateful_widget;
+import 'flutter_move_down_test.dart' as flutter_move_down;
+import 'flutter_move_up_test.dart' as flutter_move_up;
+import 'flutter_remove_widget_test.dart' as flutter_remove_widget;
+import 'flutter_swap_with_child_test.dart' as flutter_swap_with_child;
+import 'flutter_swap_with_parent_test.dart' as flutter_swap_with_parent;
+import 'flutter_wrap_center_test.dart' as flutter_wrap_center;
+import 'flutter_wrap_column_test.dart' as flutter_wrap_column;
+import 'flutter_wrap_container_test.dart' as flutter_wrap_container;
+import 'flutter_wrap_generic_test.dart' as flutter_wrap_generic;
+import 'flutter_wrap_padding_test.dart' as flutter_wrap_padding;
+import 'flutter_wrap_row_test.dart' as flutter_wrap_row;
+import 'flutter_wrap_stream_builder_test.dart' as flutter_wrap_stream_builder;
+import 'import_add_show_test.dart' as import_add_show;
+import 'introduce_local_cast_type_test.dart' as introduce_local_cast_type;
+import 'invert_if_statement_test.dart' as invert_if_statement;
+import 'join_if_with_inner_test.dart' as join_if_with_inner;
+import 'join_if_with_outer_test.dart' as join_if_with_outer;
+import 'join_variable_declaration_test.dart' as join_variable_declaration;
+import 'remove_type_annotation_test.dart' as remove_type_annotation;
+import 'replace_conditional_with_if_else_test.dart'
+    as replace_conditional_with_if_else;
+import 'replace_if_else_with_conditional_test.dart'
+    as replace_if_else_with_conditional;
+import 'split_and_condition_test.dart' as split_and_condition;
+import 'split_variable_declaration_test.dart' as split_variable_declaration;
+import 'surround_with_block_test.dart' as surround_with_block;
+import 'surround_with_do_while_test.dart' as surround_with_do_while;
+import 'surround_with_for_in_test.dart' as surround_with_for_in;
+import 'surround_with_for_test.dart' as surround_with_for;
+import 'surround_with_if_test.dart' as surround_with_if;
+import 'surround_with_try_catch_test.dart' as surround_with_try_catch;
+import 'surround_with_try_finally_test.dart' as surround_with_try_finally;
+import 'surround_with_while_test.dart' as surround_with_while;
+
+main() {
+  defineReflectiveSuite(() {
+    add_type_annotation.main();
+    assign_to_local_variable.main();
+    convert_class_to_mixin.main();
+    convert_documentation_into_block.main();
+    convert_documentation_into_line.main();
+    convert_into_async_body.main();
+    convert_into_block_body.main();
+    convert_into_expression_body.main();
+    convert_into_final_field.main();
+    convert_into_for_index.main();
+    convert_into_generic_function_syntax.main();
+    convert_into_getter.main();
+    convert_into_is_not.main();
+    convert_into_is_not_empty.main();
+    convert_part_of_to_uri.main();
+    convert_to_double_quoted_string.main();
+    convert_to_field_parameter.main();
+    convert_to_int_literal.main();
+    convert_to_normal_parameter.main();
+    convert_to_single_quoted_string.main();
+    encapsulate_field.main();
+    exchange_operands.main();
+    flutter_convert_to_children.main();
+    flutter_convert_to_stateful_widget.main();
+    flutter_move_down.main();
+    flutter_move_up.main();
+    flutter_remove_widget.main();
+    flutter_swap_with_child.main();
+    flutter_swap_with_parent.main();
+    flutter_wrap_center.main();
+    flutter_wrap_column.main();
+    flutter_wrap_container.main();
+    flutter_wrap_generic.main();
+    flutter_wrap_padding.main();
+    flutter_wrap_row.main();
+    flutter_wrap_stream_builder.main();
+    import_add_show.main();
+    introduce_local_cast_type.main();
+    invert_if_statement.main();
+    join_if_with_inner.main();
+    join_if_with_outer.main();
+    join_variable_declaration.main();
+    remove_type_annotation.main();
+    replace_conditional_with_if_else.main();
+    replace_if_else_with_conditional.main();
+    split_and_condition.main();
+    split_variable_declaration.main();
+    surround_with_block.main();
+    surround_with_do_while.main();
+    surround_with_for.main();
+    surround_with_for_in.main();
+    surround_with_if.main();
+    surround_with_try_catch.main();
+    surround_with_try_finally.main();
+    surround_with_while.main();
+  }, name: 'assist');
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
new file mode 100644
index 0000000..49938b4
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
@@ -0,0 +1,199 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddAsyncTest);
+  });
+}
+
+@reflectiveTest
+class AddAsyncTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_ASYNC;
+
+  test_asyncFor() async {
+    await resolveTestUnit('''
+import 'dart:async';
+void main(Stream<String> names) {
+  await for (String name in names) {
+    print(name);
+  }
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+Future main(Stream<String> names) async {
+  await for (String name in names) {
+    print(name);
+  }
+}
+''');
+  }
+
+  test_blockFunctionBody_function() async {
+    await resolveTestUnit('''
+foo() {}
+main() {
+  await foo();
+}
+''');
+    await assertHasFix('''
+foo() {}
+main() async {
+  await foo();
+}
+''', errorFilter: (AnalysisError error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
+    });
+  }
+
+  test_blockFunctionBody_getter() async {
+    await resolveTestUnit('''
+int get foo => null;
+int f() {
+  await foo;
+  return 1;
+}
+''');
+    await assertHasFix('''
+int get foo => null;
+Future<int> f() async {
+  await foo;
+  return 1;
+}
+''', errorFilter: (AnalysisError error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
+    });
+  }
+
+  test_closure() async {
+    await resolveTestUnit('''
+import 'dart:async';
+
+void takeFutureCallback(Future callback()) {}
+
+void doStuff() => takeFutureCallback(() => await 1);
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+void takeFutureCallback(Future callback()) {}
+
+void doStuff() => takeFutureCallback(() async => await 1);
+''', errorFilter: (AnalysisError error) {
+      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT;
+    });
+  }
+
+  test_expressionFunctionBody() async {
+    await resolveTestUnit('''
+foo() {}
+main() => await foo();
+''');
+    await assertHasFix('''
+foo() {}
+main() async => await foo();
+''');
+  }
+
+  test_nullFunctionBody() async {
+    await resolveTestUnit('''
+var F = await;
+''');
+    await assertNoFix();
+  }
+
+  test_returnFuture_alreadyFuture() async {
+    await resolveTestUnit('''
+import 'dart:async';
+foo() {}
+Future<int> main() {
+  await foo();
+  return 42;
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+foo() {}
+Future<int> main() async {
+  await foo();
+  return 42;
+}
+''', errorFilter: (AnalysisError error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
+    });
+  }
+
+  test_returnFuture_dynamic() async {
+    await resolveTestUnit('''
+foo() {}
+dynamic main() {
+  await foo();
+  return 42;
+}
+''');
+    await assertHasFix('''
+foo() {}
+dynamic main() async {
+  await foo();
+  return 42;
+}
+''', errorFilter: (AnalysisError error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
+    });
+  }
+
+  test_returnFuture_nonFuture() async {
+    await resolveTestUnit('''
+foo() {}
+int main() {
+  await foo();
+  return 42;
+}
+''');
+    await assertHasFix('''
+foo() {}
+Future<int> main() async {
+  await foo();
+  return 42;
+}
+''', errorFilter: (AnalysisError error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
+    });
+  }
+
+  test_returnFuture_noType() async {
+    await resolveTestUnit('''
+foo() {}
+main() {
+  await foo();
+  return 42;
+}
+''');
+    await assertHasFix('''
+foo() {}
+main() async {
+  await foo();
+  return 42;
+}
+''', errorFilter: (AnalysisError error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
+    });
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_explicit_cast_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_explicit_cast_test.dart
new file mode 100644
index 0000000..e0ff288
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_explicit_cast_test.dart
@@ -0,0 +1,463 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddExplicitCastTest);
+  });
+}
+
+@reflectiveTest
+class AddExplicitCastTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_EXPLICIT_CAST;
+
+  test_as() async {
+    await resolveTestUnit('''
+f(A a) {
+  C c = a as B;
+  print(c);
+}
+class A {}
+class B {}
+class C {}
+''');
+    await assertNoFix();
+  }
+
+  test_assignment_general() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b;
+  b = a;
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(A a) {
+  B b;
+  b = a as B;
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_assignment_general_all() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b, b2;
+  b = a;
+  b2 = a;
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(A a) {
+  B b, b2;
+  b = a as B;
+  b2 = a as B;
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_assignment_list() async {
+    await resolveTestUnit('''
+f(List<A> a) {
+  List<B> b;
+  b = a.where((e) => e is B).toList();
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(List<A> a) {
+  List<B> b;
+  b = a.where((e) => e is B).cast<B>().toList();
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_assignment_list_all() async {
+    await resolveTestUnit('''
+f(List<A> a) {
+  List<B> b, b2;
+  b = a.where((e) => e is B).toList();
+  b2 = a.where((e) => e is B).toList();
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(List<A> a) {
+  List<B> b, b2;
+  b = a.where((e) => e is B).cast<B>().toList();
+  b2 = a.where((e) => e is B).cast<B>().toList();
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_assignment_map() async {
+    await resolveTestUnit('''
+f(Map<A, B> a) {
+  Map<B, A> b;
+  b = a;
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(Map<A, B> a) {
+  Map<B, A> b;
+  b = a.cast<B, A>();
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_assignment_map_all() async {
+    await resolveTestUnit('''
+f(Map<A, B> a) {
+  Map<B, A> b, b2;
+  b = a;
+  b2 = a;
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(Map<A, B> a) {
+  Map<B, A> b, b2;
+  b = a.cast<B, A>();
+  b2 = a.cast<B, A>();
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_assignment_needsParens() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b;
+  b = a..m();
+  print(b);
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+    await assertHasFix('''
+f(A a) {
+  B b;
+  b = (a..m()) as B;
+  print(b);
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+  }
+
+  test_assignment_needsParens_all() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b, b2;
+  b = a..m();
+  b2 = a..m();
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(A a) {
+  B b, b2;
+  b = (a..m()) as B;
+  b2 = (a..m()) as B;
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+  }
+
+  test_assignment_set() async {
+    await resolveTestUnit('''
+f(Set<A> a) {
+  Set<B> b;
+  b = a;
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(Set<A> a) {
+  Set<B> b;
+  b = a.cast<B>();
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_assignment_set_all() async {
+    await resolveTestUnit('''
+f(Set<A> a) {
+  Set<B> b, b2;
+  b = a;
+  b2 = a;
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(Set<A> a) {
+  Set<B> b, b2;
+  b = a.cast<B>();
+  b2 = a.cast<B>();
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_cast() async {
+    await resolveTestUnit('''
+f(List<A> a) {
+  List<B> b = a.cast<A>();
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertNoFix();
+  }
+
+  test_declaration_general() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b = a;
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(A a) {
+  B b = a as B;
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_declaration_general_all() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b = a;
+  B b2 = a;
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(A a) {
+  B b = a as B;
+  B b2 = a as B;
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_declaration_list() async {
+    await resolveTestUnit('''
+f(List<A> a) {
+  List<B> b = a.where((e) => e is B).toList();
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(List<A> a) {
+  List<B> b = a.where((e) => e is B).cast<B>().toList();
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_declaration_list_all() async {
+    await resolveTestUnit('''
+f(List<A> a) {
+  List<B> b = a.where((e) => e is B).toList();
+  List<B> b2 = a.where((e) => e is B).toList();
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(List<A> a) {
+  List<B> b = a.where((e) => e is B).cast<B>().toList();
+  List<B> b2 = a.where((e) => e is B).cast<B>().toList();
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_declaration_map() async {
+    await resolveTestUnit('''
+f(Map<A, B> a) {
+  Map<B, A> b = a;
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(Map<A, B> a) {
+  Map<B, A> b = a.cast<B, A>();
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_declaration_map_all() async {
+    await resolveTestUnit('''
+f(Map<A, B> a) {
+  Map<B, A> b = a;
+  Map<B, A> b2 = a;
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(Map<A, B> a) {
+  Map<B, A> b = a.cast<B, A>();
+  Map<B, A> b2 = a.cast<B, A>();
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_declaration_needsParens() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b = a..m();
+  print(b);
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+    await assertHasFix('''
+f(A a) {
+  B b = (a..m()) as B;
+  print(b);
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+  }
+
+  test_declaration_needsParens_all() async {
+    await resolveTestUnit('''
+f(A a) {
+  B b = a..m();
+  B b2 = a..m();
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(A a) {
+  B b = (a..m()) as B;
+  B b2 = (a..m()) as B;
+}
+class A {
+  int m() => 0;
+}
+class B {}
+''');
+  }
+
+  test_declaration_set() async {
+    await resolveTestUnit('''
+f(Set<A> a) {
+  Set<B> b = a;
+  print(b);
+}
+class A {}
+class B {}
+''');
+    await assertHasFix('''
+f(Set<A> a) {
+  Set<B> b = a.cast<B>();
+  print(b);
+}
+class A {}
+class B {}
+''');
+  }
+
+  test_declaration_set_all() async {
+    await resolveTestUnit('''
+f(Set<A> a) {
+  Set<B> b = a;
+  Set<B> b2 = a;
+}
+class A {}
+class B {}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.INVALID_ASSIGNMENT, '''
+f(Set<A> a) {
+  Set<B> b = a.cast<B>();
+  Set<B> b2 = a.cast<B>();
+}
+class A {}
+class B {}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_field_formal_parameters_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_field_formal_parameters_test.dart
new file mode 100644
index 0000000..172aee9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_field_formal_parameters_test.dart
@@ -0,0 +1,123 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddFieldFormalParametersTest);
+  });
+}
+
+@reflectiveTest
+class AddFieldFormalParametersTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_FIELD_FORMAL_PARAMETERS;
+
+  test_flutter() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final int b;
+  final int c;
+
+  MyWidget({Key key, this.a}) : super(key: key);
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final int b;
+  final int c;
+
+  MyWidget({Key key, this.a, this.b, this.c}) : super(key: key);
+}
+''');
+  }
+
+  test_hasRequiredParameter() async {
+    await resolveTestUnit('''
+class Test {
+  final int a;
+  final int b;
+  final int c;
+  Test(this.a);
+}
+''');
+    await assertHasFix('''
+class Test {
+  final int a;
+  final int b;
+  final int c;
+  Test(this.a, this.b, this.c);
+}
+''');
+  }
+
+  test_noParameters() async {
+    await resolveTestUnit('''
+class Test {
+  final int a;
+  final int b;
+  final int c;
+  Test();
+}
+''');
+    await assertHasFix('''
+class Test {
+  final int a;
+  final int b;
+  final int c;
+  Test(this.a, this.b, this.c);
+}
+''');
+  }
+
+  test_noRequiredParameter() async {
+    await resolveTestUnit('''
+class Test {
+  final int a;
+  final int b;
+  final int c;
+  Test([this.c]);
+}
+''');
+    await assertHasFix('''
+class Test {
+  final int a;
+  final int b;
+  final int c;
+  Test(this.a, this.b, [this.c]);
+}
+''');
+  }
+
+  test_notAllFinal() async {
+    await resolveTestUnit('''
+class Test {
+  final int a;
+  int b;
+  final int c;
+  Test();
+}
+''');
+    await assertHasFix('''
+class Test {
+  final int a;
+  int b;
+  final int c;
+  Test(this.a, this.c);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_named_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_named_test.dart
new file mode 100644
index 0000000..0378f7e
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_named_test.dart
@@ -0,0 +1,232 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddMissingParameterNamedTest);
+  });
+}
+
+@reflectiveTest
+class AddMissingParameterNamedTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_MISSING_PARAMETER_NAMED;
+
+  test_constructor_hasNamed() async {
+    await resolveTestUnit('''
+class A {
+  A(int a, {int b}) {}
+}
+
+main() {
+  new A(1, b: 2, named: 3.0);
+}
+''');
+    await assertHasFix('''
+class A {
+  A(int a, {int b, double named}) {}
+}
+
+main() {
+  new A(1, b: 2, named: 3.0);
+}
+''');
+  }
+
+  test_constructor_hasRequired() async {
+    await resolveTestUnit('''
+class A {
+  A(int a) {}
+}
+
+main() {
+  new A(1, named: 2.0);
+}
+''');
+    await assertHasFix('''
+class A {
+  A(int a, {double named}) {}
+}
+
+main() {
+  new A(1, named: 2.0);
+}
+''');
+  }
+
+  test_constructor_noParameters() async {
+    await resolveTestUnit('''
+class A {
+  A() {}
+}
+
+main() {
+  new A(named: 42);
+}
+''');
+    await assertHasFix('''
+class A {
+  A({int named}) {}
+}
+
+main() {
+  new A(named: 42);
+}
+''');
+  }
+
+  test_constructor_noParameters_named() async {
+    await resolveTestUnit('''
+class A {
+  A.aaa() {}
+}
+
+main() {
+  new A.aaa(named: 42);
+}
+''');
+    await assertHasFix('''
+class A {
+  A.aaa({int named}) {}
+}
+
+main() {
+  new A.aaa(named: 42);
+}
+''');
+  }
+
+  test_function_hasNamed() async {
+    await resolveTestUnit('''
+test(int a, {int b: 0}) {}
+
+main() {
+  test(1, b: 2, named: 3.0);
+}
+''');
+    await assertHasFix('''
+test(int a, {int b: 0, double named}) {}
+
+main() {
+  test(1, b: 2, named: 3.0);
+}
+''');
+  }
+
+  test_function_hasRequired() async {
+    await resolveTestUnit('''
+test(int a) {}
+
+main() {
+  test(1, named: 2.0);
+}
+''');
+    await assertHasFix('''
+test(int a, {double named}) {}
+
+main() {
+  test(1, named: 2.0);
+}
+''');
+  }
+
+  test_function_noParameters() async {
+    await resolveTestUnit('''
+test() {}
+
+main() {
+  test(named: 42);
+}
+''');
+    await assertHasFix('''
+test({int named}) {}
+
+main() {
+  test(named: 42);
+}
+''');
+  }
+
+  test_method_hasNamed() async {
+    await resolveTestUnit('''
+class A {
+  test(int a, {int b: 0}) {}
+
+  main() {
+    test(1, b: 2, named: 3.0);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  test(int a, {int b: 0, double named}) {}
+
+  main() {
+    test(1, b: 2, named: 3.0);
+  }
+}
+''');
+  }
+
+  test_method_hasOptionalPositional() async {
+    await resolveTestUnit('''
+class A {
+  test(int a, [int b]) {}
+
+  main() {
+    test(1, 2, named: 3.0);
+  }
+}
+''');
+    await assertNoFix();
+  }
+
+  test_method_hasRequired() async {
+    await resolveTestUnit('''
+class A {
+  test(int a) {}
+
+  main() {
+    test(1, named: 2.0);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  test(int a, {double named}) {}
+
+  main() {
+    test(1, named: 2.0);
+  }
+}
+''');
+  }
+
+  test_method_noParameters() async {
+    await resolveTestUnit('''
+class A {
+  test() {}
+
+  main() {
+    test(named: 42);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  test({int named}) {}
+
+  main() {
+    test(named: 42);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_positional_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_positional_test.dart
new file mode 100644
index 0000000..ba8e53d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_positional_test.dart
@@ -0,0 +1,65 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddMissingParameterPositionalTest);
+  });
+}
+
+@reflectiveTest
+class AddMissingParameterPositionalTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_MISSING_PARAMETER_POSITIONAL;
+
+  test_function_hasNamed() async {
+    await resolveTestUnit('''
+test({int a}) {}
+main() {
+  test(1);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_function_hasZero() async {
+    await resolveTestUnit('''
+test() {}
+main() {
+  test(1);
+}
+''');
+    await assertHasFix('''
+test([int i]) {}
+main() {
+  test(1);
+}
+''');
+  }
+
+  test_method_hasOne() async {
+    await resolveTestUnit('''
+class A {
+  test(int a) {}
+  main() {
+    test(1, 2.0);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  test(int a, [double d]) {}
+  main() {
+    test(1, 2.0);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_required_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_required_test.dart
new file mode 100644
index 0000000..b66930d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_parameter_required_test.dart
@@ -0,0 +1,201 @@
+// 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:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddMissingParameterRequiredTest);
+    defineReflectiveTests(AddMissingParameterRequiredTest_Workspace);
+  });
+}
+
+@reflectiveTest
+class AddMissingParameterRequiredTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_MISSING_PARAMETER_REQUIRED;
+
+  test_constructor_named_hasOne() async {
+    await resolveTestUnit('''
+class A {
+  A.named(int a) {}
+}
+main() {
+  new A.named(1, 2.0);
+}
+''');
+    await assertHasFix('''
+class A {
+  A.named(int a, double d) {}
+}
+main() {
+  new A.named(1, 2.0);
+}
+''');
+  }
+
+  test_constructor_unnamed_hasOne() async {
+    await resolveTestUnit('''
+class A {
+  A(int a) {}
+}
+main() {
+  new A(1, 2.0);
+}
+''');
+    await assertHasFix('''
+class A {
+  A(int a, double d) {}
+}
+main() {
+  new A(1, 2.0);
+}
+''');
+  }
+
+  test_function_hasNamed() async {
+    await resolveTestUnit('''
+test({int a}) {}
+main() {
+  test(1);
+}
+''');
+    await assertHasFix('''
+test(int i, {int a}) {}
+main() {
+  test(1);
+}
+''');
+  }
+
+  test_function_hasOne() async {
+    await resolveTestUnit('''
+test(int a) {}
+main() {
+  test(1, 2.0);
+}
+''');
+    await assertHasFix('''
+test(int a, double d) {}
+main() {
+  test(1, 2.0);
+}
+''');
+  }
+
+  test_function_hasZero() async {
+    await resolveTestUnit('''
+test() {}
+main() {
+  test(1);
+}
+''');
+    await assertHasFix('''
+test(int i) {}
+main() {
+  test(1);
+}
+''');
+  }
+
+  test_method_hasOne() async {
+    await resolveTestUnit('''
+class A {
+  test(int a) {}
+  main() {
+    test(1, 2.0);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  test(int a, double d) {}
+  main() {
+    test(1, 2.0);
+  }
+}
+''');
+  }
+
+  test_method_hasZero() async {
+    await resolveTestUnit('''
+class A {
+  test() {}
+  main() {
+    test(1);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  test(int i) {}
+  main() {
+    test(1);
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
+class AddMissingParameterRequiredTest_Workspace
+    extends AddMissingParameterRequiredTest {
+  ChangeWorkspace _workspace;
+
+  @override
+  ChangeWorkspace get workspace {
+    return _workspace ?? super.workspace;
+  }
+
+  test_function_inPackage_inWorkspace() async {
+    newFile('/home/aaa/lib/a.dart', content: 'void test() {}');
+    addTestPackageDependency('aaa', '/home/aaa');
+
+    _workspace = DartChangeWorkspace([
+      session,
+      getContext('/home/aaa').currentSession,
+    ]);
+
+    await resolveTestUnit('''
+import 'package:aaa/a.dart';
+
+main() {
+  test(42);
+}
+''');
+
+    await assertHasFix(
+      'void test(int i) {}',
+      target: '/home/aaa/lib/a.dart',
+    );
+  }
+
+  test_function_inPackage_outsideWorkspace() async {
+    addPackageFile('bbb', 'b.dart', 'void test() {}');
+
+    await resolveTestUnit('''
+import 'package:bbb/b.dart';
+
+main() {
+  test(42);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_method_inSdk() async {
+    await resolveTestUnit('''
+main() {
+  42.abs(true);
+}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_required_argument_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_required_argument_test.dart
new file mode 100644
index 0000000..20df52c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_required_argument_test.dart
@@ -0,0 +1,369 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddMissingRequiredArgumentTest);
+  });
+}
+
+@reflectiveTest
+class AddMissingRequiredArgumentTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_MISSING_REQUIRED_ARGUMENT;
+
+  test_cons_flutter_children() async {
+    addFlutterPackage();
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+import 'package:meta/meta.dart';
+
+class MyWidget extends Widget {
+  MyWidget({@required List<Widget> children});
+}
+
+build() {
+  return new MyWidget();
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+import 'package:meta/meta.dart';
+
+class MyWidget extends Widget {
+  MyWidget({@required List<Widget> children});
+}
+
+build() {
+  return new MyWidget(children: <Widget>[],);
+}
+''');
+  }
+
+  test_cons_flutter_hasTrailingComma() async {
+    addFlutterPackage();
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+import 'package:meta/meta.dart';
+
+class MyWidget extends Widget {
+  MyWidget({@required int a, @required int b});
+}
+
+build() {
+  return new MyWidget(a: 1,);
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+import 'package:meta/meta.dart';
+
+class MyWidget extends Widget {
+  MyWidget({@required int a, @required int b});
+}
+
+build() {
+  return new MyWidget(a: 1, b: null,);
+}
+''');
+  }
+
+  test_cons_single() async {
+    addMetaPackage();
+    addSource('/home/test/lib/a.dart', r'''
+import 'package:meta/meta.dart';
+
+class A {
+  A({@required int a}) {}
+}
+''');
+    await resolveTestUnit('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(a: null);
+  print(a);
+}
+''');
+  }
+
+  test_cons_single_closure() async {
+    addMetaPackage();
+    addSource('/home/test/lib/a.dart', r'''
+import 'package:meta/meta.dart';
+
+typedef void VoidCallback();
+
+class A {
+  A({@required VoidCallback onPressed}) {}
+}
+''');
+    await resolveTestUnit('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(onPressed: () {});
+  print(a);
+}
+''');
+  }
+
+  test_cons_single_closure_2() async {
+    addMetaPackage();
+    addSource('/home/test/lib/a.dart', r'''
+import 'package:meta/meta.dart';
+
+typedef void Callback(e);
+
+class A {
+  A({@required Callback callback}) {}
+}
+''');
+    await resolveTestUnit('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(callback: (e) {});
+  print(a);
+}
+''');
+  }
+
+  test_cons_single_closure_3() async {
+    addMetaPackage();
+    addSource('/home/test/lib/a.dart', r'''
+import 'package:meta/meta.dart';
+
+typedef void Callback(a,b,c);
+
+class A {
+  A({@required Callback callback}) {}
+}
+''');
+    await resolveTestUnit('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(callback: (a, b, c) {});
+  print(a);
+}
+''');
+  }
+
+  test_cons_single_closure_4() async {
+    addMetaPackage();
+    addSource('/home/test/lib/a.dart', r'''
+import 'package:meta/meta.dart';
+
+typedef int Callback(int a, String b,c);
+
+class A {
+  A({@required Callback callback}) {}
+}
+''');
+    await resolveTestUnit('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(callback: (int a, String b, c) {});
+  print(a);
+}
+''');
+  }
+
+  test_cons_single_list() async {
+    addMetaPackage();
+    addSource('/home/test/lib/a.dart', r'''
+import 'package:meta/meta.dart';
+
+class A {
+  A({@required List<String> names}) {}
+}
+''');
+    await resolveTestUnit('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A();
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+
+main() {
+  A a = new A(names: <String>[]);
+  print(a);
+}
+''');
+  }
+
+  test_multiple() async {
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:meta/meta.dart';
+
+test({@required int a, @required int bcd}) {}
+main() {
+  test(a: 3);
+}
+''');
+    await assertHasFix('''
+import 'package:meta/meta.dart';
+
+test({@required int a, @required int bcd}) {}
+main() {
+  test(a: 3, bcd: null);
+}
+''');
+  }
+
+  test_multiple_1of2() async {
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:meta/meta.dart';
+
+test({@required int a, @required int bcd}) {}
+main() {
+  test();
+}
+''');
+    await assertHasFix('''
+import 'package:meta/meta.dart';
+
+test({@required int a, @required int bcd}) {}
+main() {
+  test(a: null);
+}
+''', errorFilter: (error) => error.message.contains("'a'"));
+  }
+
+  test_multiple_2of2() async {
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:meta/meta.dart';
+
+test({@required int a, @required int bcd}) {}
+main() {
+  test();
+}
+''');
+    await assertHasFix('''
+import 'package:meta/meta.dart';
+
+test({@required int a, @required int bcd}) {}
+main() {
+  test(bcd: null);
+}
+''', errorFilter: (error) => error.message.contains("'bcd'"));
+  }
+
+  test_single() async {
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:meta/meta.dart';
+
+test({@required int abc}) {}
+main() {
+  test();
+}
+''');
+    await assertHasFix('''
+import 'package:meta/meta.dart';
+
+test({@required int abc}) {}
+main() {
+  test(abc: null);
+}
+''');
+  }
+
+  test_single_normal() async {
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:meta/meta.dart';
+
+test(String x, {@required int abc}) {}
+main() {
+  test("foo");
+}
+''');
+    await assertHasFix('''
+import 'package:meta/meta.dart';
+
+test(String x, {@required int abc}) {}
+main() {
+  test("foo", abc: null);
+}
+''');
+  }
+
+  test_single_with_details() async {
+    addMetaPackage();
+    await resolveTestUnit('''
+import 'package:meta/meta.dart';
+
+test({@Required("Really who doesn't need an abc?") int abc}) {}
+main() {
+  test();
+}
+''');
+    await assertHasFix('''
+import 'package:meta/meta.dart';
+
+test({@Required("Really who doesn't need an abc?") int abc}) {}
+main() {
+  test(abc: null);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_ne_null_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_ne_null_test.dart
new file mode 100644
index 0000000..c8b6d00
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_ne_null_test.dart
@@ -0,0 +1,62 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddNeNullTest);
+  });
+}
+
+@reflectiveTest
+class AddNeNullTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_NE_NULL;
+
+  test_nonBoolCondition() async {
+    await resolveTestUnit('''
+main(String p) {
+  if (p) {
+    print(p);
+  }
+}
+''');
+    await assertHasFix('''
+main(String p) {
+  if (p != null) {
+    print(p);
+  }
+}
+''');
+  }
+
+  test_nonBoolCondition_all() async {
+    await resolveTestUnit('''
+main(String p, String q) {
+  if (p) {
+    print(p);
+  }
+  if (q) {
+    print(q);
+  }
+}
+''');
+    await assertHasFixAllFix(StaticTypeWarningCode.NON_BOOL_CONDITION, '''
+main(String p, String q) {
+  if (p != null) {
+    print(p);
+  }
+  if (q != null) {
+    print(q);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_override_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_override_test.dart
new file mode 100644
index 0000000..8a1cf11
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_override_test.dart
@@ -0,0 +1,179 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddOverrideTest);
+  });
+}
+
+@reflectiveTest
+class AddOverrideTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_OVERRIDE;
+
+  @override
+  String get lintCode => LintNames.annotate_overrides;
+
+  test_field() async {
+    await resolveTestUnit('''
+class abstract Test {
+  int get t;
+}
+class Sub extends Test {
+  int /*LINT*/t = 42;
+}
+''');
+    await assertHasFix('''
+class abstract Test {
+  int get t;
+}
+class Sub extends Test {
+  @override
+  int /*LINT*/t = 42;
+}
+''');
+  }
+
+  test_getter() async {
+    await resolveTestUnit('''
+class Test {
+  int get t => null;
+}
+class Sub extends Test {
+  int get /*LINT*/t => null;
+}
+''');
+    await assertHasFix('''
+class Test {
+  int get t => null;
+}
+class Sub extends Test {
+  @override
+  int get /*LINT*/t => null;
+}
+''');
+  }
+
+  test_method() async {
+    await resolveTestUnit('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  void /*LINT*/t() { }
+}
+''');
+    await assertHasFix('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  @override
+  void /*LINT*/t() { }
+}
+''');
+  }
+
+  test_method_with_doc_comment() async {
+    await resolveTestUnit('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  /// Doc comment.
+  void /*LINT*/t() { }
+}
+''');
+    await assertHasFix('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  /// Doc comment.
+  @override
+  void /*LINT*/t() { }
+}
+''');
+  }
+
+  test_method_with_doc_comment_2() async {
+    await resolveTestUnit('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  /**
+   * Doc comment.
+   */
+  void /*LINT*/t() { }
+}
+''');
+    await assertHasFix('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  /**
+   * Doc comment.
+   */
+  @override
+  void /*LINT*/t() { }
+}
+''');
+  }
+
+  test_method_with_doc_comment_and_metadata() async {
+    await resolveTestUnit('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  /// Doc comment.
+  @foo
+  void /*LINT*/t() { }
+}
+''');
+    await assertHasFix('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  /// Doc comment.
+  @override
+  @foo
+  void /*LINT*/t() { }
+}
+''');
+  }
+
+  test_method_with_non_doc_comment() async {
+    await resolveTestUnit('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  // Non-doc comment.
+  void /*LINT*/t() { }
+}
+''');
+    await assertHasFix('''
+class Test {
+  void t() { }
+}
+class Sub extends Test {
+  // Non-doc comment.
+  @override
+  void /*LINT*/t() { }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_required_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_required_test.dart
new file mode 100644
index 0000000..eae5d92
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_required_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddRequiredTest);
+  });
+}
+
+@reflectiveTest
+class AddRequiredTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_REQUIRED;
+
+  @override
+  String get lintCode => LintNames.always_require_non_null_named_parameters;
+
+  test_withAssert() async {
+    await resolveTestUnit('''
+void function({String /*LINT*/param}) {
+  assert(param != null);
+}
+''');
+    await assertHasFix('''
+void function({@required String /*LINT*/param}) {
+  assert(param != null);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_static_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_static_test.dart
new file mode 100644
index 0000000..bf136bd
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_static_test.dart
@@ -0,0 +1,47 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddStaticTest);
+  });
+}
+
+@reflectiveTest
+class AddStaticTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_STATIC;
+
+  test_multipleFields() async {
+    await resolveTestUnit('''
+class C {
+  const int x = 0, y = 0;
+}
+''');
+    await assertHasFix('''
+class C {
+  static const int x = 0, y = 0;
+}
+''');
+  }
+
+  test_oneField() async {
+    await resolveTestUnit('''
+class C {
+  const int x = 0;
+}
+''');
+    await assertHasFix('''
+class C {
+  static const int x = 0;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_super_constructor_invocation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_super_constructor_invocation_test.dart
new file mode 100644
index 0000000..f6282cc
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_super_constructor_invocation_test.dart
@@ -0,0 +1,111 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddSuperConstructorInvocationTest);
+  });
+}
+
+@reflectiveTest
+class AddSuperConstructorInvocationTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_SUPER_CONSTRUCTOR_INVOCATION;
+
+  test_hasInitializers() async {
+    await resolveTestUnit('''
+class A {
+  A(int p);
+}
+class B extends A {
+  int field;
+  B() : field = 42 {}
+}
+''');
+    await assertHasFix('''
+class A {
+  A(int p);
+}
+class B extends A {
+  int field;
+  B() : field = 42, super(0) {}
+}
+''');
+  }
+
+  test_named() async {
+    await resolveTestUnit('''
+class A {
+  A.named(int p);
+}
+class B extends A {
+  B() {}
+}
+''');
+    await assertHasFix('''
+class A {
+  A.named(int p);
+}
+class B extends A {
+  B() : super.named(0) {}
+}
+''');
+  }
+
+  test_named_private() async {
+    await resolveTestUnit('''
+class A {
+  A._named(int p);
+}
+class B extends A {
+  B() {}
+}
+''');
+    await assertNoFix();
+  }
+
+  test_requiredAndNamed() async {
+    await resolveTestUnit('''
+class A {
+  A(bool p1, int p2, double p3, String p4, {p5});
+}
+class B extends A {
+  B() {}
+}
+''');
+    await assertHasFix('''
+class A {
+  A(bool p1, int p2, double p3, String p4, {p5});
+}
+class B extends A {
+  B() : super(false, 0, 0.0, '') {}
+}
+''');
+  }
+
+  test_typeArgument() async {
+    await resolveTestUnit('''
+class A<T> {
+  A(T p);
+}
+class B extends A<int> {
+  B();
+}
+''');
+    await assertHasFix('''
+class A<T> {
+  A(T p);
+}
+class B extends A<int> {
+  B() : super(0);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/change_to_nearest_precise_value_test.dart b/pkg/analysis_server/test/src/services/correction/fix/change_to_nearest_precise_value_test.dart
new file mode 100644
index 0000000..01c6749
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/change_to_nearest_precise_value_test.dart
@@ -0,0 +1,66 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ChangeToNearestPreciseValueTest);
+  });
+}
+
+@reflectiveTest
+class ChangeToNearestPreciseValueTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CHANGE_TO_NEAREST_PRECISE_VALUE;
+
+  test_impreciseIntAsDouble() async {
+    await resolveTestUnit('''
+double x = 1000000000000000000000000;
+''');
+    await assertHasFix('''
+double x = 999999999999999983222784;
+''');
+  }
+
+  test_impreciseIntAsDouble_asCapitalHex() async {
+    await resolveTestUnit('''
+double x = 0X1000000000000000000000001;
+''');
+    await assertHasFix('''
+double x = 0x1000000000000000000000000;
+''');
+  }
+
+  test_impreciseIntAsDouble_asHex() async {
+    await resolveTestUnit('''
+double x = 0x1000000000000000000000001;
+''');
+    await assertHasFix('''
+double x = 0x1000000000000000000000000;
+''');
+  }
+
+  test_impreciseIntAsDouble_maxValue() async {
+    await resolveTestUnit('''
+double x = 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
+''');
+    await assertHasFix('''
+double x = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368;
+''');
+  }
+
+  test_impreciseIntAsDouble_maxValue_asHex() async {
+    await resolveTestUnit('''
+double x = 0x100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
+''');
+    await assertHasFix('''
+double x = 0xFFFFFFFFFFFFF800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/change_to_static_access_test.dart b/pkg/analysis_server/test/src/services/correction/fix/change_to_static_access_test.dart
new file mode 100644
index 0000000..507b291
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/change_to_static_access_test.dart
@@ -0,0 +1,130 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ChangeToStaticAccessTest);
+  });
+}
+
+@reflectiveTest
+class ChangeToStaticAccessTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CHANGE_TO_STATIC_ACCESS;
+
+  test_method() async {
+    await resolveTestUnit('''
+class A {
+  static foo() {}
+}
+main(A a) {
+  a.foo();
+}
+''');
+    await assertHasFix('''
+class A {
+  static foo() {}
+}
+main(A a) {
+  A.foo();
+}
+''');
+  }
+
+  test_method_importType() async {
+    addSource('/home/test/lib/a.dart', r'''
+class A {
+  static foo() {}
+}
+''');
+    addSource('/home/test/lib/b.dart', r'''
+import 'package:test/a.dart';
+
+class B extends A {}
+''');
+    await resolveTestUnit('''
+import 'package:test/b.dart';
+
+main(B b) {
+  b.foo();
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+import 'package:test/b.dart';
+
+main(B b) {
+  A.foo();
+}
+''');
+  }
+
+  test_method_prefixLibrary() async {
+    await resolveTestUnit('''
+import 'dart:async' as pref;
+main(pref.Future f) {
+  f.wait([]);
+}
+''');
+    await assertHasFix('''
+import 'dart:async' as pref;
+main(pref.Future f) {
+  pref.Future.wait([]);
+}
+''');
+  }
+
+  test_property() async {
+    await resolveTestUnit('''
+class A {
+  static get foo => 42;
+}
+main(A a) {
+  a.foo;
+}
+''');
+    await assertHasFix('''
+class A {
+  static get foo => 42;
+}
+main(A a) {
+  A.foo;
+}
+''');
+  }
+
+  test_property_importType() async {
+    addSource('/home/test/lib/a.dart', r'''
+class A {
+  static get foo => null;
+}
+''');
+    addSource('/home/test/lib/b.dart', r'''
+import 'package:test/a.dart';
+
+class B extends A {}
+''');
+    await resolveTestUnit('''
+import 'package:test/b.dart';
+
+main(B b) {
+  b.foo;
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+import 'package:test/b.dart';
+
+main(B b) {
+  A.foo;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/change_to_test.dart b/pkg/analysis_server/test/src/services/correction/fix/change_to_test.dart
new file mode 100644
index 0000000..553d1e5
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/change_to_test.dart
@@ -0,0 +1,332 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ChangeToTest);
+  });
+}
+
+@reflectiveTest
+class ChangeToTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CHANGE_TO;
+
+  test_undefinedClass_fromImport() async {
+    await resolveTestUnit('''
+main() {
+  Stirng s = 'abc';
+  print(s);
+}
+''');
+    await assertHasFix('''
+main() {
+  String s = 'abc';
+  print(s);
+}
+''');
+  }
+
+  test_undefinedClass_fromThisLibrary() async {
+    await resolveTestUnit('''
+class MyClass {}
+main() {
+  MyCalss v = null;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class MyClass {}
+main() {
+  MyClass v = null;
+  print(v);
+}
+''');
+  }
+
+  test_undefinedClass_prefixed() async {
+    await resolveTestUnit('''
+import 'dart:async' as c;
+main() {
+  c.Fture v = null;
+  print(v);
+}
+''');
+    await assertHasFix('''
+import 'dart:async' as c;
+main() {
+  c.Future v = null;
+  print(v);
+}
+''');
+  }
+
+  test_undefinedFunction_fromImport() async {
+    await resolveTestUnit('''
+main() {
+  pritn(0);
+}
+''');
+    await assertHasFix('''
+main() {
+  print(0);
+}
+''');
+  }
+
+  test_undefinedFunction_prefixed_fromImport() async {
+    await resolveTestUnit('''
+import 'dart:core' as c;
+main() {
+  c.prnt(42);
+}
+''');
+    await assertHasFix('''
+import 'dart:core' as c;
+main() {
+  c.print(42);
+}
+''');
+  }
+
+  test_undefinedFunction_prefixed_ignoreLocal() async {
+    await resolveTestUnit('''
+import 'dart:async' as c;
+main() {
+  c.main();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_undefinedFunction_thisLibrary() async {
+    await resolveTestUnit('''
+myFunction() {}
+main() {
+  myFuntcion();
+}
+''');
+    await assertHasFix('''
+myFunction() {}
+main() {
+  myFunction();
+}
+''');
+  }
+
+  test_undefinedGetter_hint() async {
+    await resolveTestUnit('''
+class A {
+  int myField;
+}
+main(A a) {
+  var x = a;
+  print(x.myFild);
+}
+''');
+    await assertHasFix('''
+class A {
+  int myField;
+}
+main(A a) {
+  var x = a;
+  print(x.myField);
+}
+''');
+  }
+
+  test_undefinedGetter_qualified() async {
+    await resolveTestUnit('''
+class A {
+  int myField;
+}
+main(A a) {
+  print(a.myFild);
+}
+''');
+    await assertHasFix('''
+class A {
+  int myField;
+}
+main(A a) {
+  print(a.myField);
+}
+''');
+  }
+
+  test_undefinedGetter_qualified_static() async {
+    await resolveTestUnit('''
+class A {
+  static int MY_NAME = 1;
+}
+main() {
+  A.MY_NAM;
+}
+''');
+    await assertHasFix('''
+class A {
+  static int MY_NAME = 1;
+}
+main() {
+  A.MY_NAME;
+}
+''');
+  }
+
+  test_undefinedGetter_unqualified() async {
+    await resolveTestUnit('''
+class A {
+  int myField;
+  main() {
+    print(myFild);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int myField;
+  main() {
+    print(myField);
+  }
+}
+''');
+  }
+
+  test_undefinedMethod_ignoreOperators() async {
+    await resolveTestUnit('''
+main(Object object) {
+  object.then();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_undefinedMethod_qualified() async {
+    await resolveTestUnit('''
+class A {
+  myMethod() {}
+}
+main() {
+  A a = new A();
+  a.myMehtod();
+}
+''');
+    await assertHasFix('''
+class A {
+  myMethod() {}
+}
+main() {
+  A a = new A();
+  a.myMethod();
+}
+''');
+  }
+
+  test_undefinedMethod_unqualified_superClass() async {
+    await resolveTestUnit('''
+class A {
+  myMethod() {}
+}
+class B extends A {
+  main() {
+    myMehtod();
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  myMethod() {}
+}
+class B extends A {
+  main() {
+    myMethod();
+  }
+}
+''');
+  }
+
+  test_undefinedMethod_unqualified_thisClass() async {
+    await resolveTestUnit('''
+class A {
+  myMethod() {}
+  main() {
+    myMehtod();
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  myMethod() {}
+  main() {
+    myMethod();
+  }
+}
+''');
+  }
+
+  test_undefinedSetter_hint() async {
+    await resolveTestUnit('''
+class A {
+  int myField;
+}
+main(A a) {
+  var x = a;
+  x.myFild = 42;
+}
+''');
+    await assertHasFix('''
+class A {
+  int myField;
+}
+main(A a) {
+  var x = a;
+  x.myField = 42;
+}
+''');
+  }
+
+  test_undefinedSetter_qualified() async {
+    await resolveTestUnit('''
+class A {
+  int myField;
+}
+main(A a) {
+  a.myFild = 42;
+}
+''');
+    await assertHasFix('''
+class A {
+  int myField;
+}
+main(A a) {
+  a.myField = 42;
+}
+''');
+  }
+
+  test_undefinedSetter_unqualified() async {
+    await resolveTestUnit('''
+class A {
+  int myField;
+  main() {
+    myFild = 42;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int myField;
+  main() {
+    myField = 42;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/change_type_annotation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/change_type_annotation_test.dart
new file mode 100644
index 0000000..8fbb66a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/change_type_annotation_test.dart
@@ -0,0 +1,72 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ChangeTypeAnnotationTest);
+  });
+}
+
+@reflectiveTest
+class ChangeTypeAnnotationTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CHANGE_TYPE_ANNOTATION;
+
+  test_generic() async {
+    await resolveTestUnit('''
+main() {
+  String v = <int>[];
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  List<int> v = <int>[];
+  print(v);
+}
+''');
+  }
+
+  test_multipleVariables() async {
+    await resolveTestUnit('''
+main() {
+  String a, b = 42;
+  print('\$a \$b');
+}
+''');
+    await assertNoFix();
+  }
+
+  test_notVariableDeclaration() async {
+    await resolveTestUnit('''
+main() {
+  String v;
+  v = 42;
+  print(v);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_simple() async {
+    await resolveTestUnit('''
+main() {
+  String v = 'abc'.length;
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  int v = 'abc'.length;
+  print(v);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/convert_flutter_child_test.dart b/pkg/analysis_server/test/src/services/correction/fix/convert_flutter_child_test.dart
new file mode 100644
index 0000000..e75321d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/convert_flutter_child_test.dart
@@ -0,0 +1,153 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertFlutterChildTest);
+  });
+}
+
+@reflectiveTest
+class ConvertFlutterChildTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CONVERT_FLUTTER_CHILD;
+
+  test_hasList() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+      child: [
+        new Text('111'),
+        new Text('222'),
+      ],
+    ),
+  );
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+      children: <Widget>[
+        new Text('111'),
+        new Text('222'),
+      ],
+    ),
+  );
+}
+''');
+  }
+
+  test_hasTypedList() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+      child: <Widget>[
+        new Text('111'),
+        new Text('222'),
+      ],
+    ),
+  );
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+      children: <Widget>[
+        new Text('111'),
+        new Text('222'),
+      ],
+    ),
+  );
+}
+''');
+  }
+
+  test_listNotWidget() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Container(
+    child: new Row(
+      child: <Widget>[
+        new Container(),
+        null,
+      ],
+    ),
+  );
+}
+''');
+    await assertNoFix();
+  }
+
+  test_multiLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+    body: new Row(
+      child: new Container(
+        width: 200.0,
+        height: 300.0,
+      ),
+    ),
+  );
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/material.dart';
+build() {
+  return new Scaffold(
+    body: new Row(
+      children: <Widget>[
+        new Container(
+          width: 200.0,
+          height: 300.0,
+        ),
+      ],
+    ),
+  );
+}
+''');
+  }
+
+  test_widgetVariable() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/material.dart';
+build() {
+  var text = new Text('foo');
+  new Row(
+    child: text,
+  );
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/material.dart';
+build() {
+  var text = new Text('foo');
+  new Row(
+    children: <Widget>[text],
+  );
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/convert_flutter_children_test.dart b/pkg/analysis_server/test/src/services/correction/fix/convert_flutter_children_test.dart
new file mode 100644
index 0000000..f975f0a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/convert_flutter_children_test.dart
@@ -0,0 +1,108 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertFlutterChildrenTest);
+  });
+}
+
+@reflectiveTest
+class ConvertFlutterChildrenTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CONVERT_FLUTTER_CHILDREN;
+
+  test_undefinedParameter_multiLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Center(
+    children: [
+      new Container(
+        width: 200.0,
+        height: 300.0,
+      ),
+    ],
+  );
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Center(
+    child: new Container(
+      width: 200.0,
+      height: 300.0,
+    ),
+  );
+}
+''');
+  }
+
+  test_undefinedParameter_notWidget() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Center(
+    children: [
+      new Object(),
+    ],
+  );
+}
+''');
+    await assertNoFix();
+  }
+
+  test_undefinedParameter_singleLine() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Center(
+    children: [
+      new Text('foo'),
+    ],
+  );
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+build() {
+  return new Center(
+    child: new Text('foo'),
+  );
+}
+''');
+  }
+
+  test_undefinedParameter_singleLine2() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+build() {
+  var text = new Text('foo');
+  new Center(
+    children: [text],
+  );
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+build() {
+  var text = new Text('foo');
+  new Center(
+    child: text,
+  );
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/convert_to_named_arguments_test.dart b/pkg/analysis_server/test/src/services/correction/fix/convert_to_named_arguments_test.dart
new file mode 100644
index 0000000..de9c388
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/convert_to_named_arguments_test.dart
@@ -0,0 +1,110 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToNamedArgumentsTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToNamedArgumentsTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CONVERT_TO_NAMED_ARGUMENTS;
+
+  test_ambiguous() async {
+    await resolveTestUnit('''
+class A {
+  A({int a, int b});
+}
+
+main() {
+  new A(1, 2);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_instanceCreation() async {
+    await resolveTestUnit('''
+class A {
+  A({int a, double b});
+}
+
+main() {
+  new A(1.2, 3);
+}
+''');
+    await assertHasFix('''
+class A {
+  A({int a, double b});
+}
+
+main() {
+  new A(b: 1.2, a: 3);
+}
+''');
+  }
+
+  test_instanceCreation_hasPositional() async {
+    await resolveTestUnit('''
+class A {
+  A(int a, {int b});
+}
+
+main() {
+  new A(1, 2);
+}
+''');
+    await assertHasFix('''
+class A {
+  A(int a, {int b});
+}
+
+main() {
+  new A(1, b: 2);
+}
+''');
+  }
+
+  test_methodInvocation() async {
+    await resolveTestUnit('''
+class C {
+  void foo({int a}) {}
+}
+
+main(C c) {
+  c.foo(1);
+}
+''');
+    await assertHasFix('''
+class C {
+  void foo({int a}) {}
+}
+
+main(C c) {
+  c.foo(a: 1);
+}
+''');
+  }
+
+  test_noCompatibleParameter() async {
+    await resolveTestUnit('''
+class A {
+  A({String a});
+}
+
+main() {
+  new A(1);
+}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_class_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_class_test.dart
new file mode 100644
index 0000000..610c742
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_class_test.dart
@@ -0,0 +1,181 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateClassTest);
+  });
+}
+
+@reflectiveTest
+class CreateClassTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_CLASS;
+
+  test_hasUnresolvedPrefix() async {
+    await resolveTestUnit('''
+main() {
+  prefix.Test v = null;
+  print(v);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_inLibraryOfPrefix() async {
+    addSource('/home/test/lib/lib.dart', r'''
+class A {}
+''');
+
+    await resolveTestUnit('''
+import 'lib.dart' as lib;
+
+main() {
+  lib.A a = null;
+  lib.Test t = null;
+  print('\$a \$t');
+}
+''');
+
+    await assertHasFix('''
+class A {}
+
+class Test {
+}
+''', target: '/home/test/lib/lib.dart');
+    expect(change.linkedEditGroups, hasLength(1));
+  }
+
+  test_innerLocalFunction() async {
+    await resolveTestUnit('''
+f() {
+  g() {
+    Test v = null;
+    print(v);
+  }
+  g();
+}
+''');
+    await assertHasFix('''
+f() {
+  g() {
+    Test v = null;
+    print(v);
+  }
+  g();
+}
+
+class Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
+  }
+
+  test_instanceCreation_withoutNew_fromFunction() async {
+    await resolveTestUnit('''
+main() {
+  Test ();
+}
+''');
+    await assertHasFix('''
+main() {
+  Test ();
+}
+
+class Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test ()', 'Test {']);
+  }
+
+  test_instanceCreation_withoutNew_fromMethod() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    Test ();
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  main() {
+    Test ();
+  }
+}
+
+class Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test ()', 'Test {']);
+  }
+
+  test_itemOfList() async {
+    await resolveTestUnit('''
+main() {
+  var a = [Test];
+  print(a);
+}
+''');
+    await assertHasFix('''
+main() {
+  var a = [Test];
+  print(a);
+}
+
+class Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test];', 'Test {']);
+  }
+
+  test_itemOfList_inAnnotation() async {
+    await resolveTestUnit('''
+class MyAnnotation {
+  const MyAnnotation(a, b);
+}
+@MyAnnotation(int, const [Test])
+main() {}
+''');
+    await assertHasFix('''
+class MyAnnotation {
+  const MyAnnotation(a, b);
+}
+@MyAnnotation(int, const [Test])
+main() {}
+
+class Test {
+}
+''', errorFilter: (error) {
+      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
+    });
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test])', 'Test {']);
+  }
+
+  test_simple() async {
+    await resolveTestUnit('''
+main() {
+  Test v = null;
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  Test v = null;
+  print(v);
+}
+
+class Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_constructor_for_final_fields_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_for_final_fields_test.dart
new file mode 100644
index 0000000..fa355b6
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_for_final_fields_test.dart
@@ -0,0 +1,137 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateConstructorForFinalFieldsTest);
+  });
+}
+
+@reflectiveTest
+class CreateConstructorForFinalFieldsTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_CONSTRUCTOR_FOR_FINAL_FIELDS;
+
+  test_flutter() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final int b = 2;
+  final int c;
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final int b = 2;
+  final int c;
+
+  const MyWidget({Key key, this.a, this.c}) : super(key: key);
+}
+''', errorFilter: (error) {
+      return error.message.contains("'a'");
+    });
+  }
+
+  test_flutter_childLast() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final Widget child;
+  final int b;
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final Widget child;
+  final int b;
+
+  const MyWidget({Key key, this.a, this.b, this.child}) : super(key: key);
+}
+''', errorFilter: (error) {
+      return error.message.contains("'a'");
+    });
+  }
+
+  test_flutter_childrenLast() async {
+    addFlutterPackage();
+    await resolveTestUnit('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final List<Widget> children;
+  final int b;
+}
+''');
+    await assertHasFix('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  final int a;
+  final List<Widget> children;
+  final int b;
+
+  const MyWidget({Key key, this.a, this.b, this.children}) : super(key: key);
+}
+''', errorFilter: (error) {
+      return error.message.contains("'a'");
+    });
+  }
+
+  test_inTopLevelMethod() async {
+    await resolveTestUnit('''
+main() {
+  final int v;
+  print(v);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_simple() async {
+    await resolveTestUnit('''
+class Test {
+  final int a;
+  final int b = 2;
+  final int c;
+}
+''');
+    await assertHasFix('''
+class Test {
+  final int a;
+  final int b = 2;
+  final int c;
+
+  Test(this.a, this.c);
+}
+''', errorFilter: (error) {
+      return error.message.contains("'a'");
+    });
+  }
+
+  test_topLevelField() async {
+    await resolveTestUnit('''
+final int v;
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_constructor_super_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_super_test.dart
new file mode 100644
index 0000000..fe59b94
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_super_test.dart
@@ -0,0 +1,156 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateConstructorSuperTest);
+  });
+}
+
+@reflectiveTest
+class CreateConstructorSuperTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_CONSTRUCTOR_SUPER;
+
+  test_fieldInitializer() async {
+    await resolveTestUnit('''
+class A {
+  int _field;
+  A(this._field);
+  int get field => _field;
+}
+class B extends A {
+  int existingField;
+
+  void existingMethod() {}
+}
+''');
+    await assertHasFix('''
+class A {
+  int _field;
+  A(this._field);
+  int get field => _field;
+}
+class B extends A {
+  int existingField;
+
+  B(int field) : super(field);
+
+  void existingMethod() {}
+}
+''');
+  }
+
+  test_importType() async {
+    addSource('/home/test/lib/a.dart', r'''
+class A {}
+''');
+    addSource('/home/test/lib/b.dart', r'''
+import 'package:test/a.dart';
+
+class B {
+  B(A a);
+}
+''');
+    await resolveTestUnit('''
+import 'package:test/b.dart';
+
+class C extends B {
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+import 'package:test/b.dart';
+
+class C extends B {
+  C(A a) : super(a);
+}
+''');
+  }
+
+  test_named() async {
+    await resolveTestUnit('''
+class A {
+  A.named(p1, int p2);
+}
+class B extends A {
+  int existingField;
+
+  void existingMethod() {}
+}
+''');
+    await assertHasFix('''
+class A {
+  A.named(p1, int p2);
+}
+class B extends A {
+  int existingField;
+
+  B.named(p1, int p2) : super.named(p1, p2);
+
+  void existingMethod() {}
+}
+''');
+  }
+
+  test_optional() async {
+    await resolveTestUnit('''
+class A {
+  A(p1, int p2, List<String> p3, [int p4]);
+}
+class B extends A {
+  int existingField;
+
+  void existingMethod() {}
+}
+''');
+    await assertHasFix('''
+class A {
+  A(p1, int p2, List<String> p3, [int p4]);
+}
+class B extends A {
+  int existingField;
+
+  B(p1, int p2, List<String> p3) : super(p1, p2, p3);
+
+  void existingMethod() {}
+}
+''');
+  }
+
+  test_private() async {
+    await resolveTestUnit('''
+class A {
+  A._named(p);
+}
+class B extends A {
+}
+''');
+    await assertNoFix();
+  }
+
+  test_typeArgument() async {
+    await resolveTestUnit('''
+class C<T> {
+  final T x;
+  C(this.x);
+}
+class D extends C<int> {
+}''');
+    await assertHasFix('''
+class C<T> {
+  final T x;
+  C(this.x);
+}
+class D extends C<int> {
+  D(int x) : super(x);
+}''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_constructor_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_test.dart
new file mode 100644
index 0000000..d5e8dd5
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_constructor_test.dart
@@ -0,0 +1,104 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateConstructorTest);
+    defineReflectiveTests(CreateConstructorMixinTest);
+  });
+}
+
+@reflectiveTest
+class CreateConstructorMixinTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_CONSTRUCTOR;
+
+  test_named() async {
+    await resolveTestUnit('''
+mixin M {}
+
+main() {
+  new M.named();
+}
+''');
+    await assertNoFix();
+  }
+}
+
+@reflectiveTest
+class CreateConstructorTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_CONSTRUCTOR;
+
+  test_insteadOfSyntheticDefault() async {
+    await resolveTestUnit('''
+class A {
+  int field;
+
+  method() {}
+}
+main() {
+  new A(1, 2.0);
+}
+''');
+    await assertHasFix('''
+class A {
+  int field;
+
+  A(int i, double d);
+
+  method() {}
+}
+main() {
+  new A(1, 2.0);
+}
+''');
+  }
+
+  test_named() async {
+    await resolveTestUnit('''
+class A {
+  method() {}
+}
+main() {
+  new A.named(1, 2.0);
+}
+''');
+    await assertHasFix('''
+class A {
+  A.named(int i, double d);
+
+  method() {}
+}
+main() {
+  new A.named(1, 2.0);
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['named(int ', 'named(1']);
+  }
+
+  test_named_emptyClassBody() async {
+    await resolveTestUnit('''
+class A {}
+main() {
+  new A.named(1);
+}
+''');
+    await assertHasFix('''
+class A {
+  A.named(int i);
+}
+main() {
+  new A.named(1);
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['named(int ', 'named(1']);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_field_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_field_test.dart
new file mode 100644
index 0000000..ed3eee0
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_field_test.dart
@@ -0,0 +1,555 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateFieldTest);
+    defineReflectiveTests(CreateFieldMixinTest);
+  });
+}
+
+@reflectiveTest
+class CreateFieldMixinTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_FIELD;
+
+  test_getter_qualified_instance() async {
+    await resolveTestUnit('''
+mixin M {
+}
+
+main(M m) {
+  int v = m.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+mixin M {
+  int test;
+}
+
+main(M m) {
+  int v = m.test;
+  print(v);
+}
+''');
+  }
+
+  test_setter_qualified_instance_hasField() async {
+    await resolveTestUnit('''
+mixin M {
+  int aaa;
+  int zzz;
+
+  existingMethod() {}
+}
+
+main(M m) {
+  m.test = 5;
+}
+''');
+    await assertHasFix('''
+mixin M {
+  int aaa;
+  int zzz;
+
+  int test;
+
+  existingMethod() {}
+}
+
+main(M m) {
+  m.test = 5;
+}
+''');
+  }
+}
+
+@reflectiveTest
+class CreateFieldTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_FIELD;
+
+  test_getter_multiLevel() async {
+    await resolveTestUnit('''
+class A {
+}
+class B {
+  A a;
+}
+class C {
+  B b;
+}
+main(C c) {
+  int v = c.b.a.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+}
+class B {
+  A a;
+}
+class C {
+  B b;
+}
+main(C c) {
+  int v = c.b.a.test;
+  print(v);
+}
+''');
+  }
+
+  test_getter_qualified_instance() async {
+    await resolveTestUnit('''
+class A {
+}
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+}
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+  }
+
+  test_getter_qualified_instance_differentLibrary() async {
+    addSource('/home/test/lib/other.dart', '''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+}
+''');
+
+    await resolveTestUnit('''
+import 'package:test/other.dart';
+
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+
+    await assertHasFix('''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+  int test;
+}
+''', target: '/home/test/lib/other.dart');
+  }
+
+  test_getter_qualified_instance_dynamicType() async {
+    await resolveTestUnit('''
+class A {
+  B b;
+  void f(Object p) {
+    p == b.test;
+  }
+}
+class B {
+}
+''');
+    await assertHasFix('''
+class A {
+  B b;
+  void f(Object p) {
+    p == b.test;
+  }
+}
+class B {
+  var test;
+}
+''');
+  }
+
+  test_getter_qualified_propagatedType() async {
+    await resolveTestUnit('''
+class A {
+  A get self => this;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+
+  A get self => this;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+  print(v);
+}
+''');
+  }
+
+  test_getter_unqualified_instance_asInvocationArgument() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    f(test);
+  }
+}
+f(String s) {}
+''');
+    await assertHasFix('''
+class A {
+  String test;
+
+  main() {
+    f(test);
+  }
+}
+f(String s) {}
+''');
+  }
+
+  test_getter_unqualified_instance_assignmentRhs() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    int v = test;
+    print(v);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+
+  main() {
+    int v = test;
+    print(v);
+  }
+}
+''');
+  }
+
+  test_getter_unqualified_instance_asStatement() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    test;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  var test;
+
+  main() {
+    test;
+  }
+}
+''');
+  }
+
+  test_hint() async {
+    await resolveTestUnit('''
+class A {
+}
+main(A a) {
+  var x = a;
+  int v = x.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+}
+main(A a) {
+  var x = a;
+  int v = x.test;
+  print(v);
+}
+''');
+  }
+
+  test_hint_setter() async {
+    await resolveTestUnit('''
+class A {
+}
+main(A a) {
+  var x = a;
+  x.test = 0;
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+}
+main(A a) {
+  var x = a;
+  x.test = 0;
+}
+''');
+  }
+
+  test_importType() async {
+    addSource('/home/test/lib/a.dart', r'''
+class A {}
+''');
+
+    addSource('/home/test/lib/b.dart', r'''
+import 'package:test/a.dart';
+
+A getA() => null;
+''');
+
+    await resolveTestUnit('''
+import 'package:test/b.dart';
+
+class C {
+}
+
+main(C c) {
+  c.test = getA();
+}
+''');
+
+    await assertHasFix('''
+import 'package:test/a.dart';
+import 'package:test/b.dart';
+
+class C {
+  A test;
+}
+
+main(C c) {
+  c.test = getA();
+}
+''');
+  }
+
+  test_inEnum() async {
+    await resolveTestUnit('''
+enum MyEnum {
+  AAA, BBB
+}
+main() {
+  MyEnum.foo;
+}
+''');
+    await assertNoFix();
+  }
+
+  test_inSDK() async {
+    await resolveTestUnit('''
+main(List p) {
+  p.foo = 1;
+}
+''');
+    await assertNoFix();
+  }
+
+  test_invalidInitializer_withoutType() async {
+    await resolveTestUnit('''
+class C {
+  C(this.text);
+}
+''');
+    await assertHasFix('''
+class C {
+  var text;
+
+  C(this.text);
+}
+''');
+  }
+
+  test_invalidInitializer_withType() async {
+    await resolveTestUnit('''
+class C {
+  C(String this.text);
+}
+''');
+    await assertHasFix('''
+class C {
+  String text;
+
+  C(String this.text);
+}
+''');
+  }
+
+  test_setter_generic_BAD() async {
+    await resolveTestUnit('''
+class A {
+}
+class B<T> {
+  List<T> items;
+  main(A a) {
+    a.test = items;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  List test;
+}
+class B<T> {
+  List<T> items;
+  main(A a) {
+    a.test = items;
+  }
+}
+''');
+  }
+
+  test_setter_generic_OK_local() async {
+    await resolveTestUnit('''
+class A<T> {
+  List<T> items;
+
+  main(A a) {
+    test = items;
+  }
+}
+''');
+    await assertHasFix('''
+class A<T> {
+  List<T> items;
+
+  List<T> test;
+
+  main(A a) {
+    test = items;
+  }
+}
+''');
+  }
+
+  test_setter_qualified_instance_hasField() async {
+    await resolveTestUnit('''
+class A {
+  int aaa;
+  int zzz;
+
+  existingMethod() {}
+}
+main(A a) {
+  a.test = 5;
+}
+''');
+    await assertHasFix('''
+class A {
+  int aaa;
+  int zzz;
+
+  int test;
+
+  existingMethod() {}
+}
+main(A a) {
+  a.test = 5;
+}
+''');
+  }
+
+  test_setter_qualified_instance_hasMethod() async {
+    await resolveTestUnit('''
+class A {
+  existingMethod() {}
+}
+main(A a) {
+  a.test = 5;
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+
+  existingMethod() {}
+}
+main(A a) {
+  a.test = 5;
+}
+''');
+  }
+
+  test_setter_qualified_static() async {
+    await resolveTestUnit('''
+class A {
+}
+main() {
+  A.test = 5;
+}
+''');
+    await assertHasFix('''
+class A {
+  static int test;
+}
+main() {
+  A.test = 5;
+}
+''');
+  }
+
+  test_setter_unqualified_instance() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    test = 5;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int test;
+
+  main() {
+    test = 5;
+  }
+}
+''');
+  }
+
+  test_setter_unqualified_static() async {
+    await resolveTestUnit('''
+class A {
+  static main() {
+    test = 5;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  static int test;
+
+  static main() {
+    test = 5;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_file_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_file_test.dart
new file mode 100644
index 0000000..3bb2fd8
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_file_test.dart
@@ -0,0 +1,101 @@
+// 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:analysis_server/src/protocol_server.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateFileTest);
+  });
+}
+
+@reflectiveTest
+class CreateFileTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_FILE;
+
+  test_forImport() async {
+    await resolveTestUnit('''
+import 'my_file.dart';
+''');
+    await assertHasFixWithoutApplying();
+    // validate change
+    List<SourceFileEdit> fileEdits = change.edits;
+    expect(fileEdits, hasLength(1));
+    SourceFileEdit fileEdit = change.edits[0];
+    expect(fileEdit.file, convertPath('/home/test/lib/my_file.dart'));
+    expect(fileEdit.fileStamp, -1);
+    expect(fileEdit.edits, hasLength(1));
+    expect(
+      fileEdit.edits[0].replacement,
+      contains('// TODO Implement this library.'),
+    );
+  }
+
+  test_forImport_BAD_notDart() async {
+    await resolveTestUnit('''
+import 'my_file.txt';
+''');
+    await assertNoFix();
+  }
+
+  test_forImport_inPackage_lib() async {
+    await resolveTestUnit('''
+import 'a/bb/my_lib.dart';
+''');
+    await assertHasFixWithoutApplying();
+    // validate change
+    List<SourceFileEdit> fileEdits = change.edits;
+    expect(fileEdits, hasLength(1));
+    SourceFileEdit fileEdit = change.edits[0];
+    expect(fileEdit.file, convertPath('/home/test/lib/a/bb/my_lib.dart'));
+    expect(fileEdit.fileStamp, -1);
+    expect(fileEdit.edits, hasLength(1));
+    expect(
+      fileEdit.edits[0].replacement,
+      contains('// TODO Implement this library.'),
+    );
+  }
+
+  test_forImport_inPackage_test() async {
+    testFile = convertPath('/home/test/test/test.dart');
+    await resolveTestUnit('''
+import 'a/bb/my_lib.dart';
+''');
+    await assertHasFixWithoutApplying();
+    // validate change
+    List<SourceFileEdit> fileEdits = change.edits;
+    expect(fileEdits, hasLength(1));
+    SourceFileEdit fileEdit = change.edits[0];
+    expect(fileEdit.file, convertPath('/home/test/test/a/bb/my_lib.dart'));
+    expect(fileEdit.fileStamp, -1);
+    expect(fileEdit.edits, hasLength(1));
+    expect(
+      fileEdit.edits[0].replacement,
+      contains('// TODO Implement this library.'),
+    );
+  }
+
+  test_forPart() async {
+    await resolveTestUnit('''
+library my.lib;
+part 'my_part.dart';
+''');
+    await assertHasFixWithoutApplying();
+    // validate change
+    List<SourceFileEdit> fileEdits = change.edits;
+    expect(fileEdits, hasLength(1));
+    SourceFileEdit fileEdit = change.edits[0];
+    expect(fileEdit.file, convertPath('/home/test/lib/my_part.dart'));
+    expect(fileEdit.fileStamp, -1);
+    expect(fileEdit.edits, hasLength(1));
+    expect(fileEdit.edits[0].replacement, contains('part of my.lib;'));
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_function_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_function_test.dart
new file mode 100644
index 0000000..6fc4504
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_function_test.dart
@@ -0,0 +1,550 @@
+// 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:analysis_server/src/protocol_server.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateFunctionTest);
+  });
+}
+
+@reflectiveTest
+class CreateFunctionTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_FUNCTION;
+
+  assert_returnType_bool(String lineWithTest) async {
+    await resolveTestUnit('''
+main() {
+  bool b = true;
+  $lineWithTest
+  print(b);
+}
+''');
+    await assertHasFix('''
+main() {
+  bool b = true;
+  $lineWithTest
+  print(b);
+}
+
+bool test() {
+}
+''');
+  }
+
+  test_bottomArgument() async {
+    await resolveTestUnit('''
+main() {
+  test(throw 42);
+}
+''');
+    await assertHasFix('''
+main() {
+  test(throw 42);
+}
+
+void test(param0) {
+}
+''');
+  }
+
+  test_duplicateArgumentNames() async {
+    await resolveTestUnit('''
+class C {
+  int x;
+}
+
+foo(C c1, C c2) {
+  bar(c1.x, c2.x);
+}
+''');
+    await assertHasFix('''
+class C {
+  int x;
+}
+
+foo(C c1, C c2) {
+  bar(c1.x, c2.x);
+}
+
+void bar(int x, int x2) {
+}
+''');
+  }
+
+  test_dynamicArgument() async {
+    await resolveTestUnit('''
+main() {
+  dynamic v;
+  test(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  dynamic v;
+  test(v);
+}
+
+void test(v) {
+}
+''');
+  }
+
+  test_dynamicReturnType() async {
+    await resolveTestUnit('''
+main() {
+  dynamic v = test();
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  dynamic v = test();
+  print(v);
+}
+
+test() {
+}
+''');
+  }
+
+  test_fromFunction() async {
+    await resolveTestUnit('''
+main() {
+  int v = myUndefinedFunction(1, 2.0, '3');
+    print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  int v = myUndefinedFunction(1, 2.0, '3');
+    print(v);
+}
+
+int myUndefinedFunction(int i, double d, String s) {
+}
+''');
+  }
+
+  test_fromMethod() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    int v = myUndefinedFunction(1, 2.0, '3');
+    print(v);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  main() {
+    int v = myUndefinedFunction(1, 2.0, '3');
+    print(v);
+  }
+}
+
+int myUndefinedFunction(int i, double d, String s) {
+}
+''');
+  }
+
+  test_functionType_cascadeSecond() async {
+    await resolveTestUnit('''
+class A {
+  B ma() => null;
+}
+class B {
+  useFunction(int g(double a, String b)) {}
+}
+
+main() {
+  A a = new A();
+  a..ma().useFunction(test);
+}
+''');
+    await assertHasFix('''
+class A {
+  B ma() => null;
+}
+class B {
+  useFunction(int g(double a, String b)) {}
+}
+
+main() {
+  A a = new A();
+  a..ma().useFunction(test);
+}
+
+int test(double a, String b) {
+}
+''');
+  }
+
+  test_functionType_coreFunction() async {
+    await resolveTestUnit('''
+main() {
+  useFunction(g: test);
+}
+useFunction({Function g}) {}
+''');
+    await assertHasFix('''
+main() {
+  useFunction(g: test);
+}
+useFunction({Function g}) {}
+
+test() {
+}
+''');
+  }
+
+  test_functionType_dynamicArgument() async {
+    await resolveTestUnit('''
+main() {
+  useFunction(test);
+}
+useFunction(int g(a, b)) {}
+''');
+    await assertHasFix('''
+main() {
+  useFunction(test);
+}
+useFunction(int g(a, b)) {}
+
+int test(a, b) {
+}
+''');
+  }
+
+  test_functionType_function() async {
+    await resolveTestUnit('''
+main() {
+  useFunction(test);
+}
+useFunction(int g(double a, String b)) {}
+''');
+    await assertHasFix('''
+main() {
+  useFunction(test);
+}
+useFunction(int g(double a, String b)) {}
+
+int test(double a, String b) {
+}
+''');
+  }
+
+  test_functionType_function_namedArgument() async {
+    await resolveTestUnit('''
+main() {
+  useFunction(g: test);
+}
+useFunction({int g(double a, String b)}) {}
+''');
+    await assertHasFix('''
+main() {
+  useFunction(g: test);
+}
+useFunction({int g(double a, String b)}) {}
+
+int test(double a, String b) {
+}
+''');
+  }
+
+  test_functionType_importType() async {
+    addSource('/home/test/lib/a.dart', r'''
+class A {}
+''');
+    addSource('/home/test/lib/b.dart', r'''
+import 'package:test/a.dart';
+
+useFunction(int g(A a)) {}
+''');
+    await resolveTestUnit('''
+import 'package:test/b.dart';
+
+main() {
+  useFunction(test);
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+import 'package:test/b.dart';
+
+main() {
+  useFunction(test);
+}
+
+int test(A a) {
+}
+''');
+  }
+
+  test_functionType_notFunctionType() async {
+    await resolveTestUnit('''
+main(A a) {
+  useFunction(a.test);
+}
+typedef A();
+useFunction(g) {}
+''');
+    await assertNoFix();
+  }
+
+  test_generic_type() async {
+    await resolveTestUnit('''
+class A {
+  List<int> items;
+  main() {
+    process(items);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  List<int> items;
+  main() {
+    process(items);
+  }
+}
+
+void process(List<int> items) {
+}
+''');
+    assertLinkedGroup(
+        change.linkedEditGroups[2],
+        ['List<int> items) {'],
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['List<int>', 'Iterable<int>', 'Object']));
+  }
+
+  test_generic_typeParameter() async {
+    await resolveTestUnit('''
+class A<T> {
+  Map<int, T> items;
+  main() {
+    process(items);
+  }
+}
+''');
+    await assertHasFix('''
+class A<T> {
+  Map<int, T> items;
+  main() {
+    process(items);
+  }
+}
+
+void process(Map items) {
+}
+''');
+  }
+
+  test_importType() async {
+    addSource('/home/test/lib/lib.dart', r'''
+library lib;
+import 'dart:async';
+Future getFuture() => null;
+''');
+    await resolveTestUnit('''
+import 'lib.dart';
+main() {
+  test(getFuture());
+}
+''');
+    await assertHasFix('''
+import 'lib.dart';
+main() {
+  test(getFuture());
+}
+
+void test(Future future) {
+}
+''');
+  }
+
+  test_nullArgument() async {
+    await resolveTestUnit('''
+main() {
+  test(null);
+}
+''');
+    await assertHasFix('''
+main() {
+  test(null);
+}
+
+void test(param0) {
+}
+''');
+  }
+
+  test_returnType_bool_and_left() async {
+    await assert_returnType_bool("test() && b;");
+  }
+
+  test_returnType_bool_and_right() async {
+    await assert_returnType_bool("b && test();");
+  }
+
+  test_returnType_bool_assert() async {
+    await assert_returnType_bool("assert ( test() );");
+  }
+
+  test_returnType_bool_do() async {
+    await assert_returnType_bool("do {} while ( test() );");
+  }
+
+  test_returnType_bool_if() async {
+    await assert_returnType_bool("if ( test() ) {}");
+  }
+
+  test_returnType_bool_or_left() async {
+    await assert_returnType_bool("test() || b;");
+  }
+
+  test_returnType_bool_or_right() async {
+    await assert_returnType_bool("b || test();");
+  }
+
+  test_returnType_bool_unaryNegation() async {
+    await assert_returnType_bool("!test();");
+  }
+
+  test_returnType_bool_while() async {
+    await assert_returnType_bool("while ( test() ) {}");
+  }
+
+  test_returnType_fromAssignment_eq() async {
+    await resolveTestUnit('''
+main() {
+  int v;
+  v = myUndefinedFunction();
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  int v;
+  v = myUndefinedFunction();
+  print(v);
+}
+
+int myUndefinedFunction() {
+}
+''');
+  }
+
+  test_returnType_fromAssignment_plusEq() async {
+    await resolveTestUnit('''
+main() {
+  int v;
+  v += myUndefinedFunction();
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  int v;
+  v += myUndefinedFunction();
+  print(v);
+}
+
+num myUndefinedFunction() {
+}
+''');
+  }
+
+  test_returnType_fromBinary_right() async {
+    await resolveTestUnit('''
+main() {
+  0 + myUndefinedFunction();
+}
+''');
+    await assertHasFix('''
+main() {
+  0 + myUndefinedFunction();
+}
+
+num myUndefinedFunction() {
+}
+''');
+  }
+
+  test_returnType_fromInitializer() async {
+    await resolveTestUnit('''
+main() {
+  int v = myUndefinedFunction();
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  int v = myUndefinedFunction();
+  print(v);
+}
+
+int myUndefinedFunction() {
+}
+''');
+  }
+
+  test_returnType_fromInvocationArgument() async {
+    await resolveTestUnit('''
+foo(int p) {}
+main() {
+  foo( myUndefinedFunction() );
+}
+''');
+    await assertHasFix('''
+foo(int p) {}
+main() {
+  foo( myUndefinedFunction() );
+}
+
+int myUndefinedFunction() {
+}
+''');
+  }
+
+  test_returnType_fromReturn() async {
+    await resolveTestUnit('''
+int main() {
+  return myUndefinedFunction();
+}
+''');
+    await assertHasFix('''
+int main() {
+  return myUndefinedFunction();
+}
+
+int myUndefinedFunction() {
+}
+''');
+  }
+
+  test_returnType_void() async {
+    await resolveTestUnit('''
+main() {
+  myUndefinedFunction();
+}
+''');
+    await assertHasFix('''
+main() {
+  myUndefinedFunction();
+}
+
+void myUndefinedFunction() {
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_getter_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_getter_test.dart
new file mode 100644
index 0000000..85941b0
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_getter_test.dart
@@ -0,0 +1,363 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateGetterTest);
+    defineReflectiveTests(CreateGetterMixinTest);
+  });
+}
+
+@reflectiveTest
+class CreateGetterMixinTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_GETTER;
+
+  test_qualified_instance() async {
+    await resolveTestUnit('''
+mixin M {
+}
+
+main(M m) {
+  int v = m.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+mixin M {
+  int get test => null;
+}
+
+main(M m) {
+  int v = m.test;
+  print(v);
+}
+''');
+  }
+
+  test_unqualified_instance_assignmentLhs() async {
+    await resolveTestUnit('''
+mixin M {
+  main() {
+    test = 42;
+  }
+}
+''');
+    await assertNoFix();
+  }
+
+  test_unqualified_instance_assignmentRhs() async {
+    await resolveTestUnit('''
+mixin M {
+  main() {
+    int v = test;
+    print(v);
+  }
+}
+''');
+    await assertHasFix('''
+mixin M {
+  int get test => null;
+
+  main() {
+    int v = test;
+    print(v);
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
+class CreateGetterTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_GETTER;
+
+  test_hint_getter() async {
+    await resolveTestUnit('''
+class A {
+}
+main(A a) {
+  var x = a;
+  int v = x.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int get test => null;
+}
+main(A a) {
+  var x = a;
+  int v = x.test;
+  print(v);
+}
+''');
+  }
+
+  test_inSDK() async {
+    await resolveTestUnit('''
+main(List p) {
+  int v = p.foo;
+  print(v);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_location_afterLastGetter() async {
+    await resolveTestUnit('''
+class A {
+  int existingField;
+
+  int get existingGetter => null;
+
+  existingMethod() {}
+}
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int existingField;
+
+  int get existingGetter => null;
+
+  int get test => null;
+
+  existingMethod() {}
+}
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+  }
+
+  test_multiLevel() async {
+    await resolveTestUnit('''
+class A {
+}
+class B {
+  A a;
+}
+class C {
+  B b;
+}
+main(C c) {
+  int v = c.b.a.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int get test => null;
+}
+class B {
+  A a;
+}
+class C {
+  B b;
+}
+main(C c) {
+  int v = c.b.a.test;
+  print(v);
+}
+''');
+  }
+
+  test_qualified_instance() async {
+    await resolveTestUnit('''
+class A {
+}
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  int get test => null;
+}
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+  }
+
+  test_qualified_instance_differentLibrary() async {
+    addSource('/home/test/lib/other.dart', '''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+}
+''');
+
+    await resolveTestUnit('''
+import 'package:test/other.dart';
+
+main(A a) {
+  int v = a.test;
+  print(v);
+}
+''');
+
+    await assertHasFix('''
+/**
+ * A comment to push the offset of the braces for the following class
+ * declaration past the end of the content of the test file. Used to catch an
+ * index out of bounds exception that occurs when using the test source instead
+ * of the target source to compute the location at which to insert the field.
+ */
+class A {
+  int get test => null;
+}
+''', target: '/home/test/lib/other.dart');
+  }
+
+  test_qualified_instance_dynamicType() async {
+    await resolveTestUnit('''
+class A {
+  B b;
+  void f(Object p) {
+    p == b.test;
+  }
+}
+class B {
+}
+''');
+    await assertHasFix('''
+class A {
+  B b;
+  void f(Object p) {
+    p == b.test;
+  }
+}
+class B {
+  get test => null;
+}
+''');
+  }
+
+  test_qualified_propagatedType() async {
+    await resolveTestUnit('''
+class A {
+  A get self => this;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+  print(v);
+}
+''');
+    await assertHasFix('''
+class A {
+  A get self => this;
+
+  int get test => null;
+}
+main() {
+  var a = new A();
+  int v = a.self.test;
+  print(v);
+}
+''');
+  }
+
+  test_setterContext() async {
+    await resolveTestUnit('''
+class A {
+}
+main(A a) {
+  a.test = 42;
+}
+''');
+    await assertNoFix();
+  }
+
+  test_unqualified_instance_asInvocationArgument() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    f(test);
+  }
+}
+f(String s) {}
+''');
+    await assertHasFix('''
+class A {
+  String get test => null;
+
+  main() {
+    f(test);
+  }
+}
+f(String s) {}
+''');
+  }
+
+  test_unqualified_instance_assignmentLhs() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    test = 42;
+  }
+}
+''');
+    await assertNoFix();
+  }
+
+  test_unqualified_instance_assignmentRhs() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    int v = test;
+    print(v);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int get test => null;
+
+  main() {
+    int v = test;
+    print(v);
+  }
+}
+''');
+  }
+
+  test_unqualified_instance_asStatement() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    test;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  get test => null;
+
+  main() {
+    test;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_local_variable_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_local_variable_test.dart
new file mode 100644
index 0000000..933eec9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_local_variable_test.dart
@@ -0,0 +1,218 @@
+// 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:analysis_server/src/protocol_server.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateLocalVariableTest);
+  });
+}
+
+@reflectiveTest
+class CreateLocalVariableTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_LOCAL_VARIABLE;
+
+  test_functionType_named() async {
+    await resolveTestUnit('''
+typedef MY_FUNCTION(int p);
+foo(MY_FUNCTION f) {}
+main() {
+  foo(bar);
+}
+''');
+    await assertHasFix('''
+typedef MY_FUNCTION(int p);
+foo(MY_FUNCTION f) {}
+main() {
+  MY_FUNCTION bar;
+  foo(bar);
+}
+''');
+  }
+
+  test_functionType_named_generic() async {
+    await resolveTestUnit('''
+typedef MY_FUNCTION<T>(T p);
+foo(MY_FUNCTION<int> f) {}
+main() {
+  foo(bar);
+}
+''');
+    await assertHasFix('''
+typedef MY_FUNCTION<T>(T p);
+foo(MY_FUNCTION<int> f) {}
+main() {
+  MY_FUNCTION<int> bar;
+  foo(bar);
+}
+''');
+  }
+
+  test_functionType_synthetic() async {
+    await resolveTestUnit('''
+foo(f(int p)) {}
+main() {
+  foo(bar);
+}
+''');
+    await assertHasFix('''
+foo(f(int p)) {}
+main() {
+  Function(int p) bar;
+  foo(bar);
+}
+''');
+  }
+
+  test_read_typeAssignment() async {
+    await resolveTestUnit('''
+main() {
+  int a = test;
+  print(a);
+}
+''');
+    await assertHasFix('''
+main() {
+  int test;
+  int a = test;
+  print(a);
+}
+''');
+  }
+
+  test_read_typeCondition() async {
+    await resolveTestUnit('''
+main() {
+  if (!test) {
+    print(42);
+  }
+}
+''');
+    await assertHasFix('''
+main() {
+  bool test;
+  if (!test) {
+    print(42);
+  }
+}
+''');
+  }
+
+  test_read_typeInvocationArgument() async {
+    await resolveTestUnit('''
+main() {
+  f(test);
+}
+f(String p) {}
+''');
+    await assertHasFix('''
+main() {
+  String test;
+  f(test);
+}
+f(String p) {}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['String test;']);
+    assertLinkedGroup(change.linkedEditGroups[1], ['test;', 'test);']);
+  }
+
+  test_read_typeInvocationTarget() async {
+    await resolveTestUnit('''
+main() {
+  test.add('hello');
+}
+''');
+    await assertHasFix('''
+main() {
+  var test;
+  test.add('hello');
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['test;', 'test.add(']);
+  }
+
+  test_withImport() async {
+    addPackageFile('pkg', 'a/a.dart', '''
+class A {}
+''');
+    addPackageFile('pkg', 'b/b.dart', '''
+class B {}
+''');
+    addPackageFile('pkg', 'c/c.dart', '''
+import 'package:pkg/a/a.dart';
+import 'package:pkg/b/b.dart';
+
+class C {
+  C(A a, B b);
+}
+''');
+
+    await resolveTestUnit('''
+import 'package:pkg/a/a.dart';
+import 'package:pkg/c/c.dart';
+
+main() {
+  A a;
+  new C(a, b);
+}
+''');
+    await assertHasFix('''
+import 'package:pkg/a/a.dart';
+import 'package:pkg/b/b.dart';
+import 'package:pkg/c/c.dart';
+
+main() {
+  A a;
+  B b;
+  new C(a, b);
+}
+''');
+    List<LinkedEditGroup> groups = change.linkedEditGroups;
+    expect(groups, hasLength(2));
+    LinkedEditGroup typeGroup = groups[0];
+    List<Position> typePositions = typeGroup.positions;
+    expect(typePositions, hasLength(1));
+    expect(typePositions[0].offset, 112);
+    LinkedEditGroup nameGroup = groups[1];
+    List<Position> groupPositions = nameGroup.positions;
+    expect(groupPositions, hasLength(2));
+    expect(groupPositions[0].offset, 114);
+    expect(groupPositions[1].offset, 128);
+  }
+
+  test_write_assignment() async {
+    await resolveTestUnit('''
+main() {
+  test = 42;
+}
+''');
+    await assertHasFix('''
+main() {
+  var test = 42;
+}
+''');
+  }
+
+  test_write_assignment_compound() async {
+    await resolveTestUnit('''
+main() {
+  test += 42;
+}
+''');
+    await assertHasFix('''
+main() {
+  int test;
+  test += 42;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_method_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_method_test.dart
new file mode 100644
index 0000000..bf502f1
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_method_test.dart
@@ -0,0 +1,705 @@
+// 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:analysis_server/src/protocol_server.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateMethodTest);
+    defineReflectiveTests(CreateMethodMixinTest);
+  });
+}
+
+@reflectiveTest
+class CreateMethodMixinTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_METHOD;
+
+  test_createQualified_instance() async {
+    await resolveTestUnit('''
+mixin M {}
+
+main(M m) {
+  m.myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+mixin M {
+  void myUndefinedMethod() {}
+}
+
+main(M m) {
+  m.myUndefinedMethod();
+}
+''');
+  }
+
+  test_createQualified_static() async {
+    await resolveTestUnit('''
+mixin M {}
+
+main() {
+  M.myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+mixin M {
+  static void myUndefinedMethod() {}
+}
+
+main() {
+  M.myUndefinedMethod();
+}
+''');
+  }
+
+  test_createUnqualified() async {
+    await resolveTestUnit('''
+mixin M {
+  main() {
+    myUndefinedMethod();
+  }
+}
+''');
+    await assertHasFix('''
+mixin M {
+  main() {
+    myUndefinedMethod();
+  }
+
+  void myUndefinedMethod() {}
+}
+''');
+  }
+
+  test_functionType_method_enclosingMixin_static() async {
+    await resolveTestUnit('''
+mixin M {
+  static foo() {
+    useFunction(test);
+  }
+}
+
+useFunction(int g(double a, String b)) {}
+''');
+    await assertHasFix('''
+mixin M {
+  static foo() {
+    useFunction(test);
+  }
+
+  static int test(double a, String b) {
+  }
+}
+
+useFunction(int g(double a, String b)) {}
+''');
+  }
+
+  test_functionType_method_targetMixin() async {
+    await resolveTestUnit('''
+main(M m) {
+  useFunction(m.test);
+}
+
+mixin M {
+}
+
+useFunction(int g(double a, String b)) {}
+''');
+    await assertHasFix('''
+main(M m) {
+  useFunction(m.test);
+}
+
+mixin M {
+  int test(double a, String b) {
+  }
+}
+
+useFunction(int g(double a, String b)) {}
+''');
+  }
+}
+
+@reflectiveTest
+class CreateMethodTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_METHOD;
+
+  test_createQualified_emptyClassBody() async {
+    await resolveTestUnit('''
+class A {}
+main() {
+  A.myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+class A {
+  static void myUndefinedMethod() {}
+}
+main() {
+  A.myUndefinedMethod();
+}
+''');
+  }
+
+  test_createQualified_fromClass() async {
+    await resolveTestUnit('''
+class A {
+}
+main() {
+  A.myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+class A {
+  static void myUndefinedMethod() {}
+}
+main() {
+  A.myUndefinedMethod();
+}
+''');
+  }
+
+  test_createQualified_fromClass_hasOtherMember() async {
+    await resolveTestUnit('''
+class A {
+  foo() {}
+}
+main() {
+  A.myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+class A {
+  foo() {}
+
+  static void myUndefinedMethod() {}
+}
+main() {
+  A.myUndefinedMethod();
+}
+''');
+  }
+
+  test_createQualified_fromInstance() async {
+    await resolveTestUnit('''
+class A {
+}
+main(A a) {
+  a.myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+class A {
+  void myUndefinedMethod() {}
+}
+main(A a) {
+  a.myUndefinedMethod();
+}
+''');
+  }
+
+  test_createQualified_targetIsFunctionType() async {
+    await resolveTestUnit('''
+typedef A();
+main() {
+  A.myUndefinedMethod();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_createQualified_targetIsUnresolved() async {
+    await resolveTestUnit('''
+main() {
+  NoSuchClass.myUndefinedMethod();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_createUnqualified_duplicateArgumentNames() async {
+    await resolveTestUnit('''
+class C {
+  int x;
+}
+
+class D {
+  foo(C c1, C c2) {
+    bar(c1.x, c2.x);
+  }
+}''');
+    await assertHasFix('''
+class C {
+  int x;
+}
+
+class D {
+  foo(C c1, C c2) {
+    bar(c1.x, c2.x);
+  }
+
+  void bar(int x, int x2) {}
+}''');
+  }
+
+  test_createUnqualified_parameters() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    myUndefinedMethod(0, 1.0, '3');
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  main() {
+    myUndefinedMethod(0, 1.0, '3');
+  }
+
+  void myUndefinedMethod(int i, double d, String s) {}
+}
+''');
+    // linked positions
+    int index = 0;
+    assertLinkedGroup(
+        change.linkedEditGroups[index++], ['void myUndefinedMethod(']);
+    assertLinkedGroup(change.linkedEditGroups[index++],
+        ['myUndefinedMethod(0', 'myUndefinedMethod(int']);
+    assertLinkedGroup(
+        change.linkedEditGroups[index++],
+        ['int i'],
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['int', 'num', 'Object', 'Comparable<num>']));
+    assertLinkedGroup(change.linkedEditGroups[index++], ['i,']);
+    assertLinkedGroup(
+        change.linkedEditGroups[index++],
+        ['double d'],
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['double', 'num', 'Object', 'Comparable<num>']));
+    assertLinkedGroup(change.linkedEditGroups[index++], ['d,']);
+    assertLinkedGroup(
+        change.linkedEditGroups[index++],
+        ['String s'],
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['String', 'Object', 'Comparable<String>', 'Pattern']));
+    assertLinkedGroup(change.linkedEditGroups[index++], ['s)']);
+  }
+
+  test_createUnqualified_parameters_named() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    myUndefinedMethod(0, bbb: 1.0, ccc: '2');
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  main() {
+    myUndefinedMethod(0, bbb: 1.0, ccc: '2');
+  }
+
+  void myUndefinedMethod(int i, {double bbb, String ccc}) {}
+}
+''');
+    // linked positions
+    int index = 0;
+    assertLinkedGroup(
+        change.linkedEditGroups[index++], ['void myUndefinedMethod(']);
+    assertLinkedGroup(change.linkedEditGroups[index++],
+        ['myUndefinedMethod(0', 'myUndefinedMethod(int']);
+    assertLinkedGroup(
+        change.linkedEditGroups[index++],
+        ['int i'],
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['int', 'num', 'Object', 'Comparable<num>']));
+    assertLinkedGroup(change.linkedEditGroups[index++], ['i,']);
+    assertLinkedGroup(
+        change.linkedEditGroups[index++],
+        ['double bbb'],
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['double', 'num', 'Object', 'Comparable<num>']));
+    assertLinkedGroup(
+        change.linkedEditGroups[index++],
+        ['String ccc'],
+        expectedSuggestions(LinkedEditSuggestionKind.TYPE,
+            ['String', 'Object', 'Comparable<String>', 'Pattern']));
+  }
+
+  test_createUnqualified_returnType() async {
+    await resolveTestUnit('''
+class A {
+  main() {
+    int v = myUndefinedMethod();
+    print(v);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  main() {
+    int v = myUndefinedMethod();
+    print(v);
+  }
+
+  int myUndefinedMethod() {}
+}
+''');
+    // linked positions
+    assertLinkedGroup(change.linkedEditGroups[0], ['int myUndefinedMethod(']);
+    assertLinkedGroup(change.linkedEditGroups[1],
+        ['myUndefinedMethod();', 'myUndefinedMethod() {']);
+  }
+
+  test_createUnqualified_staticFromField() async {
+    await resolveTestUnit('''
+class A {
+  static var f = myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+class A {
+  static var f = myUndefinedMethod();
+
+  static myUndefinedMethod() {}
+}
+''');
+  }
+
+  test_createUnqualified_staticFromMethod() async {
+    await resolveTestUnit('''
+class A {
+  static main() {
+    myUndefinedMethod();
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  static main() {
+    myUndefinedMethod();
+  }
+
+  static void myUndefinedMethod() {}
+}
+''');
+  }
+
+  test_functionType_method_enclosingClass_static() async {
+    await resolveTestUnit('''
+class A {
+  static foo() {
+    useFunction(test);
+  }
+}
+useFunction(int g(double a, String b)) {}
+''');
+    await assertHasFix('''
+class A {
+  static foo() {
+    useFunction(test);
+  }
+
+  static int test(double a, String b) {
+  }
+}
+useFunction(int g(double a, String b)) {}
+''');
+  }
+
+  test_functionType_method_enclosingClass_static2() async {
+    await resolveTestUnit('''
+class A {
+  var f;
+  A() : f = useFunction(test);
+}
+useFunction(int g(double a, String b)) {}
+''');
+    await assertHasFix('''
+class A {
+  var f;
+  A() : f = useFunction(test);
+
+  static int test(double a, String b) {
+  }
+}
+useFunction(int g(double a, String b)) {}
+''');
+  }
+
+  test_functionType_method_targetClass() async {
+    await resolveTestUnit('''
+main(A a) {
+  useFunction(a.test);
+}
+class A {
+}
+useFunction(int g(double a, String b)) {}
+''');
+    await assertHasFix('''
+main(A a) {
+  useFunction(a.test);
+}
+class A {
+  int test(double a, String b) {
+  }
+}
+useFunction(int g(double a, String b)) {}
+''');
+  }
+
+  test_functionType_method_targetClass_hasOtherMember() async {
+    await resolveTestUnit('''
+main(A a) {
+  useFunction(a.test);
+}
+class A {
+  m() {}
+}
+useFunction(int g(double a, String b)) {}
+''');
+    await assertHasFix('''
+main(A a) {
+  useFunction(a.test);
+}
+class A {
+  m() {}
+
+  int test(double a, String b) {
+  }
+}
+useFunction(int g(double a, String b)) {}
+''');
+  }
+
+  test_functionType_notFunctionType() async {
+    await resolveTestUnit('''
+main(A a) {
+  useFunction(a.test);
+}
+typedef A();
+useFunction(g) {}
+''');
+    await assertNoFix();
+  }
+
+  test_functionType_unknownTarget() async {
+    await resolveTestUnit('''
+main(A a) {
+  useFunction(a.test);
+}
+class A {
+}
+useFunction(g) {}
+''');
+    await assertNoFix();
+  }
+
+  test_generic_argumentType() async {
+    await resolveTestUnit('''
+class A<T> {
+  B b;
+  Map<int, T> items;
+  main() {
+    b.process(items);
+  }
+}
+
+class B {
+}
+''');
+    await assertHasFix('''
+class A<T> {
+  B b;
+  Map<int, T> items;
+  main() {
+    b.process(items);
+  }
+}
+
+class B {
+  void process(Map items) {}
+}
+''');
+  }
+
+  test_generic_literal() async {
+    await resolveTestUnit('''
+class A {
+  B b;
+  List<int> items;
+  main() {
+    b.process(items);
+  }
+}
+
+class B {}
+''');
+    await assertHasFix('''
+class A {
+  B b;
+  List<int> items;
+  main() {
+    b.process(items);
+  }
+}
+
+class B {
+  void process(List<int> items) {}
+}
+''');
+  }
+
+  test_generic_local() async {
+    await resolveTestUnit('''
+class A<T> {
+  List<T> items;
+  main() {
+    process(items);
+  }
+}
+''');
+    await assertHasFix('''
+class A<T> {
+  List<T> items;
+  main() {
+    process(items);
+  }
+
+  void process(List<T> items) {}
+}
+''');
+  }
+
+  test_generic_returnType() async {
+    await resolveTestUnit('''
+class A<T> {
+  main() {
+    T t = new B().compute();
+    print(t);
+  }
+}
+
+class B {
+}
+''');
+    await assertHasFix('''
+class A<T> {
+  main() {
+    T t = new B().compute();
+    print(t);
+  }
+}
+
+class B {
+  compute() {}
+}
+''');
+  }
+
+  test_hint_createQualified_fromInstance() async {
+    await resolveTestUnit('''
+class A {
+}
+main() {
+  var a = new A();
+  a.myUndefinedMethod();
+}
+''');
+    await assertHasFix('''
+class A {
+  void myUndefinedMethod() {}
+}
+main() {
+  var a = new A();
+  a.myUndefinedMethod();
+}
+''');
+  }
+
+  test_inSDK() async {
+    await resolveTestUnit('''
+main() {
+  List.foo();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_parameterType_differentPrefixInTargetUnit() async {
+    String code2 = r'''
+import 'test3.dart' as bbb;
+export 'test3.dart';
+
+class D {
+}
+''';
+
+    addSource('/home/test/lib/test2.dart', code2);
+    addSource('/home/test/lib/test3.dart', r'''
+library test3;
+class E {}
+''');
+
+    await resolveTestUnit('''
+import 'test2.dart' as aaa;
+
+main(aaa.D d, aaa.E e) {
+  d.foo(e);
+}
+''');
+
+    await assertHasFix('''
+import 'test3.dart' as bbb;
+export 'test3.dart';
+
+class D {
+  void foo(bbb.E e) {}
+}
+''', target: '/home/test/lib/test2.dart');
+  }
+
+  test_parameterType_inTargetUnit() async {
+    addSource('/home/test/lib/test2.dart', r'''
+class D {
+}
+
+class E {}
+''');
+
+    await resolveTestUnit('''
+import 'test2.dart' as test2;
+
+main(test2.D d, test2.E e) {
+  d.foo(e);
+}
+''');
+
+    await assertHasFix('''
+class D {
+  void foo(E e) {}
+}
+
+class E {}
+''', target: '/home/test/lib/test2.dart');
+  }
+
+  test_targetIsEnum() async {
+    await resolveTestUnit('''
+enum MyEnum {A, B}
+main() {
+  MyEnum.foo();
+}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_missing_overrides_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_missing_overrides_test.dart
new file mode 100644
index 0000000..7656709
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_missing_overrides_test.dart
@@ -0,0 +1,520 @@
+// 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:analysis_server/src/protocol_server.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateMissingOverridesTest);
+  });
+}
+
+@reflectiveTest
+class CreateMissingOverridesTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_MISSING_OVERRIDES;
+
+  test_field_untyped() async {
+    await resolveTestUnit('''
+class A {
+  var f;
+}
+
+class B implements A {
+}
+''');
+    await assertHasFix('''
+class A {
+  var f;
+}
+
+class B implements A {
+  @override
+  var f;
+}
+''');
+  }
+
+  test_functionTypeAlias() async {
+    await resolveTestUnit('''
+typedef int Binary(int left, int right);
+
+abstract class Emulator {
+  void performBinary(Binary binary);
+}
+
+class MyEmulator extends Emulator {
+}
+''');
+    await assertHasFix('''
+typedef int Binary(int left, int right);
+
+abstract class Emulator {
+  void performBinary(Binary binary);
+}
+
+class MyEmulator extends Emulator {
+  @override
+  void performBinary(Binary binary) {
+    // TODO: implement performBinary
+  }
+}
+''');
+  }
+
+  test_functionTypedParameter() async {
+    await resolveTestUnit('''
+abstract class A {
+  void forEach(int f(double p1, String p2));
+}
+
+class B extends A {
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  void forEach(int f(double p1, String p2));
+}
+
+class B extends A {
+  @override
+  void forEach(int Function(double p1, String p2) f) {
+    // TODO: implement forEach
+  }
+}
+''');
+  }
+
+  test_generics_typeArguments() async {
+    await resolveTestUnit('''
+class Iterator<T> {
+}
+
+abstract class IterableMixin<T> {
+  Iterator<T> get iterator;
+}
+
+class Test extends IterableMixin<int> {
+}
+''');
+    await assertHasFix('''
+class Iterator<T> {
+}
+
+abstract class IterableMixin<T> {
+  Iterator<T> get iterator;
+}
+
+class Test extends IterableMixin<int> {
+  @override
+  // TODO: implement iterator
+  Iterator<int> get iterator => null;
+}
+''');
+  }
+
+  test_generics_typeParameters() async {
+    await resolveTestUnit('''
+abstract class ItemProvider<T> {
+  List<T> getItems();
+}
+
+class Test<V> extends ItemProvider<V> {
+}
+''');
+    await assertHasFix('''
+abstract class ItemProvider<T> {
+  List<T> getItems();
+}
+
+class Test<V> extends ItemProvider<V> {
+  @override
+  List<V> getItems() {
+    // TODO: implement getItems
+    return null;
+  }
+}
+''');
+  }
+
+  test_getter() async {
+    await resolveTestUnit('''
+abstract class A {
+  get g1;
+  int get g2;
+}
+
+class B extends A {
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  get g1;
+  int get g2;
+}
+
+class B extends A {
+  @override
+  // TODO: implement g1
+  get g1 => null;
+
+  @override
+  // TODO: implement g2
+  int get g2 => null;
+}
+''');
+  }
+
+  test_importPrefix() async {
+    await resolveTestUnit('''
+import 'dart:async' as aaa;
+abstract class A {
+  Map<aaa.Future, List<aaa.Future>> g(aaa.Future p);
+}
+
+class B extends A {
+}
+''');
+    await assertHasFix('''
+import 'dart:async' as aaa;
+abstract class A {
+  Map<aaa.Future, List<aaa.Future>> g(aaa.Future p);
+}
+
+class B extends A {
+  @override
+  Map<aaa.Future, List<aaa.Future>> g(aaa.Future p) {
+    // TODO: implement g
+    return null;
+  }
+}
+''');
+  }
+
+  test_mergeToField_getterSetter() async {
+    await resolveTestUnit('''
+class A {
+  int ma;
+  void mb() {}
+  double mc;
+}
+
+class B implements A {
+}
+''');
+    await assertHasFix('''
+class A {
+  int ma;
+  void mb() {}
+  double mc;
+}
+
+class B implements A {
+  @override
+  int ma;
+
+  @override
+  double mc;
+
+  @override
+  void mb() {
+    // TODO: implement mb
+  }
+}
+''');
+  }
+
+  test_method() async {
+    await resolveTestUnit('''
+abstract class A {
+  void m1();
+  int m2();
+  String m3(int p1, double p2, Map<int, List<String>> p3);
+  String m4(p1, p2);
+  String m5(p1, [int p2 = 2, int p3, p4 = 4]);
+  String m6(p1, {int p2 = 2, int p3, p4: 4});
+}
+
+class B extends A {
+}
+''');
+    String expectedCode = '''
+abstract class A {
+  void m1();
+  int m2();
+  String m3(int p1, double p2, Map<int, List<String>> p3);
+  String m4(p1, p2);
+  String m5(p1, [int p2 = 2, int p3, p4 = 4]);
+  String m6(p1, {int p2 = 2, int p3, p4: 4});
+}
+
+class B extends A {
+  @override
+  void m1() {
+    // TODO: implement m1
+  }
+
+  @override
+  int m2() {
+    // TODO: implement m2
+    return null;
+  }
+
+  @override
+  String m3(int p1, double p2, Map<int, List<String>> p3) {
+    // TODO: implement m3
+    return null;
+  }
+
+  @override
+  String m4(p1, p2) {
+    // TODO: implement m4
+    return null;
+  }
+
+  @override
+  String m5(p1, [int p2 = 2, int p3, p4 = 4]) {
+    // TODO: implement m5
+    return null;
+  }
+
+  @override
+  String m6(p1, {int p2 = 2, int p3, p4 = 4}) {
+    // TODO: implement m6
+    return null;
+  }
+}
+''';
+    await assertHasFix(expectedCode);
+    {
+      // end position should be on "m1", not on "m2", "m3", etc.
+      Position endPosition = change.selection;
+      expect(endPosition, isNotNull);
+      expect(endPosition.file, testFile);
+      int endOffset = endPosition.offset;
+      String endString = expectedCode.substring(endOffset, endOffset + 25);
+      expect(endString, contains('m1'));
+      expect(endString, isNot(contains('m2')));
+      expect(endString, isNot(contains('m3')));
+      expect(endString, isNot(contains('m4')));
+      expect(endString, isNot(contains('m5')));
+      expect(endString, isNot(contains('m6')));
+    }
+  }
+
+  test_method_emptyClassBody() async {
+    await resolveTestUnit('''
+abstract class A {
+  void foo();
+}
+
+class B extends A {}
+''');
+    await assertHasFix('''
+abstract class A {
+  void foo();
+}
+
+class B extends A {
+  @override
+  void foo() {
+    // TODO: implement foo
+  }
+}
+''');
+  }
+
+  test_method_generic() async {
+    await resolveTestUnit('''
+class C<T> {}
+class V<E> {}
+
+abstract class A {
+  E1 foo<E1, E2 extends C<int>>(V<E2> v);
+}
+
+class B implements A {
+}
+''');
+    await assertHasFix('''
+class C<T> {}
+class V<E> {}
+
+abstract class A {
+  E1 foo<E1, E2 extends C<int>>(V<E2> v);
+}
+
+class B implements A {
+  @override
+  E1 foo<E1, E2 extends C<int>>(V<E2> v) {
+    // TODO: implement foo
+    return null;
+  }
+}
+''');
+  }
+
+  test_method_generic_withBounds() async {
+    // https://github.com/dart-lang/sdk/issues/31199
+    await resolveTestUnit('''
+abstract class A<K, V> {
+  List<T> foo<T extends V>(K key);
+}
+
+class B<K, V> implements A<K, V> {
+}
+''');
+    await assertHasFix('''
+abstract class A<K, V> {
+  List<T> foo<T extends V>(K key);
+}
+
+class B<K, V> implements A<K, V> {
+  @override
+  List<T> foo<T extends V>(K key) {
+    // TODO: implement foo
+    return null;
+  }
+}
+''');
+  }
+
+  test_method_genericClass2() async {
+    await resolveTestUnit('''
+class A<R> {
+  R foo(int a) => null;
+}
+
+class B<R> extends A<R> {
+  R bar(double b) => null;
+}
+
+class X implements B<bool> {
+}
+''');
+    await assertHasFix('''
+class A<R> {
+  R foo(int a) => null;
+}
+
+class B<R> extends A<R> {
+  R bar(double b) => null;
+}
+
+class X implements B<bool> {
+  @override
+  bool bar(double b) {
+    // TODO: implement bar
+    return null;
+  }
+
+  @override
+  bool foo(int a) {
+    // TODO: implement foo
+    return null;
+  }
+}
+''');
+  }
+
+  test_method_notEmptyClassBody() async {
+    await resolveTestUnit('''
+abstract class A {
+  void foo();
+}
+
+class B extends A {
+  void bar() {}
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  void foo();
+}
+
+class B extends A {
+  void bar() {}
+
+  @override
+  void foo() {
+    // TODO: implement foo
+  }
+}
+''');
+  }
+
+  test_operator() async {
+    await resolveTestUnit('''
+abstract class A {
+  int operator [](int index);
+  void operator []=(int index, String value);
+}
+
+class B extends A {
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  int operator [](int index);
+  void operator []=(int index, String value);
+}
+
+class B extends A {
+  @override
+  int operator [](int index) {
+    // TODO: implement []
+    return null;
+  }
+
+  @override
+  void operator []=(int index, String value) {
+    // TODO: implement []=
+  }
+}
+''');
+  }
+
+  test_setter() async {
+    await resolveTestUnit('''
+abstract class A {
+  set s1(x);
+  set s2(int x);
+  void set s3(String x);
+}
+
+class B extends A {
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  set s1(x);
+  set s2(int x);
+  void set s3(String x);
+}
+
+class B extends A {
+  @override
+  void set s1(x) {
+    // TODO: implement s1
+  }
+
+  @override
+  void set s2(int x) {
+    // TODO: implement s2
+  }
+
+  @override
+  void set s3(String x) {
+    // TODO: implement s3
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_mixin_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_mixin_test.dart
new file mode 100644
index 0000000..463f417
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_mixin_test.dart
@@ -0,0 +1,160 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateMixinTest);
+  });
+}
+
+@reflectiveTest
+class CreateMixinTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_MIXIN;
+
+  test_hasUnresolvedPrefix() async {
+    await resolveTestUnit('''
+main() {
+  prefix.Test v = null;
+  print(v);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_inLibraryOfPrefix() async {
+    String libCode = r'''
+class A {}
+''';
+    addSource('/home/test/lib/lib.dart', libCode);
+    await resolveTestUnit('''
+import 'lib.dart' as lib;
+
+main() {
+  lib.A a = null;
+  lib.Test t = null;
+  print('\$a \$t');
+}
+''');
+    await assertHasFix('''
+class A {}
+
+mixin Test {
+}
+''', target: '/home/test/lib/lib.dart');
+    expect(change.linkedEditGroups, hasLength(1));
+  }
+
+  test_innerLocalFunction() async {
+    await resolveTestUnit('''
+f() {
+  g() {
+    Test v = null;
+    print(v);
+  }
+  g();
+}
+''');
+    await assertHasFix('''
+f() {
+  g() {
+    Test v = null;
+    print(v);
+  }
+  g();
+}
+
+mixin Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
+  }
+
+  test_instanceCreation_withNew() async {
+    await resolveTestUnit('''
+main() {
+  new Test();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_instanceCreation_withoutNew() async {
+    await resolveTestUnit('''
+main() {
+  Test();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_itemOfList() async {
+    await resolveTestUnit('''
+main() {
+  var a = [Test];
+  print(a);
+}
+''');
+    await assertHasFix('''
+main() {
+  var a = [Test];
+  print(a);
+}
+
+mixin Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test];', 'Test {']);
+  }
+
+  test_itemOfList_inAnnotation() async {
+    await resolveTestUnit('''
+class MyAnnotation {
+  const MyAnnotation(a, b);
+}
+@MyAnnotation(int, const [Test])
+main() {}
+''');
+    await assertHasFix('''
+class MyAnnotation {
+  const MyAnnotation(a, b);
+}
+@MyAnnotation(int, const [Test])
+main() {}
+
+mixin Test {
+}
+''', errorFilter: (error) {
+      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
+    });
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test])', 'Test {']);
+  }
+
+  test_simple() async {
+    await resolveTestUnit('''
+main() {
+  Test v = null;
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  Test v = null;
+  print(v);
+}
+
+mixin Test {
+}
+''');
+    assertLinkedGroup(change.linkedEditGroups[0], ['Test v =', 'Test {']);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/create_no_such_method_test.dart b/pkg/analysis_server/test/src/services/correction/fix/create_no_such_method_test.dart
new file mode 100644
index 0000000..5799c31
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/create_no_such_method_test.dart
@@ -0,0 +1,57 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CreateNoSuchMethodTest);
+  });
+}
+
+@reflectiveTest
+class CreateNoSuchMethodTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CREATE_NO_SUCH_METHOD;
+
+  test_class() async {
+    await resolveTestUnit('''
+abstract class A {
+  m1();
+  int m2();
+}
+
+class B extends A {
+  existing() {}
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  m1();
+  int m2();
+}
+
+class B extends A {
+  existing() {}
+
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+''');
+  }
+
+  test_classTypeAlias() async {
+    await resolveTestUnit('''
+abstract class A {
+  m();
+}
+
+class B = Object with A;
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/extend_class_for_mixin_test.dart b/pkg/analysis_server/test/src/services/correction/fix/extend_class_for_mixin_test.dart
new file mode 100644
index 0000000..d65e90a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/extend_class_for_mixin_test.dart
@@ -0,0 +1,79 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ExtendClassForMixinTest);
+  });
+}
+
+@reflectiveTest
+class ExtendClassForMixinTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.EXTEND_CLASS_FOR_MIXIN;
+
+  test_missingClass_withExtends() async {
+    await resolveTestUnit('''
+class A {}
+class B {}
+mixin M on B {}
+class C extends A with M {}
+''');
+    await assertNoFix();
+  }
+
+  test_missingClass_withoutExtends_withImplements() async {
+    await resolveTestUnit('''
+class A {}
+class B {}
+mixin M on B {}
+class C with M implements A {}
+''');
+    await assertHasFix('''
+class A {}
+class B {}
+mixin M on B {}
+class C extends B with M implements A {}
+''');
+  }
+
+  test_missingClass_withoutExtends_withoutImplements() async {
+    await resolveTestUnit('''
+class A {}
+mixin M on A {}
+class C with M {}
+''');
+    await assertHasFix('''
+class A {}
+mixin M on A {}
+class C extends A with M {}
+''');
+  }
+
+  test_missingMixin_withExtends() async {
+    await resolveTestUnit('''
+class A {}
+mixin M {}
+mixin N on M {}
+class C extends A with N {}
+''');
+    await assertNoFix();
+  }
+
+  @failingTest
+  test_missingMixin_withoutExtends() async {
+    await resolveTestUnit('''
+mixin M {}
+mixin N on M {}
+class C with N {}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart b/pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart
new file mode 100644
index 0000000..e9b5fa2
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart
@@ -0,0 +1,272 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/error/lint_codes.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    hide AnalysisError;
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/test.dart';
+
+import '../../../../abstract_single_unit.dart';
+
+/// A base class defining support for writing fix processor tests that are
+/// specific to fixes associated with lints that use the FixKind.
+abstract class FixProcessorLintTest extends FixProcessorTest {
+  /// Return the lint code being tested.
+  String get lintCode;
+
+  /// Find the error that is to be fixed by computing the errors in the file,
+  /// using the [errorFilter] to filter out errors that should be ignored, and
+  /// expecting that there is a single remaining error. The error filter should
+  /// return `true` if the error should not be ignored.
+  Future<AnalysisError> _findErrorToFix(
+      bool Function(AnalysisError) errorFilter,
+      {int length}) async {
+    int index = testCode.indexOf('/*LINT*/');
+    if (index < 0) {
+      fail('Missing "/*LINT*/" marker');
+    }
+    return new AnalysisError(testSource, index + '/*LINT*/'.length, length ?? 0,
+        new LintCode(lintCode, '<ignored>'));
+  }
+}
+
+/// A base class defining support for writing fix processor tests.
+abstract class FixProcessorTest extends AbstractSingleUnitTest {
+  /// The errors in the file for which fixes are being computed.
+  List<AnalysisError> _errors;
+
+  /// The source change associated with the fix that was found, or `null` if
+  /// neither [assertHasFix] nor [assertHasFixAllFix] has been invoked.
+  SourceChange change;
+
+  /// The result of applying the [change] to the file content, or `null` if
+  /// neither [assertHasFix] nor [assertHasFixAllFix] has been invoked.
+  String resultCode;
+
+  /// Return the kind of fixes being tested by this test class.
+  FixKind get kind;
+
+  /// The workspace in which fixes contributor operates.
+  ChangeWorkspace get workspace {
+    return DartChangeWorkspace([session]);
+  }
+
+  Future<void> assertHasFix(String expected,
+      {bool Function(AnalysisError) errorFilter,
+      int length,
+      String target}) async {
+    AnalysisError error = await _findErrorToFix(errorFilter, length: length);
+    Fix fix = await _assertHasFix(error);
+    change = fix.change;
+
+    // apply to "file"
+    List<SourceFileEdit> fileEdits = change.edits;
+    expect(fileEdits, hasLength(1));
+
+    String fileContent = testCode;
+    if (target != null) {
+      expect(fileEdits.first.file, convertPath(target));
+      fileContent = getFile(target).readAsStringSync();
+    }
+
+    resultCode = SourceEdit.applySequence(fileContent, change.edits[0].edits);
+    expect(resultCode, expected);
+  }
+
+  assertHasFixAllFix(ErrorCode errorCode, String expected,
+      {String target}) async {
+    AnalysisError error = await _findErrorToFixOfType(errorCode);
+    Fix fix = await _assertHasFixAllFix(error);
+    change = fix.change;
+
+    // apply to "file"
+    List<SourceFileEdit> fileEdits = change.edits;
+    expect(fileEdits, hasLength(1));
+
+    String fileContent = testCode;
+    if (target != null) {
+      expect(fileEdits.first.file, convertPath(target));
+      fileContent = getFile(target).readAsStringSync();
+    }
+
+    resultCode = SourceEdit.applySequence(fileContent, change.edits[0].edits);
+    expect(resultCode, expected);
+  }
+
+  Future<void> assertHasFixWithoutApplying(
+      {bool Function(AnalysisError) errorFilter}) async {
+    AnalysisError error = await _findErrorToFix(errorFilter);
+    Fix fix = await _assertHasFix(error);
+    change = fix.change;
+  }
+
+  void assertLinkedGroup(LinkedEditGroup group, List<String> expectedStrings,
+      [List<LinkedEditSuggestion> expectedSuggestions]) {
+    List<Position> expectedPositions = _findResultPositions(expectedStrings);
+    expect(group.positions, unorderedEquals(expectedPositions));
+    if (expectedSuggestions != null) {
+      expect(group.suggestions, unorderedEquals(expectedSuggestions));
+    }
+  }
+
+  /// Compute fixes for all of the errors in the test file to effectively assert
+  /// that no exceptions will be thrown by doing so.
+  Future<void> assertNoExceptions() async {
+    List<AnalysisError> errors = await _computeErrors();
+    for (var error in errors) {
+      await _computeFixes(error);
+    }
+  }
+
+  /// Compute fixes and ensure that there is no fix of the [kind] being tested by
+  /// this class.
+  Future<void> assertNoFix({bool Function(AnalysisError) errorFilter}) async {
+    AnalysisError error = await _findErrorToFix(errorFilter);
+    await _assertNoFix(error);
+  }
+
+  List<LinkedEditSuggestion> expectedSuggestions(
+      LinkedEditSuggestionKind kind, List<String> values) {
+    return values.map((value) {
+      return new LinkedEditSuggestion(value, kind);
+    }).toList();
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    verifyNoTestUnitErrors = false;
+  }
+
+  /// Computes fixes and verifies that there is a fix for the given [error] of
+  /// the appropriate kind.
+  Future<Fix> _assertHasFix(AnalysisError error) async {
+    // Compute the fixes for this AnalysisError
+    final List<Fix> fixes = await _computeFixes(error);
+
+    // Assert that none of the fixes are a fix-all fix.
+    Fix foundFix = null;
+    for (Fix fix in fixes) {
+      if (fix.isFixAllFix()) {
+        fail('A fix-all fix was found for the error: $error '
+            'in the computed set of fixes:\n${fixes.join('\n')}');
+      } else if (fix.kind == kind) {
+        foundFix ??= fix;
+      }
+    }
+    if (foundFix == null) {
+      fail('Expected to find fix $kind in\n${fixes.join('\n')}');
+    }
+    return foundFix;
+  }
+
+  /// Computes fixes and verifies that there is a fix for the given [error] of
+  /// the appropriate kind.
+  Future<Fix> _assertHasFixAllFix(AnalysisError error) async {
+    if (!kind.canBeAppliedTogether()) {
+      fail('Expected to find and return fix-all FixKind for $kind, '
+          'but kind.canBeAppliedTogether is ${kind.canBeAppliedTogether}');
+    }
+
+    // Compute the fixes for the error.
+    List<Fix> fixes = await _computeFixes(error);
+
+    // Assert that there exists such a fix in the list.
+    Fix foundFix = null;
+    for (Fix fix in fixes) {
+      if (fix.kind == kind && fix.isFixAllFix()) {
+        foundFix = fix;
+        break;
+      }
+    }
+    if (foundFix == null) {
+      fail('No fix-all fix was found for the error: $error '
+          'in the computed set of fixes:\n${fixes.join('\n')}');
+    }
+    return foundFix;
+  }
+
+  Future<void> _assertNoFix(AnalysisError error) async {
+    List<Fix> fixes = await _computeFixes(error);
+    for (Fix fix in fixes) {
+      if (fix.kind == kind) {
+        fail('Unexpected fix $kind in\n${fixes.join('\n')}');
+      }
+    }
+  }
+
+  Future<List<AnalysisError>> _computeErrors() async {
+    if (_errors == null) {
+      if (testAnalysisResult != null) {
+        _errors = testAnalysisResult.errors;
+      }
+      if (_errors == null) {
+        var result = await session.getResolvedUnit(testFile);
+        _errors = result.errors;
+      }
+    }
+    return _errors;
+  }
+
+  /// Computes fixes for the given [error] in [testUnit].
+  Future<List<Fix>> _computeFixes(AnalysisError error) async {
+    var context = new DartFixContextImpl(workspace, testAnalysisResult, error);
+    return await new DartFixContributor().computeFixes(context);
+  }
+
+  /// Find the error that is to be fixed by computing the errors in the file,
+  /// using the [errorFilter] to filter out errors that should be ignored, and
+  /// expecting that there is a single remaining error. The error filter should
+  /// return `true` if the error should not be ignored.
+  Future<AnalysisError> _findErrorToFix(
+      bool Function(AnalysisError) errorFilter,
+      {int length}) async {
+    List<AnalysisError> errors = await _computeErrors();
+    if (errorFilter != null) {
+      if (errors.length == 1) {
+        fail('Unnecessary error filter');
+      }
+      errors = errors.where(errorFilter).toList();
+    }
+    if (errors.length == 0) {
+      fail('Expected one error, found: none');
+    } else if (errors.length > 1) {
+      StringBuffer buffer = new StringBuffer();
+      buffer.writeln('Expected one error, found:');
+      for (AnalysisError error in errors) {
+        buffer.writeln('  $error [${error.errorCode}]');
+      }
+      fail(buffer.toString());
+    }
+    return errors[0];
+  }
+
+  Future<AnalysisError> _findErrorToFixOfType(ErrorCode errorCode) async {
+    List<AnalysisError> errors = await _computeErrors();
+    for (AnalysisError error in errors) {
+      if (error.errorCode == errorCode) {
+        return error;
+      }
+    }
+    return null;
+  }
+
+  List<Position> _findResultPositions(List<String> searchStrings) {
+    List<Position> positions = <Position>[];
+    for (String search in searchStrings) {
+      int offset = resultCode.indexOf(search);
+      positions.add(new Position(testFile, offset));
+    }
+    return positions;
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/fix_test.dart b/pkg/analysis_server/test/src/services/correction/fix/fix_test.dart
new file mode 100644
index 0000000..655614c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/fix_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(FixTest);
+  });
+}
+
+@reflectiveTest
+class FixTest extends FixProcessorTest {
+  @override
+  FixKind get kind => fail('kind should not be requested');
+
+  test_malformedTypeTest() async {
+    await resolveTestUnit('''
+main(p) {
+  p i s Null;
+}''');
+    await assertNoExceptions();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/import_async_test.dart b/pkg/analysis_server/test/src/services/correction/fix/import_async_test.dart
new file mode 100644
index 0000000..7bd9141
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/import_async_test.dart
@@ -0,0 +1,51 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportAsyncTest);
+  });
+}
+
+@reflectiveTest
+class ImportAsyncTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.IMPORT_ASYNC;
+
+  test_future() async {
+    updateTestPubspecFile('''
+environment:
+  sdk: ^2.0.0
+''');
+    await resolveTestUnit('''
+Future<int> zero() async => 0;
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_stream() async {
+    updateTestPubspecFile('''
+environment:
+  sdk: ^2.0.0
+''');
+    await resolveTestUnit('''
+Stream<int> zero() => null;
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+Stream<int> zero() => null;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/import_library_prefix_test.dart b/pkg/analysis_server/test/src/services/correction/fix/import_library_prefix_test.dart
new file mode 100644
index 0000000..af0bbbe
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/import_library_prefix_test.dart
@@ -0,0 +1,57 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportLibraryPrefixTest);
+  });
+}
+
+@reflectiveTest
+class ImportLibraryPrefixTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.IMPORT_LIBRARY_PREFIX;
+
+  test_withClass() async {
+    await resolveTestUnit('''
+import 'dart:collection' as pref;
+main() {
+  pref.HashMap s = null;
+  LinkedHashMap f = null;
+  print('\$s \$f');
+}
+''');
+    await assertHasFix('''
+import 'dart:collection' as pref;
+main() {
+  pref.HashMap s = null;
+  pref.LinkedHashMap f = null;
+  print('\$s \$f');
+}
+''');
+  }
+
+  test_withTopLevelVariable() async {
+    await resolveTestUnit('''
+import 'dart:math' as pref;
+main() {
+  print(pref.E);
+  print(PI);
+}
+''');
+    await assertHasFix('''
+import 'dart:math' as pref;
+main() {
+  print(pref.E);
+  print(pref.PI);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/import_library_project_test.dart b/pkg/analysis_server/test/src/services/correction/fix/import_library_project_test.dart
new file mode 100644
index 0000000..68d5820
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/import_library_project_test.dart
@@ -0,0 +1,485 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportLibraryProject1Test);
+    defineReflectiveTests(ImportLibraryProject2Test);
+    defineReflectiveTests(ImportLibraryProject3Test);
+  });
+}
+
+@reflectiveTest
+class ImportLibraryProject1Test extends FixProcessorTest
+    with ImportLibraryTestMixin {
+  @override
+  FixKind get kind => DartFixKind.IMPORT_LIBRARY_PROJECT1;
+
+  test_alreadyImported_package() async {
+    addSource('/home/test/lib/lib.dart', '''
+class A {}
+class B {}
+''');
+    await resolveTestUnit('''
+import 'lib.dart' show A;
+main() {
+  A a;
+  B b;
+  print('\$a \$b');
+}
+''');
+    await assertNoFix();
+  }
+
+  test_notInLib() async {
+    addSource('/home/other/test/lib.dart', 'class Test {}');
+    await resolveTestUnit('''
+main() {
+  Test t;
+  print(t);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_preferDirectOverExport() async {
+    _configureMyPkg({'b.dart': 'class Test {}', 'a.dart': "export 'b.dart';"});
+    await resolveTestUnit('''
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+    await assertHasFix('''
+import 'package:my_pkg/b.dart';
+
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+  }
+
+  test_preferDirectOverExport_src() async {
+    _configureMyPkg({'b.dart': 'class Test {}', 'a.dart': "export 'b.dart';"});
+    await resolveTestUnit('''
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+    await assertHasFix('''
+import 'package:my_pkg/b.dart';
+
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+  }
+
+  test_withClass_annotation() async {
+    addSource('/home/test/lib/lib.dart', '''
+library lib;
+class Test {
+  const Test(int p);
+}
+''');
+    await resolveTestUnit('''
+@Test(0)
+main() {
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+@Test(0)
+main() {
+}
+''');
+  }
+
+  test_withClass_hasOtherLibraryWithPrefix() async {
+    addSource('/home/test/lib/a.dart', '''
+library a;
+class One {}
+''');
+    addSource('/home/test/lib/b.dart', '''
+library b;
+class One {}
+class Two {}
+''');
+    await resolveTestUnit('''
+import 'package:test/b.dart' show Two;
+main () {
+  new Two();
+  new One();
+}
+''');
+    await assertHasFix('''
+import 'package:test/a.dart';
+import 'package:test/b.dart' show Two;
+main () {
+  new Two();
+  new One();
+}
+''');
+  }
+
+  test_withClass_inParentFolder() async {
+    testFile = convertPath('/home/test/bin/aaa/test.dart');
+    addSource('/home/test/bin/lib.dart', '''
+library lib;
+class Test {}
+''');
+    await resolveTestUnit('''
+main() {
+  Test t = null;
+  print(t);
+}
+''');
+    await assertHasFix('''
+import '../lib.dart';
+
+main() {
+  Test t = null;
+  print(t);
+}
+''');
+  }
+
+  test_withClass_inRelativeFolder() async {
+    testFile = convertPath('/home/test/bin/test.dart');
+    addSource('/home/test/tool/sub/folder/lib.dart', '''
+library lib;
+class Test {}
+''');
+    await resolveTestUnit('''
+main() {
+  Test t = null;
+  print(t);
+}
+''');
+    await assertHasFix('''
+import '../tool/sub/folder/lib.dart';
+
+main() {
+  Test t = null;
+  print(t);
+}
+''');
+  }
+
+  test_withClass_inSameFolder() async {
+    testFile = convertPath('/home/test/bin/test.dart');
+    addSource('/home/test/bin/lib.dart', '''
+library lib;
+class Test {}
+''');
+    await resolveTestUnit('''
+main() {
+  Test t = null;
+  print(t);
+}
+''');
+    await assertHasFix('''
+import 'lib.dart';
+
+main() {
+  Test t = null;
+  print(t);
+}
+''');
+  }
+
+  test_withClass_instanceCreation_const() async {
+    addSource('/home/test/lib/lib.dart', '''
+class Test {
+  const Test();
+}
+''');
+    await resolveTestUnit('''
+main() {
+  return const Test();
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  return const Test();
+}
+''');
+  }
+
+  test_withClass_instanceCreation_const_namedConstructor() async {
+    addSource('/home/test/lib/lib.dart', '''
+class Test {
+  const Test.named();
+}
+''');
+    await resolveTestUnit('''
+main() {
+  const Test.named();
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  const Test.named();
+}
+''');
+  }
+
+  test_withClass_instanceCreation_implicit() async {
+    addSource('/home/test/lib/lib.dart', '''
+class Test {
+  const Test();
+}
+''');
+    await resolveTestUnit('''
+main() {
+  return Test();
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  return Test();
+}
+''');
+  }
+
+  test_withClass_instanceCreation_new() async {
+    addSource('/home/test/lib/lib.dart', '''
+class Test {
+  const Test();
+}
+''');
+    await resolveTestUnit('''
+main() {
+  return new Test();
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  return new Test();
+}
+''');
+  }
+
+  test_withClass_instanceCreation_new_namedConstructor() async {
+    addSource('/home/test/lib/lib.dart', '''
+class Test {
+  Test.named();
+}
+''');
+    await resolveTestUnit('''
+main() {
+  new Test.named();
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  new Test.named();
+}
+''');
+  }
+
+  test_withFunction() async {
+    addSource('/home/test/lib/lib.dart', '''
+library lib;
+myFunction() {}
+''');
+    await resolveTestUnit('''
+main() {
+  myFunction();
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  myFunction();
+}
+''');
+  }
+
+  test_withFunction_unresolvedMethod() async {
+    addSource('/home/test/lib/lib.dart', '''
+library lib;
+myFunction() {}
+''');
+    await resolveTestUnit('''
+class A {
+  main() {
+    myFunction();
+  }
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+class A {
+  main() {
+    myFunction();
+  }
+}
+''');
+  }
+
+  test_withFunctionTypeAlias() async {
+    addSource('/home/test/lib/lib.dart', '''
+library lib;
+typedef MyFunction();
+''');
+    await resolveTestUnit('''
+main() {
+  MyFunction t = null;
+  print(t);
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  MyFunction t = null;
+  print(t);
+}
+''');
+  }
+
+  test_withTopLevelVariable() async {
+    addSource('/home/test/lib/lib.dart', '''
+library lib;
+int MY_VAR = 42;
+''');
+    await resolveTestUnit('''
+main() {
+  print(MY_VAR);
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  print(MY_VAR);
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ImportLibraryProject2Test extends FixProcessorTest
+    with ImportLibraryTestMixin {
+  @override
+  FixKind get kind => DartFixKind.IMPORT_LIBRARY_PROJECT2;
+
+  test_preferDirectOverExport() async {
+    _configureMyPkg({
+      'b.dart': 'class Test {}',
+      'a.dart': "export 'b.dart';",
+    });
+    await resolveTestUnit('''
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+    await assertHasFix('''
+import 'package:my_pkg/a.dart';
+
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+  }
+
+  test_preferDirectOverExport_src() async {
+    _configureMyPkg({
+      'b.dart': 'class Test {}',
+      'a.dart': "export 'b.dart';",
+    });
+    await resolveTestUnit('''
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+    await assertHasFix('''
+import 'package:my_pkg/a.dart';
+
+main() {
+  Test test = null;
+  print(test);
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ImportLibraryProject3Test extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.IMPORT_LIBRARY_PROJECT3;
+
+  test_inLibSrc_differentContextRoot() async {
+    addPackageFile('bbb', 'b1.dart', r'''
+import 'src/b2.dart';
+class A {}
+''');
+    addPackageFile('bbb', 'src/b2.dart', 'class Test {}');
+    await resolveTestUnit('''
+import 'package:bbb/b1.dart';
+main() {
+  Test t;
+  A a;
+  print('\$t \$a');
+}
+''');
+    await assertNoFix();
+  }
+
+  test_inLibSrc_thisContextRoot() async {
+    addSource('/home/test/lib/src/lib.dart', 'class Test {}');
+    await resolveTestUnit('''
+main() {
+  Test t;
+  print(t);
+}
+''');
+    await assertHasFix('''
+import 'package:test/src/lib.dart';
+
+main() {
+  Test t;
+  print(t);
+}
+''');
+  }
+}
+
+mixin ImportLibraryTestMixin on FixProcessorTest {
+  /// Configures the source factory to have a package named 'my_pkg' and for
+  /// the package to contain all of the files described by the [pathToCode] map.
+  /// The keys in the map are paths relative to the root of the package, and the
+  /// values are the contents of the files at those paths.
+  void _configureMyPkg(Map<String, String> pathToCode) {
+    pathToCode.forEach((path, code) {
+      addPackageFile('my_pkg', path, code);
+    });
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/import_library_sdk_test.dart b/pkg/analysis_server/test/src/services/correction/fix/import_library_sdk_test.dart
new file mode 100644
index 0000000..ce3dcc4
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/import_library_sdk_test.dart
@@ -0,0 +1,272 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportLibrarySdkTest);
+  });
+}
+
+@reflectiveTest
+class ImportLibrarySdkTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.IMPORT_LIBRARY_SDK;
+
+  test_alreadyImported_sdk() async {
+    await resolveTestUnit('''
+import 'dart:collection' show HashMap;
+main() {
+  HashMap s = null;
+  LinkedHashMap f = null;
+  print('\$s \$f');
+}
+''');
+    await assertNoFix();
+  }
+
+  test_withClass_asExpression() async {
+    await resolveTestUnit('''
+main(p) {
+  p as HashMap;
+}
+''');
+    await assertHasFix('''
+import 'dart:collection';
+
+main(p) {
+  p as HashMap;
+}
+''');
+  }
+
+  test_withClass_instanceCreation_explicitNew() async {
+    await resolveTestUnit('''
+class C {
+  foo() {
+    new HashMap();
+  }
+}
+''');
+    await assertHasFix('''
+import 'dart:collection';
+
+class C {
+  foo() {
+    new HashMap();
+  }
+}
+''');
+  }
+
+  test_withClass_instanceCreation_explicitNew_namedConstructor() async {
+    await resolveTestUnit('''
+class C {
+  foo() {
+    new Completer.sync(0);
+  }
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+class C {
+  foo() {
+    new Completer.sync(0);
+  }
+}
+''');
+  }
+
+  test_withClass_instanceCreation_implicitNew() async {
+    await resolveTestUnit('''
+class C {
+  foo() {
+    HashMap();
+  }
+}
+''');
+    await assertHasFix('''
+import 'dart:collection';
+
+class C {
+  foo() {
+    HashMap();
+  }
+}
+''');
+  }
+
+  test_withClass_instanceCreation_implicitNew_namedConstructor() async {
+    await resolveTestUnit('''
+class C {
+  foo() {
+    Completer.sync(0);
+  }
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+class C {
+  foo() {
+    Completer.sync(0);
+  }
+}
+''');
+  }
+
+  test_withClass_invocationTarget() async {
+    await resolveTestUnit('''
+main() {
+  Timer.run(null);
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+main() {
+  Timer.run(null);
+}
+''');
+  }
+
+  test_withClass_IsExpression() async {
+    await resolveTestUnit('''
+main(p) {
+  p is Completer;
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+main(p) {
+  p is Completer;
+}
+''');
+  }
+
+  test_withClass_itemOfList() async {
+    await resolveTestUnit('''
+main() {
+  var a = [Completer];
+  print(a);
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+main() {
+  var a = [Completer];
+  print(a);
+}
+''');
+  }
+
+  test_withClass_itemOfList_inAnnotation() async {
+    await resolveTestUnit('''
+class MyAnnotation {
+  const MyAnnotation(a, b);
+}
+@MyAnnotation(int, const [Completer])
+main() {}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+class MyAnnotation {
+  const MyAnnotation(a, b);
+}
+@MyAnnotation(int, const [Completer])
+main() {}
+''', errorFilter: (error) {
+      return error.errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER;
+    });
+  }
+
+  test_withClass_typeAnnotation() async {
+    await resolveTestUnit('''
+main() {
+  Completer f = null;
+  print(f);
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+main() {
+  Completer f = null;
+  print(f);
+}
+''');
+  }
+
+  test_withClass_typeAnnotation_PrefixedIdentifier() async {
+    await resolveTestUnit('''
+main() {
+  Timer.run;
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+main() {
+  Timer.run;
+}
+''');
+  }
+
+  test_withClass_typeArgument() async {
+    await resolveTestUnit('''
+main() {
+  List<Completer> completers = [];
+  print(completers);
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+main() {
+  List<Completer> completers = [];
+  print(completers);
+}
+''');
+  }
+
+  test_withTopLevelVariable() async {
+    await resolveTestUnit('''
+main() {
+  print(PI);
+}
+''');
+    await assertHasFix('''
+import 'dart:math';
+
+main() {
+  print(PI);
+}
+''');
+  }
+
+  test_withTopLevelVariable_annotation() async {
+    await resolveTestUnit('''
+@PI
+main() {
+}
+''');
+    await assertHasFix('''
+import 'dart:math';
+
+@PI
+main() {
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/import_library_show_test.dart b/pkg/analysis_server/test/src/services/correction/fix/import_library_show_test.dart
new file mode 100644
index 0000000..4f3885f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/import_library_show_test.dart
@@ -0,0 +1,63 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportLibraryShowTest);
+  });
+}
+
+@reflectiveTest
+class ImportLibraryShowTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.IMPORT_LIBRARY_SHOW;
+
+  test_package() async {
+    addSource('/home/test/lib/lib.dart', '''
+class A {}
+class B {}
+''');
+    await resolveTestUnit('''
+import 'lib.dart' show A;
+main() {
+  A a;
+  B b;
+  print('\$a \$b');
+}
+''');
+    await assertHasFix('''
+import 'lib.dart' show A, B;
+main() {
+  A a;
+  B b;
+  print('\$a \$b');
+}
+''');
+  }
+
+  test_sdk() async {
+    await resolveTestUnit('''
+import 'dart:collection' show HashMap;
+main() {
+  HashMap s = null;
+  LinkedHashMap f = null;
+  print('\$s \$f');
+}
+''');
+    await assertHasFix('''
+import 'dart:collection' show HashMap, LinkedHashMap;
+main() {
+  HashMap s = null;
+  LinkedHashMap f = null;
+  print('\$s \$f');
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/insert_semicolon_test.dart b/pkg/analysis_server/test/src/services/correction/fix/insert_semicolon_test.dart
new file mode 100644
index 0000000..77123f3
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/insert_semicolon_test.dart
@@ -0,0 +1,34 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InsertSemicolonTest);
+  });
+}
+
+@reflectiveTest
+class InsertSemicolonTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.INSERT_SEMICOLON;
+
+  test_expectedToken_semicolon() async {
+    await resolveTestUnit('''
+main() {
+  print(0)
+}
+''');
+    await assertHasFix('''
+main() {
+  print(0);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_class_abstract_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_class_abstract_test.dart
new file mode 100644
index 0000000..7dbf4e9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_class_abstract_test.dart
@@ -0,0 +1,51 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MakeClassAbstractTest);
+  });
+}
+
+@reflectiveTest
+class MakeClassAbstractTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.MAKE_CLASS_ABSTRACT;
+
+  test_declaresAbstractMethod() async {
+    await resolveTestUnit('''
+class A {
+  m();
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  m();
+}
+''');
+  }
+
+  test_inheritsAbstractMethod() async {
+    await resolveTestUnit('''
+abstract class A {
+  m();
+}
+class B extends A {
+}
+''');
+    await assertHasFix('''
+abstract class A {
+  m();
+}
+abstract class B extends A {
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_field_not_final_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_field_not_final_test.dart
new file mode 100644
index 0000000..6027ac6
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_field_not_final_test.dart
@@ -0,0 +1,59 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MakeFieldNotFinalTest);
+  });
+}
+
+@reflectiveTest
+class MakeFieldNotFinalTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.MAKE_FIELD_NOT_FINAL;
+
+  test_hasType() async {
+    await resolveTestUnit('''
+class A {
+  final int fff = 1;
+  main() {
+    fff = 2;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int fff = 1;
+  main() {
+    fff = 2;
+  }
+}
+''');
+  }
+
+  test_noType() async {
+    await resolveTestUnit('''
+class A {
+  final fff = 1;
+  main() {
+    fff = 2;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  var fff = 1;
+  main() {
+    fff = 2;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_final_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_final_test.dart
new file mode 100644
index 0000000..31bc18d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_final_test.dart
@@ -0,0 +1,108 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MakeFinalTest);
+  });
+}
+
+@reflectiveTest
+class MakeFinalTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.MAKE_FINAL;
+
+  @override
+  String get lintCode => LintNames.prefer_final_fields;
+
+  test_field_type() async {
+    await resolveTestUnit('''
+class C {
+  int /*LINT*/f = 2;
+}
+''');
+    await assertHasFix('''
+class C {
+  final int /*LINT*/f = 2;
+}
+''');
+  }
+
+  test_field_var() async {
+    await resolveTestUnit('''
+class C {
+  var /*LINT*/f = 2;
+}
+''');
+    await assertHasFix('''
+class C {
+  final /*LINT*/f = 2;
+}
+''');
+  }
+
+  test_local_type() async {
+    await resolveTestUnit('''
+bad() {
+  int /*LINT*/x = 2;
+}
+''');
+    await assertHasFix('''
+bad() {
+  final int /*LINT*/x = 2;
+}
+''');
+  }
+
+  test_local_var() async {
+    await resolveTestUnit('''
+bad() {
+  var /*LINT*/x = 2;
+}
+''');
+    await assertHasFix('''
+bad() {
+  final /*LINT*/x = 2;
+}
+''');
+  }
+
+  test_noKeyword() async {
+    await resolveTestUnit('''
+class C {
+  /*LINT*/f = 2;
+}
+''');
+    await assertHasFix('''
+class C {
+  /*LINT*/final f = 2;
+}
+''');
+  }
+
+  test_topLevel_type() async {
+    await resolveTestUnit('''
+int /*LINT*/x = 2;
+''');
+    await assertHasFix('''
+final int /*LINT*/x = 2;
+''');
+  }
+
+  test_topLevel_var() async {
+    await resolveTestUnit('''
+var /*LINT*/x = 2;
+''');
+    await assertHasFix('''
+final /*LINT*/x = 2;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/move_type_arguments_to_class_test.dart b/pkg/analysis_server/test/src/services/correction/fix/move_type_arguments_to_class_test.dart
new file mode 100644
index 0000000..b7622e9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/move_type_arguments_to_class_test.dart
@@ -0,0 +1,123 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MoveTypeArgumentsToClassTest);
+  });
+}
+
+@reflectiveTest
+class MoveTypeArgumentsToClassTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.MOVE_TYPE_ARGUMENTS_TO_CLASS;
+
+  test_explicitConst() async {
+    await resolveTestUnit('''
+main() {
+  const C.named<int>();
+}
+class C<E> {
+  const C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  const C<int>.named();
+}
+class C<E> {
+  const C.named();
+}
+''');
+  }
+
+  test_explicitNew() async {
+    await resolveTestUnit('''
+main() {
+  new C.named<int>();
+}
+class C<E> {
+  C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  new C<int>.named();
+}
+class C<E> {
+  C.named();
+}
+''');
+  }
+
+  test_explicitNew_alreadyThere() async {
+    await resolveTestUnit('''
+main() {
+  new C<String>.named<int>();
+}
+class C<E> {
+  C.named();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_explicitNew_wrongNumber() async {
+    await resolveTestUnit('''
+main() {
+  new C.named<int, String>();
+}
+class C<E> {
+  C.named();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_implicitConst() async {
+    await resolveTestUnit('''
+main() {
+  const C c = C.named<int>();
+  print(c);
+}
+class C<E> {
+  const C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  const C c = C<int>.named();
+  print(c);
+}
+class C<E> {
+  const C.named();
+}
+''');
+  }
+
+  test_implicitNew() async {
+    await resolveTestUnit('''
+main() {
+  C.named<int>();
+}
+class C<E> {
+  C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  C<int>.named();
+}
+class C<E> {
+  C.named();
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_await_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_await_test.dart
new file mode 100644
index 0000000..6121171
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_await_test.dart
@@ -0,0 +1,51 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveAwaitTest);
+  });
+}
+
+@reflectiveTest
+class RemoveAwaitTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_AWAIT;
+
+  @override
+  String get lintCode => LintNames.await_only_futures;
+
+  test_intLiteral() async {
+    await resolveTestUnit('''
+bad() async {
+  print(/*LINT*/await 23);
+}
+''');
+    await assertHasFix('''
+bad() async {
+  print(/*LINT*/23);
+}
+''');
+  }
+
+  test_stringLiteral() async {
+    await resolveTestUnit('''
+bad() async {
+  print(/*LINT*/await 'hola');
+}
+''');
+    await assertHasFix('''
+bad() async {
+  print(/*LINT*/'hola');
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_dead_code_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_dead_code_test.dart
new file mode 100644
index 0000000..eec8f7c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_dead_code_test.dart
@@ -0,0 +1,71 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveDeadCodeTest);
+  });
+}
+
+@reflectiveTest
+class RemoveDeadCodeTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_DEAD_CODE;
+
+  test_condition() async {
+    await resolveTestUnit('''
+main(int p) {
+  if (true || p > 5) {
+    print(1);
+  }
+}
+''');
+    await assertHasFix('''
+main(int p) {
+  if (true) {
+    print(1);
+  }
+}
+''');
+  }
+
+  test_statements_one() async {
+    await resolveTestUnit('''
+int main() {
+  print(0);
+  return 42;
+  print(1);
+}
+''');
+    await assertHasFix('''
+int main() {
+  print(0);
+  return 42;
+}
+''');
+  }
+
+  test_statements_two() async {
+    await resolveTestUnit('''
+int main() {
+  print(0);
+  return 42;
+  print(1);
+  print(2);
+}
+''');
+    await assertHasFix('''
+int main() {
+  print(0);
+  return 42;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_empty_catch_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_catch_test.dart
new file mode 100644
index 0000000..b5784b8
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_catch_test.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveEmptyCatchTest);
+  });
+}
+
+@reflectiveTest
+class RemoveEmptyCatchTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_EMPTY_CATCH;
+
+  @override
+  String get lintCode => LintNames.empty_catches;
+
+  test_newLine() async {
+    await resolveTestUnit('''
+void foo() {
+  try {}
+  catch (e) {/*LINT*/}
+  finally {}
+}
+''');
+    await assertHasFix('''
+void foo() {
+  try {}
+  finally {}
+}
+''');
+  }
+
+  test_sameLine() async {
+    await resolveTestUnit('''
+void foo() {
+  try {} catch (e) {/*LINT*/} finally {}
+}
+''');
+    await assertHasFix('''
+void foo() {
+  try {} finally {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_empty_constructor_body_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_constructor_body_test.dart
new file mode 100644
index 0000000..3030ea2
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_constructor_body_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveEmptyConstructorBodyTest);
+  });
+}
+
+@reflectiveTest
+class RemoveEmptyConstructorBodyTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_EMPTY_CONSTRUCTOR_BODY;
+
+  @override
+  String get lintCode => LintNames.empty_constructor_bodies;
+
+  test_empty() async {
+    await resolveTestUnit('''
+class C {
+  C() {/*LINT*/}
+}
+''');
+    await assertHasFix('''
+class C {
+  C();
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_empty_else_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_else_test.dart
new file mode 100644
index 0000000..1019af5
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_else_test.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveEmptyElseTest);
+  });
+}
+
+@reflectiveTest
+class RemoveEmptyElseTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_EMPTY_ELSE;
+
+  @override
+  String get lintCode => LintNames.avoid_empty_else;
+
+  test_newLine() async {
+    await resolveTestUnit('''
+void foo(bool cond) {
+  if (cond) {
+    //
+  }
+  else /*LINT*/;
+}
+''');
+    await assertHasFix('''
+void foo(bool cond) {
+  if (cond) {
+    //
+  }
+}
+''');
+  }
+
+  test_sameLine() async {
+    await resolveTestUnit('''
+void foo(bool cond) {
+  if (cond) {
+    //
+  } else /*LINT*/;
+}
+''');
+    await assertHasFix('''
+void foo(bool cond) {
+  if (cond) {
+    //
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_empty_statement_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_statement_test.dart
new file mode 100644
index 0000000..18a278c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_empty_statement_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveEmptyStatementTest);
+  });
+}
+
+@reflectiveTest
+class RemoveEmptyStatementTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_EMPTY_STATEMENT;
+
+  @override
+  String get lintCode => LintNames.empty_statements;
+
+  test_insideBlock() async {
+    await resolveTestUnit('''
+void foo() {
+  while(true) {
+    /*LINT*/;
+  }
+}
+''');
+    await assertHasFix('''
+void foo() {
+  while(true) {
+    /*LINT*/
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_initializer_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_initializer_test.dart
new file mode 100644
index 0000000..b686d62
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_initializer_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveInitializerTest);
+  });
+}
+
+@reflectiveTest
+class RemoveInitializerTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_INITIALIZER;
+
+  @override
+  String get lintCode => LintNames.avoid_init_to_null;
+
+  test_field() async {
+    await resolveTestUnit('''
+class Test {
+  int /*LINT*/x = null;
+}
+''');
+    await assertHasFix('''
+class Test {
+  int /*LINT*/x;
+}
+''');
+  }
+
+  test_listOfVariableDeclarations() async {
+    await resolveTestUnit('''
+String a = 'a', /*LINT*/b = null, c = 'c';
+''');
+    await assertHasFix('''
+String a = 'a', /*LINT*/b, c = 'c';
+''');
+  }
+
+  test_topLevel() async {
+    await resolveTestUnit('''
+var /*LINT*/x = null;
+''');
+    await assertHasFix('''
+var /*LINT*/x;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_interpolation_braces_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_interpolation_braces_test.dart
new file mode 100644
index 0000000..2fdfad9a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_interpolation_braces_test.dart
@@ -0,0 +1,40 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveInterpolationBracesTest);
+  });
+}
+
+@reflectiveTest
+class RemoveInterpolationBracesTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_INTERPOLATION_BRACES;
+
+  @override
+  String get lintCode => LintNames.unnecessary_brace_in_string_interp;
+
+  test_withSpace() async {
+    await resolveTestUnit(r'''
+main() {
+  var v = 42;
+  print('v: /*LINT*/${ v}');
+}
+''');
+    await assertHasFix(r'''
+main() {
+  var v = 42;
+  print('v: /*LINT*/$v');
+}
+''', length: 4);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart
new file mode 100644
index 0000000..443d382
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart
@@ -0,0 +1,78 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveMethodDeclarationTest);
+  });
+}
+
+@reflectiveTest
+class RemoveMethodDeclarationTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_METHOD_DECLARATION;
+
+  @override
+  String get lintCode => LintNames.unnecessary_override;
+
+  test_getter() async {
+    await resolveTestUnit('''
+class A {
+  int x;
+}
+class B extends A {
+  @override
+  int get /*LINT*/x => super.x;
+}
+''');
+    await assertHasFix('''
+class A {
+  int x;
+}
+class B extends A {
+}
+''');
+  }
+
+  test_method() async {
+    await resolveTestUnit('''
+class A {
+  @override
+  String /*LINT*/toString() => super.toString();
+}
+''');
+    await assertHasFix('''
+class A {
+}
+''');
+  }
+
+  test_setter() async {
+    await resolveTestUnit('''
+class A {
+  int x;
+}
+class B extends A {
+  @override
+  set /*LINT*/x(int other) {
+    this.x = other;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int x;
+}
+class B extends A {
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_parameters_in_getter_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_parameters_in_getter_declaration_test.dart
new file mode 100644
index 0000000..20606f5
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_parameters_in_getter_declaration_test.dart
@@ -0,0 +1,47 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveParametersInGetterDeclarationTest);
+  });
+}
+
+@reflectiveTest
+class RemoveParametersInGetterDeclarationTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_PARAMETERS_IN_GETTER_DECLARATION;
+
+  test_emptyList() async {
+    await resolveTestUnit('''
+class A {
+  int get foo() => 0;
+}
+''');
+    await assertHasFix('''
+class A {
+  int get foo => 0;
+}
+''');
+  }
+
+  test_nonEmptyList() async {
+    await resolveTestUnit('''
+class A {
+  int get foo(int a) => 0;
+}
+''');
+    await assertHasFix('''
+class A {
+  int get foo => 0;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_parentheses_in_getter_invocation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_parentheses_in_getter_invocation_test.dart
new file mode 100644
index 0000000..65e1c39
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_parentheses_in_getter_invocation_test.dart
@@ -0,0 +1,40 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveParenthesesInGetterInvocationTest);
+  });
+}
+
+@reflectiveTest
+class RemoveParenthesesInGetterInvocationTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_PARENTHESIS_IN_GETTER_INVOCATION;
+
+  test_noArguments() async {
+    await resolveTestUnit('''
+class A {
+  int get foo => 0;
+}
+main(A a) {
+  a.foo();
+}
+''');
+    await assertHasFix('''
+class A {
+  int get foo => 0;
+}
+main(A a) {
+  a.foo;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_this_expression_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_this_expression_test.dart
new file mode 100644
index 0000000..5ea13d4
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_this_expression_test.dart
@@ -0,0 +1,106 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveThisExpressionTest);
+  });
+}
+
+@reflectiveTest
+class RemoveThisExpressionTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_THIS_EXPRESSION;
+
+  @override
+  String get lintCode => LintNames.unnecessary_this;
+
+  test_methodInvocation_oneCharacterOperator() async {
+    await resolveTestUnit('''
+class A {
+  void foo() {
+    /*LINT*/this.foo();
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  void foo() {
+    /*LINT*/foo();
+  }
+}
+''');
+  }
+
+  test_methodInvocation_twoCharactersOperator() async {
+    await resolveTestUnit('''
+class A {
+  void foo() {
+    /*LINT*/this?.foo();
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  void foo() {
+    /*LINT*/foo();
+  }
+}
+''');
+  }
+
+  test_notAThisExpression() async {
+    await resolveTestUnit('''
+void foo() {
+  final /*LINT*/this.id;
+}
+''');
+    await assertNoFix();
+  }
+
+  test_propertyAccess_oneCharacterOperator() async {
+    await resolveTestUnit('''
+class A {
+  int x;
+  void foo() {
+    /*LINT*/this.x = 2;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int x;
+  void foo() {
+    /*LINT*/x = 2;
+  }
+}
+''');
+  }
+
+  test_propertyAccess_twoCharactersOperator() async {
+    await resolveTestUnit('''
+class A {
+  int x;
+  void foo() {
+    /*LINT*/this?.x = 2;
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  int x;
+  void foo() {
+    /*LINT*/x = 2;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_type_annotation_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_type_annotation_test.dart
new file mode 100644
index 0000000..54deb8b
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_type_annotation_test.dart
@@ -0,0 +1,164 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AvoidAnnotatingWithDynamicTest);
+    defineReflectiveTests(AvoidReturnTypesOnSettersTest);
+    defineReflectiveTests(AvoidTypesOnClosureParametersTest);
+    defineReflectiveTests(TypeInitFormalsTest);
+  });
+}
+
+@reflectiveTest
+class AvoidAnnotatingWithDynamicTest extends RemoveTypeAnnotationTest {
+  @override
+  String get lintCode => LintNames.avoid_annotating_with_dynamic;
+
+  test_insideFunctionTypedFormalParameter() async {
+    await resolveTestUnit('''
+bad(void foo(/*LINT*/dynamic x)) {
+  return null;
+}
+''');
+    await assertHasFix('''
+bad(void foo(/*LINT*/x)) {
+  return null;
+}
+''');
+  }
+
+  test_namedParameter() async {
+    await resolveTestUnit('''
+bad({/*LINT*/dynamic defaultValue}) {
+  return null;
+}
+''');
+    await assertHasFix('''
+bad({/*LINT*/defaultValue}) {
+  return null;
+}
+''');
+  }
+
+  test_normalParameter() async {
+    await resolveTestUnit('''
+bad(/*LINT*/dynamic defaultValue) {
+  return null;
+}
+''');
+    await assertHasFix('''
+bad(/*LINT*/defaultValue) {
+  return null;
+}
+''');
+  }
+
+  test_optionalParameter() async {
+    await resolveTestUnit('''
+bad([/*LINT*/dynamic defaultValue]) {
+  return null;
+}
+''');
+    await assertHasFix('''
+bad([/*LINT*/defaultValue]) {
+  return null;
+}
+''');
+  }
+}
+
+@reflectiveTest
+class AvoidReturnTypesOnSettersTest extends RemoveTypeAnnotationTest {
+  @override
+  String get lintCode => LintNames.avoid_return_types_on_setters;
+
+  test_void() async {
+    await resolveTestUnit('''
+/*LINT*/void set speed2(int ms) {}
+''');
+    await assertHasFix('''
+/*LINT*/set speed2(int ms) {}
+''');
+  }
+}
+
+@reflectiveTest
+class AvoidTypesOnClosureParametersTest extends RemoveTypeAnnotationTest {
+  @override
+  String get lintCode => LintNames.avoid_types_on_closure_parameters;
+
+  test_namedParameter() async {
+    await resolveTestUnit('''
+var x = ({/*LINT*/Future<int> defaultValue}) {
+  return null;
+};
+''');
+    await assertHasFix('''
+var x = ({/*LINT*/defaultValue}) {
+  return null;
+};
+''');
+  }
+
+  test_normalParameter() async {
+    await resolveTestUnit('''
+var x = (/*LINT*/Future<int> defaultValue) {
+  return null;
+};
+''');
+    await assertHasFix('''
+var x = (/*LINT*/defaultValue) {
+  return null;
+};
+''');
+  }
+
+  test_optionalParameter() async {
+    await resolveTestUnit('''
+var x = ([/*LINT*/Future<int> defaultValue]) {
+  return null;
+};
+''');
+    await assertHasFix('''
+var x = ([/*LINT*/defaultValue]) {
+  return null;
+};
+''');
+  }
+}
+
+@reflectiveTest
+class TypeInitFormalsTest extends RemoveTypeAnnotationTest {
+  @override
+  String get lintCode => LintNames.type_init_formals;
+
+  test_void() async {
+    await resolveTestUnit('''
+class C {
+  int f;
+  C(/*LINT*/int this.f);
+}
+''');
+    await assertHasFix('''
+class C {
+  int f;
+  C(/*LINT*/this.f);
+}
+''');
+  }
+}
+
+@reflectiveTest
+abstract class RemoveTypeAnnotationTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_TYPE_ANNOTATION;
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_type_arguments_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_type_arguments_test.dart
new file mode 100644
index 0000000..b27594f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_type_arguments_test.dart
@@ -0,0 +1,99 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveTypeArgumentsTest);
+  });
+}
+
+@reflectiveTest
+class RemoveTypeArgumentsTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_TYPE_ARGUMENTS;
+
+  test_explicitConst() async {
+    await resolveTestUnit('''
+main() {
+  const C.named<int>();
+}
+class C<E> {
+  const C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  const C.named();
+}
+class C<E> {
+  const C.named();
+}
+''');
+  }
+
+  test_explicitNew() async {
+    await resolveTestUnit('''
+main() {
+  new C.named<int>();
+}
+class C<E> {
+  C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  new C.named();
+}
+class C<E> {
+  C.named();
+}
+''');
+  }
+
+  test_implicitConst() async {
+    await resolveTestUnit('''
+main() {
+  const C c = C.named<int>();
+  print(c);
+}
+class C<E> {
+  const C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  const C c = C.named();
+  print(c);
+}
+class C<E> {
+  const C.named();
+}
+''');
+  }
+
+  test_implicitNew() async {
+    await resolveTestUnit('''
+main() {
+  C.named<int>();
+}
+class C<E> {
+  C.named();
+}
+''');
+    await assertHasFix('''
+main() {
+  C.named();
+}
+class C<E> {
+  C.named();
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_cast_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_cast_test.dart
new file mode 100644
index 0000000..9218c3b
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_cast_test.dart
@@ -0,0 +1,68 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnnecessaryCastTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnnecessaryCastTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_UNNECESSARY_CAST;
+
+  test_assignment() async {
+    await resolveTestUnit('''
+main(Object p) {
+  if (p is String) {
+    String v = ((p as String));
+    print(v);
+  }
+}
+''');
+    await assertHasFix('''
+main(Object p) {
+  if (p is String) {
+    String v = p;
+    print(v);
+  }
+}
+''');
+  }
+
+  test_assignment_all() async {
+    await resolveTestUnit('''
+main(Object p, Object q) {
+  if (p is String) {
+    String v = ((p as String));
+    print(v);
+  }
+  if (q is int) {
+    int v = ((q as int));
+    print(v);
+  }
+}
+''');
+    await assertHasFixAllFix(HintCode.UNNECESSARY_CAST, '''
+main(Object p, Object q) {
+  if (p is String) {
+    String v = p;
+    print(v);
+  }
+  if (q is int) {
+    int v = q;
+    print(v);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unused_catch_clause_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_catch_clause_test.dart
new file mode 100644
index 0000000..8bd4f51
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_catch_clause_test.dart
@@ -0,0 +1,40 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnusedCatchClauseTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnusedCatchClauseTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_UNUSED_CATCH_CLAUSE;
+
+  test_removeUnusedCatchClause() async {
+    await resolveTestUnit('''
+main() {
+  try {
+    throw 42;
+  } on int catch (e) {
+  }
+}
+''');
+    await assertHasFix('''
+main() {
+  try {
+    throw 42;
+  } on int {
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unused_catch_stack_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_catch_stack_test.dart
new file mode 100644
index 0000000..da067cd
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_catch_stack_test.dart
@@ -0,0 +1,40 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnusedCatchStackTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnusedCatchStackTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_UNUSED_CATCH_STACK;
+
+  test_removeUnusedCatchStack() async {
+    await resolveTestUnit('''
+main() {
+  try {
+    throw 42;
+  } catch (e, stack) {
+  }
+}
+''');
+    await assertHasFix('''
+main() {
+  try {
+    throw 42;
+  } catch (e) {
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unused_import_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_import_test.dart
new file mode 100644
index 0000000..96ee02f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unused_import_test.dart
@@ -0,0 +1,127 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveUnusedImportTest);
+  });
+}
+
+@reflectiveTest
+class RemoveUnusedImportTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_UNUSED_IMPORT;
+
+  test_all_diverseImports() async {
+    await resolveTestUnit('''
+import 'dart:math';
+import 'dart:math';
+import 'dart:async';
+main() {
+}
+''');
+    await assertHasFixAllFix(HintCode.UNUSED_IMPORT, '''
+main() {
+}
+''');
+  }
+
+  test_all_diverseImports2() async {
+    await resolveTestUnit('''
+import 'dart:async';
+import 'dart:math' as math;
+import 'dart:async';
+
+var tau = math.pi * 2;
+
+main() {
+}
+''');
+    await assertHasFixAllFix(HintCode.UNUSED_IMPORT, '''
+import 'dart:math' as math;
+
+var tau = math.pi * 2;
+
+main() {
+}
+''');
+  }
+
+  test_all_singleLine() async {
+    await resolveTestUnit('''
+import 'dart:math'; import 'dart:math'; import 'dart:math';
+main() {
+}
+''');
+    await assertHasFixAllFix(HintCode.UNUSED_IMPORT, '''
+main() {
+}
+''');
+  }
+
+  test_anotherImportOnLine() async {
+    await resolveTestUnit('''
+import 'dart:math'; import 'dart:async';
+
+main() {
+  Future f;
+  print(f);
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+main() {
+  Future f;
+  print(f);
+}
+''');
+  }
+
+  test_multipleOfSame_all() async {
+    await resolveTestUnit('''
+import 'dart:math';
+import 'dart:math';
+import 'dart:math';
+main() {
+}
+''');
+    await assertHasFixAllFix(HintCode.UNUSED_IMPORT, '''
+main() {
+}
+''');
+  }
+
+  test_severalLines() async {
+    await resolveTestUnit('''
+import
+  'dart:math';
+main() {
+}
+''');
+    await assertHasFix('''
+main() {
+}
+''');
+  }
+
+  test_single() async {
+    await resolveTestUnit('''
+import 'dart:math';
+main() {
+}
+''');
+    await assertHasFix('''
+main() {
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/rename_to_camel_case_test.dart b/pkg/analysis_server/test/src/services/correction/fix/rename_to_camel_case_test.dart
new file mode 100644
index 0000000..45f6677
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/rename_to_camel_case_test.dart
@@ -0,0 +1,113 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RenameToCamelCaseTest);
+  });
+}
+
+@reflectiveTest
+class RenameToCamelCaseTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.RENAME_TO_CAMEL_CASE;
+
+  @override
+  String get lintCode => LintNames.non_constant_identifier_names;
+
+  test_localVariable() async {
+    await resolveTestUnit('''
+main() {
+  int /*LINT*/my_integer_variable = 42;
+  int foo;
+  print(my_integer_variable);
+  print(foo);
+}
+''');
+    await assertHasFix('''
+main() {
+  int /*LINT*/myIntegerVariable = 42;
+  int foo;
+  print(myIntegerVariable);
+  print(foo);
+}
+''');
+  }
+
+  test_parameter_closure() async {
+    await resolveTestUnit('''
+main() {
+  [0, 1, 2].forEach((/*LINT*/my_integer_variable) {
+    print(my_integer_variable);
+  });
+}
+''');
+    await assertHasFix('''
+main() {
+  [0, 1, 2].forEach((/*LINT*/myIntegerVariable) {
+    print(myIntegerVariable);
+  });
+}
+''');
+  }
+
+  test_parameter_function() async {
+    await resolveTestUnit('''
+main(int /*LINT*/my_integer_variable) {
+  print(my_integer_variable);
+}
+''');
+    await assertHasFix('''
+main(int /*LINT*/myIntegerVariable) {
+  print(myIntegerVariable);
+}
+''');
+  }
+
+  test_parameter_method() async {
+    await resolveTestUnit('''
+class A {
+  main(int /*LINT*/my_integer_variable) {
+    print(my_integer_variable);
+  }
+}
+''');
+    await assertHasFix('''
+class A {
+  main(int /*LINT*/myIntegerVariable) {
+    print(myIntegerVariable);
+  }
+}
+''');
+  }
+
+  test_parameter_optionalNamed() async {
+    await resolveTestUnit('''
+foo({int /*LINT*/my_integer_variable}) {
+  print(my_integer_variable);
+}
+''');
+    await assertNoFix();
+  }
+
+  test_parameter_optionalPositional() async {
+    await resolveTestUnit('''
+main([int /*LINT*/my_integer_variable]) {
+  print(my_integer_variable);
+}
+''');
+    await assertHasFix('''
+main([int /*LINT*/myIntegerVariable]) {
+  print(myIntegerVariable);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_boolean_with_bool_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_boolean_with_bool_test.dart
new file mode 100644
index 0000000..29fe96e
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_boolean_with_bool_test.dart
@@ -0,0 +1,52 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceBooleanWithBoolTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceBooleanWithBoolTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_BOOLEAN_WITH_BOOL;
+
+  test_all() async {
+    await resolveTestUnit('''
+main() {
+  boolean v;
+  boolean w;
+}
+''');
+    await assertHasFixAllFix(StaticWarningCode.UNDEFINED_CLASS_BOOLEAN, '''
+main() {
+  bool v;
+  bool w;
+}
+''');
+  }
+
+  test_single() async {
+    await resolveTestUnit('''
+main() {
+  boolean v;
+  print(v);
+}
+''');
+    await assertHasFix('''
+main() {
+  bool v;
+  print(v);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_final_with_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_final_with_const_test.dart
new file mode 100644
index 0000000..77fa5a7
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_final_with_const_test.dart
@@ -0,0 +1,34 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceFinalWithConstTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceFinalWithConstTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_FINAL_WITH_CONST;
+
+  @override
+  String get lintCode => LintNames.prefer_const_declarations;
+
+  test_method() async {
+    await resolveTestUnit('''
+/*LINT*/final int a = 1;
+''');
+    await assertHasFix('''
+/*LINT*/const int a = 1;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_return_type_future_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_return_type_future_test.dart
new file mode 100644
index 0000000..244178e
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_return_type_future_test.dart
@@ -0,0 +1,151 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceReturnTypeFutureTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceReturnTypeFutureTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_RETURN_TYPE_FUTURE;
+
+  test_adjacentNodes_withImport() async {
+    await resolveTestUnit('''
+import 'dart:async';
+var v;int main() async => 0;
+''');
+    await assertHasFix('''
+import 'dart:async';
+var v;Future<int> main() async => 0;
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  test_adjacentNodes_withoutImport() async {
+    await resolveTestUnit('''
+var v;int main() async => 0;
+''');
+    await assertHasFix('''
+var v;Future<int> main() async => 0;
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  test_complexTypeName_withImport() async {
+    await resolveTestUnit('''
+import 'dart:async';
+List<int> main() async {
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+Future<List<int>> main() async {
+}
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  @failingTest
+  test_complexTypeName_withoutImport() async {
+    await resolveTestUnit('''
+List<int> main() async {
+}
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+Future<List<int>> main() async {
+}
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  test_importedWithPrefix() async {
+    await resolveTestUnit('''
+import 'dart:async' as al;
+int main() async {
+}
+''');
+    await assertHasFix('''
+import 'dart:async' as al;
+al.Future<int> main() async {
+}
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  test_simpleTypeName_withImport() async {
+    await resolveTestUnit('''
+import 'dart:async';
+int main() async => 0;
+''');
+    await assertHasFix('''
+import 'dart:async';
+Future<int> main() async => 0;
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  @failingTest
+  test_simpleTypeName_withoutImport() async {
+    await resolveTestUnit('''
+int main() async => 0;
+''');
+    await assertHasFix('''
+import 'dart:async';
+
+Future<int> main() async => 0;
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  test_withLibraryDirective_withImport() async {
+    await resolveTestUnit('''
+library main;
+import 'dart:async';
+int main() async {
+}
+''');
+    await assertHasFix('''
+library main;
+import 'dart:async';
+Future<int> main() async {
+}
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+
+  test_withLibraryDirective_withoutImport() async {
+    await resolveTestUnit('''
+library main;
+int main() async {
+}
+''');
+    await assertHasFix('''
+library main;
+Future<int> main() async {
+}
+''', errorFilter: (error) {
+      return error.errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE;
+    });
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_var_with_dynamic_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_var_with_dynamic_test.dart
new file mode 100644
index 0000000..f0463c8
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_var_with_dynamic_test.dart
@@ -0,0 +1,37 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceVarWithDynamicTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceVarWithDynamicTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_VAR_WITH_DYNAMIC;
+
+  test_simple() async {
+    await resolveTestUnit('''
+class A {
+  Map<String, var> m;
+}
+''');
+    await assertHasFix('''
+class A {
+  Map<String, dynamic> m;
+}
+''', errorFilter: (error) {
+      return error.errorCode == ParserErrorCode.VAR_AS_TYPE_NAME;
+    });
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_brackets_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_brackets_test.dart
new file mode 100644
index 0000000..93cae94
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_brackets_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithBracketsTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithBracketsTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_BRACKETS;
+
+  @override
+  String get lintCode => LintNames.empty_statements;
+
+  test_outOfBlock_otherLine() async {
+    await resolveTestUnit('''
+void foo() {
+  while(true)
+  /*LINT*/;
+  print('hi');
+}
+''');
+    await assertHasFix('''
+void foo() {
+  while(true) {}
+  print('hi');
+}
+''');
+  }
+
+  test_outOfBlock_sameLine() async {
+    await resolveTestUnit('''
+void foo() {
+  while(true)/*LINT*/;
+  print('hi');
+}
+''');
+    await assertHasFix('''
+void foo() {
+  while(true) {}
+  print('hi');
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_conditional_assignment_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_conditional_assignment_test.dart
new file mode 100644
index 0000000..e5baaec
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_conditional_assignment_test.dart
@@ -0,0 +1,112 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithConditionalAssignmentTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithConditionalAssignmentTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT;
+
+  @override
+  String get lintCode => LintNames.prefer_conditional_assignment;
+
+  test_withCodeBeforeAndAfter() async {
+    await resolveTestUnit('''
+class Person {
+  String _fullName;
+  void foo() {
+    print('hi');
+    /*LINT*/if (_fullName == null) {
+      _fullName = getFullUserName(this);
+    }
+    print('hi');
+  }
+}
+''');
+    await assertHasFix('''
+class Person {
+  String _fullName;
+  void foo() {
+    print('hi');
+    /*LINT*/_fullName ??= getFullUserName(this);
+    print('hi');
+  }
+}
+''');
+  }
+
+  test_withOneBlock() async {
+    await resolveTestUnit('''
+class Person {
+  String _fullName;
+  void foo() {
+    /*LINT*/if (_fullName == null) {
+      _fullName = getFullUserName(this);
+    }
+  }
+}
+''');
+    await assertHasFix('''
+class Person {
+  String _fullName;
+  void foo() {
+    /*LINT*/_fullName ??= getFullUserName(this);
+  }
+}
+''');
+  }
+
+  test_withoutBlock() async {
+    await resolveTestUnit('''
+class Person {
+  String _fullName;
+  void foo() {
+    /*LINT*/if (_fullName == null)
+      _fullName = getFullUserName(this);
+  }
+}
+''');
+    await assertHasFix('''
+class Person {
+  String _fullName;
+  void foo() {
+    /*LINT*/_fullName ??= getFullUserName(this);
+  }
+}
+''');
+  }
+
+  test_withTwoBlock() async {
+    await resolveTestUnit('''
+class Person {
+  String _fullName;
+  void foo() {
+    /*LINT*/if (_fullName == null) {{
+      _fullName = getFullUserName(this);
+    }}
+  }
+}
+''');
+    await assertHasFix('''
+class Person {
+  String _fullName;
+  void foo() {
+    /*LINT*/_fullName ??= getFullUserName(this);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_identifier_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_identifier_test.dart
new file mode 100644
index 0000000..6dfc38c
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_identifier_test.dart
@@ -0,0 +1,34 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithIdentifierTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithIdentifierTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_IDENTIFIER;
+
+  @override
+  String get lintCode => LintNames.avoid_types_on_closure_parameters;
+
+  test_functionTypedFormalParameter() async {
+    await resolveTestUnit('''
+var functionWithFunction = (/*LINT*/int f(int x)) => f(0);
+''');
+    await assertHasFix('''
+var functionWithFunction = (/*LINT*/f) => f(0);
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_literal_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_literal_test.dart
new file mode 100644
index 0000000..7ec1088
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_literal_test.dart
@@ -0,0 +1,113 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithLiteralTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithLiteralTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_LITERAL;
+
+  @override
+  String get lintCode => LintNames.prefer_collection_literals;
+
+  test_linkedHashMap_withCommentsInGeneric() async {
+    await resolveTestUnit('''
+import 'dart:collection';
+
+final a = /*LINT*/new LinkedHashMap<int,/*comment*/int>();
+''');
+    await assertHasFix('''
+import 'dart:collection';
+
+final a = /*LINT*/<int,/*comment*/int>{};
+''');
+  }
+
+  test_linkedHashMap_withDynamicGenerics() async {
+    await resolveTestUnit('''
+import 'dart:collection';
+
+final a = /*LINT*/new LinkedHashMap<dynamic,dynamic>();
+''');
+    await assertHasFix('''
+import 'dart:collection';
+
+final a = /*LINT*/<dynamic,dynamic>{};
+''');
+  }
+
+  test_linkedHashMap_withGeneric() async {
+    await resolveTestUnit('''
+import 'dart:collection';
+
+final a = /*LINT*/new LinkedHashMap<int,int>();
+''');
+    await assertHasFix('''
+import 'dart:collection';
+
+final a = /*LINT*/<int,int>{};
+''');
+  }
+
+  test_linkedHashMap_withoutGeneric() async {
+    await resolveTestUnit('''
+import 'dart:collection';
+
+final a = /*LINT*/new LinkedHashMap();
+''');
+    await assertHasFix('''
+import 'dart:collection';
+
+final a = /*LINT*/{};
+''');
+  }
+
+  test_list_withGeneric() async {
+    await resolveTestUnit('''
+final a = /*LINT*/new List<int>();
+''');
+    await assertHasFix('''
+final a = /*LINT*/<int>[];
+''');
+  }
+
+  test_list_withoutGeneric() async {
+    await resolveTestUnit('''
+final a = /*LINT*/new List();
+''');
+    await assertHasFix('''
+final a = /*LINT*/[];
+''');
+  }
+
+  test_map_withGeneric() async {
+    await resolveTestUnit('''
+final a = /*LINT*/new Map<int,int>();
+''');
+    await assertHasFix('''
+final a = /*LINT*/<int,int>{};
+''');
+  }
+
+  test_map_withoutGeneric() async {
+    await resolveTestUnit('''
+final a = /*LINT*/new Map();
+''');
+    await assertHasFix('''
+final a = /*LINT*/{};
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_null_aware_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_null_aware_test.dart
new file mode 100644
index 0000000..f758081
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_null_aware_test.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithNullAwareTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithNullAwareTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_NULL_AWARE;
+
+  test_chain() async {
+    await resolveTestUnit('''
+main(x) {
+  x?.a.b.c;
+}
+''');
+    await assertHasFix('''
+main(x) {
+  x?.a?.b?.c;
+}
+''');
+  }
+
+  test_methodInvocation() async {
+    await resolveTestUnit('''
+main(x) {
+  x?.a.b();
+}
+''');
+    await assertHasFix('''
+main(x) {
+  x?.a?.b();
+}
+''');
+  }
+
+  test_propertyAccess() async {
+    await resolveTestUnit('''
+main(x) {
+  x?.a().b;
+}
+''');
+    await assertHasFix('''
+main(x) {
+  x?.a()?.b;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_tear_off_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_tear_off_test.dart
new file mode 100644
index 0000000..ccc757a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_tear_off_test.dart
@@ -0,0 +1,97 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithTearOffTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithTearOffTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_TEAR_OFF;
+
+  @override
+  String get lintCode => LintNames.unnecessary_lambdas;
+
+  test_function_oneParameter() async {
+    await resolveTestUnit('''
+final x = /*LINT*/(name) {
+  print(name);
+};
+''');
+    await assertHasFix('''
+final x = /*LINT*/print;
+''');
+  }
+
+  test_function_zeroParameters() async {
+    await resolveTestUnit('''
+void foo(){}
+Function finalVar() {
+  return /*LINT*/() {
+    foo();
+  };
+}
+''');
+    await assertHasFix('''
+void foo(){}
+Function finalVar() {
+  return /*LINT*/foo;
+}
+''');
+  }
+
+  test_lambda_asArgument() async {
+    await resolveTestUnit('''
+void foo() {
+  bool isPair(int a) => a % 2 == 0;
+  final finalList = <int>[];
+  finalList.where(/*LINT*/(number) =>
+    isPair(number));
+}
+''');
+    await assertHasFix('''
+void foo() {
+  bool isPair(int a) => a % 2 == 0;
+  final finalList = <int>[];
+  finalList.where(/*LINT*/isPair);
+}
+''');
+  }
+
+  test_method_oneParameter() async {
+    await resolveTestUnit('''
+var a = /*LINT*/(x) => finalList.remove(x);
+''');
+    await assertHasFix('''
+var a = /*LINT*/finalList.remove;
+''');
+  }
+
+  test_method_zeroParameter() async {
+    await resolveTestUnit('''
+final Object a;
+Function finalVar() {
+  return /*LINT*/() {
+    return a.toString();
+  };
+}
+''');
+    await assertHasFix('''
+final Object a;
+Function finalVar() {
+  return /*LINT*/a.toString;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
new file mode 100644
index 0000000..de6f043
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
@@ -0,0 +1,180 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'add_async_test.dart' as add_async;
+import 'add_explicit_cast_test.dart' as add_explicit_cast;
+import 'add_field_formal_parameters_test.dart' as add_field_formal_parameters;
+import 'add_missing_parameter_named_test.dart' as add_missing_parameter_named;
+import 'add_missing_parameter_positional_test.dart'
+    as add_missing_parameter_positional;
+import 'add_missing_parameter_required_test.dart'
+    as add_missing_parameter_required;
+import 'add_missing_required_argument_test.dart'
+    as add_missing_required_argument;
+import 'add_ne_null_test.dart' as add_ne_null;
+import 'add_override_test.dart' as add_override;
+import 'add_required_test.dart' as add_required;
+import 'add_static_test.dart' as add_static;
+import 'add_super_constructor_invocation_test.dart'
+    as add_super_constructor_invocation;
+import 'change_to_nearest_precise_value_test.dart'
+    as change_to_nearest_precise_value;
+import 'change_to_static_access_test.dart' as change_to_static_access;
+import 'change_to_test.dart' as change_to;
+import 'change_type_annotation_test.dart' as change_type_annotation;
+import 'convert_flutter_child_test.dart' as convert_flutter_child;
+import 'convert_flutter_children_test.dart' as convert_flutter_children;
+import 'convert_to_named_arguments_test.dart' as convert_to_named_arguments;
+import 'create_class_test.dart' as create_class;
+import 'create_constructor_for_final_fields_test.dart'
+    as create_constructor_for_final_field;
+import 'create_constructor_super_test.dart' as create_constructor_super;
+import 'create_constructor_test.dart' as create_constructor;
+import 'create_field_test.dart' as create_field;
+import 'create_file_test.dart' as create_file;
+import 'create_function_test.dart' as create_function;
+import 'create_getter_test.dart' as create_getter;
+import 'create_local_variable_test.dart' as create_local_variable;
+import 'create_method_test.dart' as create_method;
+import 'create_missing_overrides_test.dart' as create_missing_overrides;
+import 'create_mixin_test.dart' as create_mixin;
+import 'create_no_such_method_test.dart' as create_no_such_method;
+import 'extend_class_for_mixin_test.dart' as extend_class_for_mixin;
+import 'fix_test.dart' as fix;
+import 'import_async_test.dart' as import_async;
+import 'import_library_prefix_test.dart' as import_library_prefix;
+import 'import_library_project_test.dart' as import_library_project;
+import 'import_library_sdk_test.dart' as import_library_sdk;
+import 'import_library_show_test.dart' as import_library_show;
+import 'insert_semicolon_test.dart' as insert_semicolon;
+import 'make_class_abstract_test.dart' as make_class_abstract;
+import 'make_field_not_final_test.dart' as make_field_not_final;
+import 'make_final_test.dart' as make_final;
+import 'move_type_arguments_to_class_test.dart' as move_type_arguments_to_class;
+import 'remove_await_test.dart' as remove_await;
+import 'remove_dead_code_test.dart' as remove_dead_code;
+import 'remove_empty_catch_test.dart' as remove_empty_catch;
+import 'remove_empty_constructor_body_test.dart'
+    as remove_empty_constructor_body;
+import 'remove_empty_else_test.dart' as remove_empty_else;
+import 'remove_empty_statement_test.dart' as remove_empty_statement;
+import 'remove_initializer_test.dart' as remove_initializer;
+import 'remove_interpolation_braces_test.dart' as remove_interpolation_braces;
+import 'remove_method_declaration_test.dart' as remove_method_declaration;
+import 'remove_parameters_in_getter_declaration_test.dart'
+    as remove_parameters_in_getter_declaration;
+import 'remove_parentheses_in_getter_invocation_test.dart'
+    as remove_parentheses_in_getter_invocation;
+import 'remove_this_expression_test.dart' as remove_this_expression;
+import 'remove_type_annotation_test.dart' as remove_type_annotation;
+import 'remove_type_arguments_test.dart' as remove_type_arguments;
+import 'remove_unnecessary_cast_test.dart' as remove_unnecessary_cast;
+import 'remove_unused_catch_clause_test.dart' as remove_unused_catch_clause;
+import 'remove_unused_catch_stack_test.dart' as remove_unused_catch_stack;
+import 'remove_unused_import_test.dart' as remove_unused_import;
+import 'rename_to_camel_case_test.dart' as rename_to_camel_case;
+import 'replace_boolean_with_bool_test.dart' as replace_boolean_with_bool;
+import 'replace_final_with_const_test.dart' as replace_final_with_const;
+import 'replace_return_type_future_test.dart' as replace_return_type_future;
+import 'replace_var_with_dynamic_test.dart' as replace_var_with_dynamic;
+import 'replace_with_brackets_test.dart' as replace_with_brackets;
+import 'replace_with_conditional_assignment_test.dart'
+    as replace_with_conditional_assignment;
+import 'replace_with_identifier_test.dart' as replace_with_identifier;
+import 'replace_with_literal_test.dart' as replace_with_literal;
+import 'replace_with_null_aware_test.dart' as replace_with_null_aware;
+import 'replace_with_tear_off_test.dart' as replace_with_tear_off;
+import 'update_sdk_constraints_test.dart' as update_sdk_constraints;
+import 'use_const_test.dart' as use_const;
+import 'use_effective_integer_division_test.dart'
+    as use_effective_integer_division;
+import 'use_eq_eq_null_test.dart' as use_eq_eq_null;
+import 'use_is_not_empty_test.dart' as use_is_not_empty;
+import 'use_not_eq_null_test.dart' as use_not_eq_null;
+
+main() {
+  defineReflectiveSuite(() {
+    add_async.main();
+    add_explicit_cast.main();
+    add_field_formal_parameters.main();
+    add_missing_parameter_named.main();
+    add_missing_parameter_positional.main();
+    add_missing_parameter_required.main();
+    add_missing_required_argument.main();
+    add_ne_null.main();
+    add_override.main();
+    add_required.main();
+    add_static.main();
+    add_super_constructor_invocation.main();
+    change_to.main();
+    change_to_nearest_precise_value.main();
+    change_to_static_access.main();
+    change_type_annotation.main();
+    convert_flutter_child.main();
+    convert_flutter_children.main();
+    convert_to_named_arguments.main();
+    create_class.main();
+    create_constructor_for_final_field.main();
+    create_constructor_super.main();
+    create_constructor.main();
+    create_field.main();
+    create_file.main();
+    create_function.main();
+    create_getter.main();
+    create_local_variable.main();
+    create_method.main();
+    create_missing_overrides.main();
+    create_mixin.main();
+    create_no_such_method.main();
+    extend_class_for_mixin.main();
+    fix.main();
+    import_async.main();
+    import_library_prefix.main();
+    import_library_project.main();
+    import_library_sdk.main();
+    import_library_show.main();
+    insert_semicolon.main();
+    make_class_abstract.main();
+    make_field_not_final.main();
+    make_final.main();
+    move_type_arguments_to_class.main();
+    remove_await.main();
+    remove_dead_code.main();
+    remove_empty_catch.main();
+    remove_empty_constructor_body.main();
+    remove_empty_else.main();
+    remove_empty_statement.main();
+    remove_initializer.main();
+    remove_interpolation_braces.main();
+    remove_method_declaration.main();
+    remove_parameters_in_getter_declaration.main();
+    remove_parentheses_in_getter_invocation.main();
+    remove_this_expression.main();
+    remove_type_annotation.main();
+    remove_type_arguments.main();
+    remove_unnecessary_cast.main();
+    remove_unused_catch_clause.main();
+    remove_unused_catch_stack.main();
+    remove_unused_import.main();
+    rename_to_camel_case.main();
+    replace_boolean_with_bool.main();
+    replace_final_with_const.main();
+    replace_return_type_future.main();
+    replace_var_with_dynamic.main();
+    replace_with_brackets.main();
+    replace_with_conditional_assignment.main();
+    replace_with_literal.main();
+    replace_with_identifier.main();
+    replace_with_null_aware.main();
+    replace_with_tear_off.main();
+    update_sdk_constraints.main();
+    use_const.main();
+    use_effective_integer_division.main();
+    use_eq_eq_null.main();
+    use_is_not_empty.main();
+    use_not_eq_null.main();
+  }, name: 'fix');
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
new file mode 100644
index 0000000..4b957b3
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UpdateSdkConstraintsTest);
+  });
+}
+
+@reflectiveTest
+class UpdateSdkConstraintsTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.UPDATE_SDK_CONSTRAINTS;
+
+  test_any() async {
+    await testUpdate(from: 'any', to: '^2.1.0');
+  }
+
+  test_caret() async {
+    await testUpdate(from: '^2.0.0', to: '^2.1.0');
+  }
+
+  test_compound() async {
+    await testUpdate(from: "'>=2.0.0 <3.0.0'", to: "'>=2.1.0 <3.0.0'");
+  }
+
+  test_gt() async {
+    await testUpdate(from: "'>2.0.0'", to: "'>=2.1.0'");
+  }
+
+  test_gte() async {
+    await testUpdate(from: "'>=2.0.0'", to: "'>=2.1.0'");
+  }
+
+  testUpdate({String from, String to}) async {
+    updateTestPubspecFile('''
+environment:
+  sdk: $from
+''');
+    await resolveTestUnit('''
+Future<int> zero() async => 0;
+''');
+    await assertHasFix('''
+environment:
+  sdk: $to
+''', target: testPubspecPath);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/use_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/use_const_test.dart
new file mode 100644
index 0000000..9ac1952
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/use_const_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseConstTest);
+  });
+}
+
+@reflectiveTest
+class UseConstTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.USE_CONST;
+
+  test_explicitNew() async {
+    await resolveTestUnit('''
+class A {
+  const A();
+}
+const a = new A();
+''');
+    await assertHasFix('''
+class A {
+  const A();
+}
+const a = const A();
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/use_effective_integer_division_test.dart b/pkg/analysis_server/test/src/services/correction/fix/use_effective_integer_division_test.dart
new file mode 100644
index 0000000..770f505
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/use_effective_integer_division_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseEffectiveIntegerDivisionTest);
+  });
+}
+
+@reflectiveTest
+class UseEffectiveIntegerDivisionTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.USE_EFFECTIVE_INTEGER_DIVISION;
+
+  test_normalDivision() async {
+    await resolveTestUnit('''
+main() {
+  var a = 5;
+  var b = 2;
+  print((a / b).toInt());
+}
+''');
+    await assertHasFix('''
+main() {
+  var a = 5;
+  var b = 2;
+  print(a ~/ b);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/use_eq_eq_null_test.dart b/pkg/analysis_server/test/src/services/correction/fix/use_eq_eq_null_test.dart
new file mode 100644
index 0000000..de6b873
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/use_eq_eq_null_test.dart
@@ -0,0 +1,50 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseEqEqNullTest);
+  });
+}
+
+@reflectiveTest
+class UseEqEqNullTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.USE_EQ_EQ_NULL;
+
+  test_isNull() async {
+    await resolveTestUnit('''
+main(p) {
+  p is Null;
+}
+''');
+    await assertHasFix('''
+main(p) {
+  p == null;
+}
+''');
+  }
+
+  test_isNull_all() async {
+    await resolveTestUnit('''
+main(p, q) {
+  p is Null;
+  q is Null;
+}
+''');
+    await assertHasFixAllFix(HintCode.TYPE_CHECK_IS_NULL, '''
+main(p, q) {
+  p == null;
+  q == null;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/use_is_not_empty_test.dart b/pkg/analysis_server/test/src/services/correction/fix/use_is_not_empty_test.dart
new file mode 100644
index 0000000..ab2da21
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/use_is_not_empty_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseIsNotEmptyTest);
+  });
+}
+
+@reflectiveTest
+class UseIsNotEmptyTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.USE_IS_NOT_EMPTY;
+
+  @override
+  String get lintCode => LintNames.prefer_is_not_empty;
+
+  test_notIsEmpty() async {
+    await resolveTestUnit('''
+f(c) {
+  if (/*LINT*/!c.isEmpty) {}
+}
+''');
+    await assertHasFix('''
+f(c) {
+  if (/*LINT*/c.isNotEmpty) {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/use_not_eq_null_test.dart b/pkg/analysis_server/test/src/services/correction/fix/use_not_eq_null_test.dart
new file mode 100644
index 0000000..3fdd82a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/use_not_eq_null_test.dart
@@ -0,0 +1,50 @@
+// 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:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseNotEqNullTest);
+  });
+}
+
+@reflectiveTest
+class UseNotEqNullTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.USE_NOT_EQ_NULL;
+
+  test_isNotNull() async {
+    await resolveTestUnit('''
+main(p) {
+  p is! Null;
+}
+''');
+    await assertHasFix('''
+main(p) {
+  p != null;
+}
+''');
+  }
+
+  test_isNotNull_all() async {
+    await resolveTestUnit('''
+main(p, q) {
+  p is! Null;
+  q is! Null;
+}
+''');
+    await assertHasFixAllFix(HintCode.TYPE_CHECK_IS_NOT_NULL, '''
+main(p, q) {
+  p != null;
+  q != null;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/test_all.dart b/pkg/analysis_server/test/src/services/correction/test_all.dart
new file mode 100644
index 0000000..7c6c49d
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/test_all.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist/test_all.dart' as assist_all;
+import 'fix/test_all.dart' as fix_all;
+
+main() {
+  defineReflectiveSuite(() {
+    assist_all.main();
+    fix_all.main();
+  }, name: 'correction');
+}
diff --git a/pkg/analysis_server/test/src/services/test_all.dart b/pkg/analysis_server/test/src/services/test_all.dart
new file mode 100644
index 0000000..46f575f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'correction/test_all.dart' as correction_all;
+
+main() {
+  defineReflectiveSuite(() {
+    correction_all.main();
+  }, name: 'services');
+}
diff --git a/pkg/analysis_server/test/src/test_all.dart b/pkg/analysis_server/test/src/test_all.dart
index c25b65a..6a07ced 100644
--- a/pkg/analysis_server/test/src/test_all.dart
+++ b/pkg/analysis_server/test/src/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,8 +6,10 @@
 
 import 'computer/test_all.dart' as computer_all;
 import 'domain_abstract_test.dart' as domain_abstract_test;
+import 'domains/test_all.dart' as domains_all;
 import 'flutter/test_all.dart' as flutter_all;
 import 'plugin/test_all.dart' as plugin_all;
+import 'services/test_all.dart' as services_all;
 import 'utilities/test_all.dart' as utilities_all;
 import 'watch_manager_test.dart' as watch_manager_test;
 
@@ -18,8 +20,10 @@
   defineReflectiveSuite(() {
     computer_all.main();
     domain_abstract_test.main();
+    domains_all.main();
     flutter_all.main();
     plugin_all.main();
+    services_all.main();
     utilities_all.main();
     watch_manager_test.main();
   }, name: 'src');
diff --git a/pkg/analysis_server/test/src/utilities/flutter_util.dart b/pkg/analysis_server/test/src/utilities/flutter_util.dart
index 6e689e5..5eb623f 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_util.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_util.dart
@@ -1,11 +1,11 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 
-String flutterPkgLibPath = '/packages/flutter/lib';
+const String flutterPkgLibPath = '/packages/flutter/lib';
 
 /**
  * Add some Flutter libraries and types to the given [provider] and return
@@ -27,6 +27,7 @@
 ''');
 
   newFile('$flutterPkgLibPath/widgets.dart', r'''
+export 'src/widgets/async.dart';
 export 'src/widgets/basic.dart';
 export 'src/widgets/container.dart';
 export 'src/widgets/framework.dart';
@@ -159,6 +160,25 @@
   }
 
   void createSrcWidgets() {
+    newFile('$flutterPkgLibPath/src/widgets/async.dart', r'''
+import 'framework.dart';
+
+class AsyncSnapshot<T> {}
+
+typedef AsyncWidgetBuilder<T> = Widget Function(BuildContext context, AsyncSnapshot<T> snapshot);
+
+class StreamBuilder<T> {
+  const StreamBuilder({
+    Key key,
+    this.initialData,
+    Stream<T> stream,
+    @required this.builder
+  });
+  final T initialData;
+  final AsyncWidgetBuilder<T> builder;
+}
+''');
+
     newFile('$flutterPkgLibPath/src/widgets/basic.dart', r'''
 import 'package:flutter/rendering.dart';
 
diff --git a/pkg/analysis_server/test/src/watch_manager_test.dart b/pkg/analysis_server/test/src/watch_manager_test.dart
index 248c5b0..a5a4a93 100644
--- a/pkg/analysis_server/test/src/watch_manager_test.dart
+++ b/pkg/analysis_server/test/src/watch_manager_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -70,7 +70,7 @@
 }
 
 @reflectiveTest
-class WatchManagerTest extends Object with ResourceProviderMixin {
+class WatchManagerTest with ResourceProviderMixin {
   WatchListener listener;
   WatchManager<Token> manager;
 
@@ -194,7 +194,7 @@
 }
 
 @reflectiveTest
-class WatchNodeTest extends Object with ResourceProviderMixin {
+class WatchNodeTest with ResourceProviderMixin {
   void test_creation_folder() {
     Folder folder = getFolder('/a/b');
     WatchNode node = new WatchNode(folder);
diff --git a/pkg/analysis_server/test/stress/completion/completion_runner.dart b/pkg/analysis_server/test/stress/completion/completion_runner.dart
index 3605038..41a69b8 100644
--- a/pkg/analysis_server/test/stress/completion/completion_runner.dart
+++ b/pkg/analysis_server/test/stress/completion/completion_runner.dart
@@ -103,8 +103,8 @@
         }
         fileCount++;
         output.write('.');
-        ResolveResult result =
-            await context.currentSession.getResolvedAst(path);
+        ResolvedUnitResult result =
+            await context.currentSession.getResolvedUnit(path);
         String content = result.content;
         LineInfo lineInfo = result.lineInfo;
         List<SimpleIdentifier> identifiers = _identifiersIn(result.unit);
@@ -117,7 +117,7 @@
                 content.substring(identifier.end);
             resourceProvider.setOverlay(path,
                 content: modifiedContent, modificationStamp: stamp++);
-            result = await context.currentSession.getResolvedAst(path);
+            result = await context.currentSession.getResolvedUnit(path);
           }
 
           timer.start();
diff --git a/pkg/analysis_server/test/stress/utilities/server.dart b/pkg/analysis_server/test/stress/utilities/server.dart
index ccd2ac5..c845787 100644
--- a/pkg/analysis_server/test/stress/utilities/server.dart
+++ b/pkg/analysis_server/test/stress/utilities/server.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -50,20 +50,6 @@
   void operator []=(String filePath, List<AnalysisError> errors) {
     pathMap[filePath] = errors;
   }
-
-  /**
-   * Compare the this error map with the state captured in the given [errorMap].
-   * Throw an exception if the two maps do not agree.
-   */
-  String expectErrorMap(ErrorMap errorMap) {
-    StringBuffer buffer = new StringBuffer();
-    _ErrorComparator comparator = new _ErrorComparator(buffer);
-    comparator.compare(pathMap, errorMap.pathMap);
-    if (buffer.length > 0) {
-      return buffer.toString();
-    }
-    return null;
-  }
 }
 
 /**
@@ -436,8 +422,8 @@
     return _send("analysis.getReachableSources", params);
   }
 
-  void sendAnalysisReanalyze({List<String> roots}) {
-    var params = new AnalysisReanalyzeParams(roots: roots).toJson();
+  void sendAnalysisReanalyze() {
+    var params = new AnalysisReanalyzeParams().toJson();
     _send("analysis.reanalyze", params);
   }
 
@@ -938,141 +924,3 @@
     return requestData;
   }
 }
-
-/**
- * A utility class used to compare two sets of errors.
- */
-class _ErrorComparator {
-  /**
-   * An empty list of analysis errors.
-   */
-  static final List<AnalysisError> NO_ERRORS = <AnalysisError>[];
-
-  /**
-   * The buffer to which an error description will be written if any of the
-   * files have different errors than are expected.
-   */
-  final StringBuffer buffer;
-
-  /**
-   * Initialize a newly created comparator to write to the given [buffer].
-   */
-  _ErrorComparator(this.buffer);
-
-  /**
-   * Compare the [actualErrorMap] and the [expectedErrorMap], writing a
-   * description to the [buffer] if they are not the same. The error maps are
-   * expected to be maps from absolute file paths to the list of actual or
-   * expected errors.
-   */
-  void compare(Map<String, List<AnalysisError>> actualErrorMap,
-      Map<String, List<AnalysisError>> expectedErrorMap) {
-    Set<String> allFiles = new HashSet();
-    allFiles.addAll(actualErrorMap.keys);
-    allFiles.addAll(expectedErrorMap.keys);
-    List<String> sortedFiles = allFiles.toList()..sort();
-    for (String filePath in sortedFiles) {
-      List<AnalysisError> actualErrors = actualErrorMap[filePath];
-      List<AnalysisError> expectedErrors = expectedErrorMap[filePath];
-      _compareLists(
-          filePath, actualErrors ?? NO_ERRORS, expectedErrors ?? NO_ERRORS);
-    }
-  }
-
-  /**
-   * Compare the [actualErrors] and [expectedErrors], writing a description to
-   * the [buffer] if they are not the same.
-   */
-  void _compareLists(String filePath, List<AnalysisError> actualErrors,
-      List<AnalysisError> expectedErrors) {
-    List<AnalysisError> remainingExpected =
-        new List<AnalysisError>.from(expectedErrors);
-    for (AnalysisError actualError in actualErrors) {
-      AnalysisError expectedError = _findError(remainingExpected, actualError);
-      if (expectedError == null) {
-        _writeReport(filePath, actualErrors, expectedErrors);
-        return;
-      }
-      remainingExpected.remove(expectedError);
-    }
-    if (remainingExpected.isNotEmpty) {
-      _writeReport(filePath, actualErrors, expectedErrors);
-    }
-  }
-
-  /**
-   * Return `true` if the [firstError] and the [secondError] are equivalent.
-   */
-  bool _equalErrors(AnalysisError firstError, AnalysisError secondError) =>
-      firstError.severity == secondError.severity &&
-      firstError.type == secondError.type &&
-      _equalLocations(firstError.location, secondError.location) &&
-      firstError.message == secondError.message;
-
-  /**
-   * Return `true` if the [firstLocation] and the [secondLocation] are
-   * equivalent.
-   */
-  bool _equalLocations(Location firstLocation, Location secondLocation) =>
-      firstLocation.file == secondLocation.file &&
-      firstLocation.offset == secondLocation.offset &&
-      firstLocation.length == secondLocation.length;
-
-  /**
-   * Search through the given list of [errors] for an error that is equal to the
-   * [targetError]. If one is found, return it, otherwise return `null`.
-   */
-  AnalysisError _findError(
-      List<AnalysisError> errors, AnalysisError targetError) {
-    for (AnalysisError error in errors) {
-      if (_equalErrors(error, targetError)) {
-        return error;
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Write the given list of [errors], preceded by a header beginning with the
-   * given [prefix].
-   */
-  void _writeErrors(String prefix, List<AnalysisError> errors) {
-    buffer.write(prefix);
-    buffer.write(errors.length);
-    buffer.write(' errors:');
-    for (AnalysisError error in errors) {
-      buffer.writeln();
-      Location location = error.location;
-      int offset = location.offset;
-      buffer.write('    ');
-      buffer.write(location.file);
-      buffer.write(' (');
-      buffer.write(offset);
-      buffer.write('..');
-      buffer.write(offset + location.length);
-      buffer.write(') ');
-      buffer.write(error.severity);
-      buffer.write(', ');
-      buffer.write(error.type);
-      buffer.write(' : ');
-      buffer.write(error.message);
-    }
-  }
-
-  /**
-   * Write a report of the differences between the [actualErrors] and the
-   * [expectedErrors]. The errors are reported as being from the file at the
-   * given [filePath].
-   */
-  void _writeReport(String filePath, List<AnalysisError> actualErrors,
-      List<AnalysisError> expectedErrors) {
-    if (buffer.length > 0) {
-      buffer.writeln();
-      buffer.writeln();
-    }
-    buffer.writeln(filePath);
-    _writeErrors('  Expected ', expectedErrors);
-    buffer.writeln();
-    _writeErrors('  Found ', actualErrors);
-  }
-}
diff --git a/pkg/analysis_server/test/test_utilities/utillities.dart b/pkg/analysis_server/test/test_utilities/utillities.dart
deleted file mode 100644
index 4b4dddd..0000000
--- a/pkg/analysis_server/test/test_utilities/utillities.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-/**
- * Call a test that we think will fail.
- *
- * Ensure that we return any thrown exception correctly (avoiding the
- * package:test zone error handler).
- */
-Future callFailingTest(Future Function() expectedFailingTestFn) {
-  final Completer completer = new Completer();
-
-  try {
-    runZoned(
-      () async => await expectedFailingTestFn(),
-      onError: (error) {
-        completer.completeError(error);
-      },
-    ).then((result) {
-      completer.complete(result);
-    }).catchError((error) {
-      completer.completeError(error);
-    });
-  } catch (error) {
-    completer.completeError(error);
-  }
-
-  return completer.future;
-}
diff --git a/pkg/analysis_server/test/tool/lsp_spec/dart_test.dart b/pkg/analysis_server/test/tool/lsp_spec/dart_test.dart
index 068063c..bcffd7a 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/dart_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/dart_test.dart
@@ -4,45 +4,34 @@
 
 import 'package:test/test.dart';
 
-import '../../../tool/lsp_spec/codegen_dart.dart';
+import '../../../tool/lsp_spec/typescript_parser.dart' as ast;
 
 main() {
-  group('mapType', () {
+  group('dartType mapping', () {
     test('handles basic types', () {
-      expect(mapType(['string']), equals('String'));
-      expect(mapType(['boolean']), equals('bool'));
-      expect(mapType(['any']), equals('dynamic'));
-      expect(mapType(['object']), equals('dynamic'));
-      expect(mapType(['int']), equals('int'));
-      expect(mapType(['num']), equals('num'));
+      expect(_simple('string').dartType, equals('String'));
+      expect(_simple('boolean').dartType, equals('bool'));
+      expect(_simple('any').dartType, equals('dynamic'));
+      expect(_simple('object').dartType, equals('dynamic'));
+      expect(_simple('int').dartType, equals('int'));
+      expect(_simple('num').dartType, equals('num'));
     });
 
     test('handles union types', () {
-      expect(mapType(['string', 'int']), equals('Either2<String, int>'));
-      expect(mapType(['string | int']), equals('Either2<String, int>'));
+      expect(_union(['string', 'int']).dartTypeWithTypeArgs,
+          equals('Either2<String, int>'));
     });
 
     test('handles arrays', () {
-      expect(mapType(['string[]']), equals('List<String>'));
-      expect(mapType(['Array<string>']), equals('List<String>'));
-    });
-
-    test('handles types with args', () {
-      expect(mapType(['Class<string[]>']), equals('Class<List<String>>'));
-      expect(mapType(['Array<string | num>']),
-          equals('List<Either2<String, num>>'));
-    });
-
-    test('handles complex nested types', () {
-      expect(
-          mapType([
-            'Array<string>',
-            'any[]',
-            'Response<A>',
-            'Request<Array<string | num>>'
-          ]),
-          equals(
-              'Either4<List<String>, List<dynamic>, Response<A>, Request<List<Either2<String, num>>>>'));
+      expect(_array('string').dartTypeWithTypeArgs, equals('List<String>'));
     });
   });
 }
+
+ast.Type _simple(String name) =>
+    new ast.Type(new ast.Token(ast.TokenType.IDENTIFIER, name), []);
+
+ast.ArrayType _array(String name) => new ast.ArrayType(_simple(name));
+
+ast.UnionType _union(List<String> names) =>
+    new ast.UnionType(names.map(_simple).toList());
diff --git a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
index e12b850..b352d18 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
@@ -18,23 +18,21 @@
     });
 
     test('returns correct output for union types', () {
-      final message =
-          new RequestMessage(new Either2.t1(1), "test", null, "test");
+      final message = new RequestMessage(
+          new Either2<num, String>.t1(1), Method.shutdown, null, "test");
       String output = json.encode(message.toJson());
-      expect(output, equals('{"id":1,"method":"test","jsonrpc":"test"}'));
+      expect(output, equals('{"id":1,"method":"shutdown","jsonrpc":"test"}'));
     });
 
     test('returns correct output for union types containing interface types',
         () {
-      final params = new Either2<String, WorkspaceClientCapabilities>.t2(
-          new WorkspaceClientCapabilities(
-        true,
-        null,
-        null,
-        null,
-      ));
+      final params = new Either2<String, TextDocumentItem>.t2(
+          new TextDocumentItem('!uri', '!language', 1, '!text'));
       String output = json.encode(params);
-      expect(output, equals('{"applyEdit":true}'));
+      expect(
+          output,
+          equals(
+              '{"uri":"!uri","languageId":"!language","version":1,"text":"!text"}'));
     });
 
     test('returns correct output for types with lists', () {
@@ -45,7 +43,7 @@
       final codeAction = new Diagnostic(
         range,
         DiagnosticSeverity.Error,
-        new Either2.t2('test_err'),
+        'test_err',
         '/tmp/source.dart',
         'err!!',
         [new DiagnosticRelatedInformation(location, 'message')],
@@ -95,51 +93,81 @@
 
   group('fromJson', () {
     test('parses JSON for types with unions (left side)', () {
-      final input = '{"id":1,"method":"test","jsonrpc":"test"}';
-      final message = new RequestMessage.fromJson(jsonDecode(input));
+      final input = '{"id":1,"method":"shutdown","jsonrpc":"test"}';
+      final message = RequestMessage.fromJson(jsonDecode(input));
       expect(message.id, equals(new Either2<num, String>.t1(1)));
       expect(message.id.valueEquals(1), isTrue);
       expect(message.jsonrpc, "test");
-      expect(message.method, "test");
+      expect(message.method, Method.shutdown);
     });
 
     test('parses JSON for types with unions (right side)', () {
-      final input = '{"id":"one","method":"test","jsonrpc":"test"}';
-      final message = new RequestMessage.fromJson(jsonDecode(input));
+      final input = '{"id":"one","method":"shutdown","jsonrpc":"test"}';
+      final message = RequestMessage.fromJson(jsonDecode(input));
       expect(message.id, equals(new Either2<num, String>.t2("one")));
       expect(message.id.valueEquals("one"), isTrue);
       expect(message.jsonrpc, "test");
-      expect(message.method, "test");
+      expect(message.method, Method.shutdown);
+    });
+
+    test('parses JSON with nulls for unions that allow null', () {
+      final input = '{"id":null,"jsonrpc":"test"}';
+      final message = ResponseMessage.fromJson(jsonDecode(input));
+      expect(message.id, isNull);
+    });
+
+    test('parses JSON with nulls for unions that allow null', () {
+      final input = '{"method":"test","jsonrpc":"test"}';
+      final message = NotificationMessage.fromJson(jsonDecode(input));
+      expect(message.params, isNull);
     });
   });
 
-  test('objects with lists and enums can round-trip through to json and back',
-      () {
-    final obj = new ClientCapabilities(
-        new WorkspaceClientCapabilities(
-            true,
-            false,
-            [ResourceOperationKind.Create, ResourceOperationKind.Delete],
-            FailureHandlingKind.Undo),
-        new TextDocumentClientCapabilities(true, false, true, false),
-        null);
+  test('objects with lists can round-trip through to json and back', () {
+    final obj = new InitializeParams(1, '!root', null, null,
+        new ClientCapabilities(null, null, null), '!trace', [
+      new WorkspaceFolder('!uri1', '!name1'),
+      new WorkspaceFolder('!uri2', '!name2'),
+    ]);
     final String json = jsonEncode(obj);
-    final restoredObj = new ClientCapabilities.fromJson(jsonDecode(json));
+    final restoredObj = InitializeParams.fromJson(jsonDecode(json));
 
-    expect(restoredObj.workspace.applyEdit, equals(obj.workspace.applyEdit));
-    expect(restoredObj.workspace.documentChanges,
-        equals(obj.workspace.documentChanges));
-    expect(restoredObj.workspace.resourceOperations,
-        equals(obj.workspace.resourceOperations));
-    expect(restoredObj.workspace.failureHandling,
-        equals(obj.workspace.failureHandling));
-    expect(restoredObj.textDocument.didSave, equals(obj.textDocument.didSave));
-    expect(restoredObj.textDocument.dynamicRegistration,
-        equals(obj.textDocument.dynamicRegistration));
     expect(
-        restoredObj.textDocument.willSave, equals(obj.textDocument.willSave));
-    expect(restoredObj.textDocument.willSaveWaitUntil,
-        equals(obj.textDocument.willSaveWaitUntil));
-    expect(restoredObj.experimental, equals(obj.experimental));
+        restoredObj.workspaceFolders, hasLength(obj.workspaceFolders.length));
+    for (var i = 0; i < obj.workspaceFolders.length; i++) {
+      expect(restoredObj.workspaceFolders[i].name,
+          equals(obj.workspaceFolders[i].name));
+      expect(restoredObj.workspaceFolders[i].uri,
+          equals(obj.workspaceFolders[i].uri));
+    }
+  });
+
+  test('objects with enums can round-trip through to json and back', () {
+    final obj = new FoldingRange(1, 2, 3, 4, FoldingRangeKind.Comment);
+    final String json = jsonEncode(obj);
+    final restoredObj = FoldingRange.fromJson(jsonDecode(json));
+
+    expect(restoredObj.startLine, equals(obj.startLine));
+    expect(restoredObj.startCharacter, equals(obj.startCharacter));
+    expect(restoredObj.endLine, equals(obj.endLine));
+    expect(restoredObj.endCharacter, equals(obj.endCharacter));
+    expect(restoredObj.kind, equals(obj.kind));
+  });
+
+  test('objects with maps can round-trip through to json and back', () {
+    final start = new Position(1, 1);
+    final end = new Position(2, 2);
+    final range = new Range(start, end);
+    final obj = new WorkspaceEdit(<String, List<TextEdit>>{
+      'fileA': [new TextEdit(range, 'text A')],
+      'fileB': [new TextEdit(range, 'text B')]
+    }, null);
+    final String json = jsonEncode(obj);
+    final restoredObj = WorkspaceEdit.fromJson(jsonDecode(json));
+
+    expect(restoredObj.documentChanges, equals(obj.documentChanges));
+    expect(restoredObj.changes, equals(obj.changes));
+    expect(restoredObj.changes.keys, equals(obj.changes.keys));
+    expect(restoredObj.changes.values, equals(obj.changes.values));
   });
 }
diff --git a/pkg/analysis_server/test/tool/lsp_spec/matchers.dart b/pkg/analysis_server/test/tool/lsp_spec/matchers.dart
new file mode 100644
index 0000000..72ee321
--- /dev/null
+++ b/pkg/analysis_server/test/tool/lsp_spec/matchers.dart
@@ -0,0 +1,82 @@
+// 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:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:matcher/matcher.dart';
+
+import '../../../tool/lsp_spec/typescript_parser.dart';
+
+Matcher isSimpleType(String name) => new SimpleTypeMatcher(name);
+
+class SimpleTypeMatcher extends Matcher {
+  final String _expectedName;
+  const SimpleTypeMatcher(this._expectedName);
+
+  bool matches(item, Map matchState) {
+    return item is Type && item.name == _expectedName;
+  }
+
+  Description describe(Description description) =>
+      description.add('a type with the name $_expectedName');
+
+  Description describeMismatch(
+      item, Description mismatchDescription, Map matchState, bool verbose) {
+    if (item is Type) {
+      return mismatchDescription
+          .add('has the name ')
+          .addDescriptionOf(item.name);
+    } else {
+      return mismatchDescription.add('is not a Type');
+    }
+  }
+}
+
+Matcher isArrayOf(Matcher matcher) =>
+    new ArrayTypeMatcher(wrapMatcher(matcher));
+
+class ArrayTypeMatcher extends Matcher {
+  final Matcher _elementTypeMatcher;
+  const ArrayTypeMatcher(this._elementTypeMatcher);
+
+  bool matches(item, Map matchState) {
+    return item is ArrayType &&
+        _elementTypeMatcher.matches(item.elementType, matchState);
+  }
+
+  Description describe(Description description) =>
+      description.add('an array of ').addDescriptionOf(_elementTypeMatcher);
+
+  Description describeMismatch(
+      item, Description mismatchDescription, Map matchState, bool verbose) {
+    if (item is ArrayType) {
+      return _elementTypeMatcher.describeMismatch(
+          item, mismatchDescription, matchState, verbose);
+    } else {
+      return mismatchDescription.add('is not an ArrayType');
+    }
+  }
+}
+
+Matcher isMapOf(Matcher indexMatcher, Matcher valueMatcher) =>
+    new MapTypeMatcher(wrapMatcher(indexMatcher), wrapMatcher(valueMatcher));
+
+class MapTypeMatcher extends Matcher {
+  final Matcher _indexMatcher, _valueMatcher;
+  const MapTypeMatcher(this._indexMatcher, this._valueMatcher);
+
+  bool matches(item, Map matchState) {
+    return item is MapType &&
+        _indexMatcher.matches(item.indexType, matchState) &&
+        _valueMatcher.matches(item.valueType, matchState);
+  }
+
+  Description describe(Description description) => description
+      .add('a MapType where index is ')
+      .addDescriptionOf(_indexMatcher)
+      .add(' and value is ')
+      .addDescriptionOf(_valueMatcher);
+}
+
+Matcher isResponseError(ErrorCodes code) => const TypeMatcher<ResponseError>()
+    .having((e) => e.code, 'code', equals(code));
diff --git a/pkg/analysis_server/test/tool/lsp_spec/test_all.dart b/pkg/analysis_server/test/tool/lsp_spec/test_all.dart
new file mode 100644
index 0000000..1edfb80
--- /dev/null
+++ b/pkg/analysis_server/test/tool/lsp_spec/test_all.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:test_reflective_loader/test_reflective_loader.dart';
+
+import 'dart_test.dart' as dart_test;
+import 'json_test.dart' as json_test;
+import 'markdown_test.dart' as markdown_test;
+import 'typescript_test.dart' as typescript_test;
+
+main() {
+  defineReflectiveSuite(() {
+    dart_test.main();
+    json_test.main();
+    markdown_test.main();
+    typescript_test.main();
+  }, name: 'lsp-tool');
+}
diff --git a/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart b/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart
index 1fad598..103392d 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/typescript_test.dart
@@ -4,7 +4,8 @@
 
 import 'package:test/test.dart';
 
-import '../../../tool/lsp_spec/typescript.dart';
+import '../../../tool/lsp_spec/typescript_parser.dart';
+import 'matchers.dart';
 
 main() {
   group('typescript parser', () {
@@ -20,22 +21,57 @@
 	options?: OptionKind[];
 }
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       expect(output, hasLength(1));
       expect(output[0], const TypeMatcher<Interface>());
       final Interface interface = output[0];
       expect(interface.name, equals('SomeOptions'));
-      expect(interface.comment, equals('Some options.'));
+      expect(interface.commentText, equals('Some options.'));
       expect(interface.baseTypes, hasLength(0));
       expect(interface.members, hasLength(1));
       expect(interface.members[0], const TypeMatcher<Field>());
       final Field field = interface.members[0];
       expect(field.name, equals('options'));
-      expect(field.comment, equals('''Options used by something.'''));
+      expect(field.commentText, equals('''Options used by something.'''));
       expect(field.allowsNull, isFalse);
       expect(field.allowsUndefined, isTrue);
-      expect(field.types, hasLength(1));
-      expect(field.types[0], equals('OptionKind[]'));
+      expect(field.type, isArrayOf(isSimpleType('OptionKind')));
+    });
+
+    test('parses an interface with a field with an inline/unnamed type', () {
+      final String input = '''
+export interface Capabilities {
+	textDoc?: {
+    deprecated?: bool;
+  };
+}
+    ''';
+      final List<AstNode> output = parseFile(input);
+      // Length is two because we'll fabricate the type of textDoc.
+      expect(output, hasLength(2));
+
+      // Check there was a full fabricarted interface for this type.
+      expect(output[0], const TypeMatcher<Interface>());
+      Interface interface = output[0];
+      expect(interface.name, equals('CapabilitiesTextDoc'));
+      expect(interface.members, hasLength(1));
+      expect(interface.members[0], const TypeMatcher<Field>());
+      Field field = interface.members[0];
+      expect(field.name, equals('deprecated'));
+      expect(field.allowsNull, isFalse);
+      expect(field.allowsUndefined, isTrue);
+      expect(field.type, isSimpleType('bool'));
+      expect(field.allowsUndefined, isTrue);
+
+      expect(output[1], const TypeMatcher<Interface>());
+      interface = output[1];
+      expect(interface.name, equals('Capabilities'));
+      expect(interface.members, hasLength(1));
+      expect(interface.members[0], const TypeMatcher<Field>());
+      field = interface.members[0];
+      expect(field.name, equals('textDoc'));
+      expect(field.allowsNull, isFalse);
+      expect(field.type, isSimpleType('CapabilitiesTextDoc'));
     });
 
     test('parses an interface with multiple fields', () {
@@ -51,7 +87,7 @@
 	options1: any;
 }
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       expect(output, hasLength(1));
       expect(output[0], const TypeMatcher<Interface>());
       final Interface interface = output[0];
@@ -60,7 +96,7 @@
         expect(interface.members[i], const TypeMatcher<Field>());
         final Field field = interface.members[i];
         expect(field.name, equals('options$i'));
-        expect(field.comment, equals('''Options$i used by something.'''));
+        expect(field.commentText, equals('''Options$i used by something.'''));
       });
     });
 
@@ -70,7 +106,7 @@
 	data?: D;
 }
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       expect(output, hasLength(1));
       expect(output[0], const TypeMatcher<Interface>());
       final Interface interface = output[0];
@@ -78,21 +114,21 @@
       final Field field = interface.members.first;
       expect(field, const TypeMatcher<Field>());
       expect(field.name, equals('data'));
-      expect(field.allowsUndefined, true);
-      expect(field.allowsNull, false);
-      expect(field.types, equals(['D']));
+      expect(field.allowsUndefined, isTrue);
+      expect(field.allowsNull, isFalse);
+      expect(field.type, isSimpleType('D'));
     });
 
     test('parses an interface with Arrays in Array<T> format', () {
       final String input = '''
-export interface RequestMessage {
+export interface MyMessage {
 	/**
 	 * The method's params.
 	 */
 	params?: Array<any> | object;
 }
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       expect(output, hasLength(1));
       expect(output[0], const TypeMatcher<Interface>());
       final Interface interface = output[0];
@@ -100,10 +136,32 @@
       final Field field = interface.members.first;
       expect(field, const TypeMatcher<Field>());
       expect(field.name, equals('params'));
-      expect(field.comment, equals('''The method's params.'''));
-      expect(field.allowsUndefined, true);
-      expect(field.allowsNull, false);
-      expect(field.types, equals(['Array<any>', 'object']));
+      expect(field.commentText, equals('''The method's params.'''));
+      expect(field.allowsUndefined, isTrue);
+      expect(field.allowsNull, isFalse);
+      expect(field.type, const TypeMatcher<UnionType>());
+      UnionType union = field.type;
+      expect(union.types, hasLength(2));
+      expect(union.types[0], isArrayOf(isSimpleType('any')));
+      expect(union.types[1], isSimpleType('object'));
+    });
+
+    test('parses an interface with a map into a MapType', () {
+      final String input = '''
+export interface WorkspaceEdit {
+	changes: { [uri: string]: TextEdit[]; };
+}
+    ''';
+      final List<AstNode> output = parseFile(input);
+      expect(output, hasLength(1));
+      expect(output[0], const TypeMatcher<Interface>());
+      final Interface interface = output[0];
+      expect(interface.members, hasLength(1));
+      final Field field = interface.members.first;
+      expect(field, const TypeMatcher<Field>());
+      expect(field.name, equals('changes'));
+      expect(field.type,
+          isMapOf(isSimpleType('string'), isArrayOf(isSimpleType('TextEdit'))));
     });
 
     test('flags nullable undefined values', () {
@@ -115,7 +173,7 @@
   canBeUndefined?: string;
 }
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       final Interface interface = output[0];
       expect(interface.members, hasLength(4));
       interface.members.forEach((m) => expect(m, const TypeMatcher<Field>()));
@@ -143,21 +201,21 @@
  * Blank lines should remain in-tact, as should:
  *   - Indented
  *   - Things
- * 
+ *
  * Some docs have:
  * - List items that are not indented
- * 
+ *
  * Sometimes after a blank line we'll have a note.
- * 
+ *
  * *Note* that something.
  */
 export interface A {
   a: a;
 }
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       final Interface interface = output[0];
-      expect(interface.comment, equals('''
+      expect(interface.commentText, equals('''
 Describes the what this class in lots of words that wrap onto multiple lines that will need re-wrapping to format nicely when converted into Dart.
 
 Blank lines should remain in-tact, as should:
@@ -176,12 +234,12 @@
       final String input = '''
 export type DocumentSelector = DocumentFilter[];
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       expect(output, hasLength(1));
       expect(output[0], const TypeMatcher<TypeAlias>());
       final TypeAlias typeAlias = output[0];
       expect(typeAlias.name, equals('DocumentSelector'));
-      expect(typeAlias.baseType, equals('DocumentFilter[]'));
+      expect(typeAlias.baseType, isArrayOf(isSimpleType('DocumentFilter')));
     });
 
     test('parses a namespace of constants', () {
@@ -203,7 +261,7 @@
 	export const Rename: ResourceOperationKind = 'rename';
 }
     ''';
-      final List<ApiItem> output = extractTypes(input);
+      final List<AstNode> output = parseFile(input);
       expect(output, hasLength(1));
       expect(output[0], const TypeMatcher<Namespace>());
       final Namespace namespace = output[0];
@@ -213,17 +271,38 @@
           delete = namespace.members[1],
           rename = namespace.members[2];
       expect(create.name, equals('Create'));
-      expect(create.type, equals('ResourceOperationKind'));
-      expect(
-          create.comment, equals('Supports creating new files and folders.'));
+      expect(create.type, isSimpleType('ResourceOperationKind'));
+      expect(create.commentText,
+          equals('Supports creating new files and folders.'));
       expect(rename.name, equals('Rename'));
-      expect(rename.type, equals('ResourceOperationKind'));
-      expect(rename.comment,
+      expect(rename.type, isSimpleType('ResourceOperationKind'));
+      expect(rename.commentText,
           equals('Supports renaming existing files and folders.'));
       expect(delete.name, equals('Delete'));
-      expect(delete.type, equals('ResourceOperationKind'));
-      expect(delete.comment,
+      expect(delete.type, isSimpleType('ResourceOperationKind'));
+      expect(delete.commentText,
           equals('Supports deleting existing files and folders.'));
     });
+
+    test('parses a tuple in an array', () {
+      final String input = '''
+interface SomeInformation {
+	label: string | [number, number];
+}
+    ''';
+      final List<AstNode> output = parseFile(input);
+      expect(output, hasLength(1));
+      expect(output[0], const TypeMatcher<Interface>());
+      final Interface interface = output[0];
+      expect(interface.members, hasLength(1));
+      final Field field = interface.members.first;
+      expect(field, const TypeMatcher<Field>());
+      expect(field.name, equals('label'));
+      expect(field.type, const TypeMatcher<UnionType>());
+      UnionType union = field.type;
+      expect(union.types, hasLength(2));
+      expect(union.types[0], isSimpleType('string'));
+      expect(union.types[1], isArrayOf(isSimpleType('number')));
+    });
   });
 }
diff --git a/pkg/analysis_server/tool/instrumentation/log/log.dart b/pkg/analysis_server/tool/instrumentation/log/log.dart
index 011581a..10dfd90 100644
--- a/pkg/analysis_server/tool/instrumentation/log/log.dart
+++ b/pkg/analysis_server/tool/instrumentation/log/log.dart
@@ -870,7 +870,7 @@
 /**
  * A log entry representing a communication between the server and a plugin.
  */
-abstract class PluginEntryMixin {
+mixin PluginEntryMixin {
   /**
    * The components describing the plugin associated with this entry.
    */
diff --git a/pkg/analysis_server/tool/lsp_spec/README.md b/pkg/analysis_server/tool/lsp_spec/README.md
new file mode 100644
index 0000000..a8ad68e
--- /dev/null
+++ b/pkg/analysis_server/tool/lsp_spec/README.md
@@ -0,0 +1,75 @@
+# Language Server Protocol
+
+## LSP Support Status
+
+Support for [the Language Server Protocol](https://microsoft.github.io/language-server-protocol/) (LSP) is **not production ready** but available as a preview to allow testing/integration work.
+
+## Running the Server
+
+Run the server from source to ensure you're running code that matches the status shown below. If you don't have a locally built SDK then a recent nightly should do. Pass the `--lsp` flag to start the server in LSP mode:
+
+```
+dart pkg/analysis_server/bin/server.dart --lsp
+```
+
+Note: In LSP the client makes the first request so there is no obvious confirmation that the server is working correctly until the client sends an `initialize` request. Unlike standard JSON RPC, [LSP requires that headers are sent](https://microsoft.github.io/language-server-protocol/specification).
+
+## Message Status
+
+Below is a list of LSP methods and their implementation status.
+
+- Method: The LSP method name
+- Basic Impl: This method has an implementation but may assume some client capabilities
+- Capabilities: Only types from the original spec or as advertised in client capabilities are returned
+- Tests: Has automated tests
+- Tested Client: Has been manually tested in at least one LSP client editor
+
+| Method | Basic Impl | Capabilities | Tests | Tested Client | Notes |
+| - | - | - | - | - | - |
+| initialize | ✅ | ✅ | ✅ | ✅ | trace and other options NYI
+| initialized | ✅ | ✅ | ✅ | ✅ |
+| shutdown | ✅ | ✅ | ✅ | ✅ | supported but does nothing |
+| exit | | | | | |
+| $/cancelRequest | | | | | ignored (unsupported) |
+| window/showMessage | ✅ | | | |
+| window/showMessageRequest | | | | |
+| window/logMessage | ✅ | | | |
+| telemetry/event | | | | |
+| client/registerCapability | | | | | unused, but should be used for DocumentSelector at least
+| client/unregisterCapability | | | | |
+| workspace/didChangeWatchedFiles | | | | | unused, server does own watching |
+| workspace/symbol | | | | |
+| workspace/executeCommand | ✅ | ✅ | ✅ | ✅ |
+| workspace/applyEdit | ✅ | ✅ | ✅ | ✅ |
+| textDocument/didOpen | ✅ | ✅ | ✅ | ✅ |
+| textDocument/didChange | ✅ | ✅ | ✅ | ✅ |
+| textDocument/willSave | | | | |
+| textDocument/willSaveWaitUntil | | | | |
+| textDocument/didClose | ✅ | ✅ | ✅ | ✅ |
+| textDocument/publishDiagnostics | ✅ | ✅ | ✅ | ✅ |
+| textDocument/completion | ✅ | ✅ | ✅ | ✅ |
+| completionItem/resolve | | | | | not required |
+| textDocument/hover | ✅ | ✅ | ✅ | ✅ |
+| textDocument/signatureHelp | ✅ | ✅ | ✅ | ✅ | trigger character handling outstanding
+| textDocument/definition | ✅ | ✅ | ✅ | ✅ |
+| textDocument/typeDefinition | | | | |
+| textDocument/implementation | | | | |
+| textDocument/references | ✅ | ✅ | ✅ | ✅ |
+| textDocument/documentHighlight | | | | |
+| textDocument/documentSymbol | ✅ | ✅ | ✅ | ✅ |
+| textDocument/codeAction (sortMembers) | ✅ | ✅ | ✅ | ✅ |
+| textDocument/codeAction (organiseImports) | ✅ | ✅ | ✅ | ✅ |
+| textDocument/codeAction (refactors) | | | | |
+| textDocument/codeAction (assists) | ✅ | ✅ | ✅ | |
+| textDocument/codeAction (fixes) | ✅ | ✅ | ✅ | |
+| textDocument/codeLens | | | | |
+| codeLens/resolve | | | | |
+| textDocument/documentLink | | | | |
+| documentLink/resolve | | | | |
+| textDocument/formatting | ✅ | ✅ | ✅ | ✅ |
+| textDocument/rangeFormatting | | | | | requires support from dart_style?
+| textDocument/onTypeFormatting | ✅ | ✅ | ✅ | ✅ |
+| textDocument/rename | | | | |
+| textDocument/prepareRename | | | | |
+| textDocument/foldingRange | | | | |
+
diff --git a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
index 79b2b63..6b90396 100644
--- a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
+++ b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
@@ -3,16 +3,30 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:dart_style/dart_style.dart';
-import 'package:meta/meta.dart';
 
 import 'typescript.dart';
+import 'typescript_parser.dart';
 
 final formatter = new DartFormatter();
 Map<String, Interface> _interfaces = {};
+// TODO(dantup): Rename namespaces -> enums since they're always that now.
 Map<String, Namespace> _namespaces = {};
 Map<String, TypeAlias> _typeAliases = {};
 
-String generateDartForTypes(List<ApiItem> types) {
+/// Whether our enum class allows any value (eg. should always return true
+/// from canParse() for the correct type). This is to allow us to have some
+/// type safety for these values but without restricting which values are allowed.
+/// This is to support things like custom error codes and also future changes
+/// in the spec (it's important the server doesn't crash on deserialising
+/// newer values).
+bool enumClassAllowsAnyValue(String name) {
+  // TODO(dantup): This should return true by default, and allow opt-out for
+  // those things we know are not supported. This behaviour matches the old
+  // code in order to simplify diffs while migrating.
+  return name == 'ErrorCodes' || name == 'CodeActionKind';
+}
+
+String generateDartForTypes(List<AstNode> types) {
   // Keep maps of items we may need to look up quickly later.
   types
       .whereType<TypeAlias>()
@@ -29,8 +43,15 @@
   return formattedCode.trim() + '\n'; // Ensure a single trailing newline.
 }
 
-List<String> _extractTypesFromUnion(String type) {
-  return type.split('|').map((t) => t.trim()).toList();
+TypeBase resolveTypeAlias(TypeBase type, {resolveEnumClasses: false}) {
+  if (type is Type && _typeAliases.containsKey(type.name)) {
+    final alias = _typeAliases[type.name];
+    // Only follow the type if we're not an enum, or we wanted to follow enums.
+    if (!_namespaces.containsKey(alias.name) || resolveEnumClasses) {
+      return alias.baseType;
+    }
+  }
+  return type;
 }
 
 String _formatCode(String code) {
@@ -52,45 +73,28 @@
   return interface.members
       .whereType<Field>()
       .followedBy(interface.baseTypes
-          .map((name) => _getAllFields(_interfaces[name]))
+          // This cast is safe because base types are always real types.
+          .map((type) => _getAllFields(_interfaces[(type as Type).name]))
           .expand((ts) => ts))
       .toList();
 }
 
-String _getListType(String type) {
-  return type.substring('List<'.length, type.length - 1);
-}
-
 /// Returns a copy of the list sorted by name.
-List<ApiItem> _getSorted(List<ApiItem> items) {
+List<AstNode> _getSorted(List<AstNode> items) {
   final sortedList = items.toList();
   sortedList.sort((item1, item2) => item1.name.compareTo(item2.name));
   return sortedList;
 }
 
-List<String> _getUnionTypes(String type) {
-  return type
-      .substring('EitherX<'.length, type.length - 1)
-      .split(',')
-      .map((s) => s.trim())
-      .toList();
-}
-
-bool _isList(String type) {
-  return type.startsWith('List<') && type.endsWith('>');
-}
-
-bool _isLiteral(String type) {
+bool _isSimpleType(TypeBase type) {
   const literals = ['num', 'String', 'bool'];
-  return literals.contains(type);
+  return type is Type && literals.contains(type.dartType);
 }
 
-bool _isSpecType(String type) {
-  return _interfaces.containsKey(type) || _namespaces.containsKey(type);
-}
-
-bool _isUnion(String type) {
-  return type.startsWith('Either') && type.endsWith('>');
+bool _isSpecType(TypeBase type) {
+  return type is Type &&
+      (_interfaces.containsKey(type.name) ||
+          (_namespaces.containsKey(type.name)));
 }
 
 /// Maps reserved words and identifiers that cause issues in field names.
@@ -104,57 +108,6 @@
   return map[identifier] ?? identifier;
 }
 
-/// Maps a TypeScript type on to a Dart type, including following TypeAliases.
-@visibleForTesting
-String mapType(List<String> types) {
-  const mapping = <String, String>{
-    'boolean': 'bool',
-    'string': 'String',
-    'number': 'num',
-    'any': 'dynamic',
-    'object': 'dynamic',
-    // Special cases that are hard to parse or anonymous types.
-    '{ [uri: string]: TextEdit[]; }': 'Map<String, List<TextEdit>>',
-    '{ language: string; value: string }': 'MarkedStringWithLanguage'
-  };
-  if (types.length > 4) {
-    throw 'Unions of more than 4 types are not supported.';
-  }
-  if (types.length >= 2) {
-    final typeArgs = types.map((t) => mapType([t])).join(', ');
-    return 'Either${types.length}<$typeArgs>';
-  }
-
-  final type = types.first;
-  if (type.endsWith('[]')) {
-    return 'List<${mapType([type.substring(0, type.length - 2)])}>';
-  } else if (type.startsWith('Array<') && type.endsWith('>')) {
-    return 'List<${mapType([type.substring(6, type.length - 1)])}>';
-  } else if (type.contains('<')) {
-    // For types with type args, we need to map the type and each type arg.
-    final declaredType = _stripTypeArgs(type);
-    final typeArgs = type
-        .substring(declaredType.length + 1, type.length - 1)
-        .split(',')
-        .map((t) => t.trim());
-    return '${mapType([
-      declaredType
-    ])}<${typeArgs.map((t) => mapType([t])).join(', ')}>';
-  } else if (type.contains('|')) {
-    // It's possible we ended up with nested unions that the parsing.
-    // TODO(dantup): This is now partly done during parsing and partly done
-    // here. Maybe consider removing from typescript.dart and just carrying a
-    // String through so the logic is all in one place in this function?
-    return mapType(_extractTypesFromUnion(type));
-  } else if (_typeAliases.containsKey(type)) {
-    return mapType([_typeAliases[type].baseType]);
-  } else if (mapping.containsKey(type)) {
-    return mapType([mapping[type]]);
-  } else {
-    return type;
-  }
-}
-
 String _rewriteCommentReference(String comment) {
   final commentReferencePattern = new RegExp(r'\[([\w ]+)\]\(#(\w+)\)');
   return comment.replaceAllMapped(commentReferencePattern, (m) {
@@ -168,10 +121,6 @@
   });
 }
 
-String _stripTypeArgs(String typeName) => typeName.contains('<')
-    ? typeName.substring(0, typeName.indexOf('<'))
-    : typeName;
-
 Iterable<String> _wrapLines(List<String> lines, int maxLength) sync* {
   lines = lines.map((l) => l.trimRight()).toList();
   for (var line in lines) {
@@ -205,8 +154,7 @@
       _getAllFields(interface).where((f) => !f.allowsUndefined);
   for (var field in requiredFields) {
     buffer.write(" && obj.containsKey('${field.name}') && ");
-    _writeTypeCheckCondition(
-        buffer, "obj['${field.name}']", mapType(field.types));
+    _writeTypeCheckCondition(buffer, "obj['${field.name}']", field.type);
   }
   buffer
     ..writeln(';')
@@ -216,7 +164,7 @@
 
 void _writeConst(IndentableStringBuffer buffer, Const cons) {
   _writeDocCommentsAndAnnotations(buffer, cons);
-  buffer.writeIndentedln('static const ${cons.name} = ${cons.value};');
+  buffer.writeIndentedln('static const ${cons.name} = ${cons.valueAsLiteral};');
 }
 
 void _writeConstructor(IndentableStringBuffer buffer, Interface interface) {
@@ -225,7 +173,7 @@
     return;
   }
   buffer
-    ..writeIndented('${_stripTypeArgs(interface.name)}(')
+    ..writeIndented('${interface.name}(')
     ..write(allFields.map((field) => 'this.${field.name}').join(', '))
     ..write(')');
   final fieldsWithValidation =
@@ -252,51 +200,65 @@
 }
 
 void _writeDocCommentsAndAnnotations(
-    IndentableStringBuffer buffer, ApiItem item) {
-  var comment = item.comment?.trim();
-  if (comment == null || comment.length == 0) {
-    return;
+    IndentableStringBuffer buffer, AstNode node) {
+  var comment = node.commentText?.trim();
+  if (comment != null && comment.isNotEmpty) {
+    comment = _rewriteCommentReference(comment);
+    Iterable<String> lines = comment.split('\n');
+    // Wrap at 80 - 4 ('/// ') - indent characters.
+    lines = _wrapLines(lines, (80 - 4 - buffer.totalIndent).clamp(0, 80));
+    lines.forEach((l) => buffer.writeIndentedln('/// $l'.trim()));
   }
-  comment = _rewriteCommentReference(comment);
-  Iterable<String> lines = comment.split('\n');
-  // Wrap at 80 - 4 ('/// ') - indent characters.
-  lines = _wrapLines(lines, (80 - 4 - buffer.totalIndent).clamp(0, 80));
-  lines.forEach((l) => buffer.writeIndentedln('/// $l'.trim()));
-  if (item.isDeprecated) {
+  if (node.isDeprecated) {
     buffer.writeIndentedln('@core.deprecated');
   }
 }
 
 void _writeEnumClass(IndentableStringBuffer buffer, Namespace namespace) {
   _writeDocCommentsAndAnnotations(buffer, namespace);
+  final consts = namespace.members.cast<Const>().toList();
+  final allowsAnyValue = enumClassAllowsAnyValue(namespace.name);
+  final constructorName = allowsAnyValue ? '' : '._';
+  final typeOfValues =
+      resolveTypeAlias(consts.first.type, resolveEnumClasses: true);
+
   buffer
     ..writeln('class ${namespace.name} {')
     ..indent()
-    ..writeIndentedln('const ${namespace.name}._(this._value);')
+    ..writeIndentedln('const ${namespace.name}$constructorName(this._value);')
     ..writeIndentedln('const ${namespace.name}.fromJson(this._value);')
     ..writeln()
-    ..writeIndentedln('final Object _value;')
+    ..writeIndentedln('final ${typeOfValues.dartTypeWithTypeArgs} _value;')
     ..writeln()
     ..writeIndentedln('static bool canParse(Object obj) {')
-    ..indent()
-    ..writeIndentedln('switch (obj) {')
     ..indent();
-  namespace.members.whereType<Const>().forEach((cons) {
-    buffer..writeIndentedln('case ${cons.value}:');
-  });
+  if (allowsAnyValue) {
+    buffer.writeIndentedln('return ');
+    _writeTypeCheckCondition(buffer, 'obj', consts.first.type);
+    buffer.writeln(';');
+  } else {
+    buffer
+      ..writeIndentedln('switch (obj) {')
+      ..indent();
+    consts.forEach((cons) {
+      buffer..writeIndentedln('case ${cons.valueAsLiteral}:');
+    });
+    buffer
+      ..indent()
+      ..writeIndentedln('return true;')
+      ..outdent()
+      ..outdent()
+      ..writeIndentedln('}')
+      ..writeIndentedln('return false;');
+  }
   buffer
-    ..indent()
-    ..writeIndentedln('return true;')
-    ..outdent()
-    ..writeIndentedln('}')
-    ..writeIndentedln('return false;')
     ..outdent()
     ..writeIndentedln('}');
   namespace.members.whereType<Const>().forEach((cons) {
     _writeDocCommentsAndAnnotations(buffer, cons);
     buffer
       ..writeIndentedln(
-          'static const ${_makeValidIdentifier(cons.name)} = const ${namespace.name}._(${cons.value});');
+          'static const ${_makeValidIdentifier(cons.name)} = const ${namespace.name}$constructorName(${cons.valueAsLiteral});');
   });
   buffer
     ..writeln()
@@ -313,58 +275,107 @@
     ..writeln();
 }
 
+void _writeEquals(IndentableStringBuffer buffer, Interface interface) {
+  buffer
+    ..writeIndentedln('@override')
+    ..writeIndentedln('bool operator ==(other) {')
+    ..indent()
+    ..writeIndentedln('if (other is ${interface.name}) {')
+    ..indent()
+    ..writeIndented('return ');
+  for (var field in _getAllFields(interface)) {
+    final type = field.type;
+    if (type is ArrayType) {
+      final elementType = type.elementType;
+      final elementDartType = elementType.dartTypeWithTypeArgs;
+      buffer.write(
+          'listEqual(${field.name}, other.${field.name}, ($elementDartType a, $elementDartType b) => a == b) && ');
+    } else if (type is MapType) {
+      final valueType = type.valueType;
+      final valueDartType = valueType.dartTypeWithTypeArgs;
+      buffer.write(
+          'mapEqual(${field.name}, other.${field.name}, ($valueDartType a, $valueDartType b) => a == b) && ');
+    } else {
+      buffer.write('${field.name} == other.${field.name} && ');
+    }
+  }
+  buffer
+    ..writeln('true;')
+    ..outdent()
+    ..writeIndentedln('}')
+    ..writeIndentedln('return false;')
+    ..outdent()
+    ..writeIndentedln('}');
+}
+
 void _writeField(IndentableStringBuffer buffer, Field field) {
   _writeDocCommentsAndAnnotations(buffer, field);
   buffer
     ..writeIndented('final ')
-    ..write(mapType(field.types))
+    ..write(field.type.dartTypeWithTypeArgs)
     ..writeln(' ${field.name};');
 }
 
 void _writeFromJsonCode(
-    IndentableStringBuffer buffer, List<String> types, String valueCode) {
-  final type = mapType(types);
-  if (_isLiteral(type)) {
+    IndentableStringBuffer buffer, TypeBase type, String valueCode,
+    {bool allowsNull}) {
+  type = resolveTypeAlias(type);
+
+  if (_isSimpleType(type)) {
     buffer.write("$valueCode");
   } else if (_isSpecType(type)) {
     // Our own types have fromJson() constructors we can call.
-    buffer.write("$valueCode != null ? new $type.fromJson($valueCode) : null");
-  } else if (_isList(type)) {
-    // Lists need to be mapped so we can recursively call (they may need fromJson).
+    buffer.write(
+        "$valueCode != null ? ${type.dartType}.fromJson${type.typeArgsString}($valueCode) : null");
+  } else if (type is ArrayType) {
+    // Lists need to be map()'d so we can recursively call writeFromJsonCode
+    // as they may need fromJson on each element.
     buffer.write("$valueCode?.map((item) => ");
-    final listType = _getListType(type);
-    _writeFromJsonCode(buffer, [listType], 'item');
-    buffer.write(')?.cast<$listType>()?.toList()');
-  } else if (_isUnion(type)) {
-    _writeFromJsonCodeForUnion(buffer, types, valueCode);
+    _writeFromJsonCode(buffer, type.elementType, 'item',
+        allowsNull: allowsNull);
+    buffer
+        .write(')?.cast<${type.elementType.dartTypeWithTypeArgs}>()?.toList()');
+  } else if (type is MapType) {
+    // Maps need to be map()'d so we can recursively call writeFromJsonCode as
+    // they may need fromJson on each key or value.
+    buffer.write('$valueCode?.map((key, value) => new MapEntry(');
+    _writeFromJsonCode(buffer, type.indexType, 'key', allowsNull: allowsNull);
+    buffer.write(', ');
+    _writeFromJsonCode(buffer, type.valueType, 'value', allowsNull: allowsNull);
+    buffer.write(
+        '))?.cast<${type.indexType.dartTypeWithTypeArgs}, ${type.valueType.dartTypeWithTypeArgs}>()');
+  } else if (type is UnionType) {
+    _writeFromJsonCodeForUnion(buffer, type, valueCode, allowsNull: allowsNull);
   } else {
     buffer.write("$valueCode");
   }
 }
 
 void _writeFromJsonCodeForUnion(
-    IndentableStringBuffer buffer, List<String> types, String valueCode) {
-  final unionTypeName = mapType(types);
+    IndentableStringBuffer buffer, UnionType union, String valueCode,
+    {bool allowsNull}) {
   // Write a check against each type, eg.:
   // x is y ? new Either.tx(x) : (...)
   var hasIncompleteCondition = false;
   var unclosedParens = 0;
-  for (var i = 0; i < types.length; i++) {
-    final dartType = mapType([types[i]]);
+  for (var i = 0; i < union.types.length; i++) {
+    final type = union.types[i];
+    final isDynamic = type.dartType == 'dynamic';
 
     // Dynamic matches all type checks, so only emit it if required.
-    if (dartType != 'dynamic') {
-      _writeTypeCheckCondition(buffer, valueCode, dartType);
+    if (!isDynamic) {
+      _writeTypeCheckCondition(buffer, valueCode, type);
       buffer.write(' ? ');
     }
 
     // The code to construct a value with this "side" of the union.
-    buffer.write('new $unionTypeName.t${i + 1}(');
-    _writeFromJsonCode(buffer, [dartType], valueCode); // Call recursively!
+    buffer.write('new ${union.dartTypeWithTypeArgs}.t${i + 1}(');
+    _writeFromJsonCode(buffer, type, valueCode,
+        allowsNull: allowsNull); // Call recursively!
     buffer.write(')');
 
     // If we output the type condition at the top, prepare for the next condition.
-    if (dartType != 'dynamic') {
+    if (!isDynamic) {
       buffer.write(' : (');
       hasIncompleteCondition = true;
       unclosedParens++;
@@ -375,8 +386,12 @@
   // Fill the final parens with a throw because if we fell through all of the
   // cases then the value we had didn't match any of the types in the union.
   if (hasIncompleteCondition) {
+    if (allowsNull) {
+      buffer.write('$valueCode == null ? null : (');
+      unclosedParens++;
+    }
     buffer.write(
-        "throw '''\${$valueCode} was not one of (${types.join(', ')})'''");
+        "throw '''\${$valueCode} was not one of (${union.types.map((t) => t.dartTypeWithTypeArgs).join(', ')})'''");
   }
   buffer.write(')' * unclosedParens);
 }
@@ -384,31 +399,48 @@
 void _writeFromJsonConstructor(
     IndentableStringBuffer buffer, Interface interface) {
   final allFields = _getAllFields(interface);
-  if (allFields.isEmpty) {
-    return;
-  }
   buffer
-    ..writeIndentedln(
-        'factory ${_stripTypeArgs(interface.name)}.fromJson(Map<String, dynamic> json) {')
+    ..writeIndentedln('static ${interface.nameWithTypeArgs} '
+        'fromJson${interface.typeArgsString}(Map<String, dynamic> json) {')
     ..indent();
   for (final field in allFields) {
     buffer.writeIndented('final ${field.name} = ');
-    _writeFromJsonCode(buffer, field.types, "json['${field.name}']");
+    _writeFromJsonCode(buffer, field.type, "json['${field.name}']",
+        allowsNull: field.allowsNull || field.allowsUndefined);
     buffer.writeln(';');
   }
   buffer
-    ..writeIndented('return new ${interface.name}(')
+    ..writeIndented('return new ${interface.nameWithTypeArgs}(')
     ..write(allFields.map((field) => '${field.name}').join(', '))
     ..writeln(');')
     ..outdent()
     ..writeIndented('}');
 }
 
+void _writeHashCode(IndentableStringBuffer buffer, Interface interface) {
+  buffer
+    ..writeIndentedln('@override')
+    ..writeIndentedln('int get hashCode {')
+    ..indent()
+    ..writeIndented('int hash = 0;');
+  for (var field in _getAllFields(interface)) {
+    buffer
+        .write('hash = JenkinsSmiHash.combine(hash, ${field.name}.hashCode);');
+  }
+  buffer
+    ..writeln('return JenkinsSmiHash.finish(hash);')
+    ..outdent()
+    ..writeIndentedln('}');
+}
+
 void _writeInterface(IndentableStringBuffer buffer, Interface interface) {
   _writeDocCommentsAndAnnotations(buffer, interface);
 
-  buffer.writeIndented('class ${interface.name} ');
-  var allBaseTypes = interface.baseTypes.followedBy(['ToJsonable']);
+  buffer.writeIndented('class ${interface.nameWithTypeArgs} ');
+  final allBaseTypes =
+      interface.baseTypes.map((t) => t.dartTypeWithTypeArgs).toList();
+  allBaseTypes.addAll(getSpecialBaseTypes(interface));
+  allBaseTypes.add('ToJsonable');
   if (allBaseTypes.isNotEmpty) {
     buffer.writeIndented('implements ${allBaseTypes.join(', ')} ');
   }
@@ -428,6 +460,9 @@
   buffer.writeln();
   _writeToJsonMethod(buffer, interface);
   _writeCanParseMethod(buffer, interface);
+  _writeEquals(buffer, interface);
+  _writeHashCode(buffer, interface);
+  _writeToString(buffer, interface);
   buffer
     ..outdent()
     ..writeIndentedln('}')
@@ -440,14 +475,10 @@
   // undefined and never explicitly null), we'll only add the value if set.
   if (field.allowsUndefined) {
     buffer
-      ..writeIndentedlnIf(
-          field.isDeprecated, '// ignore: deprecated_member_use')
       ..writeIndentedln('if (${field.name} != null) {')
       ..indent();
   }
-  buffer
-    ..writeIndentedlnIf(field.isDeprecated, '// ignore: deprecated_member_use')
-    ..writeIndented('''$mapName['${field.name}'] = ${field.name}''');
+  buffer..writeIndented('''$mapName['${field.name}'] = ${field.name}''');
   if (!field.allowsUndefined && !field.allowsNull) {
     buffer.write(''' ?? (throw '${field.name} is required but was not set')''');
   }
@@ -473,29 +504,6 @@
   _getSorted(members).forEach((m) => _writeMember(buffer, m));
 }
 
-void _writeNamespace(IndentableStringBuffer buffer, Namespace namespace) {
-  // Namespaces are just groups of constants. For some uses we can write these
-  // as enum classes for extra type safety, but not for all - for example
-  // CodeActionKind can be an arbitrary String even though it also defines
-  // constants for common values. We can tell which can have their own values
-  // because they're marked with type aliases, with the exception of ErrorCodes!
-  if (!_typeAliases.containsKey(namespace.name) &&
-      namespace.name != 'ErrorCodes') {
-    _writeEnumClass(buffer, namespace);
-    return;
-  }
-
-  _writeDocCommentsAndAnnotations(buffer, namespace);
-  buffer
-    ..writeln('abstract class ${namespace.name} {')
-    ..indent();
-  _writeMembers(buffer, namespace.members);
-  buffer
-    ..outdent()
-    ..writeln('}')
-    ..writeln();
-}
-
 void _writeToJsonMethod(IndentableStringBuffer buffer, Interface interface) {
   // It's important the name we use for the map here isn't in use in the object
   // already. 'result' was, so we prefix it with some underscores.
@@ -512,11 +520,17 @@
     ..writeIndentedln('}');
 }
 
-void _writeType(IndentableStringBuffer buffer, ApiItem type) {
+void _writeToString(IndentableStringBuffer buffer, Interface interface) {
+  buffer
+    ..writeIndentedln('@override')
+    ..writeIndentedln('String toString() => jsonEncoder.convert(toJson());');
+}
+
+void _writeType(IndentableStringBuffer buffer, AstNode type) {
   if (type is Interface) {
     _writeInterface(buffer, type);
   } else if (type is Namespace) {
-    _writeNamespace(buffer, type);
+    _writeEnumClass(buffer, type);
   } else if (type is TypeAlias) {
     // For now type aliases are not supported, so are collected at the start
     // of the process in a map, and just replaced with the aliased type during
@@ -528,38 +542,48 @@
 }
 
 void _writeTypeCheckCondition(
-    IndentableStringBuffer buffer, String valueCode, String dartType) {
-  if (dartType == 'dynamic') {
+    IndentableStringBuffer buffer, String valueCode, TypeBase type) {
+  type = resolveTypeAlias(type, resolveEnumClasses: true);
+
+  final resolvedDartType = type.dartTypeWithTypeArgs;
+  if (resolvedDartType == 'dynamic') {
     buffer.write('true');
-  } else if (_isLiteral(dartType)) {
-    buffer.write('$valueCode is $dartType');
-  } else if (_isSpecType(dartType)) {
-    buffer.write('$dartType.canParse($valueCode)');
-  } else if (_isList(dartType)) {
-    final listType = _getListType(dartType);
+  } else if (_isSimpleType(type)) {
+    buffer.write('$valueCode is $resolvedDartType');
+  } else if (_isSpecType(type)) {
+    buffer.write('$resolvedDartType.canParse($valueCode)');
+  } else if (type is ArrayType) {
     buffer.write('($valueCode is List');
-    if (dartType != 'dynamic') {
+    if (resolvedDartType != 'dynamic') {
       // TODO(dantup): If we're happy to assume we never have two lists in a union
       // we could skip this bit.
-      buffer
-          .write(' && ($valueCode.length == 0 || $valueCode.every((item) => ');
-      _writeTypeCheckCondition(buffer, 'item', listType);
+      buffer.write(' && ($valueCode.every((item) => ');
+      _writeTypeCheckCondition(buffer, 'item', type.elementType);
       buffer.write('))');
     }
     buffer.write(')');
-  } else if (_isUnion(dartType)) {
+  } else if (type is MapType) {
+    buffer.write('($valueCode is Map');
+    if (resolvedDartType != 'dynamic') {
+      buffer..write(' && ((')..write('$valueCode.keys.every((item) => ');
+      _writeTypeCheckCondition(buffer, 'item', type.indexType);
+      buffer..write('&& $valueCode.values.every((item) => ');
+      _writeTypeCheckCondition(buffer, 'item', type.valueType);
+      buffer.write(')))');
+    }
+    buffer.write(')');
+  } else if (type is UnionType) {
     // To type check a union, we just recursively check against each of its types.
-    final unionTypes = _getUnionTypes(dartType);
     buffer.write('(');
-    for (var i = 0; i < unionTypes.length; i++) {
+    for (var i = 0; i < type.types.length; i++) {
       if (i != 0) {
         buffer.write(' || ');
       }
-      _writeTypeCheckCondition(buffer, valueCode, mapType([unionTypes[i]]));
+      _writeTypeCheckCondition(buffer, valueCode, type.types[i]);
     }
     buffer.write(')');
   } else {
-    throw 'Unable to type check $valueCode against $dartType';
+    throw 'Unable to type check $valueCode against $resolvedDartType';
   }
 }
 
@@ -582,10 +606,4 @@
     write(_indentString);
     writeln(obj);
   }
-
-  void writeIndentedlnIf(bool condition, Object obj) {
-    if (condition) {
-      writeIndentedln(obj);
-    }
-  }
 }
diff --git a/pkg/analysis_server/tool/lsp_spec/generate_all.dart b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
index caa6aea..8e93a31 100644
--- a/pkg/analysis_server/tool/lsp_spec/generate_all.dart
+++ b/pkg/analysis_server/tool/lsp_spec/generate_all.dart
@@ -11,6 +11,7 @@
 import 'codegen_dart.dart';
 import 'markdown.dart';
 import 'typescript.dart';
+import 'typescript_parser.dart';
 
 main() async {
   final String script = Platform.script.toFilePath();
@@ -20,14 +21,48 @@
   new Directory(outFolder).createSync();
 
   final String spec = await fetchSpec();
-  final List<ApiItem> types = extractAllTypes(extractTypeScriptBlocks(spec));
-  types.addAll(_getSpecialCaseTypes());
+  final List<AstNode> types = extractTypeScriptBlocks(spec)
+      .where(shouldIncludeScriptBlock)
+      .map(parseFile)
+      .expand((f) => f)
+      .where(includeTypeDefinitionInOutput)
+      .toList();
+
+  // Generate an enum for all of the request methods to avoid strings.
+  types.add(extractMethodsEnum(spec));
+
   final String output = generateDartForTypes(types);
 
   new File(path.join(outFolder, 'protocol_generated.dart'))
       .writeAsStringSync(_generatedFileHeader + output);
 }
 
+Namespace extractMethodsEnum(String spec) {
+  Const toConstant(String value) {
+    final comment = new Comment(
+        new Token(TokenType.COMMENT, '''Constant for the '$value' method.'''));
+
+    // Generate a safe name for the member from the string. Those that start with
+    // $/ will have the prefix removed and all slashes should be replaced with
+    // underscores.
+    final safeMemberName = value.replaceAll(r'$/', '').replaceAll('/', '_');
+
+    return new Const(
+      comment,
+      new Token.identifier(safeMemberName),
+      new Type.identifier('string'),
+      new Token(TokenType.STRING, "'$value'"),
+    );
+  }
+
+  final comment = new Comment(new Token(TokenType.COMMENT,
+      'Valid LSP methods known at the time of code generation from the spec.'));
+  final methodConstants = extractMethodNames(spec).map(toConstant).toList();
+
+  return new Namespace(
+      comment, new Token.identifier('Method'), methodConstants);
+}
+
 const _generatedFileHeader = '''
 // 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
@@ -37,9 +72,17 @@
 // To regenerate the file, use the script
 // "pkg/analysis_server/tool/lsp_spec/generate_all.dart".
 
+// ignore_for_file: deprecated_member_use
+// ignore_for_file: unnecessary_brace_in_string_interps
+
 import 'dart:core' hide deprecated;
 import 'dart:core' as core show deprecated;
+import 'dart:convert' show JsonEncoder;
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/protocol/protocol_internal.dart' show listEqual, mapEqual;
+import 'package:analyzer/src/generated/utilities_general.dart';
+
+const jsonEncoder = const JsonEncoder.withIndent('    ');
 
 ''';
 
@@ -51,16 +94,18 @@
   return resp.body;
 }
 
-/// Fabricates types for things that don't parse well from the TS spec,
-/// such as anonymous types:
-///     type MarkedString = string | { language: string; value: string };
-List<ApiItem> _getSpecialCaseTypes() {
-  return [
-    // For MarkedString, we drop the string-only version since we can always
-    // supply a language and it makes the type a little simpler.
-    new Interface('MarkedString', null, [], [
-      new Field('language', null, ['string'], false, false),
-      new Field('value', null, ['string'], false, false)
-    ])
-  ];
+/// Returns whether a script block should be parsed or not.
+bool shouldIncludeScriptBlock(String input) {
+  // We can't parse literal arrays, but this script block is just an example
+  // and not actually referenced anywhere.
+  if (input.trim() == r"export const EOL: string[] = ['\n', '\r\n', '\r'];") {
+    return false;
+  }
+
+  // There are some code blocks that just have example JSON in them.
+  if (input.startsWith('{') && input.endsWith('}')) {
+    return false;
+  }
+
+  return true;
 }
diff --git a/pkg/analysis_server/tool/lsp_spec/markdown.dart b/pkg/analysis_server/tool/lsp_spec/markdown.dart
index ae99df1..7a8e316 100644
--- a/pkg/analysis_server/tool/lsp_spec/markdown.dart
+++ b/pkg/analysis_server/tool/lsp_spec/markdown.dart
@@ -4,6 +4,9 @@
 
 final _typeScriptBlockPattern =
     new RegExp(r'\B```typescript([\S\s]*?)\n```', multiLine: true);
+final _methodNamesPattern = new RegExp(
+    r'''_(?:Notification|Request):?_:?(?:\r?\n)+\* method: '(.*?)'\r?\n''',
+    multiLine: true);
 
 /// Extracts fenced code blocks that are explicitly marked as TypeScript from a
 /// markdown document.
@@ -13,3 +16,10 @@
       .map((m) => m.group(1).trim())
       .toList();
 }
+
+List<String> extractMethodNames(String spec) {
+  return _methodNamesPattern
+      .allMatches(spec)
+      .map((m) => m.group(1).trim())
+      .toList();
+}
diff --git a/pkg/analysis_server/tool/lsp_spec/typescript.dart b/pkg/analysis_server/tool/lsp_spec/typescript.dart
index 017c666..6f70d2b 100644
--- a/pkg/analysis_server/tool/lsp_spec/typescript.dart
+++ b/pkg/analysis_server/tool/lsp_spec/typescript.dart
@@ -2,26 +2,20 @@
 // 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.
 
-// TODO(dantup): Regex seemed like a good choice when parsing the first few...
-// maybe it's not so great now. We should parse this properly if it turns out
-// there are issues with what we have here.
-const String _blockBody = r'\{([\s\S]*?)\s*\n\s*\}';
-const String _comment = r'(?:\/\*\*((?:[\S\s](?!\*\/))+?)\s\*\/)?\s*';
+import 'typescript_parser.dart';
 
-List<ApiItem> extractAllTypes(List<String> code) {
-  return extractTypes(code.join('\n'));
-}
-
-List<ApiItem> extractTypes(String code) {
-  final types = ApiItem.extractFrom(code);
-  _removeUnwantedTypes(types);
-  return types;
-}
-
-String _cleanComment(String comment) {
+String cleanComment(String comment) {
   if (comment == null) {
     return null;
   }
+
+  // Remove the start/end comment markers.
+  if (comment.startsWith('/**') && comment.endsWith('*/')) {
+    comment = comment.substring(3, comment.length - 2);
+  } else if (comment.startsWith('//')) {
+    comment = comment.substring(2);
+  }
+
   final _commentLinePrefixes = new RegExp(r'\n\s*\* ?');
   final _nonConcurrentNewlines = new RegExp(r'\n(?![\n\s\-*])');
   final _newLinesThatRequireReinserting = new RegExp(r'\n (\w)');
@@ -41,10 +35,11 @@
 /// Fixes up some enum types that are not as specific as they could be in the
 /// spec. For example, Diagnostic.severity is typed "number" but can be mapped
 /// to the DiagnosticSeverity enum class.
-String _getImprovedType(String interfaceName, String fieldName) {
+String getImprovedType(String interfaceName, String fieldName) {
   const Map<String, Map<String, String>> _improvedTypeMappings = {
     "Diagnostic": {
       "severity": "DiagnosticSeverity",
+      "code": "String",
     },
     "TextDocumentSyncOptions": {
       "change": "TextDocumentSyncKind",
@@ -61,6 +56,23 @@
     "FoldingRange": {
       "kind": "FoldingRangeKind",
     },
+    "ResponseError": {
+      "code": "ErrorCodes",
+    },
+    "NotificationMessage": {
+      "method": "Method",
+      "params": "object",
+    },
+    "RequestMessage": {
+      "method": "Method",
+      "params": "object",
+    },
+    "SymbolInformation": {
+      "kind": "SymbolKind",
+    },
+    "ParameterInformation": {
+      "label": "String",
+    }
   };
 
   final interface = _improvedTypeMappings[interfaceName];
@@ -68,246 +80,38 @@
   return interface != null ? interface[fieldName] : null;
 }
 
-List<String> _getSpecialBaseClasses(String name) {
-  const fileOperationTypes = [
-    'TextDocumentEdit',
-    'CreateFile',
-    'RenameFile',
-    'DeleteFile'
-  ];
-  if (fileOperationTypes.contains(name)) {
-    return ['FileOperation'];
+List<String> getSpecialBaseTypes(Interface interface) {
+  if (interface.name == 'RequestMessage' ||
+      interface.name == 'NotificationMessage') {
+    return ['IncomingMessage'];
   } else {
     return [];
   }
 }
 
-List<String> _parseTypes(String baseTypes, String sep) {
-  // Special case for a single complicated type we can't parse easily...
-  if (baseTypes ==
-      '(TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[])') {
-    return ['FileOperation[]'];
-  }
-  return baseTypes?.split(sep)?.map((t) => t.trim())?.toList() ?? [];
-}
-
-/// Removes types that are in the spec that we don't want.
-void _removeUnwantedTypes(List<ApiItem> types) {
+/// Removes types that are in the spec that we don't want to emit.
+bool includeTypeDefinitionInOutput(AstNode node) {
   // These types are not used for v3.0 (Feb 2017) and by dropping them we don't
   // have to handle any cases where both a namespace and interfaces are declared
   // with the same name.
-  types.removeWhere((item) => item.name == 'InitializeError');
+  return node.name != 'InitializeError' &&
+      // We don't emit MarkedString because it gets mapped to a simple String
+      // when getting the .dartType for it.
+      // .startsWith() because there are inline types that will be generated.
+      !node.name.startsWith('MarkedString');
 }
 
-/// Base class for Interface, Field, Constant, etc. parsed from the LSP spec.
-abstract class ApiItem {
-  String name, comment;
-  bool isDeprecated;
-  ApiItem(this.name, String comment)
-      : comment = _cleanComment(comment),
-        isDeprecated = comment?.contains('@deprecated') ?? false;
-
-  static List<ApiItem> extractFrom(String code) {
-    List<ApiItem> types = [];
-    types.addAll(Interface.extractFrom(code));
-    types.addAll(Namespace.extractFrom(code));
-    types.addAll(TypeAlias.extractFrom(code));
-    return types;
+/// Removes types that are in the spec that we don't want in other signatures.
+bool allowTypeInSignatures(TypeBase type) {
+  // Don't allow arrays of MarkedStrings, but do allow simple MarkedStrings.
+  // The only place that uses these are Hovers and we only send one value
+  // (to match the MarkupString equiv) so the array just makes the types
+  // unnecessarily complicated.
+  if (type is ArrayType) {
+    final elementType = type.elementType;
+    if (elementType is Type && elementType.name == 'MarkedString') {
+      return false;
+    }
   }
-}
-
-/// A Constant parsed from the LSP spec.
-class Const extends Member {
-  final String type, value;
-  Const(String name, String comment, this.type, this.value)
-      : super(name, comment);
-
-  static List<Const> extractFrom(String code) {
-    final RegExp _constPattern = new RegExp(_comment +
-        r'''(?:export\s+)?const\s+(\w+)(?::\s+([\w\[\]'".-]+?))?\s*=\s*([\w\[\]'".-]+)\s*(?:;|$)''');
-
-    final consts = _constPattern.allMatches(code).map((m) {
-      final String comment = m.group(1);
-      final String name = m.group(2);
-      final String type = m.group(3);
-      final String value = m.group(4);
-      return new Const(name, comment, type, value);
-    }).toList();
-    return consts;
-  }
-
-  static List<Const> extractFromEnumValue(String code) {
-    final RegExp _constPattern =
-        new RegExp(_comment + r'''(\w+)\s*=\s*([\w\[\]'".-]+)\s*(?:,|$)''');
-
-    final consts = _constPattern.allMatches(code).map((m) {
-      final String comment = m.group(1);
-      final String name = m.group(2);
-      final String value = m.group(3);
-      return new Const(name, comment, null, value);
-    }).toList();
-    return consts;
-  }
-}
-
-/// A Field for an Interface parsed from the LSP spec.
-class Field extends Member {
-  final List<String> types;
-  final bool allowsNull, allowsUndefined;
-  Field(String name, String comment, this.types, this.allowsNull,
-      this.allowsUndefined)
-      : super(name, comment);
-
-  static List<Field> extractFrom(String interfaceName, String code) {
-    final RegExp _fieldPattern = new RegExp(_comment +
-        r'([\w\[\]]+\??)\s*:\s*([\w\[\] \|\{\}\(\)<>:;]+)\s*(?:;|$)');
-
-    final fields = _fieldPattern.allMatches(code).where((m) {
-      // Skip over the indexer in FormattingOptions since we don't need this
-      // (for now) and it's complicated to represent.
-      if (m.group(0).contains('[key: string]: boolean | number | string;')) {
-        return false;
-      }
-      return true;
-    }).map((m) {
-      String comment = m.group(1);
-      String name = m.group(2);
-      String typesString = m.group(3).trim();
-      // Our regex may result in semicolons on the end...
-      // TODO(dantup): Fix this, or make a simple parser.
-      if (typesString.endsWith(';')) {
-        typesString = typesString.substring(0, typesString.length - 1);
-      }
-      // Some fields have weird comments like this in the spec:
-      //     {@link MessageType}
-      // These seem to be the correct type of the field, while the field is
-      // marked with number.
-      if (comment != null) {
-        final RegExp _linkTypePattern = new RegExp(r'See \{@link (\w+)\}\.?');
-        final linkTypeMatch = _linkTypePattern.firstMatch(comment);
-        if (linkTypeMatch != null) {
-          typesString = linkTypeMatch.group(1);
-          comment = comment.replaceAll(_linkTypePattern, '');
-        }
-      }
-      List<String> types = _parseTypes(typesString, '|');
-      final bool allowsNull = types.contains('null');
-      if (allowsNull) {
-        types.remove('null');
-      }
-      final bool allowsUndefined = name.endsWith('?');
-      if (allowsUndefined) {
-        name = name.substring(0, name.length - 1);
-      }
-      // Perform simple type improvements for enums values that are typed as
-      // num/string in the spec but are enums.
-      // the spec.
-      if (types.length == 1) {
-        types[0] = _getImprovedType(interfaceName, name) ?? types[0];
-      }
-      return new Field(name, comment, types, allowsNull, allowsUndefined);
-    }).toList();
-    return fields;
-  }
-}
-
-/// An Interface parsed from the LSP spec.
-class Interface extends ApiItem {
-  final List<String> baseTypes;
-  final List<Member> members;
-  Interface(String name, String comment, this.baseTypes, this.members)
-      : super(name, comment);
-
-  static List<Interface> extractFrom(String code) {
-    final RegExp _interfacePattern = new RegExp(_comment +
-        r'(?:export\s+)?(?:interface|class)\s+([\w<>]+)(?:\s+extends\s+([\w, ]+?))?\s*' +
-        _blockBody);
-
-    final interfaces = _interfacePattern.allMatches(code).map((match) {
-      final String comment = match.group(1);
-      final String name = match.group(2);
-      final List<String> baseTypes = _parseTypes(match.group(3), ',');
-      final String body = match.group(4);
-      final List<Member> members = Member.extractFrom(name, body);
-
-      // Add any special base classes we've added to simplify types.
-      baseTypes.addAll(_getSpecialBaseClasses(name));
-
-      return new Interface(name, comment, baseTypes, members);
-    }).toList();
-    return interfaces;
-  }
-}
-
-/// A Field or Constant parsed from the LSP type.
-abstract class Member extends ApiItem {
-  Member(String name, String comment) : super(name, comment);
-
-  static List<Member> extractFrom(String interfaceName, String code) {
-    List<Member> members = [];
-    members.addAll(Field.extractFrom(interfaceName, code));
-    members.addAll(Const.extractFrom(code));
-    return members;
-  }
-}
-
-/// An Enum or Namsepace containing constants parsed from the LSP spec.
-class Namespace extends ApiItem {
-  final List<Member> members;
-  Namespace(String name, String comment, this.members) : super(name, comment);
-
-  static List<Namespace> extractFrom(String code) {
-    final enums = <Namespace>[];
-    enums.addAll(_extractNamespacesFrom(code));
-    enums.addAll(_extractEnumsFrom(code));
-    return enums;
-  }
-
-  static List<Namespace> _extractEnumsFrom(String code) {
-    final RegExp _namespacePattern =
-        new RegExp(_comment + r'(?:export\s+)?enum\s+(\w+)\s*' + _blockBody);
-
-    final namespaces = _namespacePattern.allMatches(code).map((match) {
-      final String comment = match.group(1);
-      final String name = match.group(2);
-      final String body = match.group(3);
-
-      final List<Member> members = Const.extractFromEnumValue(body);
-      return new Namespace(name, comment, members);
-    }).toList();
-    return namespaces;
-  }
-
-  static List<Namespace> _extractNamespacesFrom(String code) {
-    final RegExp _namespacePattern = new RegExp(
-        _comment + r'(?:export\s+)?namespace\s+(\w+)\s*' + _blockBody);
-
-    final namespaces = _namespacePattern.allMatches(code).map((match) {
-      final String comment = match.group(1);
-      final String name = match.group(2);
-      final String body = match.group(3);
-      final List<Member> members = Member.extractFrom(name, body);
-      return new Namespace(name, comment, members);
-    }).toList();
-    return namespaces;
-  }
-}
-
-/// A type alias parsed from the LSP spec.
-class TypeAlias extends ApiItem {
-  final String baseType;
-  TypeAlias(name, comment, this.baseType) : super(name, comment);
-
-  static List<TypeAlias> extractFrom(String code) {
-    final RegExp _typeAliasPattern =
-        new RegExp(_comment + r'type\s+([\w]+)\s+=\s+([\w\[\]]+)\s*;');
-
-    final typeAliases = _typeAliasPattern.allMatches(code).map((match) {
-      final String comment = match.group(1);
-      final String name = match.group(2);
-      final String baseType = match.group(3);
-      return new TypeAlias(name, comment, baseType);
-    }).toList();
-    return typeAliases;
-  }
+  return true;
 }
diff --git a/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart b/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
new file mode 100644
index 0000000..a7c8e4d
--- /dev/null
+++ b/pkg/analysis_server/tool/lsp_spec/typescript_parser.dart
@@ -0,0 +1,922 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:math';
+
+import 'package:analysis_server/src/services/correction/strings.dart'
+    show capitalize;
+
+import 'codegen_dart.dart';
+import 'typescript.dart';
+
+final _validIdentifierCharacters = RegExp('[a-zA-Z0-9_]');
+
+bool isNullType(TypeBase t) => t is Type && t.name == 'null';
+
+bool isUndefinedType(TypeBase t) => t is Type && t.name == 'undefined';
+
+/// A fabricated field name for indexers in case they result in generation
+/// of type names for inline types.
+const fieldNameForIndexer = 'indexer';
+
+List<AstNode> parseFile(String input) {
+  final scanner = new Scanner(input);
+  final tokens = scanner.scan();
+  final parser = new Parser(tokens);
+  return parser.parse();
+}
+
+TypeBase typeOfLiteral(TokenType tokenType) {
+  final typeName = tokenType == TokenType.STRING
+      ? 'string'
+      : tokenType == TokenType.NUMBER
+          ? 'number'
+          : throw 'Unknown literal type $tokenType';
+  return new Type.identifier(typeName);
+}
+
+class ArrayType extends TypeBase {
+  final TypeBase elementType;
+
+  ArrayType(this.elementType);
+
+  @override
+  String get dartType => 'List';
+  @override
+  String get typeArgsString => '<${elementType.dartTypeWithTypeArgs}>';
+}
+
+class MapType extends TypeBase {
+  final TypeBase indexType;
+  final TypeBase valueType;
+
+  MapType(this.indexType, this.valueType);
+
+  @override
+  String get dartType => 'Map';
+  @override
+  String get typeArgsString =>
+      '<${indexType.dartTypeWithTypeArgs}, ${valueType.dartTypeWithTypeArgs}>';
+}
+
+class AstNode {
+  final Comment commentNode;
+  final bool isDeprecated;
+  AstNode(this.commentNode)
+      : isDeprecated = commentNode?.text?.contains('@deprecated') ?? false;
+  String get commentText => commentNode?.text;
+
+  String get name => null;
+}
+
+class Comment extends AstNode {
+  final Token token;
+  final String text;
+
+  Comment(this.token)
+      : text = cleanComment(token.lexeme),
+        super(null);
+}
+
+class Const extends Member {
+  Token nameToken;
+  TypeBase type;
+  Token valueToken;
+  Const(Comment comment, this.nameToken, this.type, this.valueToken)
+      : super(comment);
+  String get name => nameToken.lexeme;
+
+  String get valueAsLiteral {
+    if (type.dartType == 'String') {
+      // Write strings as raw strings, since some have dollars in them (eg. for
+      // LSP method names). valueToken.lexeme already includes the quotes as
+      // read from the spec.
+      return 'r${valueToken.lexeme}';
+    } else {
+      return valueToken.lexeme;
+    }
+  }
+}
+
+class Field extends Member {
+  final Token nameToken;
+  final TypeBase type;
+  final bool allowsNull;
+  final bool allowsUndefined;
+  Field(
+    Comment comment,
+    this.nameToken,
+    this.type,
+    this.allowsNull,
+    this.allowsUndefined,
+  ) : super(comment);
+
+  String get name => nameToken.lexeme;
+}
+
+class FixedValueField extends Field {
+  final Token valueToken;
+  FixedValueField(
+    Comment comment,
+    Token nameToken,
+    this.valueToken,
+    TypeBase type,
+    bool allowsNull,
+    bool allowsUndefined,
+  ) : super(comment, nameToken, type, allowsNull, allowsUndefined);
+}
+
+class InlineInterface extends Interface {
+  InlineInterface(
+    String name,
+    List<Member> members,
+  ) : super(null, new Token.identifier(name), [], [], members);
+}
+
+class Indexer extends Member {
+  final TypeBase indexType;
+  final TypeBase valueType;
+  Indexer(
+    Comment comment,
+    this.indexType,
+    this.valueType,
+  ) : super(comment);
+
+  String get name => fieldNameForIndexer;
+}
+
+class Interface extends AstNode {
+  final Token nameToken;
+  final List<Token> typeArgs;
+  final List<TypeBase> baseTypes;
+  final List<Member> members;
+
+  Interface(
+    Comment comment,
+    this.nameToken,
+    this.typeArgs,
+    this.baseTypes,
+    this.members,
+  ) : super(comment);
+  String get name => nameToken.lexeme;
+  String get nameWithTypeArgs => '$name$typeArgsString';
+
+  String get typeArgsString => typeArgs.isNotEmpty
+      ? '<${typeArgs.map((t) => t.lexeme).join(', ')}>'
+      : '';
+}
+
+class Member extends AstNode {
+  Member(Comment comment) : super(comment);
+}
+
+class Namespace extends AstNode {
+  final Token nameToken;
+  final List<Member> members;
+  Namespace(
+    Comment comment,
+    this.nameToken,
+    this.members,
+  ) : super(comment);
+
+  String get name => nameToken.lexeme;
+}
+
+class Parser {
+  final List<Token> _tokens;
+  int _current = 0;
+  List<AstNode> _nodes;
+  Parser(this._tokens);
+
+  bool get _isAtEnd => _peek().type == TokenType.EOF;
+
+  List<AstNode> parse() {
+    if (_nodes == null) {
+      _nodes = <AstNode>[];
+      while (!_isAtEnd) {
+        _nodes.add(_topLevel());
+      }
+    }
+    return _nodes;
+  }
+
+  /// Returns the current token and moves to the next.
+  Token _advance() => _tokenAt(_current++);
+
+  /// Checks if the next token is [type] without advancing.
+  bool _check(TokenType type) => !_isAtEnd && _peek().type == type;
+
+  Comment _comment() {
+    if (_peek().type != TokenType.COMMENT) {
+      return null;
+    }
+    return Comment(_advance());
+  }
+
+  Const _const(String containerName, Comment leadingComment) {
+    _eatUnwantedKeywords();
+    final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+    TypeBase type;
+    if (_match([TokenType.COLON])) {
+      type = _type(containerName, name.lexeme);
+    }
+    final value = _match([TokenType.EQUAL]) ? _advance() : null;
+
+    if (type == null && value != null) {
+      type = typeOfLiteral(value.type);
+    }
+
+    _consume(TokenType.SEMI_COLON, 'Expected ;');
+    return Const(leadingComment, name, type, value);
+  }
+
+  Indexer _indexer(String containerName, Comment leadingComment) {
+    final indexer = _field(containerName, leadingComment);
+    _consume(TokenType.RIGHT_BRACKET, 'Expected ]');
+    _consume(TokenType.COLON, 'Expected :');
+
+    TypeBase type;
+    type = _type(containerName, fieldNameForIndexer, improveTypes: true);
+
+    //_consume(TokenType.RIGHT_BRACE, 'Expected }');
+    _match([TokenType.SEMI_COLON]);
+
+    return new Indexer(leadingComment, indexer.type, type);
+  }
+
+  /// Ensures the next token is [type] and moves to the next, throwing [message]
+  /// if not.
+  Token _consume(TokenType type, String message) {
+    if (_check(type)) {
+      return _advance();
+    }
+
+    throw '$message\n\n${_peek()}';
+  }
+
+  void _eatUnwantedKeywords() {
+    _match([TokenType.EXPORT_KEYWORD]);
+    _match([TokenType.READONLY_KEYWORD]);
+  }
+
+  Namespace _enum(Comment leadingComment) {
+    final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+    _consume(TokenType.LEFT_BRACE, 'Expected {');
+    final consts = <Const>[];
+    while (!_check(TokenType.RIGHT_BRACE)) {
+      consts.add(_enumValue(name.lexeme));
+      // Commas might not be present (eg. for last one).
+      _match([TokenType.COMMA]);
+    }
+    _consume(TokenType.RIGHT_BRACE, 'Expected }');
+
+    return new Namespace(leadingComment, name, consts);
+  }
+
+  Const _enumValue(String enumName) {
+    final leadingComment = _comment();
+    _eatUnwantedKeywords();
+    final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+    TypeBase type;
+    if (_match([TokenType.COLON])) {
+      type = _type(enumName, name.lexeme);
+    }
+    final value = _match([TokenType.EQUAL]) ? _advance() : null;
+
+    if (type == null && value != null) {
+      type = typeOfLiteral(value.type);
+    }
+    return Const(leadingComment, name, type, value);
+  }
+
+  String _joinNames(String parent, String child) {
+    return '$parent${capitalize(child)}';
+  }
+
+  Field _field(String containerName, Comment leadingComment) {
+    _eatUnwantedKeywords();
+    final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+    var canBeUndefined = _match([TokenType.QUESTION]);
+    var canBeNull = false;
+    _consume(TokenType.COLON, 'Expected :');
+    TypeBase type;
+    Token value;
+    type = _type(containerName, name.lexeme,
+        includeUndefined: canBeUndefined, improveTypes: true);
+
+    // Some fields have weird comments like this in the spec:
+    //     {@link MessageType}
+    // These seem to be the correct type of the field, while the field is
+    // marked with number.
+    final commentText = leadingComment?.text;
+    if (commentText != null) {
+      final RegExp _linkTypePattern = new RegExp(r'See \{@link (\w+)\}\.?');
+      final linkTypeMatch = _linkTypePattern.firstMatch(commentText);
+      if (linkTypeMatch != null) {
+        type = new Type.identifier(linkTypeMatch.group(1));
+        leadingComment = new Comment(new Token(TokenType.COMMENT,
+            '// ' + commentText.replaceAll(_linkTypePattern, '')));
+      }
+    }
+
+    // Ideally this would be _consume(), but there are no semi-colons after the
+    // "inline types" since they're blocks.
+    _match([TokenType.SEMI_COLON]);
+
+    // Special handling for fields that have fixed values.
+    if (value != null) {
+      return new FixedValueField(
+          leadingComment, name, value, type, canBeNull, canBeUndefined);
+    }
+
+    if (type is UnionType) {
+      UnionType union = type;
+      // Since undefined and null can appear in the union type list but we want to
+      // handle it specially in the code generation, we promote them to fields on
+      // the Field.
+      canBeUndefined |= union.types.any(isUndefinedType);
+      canBeNull = union.types.any(isNullType);
+      // Finally, we need to remove them from the union.
+      final remainingTypes = union.types
+          .where((t) => !isNullType(t) && !isUndefinedType(t))
+          .toList();
+
+      // We also remove any types that are deprecated and/or we won't use to
+      // simplify the unions.
+      remainingTypes.removeWhere((t) => !allowTypeInSignatures(t));
+
+      type = remainingTypes.length > 1
+          ? new UnionType(remainingTypes)
+          : remainingTypes.single;
+    }
+    return Field(leadingComment, name, type, canBeNull, canBeUndefined);
+  }
+
+  Interface _interface(Comment leadingComment) {
+    final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+    final typeArgs = <Token>[];
+    if (_match([TokenType.LESS])) {
+      while (true) {
+        typeArgs.add(_consume(TokenType.IDENTIFIER, 'Expected identifier'));
+        if (_check(TokenType.GREATER)) {
+          break;
+        }
+        _consume(TokenType.COMMA, 'Expected , or >');
+      }
+      _consume(TokenType.GREATER, 'Expected >');
+    }
+    final baseTypes = <TypeBase>[];
+    if (_match([TokenType.EXTENDS_KEYWORD])) {
+      while (true) {
+        baseTypes.add(_type(name.lexeme, null));
+        if (_check(TokenType.LEFT_BRACE)) {
+          break;
+        }
+        _consume(TokenType.COMMA, 'Expected , or {');
+      }
+    }
+    _consume(TokenType.LEFT_BRACE, 'Expected {');
+    final members = <Member>[];
+    while (!_check(TokenType.RIGHT_BRACE)) {
+      members.add(_member(name.lexeme));
+    }
+
+    _consume(TokenType.RIGHT_BRACE, 'Expected }');
+
+    return new Interface(leadingComment, name, typeArgs, baseTypes, members);
+  }
+
+  /// Returns [true] an advances if the next token is one of [types], otherwise
+  /// returns [false].
+  bool _match(List<TokenType> types) {
+    for (final type in types) {
+      if (_check(type)) {
+        _advance();
+        return true;
+      }
+    }
+
+    return false;
+  }
+
+  Member _member(String containerName) {
+    final leadingComment = _comment();
+    _eatUnwantedKeywords();
+
+    if (_match([TokenType.CONST_KEYWORD])) {
+      return _const(containerName, leadingComment);
+    } else if (_match([TokenType.LEFT_BRACKET])) {
+      return _indexer(containerName, leadingComment);
+    } else {
+      return _field(containerName, leadingComment);
+    }
+  }
+
+  Namespace _namespace(Comment leadingComment) {
+    final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+    _consume(TokenType.LEFT_BRACE, 'Expected {');
+    final members = <Member>[];
+    while (!_check(TokenType.RIGHT_BRACE)) {
+      members.add(_member(name.lexeme));
+    }
+    _consume(TokenType.RIGHT_BRACE, 'Expected }');
+
+    return new Namespace(leadingComment, name, members);
+  }
+
+  /// Returns the next token without advancing.
+  Token _peek() => _tokenAt(_current);
+
+  Token _tokenAt(int index) =>
+      index < _tokens.length ? _tokens[index] : Token.EOF;
+
+  AstNode _topLevel() {
+    final leadingComment = _comment();
+    _match([TokenType.EXPORT_KEYWORD]);
+
+    final token = _peek();
+    if (_match([TokenType.NAMESPACE_KEYWORD])) {
+      return _namespace(leadingComment);
+    } else if (_match([TokenType.INTERFACE_KEYWORD])) {
+      return _interface(leadingComment);
+    } else if (_match([TokenType.CLASS_KEYWORD])) {
+      // Classes are the same as interfaces in this spec.
+      return _interface(leadingComment);
+    } else if (_match([TokenType.ENUM_KEYWORD])) {
+      return _enum(leadingComment);
+    } else if (token.type == TokenType.IDENTIFIER && token.lexeme == 'type') {
+      // TODO(dantup): This is a hack... We don't have a TYPE_KEYWORD because
+      // the spec has `type` as an identifier.
+      _advance(); // Eat the 'type' keyword.
+      return _typeAlias(leadingComment);
+    } else {
+      throw 'Unexpected token ${_peek()}';
+    }
+  }
+
+  TypeBase _type(
+    String containerName,
+    String fieldName, {
+    bool includeUndefined = false,
+    bool improveTypes = false,
+  }) {
+    var types = <TypeBase>[];
+    if (includeUndefined) {
+      types.add(Type.Undefined);
+    }
+    while (true) {
+      TypeBase type;
+      if (_match([TokenType.LEFT_BRACE])) {
+        // Inline interfaces.
+        final members = <Member>[];
+        while (!_check(TokenType.RIGHT_BRACE)) {
+          members.add(_member(containerName));
+        }
+
+        _consume(TokenType.RIGHT_BRACE, 'Expected }');
+        // Some of the inline interfaces have trailing commas (and some do not!)
+        _match([TokenType.COMMA]);
+
+        // If we have a single member that is an indexer type, we can use a Map.
+        if (members.length == 1 && members.single is Indexer) {
+          Indexer indexer = members.single;
+          type = new MapType(indexer.indexType, indexer.valueType);
+        } else {
+          // Add a synthetic interface to the parsers list of nodes to represent this type.
+          final generatedName = _joinNames(containerName, fieldName);
+          _nodes.add(new InlineInterface(generatedName, members));
+          // Record the type as a simple type that references this interface.
+          type = new Type.identifier(generatedName);
+        }
+      } else if (_match([TokenType.LEFT_PAREN])) {
+        // Some types are in (parens), so we just parse the contents as a nested type.
+        type = _type(containerName, fieldName);
+        _consume(TokenType.RIGHT_PAREN, 'Expected )');
+      } else if (_match([TokenType.STRING])) {
+        // In TS and the spec, literal strings can be types:
+        // export const PlainText: 'plaintext' = 'plaintext';
+        // trace?: 'off' | 'messages' | 'verbose';
+        // the best we can do is use their base type (string).
+        type = Type.identifier('string');
+      } else if (_match([TokenType.NUMBER])) {
+        // In TS and the spec, literal numbers can be types:
+        // export const Invoked: 1 = 1;
+        // the best we can do is use their base type (number).
+        type = Type.identifier('number');
+      } else if (_match([TokenType.LEFT_BRACKET])) {
+        // Tuples will just be converted to List/Array.
+        final tupleElementTypes = <TypeBase>[];
+        while (!_check(TokenType.RIGHT_BRACKET)) {
+          tupleElementTypes.add(_type(containerName, fieldName));
+          // Remove commas in between.
+          _match([TokenType.COMMA]);
+        }
+        _consume(TokenType.RIGHT_BRACKET, 'Expected ]');
+
+        final uniqueTypes = _getUniqueTypes(tupleElementTypes);
+        var tupleType = uniqueTypes.length == 1
+            ? uniqueTypes.single
+            : new UnionType(uniqueTypes);
+        type = new ArrayType(tupleType);
+      } else {
+        var typeName = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+        final typeArgs = <Type>[];
+        if (_match([TokenType.LESS])) {
+          while (true) {
+            typeArgs.add(_type(containerName, fieldName));
+            if (_peek() != TokenType.COMMA) {
+              _consume(TokenType.GREATER, 'Expected >');
+              break;
+            }
+          }
+        }
+
+        type = typeName.lexeme == 'Array'
+            ? new ArrayType(typeArgs.single)
+            : new Type(typeName, typeArgs);
+      }
+      if (_match([TokenType.LEFT_BRACKET])) {
+        _consume(TokenType.RIGHT_BRACKET, 'Expected ]');
+        type = new ArrayType(type);
+      }
+      // TODO(dantup): Handle types like This & That.
+      // For now, map to any.
+      if (_match([TokenType.AMPERSAND])) {
+        while (true) {
+          // Eat as many types/ampersands as we have.
+          _type(containerName, fieldName);
+          if (!_check(TokenType.AMPERSAND)) {
+            break;
+          }
+        }
+        type = Type.Any;
+      }
+
+      types.add(type);
+
+      if (!_match([TokenType.PIPE])) {
+        break;
+      }
+    }
+
+    final uniqueTypes = _getUniqueTypes(types);
+
+    var type = uniqueTypes.length == 1
+        ? uniqueTypes.single
+        : new UnionType(uniqueTypes);
+
+    // Handle improved type mappings for things that aren't very tight in the spec.
+    if (improveTypes) {
+      final improvedTypeName = getImprovedType(containerName, fieldName);
+      if (improvedTypeName != null) {
+        type = new Type.identifier(improvedTypeName);
+      }
+    }
+    return type;
+  }
+
+  /// Remove any duplicate types (for ex. if we map multiple types into dynamic)
+  /// we don't want to end up with `dynamic | dynamic`. Key on dartType to
+  /// ensure we different types that will map down to the same type.
+  List<TypeBase> _getUniqueTypes(List<TypeBase> types) {
+    final uniqueTypes = new Map.fromEntries(
+      types.map((t) => new MapEntry(t.dartTypeWithTypeArgs, t)),
+    ).values.toList();
+    return uniqueTypes;
+  }
+
+  TypeAlias _typeAlias(Comment leadingComment) {
+    final name = _consume(TokenType.IDENTIFIER, 'Expected identifier');
+    _consume(TokenType.EQUAL, 'Expected =');
+    final type = _type(name.lexeme, null);
+    _consume(TokenType.SEMI_COLON, 'Expected ;');
+
+    return new TypeAlias(leadingComment, name, type);
+  }
+}
+
+class Scanner {
+  final String _source;
+  int _startOfToken = 0;
+  int _currentPos = 0;
+  final _tokens = <Token>[];
+  Scanner(this._source);
+
+  bool get _isAtEnd => _currentPos >= _source.length;
+  bool get _isNextAtEnd => _currentPos + 1 >= _source.length;
+
+  List<Token> scan() {
+    while (!_isAtEnd) {
+      _startOfToken = _currentPos;
+      _scanToken();
+    }
+    return _tokens;
+  }
+
+  void _addToken(TokenType type) {
+    final text = _source.substring(_startOfToken, _currentPos);
+    _tokens.add(Token(type, text));
+  }
+
+  String _advance() => _currentPos < _source.length
+      ? _source[_currentPos++]
+      : throw 'Cannot advance past end of source';
+
+  void _identifier() {
+    const keywords = <String, TokenType>{
+      'class': TokenType.CLASS_KEYWORD,
+      'const': TokenType.CONST_KEYWORD,
+      'enum': TokenType.ENUM_KEYWORD,
+      'export': TokenType.EXPORT_KEYWORD,
+      'extends': TokenType.EXTENDS_KEYWORD,
+      'interface': TokenType.INTERFACE_KEYWORD,
+      'namespace': TokenType.NAMESPACE_KEYWORD,
+      'readonly': TokenType.READONLY_KEYWORD,
+    };
+    while (_isAlpha(_peek())) {
+      _advance();
+    }
+
+    final string = _source.substring(_startOfToken, _currentPos);
+    if (keywords.containsKey(string)) {
+      _addToken(keywords[string]);
+    } else {
+      _addToken(TokenType.IDENTIFIER);
+    }
+  }
+
+  bool _isAlpha(String s) => _validIdentifierCharacters.hasMatch(s);
+
+  bool _isDigit(String s) => s != null && (s.codeUnitAt(0) ^ 0x30) <= 9;
+
+  bool _match(String expected) {
+    if (_isAtEnd || _source[_currentPos] != expected) {
+      return false;
+    }
+    _currentPos++;
+    return true;
+  }
+
+  void _number() {
+    // Optionally process a negative.
+    _match('-');
+    while (_isDigit(_peek())) {
+      _advance();
+    }
+
+    // Handle fractional parts.
+    if (_peek() == '.' && _isDigit(_peekNext())) {
+      // Consume the decimal point.
+      _advance();
+
+      while (_isDigit(_peek())) {
+        _advance();
+      }
+    }
+
+    _addToken(TokenType.NUMBER);
+  }
+
+  String _peek() => _isAtEnd ? null : _source[_currentPos];
+
+  String _peekNext() => _isNextAtEnd ? null : _source[_currentPos + 1];
+
+  void _scanToken() {
+    const singleCharTokens = <String, TokenType>{
+      ',': TokenType.COMMA,
+      ';': TokenType.SEMI_COLON,
+      ':': TokenType.COLON,
+      '?': TokenType.QUESTION,
+      '.': TokenType.DOT,
+      '(': TokenType.LEFT_PAREN,
+      ')': TokenType.RIGHT_PAREN,
+      '[': TokenType.LEFT_BRACKET,
+      ']': TokenType.RIGHT_BRACKET,
+      '{': TokenType.LEFT_BRACE,
+      '}': TokenType.RIGHT_BRACE,
+      '*': TokenType.STAR,
+      '&': TokenType.AMPERSAND,
+      '=': TokenType.EQUAL,
+      '|': TokenType.PIPE,
+    };
+
+    final c = _advance();
+    if (singleCharTokens.containsKey(c)) {
+      _addToken(singleCharTokens[c]);
+      return;
+    }
+    switch (c) {
+      case '/':
+        if (_match('*')) {
+          // Block comment.
+          while (!_isAtEnd && (_peek() != '*' || _peekNext() != '/')) {
+            _advance();
+          }
+          // Eat the closing comment markers detected above.
+          if (!_isAtEnd) {
+            _advance();
+            _advance();
+          }
+          _addToken(TokenType.COMMENT);
+        } else if (_match('/')) {
+          // Single line comment.
+          while (_peek() != '\n' && !_isAtEnd) {
+            _advance();
+          }
+          _addToken(TokenType.COMMENT);
+        } else {
+          _addToken(TokenType.SLASH);
+        }
+        break;
+      case '<':
+        _addToken(_match('=') ? TokenType.LESS_EQUAL : TokenType.LESS);
+        break;
+      case '>':
+        _addToken(_match('=') ? TokenType.GREATER_EQUAL : TokenType.GREATER);
+        break;
+      case ' ':
+      case '\r':
+      case '\n':
+      case '\t':
+        // Whitespace.
+        break;
+      case '"':
+      case "'":
+        _string(c);
+        break;
+      default:
+        if (_isDigit(c) || c == '-' && _isDigit(_peek())) {
+          _number();
+        } else if (_isAlpha(c)) {
+          _identifier();
+        } else {
+          final start = max(0, _currentPos - 20);
+          final end = min(_currentPos + 20, _source.length);
+          final snippet = _source.substring(start, end);
+          throw "Unexpected character '$c'.\n\n$snippet";
+        }
+        break;
+    }
+  }
+
+  void _string(String terminator) {
+    // TODO(dantup): Handle escape sequences, inc. quotes.
+    while (!_isAtEnd && _peek() != terminator) {
+      _advance();
+
+      if (_isAtEnd) {
+        throw 'Unterminated string.';
+      }
+    }
+
+    // Skip over the closing terminator.
+    _advance();
+
+    _addToken(TokenType.STRING);
+  }
+}
+
+class Token {
+  static final Token EOF = new Token(TokenType.EOF, '');
+
+  final TokenType type;
+  final String lexeme;
+
+  Token(this.type, this.lexeme);
+
+  Token.identifier(String identifier) : this(TokenType.IDENTIFIER, identifier);
+
+  @override
+  String toString() => '${type.toString().padRight(25)} '
+      '${lexeme.padRight(10)}\n';
+}
+
+enum TokenType {
+  AMPERSAND,
+  CLASS_KEYWORD,
+  COLON,
+  COMMA,
+  COMMENT,
+  CONST_KEYWORD,
+  DOT,
+  ENUM_KEYWORD,
+  EOF,
+  EQUAL,
+  EXPORT_KEYWORD,
+  EXTENDS_KEYWORD,
+  GREATER_EQUAL,
+  GREATER,
+  IDENTIFIER,
+  INTERFACE_KEYWORD,
+  LEFT_BRACE,
+  LEFT_BRACKET,
+  LEFT_PAREN,
+  LESS_EQUAL,
+  LESS,
+  NAMESPACE_KEYWORD,
+  NUMBER,
+  PIPE,
+  QUESTION,
+  READONLY_KEYWORD,
+  RIGHT_BRACE,
+  RIGHT_BRACKET,
+  RIGHT_PAREN,
+  SEMI_COLON,
+  SLASH,
+  STAR,
+  STRING,
+}
+
+class Type extends TypeBase {
+  static final TypeBase Undefined = new Type.identifier('undefined');
+  static final TypeBase Any = new Type.identifier('any');
+  final Token nameToken;
+  final List<TypeBase> typeArgs;
+
+  Type(this.nameToken, this.typeArgs) {
+    if (this.name == 'Array' || this.name.endsWith('[]')) {
+      throw 'Type should not be used for arrays, use ArrayType instead';
+    }
+  }
+
+  Type.identifier(String identifier)
+      : this(new Token.identifier(identifier), []);
+
+  @override
+  String get dartType {
+    // Always resolve type aliases when asked for our Dart type.
+    final resolvedType = resolveTypeAlias(this);
+    if (resolvedType != this) {
+      return resolvedType.dartType;
+    }
+
+    const mapping = <String, String>{
+      'boolean': 'bool',
+      'string': 'String',
+      'number': 'num',
+      'any': 'dynamic',
+      'object': 'dynamic',
+      // Simplify MarkedString from
+      //     string | { language: string; value: string }
+      // to just String
+      'MarkedString': 'String'
+    };
+
+    final typeName = mapping[name] ?? name;
+    return typeName;
+  }
+
+  String get name => nameToken.lexeme;
+
+  @override
+  String get typeArgsString {
+    // Always resolve type aliases when asked for our Dart type.
+    final resolvedType = resolveTypeAlias(this);
+    if (resolvedType != this) {
+      return resolvedType.typeArgsString;
+    }
+
+    return typeArgs.isNotEmpty
+        ? '<${typeArgs.map((t) => t.dartTypeWithTypeArgs).join(', ')}>'
+        : '';
+  }
+}
+
+class TypeAlias extends AstNode {
+  final Token nameToken;
+  final TypeBase baseType;
+  TypeAlias(
+    Comment comment,
+    this.nameToken,
+    this.baseType,
+  ) : super(comment);
+
+  String get name => nameToken.lexeme;
+}
+
+abstract class TypeBase {
+  String get dartType;
+  String get dartTypeWithTypeArgs => '$dartType$typeArgsString';
+  String get typeArgsString;
+}
+
+class UnionType extends TypeBase {
+  final List<TypeBase> types;
+
+  UnionType(this.types);
+
+  @override
+  String get dartType {
+    if (types.length > 4) {
+      throw 'Unions of more than 4 types are not supported.';
+    }
+    return 'Either${types.length}';
+  }
+
+  @override
+  String get typeArgsString {
+    final typeArgs = types.map((t) => t.dartTypeWithTypeArgs).join(', ');
+    return '<$typeArgs>';
+  }
+}
diff --git a/pkg/analysis_server/tool/spec/codegen_analysis_server.dart b/pkg/analysis_server/tool/spec/codegen_analysis_server.dart
index 2e6969e..b713e60 100644
--- a/pkg/analysis_server/tool/spec/codegen_analysis_server.dart
+++ b/pkg/analysis_server/tool/spec/codegen_analysis_server.dart
@@ -71,6 +71,59 @@
       });
 
       //
+      // addRequestListener(..)
+      //
+      publicMethod('addRequestListener', () {
+        writeln('''/**
+ * Add the given listener to the list of listeners that will receive notification when
+   * requests are made by an analysis server client.
+ * 
+ * @param listener the listener to be added
+ */''');
+        writeln('public void addRequestListener(RequestListener listener);');
+      });
+
+      //
+      // removeRequestListener(..)
+      //
+      publicMethod('removeRequestListener', () {
+        writeln('''/**
+ * Remove the given listener from the list of listeners that will receive notification when
+   * requests are made by an analysis server client.
+ * 
+ * @param listener the listener to be removed
+ */''');
+        writeln('public void removeRequestListener(RequestListener listener);');
+      });
+
+      //
+      // addResponseListener(..)
+      //
+      publicMethod('addResponseListener', () {
+        writeln('''/**
+ * Add the given listener to the list of listeners that will receive notification when
+ * responses are received by an analysis server client.
+ * 
+ * @param listener the listener to be added
+ */''');
+        writeln('public void addResponseListener(ResponseListener listener);');
+      });
+
+      //
+      // removeResponseListener(..)
+      //
+      publicMethod('removeResponseListener', () {
+        writeln('''/**
+ * Remove the given listener from the list of listeners that will receive notification when
+   * responses are received by an analysis server client.
+ * 
+ * @param listener the listener to be removed
+ */''');
+        writeln(
+            'public void removeResponseListener(ResponseListener listener);');
+      });
+
+      //
       // addStatusListener(..)
       //
       publicMethod('addStatusListener', () {
diff --git a/pkg/analysis_server/tool/spec/generate_files b/pkg/analysis_server/tool/spec/generate_files
index 0651cb2..01ea5593 100755
--- a/pkg/analysis_server/tool/spec/generate_files
+++ b/pkg/analysis_server/tool/spec/generate_files
@@ -32,13 +32,7 @@
 
 ROOT_DIR="$(cd "${SCRIPT_DIR}/../../../.." ; pwd -P)"
 
-if [[ $1 == '--arch' && $2 == 'x64' ]];
-then
-  DART_CONFIGURATION="ReleaseX64"
-elif [ -z "$DART_CONFIGURATION" ];
-then
-  DART_CONFIGURATION="ReleaseIA32"
-fi
+DART_CONFIGURATION="ReleaseX64"
 
 if [[ `uname` == 'Darwin' ]];
 then
diff --git a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
index ae85d07..45f18a6 100644
--- a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
+++ b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
@@ -31,6 +31,22 @@
   public void addAnalysisServerListener(AnalysisServerListener listener);
 
   /**
+   * Add the given listener to the list of listeners that will receive notification when
+     * requests are made by an analysis server client.
+   *
+   * @param listener the listener to be added
+   */
+  public void addRequestListener(RequestListener listener);
+
+  /**
+   * Add the given listener to the list of listeners that will receive notification when
+   * responses are received by an analysis server client.
+   *
+   * @param listener the listener to be added
+   */
+  public void addResponseListener(ResponseListener listener);
+
+  /**
    * Add the given listener to the list of listeners that will receive notification when the server
    * is not active
    *
@@ -167,18 +183,10 @@
   /**
    * {@code analysis.reanalyze}
    *
-   * Force the re-analysis of everything contained in the specified analysis roots. This will cause
-   * all previously computed analysis results to be discarded and recomputed, and will cause all
-   * subscribed notifications to be re-sent.
-   *
-   * If no analysis roots are provided, then all current analysis roots will be re-analyzed. If an
-   * empty list of analysis roots is provided, then nothing will be re-analyzed. If the list contains
-   * one or more paths that are not currently analysis roots, then an error of type
-   * INVALID_ANALYSIS_ROOT will be generated.
-   *
-   * @param roots A list of the analysis roots that are to be re-analyzed.
+   * Force re-reading of all potentially changed files, re-resolving of all referenced URIs, and
+   * corresponding re-analysis of everything affected in the current analysis roots.
    */
-  public void analysis_reanalyze(List<String> roots);
+  public void analysis_reanalyze();
 
   /**
    * {@code analysis.setAnalysisRoots}
@@ -757,6 +765,22 @@
   public void removeAnalysisServerListener(AnalysisServerListener listener);
 
   /**
+   * Remove the given listener from the list of listeners that will receive notification when
+     * requests are made by an analysis server client.
+   *
+   * @param listener the listener to be removed
+   */
+  public void removeRequestListener(RequestListener listener);
+
+  /**
+   * Remove the given listener from the list of listeners that will receive notification when
+     * responses are received by an analysis server client.
+   *
+   * @param listener the listener to be removed
+   */
+  public void removeResponseListener(ResponseListener listener);
+
+  /**
    * {@code search.findElementReferences}
    *
    * Perform a search for references to the element defined or referenced at the given offset in the
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 2f66a93..0266e7c 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -715,28 +715,10 @@
   </request>
   <request method="reanalyze">
     <p>
-      Force the re-analysis of everything contained in the specified
-      analysis roots. This will cause all previously computed analysis
-      results to be discarded and recomputed, and will cause all subscribed
-      notifications to be re-sent.
+      Force re-reading of all potentially changed files, re-resolving of all
+      referenced URIs, and corresponding re-analysis of everything affected in
+      the current analysis roots.
     </p>
-    <p>
-      If no analysis roots are provided, then all current analysis roots
-      will be re-analyzed. If an empty list of analysis roots is provided,
-      then nothing will be re-analyzed. If the list contains one or more
-      paths that are not currently analysis roots, then an error of type
-      <tt>INVALID_ANALYSIS_ROOT</tt> will be generated.
-    </p>
-    <params>
-      <field name="roots" optional="true">
-        <list>
-          <ref>FilePath</ref>
-        </list>
-        <p>
-          A list of the analysis roots that are to be re-analyzed.
-        </p>
-      </field>
-    </params>
   </request>
   <request method="setAnalysisRoots">
     <p>
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index a6b897b..a2c1b37 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -161,7 +161,7 @@
 /**
  * Helper methods for creating HTML elements.
  */
-abstract class HtmlMixin {
+mixin HtmlMixin {
   void anchor(String id, void callback()) {
     element('a', {'name': id}, callback);
   }
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
index 38d52a9..15c626a 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
@@ -72,7 +72,6 @@
 const String ANALYSIS_REQUEST_GET_SIGNATURE_FILE = 'file';
 const String ANALYSIS_REQUEST_GET_SIGNATURE_OFFSET = 'offset';
 const String ANALYSIS_REQUEST_REANALYZE = 'analysis.reanalyze';
-const String ANALYSIS_REQUEST_REANALYZE_ROOTS = 'roots';
 const String ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS = 'analysis.setAnalysisRoots';
 const String ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_EXCLUDED = 'excluded';
 const String ANALYSIS_REQUEST_SET_ANALYSIS_ROOTS_INCLUDED = 'included';
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
index 9fabb4c..bea5464 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
@@ -3495,83 +3495,28 @@
 /**
  * analysis.reanalyze params
  *
- * {
- *   "roots": optional List<FilePath>
- * }
- *
  * Clients may not extend, implement or mix-in this class.
  */
 class AnalysisReanalyzeParams implements RequestParams {
-  List<String> _roots;
-
-  /**
-   * A list of the analysis roots that are to be re-analyzed.
-   */
-  List<String> get roots => _roots;
-
-  /**
-   * A list of the analysis roots that are to be re-analyzed.
-   */
-  void set roots(List<String> value) {
-    this._roots = value;
-  }
-
-  AnalysisReanalyzeParams({List<String> roots}) {
-    this.roots = roots;
-  }
-
-  factory AnalysisReanalyzeParams.fromJson(
-      JsonDecoder jsonDecoder, String jsonPath, Object json) {
-    if (json == null) {
-      json = {};
-    }
-    if (json is Map) {
-      List<String> roots;
-      if (json.containsKey("roots")) {
-        roots = jsonDecoder.decodeList(
-            jsonPath + ".roots", json["roots"], jsonDecoder.decodeString);
-      }
-      return new AnalysisReanalyzeParams(roots: roots);
-    } else {
-      throw jsonDecoder.mismatch(jsonPath, "analysis.reanalyze params", json);
-    }
-  }
-
-  factory AnalysisReanalyzeParams.fromRequest(Request request) {
-    return new AnalysisReanalyzeParams.fromJson(
-        new RequestDecoder(request), "params", request.params);
-  }
-
   @override
-  Map<String, dynamic> toJson() {
-    Map<String, dynamic> result = {};
-    if (roots != null) {
-      result["roots"] = roots;
-    }
-    return result;
-  }
+  Map<String, dynamic> toJson() => <String, dynamic>{};
 
   @override
   Request toRequest(String id) {
-    return new Request(id, "analysis.reanalyze", toJson());
+    return new Request(id, "analysis.reanalyze", null);
   }
 
   @override
-  String toString() => json.encode(toJson());
-
-  @override
   bool operator ==(other) {
     if (other is AnalysisReanalyzeParams) {
-      return listEqual(roots, other.roots, (String a, String b) => a == b);
+      return true;
     }
     return false;
   }
 
   @override
   int get hashCode {
-    int hash = 0;
-    hash = JenkinsSmiHash.combine(hash, roots.hashCode);
-    return JenkinsSmiHash.finish(hash);
+    return 613039876;
   }
 }
 
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index 1d0af63..5a574ca 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,4 +1,39 @@
-## 0.33.6+1-dev
+## 0.34.2
+* Removed support for the `@checked` annotation.  Please use the `covariant`
+  keyword instead.
+
+## 0.34.1
+* Added logic to report a hint if a deprecated lint is specified in the user's
+  analysis_options.yaml file, or if a lint is specified twice.
+* Added a note to the `UriResolver` documentation alerting clients of an
+  upcoming breaking change.
+* Improved parser recovery.
+* Speculative work on fine-grained dependency tracking (not yet enabled).
+* Initial support for new language features set_literals and
+  constant_update_2018.
+* Early speculative work on non-nullable types.
+* Added AnalysisDriver.resetUriResolution().
+* Deprecated TypeSystem.isStrong.
+* Added WorkspacePackage classes, for determining whether two files are in the
+  "same package."
+* Added a public API for the TypeSystem class.
+* Bug fixes: #33946, #35151, #35223, #35241, #35438.
+
+## 0.34.0
+* Support for `declarations-casts` has been removed and the `implicit-casts`
+  option now has the combined semantics of both options. This means that users
+  that disable `implicit-casts` might now see errors that were not previously
+  being reported.
+* Minor changes to the AnalysisSession and AnalysisDriver APIs to make it easier
+  for clients to transition away from using the task model.
+* Minor changes to the linter API to make it easier for lint rules to define
+  their own lint codes.
+* Add a version of getAncestor that matches by type without a closure.
+* Add an AST structure for set literals.
+* Bug fixes: #35162, #35230, #34733, #34741, #33553, #35090, #32815, #34387,
+  #34495, #35043, #33553, #34906, #34489.
+
+## 0.33.6+1
 * Added a note to the `UriResolver` documentation alerting clients of an
   upcoming breaking change.
 
diff --git a/pkg/analyzer/README.md b/pkg/analyzer/README.md
index 0b2f682..d633684 100644
--- a/pkg/analyzer/README.md
+++ b/pkg/analyzer/README.md
@@ -4,7 +4,7 @@
 of Dart code. It is useful for tool
 integration and embedding.
 
-End-users should use the [dartanalyzer][analyzercli] command-line tool
+End-users should use the [dartanalyzer][] command-line tool
 to analyze their Dart code.
 
 Integrators that want to add Dart support to their editor
@@ -96,9 +96,9 @@
 See the [LICENSE] file.
 
 [serverapi]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html
-[analyzercli]: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli
+[dartanalyzer]: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_cli#dartanalyzer
 [list]: https://groups.google.com/a/dartlang.org/forum/#!forum/analyzer-discuss
-[lintrules]: http://dart-lang.github.io/linter/lints/
+[lintrules]: https://dart-lang.github.io/linter/lints/
 [glob]: https://pub.dartlang.org/packages/glob
 [LICENSE]: https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/LICENSE
 [dartfmt]: https://github.com/dart-lang/dart_style
diff --git a/pkg/analyzer/benchmark/errors_in_all_libraries.dart b/pkg/analyzer/benchmark/errors_in_all_libraries.dart
deleted file mode 100644
index e2540fb..0000000
--- a/pkg/analyzer/benchmark/errors_in_all_libraries.dart
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Resolves this library and everything it transitively imports and generates
-/// errors in all of those libraries. Does this in an infinite loop, starting
-/// from scratch each time, to show how VM warm-up affects things and to make
-/// it easier to connect to this with observatory.
-import 'dart:io';
-
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/context/builder.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:analyzer/src/source/source_resource.dart';
-import 'package:path/path.dart' as p;
-
-void main(List<String> args) {
-  // Assumes you have run "pub get" in the analyzer directory itself and uses
-  // that "packages" directory as its package root.
-  var packageRoot =
-      p.normalize(p.join(p.dirname(p.fromUri(Platform.script)), "packages"));
-
-  var best = new Duration(days: 1);
-  while (true) {
-    var start = new DateTime.now();
-    AnalysisEngine.instance.clearCaches();
-
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.strongModeHints = true;
-
-    PhysicalResourceProvider resourceProvider =
-        PhysicalResourceProvider.INSTANCE;
-    FolderBasedDartSdk sdk = new FolderBasedDartSdk(
-        resourceProvider, resourceProvider.getFolder(args[0]));
-    sdk.analysisOptions = options;
-
-    ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
-    AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
-    context.sourceFactory = new SourceFactory([
-      new DartUriResolver(sdk),
-      new ResourceUriResolver(resourceProvider),
-      new PackageMapUriResolver(resourceProvider,
-          builder.convertPackagesToMap(builder.createPackageMap(packageRoot)))
-    ]);
-    context.analysisOptions = options;
-
-    var mainSource =
-        new FileSource(resourceProvider.getFile(p.fromUri(Platform.script)));
-    context.applyChanges(new ChangeSet()..addedSource(mainSource));
-
-    var initialLibrary =
-        context.resolveCompilationUnit2(mainSource, mainSource);
-
-    // Walk all of the transitively referenced libraries and compute errors.
-    var errorCount = 0;
-    var allLibraries = _reachableLibraries(
-        resolutionMap.elementDeclaredByCompilationUnit(initialLibrary).library);
-    for (var lib in allLibraries) {
-      for (var unit in lib.units) {
-        var source = unit.source;
-
-        // Skip core libraries.
-        if (source.uri.scheme == 'dart') continue;
-
-        var librarySource = context.getLibrariesContaining(source).single;
-        context.resolveCompilationUnit2(source, librarySource);
-        errorCount += context.computeErrors(source).length;
-      }
-    }
-
-    var elapsed = new DateTime.now().difference(start);
-    print("$elapsed : $errorCount errors ${elapsed < best ? "(best)" : ""}");
-    if (elapsed < best) best = elapsed;
-  }
-}
-
-/// Returns all libraries transitively imported or exported from [start].
-List<LibraryElement> _reachableLibraries(LibraryElement start) {
-  var results = <LibraryElement>[];
-  var seen = new Set();
-  void find(LibraryElement lib) {
-    if (seen.contains(lib)) return;
-    seen.add(lib);
-    results.add(lib);
-    lib.importedLibraries.forEach(find);
-    lib.exportedLibraries.forEach(find);
-  }
-
-  find(start);
-  return results;
-}
diff --git a/pkg/analyzer/example/parser_driver.dart b/pkg/analyzer/example/parser_driver.dart
deleted file mode 100644
index 6515b34..0000000
--- a/pkg/analyzer/example/parser_driver.dart
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/dart/scanner/reader.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/parser.dart';
-
-main(List<String> args) {
-  print('working dir ${new File('.').resolveSymbolicLinksSync()}');
-
-  if (args.length == 0) {
-    print('Usage: parser_driver [files_to_parse]');
-    exit(0);
-  }
-
-  for (var arg in args) {
-    _parse(new File(arg));
-  }
-}
-
-_parse(File file) {
-  var src = file.readAsStringSync();
-  PhysicalResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
-  var source = resourceProvider.getFile(file.path).createSource();
-  var errorListener = new _ErrorCollector();
-  var reader = new CharSequenceReader(src);
-  var scanner = new Scanner(source, reader, errorListener);
-  var token = scanner.tokenize();
-  var parser = new Parser(source, errorListener);
-  var unit = parser.parseCompilationUnit(token);
-
-  var visitor = new _ASTVisitor();
-  unit.accept(visitor);
-
-  for (var error in errorListener.errors) {
-    print(error);
-  }
-}
-
-class _ASTVisitor extends GeneralizingAstVisitor {
-  @override
-  visitNode(AstNode node) {
-    print('${node.runtimeType} : <"$node">');
-    return super.visitNode(node);
-  }
-}
-
-class _ErrorCollector extends AnalysisErrorListener {
-  List<AnalysisError> errors;
-  _ErrorCollector() : errors = new List<AnalysisError>();
-  @override
-  onError(error) => errors.add(error);
-}
diff --git a/pkg/analyzer/example/resolver_driver.dart b/pkg/analyzer/example/resolver_driver.dart
deleted file mode 100755
index 6c972a8..0000000
--- a/pkg/analyzer/example/resolver_driver.dart
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/context/builder.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:analyzer/src/source/source_resource.dart';
-
-void main(List<String> args) {
-  print('working dir ${new File('.').resolveSymbolicLinksSync()}');
-
-  if (args.length < 2 || args.length > 3) {
-    print(_usage);
-    exit(0);
-  }
-
-  String packageRoot;
-  if (args.length == 3) {
-    packageRoot = args[2];
-  }
-
-  PhysicalResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
-  DartSdk sdk = new FolderBasedDartSdk(
-      resourceProvider, resourceProvider.getFolder(args[0]));
-
-  var resolvers = [
-    new DartUriResolver(sdk),
-    new ResourceUriResolver(resourceProvider)
-  ];
-
-  if (packageRoot != null) {
-    ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
-    resolvers.add(new PackageMapUriResolver(resourceProvider,
-        builder.convertPackagesToMap(builder.createPackageMap(packageRoot))));
-  }
-
-  AnalysisContext context = AnalysisEngine.instance.createAnalysisContext()
-    ..sourceFactory = new SourceFactory(resolvers);
-
-  Source source = new FileSource(resourceProvider.getFile(args[1]));
-  ChangeSet changeSet = new ChangeSet()..addedSource(source);
-  context.applyChanges(changeSet);
-  LibraryElement libElement = context.computeLibraryElement(source);
-  print("libElement: $libElement");
-
-  CompilationUnit resolvedUnit =
-      context.resolveCompilationUnit(source, libElement);
-  var visitor = new _ASTVisitor();
-  resolvedUnit.accept(visitor);
-}
-
-const _usage =
-    'Usage: resolve_driver <path_to_sdk> <file_to_resolve> [<packages_root>]';
-
-class _ASTVisitor extends GeneralizingAstVisitor {
-  @override
-  visitNode(AstNode node) {
-    var lines = <String>['${node.runtimeType} : <"$node">'];
-    if (node is SimpleIdentifier) {
-      Element element = node.staticElement;
-      if (element != null) {
-        lines.add('  element: ${element.runtimeType}');
-        LibraryElement library = element.library;
-        if (library != null) {
-          var fullName =
-              element.library.definingCompilationUnit.source.fullName;
-          lines.add("  from $fullName");
-        }
-      }
-    }
-    print(lines.join('\n'));
-    return super.visitNode(node);
-  }
-}
diff --git a/pkg/analyzer/example/scanner_driver.dart b/pkg/analyzer/example/scanner_driver.dart
deleted file mode 100644
index 22a4e0f..0000000
--- a/pkg/analyzer/example/scanner_driver.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/dart/scanner/reader.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
-
-main(List<String> args) {
-  print('working dir ${new File('.').resolveSymbolicLinksSync()}');
-
-  if (args.length == 0) {
-    print('Usage: scanner_driver [files_to_scan]');
-    exit(0);
-  }
-
-  for (var arg in args) {
-    _scan(new File(arg));
-  }
-}
-
-_scan(File file) {
-  var src = file.readAsStringSync();
-  PhysicalResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
-  var source = resourceProvider.getFile(file.path).createSource();
-  var reader = new CharSequenceReader(src);
-  var listener = new BooleanErrorListener();
-  var scanner = new Scanner(source, reader, listener);
-  var token = scanner.tokenize();
-  while (token.type != TokenType.EOF) {
-    print(token);
-    token = token.next;
-  }
-  if (listener.errorReported) {
-    print('Errors found.');
-    exit(1);
-  }
-}
diff --git a/pkg/analyzer/lib/analyzer.dart b/pkg/analyzer/lib/analyzer.dart
index ab46a8d..3516414 100644
--- a/pkg/analyzer/lib/analyzer.dart
+++ b/pkg/analyzer/lib/analyzer.dart
@@ -2,6 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@deprecated
+library analyzer;
+
 import 'dart:io';
 
 import 'package:analyzer/dart/ast/ast.dart';
diff --git a/pkg/analyzer/lib/dart/analysis/context_builder.dart b/pkg/analyzer/lib/dart/analysis/context_builder.dart
index 69ef376..f99dce5 100644
--- a/pkg/analyzer/lib/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_builder.dart
@@ -30,13 +30,22 @@
    * the the variable names found in `fromEnvironment` invocations to the
    * constant value that will be returned. If none is given, then no variables
    * will be defined.
+   * 
+   * If a list of [librarySummaryPaths] is provided, then the summary files at
+   * those paths will be used, when possible, when analyzing the libraries
+   * contained in the summary files.
    *
    * If an [sdkPath] is provided, and if it is a valid path to a directory
    * containing a valid SDK, then the SDK in the referenced directory will be
    * used when analyzing the code in the context.
+   * 
+   * If an [sdkSummaryPath] is provided, then that file will be used as the
+   * summary file for the SDK.
    */
   AnalysisContext createContext(
       {@required ContextRoot contextRoot,
       DeclaredVariables declaredVariables,
-      String sdkPath});
+      List<String> librarySummaryPaths,
+      String sdkPath,
+      String sdkSummaryPath});
 }
diff --git a/pkg/analyzer/lib/dart/analysis/results.dart b/pkg/analyzer/lib/dart/analysis/results.dart
index 2c33745..55defb7 100644
--- a/pkg/analyzer/lib/dart/analysis/results.dart
+++ b/pkg/analyzer/lib/dart/analysis/results.dart
@@ -9,43 +9,29 @@
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 
-/**
- * The result of performing some kind of analysis on a single file. Every result
- * that implements this interface will also implement a sub-interface.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The result of performing some kind of analysis on a single file. Every
+/// result that implements this interface will also implement a sub-interface.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class AnalysisResult {
-  /**
-   * The absolute and normalized path of the file that was analyzed.
-   */
+  /// The absolute and normalized path of the file that was analyzed.
   String get path;
 
-  /**
-   * Return the session used to compute this result.
-   */
+  /// Return the session used to compute this result.
   AnalysisSession get session;
 
-  /**
-   * The state of the results.
-   */
+  /// The state of the results.
   ResultState get state;
 
-  /**
-   * The absolute URI of the file that was analyzed.
-   */
+  /// The absolute URI of the file that was analyzed.
   Uri get uri;
 }
 
-/**
- * An analysis result that includes the errors computed during analysis.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// An analysis result that includes the errors computed during analysis.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class AnalysisResultWithErrors implements FileResult {
-  /**
-   * The analysis errors that were computed during analysis.
-   */
+  /// The analysis errors that were computed during analysis.
   List<AnalysisError> get errors;
 }
 
@@ -68,29 +54,21 @@
   ResolvedUnitResult get resolvedUnit;
 }
 
-/**
- * The result of computing all of the errors contained in a single file, both
- * syntactic and semantic.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The result of computing all of the errors contained in a single file, both
+/// syntactic and semantic.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ErrorsResult implements AnalysisResultWithErrors {}
 
-/**
- * The result of computing some cheap information for a single file, when full
- * parsed file is not required, so [ParseResult] is not necessary.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The result of computing some cheap information for a single file, when full
+/// parsed file is not required, so [ParsedUnitResult] is not necessary.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class FileResult implements AnalysisResult {
-  /**
-   * Whether the file is a part.
-   */
+  /// Whether the file is a part.
   bool get isPart;
 
-  /**
-   * Information about lines in the content.
-   */
+  /// Information about lines in the content.
   LineInfo get lineInfo;
 }
 
@@ -111,23 +89,19 @@
 /// those discovered during scanning and parsing.
 ///
 /// Clients may not extend, implement or mix-in this class.
+// ignore: deprecated_member_use
 abstract class ParsedUnitResult implements ParseResult {}
 
-/**
- * The result of parsing of a single file. The errors returned include only
- * those discovered during scanning and parsing.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The result of parsing of a single file. The errors returned include only
+/// those discovered during scanning and parsing.
+///
+/// Clients may not extend, implement or mix-in this class.
+@deprecated
 abstract class ParseResult implements AnalysisResultWithErrors {
-  /**
-   * The content of the file that was scanned and parsed.
-   */
+  /// The content of the file that was scanned and parsed.
   String get content;
 
-  /**
-   * The parsed, unresolved compilation unit for the [content].
-   */
+  /// The parsed, unresolved compilation unit for the [content].
   CompilationUnit get unit;
 }
 
@@ -154,85 +128,61 @@
 /// include both syntactic and semantic errors.
 ///
 /// Clients may not extend, implement or mix-in this class.
+// ignore: deprecated_member_use
 abstract class ResolvedUnitResult implements ResolveResult {}
 
-/**
- * The result of building a resolved AST for a single file. The errors returned
- * include both syntactic and semantic errors.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The result of building a resolved AST for a single file. The errors returned
+/// include both syntactic and semantic errors.
+///
+/// Clients may not extend, implement or mix-in this class.
+@deprecated
 abstract class ResolveResult implements AnalysisResultWithErrors {
-  /**
-   * The content of the file that was scanned, parsed and resolved.
-   */
+  /// The content of the file that was scanned, parsed and resolved.
   String get content;
 
-  /**
-   * The element representing the library containing the compilation [unit].
-   */
+  /// The element representing the library containing the compilation [unit].
   LibraryElement get libraryElement;
 
-  /**
-   * The type provider used when resolving the compilation [unit].
-   */
+  /// The type provider used when resolving the compilation [unit].
   TypeProvider get typeProvider;
 
-  /**
-   * The type system used when resolving the compilation [unit].
-   */
+  /// The type system used when resolving the compilation [unit].
   TypeSystem get typeSystem;
 
-  /**
-   * The fully resolved compilation unit for the [content].
-   */
+  /// The fully resolved compilation unit for the [content].
   CompilationUnit get unit;
 }
 
-/**
- * An indication of whether an analysis result is valid, and if not why.
- */
+/// An indication of whether an analysis result is valid, and if not why.
 enum ResultState {
-  /**
-   * An indication that analysis could not be performed because the path
-   * represents a file of a type that cannot be analyzed.
-   */
+  /// An indication that analysis could not be performed because the path
+  /// represents a file of a type that cannot be analyzed.
   INVALID_FILE_TYPE,
 
-  /**
-   * An indication that analysis could not be performed because the path does
-   * not represent a file. It might represent something else, such as a
-   * directory, or it might not represent anything.
-   */
+  /// An indication that analysis could not be performed because the path does
+  /// not represent a file. It might represent something else, such as a
+  /// directory, or it might not represent anything.
   NOT_A_FILE,
 
-  /**
-   * An indication that analysis completed normally and the results are valid.
-   */
+  /// An indication that analysis completed normally and the results are valid.
   VALID
 }
 
-/**
- * The result of building the element model for a single file.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The result of building the element model for a single file.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class UnitElementResult implements AnalysisResult {
-  /**
-   * The element of the file.
-   */
+  /// The element of the file.
   CompilationUnitElement get element;
 
-  /**
-   * The signature of the library containing the [element]. This is the same
-   * signature returned by the method [AnalysisSession.getUnitElementSignature]
-   * when given the path to the compilation unit represented by the [element].
-   *
-   * The signature is based on the APIs of the files of the library (including
-   * the file itself), and the transitive closure of files imported and exported
-   * by the library. If the signature of a file has not changed, then there have
-   * been no changes that would cause any files that depend on it to need to be
-   * re-analyzed.
-   */
+  /// The signature of the library containing the [element]. This is the same
+  /// signature returned by the method [AnalysisSession.getUnitElementSignature]
+  /// when given the path to the compilation unit represented by the [element].
+  ///
+  /// The signature is based on the APIs of the files of the library (including
+  /// the file itself), and the transitive closure of files imported and
+  /// exported by the library. If the signature of a file has not changed, then
+  /// there have been no changes that would cause any files that depend on it
+  /// to need to be re-analyzed.
   String get signature;
 }
diff --git a/pkg/analyzer/lib/dart/analysis/session.dart b/pkg/analyzer/lib/dart/analysis/session.dart
index b945ed6..6f31a7b 100644
--- a/pkg/analyzer/lib/dart/analysis/session.dart
+++ b/pkg/analyzer/lib/dart/analysis/session.dart
@@ -4,6 +4,7 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/uri_converter.dart';
@@ -14,81 +15,86 @@
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 
-/**
- * A consistent view of the results of analyzing one or more files.
- *
- * The methods in this class that return analysis results will throw an
- * [InconsistentAnalysisException] if the result to be returned might be
- * inconsistent with any previously returned results.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A consistent view of the results of analyzing one or more files.
+///
+/// The methods in this class that return analysis results will throw an
+/// [InconsistentAnalysisException] if the result to be returned might be
+/// inconsistent with any previously returned results.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class AnalysisSession {
-  /**
-   * The declared environment variables.
-   */
+  /// The analysis context that created this session.
+  AnalysisContext get analysisContext;
+
+  /// The declared environment variables.
   DeclaredVariables get declaredVariables;
 
-  /**
-   * Return the [ResourceProvider] that is used to access the file system.
-   */
+  /// Return the [ResourceProvider] that is used to access the file system.
   ResourceProvider get resourceProvider;
 
-  /**
-   * Return the source factory used to resolve URIs.
-   *
-   * Deprecated: Use the methods on [uriConverter] instead.
-   */
+  /// Return the source factory used to resolve URIs.
+  ///
+  /// Deprecated: Use the methods on [uriConverter] instead.
   @deprecated
   SourceFactory get sourceFactory;
 
-  /**
-   * Return a type provider that is consistent with the results returned by this
-   * session.
-   */
+  /// Return a type provider that is consistent with the results returned by
+  /// this session.
   Future<TypeProvider> get typeProvider;
 
-  /**
-   * Return the type system being used by this session.
-   */
+  /// Return the type system being used by this session.
   Future<TypeSystem> get typeSystem;
 
-  /**
-   * Return the URI converter used to convert between URI's and file paths.
-   */
+  /// Return the URI converter used to convert between URI's and file paths.
   UriConverter get uriConverter;
 
-  /**
-   * Return a future that will complete with information about the errors
-   * contained in the file with the given absolute, normalized [path].
-   *
-   * If the file cannot be analyzed by this session, then the result will have
-   * a result state indicating the nature of the problem.
-   */
+  /// Return a future that will complete with information about the errors
+  /// contained in the file with the given absolute, normalized [path].
+  ///
+  /// If the file cannot be analyzed by this session, then the result will have
+  /// a result state indicating the nature of the problem.
   Future<ErrorsResult> getErrors(String path);
 
-  /**
-   * Return a future that will complete with the library element representing
-   * the library with the given [uri].
-   */
+  /// Return a future that will complete with the library element representing
+  /// the library with the given [uri].
   Future<LibraryElement> getLibraryByUri(String uri);
 
-  /**
-   * Return a future that will complete with information about the results of
-   * parsing the file with the given absolute, normalized [path].
-   */
+  /// Return a future that will complete with information about the results of
+  /// parsing the file with the given absolute, normalized [path].
+  ///
+  /// Deprecated: Use [getParsedUnit] instead.
+  @deprecated
   Future<ParseResult> getParsedAst(String path);
 
-  /**
-   * Return information about the results of parsing the file with the given
-   * absolute, normalized [path].
-   */
+  /// Return information about the results of parsing the file with the given
+  /// absolute, normalized [path].
+  ///
+  /// Deprecated: Use [getParsedUnit] instead.
+  @deprecated
   ParseResult getParsedAstSync(String path);
 
-  /**
-   * Return a future that will complete with information about the results of
-   * resolving the file with the given absolute, normalized [path].
-   */
+  /// Return information about the results of parsing units of the library file
+  /// with the given absolute, normalized [path].
+  ///
+  /// Throw [ArgumentError] if the given [path] is not the defining compilation
+  /// unit for a library (that is, is a part of a library).
+  ParsedLibraryResult getParsedLibrary(String path);
+
+  /// Return information about the results of parsing units of the library file
+  /// with the given library [element].
+  ///
+  /// Throw [ArgumentError] if the [element] was not produced by this session.
+  ParsedLibraryResult getParsedLibraryByElement(LibraryElement element);
+
+  /// Return information about the results of parsing the file with the given
+  /// absolute, normalized [path].
+  ParsedUnitResult getParsedUnit(String path);
+
+  /// Return a future that will complete with information about the results of
+  /// resolving the file with the given absolute, normalized [path].
+  ///
+  /// Deprecated: Use [getResolvedUnit] instead.
+  @deprecated
   Future<ResolveResult> getResolvedAst(String path);
 
   /// Return a future that will complete with information about the results of
@@ -106,46 +112,41 @@
   Future<ResolvedLibraryResult> getResolvedLibraryByElement(
       LibraryElement element);
 
-  /**
-   * Return a future that will complete with the source kind of the file with
-   * the given absolute, normalized [path]. If the path does not represent a
-   * file or if the kind of the file cannot be determined, then the future will
-   * complete with [SourceKind.UNKNOWN].
-   */
+  /// Return a future that will complete with information about the results of
+  /// resolving the file with the given absolute, normalized [path].
+  Future<ResolvedUnitResult> getResolvedUnit(String path);
+
+  /// Return a future that will complete with the source kind of the file with
+  /// the given absolute, normalized [path]. If the path does not represent a
+  /// file or if the kind of the file cannot be determined, then the future will
+  /// complete with [SourceKind.UNKNOWN].
   Future<SourceKind> getSourceKind(String path);
 
-  /**
-   * Return a future that will complete with a list of the top-level
-   * declarations with the given [name] in all known libraries.
-   */
+  /// Return a future that will complete with a list of the top-level
+  /// declarations with the given [name] in all known libraries.
   Future<List<TopLevelDeclarationInSource>> getTopLevelDeclarations(
       String name);
 
-  /**
-   * Return a future that will complete with information about the results of
-   * building the element model for the file with the given absolute, normalized
-   * [path].
-   */
+  /// Return a future that will complete with information about the results of
+  /// building the element model for the file with the given absolute,
+  /// normalized[path].
   Future<UnitElementResult> getUnitElement(String path);
 
-  /**
-   * Return a future that will complete with the signature for the file with the
-   * given absolute, normalized [path], or `null` if the file cannot be analyzed.
-   * This is the same signature returned in the result from [getUnitElement].
-   *
-   * The signature is based on the APIs of the files of the library (including
-   * the file itself), and the transitive closure of files imported and exported
-   * by the library. If the signature of a file has not changed, then there have
-   * been no changes that would cause any files that depend on it to need to be
-   * re-analyzed.
-   */
+  /// Return a future that will complete with the signature for the file with
+  /// the given absolute, normalized [path], or `null` if the file cannot be
+  /// analyzed. This is the same signature returned in the result from
+  /// [getUnitElement].
+  ///
+  /// The signature is based on the APIs of the files of the library (including
+  /// the file itself), and the transitive closure of files imported and
+  /// exported by the library. If the signature of a file has not changed, then
+  /// there have been no changes that would cause any files that depend on it to
+  /// need to be re-analyzed.
   Future<String> getUnitElementSignature(String path);
 }
 
-/**
- * The exception thrown by an [AnalysisSession] if a result is requested that
- * might be inconsistent with any previously returned results.
- */
+/// The exception thrown by an [AnalysisSession] if a result is requested that
+/// might be inconsistent with any previously returned results.
 class InconsistentAnalysisException extends AnalysisException {
   InconsistentAnalysisException()
       : super('Requested result might be inconsistent with previously '
diff --git a/pkg/analyzer/lib/dart/analysis/utilities.dart b/pkg/analyzer/lib/dart/analysis/utilities.dart
new file mode 100644
index 0000000..75ef87b
--- /dev/null
+++ b/pkg/analyzer/lib/dart/analysis/utilities.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:meta/meta.dart';
+
+/// Return the result of parsing the file at the given [path].
+///
+/// If a [resourceProvider] is given, it will be used to access the file system.
+///
+/// Note that if more than one file is going to be parsed then this function is
+/// inefficient. Clients should instead use [AnalysisContextCollection] to
+/// create one or more contexts and use those contexts to parse the files.
+ParsedUnitResult parseFile(
+    {@required String path, ResourceProvider resourceProvider}) {
+  AnalysisContext context =
+      _createAnalysisContext(path: path, resourceProvider: resourceProvider);
+  return context.currentSession.getParsedUnit(path);
+}
+
+/// Return the result of resolving the file at the given [path].
+///
+/// If a [resourceProvider] is given, it will be used to access the file system.
+///
+/// Note that if more than one file is going to be resolved then this function
+/// is inefficient. Clients should instead use [AnalysisContextCollection] to
+/// create one or more contexts and use those contexts to resolve the files.
+Future<ResolvedUnitResult> resolveFile(
+    {@required String path, ResourceProvider resourceProvider}) async {
+  AnalysisContext context =
+      _createAnalysisContext(path: path, resourceProvider: resourceProvider);
+  return await context.currentSession.getResolvedUnit(path);
+}
+
+/// Return a newly create analysis context in which the file at the given [path]
+/// can be analyzed.
+///
+/// If a [resourceProvider] is given, it will be used to access the file system.
+AnalysisContext _createAnalysisContext(
+    {@required String path, ResourceProvider resourceProvider}) {
+  AnalysisContextCollection collection = new AnalysisContextCollection(
+    includedPaths: <String>[path],
+    resourceProvider: resourceProvider ?? PhysicalResourceProvider.INSTANCE,
+  );
+  List<AnalysisContext> contexts = collection.contexts;
+  if (contexts.length != 1) {
+    throw new ArgumentError('path must be an absolute path to a single file');
+  }
+  return contexts[0];
+}
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 661d15b..2378850 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -554,6 +554,12 @@
   E thisOrAncestorMatching<E extends AstNode>(Predicate<AstNode> predicate);
 
   /**
+   * Return either this node or the most immediate ancestor of this node that
+   * has the given type, or `null` if there is no such node.
+   */
+  T thisOrAncestorOfType<T extends AstNode>();
+
+  /**
    * Return a textual description of this node in a form approximating valid
    * source. The returned string will not be valid source primarily in the case
    * where the node itself is not well-formed.
@@ -757,6 +763,8 @@
 
   R visitScriptTag(ScriptTag node);
 
+  R visitSetLiteral(SetLiteral node);
+
   R visitShowCombinator(ShowCombinator node);
 
   R visitSimpleFormalParameter(SimpleFormalParameter node);
@@ -3771,7 +3779,8 @@
  * An anonymous function type.
  *
  *    functionType ::=
- *        [TypeAnnotation]? 'Function' [TypeParameterList]? [FormalParameterList]
+ *        [TypeAnnotation]? 'Function' [TypeParameterList]?
+ *        [FormalParameterList] '?'?
  *
  * where the FormalParameterList is being used to represent the following
  * grammar, despite the fact that FormalParameterList can represent a much
@@ -3821,6 +3830,18 @@
   void set parameters(FormalParameterList parameters);
 
   /**
+   * The question mark indicating that the type is nullable, or `null` if there
+   * is no question mark.
+   */
+  Token get question;
+
+  /**
+   * Set the question mark indicating that the type is nullable to the given
+   * [token].
+   */
+  void set question(Token token);
+
+  /**
    * Return the return type of the function type being defined, or `null` if
    * no return type was given.
    */
@@ -4347,8 +4368,6 @@
  *        ('new' | 'const')? [TypeName] ('.' [SimpleIdentifier])? [ArgumentList]
  *
  * Clients may not extend, implement or mix-in this class.
- *
- * 'new' | 'const' are only optional if the previewDart2 option is enabled.
  */
 abstract class InstanceCreationExpression extends Expression
     implements ConstructorReferenceNode {
@@ -5290,6 +5309,18 @@
   void set name(Identifier identifier);
 
   /**
+   * The question mark indicating that the type is nullable, or `null` if there
+   * is no question mark.
+   */
+  Token get question;
+
+  /**
+   * Set the question mark indicating that the type is nullable to the given
+   * [token].
+   */
+  void set question(Token token);
+
+  /**
    * Set the type being named to the given [type].
    */
   void set type(DartType type);
@@ -6029,6 +6060,43 @@
 }
 
 /**
+ * A literal set.
+ *
+ *    setLiteral ::=
+ *        'const'? ('<' [TypeAnnotation] '>')?
+ *        '{' [Expression] (',' [Expression])* ','? '}'
+ *      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class SetLiteral extends TypedLiteral {
+  /**
+   * Return the expressions used to compute the elements of the set.
+   */
+  NodeList<Expression> get elements;
+
+  /**
+   * Return the left curly bracket.
+   */
+  Token get leftBracket;
+
+  /**
+   * Set the left curly bracket to the given [token].
+   */
+  void set leftBracket(Token token);
+
+  /**
+   * Return the right curly bracket.
+   */
+  Token get rightBracket;
+
+  /**
+   * Set the right curly bracket to the given [token].
+   */
+  void set rightBracket(Token token);
+}
+
+/**
  * A combinator that restricts the names being imported to those in a given list.
  *
  *    showCombinator ::=
diff --git a/pkg/analyzer/lib/dart/ast/ast_factory.dart b/pkg/analyzer/lib/dart/ast/ast_factory.dart
index 5d46028..1a49333 100644
--- a/pkg/analyzer/lib/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/ast_factory.dart
@@ -624,7 +624,8 @@
       TypeAnnotation returnType,
       Token functionKeyword,
       TypeParameterList typeParameters,
-      FormalParameterList parameters);
+      FormalParameterList parameters,
+      {Token question});
 
   /**
    * Returns a newly created generic type alias. Either or both of the
@@ -939,6 +940,15 @@
   ScriptTag scriptTag(Token scriptTag);
 
   /**
+   * Returns a newly created set literal. The [constKeyword] can be `null`
+   * if the literal is not a constant. The [typeArguments] can be `null` if no
+   * type arguments were declared. The list of [elements] can be `null` if the
+   * set is empty.
+   */
+  SetLiteral setLiteral(Token constKeyword, TypeArgumentList typeArguments,
+      Token leftBracket, List<Expression> elements, Token rightBracket);
+
+  /**
    * Returns a newly created import show combinator.
    */
   ShowCombinator showCombinator(
@@ -1075,9 +1085,11 @@
 
   /**
    * Returns a newly created type name. The [typeArguments] can be `null` if
-   * there are no type arguments.
+   * there are no type arguments. The [question] can be `null` if there is no
+   * question mark.
    */
-  TypeName typeName(Identifier name, TypeArgumentList typeArguments);
+  TypeName typeName(Identifier name, TypeArgumentList typeArguments,
+      {Token question});
 
   /**
    * Returns a newly created type parameter. Either or both of the [comment]
diff --git a/pkg/analyzer/lib/dart/ast/visitor.dart b/pkg/analyzer/lib/dart/ast/visitor.dart
index 6394b8b..53ff333 100644
--- a/pkg/analyzer/lib/dart/ast/visitor.dart
+++ b/pkg/analyzer/lib/dart/ast/visitor.dart
@@ -480,6 +480,9 @@
   R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
   @override
+  R visitSetLiteral(SetLiteral node) => visitTypedLiteral(node);
+
+  @override
   R visitShowCombinator(ShowCombinator node) => visitCombinator(node);
 
   @override
@@ -1123,6 +1126,12 @@
   }
 
   @override
+  R visitSetLiteral(SetLiteral node) {
+    node.visitChildren(this);
+    return null;
+  }
+
+  @override
   R visitShowCombinator(ShowCombinator node) {
     node.visitChildren(this);
     return null;
@@ -1552,6 +1561,9 @@
   R visitScriptTag(ScriptTag node) => null;
 
   @override
+  R visitSetLiteral(SetLiteral node) => null;
+
+  @override
   R visitShowCombinator(ShowCombinator node) => null;
 
   @override
@@ -1910,6 +1922,9 @@
   R visitScriptTag(ScriptTag node) => _throw(node);
 
   @override
+  R visitSetLiteral(SetLiteral node) => _throw(node);
+
+  @override
   R visitShowCombinator(ShowCombinator node) => _throw(node);
 
   @override
@@ -2720,6 +2735,14 @@
   }
 
   @override
+  T visitSetLiteral(SetLiteral node) {
+    stopwatch.start();
+    T result = _baseVisitor.visitSetLiteral(node);
+    stopwatch.stop();
+    return result;
+  }
+
+  @override
   T visitShowCombinator(ShowCombinator node) {
     stopwatch.start();
     T result = _baseVisitor.visitShowCombinator(node);
@@ -3213,6 +3236,9 @@
   R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
   @override
+  R visitSetLiteral(SetLiteral node) => visitNode(node);
+
+  @override
   R visitShowCombinator(ShowCombinator node) => visitNode(node);
 
   @override
@@ -3296,7 +3322,7 @@
  * A helper class used to implement the correct order of visits for a
  * [BreadthFirstVisitor].
  */
-class _BreadthFirstChildVisitor extends UnifyingAstVisitor<Object> {
+class _BreadthFirstChildVisitor extends UnifyingAstVisitor<void> {
   /**
    * The [BreadthFirstVisitor] being helped by this visitor.
    */
@@ -3308,8 +3334,7 @@
   _BreadthFirstChildVisitor(this.outerVisitor);
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     outerVisitor._queue.add(node);
-    return null;
   }
 }
diff --git a/pkg/analyzer/lib/dart/constant/value.dart b/pkg/analyzer/lib/dart/constant/value.dart
index 2d7ddda..64a29c6 100644
--- a/pkg/analyzer/lib/dart/constant/value.dart
+++ b/pkg/analyzer/lib/dart/constant/value.dart
@@ -130,6 +130,14 @@
   Map<DartObject, DartObject> toMapValue();
 
   /**
+   * Return a set corresponding to the value of the object being represented,
+   * or `null` if
+   * * this object is not of type 'Set', or
+   * * the value of the object being represented is `null`.
+   */
+  Set<DartObject> toSetValue();
+
+  /**
    * Return a string corresponding to the value of the object being represented,
    * or `null` if
    * * this object is not of type 'String',
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index a282eb8..547cb82 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -34,9 +34,11 @@
 /// representation of the statements in a method body, but if one of those
 /// statements declares a local variable then the local variable will be
 /// represented by an element.
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -182,6 +184,7 @@
   /// the class.
   ConstructorElement get unnamedConstructor;
 
+  @deprecated
   @override
   NamedCompilationUnitMember computeNode();
 
@@ -405,6 +408,7 @@
   /// unit.
   List<ClassElement> get types;
 
+  @deprecated
   @override
   CompilationUnit computeNode();
 
@@ -453,6 +457,7 @@
   /// library containing this constructor has not yet been resolved.
   ConstructorElement get redirectedConstructor;
 
+  @deprecated
   @override
   ConstructorDeclaration computeNode();
 }
@@ -632,6 +637,9 @@
   /// does not have a name, or otherwise does not have an offset.
   int get nameOffset;
 
+  /// Return the analysis session in which this element is defined.
+  AnalysisSession get session;
+
   @override
   Source get source;
 
@@ -640,6 +648,7 @@
   ///
   /// This method is expensive, because resolved AST might have been already
   /// evicted from cache, so parsing and resolving will be performed.
+  @deprecated
   CompilationUnit get unit;
 
   /// Use the given [visitor] to visit this element. Return the value returned
@@ -667,6 +676,7 @@
   /// cache, so parsing and resolving will be performed.
   ///
   /// <b>Note:</b> This method cannot be used in an async environment.
+  @deprecated
   AstNode computeNode();
 
   /// Return the most immediate ancestor of this element for which the
@@ -703,10 +713,14 @@
   @deprecated
   static const List<ElementAnnotation> EMPTY_LIST = const <ElementAnnotation>[];
 
-  /// Return a representation of the value of this annotation.
-  ///
-  /// Return `null` if the value of this annotation could not be computed
-  /// because of errors.
+  /// Return the errors that were produced while computing a value for this
+  /// annotation, or `null` if no value has been computed. If a value has been
+  /// produced but no errors were generated, then the list will be empty.
+  List<AnalysisError> get constantEvaluationErrors;
+
+  /// Return a representation of the value of this annotation, or `null` if the
+  /// value of this annotation has not been computed or if the value could not
+  /// be computed because of errors.
   DartObject get constantValue;
 
   /// Return the element representing the field, variable, or const constructor
@@ -728,6 +742,10 @@
   /// subclasses as being immutable.
   bool get isImmutable;
 
+  /// Return `true` if this annotation marks the associated constructor as
+  /// being literal.
+  bool get isLiteral;
+
   /// Return `true` if this annotation marks the associated member as running
   /// a single test.
   bool get isIsTest;
@@ -1055,6 +1073,7 @@
   @deprecated
   bool get isVirtual;
 
+  @deprecated
   @override
   AstNode computeNode();
 }
@@ -1097,6 +1116,7 @@
   /// and has the name `main`.
   bool get isEntryPoint;
 
+  @deprecated
   @override
   FunctionDeclaration computeNode();
 }
@@ -1118,6 +1138,7 @@
   /// type on the right side of the equals.
   GenericFunctionTypeElement get function;
 
+  @deprecated
   @override
   TypeAlias computeNode();
 
@@ -1301,6 +1322,11 @@
   /// computed yet.
   Namespace get publicNamespace;
 
+  /// Return the top-level elements defined in each of the compilation units
+  /// that are included in this library. This includes both public and private
+  /// elements, but does not include imports, exports, or synthetic elements.
+  Iterable<Element> get topLevelElements;
+
   /// Return a list containing all of the compilation units this library
   /// consists of. This includes the defining compilation unit and units
   /// included using the `part` directive.
@@ -1353,6 +1379,7 @@
   @deprecated
   static const List<MethodElement> EMPTY_LIST = const <MethodElement>[];
 
+  @deprecated
   @override
   MethodDeclaration computeNode();
 
@@ -1463,6 +1490,7 @@
   /// the given [buffer].
   void appendToWithoutDelimiters(StringBuffer buffer);
 
+  @deprecated
   @override
   FormalParameter computeNode();
 }
@@ -1597,6 +1625,7 @@
   static const List<TopLevelVariableElement> EMPTY_LIST =
       const <TopLevelVariableElement>[];
 
+  @deprecated
   @override
   VariableDeclaration computeNode();
 }
diff --git a/pkg/analyzer/lib/dart/element/type_system.dart b/pkg/analyzer/lib/dart/element/type_system.dart
new file mode 100644
index 0000000..769a5d9
--- /dev/null
+++ b/pkg/analyzer/lib/dart/element/type_system.dart
@@ -0,0 +1,83 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/type.dart';
+
+/// A representation of the operations defined for the type system.
+///
+/// Clients may not extend, implement or mix-in this class.
+abstract class TypeSystem {
+  /// Return the result of applying the function "flatten" to the given [type].
+  ///
+  /// For the Dart 2.0 type system, the function is defined in the Dart Language
+  /// Specification, section 16.11 Function Expressions:
+  ///
+  /// > We define the auxiliary function _flatten(T)_, which is used below and
+  /// > in other sections, as follows:
+  /// >
+  /// > * If _T_ is `FutureOr<`_S_`>` for some _S_ then _flatten(T)_ = _S_.
+  /// >
+  /// > * Otherwise if _T_ <: `Future` then let _S_ be a type such that _T_ <:
+  /// >   `Future<`_S_`>` and for all _R_, if _T_ <: `Future<`_R_`>` then _S_ <:
+  /// >   _R_. This ensures that `Future<`_S_`>` is the most specific generic
+  /// >   instantiation of `Future` that is a supertype of _T_. Note that _S_ is
+  /// >   well-defined because of the requirements on superinterfaces. Then
+  /// >   _flatten(T)_ = _S_.
+  /// >
+  /// > * In any other circumstance, _flatten(T)_ = _T_.
+  ///
+  /// The subtype relationship (<:) can be tested using [isSubtypeOf].
+  ///
+  /// Other type systems may define this operation differently.
+  DartType flatten(DartType type);
+
+  /// Return `true` if the [rightType] is assignable to the [leftType].
+  ///
+  /// For the Dart 2.0 type system, the definition of this relationship is given
+  /// in the Dart Language Specification, section 19.4 Subtypes:
+  ///
+  /// > A type _T_ may be assigned to a type _S_ in an environment &Gamma;,
+  /// > written &Gamma; &#8866; _T_ &hArr; _S_, iff either &Gamma; &#8866; _S_
+  /// > <: _T_ or &Gamma; &#8866; _T_ <: _S_. In this case we say that the types
+  /// > _S_ and _T_ are assignable.
+  ///
+  /// The subtype relationship (<:) can be tested using [isSubtypeOf].
+  ///
+  /// Other type systems may define this operation differently. In particular,
+  /// while the operation is commutative in the Dart 2.0 type system, that is
+  /// not a requirement of a type system, so the order of the arguments is
+  /// important.
+  bool isAssignableTo(DartType leftType, DartType rightType);
+
+  /// Return `true` if the [leftType] is a subtype of the [rightType].
+  ///
+  /// For the Dart 2.0 type system, the rules governing the subtype relationship
+  /// are given in the Dart Language Specification, section 19.4 Subtypes.
+  ///
+  /// Other type systems may define this operation differently.
+  bool isSubtypeOf(DartType leftType, DartType rightType);
+
+  /// Compute the least upper bound of two types. This operation if commutative,
+  /// meaning that `leastUpperBound(t, s) == leastUpperBound(s, t)` for all `t`
+  /// and `s`.
+  ///
+  /// For the Dart 2.0 type system, the definition of the least upper bound is
+  /// given in the Dart Language Specification, section 19.9.2 Least Upper
+  /// Bounds.
+  ///
+  /// Other type systems may define this operation differently.
+  DartType leastUpperBound(DartType leftType, DartType rightType);
+
+  /// Return the result of resolving the bounds of the given [type].
+  ///
+  /// For the Dart 2.0 type system, the definition of resolving to bounds is
+  /// defined by the following. If the given [type] is a [TypeParameterType] and
+  /// it has a bound, return the result of resolving its bound (as per this
+  /// method). If the [type] is a [TypeParameterType] and it does not have a
+  /// bound, return the type `Object`. For any other type, return the given
+  /// type.
+  ///
+  /// Other type systems may define this operation differently.
+  DartType resolveToBound(DartType type);
+}
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 6988dc2..7ffa3f6 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -44,6 +44,7 @@
   AnalysisOptionsWarningCode.ANALYSIS_OPTION_DEPRECATED,
   AnalysisOptionsWarningCode.INCLUDE_FILE_NOT_FOUND,
   AnalysisOptionsWarningCode.INCLUDED_FILE_WARNING,
+  AnalysisOptionsWarningCode.INVALID_OPTION,
   AnalysisOptionsWarningCode.INVALID_SECTION_FORMAT,
   AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE,
   AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE,
@@ -57,11 +58,11 @@
   AnalysisOptionsHintCode.SUPER_MIXINS_SETTING_DEPRECATED,
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-  CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
   CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
   CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
   CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
   CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+  CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
   CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
   CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
   CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD,
@@ -96,9 +97,11 @@
   CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
   CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE,
   CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+  CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT,
   CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING,
   CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
   CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
+  CompileTimeErrorCode.CONST_EVAL_TYPE_TYPE,
   CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
   CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
   CompileTimeErrorCode
@@ -106,6 +109,7 @@
   CompileTimeErrorCode.CONST_INSTANCE_FIELD,
   CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
   CompileTimeErrorCode.CONST_NOT_INITIALIZED,
+  CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS,
   CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS,
   CompileTimeErrorCode.CONST_WITH_NON_CONST,
   CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
@@ -137,7 +141,7 @@
   CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE,
   CompileTimeErrorCode.GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED,
   CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND,
-  CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT,
+  CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT,
   CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS,
   CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
   CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
@@ -172,6 +176,7 @@
   CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS,
   CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST,
   CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP,
+  CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET,
   CompileTimeErrorCode.INVALID_URI,
   CompileTimeErrorCode.INVALID_USE_OF_COVARIANT,
   CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE,
@@ -179,6 +184,7 @@
   CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME,
   CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL,
   CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL,
+  CompileTimeErrorCode.MISSING_CONST_IN_SET_LITERAL,
   CompileTimeErrorCode.MISSING_DART_LIBRARY,
   CompileTimeErrorCode.MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE,
   CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE,
@@ -211,6 +217,8 @@
   CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
   CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT,
+  CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
   CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
@@ -265,7 +273,6 @@
   CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
   CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR,
   CompileTimeErrorCode.YIELD_IN_NON_GENERATOR,
-  HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
   HintCode.CAN_BE_NULL_AFTER_NULL_AWARE,
   HintCode.DEAD_CODE,
   HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH,
@@ -280,15 +287,13 @@
   HintCode.DUPLICATE_SHOWN_NAME,
   HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
   HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
-  HintCode.GENERIC_METHOD_COMMENT,
   HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
   HintCode.INVALID_ASSIGNMENT,
   HintCode.INVALID_FACTORY_ANNOTATION,
   HintCode.INVALID_FACTORY_METHOD_DECL,
   HintCode.INVALID_FACTORY_METHOD_IMPL,
   HintCode.INVALID_IMMUTABLE_ANNOTATION,
-  HintCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS,
-  HintCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND,
+  HintCode.INVALID_LITERAL_ANNOTATION,
   HintCode.INVALID_REQUIRED_PARAM,
   HintCode.INVALID_SEALED_ANNOTATION,
   HintCode.INVALID_USE_OF_PROTECTED_MEMBER,
@@ -302,6 +307,7 @@
   HintCode.MISSING_REQUIRED_PARAM,
   HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS,
   HintCode.MISSING_RETURN,
+  HintCode.MIXIN_ON_SEALED_CLASS,
   HintCode.MUST_BE_IMMUTABLE,
   HintCode.MUST_CALL_SUPER,
   HintCode.NULL_AWARE_BEFORE_OPERATOR,
@@ -314,13 +320,10 @@
   HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER,
   HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT,
   HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE,
+  HintCode.SUBTYPE_OF_SEALED_CLASS,
   HintCode.TYPE_CHECK_IS_NOT_NULL,
   HintCode.TYPE_CHECK_IS_NULL,
-  HintCode.UNDEFINED_GETTER,
   HintCode.UNDEFINED_HIDDEN_NAME,
-  HintCode.UNDEFINED_METHOD,
-  HintCode.UNDEFINED_OPERATOR,
-  HintCode.UNDEFINED_SETTER,
   HintCode.UNDEFINED_SHOWN_NAME,
   HintCode.UNNECESSARY_CAST,
   HintCode.UNNECESSARY_NO_SUCH_METHOD,
@@ -334,7 +337,6 @@
   HintCode.UNUSED_LABEL,
   HintCode.UNUSED_LOCAL_VARIABLE,
   HintCode.UNUSED_SHOWN_NAME,
-  HintCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
   HtmlErrorCode.PARSE_ERROR,
   HtmlWarningCode.INVALID_URI,
   HtmlWarningCode.URI_DOES_NOT_EXIST,
@@ -407,6 +409,7 @@
   ParserErrorCode.FACTORY_WITHOUT_BODY,
   ParserErrorCode.FACTORY_WITH_INITIALIZERS,
   ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
+  ParserErrorCode.FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS,
   ParserErrorCode.FINAL_AND_COVARIANT,
   ParserErrorCode.FINAL_AND_VAR,
   ParserErrorCode.FINAL_CLASS,
@@ -432,6 +435,7 @@
   ParserErrorCode.INVALID_LITERAL_IN_CONFIGURATION,
   ParserErrorCode.INVALID_OPERATOR,
   ParserErrorCode.INVALID_OPERATOR_FOR_SUPER,
+  ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER,
   ParserErrorCode.INVALID_STAR_AFTER_ASYNC,
   ParserErrorCode.INVALID_SYNC,
   ParserErrorCode.INVALID_UNICODE_ESCAPE,
@@ -532,6 +536,7 @@
   ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT,
   ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
   StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
+  StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS,
   StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
   StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
   StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
@@ -555,7 +560,6 @@
   StaticTypeWarningCode.UNDEFINED_FUNCTION,
   StaticTypeWarningCode.UNDEFINED_GETTER,
   StaticTypeWarningCode.UNDEFINED_METHOD,
-  StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR,
   StaticTypeWarningCode.UNDEFINED_OPERATOR,
   StaticTypeWarningCode.UNDEFINED_SETTER,
   StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
@@ -581,6 +585,7 @@
   StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
   StaticWarningCode.CONST_WITH_ABSTRACT_CLASS,
   StaticWarningCode.EQUAL_KEYS_IN_MAP,
+  StaticWarningCode.EQUAL_VALUES_IN_CONST_SET,
   StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED,
   StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS,
   StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED,
@@ -628,6 +633,7 @@
   StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
   StaticWarningCode.REDIRECT_TO_NON_CLASS,
   StaticWarningCode.RETURN_WITHOUT_VALUE,
+  StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
   StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
   StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
   StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS,
@@ -664,6 +670,7 @@
   StrongModeCode.INVALID_CAST_LITERAL,
   StrongModeCode.INVALID_CAST_LITERAL_LIST,
   StrongModeCode.INVALID_CAST_LITERAL_MAP,
+  StrongModeCode.INVALID_CAST_LITERAL_SET,
   StrongModeCode.INVALID_CAST_FUNCTION_EXPR,
   StrongModeCode.INVALID_CAST_NEW_EXPR,
   StrongModeCode.INVALID_CAST_METHOD,
diff --git a/pkg/analyzer/lib/error/listener.dart b/pkg/analyzer/lib/error/listener.dart
index eeef617..5f7e149 100644
--- a/pkg/analyzer/lib/error/listener.dart
+++ b/pkg/analyzer/lib/error/listener.dart
@@ -196,10 +196,10 @@
    * clarify the message.
    */
   void _convertTypeNames(List<Object> arguments) {
-    String displayName(DartType type) {
+    String computeDisplayName(DartType type) {
       if (type is FunctionType) {
         String name = type.name;
-        if (name != null && name.length > 0) {
+        if (name != null && name.isNotEmpty) {
           StringBuffer buffer = new StringBuffer();
           buffer.write(name);
           (type as TypeImpl).appendTo(buffer, new Set.identity());
@@ -209,46 +209,54 @@
       return type.displayName;
     }
 
-    if (_hasEqualTypeNames(arguments)) {
-      int count = arguments.length;
-      for (int i = 0; i < count; i++) {
-        Object argument = arguments[i];
-        if (argument is DartType) {
-          Element element = argument.element;
+    Map<String, List<_TypeToConvert>> typeGroups = {};
+    for (int i = 0; i < arguments.length; i++) {
+      Object argument = arguments[i];
+      if (argument is DartType) {
+        String displayName = computeDisplayName(argument);
+        List<_TypeToConvert> types =
+            typeGroups.putIfAbsent(displayName, () => <_TypeToConvert>[]);
+        types.add(new _TypeToConvert(i, argument, displayName));
+      }
+    }
+    for (List<_TypeToConvert> typeGroup in typeGroups.values) {
+      if (typeGroup.length == 1) {
+        _TypeToConvert typeToConvert = typeGroup[0];
+        if (typeToConvert.type is DartType) {
+          arguments[typeToConvert.index] = typeToConvert.displayName;
+        }
+      } else {
+        Map<String, Set<Element>> nameToElementMap = {};
+        for (_TypeToConvert typeToConvert in typeGroup) {
+          for (Element element in typeToConvert.allElements()) {
+            Set<Element> elements = nameToElementMap.putIfAbsent(
+                element.name, () => new Set<Element>());
+            elements.add(element);
+          }
+        }
+        for (_TypeToConvert typeToConvert in typeGroup) {
+          Element element = typeToConvert.type.element;
           if (element == null) {
-            arguments[i] = displayName(argument);
+            arguments[typeToConvert.index] = typeToConvert.displayName;
           } else {
-            arguments[i] =
-                element.getExtendedDisplayName(displayName(argument));
+            // TODO(brianwilkerson) When analyzer supports info or context
+            //  messages, expose the additional information that way (rather
+            //  than being poorly inserted into the problem message).
+            StringBuffer buffer = new StringBuffer();
+            for (Element element in typeToConvert.allElements()) {
+              String name = element.name;
+              if (nameToElementMap[name].length > 1) {
+                buffer.write(buffer.isEmpty ? 'where ' : ', ');
+                buffer.write('$name is defined in ${element.source.fullName}');
+              }
+            }
+            arguments[typeToConvert.index] =
+                '${typeToConvert.displayName} ($buffer)';
           }
         }
       }
-    } else {
-      int count = arguments.length;
-      for (int i = 0; i < count; i++) {
-        Object argument = arguments[i];
-        if (argument is DartType) {
-          arguments[i] = displayName(argument);
-        }
-      }
     }
   }
-
-  /**
-   * Return `true` if the given array of [arguments] contains two or more types
-   * with the same display name.
-   */
-  bool _hasEqualTypeNames(List<Object> arguments) {
-    int count = arguments.length;
-    HashSet<String> typeNames = new HashSet<String>();
-    for (int i = 0; i < count; i++) {
-      Object argument = arguments[i];
-      if (argument is DartType && !typeNames.add(argument.displayName)) {
-        return true;
-      }
-    }
-    return false;
-  }
 }
 
 /**
@@ -256,58 +264,32 @@
  * way that is appropriate for caching those errors within an analysis context.
  */
 class RecordingErrorListener implements AnalysisErrorListener {
-  /**
-   * A map of sets containing the errors that were collected, keyed by each
-   * source.
-   */
-  Map<Source, HashSet<AnalysisError>> _errors =
-      new HashMap<Source, HashSet<AnalysisError>>();
+  Set<AnalysisError> _errors;
 
   /**
    * Return the errors collected by the listener.
    */
   List<AnalysisError> get errors {
-    int numEntries = _errors.length;
-    if (numEntries == 0) {
-      return AnalysisError.NO_ERRORS;
+    if (_errors == null) {
+      return const <AnalysisError>[];
     }
-    List<AnalysisError> resultList = new List<AnalysisError>();
-    for (HashSet<AnalysisError> errors in _errors.values) {
-      resultList.addAll(errors);
-    }
-    return resultList;
-  }
-
-  /**
-   * Add all of the errors recorded by the given [listener] to this listener.
-   */
-  void addAll(RecordingErrorListener listener) {
-    for (AnalysisError error in listener.errors) {
-      onError(error);
-    }
+    return _errors.toList();
   }
 
   /**
    * Return the errors collected by the listener for the given [source].
    */
   List<AnalysisError> getErrorsForSource(Source source) {
-    HashSet<AnalysisError> errorsForSource = _errors[source];
-    if (errorsForSource == null) {
-      return AnalysisError.NO_ERRORS;
-    } else {
-      return new List.from(errorsForSource);
+    if (_errors == null) {
+      return const <AnalysisError>[];
     }
+    return _errors.where((error) => error.source == source).toList();
   }
 
   @override
   void onError(AnalysisError error) {
-    Source source = error.source;
-    HashSet<AnalysisError> errorsForSource = _errors[source];
-    if (_errors[source] == null) {
-      errorsForSource = new HashSet<AnalysisError>();
-      _errors[source] = errorsForSource;
-    }
-    errorsForSource.add(error);
+    _errors ??= new HashSet<AnalysisError>();
+    _errors.add(error);
   }
 }
 
@@ -320,3 +302,48 @@
     // Ignore errors
   }
 }
+
+/**
+ * Used by `ErrorReporter._convertTypeNames` to keep track of a type that is
+ * being converted.
+ */
+class _TypeToConvert {
+  final int index;
+  final DartType type;
+  final String displayName;
+
+  List<Element> _allElements;
+
+  _TypeToConvert(this.index, this.type, this.displayName);
+
+  List<Element> allElements() {
+    if (_allElements == null) {
+      Set<Element> elements = new Set<Element>();
+
+      void addElementsFrom(DartType type) {
+        Element element = type?.element;
+        if (element != null) {
+          if (type is InterfaceType && elements.add(element)) {
+            for (DartType typeArgument in type.typeArguments) {
+              addElementsFrom(typeArgument);
+            }
+          } else if (type is FunctionType && elements.add(element)) {
+            addElementsFrom(type.returnType);
+            for (DartType typeArgument in type.typeArguments) {
+              addElementsFrom(typeArgument);
+            }
+            for (ParameterElement parameter in type.parameters) {
+              addElementsFrom(parameter.type);
+            }
+          }
+        }
+      }
+
+      addElementsFrom(type);
+      _allElements = elements
+          .where((element) => element.name != null && element.name.isNotEmpty)
+          .toList();
+    }
+    return _allElements;
+  }
+}
diff --git a/pkg/analyzer/lib/file_system/file_system.dart b/pkg/analyzer/lib/file_system/file_system.dart
index 7a714b6..61770a1 100644
--- a/pkg/analyzer/lib/file_system/file_system.dart
+++ b/pkg/analyzer/lib/file_system/file_system.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index 5059dcd..e179115 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -5,7 +5,6 @@
 import 'dart:async';
 import 'dart:collection';
 import 'dart:convert';
-import 'dart:core';
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source_io.dart';
@@ -213,6 +212,8 @@
   }
 
   void _checkFileAtPath(String path) {
+    // TODO(brianwilkerson) Consider throwing a FileSystemException rather than
+    // an ArgumentError.
     _MemoryResource resource = _pathToResource[path];
     if (resource is! _MemoryFile) {
       if (resource == null) {
@@ -224,6 +225,8 @@
   }
 
   void _checkFolderAtPath(String path) {
+    // TODO(brianwilkerson) Consider throwing a FileSystemException rather than
+    // an ArgumentError.
     _MemoryResource resource = _pathToResource[path];
     if (resource is! _MemoryFolder) {
       throw new ArgumentError(
diff --git a/pkg/analyzer/lib/file_system/overlay_file_system.dart b/pkg/analyzer/lib/file_system/overlay_file_system.dart
index 666e5722..76879be 100644
--- a/pkg/analyzer/lib/file_system/overlay_file_system.dart
+++ b/pkg/analyzer/lib/file_system/overlay_file_system.dart
@@ -78,6 +78,12 @@
       new _OverlayFolder(this, baseProvider.getStateLocation(pluginId));
 
   /**
+   * Return `true` if there is an overlay associated with the file at the given
+   * [path].
+   */
+  bool hasOverlay(String path) => _overlayContent.containsKey(path);
+
+  /**
    * Remove any overlay of the file at the given [path]. The state of the file
    * in the base resource provider will not be affected.
    */
@@ -111,7 +117,7 @@
    * file with the [newPath].
    */
   void _copyOverlay(String oldPath, String newPath) {
-    if (_hasOverlay(oldPath)) {
+    if (hasOverlay(oldPath)) {
       _overlayContent[newPath] = _overlayContent[oldPath];
       _overlayModificationStamps[newPath] = _overlayModificationStamps[oldPath];
     }
@@ -134,12 +140,6 @@
   }
 
   /**
-   * Return `true` if there is an overlay associated with the file at the given
-   * [path].
-   */
-  bool _hasOverlay(String path) => _overlayContent.containsKey(path);
-
-  /**
    * Return the paths of all of the overlaid files that are immediate children
    * of the given [folder].
    */
@@ -165,7 +165,7 @@
   Stream<WatchEvent> get changes => _file.changes;
 
   @override
-  bool get exists => _provider._hasOverlay(path) || _resource.exists;
+  bool get exists => _provider.hasOverlay(path) || _resource.exists;
 
   @override
   int get lengthSync {
@@ -241,7 +241,7 @@
   @override
   File renameSync(String newPath) {
     File newFile = _file.renameSync(newPath);
-    if (_provider._hasOverlay(path)) {
+    if (_provider.hasOverlay(path)) {
       _provider.setOverlay(newPath,
           content: _provider._getOverlayContent(path),
           modificationStamp: _provider._getOverlayModificationStamp(path));
@@ -257,7 +257,7 @@
 
   @override
   void writeAsStringSync(String content) {
-    if (_provider._hasOverlay(path)) {
+    if (_provider.hasOverlay(path)) {
       throw new FileSystemException(
           path, 'Cannot write a file with an overlay');
     }
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index 966a100..eb28314 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:core';
 import 'dart:io' as io;
 
 import 'package:analyzer/file_system/file_system.dart';
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index fe2a5f4..dfd679f 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -171,6 +171,9 @@
   int get length => _embedderSdk?.urlMappings?.length ?? 0;
 
   @override
+  void clearCache() {}
+
+  @override
   Source resolveAbsolute(Uri uri, [Uri actualUri]) =>
       _dartUriResolver.resolveAbsolute(uri, actualUri);
 
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
index 53f4a4e..a82fb5e 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -141,6 +141,14 @@
           "Warning in the included options file {0}({1}..{2}): {3}");
 
   /**
+   * An error code indicating that a plugin is being configured with an invalid
+   * value for an option and a detail message is provided.
+   */
+  static const AnalysisOptionsWarningCode INVALID_OPTION =
+      const AnalysisOptionsWarningCode(
+          'INVALID_OPTION', "Invalid option specified for '{0}': {1}");
+
+  /**
    * An error code indicating an invalid format for an options file section.
    *
    * Parameters:
diff --git a/pkg/analyzer/lib/src/codegen/html.dart b/pkg/analyzer/lib/src/codegen/html.dart
index f6405af..1cbce5f 100644
--- a/pkg/analyzer/lib/src/codegen/html.dart
+++ b/pkg/analyzer/lib/src/codegen/html.dart
@@ -75,7 +75,7 @@
 /**
  * Mixin class for generating HTML.
  */
-class HtmlGenerator {
+mixin HtmlGenerator {
   List<dom.Node> _html;
 
   /**
diff --git a/pkg/analyzer/lib/src/codegen/tools.dart b/pkg/analyzer/lib/src/codegen/tools.dart
index 8cd9293..8b4e96d 100644
--- a/pkg/analyzer/lib/src/codegen/tools.dart
+++ b/pkg/analyzer/lib/src/codegen/tools.dart
@@ -40,6 +40,19 @@
 }
 
 /**
+ * Type of functions used to compute the contents of a set of generated files.
+ * [pkgPath] is the path to the current package.
+ */
+typedef Map<String, FileContentsComputer> DirectoryContentsComputer(
+    String pkgPath);
+
+/**
+ * Type of functions used to compute the contents of a generated file.
+ * [pkgPath] is the path to the current package.
+ */
+typedef Future<String> FileContentsComputer(String pkgPath);
+
+/**
  * Mixin class for generating code.
  */
 class CodeGenerator {
@@ -244,6 +257,255 @@
 }
 
 /**
+ * A utility class for invoking dartfmt.
+ */
+class DartFormat {
+  static String get _dartfmtPath {
+    String binName = Platform.isWindows ? 'dartfmt.bat' : 'dartfmt';
+    for (var loc in [binName, join('dart-sdk', 'bin', binName)]) {
+      var candidatePath = join(dirname(Platform.resolvedExecutable), loc);
+      if (new File(candidatePath).existsSync()) {
+        return candidatePath;
+      }
+    }
+    throw new StateError('Could not find dartfmt executable');
+  }
+
+  static void formatFile(File file) {
+    ProcessResult result = Process.runSync(_dartfmtPath, ['-w', file.path]);
+    if (result.exitCode != 0) throw result.stderr;
+  }
+
+  static String formatText(String text) {
+    File file = new File(join(Directory.systemTemp.path, 'gen.dart'));
+    file.writeAsStringSync(text);
+    ProcessResult result = Process.runSync(_dartfmtPath, ['-w', file.path]);
+    if (result.exitCode != 0) throw result.stderr;
+    return file.readAsStringSync();
+  }
+}
+
+/**
+ * Abstract base class representing behaviors common to generated files and
+ * generated directories.
+ */
+abstract class GeneratedContent {
+  /**
+   * Check whether the [output] has the correct contents, and return true if it
+   * does.  [pkgPath] is the path to the current package.
+   */
+  Future<bool> check(String pkgPath);
+
+  /**
+   * Replace the [output] with the correct contents.  [pkgPath] is the path to
+   * the current package.
+   */
+  Future<void> generate(String pkgPath);
+
+  /**
+   * Get a [FileSystemEntity] representing the output file or directory.
+   * [pkgPath] is the path to the current package.
+   */
+  FileSystemEntity output(String pkgPath);
+
+  /**
+   * Check that all of the [targets] are up to date.  If they are not, print
+   * out a message instructing the user to regenerate them, and exit with a
+   * nonzero error code.
+   *
+   * [pkgPath] is the path to the current package.  [generatorRelPath] is the
+   * path to a .dart script the user may use to regenerate the targets.
+   *
+   * To avoid mistakes when run on Windows, [generatorRelPath] always uses
+   * POSIX directory separators.
+   */
+  static Future<void> checkAll(String pkgPath, String generatorRelPath,
+      Iterable<GeneratedContent> targets) async {
+    bool generateNeeded = false;
+    for (GeneratedContent target in targets) {
+      bool ok = await target.check(pkgPath);
+      if (!ok) {
+        print("${target.output(pkgPath).absolute}"
+            " doesn't have expected contents.");
+        generateNeeded = true;
+      }
+    }
+    if (generateNeeded) {
+      print('Please regenerate using:');
+      String executable = Platform.executable;
+      String packageRoot = '';
+      // ignore: deprecated_member_use
+      if (Platform.packageRoot != null) {
+        // ignore: deprecated_member_use
+        packageRoot = ' --package-root=${Platform.packageRoot}';
+      }
+      String generateScript =
+          join(pkgPath, joinAll(posix.split(generatorRelPath)));
+      print('  $executable$packageRoot $generateScript');
+      exit(1);
+    } else {
+      print('All generated files up to date.');
+    }
+  }
+
+  /**
+   * Regenerate all of the [targets].  [pkgPath] is the path to the current
+   * package.
+   */
+  static Future<void> generateAll(
+      String pkgPath, Iterable<GeneratedContent> targets) async {
+    print("Generating...");
+    for (GeneratedContent target in targets) {
+      await target.generate(pkgPath);
+    }
+  }
+}
+
+/**
+ * Class representing a single output directory (either generated code or
+ * generated HTML). No other content should exist in the directory.
+ */
+class GeneratedDirectory extends GeneratedContent {
+  /**
+   * The path to the directory that will have the generated content.
+   */
+  final String outputDirPath;
+
+  /**
+   * Callback function that computes the directory contents.
+   */
+  final DirectoryContentsComputer directoryContentsComputer;
+
+  GeneratedDirectory(this.outputDirPath, this.directoryContentsComputer);
+
+  @override
+  Future<bool> check(String pkgPath) async {
+    Directory outputDirectory = output(pkgPath);
+    Map<String, FileContentsComputer> map = directoryContentsComputer(pkgPath);
+    try {
+      for (String file in map.keys) {
+        FileContentsComputer fileContentsComputer = map[file];
+        String expectedContents = await fileContentsComputer(pkgPath);
+        File outputFile = new File(posix.join(outputDirectory.path, file));
+        String actualContents = outputFile.readAsStringSync();
+        // Normalize Windows line endings to Unix line endings so that the
+        // comparison doesn't fail on Windows.
+        actualContents = actualContents.replaceAll('\r\n', '\n');
+        if (expectedContents != actualContents) {
+          return false;
+        }
+      }
+      int nonHiddenFileCount = 0;
+      outputDirectory
+          .listSync(recursive: false, followLinks: false)
+          .forEach((FileSystemEntity fileSystemEntity) {
+        if (fileSystemEntity is File &&
+            !basename(fileSystemEntity.path).startsWith('.')) {
+          nonHiddenFileCount++;
+        }
+      });
+      if (nonHiddenFileCount != map.length) {
+        // The number of files generated doesn't match the number we expected to
+        // generate.
+        return false;
+      }
+    } catch (e) {
+      // There was a problem reading the file (most likely because it didn't
+      // exist).  Treat that the same as if the file doesn't have the expected
+      // contents.
+      return false;
+    }
+    return true;
+  }
+
+  @override
+  Future<void> generate(String pkgPath) async {
+    Directory outputDirectory = output(pkgPath);
+    try {
+      // delete the contents of the directory (and the directory itself)
+      outputDirectory.deleteSync(recursive: true);
+    } catch (e) {
+      // Error caught while trying to delete the directory, this can happen if
+      // it didn't yet exist.
+    }
+    // re-create the empty directory
+    outputDirectory.createSync(recursive: true);
+
+    // generate all of the files in the directory
+    Map<String, FileContentsComputer> map = directoryContentsComputer(pkgPath);
+    for (String file in map.keys) {
+      FileContentsComputer fileContentsComputer = map[file];
+      File outputFile = new File(posix.join(outputDirectory.path, file));
+      print('  ${outputFile.path}');
+      String contents = await fileContentsComputer(pkgPath);
+      outputFile.writeAsStringSync(contents);
+    }
+  }
+
+  @override
+  Directory output(String pkgPath) =>
+      new Directory(join(pkgPath, joinAll(posix.split(outputDirPath))));
+}
+
+/**
+ * Class representing a single output file (either generated code or generated
+ * HTML).
+ */
+class GeneratedFile extends GeneratedContent {
+  /**
+   * The output file to which generated output should be written, relative to
+   * the "tool/spec" directory.  This filename uses the posix path separator
+   * ('/') regardless of the OS.
+   */
+  final String outputPath;
+
+  /**
+   * Callback function which computes the file.
+   */
+  final FileContentsComputer computeContents;
+
+  GeneratedFile(this.outputPath, this.computeContents);
+
+  bool get isDartFile => outputPath.endsWith('.dart');
+
+  @override
+  Future<bool> check(String pkgPath) async {
+    File outputFile = output(pkgPath);
+    String expectedContents = await computeContents(pkgPath);
+    if (isDartFile) {
+      expectedContents = DartFormat.formatText(expectedContents);
+    }
+    try {
+      String actualContents = outputFile.readAsStringSync();
+      // Normalize Windows line endings to Unix line endings so that the
+      // comparison doesn't fail on Windows.
+      actualContents = actualContents.replaceAll('\r\n', '\n');
+      return expectedContents == actualContents;
+    } catch (e) {
+      // There was a problem reading the file (most likely because it didn't
+      // exist).  Treat that the same as if the file doesn't have the expected
+      // contents.
+      return false;
+    }
+  }
+
+  @override
+  Future<void> generate(String pkgPath) async {
+    File outputFile = output(pkgPath);
+    print('  ${outputFile.path}');
+    String contents = await computeContents(pkgPath);
+    outputFile.writeAsStringSync(contents);
+    if (isDartFile) {
+      DartFormat.formatFile(outputFile);
+    }
+  }
+
+  @override
+  File output(String pkgPath) =>
+      new File(join(pkgPath, joinAll(posix.split(outputPath))));
+}
+
+/**
  * Mixin class for generating HTML representations of code that are suitable
  * for enclosing inside a <pre> element.
  */
@@ -384,265 +646,3 @@
     }
   }
 }
-
-/**
- * Type of functions used to compute the contents of a set of generated files.
- * [pkgPath] is the path to the current package.
- */
-typedef Map<String, FileContentsComputer> DirectoryContentsComputer(
-    String pkgPath);
-
-/**
- * Type of functions used to compute the contents of a generated file.
- * [pkgPath] is the path to the current package.
- */
-typedef Future<String> FileContentsComputer(String pkgPath);
-
-/**
- * Abstract base class representing behaviors common to generated files and
- * generated directories.
- */
-abstract class GeneratedContent {
-  /**
-   * Check whether the [output] has the correct contents, and return true if it
-   * does.  [pkgPath] is the path to the current package.
-   */
-  Future<bool> check(String pkgPath);
-
-  /**
-   * Replace the [output] with the correct contents.  [pkgPath] is the path to
-   * the current package.
-   */
-  Future<Null> generate(String pkgPath);
-
-  /**
-   * Get a [FileSystemEntity] representing the output file or directory.
-   * [pkgPath] is the path to the current package.
-   */
-  FileSystemEntity output(String pkgPath);
-
-  /**
-   * Check that all of the [targets] are up to date.  If they are not, print
-   * out a message instructing the user to regenerate them, and exit with a
-   * nonzero error code.
-   *
-   * [pkgPath] is the path to the current package.  [generatorRelPath] is the
-   * path to a .dart script the user may use to regenerate the targets.
-   *
-   * To avoid mistakes when run on Windows, [generatorRelPath] always uses
-   * POSIX directory separators.
-   */
-  static Future<Null> checkAll(String pkgPath, String generatorRelPath,
-      Iterable<GeneratedContent> targets) async {
-    bool generateNeeded = false;
-    for (GeneratedContent target in targets) {
-      bool ok = await target.check(pkgPath);
-      if (!ok) {
-        print("${target.output(pkgPath).absolute}"
-            " doesn't have expected contents.");
-        generateNeeded = true;
-      }
-    }
-    if (generateNeeded) {
-      print('Please regenerate using:');
-      String executable = Platform.executable;
-      String packageRoot = '';
-      // ignore: deprecated_member_use
-      if (Platform.packageRoot != null) {
-        // ignore: deprecated_member_use
-        packageRoot = ' --package-root=${Platform.packageRoot}';
-      }
-      String generateScript =
-          join(pkgPath, joinAll(posix.split(generatorRelPath)));
-      print('  $executable$packageRoot $generateScript');
-      exit(1);
-    } else {
-      print('All generated files up to date.');
-    }
-  }
-
-  /**
-   * Regenerate all of the [targets].  [pkgPath] is the path to the current
-   * package.
-   */
-  static Future<Null> generateAll(
-      String pkgPath, Iterable<GeneratedContent> targets) async {
-    print("Generating...");
-    for (GeneratedContent target in targets) {
-      await target.generate(pkgPath);
-    }
-  }
-}
-
-/**
- * Class representing a single output directory (either generated code or
- * generated HTML). No other content should exist in the directory.
- */
-class GeneratedDirectory extends GeneratedContent {
-  /**
-   * The path to the directory that will have the generated content.
-   */
-  final String outputDirPath;
-
-  /**
-   * Callback function that computes the directory contents.
-   */
-  final DirectoryContentsComputer directoryContentsComputer;
-
-  GeneratedDirectory(this.outputDirPath, this.directoryContentsComputer);
-
-  @override
-  Future<bool> check(String pkgPath) async {
-    Directory outputDirectory = output(pkgPath);
-    Map<String, FileContentsComputer> map = directoryContentsComputer(pkgPath);
-    try {
-      for (String file in map.keys) {
-        FileContentsComputer fileContentsComputer = map[file];
-        String expectedContents = await fileContentsComputer(pkgPath);
-        File outputFile = new File(posix.join(outputDirectory.path, file));
-        String actualContents = outputFile.readAsStringSync();
-        // Normalize Windows line endings to Unix line endings so that the
-        // comparison doesn't fail on Windows.
-        actualContents = actualContents.replaceAll('\r\n', '\n');
-        if (expectedContents != actualContents) {
-          return false;
-        }
-      }
-      int nonHiddenFileCount = 0;
-      outputDirectory
-          .listSync(recursive: false, followLinks: false)
-          .forEach((FileSystemEntity fileSystemEntity) {
-        if (fileSystemEntity is File &&
-            !basename(fileSystemEntity.path).startsWith('.')) {
-          nonHiddenFileCount++;
-        }
-      });
-      if (nonHiddenFileCount != map.length) {
-        // The number of files generated doesn't match the number we expected to
-        // generate.
-        return false;
-      }
-    } catch (e) {
-      // There was a problem reading the file (most likely because it didn't
-      // exist).  Treat that the same as if the file doesn't have the expected
-      // contents.
-      return false;
-    }
-    return true;
-  }
-
-  @override
-  Future<Null> generate(String pkgPath) async {
-    Directory outputDirectory = output(pkgPath);
-    try {
-      // delete the contents of the directory (and the directory itself)
-      outputDirectory.deleteSync(recursive: true);
-    } catch (e) {
-      // Error caught while trying to delete the directory, this can happen if
-      // it didn't yet exist.
-    }
-    // re-create the empty directory
-    outputDirectory.createSync(recursive: true);
-
-    // generate all of the files in the directory
-    Map<String, FileContentsComputer> map = directoryContentsComputer(pkgPath);
-    for (String file in map.keys) {
-      FileContentsComputer fileContentsComputer = map[file];
-      File outputFile = new File(posix.join(outputDirectory.path, file));
-      print('  ${outputFile.path}');
-      String contents = await fileContentsComputer(pkgPath);
-      outputFile.writeAsStringSync(contents);
-    }
-  }
-
-  @override
-  Directory output(String pkgPath) =>
-      new Directory(join(pkgPath, joinAll(posix.split(outputDirPath))));
-}
-
-/**
- * Class representing a single output file (either generated code or generated
- * HTML).
- */
-class GeneratedFile extends GeneratedContent {
-  /**
-   * The output file to which generated output should be written, relative to
-   * the "tool/spec" directory.  This filename uses the posix path separator
-   * ('/') regardless of the OS.
-   */
-  final String outputPath;
-
-  /**
-   * Callback function which computes the file.
-   */
-  final FileContentsComputer computeContents;
-
-  GeneratedFile(this.outputPath, this.computeContents);
-
-  bool get isDartFile => outputPath.endsWith('.dart');
-
-  @override
-  Future<bool> check(String pkgPath) async {
-    File outputFile = output(pkgPath);
-    String expectedContents = await computeContents(pkgPath);
-    if (isDartFile) {
-      expectedContents = DartFormat.formatText(expectedContents);
-    }
-    try {
-      String actualContents = outputFile.readAsStringSync();
-      // Normalize Windows line endings to Unix line endings so that the
-      // comparison doesn't fail on Windows.
-      actualContents = actualContents.replaceAll('\r\n', '\n');
-      return expectedContents == actualContents;
-    } catch (e) {
-      // There was a problem reading the file (most likely because it didn't
-      // exist).  Treat that the same as if the file doesn't have the expected
-      // contents.
-      return false;
-    }
-  }
-
-  @override
-  Future<Null> generate(String pkgPath) async {
-    File outputFile = output(pkgPath);
-    print('  ${outputFile.path}');
-    String contents = await computeContents(pkgPath);
-    outputFile.writeAsStringSync(contents);
-    if (isDartFile) {
-      DartFormat.formatFile(outputFile);
-    }
-  }
-
-  @override
-  File output(String pkgPath) =>
-      new File(join(pkgPath, joinAll(posix.split(outputPath))));
-}
-
-/**
- * A utility class for invoking dartfmt.
- */
-class DartFormat {
-  static String get _dartfmtPath {
-    String binName = Platform.isWindows ? 'dartfmt.bat' : 'dartfmt';
-    for (var loc in [binName, join('dart-sdk', 'bin', binName)]) {
-      var candidatePath = join(dirname(Platform.resolvedExecutable), loc);
-      if (new File(candidatePath).existsSync()) {
-        return candidatePath;
-      }
-    }
-    throw new StateError('Could not find dartfmt executable');
-  }
-
-  static void formatFile(File file) {
-    ProcessResult result = Process.runSync(_dartfmtPath, ['-w', file.path]);
-    if (result.exitCode != 0) throw result.stderr;
-  }
-
-  static String formatText(String text) {
-    File file = new File(join(Directory.systemTemp.path, 'gen.dart'));
-    file.writeAsStringSync(text);
-    ProcessResult result = Process.runSync(_dartfmtPath, ['-w', file.path]);
-    if (result.exitCode != 0) throw result.stderr;
-    return file.readAsStringSync();
-  }
-}
diff --git a/pkg/analyzer/lib/src/command_line/arguments.dart b/pkg/analyzer/lib/src/command_line/arguments.dart
index 904684c..c39ec25 100644
--- a/pkg/analyzer/lib/src/command_line/arguments.dart
+++ b/pkg/analyzer/lib/src/command_line/arguments.dart
@@ -15,7 +15,6 @@
 const String analysisOptionsFileOption = 'options';
 const String bazelAnalysisOptionsPath =
     'package:dart.analysis_options/default.yaml';
-const String declarationCastsFlag = 'declaration-casts';
 const String defineVariableOption = 'D';
 const String enableInitializingFormalAccessFlag = 'initializing-formal-access';
 @deprecated
@@ -47,13 +46,6 @@
     options.implicitCasts = args[implicitCastsFlag];
     verbose('$implicitCastsFlag = ${options.implicitCasts}');
   }
-  if (args.wasParsed(declarationCastsFlag)) {
-    options.declarationCasts = args[declarationCastsFlag];
-    verbose('$declarationCastsFlag = ${options.declarationCasts}');
-  } else if (args.wasParsed(implicitCastsFlag)) {
-    options.declarationCasts = args[implicitCastsFlag];
-    verbose('$declarationCastsFlag = ${options.declarationCasts}');
-  }
   if (args.wasParsed(noImplicitDynamicFlag)) {
     options.implicitDynamic = !args[noImplicitDynamicFlag];
     verbose('$noImplicitDynamicFlag = ${options.implicitDynamic}');
@@ -162,10 +154,10 @@
       defaultsTo: true,
       hide: true,
       negatable: true);
-  parser.addFlag(declarationCastsFlag,
+  parser.addFlag('declaration-casts',
       negatable: true,
       help: 'Disable declaration casts in strong mode (https://goo.gl/cTLz40)\n'
-          'This option is deprecated and will be removed in a future release.',
+          'This option is now ignored and will be removed in a future release.',
       hide: ddc && hide);
   parser.addFlag(implicitCastsFlag,
       negatable: true,
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 8c7104e..5e2a359 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -1,10 +1,12 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
 import 'dart:core';
 
+import 'package:analyzer/dart/analysis/analysis_context.dart' as api;
+import 'package:analyzer/dart/analysis/context_locator.dart' as api;
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
@@ -15,27 +17,31 @@
         flutterAnalysisOptionsPath;
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/context/context_root.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/context_root.dart' as api;
 import 'package:analyzer/src/dart/analysis/driver.dart'
     show AnalysisDriver, AnalysisDriverScheduler;
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart'
+    as api;
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/bazel.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/gn.dart';
-import 'package:analyzer/src/generated/package_build.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/workspace.dart';
+import 'package:analyzer/src/hint/sdk_constraint_extractor.dart';
 import 'package:analyzer/src/lint/registry.dart';
 import 'package:analyzer/src/plugin/resolver_provider.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/summary/summary_sdk.dart';
 import 'package:analyzer/src/task/options.dart';
 import 'package:analyzer/src/util/uri.dart';
+import 'package:analyzer/src/workspace/basic.dart';
+import 'package:analyzer/src/workspace/bazel.dart';
+import 'package:analyzer/src/workspace/gn.dart';
+import 'package:analyzer/src/workspace/package_build.dart';
+import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:args/args.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:package_config/packages.dart';
 import 'package:package_config/packages_file.dart';
 import 'package:package_config/src/packages_impl.dart';
@@ -131,9 +137,10 @@
   FileContentOverlay fileContentOverlay;
 
   /**
-   * Whether to enable the Dart 2.0 preview.
+   * Whether any analysis driver created through this interface should support
+   * indexing and search.
    */
-  bool get previewDart2 => true;
+  bool enableIndex = false;
 
   /**
    * Initialize a newly created builder to be ready to build a context rooted in
@@ -155,7 +162,6 @@
     AnalysisOptionsImpl options = getAnalysisOptions(path);
     context.contentCache = contentCache;
     context.sourceFactory = createSourceFactory(path, options);
-    options.previewDart2 = previewDart2;
     context.analysisOptions = options;
     context.name = path;
     //_processAnalysisOptions(context, optionMap);
@@ -172,7 +178,11 @@
     AnalysisOptions options =
         getAnalysisOptions(path, contextRoot: contextRoot);
     //_processAnalysisOptions(context, optionMap);
-    final sf = createSourceFactory(path, options);
+    SummaryDataStore summaryData;
+    if (builderOptions.librarySummaryPaths != null) {
+      summaryData = SummaryDataStore(builderOptions.librarySummaryPaths);
+    }
+    final sf = createSourceFactory(path, options, summaryData: summaryData);
 
     AnalysisDriver driver = new AnalysisDriver(
         analysisDriverScheduler,
@@ -182,7 +192,23 @@
         fileContentOverlay,
         contextRoot,
         sf,
-        options);
+        options,
+        enableIndex: enableIndex,
+        externalSummaries: summaryData);
+
+    // Set API AnalysisContext for the driver.
+    var apiContextRoots = api.ContextLocator(
+      resourceProvider: resourceProvider,
+    ).locateRoots(
+      includedPaths: [contextRoot.root],
+      excludedPaths: contextRoot.exclude,
+    );
+    driver.analysisContext = api.DriverBasedAnalysisContext(
+      resourceProvider,
+      apiContextRoots.first,
+      driver,
+    );
+
     // temporary plugin support:
     if (onCreateAnalysisDriver != null) {
       onCreateAnalysisDriver(driver, analysisDriverScheduler, performanceLog,
@@ -255,23 +281,15 @@
     return findPackagesFromFile(rootDirectoryPath);
   }
 
-  SourceFactory createSourceFactory(String rootPath, AnalysisOptions options) {
-    Workspace workspace = createWorkspace(rootPath);
+  SourceFactory createSourceFactory(String rootPath, AnalysisOptions options,
+      {SummaryDataStore summaryData}) {
+    Workspace workspace =
+        ContextBuilder.createWorkspace(resourceProvider, rootPath, this);
     DartSdk sdk = findSdk(workspace.packageMap, options);
-    return workspace.createSourceFactory(sdk);
-  }
-
-  Workspace createWorkspace(String rootPath) {
-    if (_hasPackageFileInPath(rootPath)) {
-      // Bazel workspaces that include package files are treated like normal
-      // (non-Bazel) directories. But may still use package:build.
-      return PackageBuildWorkspace.find(resourceProvider, rootPath, this) ??
-          _BasicWorkspace.find(resourceProvider, rootPath, this);
+    if (summaryData != null && sdk is SummaryBasedDartSdk) {
+      summaryData.addBundle(null, sdk.bundle);
     }
-    Workspace workspace = BazelWorkspace.find(resourceProvider, rootPath);
-    workspace ??= GnWorkspace.find(resourceProvider, rootPath);
-    workspace ??= PackageBuildWorkspace.find(resourceProvider, rootPath, this);
-    return workspace ?? _BasicWorkspace.find(resourceProvider, rootPath, this);
+    return workspace.createSourceFactory(sdk, summaryData);
   }
 
   /**
@@ -413,8 +431,9 @@
 
     // TODO(danrubel) restructure so that we don't create a workspace
     // both here and in createSourceFactory
-    Workspace workspace = createWorkspace(path);
-    SourceFactory sourceFactory = workspace.createSourceFactory(null);
+    Workspace workspace =
+        ContextBuilder.createWorkspace(resourceProvider, path, this);
+    SourceFactory sourceFactory = workspace.createSourceFactory(null, null);
     AnalysisOptionsProvider optionsProvider =
         new AnalysisOptionsProvider(sourceFactory);
 
@@ -472,6 +491,16 @@
     } else {
       verbose('Using default analysis options');
     }
+
+    var pubspecFile = _findPubspecFile(path);
+    if (pubspecFile != null) {
+      var extractor = new SdkConstraintExtractor(pubspecFile);
+      var sdkVersionConstraint = extractor.constraint();
+      if (sdkVersionConstraint != null) {
+        options.sdkVersionConstraint = sdkVersionConstraint;
+      }
+    }
+
     return options;
   }
 
@@ -606,10 +635,29 @@
   }
 
   /**
+   * Return the `pubspec.yaml` file that should be used when analyzing code in
+   * the directory with the given [path], possibly `null`.
+   */
+  File _findPubspecFile(String path) {
+    var resource = resourceProvider.getResource(path);
+    while (resource != null) {
+      if (resource is Folder) {
+        File pubspecFile = resource.getChildAssumingFile('pubspec.yaml');
+        if (pubspecFile.exists) {
+          return pubspecFile;
+        }
+      }
+      resource = resource.parent;
+    }
+    return null;
+  }
+
+  /**
    * Return `true` if either the directory at [rootPath] or a parent of that
    * directory contains a `.packages` file.
    */
-  bool _hasPackageFileInPath(String rootPath) {
+  static bool _hasPackageFileInPath(
+      ResourceProvider resourceProvider, String rootPath) {
     Folder folder = resourceProvider.getFolder(rootPath);
     while (folder != null) {
       File file = folder.getChildAssumingFile('.packages');
@@ -620,6 +668,23 @@
     }
     return false;
   }
+
+  static Workspace createWorkspace(ResourceProvider resourceProvider,
+      String rootPath, ContextBuilder contextBuilder) {
+    if (_hasPackageFileInPath(resourceProvider, rootPath)) {
+      // Bazel workspaces that include package files are treated like normal
+      // (non-Bazel) directories. But may still use package:build.
+      return PackageBuildWorkspace.find(
+              resourceProvider, rootPath, contextBuilder) ??
+          BasicWorkspace.find(resourceProvider, rootPath, contextBuilder);
+    }
+    Workspace workspace = BazelWorkspace.find(resourceProvider, rootPath);
+    workspace ??= GnWorkspace.find(resourceProvider, rootPath);
+    workspace ??=
+        PackageBuildWorkspace.find(resourceProvider, rootPath, contextBuilder);
+    return workspace ??
+        BasicWorkspace.find(resourceProvider, rootPath, contextBuilder);
+  }
 }
 
 /**
@@ -674,6 +739,12 @@
   String defaultPackagesDirectoryPath;
 
   /**
+   * A list of the paths of summary files that are to be used, or `null` if no
+   * summary information is available.
+   */
+  List<String> librarySummaryPaths;
+
+  /**
    * Initialize a newly created set of options
    */
   ContextBuilderOptions();
@@ -773,71 +844,3 @@
     }
   }
 }
-
-/**
- * Information about a default Dart workspace.
- */
-class _BasicWorkspace extends Workspace {
-  /**
-   * The [ResourceProvider] by which paths are converted into [Resource]s.
-   */
-  final ResourceProvider provider;
-
-  /**
-   * The absolute workspace root path.
-   */
-  final String root;
-
-  final ContextBuilder _builder;
-
-  Map<String, List<Folder>> _packageMap;
-
-  Packages _packages;
-
-  _BasicWorkspace._(this.provider, this.root, this._builder);
-
-  @override
-  Map<String, List<Folder>> get packageMap {
-    _packageMap ??= _builder.convertPackagesToMap(packages);
-    return _packageMap;
-  }
-
-  Packages get packages {
-    _packages ??= _builder.createPackageMap(root);
-    return _packages;
-  }
-
-  @override
-  UriResolver get packageUriResolver =>
-      new PackageMapUriResolver(provider, packageMap);
-
-  @override
-  SourceFactory createSourceFactory(DartSdk sdk) {
-    List<UriResolver> resolvers = <UriResolver>[];
-    if (sdk != null) {
-      resolvers.add(new DartUriResolver(sdk));
-    }
-    resolvers.add(packageUriResolver);
-    resolvers.add(new ResourceUriResolver(provider));
-    return new SourceFactory(resolvers, packages, provider);
-  }
-
-  /**
-   * Find the basic workspace that contains the given [path].
-   */
-  static _BasicWorkspace find(
-      ResourceProvider provider, String path, ContextBuilder builder) {
-    Context context = provider.pathContext;
-
-    // Ensure that the path is absolute and normalized.
-    if (!context.isAbsolute(path)) {
-      throw new ArgumentError('not absolute: $path');
-    }
-    path = context.normalize(path);
-    Resource resource = provider.getResource(path);
-    if (resource is File) {
-      path = resource.parent.path;
-    }
-    return new _BasicWorkspace._(provider, path, builder);
-  }
-}
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 2dc5cfd..f26ad7d 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -283,9 +283,6 @@
             ? this._options.strongModeHints != options.strongModeHints
             : false) ||
         ((options is AnalysisOptionsImpl)
-            ? this._options.declarationCasts != options.declarationCasts
-            : false) ||
-        ((options is AnalysisOptionsImpl)
             ? this._options.implicitCasts != options.implicitCasts
             : false) ||
         ((options is AnalysisOptionsImpl)
@@ -313,10 +310,8 @@
     this._options.patchPaths = options.patchPaths;
     if (options is AnalysisOptionsImpl) {
       this._options.strongModeHints = options.strongModeHints;
-      this._options.declarationCasts = options.declarationCasts;
       this._options.implicitCasts = options.implicitCasts;
       this._options.implicitDynamic = options.implicitDynamic;
-      this._options.isMixinSupportEnabled = options.isMixinSupportEnabled;
     }
     if (needsRecompute) {
       for (WorkManager workManager in workManagers) {
diff --git a/pkg/analyzer/lib/src/context/source.dart b/pkg/analyzer/lib/src/context/source.dart
index 6c3b58e..70abd3dc 100644
--- a/pkg/analyzer/lib/src/context/source.dart
+++ b/pkg/analyzer/lib/src/context/source.dart
@@ -101,6 +101,14 @@
   }
 
   @override
+  void clearCache() {
+    _absoluteUriToSourceCache.clear();
+    for (var resolver in resolvers) {
+      resolver.clearCache();
+    }
+  }
+
+  @override
   SourceFactory clone() {
     SourceFactory factory =
         new SourceFactory(resolvers, _packages, _resourceProvider);
diff --git a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
index a474878..f844029 100644
--- a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
@@ -4,10 +4,11 @@
 
 import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
-import 'package:analyzer/dart/analysis/context_builder.dart';
 import 'package:analyzer/dart/analysis/context_locator.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/dart/analysis/context_builder.dart';
+import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:meta/meta.dart';
 
 /// An implementation of [AnalysisContextCollection].
@@ -20,7 +21,9 @@
 
   /// Initialize a newly created analysis context manager.
   AnalysisContextCollectionImpl(
-      {@required List<String> includedPaths,
+      {bool enableIndex: false,
+      @deprecated FileContentOverlay fileContentOverlay,
+      @required List<String> includedPaths,
       ResourceProvider resourceProvider,
       String sdkPath})
       : resourceProvider =
@@ -35,11 +38,15 @@
     );
     var roots = contextLocator.locateRoots(includedPaths: includedPaths);
     for (var root in roots) {
-      var contextBuilder = new ContextBuilder(
+      var contextBuilder = new ContextBuilderImpl(
         resourceProvider: this.resourceProvider,
       );
-      var context =
-          contextBuilder.createContext(contextRoot: root, sdkPath: sdkPath);
+      var context = contextBuilder.createContext(
+        contextRoot: root,
+        enableIndex: enableIndex,
+        fileContentOverlay: fileContentOverlay,
+        sdkPath: sdkPath,
+      );
       contexts.add(context);
     }
   }
diff --git a/pkg/analyzer/lib/src/dart/analysis/ast_provider_driver.dart b/pkg/analyzer/lib/src/dart/analysis/ast_provider_driver.dart
deleted file mode 100644
index 21c2297..0000000
--- a/pkg/analyzer/lib/src/dart/analysis/ast_provider_driver.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/element/ast_provider.dart';
-
-/**
- * [AstProvider] implementation for [AnalysisDriver].
- */
-class AstProviderForDriver implements AstProvider {
-  final AnalysisDriver driver;
-
-  AstProviderForDriver(this.driver);
-
-  @override
-  Future<SimpleIdentifier> getParsedNameForElement(Element element) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    CompilationUnit unit = await getParsedUnitForElement(element);
-    return _getNameNode(unit, element);
-  }
-
-  @override
-  Future<CompilationUnit> getParsedUnitForElement(Element element) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    String path = element.source.fullName;
-    ParseResult parseResult = await driver.parseFile(path);
-    return parseResult.unit;
-  }
-
-  @override
-  Future<SimpleIdentifier> getResolvedNameForElement(Element element) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    CompilationUnit unit = await getResolvedUnitForElement(element);
-    return _getNameNode(unit, element);
-  }
-
-  @override
-  Future<CompilationUnit> getResolvedUnitForElement(Element element) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    String path = element.source.fullName;
-    AnalysisResult analysisResult = await driver.getResult(path);
-    return analysisResult?.unit;
-  }
-
-  SimpleIdentifier _getNameNode(CompilationUnit unit, Element element) {
-    int nameOffset = element.nameOffset;
-    if (nameOffset == -1) {
-      return null;
-    }
-    AstNode nameNode = new NodeLocator(nameOffset).searchWithin(unit);
-    if (nameNode is SimpleIdentifier) {
-      return nameNode;
-    }
-    return null;
-  }
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
index f835eb6..074d46d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
@@ -11,18 +11,18 @@
 import 'package:analyzer/src/context/builder.dart' as old
     show ContextBuilder, ContextBuilderOptions;
 import 'package:analyzer/src/context/context_root.dart' as old;
+import 'package:analyzer/src/dart/analysis/byte_store.dart'
+    show ByteStore, MemoryByteStore;
 import 'package:analyzer/src/dart/analysis/driver.dart'
     show AnalysisDriver, AnalysisDriverScheduler;
 import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart'
     show FileContentOverlay;
+import 'package:analyzer/src/dart/analysis/performance_logger.dart'
+    show PerformanceLog;
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/sdk.dart' show DartSdkManager;
 import 'package:analyzer/src/generated/source.dart' show ContentCache;
-import 'package:analyzer/src/dart/analysis/performance_logger.dart'
-    show PerformanceLog;
-import 'package:analyzer/src/dart/analysis/byte_store.dart'
-    show ByteStore, MemoryByteStore;
 import 'package:meta/meta.dart';
 
 /**
@@ -55,10 +55,15 @@
       {@deprecated ByteStore byteStore,
       @required ContextRoot contextRoot,
       DeclaredVariables declaredVariables,
+      bool enableIndex: false,
+      @deprecated FileContentOverlay fileContentOverlay,
+      List<String> librarySummaryPaths,
       @deprecated PerformanceLog performanceLog,
       @deprecated AnalysisDriverScheduler scheduler,
-      String sdkPath}) {
+      String sdkPath,
+      String sdkSummaryPath}) {
     byteStore ??= new MemoryByteStore();
+    fileContentOverlay ??= new FileContentOverlay();
     performanceLog ??= new PerformanceLog(new StringBuffer());
 
     sdkPath ??= _defaultSdkPath;
@@ -78,6 +83,12 @@
     if (declaredVariables != null) {
       options.declaredVariables = _toMap(declaredVariables);
     }
+    if (sdkSummaryPath != null) {
+      options.dartSdkSummaryPath = sdkSummaryPath;
+    }
+    if (librarySummaryPaths != null) {
+      options.librarySummaryPaths = librarySummaryPaths;
+    }
     options.defaultPackageFilePath = contextRoot.packagesFile?.path;
 
     old.ContextBuilder builder = new old.ContextBuilder(
@@ -85,7 +96,8 @@
         options: options);
     builder.analysisDriverScheduler = scheduler;
     builder.byteStore = byteStore;
-    builder.fileContentOverlay = new FileContentOverlay();
+    builder.fileContentOverlay = fileContentOverlay;
+    builder.enableIndex = enableIndex;
     builder.performanceLog = performanceLog;
 
     old.ContextRoot oldContextRoot = new old.ContextRoot(
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
index 4422823..220e865 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
@@ -13,20 +13,24 @@
 import 'package:analyzer/src/context/builder.dart'
     show ContextBuilder, ContextBuilderOptions;
 import 'package:analyzer/src/context/context_root.dart' as old;
+import 'package:analyzer/src/dart/analysis/byte_store.dart'
+    show MemoryByteStore;
 import 'package:analyzer/src/dart/analysis/context_root.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart'
     show AnalysisDriver, AnalysisDriverScheduler;
 import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart'
     show FileContentOverlay;
-import 'package:analyzer/src/dart/sdk/sdk.dart' show FolderBasedDartSdk;
-import 'package:analyzer/src/generated/sdk.dart' show DartSdkManager;
-import 'package:analyzer/src/generated/source.dart' show ContentCache;
 import 'package:analyzer/src/dart/analysis/performance_logger.dart'
     show PerformanceLog;
-import 'package:analyzer/src/dart/analysis/byte_store.dart'
-    show MemoryByteStore;
+import 'package:analyzer/src/dart/sdk/sdk.dart' show FolderBasedDartSdk;
+import 'package:analyzer/src/generated/sdk.dart' show DartSdkManager;
+import 'package:analyzer/src/task/options.dart';
+import 'package:analyzer/src/util/yaml.dart';
+import 'package:glob/glob.dart';
 import 'package:meta/meta.dart';
+import 'package:path/path.dart';
+import 'package:yaml/yaml.dart';
 
 /**
  * An implementation of a context locator.
@@ -91,7 +95,7 @@
     scheduler.start();
     ContextBuilderOptions options = new ContextBuilderOptions();
     ContextBuilder builder = new ContextBuilder(
-        resourceProvider, sdkManager, new ContentCache(),
+        resourceProvider, sdkManager, null,
         options: options);
     if (packagesFile != null) {
       options.defaultPackageFilePath = packagesFile;
@@ -175,7 +179,7 @@
       root.included.add(folder);
       roots.add(root);
       _createContextRootsIn(roots, folder, excludedFolders, root,
-          defaultOptionsFile, defaultPackagesFile);
+          _getExcludedFiles(root), defaultOptionsFile, defaultPackagesFile);
     }
     Map<Folder, ContextRoot> rootMap = <Folder, ContextRoot>{};
     for (File file in includedFiles) {
@@ -208,14 +212,16 @@
    * If either the [optionsFile] or [packagesFile] is non-`null` then the given
    * file will be used even if there is a local version of the file.
    *
-   * For each directory within the given [folder] that is not in the list of
-   * [excludedFolders], recursively search for nested context roots.
+   * For each directory within the given [folder] that is neither in the list of
+   * [excludedFolders] nor excluded by the [excludedFilePatterns], recursively
+   * search for nested context roots.
    */
   void _createContextRoots(
       List<ContextRoot> roots,
       Folder folder,
       List<Folder> excludedFolders,
       ContextRoot containingRoot,
+      List<Glob> excludedFilePatterns,
       File optionsFile,
       File packagesFile) {
     //
@@ -248,14 +254,16 @@
       containingRoot.excluded.add(folder);
       roots.add(root);
       containingRoot = root;
+      excludedFilePatterns = _getExcludedFiles(root);
     }
     _createContextRootsIn(roots, folder, excludedFolders, containingRoot,
-        optionsFile, packagesFile);
+        excludedFilePatterns, optionsFile, packagesFile);
   }
 
   /**
-   * For each directory within the given [folder] that is not in the list of
-   * [excludedFolders], recursively search for nested context roots.
+   * For each directory within the given [folder] that is neither in the list of
+   * [excludedFolders] nor excluded by the [excludedFilePatterns], recursively
+   * search for nested context roots and add them to the list of [roots].
    *
    * If either the [optionsFile] or [packagesFile] is non-`null` then the given
    * file will be used even if there is a local version of the file.
@@ -265,8 +273,22 @@
       Folder folder,
       List<Folder> excludedFolders,
       ContextRoot containingRoot,
+      List<Glob> excludedFilePatterns,
       File optionsFile,
       File packagesFile) {
+    bool isExcluded(Folder folder) {
+      if (excludedFolders.contains(folder) ||
+          folder.shortName.startsWith('.')) {
+        return true;
+      }
+      for (Glob pattern in excludedFilePatterns) {
+        if (pattern.matches(folder.path)) {
+          return true;
+        }
+      }
+      return false;
+    }
+
     //
     // Check each of the subdirectories to see whether a context root needs to
     // be added for it.
@@ -274,12 +296,11 @@
     try {
       for (Resource child in folder.getChildren()) {
         if (child is Folder) {
-          if (excludedFolders.contains(folder) ||
-              folder.shortName.startsWith('.')) {
-            containingRoot.excluded.add(folder);
+          if (isExcluded(child)) {
+            containingRoot.excluded.add(child);
           } else {
             _createContextRoots(roots, child, excludedFolders, containingRoot,
-                optionsFile, packagesFile);
+                excludedFilePatterns, optionsFile, packagesFile);
           }
         }
       }
@@ -321,6 +342,46 @@
     return null;
   }
 
+  /// Return a list containing the glob patterns used to exclude files from the
+  /// given context [root]. The patterns are extracted from the analysis options
+  /// file associated with the context root. The list will be empty if there are
+  /// no exclusion patterns in the options file, or if there is no options file
+  /// associated with the context root.
+  List<Glob> _getExcludedFiles(ContextRootImpl root) {
+    List<Glob> patterns = [];
+    File optionsFile = root.optionsFile;
+    if (optionsFile != null) {
+      try {
+        String content = optionsFile.readAsStringSync();
+        YamlNode doc = loadYamlNode(content);
+        if (doc is YamlMap) {
+          YamlNode analyzerOptions = getValue(doc, AnalyzerOptions.analyzer);
+          if (analyzerOptions is YamlMap) {
+            YamlNode excludeOptions =
+                getValue(analyzerOptions, AnalyzerOptions.exclude);
+            if (excludeOptions is YamlList) {
+              List<String> excludeList = toStringList(excludeOptions);
+              if (excludeList != null) {
+                for (String excludedPath in excludeList) {
+                  Context context = resourceProvider.pathContext;
+                  if (context.isRelative(excludedPath)) {
+                    excludedPath =
+                        context.join(optionsFile.parent.path, excludedPath);
+                  }
+                  patterns.add(new Glob(excludedPath, context: context));
+                }
+              }
+            }
+          }
+        }
+      } catch (exception) {
+        // If we can't read and parse the analysis options file, then there
+        // aren't any excluded files that need to be read.
+      }
+    }
+    return patterns;
+  }
+
   /**
    * If the given [directory] contains a file with the given [name], then return
    * the file. Otherwise, return `null`.
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
new file mode 100644
index 0000000..4740d58
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
@@ -0,0 +1,767 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/src/dart/analysis/dependency/node.dart';
+import 'package:analyzer/src/dart/analysis/dependency/reference_collector.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/summary/api_signature.dart';
+
+/// Build [Library] that describes nodes and dependencies of the library
+/// with the given [uri] and [units].
+///
+/// If the [units] are just parsed, then only token signatures and referenced
+/// names of nodes can be computed. If the [units] are fully resolved, then
+/// also class member references can be recorded.
+Library buildLibrary(Uri uri, List<CompilationUnit> units) {
+  return _LibraryBuilder(uri, units).build();
+}
+
+/// The `show` or `hide` namespace combinator.
+class Combinator {
+  final bool isShow;
+  final List<String> names;
+
+  Combinator(this.isShow, this.names);
+
+  @override
+  String toString() {
+    if (isShow) {
+      return 'show ' + names.join(', ');
+    } else {
+      return 'hide ' + names.join(', ');
+    }
+  }
+}
+
+/// The `export` directive.
+class Export {
+  /// The absolute URI of the exported library.
+  final Uri uri;
+
+  /// The list of namespace combinators to apply, not `null`.
+  final List<Combinator> combinators;
+
+  Export(this.uri, this.combinators);
+
+  @override
+  String toString() {
+    return 'Export(uri: $uri, combinators: $combinators)';
+  }
+}
+
+/// The `import` directive.
+class Import {
+  /// The absolute URI of the imported library.
+  final Uri uri;
+
+  /// The import prefix, or `null` if not specified.
+  final String prefix;
+
+  /// The list of namespace combinators to apply, not `null`.
+  final List<Combinator> combinators;
+
+  Import(this.uri, this.prefix, this.combinators);
+
+  @override
+  String toString() {
+    return 'Import(uri: $uri, prefix: $prefix, combinators: $combinators)';
+  }
+}
+
+/// The collection of imports, exports, and top-level nodes.
+class Library {
+  /// The absolute URI of the library.
+  final Uri uri;
+
+  /// The list of imports in this library.
+  final List<Import> imports;
+
+  /// The list of exports in this library.
+  final List<Export> exports;
+
+  /// The list of libraries that correspond to the [imports].
+  List<Library> importedLibraries;
+
+  /// The list of top-level nodes defined in the library.
+  ///
+  /// This list is sorted.
+  final List<Node> declaredNodes;
+
+  /// The map of [declaredNodes], used for fast search.
+  /// TODO(scheglov) consider using binary search instead.
+  final Map<LibraryQualifiedName, Node> declaredNodeMap = {};
+
+  /// The list of nodes exported from this library, either using `export`
+  /// directives, or declared in this library.
+  ///
+  /// This list is sorted.
+  List<Node> exportedNodes;
+
+  /// The map of nodes that are visible in the library, either imported,
+  /// or declared in this library.
+  ///
+  /// TODO(scheglov) support for imports with prefixes
+  Map<String, Node> libraryScope;
+
+  Library(this.uri, this.imports, this.exports, this.declaredNodes) {
+    for (var node in declaredNodes) {
+      declaredNodeMap[node.name] = node;
+    }
+  }
+
+  @override
+  String toString() => '$uri';
+}
+
+class _LibraryBuilder {
+  /// The URI of the library.
+  final Uri uri;
+
+  /// The units of the library, parsed or fully resolved.
+  final List<CompilationUnit> units;
+
+  /// The instance of the referenced names, class members collector.
+  final ReferenceCollector referenceCollector = ReferenceCollector();
+
+  /// The list of imports in the library.
+  final List<Import> imports = [];
+
+  /// The list of exports in the library.
+  final List<Export> exports = [];
+
+  /// The top-level nodes declared in the library.
+  final List<Node> declaredNodes = [];
+
+  /// The precomputed signature of the [uri].
+  ///
+  /// It is mixed into every API token signature, because for example even
+  /// though types of two functions might be the same, their locations
+  /// are different.
+  List<int> uriSignature;
+
+  /// The name of the enclosing class name, or `null` if outside a class.
+  String enclosingClassName;
+
+  /// The super class of the enclosing class, or `null` if outside a class.
+  TypeName enclosingSuperClass;
+
+  /// The precomputed signature of the enclosing class name, or `null` if
+  /// outside a class.
+  ///
+  /// It is mixed into every API token signature of every class member, because
+  /// for example even though types of two methods might be the same, their
+  /// locations are different.
+  List<int> enclosingClassNameSignature;
+
+  /// The node of the enclosing class.
+  Node enclosingClass;
+
+  _LibraryBuilder(this.uri, this.units);
+
+  Library build() {
+    uriSignature = (ApiSignature()..addString(uri.toString())).toByteList();
+
+    _addImports();
+    _addExports();
+
+    for (var unit in units) {
+      _addUnit(unit);
+    }
+    declaredNodes.sort(Node.compare);
+
+    return Library(uri, imports, exports, declaredNodes);
+  }
+
+  void _addClassOrMixin(ClassOrMixinDeclaration node) {
+    enclosingClassName = node.name.name;
+    if (node is ClassDeclaration) {
+      enclosingSuperClass = node.extendsClause?.superclass;
+    }
+
+    enclosingClassNameSignature =
+        (ApiSignature()..addString(enclosingClassName)).toByteList();
+
+    var apiTokenSignature = _computeTokenSignature(
+      node.beginToken,
+      node.leftBracket,
+    );
+
+    Dependencies api;
+    if (node is ClassDeclaration) {
+      api = referenceCollector.collect(
+        apiTokenSignature,
+        thisNodeName: enclosingClassName,
+        typeParameters: node.typeParameters,
+        extendsClause: node.extendsClause,
+        withClause: node.withClause,
+        implementsClause: node.implementsClause,
+      );
+    } else if (node is MixinDeclaration) {
+      api = referenceCollector.collect(
+        apiTokenSignature,
+        thisNodeName: enclosingClassName,
+        typeParameters: node.typeParameters,
+        onClause: node.onClause,
+        implementsClause: node.implementsClause,
+      );
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
+    }
+
+    enclosingClass = Node(
+      LibraryQualifiedName(uri, enclosingClassName),
+      node is MixinDeclaration ? NodeKind.MIXIN : NodeKind.CLASS,
+      api,
+      Dependencies.none,
+    );
+
+    var hasConstConstructor = node.members.any(
+      (m) => m is ConstructorDeclaration && m.constKeyword != null,
+    );
+
+    // TODO(scheglov) do we need type parameters at all?
+    List<Node> classTypeParameters;
+    if (node.typeParameters != null) {
+      classTypeParameters = <Node>[];
+      for (var typeParameter in node.typeParameters.typeParameters) {
+        var api = referenceCollector.collect(
+          _computeNodeTokenSignature(typeParameter),
+          enclosingClassName: enclosingClassName,
+          thisNodeName: typeParameter.name.name,
+          type: typeParameter.bound,
+        );
+        classTypeParameters.add(Node(
+          LibraryQualifiedName(uri, typeParameter.name.name),
+          NodeKind.TYPE_PARAMETER,
+          api,
+          Dependencies.none,
+          enclosingClass: enclosingClass,
+        ));
+      }
+      classTypeParameters.sort(Node.compare);
+      enclosingClass.setTypeParameters(classTypeParameters);
+    }
+
+    var classMembers = <Node>[];
+    var hasConstructor = false;
+    for (var member in node.members) {
+      if (member is ConstructorDeclaration) {
+        hasConstructor = true;
+        _addConstructor(classMembers, member);
+      } else if (member is FieldDeclaration) {
+        _addVariables(
+          classMembers,
+          member.metadata,
+          member.fields,
+          hasConstConstructor,
+        );
+      } else if (member is MethodDeclaration) {
+        _addMethod(classMembers, member);
+      } else {
+        throw UnimplementedError('(${member.runtimeType}) $member');
+      }
+    }
+
+    if (node is ClassDeclaration && !hasConstructor) {
+      classMembers.add(Node(
+        LibraryQualifiedName(uri, ''),
+        NodeKind.CONSTRUCTOR,
+        Dependencies.none,
+        Dependencies.none,
+        enclosingClass: enclosingClass,
+      ));
+    }
+
+    classMembers.sort(Node.compare);
+    enclosingClass.setClassMembers(classMembers);
+
+    declaredNodes.add(enclosingClass);
+    enclosingClassName = null;
+    enclosingClassNameSignature = null;
+    enclosingSuperClass = null;
+    enclosingClass = null;
+  }
+
+  void _addClassTypeAlias(ClassTypeAlias node) {
+    var apiTokenSignature = _computeNodeTokenSignature(node);
+    var api = referenceCollector.collect(
+      apiTokenSignature,
+      typeParameters: node.typeParameters,
+      superClass: node.superclass,
+      withClause: node.withClause,
+      implementsClause: node.implementsClause,
+    );
+
+    declaredNodes.add(Node(
+      LibraryQualifiedName(uri, node.name.name),
+      NodeKind.CLASS_TYPE_ALIAS,
+      api,
+      Dependencies.none,
+    ));
+  }
+
+  void _addConstructor(List<Node> classMembers, ConstructorDeclaration node) {
+    var builder = _newApiSignatureBuilder();
+    _appendMetadataTokens(builder, node.metadata);
+    _appendFormalParametersTokens(builder, node.parameters);
+    var apiTokenSignature = builder.toByteList();
+
+    var api = referenceCollector.collect(
+      apiTokenSignature,
+      enclosingClassName: enclosingClassName,
+      formalParameters: node.parameters,
+    );
+
+    var implTokenSignature = _computeNodeTokenSignature(node.body);
+    var impl = referenceCollector.collect(
+      implTokenSignature,
+      enclosingClassName: enclosingClassName,
+      enclosingSuperClass: enclosingSuperClass,
+      formalParametersForImpl: node.parameters,
+      constructorInitializers: node.initializers,
+      redirectedConstructor: node.redirectedConstructor,
+      functionBody: node.body,
+    );
+
+    classMembers.add(Node(
+      LibraryQualifiedName(uri, node.name?.name ?? ''),
+      NodeKind.CONSTRUCTOR,
+      api,
+      impl,
+      enclosingClass: enclosingClass,
+    ));
+  }
+
+  void _addEnum(EnumDeclaration node) {
+    var enumTokenSignature = _newApiSignatureBuilder().toByteList();
+
+    var enumNode = Node(
+      LibraryQualifiedName(uri, node.name.name),
+      NodeKind.ENUM,
+      Dependencies(enumTokenSignature, [], [], [], [], []),
+      Dependencies.none,
+    );
+
+    Dependencies fieldDependencies;
+    {
+      var builder = _newApiSignatureBuilder();
+      builder.addString(node.name.name);
+      _appendTokens(builder, node.leftBracket, node.rightBracket);
+      var tokenSignature = builder.toByteList();
+      fieldDependencies = Dependencies(tokenSignature, [], [], [], [], []);
+    }
+
+    var members = <Node>[];
+    for (var constant in node.constants) {
+      members.add(Node(
+        LibraryQualifiedName(uri, constant.name.name),
+        NodeKind.GETTER,
+        fieldDependencies,
+        Dependencies.none,
+        enclosingClass: enumNode,
+      ));
+    }
+
+    members.add(Node(
+      LibraryQualifiedName(uri, 'index'),
+      NodeKind.GETTER,
+      fieldDependencies,
+      Dependencies.none,
+      enclosingClass: enumNode,
+    ));
+
+    members.add(Node(
+      LibraryQualifiedName(uri, 'values'),
+      NodeKind.GETTER,
+      fieldDependencies,
+      Dependencies.none,
+      enclosingClass: enumNode,
+    ));
+
+    members.sort(Node.compare);
+    enumNode.setClassMembers(members);
+
+    declaredNodes.add(enumNode);
+  }
+
+  /// Fill [exports] with information about exports.
+  void _addExports() {
+    for (var directive in units.first.directives) {
+      if (directive is ExportDirective) {
+        var refUri = directive.uri.stringValue;
+        var importUri = uri.resolve(refUri);
+        var combinators = _getCombinators(directive);
+        exports.add(Export(importUri, combinators));
+      }
+    }
+  }
+
+  void _addFunction(FunctionDeclaration node) {
+    var functionExpression = node.functionExpression;
+
+    var builder = _newApiSignatureBuilder();
+    _appendMetadataTokens(builder, node.metadata);
+    _appendNodeTokens(builder, node.returnType);
+    _appendNodeTokens(builder, functionExpression.typeParameters);
+    _appendFormalParametersTokens(builder, functionExpression.parameters);
+    var apiTokenSignature = builder.toByteList();
+
+    var rawName = node.name.name;
+    var name = LibraryQualifiedName(uri, node.isSetter ? '$rawName=' : rawName);
+
+    NodeKind kind;
+    if (node.isGetter) {
+      kind = NodeKind.GETTER;
+    } else if (node.isSetter) {
+      kind = NodeKind.SETTER;
+    } else {
+      kind = NodeKind.FUNCTION;
+    }
+
+    var api = referenceCollector.collect(
+      apiTokenSignature,
+      thisNodeName: node.name.name,
+      typeParameters: functionExpression.typeParameters,
+      formalParameters: functionExpression.parameters,
+      returnType: node.returnType,
+    );
+
+    var body = functionExpression.body;
+    var implTokenSignature = _computeNodeTokenSignature(body);
+    var impl = referenceCollector.collect(
+      implTokenSignature,
+      thisNodeName: node.name.name,
+      formalParametersForImpl: functionExpression.parameters,
+      functionBody: body,
+    );
+
+    declaredNodes.add(Node(name, kind, api, impl));
+  }
+
+  void _addFunctionTypeAlias(FunctionTypeAlias node) {
+    var builder = _newApiSignatureBuilder();
+    _appendMetadataTokens(builder, node.metadata);
+    _appendNodeTokens(builder, node.typeParameters);
+    _appendNodeTokens(builder, node.returnType);
+    _appendFormalParametersTokens(builder, node.parameters);
+    var apiTokenSignature = builder.toByteList();
+
+    var api = referenceCollector.collect(
+      apiTokenSignature,
+      thisNodeName: node.name.name,
+      typeParameters: node.typeParameters,
+      formalParameters: node.parameters,
+      returnType: node.returnType,
+    );
+
+    declaredNodes.add(Node(
+      LibraryQualifiedName(uri, node.name.name),
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      api,
+      Dependencies.none,
+    ));
+  }
+
+  void _addGenericTypeAlias(GenericTypeAlias node) {
+    var functionType = node.functionType;
+
+    var builder = _newApiSignatureBuilder();
+    _appendMetadataTokens(builder, node.metadata);
+    _appendNodeTokens(builder, node.typeParameters);
+    _appendNodeTokens(builder, functionType.returnType);
+    _appendNodeTokens(builder, functionType.typeParameters);
+    _appendFormalParametersTokens(builder, functionType.parameters);
+    var apiTokenSignature = builder.toByteList();
+
+    var api = referenceCollector.collect(
+      apiTokenSignature,
+      typeParameters: node.typeParameters,
+      typeParameters2: functionType.typeParameters,
+      formalParameters: functionType.parameters,
+      returnType: functionType.returnType,
+    );
+
+    declaredNodes.add(Node(
+      LibraryQualifiedName(uri, node.name.name),
+      NodeKind.GENERIC_TYPE_ALIAS,
+      api,
+      Dependencies.none,
+    ));
+  }
+
+  /// Fill [imports] with information about imports.
+  void _addImports() {
+    var hasDartCoreImport = false;
+    for (var directive in units.first.directives) {
+      if (directive is ImportDirective) {
+        var refUri = directive.uri.stringValue;
+        var importUri = uri.resolve(refUri);
+
+        if (importUri.toString() == 'dart:core') {
+          hasDartCoreImport = true;
+        }
+
+        var combinators = _getCombinators(directive);
+
+        imports.add(Import(importUri, directive.prefix?.name, combinators));
+
+        if (directive.prefix != null) {
+          referenceCollector.addImportPrefix(directive.prefix.name);
+        }
+      }
+    }
+
+    if (!hasDartCoreImport) {
+      imports.add(Import(Uri.parse('dart:core'), null, []));
+    }
+  }
+
+  void _addMethod(List<Node> classMembers, MethodDeclaration node) {
+    var builder = _newApiSignatureBuilder();
+    _appendMetadataTokens(builder, node.metadata);
+    _appendNodeTokens(builder, node.returnType);
+    _appendNodeTokens(builder, node.typeParameters);
+    _appendFormalParametersTokens(builder, node.parameters);
+    var apiTokenSignature = builder.toByteList();
+
+    NodeKind kind;
+    if (node.isGetter) {
+      kind = NodeKind.GETTER;
+    } else if (node.isSetter) {
+      kind = NodeKind.SETTER;
+    } else {
+      kind = NodeKind.METHOD;
+    }
+
+    // TODO(scheglov) metadata, here and everywhere
+    var api = referenceCollector.collect(
+      apiTokenSignature,
+      enclosingClassName: enclosingClassName,
+      thisNodeName: node.name.name,
+      typeParameters: node.typeParameters,
+      formalParameters: node.parameters,
+      returnType: node.returnType,
+    );
+
+    var implTokenSignature = _computeNodeTokenSignature(node.body);
+    var impl = referenceCollector.collect(
+      implTokenSignature,
+      enclosingClassName: enclosingClassName,
+      thisNodeName: node.name.name,
+      formalParametersForImpl: node.parameters,
+      functionBody: node.body,
+    );
+
+    var name = LibraryQualifiedName(uri, node.name.name);
+    classMembers.add(
+      Node(name, kind, api, impl, enclosingClass: enclosingClass),
+    );
+  }
+
+  void _addUnit(CompilationUnit unit) {
+    for (var declaration in unit.declarations) {
+      if (declaration is ClassOrMixinDeclaration) {
+        _addClassOrMixin(declaration);
+      } else if (declaration is ClassTypeAlias) {
+        _addClassTypeAlias(declaration);
+      } else if (declaration is EnumDeclaration) {
+        _addEnum(declaration);
+      } else if (declaration is FunctionDeclaration) {
+        _addFunction(declaration);
+      } else if (declaration is FunctionTypeAlias) {
+        _addFunctionTypeAlias(declaration);
+      } else if (declaration is GenericTypeAlias) {
+        _addGenericTypeAlias(declaration);
+      } else if (declaration is TopLevelVariableDeclaration) {
+        _addVariables(
+          declaredNodes,
+          declaration.metadata,
+          declaration.variables,
+          false,
+        );
+      } else {
+        throw UnimplementedError('(${declaration.runtimeType}) $declaration');
+      }
+    }
+  }
+
+  void _addVariables(List<Node> variableNodes, List<Annotation> metadata,
+      VariableDeclarationList variables, bool appendInitializerToApi) {
+    if (variables.isConst || variables.type == null) {
+      appendInitializerToApi = true;
+    }
+
+    for (var variable in variables.variables) {
+      var initializer = variable.initializer;
+
+      var builder = _newApiSignatureBuilder();
+      builder.addInt(variables.isConst ? 1 : 0); // const flag
+      _appendMetadataTokens(builder, metadata);
+      _appendNodeTokens(builder, variables.type);
+      if (appendInitializerToApi) {
+        _appendNodeTokens(builder, initializer);
+      }
+
+      var apiTokenSignature = builder.toByteList();
+      var api = referenceCollector.collect(
+        apiTokenSignature,
+        enclosingClassName: enclosingClassName,
+        thisNodeName: variable.name.name,
+        type: variables.type,
+        expression: appendInitializerToApi ? initializer : null,
+      );
+
+      var implTokenSignature = _computeNodeTokenSignature(initializer);
+      var impl = referenceCollector.collect(
+        implTokenSignature,
+        enclosingClassName: enclosingClassName,
+        thisNodeName: variable.name.name,
+        expression: initializer,
+      );
+
+      var rawName = variable.name.name;
+      variableNodes.add(Node(
+        LibraryQualifiedName(uri, rawName),
+        NodeKind.GETTER,
+        api,
+        impl,
+        enclosingClass: enclosingClass,
+      ));
+
+      if (!variables.isConst && !variables.isFinal) {
+        // Note that one set of dependencies is enough for body.
+        // So, the setter has empty "impl" dependencies.
+        variableNodes.add(
+          Node(
+            LibraryQualifiedName(uri, '$rawName='),
+            NodeKind.SETTER,
+            api,
+            Dependencies.none,
+            enclosingClass: enclosingClass,
+          ),
+        );
+      }
+    }
+  }
+
+  /// Return the signature for all tokens of the [node].
+  List<int> _computeNodeTokenSignature(AstNode node) {
+    if (node == null) {
+      return const <int>[];
+    }
+    return _computeTokenSignature(node.beginToken, node.endToken);
+  }
+
+  /// Return the signature for tokens from [begin] to [end] (both including).
+  List<int> _computeTokenSignature(Token begin, Token end) {
+    var signature = _newApiSignatureBuilder();
+    _appendTokens(signature, begin, end);
+    return signature.toByteList();
+  }
+
+  /// Return a new signature builder, primed with the current context salts.
+  ApiSignature _newApiSignatureBuilder() {
+    var builder = ApiSignature();
+    builder.addBytes(uriSignature);
+    if (enclosingClassNameSignature != null) {
+      builder.addBytes(enclosingClassNameSignature);
+    }
+    return builder;
+  }
+
+  /// Append tokens of the given [parameters] to the [signature].
+  static void _appendFormalParametersTokens(
+      ApiSignature signature, FormalParameterList parameters) {
+    if (parameters == null) return;
+
+    for (var parameter in parameters.parameters) {
+      if (parameter.isRequired) {
+        signature.addInt(1);
+      } else if (parameter.isOptionalPositional) {
+        signature.addInt(2);
+      } else {
+        signature.addInt(3);
+      }
+
+      // If a simple not named parameter, we don't need its name.
+      // We should be careful to include also annotations.
+      if (parameter is SimpleFormalParameter && parameter.type != null) {
+        _appendTokens(
+          signature,
+          parameter.beginToken,
+          parameter.type.endToken,
+        );
+        continue;
+      }
+
+      // We don't know anything better than adding the whole parameter.
+      _appendNodeTokens(signature, parameter);
+    }
+  }
+
+  static void _appendMetadataTokens(
+      ApiSignature signature, List<Annotation> metadata) {
+    if (metadata != null) {
+      for (var annotation in metadata) {
+        _appendNodeTokens(signature, annotation);
+      }
+    }
+  }
+
+  /// Append tokens of the given [node] to the [signature].
+  static void _appendNodeTokens(ApiSignature signature, AstNode node) {
+    if (node != null) {
+      _appendTokens(signature, node.beginToken, node.endToken);
+    }
+  }
+
+  /// Append tokens from [begin] to [end] (both including) to the [signature].
+  static void _appendTokens(ApiSignature signature, Token begin, Token end) {
+    if (begin is CommentToken) {
+      begin = (begin as CommentToken).parent;
+    }
+
+    Token token = begin;
+    while (token != null) {
+      signature.addString(token.lexeme);
+
+      if (token == end) {
+        break;
+      }
+
+      var nextToken = token.next;
+      if (nextToken == token) {
+        break;
+      }
+
+      token = nextToken;
+    }
+  }
+
+  /// Return [Combinator]s for the given import or export [directive].
+  static List<Combinator> _getCombinators(NamespaceDirective directive) {
+    var combinators = <Combinator>[];
+    for (var combinator in directive.combinators) {
+      if (combinator is ShowCombinator) {
+        combinators.add(
+          Combinator(
+            true,
+            combinator.shownNames.map((id) => id.name).toList(),
+          ),
+        );
+      }
+      if (combinator is HideCombinator) {
+        combinators.add(
+          Combinator(
+            false,
+            combinator.hiddenNames.map((id) => id.name).toList(),
+          ),
+        );
+      }
+    }
+    return combinators;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
new file mode 100644
index 0000000..ef5022d
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
@@ -0,0 +1,246 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:typed_data';
+
+import 'package:analyzer/src/generated/utilities_general.dart';
+import 'package:convert/convert.dart';
+
+/// The reference to a class member.
+class ClassMemberReference {
+  /// The target class name.
+  ///
+  /// This is different from the class that actually turned out to define
+  /// the referenced member at the time of recording this reference. So, we
+  /// will notice added overrides in the target class, or anywhere in between.
+  final LibraryQualifiedName target;
+
+  /// The name referenced in the [target].
+  final String name;
+
+  @override
+  final int hashCode;
+
+  ClassMemberReference(this.target, this.name)
+      : hashCode = JenkinsSmiHash.hash2(target.hashCode, name.hashCode);
+
+  @override
+  bool operator ==(other) {
+    return other is ClassMemberReference &&
+        other.target == target &&
+        other.name == name;
+  }
+
+  @override
+  String toString() {
+    return '($target, $name)';
+  }
+
+  static int compare(ClassMemberReference first, ClassMemberReference second) {
+    var result = LibraryQualifiedName.compare(first.target, second.target);
+    if (result != 0) return result;
+
+    return first.name.compareTo(second.name);
+  }
+}
+
+/// The dependencies of the API or implementation portion of a node.
+class Dependencies {
+  static final none = Dependencies([], [], [], [], [], []);
+
+  /// The token signature of this portion of the node. It depends on all
+  /// tokens that might affect the node API or implementation resolution.
+  final List<int> tokenSignature;
+
+  /// The names that appear unprefixed in this portion of the node, and are
+  /// not defined locally in the node. Locally defined names themselves
+  /// depend on some non-local nodes, which will also recorded here.
+  ///
+  /// This list is sorted.
+  final List<String> unprefixedReferencedNames;
+
+  /// The names of import prefixes used to reference names in this node.
+  ///
+  /// This list is sorted.
+  final List<String> importPrefixes;
+
+  /// The names referenced by this node with the import prefix at the
+  /// corresponding index in [importPrefixes].
+  ///
+  /// This list is sorted.
+  final List<List<String>> importPrefixedReferencedNames;
+
+  /// The names that appear prefixed with `super` in this portion of the node.
+  ///
+  /// This list is sorted.
+  final List<String> superReferencedNames;
+
+  /// The class members referenced in this portion of the node.
+  ///
+  /// This list is sorted.
+  final List<ClassMemberReference> classMemberReferences;
+
+  /// All referenced nodes, computed from [unprefixedReferencedNames],
+  /// [importPrefixedReferencedNames], and [classMemberReferences].
+  List<Node> referencedNodes;
+
+  /// The transitive signature of this portion of the node, computed using
+  /// the [tokenSignature] of this node, and API signatures of the
+  /// [referencedNodes].
+  List<int> transitiveSignature;
+
+  Dependencies(
+      this.tokenSignature,
+      this.unprefixedReferencedNames,
+      this.importPrefixes,
+      this.importPrefixedReferencedNames,
+      this.superReferencedNames,
+      this.classMemberReferences);
+
+  String get tokenSignatureHex => hex.encode(tokenSignature);
+}
+
+/// A name qualified by a library URI.
+class LibraryQualifiedName {
+  /// The URI of the defining library.
+  /// Not `null`.
+  final Uri libraryUri;
+
+  /// The name of this name object.
+  /// If the name starts with `_`, then the name is private.
+  /// Names of setters end with `=`.
+  final String name;
+
+  /// Whether this name is private, and its [name] starts with `_`.
+  final bool isPrivate;
+
+  /// The cached, pre-computed hash code.
+  @override
+  final int hashCode;
+
+  factory LibraryQualifiedName(Uri libraryUri, String name) {
+    var isPrivate = name.startsWith('_');
+    var hashCode = JenkinsSmiHash.hash2(libraryUri.hashCode, name.hashCode);
+    return LibraryQualifiedName._internal(
+        libraryUri, name, isPrivate, hashCode);
+  }
+
+  LibraryQualifiedName._internal(
+      this.libraryUri, this.name, this.isPrivate, this.hashCode);
+
+  @override
+  bool operator ==(Object other) {
+    return other is LibraryQualifiedName &&
+        other.hashCode == hashCode &&
+        name == other.name &&
+        libraryUri == other.libraryUri;
+  }
+
+  /// Whether this name us accessible for the library with the given
+  /// [libraryUri], i.e. when the name is public, or is defined in a library
+  /// with the same URI.
+  bool isAccessibleFor(Uri libraryUri) {
+    return !isPrivate || this.libraryUri == libraryUri;
+  }
+
+  @override
+  String toString() => '$libraryUri::$name';
+
+  /// Compare given names by their raw names.
+  ///
+  /// This method should be used only for sorting, it does not follow the
+  /// complete semantics of [==] and [hashCode].
+  static int compare(LibraryQualifiedName first, LibraryQualifiedName second) {
+    return first.name.compareTo(second.name);
+  }
+}
+
+/// A dependency node - anything that has a name, and can be referenced.
+class Node {
+  /// The API or implementation signature used in [Dependencies]
+  /// as a marker that this node is changed, explicitly because its token
+  /// signature changed, or implicitly - because it references a changed node.
+  static final changedSignature = Uint8List.fromList([0xDE, 0xAD, 0xBE, 0xEF]);
+
+  final LibraryQualifiedName name;
+  final NodeKind kind;
+
+  /// Dependencies that affect the API of the node, so affect API or
+  /// implementation dependencies of the nodes that use this node.
+  final Dependencies api;
+
+  /// Additional (to the [api]) dependencies that affect only the
+  /// "implementation" of the node, e.g. the body of a method, but are not
+  /// visible outside of the node, and so don't affect any other nodes.
+  final Dependencies impl;
+
+  /// If the node is a class member, the node of the enclosing class.
+  /// Otherwise `null`.
+  final Node enclosingClass;
+
+  /// If the node is a class, the nodes of its type parameters.
+  /// Otherwise `null`.
+  List<Node> classTypeParameters;
+
+  /// If the node is a class, the sorted list of members in this class.
+  /// Otherwise `null`.
+  List<Node> classMembers;
+
+  Node(this.name, this.kind, this.api, this.impl,
+      {this.enclosingClass, this.classTypeParameters});
+
+  /// Return the node that can be referenced by the given [name] from the
+  /// library with the given [libraryUri].
+  Node getClassMember(Uri libraryUri, String name) {
+    // TODO(scheglov) The list is sorted, use this fact to search faster.
+    // TODO(scheglov) Collect superclass members here or outside.
+    for (var i = 0; i < classMembers.length; ++i) {
+      var member = classMembers[i];
+      var memberName = member.name;
+      if (memberName.name == name && memberName.isAccessibleFor(libraryUri)) {
+        return member;
+      }
+    }
+    return null;
+  }
+
+  /// Set new class members for this class.
+  void setClassMembers(List<Node> newClassMembers) {
+    classMembers = newClassMembers;
+  }
+
+  /// Set new class type parameters for this class.
+  void setTypeParameters(List<Node> newTypeParameters) {
+    classTypeParameters = newTypeParameters;
+  }
+
+  @override
+  String toString() {
+    if (enclosingClass != null) {
+      return '$enclosingClass::${name.name}';
+    }
+    return name.toString();
+  }
+
+  /// Compare given nodes by their names.
+  static int compare(Node first, Node second) {
+    return LibraryQualifiedName.compare(first.name, second.name);
+  }
+}
+
+/// Kinds of nodes.
+enum NodeKind {
+  CLASS,
+  CLASS_TYPE_ALIAS,
+  CONSTRUCTOR,
+  ENUM,
+  FUNCTION,
+  FUNCTION_TYPE_ALIAS,
+  GENERIC_TYPE_ALIAS,
+  GETTER,
+  METHOD,
+  MIXIN,
+  SETTER,
+  TYPE_PARAMETER,
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
new file mode 100644
index 0000000..09b4dae
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
@@ -0,0 +1,928 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/analysis/dependency/node.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:meta/meta.dart';
+
+/// Collector of information about external nodes referenced by a node.
+///
+/// The workflow for using it is that the library builder creates a new
+/// instance, fills it with names of import prefixes using [addImportPrefix].
+/// Then for each node defined in the library, [collect] is called with
+/// corresponding AST nodes to record references to external names, and
+/// construct the API or implementation [Dependencies].
+class ReferenceCollector {
+  /// Local scope inside the node, containing local names such as parameters,
+  /// local variables, local functions, local type parameters, etc.
+  final _LocalScopes _localScopes = _LocalScopes();
+
+  /// The list of names that are referenced without any prefix, neither an
+  /// import prefix, nor a target expression.
+  _NameSet _unprefixedReferences = _NameSet();
+
+  /// The list of names that are referenced using an import prefix.
+  ///
+  /// It is filled by [addImportPrefix] and shared across all nodes.
+  List<_ReferencedImportPrefixedNames> _importPrefixedReferences = [];
+
+  /// The list of names that are referenced with `super`.
+  _NameSet _superReferences = _NameSet();
+
+  /// The set of referenced class members.
+  _ClassMemberReferenceSet _memberReferences = _ClassMemberReferenceSet();
+
+  /// Record that the [name] is a name of an import prefix.
+  ///
+  /// So, when we see code like `prefix.foo` we know that `foo` should be
+  /// resolved in the import scope that corresponds to `prefix` (unless the
+  /// name `prefix` is shadowed by a local declaration).
+  void addImportPrefix(String name) {
+    assert(_localScopes.isEmpty);
+    for (var import in _importPrefixedReferences) {
+      if (import.prefix == name) {
+        return;
+      }
+    }
+    _importPrefixedReferences.add(_ReferencedImportPrefixedNames(name));
+  }
+
+  /// Construct and return a new [Dependencies] with the given [tokenSignature]
+  /// and all recorded references to external nodes in the given AST nodes.
+  Dependencies collect(List<int> tokenSignature,
+      {String enclosingClassName,
+      String thisNodeName,
+      List<ConstructorInitializer> constructorInitializers,
+      TypeName enclosingSuperClass,
+      Expression expression,
+      ExtendsClause extendsClause,
+      FormalParameterList formalParameters,
+      FormalParameterList formalParametersForImpl,
+      FunctionBody functionBody,
+      ImplementsClause implementsClause,
+      OnClause onClause,
+      ConstructorName redirectedConstructor,
+      TypeAnnotation returnType,
+      TypeName superClass,
+      TypeAnnotation type,
+      TypeParameterList typeParameters,
+      TypeParameterList typeParameters2,
+      WithClause withClause}) {
+    _localScopes.enter();
+
+    // The name of the node shadows any external names.
+    if (enclosingClassName != null) {
+      _localScopes.add(enclosingClassName);
+    }
+    if (thisNodeName != null) {
+      _localScopes.add(thisNodeName);
+    }
+
+    // Add type parameters first, they might be referenced later.
+    _visitTypeParameterList(typeParameters);
+    _visitTypeParameterList(typeParameters2);
+
+    // Parts of classes.
+    _visitTypeAnnotation(extendsClause?.superclass);
+    _visitTypeAnnotation(superClass);
+    _visitTypeAnnotations(withClause?.mixinTypes);
+    _visitTypeAnnotations(onClause?.superclassConstraints);
+    _visitTypeAnnotations(implementsClause?.interfaces);
+
+    // Parts of executables.
+    _visitFormalParameterList(formalParameters);
+    _visitFormalParameterListImpl(formalParametersForImpl);
+    _visitTypeAnnotation(returnType);
+    _visitFunctionBody(functionBody);
+
+    // Parts of constructors.
+    _visitConstructorInitializers(enclosingSuperClass, constructorInitializers);
+    _visitConstructorName(redirectedConstructor);
+
+    // Parts of variables.
+    _visitTypeAnnotation(type);
+    _visitExpression(expression);
+
+    _localScopes.exit();
+
+    var unprefixedReferencedNames = _unprefixedReferences.toList();
+    _unprefixedReferences = _NameSet();
+
+    var importPrefixCount = 0;
+    for (var i = 0; i < _importPrefixedReferences.length; i++) {
+      var import = _importPrefixedReferences[i];
+      if (import.names.isNotEmpty) {
+        importPrefixCount++;
+      }
+    }
+
+    var importPrefixes = List<String>(importPrefixCount);
+    var importPrefixedReferencedNames = List<List<String>>(importPrefixCount);
+    var importIndex = 0;
+    for (var i = 0; i < _importPrefixedReferences.length; i++) {
+      var import = _importPrefixedReferences[i];
+
+      if (import.names.isNotEmpty) {
+        importPrefixes[importIndex] = import.prefix;
+        importPrefixedReferencedNames[importIndex] = import.names.toList();
+        importIndex++;
+      }
+
+      import.clear();
+    }
+
+    var superReferencedNames = _superReferences.toList();
+    _superReferences = _NameSet();
+
+    var classMemberReferences = _memberReferences.toList();
+    _memberReferences = _ClassMemberReferenceSet();
+
+    return Dependencies(
+      tokenSignature,
+      unprefixedReferencedNames,
+      importPrefixes,
+      importPrefixedReferencedNames,
+      superReferencedNames,
+      classMemberReferences,
+    );
+  }
+
+  /// Return the collector for the import prefix with the given [name].
+  _ReferencedImportPrefixedNames _importPrefix(String name) {
+    assert(!_localScopes.contains(name));
+    for (var i = 0; i < _importPrefixedReferences.length; i++) {
+      var references = _importPrefixedReferences[i];
+      if (references.prefix == name) {
+        return references;
+      }
+    }
+    return null;
+  }
+
+  void _recordClassMemberReference(DartType targetType, String name) {
+    if (targetType is InterfaceType) {
+      _memberReferences.add(targetType.element, name);
+    }
+  }
+
+  /// Record a new unprefixed name reference.
+  void _recordUnprefixedReference(String name) {
+    assert(!_localScopes.contains(name));
+    _unprefixedReferences.add(name);
+  }
+
+  void _visitAdjacentStrings(AdjacentStrings node) {
+    var strings = node.strings;
+    for (var i = 0; i < strings.length; i++) {
+      var string = strings[i];
+      _visitExpression(string);
+    }
+  }
+
+  void _visitArgumentList(ArgumentList node) {
+    var arguments = node.arguments;
+    for (var i = 0; i < arguments.length; i++) {
+      var argument = arguments[i];
+      _visitExpression(argument);
+    }
+  }
+
+  void _visitAssignmentExpression(AssignmentExpression node) {
+    var assignmentType = node.operator.type;
+
+    _visitExpression(node.leftHandSide,
+        get: assignmentType != TokenType.EQ, set: true);
+    _visitExpression(node.rightHandSide);
+
+    if (assignmentType != TokenType.EQ &&
+        assignmentType != TokenType.QUESTION_QUESTION_EQ) {
+      var operatorType = operatorFromCompoundAssignment(assignmentType);
+      _recordClassMemberReference(
+        node.leftHandSide.staticType,
+        operatorType.lexeme,
+      );
+    }
+  }
+
+  void _visitBinaryExpression(BinaryExpression node) {
+    var operatorName = node.operator.lexeme;
+    var leftOperand = node.leftOperand;
+    if (leftOperand is SuperExpression) {
+      _superReferences.add(operatorName);
+    } else {
+      _visitExpression(leftOperand);
+      _recordClassMemberReference(leftOperand.staticType, operatorName);
+    }
+    _visitExpression(node.rightOperand);
+  }
+
+  void _visitBlock(Block node) {
+    if (node == null) return;
+
+    _visitStatements(node.statements);
+  }
+
+  void _visitCascadeExpression(CascadeExpression node) {
+    _visitExpression(node.target);
+    var sections = node.cascadeSections;
+    for (var i = 0; i < sections.length; i++) {
+      var section = sections[i];
+      _visitExpression(section);
+    }
+  }
+
+  /// Record reference to the constructor of the [type] with the given [name].
+  void _visitConstructor(TypeName type, SimpleIdentifier name) {
+    _visitTypeAnnotation(type);
+
+    if (name != null) {
+      _recordClassMemberReference(type.type, name.name);
+    } else {
+      _recordClassMemberReference(type.type, '');
+    }
+  }
+
+  void _visitConstructorInitializers(
+      TypeName superClass, List<ConstructorInitializer> initializers) {
+    if (initializers == null) return;
+
+    for (var i = 0; i < initializers.length; i++) {
+      var initializer = initializers[i];
+      if (initializer is AssertInitializer) {
+        _visitExpression(initializer.condition);
+        _visitExpression(initializer.message);
+      } else if (initializer is ConstructorFieldInitializer) {
+        _visitExpression(initializer.expression);
+      } else if (initializer is SuperConstructorInvocation) {
+        _visitConstructor(superClass, initializer.constructorName);
+        _visitArgumentList(initializer.argumentList);
+      } else if (initializer is RedirectingConstructorInvocation) {
+        _visitArgumentList(initializer.argumentList);
+        // Strongly speaking, we reference a field of the enclosing class.
+        //
+        // However the current plan is to resolve the whole library on a change.
+        // So, we will resolve the enclosing constructor anyway.
+      } else {
+        throw UnimplementedError('(${initializer.runtimeType}) $initializer');
+      }
+    }
+  }
+
+  void _visitConstructorName(ConstructorName node) {
+    if (node == null) return;
+
+    _visitConstructor(node.type, node.name);
+  }
+
+  void _visitExpression(Expression node, {bool get: true, bool set: false}) {
+    if (node == null) return;
+
+    if (node is AdjacentStrings) {
+      _visitAdjacentStrings(node);
+    } else if (node is AsExpression) {
+      _visitExpression(node.expression);
+      _visitTypeAnnotation(node.type);
+    } else if (node is AssignmentExpression) {
+      _visitAssignmentExpression(node);
+    } else if (node is AwaitExpression) {
+      _visitExpression(node.expression);
+    } else if (node is BinaryExpression) {
+      _visitBinaryExpression(node);
+    } else if (node is BooleanLiteral) {
+      // no dependencies
+    } else if (node is CascadeExpression) {
+      _visitCascadeExpression(node);
+    } else if (node is ConditionalExpression) {
+      _visitExpression(node.condition);
+      _visitExpression(node.thenExpression);
+      _visitExpression(node.elseExpression);
+    } else if (node is DoubleLiteral) {
+      // no dependencies
+    } else if (node is FunctionExpression) {
+      _visitFunctionExpression(node);
+    } else if (node is FunctionExpressionInvocation) {
+      _visitExpression(node.function);
+      _visitTypeArguments(node.typeArguments);
+      _visitArgumentList(node.argumentList);
+    } else if (node is IndexExpression) {
+      _visitIndexExpression(node, get: get, set: set);
+    } else if (node is InstanceCreationExpression) {
+      _visitInstanceCreationExpression(node);
+    } else if (node is IntegerLiteral) {
+      // no dependencies
+    } else if (node is IsExpression) {
+      _visitExpression(node.expression);
+      _visitTypeAnnotation(node.type);
+    } else if (node is ListLiteral) {
+      _visitListLiteral(node);
+    } else if (node is MapLiteral) {
+      _visitMapLiteral(node);
+    } else if (node is MethodInvocation) {
+      _visitMethodInvocation(node);
+    } else if (node is NamedExpression) {
+      _visitExpression(node.expression);
+    } else if (node is NullLiteral) {
+      // no dependencies
+    } else if (node is ParenthesizedExpression) {
+      _visitExpression(node.expression);
+    } else if (node is PostfixExpression) {
+      _visitPostfixExpression(node);
+    } else if (node is PrefixExpression) {
+      _visitPrefixExpression(node);
+    } else if (node is PrefixedIdentifier) {
+      _visitPrefixedIdentifier(node);
+    } else if (node is PropertyAccess) {
+      _visitPropertyAccess(node, get: get, set: set);
+    } else if (node is RethrowExpression) {
+      // no dependencies
+    } else if (node is SetLiteral) {
+      _visitSetLiteral(node);
+    } else if (node is SimpleIdentifier) {
+      _visitSimpleIdentifier(node, get: get, set: set);
+    } else if (node is SimpleStringLiteral) {
+      // no dependencies
+    } else if (node is StringInterpolation) {
+      _visitStringInterpolation(node);
+    } else if (node is SymbolLiteral) {
+      // no dependencies
+    } else if (node is ThisExpression) {
+      // Strongly speaking, "this" should add dependencies.
+      // Just like any class reference, it depends on the class hierarchy.
+      // For example adding a new type to the `implements` clause might make
+      // it OK to pass `this` as an argument of an invocation.
+      //
+      // However the current plan is to resolve the whole library on a change.
+      // So, we will resolve all implementations that reference `this`.
+    } else if (node is ThrowExpression) {
+      _visitExpression(node.expression);
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
+    }
+  }
+
+  void _visitForEachStatement(ForEachStatement node) {
+    var loopVariable = node.loopVariable;
+    if (loopVariable != null) {
+      _visitTypeAnnotation(loopVariable.type);
+    }
+
+    var loopIdentifier = node.identifier;
+    if (loopIdentifier != null) {
+      _visitExpression(loopIdentifier);
+    }
+
+    _visitExpression(node.iterable);
+
+    _localScopes.enter();
+    if (loopVariable != null) {
+      _localScopes.add(loopVariable.identifier.name);
+    }
+
+    _visitStatement(node.body);
+
+    _localScopes.exit();
+  }
+
+  void _visitFormalParameterList(FormalParameterList node) {
+    if (node == null) return;
+
+    var parameters = node.parameters;
+    for (var i = 0; i < parameters.length; i++) {
+      FormalParameter parameter = parameters[i];
+      if (parameter is DefaultFormalParameter) {
+        DefaultFormalParameter defaultParameter = parameter;
+        parameter = defaultParameter.parameter;
+      }
+      if (parameter.identifier != null) {
+        _localScopes.add(parameter.identifier.name);
+      }
+      if (parameter is FieldFormalParameter) {
+        _visitTypeAnnotation(parameter.type);
+        // Strongly speaking, we reference a field of the enclosing class.
+        //
+        // However the current plan is to resolve the whole library on a change.
+        // So, we will resolve the enclosing constructor anyway.
+      } else if (parameter is FunctionTypedFormalParameter) {
+        _visitTypeAnnotation(parameter.returnType);
+        _visitFormalParameterList(parameter.parameters);
+      } else if (parameter is SimpleFormalParameter) {
+        _visitTypeAnnotation(parameter.type);
+      } else {
+        throw StateError('Unexpected: (${parameter.runtimeType}) $parameter');
+      }
+    }
+  }
+
+  void _visitFormalParameterListImpl(FormalParameterList node) {
+    if (node == null) return;
+
+    var parameters = node.parameters;
+    for (var i = 0; i < parameters.length; i++) {
+      FormalParameter parameter = parameters[i];
+
+      if (parameter is DefaultFormalParameter) {
+        DefaultFormalParameter defaultParameter = parameter;
+        _visitExpression(defaultParameter.defaultValue);
+        parameter = defaultParameter.parameter;
+      }
+
+      if (parameter.identifier != null) {
+        _localScopes.add(parameter.identifier.name);
+      }
+    }
+  }
+
+  void _visitForStatement(ForStatement node) {
+    _localScopes.enter();
+
+    _visitVariableList(node.variables);
+    _visitExpression(node.initialization);
+    _visitExpression(node.condition);
+
+    var updaters = node.updaters;
+    for (var i = 0; i < updaters.length; i++) {
+      _visitExpression(updaters[i]);
+    }
+
+    _visitStatement(node.body);
+
+    _localScopes.exit();
+  }
+
+  void _visitFunctionBody(FunctionBody node) {
+    if (node == null) return;
+
+    if (node is BlockFunctionBody) {
+      _visitStatement(node.block);
+    } else if (node is EmptyFunctionBody) {
+      return;
+    } else if (node is ExpressionFunctionBody) {
+      _visitExpression(node.expression);
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
+    }
+  }
+
+  void _visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+    var function = node.functionDeclaration;
+    _visitTypeAnnotation(function.returnType);
+    _visitFunctionExpression(function.functionExpression);
+  }
+
+  void _visitFunctionExpression(FunctionExpression node) {
+    _localScopes.enter();
+    _visitTypeParameterList(node.typeParameters);
+    _visitFormalParameterList(node.parameters);
+    _visitFormalParameterListImpl(node.parameters);
+    _visitFunctionBody(node.body);
+    _localScopes.exit();
+  }
+
+  void _visitIndexExpression(IndexExpression node,
+      {@required bool get, @required bool set}) {
+    var target = node.target;
+    if (target == null) {
+      // no dependencies
+    } else if (target is SuperExpression) {
+      if (get) {
+        _superReferences.add('[]');
+      }
+      if (set) {
+        _superReferences.add('[]=');
+      }
+    } else {
+      _visitExpression(target);
+      var targetType = target.staticType;
+      if (get) {
+        _recordClassMemberReference(targetType, '[]');
+      }
+      if (set) {
+        _recordClassMemberReference(targetType, '[]=');
+      }
+    }
+
+    _visitExpression(node.index);
+  }
+
+  void _visitInstanceCreationExpression(InstanceCreationExpression node) {
+    _visitConstructorName(node.constructorName);
+    _visitArgumentList(node.argumentList);
+  }
+
+  void _visitListLiteral(ListLiteral node) {
+    _visitTypeArguments(node.typeArguments);
+    var elements = node.elements;
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      _visitExpression(element);
+    }
+  }
+
+  void _visitMapLiteral(MapLiteral node) {
+    _visitTypeArguments(node.typeArguments);
+    var entries = node.entries;
+    for (var i = 0; i < entries.length; i++) {
+      var entry = entries[i];
+      _visitExpression(entry.key);
+      _visitExpression(entry.value);
+    }
+  }
+
+  void _visitMethodInvocation(MethodInvocation node) {
+    var realTarget = node.realTarget;
+    if (realTarget == null) {
+      _visitExpression(node.methodName);
+    } else if (realTarget is SuperExpression) {
+      _superReferences.add(node.methodName.name);
+    } else {
+      _visitExpression(node.target);
+      _recordClassMemberReference(
+        realTarget.staticType,
+        node.methodName.name,
+      );
+    }
+    _visitTypeArguments(node.typeArguments);
+    _visitArgumentList(node.argumentList);
+  }
+
+  void _visitPostfixExpression(PostfixExpression node) {
+    _visitExpression(node.operand);
+
+    var operator = node.operator.type;
+    if (operator == TokenType.MINUS_MINUS) {
+      _recordClassMemberReference(node.operand.staticType, '-');
+    } else if (operator == TokenType.PLUS_PLUS) {
+      _recordClassMemberReference(node.operand.staticType, '+');
+    } else {
+      throw UnimplementedError('$operator');
+    }
+  }
+
+  void _visitPrefixedIdentifier(PrefixedIdentifier node) {
+    var prefix = node.prefix;
+    var prefixElement = prefix.staticElement;
+    if (prefixElement is PrefixElement) {
+      var prefixName = prefix.name;
+      var importPrefix = _importPrefix(prefixName);
+      importPrefix.add(node.identifier.name);
+    } else {
+      _visitExpression(prefix);
+      _recordClassMemberReference(prefix.staticType, node.identifier.name);
+    }
+  }
+
+  void _visitPrefixExpression(PrefixExpression node) {
+    _visitExpression(node.operand);
+
+    var operatorName = node.operator.lexeme;
+    if (operatorName == '-') operatorName = 'unary-';
+
+    _recordClassMemberReference(node.operand.staticType, operatorName);
+  }
+
+  void _visitPropertyAccess(PropertyAccess node,
+      {@required bool get, @required bool set}) {
+    var realTarget = node.realTarget;
+    var name = node.propertyName.name;
+
+    if (realTarget is SuperExpression) {
+      if (get) {
+        _superReferences.add(name);
+      }
+      if (set) {
+        _superReferences.add('$name=');
+      }
+    } else {
+      _visitExpression(node.target);
+      if (get) {
+        _recordClassMemberReference(realTarget.staticType, name);
+      }
+      if (set) {
+        _recordClassMemberReference(realTarget.staticType, '$name=');
+      }
+    }
+  }
+
+  void _visitSetLiteral(SetLiteral node) {
+    _visitTypeArguments(node.typeArguments);
+    var elements = node.elements;
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      _visitExpression(element);
+    }
+  }
+
+  void _visitSimpleIdentifier(SimpleIdentifier node,
+      {@required bool get, @required bool set}) {
+    if (node.isSynthetic) return;
+
+    var name = node.name;
+    if (_localScopes.contains(name) || name == 'void' || name == 'dynamic') {
+      return;
+    }
+
+    if (get) {
+      _recordUnprefixedReference(name);
+    }
+    if (set) {
+      _recordUnprefixedReference('$name=');
+    }
+  }
+
+  void _visitStatement(Statement node) {
+    if (node == null) return;
+
+    if (node is AssertStatement) {
+      _visitExpression(node.condition);
+      _visitExpression(node.message);
+    } else if (node is Block) {
+      _visitBlock(node);
+    } else if (node is BreakStatement) {
+      // nothing
+    } else if (node is ContinueStatement) {
+      // nothing
+    } else if (node is DoStatement) {
+      _visitStatement(node.body);
+      _visitExpression(node.condition);
+    } else if (node is EmptyStatement) {
+      // nothing
+    } else if (node is ExpressionStatement) {
+      _visitExpression(node.expression);
+    } else if (node is ForEachStatement) {
+      _visitForEachStatement(node);
+    } else if (node is ForStatement) {
+      _visitForStatement(node);
+    } else if (node is FunctionDeclarationStatement) {
+      _visitFunctionDeclarationStatement(node);
+    } else if (node is IfStatement) {
+      _visitExpression(node.condition);
+      _visitStatement(node.thenStatement);
+      _visitStatement(node.elseStatement);
+    } else if (node is LabeledStatement) {
+      _visitStatement(node.statement);
+    } else if (node is ReturnStatement) {
+      _visitExpression(node.expression);
+    } else if (node is SwitchStatement) {
+      _visitSwitchStatement(node);
+    } else if (node is TryStatement) {
+      _visitTryStatement(node);
+    } else if (node is VariableDeclarationStatement) {
+      _visitVariableList(node.variables);
+    } else if (node is WhileStatement) {
+      _visitExpression(node.condition);
+      _visitStatement(node.body);
+    } else if (node is YieldStatement) {
+      _visitExpression(node.expression);
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
+    }
+  }
+
+  void _visitStatements(List<Statement> statements) {
+    _localScopes.enter();
+
+    for (var i = 0; i < statements.length; i++) {
+      var statement = statements[i];
+      if (statement is FunctionDeclarationStatement) {
+        _localScopes.add(statement.functionDeclaration.name.name);
+      } else if (statement is VariableDeclarationStatement) {
+        var variables = statement.variables.variables;
+        for (int i = 0; i < variables.length; i++) {
+          _localScopes.add(variables[i].name.name);
+        }
+      }
+    }
+
+    for (var i = 0; i < statements.length; i++) {
+      var statement = statements[i];
+      _visitStatement(statement);
+    }
+
+    _localScopes.exit();
+  }
+
+  void _visitStringInterpolation(StringInterpolation node) {
+    var elements = node.elements;
+    for (var i = 0; i < elements.length; i++) {
+      var element = elements[i];
+      if (element is InterpolationExpression) {
+        _visitExpression(element.expression);
+      }
+    }
+  }
+
+  void _visitSwitchStatement(SwitchStatement node) {
+    _visitExpression(node.expression);
+    var members = node.members;
+    for (var i = 0; i < members.length; i++) {
+      var member = members[i];
+      if (member is SwitchCase) {
+        _visitExpression(member.expression);
+      }
+      _visitStatements(member.statements);
+    }
+  }
+
+  void _visitTryStatement(TryStatement node) {
+    _visitBlock(node.body);
+
+    var catchClauses = node.catchClauses;
+    for (var i = 0; i < catchClauses.length; i++) {
+      var catchClause = catchClauses[i];
+      _visitTypeAnnotation(catchClause.exceptionType);
+
+      _localScopes.enter();
+
+      var exceptionParameter = catchClause.exceptionParameter;
+      if (exceptionParameter != null) {
+        _localScopes.add(exceptionParameter.name);
+      }
+
+      var stackTraceParameter = catchClause.stackTraceParameter;
+      if (stackTraceParameter != null) {
+        _localScopes.add(stackTraceParameter.name);
+      }
+
+      _visitBlock(catchClause.body);
+
+      _localScopes.exit();
+    }
+
+    _visitBlock(node.finallyBlock);
+  }
+
+  void _visitTypeAnnotation(TypeAnnotation node) {
+    if (node == null) return;
+
+    if (node is GenericFunctionType) {
+      _localScopes.enter();
+
+      if (node.typeParameters != null) {
+        var typeParameters = node.typeParameters.typeParameters;
+        for (var i = 0; i < typeParameters.length; i++) {
+          var typeParameter = typeParameters[i];
+          _localScopes.add(typeParameter.name.name);
+        }
+        for (var i = 0; i < typeParameters.length; i++) {
+          var typeParameter = typeParameters[i];
+          _visitTypeAnnotation(typeParameter.bound);
+        }
+      }
+
+      _visitTypeAnnotation(node.returnType);
+      _visitFormalParameterList(node.parameters);
+
+      _localScopes.exit();
+    } else if (node is TypeName) {
+      var identifier = node.name;
+      _visitExpression(identifier);
+      _visitTypeArguments(node.typeArguments);
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
+    }
+  }
+
+  void _visitTypeAnnotations(List<TypeAnnotation> typeAnnotations) {
+    if (typeAnnotations == null) return;
+
+    for (var i = 0; i < typeAnnotations.length; i++) {
+      var typeAnnotation = typeAnnotations[i];
+      _visitTypeAnnotation(typeAnnotation);
+    }
+  }
+
+  void _visitTypeArguments(TypeArgumentList node) {
+    if (node == null) return;
+
+    _visitTypeAnnotations(node.arguments);
+  }
+
+  void _visitTypeParameterList(TypeParameterList node) {
+    if (node == null) return;
+
+    var typeParameters = node.typeParameters;
+
+    // Define all type parameters in the local scope.
+    for (var i = 0; i < typeParameters.length; i++) {
+      var typeParameter = typeParameters[i];
+      _localScopes.add(typeParameter.name.name);
+    }
+
+    // Record bounds.
+    for (var i = 0; i < typeParameters.length; i++) {
+      var typeParameter = typeParameters[i];
+      _visitTypeAnnotation(typeParameter.bound);
+    }
+  }
+
+  void _visitVariableList(VariableDeclarationList node) {
+    if (node == null) return;
+
+    _visitTypeAnnotation(node.type);
+
+    var variables = node.variables;
+    for (int i = 0; i < variables.length; i++) {
+      var variable = variables[i];
+      _localScopes.add(variable.name.name);
+      _visitExpression(variable.initializer);
+    }
+  }
+}
+
+/// The sorted set of [ClassMemberReference]s.
+class _ClassMemberReferenceSet {
+  final List<ClassMemberReference> references = [];
+
+  void add(ClassElement class_, String name) {
+    var target = LibraryQualifiedName(class_.library.source.uri, class_.name);
+    var reference = ClassMemberReference(target, name);
+    if (!references.contains(reference)) {
+      references.add(reference);
+    }
+  }
+
+  /// Return the sorted list of unique class member references.
+  List<ClassMemberReference> toList() {
+    references.sort(ClassMemberReference.compare);
+    return references;
+  }
+}
+
+/// The stack of names that are defined in a local scope inside the node,
+/// such as parameters, local variables, local functions, local type
+/// parameters, etc.
+class _LocalScopes {
+  /// The stack of name sets.
+  final List<_NameSet> scopes = [];
+
+  bool get isEmpty => scopes.isEmpty;
+
+  /// Add the given [name] to the current local scope.
+  void add(String name) {
+    scopes.last.add(name);
+  }
+
+  /// Return whether the given [name] is defined in one of the local scopes.
+  bool contains(String name) {
+    for (var i = 0; i < scopes.length; i++) {
+      if (scopes[i].contains(name)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /// Enter a new local scope, e.g. a block, or a type parameter scope.
+  void enter() {
+    scopes.add(_NameSet());
+  }
+
+  /// Exit the current local scope.
+  void exit() {
+    scopes.removeLast();
+  }
+}
+
+class _NameSet {
+  final List<String> names = [];
+
+  bool get isNotEmpty => names.isNotEmpty;
+
+  void add(String name) {
+    // TODO(scheglov) consider just adding, but toList() sort and unique
+    if (!contains(name)) {
+      names.add(name);
+    }
+  }
+
+  bool contains(String name) => names.contains(name);
+
+  List<String> toList() {
+    names.sort(_compareStrings);
+    return names;
+  }
+
+  static int _compareStrings(String first, String second) {
+    return first.compareTo(second);
+  }
+}
+
+class _ReferencedImportPrefixedNames {
+  final String prefix;
+  _NameSet names = _NameSet();
+
+  _ReferencedImportPrefixedNames(this.prefix);
+
+  void add(String name) {
+    names.add(name);
+  }
+
+  void clear() {
+    names = _NameSet();
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 6f2d3ec..9369ec0 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,13 +6,12 @@
 import 'dart:collection';
 import 'dart:typed_data';
 
+import 'package:analyzer/dart/analysis/analysis_context.dart' as api;
 import 'package:analyzer/dart/analysis/declared_variables.dart';
-import 'package:analyzer/dart/analysis/results.dart' as results;
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart'
-    show CompilationUnitElement, LibraryElement;
+import 'package:analyzer/dart/element/element.dart' show LibraryElement;
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/exception/exception.dart';
@@ -145,11 +144,6 @@
   AnalysisOptionsImpl _analysisOptions;
 
   /**
-   * The optional SDK bundle, used when the client cannot read SDK files.
-   */
-  final PackageBundle _sdkBundle;
-
-  /**
    * The [SourceFactory] is used to resolve URIs to paths and restore URIs
    * from file paths.
    */
@@ -166,16 +160,21 @@
   final ContextRoot contextRoot;
 
   /**
+   * The analysis context that created this driver / session.
+   */
+  api.AnalysisContext analysisContext;
+
+  /**
    * The salt to mix into all hashes used as keys for unlinked data.
    */
   final Uint32List _unlinkedSalt =
-      new Uint32List(1 + AnalysisOptionsImpl.unlinkedSignatureLength);
+      new Uint32List(2 + AnalysisOptionsImpl.unlinkedSignatureLength);
 
   /**
    * The salt to mix into all hashes used as keys for linked data.
    */
   final Uint32List _linkedSalt =
-      new Uint32List(1 + AnalysisOptions.signatureLength);
+      new Uint32List(2 + AnalysisOptions.signatureLength);
 
   /**
    * The set of priority files, that should be analyzed sooner.
@@ -186,7 +185,7 @@
    * The mapping from the files for which analysis was requested using
    * [getResult] to the [Completer]s to report the result.
    */
-  final _requestedFiles = <String, List<Completer<AnalysisResult>>>{};
+  final _requestedFiles = <String, List<Completer<ResolvedUnitResult>>>{};
 
   /**
    * The mapping from the files for which analysis was requested using
@@ -257,7 +256,7 @@
    * [getResult], and which were found to be parts without known libraries,
    * to the [Completer]s to report the result.
    */
-  final _requestedParts = <String, List<Completer<AnalysisResult>>>{};
+  final _requestedParts = <String, List<Completer<ResolvedUnitResult>>>{};
 
   /**
    * The set of part files that are currently scheduled for analysis.
@@ -267,12 +266,12 @@
   /**
    * The controller for the [results] stream.
    */
-  final _resultController = new StreamController<AnalysisResult>();
+  final _resultController = new StreamController<ResolvedUnitResult>();
 
   /**
    * The stream that will be written to when analysis results are produced.
    */
-  Stream<AnalysisResult> _onResults;
+  Stream<ResolvedUnitResult> _onResults;
 
   /**
    * Resolution signatures of the most recently produced results for files.
@@ -282,7 +281,7 @@
   /**
    * Cached results for [_priorityFiles].
    */
-  final Map<String, AnalysisResult> _priorityResults = {};
+  final Map<String, ResolvedUnitResult> _priorityResults = {};
 
   /**
    * The controller for the [exceptions] stream.
@@ -323,6 +322,11 @@
   final bool disableChangesAndCacheAllResults;
 
   /**
+   * Whether resolved units should be indexed.
+   */
+  final bool enableIndex;
+
+  /**
    * The cache to use with [disableChangesAndCacheAllResults].
    */
   final Map<String, AnalysisResult> _allCachedResults = {};
@@ -333,6 +337,13 @@
   AnalysisSessionImpl _currentSession;
 
   /**
+   * The current library context, consistent with the [_currentSession].
+   *
+   * TODO(scheglov) We probably should tie it into the session.
+   */
+  LibraryContext _libraryContext;
+
+  /**
    * Create a new instance of [AnalysisDriver].
    *
    * The given [SourceFactory] is cloned to ensure that it does not contain a
@@ -347,12 +358,11 @@
       this.contextRoot,
       SourceFactory sourceFactory,
       this._analysisOptions,
-      {PackageBundle sdkBundle,
-      this.disableChangesAndCacheAllResults: false,
+      {this.disableChangesAndCacheAllResults: false,
+      this.enableIndex: false,
       SummaryDataStore externalSummaries})
       : _logger = logger,
         _sourceFactory = sourceFactory.clone(),
-        _sdkBundle = sdkBundle,
         _externalSummaries = externalSummaries {
     _createNewSession();
     _onResults = _resultController.stream.asBroadcastStream();
@@ -456,7 +466,7 @@
    * Results might be produced even for files that have never been added
    * using [addFile], for example when [getResult] was called for a file.
    */
-  Stream<AnalysisResult> get results => _onResults;
+  Stream<ResolvedUnitResult> get results => _onResults;
 
   /**
    * Return the search support for the driver.
@@ -528,6 +538,7 @@
         _unitElementRequestedParts.isNotEmpty) {
       return AnalysisDriverPriority.general;
     }
+    _libraryContext = null;
     return AnalysisDriverPriority.nothing;
   }
 
@@ -539,13 +550,7 @@
     }
     if (AnalysisEngine.isDartFileName(path)) {
       _fileTracker.addFile(path);
-      // If the file is known, it has already been read, even if it did not
-      // exist. Now we are notified that the file exists, so we need to
-      // re-read it and make sure that we invalidate signature of the files
-      // that reference it.
-      if (_fsState.knownFilePaths.contains(path)) {
-        _changeFile(path);
-      }
+      _changeFile(path);
     }
   }
 
@@ -613,17 +618,17 @@
   }
 
   /**
-   * Return the cached [AnalysisResult] for the Dart file with the given [path].
-   * If there is no cached result, return `null`. Usually only results of
-   * priority files are cached.
+   * Return the cached [ResolvedUnitResult] for the Dart file with the given
+   * [path]. If there is no cached result, return `null`. Usually only results
+   * of priority files are cached.
    *
    * The [path] must be absolute and normalized.
    *
    * The [path] can be any file - explicitly or implicitly analyzed, or neither.
    */
-  AnalysisResult getCachedResult(String path) {
+  ResolvedUnitResult getCachedResult(String path) {
     _throwIfNotAbsolutePath(path);
-    AnalysisResult result = _priorityResults[path];
+    ResolvedUnitResult result = _priorityResults[path];
     if (disableChangesAndCacheAllResults) {
       result ??= _allCachedResults[path];
     }
@@ -647,13 +652,7 @@
 
     // Ask the analysis result without unit, so return cached errors.
     // If no cached analysis result, it will be computed.
-    AnalysisResult analysisResult = await _computeAnalysisResult(path);
-
-    // Check for asynchronous changes during computing the result.
-    await _runTestAsyncWorkDuringAnalysis(path);
-    if (_fileTracker.hasChangedFiles) {
-      analysisResult = null;
-    }
+    ResolvedUnitResult analysisResult = _computeAnalysisResult(path);
 
     // If not computed yet, because a part file without a known library,
     // we have to compute the full analysis result, with the unit.
@@ -662,7 +661,7 @@
       return null;
     }
 
-    return new ErrorsResult(currentSession, path, analysisResult.uri,
+    return new ErrorsResultImpl(currentSession, path, analysisResult.uri,
         analysisResult.lineInfo, analysisResult.isPart, analysisResult.errors);
   }
 
@@ -698,7 +697,7 @@
   FileResult getFileSync(String path) {
     _throwIfNotAbsolutePath(path);
     FileState file = _fileTracker.verifyApiSignature(path);
-    return new FileResult(
+    return new FileResultImpl(
         _currentSession, path, file.uri, file.lineInfo, file.isPart);
   }
 
@@ -709,6 +708,9 @@
    */
   Future<AnalysisDriverUnitIndex> getIndex(String path) {
     _throwIfNotAbsolutePath(path);
+    if (!enableIndex) {
+      throw new ArgumentError('Indexing is not enabled.');
+    }
     if (!_fsState.hasUri(path)) {
       return new Future.value();
     }
@@ -724,20 +726,78 @@
    * Return a [Future] that completes with the [LibraryElement] for the given
    * [uri], which is either resynthesized from the provided external summary
    * store, or built for a file to which the given [uri] is resolved.
+   *
+   * Throw [ArgumentError] if the [uri] corresponds to a part.
    */
   Future<LibraryElement> getLibraryByUri(String uri) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    if (_externalSummaries != null && _externalSummaries.hasUnlinkedUnit(uri)) {
-      return LibraryContext.resynthesizeLibraryElement(analysisOptions,
-          declaredVariables, sourceFactory, _externalSummaries, uri);
+    var uriObj = Uri.parse(uri);
+    var file = _fsState.getFileForUri(uriObj);
+
+    if (file.isExternalLibrary) {
+      return _createLibraryContext(file).getLibraryElement(file);
     }
-    Source source = sourceFactory.resolveUri(null, uri);
-    UnitElementResult unitResult = await getUnitElement(source.fullName);
+
+    if (file.isPart) {
+      throw ArgumentError('$uri is not a library.');
+    }
+
+    UnitElementResult unitResult = await getUnitElement(file.path);
     return unitResult.element.library;
   }
 
   /**
+   * Return a [ParsedLibraryResult] for the library with the given [path].
+   *
+   * Throw [ArgumentError] if the given [path] is not the defining compilation
+   * unit for a library (that is, is a part of a library).
+   *
+   * The [path] must be absolute and normalized.
+   */
+  ParsedLibraryResult getParsedLibrary(String path) {
+    FileState file = _fsState.getFileForPath(path);
+
+    if (file.isExternalLibrary) {
+      return ParsedLibraryResultImpl.external(currentSession, file.uri);
+    }
+
+    if (file.isPart) {
+      throw ArgumentError('Is a part: $path');
+    }
+
+    var units = <ParsedUnitResult>[];
+    for (var unitFile in file.libraryFiles) {
+      var unitPath = unitFile.path;
+      if (unitPath != null) {
+        var unitResult = parseFileSync(unitPath);
+        units.add(unitResult);
+      }
+    }
+
+    return ParsedLibraryResultImpl(currentSession, path, file.uri, units);
+  }
+
+  /**
+   * Return a [ParsedLibraryResult] for the library with the given [uri].
+   *
+   * Throw [ArgumentError] if the given [uri] is not the defining compilation
+   * unit for a library (that is, is a part of a library).
+   */
+  ParsedLibraryResult getParsedLibraryByUri(Uri uri) {
+    FileState file = _fsState.getFileForUri(uri);
+
+    if (file.isExternalLibrary) {
+      return ParsedLibraryResultImpl.external(currentSession, file.uri);
+    }
+
+    if (file.isPart) {
+      throw ArgumentError('Is a part: $uri');
+    }
+
+    // The file is a local file, we can get the result.
+    return getParsedLibrary(file.path);
+  }
+
+  /**
    * Return a [Future] that completes with a [ResolvedLibraryResult] for the
    * Dart library file with the given [path].  If the file is not a Dart file
    * or cannot be analyzed, the [Future] completes with `null`.
@@ -823,7 +883,7 @@
   }
 
   /**
-   * Return a [Future] that completes with a [AnalysisResult] for the Dart
+   * Return a [Future] that completes with a [ResolvedUnitResult] for the Dart
    * file with the given [path]. If the file is not a Dart file or cannot
    * be analyzed, the [Future] completes with `null`.
    *
@@ -841,7 +901,7 @@
    * of the files previously reported using [changeFile]), prior to the next
    * time the analysis state transitions to "idle".
    */
-  Future<AnalysisResult> getResult(String path,
+  Future<ResolvedUnitResult> getResult(String path,
       {bool sendCachedToStream: false}) {
     _throwIfNotAbsolutePath(path);
     if (!_fsState.hasUri(path)) {
@@ -850,7 +910,7 @@
 
     // Return the cached result.
     {
-      AnalysisResult result = getCachedResult(path);
+      ResolvedUnitResult result = getCachedResult(path);
       if (result != null) {
         if (sendCachedToStream) {
           _resultController.add(result);
@@ -860,9 +920,9 @@
     }
 
     // Schedule analysis.
-    var completer = new Completer<AnalysisResult>();
+    var completer = new Completer<ResolvedUnitResult>();
     _requestedFiles
-        .putIfAbsent(path, () => <Completer<AnalysisResult>>[])
+        .putIfAbsent(path, () => <Completer<ResolvedUnitResult>>[])
         .add(completer);
     _scheduler.notify(this);
     return completer.future;
@@ -959,17 +1019,11 @@
    * not a part, so it must be a library.
    */
   bool isLibraryByUri(Uri uri) {
-    if (_externalSummaries != null) {
-      var uriStr = uri.toString();
-      if (_externalSummaries.unlinkedMap[uriStr] != null) {
-        return _externalSummaries.linkedMap.containsKey(uriStr);
-      }
-    }
     return !_fsState.getFileForUri(uri).isPart;
   }
 
   /**
-   * Return a [Future] that completes with a [ParseResult] for the file
+   * Return a [Future] that completes with a [ParsedUnitResult] for the file
    * with the given [path].
    *
    * The [path] must be absolute and normalized.
@@ -980,14 +1034,14 @@
    * produced through the [results] stream (just because it is not a fully
    * resolved unit).
    */
-  Future<ParseResult> parseFile(String path) async {
+  Future<ParsedUnitResult> parseFile(String path) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     return parseFileSync(path);
   }
 
   /**
-   * Return a [ParseResult] for the file with the given [path].
+   * Return a [ParsedUnitResult] for the file with the given [path].
    *
    * The [path] must be absolute and normalized.
    *
@@ -997,17 +1051,17 @@
    * produced through the [results] stream (just because it is not a fully
    * resolved unit).
    */
-  ParseResult parseFileSync(String path) {
+  ParsedUnitResult parseFileSync(String path) {
     _throwIfNotAbsolutePath(path);
     FileState file = _fileTracker.verifyApiSignature(path);
     RecordingErrorListener listener = new RecordingErrorListener();
     CompilationUnit unit = file.parse(listener);
-    return new ParseResult(currentSession, file.path, file.uri, file.content,
-        file.lineInfo, file.isPart, unit, listener.errors);
+    return new ParsedUnitResultImpl(currentSession, file.path, file.uri,
+        file.content, file.lineInfo, file.isPart, unit, listener.errors);
   }
 
   @override
-  Future<Null> performWork() async {
+  Future<void> performWork() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     if (_fileTracker.verifyChangedFilesIfNeeded()) {
@@ -1018,13 +1072,7 @@
     if (_requestedFiles.isNotEmpty) {
       String path = _requestedFiles.keys.first;
       try {
-        AnalysisResult result =
-            await _computeAnalysisResult(path, withUnit: true);
-        // Check for asynchronous changes during computing the result.
-        await _runTestAsyncWorkDuringAnalysis(path);
-        if (_fileTracker.hasChangedFiles) {
-          return;
-        }
+        AnalysisResult result = _computeAnalysisResult(path, withUnit: true);
         // If a part without a library, delay its analysis.
         if (result == null) {
           _requestedParts
@@ -1067,7 +1115,7 @@
     // Process an index request.
     if (_indexRequestedFiles.isNotEmpty) {
       String path = _indexRequestedFiles.keys.first;
-      AnalysisDriverUnitIndex index = await _computeIndex(path);
+      AnalysisDriverUnitIndex index = _computeIndex(path);
       _indexRequestedFiles.remove(path).forEach((completer) {
         completer.complete(index);
       });
@@ -1094,7 +1142,7 @@
     // Process a unit element request.
     if (_unitElementRequestedFiles.isNotEmpty) {
       String path = _unitElementRequestedFiles.keys.first;
-      UnitElementResult result = await _computeUnitElement(path);
+      UnitElementResult result = _computeUnitElement(path);
       var completers = _unitElementRequestedFiles.remove(path);
       if (result != null) {
         completers.forEach((completer) {
@@ -1152,8 +1200,7 @@
         if (_fileTracker.isFilePending(path)) {
           try {
             AnalysisResult result =
-                await _computeAnalysisResult(path, withUnit: true);
-            await _runTestAsyncWorkDuringAnalysis(path);
+                _computeAnalysisResult(path, withUnit: true);
             if (result == null) {
               _partsToAnalyze.add(path);
             } else {
@@ -1173,9 +1220,8 @@
     if (_fileTracker.hasPendingFiles) {
       String path = _fileTracker.anyPendingFile;
       try {
-        AnalysisResult result = await _computeAnalysisResult(path,
+        AnalysisResult result = _computeAnalysisResult(path,
             withUnit: false, skipIfSameSignature: true);
-        await _runTestAsyncWorkDuringAnalysis(path);
         if (result == null) {
           _partsToAnalyze.add(path);
         } else if (result == AnalysisResult._UNCHANGED) {
@@ -1197,12 +1243,8 @@
     if (_requestedParts.isNotEmpty) {
       String path = _requestedParts.keys.first;
       try {
-        AnalysisResult result = await _computeAnalysisResult(path,
+        AnalysisResult result = _computeAnalysisResult(path,
             withUnit: true, asIsIfPartWithoutLibrary: true);
-        // Check for asynchronous changes during computing the result.
-        if (_fileTracker.hasChangedFiles) {
-          return;
-        }
         // Notify the completers.
         _requestedParts.remove(path).forEach((completer) {
           completer.complete(result);
@@ -1224,7 +1266,7 @@
       String path = _partsToAnalyze.first;
       _partsToAnalyze.remove(path);
       try {
-        AnalysisResult result = await _computeAnalysisResult(path,
+        AnalysisResult result = _computeAnalysisResult(path,
             withUnit: _priorityFiles.contains(path),
             asIsIfPartWithoutLibrary: true);
         _resultController.add(result);
@@ -1237,7 +1279,7 @@
     // Process a unit element signature request for a part.
     if (_unitElementSignatureParts.isNotEmpty) {
       String path = _unitElementSignatureParts.keys.first;
-      var signature =
+      String signature =
           _computeUnitElementSignature(path, asIsIfPartWithoutLibrary: true);
       _unitElementSignatureParts.remove(path).forEach((completer) {
         completer.complete(signature);
@@ -1249,7 +1291,7 @@
     if (_unitElementRequestedParts.isNotEmpty) {
       String path = _unitElementRequestedParts.keys.first;
       UnitElementResult result =
-          await _computeUnitElement(path, asIsIfPartWithoutLibrary: true);
+          _computeUnitElement(path, asIsIfPartWithoutLibrary: true);
       _unitElementRequestedParts.remove(path).forEach((completer) {
         completer.complete(result);
       });
@@ -1270,15 +1312,33 @@
     _throwIfNotAbsolutePath(path);
     _throwIfChangesAreNotAllowed();
     _fileTracker.removeFile(path);
+    _libraryContext = null;
     _priorityResults.clear();
   }
 
   /**
+   * Reset URI resolution, read again all files, build files graph, and ensure
+   * that for all added files new results are reported.
+   */
+  void resetUriResolution() {
+    _fsState.resetUriResolution();
+    _fileTracker.scheduleAllAddedFiles();
+    _changeHook();
+  }
+
+  /**
    * Implementation for [changeFile].
    */
   void _changeFile(String path) {
-    _fileTracker.changeFile(path);
-    _priorityResults.clear();
+    // If the file is known, it has already been read, even if it din't exist.
+    // Now we are notified that the file changed (just changed or added), so we
+    // need to re-read it and make sure that we invalidate signature of the
+    // files that reference it.
+    if (_fsState.knownFilePaths.contains(path)) {
+      _fileTracker.changeFile(path);
+      _libraryContext = null;
+      _priorityResults.clear();
+    }
   }
 
   /**
@@ -1287,6 +1347,7 @@
    */
   void _changeHook() {
     _createNewSession();
+    _libraryContext = null;
     _priorityResults.clear();
     _scheduler.notify(this);
   }
@@ -1306,12 +1367,10 @@
    * the resolved signature of the file in its library is the same as the one
    * that was the most recently produced to the client.
    */
-  Future<AnalysisResult> _computeAnalysisResult(String path,
+  AnalysisResult _computeAnalysisResult(String path,
       {bool withUnit: false,
       bool asIsIfPartWithoutLibrary: false,
-      bool skipIfSameSignature: false}) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+      bool skipIfSameSignature: false}) {
     FileState file = _fsState.getFileForPath(path);
 
     // Prepare the library - the file itself, or the known library.
@@ -1347,67 +1406,61 @@
     }
 
     // We need the fully resolved unit, or the result is not cached.
-    return _logger.runAsync('Compute analysis result for $path', () async {
-      // TODO(brianwilkerson) Determine whether this await is necessary.
-      await null;
+    return _logger.run('Compute analysis result for $path', () {
       try {
-        LibraryContext libraryContext;
-        try {
-          _testView.numOfAnalyzedLibraries++;
+        _testView.numOfAnalyzedLibraries++;
 
-          if (!_fsState.getFileForUri(Uri.parse('dart:core')).exists) {
-            return _newMissingDartLibraryResult(file, 'dart:core');
-          }
-          if (!_fsState.getFileForUri(Uri.parse('dart:async')).exists) {
-            return _newMissingDartLibraryResult(file, 'dart:async');
-          }
-          libraryContext = _createLibraryContext(library);
-
-          LibraryAnalyzer analyzer = new LibraryAnalyzer(
-              analysisOptions,
-              declaredVariables,
-              sourceFactory,
-              libraryContext.isLibraryUri,
-              libraryContext.analysisContext,
-              libraryContext.resynthesizer,
-              library,
-              _resourceProvider);
-          Map<FileState, UnitAnalysisResult> results = analyzer.analyze();
-
-          List<int> bytes;
-          CompilationUnit resolvedUnit;
-          for (FileState unitFile in results.keys) {
-            UnitAnalysisResult unitResult = results[unitFile];
-            List<int> unitBytes =
-                _serializeResolvedUnit(unitResult.unit, unitResult.errors);
-            String unitSignature = _getResolvedUnitSignature(library, unitFile);
-            String unitKey = _getResolvedUnitKey(unitSignature);
-            _byteStore.put(unitKey, unitBytes);
-            if (unitFile == file) {
-              bytes = unitBytes;
-              resolvedUnit = unitResult.unit;
-            }
-            if (disableChangesAndCacheAllResults) {
-              AnalysisResult result = _getAnalysisResultFromBytes(
-                  unitFile, unitSignature, unitBytes,
-                  content: unitFile.content, resolvedUnit: unitResult.unit);
-              _allCachedResults[unitFile.path] = result;
-            }
-          }
-
-          // Return the result, full or partial.
-          _logger.writeln('Computed new analysis result.');
-          AnalysisResult result = _getAnalysisResultFromBytes(
-              file, signature, bytes,
-              content: withUnit ? file.content : null,
-              resolvedUnit: withUnit ? resolvedUnit : null);
-          if (withUnit && _priorityFiles.contains(path)) {
-            _priorityResults[path] = result;
-          }
-          return result;
-        } finally {
-          libraryContext?.dispose();
+        if (!_fsState.getFileForUri(Uri.parse('dart:core')).exists) {
+          return _newMissingDartLibraryResult(file, 'dart:core');
         }
+        if (!_fsState.getFileForUri(Uri.parse('dart:async')).exists) {
+          return _newMissingDartLibraryResult(file, 'dart:async');
+        }
+        var libraryContext = _createLibraryContext(library);
+
+        LibraryAnalyzer analyzer = new LibraryAnalyzer(
+            analysisOptions,
+            declaredVariables,
+            sourceFactory,
+            libraryContext.isLibraryUri,
+            libraryContext.analysisContext,
+            libraryContext.resynthesizer,
+            libraryContext.inheritanceManager,
+            library,
+            _resourceProvider);
+        Map<FileState, UnitAnalysisResult> results = analyzer.analyze();
+
+        List<int> bytes;
+        CompilationUnit resolvedUnit;
+        for (FileState unitFile in results.keys) {
+          UnitAnalysisResult unitResult = results[unitFile];
+          List<int> unitBytes =
+              _serializeResolvedUnit(unitResult.unit, unitResult.errors);
+          String unitSignature = _getResolvedUnitSignature(library, unitFile);
+          String unitKey = _getResolvedUnitKey(unitSignature);
+          _byteStore.put(unitKey, unitBytes);
+          if (unitFile == file) {
+            bytes = unitBytes;
+            resolvedUnit = unitResult.unit;
+          }
+          if (disableChangesAndCacheAllResults) {
+            AnalysisResult result = _getAnalysisResultFromBytes(
+                unitFile, unitSignature, unitBytes,
+                content: unitFile.content, resolvedUnit: unitResult.unit);
+            _allCachedResults[unitFile.path] = result;
+          }
+        }
+
+        // Return the result, full or partial.
+        _logger.writeln('Computed new analysis result.');
+        AnalysisResult result = _getAnalysisResultFromBytes(
+            file, signature, bytes,
+            content: withUnit ? file.content : null,
+            resolvedUnit: withUnit ? resolvedUnit : null);
+        if (withUnit && _priorityFiles.contains(path)) {
+          _priorityResults[path] = result;
+        }
+        return result;
       } catch (exception, stackTrace) {
         String contextKey =
             _storeExceptionContext(path, library, exception, stackTrace);
@@ -1416,10 +1469,8 @@
     });
   }
 
-  Future<AnalysisDriverUnitIndex> _computeIndex(String path) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    AnalysisResult analysisResult = await _computeAnalysisResult(path,
+  AnalysisDriverUnitIndex _computeIndex(String path) {
+    AnalysisResult analysisResult = _computeAnalysisResult(path,
         withUnit: false, asIsIfPartWithoutLibrary: true);
     return analysisResult._index;
   }
@@ -1442,6 +1493,7 @@
           libraryContext.isLibraryUri,
           libraryContext.analysisContext,
           libraryContext.resynthesizer,
+          libraryContext.inheritanceManager,
           library,
           _resourceProvider);
       Map<FileState, UnitAnalysisResult> unitResults = analyzer.analyze();
@@ -1452,7 +1504,7 @@
           var unitResult = unitResults[unitFile];
           resolvedUnits.add(
             new AnalysisResult(
-              this,
+              currentSession,
               _sourceFactory,
               unitFile.path,
               unitFile.uri,
@@ -1474,16 +1526,14 @@
         library.path,
         library.uri,
         resolvedUnits.first.libraryElement,
-        libraryContext.analysisContext.typeProvider,
+        libraryContext.typeProvider,
         resolvedUnits,
       );
     });
   }
 
-  Future<UnitElementResult> _computeUnitElement(String path,
-      {bool asIsIfPartWithoutLibrary: false}) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  UnitElementResult _computeUnitElement(String path,
+      {bool asIsIfPartWithoutLibrary: false}) {
     FileState file = _fsState.getFileForPath(path);
 
     // Prepare the library - the file itself, or the known library.
@@ -1496,16 +1546,10 @@
       }
     }
 
-    LibraryContext libraryContext = _createLibraryContext(library);
-    try {
-      CompilationUnitElement element =
-          libraryContext.computeUnitElement(library.source, file.source);
-      String signature = library.transitiveSignature;
-      return new UnitElementResult(
-          currentSession, path, file.uri, signature, element);
-    } finally {
-      libraryContext.dispose();
-    }
+    var libraryContext = _createLibraryContext(library);
+    var element = libraryContext.computeUnitElement(library, file);
+    return new UnitElementResultImpl(
+        currentSession, path, file.uri, library.transitiveSignature, element);
   }
 
   String _computeUnitElementSignature(String path,
@@ -1551,17 +1595,28 @@
    * Return the context in which the [library] should be analyzed.
    */
   LibraryContext _createLibraryContext(FileState library) {
-    _testView.numOfCreatedLibraryContexts++;
-    return new LibraryContext.forSingleLibrary(
-        library,
-        _logger,
-        _sdkBundle,
-        _byteStore,
-        _analysisOptions,
-        declaredVariables,
-        _sourceFactory,
-        _externalSummaries,
-        fsState);
+    if (_libraryContext != null) {
+      if (_libraryContext.pack()) {
+        _libraryContext = null;
+      }
+    }
+
+    if (_libraryContext == null) {
+      _libraryContext = new LibraryContext(
+        session: currentSession,
+        logger: _logger,
+        fsState: fsState,
+        byteStore: _byteStore,
+        analysisOptions: _analysisOptions,
+        declaredVariables: declaredVariables,
+        sourceFactory: _sourceFactory,
+        externalSummaries: _externalSummaries,
+        targetLibrary: library,
+      );
+    } else {
+      _libraryContext.load(library);
+    }
+    return _libraryContext;
   }
 
   /**
@@ -1584,10 +1639,12 @@
    */
   void _fillSalt() {
     _unlinkedSalt[0] = DATA_VERSION;
-    _unlinkedSalt.setAll(1, _analysisOptions.unlinkedSignature);
+    _unlinkedSalt[1] = enableIndex ? 1 : 0;
+    _unlinkedSalt.setAll(2, _analysisOptions.unlinkedSignature);
 
     _linkedSalt[0] = DATA_VERSION;
-    _linkedSalt.setAll(1, _analysisOptions.signature);
+    _linkedSalt[1] = enableIndex ? 1 : 0;
+    _linkedSalt.setAll(2, _analysisOptions.signature);
   }
 
   /**
@@ -1601,7 +1658,7 @@
     List<AnalysisError> errors = _getErrorsFromSerialized(file, unit.errors);
     _updateHasErrorOrWarningFlag(file, errors);
     return new AnalysisResult(
-        this,
+        currentSession,
         _sourceFactory,
         file.path,
         file.uri,
@@ -1691,7 +1748,7 @@
       FileState file, String missingUri) {
     // TODO(scheglov) Find a better way to report this.
     return new AnalysisResult(
-        this,
+        currentSession,
         _sourceFactory,
         file.path,
         file.uri,
@@ -1721,26 +1778,13 @@
   }
 
   /**
-   * Runs any asynchronous work that was injected as part of a test using
-   * [AnalysisDriverTestView.workToWaitAfterComputingResult].
-   *
-   * If the test view indicates that there is work to do, performs the work
-   * and returns a [Future] that will be signaled when the work completes.
-   *
-   * This gives tests a reliable way to simulate file changes during analysis.
-   */
-  Future _runTestAsyncWorkDuringAnalysis(String path) {
-    var work = _testView.workToWaitAfterComputingResult;
-    _testView.workToWaitAfterComputingResult = null;
-    return work != null ? work(path) : new Future.value();
-  }
-
-  /**
    * Serialize the given [resolvedUnit] errors and index into bytes.
    */
   List<int> _serializeResolvedUnit(
       CompilationUnit resolvedUnit, List<AnalysisError> errors) {
-    AnalysisDriverUnitIndexBuilder index = indexUnit(resolvedUnit);
+    AnalysisDriverUnitIndexBuilder index = enableIndex
+        ? indexUnit(resolvedUnit)
+        : new AnalysisDriverUnitIndexBuilder();
     return new AnalysisDriverResolvedUnitBuilder(
             errors: errors
                 .map((error) => new AnalysisDriverUnitErrorBuilder(
@@ -1763,7 +1807,7 @@
     }
     try {
       List<AnalysisDriverExceptionFileBuilder> contextFiles = libraryFile
-          .transitiveFiles
+          .libraryFiles
           .map((file) => new AnalysisDriverExceptionFileBuilder(
               path: file.path, content: file.content))
           .toList();
@@ -1887,7 +1931,7 @@
   /**
    * Perform a single chunk of work and produce [results].
    */
-  Future<Null> performWork();
+  Future<void> performWork();
 }
 
 /**
@@ -2019,13 +2063,13 @@
    * If the status is currently idle, the returned future will be signaled
    * immediately.
    */
-  Future<Null> waitForIdle() => _statusSupport.waitForIdle();
+  Future<void> waitForIdle() => _statusSupport.waitForIdle();
 
   /**
    * Run infinitely analysis cycle, selecting the drivers with the highest
    * priority first.
    */
-  Future<Null> _run() async {
+  Future<void> _run() async {
     // Give other microtasks the time to run before doing the analysis cycle.
     await null;
     Stopwatch timer = new Stopwatch()..start();
@@ -2092,34 +2136,20 @@
 class AnalysisDriverTestView {
   final AnalysisDriver driver;
 
-  int numOfCreatedLibraryContexts = 0;
-
   int numOfAnalyzedLibraries = 0;
 
-  /**
-   * If non-null, a function that should be executed asynchronously after
-   * the next result is computed.
-   *
-   * This can be used by a test to simulate file changes during analysis.
-   */
-  WorkToWaitAfterComputingResult workToWaitAfterComputingResult;
-
   AnalysisDriverTestView(this.driver);
 
   FileTracker get fileTracker => driver._fileTracker;
 
-  Map<String, AnalysisResult> get priorityResults => driver._priorityResults;
+  Map<String, ResolvedUnitResult> get priorityResults {
+    return driver._priorityResults;
+  }
 
-  Future<SummaryDataStore> getSummaryStore(String libraryPath) async {
+  SummaryDataStore getSummaryStore(String libraryPath) {
     FileState library = driver.fsState.getFileForPath(libraryPath);
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     LibraryContext libraryContext = driver._createLibraryContext(library);
-    try {
-      return libraryContext.store;
-    } finally {
-      libraryContext.dispose();
-    }
+    return libraryContext.store;
   }
 }
 
@@ -2134,88 +2164,52 @@
  * Every result is independent, and is not guaranteed to be consistent with
  * any previously returned result, even inside of the same library.
  */
-class AnalysisResult extends FileResult implements results.ResolvedUnitResult {
+class AnalysisResult extends ResolvedUnitResultImpl {
   static final _UNCHANGED = new AnalysisResult(
       null, null, null, null, null, null, null, null, null, null, null, null);
-
-  /**
-   * The [AnalysisDriver] that produced this result.
-   */
-  final AnalysisDriver driver;
-
   /**
    * The [SourceFactory] with which the file was analyzed.
    */
   final SourceFactory sourceFactory;
 
   /**
-   * Return `true` if the file exists.
-   */
-  final bool exists;
-
-  @override
-  final String content;
-
-  /**
    * The signature of the result based on the content of the file, and the
    * transitive closure of files imported and exported by the library of
    * the requested file.
    */
   final String _signature;
 
-  @override
-  final CompilationUnit unit;
-
-  @override
-  final List<AnalysisError> errors;
-
   /**
    * The index of the unit.
    */
   final AnalysisDriverUnitIndex _index;
 
   AnalysisResult(
-      this.driver,
+      AnalysisSession session,
       this.sourceFactory,
       String path,
       Uri uri,
-      this.exists,
-      this.content,
+      bool exists,
+      String content,
       LineInfo lineInfo,
       bool isPart,
       this._signature,
-      this.unit,
-      this.errors,
+      CompilationUnit unit,
+      List<AnalysisError> errors,
       this._index)
-      : super(driver?.currentSession, path, uri, lineInfo, isPart);
+      : super(session, path, uri, exists, content, lineInfo, isPart, unit,
+            errors);
 
   @override
   LibraryElement get libraryElement => unit.declaredElement.library;
 
   @override
-  results.ResultState get state =>
-      exists ? results.ResultState.VALID : results.ResultState.NOT_A_FILE;
-
-  @override
   TypeProvider get typeProvider => unit.declaredElement.context.typeProvider;
 
   @override
   TypeSystem get typeSystem => unit.declaredElement.context.typeSystem;
 }
 
-abstract class BaseAnalysisResult implements results.AnalysisResult {
-  @override
-  final AnalysisSession session;
-
-  @override
-  final String path;
-
-  @override
-  final Uri uri;
-
-  BaseAnalysisResult(this.session, this.path, this.uri);
-}
-
 class DriverPerformance {
   static final PerformanceTag driver =
       PerformanceStatistics.analyzer.createChild('driver');
@@ -2242,25 +2236,6 @@
 }
 
 /**
- * The errors in a single file.
- *
- * These results are self-consistent, i.e. [errors] and [lineInfo] correspond
- * to each other. But none of the results is guaranteed to be consistent with
- * the state of the files.
- */
-class ErrorsResult extends FileResult implements results.ErrorsResult {
-  @override
-  final List<AnalysisError> errors;
-
-  ErrorsResult(AnalysisSession session, String path, Uri uri, LineInfo lineInfo,
-      bool isPart, this.errors)
-      : super(session, path, uri, lineInfo, isPart);
-
-  @override
-  results.ResultState get state => results.ResultState.VALID;
-}
-
-/**
  * Exception that happened during analysis.
  */
 class ExceptionResult {
@@ -2288,83 +2263,6 @@
 }
 
 /**
- * The result of computing some cheap information for a single file, when full
- * parsed file is not required, so [ParseResult] is not necessary.
- */
-class FileResult extends BaseAnalysisResult implements results.FileResult {
-  @override
-  final LineInfo lineInfo;
-
-  @override
-  final bool isPart;
-
-  FileResult(
-      AnalysisSession session, String path, Uri uri, this.lineInfo, this.isPart)
-      : super(session, path, uri);
-
-  @override
-  results.ResultState get state => results.ResultState.VALID;
-}
-
-/**
- * The result of parsing of a single file.
- *
- * These results are self-consistent, i.e. [content], [lineInfo], the
- * parsed [unit] correspond to each other. But none of the results is
- * guaranteed to be consistent with the state of the files.
- */
-class ParseResult extends FileResult implements results.ParseResult {
-  @override
-  final String content;
-
-  @override
-  final CompilationUnit unit;
-
-  @override
-  final List<AnalysisError> errors;
-
-  ParseResult(AnalysisSession session, String path, Uri uri, this.content,
-      LineInfo lineInfo, bool isPart, this.unit, this.errors)
-      : super(session, path, uri, lineInfo, isPart);
-
-  @override
-  results.ResultState get state => results.ResultState.VALID;
-}
-
-/**
- * The result with the [CompilationUnitElement] of a single file.
- *
- * These results are self-consistent, i.e. all elements and types accessible
- * through [element], including defined in other files, correspond to each
- * other. But none of the results is guaranteed to be consistent with the state
- * of the files.
- *
- * Every result is independent, and is not guaranteed to be consistent with
- * any previously returned result, even inside of the same library.
- */
-class UnitElementResult extends BaseAnalysisResult
-    implements results.UnitElementResult {
-  /**
-   * The signature of the [element] is based the APIs of the files of the
-   * library (including the file itself) of the requested file and the
-   * transitive closure of files imported and exported by the library.
-   */
-  final String signature;
-
-  /**
-   * The element of the file.
-   */
-  final CompilationUnitElement element;
-
-  UnitElementResult(AnalysisSession session, String path, Uri uri,
-      this.signature, this.element)
-      : super(session, path, uri);
-
-  @override
-  results.ResultState get state => results.ResultState.VALID;
-}
-
-/**
  * Task that discovers all files that are available to the driver, and makes
  * them known.
  */
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart b/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart
index f96d909..6d35e0e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/dart/analysis/context_root.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart' hide AnalysisResult;
+import 'package:analyzer/src/dart/analysis/driver.dart' show AnalysisDriver;
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptions;
 
 /**
@@ -31,7 +31,9 @@
    * to access the file system and that is based on the given analysis [driver].
    */
   DriverBasedAnalysisContext(
-      this.resourceProvider, this.contextRoot, this.driver);
+      this.resourceProvider, this.contextRoot, this.driver) {
+    driver.analysisContext = this;
+  }
 
   @override
   AnalysisOptions get analysisOptions => driver.analysisOptions;
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
new file mode 100644
index 0000000..8dad745
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -0,0 +1,177 @@
+// 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.
+
+// Note: the plan is to generate this file from a YAML representation somewhere
+// in the SDK repo.  Please do not add any code to this file that can't be
+// easily code generated based on a knowledge of the current set of experimental
+// flags and their status.
+// TODO(paulberry,kmillikin): once code generation is implemented, replace this
+// notice with a notice that this file is generated and a pointer to the source
+// YAML file and the regeneration tool.
+
+// Note: to demonstrate how code is supposed to be generated for expired flags,
+// this file contains bogus expired flags called "bogus-enabled" and
+// "bogus-disabled".  They are not used and can be removed at the time that code
+// generation is implemented.
+
+import 'package:analyzer/src/dart/analysis/experiments_impl.dart';
+import 'package:meta/meta.dart';
+
+export 'package:analyzer/src/dart/analysis/experiments_impl.dart'
+    show
+        ConflictingFlags,
+        ExperimentalFeature,
+        IllegalUseOfExpiredFlag,
+        UnnecessaryUseOfExpiredFlag,
+        UnrecognizedFlag,
+        validateFlags,
+        ValidationResult;
+
+/// Gets access to the private list of boolean flags in an [Experiments] object.
+/// For testing use only.
+@visibleForTesting
+List<bool> getExperimentalFlags_forTesting(ExperimentStatus status) =>
+    status._enableFlags;
+
+/// Constant strings for enabling each of the currently known experimental
+/// flags.
+class EnableString {
+  /// String to enable the experiment "constant-update"
+  static const String constant_update_2018 = 'constant-update-2018';
+
+  /// String to enable the experiment "non-nullable"
+  static const String non_nullable = 'non-nullable';
+
+  /// String to enable the experiment "set-literals"
+  static const String set_literals = 'set-literals';
+
+  /// String to enable the experiment "bogus-disabled"
+  static const String bogus_disabled = 'bogus-disabled';
+
+  /// String to enable the experiment "bogus-enabled"
+  static const String bogus_enabled = 'bogus-enabled';
+}
+
+/// A representation of the set of experiments that are active and whether they
+/// are enabled.
+class ExperimentStatus {
+  /// A map containing information about all known experimental flags.
+  static const knownFeatures = <String, ExperimentalFeature>{
+    EnableString.constant_update_2018: const ExperimentalFeature(
+        0,
+        EnableString.constant_update_2018,
+        IsEnabledByDefault.constant_update_2018,
+        IsExpired.constant_update_2018,
+        'Q4 2018 Constant Update'),
+    EnableString.set_literals: const ExperimentalFeature(
+        1,
+        EnableString.set_literals,
+        IsEnabledByDefault.set_literals,
+        IsExpired.set_literals,
+        'Set Literals'),
+    EnableString.non_nullable: const ExperimentalFeature(
+        2,
+        EnableString.non_nullable,
+        IsEnabledByDefault.non_nullable,
+        IsExpired.non_nullable,
+        'Non Nullable'),
+    EnableString.bogus_disabled: const ExperimentalFeature(
+        null,
+        EnableString.bogus_disabled,
+        IsEnabledByDefault.bogus_disabled,
+        IsExpired.bogus_disabled,
+        null),
+    EnableString.bogus_enabled: const ExperimentalFeature(
+        null,
+        EnableString.bogus_enabled,
+        IsEnabledByDefault.bogus_enabled,
+        IsExpired.bogus_enabled,
+        null),
+  };
+
+  final List<bool> _enableFlags;
+
+  /// Initializes a newly created set of experiments based on optional
+  /// arguments.
+  ExperimentStatus(
+      {bool constant_update_2018, bool set_literals, bool non_nullable})
+      : _enableFlags = <bool>[
+          constant_update_2018 ?? IsEnabledByDefault.constant_update_2018,
+          set_literals ?? IsEnabledByDefault.set_literals,
+          non_nullable ?? IsEnabledByDefault.non_nullable,
+        ];
+
+  /// Decodes the strings given in [flags] into a representation of the set of
+  /// experiments that should be enabled.
+  ///
+  /// Always succeeds, even if the input flags are invalid.  Expired and
+  /// unrecognized flags are ignored, conflicting flags are resolved in favor of
+  /// the flag appearing last.
+  ExperimentStatus.fromStrings(List<String> flags) : this._(decodeFlags(flags));
+
+  ExperimentStatus._(this._enableFlags);
+
+  /// Hardcoded state for the expired flag "bogus_disabled"
+  bool get bogus_disabled => false;
+
+  /// Hardcoded state for the expired flag "bogus_enabled"
+  bool get bogus_enabled => true;
+
+  /// Current state for the flag "constant-update-2018"
+  bool get constant_update_2018 => _enableFlags[0];
+
+  /// Current state for the flag "non-nullable"
+  bool get non_nullable => _enableFlags[2];
+
+  /// Current state for the flag "set-literals"
+  bool get set_literals => _enableFlags[1];
+
+  /// Queries whether the given [feature] is enabled or disabled.
+  bool isEnabled(ExperimentalFeature feature) => feature.isExpired
+      ? feature.isEnabledByDefault
+      : _enableFlags[feature.index];
+
+  /// Returns a list of strings suitable for passing to
+  /// [ExperimentStatus.fromStrings].
+  List<String> toStringList() => experimentStatusToStringList(this);
+}
+
+/// Constant bools indicating whether each experimental flag is currently
+/// enabled by default.
+class IsEnabledByDefault {
+  /// Default state of the experiment "constant-update"
+  static const bool constant_update_2018 = false;
+
+  /// Default state of the experiment "non-nullable"
+  static const bool non_nullable = false;
+
+  /// Default state of the experiment "set-literals"
+  static const bool set_literals = false;
+
+  /// Default state of the experiment "bogus-disabled"
+  static const bool bogus_disabled = false;
+
+  /// Default state of the experiment "bogus-enabled"
+  static const bool bogus_enabled = true;
+}
+
+/// Constant bools indicating whether each experimental flag is currently
+/// expired (meaning its enable/disable status can no longer be altered from the
+/// value in [IsEnabledByDefault]).
+class IsExpired {
+  /// Expiration status of the experiment "constant-update"
+  static const bool constant_update_2018 = false;
+
+  /// Expiration status of the experiment "non-nullable"
+  static const bool non_nullable = false;
+
+  /// Expiration status of the experiment "set-literals"
+  static const bool set_literals = false;
+
+  /// Expiration status of the experiment "bogus-disabled"
+  static const bool bogus_disabled = true;
+
+  /// Expiration status of the experiment "bogus-enabled"
+  static const bool bogus_enabled = true;
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart b/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
new file mode 100644
index 0000000..64d4b7e
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
@@ -0,0 +1,327 @@
+// 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/src/dart/analysis/experiments.dart';
+import 'package:meta/meta.dart';
+
+/// The same as [ExperimentStatus.knownFeatures], except when a call to
+/// [overrideKnownFeatures] is in progress.
+Map<String, ExperimentalFeature> _knownFeatures =
+    ExperimentStatus.knownFeatures;
+
+/// Decodes the strings given in [flags] into a list of booleans representing
+/// experiments that should be enabled.
+///
+/// Always succeeds, even if the input flags are invalid.  Expired and
+/// unrecognized flags are ignored, conflicting flags are resolved in favor of
+/// the flag appearing last.
+List<bool> decodeFlags(List<String> flags) {
+  var decodedFlags = <bool>[];
+  for (var feature in _knownFeatures.values) {
+    if (feature.isExpired) continue;
+    var index = feature.index;
+    while (decodedFlags.length <= index) {
+      decodedFlags.add(false);
+    }
+    decodedFlags[index] = feature.isEnabledByDefault;
+  }
+  for (var entry in _flagStringsToMap(flags).entries) {
+    decodedFlags[entry.key] = entry.value;
+  }
+  return decodedFlags;
+}
+
+/// Converts the flags in [status] to a list of strings suitable for
+/// passing to [_decodeFlags].
+List<String> experimentStatusToStringList(ExperimentStatus status) {
+  var result = <String>[];
+  for (var feature in _knownFeatures.values) {
+    if (feature.isExpired) continue;
+    var isEnabled = status.isEnabled(feature);
+    if (isEnabled != feature.isEnabledByDefault) {
+      result.add(feature.stringForValue(isEnabled));
+    }
+  }
+  return result;
+}
+
+/// Execute the callback, pretending that the given [knownFeatures] take the
+/// place of [ExperimentStatus.knownFeatures].
+///
+/// It isn't safe to call this method with an asynchronous callback, because it
+/// only changes the set of known features during the time that [callback] is
+/// (synchronously) executing.
+@visibleForTesting
+T overrideKnownFeatures<T>(
+    Map<String, ExperimentalFeature> knownFeatures, T callback()) {
+  var oldKnownFeatures = _knownFeatures;
+  try {
+    _knownFeatures = knownFeatures;
+    return callback();
+  } finally {
+    _knownFeatures = oldKnownFeatures;
+  }
+}
+
+/// Validates whether there are any disagreements between the strings given in
+/// [flags1] and the strings given in [flags2].
+///
+/// The returned iterable yields any problems that were found.  Only reports
+/// problems related to combining the flags; problems that would be found by
+/// applying [validateFlags] to [flags1] or [flags2] individually are not
+/// reported.
+///
+/// If no problems are found, it is safe to concatenate the flag lists.  If
+/// problems are found, the only negative side effect is that some flags in
+/// one list may be overridden by some flags in the other list.
+///
+/// TODO(paulberry): if this method ever needs to be exposed via the analyzer
+/// public API, consider making a version that reports validation results using
+/// the AnalysisError type.
+Iterable<ConflictingFlagLists> validateFlagCombination(
+    List<String> flags1, List<String> flags2) sync* {
+  var flag1Map = _flagStringsToMap(flags1);
+  var flag2Map = _flagStringsToMap(flags2);
+  for (var entry in flag2Map.entries) {
+    if (flag1Map[entry.key] != null && flag1Map[entry.key] != entry.value) {
+      yield new ConflictingFlagLists(
+          _featureIndexToFeature(entry.key), !entry.value);
+    }
+  }
+}
+
+/// Validates whether the strings given in [flags] constitute a valid set of
+/// experimental feature enable/disable flags.
+///
+/// The returned iterable yields any problems that were found.
+///
+/// TODO(paulberry): if this method ever needs to be exposed via the analyzer
+/// public API, consider making a version that reports validation results using
+/// the AnalysisError type.
+Iterable<ValidationResult> validateFlags(List<String> flags) sync* {
+  var previousFlagIndex = <int, int>{};
+  var previousFlagValue = <int, bool>{};
+  for (int flagIndex = 0; flagIndex < flags.length; flagIndex++) {
+    var flag = flags[flagIndex];
+    ExperimentalFeature feature;
+    bool requestedValue;
+    if (flag.startsWith('no-')) {
+      feature = _knownFeatures[flag.substring(3)];
+      requestedValue = false;
+    } else {
+      feature = _knownFeatures[flag];
+      requestedValue = true;
+    }
+    if (feature == null) {
+      yield UnrecognizedFlag(flagIndex, flag);
+    } else if (feature.isExpired) {
+      yield requestedValue == feature.isEnabledByDefault
+          ? UnnecessaryUseOfExpiredFlag(flagIndex, feature)
+          : IllegalUseOfExpiredFlag(flagIndex, feature);
+    } else if (previousFlagIndex.containsKey(feature.index) &&
+        previousFlagValue[feature.index] != requestedValue) {
+      yield ConflictingFlags(
+          flagIndex, previousFlagIndex[feature.index], feature, requestedValue);
+    } else {
+      previousFlagIndex[feature.index] = flagIndex;
+      previousFlagValue[feature.index] = requestedValue;
+    }
+  }
+}
+
+ExperimentalFeature _featureIndexToFeature(int index) {
+  for (var feature in _knownFeatures.values) {
+    if (feature.index == index) return feature;
+  }
+  throw new ArgumentError('Unrecognized feature index');
+}
+
+Map<int, bool> _flagStringsToMap(List<String> flags) {
+  var result = <int, bool>{};
+  for (int flagIndex = 0; flagIndex < flags.length; flagIndex++) {
+    var flag = flags[flagIndex];
+    ExperimentalFeature feature;
+    bool requestedValue;
+    if (flag.startsWith('no-')) {
+      feature = _knownFeatures[flag.substring(3)];
+      requestedValue = false;
+    } else {
+      feature = _knownFeatures[flag];
+      requestedValue = true;
+    }
+    if (feature != null && !feature.isExpired) {
+      result[feature.index] = requestedValue;
+    }
+  }
+  return result;
+}
+
+/// Indication of a conflict between two lists of flags.
+class ConflictingFlagLists {
+  /// Info about which feature the user requested conflicting values for
+  final ExperimentalFeature feature;
+
+  /// True if the first list of flags requested to enable the experimental
+  /// feature.
+  final bool firstValue;
+
+  ConflictingFlagLists(this.feature, this.firstValue);
+}
+
+/// Validation result indicating that the user requested conflicting values for
+/// an experimental flag (e.g. both "foo" and "no-foo").
+class ConflictingFlags extends ValidationResult {
+  /// Info about which feature the user requested conflicting values for
+  final ExperimentalFeature feature;
+
+  /// The index of the first of the two conflicting strings.
+  ///
+  /// [stringIndex] is the index of the second of the two conflicting strings.
+  final int previousStringIndex;
+
+  /// True if the string at [stringIndex] requested to enable the experimental
+  /// feature.
+  ///
+  /// The string at [previousStringIndex] requested the opposite.
+  final bool requestedValue;
+
+  ConflictingFlags(int stringIndex, this.previousStringIndex, this.feature,
+      this.requestedValue)
+      : super._(stringIndex);
+
+  @override
+  String get flag => feature.stringForValue(requestedValue);
+
+  @override
+  bool get isError => true;
+
+  @override
+  String get message {
+    var previousFlag = feature.stringForValue(!requestedValue);
+    return 'Flag "$flag" conflicts with previous flag "$previousFlag"';
+  }
+}
+
+/// Information about a single experimental flag that the user might use to
+/// request that a feature be enabled (or disabled).
+class ExperimentalFeature {
+  /// Index of the flag in the private data structure maintained by
+  /// [ExperimentStatus].
+  ///
+  /// For expired features, the index should be null, since no enable/disable
+  /// state needs to be stored.
+  ///
+  /// This index should not be relied upon to be stable over time.  For instance
+  /// it should not be used to serialize the state of experiments to long term
+  /// storage if there is any expectation of compatibility between analyzer
+  /// versions.
+  final int index;
+
+  /// The string to enable the feature.
+  final String enableString;
+
+  /// Whether the feature is currently enabled by default.
+  final bool isEnabledByDefault;
+
+  /// Whether the flag is currently expired (meaning the enable/disable status
+  /// can no longer be altered from the value in [isEnabledByDefault]).
+  final bool isExpired;
+
+  /// Documentation for the feature, if known.  `null` for expired flags.
+  final String documentation;
+
+  const ExperimentalFeature(this.index, this.enableString,
+      this.isEnabledByDefault, this.isExpired, this.documentation)
+      : assert(isExpired ? index == null : index != null);
+
+  /// The string to disable the feature.
+  String get disableString => 'no-$enableString';
+
+  /// Retrieves the string to enable or disable the feature, depending on
+  /// [value].
+  String stringForValue(bool value) => value ? enableString : disableString;
+
+  @override
+  String toString() => enableString;
+}
+
+/// Validation result indicating that the user requested enabling or disabling
+/// of a feature associated with an expired flag, and the requested behavior
+/// conflicts with the behavior that is now hardcoded into the toolchain.
+class IllegalUseOfExpiredFlag extends ValidationResult {
+  /// Information about the feature associated with the error.
+  final ExperimentalFeature feature;
+
+  IllegalUseOfExpiredFlag(int flagIndex, this.feature) : super._(flagIndex);
+
+  @override
+  String get flag => feature.stringForValue(!feature.isEnabledByDefault);
+
+  @override
+  bool get isError => true;
+
+  @override
+  String get message {
+    var state = feature.isEnabledByDefault ? 'enabled' : 'disabled';
+    return 'Flag "$flag" was supplied, but the feature is already '
+        'unconditionally $state.';
+  }
+}
+
+/// Validation result indicating that the user requested enabling or disabling
+/// of a feature associated with an expired flag, and the requested behavior
+/// is consistent with the behavior that is now hardcoded into the toolchain.
+/// (This is merely a warning, not an error).
+class UnnecessaryUseOfExpiredFlag extends ValidationResult {
+  /// Information about the feature associated with the warning.
+  final ExperimentalFeature feature;
+
+  UnnecessaryUseOfExpiredFlag(int flagIndex, this.feature) : super._(flagIndex);
+
+  @override
+  String get flag => feature.stringForValue(feature.isEnabledByDefault);
+
+  @override
+  bool get isError => false;
+
+  @override
+  String get message => 'Flag "$flag" is no longer required.';
+}
+
+/// Validation result indicating that the user requested enabling or disabling
+/// an unrecognized feature.
+class UnrecognizedFlag extends ValidationResult {
+  @override
+  final String flag;
+
+  UnrecognizedFlag(int flagIndex, this.flag) : super._(flagIndex);
+
+  @override
+  bool get isError => true;
+
+  @override
+  String get message => 'Flag "$flag" not recognized.';
+}
+
+/// Representation of a single error or warning reported by
+/// [ExperimentStatus.fromStrings].
+abstract class ValidationResult {
+  /// Indicates which of the supplied strings is associated with the error or
+  /// warning.
+  final int stringIndex;
+
+  ValidationResult._(this.stringIndex);
+
+  /// The supplied string associated with the error or warning.
+  String get flag;
+
+  /// Indicates whether the validation result is an error or a warning.
+  bool get isError;
+
+  /// Message describing the problem.
+  String get message;
+
+  @override
+  String toString() => message;
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
index 7c1a7fe..eecc2ca 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -62,7 +62,7 @@
   /**
    * If the cache clean up process has not been requested yet, request it.
    */
-  Future<Null> _requestCacheCleanUp() async {
+  Future<void> _requestCacheCleanUp() async {
     if (_cleanUpSendPortShouldBePrepared) {
       _cleanUpSendPortShouldBePrepared = false;
       ReceivePort response = new ReceivePort();
@@ -110,7 +110,8 @@
     List<File> files = <File>[];
     Map<File, FileStat> fileStatMap = {};
     int currentSizeBytes = 0;
-    List<FileSystemEntity> resources = new Directory(cachePath).listSync();
+    List<FileSystemEntity> resources =
+        new Directory(cachePath).listSync(recursive: true);
     for (FileSystemEntity resource in resources) {
       if (resource is File) {
         try {
@@ -148,6 +149,7 @@
  */
 class FileByteStore implements ByteStore {
   static final FileByteStoreValidator _validator = new FileByteStoreValidator();
+  static final _dotCodeUnit = '.'.codeUnitAt(0);
 
   final String _cachePath;
   final String _tempSuffix;
@@ -164,17 +166,18 @@
 
   @override
   List<int> get(String key) {
+    if (!_canShard(key)) return null;
+
     List<int> bytes = _writeInProgress[key];
     if (bytes != null) {
       return bytes;
     }
 
     try {
-      final File file = _getFileForKey(key);
-      if (!file.existsSync()) {
-        return null;
-      }
-      return _validator.getData(file.readAsBytesSync());
+      var shardPath = _getShardPath(key);
+      var path = join(shardPath, key);
+      var bytes = new File(path).readAsBytesSync();
+      return _validator.getData(bytes);
     } catch (_) {
       // ignore exceptions
       return null;
@@ -183,15 +186,22 @@
 
   @override
   void put(String key, List<int> bytes) {
+    if (!_canShard(key)) return;
+
     _writeInProgress[key] = bytes;
 
     final List<int> wrappedBytes = _validator.wrapData(bytes);
 
     // We don't wait for the write and rename to complete.
     _pool.execute(() {
-      final File tempFile = _getFileForKey('$key$_tempSuffix');
+      var tempPath = join(_cachePath, '$key$_tempSuffix');
+      var tempFile = new File(tempPath);
       return tempFile.writeAsBytes(wrappedBytes).then((_) {
-        return tempFile.rename(join(_cachePath, key));
+        var shardPath = _getShardPath(key);
+        return Directory(shardPath).create(recursive: true).then((_) {
+          var path = join(shardPath, key);
+          return tempFile.rename(path);
+        });
       }).catchError((_) {
         // ignore exceptions
       }).whenComplete(() {
@@ -202,7 +212,16 @@
     });
   }
 
-  File _getFileForKey(String key) => new File(join(_cachePath, key));
+  String _getShardPath(String key) {
+    var shardName = key.substring(0, 2);
+    return join(_cachePath, shardName);
+  }
+
+  static bool _canShard(String key) {
+    return key.length > 2 &&
+        key.codeUnitAt(0) != _dotCodeUnit &&
+        key.codeUnitAt(1) != _dotCodeUnit;
+  }
 }
 
 /**
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index e627abb..35f1df0 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -12,6 +12,8 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/defined_names.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/analysis/library_graph.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/referenced_names.dart';
 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart';
@@ -125,8 +127,11 @@
   List<NameFilter> _exportFilters;
 
   Set<FileState> _directReferencedFiles;
-  Set<FileState> _transitiveFiles;
+  Set<FileState> _directReferencedLibraries;
+
+  LibraryCycle _libraryCycle;
   String _transitiveSignature;
+  String _transitiveSignatureLinked;
 
   Map<String, TopLevelDeclaration> _topLevelDeclarations;
   Map<String, TopLevelDeclaration> _exportedTopLevelDeclarations;
@@ -147,6 +152,7 @@
         source = null,
         _exists = true {
     _apiSignature = new Uint8List(16);
+    _libraryCycle = new LibraryCycle.external();
   }
 
   /**
@@ -187,6 +193,11 @@
   Set<FileState> get directReferencedFiles => _directReferencedFiles;
 
   /**
+   * Return the set of all directly referenced libraries - imported or exported.
+   */
+  Set<FileState> get directReferencedLibraries => _directReferencedLibraries;
+
+  /**
    * Return `true` if the file exists.
    */
   bool get exists => _exists;
@@ -213,6 +224,8 @@
    */
   List<FileState> get importedFiles => _importedFiles;
 
+  LibraryCycle get internal_libraryCycle => _libraryCycle;
+
   /**
    * Return `true` if the file is a stub created for a library in the provided
    * external summary store.
@@ -254,6 +267,23 @@
     }
   }
 
+  /// Return the [LibraryCycle] this file belongs to, even if it consists of
+  /// just this file.  If the library cycle is not known yet, compute it.
+  LibraryCycle get libraryCycle {
+    if (isPart) {
+      var library = this.library;
+      if (library != null) {
+        return library.libraryCycle;
+      }
+    }
+
+    if (_libraryCycle == null) {
+      computeLibraryCycle(_fsState._linkedSalt, this);
+    }
+
+    return _libraryCycle;
+  }
+
   /**
    * The list of files files that this library consists of, i.e. this library
    * file itself and its [partedFiles].
@@ -331,39 +361,26 @@
   }
 
   /**
-   * Return the set of transitive files - the file itself and all of the
-   * directly or indirectly referenced files.
+   * Return the signature of the file, based on API signatures of the
+   * transitive closure of imported / exported files.
    */
-  Set<FileState> get transitiveFiles {
-    if (_transitiveFiles == null) {
-      _transitiveFiles = new Set<FileState>();
-
-      void appendReferenced(FileState file) {
-        if (_transitiveFiles.add(file)) {
-          file._directReferencedFiles?.forEach(appendReferenced);
-        }
+  String get transitiveSignature {
+    if (isPart) {
+      var library = this.library;
+      if (library != null) {
+        return library.transitiveSignature;
       }
-
-      appendReferenced(this);
     }
-    return _transitiveFiles;
+
+    this.libraryCycle; // sets _transitiveSignature
+    return _transitiveSignature;
   }
 
   /**
-   * Return the signature of the file, based on the [transitiveFiles].
+   * The value `transitiveSignature.linked` is used often, so we cache it.
    */
-  String get transitiveSignature {
-    if (_transitiveSignature == null) {
-      ApiSignature signature = new ApiSignature();
-      signature.addUint32List(_fsState._linkedSalt);
-      signature.addInt(transitiveFiles.length);
-      transitiveFiles
-          .map((file) => file.apiSignature)
-          .forEach(signature.addBytes);
-      signature.addString(uri.toString());
-      _transitiveSignature = signature.toHex();
-    }
-    return _transitiveSignature;
+  String get transitiveSignatureLinked {
+    return _transitiveSignatureLinked ??= '$transitiveSignature.linked';
   }
 
   /**
@@ -381,6 +398,17 @@
     return other is FileState && other.uri == uri;
   }
 
+  void internal_setLibraryCycle(LibraryCycle cycle, String signature) {
+    if (cycle == null) {
+      _libraryCycle = null;
+      _transitiveSignature = null;
+      _transitiveSignatureLinked = null;
+    } else {
+      _libraryCycle = cycle;
+      _transitiveSignature = signature;
+    }
+  }
+
   /**
    * Return a new parsed unresolved [CompilationUnit].
    *
@@ -461,14 +489,11 @@
     _apiSignature = newApiSignature;
 
     // The API signature changed.
-    //   Flush transitive signatures of affected files.
+    //   Flush affected library cycles.
     //   Flush exported top-level declarations of all files.
     if (apiSignatureChanged) {
+      _libraryCycle?.invalidate();
       for (FileState file in _fsState._uriToFile.values) {
-        if (file._transitiveFiles != null &&
-            file._transitiveFiles.contains(this)) {
-          file._transitiveSignature = null;
-        }
         file._exportedTopLevelDeclarations = null;
       }
     }
@@ -508,26 +533,13 @@
     _libraryFiles = [this]..addAll(_partedFiles);
 
     // Compute referenced files.
-    Set<FileState> oldDirectReferencedFiles = _directReferencedFiles;
     _directReferencedFiles = new Set<FileState>()
       ..addAll(_importedFiles)
       ..addAll(_exportedFiles)
       ..addAll(_partedFiles);
-
-    // If the set of directly referenced files of this file is changed,
-    // then the transitive sets of files that include this file are also
-    // changed. Reset these transitive sets.
-    if (oldDirectReferencedFiles != null) {
-      if (_directReferencedFiles.length != oldDirectReferencedFiles.length ||
-          !_directReferencedFiles.containsAll(oldDirectReferencedFiles)) {
-        for (FileState file in _fsState._uriToFile.values) {
-          if (file._transitiveFiles != null &&
-              file._transitiveFiles.contains(this)) {
-            file._transitiveFiles = null;
-          }
-        }
-      }
-    }
+    _directReferencedLibraries = Set<FileState>()
+      ..addAll(_importedFiles)
+      ..addAll(_exportedFiles);
 
     // Update mapping from subtyped names to files.
     for (var name in _driverUnlinkedUnit.subtypedNames) {
@@ -659,8 +671,11 @@
     }
 
     AnalysisOptions analysisOptions = _fsState._analysisOptions;
+    ExperimentStatus experimentStatus =
+        new ExperimentStatus.fromStrings(analysisOptions.enabledExperiments);
     CharSequenceReader reader = new CharSequenceReader(content);
     Scanner scanner = new Scanner(source, reader, errorListener);
+    scanner.enableGtGtGt = experimentStatus.constant_update_2018;
     Token token = PerformanceStatistics.scan.makeCurrentWhile(() {
       return scanner.tokenize();
     });
@@ -669,6 +684,8 @@
     bool useFasta = analysisOptions.useFastaParser;
     Parser parser = new Parser(source, errorListener, useFasta: useFasta);
     parser.enableOptionalNewAndConst = true;
+    parser.enableSetLiterals = experimentStatus.set_literals;
+    parser.enableNonNullable = experimentStatus.non_nullable;
     CompilationUnit unit = parser.parseCompilationUnit(token);
     unit.lineInfo = lineInfo;
 
@@ -714,7 +731,7 @@
  */
 class FileSystemState {
   final PerformanceLog _logger;
-  final ResourceProvider resourceProvider;
+  final ResourceProvider _resourceProvider;
   final ByteStore _byteStore;
   final FileContentOverlay _contentOverlay;
   final SourceFactory _sourceFactory;
@@ -795,7 +812,7 @@
     this._logger,
     this._byteStore,
     this._contentOverlay,
-    this.resourceProvider,
+    this._resourceProvider,
     this._sourceFactory,
     this._analysisOptions,
     this._unlinkedSalt,
@@ -803,7 +820,7 @@
     this.externalSummaries,
   }) {
     _fileContentCache = _FileContentCache.getInstance(
-      resourceProvider,
+      _resourceProvider,
       _contentOverlay,
     );
     _testView = new FileSystemStateTestView(this);
@@ -833,7 +850,7 @@
   FileState getFileForPath(String path) {
     FileState file = _pathToCanonicalFile[path];
     if (file == null) {
-      File resource = resourceProvider.getFile(path);
+      File resource = _resourceProvider.getFile(path);
       Source fileSource = resource.createSource();
       Uri uri = _sourceFactory.restoreUri(fileSource);
       // Try to get the existing instance.
@@ -884,7 +901,7 @@
       }
 
       String path = uriSource.fullName;
-      File resource = resourceProvider.getFile(path);
+      File resource = _resourceProvider.getFile(path);
       FileSource source = new FileSource(resource, uri);
       file = new FileState._(this, path, uri, source);
       _uriToFile[uri] = file;
@@ -927,7 +944,7 @@
   bool hasUri(String path) {
     bool flag = _hasUriForPath[path];
     if (flag == null) {
-      File resource = resourceProvider.getFile(path);
+      File resource = _resourceProvider.getFile(path);
       Source fileSource = resource.createSource();
       Uri uri = _sourceFactory.restoreUri(fileSource);
       Source uriSource = _sourceFactory.forUri2(uri);
@@ -950,13 +967,18 @@
    */
   void removeFile(String path) {
     markFileForReading(path);
-    _uriToFile.clear();
-    knownFilePaths.clear();
-    knownFiles.clear();
-    _pathToFiles.clear();
-    _pathToCanonicalFile.clear();
-    _partToLibraries.clear();
-    _subtypedNameToFiles.clear();
+    _clearFiles();
+  }
+
+  /**
+   * Reset URI resolution, and forget all files. So, the next time any file is
+   * requested, it will be read, and its whole (potentially different) graph
+   * will be built.
+   */
+  void resetUriResolution() {
+    _sourceFactory.clearCache();
+    _fileContentCache.clear();
+    _clearFiles();
   }
 
   void _addFileWithPath(String path, FileState file) {
@@ -970,6 +992,17 @@
     }
     files.add(file);
   }
+
+  /// Clear all [FileState] data - all maps from path or URI, etc.
+  void _clearFiles() {
+    _uriToFile.clear();
+    knownFilePaths.clear();
+    knownFiles.clear();
+    _pathToFiles.clear();
+    _pathToCanonicalFile.clear();
+    _partToLibraries.clear();
+    _subtypedNameToFiles.clear();
+  }
 }
 
 @visibleForTesting
@@ -978,15 +1011,9 @@
 
   FileSystemStateTestView(this.state);
 
-  Set<FileState> get filesWithoutTransitiveFiles {
+  Set<FileState> get filesWithoutLibraryCycle {
     return state._uriToFile.values
-        .where((f) => f._transitiveFiles == null)
-        .toSet();
-  }
-
-  Set<FileState> get filesWithoutTransitiveSignature {
-    return state._uriToFile.values
-        .where((f) => f._transitiveSignature == null)
+        .where((f) => f._libraryCycle == null)
         .toSet();
   }
 
@@ -1032,12 +1059,23 @@
    */
   static final _instances = new Expando<Expando<_FileContentCache>>();
 
+  /**
+   * Weak map of cache instances.
+   *
+   * Key is a [ResourceProvider].
+   */
+  static final _instances2 = new Expando<_FileContentCache>();
+
   final ResourceProvider _resourceProvider;
   final FileContentOverlay _contentOverlay;
   final Map<String, _FileContent> _pathToFile = {};
 
   _FileContentCache(this._resourceProvider, this._contentOverlay);
 
+  void clear() {
+    _pathToFile.clear();
+  }
+
   /**
    * Return the content of the file with the given [path].
    *
@@ -1050,7 +1088,9 @@
       String content;
       bool exists;
       try {
-        content = _contentOverlay[path];
+        if (_contentOverlay != null) {
+          content = _contentOverlay[path];
+        }
         content ??= _resourceProvider.getFile(path).readAsStringSync();
         exists = true;
       } catch (_) {
@@ -1078,11 +1118,17 @@
 
   static _FileContentCache getInstance(
       ResourceProvider resourceProvider, FileContentOverlay contentOverlay) {
-    var providerToInstance = _instances[contentOverlay];
-    if (providerToInstance == null) {
-      providerToInstance = new Expando<_FileContentCache>();
-      _instances[contentOverlay] = providerToInstance;
+    Expando<_FileContentCache> providerToInstance;
+    if (contentOverlay != null) {
+      providerToInstance = _instances[contentOverlay];
+      if (providerToInstance == null) {
+        providerToInstance = new Expando<_FileContentCache>();
+        _instances[contentOverlay] = providerToInstance;
+      }
+    } else {
+      providerToInstance = _instances2;
     }
+
     var instance = providerToInstance[resourceProvider];
     if (instance == null) {
       instance = new _FileContentCache(resourceProvider, contentOverlay);
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
index c49cf71..f355cc9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
@@ -211,6 +211,13 @@
   }
 
   /**
+   * Schedule all added files for analysis.
+   */
+  void scheduleAllAddedFiles() {
+    _pendingFiles.addAll(addedFiles);
+  }
+
+  /**
    * Verify the API signature for the file with the given [path], and decide
    * which linked libraries should be invalidated, and files reanalyzed.
    */
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index 4e620344..ac79c40 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -79,6 +79,13 @@
               : IndexSyntheticElementKind.setter;
           element = accessor.variable;
         }
+      } else if (elementKind == ElementKind.METHOD) {
+        Element enclosing = element.enclosingElement;
+        bool isEnumMethod = enclosing is ClassElement && enclosing.isEnum;
+        if (isEnumMethod && element.name == 'toString') {
+          kind = IndexSyntheticElementKind.enumToString;
+          element = enclosing;
+        }
       } else if (elementKind == ElementKind.TOP_LEVEL_VARIABLE) {
         TopLevelVariableElement property = element;
         kind = IndexSyntheticElementKind.topLevelVariable;
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index ed45474..a3813f6 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
@@ -27,7 +27,6 @@
 import 'package:analyzer/src/generated/error_verifier.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/hint/sdk_constraint_extractor.dart';
 import 'package:analyzer/src/hint/sdk_constraint_verifier.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/lint/linter_visitor.dart';
@@ -44,37 +43,32 @@
   /// [_versionConstraintFromPubspec] when the previous initialization attempt
   /// failed.
   static final VersionRange noSpecifiedRange = new VersionRange();
-
   final AnalysisOptionsImpl _analysisOptions;
   final DeclaredVariables _declaredVariables;
   final SourceFactory _sourceFactory;
   final FileState _library;
-  final ResourceProvider resourceProvider;
-  final InheritanceManager2 _inheritance;
+  final ResourceProvider _resourceProvider;
 
+  final InheritanceManager2 _inheritance;
   final bool Function(Uri) _isLibraryUri;
-  final AnalysisContextImpl _context;
+  final AnalysisContext _context;
   final ElementResynthesizer _resynthesizer;
   final TypeProvider _typeProvider;
+
   final TypeSystem _typeSystem;
-
   LibraryElement _libraryElement;
+
   LibraryScope _libraryScope;
-
   final Map<FileState, LineInfo> _fileToLineInfo = {};
-  final Map<FileState, IgnoreInfo> _fileToIgnoreInfo = {};
 
+  final Map<FileState, IgnoreInfo> _fileToIgnoreInfo = {};
   final Map<FileState, RecordingErrorListener> _errorListeners = {};
   final Map<FileState, ErrorReporter> _errorReporters = {};
   final List<UsedImportedElements> _usedImportedElementsList = [];
   final List<UsedLocalElements> _usedLocalElementsList = [];
   final Map<FileState, List<PendingError>> _fileToPendingErrors = {};
-  final Set<ConstantEvaluationTarget> _constants = new Set();
 
-  /// The cached version range for the SDK specified in `pubspec.yaml`, or
-  /// [noSpecifiedRange] if there is no `pubspec.yaml` or if it does not contain
-  /// an SDK range. Use [versionConstraintFromPubspec] to access this field.
-  VersionConstraint _versionConstraintFromPubspec;
+  final Set<ConstantEvaluationTarget> _constants = new Set();
 
   LibraryAnalyzer(
       this._analysisOptions,
@@ -83,10 +77,10 @@
       this._isLibraryUri,
       this._context,
       this._resynthesizer,
+      this._inheritance,
       this._library,
-      this.resourceProvider)
-      : _inheritance = new InheritanceManager2(_context.typeSystem),
-        _typeProvider = _context.typeProvider,
+      this._resourceProvider)
+      : _typeProvider = _context.typeProvider,
         _typeSystem = _context.typeSystem;
 
   /**
@@ -114,60 +108,56 @@
       _resolveUriBasedDirectives(file, unit);
     });
 
-    try {
-      _libraryElement = _resynthesizer
-          .getElement(new ElementLocationImpl.con3([_library.uriStr]));
-      _libraryScope = new LibraryScope(_libraryElement);
+    _libraryElement = _resynthesizer
+        .getElement(new ElementLocationImpl.con3([_library.uriStr]));
+    _libraryScope = new LibraryScope(_libraryElement);
 
-      _resolveDirectives(units);
+    _resolveDirectives(units);
 
+    units.forEach((file, unit) {
+      _resolveFile(file, unit);
+      _computePendingMissingRequiredParameters(file, unit);
+    });
+
+    units.values.forEach(_findConstants);
+    _computeConstants();
+
+    PerformanceStatistics.errors.makeCurrentWhile(() {
       units.forEach((file, unit) {
-        _resolveFile(file, unit);
-        _computePendingMissingRequiredParameters(file, unit);
+        _computeVerifyErrors(file, unit);
       });
+    });
 
-      units.values.forEach(_findConstants);
-      _computeConstants();
-
-      PerformanceStatistics.errors.makeCurrentWhile(() {
+    if (_analysisOptions.hint) {
+      PerformanceStatistics.hints.makeCurrentWhile(() {
         units.forEach((file, unit) {
-          _computeVerifyErrors(file, unit);
-        });
-      });
-
-      if (_analysisOptions.hint) {
-        PerformanceStatistics.hints.makeCurrentWhile(() {
-          units.forEach((file, unit) {
-            {
-              var visitor = new GatherUsedLocalElementsVisitor(_libraryElement);
-              unit.accept(visitor);
-              _usedLocalElementsList.add(visitor.usedElements);
-            }
-            {
-              var visitor =
-                  new GatherUsedImportedElementsVisitor(_libraryElement);
-              unit.accept(visitor);
-              _usedImportedElementsList.add(visitor.usedElements);
-            }
-          });
-          units.forEach((file, unit) {
-            _computeHints(file, unit);
-          });
-        });
-      }
-
-      if (_analysisOptions.lint) {
-        PerformanceStatistics.lints.makeCurrentWhile(() {
-          var allUnits = _library.libraryFiles
-              .map((file) => LinterContextUnit(file.content, units[file]))
-              .toList();
-          for (int i = 0; i < allUnits.length; i++) {
-            _computeLints(_library.libraryFiles[i], allUnits[i], allUnits);
+          {
+            var visitor = new GatherUsedLocalElementsVisitor(_libraryElement);
+            unit.accept(visitor);
+            _usedLocalElementsList.add(visitor.usedElements);
+          }
+          {
+            var visitor =
+                new GatherUsedImportedElementsVisitor(_libraryElement);
+            unit.accept(visitor);
+            _usedImportedElementsList.add(visitor.usedElements);
           }
         });
-      }
-    } finally {
-      _context.dispose();
+        units.forEach((file, unit) {
+          _computeHints(file, unit);
+        });
+      });
+    }
+
+    if (_analysisOptions.lint) {
+      PerformanceStatistics.lints.makeCurrentWhile(() {
+        var allUnits = _library.libraryFiles
+            .map((file) => LinterContextUnit(file.content, units[file]))
+            .toList();
+        for (int i = 0; i < allUnits.length; i++) {
+          _computeLints(_library.libraryFiles[i], allUnits[i], allUnits);
+        }
+      });
     }
 
     // Return full results.
@@ -180,20 +170,6 @@
     return results;
   }
 
-  VersionConstraint versionConstraintFromPubspec() {
-    if (_versionConstraintFromPubspec == null) {
-      _versionConstraintFromPubspec = noSpecifiedRange;
-      File pubspecFile = _findPubspecFile(_library);
-      if (pubspecFile != null) {
-        SdkConstraintExtractor extractor =
-            new SdkConstraintExtractor(pubspecFile);
-        _versionConstraintFromPubspec =
-            extractor.constraint() ?? noSpecifiedRange;
-      }
-    }
-    return _versionConstraintFromPubspec;
-  }
-
   void _computeConstantErrors(
       ErrorReporter errorReporter, CompilationUnit unit) {
     ConstantVerifier constantVerifier = new ConstantVerifier(
@@ -207,11 +183,12 @@
    */
   void _computeConstants() {
     computeConstants(
-      _typeProvider,
-      _context.typeSystem,
-      _declaredVariables,
-      _constants.toList(),
-    );
+        _typeProvider,
+        _context.typeSystem,
+        _declaredVariables,
+        _constants.toList(),
+        ExperimentStatus.fromStrings(
+            _context.analysisOptions.enabledExperiments));
   }
 
   void _computeHints(FileState file, CompilationUnit unit) {
@@ -239,7 +216,7 @@
 
     unit.accept(new BestPracticesVerifier(
         errorReporter, _typeProvider, _libraryElement,
-        typeSystem: _context.typeSystem));
+        typeSystem: _context.typeSystem, resourceProvider: _resourceProvider));
 
     unit.accept(new OverrideVerifier(
       _inheritance,
@@ -268,14 +245,15 @@
           new UnusedLocalElementsVerifier(errorListener, usedElements);
       unit.accept(visitor);
     }
+
     //
-    // Find code that uses features from an SDK that is newer than the minimum
-    // version allowed in the pubspec.yaml file.
+    // Find code that uses features from an SDK version that does not satisfy
+    // the SDK constraints specified in analysis options.
     //
-    VersionRange versionRange = versionConstraintFromPubspec();
-    if (versionRange != noSpecifiedRange) {
+    var sdkVersionConstraint = _analysisOptions.sdkVersionConstraint;
+    if (sdkVersionConstraint != null) {
       SdkConstraintVerifier verifier = new SdkConstraintVerifier(
-          errorReporter, _libraryElement, _typeProvider, versionRange);
+          errorReporter, _libraryElement, _typeProvider, sdkVersionConstraint);
       unit.accept(verifier);
     }
   }
@@ -295,11 +273,8 @@
         allUnits, currentUnit, _declaredVariables, _typeProvider, _typeSystem);
     for (Linter linter in _analysisOptions.lintRules) {
       linter.reporter = errorReporter;
-      if (linter is NodeLintRuleWithContext) {
-        (linter as NodeLintRuleWithContext)
-            .registerNodeProcessors(nodeRegistry, context);
-      } else if (linter is NodeLintRule) {
-        (linter as NodeLintRule).registerNodeProcessors(nodeRegistry);
+      if (linter is NodeLintRule) {
+        (linter as NodeLintRule).registerNodeProcessors(nodeRegistry, context);
       } else {
         AstVisitor visitor = linter.getVisitor();
         if (visitor != null) {
@@ -412,18 +387,6 @@
     _constants.addAll(dependenciesFinder.dependencies);
   }
 
-  File _findPubspecFile(FileState file) {
-    Folder folder = resourceProvider?.getFile(file.path)?.parent;
-    while (folder != null) {
-      File pubspecFile = folder.getChildAssumingFile('pubspec.yaml');
-      if (pubspecFile.exists) {
-        return pubspecFile;
-      }
-      folder = folder.parent;
-    }
-    return null;
-  }
-
   RecordingErrorListener _getErrorListener(FileState file) =>
       _errorListeners.putIfAbsent(file, () => new RecordingErrorListener());
 
@@ -459,6 +422,15 @@
     return null;
   }
 
+  bool _isExistingSource(Source source) {
+    for (var file in _library.directReferencedFiles) {
+      if (file.uri == source.uri) {
+        return file.exists;
+      }
+    }
+    return false;
+  }
+
   /**
    * Return `true` if the given [source] is a library.
    */
@@ -554,7 +526,7 @@
         // Validate that the part contains a part-of directive with the same
         // name or uri as the library.
         //
-        if (_context.exists(partSource)) {
+        if (_isExistingSource(partSource)) {
           _NameOrSource nameOrSource = _getPartLibraryNameOrUri(
               partSource, partUnit, directivesToResolve);
           if (nameOrSource == null) {
@@ -702,7 +674,7 @@
       FileState file, UriBasedDirectiveImpl directive) {
     Source source = directive.uriSource;
     if (source != null) {
-      if (_context.exists(source)) {
+      if (_isExistingSource(source)) {
         return;
       }
     } else {
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index 3a36e2b..44f61a4 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart'
     show CompilationUnitElement, LibraryElement;
 import 'package:analyzer/src/context/context.dart';
@@ -10,161 +11,94 @@
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
+import 'package:analyzer/src/dart/analysis/restricted_analysis_context.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/handle.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisContext, AnalysisEngine, AnalysisOptions;
+    show AnalysisContext, AnalysisOptions;
+import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/link.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:analyzer/src/summary/resynthesize.dart';
+import 'package:meta/meta.dart';
 
 /**
  * Context information necessary to analyze one or more libraries within an
  * [AnalysisDriver].
  *
  * Currently this is implemented as a wrapper around [AnalysisContext].
- * TODO(paulberry): make a front end API that this can make use of instead.
  */
 class LibraryContext {
-  final SummaryDataStore store;
+  static const _maxLinkedDataInBytes = 64 * 1024 * 1024;
 
-  /**
-   * The [AnalysisContext] which is used to do the analysis.
-   */
-  final AnalysisContext analysisContext;
+  final PerformanceLog logger;
+  final ByteStore byteStore;
+  final SummaryDataStore store = new SummaryDataStore([]);
 
-  /**
-   * The resynthesizer that resynthesizes elements in [analysisContext].
-   */
-  final ElementResynthesizer resynthesizer;
+  /// The size of the linked data that is loaded by this context.
+  /// When it reaches [_maxLinkedDataInBytes] the whole context is thrown away.
+  /// We use it as an approximation for the heap size of elements.
+  int _linkedDataInBytes = 0;
 
-  /**
-   * Create a [LibraryContext] which is prepared to analyze [targetLibrary].
-   */
-  factory LibraryContext.forSingleLibrary(
-      FileState targetLibrary,
-      PerformanceLog logger,
-      PackageBundle sdkBundle,
-      ByteStore byteStore,
-      AnalysisOptions options,
-      DeclaredVariables declaredVariables,
-      SourceFactory sourceFactory,
-      SummaryDataStore externalSummaries,
-      FileSystemState fsState) {
-    return logger.run('Create library context', () {
-      Map<String, FileState> libraries = <String, FileState>{};
-      SummaryDataStore store = new SummaryDataStore(const <String>[]);
+  AnalysisContextImpl analysisContext;
+  SummaryResynthesizer resynthesizer;
+  InheritanceManager2 inheritanceManager;
 
-      if (externalSummaries != null) {
-        store.addStore(externalSummaries);
-      }
+  LibraryContext({
+    @required AnalysisSession session,
+    @required PerformanceLog logger,
+    @required ByteStore byteStore,
+    @required FileSystemState fsState,
+    @required AnalysisOptions analysisOptions,
+    @required DeclaredVariables declaredVariables,
+    @required SourceFactory sourceFactory,
+    @required SummaryDataStore externalSummaries,
+    @required FileState targetLibrary,
+  })  : this.logger = logger,
+        this.byteStore = byteStore {
+    if (externalSummaries != null) {
+      store.addStore(externalSummaries);
+    }
 
-      if (sdkBundle != null) {
-        store.addBundle(null, sdkBundle);
-      }
+    // Fill the store with summaries required for the initial library.
+    load(targetLibrary);
 
-      void appendLibraryFiles(FileState library) {
-        if (!libraries.containsKey(library.uriStr)) {
-          // Serve 'dart:' URIs from the SDK bundle.
-          if (sdkBundle != null && library.uri.scheme == 'dart') {
-            return;
-          }
+    analysisContext = new RestrictedAnalysisContext(
+      analysisOptions,
+      declaredVariables,
+      sourceFactory,
+    );
 
-          if (library.isInExternalSummaries) {
-            return;
-          }
+    var provider = new InputPackagesResultProvider(analysisContext, store,
+        session: session);
+    resynthesizer = provider.resynthesizer;
 
-          libraries[library.uriStr] = library;
-
-          // Append library units.
-          for (FileState part in library.libraryFiles) {
-            store.addUnlinkedUnit(part.uriStr, part.unlinked);
-          }
-
-          // Append referenced libraries.
-          library.importedFiles.forEach(appendLibraryFiles);
-          library.exportedFiles.forEach(appendLibraryFiles);
-        }
-      }
-
-      logger.run('Append library files', () {
-        appendLibraryFiles(targetLibrary);
-      });
-
-      var libraryUrisToLink = new Set<String>();
-      var libraryFilesToLink = new Set<FileState>();
-      logger.run('Load linked bundles', () {
-        for (FileState library in libraries.values) {
-          if (library.exists || library == targetLibrary) {
-            String key = '${library.transitiveSignature}.linked';
-            List<int> bytes = byteStore.get(key);
-            if (bytes != null) {
-              LinkedLibrary linked = new LinkedLibrary.fromBuffer(bytes);
-              store.addLinkedLibrary(library.uriStr, linked);
-            } else {
-              libraryUrisToLink.add(library.uriStr);
-              libraryFilesToLink.add(library);
-            }
-          }
-        }
-        int numOfLoaded = libraries.length - libraryUrisToLink.length;
-        logger.writeln('Loaded $numOfLoaded linked bundles.');
-      });
-
-      Map<String, LinkedLibraryBuilder> linkedLibraries = {};
-      logger.run('Link libraries', () {
-        linkedLibraries = link(libraryUrisToLink, (String uri) {
-          LinkedLibrary linkedLibrary = store.linkedMap[uri];
-          return linkedLibrary;
-        }, (String uri) {
-          UnlinkedUnit unlinkedUnit = store.unlinkedMap[uri];
-          return unlinkedUnit;
-        }, (_) => null);
-        logger.writeln('Linked ${linkedLibraries.length} libraries.');
-      });
-
-      for (String uri in linkedLibraries.keys) {
-        LinkedLibraryBuilder linkedBuilder = linkedLibraries[uri];
-        FileState library = libraries[uri];
-        String key = '${library.transitiveSignature}.linked';
-        List<int> bytes = linkedBuilder.toBuffer();
-        LinkedLibrary linked = new LinkedLibrary.fromBuffer(bytes);
-        store.addLinkedLibrary(uri, linked);
-        byteStore.put(key, bytes);
-      }
-
-      var resynthesizingContext = _createResynthesizingContext(
-          options, declaredVariables, sourceFactory, store);
-      resynthesizingContext.context.contentCache =
-          new _ContentCacheWrapper(fsState);
-
-      return new LibraryContext._(store, resynthesizingContext.context,
-          resynthesizingContext.resynthesizer);
-    });
+    inheritanceManager = new InheritanceManager2(analysisContext.typeSystem);
   }
 
-  LibraryContext._(this.store, this.analysisContext, this.resynthesizer);
+  /**
+   * The type provider used in this context.
+   */
+  TypeProvider get typeProvider => analysisContext.typeProvider;
 
   /**
    * Computes a [CompilationUnitElement] for the given library/unit pair.
    */
-  CompilationUnitElement computeUnitElement(
-      Source librarySource, Source unitSource) {
-    String libraryUri = librarySource.uri.toString();
-    String unitUri = unitSource.uri.toString();
-    return resynthesizer.getElement(
-        new ElementLocationImpl.con3(<String>[libraryUri, unitUri]));
+  CompilationUnitElement computeUnitElement(FileState library, FileState unit) {
+    return resynthesizer.getElement(new ElementLocationImpl.con3(<String>[
+      library.uriStr,
+      unit.uriStr,
+    ]));
   }
 
   /**
-   * Cleans up any persistent resources used by this [LibraryContext].
-   *
-   * Should be called once the [LibraryContext] is no longer needed.
+   * Get the [LibraryElement] for the given library.
    */
-  void dispose() {
-    analysisContext.dispose();
+  LibraryElement getLibraryElement(FileState library) {
+    return resynthesizer.getLibraryElement(library.uriStr);
   }
 
   /**
@@ -175,99 +109,96 @@
     return store.unlinkedMap[uriStr]?.isPartOf == false;
   }
 
-  /**
-   * Resynthesize the [LibraryElement] from the given [store].
-   */
-  static LibraryElement resynthesizeLibraryElement(
-      AnalysisOptions analysisOptions,
-      DeclaredVariables declaredVariables,
-      SourceFactory sourceFactory,
-      SummaryDataStore store,
-      String uri) {
-    var resynthesizingContext = _createResynthesizingContext(
-        analysisOptions, declaredVariables, sourceFactory, store);
-    try {
-      return resynthesizingContext.resynthesizer
-          .getElement(new ElementLocationImpl.con3([uri]));
-    } finally {
-      resynthesizingContext.context.dispose();
+  /// Load data required to access elements of the given [targetLibrary].
+  void load(FileState targetLibrary) {
+    // The library is already a part of the context, nothing to do.
+    if (store.linkedMap.containsKey(targetLibrary.uriStr)) {
+      return;
+    }
+
+    var libraries = <String, FileState>{};
+    void appendLibraryFiles(FileState library) {
+      // Stop if this library is already a part of the context.
+      // Libraries from external summaries are also covered by this.
+      if (store.linkedMap.containsKey(library.uriStr)) {
+        return;
+      }
+
+      // Stop if we have already scheduled loading of this library.
+      if (libraries.containsKey(library.uriStr)) {
+        return;
+      }
+
+      // Schedule the library for loading or linking.
+      libraries[library.uriStr] = library;
+
+      // Append library units.
+      for (FileState part in library.libraryFiles) {
+        store.addUnlinkedUnit(part.uriStr, part.unlinked);
+      }
+
+      // Append referenced libraries.
+      library.importedFiles.forEach(appendLibraryFiles);
+      library.exportedFiles.forEach(appendLibraryFiles);
+    }
+
+    logger.run('Append library files', () {
+      appendLibraryFiles(targetLibrary);
+    });
+
+    var libraryUrisToLink = new Set<String>();
+    logger.run('Load linked bundles', () {
+      for (FileState library in libraries.values) {
+        if (library.exists || library == targetLibrary) {
+          String key = library.transitiveSignatureLinked;
+          List<int> bytes = byteStore.get(key);
+          if (bytes != null) {
+            LinkedLibrary linked = new LinkedLibrary.fromBuffer(bytes);
+            store.addLinkedLibrary(library.uriStr, linked);
+            _linkedDataInBytes += bytes.length;
+          } else {
+            libraryUrisToLink.add(library.uriStr);
+          }
+        }
+      }
+      int numOfLoaded = libraries.length - libraryUrisToLink.length;
+      logger.writeln('Loaded $numOfLoaded linked bundles.');
+    });
+
+    var linkedLibraries = <String, LinkedLibraryBuilder>{};
+    logger.run('Link libraries', () {
+      linkedLibraries = link(libraryUrisToLink, (String uri) {
+        LinkedLibrary linkedLibrary = store.linkedMap[uri];
+        return linkedLibrary;
+      }, (String uri) {
+        UnlinkedUnit unlinkedUnit = store.unlinkedMap[uri];
+        return unlinkedUnit;
+      }, (_) => null);
+      logger.writeln('Linked ${linkedLibraries.length} libraries.');
+    });
+
+    // Store freshly linked libraries into the byte store.
+    // Append them to the context.
+    for (String uri in linkedLibraries.keys) {
+      FileState library = libraries[uri];
+      String key = library.transitiveSignatureLinked;
+
+      LinkedLibraryBuilder linkedBuilder = linkedLibraries[uri];
+      List<int> bytes = linkedBuilder.toBuffer();
+      byteStore.put(key, bytes);
+
+      LinkedLibrary linked = new LinkedLibrary.fromBuffer(bytes);
+      store.addLinkedLibrary(uri, linked);
+      _linkedDataInBytes += bytes.length;
     }
   }
 
-  static _ResynthesizingAnalysisContext _createResynthesizingContext(
-      AnalysisOptions analysisOptions,
-      DeclaredVariables declaredVariables,
-      SourceFactory sourceFactory,
-      SummaryDataStore store) {
-    AnalysisContextImpl analysisContext =
-        AnalysisEngine.instance.createAnalysisContext();
-    analysisContext.useSdkCachePartition = false;
-    analysisContext.analysisOptions = analysisOptions;
-    analysisContext.declaredVariables = declaredVariables;
-    analysisContext.sourceFactory = sourceFactory.clone();
-    var provider = new InputPackagesResultProvider(analysisContext, store);
-    analysisContext.resultProvider = provider;
-    return new _ResynthesizingAnalysisContext(
-        analysisContext, provider.resynthesizer);
+  /// Return `true` if this context grew too large, and should be recreated.
+  ///
+  /// It might have been used to analyze libraries that we don't need anymore,
+  /// and because loading libraries is not very expensive (but not free), the
+  /// simplest way to get rid of the garbage is to throw away everything.
+  bool pack() {
+    return _linkedDataInBytes > _maxLinkedDataInBytes;
   }
 }
-
-/**
- * [ContentCache] wrapper around [FileContentOverlay].
- */
-class _ContentCacheWrapper implements ContentCache {
-  final FileSystemState fsState;
-
-  _ContentCacheWrapper(this.fsState);
-
-  @override
-  void accept(ContentCacheVisitor visitor) {
-    throw new UnimplementedError();
-  }
-
-  @override
-  String getContents(Source source) {
-    return _getFileForSource(source).content;
-  }
-
-  @override
-  bool getExists(Source source) {
-    if (source.isInSystemLibrary) {
-      return true;
-    }
-    String uriStr = source.uri.toString();
-    if (fsState.externalSummaries != null &&
-        fsState.externalSummaries.hasUnlinkedUnit(uriStr)) {
-      return true;
-    }
-    return _getFileForSource(source).exists;
-  }
-
-  @override
-  int getModificationStamp(Source source) {
-    if (source.isInSystemLibrary) {
-      return 0;
-    }
-    return _getFileForSource(source).exists ? 0 : -1;
-  }
-
-  @override
-  String setContents(Source source, String contents) {
-    throw new UnimplementedError();
-  }
-
-  FileState _getFileForSource(Source source) {
-    String path = source.fullName;
-    return fsState.getFileForPath(path);
-  }
-}
-
-/**
- * Container with analysis context and the corresponding resynthesizer.
- */
-class _ResynthesizingAnalysisContext {
-  final AnalysisContextImpl context;
-  final ElementResynthesizer resynthesizer;
-
-  _ResynthesizingAnalysisContext(this.context, this.resynthesizer);
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
new file mode 100644
index 0000000..74cb08c
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
@@ -0,0 +1,173 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:typed_data';
+
+import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/summary/api_signature.dart';
+import 'package:analyzer/src/summary/link.dart' as graph
+    show DependencyWalker, Node;
+import 'package:meta/meta.dart';
+
+/// Ensure that the [FileState.libraryCycle] for the [file] and anything it
+/// depends on is computed.
+void computeLibraryCycle(Uint32List linkedSalt, FileState file) {
+  var libraryWalker = new _LibraryWalker(linkedSalt);
+  libraryWalker.walk(libraryWalker.getNode(file));
+}
+
+/// Information about libraries that reference each other, so form a cycle.
+class LibraryCycle {
+  /// The libraries that belong to this cycle.
+  final List<FileState> libraries = [];
+
+  /// The library cycles that this cycle references directly.
+  @visibleForTesting
+  final Set<LibraryCycle> directDependencies = new Set<LibraryCycle>();
+
+  /// The cycles that use this cycle, used to [invalidate] transitively.
+  final List<LibraryCycle> _directUsers = [];
+
+  /// The transitive signature of this cycle.
+  ///
+  /// It is based on the API signatures of all files of the [libraries], and
+  /// transitive signatures of the cycles that the [libraries] reference
+  /// directly.  So, indirectly it is based on the transitive closure of all
+  /// files that [libraries] reference (but we don't compute these files).
+  String _transitiveSignature;
+
+  /// The map from a library in [libraries] to its transitive signature.
+  ///
+  /// It is almost the same as [_transitiveSignature], but is also based on
+  /// the URI of this specific library.  Currently we store each linked library
+  /// with its own key, so we need unique keys.  However practically we never
+  /// can use just *one* library of a cycle, we always use the whole cycle.
+  ///
+  /// TODO(scheglov) Switch to loading the whole cycle maybe?
+  final Map<FileState, String> transitiveSignatures = {};
+
+  LibraryCycle();
+
+  LibraryCycle.external() : _transitiveSignature = '<external>';
+
+  /// Invalidate this cycle and any cycles that directly or indirectly use it.
+  ///
+  /// Practically invalidation means that we clear the library cycle in all the
+  /// [libraries] that share this [LibraryCycle] instance.
+  void invalidate() {
+    for (var library in libraries) {
+      library.internal_setLibraryCycle(null, null);
+    }
+    for (var user in _directUsers) {
+      user.invalidate();
+    }
+    _directUsers.clear();
+  }
+
+  @override
+  String toString() {
+    return '[' + libraries.join(', ') + ']';
+  }
+}
+
+/// Node in [_LibraryWalker].
+class _LibraryNode extends graph.Node<_LibraryNode> {
+  final _LibraryWalker walker;
+  final FileState file;
+
+  _LibraryNode(this.walker, this.file);
+
+  @override
+  bool get isEvaluated => file.internal_libraryCycle != null;
+
+  @override
+  List<_LibraryNode> computeDependencies() {
+    return file.directReferencedLibraries.map(walker.getNode).toList();
+  }
+}
+
+/// Helper that organizes dependencies of a library into topologically
+/// sorted [LibraryCycle]s.
+class _LibraryWalker extends graph.DependencyWalker<_LibraryNode> {
+  final Uint32List _linkedSalt;
+  final Map<FileState, _LibraryNode> nodesOfFiles = {};
+
+  _LibraryWalker(this._linkedSalt);
+
+  @override
+  void evaluate(_LibraryNode v) {
+    evaluateScc([v]);
+  }
+
+  @override
+  void evaluateScc(List<_LibraryNode> scc) {
+    var cycle = new LibraryCycle();
+
+    var signature = new ApiSignature();
+    signature.addUint32List(_linkedSalt);
+
+    // Sort libraries to produce stable signatures.
+    scc.sort((first, second) {
+      var firstPath = first.file.path;
+      var secondPath = second.file.path;
+      return firstPath.compareTo(secondPath);
+    });
+
+    // Append direct referenced cycles.
+    for (var node in scc) {
+      var file = node.file;
+      _appendDirectlyReferenced(cycle, signature, file.importedFiles);
+      _appendDirectlyReferenced(cycle, signature, file.exportedFiles);
+    }
+
+    // Fill the cycle with libraries.
+    for (var node in scc) {
+      cycle.libraries.add(node.file);
+
+      signature.addInt(node.file.libraryFiles.length);
+      for (var file in node.file.libraryFiles) {
+        signature.addBytes(file.apiSignature);
+      }
+    }
+
+    // Compute the general library cycle signature.
+    cycle._transitiveSignature = signature.toHex();
+
+    // Compute library specific signatures.
+    for (var node in scc) {
+      var librarySignatureBuilder = new ApiSignature()
+        ..addString(node.file.uriStr)
+        ..addString(cycle._transitiveSignature);
+      var librarySignature = librarySignatureBuilder.toHex();
+
+      node.file.internal_setLibraryCycle(
+        cycle,
+        librarySignature,
+      );
+    }
+  }
+
+  _LibraryNode getNode(FileState file) {
+    return nodesOfFiles.putIfAbsent(file, () => new _LibraryNode(this, file));
+  }
+
+  void _appendDirectlyReferenced(
+    LibraryCycle cycle,
+    ApiSignature signature,
+    List<FileState> directlyReferenced,
+  ) {
+    signature.addInt(directlyReferenced.length);
+    for (var referencedLibrary in directlyReferenced) {
+      var referencedCycle = referencedLibrary.internal_libraryCycle;
+
+      // We get null when the library is a part of the cycle being build.
+      if (referencedCycle == null) continue;
+
+      if (cycle.directDependencies.add(referencedCycle)) {
+        referencedCycle._directUsers.add(cycle);
+        signature.addString(referencedCycle._transitiveSignature);
+      }
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/mutex.dart b/pkg/analyzer/lib/src/dart/analysis/mutex.dart
index 864e616..bf7532a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/mutex.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/mutex.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -18,18 +18,18 @@
 ///       m.release();
 ///     }
 class Mutex {
-  Completer<Null> _lock;
+  Completer<void> _lock;
 
   /// Acquire a lock.
   ///
   /// Returns a [Future] that will be completed when the lock has been acquired.
-  Future<Null> acquire() async {
+  Future<void> acquire() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     while (_lock != null) {
       await _lock.future;
     }
-    _lock = new Completer<Null>();
+    _lock = new Completer<void>();
   }
 
   /// Run the given [criticalSection] with acquired mutex.
diff --git a/pkg/analyzer/lib/src/dart/analysis/protected_file_byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/protected_file_byte_store.dart
deleted file mode 100644
index b5ec4e1..0000000
--- a/pkg/analyzer/lib/src/dart/analysis/protected_file_byte_store.dart
+++ /dev/null
@@ -1,220 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:meta/meta.dart';
-import 'package:path/path.dart';
-
-import 'byte_store.dart';
-import 'cache.dart';
-import 'file_byte_store.dart';
-
-/// The function that returns current time in milliseconds.
-typedef int GetCurrentTime();
-
-/// [ByteStore] that stores values as files, allows to mark some of keys as
-/// temporary protected, and supports periodical [flush] of unprotected keys.
-///
-/// The set of protected keys is stored in a file, which is locked during
-/// updating to prevent races across multiple processes.
-class ProtectedFileByteStore implements ByteStore {
-  @visibleForTesting
-  static const PROTECTED_FILE_NAME = '.temporary_protected_keys';
-
-  final String _cachePath;
-  final Duration _protectionDuration;
-  final GetCurrentTime _getCurrentTimeFunction;
-
-  final FileByteStore _fileByteStore;
-  final Cache<String, List<int>> _cache;
-
-  /// Create a new instance of the [ProtectedFileByteStore].
-  ///
-  /// The [protectionDuration] specifies how long temporary protected keys
-  /// stay protected.
-  ProtectedFileByteStore(this._cachePath,
-      {Duration protectionDuration,
-      GetCurrentTime getCurrentTime,
-      int cacheSizeBytes: 128 * 1024 * 1024})
-      : _protectionDuration = protectionDuration,
-        _getCurrentTimeFunction = getCurrentTime ?? _getCurrentTimeDefault,
-        _fileByteStore = new FileByteStore(_cachePath),
-        _cache = new Cache(cacheSizeBytes, (bytes) => bytes.length);
-
-  /// Remove all not protected keys.
-  void flush() {
-    var protectedKeysText = _keysReadTextLocked();
-    var protectedKeys = new ProtectedKeys.decode(protectedKeysText);
-    List<FileSystemEntity> files = new Directory(_cachePath).listSync();
-    for (var file in files) {
-      if (file is File) {
-        String key = basename(file.path);
-        if (key == PROTECTED_FILE_NAME) {
-          continue;
-        }
-        if (protectedKeys.containsKey(key)) {
-          continue;
-        }
-        try {
-          file.deleteSync();
-        } catch (e) {}
-      }
-    }
-  }
-
-  @override
-  List<int> get(String key) {
-    return _cache.get(key, () => _fileByteStore.get(key));
-  }
-
-  @override
-  void put(String key, List<int> bytes) {
-    if (key == PROTECTED_FILE_NAME) {
-      throw new ArgumentError('The key $key is reserved.');
-    }
-    _fileByteStore.put(key, bytes);
-    _cache.put(key, bytes);
-  }
-
-  /// The [add] keys are added to the set of temporary protected keys, and
-  /// their age is reset to zero.
-  ///
-  /// The [remove] keys are removed from the set of temporary protected keys,
-  /// and become subjects of LRU cached eviction.
-  void updateProtectedKeys(
-      {List<String> add: const <String>[],
-      List<String> remove: const <String>[]}) {
-    _withProtectedKeysLockSync(_cachePath, (ProtectedKeys protectedKeys) {
-      var now = _getCurrentTimeFunction();
-
-      if (_protectionDuration != null) {
-        var maxAge = _protectionDuration.inMilliseconds;
-        protectedKeys.removeOlderThan(maxAge, now);
-      }
-
-      for (var addedKey in add) {
-        protectedKeys.add(addedKey, now);
-      }
-
-      for (var removedKey in remove) {
-        protectedKeys.remove(removedKey);
-      }
-    });
-  }
-
-  /// Read the protected keys, but don't keep the lock.
-  ///
-  /// We do this before performing any long running operation that
-  /// just read, and where it is important to keep system unlocked.
-  String _keysReadTextLocked() {
-    File keysFile = new File(join(_cachePath, PROTECTED_FILE_NAME));
-    RandomAccessFile keysLock = keysFile.openSync(mode: FileMode.append);
-    keysLock.lockSync(FileLock.blockingExclusive);
-    try {
-      return _keysReadText(keysLock);
-    } finally {
-      keysLock.unlockSync();
-      keysLock.closeSync();
-    }
-  }
-
-  /// The default implementation of [GetCurrentTime].
-  static int _getCurrentTimeDefault() {
-    return new DateTime.now().millisecondsSinceEpoch;
-  }
-
-  static ProtectedKeys _keysRead(RandomAccessFile file) {
-    String text = _keysReadText(file);
-    return new ProtectedKeys.decode(text);
-  }
-
-  static String _keysReadText(RandomAccessFile file) {
-    file.setPositionSync(0);
-    List<int> bytes = file.readSync(file.lengthSync());
-    return utf8.decode(bytes);
-  }
-
-  static void _keysWrite(RandomAccessFile file, ProtectedKeys keys) {
-    String text = keys.encode();
-    file.setPositionSync(0);
-    file.writeStringSync(text);
-    file.truncateSync(file.positionSync());
-  }
-
-  /// Perform [f] over the locked keys file, decoded into [ProtectedKeys].
-  static void _withProtectedKeysLockSync(
-      String cachePath, void f(ProtectedKeys keys)) {
-    String path = join(cachePath, PROTECTED_FILE_NAME);
-    RandomAccessFile file = new File(path).openSync(mode: FileMode.append);
-    file.lockSync(FileLock.blockingExclusive);
-    try {
-      ProtectedKeys keys = _keysRead(file);
-      f(keys);
-      _keysWrite(file, keys);
-    } finally {
-      file.unlockSync();
-      file.closeSync();
-    }
-  }
-}
-
-/// Container with protected keys.
-@visibleForTesting
-class ProtectedKeys {
-  /// The map from a key in [ByteStore] to the time in milliseconds when the
-  /// key was marked as temporary protected.
-  final Map<String, int> map;
-
-  ProtectedKeys(this.map);
-
-  factory ProtectedKeys.decode(String text) {
-    var map = <String, int>{};
-    try {
-      List<String> lines = text.split('\n').toList();
-      if (lines.length % 2 == 0) {
-        for (int i = 0; i < lines.length; i += 2) {
-          String key = lines[i];
-          String startMillisecondsStr = lines[i + 1];
-          int startMilliseconds = int.parse(startMillisecondsStr);
-          map[key] = startMilliseconds;
-        }
-      }
-    } catch (e) {}
-    return new ProtectedKeys(map);
-  }
-
-  /// Add the given [key] with the current time.
-  void add(String key, int time) {
-    map[key] = time;
-  }
-
-  bool containsKey(String key) => map.containsKey(key);
-
-  String encode() {
-    var buffer = new StringBuffer();
-    map.forEach((key, start) {
-      buffer.writeln(key);
-      buffer.writeln(start);
-    });
-    return buffer.toString().trim();
-  }
-
-  void remove(String key) {
-    map.remove(key);
-  }
-
-  /// If the time is [now] milliseconds, remove all keys that are older than
-  /// the given [maxAge] is milliseconds.
-  void removeOlderThan(int maxAge, int now) {
-    var keysToRemove = <String>[];
-    for (var key in map.keys) {
-      if (now - map[key] > maxAge) {
-        keysToRemove.add(key);
-      }
-    }
-    keysToRemove.forEach(map.remove);
-  }
-}
diff --git a/pkg/analyzer/lib/src/dart/analysis/restricted_analysis_context.dart b/pkg/analyzer/lib/src/dart/analysis/restricted_analysis_context.dart
new file mode 100644
index 0000000..a68cdcd
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/analysis/restricted_analysis_context.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/type_system.dart';
+
+/// This class is a temporary step toward migrating Analyzer clients to the
+/// new API.  It guards against attempts to use any [AnalysisContext]
+/// functionality (which is task based), except what we intend to expose
+/// through the new API.
+class RestrictedAnalysisContext implements AnalysisContextImpl {
+  @override
+  final AnalysisOptionsImpl analysisOptions;
+
+  @override
+  final DeclaredVariables declaredVariables;
+
+  @override
+  final SourceFactory sourceFactory;
+
+  TypeProvider _typeProvider;
+
+  TypeSystem _typeSystem;
+
+  RestrictedAnalysisContext(
+      this.analysisOptions, this.declaredVariables, this.sourceFactory);
+
+  @override
+  TypeProvider get typeProvider => _typeProvider;
+
+  @override
+  set typeProvider(TypeProvider typeProvider) {
+    if (_typeProvider != null) {
+      throw StateError('TypeProvider can be set only once.');
+    }
+    _typeProvider = typeProvider;
+  }
+
+  @override
+  TypeSystem get typeSystem {
+    return _typeSystem ??= Dart2TypeSystem(
+      typeProvider,
+      implicitCasts: analysisOptions.implicitCasts,
+    );
+  }
+
+  noSuchMethod(Invocation invocation) {
+    return super.noSuchMethod(invocation);
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/results.dart b/pkg/analyzer/lib/src/dart/analysis/results.dart
index 2b9ac07..fd50c1c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/results.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/results.dart
@@ -68,39 +68,62 @@
 class ParsedLibraryResultImpl extends AnalysisResultImpl
     implements ParsedLibraryResult {
   @override
-  final ResultState state = ResultState.VALID;
-
-  @override
   final List<ParsedUnitResult> units;
 
   ParsedLibraryResultImpl(
       AnalysisSession session, String path, Uri uri, this.units)
       : super(session, path, uri);
 
+  ParsedLibraryResultImpl.external(AnalysisSession session, Uri uri)
+      : this(session, null, uri, null);
+
   @Deprecated('This factory exists temporary until AnalysisSession migration.')
   factory ParsedLibraryResultImpl.tmp(LibraryElement library) {
-    var libraryPath = library.source.fullName;
-    var analysisContext = library.context;
-    var units = <ParsedUnitResult>[];
-    for (var unitElement in library.units) {
-      var unitSource = unitElement.source;
+    var session = library.session;
+    if (session != null) {
+      return session.getParsedLibraryByElement(library);
+    } else {
+      var analysisContext = library.context;
+      var units = <ParsedUnitResult>[];
+      for (var unitElement in library.units) {
+        var unitSource = unitElement.source;
 
-      if (!analysisContext.exists(unitSource)) {
-        continue;
+        if (!analysisContext.exists(unitSource)) {
+          continue;
+        }
+
+        var content = analysisContext.getContents(unitSource).data;
+        var lineInfo = analysisContext.getLineInfo(unitSource);
+        var unit = analysisContext.parseCompilationUnit(unitSource);
+        units.add(ParsedUnitResultImpl(
+            null,
+            unitSource.fullName,
+            unitSource.uri,
+            content,
+            lineInfo,
+            unitSource != library.source,
+            unit, const []));
       }
-
-      var content = analysisContext.getContents(unitSource).data;
-      var lineInfo = analysisContext.getLineInfo(unitSource);
-      var unit = analysisContext.parseCompilationUnit(unitSource);
-      units.add(ParsedUnitResultImpl(null, unitSource.fullName, unitSource.uri,
-          content, lineInfo, unitSource != library.source, unit, const []));
+      var libraryPath = library.source.fullName;
+      return ParsedLibraryResultImpl(
+          null, libraryPath, library.source.uri, units);
     }
-    return ParsedLibraryResultImpl(
-        null, libraryPath, library.source.uri, units);
+  }
+
+  @override
+  ResultState get state {
+    if (path == null) {
+      return ResultState.NOT_A_FILE;
+    }
+    return ResultState.VALID;
   }
 
   @override
   ElementDeclarationResult getElementDeclaration(Element element) {
+    if (state != ResultState.VALID) {
+      throw StateError('The result is not valid: $state');
+    }
+
     var elementPath = element.source.fullName;
     var unitResult = units.firstWhere(
       (r) => r.path == elementPath,
@@ -190,25 +213,30 @@
 
   @Deprecated('This method exists temporary until AnalysisSession migration.')
   static Future<ResolvedLibraryResult> tmp(LibraryElement library) async {
-    var libraryPath = library.source.fullName;
-    var units = <ResolvedUnitResult>[];
-    var analysisContext = library.context;
-    for (var unitElement in library.units) {
-      var unitSource = unitElement.source;
+    var session = library.session;
+    if (session != null) {
+      return session.getResolvedLibraryByElement(library);
+    } else {
+      var units = <ResolvedUnitResult>[];
+      var analysisContext = library.context;
+      for (var unitElement in library.units) {
+        var unitSource = unitElement.source;
 
-      if (!analysisContext.exists(unitSource)) {
-        continue;
+        if (!analysisContext.exists(unitSource)) {
+          continue;
+        }
+
+        var path = unitSource.fullName;
+        var content = analysisContext.getContents(unitSource).data;
+        var lineInfo = analysisContext.getLineInfo(unitSource);
+        var unit = analysisContext.resolveCompilationUnit(unitSource, library);
+        units.add(ResolvedUnitResultImpl(null, path, unitSource.uri, true,
+            content, lineInfo, unitSource != library.source, unit, const []));
       }
-
-      var path = unitSource.fullName;
-      var content = analysisContext.getContents(unitSource).data;
-      var lineInfo = analysisContext.getLineInfo(unitSource);
-      var unit = analysisContext.resolveCompilationUnit(unitSource, library);
-      units.add(ResolvedUnitResultImpl(null, path, unitSource.uri, true,
-          content, lineInfo, unitSource != library.source, unit, const []));
+      var libraryPath = library.source.fullName;
+      return ResolvedLibraryResultImpl(null, libraryPath, library.source.uri,
+          library, library.context.typeProvider, units);
     }
-    return ResolvedLibraryResultImpl(null, libraryPath, library.source.uri,
-        library, library.context.typeProvider, units);
   }
 }
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
index 9d1ff41..caa227a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -1,10 +1,11 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 import 'dart:collection';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -478,7 +479,7 @@
     return results;
   }
 
-  Future<Null> _addResults(
+  Future<void> _addResults(
       List<SearchResult> results,
       Element element,
       SearchedFiles searchedFiles,
@@ -522,7 +523,7 @@
   /**
    * Add results for [element] usage in the given [file].
    */
-  Future<Null> _addResultsInFile(
+  Future<void> _addResultsInFile(
       List<SearchResult> results,
       Element element,
       Map<IndexRelationKind, SearchResultKind> relationToResultKind,
@@ -654,10 +655,10 @@
     LibraryElement libraryElement = element.library;
     for (CompilationUnitElement unitElement in libraryElement.units) {
       String unitPath = unitElement.source.fullName;
-      AnalysisResult unitAnalysisResult = await _driver.getResult(unitPath);
+      ResolvedUnitResult unitResult = await _driver.getResult(unitPath);
       _ImportElementReferencesVisitor visitor =
           new _ImportElementReferencesVisitor(element, unitElement);
-      unitAnalysisResult.unit.accept(visitor);
+      unitResult.unit.accept(visitor);
       results.addAll(visitor.results);
     }
     return results;
@@ -675,8 +676,8 @@
     List<SearchResult> results = <SearchResult>[];
     for (CompilationUnitElement unitElement in element.units) {
       String unitPath = unitElement.source.fullName;
-      AnalysisResult unitAnalysisResult = await _driver.getResult(unitPath);
-      CompilationUnit unit = unitAnalysisResult.unit;
+      ResolvedUnitResult unitResult = await _driver.getResult(unitPath);
+      CompilationUnit unit = unitResult.unit;
       for (Directive directive in unit.directives) {
         if (directive is PartOfDirective && directive.element == element) {
           results.add(new SearchResult._(
@@ -702,8 +703,8 @@
     }
 
     // Prepare the unit.
-    AnalysisResult analysisResult = await _driver.getResult(path);
-    CompilationUnit unit = analysisResult.unit;
+    ResolvedUnitResult unitResult = await _driver.getResult(path);
+    CompilationUnit unit = unitResult.unit;
     if (unit == null) {
       return const <SearchResult>[];
     }
@@ -715,7 +716,7 @@
     }
 
     // Prepare the enclosing node.
-    AstNode enclosingNode = node.getAncestor(isRootNode);
+    AstNode enclosingNode = node.thisOrAncestorMatching(isRootNode);
     if (enclosingNode == null) {
       return const <SearchResult>[];
     }
@@ -759,10 +760,10 @@
     LibraryElement libraryElement = element.library;
     for (CompilationUnitElement unitElement in libraryElement.units) {
       String unitPath = unitElement.source.fullName;
-      AnalysisResult unitAnalysisResult = await _driver.getResult(unitPath);
+      ResolvedUnitResult unitResult = await _driver.getResult(unitPath);
       _LocalReferencesVisitor visitor =
           new _LocalReferencesVisitor(element, unitElement);
-      unitAnalysisResult.unit.accept(visitor);
+      unitResult.unit.accept(visitor);
       results.addAll(visitor.results);
     }
     return results;
diff --git a/pkg/analyzer/lib/src/dart/analysis/session.dart b/pkg/analyzer/lib/src/dart/analysis/session.dart
index b44d556..6ff7f8f 100644
--- a/pkg/analyzer/lib/src/dart/analysis/session.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/session.dart
@@ -4,6 +4,7 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
@@ -51,6 +52,9 @@
   AnalysisSessionImpl(this._driver);
 
   @override
+  AnalysisContext get analysisContext => _driver.analysisContext;
+
+  @override
   DeclaredVariables get declaredVariables => _driver.declaredVariables;
 
   @override
@@ -78,7 +82,7 @@
     await null;
     _checkConsistency();
     if (_typeSystem == null) {
-      _typeSystem = new StrongTypeSystemImpl(await typeProvider);
+      _typeSystem = new Dart2TypeSystem(await typeProvider);
     }
     return _typeSystem;
   }
@@ -110,24 +114,36 @@
     return libraryElement;
   }
 
+  @deprecated
   @override
-  Future<ParseResult> getParsedAst(String path) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    return getParsedAstSync(path);
+  Future<ParseResult> getParsedAst(String path) async => getParsedUnit(path);
+
+  @deprecated
+  @override
+  ParseResult getParsedAstSync(String path) => getParsedUnit(path);
+
+  @override
+  ParsedLibraryResult getParsedLibrary(String path) {
+    _checkConsistency();
+    return _driver.getParsedLibrary(path);
   }
 
   @override
-  ParseResult getParsedAstSync(String path) {
+  ParsedLibraryResult getParsedLibraryByElement(LibraryElement element) {
+    _checkConsistency();
+    _checkElementOfThisSession(element);
+    return _driver.getParsedLibraryByUri(element.source.uri);
+  }
+
+  @override
+  ParsedUnitResult getParsedUnit(String path) {
     _checkConsistency();
     return _driver.parseFileSync(path);
   }
 
+  @deprecated
   @override
-  Future<ResolveResult> getResolvedAst(String path) {
-    _checkConsistency();
-    return _driver.getResult(path);
-  }
+  Future<ResolveResult> getResolvedAst(String path) => getResolvedUnit(path);
 
   @override
   Future<ResolvedLibraryResult> getResolvedLibrary(String path) {
@@ -144,6 +160,12 @@
   }
 
   @override
+  Future<ResolvedUnitResult> getResolvedUnit(String path) {
+    _checkConsistency();
+    return _driver.getResult(path);
+  }
+
+  @override
   Future<SourceKind> getSourceKind(String path) {
     _checkConsistency();
     return _driver.getSourceKind(path);
@@ -179,11 +201,10 @@
   }
 
   void _checkElementOfThisSession(Element element) {
-    // TODO(scheglov) Requires 2.2 implementation
-//    if (element.session != this) {
-//      throw new ArgumentError(
-//          '(${element.runtimeType}) $element was not produced by '
-//          'this session.');
-//    }
+    if (element.session != this) {
+      throw new ArgumentError(
+          '(${element.runtimeType}) $element was not produced by '
+          'this session.');
+    }
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/analysis/session_helper.dart b/pkg/analyzer/lib/src/dart/analysis/session_helper.dart
index e35ec6a..9692a26 100644
--- a/pkg/analyzer/lib/src/dart/analysis/session_helper.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/session_helper.dart
@@ -4,6 +4,7 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart';
 
@@ -15,14 +16,14 @@
 class AnalysisSessionHelper {
   final AnalysisSession session;
 
+  final Map<String, ResolvedLibraryResult> _resolvedLibraries = {};
+
   AnalysisSessionHelper(this.session);
 
   /// Return the [ClassElement] with the given [className] that is exported
   /// from the library with the given [libraryUri], or `null` if the library
   /// does not export a class with such name.
   Future<ClassElement> getClass(String libraryUri, String className) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     var libraryElement = await session.getLibraryByUri(libraryUri);
     var element = libraryElement.exportNamespace.get(className);
     if (element is ClassElement) {
@@ -32,13 +33,31 @@
     }
   }
 
+  /// Return the declaration of the [element], or `null` is the [element]
+  /// is synthetic.
+  Future<ElementDeclarationResult> getElementDeclaration(
+      Element element) async {
+    var libraryPath = element.library.source.fullName;
+    var resolvedLibrary = await _getResolvedLibrary(libraryPath);
+    return resolvedLibrary.getElementDeclaration(element);
+  }
+
+  /// Return the resolved unit that declares the given [element].
+  Future<ResolvedUnitResult> getResolvedUnitByElement(Element element) async {
+    var libraryPath = element.library.source.fullName;
+    var resolvedLibrary = await _getResolvedLibrary(libraryPath);
+
+    var unitPath = element.source.fullName;
+    return resolvedLibrary.units.singleWhere((resolvedUnit) {
+      return resolvedUnit.path == unitPath;
+    });
+  }
+
   /// Return the [PropertyAccessorElement] with the given [name] that is
   /// exported from the library with the given [uri], or `null` if the
   /// library does not export a top-level accessor with such name.
   Future<PropertyAccessorElement> getTopLevelPropertyAccessor(
       String uri, String name) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     var libraryElement = await session.getLibraryByUri(uri);
     var element = libraryElement.exportNamespace.get(name);
     if (element is PropertyAccessorElement) {
@@ -47,4 +66,14 @@
       return null;
     }
   }
+
+  /// Return a newly resolved, or cached library with the given [path].
+  Future<ResolvedLibraryResult> _getResolvedLibrary(String path) async {
+    var result = _resolvedLibraries[path];
+    if (result == null) {
+      result = await session.getResolvedLibrary(path);
+      _resolvedLibraries[path] = result;
+    }
+    return result;
+  }
 }
diff --git a/pkg/analyzer/lib/src/dart/analysis/status.dart b/pkg/analyzer/lib/src/dart/analysis/status.dart
index cc2ad45..383de26 100644
--- a/pkg/analyzer/lib/src/dart/analysis/status.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/status.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -37,16 +37,16 @@
  * after completion and will not complete until [notify] is called next time.
  */
 class Monitor {
-  Completer<Null> _completer = new Completer<Null>();
+  Completer<void> _completer = new Completer<void>();
 
   /**
    * Return a [Future] that completes when [notify] is called at least once.
    */
-  Future<Null> get signal async {
+  Future<void> get signal async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     await _completer.future;
-    _completer = new Completer<Null>();
+    _completer = new Completer<void>();
   }
 
   /**
@@ -78,7 +78,7 @@
    * If non-null, a completer which should be completed on the next transition
    * to idle.
    */
-  Completer<Null> _idleCompleter;
+  Completer<void> _idleCompleter;
 
   /**
    * Return the last status sent to the [stream].
@@ -98,7 +98,7 @@
    * as a call to [transitionToAnalyzing], but it has no effect on the [stream].
    */
   void preTransitionToAnalyzing() {
-    _idleCompleter ??= new Completer<Null>();
+    _idleCompleter ??= new Completer<void>();
   }
 
   /**
@@ -130,7 +130,7 @@
    * If the status is currently idle, the returned future will be signaled
    * immediately.
    */
-  Future<Null> waitForIdle() {
-    return _idleCompleter?.future ?? new Future.value();
+  Future<void> waitForIdle() {
+    return _idleCompleter?.future ?? new Future<void>.value();
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart b/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart
index df11c02..da33b5a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart
@@ -18,8 +18,8 @@
   final AnalysisDriver driver;
 
   /**
-   * Initialize a newly created URI converter to use the given [context] and
-   * [driver] to perform the conversions.
+   * Initialize a newly created URI converter to use the given [driver] to =
+   * perform the conversions.
    */
   DriverBasedUriConverter(this.driver);
 
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 3db5ed9..749f864 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -939,6 +939,15 @@
   }
 
   @override
+  T thisOrAncestorOfType<T extends AstNode>() {
+    AstNode node = this;
+    while (node != null && node is! T) {
+      node = node.parent;
+    }
+    return node as T;
+  }
+
+  @override
   String toSource() {
     StringBuffer buffer = new StringBuffer();
     accept(new ToSourceVisitor2(buffer));
@@ -1596,7 +1605,7 @@
 /**
  * Helper class to allow iteration of child entities of an AST node.
  */
-class ChildEntities extends Object
+class ChildEntities
     with IterableMixin<SyntacticEntity>
     implements Iterable<SyntacticEntity> {
   /**
@@ -2333,6 +2342,12 @@
   Map<int, AstNode> localDeclarations;
 
   /**
+   * Is `true` if the non-nullable feature is enabled, and this library
+   * unit is annotated with `@pragma('analyzer:non-nullable')`.
+   */
+  bool hasPragmaAnalyzerNonNullable = false;
+
+  /**
    * Initialize a newly created compilation unit to have the given directives
    * and declarations. The [scriptTag] can be `null` if there is no script tag
    * in the compilation unit. The list of [directives] can be `null` if there
@@ -2687,17 +2702,21 @@
     if (errorCode is CompileTimeErrorCode) {
       switch (errorCode) {
         case CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL:
+        case CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT:
         case CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING:
         case CompileTimeErrorCode.CONST_EVAL_TYPE_INT:
         case CompileTimeErrorCode.CONST_EVAL_TYPE_NUM:
         case CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION:
         case CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE:
+        case CompileTimeErrorCode.CONST_WITH_NON_CONST:
         case CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT:
         case CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER:
         case CompileTimeErrorCode
             .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST:
         case CompileTimeErrorCode.INVALID_CONSTANT:
         case CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL:
+        case CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL:
+        case CompileTimeErrorCode.MISSING_CONST_IN_SET_LITERAL:
           hasConstError = true;
       }
     }
@@ -5708,34 +5727,35 @@
   FormalParameterListImpl _parameters;
 
   @override
+  Token question;
+
+  @override
   DartType type;
 
   /**
    * Initialize a newly created generic function type.
    */
-  GenericFunctionTypeImpl(
-      TypeAnnotationImpl returnType,
-      this.functionKeyword,
-      TypeParameterListImpl typeParameters,
-      FormalParameterListImpl parameters) {
+  GenericFunctionTypeImpl(TypeAnnotationImpl returnType, this.functionKeyword,
+      TypeParameterListImpl typeParameters, FormalParameterListImpl parameters,
+      {this.question}) {
     _returnType = _becomeParentOf(returnType);
     _typeParameters = _becomeParentOf(typeParameters);
     _parameters = _becomeParentOf(parameters);
   }
 
   @override
-  Token get beginToken =>
-      _returnType == null ? functionKeyword : _returnType.beginToken;
+  Token get beginToken => _returnType?.beginToken ?? functionKeyword;
 
   @override
   Iterable<SyntacticEntity> get childEntities => new ChildEntities()
     ..add(_returnType)
     ..add(functionKeyword)
     ..add(_typeParameters)
-    ..add(_parameters);
+    ..add(_parameters)
+    ..add(question);
 
   @override
-  Token get endToken => _parameters.endToken;
+  Token get endToken => question ?? _parameters.endToken;
 
   @override
   FormalParameterList get parameters => _parameters;
@@ -6394,8 +6414,6 @@
  *
  *    newExpression ::=
  *        ('new' | 'const')? [TypeName] ('.' [SimpleIdentifier])? [ArgumentList]
- *
- * 'new' | 'const' are only optional if the previewDart2 option is enabled.
  */
 class InstanceCreationExpressionImpl extends ExpressionImpl
     implements InstanceCreationExpression {
@@ -6487,8 +6505,6 @@
 
   /**
    * Return `true` if this is an implicit constructor invocations.
-   *
-   * This can only be `true` when the previewDart2 option is enabled.
    */
   bool get isImplicit => keyword == null;
 
@@ -6531,7 +6547,10 @@
    *
    * Also note that this method can cause constant evaluation to occur, which
    * can be computationally expensive.
+   * 
+   * Deprecated: Use `LinterContext.canBeConst` instead.
    */
+  @deprecated
   bool canBeConst() {
     //
     // Verify that the invoked constructor is a const constructor.
@@ -7753,6 +7772,12 @@
   SimpleIdentifierImpl _methodName;
 
   /**
+   * The invoke type of the [methodName] if the target element is a getter,
+   * or `null` otherwise.
+   */
+  DartType _methodNameType;
+
+  /**
    * Initialize a newly created method invocation. The [target] and [operator]
    * can be `null` if there is no target.
    */
@@ -7802,6 +7827,26 @@
     _methodName = _becomeParentOf(identifier as SimpleIdentifierImpl);
   }
 
+  /**
+   * The invoke type of the [methodName].
+   *
+   * If the target element is a [MethodElement], this is the same as the
+   * [staticInvokeType]. If the target element is a getter, presumably
+   * returning an [ExecutableElement] so that it can be invoked in this
+   * [MethodInvocation], then this type is the type of the getter, and the
+   * [staticInvokeType] is the invoked type of the returned element.
+   */
+  DartType get methodNameType => _methodNameType ?? staticInvokeType;
+
+  /**
+   * Set the [methodName] invoke type, only if the target element is a getter.
+   * Otherwise, the target element itself is invoked, [_methodNameType] is
+   * `null`, and the getter will return [staticInvokeType].
+   */
+  set methodNameType(DartType methodNameType) {
+    _methodNameType = methodNameType;
+  }
+
   @override
   int get precedence => 15;
 
@@ -8252,9 +8297,7 @@
 /**
  * A list of AST nodes that have a common parent.
  */
-class NodeListImpl<E extends AstNode> extends Object
-    with ListMixin<E>
-    implements NodeList<E> {
+class NodeListImpl<E extends AstNode> with ListMixin<E> implements NodeList<E> {
   /**
    * The node that is the parent of each of the elements in the list.
    */
@@ -9460,6 +9503,78 @@
 }
 
 /**
+ * A literal set.
+ *
+ *    setLiteral ::=
+ *        'const'? ('<' [TypeAnnotation] '>')?
+ *        '{' [Expression] (',' [Expression])* ','? '}'
+ *      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
+ */
+class SetLiteralImpl extends TypedLiteralImpl implements SetLiteral {
+  /**
+   * The left curly bracket.
+   */
+  @override
+  Token leftBracket;
+
+  /**
+   * The elements in the set.
+   */
+  NodeList<Expression> _elements;
+
+  /**
+   * The right curly bracket.
+   */
+  @override
+  Token rightBracket;
+
+  /**
+   * Initialize a newly created set literal. The [constKeyword] can be `null` if
+   * the literal is not a constant. The [typeArguments] can be `null` if no type
+   * arguments were declared. The [elements] can be `null` if the set is empty.
+   */
+  SetLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
+      this.leftBracket, List<Expression> elements, this.rightBracket)
+      : super(constKeyword, typeArguments) {
+    _elements = new NodeListImpl<Expression>(this, elements);
+  }
+
+  @override
+  Token get beginToken {
+    if (constKeyword != null) {
+      return constKeyword;
+    }
+    TypeArgumentList typeArguments = this.typeArguments;
+    if (typeArguments != null) {
+      return typeArguments.beginToken;
+    }
+    return leftBracket;
+  }
+
+  @override
+  // TODO(paulberry): add commas.
+  Iterable<SyntacticEntity> get childEntities => super._childEntities
+    ..add(leftBracket)
+    ..addAll(elements)
+    ..add(rightBracket);
+
+  @override
+  NodeList<Expression> get elements => _elements;
+
+  @override
+  Token get endToken => rightBracket;
+
+  @override
+  E accept<E>(AstVisitor<E> visitor) => visitor.visitSetLiteral(this);
+
+  @override
+  void visitChildren(AstVisitor visitor) {
+    super.visitChildren(visitor);
+    _elements.accept(visitor);
+  }
+}
+
+/**
  * A combinator that restricts the names being imported to those in a given list.
  *
  *    showCombinator ::=
@@ -10949,7 +11064,7 @@
  * The name of a type, which can optionally include type arguments.
  *
  *    typeName ::=
- *        [Identifier] typeArguments?
+ *        [Identifier] typeArguments? '?'?
  */
 class TypeNameImpl extends TypeAnnotationImpl implements TypeName {
   /**
@@ -10963,6 +11078,9 @@
    */
   TypeArgumentListImpl _typeArguments;
 
+  @override
+  Token question;
+
   /**
    * The type being named, or `null` if the AST structure has not been resolved.
    */
@@ -10972,7 +11090,8 @@
    * Initialize a newly created type name. The [typeArguments] can be `null` if
    * there are no type arguments.
    */
-  TypeNameImpl(IdentifierImpl name, TypeArgumentListImpl typeArguments) {
+  TypeNameImpl(IdentifierImpl name, TypeArgumentListImpl typeArguments,
+      {this.question}) {
     _name = _becomeParentOf(name);
     _typeArguments = _becomeParentOf(typeArguments);
   }
@@ -10982,15 +11101,10 @@
 
   @override
   Iterable<SyntacticEntity> get childEntities =>
-      new ChildEntities()..add(_name)..add(_typeArguments);
+      new ChildEntities()..add(_name)..add(_typeArguments)..add(question);
 
   @override
-  Token get endToken {
-    if (_typeArguments != null) {
-      return _typeArguments.endToken;
-    }
-    return _name.endToken;
-  }
+  Token get endToken => question ?? _typeArguments?.endToken ?? _name.endToken;
 
   @override
   bool get isDeferred {
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index 6a3c3b5..cc7023a 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -546,9 +546,11 @@
           TypeAnnotation returnType,
           Token functionKeyword,
           TypeParameterList typeParameters,
-          FormalParameterList parameters) =>
+          FormalParameterList parameters,
+          {Token question}) =>
       new GenericFunctionTypeImpl(
-          returnType, functionKeyword, typeParameters, parameters);
+          returnType, functionKeyword, typeParameters, parameters,
+          question: question);
 
   @override
   GenericTypeAlias genericTypeAlias(
@@ -832,6 +834,12 @@
   ScriptTag scriptTag(Token scriptTag) => new ScriptTagImpl(scriptTag);
 
   @override
+  SetLiteral setLiteral(Token constKeyword, TypeArgumentList typeArguments,
+          Token leftBracket, List<Expression> elements, Token rightBracket) =>
+      new SetLiteralImpl(
+          constKeyword, typeArguments, leftBracket, elements, rightBracket);
+
+  @override
   ShowCombinator showCombinator(
           Token keyword, List<SimpleIdentifier> shownNames) =>
       new ShowCombinatorImpl(keyword, shownNames);
@@ -946,8 +954,9 @@
       new TypeArgumentListImpl(leftBracket, arguments, rightBracket);
 
   @override
-  TypeName typeName(Identifier name, TypeArgumentList typeArguments) =>
-      new TypeNameImpl(name, typeArguments);
+  TypeName typeName(Identifier name, TypeArgumentList typeArguments,
+          {Token question}) =>
+      new TypeNameImpl(name, typeArguments, question: question);
 
   @override
   TypeParameter typeParameter(Comment comment, List<Annotation> metadata,
diff --git a/pkg/analyzer/lib/src/dart/ast/token.dart b/pkg/analyzer/lib/src/dart/ast/token.dart
index 0556cfc..eea8be3 100644
--- a/pkg/analyzer/lib/src/dart/ast/token.dart
+++ b/pkg/analyzer/lib/src/dart/ast/token.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/ast/token.dart';
+
 export 'package:front_end/src/scanner/token.dart'
     show
         BeginToken,
@@ -15,3 +17,36 @@
         SyntheticStringToken,
         SyntheticToken,
         TokenClass;
+
+/**
+ * Return the binary operator that is invoked by the given compound assignment
+ * [operator]. Throw [StateError] if the assignment [operator] does not
+ * correspond to a binary operator.
+ */
+TokenType operatorFromCompoundAssignment(TokenType operator) {
+  if (operator == TokenType.AMPERSAND_EQ) {
+    return TokenType.AMPERSAND;
+  } else if (operator == TokenType.BAR_EQ) {
+    return TokenType.BAR;
+  } else if (operator == TokenType.CARET_EQ) {
+    return TokenType.CARET;
+  } else if (operator == TokenType.GT_GT_EQ) {
+    return TokenType.GT_GT;
+  } else if (operator == TokenType.LT_LT_EQ) {
+    return TokenType.LT_LT;
+  } else if (operator == TokenType.MINUS_EQ) {
+    return TokenType.MINUS;
+  } else if (operator == TokenType.PERCENT_EQ) {
+    return TokenType.PERCENT;
+  } else if (operator == TokenType.PLUS_EQ) {
+    return TokenType.PLUS;
+  } else if (operator == TokenType.SLASH_EQ) {
+    return TokenType.SLASH;
+  } else if (operator == TokenType.STAR_EQ) {
+    return TokenType.STAR;
+  } else if (operator == TokenType.TILDE_SLASH_EQ) {
+    return TokenType.TILDE_SLASH;
+  } else {
+    throw StateError('Unknown assignment operator: $operator');
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index f7e6832..051fa2b 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -574,7 +574,8 @@
           cloneNode(node.returnType),
           cloneToken(node.functionKeyword),
           cloneNode(node.typeParameters),
-          cloneNode(node.parameters));
+          cloneNode(node.parameters),
+          question: cloneToken(node.question));
 
   @override
   AstNode visitGenericTypeAlias(GenericTypeAlias node) =>
@@ -845,6 +846,14 @@
       astFactory.scriptTag(cloneToken(node.scriptTag));
 
   @override
+  SetLiteral visitSetLiteral(SetLiteral node) => astFactory.setLiteral(
+      cloneToken(node.constKeyword),
+      cloneNode(node.typeArguments),
+      cloneToken(node.leftBracket),
+      cloneNodeList(node.elements),
+      cloneToken(node.rightBracket));
+
+  @override
   ShowCombinator visitShowCombinator(ShowCombinator node) => astFactory
       .showCombinator(cloneToken(node.keyword), cloneNodeList(node.shownNames));
 
@@ -950,7 +959,8 @@
 
   @override
   TypeName visitTypeName(TypeName node) =>
-      astFactory.typeName(cloneNode(node.name), cloneNode(node.typeArguments));
+      astFactory.typeName(cloneNode(node.name), cloneNode(node.typeArguments),
+          question: cloneToken(node.question));
 
   @override
   TypeParameter visitTypeParameter(TypeParameter node) =>
@@ -1653,7 +1663,8 @@
     return isEqualNodes(node.returnType, other.returnType) &&
         isEqualTokens(node.functionKeyword, other.functionKeyword) &&
         isEqualNodes(node.typeParameters, other.typeParameters) &&
-        isEqualNodes(node.parameters, other.parameters);
+        isEqualNodes(node.parameters, other.parameters) &&
+        isEqualTokens(node.question, other.question);
   }
 
   @override
@@ -1988,6 +1999,16 @@
   }
 
   @override
+  bool visitSetLiteral(SetLiteral node) {
+    SetLiteral other = _other as SetLiteral;
+    return isEqualTokens(node.constKeyword, other.constKeyword) &&
+        isEqualNodes(node.typeArguments, other.typeArguments) &&
+        isEqualTokens(node.leftBracket, other.leftBracket) &&
+        _isEqualNodeLists(node.elements, other.elements) &&
+        isEqualTokens(node.rightBracket, other.rightBracket);
+  }
+
+  @override
   bool visitShowCombinator(ShowCombinator node) {
     ShowCombinator other = _other as ShowCombinator;
     return isEqualTokens(node.keyword, other.keyword) &&
@@ -2122,7 +2143,8 @@
   bool visitTypeName(TypeName node) {
     TypeName other = _other as TypeName;
     return isEqualNodes(node.name, other.name) &&
-        isEqualNodes(node.typeArguments, other.typeArguments);
+        isEqualNodes(node.typeArguments, other.typeArguments) &&
+        isEqualTokens(node.question, other.question);
   }
 
   @override
@@ -2633,7 +2655,7 @@
  *
  * See [PrefixedIdentifier.isDeferred].
  */
-class DeferredLibraryReferenceDetector extends RecursiveAstVisitor<Object> {
+class DeferredLibraryReferenceDetector extends RecursiveAstVisitor<void> {
   /**
    * A flag indicating whether an identifier from a deferred library has been
    * found.
@@ -2647,13 +2669,12 @@
   bool get result => _result;
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     if (!_result) {
       if (node.isDeferred) {
         _result = true;
       }
     }
-    return null;
   }
 }
 
@@ -3054,14 +3075,14 @@
 
   @override
   CompilationUnit visitCompilationUnit(CompilationUnit node) {
-    CompilationUnit copy = astFactory.compilationUnit(
+    CompilationUnitImpl copy = astFactory.compilationUnit(
         _mapToken(node.beginToken),
         _cloneNode(node.scriptTag),
         _cloneNodeList(node.directives),
         _cloneNodeList(node.declarations),
         _mapToken(node.endToken));
     copy.lineInfo = node.lineInfo;
-    copy.element = node.element;
+    copy.declaredElement = node.declaredElement;
     return copy;
   }
 
@@ -3091,7 +3112,7 @@
   @override
   ConstructorDeclaration visitConstructorDeclaration(
       ConstructorDeclaration node) {
-    ConstructorDeclaration copy = astFactory.constructorDeclaration(
+    ConstructorDeclarationImpl copy = astFactory.constructorDeclaration(
         _cloneNode(node.documentationComment),
         _cloneNodeList(node.metadata),
         _mapToken(node.externalKeyword),
@@ -3105,7 +3126,7 @@
         _cloneNodeList(node.initializers),
         _cloneNode(node.redirectedConstructor),
         _cloneNode(node.body));
-    copy.element = node.element;
+    copy.declaredElement = node.declaredElement;
     return copy;
   }
 
@@ -3316,11 +3337,11 @@
 
   @override
   FunctionExpression visitFunctionExpression(FunctionExpression node) {
-    FunctionExpression copy = astFactory.functionExpression(
+    FunctionExpressionImpl copy = astFactory.functionExpression(
         _cloneNode(node.typeParameters),
         _cloneNode(node.parameters),
         _cloneNode(node.body));
-    copy.element = node.element;
+    copy.declaredElement = node.declaredElement;
     copy.staticType = node.staticType;
     return copy;
   }
@@ -3367,7 +3388,8 @@
           _cloneNode(node.returnType),
           _mapToken(node.functionKeyword),
           _cloneNode(node.typeParameters),
-          _cloneNode(node.parameters));
+          _cloneNode(node.parameters),
+          question: _mapToken(node.question));
 
   @override
   AstNode visitGenericTypeAlias(GenericTypeAlias node) =>
@@ -3713,6 +3735,18 @@
       astFactory.scriptTag(_mapToken(node.scriptTag));
 
   @override
+  SetLiteral visitSetLiteral(SetLiteral node) {
+    SetLiteral copy = astFactory.setLiteral(
+        _mapToken(node.constKeyword),
+        _cloneNode(node.typeArguments),
+        _mapToken(node.leftBracket),
+        _cloneNodeList(node.elements),
+        _mapToken(node.rightBracket));
+    copy.staticType = node.staticType;
+    return copy;
+  }
+
+  @override
   ShowCombinator visitShowCombinator(ShowCombinator node) => astFactory
       .showCombinator(_mapToken(node.keyword), _cloneNodeList(node.shownNames));
 
@@ -3858,7 +3892,8 @@
   @override
   TypeName visitTypeName(TypeName node) {
     TypeName copy = astFactory.typeName(
-        _cloneNode(node.name), _cloneNode(node.typeArguments));
+        _cloneNode(node.name), _cloneNode(node.typeArguments),
+        question: _mapToken(node.question));
     copy.type = node.type;
     return copy;
   }
@@ -3959,7 +3994,7 @@
  * the [AstNode] with the shortest length whose source range completely
  * encompasses the specified range.
  */
-class NodeLocator extends UnifyingAstVisitor<Object> {
+class NodeLocator extends UnifyingAstVisitor<void> {
   /**
    * The start offset of the range used to identify the node.
    */
@@ -4012,10 +4047,10 @@
   }
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     // Don't visit a new tree if the result has been already found.
     if (_foundNode != null) {
-      return null;
+      return;
     }
     // Check whether the current node covers the selection.
     Token beginToken = node.beginToken;
@@ -4032,11 +4067,8 @@
     }
     int end = endToken.end;
     int start = node.offset;
-    if (end < _startOffset) {
-      return null;
-    }
-    if (start > _endOffset) {
-      return null;
+    if (end < _startOffset || start > _endOffset) {
+      return;
     }
     // Check children.
     try {
@@ -4050,13 +4082,12 @@
     }
     // Found a child.
     if (_foundNode != null) {
-      return null;
+      return;
     }
     // Check this node.
     if (start <= _startOffset && _endOffset <= end) {
       _foundNode = node;
     }
-    return null;
   }
 }
 
@@ -4065,7 +4096,7 @@
  * More specifically, they will return the deepest [AstNode] which completely
  * encompasses the specified range.
  */
-class NodeLocator2 extends UnifyingAstVisitor<Object> {
+class NodeLocator2 extends UnifyingAstVisitor<void> {
   /**
    * The inclusive start offset of the range used to identify the node.
    */
@@ -4112,10 +4143,10 @@
   }
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     // Don't visit a new tree if the result has been already found.
     if (_foundNode != null) {
-      return null;
+      return;
     }
     // Check whether the current node covers the selection.
     Token beginToken = node.beginToken;
@@ -4132,11 +4163,8 @@
     }
     int end = endToken.end;
     int start = node.offset;
-    if (end <= _startOffset) {
-      return null;
-    }
-    if (start > _endOffset) {
-      return null;
+    if (end <= _startOffset || start > _endOffset) {
+      return;
     }
     // Check children.
     try {
@@ -4150,13 +4178,12 @@
     }
     // Found a child.
     if (_foundNode != null) {
-      return null;
+      return;
     }
     // Check this node.
     if (start <= _startOffset && _endOffset < end) {
       _foundNode = node;
     }
-    return null;
   }
 }
 
@@ -5164,6 +5191,14 @@
   bool visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
   @override
+  bool visitSetLiteral(SetLiteral node) {
+    if (_replaceInList(node.elements)) {
+      return true;
+    }
+    return visitTypedLiteral(node);
+  }
+
+  @override
   bool visitShowCombinator(ShowCombinator node) {
     if (_replaceInList(node.shownNames)) {
       return true;
@@ -5714,7 +5749,7 @@
 
   @override
   bool visitConstructorDeclaration(ConstructorDeclaration node) {
-    ConstructorDeclaration toNode = this._toNode as ConstructorDeclaration;
+    ConstructorDeclarationImpl toNode = this._toNode as ConstructorDeclaration;
     if (_and(
         _isEqualNodes(node.documentationComment, toNode.documentationComment),
         _isEqualNodeLists(node.metadata, toNode.metadata),
@@ -5729,7 +5764,7 @@
         _isEqualNodeLists(node.initializers, toNode.initializers),
         _isEqualNodes(node.redirectedConstructor, toNode.redirectedConstructor),
         _isEqualNodes(node.body, toNode.body))) {
-      toNode.element = node.declaredElement;
+      toNode.declaredElement = node.declaredElement;
       return true;
     }
     return false;
@@ -5985,10 +6020,10 @@
 
   @override
   bool visitFunctionExpression(FunctionExpression node) {
-    FunctionExpression toNode = this._toNode as FunctionExpression;
+    FunctionExpressionImpl toNode = this._toNode as FunctionExpression;
     if (_and(_isEqualNodes(node.parameters, toNode.parameters),
         _isEqualNodes(node.body, toNode.body))) {
-      toNode.element = node.declaredElement;
+      toNode.declaredElement = node.declaredElement;
       toNode.staticType = node.staticType;
       return true;
     }
@@ -6044,7 +6079,8 @@
         _isEqualNodes(node.returnType, toNode.returnType),
         _isEqualTokens(node.functionKeyword, toNode.functionKeyword),
         _isEqualNodes(node.typeParameters, toNode.typeParameters),
-        _isEqualNodes(node.parameters, toNode.parameters))) {
+        _isEqualNodes(node.parameters, toNode.parameters),
+        _isEqualTokens(node.question, toNode.question))) {
       toNode.type = node.type;
       return true;
     }
@@ -6494,6 +6530,21 @@
   }
 
   @override
+  bool visitSetLiteral(SetLiteral node) {
+    SetLiteral toNode = this._toNode as SetLiteral;
+    if (_and(
+        _isEqualTokens(node.constKeyword, toNode.constKeyword),
+        _isEqualNodes(node.typeArguments, toNode.typeArguments),
+        _isEqualTokens(node.leftBracket, toNode.leftBracket),
+        _isEqualNodeLists(node.elements, toNode.elements),
+        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
+      toNode.staticType = node.staticType;
+      return true;
+    }
+    return false;
+  }
+
+  @override
   bool visitShowCombinator(ShowCombinator node) {
     ShowCombinator toNode = this._toNode as ShowCombinator;
     return _and(_isEqualTokens(node.keyword, toNode.keyword),
@@ -6674,8 +6725,10 @@
   @override
   bool visitTypeName(TypeName node) {
     TypeName toNode = this._toNode as TypeName;
-    if (_and(_isEqualNodes(node.name, toNode.name),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments))) {
+    if (_and(
+        _isEqualNodes(node.name, toNode.name),
+        _isEqualNodes(node.typeArguments, toNode.typeArguments),
+        _isEqualTokens(node.question, toNode.question))) {
       toNode.type = node.type;
       return true;
     }
@@ -6893,7 +6946,7 @@
  * Completion test code coverage is 95%. The two basic blocks that are not
  * executed cannot be executed. They are included for future reference.
  */
-class ScopedNameFinder extends GeneralizingAstVisitor<Object> {
+class ScopedNameFinder extends GeneralizingAstVisitor<void> {
   Declaration _declarationNode;
 
   AstNode _immediateChild;
@@ -6912,112 +6965,104 @@
   Map<String, SimpleIdentifier> get locals => _locals;
 
   @override
-  Object visitBlock(Block node) {
+  void visitBlock(Block node) {
     _checkStatements(node.statements);
-    return super.visitBlock(node);
+    super.visitBlock(node);
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     _addToScope(node.exceptionParameter);
     _addToScope(node.stackTraceParameter);
-    return super.visitCatchClause(node);
+    super.visitCatchClause(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     if (!identical(_immediateChild, node.parameters)) {
       _addParameters(node.parameters.parameters);
     }
     _declarationNode = node;
-    return null;
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     _declarationNode = node;
-    return null;
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     DeclaredIdentifier loopVariable = node.loopVariable;
     if (loopVariable != null) {
       _addToScope(loopVariable.identifier);
     }
-    return super.visitForEachStatement(node);
+    super.visitForEachStatement(node);
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     if (!identical(_immediateChild, node.variables) && node.variables != null) {
       _addVariables(node.variables.variables);
     }
-    return super.visitForStatement(node);
+    super.visitForStatement(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     if (node.parent is! FunctionDeclarationStatement) {
       _declarationNode = node;
-      return null;
+    } else {
+      super.visitFunctionDeclaration(node);
     }
-    return super.visitFunctionDeclaration(node);
   }
 
   @override
-  Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+  void visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
     _referenceIsWithinLocalFunction = true;
-    return super.visitFunctionDeclarationStatement(node);
+    super.visitFunctionDeclarationStatement(node);
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (node.parameters != null &&
         !identical(_immediateChild, node.parameters)) {
       _addParameters(node.parameters.parameters);
     }
-    return super.visitFunctionExpression(node);
+    super.visitFunctionExpression(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     _declarationNode = node;
-    if (node.parameters == null) {
-      return null;
-    }
-    if (!identical(_immediateChild, node.parameters)) {
+    if (node.parameters != null &&
+        !identical(_immediateChild, node.parameters)) {
       _addParameters(node.parameters.parameters);
     }
-    return null;
   }
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     _immediateChild = node;
     AstNode parent = node.parent;
     if (parent != null) {
       parent.accept(this);
     }
-    return null;
   }
 
   @override
-  Object visitSwitchMember(SwitchMember node) {
+  void visitSwitchMember(SwitchMember node) {
     _checkStatements(node.statements);
-    return super.visitSwitchMember(node);
+    super.visitSwitchMember(node);
   }
 
   @override
-  Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     _declarationNode = node;
-    return null;
   }
 
   @override
-  Object visitTypeAlias(TypeAlias node) {
+  void visitTypeAlias(TypeAlias node) {
     _declarationNode = node;
-    return null;
   }
 
   void _addParameters(NodeList<FormalParameter> vars) {
@@ -7076,7 +7121,7 @@
  * This class has been deprecated. Use the class ToSourceVisitor2 instead.
  */
 @deprecated
-class ToSourceVisitor implements AstVisitor<Object> {
+class ToSourceVisitor implements AstVisitor<void> {
   /**
    * The writer to which the source is to be written.
    */
@@ -7089,38 +7134,34 @@
   ToSourceVisitor(this._writer);
 
   @override
-  Object visitAdjacentStrings(AdjacentStrings node) {
+  void visitAdjacentStrings(AdjacentStrings node) {
     _visitNodeListWithSeparator(node.strings, " ");
-    return null;
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     _writer.print('@');
     _visitNode(node.name);
     _visitNodeWithPrefix(".", node.constructorName);
     _visitNode(node.arguments);
-    return null;
   }
 
   @override
-  Object visitArgumentList(ArgumentList node) {
+  void visitArgumentList(ArgumentList node) {
     _writer.print('(');
     _visitNodeListWithSeparator(node.arguments, ", ");
     _writer.print(')');
-    return null;
   }
 
   @override
-  Object visitAsExpression(AsExpression node) {
+  void visitAsExpression(AsExpression node) {
     _visitNode(node.expression);
     _writer.print(" as ");
     _visitNode(node.type);
-    return null;
   }
 
   @override
-  bool visitAssertInitializer(AssertInitializer node) {
+  void visitAssertInitializer(AssertInitializer node) {
     _writer.print("assert (");
     _visitNode(node.condition);
     if (node.message != null) {
@@ -7128,11 +7169,10 @@
       _visitNode(node.message);
     }
     _writer.print(")");
-    return null;
   }
 
   @override
-  Object visitAssertStatement(AssertStatement node) {
+  void visitAssertStatement(AssertStatement node) {
     _writer.print("assert (");
     _visitNode(node.condition);
     if (node.message != null) {
@@ -7140,46 +7180,41 @@
       _visitNode(node.message);
     }
     _writer.print(");");
-    return null;
   }
 
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     _visitNode(node.leftHandSide);
     _writer.print(' ');
     _writer.print(node.operator.lexeme);
     _writer.print(' ');
     _visitNode(node.rightHandSide);
-    return null;
   }
 
   @override
-  Object visitAwaitExpression(AwaitExpression node) {
+  void visitAwaitExpression(AwaitExpression node) {
     _writer.print("await ");
     _visitNode(node.expression);
-    return null;
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     _visitNode(node.leftOperand);
     _writer.print(' ');
     _writer.print(node.operator.lexeme);
     _writer.print(' ');
     _visitNode(node.rightOperand);
-    return null;
   }
 
   @override
-  Object visitBlock(Block node) {
+  void visitBlock(Block node) {
     _writer.print('{');
     _visitNodeListWithSeparator(node.statements, " ");
     _writer.print('}');
-    return null;
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     Token keyword = node.keyword;
     if (keyword != null) {
       _writer.print(keyword.lexeme);
@@ -7189,32 +7224,28 @@
       _writer.print(' ');
     }
     _visitNode(node.block);
-    return null;
   }
 
   @override
-  Object visitBooleanLiteral(BooleanLiteral node) {
+  void visitBooleanLiteral(BooleanLiteral node) {
     _writer.print(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     _writer.print("break");
     _visitNodeWithPrefix(" ", node.label);
     _writer.print(";");
-    return null;
   }
 
   @override
-  Object visitCascadeExpression(CascadeExpression node) {
+  void visitCascadeExpression(CascadeExpression node) {
     _visitNode(node.target);
     _visitNodeList(node.cascadeSections);
-    return null;
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     _visitNodeWithPrefix("on ", node.exceptionType);
     if (node.catchKeyword != null) {
       if (node.exceptionType != null) {
@@ -7228,11 +7259,10 @@
       _writer.print(" ");
     }
     _visitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitTokenWithSuffix(node.abstractKeyword, " ");
     _writer.print("class ");
@@ -7244,11 +7274,10 @@
     _writer.print(" {");
     _visitNodeListWithSeparator(node.members, " ");
     _writer.print("}");
-    return null;
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     if (node.abstractKeyword != null) {
       _writer.print("abstract ");
@@ -7261,17 +7290,16 @@
     _visitNodeWithPrefix(" ", node.withClause);
     _visitNodeWithPrefix(" ", node.implementsClause);
     _writer.print(";");
-    return null;
   }
 
   @override
-  Object visitComment(Comment node) => null;
+  void visitComment(Comment node) {}
 
   @override
-  Object visitCommentReference(CommentReference node) => null;
+  void visitCommentReference(CommentReference node) {}
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     ScriptTag scriptTag = node.scriptTag;
     NodeList<Directive> directives = node.directives;
     _visitNode(scriptTag);
@@ -7279,31 +7307,28 @@
     _visitNodeListWithSeparatorAndPrefix(prefix, directives, " ");
     prefix = scriptTag == null && directives.isEmpty ? "" : " ";
     _visitNodeListWithSeparatorAndPrefix(prefix, node.declarations, " ");
-    return null;
   }
 
   @override
-  Object visitConditionalExpression(ConditionalExpression node) {
+  void visitConditionalExpression(ConditionalExpression node) {
     _visitNode(node.condition);
     _writer.print(" ? ");
     _visitNode(node.thenExpression);
     _writer.print(" : ");
     _visitNode(node.elseExpression);
-    return null;
   }
 
   @override
-  Object visitConfiguration(Configuration node) {
+  void visitConfiguration(Configuration node) {
     _writer.print('if (');
     _visitNode(node.name);
     _visitNodeWithPrefix(" == ", node.value);
     _writer.print(') ');
     _visitNode(node.uri);
-    return null;
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitTokenWithSuffix(node.externalKeyword, " ");
     _visitTokenWithSuffix(node.constKeyword, " ");
@@ -7314,44 +7339,39 @@
     _visitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", ");
     _visitNodeWithPrefix(" = ", node.redirectedConstructor);
     _visitFunctionWithPrefix(" ", node.body);
-    return null;
   }
 
   @override
-  Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     _visitTokenWithSuffix(node.thisKeyword, ".");
     _visitNode(node.fieldName);
     _writer.print(" = ");
     _visitNode(node.expression);
-    return null;
   }
 
   @override
-  Object visitConstructorName(ConstructorName node) {
+  void visitConstructorName(ConstructorName node) {
     _visitNode(node.type);
     _visitNodeWithPrefix(".", node.name);
-    return null;
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     _writer.print("continue");
     _visitNodeWithPrefix(" ", node.label);
     _writer.print(";");
-    return null;
   }
 
   @override
-  Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitTokenWithSuffix(node.keyword, " ");
     _visitNodeWithSuffix(node.type, " ");
     _visitNode(node.identifier);
-    return null;
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     _visitNode(node.parameter);
     if (node.separator != null) {
       if (node.separator.lexeme != ":") {
@@ -7360,73 +7380,64 @@
       _writer.print(node.separator.lexeme);
       _visitNodeWithPrefix(" ", node.defaultValue);
     }
-    return null;
   }
 
   @override
-  Object visitDoStatement(DoStatement node) {
+  void visitDoStatement(DoStatement node) {
     _writer.print("do ");
     _visitNode(node.body);
     _writer.print(" while (");
     _visitNode(node.condition);
     _writer.print(");");
-    return null;
   }
 
   @override
-  Object visitDottedName(DottedName node) {
+  void visitDottedName(DottedName node) {
     _visitNodeListWithSeparator(node.components, ".");
-    return null;
   }
 
   @override
-  Object visitDoubleLiteral(DoubleLiteral node) {
+  void visitDoubleLiteral(DoubleLiteral node) {
     _writer.print(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitEmptyFunctionBody(EmptyFunctionBody node) {
+  void visitEmptyFunctionBody(EmptyFunctionBody node) {
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitEmptyStatement(EmptyStatement node) {
+  void visitEmptyStatement(EmptyStatement node) {
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+  void visitEnumConstantDeclaration(EnumConstantDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitNode(node.name);
-    return null;
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("enum ");
     _visitNode(node.name);
     _writer.print(" {");
     _visitNodeListWithSeparator(node.constants, ", ");
     _writer.print("}");
-    return null;
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("export ");
     _visitNode(node.uri);
     _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     Token keyword = node.keyword;
     if (keyword != null) {
       _writer.print(keyword.lexeme);
@@ -7437,34 +7448,30 @@
     if (node.semicolon != null) {
       _writer.print(';');
     }
-    return null;
   }
 
   @override
-  Object visitExpressionStatement(ExpressionStatement node) {
+  void visitExpressionStatement(ExpressionStatement node) {
     _visitNode(node.expression);
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitExtendsClause(ExtendsClause node) {
+  void visitExtendsClause(ExtendsClause node) {
     _writer.print("extends ");
     _visitNode(node.superclass);
-    return null;
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitTokenWithSuffix(node.staticKeyword, " ");
     _visitNode(node.fields);
     _writer.print(";");
-    return null;
   }
 
   @override
-  Object visitFieldFormalParameter(FieldFormalParameter node) {
+  void visitFieldFormalParameter(FieldFormalParameter node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
     _visitTokenWithSuffix(node.covariantKeyword, ' ');
     _visitTokenWithSuffix(node.keyword, " ");
@@ -7473,11 +7480,10 @@
     _visitNode(node.identifier);
     _visitNode(node.typeParameters);
     _visitNode(node.parameters);
-    return null;
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     DeclaredIdentifier loopVariable = node.loopVariable;
     if (node.awaitKeyword != null) {
       _writer.print("await ");
@@ -7492,11 +7498,10 @@
     _visitNode(node.iterable);
     _writer.print(") ");
     _visitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitFormalParameterList(FormalParameterList node) {
+  void visitFormalParameterList(FormalParameterList node) {
     String groupEnd = null;
     _writer.print('(');
     NodeList<FormalParameter> parameters = node.parameters;
@@ -7521,11 +7526,10 @@
       _writer.print(groupEnd);
     }
     _writer.print(')');
-    return null;
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     Expression initialization = node.initialization;
     _writer.print("for (");
     if (initialization != null) {
@@ -7539,47 +7543,42 @@
     _visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", ");
     _writer.print(") ");
     _visitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitTokenWithSuffix(node.externalKeyword, " ");
     _visitNodeWithSuffix(node.returnType, " ");
     _visitTokenWithSuffix(node.propertyKeyword, " ");
     _visitNode(node.name);
     _visitNode(node.functionExpression);
-    return null;
   }
 
   @override
-  Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+  void visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
     _visitNode(node.functionDeclaration);
-    return null;
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     _visitNode(node.typeParameters);
     _visitNode(node.parameters);
     if (node.body is! EmptyFunctionBody) {
       _writer.print(' ');
     }
     _visitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     _visitNode(node.function);
     _visitNode(node.typeArguments);
     _visitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("typedef ");
     _visitNodeWithSuffix(node.returnType, " ");
@@ -7587,66 +7586,62 @@
     _visitNode(node.typeParameters);
     _visitNode(node.parameters);
     _writer.print(";");
-    return null;
   }
 
   @override
-  Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
     _visitTokenWithSuffix(node.covariantKeyword, ' ');
     _visitNodeWithSuffix(node.returnType, " ");
     _visitNode(node.identifier);
     _visitNode(node.typeParameters);
     _visitNode(node.parameters);
-    return null;
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) {
+  void visitGenericFunctionType(GenericFunctionType node) {
     _visitNode(node.returnType);
     _writer.print(' Function');
     _visitNode(node.typeParameters);
     _visitNode(node.parameters);
-    return null;
+    if (node.question != null) {
+      _writer.print('?');
+    }
   }
 
   @override
-  Object visitGenericTypeAlias(GenericTypeAlias node) {
+  void visitGenericTypeAlias(GenericTypeAlias node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("typedef ");
     _visitNode(node.name);
     _visitNode(node.typeParameters);
     _writer.print(" = ");
     _visitNode(node.functionType);
-    return null;
   }
 
   @override
-  Object visitHideCombinator(HideCombinator node) {
+  void visitHideCombinator(HideCombinator node) {
     _writer.print("hide ");
     _visitNodeListWithSeparator(node.hiddenNames, ", ");
-    return null;
   }
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     _writer.print("if (");
     _visitNode(node.condition);
     _writer.print(") ");
     _visitNode(node.thenStatement);
     _visitNodeWithPrefix(" else ", node.elseStatement);
-    return null;
   }
 
   @override
-  Object visitImplementsClause(ImplementsClause node) {
+  void visitImplementsClause(ImplementsClause node) {
     _writer.print("implements ");
     _visitNodeListWithSeparator(node.interfaces, ", ");
-    return null;
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("import ");
     _visitNode(node.uri);
@@ -7656,11 +7651,10 @@
     _visitNodeWithPrefix(" as ", node.prefix);
     _visitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     if (node.isCascaded) {
       _writer.print("..");
     } else {
@@ -7669,25 +7663,22 @@
     _writer.print('[');
     _visitNode(node.index);
     _writer.print(']');
-    return null;
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     _visitTokenWithSuffix(node.keyword, " ");
     _visitNode(node.constructorName);
     _visitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitIntegerLiteral(IntegerLiteral node) {
+  void visitIntegerLiteral(IntegerLiteral node) {
     _writer.print(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitInterpolationExpression(InterpolationExpression node) {
+  void visitInterpolationExpression(InterpolationExpression node) {
     if (node.rightBracket != null) {
       _writer.print("\${");
       _visitNode(node.expression);
@@ -7696,17 +7687,15 @@
       _writer.print("\$");
       _visitNode(node.expression);
     }
-    return null;
   }
 
   @override
-  Object visitInterpolationString(InterpolationString node) {
+  void visitInterpolationString(InterpolationString node) {
     _writer.print(node.contents.lexeme);
-    return null;
   }
 
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     _visitNode(node.expression);
     if (node.notOperator == null) {
       _writer.print(" is ");
@@ -7714,40 +7703,35 @@
       _writer.print(" is! ");
     }
     _visitNode(node.type);
-    return null;
   }
 
   @override
-  Object visitLabel(Label node) {
+  void visitLabel(Label node) {
     _visitNode(node.label);
     _writer.print(":");
-    return null;
   }
 
   @override
-  Object visitLabeledStatement(LabeledStatement node) {
+  void visitLabeledStatement(LabeledStatement node) {
     _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
     _visitNode(node.statement);
-    return null;
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("library ");
     _visitNode(node.name);
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitLibraryIdentifier(LibraryIdentifier node) {
+  void visitLibraryIdentifier(LibraryIdentifier node) {
     _writer.print(node.name);
-    return null;
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     if (node.constKeyword != null) {
       _writer.print(node.constKeyword.lexeme);
       _writer.print(' ');
@@ -7756,11 +7740,10 @@
     _writer.print("[");
     _visitNodeListWithSeparator(node.elements, ", ");
     _writer.print("]");
-    return null;
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     if (node.constKeyword != null) {
       _writer.print(node.constKeyword.lexeme);
       _writer.print(' ');
@@ -7769,19 +7752,17 @@
     _writer.print("{");
     _visitNodeListWithSeparator(node.entries, ", ");
     _writer.print("}");
-    return null;
   }
 
   @override
-  Object visitMapLiteralEntry(MapLiteralEntry node) {
+  void visitMapLiteralEntry(MapLiteralEntry node) {
     _visitNode(node.key);
     _writer.print(" : ");
     _visitNode(node.value);
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitTokenWithSuffix(node.externalKeyword, " ");
     _visitTokenWithSuffix(node.modifierKeyword, " ");
@@ -7794,11 +7775,10 @@
       _visitNode(node.parameters);
     }
     _visitFunctionWithPrefix(" ", node.body);
-    return null;
   }
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     if (node.isCascaded) {
       _writer.print("..");
     } else {
@@ -7810,11 +7790,10 @@
     _visitNode(node.methodName);
     _visitNode(node.typeArguments);
     _visitNode(node.argumentList);
-    return null;
   }
 
   @override
-  bool visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("mixin ");
     _visitNode(node.name);
@@ -7824,94 +7803,82 @@
     _writer.print(" {");
     _visitNodeListWithSeparator(node.members, " ");
     _writer.print("}");
-    return null;
   }
 
   @override
-  Object visitNamedExpression(NamedExpression node) {
+  void visitNamedExpression(NamedExpression node) {
     _visitNode(node.name);
     _visitNodeWithPrefix(" ", node.expression);
-    return null;
   }
 
   @override
-  Object visitNativeClause(NativeClause node) {
+  void visitNativeClause(NativeClause node) {
     _writer.print("native ");
     _visitNode(node.name);
-    return null;
   }
 
   @override
-  Object visitNativeFunctionBody(NativeFunctionBody node) {
+  void visitNativeFunctionBody(NativeFunctionBody node) {
     _writer.print("native ");
     _visitNode(node.stringLiteral);
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitNullLiteral(NullLiteral node) {
+  void visitNullLiteral(NullLiteral node) {
     _writer.print("null");
-    return null;
   }
 
   @override
-  bool visitOnClause(OnClause node) {
+  void visitOnClause(OnClause node) {
     _writer.print('on ');
     _visitNodeListWithSeparator(node.superclassConstraints, ", ");
-    return null;
   }
 
   @override
-  Object visitParenthesizedExpression(ParenthesizedExpression node) {
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
     _writer.print('(');
     _visitNode(node.expression);
     _writer.print(')');
-    return null;
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("part ");
     _visitNode(node.uri);
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitPartOfDirective(PartOfDirective node) {
+  void visitPartOfDirective(PartOfDirective node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _writer.print("part of ");
     _visitNode(node.libraryName);
     _writer.print(';');
-    return null;
   }
 
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     _visitNode(node.operand);
     _writer.print(node.operator.lexeme);
-    return null;
   }
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     _visitNode(node.prefix);
     _writer.print('.');
     _visitNode(node.identifier);
-    return null;
   }
 
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     _writer.print(node.operator.lexeme);
     _visitNode(node.operand);
-    return null;
   }
 
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     if (node.isCascaded) {
       _writer.print("..");
     } else {
@@ -7919,26 +7886,23 @@
       _writer.print(node.operator.lexeme);
     }
     _visitNode(node.propertyName);
-    return null;
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     _writer.print("this");
     _visitNodeWithPrefix(".", node.constructorName);
     _visitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitRethrowExpression(RethrowExpression node) {
+  void visitRethrowExpression(RethrowExpression node) {
     _writer.print("rethrow");
-    return null;
   }
 
   @override
-  Object visitReturnStatement(ReturnStatement node) {
+  void visitReturnStatement(ReturnStatement node) {
     Expression expression = node.expression;
     if (expression == null) {
       _writer.print("return;");
@@ -7947,24 +7911,33 @@
       expression.accept(this);
       _writer.print(";");
     }
-    return null;
   }
 
   @override
-  Object visitScriptTag(ScriptTag node) {
+  void visitScriptTag(ScriptTag node) {
     _writer.print(node.scriptTag.lexeme);
-    return null;
   }
 
   @override
-  Object visitShowCombinator(ShowCombinator node) {
+  void visitSetLiteral(SetLiteral node) {
+    if (node.constKeyword != null) {
+      _writer.print(node.constKeyword.lexeme);
+      _writer.print(' ');
+    }
+    _visitNodeWithSuffix(node.typeArguments, " ");
+    _writer.print("{");
+    _visitNodeListWithSeparator(node.elements, ", ");
+    _writer.print("}");
+  }
+
+  @override
+  void visitShowCombinator(ShowCombinator node) {
     _writer.print("show ");
     _visitNodeListWithSeparator(node.shownNames, ", ");
-    return null;
   }
 
   @override
-  Object visitSimpleFormalParameter(SimpleFormalParameter node) {
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
     _visitTokenWithSuffix(node.covariantKeyword, ' ');
     _visitTokenWithSuffix(node.keyword, " ");
@@ -7973,71 +7946,62 @@
       _writer.print(' ');
     }
     _visitNode(node.identifier);
-    return null;
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     _writer.print(node.token.lexeme);
-    return null;
   }
 
   @override
-  Object visitSimpleStringLiteral(SimpleStringLiteral node) {
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
     _writer.print(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitStringInterpolation(StringInterpolation node) {
+  void visitStringInterpolation(StringInterpolation node) {
     _visitNodeList(node.elements);
-    return null;
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     _writer.print("super");
     _visitNodeWithPrefix(".", node.constructorName);
     _visitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitSuperExpression(SuperExpression node) {
+  void visitSuperExpression(SuperExpression node) {
     _writer.print("super");
-    return null;
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
     _writer.print("case ");
     _visitNode(node.expression);
     _writer.print(": ");
     _visitNodeListWithSeparator(node.statements, " ");
-    return null;
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     _visitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
     _writer.print("default: ");
     _visitNodeListWithSeparator(node.statements, " ");
-    return null;
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSwitchStatement(SwitchStatement node) {
     _writer.print("switch (");
     _visitNode(node.expression);
     _writer.print(") {");
     _visitNodeListWithSeparator(node.members, " ");
     _writer.print("}");
-    return null;
   }
 
   @override
-  Object visitSymbolLiteral(SymbolLiteral node) {
+  void visitSymbolLiteral(SymbolLiteral node) {
     _writer.print("#");
     List<Token> components = node.components;
     for (int i = 0; i < components.length; i++) {
@@ -8046,110 +8010,99 @@
       }
       _writer.print(components[i].lexeme);
     }
-    return null;
   }
 
   @override
-  Object visitThisExpression(ThisExpression node) {
+  void visitThisExpression(ThisExpression node) {
     _writer.print("this");
-    return null;
   }
 
   @override
-  Object visitThrowExpression(ThrowExpression node) {
+  void visitThrowExpression(ThrowExpression node) {
     _writer.print("throw ");
     _visitNode(node.expression);
-    return null;
   }
 
   @override
-  Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     _visitNodeWithSuffix(node.variables, ";");
-    return null;
   }
 
   @override
-  Object visitTryStatement(TryStatement node) {
+  void visitTryStatement(TryStatement node) {
     _writer.print("try ");
     _visitNode(node.body);
     _visitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " ");
     _visitNodeWithPrefix(" finally ", node.finallyBlock);
-    return null;
   }
 
   @override
-  Object visitTypeArgumentList(TypeArgumentList node) {
+  void visitTypeArgumentList(TypeArgumentList node) {
     _writer.print('<');
     _visitNodeListWithSeparator(node.arguments, ", ");
     _writer.print('>');
-    return null;
   }
 
   @override
-  Object visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     _visitNode(node.name);
     _visitNode(node.typeArguments);
-    return null;
+    if (node.question != null) {
+      _writer.print('?');
+    }
   }
 
   @override
-  Object visitTypeParameter(TypeParameter node) {
+  void visitTypeParameter(TypeParameter node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitNode(node.name);
     _visitNodeWithPrefix(" extends ", node.bound);
-    return null;
   }
 
   @override
-  Object visitTypeParameterList(TypeParameterList node) {
+  void visitTypeParameterList(TypeParameterList node) {
     _writer.print('<');
     _visitNodeListWithSeparator(node.typeParameters, ", ");
     _writer.print('>');
-    return null;
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitNode(node.name);
     _visitNodeWithPrefix(" = ", node.initializer);
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     _visitTokenWithSuffix(node.keyword, " ");
     _visitNodeWithSuffix(node.type, " ");
     _visitNodeListWithSeparator(node.variables, ", ");
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+  void visitVariableDeclarationStatement(VariableDeclarationStatement node) {
     _visitNode(node.variables);
     _writer.print(";");
-    return null;
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     _writer.print("while (");
     _visitNode(node.condition);
     _writer.print(") ");
     _visitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitWithClause(WithClause node) {
+  void visitWithClause(WithClause node) {
     _writer.print("with ");
     _visitNodeListWithSeparator(node.mixinTypes, ", ");
-    return null;
   }
 
   @override
-  Object visitYieldStatement(YieldStatement node) {
+  void visitYieldStatement(YieldStatement node) {
     if (node.star != null) {
       _writer.print("yield* ");
     } else {
@@ -8157,7 +8110,6 @@
     }
     _visitNode(node.expression);
     _writer.print(";");
-    return null;
   }
 
   /**
@@ -8280,7 +8232,7 @@
  * A visitor used to write a source representation of a visited AST node (and
  * all of it's children) to a sink.
  */
-class ToSourceVisitor2 implements AstVisitor<Object> {
+class ToSourceVisitor2 implements AstVisitor<void> {
   /**
    * The sink to which the source is to be written.
    */
@@ -8419,38 +8371,34 @@
   }
 
   @override
-  Object visitAdjacentStrings(AdjacentStrings node) {
+  void visitAdjacentStrings(AdjacentStrings node) {
     safelyVisitNodeListWithSeparator(node.strings, " ");
-    return null;
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     sink.write('@');
     safelyVisitNode(node.name);
     safelyVisitNodeWithPrefix(".", node.constructorName);
     safelyVisitNode(node.arguments);
-    return null;
   }
 
   @override
-  Object visitArgumentList(ArgumentList node) {
+  void visitArgumentList(ArgumentList node) {
     sink.write('(');
     safelyVisitNodeListWithSeparator(node.arguments, ", ");
     sink.write(')');
-    return null;
   }
 
   @override
-  Object visitAsExpression(AsExpression node) {
+  void visitAsExpression(AsExpression node) {
     safelyVisitNode(node.expression);
     sink.write(" as ");
     safelyVisitNode(node.type);
-    return null;
   }
 
   @override
-  bool visitAssertInitializer(AssertInitializer node) {
+  void visitAssertInitializer(AssertInitializer node) {
     sink.write("assert (");
     safelyVisitNode(node.condition);
     if (node.message != null) {
@@ -8458,11 +8406,10 @@
       safelyVisitNode(node.message);
     }
     sink.write(");");
-    return null;
   }
 
   @override
-  Object visitAssertStatement(AssertStatement node) {
+  void visitAssertStatement(AssertStatement node) {
     sink.write("assert (");
     safelyVisitNode(node.condition);
     if (node.message != null) {
@@ -8470,46 +8417,41 @@
       safelyVisitNode(node.message);
     }
     sink.write(");");
-    return null;
   }
 
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     safelyVisitNode(node.leftHandSide);
     sink.write(' ');
     sink.write(node.operator.lexeme);
     sink.write(' ');
     safelyVisitNode(node.rightHandSide);
-    return null;
   }
 
   @override
-  Object visitAwaitExpression(AwaitExpression node) {
+  void visitAwaitExpression(AwaitExpression node) {
     sink.write("await ");
     safelyVisitNode(node.expression);
-    return null;
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     _writeOperand(node, node.leftOperand);
     sink.write(' ');
     sink.write(node.operator.lexeme);
     sink.write(' ');
     _writeOperand(node, node.rightOperand);
-    return null;
   }
 
   @override
-  Object visitBlock(Block node) {
+  void visitBlock(Block node) {
     sink.write('{');
     safelyVisitNodeListWithSeparator(node.statements, " ");
     sink.write('}');
-    return null;
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     Token keyword = node.keyword;
     if (keyword != null) {
       sink.write(keyword.lexeme);
@@ -8519,32 +8461,28 @@
       sink.write(' ');
     }
     safelyVisitNode(node.block);
-    return null;
   }
 
   @override
-  Object visitBooleanLiteral(BooleanLiteral node) {
+  void visitBooleanLiteral(BooleanLiteral node) {
     sink.write(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     sink.write("break");
     safelyVisitNodeWithPrefix(" ", node.label);
     sink.write(";");
-    return null;
   }
 
   @override
-  Object visitCascadeExpression(CascadeExpression node) {
+  void visitCascadeExpression(CascadeExpression node) {
     safelyVisitNode(node.target);
     safelyVisitNodeList(node.cascadeSections);
-    return null;
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     safelyVisitNodeWithPrefix("on ", node.exceptionType);
     if (node.catchKeyword != null) {
       if (node.exceptionType != null) {
@@ -8558,11 +8496,10 @@
       sink.write(" ");
     }
     safelyVisitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitTokenWithSuffix(node.abstractKeyword, " ");
     sink.write("class ");
@@ -8574,11 +8511,10 @@
     sink.write(" {");
     safelyVisitNodeListWithSeparator(node.members, " ");
     sink.write("}");
-    return null;
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     if (node.abstractKeyword != null) {
       sink.write("abstract ");
@@ -8591,17 +8527,16 @@
     safelyVisitNodeWithPrefix(" ", node.withClause);
     safelyVisitNodeWithPrefix(" ", node.implementsClause);
     sink.write(";");
-    return null;
   }
 
   @override
-  Object visitComment(Comment node) => null;
+  void visitComment(Comment node) {}
 
   @override
-  Object visitCommentReference(CommentReference node) => null;
+  void visitCommentReference(CommentReference node) {}
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     ScriptTag scriptTag = node.scriptTag;
     NodeList<Directive> directives = node.directives;
     safelyVisitNode(scriptTag);
@@ -8609,31 +8544,28 @@
     safelyVisitNodeListWithSeparatorAndPrefix(prefix, directives, " ");
     prefix = scriptTag == null && directives.isEmpty ? "" : " ";
     safelyVisitNodeListWithSeparatorAndPrefix(prefix, node.declarations, " ");
-    return null;
   }
 
   @override
-  Object visitConditionalExpression(ConditionalExpression node) {
+  void visitConditionalExpression(ConditionalExpression node) {
     safelyVisitNode(node.condition);
     sink.write(" ? ");
     safelyVisitNode(node.thenExpression);
     sink.write(" : ");
     safelyVisitNode(node.elseExpression);
-    return null;
   }
 
   @override
-  Object visitConfiguration(Configuration node) {
+  void visitConfiguration(Configuration node) {
     sink.write('if (');
     safelyVisitNode(node.name);
     safelyVisitNodeWithPrefix(" == ", node.value);
     sink.write(') ');
     safelyVisitNode(node.uri);
-    return null;
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitTokenWithSuffix(node.externalKeyword, " ");
     safelyVisitTokenWithSuffix(node.constKeyword, " ");
@@ -8644,44 +8576,39 @@
     safelyVisitNodeListWithSeparatorAndPrefix(" : ", node.initializers, ", ");
     safelyVisitNodeWithPrefix(" = ", node.redirectedConstructor);
     safelyVisitFunctionWithPrefix(" ", node.body);
-    return null;
   }
 
   @override
-  Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     safelyVisitTokenWithSuffix(node.thisKeyword, ".");
     safelyVisitNode(node.fieldName);
     sink.write(" = ");
     safelyVisitNode(node.expression);
-    return null;
   }
 
   @override
-  Object visitConstructorName(ConstructorName node) {
+  void visitConstructorName(ConstructorName node) {
     safelyVisitNode(node.type);
     safelyVisitNodeWithPrefix(".", node.name);
-    return null;
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     sink.write("continue");
     safelyVisitNodeWithPrefix(" ", node.label);
     sink.write(";");
-    return null;
   }
 
   @override
-  Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitTokenWithSuffix(node.keyword, " ");
     safelyVisitNodeWithSuffix(node.type, " ");
     safelyVisitNode(node.identifier);
-    return null;
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     safelyVisitNode(node.parameter);
     if (node.separator != null) {
       if (node.separator.lexeme != ":") {
@@ -8690,73 +8617,64 @@
       sink.write(node.separator.lexeme);
       safelyVisitNodeWithPrefix(" ", node.defaultValue);
     }
-    return null;
   }
 
   @override
-  Object visitDoStatement(DoStatement node) {
+  void visitDoStatement(DoStatement node) {
     sink.write("do ");
     safelyVisitNode(node.body);
     sink.write(" while (");
     safelyVisitNode(node.condition);
     sink.write(");");
-    return null;
   }
 
   @override
-  Object visitDottedName(DottedName node) {
+  void visitDottedName(DottedName node) {
     safelyVisitNodeListWithSeparator(node.components, ".");
-    return null;
   }
 
   @override
-  Object visitDoubleLiteral(DoubleLiteral node) {
+  void visitDoubleLiteral(DoubleLiteral node) {
     sink.write(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitEmptyFunctionBody(EmptyFunctionBody node) {
+  void visitEmptyFunctionBody(EmptyFunctionBody node) {
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitEmptyStatement(EmptyStatement node) {
+  void visitEmptyStatement(EmptyStatement node) {
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+  void visitEnumConstantDeclaration(EnumConstantDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitNode(node.name);
-    return null;
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("enum ");
     safelyVisitNode(node.name);
     sink.write(" {");
     safelyVisitNodeListWithSeparator(node.constants, ", ");
     sink.write("}");
-    return null;
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("export ");
     safelyVisitNode(node.uri);
     safelyVisitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     Token keyword = node.keyword;
     if (keyword != null) {
       sink.write(keyword.lexeme);
@@ -8767,34 +8685,30 @@
     if (node.semicolon != null) {
       sink.write(';');
     }
-    return null;
   }
 
   @override
-  Object visitExpressionStatement(ExpressionStatement node) {
+  void visitExpressionStatement(ExpressionStatement node) {
     safelyVisitNode(node.expression);
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitExtendsClause(ExtendsClause node) {
+  void visitExtendsClause(ExtendsClause node) {
     sink.write("extends ");
     safelyVisitNode(node.superclass);
-    return null;
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitTokenWithSuffix(node.staticKeyword, " ");
     safelyVisitNode(node.fields);
     sink.write(";");
-    return null;
   }
 
   @override
-  Object visitFieldFormalParameter(FieldFormalParameter node) {
+  void visitFieldFormalParameter(FieldFormalParameter node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
     safelyVisitTokenWithSuffix(node.covariantKeyword, ' ');
     safelyVisitTokenWithSuffix(node.keyword, " ");
@@ -8803,11 +8717,10 @@
     safelyVisitNode(node.identifier);
     safelyVisitNode(node.typeParameters);
     safelyVisitNode(node.parameters);
-    return null;
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     DeclaredIdentifier loopVariable = node.loopVariable;
     if (node.awaitKeyword != null) {
       sink.write("await ");
@@ -8822,11 +8735,10 @@
     safelyVisitNode(node.iterable);
     sink.write(") ");
     safelyVisitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitFormalParameterList(FormalParameterList node) {
+  void visitFormalParameterList(FormalParameterList node) {
     String groupEnd = null;
     sink.write('(');
     NodeList<FormalParameter> parameters = node.parameters;
@@ -8851,11 +8763,10 @@
       sink.write(groupEnd);
     }
     sink.write(')');
-    return null;
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     Expression initialization = node.initialization;
     sink.write("for (");
     if (initialization != null) {
@@ -8869,47 +8780,42 @@
     safelyVisitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", ");
     sink.write(") ");
     safelyVisitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitTokenWithSuffix(node.externalKeyword, " ");
     safelyVisitNodeWithSuffix(node.returnType, " ");
     safelyVisitTokenWithSuffix(node.propertyKeyword, " ");
     safelyVisitNode(node.name);
     safelyVisitNode(node.functionExpression);
-    return null;
   }
 
   @override
-  Object visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+  void visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
     safelyVisitNode(node.functionDeclaration);
-    return null;
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     safelyVisitNode(node.typeParameters);
     safelyVisitNode(node.parameters);
     if (node.body is! EmptyFunctionBody) {
       sink.write(' ');
     }
     safelyVisitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     safelyVisitNode(node.function);
     safelyVisitNode(node.typeArguments);
     safelyVisitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("typedef ");
     safelyVisitNodeWithSuffix(node.returnType, " ");
@@ -8917,66 +8823,62 @@
     safelyVisitNode(node.typeParameters);
     safelyVisitNode(node.parameters);
     sink.write(";");
-    return null;
   }
 
   @override
-  Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
     safelyVisitTokenWithSuffix(node.covariantKeyword, ' ');
     safelyVisitNodeWithSuffix(node.returnType, " ");
     safelyVisitNode(node.identifier);
     safelyVisitNode(node.typeParameters);
     safelyVisitNode(node.parameters);
-    return null;
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) {
+  void visitGenericFunctionType(GenericFunctionType node) {
     safelyVisitNode(node.returnType);
     sink.write(' Function');
     safelyVisitNode(node.typeParameters);
     safelyVisitNode(node.parameters);
-    return null;
+    if (node.question != null) {
+      sink.write('?');
+    }
   }
 
   @override
-  Object visitGenericTypeAlias(GenericTypeAlias node) {
+  void visitGenericTypeAlias(GenericTypeAlias node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("typedef ");
     safelyVisitNode(node.name);
     safelyVisitNode(node.typeParameters);
     sink.write(" = ");
     safelyVisitNode(node.functionType);
-    return null;
   }
 
   @override
-  Object visitHideCombinator(HideCombinator node) {
+  void visitHideCombinator(HideCombinator node) {
     sink.write("hide ");
     safelyVisitNodeListWithSeparator(node.hiddenNames, ", ");
-    return null;
   }
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     sink.write("if (");
     safelyVisitNode(node.condition);
     sink.write(") ");
     safelyVisitNode(node.thenStatement);
     safelyVisitNodeWithPrefix(" else ", node.elseStatement);
-    return null;
   }
 
   @override
-  Object visitImplementsClause(ImplementsClause node) {
+  void visitImplementsClause(ImplementsClause node) {
     sink.write("implements ");
     safelyVisitNodeListWithSeparator(node.interfaces, ", ");
-    return null;
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("import ");
     safelyVisitNode(node.uri);
@@ -8986,11 +8888,10 @@
     safelyVisitNodeWithPrefix(" as ", node.prefix);
     safelyVisitNodeListWithSeparatorAndPrefix(" ", node.combinators, " ");
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     if (node.isCascaded) {
       sink.write("..");
     } else {
@@ -8999,25 +8900,22 @@
     sink.write('[');
     safelyVisitNode(node.index);
     sink.write(']');
-    return null;
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     safelyVisitTokenWithSuffix(node.keyword, " ");
     safelyVisitNode(node.constructorName);
     safelyVisitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitIntegerLiteral(IntegerLiteral node) {
+  void visitIntegerLiteral(IntegerLiteral node) {
     sink.write(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitInterpolationExpression(InterpolationExpression node) {
+  void visitInterpolationExpression(InterpolationExpression node) {
     if (node.rightBracket != null) {
       sink.write("\${");
       safelyVisitNode(node.expression);
@@ -9026,17 +8924,15 @@
       sink.write("\$");
       safelyVisitNode(node.expression);
     }
-    return null;
   }
 
   @override
-  Object visitInterpolationString(InterpolationString node) {
+  void visitInterpolationString(InterpolationString node) {
     sink.write(node.contents.lexeme);
-    return null;
   }
 
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     safelyVisitNode(node.expression);
     if (node.notOperator == null) {
       sink.write(" is ");
@@ -9044,40 +8940,35 @@
       sink.write(" is! ");
     }
     safelyVisitNode(node.type);
-    return null;
   }
 
   @override
-  Object visitLabel(Label node) {
+  void visitLabel(Label node) {
     safelyVisitNode(node.label);
     sink.write(":");
-    return null;
   }
 
   @override
-  Object visitLabeledStatement(LabeledStatement node) {
+  void visitLabeledStatement(LabeledStatement node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
     safelyVisitNode(node.statement);
-    return null;
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("library ");
     safelyVisitNode(node.name);
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitLibraryIdentifier(LibraryIdentifier node) {
+  void visitLibraryIdentifier(LibraryIdentifier node) {
     sink.write(node.name);
-    return null;
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     if (node.constKeyword != null) {
       sink.write(node.constKeyword.lexeme);
       sink.write(' ');
@@ -9086,11 +8977,10 @@
     sink.write("[");
     safelyVisitNodeListWithSeparator(node.elements, ", ");
     sink.write("]");
-    return null;
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     if (node.constKeyword != null) {
       sink.write(node.constKeyword.lexeme);
       sink.write(' ');
@@ -9099,19 +8989,17 @@
     sink.write("{");
     safelyVisitNodeListWithSeparator(node.entries, ", ");
     sink.write("}");
-    return null;
   }
 
   @override
-  Object visitMapLiteralEntry(MapLiteralEntry node) {
+  void visitMapLiteralEntry(MapLiteralEntry node) {
     safelyVisitNode(node.key);
     sink.write(" : ");
     safelyVisitNode(node.value);
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitTokenWithSuffix(node.externalKeyword, " ");
     safelyVisitTokenWithSuffix(node.modifierKeyword, " ");
@@ -9124,11 +9012,10 @@
       safelyVisitNode(node.parameters);
     }
     safelyVisitFunctionWithPrefix(" ", node.body);
-    return null;
   }
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     if (node.isCascaded) {
       sink.write("..");
     } else {
@@ -9140,11 +9027,10 @@
     safelyVisitNode(node.methodName);
     safelyVisitNode(node.typeArguments);
     safelyVisitNode(node.argumentList);
-    return null;
   }
 
   @override
-  bool visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("mixin ");
     safelyVisitNode(node.name);
@@ -9154,94 +9040,82 @@
     sink.write(" {");
     safelyVisitNodeListWithSeparator(node.members, " ");
     sink.write("}");
-    return null;
   }
 
   @override
-  Object visitNamedExpression(NamedExpression node) {
+  void visitNamedExpression(NamedExpression node) {
     safelyVisitNode(node.name);
     safelyVisitNodeWithPrefix(" ", node.expression);
-    return null;
   }
 
   @override
-  Object visitNativeClause(NativeClause node) {
+  void visitNativeClause(NativeClause node) {
     sink.write("native ");
     safelyVisitNode(node.name);
-    return null;
   }
 
   @override
-  Object visitNativeFunctionBody(NativeFunctionBody node) {
+  void visitNativeFunctionBody(NativeFunctionBody node) {
     sink.write("native ");
     safelyVisitNode(node.stringLiteral);
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitNullLiteral(NullLiteral node) {
+  void visitNullLiteral(NullLiteral node) {
     sink.write("null");
-    return null;
   }
 
   @override
-  bool visitOnClause(OnClause node) {
+  void visitOnClause(OnClause node) {
     sink.write('on ');
     safelyVisitNodeListWithSeparator(node.superclassConstraints, ", ");
-    return null;
   }
 
   @override
-  Object visitParenthesizedExpression(ParenthesizedExpression node) {
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
     sink.write('(');
     safelyVisitNode(node.expression);
     sink.write(')');
-    return null;
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("part ");
     safelyVisitNode(node.uri);
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitPartOfDirective(PartOfDirective node) {
+  void visitPartOfDirective(PartOfDirective node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     sink.write("part of ");
     safelyVisitNode(node.libraryName);
     sink.write(';');
-    return null;
   }
 
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     _writeOperand(node, node.operand);
     sink.write(node.operator.lexeme);
-    return null;
   }
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     safelyVisitNode(node.prefix);
     sink.write('.');
     safelyVisitNode(node.identifier);
-    return null;
   }
 
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     sink.write(node.operator.lexeme);
     _writeOperand(node, node.operand);
-    return null;
   }
 
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     if (node.isCascaded) {
       sink.write("..");
     } else {
@@ -9249,26 +9123,23 @@
       sink.write(node.operator.lexeme);
     }
     safelyVisitNode(node.propertyName);
-    return null;
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     sink.write("this");
     safelyVisitNodeWithPrefix(".", node.constructorName);
     safelyVisitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitRethrowExpression(RethrowExpression node) {
+  void visitRethrowExpression(RethrowExpression node) {
     sink.write("rethrow");
-    return null;
   }
 
   @override
-  Object visitReturnStatement(ReturnStatement node) {
+  void visitReturnStatement(ReturnStatement node) {
     Expression expression = node.expression;
     if (expression == null) {
       sink.write("return;");
@@ -9277,24 +9148,33 @@
       expression.accept(this);
       sink.write(";");
     }
-    return null;
   }
 
   @override
-  Object visitScriptTag(ScriptTag node) {
+  void visitScriptTag(ScriptTag node) {
     sink.write(node.scriptTag.lexeme);
-    return null;
   }
 
   @override
-  Object visitShowCombinator(ShowCombinator node) {
+  void visitSetLiteral(SetLiteral node) {
+    if (node.constKeyword != null) {
+      sink.write(node.constKeyword.lexeme);
+      sink.write(' ');
+    }
+    safelyVisitNodeWithSuffix(node.typeArguments, " ");
+    sink.write("{");
+    safelyVisitNodeListWithSeparator(node.elements, ", ");
+    sink.write("}");
+  }
+
+  @override
+  void visitShowCombinator(ShowCombinator node) {
     sink.write("show ");
     safelyVisitNodeListWithSeparator(node.shownNames, ", ");
-    return null;
   }
 
   @override
-  Object visitSimpleFormalParameter(SimpleFormalParameter node) {
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, ' ', ' ');
     safelyVisitTokenWithSuffix(node.covariantKeyword, ' ');
     safelyVisitTokenWithSuffix(node.keyword, " ");
@@ -9303,71 +9183,62 @@
       sink.write(' ');
     }
     safelyVisitNode(node.identifier);
-    return null;
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     sink.write(node.token.lexeme);
-    return null;
   }
 
   @override
-  Object visitSimpleStringLiteral(SimpleStringLiteral node) {
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
     sink.write(node.literal.lexeme);
-    return null;
   }
 
   @override
-  Object visitStringInterpolation(StringInterpolation node) {
+  void visitStringInterpolation(StringInterpolation node) {
     safelyVisitNodeList(node.elements);
-    return null;
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     sink.write("super");
     safelyVisitNodeWithPrefix(".", node.constructorName);
     safelyVisitNode(node.argumentList);
-    return null;
   }
 
   @override
-  Object visitSuperExpression(SuperExpression node) {
+  void visitSuperExpression(SuperExpression node) {
     sink.write("super");
-    return null;
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
     sink.write("case ");
     safelyVisitNode(node.expression);
     sink.write(": ");
     safelyVisitNodeListWithSeparator(node.statements, " ");
-    return null;
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.labels, " ", " ");
     sink.write("default: ");
     safelyVisitNodeListWithSeparator(node.statements, " ");
-    return null;
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSwitchStatement(SwitchStatement node) {
     sink.write("switch (");
     safelyVisitNode(node.expression);
     sink.write(") {");
     safelyVisitNodeListWithSeparator(node.members, " ");
     sink.write("}");
-    return null;
   }
 
   @override
-  Object visitSymbolLiteral(SymbolLiteral node) {
+  void visitSymbolLiteral(SymbolLiteral node) {
     sink.write("#");
     List<Token> components = node.components;
     for (int i = 0; i < components.length; i++) {
@@ -9376,110 +9247,99 @@
       }
       sink.write(components[i].lexeme);
     }
-    return null;
   }
 
   @override
-  Object visitThisExpression(ThisExpression node) {
+  void visitThisExpression(ThisExpression node) {
     sink.write("this");
-    return null;
   }
 
   @override
-  Object visitThrowExpression(ThrowExpression node) {
+  void visitThrowExpression(ThrowExpression node) {
     sink.write("throw ");
     safelyVisitNode(node.expression);
-    return null;
   }
 
   @override
-  Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     safelyVisitNodeWithSuffix(node.variables, ";");
-    return null;
   }
 
   @override
-  Object visitTryStatement(TryStatement node) {
+  void visitTryStatement(TryStatement node) {
     sink.write("try ");
     safelyVisitNode(node.body);
     safelyVisitNodeListWithSeparatorAndPrefix(" ", node.catchClauses, " ");
     safelyVisitNodeWithPrefix(" finally ", node.finallyBlock);
-    return null;
   }
 
   @override
-  Object visitTypeArgumentList(TypeArgumentList node) {
+  void visitTypeArgumentList(TypeArgumentList node) {
     sink.write('<');
     safelyVisitNodeListWithSeparator(node.arguments, ", ");
     sink.write('>');
-    return null;
   }
 
   @override
-  Object visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     safelyVisitNode(node.name);
     safelyVisitNode(node.typeArguments);
-    return null;
+    if (node.question != null) {
+      sink.write('?');
+    }
   }
 
   @override
-  Object visitTypeParameter(TypeParameter node) {
+  void visitTypeParameter(TypeParameter node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitNode(node.name);
     safelyVisitNodeWithPrefix(" extends ", node.bound);
-    return null;
   }
 
   @override
-  Object visitTypeParameterList(TypeParameterList node) {
+  void visitTypeParameterList(TypeParameterList node) {
     sink.write('<');
     safelyVisitNodeListWithSeparator(node.typeParameters, ", ");
     sink.write('>');
-    return null;
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitNode(node.name);
     safelyVisitNodeWithPrefix(" = ", node.initializer);
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     safelyVisitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
     safelyVisitTokenWithSuffix(node.keyword, " ");
     safelyVisitNodeWithSuffix(node.type, " ");
     safelyVisitNodeListWithSeparator(node.variables, ", ");
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+  void visitVariableDeclarationStatement(VariableDeclarationStatement node) {
     safelyVisitNode(node.variables);
     sink.write(";");
-    return null;
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     sink.write("while (");
     safelyVisitNode(node.condition);
     sink.write(") ");
     safelyVisitNode(node.body);
-    return null;
   }
 
   @override
-  Object visitWithClause(WithClause node) {
+  void visitWithClause(WithClause node) {
     sink.write("with ");
     safelyVisitNodeListWithSeparator(node.mixinTypes, ", ");
-    return null;
   }
 
   @override
-  Object visitYieldStatement(YieldStatement node) {
+  void visitYieldStatement(YieldStatement node) {
     if (node.star != null) {
       sink.write("yield* ");
     } else {
@@ -9487,7 +9347,6 @@
     }
     safelyVisitNode(node.expression);
     sink.write(";");
-    return null;
   }
 
   void _writeOperand(Expression node, Expression operand) {
diff --git a/pkg/analyzer/lib/src/dart/constant/compute.dart b/pkg/analyzer/lib/src/dart/constant/compute.dart
index 707d34a..4031e2f 100644
--- a/pkg/analyzer/lib/src/dart/constant/compute.dart
+++ b/pkg/analyzer/lib/src/dart/constant/compute.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/resolver.dart'
@@ -16,10 +17,13 @@
     TypeProvider typeProvider,
     TypeSystem typeSystem,
     DeclaredVariables declaredVariables,
-    List<ConstantEvaluationTarget> constants) {
+    List<ConstantEvaluationTarget> constants,
+    ExperimentStatus experimentStatus) {
   var evaluationEngine = ConstantEvaluationEngine(
       typeProvider, declaredVariables,
-      forAnalysisDriver: true, typeSystem: typeSystem);
+      forAnalysisDriver: true,
+      typeSystem: typeSystem,
+      experimentStatus: experimentStatus);
 
   var nodes = <_ConstantNode>[];
   var nodeMap = <ConstantEvaluationTarget, _ConstantNode>{};
diff --git a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
index d333f97..30e9486 100644
--- a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
+++ b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -12,6 +12,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
@@ -23,7 +24,7 @@
 /// for additional errors and warnings not covered by the parser and resolver.
 /// In particular, it looks for errors and warnings related to constant
 /// expressions.
-class ConstantVerifier extends RecursiveAstVisitor<Object> {
+class ConstantVerifier extends RecursiveAstVisitor<void> {
   /// The error reporter by which errors will be reported.
   final ErrorReporter _errorReporter;
 
@@ -67,11 +68,14 @@
     this._stringType = _typeProvider.stringType;
     this._evaluationEngine = new ConstantEvaluationEngine(
         _typeProvider, declaredVariables,
-        forAnalysisDriver: forAnalysisDriver, typeSystem: _typeSystem);
+        forAnalysisDriver: forAnalysisDriver,
+        typeSystem: _typeSystem,
+        experimentStatus: ExperimentStatus.fromStrings(
+            currentLibrary.context.analysisOptions.enabledExperiments));
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     super.visitAnnotation(node);
     // check annotation creation
     Element element = node.element;
@@ -80,47 +84,38 @@
       if (!element.isConst) {
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, node);
-        return null;
+        return;
       }
       // should have arguments
       ArgumentList argumentList = node.arguments;
       if (argumentList == null) {
         _errorReporter.reportErrorForNode(
             CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, node);
-        return null;
+        return;
       }
       // arguments should be constants
       _validateConstantArguments(argumentList);
     }
-    if (node.elementAnnotation?.isSealed == true &&
-        !(node.parent is ClassDeclaration ||
-            node.parent is ClassTypeAlias ||
-            node.parent is MixinDeclaration)) {
-      _errorReporter.reportErrorForNode(
-          HintCode.INVALID_SEALED_ANNOTATION, node.parent, [node.element.name]);
-    }
-    return null;
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     if (node.constKeyword != null) {
       _validateConstructorInitializers(node);
       _validateFieldInitializers(node.parent as ClassDeclaration, node);
     }
     _validateDefaultValues(node.parameters);
-    return super.visitConstructorDeclaration(node);
+    super.visitConstructorDeclaration(node);
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     super.visitFunctionExpression(node);
     _validateDefaultValues(node.parameters);
-    return null;
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     if (node.isConst) {
       TypeName typeName = node.constructorName.type;
       _checkForConstWithTypeParameters(typeName);
@@ -138,14 +133,13 @@
             constantVisitor,
             _errorReporter);
       }
-      return null;
     } else {
-      return super.visitInstanceCreationExpression(node);
+      super.visitInstanceCreationExpression(node);
     }
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     super.visitListLiteral(node);
     if (node.isConst) {
       DartObjectImpl result;
@@ -160,11 +154,10 @@
         }
       }
     }
-    return null;
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     super.visitMapLiteral(node);
     bool isConst = node.isConst;
     bool reportEqualKeys = true;
@@ -187,10 +180,8 @@
         if (keyResult != null) {
           _reportErrorIfFromDeferredLibrary(key,
               CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY);
-          if (keys.contains(keyResult)) {
+          if (!keys.add(keyResult)) {
             invalidKeys.add(key);
-          } else {
-            keys.add(keyResult);
           }
           DartType type = keyResult.type;
           if (_implementsEqualsWhenNotAllowed(type)) {
@@ -210,10 +201,8 @@
         DartObjectImpl result = key
             .accept(new ConstantVisitor(_evaluationEngine, subErrorReporter));
         if (result != null) {
-          if (keys.contains(result)) {
+          if (!keys.add(result)) {
             invalidKeys.add(key);
-          } else {
-            keys.add(result);
           }
         } else {
           reportEqualKeys = false;
@@ -221,24 +210,54 @@
       }
     }
     if (reportEqualKeys) {
-      int length = invalidKeys.length;
-      for (int i = 0; i < length; i++) {
+      for (int i = 0; i < invalidKeys.length; i++) {
         _errorReporter.reportErrorForNode(
             StaticWarningCode.EQUAL_KEYS_IN_MAP, invalidKeys[i]);
       }
     }
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     super.visitMethodDeclaration(node);
     _validateDefaultValues(node.parameters);
-    return null;
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSetLiteral(SetLiteral node) {
+    super.visitSetLiteral(node);
+    HashSet<DartObject> elements = new HashSet<DartObject>();
+    List<Expression> invalidElements = new List<Expression>();
+    if (node.isConst) {
+      for (Expression element in node.elements) {
+        DartObjectImpl result =
+            _validate(element, CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT);
+        if (result != null) {
+          _reportErrorIfFromDeferredLibrary(
+              element,
+              CompileTimeErrorCode
+                  .NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY);
+          if (!elements.add(result)) {
+            invalidElements.add(element);
+          }
+          DartType type = result.type;
+          if (_implementsEqualsWhenNotAllowed(type)) {
+            _errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS,
+                element,
+                [type.displayName]);
+          }
+        }
+      }
+      for (var invalidElement in invalidElements) {
+        _errorReporter.reportErrorForNode(
+            StaticWarningCode.EQUAL_VALUES_IN_CONST_SET, invalidElement);
+      }
+    }
+  }
+
+  @override
+  void visitSwitchStatement(SwitchStatement node) {
     // TODO(paulberry): to minimize error messages, it would be nice to
     // compare all types with the most popular type rather than the first
     // type.
@@ -274,11 +293,11 @@
     if (!foundError) {
       _checkForCaseExpressionTypeImplementsEquals(node, firstType);
     }
-    return super.visitSwitchStatement(node);
+    super.visitSwitchStatement(node);
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     Expression initializer = node.initializer;
     if (initializer != null && (node.isConst || node.isFinal)) {
@@ -290,7 +309,7 @@
         // values computed if the value was needed (e.g. final variables in a
         // class containing const constructors).
         assert(!node.isConst);
-        return null;
+        return;
       }
       _reportErrors(result.errors,
           CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE);
@@ -299,7 +318,6 @@
           CompileTimeErrorCode
               .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY);
     }
-    return null;
   }
 
   /// This verifies that the passed switch statement does not have a case
@@ -409,12 +427,12 @@
           identical(dataErrorCode,
               CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING) ||
           identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL) ||
+          identical(
+              dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT) ||
           identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_INT) ||
           identical(dataErrorCode, CompileTimeErrorCode.CONST_EVAL_TYPE_NUM) ||
           identical(dataErrorCode,
               CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT) ||
-          identical(dataErrorCode,
-              CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION) ||
           identical(
               dataErrorCode,
               CheckedModeCompileTimeErrorCode
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 3cab468..545cd6c 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -14,6 +14,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/constant/utilities.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/element.dart';
@@ -24,7 +25,7 @@
     show AnalysisEngine, RecordingErrorListener;
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 import 'package:analyzer/src/generated/type_system.dart'
-    show StrongTypeSystemImpl, TypeSystem;
+    show Dart2TypeSystem, TypeSystem;
 import 'package:analyzer/src/task/dart.dart';
 
 /**
@@ -36,6 +37,7 @@
    * Parameter to "fromEnvironment" methods that denotes the default value.
    */
   static String _DEFAULT_VALUE_PARAM = "defaultValue";
+
   /**
    * Source of RegExp matching declarable operator names.
    * From sdk/lib/internal/symbol.dart.
@@ -84,6 +86,11 @@
   final DeclaredVariables _declaredVariables;
 
   /**
+   * Return the object representing the state of active experiments.
+   */
+  final ExperimentStatus experimentStatus;
+
+  /**
    * Validator used to verify correct dependency analysis when running unit
    * tests.
    */
@@ -103,12 +110,14 @@
    */
   ConstantEvaluationEngine(TypeProvider typeProvider, this._declaredVariables,
       {ConstantEvaluationValidator validator,
+      ExperimentStatus experimentStatus,
       TypeSystem typeSystem,
       this.forAnalysisDriver: false})
       : typeProvider = typeProvider,
         validator =
             validator ?? new ConstantEvaluationValidator_ForProduction(),
-        typeSystem = typeSystem ?? new StrongTypeSystemImpl(typeProvider);
+        typeSystem = typeSystem ?? new Dart2TypeSystem(typeProvider),
+        experimentStatus = experimentStatus ?? new ExperimentStatus();
 
   /**
    * Check that the arguments to a call to fromEnvironment() are correct. The
@@ -246,7 +255,7 @@
           // ignore it here.
           constant.evaluationResult = new EvaluationResultImpl(null);
         }
-      } else if (element is ConstructorElementImpl &&
+      } else if (element is ConstructorElement &&
           element.isConst &&
           constNode.arguments != null) {
         RecordingErrorListener errorListener = new RecordingErrorListener();
@@ -445,6 +454,7 @@
           CompileTimeErrorCode.CONST_WITH_NON_CONST, node);
       return null;
     }
+
     if (!getConstructorImpl(constructor).isCycleFree) {
       // It's not safe to evaluate this constructor, so bail out.
       // TODO(paulberry): ensure that a reasonable error message is produced
@@ -453,34 +463,35 @@
       // itself")
       return new DartObjectImpl.validWithUnknownValue(constructor.returnType);
     }
+
     int argumentCount = arguments.length;
-    List<DartObjectImpl> argumentValues =
-        new List<DartObjectImpl>(argumentCount);
-    List<DartObjectImpl> positionalArguments = <DartObjectImpl>[];
-    List<Expression> argumentNodes = new List<Expression>(argumentCount);
-    Map<String, DartObjectImpl> namedArgumentValues =
-        new HashMap<String, DartObjectImpl>();
-    Map<String, NamedExpression> namedArgumentNodes =
-        new HashMap<String, NamedExpression>();
+    var argumentValues = new List<DartObjectImpl>(argumentCount);
+    Map<String, NamedExpression> namedNodes;
+    Map<String, DartObjectImpl> namedValues;
     for (int i = 0; i < argumentCount; i++) {
       Expression argument = arguments[i];
       if (argument is NamedExpression) {
+        namedNodes ??= new HashMap<String, NamedExpression>();
+        namedValues ??= new HashMap<String, DartObjectImpl>();
         String name = argument.name.label.name;
-        namedArgumentValues[name] =
-            constantVisitor._valueOf(argument.expression);
-        namedArgumentNodes[name] = argument;
-        argumentValues[i] = typeProvider.nullObject;
+        namedNodes[name] = argument;
+        namedValues[name] = constantVisitor._valueOf(argument.expression);
       } else {
         var argumentValue = constantVisitor._valueOf(argument);
         argumentValues[i] = argumentValue;
-        positionalArguments.add(argumentValue);
-        argumentNodes[i] = argument;
       }
     }
+    namedNodes ??= const {};
+    namedValues ??= const {};
+
     if (invocation == null) {
       invocation = new ConstructorInvocation(
-          constructor, positionalArguments, namedArgumentValues);
+        constructor,
+        argumentValues,
+        namedValues,
+      );
     }
+
     constructor = followConstantRedirectionChain(constructor);
     InterfaceType definingClass = constructor.returnType as InterfaceType;
     if (constructor.isFactory) {
@@ -489,7 +500,7 @@
       // that we can emulate.
       if (constructor.name == "fromEnvironment") {
         if (!checkFromEnvironmentArguments(
-            arguments, argumentValues, namedArgumentValues, definingClass)) {
+            arguments, argumentValues, namedValues, definingClass)) {
           errorReporter.reportErrorForNode(
               CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
           return null;
@@ -503,7 +514,7 @@
           return computeValueFromEnvironment(
               valueFromEnvironment,
               new DartObjectImpl(typeProvider.boolType, BoolState.FALSE_STATE),
-              namedArgumentValues);
+              namedValues);
         } else if (definingClass == typeProvider.intType) {
           DartObject valueFromEnvironment;
           valueFromEnvironment =
@@ -511,7 +522,7 @@
           return computeValueFromEnvironment(
               valueFromEnvironment,
               new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE),
-              namedArgumentValues);
+              namedValues);
         } else if (definingClass == typeProvider.stringType) {
           DartObject valueFromEnvironment;
           valueFromEnvironment =
@@ -519,13 +530,12 @@
           return computeValueFromEnvironment(
               valueFromEnvironment,
               new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE),
-              namedArgumentValues);
+              namedValues);
         }
       } else if (constructor.name == "" &&
           definingClass == typeProvider.symbolType &&
           argumentCount == 1) {
-        if (!checkSymbolArguments(
-            arguments, argumentValues, namedArgumentValues)) {
+        if (!checkSymbolArguments(arguments, argumentValues, namedValues)) {
           errorReporter.reportErrorForNode(
               CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
           return null;
@@ -562,28 +572,10 @@
     // into the current ErrorReporter, because they usually happen in a
     // different source. But they still should cause a constant evaluation
     // error for the current node.
-    var externalErrorListener = new RecordingErrorListener();
+    var externalErrorListener = new BooleanErrorListener();
     var externalErrorReporter =
         new ErrorReporter(externalErrorListener, constructor.source);
 
-    void reportLocalErrorForRecordedExternalErrors() {
-      ErrorCode errorCode;
-      for (AnalysisError error in externalErrorListener.errors) {
-        if (error.errorCode is CompileTimeErrorCode) {
-          errorCode = CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION;
-          break;
-        }
-        if (error.errorCode is CheckedModeCompileTimeErrorCode) {
-          errorCode =
-              CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION;
-          break;
-        }
-      }
-      if (errorCode != null) {
-        errorReporter.reportErrorForNode(errorCode, node);
-      }
-    }
-
     // Start with final fields that are initialized at their declaration site.
     List<FieldElement> fields = constructor.enclosingElement.fields;
     for (int i = 0; i < fields.length; i++) {
@@ -629,11 +621,11 @@
       DartObjectImpl argumentValue = null;
       AstNode errorTarget = null;
       if (baseParameter.isNamed) {
-        argumentValue = namedArgumentValues[baseParameter.name];
-        errorTarget = namedArgumentNodes[baseParameter.name];
+        argumentValue = namedValues[baseParameter.name];
+        errorTarget = namedNodes[baseParameter.name];
       } else if (i < argumentCount) {
         argumentValue = argumentValues[i];
-        errorTarget = argumentNodes[i];
+        errorTarget = arguments[i];
       }
       if (errorTarget == null) {
         // No argument node that we can direct error messages to, because we
@@ -695,7 +687,8 @@
         lexicalEnvironment: parameterMap);
     String superName = null;
     NodeList<Expression> superArguments = null;
-    for (ConstructorInitializer initializer in initializers) {
+    for (var i = 0; i < initializers.length; i++) {
+      var initializer = initializers[i];
       if (initializer is ConstructorFieldInitializer) {
         Expression initializerExpression = initializer.expression;
         DartObjectImpl evaluationResult =
@@ -743,23 +736,24 @@
               initializerVisitor,
               externalErrorReporter,
               invocation: invocation);
-          reportLocalErrorForRecordedExternalErrors();
+          if (externalErrorListener.errorReported) {
+            errorReporter.reportErrorForNode(
+                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
+          }
           return result;
         }
       } else if (initializer is AssertInitializer) {
         Expression condition = initializer.condition;
         if (condition == null) {
           errorReporter.reportErrorForNode(
-              CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
-              node);
+              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
         }
         DartObjectImpl evaluationResult = condition.accept(initializerVisitor);
         if (evaluationResult == null ||
             !evaluationResult.isBool ||
             evaluationResult.toBoolValue() != true) {
           errorReporter.reportErrorForNode(
-              CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
-              node);
+              CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
           return null;
         }
       }
@@ -778,7 +772,10 @@
             superArguments, initializerVisitor, externalErrorReporter);
       }
     }
-    reportLocalErrorForRecordedExternalErrors();
+    if (externalErrorListener.errorReported) {
+      errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, node);
+    }
     return new DartObjectImpl(
         definingClass, new GenericState(fieldMap, invocation: invocation));
   }
@@ -907,11 +904,6 @@
     if (type.isUndefined) {
       return false;
     }
-    // TODO(mfairhurst): Remove this once #33441 is solved and we can use
-    // inference properly. This is a hack.
-    if (obj.type == typeProvider.intType && type == typeProvider.doubleType) {
-      return true;
-    }
     return obj.type.isSubtypeOf(type);
   }
 
@@ -1071,14 +1063,13 @@
       {Map<String, DartObjectImpl> lexicalEnvironment})
       : _lexicalEnvironment = lexicalEnvironment {
     this._dartObjectComputer =
-        new DartObjectComputer(_errorReporter, evaluationEngine.typeProvider);
+        new DartObjectComputer(_errorReporter, evaluationEngine);
   }
 
   /**
-   * Convenience getter to gain access to the [evalationEngine]'s type
-   * provider.
+   * Return the object representing the state of active experiments.
    */
-  TypeProvider get _typeProvider => evaluationEngine.typeProvider;
+  ExperimentStatus get experimentStatus => evaluationEngine.experimentStatus;
 
   /**
    * Convenience getter to gain access to the [evaluationEngine]'s type system.
@@ -1086,6 +1077,12 @@
   TypeSystem get typeSystem => evaluationEngine.typeSystem;
 
   /**
+   * Convenience getter to gain access to the [evaluationEngine]'s type
+   * provider.
+   */
+  TypeProvider get _typeProvider => evaluationEngine.typeProvider;
+
+  /**
    * Given a [type] that may contain free type variables, evaluate them against
    * the current lexical environment and return the substituted type.
    */
@@ -1133,27 +1130,50 @@
   }
 
   @override
+  DartObjectImpl visitAsExpression(AsExpression node) {
+    if (experimentStatus.constant_update_2018) {
+      DartObjectImpl expressionResult = node.expression.accept(this);
+      DartObjectImpl typeResult = node.type.accept(this);
+      return _dartObjectComputer.castToType(node, expressionResult, typeResult);
+    }
+    // TODO(brianwilkerson) Figure out which error to report.
+    _error(node, null);
+    return null;
+  }
+
+  @override
   DartObjectImpl visitBinaryExpression(BinaryExpression node) {
     TokenType operatorType = node.operator.type;
     DartObjectImpl leftResult = node.leftOperand.accept(this);
     // evaluate lazy operators
     if (operatorType == TokenType.AMPERSAND_AMPERSAND) {
-      return _dartObjectComputer.logicalAnd(
+      return _dartObjectComputer.lazyAnd(
           node, leftResult, () => node.rightOperand.accept(this));
     } else if (operatorType == TokenType.BAR_BAR) {
-      return _dartObjectComputer.logicalOr(
+      return _dartObjectComputer.lazyOr(
           node, leftResult, () => node.rightOperand.accept(this));
+    } else if (operatorType == TokenType.QUESTION_QUESTION) {
+      if (experimentStatus.constant_update_2018) {
+        return _dartObjectComputer.lazyQuestionQuestion(
+            node, leftResult, () => node.rightOperand.accept(this));
+      } else {
+        return _dartObjectComputer.eagerQuestionQuestion(
+            node, leftResult, node.rightOperand.accept(this));
+      }
     }
     // evaluate eager operators
     DartObjectImpl rightResult = node.rightOperand.accept(this);
     if (operatorType == TokenType.AMPERSAND) {
-      return _dartObjectComputer.bitAnd(node, leftResult, rightResult);
+      return _dartObjectComputer.eagerAnd(
+          node, leftResult, rightResult, experimentStatus.constant_update_2018);
     } else if (operatorType == TokenType.BANG_EQ) {
       return _dartObjectComputer.notEqual(node, leftResult, rightResult);
     } else if (operatorType == TokenType.BAR) {
-      return _dartObjectComputer.bitOr(node, leftResult, rightResult);
+      return _dartObjectComputer.eagerOr(
+          node, leftResult, rightResult, experimentStatus.constant_update_2018);
     } else if (operatorType == TokenType.CARET) {
-      return _dartObjectComputer.bitXor(node, leftResult, rightResult);
+      return _dartObjectComputer.eagerXor(
+          node, leftResult, rightResult, experimentStatus.constant_update_2018);
     } else if (operatorType == TokenType.EQ_EQ) {
       return _dartObjectComputer.equalEqual(node, leftResult, rightResult);
     } else if (operatorType == TokenType.GT) {
@@ -1163,6 +1183,9 @@
           node, leftResult, rightResult);
     } else if (operatorType == TokenType.GT_GT) {
       return _dartObjectComputer.shiftRight(node, leftResult, rightResult);
+    } else if (operatorType == TokenType.GT_GT_GT) {
+      return _dartObjectComputer.logicalShiftRight(
+          node, leftResult, rightResult);
     } else if (operatorType == TokenType.LT) {
       return _dartObjectComputer.lessThan(node, leftResult, rightResult);
     } else if (operatorType == TokenType.LT_EQ) {
@@ -1181,9 +1204,6 @@
       return _dartObjectComputer.divide(node, leftResult, rightResult);
     } else if (operatorType == TokenType.TILDE_SLASH) {
       return _dartObjectComputer.integerDivide(node, leftResult, rightResult);
-    } else if (operatorType == TokenType.QUESTION_QUESTION) {
-      return _dartObjectComputer.questionQuestion(
-          node, leftResult, rightResult);
     } else {
       // TODO(brianwilkerson) Figure out which error to report.
       _error(node, null);
@@ -1199,6 +1219,30 @@
   DartObjectImpl visitConditionalExpression(ConditionalExpression node) {
     Expression condition = node.condition;
     DartObjectImpl conditionResult = condition.accept(this);
+    if (experimentStatus.constant_update_2018) {
+      if (conditionResult == null) {
+        return conditionResult;
+      } else if (!conditionResult.isBool) {
+        _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, condition);
+        return null;
+      }
+      conditionResult = _dartObjectComputer.applyBooleanConversion(
+          condition, conditionResult);
+      if (conditionResult == null) {
+        return conditionResult;
+      }
+      if (conditionResult.toBoolValue() == true) {
+        return node.thenExpression.accept(this);
+      } else if (conditionResult.toBoolValue() == false) {
+        return node.elseExpression.accept(this);
+      }
+      // We used to return an object with a known type and an unknown value, but
+      // we can't do that without evaluating both the 'then' and 'else'
+      // expressions, and we're not suppose to do that under lazy semantics. I'm
+      // not sure which failure mode is worse.
+      return null;
+    }
     DartObjectImpl thenResult = node.thenExpression.accept(this);
     DartObjectImpl elseResult = node.elseExpression.accept(this);
     if (conditionResult == null) {
@@ -1252,8 +1296,13 @@
   }
 
   @override
-  DartObjectImpl visitIntegerLiteral(IntegerLiteral node) =>
-      new DartObjectImpl(_typeProvider.intType, new IntState(node.value));
+  DartObjectImpl visitIntegerLiteral(IntegerLiteral node) {
+    if (node.staticType == _typeProvider.doubleType) {
+      return new DartObjectImpl(
+          _typeProvider.doubleType, new DoubleState(node.value?.toDouble()));
+    }
+    return new DartObjectImpl(_typeProvider.intType, new IntState(node.value));
+  }
 
   @override
   DartObjectImpl visitInterpolationExpression(InterpolationExpression node) {
@@ -1270,6 +1319,18 @@
       new DartObjectImpl(_typeProvider.stringType, new StringState(node.value));
 
   @override
+  DartObjectImpl visitIsExpression(IsExpression node) {
+    if (experimentStatus.constant_update_2018) {
+      DartObjectImpl expressionResult = node.expression.accept(this);
+      DartObjectImpl typeResult = node.type.accept(this);
+      return _dartObjectComputer.typeTest(node, expressionResult, typeResult);
+    }
+    // TODO(brianwilkerson) Figure out which error to report.
+    _error(node, null);
+    return null;
+  }
+
+  @override
   DartObjectImpl visitListLiteral(ListLiteral node) {
     if (!node.isConst) {
       _errorReporter.reportErrorForNode(
@@ -1433,6 +1494,35 @@
   }
 
   @override
+  DartObjectImpl visitSetLiteral(SetLiteral node) {
+    if (!node.isConst) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.MISSING_CONST_IN_SET_LITERAL, node);
+      return null;
+    }
+    bool errorOccurred = false;
+    Set<DartObjectImpl> elements = new Set<DartObjectImpl>();
+    for (Expression element in node.elements) {
+      DartObjectImpl elementResult = element.accept(this);
+      if (elementResult == null) {
+        errorOccurred = true;
+      } else {
+        elements.add(elementResult);
+      }
+    }
+    if (errorOccurred) {
+      return null;
+    }
+    DartType nodeType = node.staticType;
+    DartType elementType =
+        nodeType is InterfaceType && nodeType.typeArguments.isNotEmpty
+            ? nodeType.typeArguments[0]
+            : _typeProvider.dynamicType;
+    InterfaceType setType = _typeProvider.setType.instantiate([elementType]);
+    return new DartObjectImpl(setType, new SetState(elements));
+  }
+
+  @override
   DartObjectImpl visitSimpleIdentifier(SimpleIdentifier node) {
     if (_lexicalEnvironment != null &&
         _lexicalEnvironment.containsKey(node.name)) {
@@ -1521,8 +1611,9 @@
       // Driver, we compute values of all dependencies first (or detect  cycle).
       // So, the value has already been computed. Just return it.
       if (evaluationEngine.forAnalysisDriver) {
-        if (variableElement.isConst) {
-          return variableElement.evaluationResult.value;
+        EvaluationResultImpl value = variableElement.evaluationResult;
+        if (variableElement.isConst && value != null) {
+          return value.value;
         }
       } else {
         // TODO(scheglov) Once we remove task model, we can remove this code.
@@ -1590,12 +1681,22 @@
   final ErrorReporter _errorReporter;
 
   /**
-   * The type provider used to create objects of the appropriate types, and to
-   * identify when an object is of a built-in type.
+   * The type provider used to access the known types.
    */
-  final TypeProvider _typeProvider;
+  final ConstantEvaluationEngine _evaluationEngine;
 
-  DartObjectComputer(this._errorReporter, this._typeProvider);
+  DartObjectComputer(this._errorReporter, this._evaluationEngine);
+
+  /**
+   * Convenience getter to gain access to the [evaluationEngine]'s type
+   * provider.
+   */
+  TypeProvider get _typeProvider => _evaluationEngine.typeProvider;
+
+  /**
+   * Convenience getter to gain access to the [evaluationEngine]'s type system.
+   */
+  TypeSystem get _typeSystem => _evaluationEngine.typeSystem;
 
   DartObjectImpl add(BinaryExpression node, DartObjectImpl leftOperand,
       DartObjectImpl rightOperand) {
@@ -1626,18 +1727,6 @@
     return null;
   }
 
-  DartObjectImpl bitAnd(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.bitAnd(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
   DartObjectImpl bitNot(Expression node, DartObjectImpl evaluationResult) {
     if (evaluationResult != null) {
       try {
@@ -1649,23 +1738,11 @@
     return null;
   }
 
-  DartObjectImpl bitOr(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
+  DartObjectImpl castToType(
+      AsExpression node, DartObjectImpl expression, DartObjectImpl type) {
+    if (expression != null && type != null) {
       try {
-        return leftOperand.bitOr(_typeProvider, rightOperand);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
-  DartObjectImpl bitXor(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      try {
-        return leftOperand.bitXor(_typeProvider, rightOperand);
+        return expression.castToType(_typeProvider, _typeSystem, type);
       } on EvaluationException catch (exception) {
         _errorReporter.reportErrorForNode(exception.errorCode, node);
       }
@@ -1697,6 +1774,53 @@
     return null;
   }
 
+  DartObjectImpl eagerAnd(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand, bool allowBool) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.eagerAnd(_typeProvider, rightOperand, allowBool);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl eagerOr(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand, bool allowBool) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.eagerOr(_typeProvider, rightOperand, allowBool);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl eagerQuestionQuestion(Expression node,
+      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      if (leftOperand.isNull) {
+        return rightOperand;
+      }
+      return leftOperand;
+    }
+    return null;
+  }
+
+  DartObjectImpl eagerXor(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand, bool allowBool) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.eagerXor(_typeProvider, rightOperand, allowBool);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
   DartObjectImpl equalEqual(Expression node, DartObjectImpl leftOperand,
       DartObjectImpl rightOperand) {
     if (leftOperand != null && rightOperand != null) {
@@ -1757,6 +1881,41 @@
     return null;
   }
 
+  DartObjectImpl lazyAnd(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperandComputer()) {
+    if (leftOperand != null) {
+      try {
+        return leftOperand.lazyAnd(_typeProvider, rightOperandComputer);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl lazyOr(BinaryExpression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperandComputer()) {
+    if (leftOperand != null) {
+      try {
+        return leftOperand.lazyOr(_typeProvider, rightOperandComputer);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
+  DartObjectImpl lazyQuestionQuestion(Expression node,
+      DartObjectImpl leftOperand, DartObjectImpl rightOperandComputer()) {
+    if (leftOperand != null) {
+      if (leftOperand.isNull) {
+        return rightOperandComputer();
+      }
+      return leftOperand;
+    }
+    return null;
+  }
+
   DartObjectImpl lessThan(BinaryExpression node, DartObjectImpl leftOperand,
       DartObjectImpl rightOperand) {
     if (leftOperand != null && rightOperand != null) {
@@ -1781,18 +1940,6 @@
     return null;
   }
 
-  DartObjectImpl logicalAnd(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperandComputer()) {
-    if (leftOperand != null) {
-      try {
-        return leftOperand.logicalAnd(_typeProvider, rightOperandComputer);
-      } on EvaluationException catch (exception) {
-        _errorReporter.reportErrorForNode(exception.errorCode, node);
-      }
-    }
-    return null;
-  }
-
   DartObjectImpl logicalNot(Expression node, DartObjectImpl evaluationResult) {
     if (evaluationResult != null) {
       try {
@@ -1804,11 +1951,11 @@
     return null;
   }
 
-  DartObjectImpl logicalOr(BinaryExpression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperandComputer()) {
-    if (leftOperand != null) {
+  DartObjectImpl logicalShiftRight(BinaryExpression node,
+      DartObjectImpl leftOperand, DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
       try {
-        return leftOperand.logicalOr(_typeProvider, rightOperandComputer);
+        return leftOperand.logicalShiftRight(_typeProvider, rightOperand);
       } on EvaluationException catch (exception) {
         _errorReporter.reportErrorForNode(exception.errorCode, node);
       }
@@ -1863,17 +2010,6 @@
     return null;
   }
 
-  DartObjectImpl questionQuestion(Expression node, DartObjectImpl leftOperand,
-      DartObjectImpl rightOperand) {
-    if (leftOperand != null && rightOperand != null) {
-      if (leftOperand.isNull) {
-        return rightOperand;
-      }
-      return leftOperand;
-    }
-    return null;
-  }
-
   DartObjectImpl remainder(BinaryExpression node, DartObjectImpl leftOperand,
       DartObjectImpl rightOperand) {
     if (leftOperand != null && rightOperand != null) {
@@ -1939,6 +2075,23 @@
     }
     return null;
   }
+
+  DartObjectImpl typeTest(
+      IsExpression node, DartObjectImpl expression, DartObjectImpl type) {
+    if (expression != null && type != null) {
+      try {
+        DartObjectImpl result =
+            expression.hasType(_typeProvider, _typeSystem, type);
+        if (node.notOperator != null) {
+          return result.logicalNot(_typeProvider);
+        }
+        return result;
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
 }
 
 /**
diff --git a/pkg/analyzer/lib/src/dart/constant/utilities.dart b/pkg/analyzer/lib/src/dart/constant/utilities.dart
index 50480ad..6a806c3 100644
--- a/pkg/analyzer/lib/src/dart/constant/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/constant/utilities.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -9,6 +9,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/ast/ast.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';
@@ -55,8 +56,8 @@
 
   @override
   FunctionExpression visitFunctionExpression(FunctionExpression node) {
-    FunctionExpression expression = super.visitFunctionExpression(node);
-    expression.element = node.declaredElement;
+    FunctionExpressionImpl expression = super.visitFunctionExpression(node);
+    expression.declaredElement = node.declaredElement;
     return expression;
   }
 
@@ -77,6 +78,13 @@
   }
 
   @override
+  IntegerLiteral visitIntegerLiteral(IntegerLiteral node) {
+    IntegerLiteral integer = super.visitIntegerLiteral(node);
+    integer.staticType = node.staticType;
+    return integer;
+  }
+
+  @override
   ListLiteral visitListLiteral(ListLiteral node) {
     ListLiteral literal = super.visitListLiteral(node);
     literal.staticType = node.staticType;
@@ -106,6 +114,16 @@
   }
 
   @override
+  SetLiteral visitSetLiteral(SetLiteral node) {
+    SetLiteral literal = super.visitSetLiteral(node);
+    literal.staticType = node.staticType;
+    if (node.constKeyword == null && node.isConst) {
+      literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
+    }
+    return literal;
+  }
+
+  @override
   SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) {
     SimpleIdentifier identifier = super.visitSimpleIdentifier(node);
     identifier.staticElement = node.staticElement;
@@ -173,6 +191,15 @@
   }
 
   @override
+  void visitSetLiteral(SetLiteral node) {
+    if (node.isConst) {
+      _find(node);
+    } else {
+      super.visitSetLiteral(node);
+    }
+  }
+
+  @override
   void visitSwitchCase(SwitchCase node) {
     _find(node.expression);
     node.statements.accept(this);
@@ -192,7 +219,7 @@
  * constructors, constant constructor invocations, and annotations found in
  * those compilation units.
  */
-class ConstantFinder extends RecursiveAstVisitor<Object> {
+class ConstantFinder extends RecursiveAstVisitor<void> {
   /**
    * The elements and AST nodes whose constant values need to be computed.
    */
@@ -206,7 +233,7 @@
   bool treatFinalInstanceVarAsConst = false;
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     super.visitAnnotation(node);
     ElementAnnotation elementAnnotation = node.elementAnnotation;
     if (elementAnnotation == null) {
@@ -217,11 +244,10 @@
     } else {
       constantsToCompute.add(elementAnnotation);
     }
-    return null;
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     bool prevTreatFinalInstanceVarAsConst = treatFinalInstanceVarAsConst;
     if (resolutionMap
         .elementDeclaredByClassDeclaration(node)
@@ -233,14 +259,14 @@
       treatFinalInstanceVarAsConst = true;
     }
     try {
-      return super.visitClassDeclaration(node);
+      super.visitClassDeclaration(node);
     } finally {
       treatFinalInstanceVarAsConst = prevTreatFinalInstanceVarAsConst;
     }
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     super.visitConstructorDeclaration(node);
     if (node.constKeyword != null) {
       ConstructorElement element = node.declaredElement;
@@ -249,22 +275,20 @@
         constantsToCompute.addAll(element.parameters);
       }
     }
-    return null;
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     super.visitDefaultFormalParameter(node);
     Expression defaultValue = node.defaultValue;
     if (defaultValue != null && node.declaredElement != null) {
       constantsToCompute
           .add(resolutionMap.elementDeclaredByFormalParameter(node));
     }
-    return null;
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     Expression initializer = node.initializer;
     VariableElement element = node.declaredElement;
@@ -278,7 +302,6 @@
         constantsToCompute.add(element);
       }
     }
-    return null;
   }
 }
 
@@ -286,7 +309,7 @@
  * An object used to add reference information for a given variable to the
  * bi-directional mapping used to order the evaluation of constants.
  */
-class ReferenceFinder extends RecursiveAstVisitor<Object> {
+class ReferenceFinder extends RecursiveAstVisitor<void> {
   /**
    * The callback which should be used to report any dependencies that were
    * found.
@@ -301,39 +324,37 @@
   ReferenceFinder(this._callback);
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     if (node.isConst) {
       ConstructorElement constructor = getConstructorImpl(node.staticElement);
       if (constructor != null) {
         _callback(constructor);
       }
     }
-    return super.visitInstanceCreationExpression(node);
+    super.visitInstanceCreationExpression(node);
   }
 
   @override
-  Object visitLabel(Label node) {
+  void visitLabel(Label node) {
     // We are visiting the "label" part of a named expression in a function
     // call (presumably a constructor call), e.g. "const C(label: ...)".  We
     // don't want to visit the SimpleIdentifier for the label because that's a
     // reference to a function parameter that needs to be filled in; it's not a
     // constant whose value we depend on.
-    return null;
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     super.visitRedirectingConstructorInvocation(node);
     ConstructorElement target = getConstructorImpl(node.staticElement);
     if (target != null) {
       _callback(target);
     }
-    return null;
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     Element staticElement = node.staticElement;
     Element element = staticElement is PropertyAccessorElement
         ? staticElement.variable
@@ -341,16 +362,14 @@
     if (element is VariableElement && element.isConst) {
       _callback(element);
     }
-    return null;
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     super.visitSuperConstructorInvocation(node);
     ConstructorElement constructor = getConstructorImpl(node.staticElement);
     if (constructor != null) {
       _callback(constructor);
     }
-    return null;
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index cca4d22..4666351 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
+import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
 
 /**
@@ -98,7 +99,7 @@
   }
 
   @override
-  BoolState logicalAnd(InstanceState rightOperandComputer()) {
+  BoolState lazyAnd(InstanceState rightOperandComputer()) {
     if (value == false) {
       return FALSE_STATE;
     }
@@ -108,6 +109,16 @@
   }
 
   @override
+  BoolState lazyOr(InstanceState rightOperandComputer()) {
+    if (value == true) {
+      return TRUE_STATE;
+    }
+    InstanceState rightOperand = rightOperandComputer();
+    assertBool(rightOperand);
+    return value == null ? UNKNOWN_VALUE : rightOperand.convertToBool();
+  }
+
+  @override
   BoolState logicalNot() {
     if (value == null) {
       return UNKNOWN_VALUE;
@@ -116,16 +127,6 @@
   }
 
   @override
-  BoolState logicalOr(InstanceState rightOperandComputer()) {
-    if (value == true) {
-      return TRUE_STATE;
-    }
-    InstanceState rightOperand = rightOperandComputer();
-    assertBool(rightOperand);
-    return value == null ? UNKNOWN_VALUE : rightOperand.convertToBool();
-  }
-
-  @override
   String toString() => value == null ? "-unknown-" : (value ? "true" : "false");
 
   /**
@@ -145,9 +146,10 @@
   final ConstructorElement constructor;
 
   /**
-   * The positional arguments passed to the constructor.
+   * Values of specified arguments, actual values for positional, and `null`
+   * for named (which are provided as [namedArguments]).
    */
-  final List<DartObjectImpl> positionalArguments;
+  final List<DartObjectImpl> _argumentValues;
 
   /**
    * The named arguments passed to the constructor.
@@ -155,7 +157,14 @@
   final Map<String, DartObjectImpl> namedArguments;
 
   ConstructorInvocation(
-      this.constructor, this.positionalArguments, this.namedArguments);
+      this.constructor, this._argumentValues, this.namedArguments);
+
+  /**
+   * The positional arguments passed to the constructor.
+   */
+  List<DartObjectImpl> get positionalArguments {
+    return _argumentValues.takeWhile((v) => v != null).toList();
+  }
 }
 
 /**
@@ -219,6 +228,11 @@
    */
   bool get isBoolNumStringOrNull => _state.isBoolNumStringOrNull;
 
+  /**
+   * Return `true` if this object represents an object whose type is 'int'.
+   */
+  bool get isInt => _state.isInt;
+
   @override
   bool get isNull => _state is NullState;
 
@@ -265,19 +279,6 @@
   }
 
   /**
-   * Return the result of invoking the '&' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl bitAnd(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.bitAnd(rightOperand._state));
-
-  /**
    * Return the result of invoking the '~' operator on this object. The
    * [typeProvider] is the type provider used to find known types.
    *
@@ -288,30 +289,20 @@
       new DartObjectImpl(typeProvider.intType, _state.bitNot());
 
   /**
-   * Return the result of invoking the '|' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
+   * Return the result of casting this object to the given [castType].
    */
-  DartObjectImpl bitOr(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.bitOr(rightOperand._state));
-
-  /**
-   * Return the result of invoking the '^' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl bitXor(
-          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
-      new DartObjectImpl(
-          typeProvider.intType, _state.bitXor(rightOperand._state));
+  DartObjectImpl castToType(TypeProvider typeProvider, TypeSystem typeSystem,
+      DartObjectImpl castType) {
+    _assertType(castType);
+    if (isNull) {
+      return this;
+    }
+    if (!typeSystem.isSubtypeOf(type, (castType._state as TypeState)._type)) {
+      throw new EvaluationException(
+          CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+    }
+    return this;
+  }
 
   /**
    * Return the result of invoking the ' ' operator on this object with the
@@ -364,6 +355,69 @@
   }
 
   /**
+   * Return the result of invoking the '&' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl eagerAnd(
+      TypeProvider typeProvider, DartObjectImpl rightOperand, bool allowBool) {
+    if (allowBool && isBool && rightOperand.isBool) {
+      return new DartObjectImpl(
+          typeProvider.boolType, _state.logicalAnd(rightOperand._state));
+    } else if (isInt && rightOperand.isInt) {
+      return new DartObjectImpl(
+          typeProvider.intType, _state.bitAnd(rightOperand._state));
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT);
+  }
+
+  /**
+   * Return the result of invoking the '|' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl eagerOr(
+      TypeProvider typeProvider, DartObjectImpl rightOperand, bool allowBool) {
+    if (allowBool && isBool && rightOperand.isBool) {
+      return new DartObjectImpl(
+          typeProvider.boolType, _state.logicalOr(rightOperand._state));
+    } else if (isInt && rightOperand.isInt) {
+      return new DartObjectImpl(
+          typeProvider.intType, _state.bitOr(rightOperand._state));
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT);
+  }
+
+  /**
+   * Return the result of invoking the '^' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl eagerXor(
+      TypeProvider typeProvider, DartObjectImpl rightOperand, bool allowBool) {
+    if (allowBool && isBool && rightOperand.isBool) {
+      return new DartObjectImpl(
+          typeProvider.boolType, _state.logicalXor(rightOperand._state));
+    } else if (isInt && rightOperand.isInt) {
+      return new DartObjectImpl(
+          typeProvider.intType, _state.bitXor(rightOperand._state));
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT);
+  }
+
+  /**
    * Return the result of invoking the '==' operator on this object with the
    * [rightOperand]. The [typeProvider] is the type provider used to find known
    * types.
@@ -434,6 +488,28 @@
           _state.greaterThanOrEqual(rightOperand._state));
 
   /**
+   * Return the result of testing whether this object has the given [testedType].
+   */
+  DartObjectImpl hasType(TypeProvider typeProvider, TypeSystem typeSystem,
+      DartObjectImpl testedType) {
+    _assertType(testedType);
+    DartType typeType = (testedType._state as TypeState)._type;
+    BoolState state;
+    if (isNull) {
+      if (typeType == typeProvider.objectType ||
+          typeType == typeProvider.dynamicType ||
+          typeType == typeProvider.nullType) {
+        state = BoolState.TRUE_STATE;
+      } else {
+        state = BoolState.FALSE_STATE;
+      }
+    } else {
+      state = BoolState.from(typeSystem.isSubtypeOf(type, typeType));
+    }
+    return new DartObjectImpl(typeProvider.boolType, state);
+  }
+
+  /**
    * Return the result of invoking the '~/' operator on this object with the
    * [rightOperand]. The [typeProvider] is the type provider used to find known
    * types.
@@ -458,6 +534,32 @@
   }
 
   /**
+   * Return the result of invoking the '&&' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl lazyAnd(
+          TypeProvider typeProvider, DartObjectImpl rightOperandComputer()) =>
+      new DartObjectImpl(typeProvider.boolType,
+          _state.lazyAnd(() => rightOperandComputer()?._state));
+
+  /**
+   * Return the result of invoking the '||' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl lazyOr(
+          TypeProvider typeProvider, DartObjectImpl rightOperandComputer()) =>
+      new DartObjectImpl(typeProvider.boolType,
+          _state.lazyOr(() => rightOperandComputer()?._state));
+
+  /**
    * Return the result of invoking the '&lt;' operator on this object with the
    * [rightOperand]. The [typeProvider] is the type provider used to find known
    * types.
@@ -484,19 +586,6 @@
           typeProvider.boolType, _state.lessThanOrEqual(rightOperand._state));
 
   /**
-   * Return the result of invoking the '&&' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
-   *
-   * Throws an [EvaluationException] if the operator is not appropriate for an
-   * object of this kind.
-   */
-  DartObjectImpl logicalAnd(
-          TypeProvider typeProvider, DartObjectImpl rightOperandComputer()) =>
-      new DartObjectImpl(typeProvider.boolType,
-          _state.logicalAnd(() => rightOperandComputer()?._state));
-
-  /**
    * Return the result of invoking the '!' operator on this object. The
    * [typeProvider] is the type provider used to find known types.
    *
@@ -507,17 +596,17 @@
       new DartObjectImpl(typeProvider.boolType, _state.logicalNot());
 
   /**
-   * Return the result of invoking the '||' operator on this object with the
-   * [rightOperand]. The [typeProvider] is the type provider used to find known
-   * types.
+   * Return the result of invoking the '&gt;&gt;&gt;' operator on this object
+   * with the [rightOperand]. The [typeProvider] is the type provider used to
+   * find known types.
    *
    * Throws an [EvaluationException] if the operator is not appropriate for an
    * object of this kind.
    */
-  DartObjectImpl logicalOr(
-          TypeProvider typeProvider, DartObjectImpl rightOperandComputer()) =>
-      new DartObjectImpl(typeProvider.boolType,
-          _state.logicalOr(() => rightOperandComputer()?._state));
+  DartObjectImpl logicalShiftRight(
+          TypeProvider typeProvider, DartObjectImpl rightOperand) =>
+      new DartObjectImpl(
+          typeProvider.intType, _state.logicalShiftRight(rightOperand._state));
 
   /**
    * Return the result of invoking the '-' operator on this object with the
@@ -722,6 +811,15 @@
   }
 
   @override
+  Set<DartObject> toSetValue() {
+    InstanceState state = _state;
+    if (state is SetState) {
+      return state._elements;
+    }
+    return null;
+  }
+
+  @override
   String toString() => "${type.displayName} ($_state)";
 
   @override
@@ -750,6 +848,16 @@
     }
     return null;
   }
+
+  /**
+   * Throw an exception if the given [object]'s state does not represent a Type
+   * value.
+   */
+  void _assertType(DartObjectImpl object) {
+    if (object._state is! TypeState) {
+      throw new EvaluationException(CompileTimeErrorCode.CONST_EVAL_TYPE_TYPE);
+    }
+  }
 }
 
 /**
@@ -1183,6 +1291,19 @@
   }
 
   @override
+  BoolState lazyAnd(InstanceState rightOperandComputer()) {
+    assertBool(rightOperandComputer());
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
+  BoolState lazyOr(InstanceState rightOperandComputer()) {
+    InstanceState rightOperand = rightOperandComputer();
+    assertBool(rightOperand);
+    return rightOperand.convertToBool();
+  }
+
+  @override
   BoolState lessThan(InstanceState rightOperand) {
     assertNumOrNull(rightOperand);
     return BoolState.UNKNOWN_VALUE;
@@ -1195,22 +1316,9 @@
   }
 
   @override
-  BoolState logicalAnd(InstanceState rightOperandComputer()) {
-    assertBool(rightOperandComputer());
-    return BoolState.UNKNOWN_VALUE;
-  }
-
-  @override
   BoolState logicalNot() => BoolState.UNKNOWN_VALUE;
 
   @override
-  BoolState logicalOr(InstanceState rightOperandComputer()) {
-    InstanceState rightOperand = rightOperandComputer();
-    assertBool(rightOperand);
-    return rightOperand.convertToBool();
-  }
-
-  @override
   NumState minus(InstanceState rightOperand) {
     assertNumOrNull(rightOperand);
     return _unknownNum(rightOperand);
@@ -1461,6 +1569,16 @@
   bool get isBoolNumStringOrNull => false;
 
   /**
+   * Return `true` if this object represents an object whose type is 'int'.
+   */
+  bool get isInt => false;
+
+  /**
+   * Return `true` if this object represents the value 'null'.
+   */
+  bool get isNull => false;
+
+  /**
    * Return `true` if this object represents an unknown value.
    */
   bool get isUnknown => false;
@@ -1704,6 +1822,40 @@
   BoolState isIdentical(InstanceState rightOperand);
 
   /**
+   * Return the result of invoking the '&&' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState lazyAnd(InstanceState rightOperandComputer()) {
+    assertBool(this);
+    if (convertToBool() == BoolState.FALSE_STATE) {
+      return this;
+    }
+    InstanceState rightOperand = rightOperandComputer();
+    assertBool(rightOperand);
+    return rightOperand.convertToBool();
+  }
+
+  /**
+   * Return the result of invoking the '||' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState lazyOr(InstanceState rightOperandComputer()) {
+    assertBool(this);
+    if (convertToBool() == BoolState.TRUE_STATE) {
+      return this;
+    }
+    InstanceState rightOperand = rightOperandComputer();
+    assertBool(rightOperand);
+    return rightOperand.convertToBool();
+  }
+
+  /**
    * Return the result of invoking the '&lt;' operator on this object with the
    * [rightOperand].
    *
@@ -1732,20 +1884,21 @@
   }
 
   /**
-   * Return the result of invoking the '&&' operator on this object with the
+   * Return the result of invoking the '&' operator on this object with the
    * [rightOperand].
    *
    * Throws an [EvaluationException] if the operator is not appropriate for an
    * object of this kind.
    */
-  BoolState logicalAnd(InstanceState rightOperandComputer()) {
+  BoolState logicalAnd(InstanceState rightOperand) {
     assertBool(this);
-    if (convertToBool() == BoolState.FALSE_STATE) {
-      return this;
-    }
-    InstanceState rightOperand = rightOperandComputer();
     assertBool(rightOperand);
-    return rightOperand.convertToBool();
+    bool leftValue = convertToBool().value;
+    bool rightValue = rightOperand.convertToBool().value;
+    if (leftValue == null || rightValue == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(leftValue & rightValue);
   }
 
   /**
@@ -1760,20 +1913,53 @@
   }
 
   /**
-   * Return the result of invoking the '||' operator on this object with the
+   * Return the result of invoking the '|' operator on this object with the
    * [rightOperand].
    *
    * Throws an [EvaluationException] if the operator is not appropriate for an
    * object of this kind.
    */
-  BoolState logicalOr(InstanceState rightOperandComputer()) {
+  BoolState logicalOr(InstanceState rightOperand) {
     assertBool(this);
-    if (convertToBool() == BoolState.TRUE_STATE) {
-      return this;
-    }
-    InstanceState rightOperand = rightOperandComputer();
     assertBool(rightOperand);
-    return rightOperand.convertToBool();
+    bool leftValue = convertToBool().value;
+    bool rightValue = rightOperand.convertToBool().value;
+    if (leftValue == null || rightValue == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(leftValue | rightValue);
+  }
+
+  /**
+   * Return the result of invoking the '&gt;&gt;' operator on this object with
+   * the [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  IntState logicalShiftRight(InstanceState rightOperand) {
+    assertIntOrNull(this);
+    assertIntOrNull(rightOperand);
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  /**
+   * Return the result of invoking the '^' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState logicalXor(InstanceState rightOperand) {
+    assertBool(this);
+    assertBool(rightOperand);
+    bool leftValue = convertToBool().value;
+    bool rightValue = rightOperand.convertToBool().value;
+    if (leftValue == null || rightValue == null) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(leftValue ^ rightValue);
   }
 
   /**
@@ -1898,6 +2084,9 @@
   bool get isBoolNumStringOrNull => true;
 
   @override
+  bool get isInt => true;
+
+  @override
   bool get isUnknown => value == null;
 
   @override
@@ -2193,6 +2382,33 @@
   }
 
   @override
+  IntState logicalShiftRight(InstanceState rightOperand) {
+    assertIntOrNull(rightOperand);
+    if (value == null) {
+      return UNKNOWN_VALUE;
+    }
+    if (rightOperand is IntState) {
+      int rightValue = rightOperand.value;
+      if (rightValue == null) {
+        return UNKNOWN_VALUE;
+      } else if (rightValue.bitLength > 31) {
+        return UNKNOWN_VALUE;
+      }
+      if (rightValue >= 0) {
+        // TODO(brianwilkerson) After the analyzer package has a minimum SDK
+        // constraint that includes support for the real operator, consider
+        // changing this to the following line:
+        //   return new IntState(value >>> rightValue);
+        return new IntState(value ~/ (1 << rightValue));
+      }
+    } else if (rightOperand is DynamicState || rightOperand is NumState) {
+      return UNKNOWN_VALUE;
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
+  }
+
+  @override
   NumState minus(InstanceState rightOperand) {
     assertNumOrNull(rightOperand);
     if (value == null) {
@@ -2521,6 +2737,9 @@
   bool get isBoolNumStringOrNull => true;
 
   @override
+  bool get isNull => true;
+
+  @override
   String get typeName => "Null";
 
   @override
@@ -2676,6 +2895,89 @@
 }
 
 /**
+ * The state of an object representing a set.
+ */
+class SetState extends InstanceState {
+  /**
+   * The elements of the set.
+   */
+  final Set<DartObjectImpl> _elements;
+
+  /**
+   * Initialize a newly created state to represent a set with the given
+   * [elements].
+   */
+  SetState(this._elements);
+
+  @override
+  int get hashCode {
+    int value = 0;
+    for (DartObjectImpl element in _elements) {
+      value = (value << 3) ^ element.hashCode;
+    }
+    return value;
+  }
+
+  @override
+  String get typeName => "Set";
+
+  @override
+  bool operator ==(Object object) {
+    if (object is SetState) {
+      List<DartObjectImpl> elements = _elements.toList();
+      List<DartObjectImpl> otherElements = object._elements.toList();
+      int count = elements.length;
+      if (otherElements.length != count) {
+        return false;
+      } else if (count == 0) {
+        return true;
+      }
+      for (int i = 0; i < count; i++) {
+        if (elements[i] != otherElements[i]) {
+          return false;
+        }
+      }
+      return true;
+    }
+    return false;
+  }
+
+  @override
+  StringState convertToString() => StringState.UNKNOWN_VALUE;
+
+  @override
+  BoolState equalEqual(InstanceState rightOperand) {
+    assertBoolNumStringOrNull(rightOperand);
+    return isIdentical(rightOperand);
+  }
+
+  @override
+  BoolState isIdentical(InstanceState rightOperand) {
+    if (rightOperand is DynamicState) {
+      return BoolState.UNKNOWN_VALUE;
+    }
+    return BoolState.from(this == rightOperand);
+  }
+
+  @override
+  String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.write('{');
+    bool first = true;
+    _elements.forEach((DartObjectImpl element) {
+      if (first) {
+        first = false;
+      } else {
+        buffer.write(', ');
+      }
+      buffer.write(element);
+    });
+    buffer.write('}');
+    return buffer.toString();
+  }
+}
+
+/**
  * The state of an object representing a string.
  */
 class StringState extends InstanceState {
diff --git a/pkg/analyzer/lib/src/dart/element/ast_provider.dart b/pkg/analyzer/lib/src/dart/element/ast_provider.dart
deleted file mode 100644
index ba94d53..0000000
--- a/pkg/analyzer/lib/src/dart/element/ast_provider.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-
-/**
- * Provider for resolved and unresolved [CompilationUnit]s that contain, or
- * [AstNode]s that declare [Element]s.
- */
-abstract class AstProvider {
-  /**
-   * Return the driver that is used to provide ASTs.
-   */
-  AnalysisDriver get driver;
-
-  /**
-   * Completes with the [SimpleIdentifier] that declares the [element]. The
-   * enclosing unit is only parsed, but not resolved. Completes with `null` if
-   * the [element] is synthetic, or the file where it is declared cannot be
-   * parsed, etc.
-   */
-  Future<SimpleIdentifier> getParsedNameForElement(Element element);
-
-  /**
-   * Completes with the parsed [CompilationUnit] that contains the [element].
-   */
-  Future<CompilationUnit> getParsedUnitForElement(Element element);
-
-  /**
-   * Completes with the [SimpleIdentifier] that declares the [element]. The
-   * enclosing unit is fully resolved. Completes with `null` if the [element]
-   * is synthetic, or the file where it is declared cannot be parsed and
-   * resolved, etc.
-   */
-  Future<SimpleIdentifier> getResolvedNameForElement(Element element);
-
-  /**
-   * Completes with the resolved [CompilationUnit] that contains the [element].
-   */
-  Future<CompilationUnit> getResolvedUnitForElement(Element element);
-}
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index 2e518e3..5d439ae 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -48,7 +48,7 @@
       : super(initialHolder, compilationUnitElement);
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     // Although it isn't valid to do so because closures are not constant
     // expressions, it's possible for one of the arguments to the constructor to
     // contain a closure. Wrapping the processing of the annotation this way
@@ -62,16 +62,13 @@
     } finally {
       _currentHolder = previousHolder;
     }
-    return null;
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
-    return null;
-  }
+  void visitBlockFunctionBody(BlockFunctionBody node) {}
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     _enclosingClassHasConstConstructor = false;
     for (var constructor in node.members) {
       if (constructor is ConstructorDeclaration &&
@@ -90,12 +87,10 @@
     _fillClassElement(node, element, holder);
 
     _currentHolder.addType(element);
-
-    return null;
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     ElementHolder holder = new ElementHolder();
     _visitChildren(holder, node);
     SimpleIdentifier className = node.name;
@@ -109,19 +104,18 @@
     _currentHolder.addType(element);
     className.staticElement = element;
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     if (_unitElement is ElementImpl) {
       _setCodeRange(_unitElement, node);
     }
-    return super.visitCompilationUnit(node);
+    super.visitCompilationUnit(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     ElementHolder holder = new ElementHolder();
     _visitChildren(holder, node);
     FunctionBody body = node.body;
@@ -150,7 +144,7 @@
       element.generator = true;
     }
     _currentHolder.addConstructor(element);
-    node.element = element;
+    (node as ConstructorDeclarationImpl).declaredElement = element;
     if (constructorName == null) {
       Identifier returnType = node.returnType;
       if (returnType != null) {
@@ -163,11 +157,10 @@
       element.nameEnd = constructorName.end;
     }
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     SimpleIdentifier enumName = node.name;
     EnumElementImpl enumElement = new EnumElementImpl.forNode(enumName);
     _setCodeRange(enumElement, node);
@@ -199,25 +192,23 @@
 
     _currentHolder.addEnum(enumElement);
     enumName.staticElement = enumElement;
-    return super.visitEnumDeclaration(node);
+    super.visitEnumDeclaration(node);
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     List<ElementAnnotation> annotations =
         _createElementAnnotations(node.metadata);
     _unitElement.setAnnotations(node.offset, annotations);
-    return super.visitExportDirective(node);
+    super.visitExportDirective(node);
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
-    return null;
-  }
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {}
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
-    FunctionExpression expression = node.functionExpression;
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    FunctionExpressionImpl expression = node.functionExpression;
     if (expression != null) {
       ElementHolder holder = new ElementHolder();
       _visitChildren(holder, node);
@@ -248,13 +239,13 @@
           element.hasImplicitReturnType = true;
         }
         _currentHolder.addFunction(element);
-        expression.element = element;
+        expression.declaredElement = element;
         functionName.staticElement = element;
       } else {
         SimpleIdentifier propertyNameNode = node.name;
         if (propertyNameNode == null) {
           // TODO(brianwilkerson) Report this internal error.
-          return null;
+          return;
         }
         String propertyName = propertyNameNode.name;
         TopLevelVariableElementImpl variable = _currentHolder
@@ -291,7 +282,7 @@
             getter.hasImplicitReturnType = true;
           }
           _currentHolder.addAccessor(getter);
-          expression.element = getter;
+          expression.declaredElement = getter;
           propertyNameNode.staticElement = getter;
         } else {
           PropertyAccessorElementImpl setter =
@@ -321,21 +312,21 @@
           variable.setter = setter;
           variable.isFinal = false;
           _currentHolder.addAccessor(setter);
-          expression.element = setter;
+          expression.declaredElement = setter;
           propertyNameNode.staticElement = setter;
         }
       }
       holder.validate();
     }
-    return null;
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is FunctionDeclaration) {
       // visitFunctionDeclaration has already created the element for the
       // declaration.  We just need to visit children.
-      return super.visitFunctionExpression(node);
+      super.visitFunctionExpression(node);
+      return;
     }
     ElementHolder holder = new ElementHolder();
     _visitChildren(holder, node);
@@ -357,13 +348,12 @@
     element.type = new FunctionTypeImpl(element);
     element.hasImplicitReturnType = true;
     _currentHolder.addFunction(element);
-    node.element = element;
+    (node as FunctionExpressionImpl).declaredElement = element;
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     ElementHolder holder = new ElementHolder();
     _visitChildren(holder, node);
     SimpleIdentifier aliasName = node.name;
@@ -382,11 +372,10 @@
     _currentHolder.addTypeAlias(element);
     aliasName.staticElement = element;
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitGenericTypeAlias(GenericTypeAlias node) {
+  void visitGenericTypeAlias(GenericTypeAlias node) {
     ElementHolder holder = new ElementHolder();
     _visitChildren(holder, node);
     SimpleIdentifier aliasName = node.name;
@@ -403,27 +392,26 @@
     _currentHolder.addTypeAlias(element);
     aliasName.staticElement = element;
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     List<ElementAnnotation> annotations =
         _createElementAnnotations(node.metadata);
     _unitElement.setAnnotations(node.offset, annotations);
-    return super.visitImportDirective(node);
+    super.visitImportDirective(node);
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     List<ElementAnnotation> annotations =
         _createElementAnnotations(node.metadata);
     _unitElement.setAnnotations(node.offset, annotations);
-    return super.visitLibraryDirective(node);
+    super.visitLibraryDirective(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     try {
       ElementHolder holder = new ElementHolder();
       _visitChildren(holder, node);
@@ -539,7 +527,7 @@
     } catch (exception, stackTrace) {
       if (node.name.staticElement == null) {
         ClassDeclaration classNode =
-            node.getAncestor((node) => node is ClassDeclaration);
+            node.thisOrAncestorOfType<ClassDeclaration>();
         StringBuffer buffer = new StringBuffer();
         buffer.write("The element for the method ");
         buffer.write(node.name);
@@ -557,7 +545,7 @@
     } finally {
       if (node.name.staticElement == null) {
         ClassDeclaration classNode =
-            node.getAncestor((node) => node is ClassDeclaration);
+            node.thisOrAncestorOfType<ClassDeclaration>();
         StringBuffer buffer = new StringBuffer();
         buffer.write("The element for the method ");
         buffer.write(node.name);
@@ -570,11 +558,10 @@
                 new AnalysisException(buffer.toString()), null));
       }
     }
-    return null;
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     ElementHolder holder = _buildClassMembers(node);
 
     SimpleIdentifier nameNode = node.name;
@@ -583,20 +570,18 @@
     _fillClassElement(node, element, holder);
 
     _currentHolder.addMixin(element);
-
-    return null;
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     List<ElementAnnotation> annotations =
         _createElementAnnotations(node.metadata);
     _unitElement.setAnnotations(node.offset, annotations);
-    return super.visitPartDirective(node);
+    super.visitPartDirective(node);
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     bool isConst = node.isConst;
     bool isFinal = node.isFinal;
     Expression initializerNode = node.initializer;
@@ -658,11 +643,10 @@
         _currentHolder.addAccessor(setter);
       }
     }
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     super.visitVariableDeclarationList(node);
     AstNode parent = node.parent;
     List<ElementAnnotation> elementAnnotations;
@@ -676,7 +660,6 @@
     }
     _setVariableDeclarationListAnnotations(node, elementAnnotations);
     _setVariableDeclarationListCodeRanges(node);
-    return null;
   }
 
   ElementHolder _buildClassMembers(AstNode classNode) {
@@ -827,7 +810,7 @@
  * Instances of the class `DirectiveElementBuilder` build elements for top
  * level library directives.
  */
-class DirectiveElementBuilder extends SimpleAstVisitor<Object> {
+class DirectiveElementBuilder extends SimpleAstVisitor<void> {
   /**
    * The analysis context within which directive elements are being built.
    */
@@ -903,7 +886,7 @@
       this.exportSourceKindMap);
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     //
     // Resolve directives.
     //
@@ -926,11 +909,10 @@
     //
     libraryElement.imports = imports;
     libraryElement.exports = exports;
-    return null;
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     // Remove previous element. (It will remain null if the target is missing.)
     node.element = null;
     Source exportedSource = node.selectedSource;
@@ -962,11 +944,10 @@
       errors.add(new AnalysisError(libraryElement.source, offset, length,
           CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY, [uriLiteral.toSource()]));
     }
-    return null;
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     // Remove previous element. (It will remain null if the target is missing.)
     node.element = null;
     Source importedSource = node.selectedSource;
@@ -1017,21 +998,18 @@
       errors.add(new AnalysisError(libraryElement.source, offset, length,
           errorCode, [uriLiteral.toSource()]));
     }
-    return null;
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     (node.element as LibraryElementImpl)?.metadata =
         _getElementAnnotations(node.metadata);
-    return null;
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     (node.element as CompilationUnitElementImpl)?.metadata =
         _getElementAnnotations(node.metadata);
-    return null;
   }
 
   /**
@@ -1080,30 +1058,27 @@
       : super(initialHolder, compilationUnitElement);
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     _buildLocal(node);
-    return null;
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     super.visitDefaultFormalParameter(node);
     buildParameterInitializer(
         node.declaredElement as ParameterElementImpl, node.defaultValue);
-    return null;
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     _buildLocal(node);
-    return null;
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     _mixinSuperInvokedNames = new Set<String>();
     try {
-      return super.visitMixinDeclaration(node);
+      super.visitMixinDeclaration(node);
     } finally {
       MixinElementImpl element = node.declaredElement;
       element.superInvokedNames = _mixinSuperInvokedNames.toList();
@@ -1112,11 +1087,10 @@
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     VariableElementImpl element = node.declaredElement as VariableElementImpl;
     buildVariableInitializer(element, node.initializer);
-    return null;
   }
 
   void _buildLocal(FunctionBody body) {
@@ -1142,6 +1116,13 @@
       : super(initialHolder, compilationUnitElement);
 
   /**
+   * Initialize a newly created element builder as a first step to analyzing a
+   * dangling dart expression.
+   */
+  LocalElementBuilder.forDanglingExpression()
+      : super(new ElementHolder(), null);
+
+  /**
    * Builds the variable elements associated with [node] and stores them in
    * the element holder.
    */
@@ -1186,13 +1167,13 @@
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     buildCatchVariableElements(node);
-    return super.visitCatchClause(node);
+    super.visitCatchClause(node);
   }
 
   @override
-  Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     SimpleIdentifier variableName = node.identifier;
     LocalVariableElementImpl element =
         new LocalVariableElementImpl.forNode(variableName);
@@ -1211,22 +1192,20 @@
     }
     _currentHolder.addLocalVariable(element);
     variableName.staticElement = element;
-    return null;
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     super.visitDefaultFormalParameter(node);
     buildParameterInitializer(
         node.declaredElement as ParameterElementImpl, node.defaultValue);
-    return null;
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
-    FunctionExpression expression = node.functionExpression;
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    FunctionExpressionImpl expression = node.functionExpression;
     if (expression == null) {
-      return null;
+      return;
     }
 
     ElementHolder holder = new ElementHolder();
@@ -1255,7 +1234,7 @@
     }
 
     {
-      Block enclosingBlock = node.getAncestor((node) => node is Block);
+      Block enclosingBlock = node.thisOrAncestorOfType<Block>();
       if (enclosingBlock != null) {
         element.setVisibleRange(enclosingBlock.offset, enclosingBlock.length);
       }
@@ -1266,18 +1245,18 @@
     }
 
     _currentHolder.addFunction(element);
-    expression.element = element;
+    expression.declaredElement = element;
     node.name.staticElement = element;
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is FunctionDeclaration) {
       // visitFunctionDeclaration has already created the element for the
       // declaration.  We just need to visit children.
-      return super.visitFunctionExpression(node);
+      super.visitFunctionExpression(node);
+      return;
     }
 
     ElementHolder holder = new ElementHolder();
@@ -1298,43 +1277,38 @@
     if (body.isGenerator) {
       element.generator = true;
     }
-
-    {
-      Block enclosingBlock = node.getAncestor((node) => node is Block);
-      if (enclosingBlock != null) {
-        element.setVisibleRange(enclosingBlock.offset, enclosingBlock.length);
-      }
+    Block enclosingBlock = node.thisOrAncestorOfType<Block>();
+    if (enclosingBlock != null) {
+      element.setVisibleRange(enclosingBlock.offset, enclosingBlock.length);
     }
-
     element.type = new FunctionTypeImpl(element);
     element.hasImplicitReturnType = true;
     _currentHolder.addFunction(element);
-    node.element = element;
+    (node as FunctionExpressionImpl).declaredElement = element;
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitLabeledStatement(LabeledStatement node) {
+  void visitLabeledStatement(LabeledStatement node) {
     bool onSwitchStatement = node.statement is SwitchStatement;
     buildLabelElements(node.labels, onSwitchStatement, false);
-    return super.visitLabeledStatement(node);
+    super.visitLabeledStatement(node);
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     buildLabelElements(node.labels, false, true);
-    return super.visitSwitchCase(node);
+    super.visitSwitchCase(node);
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     buildLabelElements(node.labels, false, true);
-    return super.visitSwitchDefault(node);
+    super.visitSwitchDefault(node);
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     bool isConst = node.isConst;
     bool isFinal = node.isFinal;
     Expression initializerNode = node.initializer;
@@ -1354,17 +1328,15 @@
     element.isConst = isConst;
     element.isFinal = isFinal;
     buildVariableInitializer(element, initializerNode);
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     super.visitVariableDeclarationList(node);
     List<ElementAnnotation> elementAnnotations =
         _createElementAnnotations(node.metadata);
     _setVariableDeclarationListAnnotations(node, elementAnnotations);
     _setVariableDeclarationListCodeRanges(node);
-    return null;
   }
 
   void _setVariableVisibleRange(
@@ -1374,7 +1346,7 @@
     if (parent2 is ForStatement) {
       scopeNode = parent2;
     } else {
-      scopeNode = node.getAncestor((node) => node is Block);
+      scopeNode = node.thisOrAncestorOfType<Block>();
     }
     element.setVisibleRange(scopeNode.offset, scopeNode.length);
   }
@@ -1383,7 +1355,7 @@
 /**
  * Base class for API and local element builders.
  */
-abstract class _BaseElementBuilder extends RecursiveAstVisitor<Object> {
+abstract class _BaseElementBuilder extends RecursiveAstVisitor<void> {
   /**
    * The compilation unit element into which the elements being built will be
    * stored.
@@ -1444,7 +1416,7 @@
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     NormalFormalParameter normalParameter = node.parameter;
     SimpleIdentifier parameterName = normalParameter.identifier;
     ParameterElementImpl parameter;
@@ -1474,11 +1446,10 @@
     }
     parameterName?.staticElement = parameter;
     normalParameter.accept(this);
-    return null;
   }
 
   @override
-  Object visitFieldFormalParameter(FieldFormalParameter node) {
+  void visitFieldFormalParameter(FieldFormalParameter node) {
     if (node.parent is! DefaultFormalParameter) {
       SimpleIdentifier parameterName = node.identifier;
       FieldFormalParameterElementImpl parameter =
@@ -1505,11 +1476,10 @@
       _createGenericFunctionType(element, holder);
     }
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     if (node.parent is! DefaultFormalParameter) {
       SimpleIdentifier parameterName = node.identifier;
       ParameterElementImpl parameter =
@@ -1534,11 +1504,10 @@
     element.metadata = _createElementAnnotations(node.metadata);
     _createGenericFunctionType(element, holder);
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) {
+  void visitGenericFunctionType(GenericFunctionType node) {
     ElementHolder holder = new ElementHolder();
     _visitChildren(holder, node);
     GenericFunctionTypeElementImpl element =
@@ -1550,11 +1519,10 @@
     element.type = type;
     (node as GenericFunctionTypeImpl).type = type;
     holder.validate();
-    return null;
   }
 
   @override
-  Object visitSimpleFormalParameter(SimpleFormalParameter node) {
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
     ParameterElementImpl parameter;
     if (node.parent is! DefaultFormalParameter) {
       SimpleIdentifier parameterName = node.identifier;
@@ -1576,11 +1544,10 @@
     super.visitSimpleFormalParameter(node);
     parameter ??= node.declaredElement;
     parameter?.metadata = _createElementAnnotations(node.metadata);
-    return null;
   }
 
   @override
-  Object visitTypeParameter(TypeParameter node) {
+  void visitTypeParameter(TypeParameter node) {
     SimpleIdentifier parameterName = node.name;
     TypeParameterElementImpl typeParameter =
         new TypeParameterElementImpl.forNode(parameterName);
@@ -1591,7 +1558,7 @@
     typeParameter.type = typeParameterType;
     _currentHolder.addTypeParameter(typeParameter);
     parameterName.staticElement = typeParameter;
-    return super.visitTypeParameter(node);
+    super.visitTypeParameter(node);
   }
 
   /**
@@ -1720,54 +1687,50 @@
 /**
  * Builds elements for all node that are not constructors or methods.
  */
-class _ClassNotExecutableElementsBuilder extends UnifyingAstVisitor<Object> {
+class _ClassNotExecutableElementsBuilder extends UnifyingAstVisitor<void> {
   final ApiElementBuilder builder;
   final List<ClassMember> nonFields;
 
   _ClassNotExecutableElementsBuilder(this.builder, this.nonFields);
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     nonFields.add(node);
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     nonFields.add(node);
-    return null;
   }
 
   @override
-  Object visitNode(AstNode node) => node.accept(builder);
+  void visitNode(AstNode node) => node.accept(builder);
 }
 
 /**
  * Instances of the class [_NamespaceCombinatorBuilder] can be used to visit
  * [Combinator] AST nodes and generate [NamespaceCombinator] elements.
  */
-class _NamespaceCombinatorBuilder extends SimpleAstVisitor<Object> {
+class _NamespaceCombinatorBuilder extends SimpleAstVisitor<void> {
   /**
    * Elements generated so far.
    */
   final List<NamespaceCombinator> combinators = <NamespaceCombinator>[];
 
   @override
-  Object visitHideCombinator(HideCombinator node) {
+  void visitHideCombinator(HideCombinator node) {
     HideElementCombinatorImpl hide = new HideElementCombinatorImpl();
     hide.hiddenNames = _getIdentifiers(node.hiddenNames);
     combinators.add(hide);
-    return null;
   }
 
   @override
-  Object visitShowCombinator(ShowCombinator node) {
+  void visitShowCombinator(ShowCombinator node) {
     ShowElementCombinatorImpl show = new ShowElementCombinatorImpl();
     show.offset = node.offset;
     show.end = node.end;
     show.shownNames = _getIdentifiers(node.shownNames);
     combinators.add(show);
-    return null;
   }
 
   /**
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 513799f..f23c65a 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1,15 +1,18 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
 import 'dart:math' show min;
 
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/constant/compute.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
@@ -106,6 +109,7 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitClassElement(this);
 
+  @deprecated
   @override
   NamedCompilationUnitMember computeNode() {
     if (isEnum) {
@@ -507,22 +511,49 @@
 
   @override
   List<ConstructorElement> get constructors {
+    if (_constructors != null) {
+      return _constructors;
+    }
+
     if (isMixinApplication) {
-      return _computeMixinAppConstructors();
+      return _constructors = _computeMixinAppConstructors();
     }
-    if (_unlinkedClass != null && _constructors == null) {
-      _constructors = _unlinkedClass.executables
-          .where((e) => e.kind == UnlinkedExecutableKind.constructor)
-          .map((e) => new ConstructorElementImpl.forSerialized(e, this))
-          .toList(growable: false);
-      // Ensure at least implicit default constructor.
-      if (_constructors.isEmpty) {
-        ConstructorElementImpl constructor = new ConstructorElementImpl('', -1);
-        constructor.isSynthetic = true;
-        constructor.enclosingElement = this;
-        _constructors = <ConstructorElement>[constructor];
+
+    if (_unlinkedClass != null) {
+      var unlinkedExecutables = _unlinkedClass.executables;
+
+      var length = unlinkedExecutables.length;
+      if (length != 0) {
+        var count = 0;
+        for (var i = 0; i < length; i++) {
+          var e = unlinkedExecutables[i];
+          if (e.kind == UnlinkedExecutableKind.constructor) {
+            count++;
+          }
+        }
+
+        if (count != 0) {
+          var constructors = new List<ConstructorElement>(count);
+          var index = 0;
+          for (var i = 0; i < length; i++) {
+            var e = unlinkedExecutables[i];
+            if (e.kind == UnlinkedExecutableKind.constructor) {
+              constructors[index++] =
+                  new ConstructorElementImpl.forSerialized(e, this);
+            }
+          }
+          return _constructors = constructors;
+        }
       }
+
+      // There are no explicit constructors.
+      // Create the implicit default constructor.
+      var constructor = new ConstructorElementImpl('', -1);
+      constructor.isSynthetic = true;
+      constructor.enclosingElement = this;
+      _constructors = <ConstructorElement>[constructor];
     }
+
     assert(_constructors != null);
     return _constructors ?? const <ConstructorElement>[];
   }
@@ -646,17 +677,39 @@
 
   @override
   List<InterfaceType> get interfaces {
-    if (_interfaces == null) {
-      if (_unlinkedClass != null) {
-        ResynthesizerContext context = enclosingUnit.resynthesizerContext;
-        _interfaces = _unlinkedClass.interfaces
-            .map((EntityRef t) => context.resolveTypeRef(this, t))
-            .where(_isInterfaceTypeInterface)
-            .cast<InterfaceType>()
-            .toList(growable: false);
-      }
+    if (_interfaces != null) {
+      return _interfaces;
     }
-    return _interfaces ?? const <InterfaceType>[];
+
+    if (_unlinkedClass != null) {
+      var unlinkedInterfaces = _unlinkedClass.interfaces;
+      var length = unlinkedInterfaces.length;
+      if (length == 0) {
+        return _interfaces = const <InterfaceType>[];
+      }
+
+      ResynthesizerContext context = enclosingUnit.resynthesizerContext;
+      var interfaces = new List<InterfaceType>(length);
+      var index = 0;
+      var hasNonInterfaceType = false;
+      for (var i = 0; i < length; i++) {
+        var t = unlinkedInterfaces[i];
+        var type = context.resolveTypeRef(this, t);
+        if (_isInterfaceTypeInterface(type)) {
+          interfaces[index++] = type;
+        } else {
+          hasNonInterfaceType = true;
+        }
+      }
+
+      if (hasNonInterfaceType) {
+        interfaces = interfaces.sublist(0, index);
+      }
+
+      return _interfaces = interfaces;
+    }
+
+    return _interfaces = const <InterfaceType>[];
   }
 
   void set interfaces(List<InterfaceType> interfaces) {
@@ -721,13 +774,40 @@
 
   @override
   List<MethodElement> get methods {
-    if (_unlinkedClass != null) {
-      _methods ??= _unlinkedClass.executables
-          .where((e) => e.kind == UnlinkedExecutableKind.functionOrMethod)
-          .map((e) => new MethodElementImpl.forSerialized(e, this))
-          .toList(growable: false);
+    if (_methods != null) {
+      return _methods;
     }
-    return _methods ?? const <MethodElement>[];
+
+    if (_unlinkedClass != null) {
+      var unlinkedExecutables = _unlinkedClass.executables;
+
+      var length = unlinkedExecutables.length;
+      if (length == 0) {
+        return _methods = const <MethodElement>[];
+      }
+
+      var count = 0;
+      for (var i = 0; i < length; i++) {
+        var e = unlinkedExecutables[i];
+        if (e.kind == UnlinkedExecutableKind.functionOrMethod) {
+          count++;
+        }
+      }
+      if (count == 0) {
+        return _methods = const <MethodElement>[];
+      }
+
+      var methods = new List<MethodElement>(count);
+      var index = 0;
+      for (var i = 0; i < length; i++) {
+        var e = unlinkedExecutables[i];
+        if (e.kind == UnlinkedExecutableKind.functionOrMethod) {
+          methods[index++] = new MethodElementImpl.forSerialized(e, this);
+        }
+      }
+      return _methods = methods;
+    }
+    return _methods = const <MethodElement>[];
   }
 
   /// Set the methods contained in this class to the given [methods].
@@ -747,17 +827,39 @@
 
   @override
   List<InterfaceType> get mixins {
-    if (_mixins == null) {
-      if (_unlinkedClass != null) {
-        ResynthesizerContext context = enclosingUnit.resynthesizerContext;
-        _mixins = _unlinkedClass.mixins
-            .map((EntityRef t) => context.resolveTypeRef(this, t))
-            .where(_isInterfaceTypeInterface)
-            .cast<InterfaceType>()
-            .toList(growable: false);
-      }
+    if (_mixins != null) {
+      return _mixins;
     }
-    return _mixins ?? const <InterfaceType>[];
+
+    if (_unlinkedClass != null) {
+      var unlinkedMixins = _unlinkedClass.mixins;
+      var length = unlinkedMixins.length;
+      if (length == 0) {
+        return _mixins = const <InterfaceType>[];
+      }
+
+      ResynthesizerContext context = enclosingUnit.resynthesizerContext;
+      var mixins = new List<InterfaceType>(length);
+      var index = 0;
+      var hasNonInterfaceType = false;
+      for (var i = 0; i < length; i++) {
+        var t = unlinkedMixins[i];
+        var type = context.resolveTypeRef(this, t);
+        if (_isInterfaceTypeInterface(type)) {
+          mixins[index++] = type;
+        } else {
+          hasNonInterfaceType = true;
+        }
+      }
+
+      if (hasNonInterfaceType) {
+        mixins = mixins.sublist(0, index);
+      }
+
+      return _mixins = mixins;
+    }
+
+    return _mixins = const <InterfaceType>[];
   }
 
   void set mixins(List<InterfaceType> mixins) {
@@ -1067,60 +1169,105 @@
   void _resynthesizeFieldsAndPropertyAccessors() {
     assert(_fields == null);
     assert(_accessors == null);
-    var explicitFields = <FieldElement>[];
-    var implicitAccessors = <PropertyAccessorElement>[];
-    var explicitAccessors = <PropertyAccessorElement>[];
-    var implicitFields = <String, FieldElementImpl>{};
+
+    var unlinkedFields = _unlinkedClass.fields;
+    var unlinkedExecutables = _unlinkedClass.executables;
 
     // Build explicit fields and implicit property accessors.
-    for (UnlinkedVariable v in _unlinkedClass.fields) {
-      FieldElementImpl field =
-          new FieldElementImpl.forSerializedFactory(v, this);
-      explicitFields.add(field);
-      implicitAccessors.add(
-          new PropertyAccessorElementImpl_ImplicitGetter(field)
-            ..enclosingElement = this);
-      if (!field.isConst && !field.isFinal) {
+    List<FieldElement> explicitFields;
+    List<PropertyAccessorElement> implicitAccessors;
+    var unlinkedFieldsLength = unlinkedFields.length;
+    if (unlinkedFieldsLength != 0) {
+      explicitFields = new List<FieldElement>(unlinkedFieldsLength);
+      implicitAccessors = <PropertyAccessorElement>[];
+      for (var i = 0; i < unlinkedFieldsLength; i++) {
+        var v = unlinkedFields[i];
+        FieldElementImpl field =
+            new FieldElementImpl.forSerializedFactory(v, this);
+        explicitFields[i] = field;
         implicitAccessors.add(
-            new PropertyAccessorElementImpl_ImplicitSetter(field)
+            new PropertyAccessorElementImpl_ImplicitGetter(field)
               ..enclosingElement = this);
+        if (!field.isConst && !field.isFinal) {
+          implicitAccessors.add(
+              new PropertyAccessorElementImpl_ImplicitSetter(field)
+                ..enclosingElement = this);
+        }
       }
+    } else {
+      explicitFields = const <FieldElement>[];
+      implicitAccessors = const <PropertyAccessorElement>[];
     }
-    // Build explicit property accessors and implicit fields.
-    for (UnlinkedExecutable e in _unlinkedClass.executables) {
+
+    var unlinkedExecutablesLength = unlinkedExecutables.length;
+    var getterSetterCount = 0;
+    for (var i = 0; i < unlinkedExecutablesLength; i++) {
+      var e = unlinkedExecutables[i];
       if (e.kind == UnlinkedExecutableKind.getter ||
           e.kind == UnlinkedExecutableKind.setter) {
-        PropertyAccessorElementImpl accessor =
-            new PropertyAccessorElementImpl.forSerialized(e, this);
-        explicitAccessors.add(accessor);
-        // Create or update the implicit field.
-        String fieldName = accessor.displayName;
-        FieldElementImpl field = implicitFields[fieldName];
-        if (field == null) {
-          field = new FieldElementImpl(fieldName, -1);
-          implicitFields[fieldName] = field;
-          field.enclosingElement = this;
-          field.isSynthetic = true;
-          field.isFinal = e.kind == UnlinkedExecutableKind.getter;
-          field.isStatic = e.isStatic;
-        } else {
-          field.isFinal = false;
-        }
-        accessor.variable = field;
-        if (e.kind == UnlinkedExecutableKind.getter) {
-          field.getter = accessor;
-        } else {
-          field.setter = accessor;
-        }
+        getterSetterCount++;
       }
     }
+
+    // Build explicit property accessors and implicit fields.
+    List<PropertyAccessorElement> explicitAccessors;
+    Map<String, FieldElementImpl> implicitFields;
+    if (getterSetterCount != 0) {
+      explicitAccessors = new List<PropertyAccessorElement>(getterSetterCount);
+      implicitFields = <String, FieldElementImpl>{};
+      var index = 0;
+      for (var i = 0; i < unlinkedExecutablesLength; i++) {
+        var e = unlinkedExecutables[i];
+        if (e.kind == UnlinkedExecutableKind.getter ||
+            e.kind == UnlinkedExecutableKind.setter) {
+          PropertyAccessorElementImpl accessor =
+              new PropertyAccessorElementImpl.forSerialized(e, this);
+          explicitAccessors[index++] = accessor;
+          // Create or update the implicit field.
+          String fieldName = accessor.displayName;
+          FieldElementImpl field = implicitFields[fieldName];
+          if (field == null) {
+            field = new FieldElementImpl(fieldName, -1);
+            implicitFields[fieldName] = field;
+            field.enclosingElement = this;
+            field.isSynthetic = true;
+            field.isFinal = e.kind == UnlinkedExecutableKind.getter;
+            field.isStatic = e.isStatic;
+          } else {
+            field.isFinal = false;
+          }
+          accessor.variable = field;
+          if (e.kind == UnlinkedExecutableKind.getter) {
+            field.getter = accessor;
+          } else {
+            field.setter = accessor;
+          }
+        }
+      }
+    } else {
+      explicitAccessors = const <PropertyAccessorElement>[];
+      implicitFields = const <String, FieldElementImpl>{};
+    }
+
     // Combine explicit and implicit fields and property accessors.
-    _fields = <FieldElement>[]
-      ..addAll(explicitFields)
-      ..addAll(implicitFields.values);
-    _accessors = <PropertyAccessorElement>[]
-      ..addAll(explicitAccessors)
-      ..addAll(implicitAccessors);
+    if (implicitFields.isEmpty) {
+      _fields = explicitFields;
+    } else if (explicitFields.isEmpty) {
+      _fields = implicitFields.values.toList(growable: false);
+    } else {
+      _fields = <FieldElement>[]
+        ..addAll(explicitFields)
+        ..addAll(implicitFields.values);
+    }
+    if (explicitAccessors.isEmpty) {
+      _accessors = implicitAccessors;
+    } else if (implicitAccessors.isEmpty) {
+      _accessors = explicitAccessors;
+    } else {
+      _accessors = <PropertyAccessorElement>[]
+        ..addAll(explicitAccessors)
+        ..addAll(implicitAccessors);
+    }
   }
 
   bool _safeIsOrInheritsProxy(
@@ -1524,6 +1671,7 @@
     }
   }
 
+  @deprecated
   @override
   CompilationUnit computeNode() => unit;
 
@@ -2049,6 +2197,7 @@
     super.appendTo(buffer);
   }
 
+  @deprecated
   @override
   ConstructorDeclaration computeNode() =>
       getNodeMatching((node) => node is ConstructorDeclaration);
@@ -2141,8 +2290,7 @@
 /// This interface is only used for constant variables that have initializers.
 ///
 /// This class is not intended to be part of the public API for analyzer.
-abstract class ConstVariableElement
-    implements ElementImpl, ConstantEvaluationTarget {
+mixin ConstVariableElement implements ElementImpl, ConstantEvaluationTarget {
   /// If this element represents a constant variable, and it has an initializer,
   /// a copy of the initializer for the constant.  Otherwise `null`.
   ///
@@ -2189,11 +2337,12 @@
   DartObject computeConstantValue() {
     if (evaluationResult == null) {
       computeConstants(
-        context.typeProvider,
-        context.typeSystem,
-        context.declaredVariables,
-        [this],
-      );
+          context.typeProvider,
+          context.typeSystem,
+          context.declaredVariables,
+          [this],
+          ExperimentStatus.fromStrings(
+              context.analysisOptions.enabledExperiments));
     }
     return evaluationResult?.value;
   }
@@ -2233,6 +2382,7 @@
       UnlinkedParam unlinkedParam, ElementImpl enclosingElement)
       : super.forSerialized(unlinkedParam, enclosingElement);
 
+  @deprecated
   @override
   DefaultFormalParameter computeNode() =>
       getNodeMatching((node) => node is DefaultFormalParameter);
@@ -2268,10 +2418,6 @@
   /// throws, for dead code purposes.
   static String _ALWAYS_THROWS_VARIABLE_NAME = "alwaysThrows";
 
-  /// The name of the top-level variable used to mark a method parameter as
-  /// covariant.
-  static String _COVARIANT_VARIABLE_NAME = "checked";
-
   /// The name of the class used to mark an element as being deprecated.
   static String _DEPRECATED_CLASS_NAME = "Deprecated";
 
@@ -2287,6 +2433,10 @@
   /// as being immutable.
   static String _IMMUTABLE_VARIABLE_NAME = "immutable";
 
+  /// The name of the top-level variable used to mark a constructor as being
+  /// literal.
+  static String _LITERAL_VARIABLE_NAME = "literal";
+
   /// The name of the top-level variable used to mark a function as running
   /// a single test.
   static String _IS_TEST_VARIABLE_NAME = "isTest";
@@ -2363,6 +2513,10 @@
   ElementAnnotationImpl(this.compilationUnit);
 
   @override
+  List<AnalysisError> get constantEvaluationErrors =>
+      evaluationResult?.errors ?? const <AnalysisError>[];
+
+  @override
   DartObject get constantValue => evaluationResult?.value;
 
   @override
@@ -2377,13 +2531,6 @@
   @override
   bool get isConstantEvaluated => evaluationResult != null;
 
-  /// Return `true` if this annotation marks the associated parameter as being
-  /// covariant, meaning it is allowed to have a narrower type in an override.
-  bool get isCovariant =>
-      element is PropertyAccessorElement &&
-      element.name == _COVARIANT_VARIABLE_NAME &&
-      element.library?.name == _META_LIB_NAME;
-
   @override
   bool get isDeprecated {
     if (element?.library?.isDartCore == true) {
@@ -2409,6 +2556,12 @@
       element.library?.name == _META_LIB_NAME;
 
   @override
+  bool get isLiteral =>
+      element is PropertyAccessorElement &&
+      element.name == _LITERAL_VARIABLE_NAME &&
+      element.library?.name == _META_LIB_NAME;
+
+  @override
   bool get isIsTest =>
       element is PropertyAccessorElement &&
       element.name == _IS_TEST_VARIABLE_NAME &&
@@ -2487,11 +2640,12 @@
   DartObject computeConstantValue() {
     if (evaluationResult == null) {
       computeConstants(
-        context.typeProvider,
-        context.typeSystem,
-        context.declaredVariables,
-        [this],
-      );
+          context.typeProvider,
+          context.typeSystem,
+          context.declaredVariables,
+          [this],
+          ExperimentStatus.fromStrings(
+              context.analysisOptions.enabledExperiments));
     }
     return constantValue;
   }
@@ -2852,6 +3006,11 @@
   }
 
   @override
+  AnalysisSession get session {
+    return _enclosingElement?.session;
+  }
+
+  @override
   Source get source {
     if (_enclosingElement == null) {
       return null;
@@ -2866,6 +3025,7 @@
     return _enclosingElement?.typeParameterContext;
   }
 
+  @deprecated
   @override
   CompilationUnit get unit => context.resolveCompilationUnit(source, library);
 
@@ -2912,6 +3072,7 @@
   @override
   String computeDocumentationComment() => documentationComment;
 
+  @deprecated
   @override
   AstNode computeNode() => getNodeMatching((node) => node is AstNode);
 
@@ -2949,6 +3110,7 @@
   }
 
   /// Return the resolved [AstNode] of the given type enclosing [getNameOffset].
+  @deprecated
   AstNode getNodeMatching(Predicate<AstNode> predicate) {
     CompilationUnit unit = this.unit;
     if (unit == null) {
@@ -2959,7 +3121,7 @@
     if (node == null) {
       return null;
     }
-    return node.getAncestor(predicate);
+    return node.thisOrAncestorMatching(predicate);
   }
 
   /// Return `true` if this element has the given [modifier] associated with it.
@@ -3399,6 +3561,7 @@
   /// Create the only method enums have - `toString()`.
   void createToStringMethodElement() {
     var method = new MethodElementImpl('toString', -1);
+    method.isSynthetic = true;
     if (_unlinkedEnum != null) {
       method.returnType = context.typeProvider.stringType;
       method.type = new FunctionTypeImpl(method);
@@ -3768,7 +3931,7 @@
   /// order in which they were specified.
   List<NamespaceCombinator> _combinators;
 
-  /// The URI that was selected based on the [context] declared variables.
+  /// The URI that was selected based on the declared variables.
   String _selectedUri;
 
   /// Initialize a newly created export element at the given [offset].
@@ -3975,6 +4138,7 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitFieldElement(this);
 
+  @deprecated
   @override
   AstNode computeNode() {
     if (isEnumConstant) {
@@ -4147,6 +4311,7 @@
     super.appendTo(buffer);
   }
 
+  @deprecated
   @override
   FunctionDeclaration computeNode() =>
       getNodeMatching((node) => node is FunctionDeclaration);
@@ -4619,6 +4784,7 @@
     }
   }
 
+  @deprecated
   @override
   GenericTypeAlias computeNode() =>
       getNodeMatching((node) => node is GenericTypeAlias);
@@ -4746,7 +4912,7 @@
   ///` if there was no prefix specified.
   PrefixElement _prefix;
 
-  /// The URI that was selected based on the [context] declared variables.
+  /// The URI that was selected based on the declared variables.
   String _selectedUri;
 
   /// The cached value of [namespace].
@@ -5030,6 +5196,9 @@
   /// The analysis context in which this library is defined.
   final AnalysisContext context;
 
+  @override
+  final AnalysisSession session;
+
   final LibraryResynthesizerContext resynthesizerContext;
 
   final UnlinkedUnit unlinkedDefiningUnit;
@@ -5084,22 +5253,29 @@
 
   /// Initialize a newly created library element in the given [context] to have
   /// the given [name] and [offset].
-  LibraryElementImpl(this.context, String name, int offset, this.nameLength)
+  LibraryElementImpl(
+      this.context, this.session, String name, int offset, this.nameLength)
       : resynthesizerContext = null,
         unlinkedDefiningUnit = null,
         super(name, offset);
 
   /// Initialize a newly created library element in the given [context] to have
   /// the given [name].
-  LibraryElementImpl.forNode(this.context, LibraryIdentifier name)
+  LibraryElementImpl.forNode(this.context, this.session, LibraryIdentifier name)
       : nameLength = name != null ? name.length : 0,
         resynthesizerContext = null,
         unlinkedDefiningUnit = null,
         super.forNode(name);
 
   /// Initialize using the given serialized information.
-  LibraryElementImpl.forSerialized(this.context, String name, int offset,
-      this.nameLength, this.resynthesizerContext, this.unlinkedDefiningUnit)
+  LibraryElementImpl.forSerialized(
+      this.context,
+      this.session,
+      String name,
+      int offset,
+      this.nameLength,
+      this.resynthesizerContext,
+      this.unlinkedDefiningUnit)
       : super.forSerialized(null) {
     _name = name;
     _nameOffset = offset;
@@ -5491,6 +5667,19 @@
   }
 
   @override
+  Iterable<Element> get topLevelElements sync* {
+    for (var unit in units) {
+      yield* unit.accessors;
+      yield* unit.enums;
+      yield* unit.functionTypeAliases;
+      yield* unit.functions;
+      yield* unit.mixins;
+      yield* unit.topLevelVariables;
+      yield* unit.types;
+    }
+  }
+
+  @override
   List<CompilationUnitElement> get units {
     List<CompilationUnitElement> units = new List<CompilationUnitElement>();
     units.add(_definingCompilationUnit);
@@ -5793,6 +5982,7 @@
     buffer.write(displayName);
   }
 
+  @deprecated
   @override
   Declaration computeNode() => getNodeMatching(
       (node) => node is DeclaredIdentifier || node is VariableDeclaration);
@@ -5889,6 +6079,7 @@
     super.appendTo(buffer);
   }
 
+  @deprecated
   @override
   MethodDeclaration computeNode() =>
       getNodeMatching((node) => node is MethodDeclaration);
@@ -6166,6 +6357,9 @@
   @override
   final AnalysisContext context;
 
+  @override
+  final AnalysisSession session;
+
   /// The name of the conflicting elements.
   @override
   final String name;
@@ -6175,7 +6369,8 @@
 
   /// Initialize a newly created element in the given [context] to represent
   /// the given non-empty [conflictingElements].
-  MultiplyDefinedElementImpl(this.context, this.name, this.conflictingElements);
+  MultiplyDefinedElementImpl(
+      this.context, this.session, this.name, this.conflictingElements);
 
   @override
   String get displayName => name;
@@ -6300,6 +6495,7 @@
   @override
   String computeDocumentationComment() => null;
 
+  @deprecated
   @override
   AstNode computeNode() => null;
 
@@ -6752,11 +6948,6 @@
     if (isExplicitlyCovariant || inheritsCovariant) {
       return true;
     }
-    for (ElementAnnotationImpl annotation in metadata) {
-      if (annotation.isCovariant) {
-        return true;
-      }
-    }
     return false;
   }
 
@@ -6924,6 +7115,7 @@
     buffer.write(right);
   }
 
+  @deprecated
   @override
   FormalParameter computeNode() =>
       getNodeMatching((node) => node is FormalParameter);
@@ -7019,11 +7211,6 @@
     if (isExplicitlyCovariant || inheritsCovariant) {
       return true;
     }
-    for (ElementAnnotationImpl annotation in setter.variable.metadata) {
-      if (annotation.isCovariant) {
-        return true;
-      }
-    }
     return false;
   }
 
@@ -7047,7 +7234,7 @@
 
 /// A mixin that provides a common implementation for methods defined in
 /// [ParameterElement].
-abstract class ParameterElementMixin implements ParameterElement {
+mixin ParameterElementMixin implements ParameterElement {
   @override
   bool get isNamed => parameterKind == ParameterKind.NAMED;
 
@@ -7301,6 +7488,7 @@
     super.appendTo(buffer);
   }
 
+  @deprecated
   @override
   AstNode computeNode() {
     if (isSynthetic) {
@@ -7569,7 +7757,7 @@
 
 /// Mixin providing the implementation of
 /// [TypeParameterizedElement.isSimplyBounded] for elements that define a type.
-abstract class SimplyBoundableMixin implements TypeParameterizedElement {
+mixin SimplyBoundableMixin implements TypeParameterizedElement {
   CompilationUnitElementImpl get enclosingUnit;
 
   @override
@@ -7618,6 +7806,7 @@
   T accept<T>(ElementVisitor<T> visitor) =>
       visitor.visitTopLevelVariableElement(this);
 
+  @deprecated
   @override
   VariableDeclaration computeNode() =>
       getNodeMatching((node) => node is VariableDeclaration);
@@ -7754,7 +7943,7 @@
 }
 
 /// Mixin representing an element which can have type parameters.
-abstract class TypeParameterizedElementMixin
+mixin TypeParameterizedElementMixin
     implements
         TypeParameterizedElement,
         ElementImpl,
diff --git a/pkg/analyzer/lib/src/dart/element/handle.dart b/pkg/analyzer/lib/src/dart/element/handle.dart
index 728ff86..97f978f 100644
--- a/pkg/analyzer/lib/src/dart/element/handle.dart
+++ b/pkg/analyzer/lib/src/dart/element/handle.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -117,6 +118,7 @@
   @override
   ConstructorElement get unnamedConstructor => actualElement.unnamedConstructor;
 
+  @deprecated
   @override
   NamedCompilationUnitMember computeNode() => super.computeNode();
 
@@ -246,6 +248,7 @@
   @override
   int get uriOffset => actualElement.uriOffset;
 
+  @deprecated
   @override
   CompilationUnit computeNode() => actualElement.computeNode();
 
@@ -302,6 +305,7 @@
   ConstructorElement get redirectedConstructor =>
       actualElement.redirectedConstructor;
 
+  @deprecated
   @override
   ConstructorDeclaration computeNode() => actualElement.computeNode();
 }
@@ -458,8 +462,12 @@
   int get nameOffset => actualElement.nameOffset;
 
   @override
+  AnalysisSession get session => _resynthesizer.session;
+
+  @override
   Source get source => actualElement.source;
 
+  @deprecated
   @override
   CompilationUnit get unit => actualElement.unit;
 
@@ -473,6 +481,7 @@
   @override
   String computeDocumentationComment() => documentationComment;
 
+  @deprecated
   @override
   AstNode computeNode() => actualElement.computeNode();
 
@@ -509,10 +518,17 @@
   final AnalysisContext context;
 
   /**
+   * The session that owns the element to be resynthesized.
+   * 
+   * Note that this will be `null` if the task model is being used.
+   */
+  final AnalysisSession session;
+
+  /**
    * Initialize a newly created resynthesizer to resynthesize elements in the
    * given [context].
    */
-  ElementResynthesizer(this.context);
+  ElementResynthesizer(this.context, this.session);
 
   /**
    * Return the element referenced by the given [location].
@@ -646,6 +662,7 @@
   @override
   ElementKind get kind => ElementKind.FIELD;
 
+  @deprecated
   @override
   VariableDeclaration computeNode() => actualElement.computeNode();
 }
@@ -676,6 +693,7 @@
   @override
   SourceRange get visibleRange => actualElement.visibleRange;
 
+  @deprecated
   @override
   FunctionDeclaration computeNode() => actualElement.computeNode();
 }
@@ -723,6 +741,7 @@
   @override
   List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
 
+  @deprecated
   @override
   FunctionTypeAlias computeNode() => actualElement.computeNode();
 
@@ -769,6 +788,7 @@
   @override
   List<TypeParameterElement> get typeParameters => actualElement.typeParameters;
 
+  @deprecated
   @override
   FunctionTypeAlias computeNode() => actualElement.computeNode();
 
@@ -923,6 +943,9 @@
   Namespace get publicNamespace => actualElement.publicNamespace;
 
   @override
+  Iterable<Element> get topLevelElements => actualElement.topLevelElements;
+
+  @override
   List<CompilationUnitElement> get units => actualElement.units;
 
   @override
@@ -957,6 +980,7 @@
   @override
   SourceRange get visibleRange => actualElement.visibleRange;
 
+  @deprecated
   @override
   VariableDeclaration computeNode() => actualElement.computeNode();
 }
@@ -987,6 +1011,7 @@
   @override
   ElementKind get kind => ElementKind.METHOD;
 
+  @deprecated
   @override
   MethodDeclaration computeNode() => actualElement.computeNode();
 
@@ -1039,6 +1064,7 @@
   @override
   SourceRange get visibleRange => actualElement.visibleRange;
 
+  @deprecated
   @override
   FormalParameter computeNode() => super.computeNode();
 }
@@ -1164,6 +1190,7 @@
   @override
   ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE;
 
+  @deprecated
   @override
   VariableDeclaration computeNode() => super.computeNode();
 }
diff --git a/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart b/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
index 8d18330..799dbc8 100644
--- a/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
+++ b/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
@@ -30,6 +30,8 @@
 
 /// Manages knowledge about interface types and their members.
 class InheritanceManager2 {
+  static final _noSuchMethodName = Name(null, 'noSuchMethod');
+
   final TypeSystem _typeSystem;
 
   /// Cached instance interfaces for [InterfaceType].
@@ -39,12 +41,6 @@
   /// self-referencing cycles.
   final Set<ClassElement> _processingClasses = new Set<ClassElement>();
 
-  /// Cached implemented members for [InterfaceType].
-  final Map<InterfaceType, Map<Name, FunctionType>> _implemented = {};
-
-  /// Cached member implemented in the mixin.
-  final Map<InterfaceType, Map<Name, FunctionType>> _mixinMembers = {};
-
   InheritanceManager2(this._typeSystem);
 
   /// Return the member with the given [name] that the [type] inherits from the
@@ -71,65 +67,111 @@
       return Interface._empty;
     }
 
-    Map<Name, FunctionType> map = {};
     Map<Name, List<FunctionType>> namedCandidates = {};
     List<Map<Name, FunctionType>> superImplemented = [];
+    Map<Name, FunctionType> declared;
+    Interface superInterface;
+    Map<Name, FunctionType> implemented;
+    Map<Name, FunctionType> implementedForMixing;
     try {
       // If a class declaration has a member declaration, the signature of that
       // member declaration becomes the signature in the interface.
-      _addTypeMembers(map, type);
+      declared = _getTypeMembers(type);
 
       for (var interface in type.interfaces) {
-        _addCandidates(namedCandidates, interface);
+        var interfaceObj = getInterface(interface);
+        _addCandidates(namedCandidates, interfaceObj);
       }
 
-      if (type.element.isMixin) {
+      if (classElement.isMixin) {
         for (var constraint in type.superclassConstraints) {
-          _addCandidates(namedCandidates, constraint);
+          var interfaceObj = getInterface(constraint);
+          _addCandidates(namedCandidates, interfaceObj);
         }
 
+        implemented = {};
+
         // `mixin M on S1, S2 {}` can call using `super` any instance member
         // from its superclass constraints, whether it is abstract or concrete.
         Map<Name, FunctionType> mixinSuperClass = {};
         _findMostSpecificFromNamedCandidates(mixinSuperClass, namedCandidates);
         superImplemented.add(mixinSuperClass);
       } else {
-        Map<Name, FunctionType> implemented;
-
         if (type.superclass != null) {
-          _addCandidates(namedCandidates, type.superclass);
+          superInterface = getInterface(type.superclass);
+          _addCandidates(namedCandidates, superInterface);
 
-          implemented = _getImplemented(type.superclass);
+          implemented = superInterface.implemented;
           superImplemented.add(implemented);
+        } else {
+          implemented = {};
         }
 
+        implementedForMixing = {};
         for (var mixin in type.mixins) {
-          _addCandidates(namedCandidates, mixin);
+          var interfaceObj = getInterface(mixin);
+          _addCandidates(namedCandidates, interfaceObj);
 
-          var implementedInMixin = _getImplemented(mixin);
           implemented = <Name, FunctionType>{}
             ..addAll(implemented)
-            ..addAll(implementedInMixin);
+            ..addAll(interfaceObj.implementedForMixing);
           superImplemented.add(implemented);
+          implementedForMixing.addAll(interfaceObj.implementedForMixing);
         }
       }
     } finally {
       _processingClasses.remove(classElement);
     }
 
+    var thisImplemented = <Name, FunctionType>{};
+    _addImplemented(thisImplemented, type);
+
+    if (classElement.isMixin) {
+      implementedForMixing = thisImplemented;
+    } else {
+      implementedForMixing.addAll(thisImplemented);
+    }
+
+    implemented = <Name, FunctionType>{}..addAll(implemented);
+    _addImplemented(implemented, type);
+
     // If a class declaration does not have a member declaration with a
     // particular name, but some super-interfaces do have a member with that
     // name, it's a compile-time error if there is no signature among the
     // super-interfaces that is a valid override of all the other
     // super-interface signatures with the same name. That "most specific"
     // signature becomes the signature of the class's interface.
+    Map<Name, FunctionType> map = new Map.of(declared);
     List<Conflict> conflicts = _findMostSpecificFromNamedCandidates(
       map,
       namedCandidates,
     );
 
+    var noSuchMethodForwarders = Set<Name>();
+    if (classElement.isAbstract) {
+      if (superInterface != null) {
+        noSuchMethodForwarders = superInterface.noSuchMethodForwarders;
+      }
+    } else {
+      var noSuchMethod = implemented[_noSuchMethodName]?.element;
+      if (noSuchMethod != null && !_isDeclaredInObject(noSuchMethod)) {
+        var superForwarders = superInterface?.noSuchMethodForwarders;
+        for (var name in map.keys) {
+          if (!implemented.containsKey(name) ||
+              superForwarders != null && superForwarders.contains(name)) {
+            implemented[name] = map[name];
+            noSuchMethodForwarders.add(name);
+          }
+        }
+      }
+    }
+
     var interface = new Interface._(
       map,
+      declared,
+      implemented,
+      noSuchMethodForwarders,
+      implementedForMixing,
       namedCandidates,
       superImplemented,
       conflicts ?? const [],
@@ -156,17 +198,18 @@
     int forMixinIndex: -1,
     bool forSuper: false,
   }) {
+    var interface = getInterface(type);
     if (forSuper) {
-      var superImplemented = getInterface(type)._superImplemented;
+      var superImplemented = interface._superImplemented;
       if (forMixinIndex >= 0) {
         return superImplemented[forMixinIndex][name];
       }
       return superImplemented.last[name];
     }
     if (concrete) {
-      return _getImplemented(type)[name];
+      return interface.implemented[name];
     }
-    return getInterface(type).map[name];
+    return interface.map[name];
   }
 
   /// Return all members of mixins, superclasses, and interfaces that a member
@@ -189,26 +232,31 @@
   }
 
   void _addCandidates(
-      Map<Name, List<FunctionType>> namedCandidates, InterfaceType type) {
-    var map = getInterface(type).map;
+      Map<Name, List<FunctionType>> namedCandidates, Interface interface) {
+    var map = interface.map;
     for (var name in map.keys) {
       var candidate = map[name];
       _addCandidate(namedCandidates, name, candidate);
     }
   }
 
-  void _addTypeMembers(Map<Name, FunctionType> map, InterfaceType type) {
+  void _addImplemented(
+      Map<Name, FunctionType> implemented, InterfaceType type) {
     var libraryUri = type.element.librarySource.uri;
 
-    void addTypeMember(ExecutableElement member) {
-      if (!member.isStatic) {
+    void addMember(ExecutableElement member) {
+      if (!member.isAbstract && !member.isStatic) {
         var name = new Name(libraryUri, member.name);
-        map[name] = member.type;
+        implemented[name] = member.type;
       }
     }
 
-    type.methods.forEach(addTypeMember);
-    type.accessors.forEach(addTypeMember);
+    void addMembers(InterfaceType type) {
+      type.methods.forEach(addMember);
+      type.accessors.forEach(addMember);
+    }
+
+    addMembers(type);
   }
 
   /// Check that all [candidates] for the given [name] have the same kind, all
@@ -313,87 +361,46 @@
     return conflicts;
   }
 
-  Map<Name, FunctionType> _getImplemented(InterfaceType type) {
-    var implemented = _implemented[type];
-    if (implemented != null) {
-      return implemented;
-    }
-
-    _implemented[type] = const {};
-    implemented = <Name, FunctionType>{};
-
+  Map<Name, FunctionType> _getTypeMembers(InterfaceType type) {
+    var declared = <Name, FunctionType>{};
     var libraryUri = type.element.librarySource.uri;
 
-    void addMember(ExecutableElement member) {
-      if (!member.isAbstract && !member.isStatic) {
-        var name = new Name(libraryUri, member.name);
-        implemented[name] = member.type;
+    var methods = type.methods;
+    for (var i = 0; i < methods.length; i++) {
+      var method = methods[i];
+      if (!method.isStatic) {
+        var name = new Name(libraryUri, method.name);
+        declared[name] = method.type;
       }
     }
 
-    void addMembers(InterfaceType type) {
-      type.methods.forEach(addMember);
-      type.accessors.forEach(addMember);
+    var accessors = type.accessors;
+    for (var i = 0; i < accessors.length; i++) {
+      var accessor = accessors[i];
+      if (!accessor.isStatic) {
+        var name = new Name(libraryUri, accessor.name);
+        declared[name] = accessor.type;
+      }
     }
 
-    if (type.superclass != null) {
-      var superImplemented = _getImplemented(type.superclass);
-      implemented.addAll(superImplemented);
-    }
-
-    // Mixins override the nominal superclass and previous mixins.
-    for (var mixin in type.mixins) {
-      var superImplemented = _getImplementedInMixin(mixin);
-      implemented.addAll(superImplemented);
-    }
-
-    // This type overrides everything from its actual superclass.
-    addMembers(type);
-
-    _implemented[type] = implemented;
-    return implemented;
+    return declared;
   }
 
-  /// TODO(scheglov) This repeats a lot of code from [_getImplemented].
-  Map<Name, FunctionType> _getImplementedInMixin(InterfaceType type) {
-    var implemented = _mixinMembers[type];
-    if (implemented != null) {
-      return implemented;
-    }
-
-    _mixinMembers[type] = const {};
-    implemented = <Name, FunctionType>{};
-
-    var libraryUri = type.element.librarySource.uri;
-
-    void addMember(ExecutableElement member) {
-      if (!member.isAbstract && !member.isStatic) {
-        var name = new Name(libraryUri, member.name);
-        implemented[name] = member.type;
-      }
-    }
-
-    void addMembers(InterfaceType type) {
-      type.methods.forEach(addMember);
-      type.accessors.forEach(addMember);
-    }
-
-    for (var mixin in type.mixins) {
-      var superImplemented = _getImplementedInMixin(mixin);
-      implemented.addAll(superImplemented);
-    }
-
-    // This type overrides everything from its actual superclass.
-    addMembers(type);
-
-    _mixinMembers[type] = implemented;
-    return implemented;
+  static bool _isDeclaredInObject(ExecutableElement element) {
+    var enclosing = element.enclosingElement;
+    return enclosing is ClassElement &&
+        enclosing.supertype == null &&
+        !enclosing.isMixin;
   }
 }
 
 /// The instance interface of an [InterfaceType].
 class Interface {
-  static const _empty = const Interface._(
+  static final _empty = Interface._(
+    const {},
+    const {},
+    const {},
+    Set<Name>(),
     const {},
     const {},
     const [{}],
@@ -403,6 +410,19 @@
   /// The map of names to their signature in the interface.
   final Map<Name, FunctionType> map;
 
+  /// The map of declared names to their signatures.
+  final Map<Name, FunctionType> declared;
+
+  /// The map of names to their concrete implementations.
+  final Map<Name, FunctionType> implemented;
+
+  /// The set of names that are `noSuchMethod` forwarders in [implemented].
+  final Set<Name> noSuchMethodForwarders;
+
+  /// The map of names to their concrete implementations that can be mixed
+  /// when this type is used as a mixin.
+  final Map<Name, FunctionType> implementedForMixing;
+
   /// The map of names to their signatures from the mixins, superclasses,
   /// or interfaces.
   final Map<Name, List<FunctionType>> _overridden;
@@ -418,8 +438,12 @@
   /// members of the class.
   final List<Conflict> conflicts;
 
-  const Interface._(
+  Interface._(
     this.map,
+    this.declared,
+    this.implemented,
+    this.noSuchMethodForwarders,
+    this.implementedForMixing,
     this._overridden,
     this._superImplemented,
     this.conflicts,
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index c5f7657..bc18d7b7 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -63,6 +64,7 @@
   T accept<T>(ElementVisitor<T> visitor) =>
       visitor.visitConstructorElement(this);
 
+  @deprecated
   @override
   ConstructorDeclaration computeNode() => baseElement.computeNode();
 
@@ -268,6 +270,7 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitFieldElement(this);
 
+  @deprecated
   @override
   VariableDeclaration computeNode() => baseElement.computeNode();
 
@@ -326,6 +329,7 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitFunctionElement(this);
 
+  @deprecated
   @override
   FunctionDeclaration computeNode() => baseElement.computeNode();
 
@@ -496,14 +500,19 @@
   int get nameOffset => _baseElement.nameOffset;
 
   @override
+  AnalysisSession get session => _baseElement.session;
+
+  @override
   Source get source => _baseElement.source;
 
+  @deprecated
   @override
   CompilationUnit get unit => _baseElement.unit;
 
   @override
   String computeDocumentationComment() => documentationComment;
 
+  @deprecated
   @override
   AstNode computeNode() => _baseElement.computeNode();
 
@@ -586,6 +595,7 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitMethodElement(this);
 
+  @deprecated
   @override
   MethodDeclaration computeNode() => baseElement.computeNode();
 
@@ -729,6 +739,7 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitParameterElement(this);
 
+  @deprecated
   @override
   FormalParameter computeNode() => baseElement.computeNode();
 
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index b566cbb..40d664e 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -795,7 +795,7 @@
 
   @override
   bool isSubtypeOf(DartType type) {
-    var typeSystem = new StrongTypeSystemImpl(null);
+    var typeSystem = new Dart2TypeSystem(null);
     return FunctionTypeImpl.relate(
         typeSystem.instantiateToBounds(this),
         typeSystem.instantiateToBounds(type),
@@ -2053,6 +2053,16 @@
   @override
   DartType replaceTopAndBottom(TypeProvider typeProvider,
       {bool isCovariant: true}) {
+    // First check if this is actually an instance of Bottom
+    if (this.isDartCoreNull) {
+      if (isCovariant) {
+        return this;
+      } else {
+        return typeProvider.objectType;
+      }
+    }
+
+    // Otherwise, recurse over type arguments.
     var typeArguments = _transformOrShare(
         this.typeArguments,
         (t) => (t as TypeImpl)
diff --git a/pkg/analyzer/lib/src/dart/element/wrapped.dart b/pkg/analyzer/lib/src/dart/element/wrapped.dart
index aaad9cd..3dfc8d6 100644
--- a/pkg/analyzer/lib/src/dart/element/wrapped.dart
+++ b/pkg/analyzer/lib/src/dart/element/wrapped.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart' hide Directive;
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
@@ -151,6 +152,9 @@
   int get nameOffset => wrappedUnit.nameOffset;
 
   @override
+  AnalysisSession get session => wrappedUnit.session;
+
+  @override
   Source get source => wrappedUnit.source;
 
   @override
@@ -160,6 +164,7 @@
   @override
   List<ClassElement> get types => wrappedUnit.types;
 
+  @deprecated
   @override
   CompilationUnit get unit => wrappedUnit.unit;
 
@@ -179,6 +184,7 @@
   String computeDocumentationComment() => wrappedUnit
       .computeDocumentationComment(); // ignore: deprecated_member_use
 
+  @deprecated
   @override
   CompilationUnit computeNode() => wrappedUnit.computeNode();
 
@@ -342,8 +348,12 @@
   int get prefixOffset => wrappedImport.prefixOffset;
 
   @override
+  AnalysisSession get session => wrappedImport.session;
+
+  @override
   Source get source => wrappedImport.source;
 
+  @deprecated
   @override
   CompilationUnit get unit => wrappedImport.unit;
 
@@ -363,6 +373,7 @@
   String computeDocumentationComment() => wrappedImport
       .computeDocumentationComment(); // ignore: deprecated_member_use
 
+  @deprecated
   @override
   AstNode computeNode() => wrappedImport.computeNode();
 
@@ -560,9 +571,16 @@
   Namespace get publicNamespace => wrappedLib.publicNamespace;
 
   @override
+  AnalysisSession get session => wrappedLib.session;
+
+  @override
   Source get source => wrappedLib.source;
 
   @override
+  Iterable<Element> get topLevelElements => wrappedLib.topLevelElements;
+
+  @deprecated
+  @override
   CompilationUnit get unit => wrappedLib.unit;
 
   @override
@@ -575,6 +593,7 @@
   String computeDocumentationComment() =>
       wrappedLib.computeDocumentationComment(); // ignore: deprecated_member_use
 
+  @deprecated
   @override
   AstNode computeNode() => wrappedLib.computeNode();
 
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index 12f0423..07700ec 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -11,19 +11,6 @@
  */
 class HintCode extends ErrorCode {
   /**
-   * This hint is generated anywhere where the
-   * [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE] would have been generated,
-   * if we used propagated information for the warnings.
-   *
-   * Parameters:
-   * 0: the name of the actual argument type
-   * 1: the name of the expected type
-   */
-  static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE = const HintCode(
-      'ARGUMENT_TYPE_NOT_ASSIGNABLE',
-      "The argument type '{0}' can't be assigned to the parameter type '{1}'.");
-
-  /**
    * When the target expression uses '?.' operator, it can be `null`, so all the
    * subsequent invocations should also use '?.' operator.
    */
@@ -163,15 +150,6 @@
           correction: "Try using a package: URI instead.");
 
   /**
-   * Generic type comments (`/*<T>*/` and `/*=T*/`) are no longer necessary and
-   * will soon be ignored.
-   */
-  static const HintCode GENERIC_METHOD_COMMENT = const HintCode(
-      'GENERIC_METHOD_COMMENT',
-      "The generic type comment is being deprecated in favor of the real syntax.",
-      correction: "Try replacing the comment with the actual type annotation.");
-
-  /**
    * Deferred libraries shouldn't define a top level function 'loadLibrary'.
    */
   static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION =
@@ -191,6 +169,8 @@
    * 0: the name of the right hand side type
    * 1: the name of the left hand side type
    */
+  // TODO(brianwilkerson) This hint code should be removed, as should the code
+  //  that appears to generate it.
   static const HintCode INVALID_ASSIGNMENT = const HintCode(
       'INVALID_ASSIGNMENT',
       "A value of type '{0}' can't be assigned to a variable of type '{1}'.",
@@ -234,40 +214,12 @@
       "Only classes can be annotated as being immutable.");
 
   /**
-   * Generic Method DEP: number of type parameters must match.
-   * <https://github.com/leafpetersen/dep-generic-methods/blob/master/proposal.md#function-subtyping>
-   *
-   * Parameters:
-   * 0: the number of type parameters in the method
-   * 1: the number of type parameters in the overridden method
-   * 2: the name of the class where the overridden method is declared
+   * This hint is generated anywhere a @literal annotation is associated with
+   * anything other than a const constructor.
    */
-  static const HintCode INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS =
-      const HintCode(
-          'INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS',
-          "The method has {0} type parameters, but it is overriding a method "
-          "with {1} type parameters from '{2}'.",
-          correction:
-              "Try changing the number of type parameters so that they are the same.");
-
-  /**
-   * Generic Method DEP: bounds of type parameters must be compatible.
-   * <https://github.com/leafpetersen/dep-generic-methods/blob/master/proposal.md#function-subtyping>
-   *
-   * Parameters:
-   * 0: the type parameter name
-   * 1: the type parameter bound
-   * 2: the overridden type parameter name
-   * 3: the overridden type parameter bound
-   * 4: the name of the class where the overridden method is declared
-   */
-  static const HintCode INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND =
-      const HintCode(
-          'INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND',
-          "The type parameter '{0}' extends '{1}', but that is stricter than "
-          "'{2}' extends '{3}' in the overridden method from '{4}'.",
-          correction:
-              "Try changing the bounds on the type parameters so that they are compatible.");
+  static const HintCode INVALID_LITERAL_ANNOTATION = const HintCode(
+      'INVALID_LITERAL_ANNOTATION',
+      "Only const constructors can be annotated as being literal.");
 
   /**
    * This hint is generated anywhere where `@required` annotates a non named
@@ -284,15 +236,15 @@
 
   /**
    * This hint is generated anywhere where `@sealed` annotates something other
-   * than a class or mixin.
+   * than a class.
    *
    * Parameters:
    * 0: the name of the member
    */
   static const HintCode INVALID_SEALED_ANNOTATION = const HintCode(
       'INVALID_SEALED_ANNOTATION',
-      "The member '{0}' is annotated with @sealed but only classes and mixins "
-      "can be annotated with it.",
+      "The member '{0}' is annotated with '@sealed' but only classes can be "
+      "annotated with it.",
       correction: "Remove @sealed.");
 
   /**
@@ -413,13 +365,26 @@
           "or changing the return type to 'void'.");
 
   /**
+   * This hint is generated anywhere where a `@sealed` class is used as a
+   * a superclass constraint of a mixin.
+   */
+  static const HintCode MIXIN_ON_SEALED_CLASS = const HintCode(
+      'MIXIN_ON_SEALED_CLASS',
+      "The class '{0}' should not be used as a mixin constraint because it is "
+      "sealed, and any class mixing in this mixin has '{0}' as a superclass.",
+      correction:
+          "Try composing with this class, or refer to its documentation for "
+          "more information.");
+
+  /**
    * Generate a hint for classes that inherit from classes annotated with
    * `@immutable` but that are not immutable.
    */
   static const HintCode MUST_BE_IMMUTABLE = const HintCode(
       'MUST_BE_IMMUTABLE',
-      "This class inherits from a class marked as @immutable, "
-      "and therefore should be immutable (all instance fields must be final).");
+      "This class (or a class which this class inherits from) is marked as "
+      "'@immutable', but one or more of its instance fields are not final: "
+      "{0}");
 
   /**
    * Generate a hint for methods that override methods annotated `@mustCallSuper`
@@ -468,6 +433,8 @@
    * Parameters:
    * 0: the name of the current class
    */
+  // TODO(brianwilkerson) Decide whether we want to implement this check
+  //  (possibly as a lint) or remove the hint code.
   static const HintCode OVERRIDE_EQUALS_BUT_NOT_HASH_CODE = const HintCode(
       'OVERRIDE_EQUALS_BUT_NOT_HASH_CODE',
       "The class '{0}' overrides 'operator==', but not 'get hashCode'.",
@@ -532,6 +499,18 @@
           "Try either importing 'dart:async' or updating the SDK constraints.");
 
   /**
+   * This hint is generated anywhere where a `@sealed` class or mixin is used as
+   * a super-type of a class.
+   */
+  static const HintCode SUBTYPE_OF_SEALED_CLASS = const HintCode(
+      'SUBTYPE_OF_SEALED_CLASS',
+      "The class '{0}' should not be extended, mixed in, or implemented "
+      "because it is sealed.",
+      correction:
+          "Try composing instead of inheriting, or refer to its documentation "
+          "for more information.");
+
+  /**
    * Type checks of the type `x is! Null` should be done with `x != null`.
    */
   static const HintCode TYPE_CHECK_IS_NOT_NULL = const HintCode(
@@ -547,21 +526,6 @@
       correction: "Try replacing the 'is Null' check with '== null'.");
 
   /**
-   * This hint is generated anywhere where the
-   * [StaticTypeWarningCode.UNDEFINED_GETTER] or
-   * [StaticWarningCode.UNDEFINED_GETTER] would have been generated, if we used
-   * propagated information for the warnings.
-   *
-   * Parameters:
-   * 0: the name of the getter
-   * 1: the name of the enclosing type where the getter is being looked for
-   */
-  static const HintCode UNDEFINED_GETTER = const HintCode(
-      'UNDEFINED_GETTER', "The getter '{0}' isn't defined for the class '{1}'.",
-      correction:
-          "Try defining a getter or field named '{0}', or invoke a different getter.");
-
-  /**
    * An undefined name hidden in an import or export directive.
    */
   static const HintCode UNDEFINED_HIDDEN_NAME = const HintCode(
@@ -570,50 +534,6 @@
       correction: "Try removing the name from the list of hidden members.");
 
   /**
-   * This hint is generated anywhere where the
-   * [StaticTypeWarningCode.UNDEFINED_METHOD] would have been generated, if we
-   * used propagated information for the warnings.
-   *
-   * Parameters:
-   * 0: the name of the method that is undefined
-   * 1: the resolved type name that the method lookup is happening on
-   */
-  static const HintCode UNDEFINED_METHOD = const HintCode(
-      'UNDEFINED_METHOD', "The method '{0}' isn't defined for the class '{1}'.",
-      correction:
-          "Try correcting the name to the name of an existing method, or "
-          "defining a method named '{0}'.");
-
-  /**
-   * This hint is generated anywhere where the
-   * [StaticTypeWarningCode.UNDEFINED_OPERATOR] would have been generated, if we
-   * used propagated information for the warnings.
-   *
-   * Parameters:
-   * 0: the name of the operator
-   * 1: the name of the enclosing type where the operator is being looked for
-   */
-  static const HintCode UNDEFINED_OPERATOR = const HintCode(
-      'UNDEFINED_OPERATOR',
-      "The operator '{0}' isn't defined for the class '{1}'.",
-      correction: "Try defining the operator '{0}'.");
-
-  /**
-   * This hint is generated anywhere where the
-   * [StaticTypeWarningCode.UNDEFINED_SETTER] or
-   * [StaticWarningCode.UNDEFINED_SETTER] would have been generated, if we used
-   * propagated information for the warnings.
-   *
-   * Parameters:
-   * 0: the name of the setter
-   * 1: the name of the enclosing type where the setter is being looked for
-   */
-  static const HintCode UNDEFINED_SETTER = const HintCode(
-      'UNDEFINED_SETTER', "The setter '{0}' isn't defined for the class '{1}'.",
-      correction:
-          "Try defining a setter or field named '{0}', or invoke a different setter.");
-
-  /**
    * An undefined name shown in an import or export directive.
    */
   static const HintCode UNDEFINED_SHOWN_NAME = const HintCode(
@@ -719,21 +639,6 @@
       correction: "Try removing the name from the list of shown members.");
 
   /**
-   * It will be a static type warning if <i>m</i> is not a generic method with
-   * exactly <i>n</i> type parameters.
-   *
-   * Parameters:
-   * 0: the name of the method being referenced (<i>G</i>)
-   * 1: the number of type parameters that were declared
-   * 2: the number of type arguments provided
-   */
-  static const HintCode WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD = const HintCode(
-      'WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD',
-      "The method '{0}' is declared with {1} type parameters, "
-      "but {2} type arguments were given.",
-      correction: "Try adjusting the number of type arguments.");
-
-  /**
    * Initialize a newly created error code to have the given [name]. The message
    * associated with the error will be created from the given [message]
    * template. The correction associated with the error will be created from the
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index e358166..2d00fd9 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -256,6 +256,9 @@
   static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
       _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR;
 
+  static const ParserErrorCode FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
+      _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS;
+
   static const ParserErrorCode FINAL_AND_COVARIANT = _FINAL_AND_COVARIANT;
 
   static const ParserErrorCode FINAL_AND_VAR = _FINAL_AND_VAR;
@@ -356,11 +359,17 @@
   /**
    * Parameters:
    * 0: the operator being applied to 'super'
+   *
+   * Only generated by the old parser.
+   * Replaced by INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER.
    */
   static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER =
       const ParserErrorCode('INVALID_OPERATOR_FOR_SUPER',
           "The operator '{0}' can't be used with 'super'.");
 
+  static const ParserErrorCode INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
+      _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER;
+
   static const ParserErrorCode INVALID_STAR_AFTER_ASYNC = const ParserErrorCode(
       'INVALID_STAR_AFTER_ASYNC',
       "The modifier 'async*' isn't allowed for an expression function body.",
@@ -387,11 +396,8 @@
   static const ParserErrorCode MISSING_ASSIGNMENT_IN_INITIALIZER =
       _MISSING_ASSIGNMENT_IN_INITIALIZER;
 
-  static const ParserErrorCode MISSING_CATCH_OR_FINALLY = const ParserErrorCode(
-      'MISSING_CATCH_OR_FINALLY',
-      "A try statement must have either a catch or finally clause.",
-      correction: "Try adding either a catch or finally clause, or "
-          "remove the try statement.");
+  static const ParserErrorCode MISSING_CATCH_OR_FINALLY =
+      _MISSING_CATCH_OR_FINALLY;
 
   /// TODO(danrubel): Consider splitting this into two separate error messages.
   static const ParserErrorCode MISSING_CLASS_BODY = const ParserErrorCode(
@@ -639,10 +645,7 @@
       "Setters can't be defined within methods or functions.",
       correction: "Try moving the setter outside the method or function.");
 
-  static const ParserErrorCode STACK_OVERFLOW = const ParserErrorCode(
-      'STACK_OVERFLOW',
-      "The file has too many nested expressions or statements.",
-      correction: "Try simplifying the code.");
+  static const ParserErrorCode STACK_OVERFLOW = _STACK_OVERFLOW;
 
   static const ParserErrorCode STATIC_AFTER_CONST = _STATIC_AFTER_CONST;
 
@@ -716,10 +719,7 @@
           "Expected '{0}' to close parameter group.",
           correction: "Try replacing '{0}' with '{1}'.");
 
-  static const ParserErrorCode VAR_AND_TYPE = const ParserErrorCode(
-      'VAR_AND_TYPE',
-      "Variables can't be declared using both 'var' and a type name.",
-      correction: "Try removing the keyword 'var'.");
+  static const ParserErrorCode VAR_AND_TYPE = _VAR_AND_TYPE;
 
   static const ParserErrorCode VAR_AS_TYPE_NAME = _VAR_AS_TYPE_NAME;
 
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index 0c76904..c983796 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -95,6 +95,11 @@
   _EXTERNAL_FACTORY_REDIRECTION,
   _EXTERNAL_FACTORY_WITH_BODY,
   _EXTERNAL_CONSTRUCTOR_WITH_BODY,
+  _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS,
+  _VAR_AND_TYPE,
+  _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER,
+  _STACK_OVERFLOW,
+  _MISSING_CATCH_OR_FINALLY,
 ];
 
 const ParserErrorCode _ABSTRACT_CLASS_MEMBER = const ParserErrorCode(
@@ -301,6 +306,12 @@
     r"Top-level declarations can't be declared to be 'factory'.",
     correction: "Try removing the keyword 'factory'.");
 
+const ParserErrorCode _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
+    const ParserErrorCode('FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS',
+        r"A field can only be initialized in it's declaring class",
+        correction:
+            "Try passing a value into the superclass constructor, or moving the initialization into the constructor body.");
+
 const ParserErrorCode _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
     const ParserErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
         r"Field formal parameters can only be used in a constructor.",
@@ -359,6 +370,11 @@
     'INVALID_OPERATOR',
     r"The string '#lexeme' isn't a user-definable operator.");
 
+const ParserErrorCode _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
+    const ParserErrorCode('INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER',
+        r"The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
+        correction: "Try replacing '?.' with '.'");
+
 const ParserErrorCode _INVALID_UNICODE_ESCAPE = const ParserErrorCode(
     'INVALID_UNICODE_ESCAPE',
     r"An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.");
@@ -379,6 +395,12 @@
         r"Expected an assignment after the field name.",
         correction: "To initialize a field, use the syntax 'name = value'.");
 
+const ParserErrorCode _MISSING_CATCH_OR_FINALLY = const ParserErrorCode(
+    'MISSING_CATCH_OR_FINALLY',
+    r"A try block must be followed by an 'on', 'catch', or 'finally' clause.",
+    correction:
+        "Try adding either a catch or finally clause, or remove the try statement.");
+
 const ParserErrorCode _MISSING_CONST_FINAL_VAR_OR_TYPE = const ParserErrorCode(
     'MISSING_CONST_FINAL_VAR_OR_TYPE',
     r"Variables must be declared using the keywords 'const', 'final', 'var' or a type name.",
@@ -455,6 +477,10 @@
         correction:
             "Try making this a factory constructor, or remove the redirection.");
 
+const ParserErrorCode _STACK_OVERFLOW = const ParserErrorCode('STACK_OVERFLOW',
+    r"The file has too many nested expressions or statements.",
+    correction: "Try simplifying the code.");
+
 const ParserErrorCode _STATIC_AFTER_CONST = const ParserErrorCode(
     'STATIC_AFTER_CONST',
     r"The modifier 'static' should be before the modifier 'const'.",
@@ -503,6 +529,10 @@
     r"Can't use type arguments with type variable '#name'.",
     correction: "Try removing the type arguments.");
 
+const ParserErrorCode _VAR_AND_TYPE = const ParserErrorCode('VAR_AND_TYPE',
+    r"Variables can't be declared using both 'var' and a type name.",
+    correction: "Try removing 'var.'");
+
 const ParserErrorCode _VAR_AS_TYPE_NAME = const ParserErrorCode(
     'VAR_AS_TYPE_NAME', r"The keyword 'var' can't be used as a type name.");
 
diff --git a/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart b/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
new file mode 100644
index 0000000..0b1cd1d
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
@@ -0,0 +1,793 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:meta/meta.dart';
+
+/// Object that tracks "assigned" status for local variables in a function body.
+///
+/// The client should create a new instance of tracker for a function body.
+///
+/// Each declared local variable must be added using [add].  If the variable
+/// is assigned at the declaration, it is not actually tracked.
+///
+/// For each read of a local variable [read] should be invoked, and for each
+/// write - [write].  If there is a  "read" of a variable before it is
+/// definitely written, the variable is added to output [readBeforeWritten].
+///
+/// For each AST node that affects definite assignment the client must invoke
+/// corresponding `beginX` and `endX` methods.  They will combine assignment
+/// facts registered in parts of AST. These invocations are expected to be
+/// performed as a part of the resolution pass over the AST.
+///
+/// In the examples below, Dart code is listed on the left, and the set of
+/// calls that need to be made to [DefiniteAssignmentTracker] are listed on
+/// the right.
+///
+///
+/// --------------------------------------------------
+/// Assignments.
+///
+/// When the LHS is a local variable, and the assignment is pure, i.e. uses
+/// operators `=` and `??=`, only the RHS is executed, and then the
+/// variable on the LHS is marked as definitely assigned.
+///
+/// ```dart
+/// int V1;      // add(V1)
+/// int V2;      // add(V2)
+/// V1 = 0;      // write(V1)
+/// V2 = V2;     // read(V2) => readBeforeWritten; write(V2)
+/// V1;          // read(V1) => OK
+/// V2;          // read(V2) => readBeforeWritten (already)
+/// ```
+///
+/// In compound assignments to a local variable, or assignments where the LHS
+/// is not a simple identifier, the LHS is executed first, and then the RHS.
+///
+/// ```dart
+/// int V1;                 // add(V1)
+/// List<int> V2;           // add(V2)
+/// V1 += 1;                // read(V1) => readBeforeWritten; write(V1)
+/// V2[0] = (V2 = [0])[0];  // read(V2) => readBeforeWritten; write(V2)
+/// V1;                     // read(V1) => readBeforeWritten (already)
+/// V2;                     // read(V2) => readBeforeWritten (already)
+/// ```
+///
+///
+/// --------------------------------------------------
+/// Logical expression.
+///
+/// In logical expressions `a && b` or `a || b` only `a` is always executed,
+/// in the enclosing branch.  The expression `b` might not be executed, so its
+/// results are on the exit from the logical expression.
+///
+/// ```dart
+/// int V1;      // add(V1)
+/// int V2;      // add(V2)
+/// (
+///   V1 = 1     // write(V1)
+/// ) > 0
+/// &&           // beginBinaryExpressionLogicalRight()
+/// (
+///   V2 = V1    // read(V1) => OK; write(V2)
+/// ) > 0
+/// ;            // endBinaryExpressionLogicalRight()
+/// V1;          // read(V1) => OK
+/// V2;          // read(V2) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// assert(C, M)
+///
+/// The `assert` statement is not guaranteed to execute, so assignments in the
+/// condition and the message are discarded.  But assignments in the condition
+/// are visible in the message.
+///
+/// ```dart
+/// bool V;    // add(V)
+/// assert(    // beginAssertStatement()
+///   V        // read(V) => readBeforeWritten
+/// );         // endAssertExpression()
+/// V          // read(V) => readBeforeWritten
+/// ```
+///
+/// ```dart
+/// bool V;      // add(V)
+/// assert(      // beginAssertExpression()
+///   V = true,  // write(V)
+///   "$V",      // read(V) => OK
+/// );           // endAssertExpression()
+/// V            // read(V) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// if (E) {} else {}
+///
+/// The variable must be assigned in the `then` branch, and the `else` branch.
+///
+/// The condition `E` contributes into the current branch.
+///
+/// ```dart
+/// int V1;     // add(V1)
+/// int V2;     // add(V2)
+/// int V3;     // add(V3)
+/// if (E)
+/// {           // beginIfStatementThen()
+///   V1 = 0;   // write(V1)
+///   V2 = 0;   // write(V2)
+///   V1;       // read(V1) => OK
+///   V2;       // read(V2) => OK
+/// } else {    // beginIfStatementElse()
+///   V1 = 0;   // write(V1)
+///   V3 = 0;   // write(V3)
+///   V1;       // read(V1) => OK
+///   V3;       // read(V3) => OK
+/// }           // endIfStatement(hasElse: true)
+/// V1;         // read(V1) => OK
+/// V2;         // read(V2) => readBeforeWritten
+/// V3;         // read(V3) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// while (E) {}
+///
+/// If `E` is not the `true` literal, which is covered below, then the body of
+/// the loop might be not executed at all.  So, the fork is discarded.
+///
+/// The condition `E` contributes into the current branch.
+///
+/// ```dart
+/// int V;      // add(V)
+/// while (     // beginWhileStatement(labels: [])
+///   E
+/// ) {         // beginWhileStatementBody(isTrue: false)
+///   V = 0;    // write(V)
+///   V;        // read(V) => OK
+/// }           // endWhileStatement()
+/// V;          // read(V) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// while (true) { ...break... }
+///
+/// Statements `break` and `continue` in loops make the rest of the enclosing
+/// (or labelled) loop ineligible for marking variables definitely assigned
+/// outside of the loop. However it is still OK to mark variables assigned and
+/// use their values in the rest of the loop.
+///
+/// ```dart
+/// int V;
+/// while (             // beginWhileStatement(labels: [])
+///   true
+/// ) {                 // beginWhileStatementBody(isTrue: true)
+///   if (condition) {  // beginIfStatement(hasElse: false)
+///     break;          // handleBreak(while);
+///   }                 // endIfStatement()
+///   V = 0;            // write(V)
+///   V;                // read(V) => OK
+/// }                   // endWhileStatement()
+/// V;                  // read(V) => readBeforeWritten
+/// ```
+///
+/// Nested loops:
+///
+/// ```dart
+/// int V1, V2;
+/// L1: while (         // beginWhileStatement(node)
+///   true
+/// ) {                 // beginWhileStatementBody(isTrue: true)
+///   while (           // beginWhileStatement(labels: [])
+///     true
+///   ) {               // beginWhileStatementBody()
+///     if (C1) {       // beginIfStatement(hasElse: true)
+///       V1 = 0;       // write(V1)
+///     } else {        // beginIfStatementElse()
+///       if (C2) {     // beginIfStatement(hasElse: false)
+///         break L1;   // handleBreak(L1: while)
+///       }             // endIfStatement()
+///       V1 = 0;       // write(V1)
+///     }               // endIfStatement()
+///     V1;             // read(V1) => OK
+///   }                 // endWhileStatement()
+///   V1;               // read(V1) => OK
+///   while (           // beginWhileStatement(node)
+///     true
+///   ) {               // beginWhileStatementBody(isTrue: true)
+///     V2 = 0;         // write(V2)
+///     break;          // handleBreak(while)
+///   }                 // endWhileStatement()
+///   V1;               // read(V1) => OK
+///   V2;               // read(V2) => OK
+/// }                   // endWhileStatement()
+/// V1;                 // read(V1) => readBeforeWritten
+/// V2;                 // read(V2) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// do {} while (E)
+///
+/// The body and the condition always execute, all assignments contribute to
+/// the current branch.  The body is tracked in its own branch, so that if
+/// it has an interruption (`break` or `continue`), we can discard the branch
+/// after or before the condition.
+///
+/// ```dart
+/// int V1;                  // add(V1)
+/// int V2;                  // add(V2)
+/// do {                     // beginDoWhileStatement(node)
+///   V1 = 0;                // write(V1)
+///   V1;                    // read(V1) => OK
+/// } while                  // beginDoWhileStatementCondition()
+///   ((V2 = 0) >= 0)        // write(V2)
+/// ;                        // endDoWhileStatement()
+/// V1;                      // read(V1) => OK
+/// V2;                      // read(V2) => OK
+/// ```
+///
+///
+/// --------------------------------------------------
+/// do { ...break... } while (E)
+///
+/// The `break` statement prevents execution of the rest of the body, and
+/// the condition.  So, the branch ends after the condition.
+///
+/// ```dart
+/// int V1;                  // add(V1)
+/// int V2;                  // add(V2)
+/// int V3;                  // add(V3)
+/// do {                     // beginDoWhileStatement(node)
+///   V1 = 0;                // write(V1)
+///   V1;                    // read(V1) => OK
+///   if (C1) break;         // handleBreak(do)
+///   V2 = 0;                // write(V2)
+///   V2;                    // read(V2) => OK
+/// } while                  // beginDoWhileStatementCondition()
+///   ((V3 = 0) >= 0)        // write(V3)
+/// ;                        // endDoWhileStatement()
+/// V1;                      // read(V1) => OK
+/// V2;                      // read(V2) => readBeforeWritten
+/// V3;                      // read(V3) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// do { ...continue... } while (E)
+///
+/// The `continue` statement prevents execution of the rest of the body, but
+/// the condition is always executed.  So, the branch ends before the condition,
+/// and the condition contributes to the enclosing branch.
+///
+/// ```dart
+/// int V1;                  // add(V1)
+/// int V2;                  // add(V2)
+/// int V3;                  // add(V3)
+/// do {                     // beginDoWhileStatement(node)
+///   V1 = 0;                // write(V1)
+///   V1;                    // read(V1) => OK
+///   if (C1) continue;      // handleContinue(do)
+///   V2 = 0;                // write(V2)
+///   V2;                    // read(V2) => OK
+/// } while                  // beginDoWhileStatementCondition()
+///   ((V3 = 0) >= 0)        // write(V3)
+/// ;                        // endDoWhileStatement()
+/// V1;                      // read(V1) => OK
+/// V2;                      // read(V2) => readBeforeWritten
+/// V3;                      // read(V3) => OK
+/// ```
+///
+///
+/// --------------------------------------------------
+/// Try / catch.
+///
+/// The variable must be assigned in the `try` branch and every `catch` branch.
+///
+/// Note, that an improvement is possible, when some first statements in the
+/// `try` branch can be shown to not throw (e.g. `V = 0;`). We could consider
+/// these statements as definitely executed, so producing definite assignments.
+///
+/// ```dart
+/// int V;        // add(V)
+/// try {         // beginTryStatement()
+///   V = f();    // write(V)
+/// }             // endTryStatementBody()
+/// catch (_) {   // beginTryStatementCatchClause()
+///   V = 0;      // write(V)
+/// }             // endTryStatementCatchClause(); endTryStatementCatchClauses()
+/// V;            // read(V) => OK
+/// ```
+///
+///
+/// --------------------------------------------------
+/// Try / finally.
+///
+/// The `finally` clause is always executed, so it is tracked in the branch
+/// that contains the `try` statement.
+///
+/// Without `catch` clauses the `try` clause is always executed to the end,
+/// so also can be tracked in the branch that contains the `try` statement.
+///
+/// ```dart
+/// int V1;     // add(V1)
+/// int V2;     // add(V2)
+/// try {       // beginTryStatement()
+///   V1 = 0;   // write(V1)
+/// }           // endTryStatementBody(); endTryStatementCatchClauses();
+/// finally {
+///   V2 = 0;   // write(V2)
+/// }
+/// V1;         // read(V1) => OK
+/// V2;         // read(V2) => OK
+/// ```
+///
+///
+/// --------------------------------------------------
+/// Try / catch / finally.
+///
+/// The `finally` clause is always executed, so it is tracked in the branch
+/// that contains the `try` statement.
+///
+/// The `try` and `catch` branches are tracked as without `finally`.
+///
+///
+/// --------------------------------------------------
+/// switch (E) { case E1: ... default: }
+///
+/// The variable must be assigned in every `case` branch and must have the
+/// `default` branch.  If the `default` branch is missing, then the `switch`
+/// does not definitely cover all possible values of `E`, so the variable is
+/// not definitely assigned.
+///
+/// The expression `E` contributes into the current branch.
+///
+/// ```dart
+/// int V;      // add(V)
+/// switch      // beginSwitchStatement()
+/// (E) {       // endSwitchStatementExpression()
+///   case 1:   // beginSwitchStatementMember()
+///     V = 0;  // write(V)
+///     break;  // handleBreak(switch)
+///   default:  // beginSwitchStatementMember()
+///     V = 0;  // write(V); handleBreak(switch)
+/// }           // endSwitchStatement(hasDefault: true)
+/// V;          // read(V) => OK
+/// ```
+///
+/// The presence of a `continue L` statement in switch / case is analyzed in an
+/// approximate way; if a given variable is not written to in all case bodies,
+/// it is considered "not definitely assigned", even though a full basic block
+/// analysis would show that it is definitely assigned.
+///
+/// ```dart
+/// int V;           // add(V)
+/// switch           // beginSwitchStatement()
+/// (E) {            // endSwitchStatementExpression()
+///   L: case 1:     // beginSwitchStatementMember()
+///     V = 0;       // write(V)
+///     break;       // handleBreak(switch)
+///   case 2:        // beginSwitchStatementMember()
+///     continue L;  // handleContinue(switch)
+///   default:       // beginSwitchStatementMember()
+///     V = 0;       // write(V); handleBreak(switch)
+/// }                // endSwitchStatement(hasDefault: true)
+/// V;               // read(V) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// For each.
+///
+/// The iterable might be empty, so the body might be not executed, so writes
+/// in the body are discarded.  But writes in the iterable expressions are
+/// always executed.
+///
+/// ```dart
+/// int V1;     // add(V1)
+/// int V2;     // add(V2)
+/// for (var _ in (V1 = [0, 1, 2]))  // beginForEachStatement(node)
+/// {                                // beginForEachStatementBody()
+///   V2 = 0;                        // write(V1)
+/// }                                // endForEachStatement();
+/// V1;         // read(V1) => OK
+/// V2;         // read(V2) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// For statement.
+///
+/// Very similar to `while` statement.  The initializer and condition parts
+/// are always executed, so contribute to definite assignments.  The body and
+/// updaters might be not executed, so writes in them are discarded.  The
+/// updaters are executed after the body, so writes in the body are visible in
+/// the updaters, correspondingly AST portions should be visited, and
+/// [beginForEachStatementBody] should be before [beginForStatementUpdaters],
+/// and followed with [endForStatement].
+///
+/// ```dart
+/// int V1;     // 1. add(V1)
+/// int V2;     // 2. add(V2)
+/// int V3;     // 3. add(V3)
+/// int V4;     // 4. add(V4)
+/// for (                //  5. beginForStatement(node)
+///   var _ = (V1 = 0);  //  6. write(V1)
+///   (V2 = 0) >= 0;     //  7. write(V2)
+///   V3 = 0             // 10. beginForStatementUpdaters(); write(V3)
+/// ) {                  //  8. beginForStatementBody()
+///   V4 = 0;            //  9. write(V4)
+/// }                    // 11. endForStatement()
+/// V1;         // 12. read(V1) => OK
+/// V2;         // 13. read(V2) => OK
+/// V3;         // 14. read(V3) => readBeforeWritten
+/// V4;         // 15. read(V4) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// Function expressions - local functions and closures.
+///
+/// A function expression, e.g. a closure passed as an argument of an
+/// invocation, might be invoked synchronously, asynchronously, or never.
+/// So, all local variables that are read in the function expression must be
+/// definitely assigned, but any writes should be discarded on exit from the
+/// function expression.
+///
+/// ```dart
+/// int V1;     // add(V1)
+/// int V2;     // add(V2)
+/// int V3;     // add(V2)
+/// V1 = 0;     // write(V1)
+/// void f() {  // beginFunctionExpression()
+///   V1;       // read(V1) => OK
+///   V2;       // read(V2) => readBeforeWritten
+///   V3 = 0;   // write(V1)
+/// }           // endFunctionExpression();
+/// V2 = 0;     // write(V2)
+/// f();
+/// V1;         // read(V1) => OK
+/// V2;         // read(V2) => OK
+/// V3;         // read(V3) => readBeforeWritten
+/// ```
+///
+///
+/// --------------------------------------------------
+/// Definite exit.
+///
+/// If a definite exit is reached, e.g. a `return` or a `throw` statement,
+/// then all the variables are vacuously definitely assigned.
+///
+/// ```dart
+/// int V;      // add(V)
+/// if (E) {
+/// {           // beginIfStatementThen()
+///   V = 0;    // write(V)
+/// } else {    // beginIfStatementElse()
+///   return;   // handleExit()
+/// }           // endIfStatement(hasElse: true)
+/// V;          // read(V) => OK
+/// ```
+class DefiniteAssignmentTracker {
+  /// The output list of variables that were read before they were written.
+  final List<LocalVariableElement> readBeforeWritten = [];
+
+  /// The stack of sets of variables that are not definitely assigned.
+  final List<_ElementSet> _stack = [];
+
+  /// The mapping from labeled [Statement]s to the index in the [_stack]
+  /// where the first related element is located.  The number of elements
+  /// is statement specific.
+  final Map<Statement, int> _statementToStackIndex = {};
+
+  /// The current set of variables that are not definitely assigned.
+  _ElementSet _current = _ElementSet.empty;
+
+  @visibleForTesting
+  bool get isRootBranch {
+    return _stack.isEmpty;
+  }
+
+  /// Add a new [variable], which might be already [assigned].
+  void add(LocalVariableElement variable, {bool assigned: false}) {
+    if (!assigned) {
+      _current = _current.add(variable);
+    }
+  }
+
+  void beginAssertStatement() {
+    _stack.add(_current);
+  }
+
+  void beginBinaryExpressionLogicalRight() {
+    _stack.add(_current);
+  }
+
+  void beginConditionalExpressionElse() {
+    var afterCondition = _stack.last;
+    _stack.last = _current; // after then
+    _current = afterCondition;
+  }
+
+  void beginConditionalExpressionThen() {
+    _stack.add(_current); // after condition
+  }
+
+  void beginDoWhileStatement(DoStatement statement) {
+    _statementToStackIndex[statement] = _stack.length;
+    _stack.add(_ElementSet.empty); // break set
+    _stack.add(_ElementSet.empty); // continue set
+  }
+
+  void beginDoWhileStatementCondition() {
+    var continueSet = _stack.removeLast();
+    // If there was a `continue`, use it.
+    // If there was not any, use the current.
+    _current = _current.union(continueSet);
+  }
+
+  void beginForEachStatement(ForEachStatement statement) {
+    // Not strongly necessary, because we discard everything anyway.
+    // Just for consistency, so that `break` is handled without `null`.
+    _statementToStackIndex[statement] = _stack.length;
+  }
+
+  void beginForEachStatementBody() {
+    _stack.add(_current);
+  }
+
+  void beginForStatement(ForStatement statement) {
+    // Not strongly necessary, because we discard everything anyway.
+    // Just for consistency, so that `break` is handled without `null`.
+    _statementToStackIndex[statement] = _stack.length;
+  }
+
+  void beginForStatementBody() {
+    _stack.add(_current); // break set
+    _stack.add(_ElementSet.empty); // continue set
+  }
+
+  void beginForStatementUpdaters() {
+    var continueSet = _stack.last;
+    _current = _current.union(continueSet);
+  }
+
+  void beginFunctionExpression() {
+    _stack.add(_current);
+  }
+
+  void beginIfStatementElse() {
+    var enclosing = _stack.last;
+    _stack.last = _current;
+    _current = enclosing;
+  }
+
+  void beginIfStatementThen() {
+    _stack.add(_current);
+  }
+
+  void beginSwitchStatement(SwitchStatement statement) {
+    _statementToStackIndex[statement] = _stack.length;
+    _stack.add(_ElementSet.empty); // break set
+    _stack.add(_ElementSet.empty); // continue set (placeholder)
+  }
+
+  void beginSwitchStatementMember() {
+    _current = _stack.last; // before cases
+  }
+
+  void beginTryStatement() {
+    _stack.add(_current); // before body, for catches
+  }
+
+  void beginTryStatementCatchClause() {
+    _current = _stack[_stack.length - 2]; // before body
+  }
+
+  void beginWhileStatement(WhileStatement statement) {
+    _statementToStackIndex[statement] = _stack.length;
+  }
+
+  void beginWhileStatementBody(bool isTrue) {
+    _stack.add(isTrue ? _ElementSet.empty : _current); // break set
+    _stack.add(_ElementSet.empty); // continue set
+  }
+
+  void endAssertStatement() {
+    _current = _stack.removeLast();
+  }
+
+  void endBinaryExpressionLogicalRight() {
+    _current = _stack.removeLast();
+  }
+
+  void endConditionalExpression() {
+    var thenSet = _stack.removeLast();
+    var elseSet = _current;
+    _current = thenSet.union(elseSet);
+  }
+
+  void endDoWhileStatement() {
+    var breakSet = _stack.removeLast();
+    // If there was a `break`, use it.
+    // If there was not any, use the current.
+    _current = _current.union(breakSet);
+  }
+
+  void endForEachStatement() {
+    _current = _stack.removeLast();
+  }
+
+  void endForStatement() {
+    _stack.removeLast(); // continue set
+    _current = _stack.removeLast(); // break set, before body
+  }
+
+  void endFunctionExpression() {
+    _current = _stack.removeLast();
+  }
+
+  void endIfStatement(bool hasElse) {
+    if (hasElse) {
+      var thenSet = _stack.removeLast();
+      var elseSet = _current;
+      _current = thenSet.union(elseSet);
+    } else {
+      var afterCondition = _stack.removeLast();
+      _current = afterCondition;
+    }
+  }
+
+  void endSwitchStatement(bool hasDefault) {
+    var beforeCasesSet = _stack.removeLast();
+    _stack.removeLast(); // continue set
+    var breakSet = _stack.removeLast();
+    if (hasDefault) {
+      _current = breakSet;
+    } else {
+      _current = beforeCasesSet;
+    }
+  }
+
+  void endSwitchStatementExpression() {
+    _stack.add(_current); // before cases
+  }
+
+  void endTryStatementBody() {
+    _stack.add(_current); // union of body and catches
+  }
+
+  void endTryStatementCatchClause() {
+    _stack.last = _stack.last.union(_current); // union of body and catches
+  }
+
+  void endTryStatementCatchClauses() {
+    _current = _stack.removeLast(); // union of body and catches
+    _stack.removeLast(); // before body
+  }
+
+  void endWhileStatement() {
+    _stack.removeLast(); // continue set
+    _current = _stack.removeLast(); // break set
+  }
+
+  /// Handle a `break` statement with the given [target].
+  void handleBreak(AstNode target) {
+    var breakSetIndex = _statementToStackIndex[target];
+    if (breakSetIndex != null) {
+      _stack[breakSetIndex] = _stack[breakSetIndex].union(_current);
+    }
+    _current = _ElementSet.empty;
+  }
+
+  /// Handle a `continue` statement with the given [target].
+  void handleContinue(AstNode target) {
+    var breakSetIndex = _statementToStackIndex[target];
+    if (breakSetIndex != null) {
+      var continueSetIndex = breakSetIndex + 1;
+      _stack[continueSetIndex] = _stack[continueSetIndex].union(_current);
+    }
+    _current = _ElementSet.empty;
+  }
+
+  /// Register the fact that the current branch definitely exists, e.g. returns
+  /// from the body, throws an exception, etc.  So, all variables in the branch
+  /// are vacuously definitely assigned.
+  void handleExit() {
+    _current = _ElementSet.empty;
+  }
+
+  /// Register read of the given [variable] in the current branch.
+  void read(LocalVariableElement variable) {
+    if (_current.contains(variable)) {
+      // Add to the list of violating variables, if not there yet.
+      for (var i = 0; i < readBeforeWritten.length; ++i) {
+        var violatingVariable = readBeforeWritten[i];
+        if (identical(violatingVariable, variable)) {
+          return;
+        }
+      }
+      readBeforeWritten.add(variable);
+    }
+  }
+
+  /// Register write of the given [variable] in the current branch.
+  void write(LocalVariableElement variable) {
+    _current = _current.remove(variable);
+  }
+}
+
+/// List based immutable set of elements.
+class _ElementSet {
+  static final empty = _ElementSet._(
+    List<LocalVariableElement>(0),
+  );
+
+  final List<LocalVariableElement> elements;
+
+  _ElementSet._(this.elements);
+
+  _ElementSet add(LocalVariableElement addedElement) {
+    if (contains(addedElement)) {
+      return this;
+    }
+
+    var length = elements.length;
+    var newElements = List<LocalVariableElement>(length + 1);
+    for (var i = 0; i < length; ++i) {
+      newElements[i] = elements[i];
+    }
+    newElements[length] = addedElement;
+    return _ElementSet._(newElements);
+  }
+
+  bool contains(LocalVariableElement element) {
+    var length = elements.length;
+    for (var i = 0; i < length; ++i) {
+      if (identical(elements[i], element)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  _ElementSet remove(LocalVariableElement removedElement) {
+    if (!contains(removedElement)) {
+      return this;
+    }
+
+    var length = elements.length;
+    if (length == 1) {
+      return empty;
+    }
+
+    var newElements = List<LocalVariableElement>(length - 1);
+    var newIndex = 0;
+    for (var i = 0; i < length; ++i) {
+      var element = elements[i];
+      if (!identical(element, removedElement)) {
+        newElements[newIndex++] = element;
+      }
+    }
+
+    return _ElementSet._(newElements);
+  }
+
+  _ElementSet union(_ElementSet other) {
+    if (other == null || other.elements.isEmpty) {
+      return this;
+    }
+
+    var result = this;
+    var otherElements = other.elements;
+    for (var i = 0; i < otherElements.length; ++i) {
+      var otherElement = otherElements[i];
+      result = result.add(otherElement);
+    }
+    return result;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
new file mode 100644
index 0000000..10e01f6
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
@@ -0,0 +1,630 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
+import 'package:analyzer/src/dart/element/member.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+
+class MethodInvocationResolver {
+  static final _nameCall = new Name(null, 'call');
+
+  /// The resolver driving this participant.
+  final ResolverVisitor _resolver;
+
+  /// The type representing the type 'dynamic'.
+  final DynamicTypeImpl _dynamicType = DynamicTypeImpl.instance;
+
+  /// The type representing the type 'type'.
+  final InterfaceType _typeType;
+
+  /// The manager for the inheritance mappings.
+  final InheritanceManager2 _inheritance;
+
+  /// The element for the library containing the compilation unit being visited.
+  final LibraryElement _definingLibrary;
+
+  /// The URI of [_definingLibrary].
+  final Uri _definingLibraryUri;
+
+  /// The object keeping track of which elements have had their types promoted.
+  final TypePromotionManager _promoteManager;
+
+  /// The [Name] object of the invocation being resolved by [resolve].
+  Name _currentName;
+
+  MethodInvocationResolver(this._resolver)
+      : _typeType = _resolver.typeProvider.typeType,
+        _inheritance = _resolver.inheritance,
+        _definingLibrary = _resolver.definingLibrary,
+        _definingLibraryUri = _resolver.definingLibrary.source.uri,
+        _promoteManager = _resolver.promoteManager;
+
+  /// The scope used to resolve identifiers.
+  Scope get nameScope => _resolver.nameScope;
+
+  void resolve(MethodInvocation node) {
+    SimpleIdentifier nameNode = node.methodName;
+    String name = nameNode.name;
+    _currentName = Name(_definingLibraryUri, name);
+
+    //
+    // Synthetic identifiers have been already reported during parsing.
+    //
+    if (nameNode.isSynthetic) {
+      return;
+    }
+
+    Expression receiver = node.realTarget;
+
+    if (receiver == null) {
+      _resolveReceiverNull(node, nameNode, name);
+      return;
+    }
+
+    if (receiver is NullLiteral) {
+      _setDynamicResolution(node);
+      return;
+    }
+
+    if (receiver is SimpleIdentifier) {
+      var receiverElement = receiver.staticElement;
+      if (receiverElement is PrefixElement) {
+        _resolveReceiverPrefix(node, receiver, receiverElement, nameNode, name);
+        return;
+      }
+    }
+
+    if (receiver is SuperExpression) {
+      _resolveReceiverSuper(node, receiver, nameNode, name);
+      return;
+    }
+
+    ClassElement typeReference = getTypeReference(receiver);
+    if (typeReference != null) {
+      _resolveReceiverTypeLiteral(node, typeReference, nameNode, name);
+      return;
+    }
+
+    DartType receiverType = receiver.staticType;
+    receiverType = _resolveTypeParameter(receiverType);
+
+    if (receiverType is InterfaceType) {
+      _resolveReceiverInterfaceType(node, receiverType, nameNode, name);
+      return;
+    }
+
+    if (receiverType is DynamicTypeImpl) {
+      _resolveReceiverDynamic(node, name);
+      return;
+    }
+
+    if (receiverType is FunctionType) {
+      _resolveReceiverFunctionType(
+          node, receiver, receiverType, nameNode, name);
+      return;
+    }
+
+    if (receiverType is VoidType) {
+      _reportUseOfVoidType(node, receiver);
+      return;
+    }
+  }
+
+  /// Given an [argumentList] and the executable [element] that  will be invoked
+  /// using those arguments, compute the list of parameters that correspond to
+  /// the list of arguments. Return the parameters that correspond to the
+  /// arguments, or `null` if no correspondence could be computed.
+  List<ParameterElement> _computeCorrespondingParameters(
+      ArgumentList argumentList, DartType type) {
+    if (type is InterfaceType) {
+      MethodElement callMethod =
+          type.lookUpMethod(FunctionElement.CALL_METHOD_NAME, _definingLibrary);
+      if (callMethod != null) {
+        return _resolveArgumentsToFunction(false, argumentList, callMethod);
+      }
+    } else if (type is FunctionType) {
+      return _resolveArgumentsToParameters(
+          false, argumentList, type.parameters);
+    }
+    return null;
+  }
+
+  /// If the element of the invoked [targetType] is a getter, then actually
+  /// the return type of the [targetType] is invoked.  So, remember the
+  /// [targetType] into [MethodInvocationImpl.methodNameType] and return the
+  /// actual invoked type.
+  DartType _getCalleeType(MethodInvocation node, FunctionType targetType) {
+    if (targetType.element.kind == ElementKind.GETTER) {
+      (node as MethodInvocationImpl).methodNameType = targetType;
+      var calleeType = targetType.returnType;
+      calleeType = _resolveTypeParameter(calleeType);
+      return calleeType;
+    }
+    return targetType;
+  }
+
+  /// Check for a generic type, and apply type arguments.
+  FunctionType _instantiateFunctionType(
+      FunctionType invokeType, TypeArgumentList typeArguments, AstNode node) {
+    var typeFormals = invokeType.typeFormals;
+    var arguments = typeArguments?.arguments;
+    if (arguments != null && arguments.length != typeFormals.length) {
+      _resolver.errorReporter.reportErrorForNode(
+          StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
+          node,
+          [invokeType, typeFormals.length, arguments?.length ?? 0]);
+      arguments = null;
+    }
+
+    if (typeFormals.isNotEmpty) {
+      if (arguments == null) {
+        return _resolver.typeSystem.instantiateToBounds(invokeType);
+      } else {
+        return invokeType.instantiate(arguments.map((n) => n.type).toList());
+      }
+    }
+
+    return invokeType;
+  }
+
+  bool _isCoreFunction(DartType type) {
+    // TODO(scheglov) Can we optimize this?
+    return type is InterfaceType && type.isDartCoreFunction;
+  }
+
+  ExecutableElement _lookUpClassMember(ClassElement element, String name) {
+    // TODO(scheglov) Use class hierarchy.
+    return element.lookUpMethod(name, _definingLibrary);
+  }
+
+  void _reportInvocationOfNonFunction(MethodInvocation node) {
+    _setDynamicResolution(node, setNameTypeToDynamic: false);
+    _resolver.errorReporter.reportErrorForNode(
+      StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
+      node.methodName,
+      [node.methodName.name],
+    );
+  }
+
+  void _reportPrefixIdentifierNotFollowedByDot(SimpleIdentifier target) {
+    _resolver.errorReporter.reportErrorForNode(
+      CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+      target,
+      [target.name],
+    );
+  }
+
+  void _reportUndefinedFunction(
+      MethodInvocation node, Identifier ignorableIdentifier) {
+    _setDynamicResolution(node);
+
+    // TODO(scheglov) This is duplication.
+    if (nameScope.shouldIgnoreUndefined(ignorableIdentifier)) {
+      return;
+    }
+
+    _resolver.errorReporter.reportErrorForNode(
+      StaticTypeWarningCode.UNDEFINED_FUNCTION,
+      node.methodName,
+      [node.methodName.name],
+    );
+  }
+
+  void _reportUndefinedMethod(
+      MethodInvocation node, String name, ClassElement typeReference) {
+    _setDynamicResolution(node);
+    _resolver.errorReporter.reportErrorForNode(
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+      node.methodName,
+      [name, typeReference.displayName],
+    );
+  }
+
+  void _reportUseOfVoidType(MethodInvocation node, AstNode errorNode) {
+    _setDynamicResolution(node);
+    _resolver.errorReporter.reportErrorForNode(
+      StaticWarningCode.USE_OF_VOID_RESULT,
+      errorNode,
+    );
+  }
+
+  /// Given an [argumentList] and the [executableElement] that will be invoked
+  /// using those argument, compute the list of parameters that correspond to the
+  /// list of arguments. An error will be reported if any of the arguments cannot
+  /// be matched to a parameter. The flag [reportAsError] should be `true` if a
+  /// compile-time error should be reported; or `false` if a compile-time warning
+  /// should be reported. Return the parameters that correspond to the arguments,
+  /// or `null` if no correspondence could be computed.
+  List<ParameterElement> _resolveArgumentsToFunction(bool reportAsError,
+      ArgumentList argumentList, ExecutableElement executableElement) {
+    if (executableElement == null) {
+      return null;
+    }
+    List<ParameterElement> parameters = executableElement.parameters;
+    return _resolveArgumentsToParameters(
+        reportAsError, argumentList, parameters);
+  }
+
+  /// Given an [argumentList] and the [parameters] related to the element that
+  /// will be invoked using those arguments, compute the list of parameters that
+  /// correspond to the list of arguments. An error will be reported if any of
+  /// the arguments cannot be matched to a parameter. The flag [reportAsError]
+  /// should be `true` if a compile-time error should be reported; or `false` if
+  /// a compile-time warning should be reported. Return the parameters that
+  /// correspond to the arguments.
+  List<ParameterElement> _resolveArgumentsToParameters(bool reportAsError,
+      ArgumentList argumentList, List<ParameterElement> parameters) {
+    return ResolverVisitor.resolveArgumentsToParameters(
+        argumentList, parameters, _resolver.errorReporter.reportErrorForNode,
+        reportAsError: reportAsError);
+  }
+
+  /// Given that we are accessing a property of the given [classElement] with the
+  /// given [propertyName], return the element that represents the property.
+  Element _resolveElement(
+      ClassElement classElement, SimpleIdentifier propertyName) {
+    // TODO(scheglov) Replace with class hierarchy.
+    String name = propertyName.name;
+    Element element = null;
+    if (propertyName.inSetterContext()) {
+      element = classElement.getSetter(name);
+    }
+    if (element == null) {
+      element = classElement.getGetter(name);
+    }
+    if (element == null) {
+      element = classElement.getMethod(name);
+    }
+    if (element != null && element.isAccessibleIn(_definingLibrary)) {
+      return element;
+    }
+    return null;
+  }
+
+  void _resolveReceiverDynamic(MethodInvocation node, String name) {
+    _setDynamicResolution(node);
+  }
+
+  void _resolveReceiverFunctionType(MethodInvocation node, Expression receiver,
+      FunctionType receiverType, SimpleIdentifier nameNode, String name) {
+    if (name == FunctionElement.CALL_METHOD_NAME) {
+      _setResolution(node, receiverType);
+      // TODO(scheglov) Replace this with using FunctionType directly.
+      // Here was erase resolution that _setResolution() sets.
+      nameNode.staticElement = null;
+      nameNode.staticType = _dynamicType;
+      return;
+    }
+
+    // We can invoke Object methods on Function.
+    var type = _inheritance.getMember(
+      _resolver.typeProvider.objectType,
+      new Name(null, name),
+    );
+    if (type != null) {
+      nameNode.staticElement = type.element;
+      return _setResolution(node, type);
+    }
+
+    _reportUndefinedMethod(
+      node,
+      name,
+      _resolver.typeProvider.functionType.element,
+    );
+  }
+
+  void _resolveReceiverInterfaceType(MethodInvocation node,
+      InterfaceType receiverType, SimpleIdentifier nameNode, String name) {
+    if (_isCoreFunction(receiverType) &&
+        name == FunctionElement.CALL_METHOD_NAME) {
+      _setDynamicResolution(node);
+      return;
+    }
+
+    var targetType = _inheritance.getMember(receiverType, _currentName);
+    if (targetType != null) {
+      var calleeType = _getCalleeType(node, targetType);
+
+      // TODO(scheglov) This is bad, we have to create members here.
+      // Find a way to avoid this.
+      Element element;
+      var baseElement = targetType.element;
+      if (baseElement is MethodElement) {
+        element = MethodMember.from(baseElement, receiverType);
+      } else if (baseElement is PropertyAccessorElement) {
+        element = PropertyAccessorMember.from(baseElement, receiverType);
+      }
+      nameNode.staticElement = element;
+
+      return _setResolution(node, calleeType);
+    }
+
+    // The interface of the receiver does not have an instance member.
+    // Try to recover and find a member in the class.
+    var targetElement = _lookUpClassMember(receiverType.element, name);
+    if (targetElement != null && targetElement.isStatic) {
+      nameNode.staticElement = targetElement;
+      _setDynamicResolution(node);
+      _resolver.errorReporter.reportErrorForNode(
+        StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
+        nameNode,
+        [
+          name,
+          targetElement.kind.displayName,
+          targetElement.enclosingElement.displayName,
+        ],
+      );
+      return;
+    }
+
+    _setDynamicResolution(node);
+    _resolver.errorReporter.reportErrorForNode(
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+      nameNode,
+      [name, receiverType.element.displayName],
+    );
+  }
+
+  void _resolveReceiverNull(
+      MethodInvocation node, SimpleIdentifier nameNode, String name) {
+    var element = nameScope.lookup(nameNode, _definingLibrary);
+    if (element != null) {
+      nameNode.staticElement = element;
+      if (element is MultiplyDefinedElement) {
+        MultiplyDefinedElement multiply = element;
+        element = multiply.conflictingElements[0];
+      }
+      if (element is ExecutableElement) {
+        var calleeType = _getCalleeType(node, element.type);
+        return _setResolution(node, calleeType);
+      }
+      if (element is VariableElement) {
+        var targetType = _promoteManager.getStaticType(element);
+        return _setResolution(node, targetType);
+      }
+      // TODO(scheglov) This is a questionable distinction.
+      if (element is PrefixElement) {
+        _setDynamicResolution(node);
+        return _reportPrefixIdentifierNotFollowedByDot(nameNode);
+      }
+      return _reportInvocationOfNonFunction(node);
+    }
+
+    ClassElement enclosingClass = _resolver.enclosingClass;
+    if (enclosingClass == null) {
+      return _reportUndefinedFunction(node, node.methodName);
+    }
+
+    var receiverType = enclosingClass.type;
+    var targetType = _inheritance.getMember(receiverType, _currentName);
+
+    if (targetType != null) {
+      nameNode.staticElement = targetType.element;
+      var calleeType = _getCalleeType(node, targetType);
+      return _setResolution(node, calleeType);
+    }
+
+    var targetElement = _lookUpClassMember(enclosingClass, name);
+    if (targetElement != null && targetElement.isStatic) {
+      nameNode.staticElement = targetElement;
+      _setDynamicResolution(node);
+      _resolver.errorReporter.reportErrorForNode(
+        StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+        nameNode,
+        [receiverType.displayName],
+      );
+      return;
+    }
+
+    return _reportUndefinedMethod(node, name, enclosingClass);
+  }
+
+  void _resolveReceiverPrefix(MethodInvocation node, SimpleIdentifier receiver,
+      PrefixElement prefix, SimpleIdentifier nameNode, String name) {
+    if (node.operator.type == TokenType.QUESTION_PERIOD) {
+      _reportPrefixIdentifierNotFollowedByDot(receiver);
+    }
+
+    if (name == FunctionElement.LOAD_LIBRARY_NAME) {
+      var imports = _definingLibrary.getImportsWithPrefix(prefix);
+      if (imports.length == 1 && imports[0].isDeferred) {
+        var importedLibrary = imports[0].importedLibrary;
+        var loadLibraryFunction = importedLibrary?.loadLibraryFunction;
+        nameNode.staticElement = loadLibraryFunction;
+        node.staticInvokeType = loadLibraryFunction?.type;
+        node.staticType = loadLibraryFunction?.returnType;
+        return;
+      }
+    }
+
+    // TODO(scheglov) I don't like how we resolve prefixed names.
+    // But maybe this is the only one solution.
+    var prefixedName = new PrefixedIdentifierImpl.temp(receiver, nameNode);
+    var element = nameScope.lookup(prefixedName, _definingLibrary);
+    nameNode.staticElement = element;
+
+    if (element is MultiplyDefinedElement) {
+      MultiplyDefinedElement multiply = element;
+      element = multiply.conflictingElements[0];
+    }
+
+    if (element is ExecutableElement) {
+      var calleeType = _getCalleeType(node, element.type);
+      return _setResolution(node, calleeType);
+    }
+
+    _reportUndefinedFunction(node, prefixedName);
+  }
+
+  void _resolveReceiverSuper(MethodInvocation node, SuperExpression receiver,
+      SimpleIdentifier nameNode, String name) {
+    if (!_isSuperInValidContext(receiver)) {
+      return;
+    }
+
+    var receiverType = _resolver.enclosingClass.type;
+    var targetType = _inheritance.getMember(
+      receiverType,
+      _currentName,
+      forSuper: true,
+    );
+
+    // If there is that concrete dispatch target, then we are done.
+    if (targetType != null) {
+      nameNode.staticElement = targetType.element;
+      var calleeType = _getCalleeType(node, targetType);
+      _setResolution(node, calleeType);
+      return;
+    }
+
+    // Otherwise, this is an error.
+    // But we would like to give the user at least some resolution.
+    // So, we try to find the interface target.
+    targetType = _inheritance.getInherited(receiverType, _currentName);
+    if (targetType != null) {
+      nameNode.staticElement = targetType.element;
+      var calleeType = _getCalleeType(node, targetType);
+      _setResolution(node, calleeType);
+
+      ClassElementImpl receiverSuperClass = AbstractClassElementImpl.getImpl(
+        receiverType.element.supertype.element,
+      );
+      if (receiverSuperClass.hasNoSuchMethod) {
+        return;
+      }
+
+      _resolver.errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
+          nameNode,
+          [targetType.element.kind.displayName, name]);
+      return;
+    }
+
+    // Nothing help, there is no target at all.
+    _setDynamicResolution(node);
+    _resolver.errorReporter.reportErrorForNode(
+        StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
+        nameNode,
+        [name, _resolver.enclosingClass.displayName]);
+  }
+
+  void _resolveReceiverTypeLiteral(MethodInvocation node, ClassElement receiver,
+      SimpleIdentifier nameNode, String name) {
+    if (node.isCascaded) {
+      receiver = _typeType.element;
+    }
+
+    var element = _resolveElement(receiver, nameNode);
+    if (element != null) {
+      if (element is ExecutableElement) {
+        nameNode.staticElement = element;
+        var calleeType = _getCalleeType(node, element.type);
+        _setResolution(node, calleeType);
+      } else {
+        _reportInvocationOfNonFunction(node);
+      }
+      return;
+    }
+
+    _reportUndefinedMethod(node, name, receiver);
+  }
+
+  /// If the given [type] is a type parameter, replace with its bound.
+  /// Otherwise, return the original type.
+  DartType _resolveTypeParameter(DartType type) {
+    if (type is TypeParameterType) {
+      return type.resolveToBound(_resolver.typeProvider.objectType);
+    }
+    return type;
+  }
+
+  void _setDynamicResolution(MethodInvocation node,
+      {bool setNameTypeToDynamic: true}) {
+    if (setNameTypeToDynamic) {
+      node.methodName.staticType = _dynamicType;
+    }
+    node.staticInvokeType = _dynamicType;
+    node.staticType = _dynamicType;
+  }
+
+  void _setResolution(MethodInvocation node, DartType type) {
+    if (type == _dynamicType || _isCoreFunction(type)) {
+      _setDynamicResolution(node);
+      return;
+    }
+
+    // TODO(scheglov) We need this for StaticTypeAnalyzer to run inference.
+    // But it seems weird. Do we need to know the raw type of a function?!
+    node.methodName.staticType = type;
+
+    if (type is InterfaceType) {
+      var call = _inheritance.getMember(type, _nameCall);
+      if (call != null && call.element.kind == ElementKind.METHOD) {
+        type = call;
+      }
+    }
+
+    if (type is FunctionType) {
+      // TODO(scheglov) Extract this when receiver is already FunctionType?
+      var instantiatedType = _instantiateFunctionType(
+        type,
+        node.typeArguments,
+        node.methodName,
+      );
+      node.staticInvokeType = instantiatedType;
+      node.staticType = instantiatedType.returnType;
+      // TODO(scheglov) too much magic
+      node.argumentList.correspondingStaticParameters =
+          _computeCorrespondingParameters(
+        node.argumentList,
+        instantiatedType,
+      );
+      return;
+    }
+
+    if (type is VoidType) {
+      return _reportUseOfVoidType(node, node.methodName);
+    }
+
+    _reportInvocationOfNonFunction(node);
+  }
+
+  /// Checks whether the given [expression] is a reference to a class. If it is
+  /// then the element representing the class is returned, otherwise `null` is
+  /// returned.
+  static ClassElement getTypeReference(Expression expression) {
+    if (expression is Identifier) {
+      Element staticElement = expression.staticElement;
+      if (staticElement is ClassElement) {
+        return staticElement;
+      }
+    }
+    return null;
+  }
+
+  /// Return `true` if the given 'super' [expression] is used in a valid context.
+  static bool _isSuperInValidContext(SuperExpression expression) {
+    for (AstNode node = expression; node != null; node = node.parent) {
+      if (node is CompilationUnit) {
+        return false;
+      } else if (node is ConstructorDeclaration) {
+        return node.factoryKeyword == null;
+      } else if (node is ConstructorFieldInitializer) {
+        return false;
+      } else if (node is MethodDeclaration) {
+        return !node.isStatic;
+      }
+    }
+    return false;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart
index 4d71222..f1fb360 100644
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart
@@ -537,8 +537,11 @@
         var conflictingElements = <Element>[]
           ..addAll(sdkElements)
           ..addAll(nonSdkElements);
-        return new MultiplyDefinedElementImpl(_definingLibrary.context,
-            conflictingElements.first.name, conflictingElements);
+        return new MultiplyDefinedElementImpl(
+            _definingLibrary.context,
+            _definingLibrary.session,
+            conflictingElements.first.name,
+            conflictingElements);
       }
       if (nonSdkElements.isNotEmpty) {
         result = nonSdkElements.first;
@@ -1011,8 +1014,7 @@
    * not be determined.
    */
   Source getSource(AstNode identifier) {
-    CompilationUnit unit =
-        identifier.getAncestor((node) => node is CompilationUnit);
+    CompilationUnit unit = identifier.thisOrAncestorOfType<CompilationUnit>();
     if (unit != null) {
       CompilationUnitElement unitElement = unit.declaredElement;
       if (unitElement != null) {
diff --git a/pkg/analyzer/lib/src/dart/scanner/scanner.dart b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
index 25af788e..ab852cf 100644
--- a/pkg/analyzer/lib/src/dart/scanner/scanner.dart
+++ b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
@@ -54,6 +54,11 @@
   bool scanLazyAssignmentOperators = false;
 
   /**
+   * A flag indicating whether the scanner should recognize the `>>>` operator.
+   */
+  bool enableGtGtGt = false;
+
+  /**
    * Initialize a newly created scanner to scan characters from the given
    * [source]. The given character [reader] will be used to read the characters
    * in the source. The given [_errorListener] will be informed of any errors
@@ -99,6 +104,7 @@
 
   Token tokenize() {
     fasta.ScannerResult result = fasta.scanString(_contents,
+        enableGtGtGt: enableGtGtGt,
         includeComments: _preserveComments,
         scanLazyAssignmentOperators: scanLazyAssignmentOperators);
 
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index d966ee8..bd26015 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -49,14 +49,6 @@
           "'{1}'.");
 
   /**
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   */
-  static const CheckedModeCompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION =
-      const CheckedModeCompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION',
-          "Evaluation of this constant expression throws an exception.");
-
-  /**
    * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
    * if o is not <b>null</b> and the interface of the class of <i>o</i> is not a
    * subtype of the static type of the field <i>v</i>.
@@ -87,6 +79,10 @@
    * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
    * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>,
    * 1 &lt;= j &lt;= m</i>.
+   *
+   * Parameters:
+   * 0: the actual type of the list element
+   * 1: the expected type of the list element
    */
   static const CheckedModeCompileTimeErrorCode
       LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const CheckedModeCompileTimeErrorCode(
@@ -134,6 +130,15 @@
           "'{1}'.");
 
   /**
+   * Parameters:
+   * 0: the actual type of the set element
+   * 1: the expected type of the set element
+   */
+  static const CheckedModeCompileTimeErrorCode SET_ELEMENT_TYPE_NOT_ASSIGNABLE =
+      const CheckedModeCompileTimeErrorCode('SET_ELEMENT_TYPE_NOT_ASSIGNABLE',
+          "The element type '{0}' can't be assigned to the set type '{1}'.");
+
+  /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
    */
@@ -539,7 +544,7 @@
       const CompileTimeErrorCode(
           'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
           "Const constructor can't be declared for a class with a mixin "
-          "that declares a field.",
+          "that declares an instance field.",
           correction: "Try removing the 'const' keyword or "
               "removing the 'with' clause from the class declaration, "
               "or removing fields from the mixin class.");
@@ -659,6 +664,18 @@
           correction: "Try adding an initialization to the declaration.");
 
   /**
+   * Parameters:
+   * 0: the type of the element
+   */
+  static const CompileTimeErrorCode CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS =
+      const CompileTimeErrorCode(
+          'CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS',
+          "The constant set element type '{0}' can't override "
+          "the == operator.",
+          correction: "Try using a different value for the element, or "
+              "removing the keyword 'const' from the set.");
+
+  /**
    * 16.12.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
    * where e, e1 and e2 are constant expressions that evaluate to a boolean
    * value.
@@ -670,6 +687,17 @@
           "'bool'.");
 
   /**
+   * 16.12.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
+   * where e, e1 and e2 are constant expressions that evaluate to a boolean
+   * value.
+   */
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_INT =
+      const CompileTimeErrorCode(
+          'CONST_EVAL_TYPE_BOOL_INT',
+          "In constant expressions, operands of this operator must be of type "
+          "'bool' or 'int'.");
+
+  /**
    * 16.12.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
    * e1 and e2 are constant expressions that evaluate to a numeric, string or
    * boolean value or to null.
@@ -703,6 +731,12 @@
           "In constant expressions, operands of this operator must be of type "
           "'num'.");
 
+  static const CompileTimeErrorCode CONST_EVAL_TYPE_TYPE =
+      const CompileTimeErrorCode(
+          'CONST_EVAL_TYPE_TYPE',
+          "In constant expressions, operands of this operator must be of type "
+          "'Type'.");
+
   /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
@@ -1587,6 +1621,14 @@
           correction:
               "Try replacing the type parameter with a different type.");
 
+  static const CompileTimeErrorCode INVALID_TYPE_ARGUMENT_IN_CONST_SET =
+      const CompileTimeErrorCode(
+          'INVALID_TYPE_ARGUMENT_IN_CONST_SET',
+          "Constant set literals can't include a type parameter as a type "
+          "argument, such as '{0}'.",
+          correction:
+              "Try replacing the type parameter with a different type.");
+
   /**
    * The 'covariant' keyword was found in an inappropriate location.
    */
@@ -1677,6 +1719,16 @@
           "expression.",
           correction: "Try adding the keyword 'const' before the literal.");
 
+  /**
+   * 12.1 Constants: A constant expression is ... a constant set literal.
+   */
+  static const CompileTimeErrorCode MISSING_CONST_IN_SET_LITERAL =
+      const CompileTimeErrorCode(
+          'MISSING_CONST_IN_SET_LITERAL',
+          "Set literals must be prefixed with 'const' when used as a constant "
+          "expression.",
+          correction: "Try adding the keyword 'const' before the literal.");
+
   static const CompileTimeErrorCode MISSING_DART_LIBRARY =
       const CompileTimeErrorCode(
           'MISSING_DART_LIBRARY', "Required library '{0}' is missing.",
@@ -1714,7 +1766,8 @@
   static const CompileTimeErrorCode
       MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE = const CompileTimeErrorCode(
           'MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE',
-          "The class doesn't implement the required class '{0}'.");
+          "The class doesn't implement the required class '{0}'.",
+          correction: "Try extending the class '{0}'.");
 
   /**
    * It's a compile-time error to apply a mixin containing super-invocations to
@@ -1967,8 +2020,8 @@
   static const CompileTimeErrorCode NON_CONST_MAP_AS_EXPRESSION_STATEMENT =
       const CompileTimeErrorCode(
           'NON_CONST_MAP_AS_EXPRESSION_STATEMENT',
-          "A non-constant map literal without type arguments can't be used as "
-          "an expression statement.");
+          "A non-constant map or set literal without type arguments can't be "
+          "used as an expression statement.");
 
   /**
    * 13.9 Switch: Given a switch statement of the form <i>switch (e) {
@@ -2041,7 +2094,8 @@
   static const CompileTimeErrorCode NON_CONSTANT_LIST_ELEMENT =
       const CompileTimeErrorCode('NON_CONSTANT_LIST_ELEMENT',
           "The values in a const list literal must be constants.",
-          correction: "Try removing the keyword 'const' from the map literal.");
+          correction:
+              "Try removing the keyword 'const' from the list literal.");
 
   /**
    * 12.6 Lists: It is a compile time error if an element of a constant list
@@ -2118,6 +2172,19 @@
       const CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR',
           "Annotation creation can only call a const constructor.");
 
+  static const CompileTimeErrorCode NON_CONSTANT_SET_ELEMENT =
+      const CompileTimeErrorCode('NON_CONSTANT_SET_ELEMENT',
+          "The values in a const set literal must be constants.",
+          correction: "Try removing the keyword 'const' from the set literal.");
+
+  static const CompileTimeErrorCode
+      NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY =
+      const CompileTimeErrorCode(
+          'NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY',
+          "Constant values from a deferred library can't be used as values in "
+          "a 'const' set.",
+          correction: "Try removing the keyword 'const' from the set literal.");
+
   /**
    * 7.6.3 Constant Constructors: Any expression that appears within the
    * initializer list of a constant constructor must be a potentially constant
@@ -2251,9 +2318,9 @@
   static const CompileTimeErrorCode PRIVATE_COLLISION_IN_MIXIN_APPLICATION =
       const CompileTimeErrorCode(
           'PRIVATE_COLLISION_IN_MIXIN_APPLICATION',
-          "The private name {0}, defined by {1}, conflicts with the same name "
-          "defined by {2}.",
-          correction: "Try removing {1} from the 'with' clause.");
+          "The private name '{0}', defined by '{1}', "
+          "conflicts with the same name defined by '{2}'.",
+          correction: "Try removing '{1}' from the 'with' clause.");
 
   /**
    * 6.2.2 Optional Formals: It is a compile-time error if the name of a named
@@ -2555,13 +2622,13 @@
    * It is a compile-time error if a generic function type is used as an actual
    * type argument.
    */
-  static const CompileTimeErrorCode GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT =
+  static const CompileTimeErrorCode
+      GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT =
       const CompileTimeErrorCode(
-          'GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT',
-          "Generic function has type parameters '<{0}>', so it may not be used"
-          ' as a type argument',
-          correction: "Try removing the type parameters '<{0}>', or using"
-              " 'dynamic' as the type argument here instead of a function.");
+          'GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT',
+          "A generic function type cannot be a type argument.",
+          correction: "Try removing type parameters from the generic function "
+              "type, or using 'dynamic' as the type argument here.");
 
   /**
    * 15.3.1 Typedef: Any self reference, either directly, or recursively via
@@ -2808,6 +2875,17 @@
           correction: "Try adjusting the number of type arguments.");
 
   /**
+   * Parameters:
+   * 0: the number of provided type arguments
+   */
+  static const StaticTypeWarningCode EXPECTED_ONE_SET_TYPE_ARGUMENTS =
+      const StaticTypeWarningCode(
+          'EXPECTED_ONE_SET_TYPE_ARGUMENTS',
+          "Set literals require exactly one type argument or none, "
+          "but {0} found.",
+          correction: "Try adjusting the number of type arguments.");
+
+  /**
    * 12.8 Maps: A fresh instance (7.6.1) <i>m</i>, of size <i>n</i>, whose class
    * implements the built-in class <i>Map&lt;K, V></i> is allocated.
    *
@@ -2938,7 +3016,7 @@
    */
   static const StaticTypeWarningCode INVOCATION_OF_NON_FUNCTION_EXPRESSION =
       const StaticTypeWarningCode('INVOCATION_OF_NON_FUNCTION_EXPRESSION',
-          "The expression doesn't evaluate to a function, so it can't invoked.");
+          "The expression doesn't evaluate to a function, so it can't be invoked.");
 
   /**
    * 12.20 Conditional: It is a static type warning if the type of
@@ -3145,22 +3223,6 @@
               "defining a method named '{0}'.");
 
   /**
-   * 12.15.1 Ordinary Invocation: Let <i>T</i> be the static type of <i>o</i>.
-   * It is a static type warning if <i>T</i> does not have an accessible
-   * instance member named <i>m</i>.
-   *
-   * Parameters:
-   * 0: the name of the method that is undefined
-   * 1: the resolved type name that the method lookup is happening on
-   */
-  static const StaticTypeWarningCode UNDEFINED_METHOD_WITH_CONSTRUCTOR =
-      const StaticTypeWarningCode('UNDEFINED_METHOD_WITH_CONSTRUCTOR',
-          "The method '{0}' isn't defined for the class '{1}', but a constructor with that name is defined.",
-          correction:
-              "Try adding 'new' or 'const' to invoke the constructor, or "
-              "correcting the name to the name of an existing method.");
-
-  /**
    * 12.18 Assignment: Evaluation of an assignment of the form
    * <i>e<sub>1</sub></i>[<i>e<sub>2</sub></i>] = <i>e<sub>3</sub></i> is
    * equivalent to the evaluation of the expression (a, i, e){a.[]=(i, e);
@@ -3599,6 +3661,14 @@
       'EQUAL_KEYS_IN_MAP', "Two keys in a map literal can't be equal.");
 
   /**
+   * It is a compile-time error if any two of the values in a constant set are
+   * equal according to `==`.
+   */
+  static const StaticWarningCode EQUAL_VALUES_IN_CONST_SET =
+      const StaticWarningCode('EQUAL_VALUES_IN_CONST_SET',
+          "Two values in a constant set can't be equal.");
+
+  /**
    * 14.2 Exports: It is a static warning to export two different libraries with
    * the same name.
    *
@@ -3931,6 +4001,10 @@
    * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
    * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1
    * &lt;= j &lt;= m</i>.
+   *
+   * Parameters:
+   * 0: the actual type of the list element
+   * 1: the expected type of the list element
    */
   static const StaticWarningCode LIST_ELEMENT_TYPE_NOT_ASSIGNABLE =
       const StaticWarningCode('LIST_ELEMENT_TYPE_NOT_ASSIGNABLE',
@@ -4380,6 +4454,15 @@
       correction: null);
 
   /**
+   * Parameters:
+   * 0: the actual type of the set element
+   * 1: the expected type of the set element
+   */
+  static const StaticWarningCode SET_ELEMENT_TYPE_NOT_ASSIGNABLE =
+      const StaticWarningCode('SET_ELEMENT_TYPE_NOT_ASSIGNABLE',
+          "The element type '{0}' can't be assigned to the set type '{1}'.");
+
+  /**
    * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not
    * declare a static method or getter <i>m</i>.
    *
@@ -4639,6 +4722,13 @@
       "type can be changed with an explicit generic type arguments or by "
       "changing the key and value types.");
 
+  static const StrongModeCode INVALID_CAST_LITERAL_SET = const StrongModeCode(
+      ErrorType.COMPILE_TIME_ERROR,
+      'INVALID_CAST_LITERAL_SET',
+      "The set literal type '{0}' isn't of expected type '{1}'. The set's "
+      "type can be changed with an explicit generic type argument or by "
+      "changing the element types.");
+
   static const StrongModeCode INVALID_CAST_FUNCTION_EXPR = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_CAST_FUNCTION_EXPR',
diff --git a/pkg/analyzer/lib/src/error/inheritance_override.dart b/pkg/analyzer/lib/src/error/inheritance_override.dart
index b74f141..20ecec0 100644
--- a/pkg/analyzer/lib/src/error/inheritance_override.dart
+++ b/pkg/analyzer/lib/src/error/inheritance_override.dart
@@ -1,11 +1,11 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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/analyzer.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
@@ -17,7 +17,7 @@
 class InheritanceOverrideVerifier {
   static const _missingOverridesKey = 'missingOverrides';
 
-  final StrongTypeSystemImpl _typeSystem;
+  final TypeSystem _typeSystem;
   final TypeProvider _typeProvider;
   final InheritanceManager2 _inheritance;
   final ErrorReporter _reporter;
@@ -78,7 +78,7 @@
 }
 
 class _ClassVerifier {
-  final StrongTypeSystemImpl typeSystem;
+  final TypeSystem typeSystem;
   final TypeProvider typeProvider;
   final InheritanceManager2 inheritance;
   final ErrorReporter reporter;
@@ -94,8 +94,12 @@
   final TypeName superclass;
   final WithClause withClause;
 
+  /// The set of unique supertypes of the current class.
+  /// It is used to decide when to add a new element to [allSuperinterfaces].
+  final Set<InterfaceType> allSupertypes = new Set<InterfaceType>();
+
   /// The list of all superinterfaces, collected so far.
-  final List<InterfaceType> allSuperinterfaces = [];
+  final List<Interface> allSuperinterfaces = [];
 
   _ClassVerifier({
     this.typeSystem,
@@ -118,12 +122,15 @@
       return;
     }
 
+    if (_checkForRecursiveInterfaceInheritance(classElement)) {
+      return;
+    }
+
     InterfaceTypeImpl type = classElement.type;
 
     // Add all superinterfaces of the direct supertype.
     if (type.superclass != null) {
-      ClassElementImpl.collectAllSupertypes(
-          allSuperinterfaces, type.superclass, null);
+      _addSuperinterfaces(type.superclass);
     }
 
     // Each mixin in `class C extends S with M0, M1, M2 {}` is equivalent to:
@@ -136,15 +143,14 @@
     var mixinNodes = withClause?.mixinTypes;
     var mixinTypes = type.mixins;
     for (var i = 0; i < mixinTypes.length; i++) {
-      _checkDeclaredMembers(mixinNodes[i], mixinTypes[i]);
-      ClassElementImpl.collectAllSupertypes(
-          allSuperinterfaces, mixinTypes[i], null);
+      var mixinType = mixinTypes[i];
+      _checkDeclaredMembers(mixinNodes[i], mixinType);
+      _addSuperinterfaces(mixinType);
     }
 
     // Add all superinterfaces of the direct class interfaces.
     for (var interface in type.interfaces) {
-      ClassElementImpl.collectAllSupertypes(
-          allSuperinterfaces, interface, null);
+      _addSuperinterfaces(interface);
     }
 
     // Check the members if the class itself, against all the previously
@@ -163,33 +169,31 @@
     }
 
     // Compute the interface of the class.
-    var interfaceMembers = inheritance.getInterface(type);
+    var interface = inheritance.getInterface(type);
 
     // Report conflicts between direct superinterfaces of the class.
-    for (var conflict in interfaceMembers.conflicts) {
+    for (var conflict in interface.conflicts) {
       _reportInconsistentInheritance(classNameNode, conflict);
     }
 
-    _checkForMismatchedAccessorTypes(interfaceMembers);
+    _checkForMismatchedAccessorTypes(interface);
 
     if (!classElement.isAbstract) {
       List<FunctionType> inheritedAbstract = null;
 
-      for (var name in interfaceMembers.map.keys) {
+      for (var name in interface.map.keys) {
         if (!name.isAccessibleFor(libraryUri)) {
           continue;
         }
 
-        var interfaceType = interfaceMembers.map[name];
-        var concreteType = inheritance.getMember(type, name, concrete: true);
+        var interfaceType = interface.map[name];
+        var concreteType = interface.implemented[name];
 
         // No concrete implementation of the name.
         if (concreteType == null) {
-          if (!classElement.hasNoSuchMethod) {
-            if (!_reportConcreteClassWithAbstractMember(name.name)) {
-              inheritedAbstract ??= [];
-              inheritedAbstract.add(interfaceType);
-            }
+          if (!_reportConcreteClassWithAbstractMember(name.name)) {
+            inheritedAbstract ??= [];
+            inheritedAbstract.add(interfaceType);
           }
           continue;
         }
@@ -226,6 +230,18 @@
     }
   }
 
+  void _addSuperinterfaces(InterfaceType startingType) {
+    var supertypes = <InterfaceType>[];
+    ClassElementImpl.collectAllSupertypes(supertypes, startingType, null);
+    for (int i = 0; i < supertypes.length; i++) {
+      var supertype = supertypes[i];
+      if (allSupertypes.add(supertype)) {
+        var interface = inheritance.getInterface(supertype);
+        allSuperinterfaces.add(interface);
+      }
+    }
+  }
+
   /// Check that the given [member] is a valid override of the corresponding
   /// instance members in each of [allSuperinterfaces].  The [libraryUri] is
   /// the URI of the library containing the [member].
@@ -238,8 +254,8 @@
     if (member.isStatic) return;
 
     var name = new Name(libraryUri, member.name);
-    for (var superType in allSuperinterfaces) {
-      var superMemberType = inheritance.getInterface(superType).map[name];
+    for (var superInterface in allSuperinterfaces) {
+      var superMemberType = superInterface.declared[name];
       if (superMemberType != null) {
         // The case when members have different kinds is reported in verifier.
         // TODO(scheglov) Do it here?
@@ -352,7 +368,7 @@
       if (getter.element.kind == ElementKind.GETTER) {
         // TODO(scheglov) We should separate getters and setters.
         var setter = interface.map[new Name(libraryUri, '${name.name}=')];
-        if (setter != null) {
+        if (setter != null && setter.parameters.length == 1) {
           var getterType = getter.returnType;
           var setterType = setter.parameters[0].type;
           if (!typeSystem.isAssignableTo(getterType, setterType)) {
@@ -390,6 +406,106 @@
     }
   }
 
+  /// Check that [classElement] is not a superinterface to itself.
+  /// The [path] is a list containing the potentially cyclic implements path.
+  ///
+  /// See [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE],
+  /// [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_EXTENDS],
+  /// [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS],
+  /// [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_ON],
+  /// [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_WITH].
+  bool _checkForRecursiveInterfaceInheritance(ClassElement element,
+      [List<ClassElement> path]) {
+    path ??= <ClassElement>[];
+
+    // Detect error condition.
+    int size = path.length;
+    // If this is not the base case (size > 0), and the enclosing class is the
+    // given class element then report an error.
+    if (size > 0 && classElement == element) {
+      String className = classElement.displayName;
+      if (size > 1) {
+        // Construct a string showing the cyclic implements path:
+        // "A, B, C, D, A"
+        String separator = ", ";
+        StringBuffer buffer = new StringBuffer();
+        for (int i = 0; i < size; i++) {
+          buffer.write(path[i].displayName);
+          buffer.write(separator);
+        }
+        buffer.write(element.displayName);
+        reporter.reportErrorForElement(
+            CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
+            classElement,
+            [className, buffer.toString()]);
+        return true;
+      } else {
+        // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS or
+        // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS or
+        // RECURSIVE_INTERFACE_INHERITANCE_ON or
+        // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH
+        reporter.reportErrorForElement(
+            _getRecursiveErrorCode(element), classElement, [className]);
+        return true;
+      }
+    }
+
+    if (path.indexOf(element) > 0) {
+      return false;
+    }
+    path.add(element);
+
+    // n-case
+    InterfaceType supertype = element.supertype;
+    if (supertype != null &&
+        _checkForRecursiveInterfaceInheritance(supertype.element, path)) {
+      return true;
+    }
+
+    for (InterfaceType type in element.mixins) {
+      if (_checkForRecursiveInterfaceInheritance(type.element, path)) {
+        return true;
+      }
+    }
+
+    for (InterfaceType type in element.superclassConstraints) {
+      if (_checkForRecursiveInterfaceInheritance(type.element, path)) {
+        return true;
+      }
+    }
+
+    for (InterfaceType type in element.interfaces) {
+      if (_checkForRecursiveInterfaceInheritance(type.element, path)) {
+        return true;
+      }
+    }
+
+    path.removeAt(path.length - 1);
+    return false;
+  }
+
+  /// Return the error code that should be used when the given class [element]
+  /// references itself directly.
+  ErrorCode _getRecursiveErrorCode(ClassElement element) {
+    if (element.supertype?.element == classElement) {
+      return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_EXTENDS;
+    }
+
+    for (InterfaceType type in element.superclassConstraints) {
+      if (type.element == classElement) {
+        return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_ON;
+      }
+    }
+
+    for (InterfaceType type in element.mixins) {
+      if (type.element == classElement) {
+        return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_WITH;
+      }
+    }
+
+    return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS;
+  }
+
   /// We identified that the current non-abstract class does not have the
   /// concrete implementation of a method with the given [name].  If this is
   /// because the class itself defines an abstract method with this [name],
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 650778f..94a0fbe 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -96,6 +96,13 @@
 
   bool parseFunctionBodies = true;
 
+  /// `true` if non-nullable behavior is enabled
+  bool enableNonNullable = false;
+
+  /// Is `true` if [enableNonNullable] is enabled, and the library directive
+  /// is annotated with `@pragma('analyzer:non-nullable')`.
+  bool hasPragmaAnalyzerNonNullable = false;
+
   AstBuilder(ErrorReporter errorReporter, this.fileUri, this.isFullAst,
       [Uri uri])
       : this.errorReporter = new FastaErrorReporter(errorReporter),
@@ -335,7 +342,7 @@
 
   void doPropertyGet() {}
 
-  void endExpressionStatement(Token semicolon) {
+  void handleExpressionStatement(Token semicolon) {
     assert(optional(';', semicolon));
     debugEvent("ExpressionStatement");
     Expression expression = pop();
@@ -625,12 +632,23 @@
         SimpleIdentifier fieldName;
         Expression left = initializerObject.leftHandSide;
         if (left is PropertyAccess) {
-          var thisExpression = left.target as ThisExpression;
-          thisKeyword = thisExpression.thisKeyword;
-          period = left.operator;
+          Expression target = left.target;
+          if (target is ThisExpression) {
+            thisKeyword = target.thisKeyword;
+            period = left.operator;
+          } else {
+            assert(target is SuperExpression);
+            // Recovery:
+            // Parser has reported FieldInitializedOutsideDeclaringClass.
+          }
           fieldName = left.propertyName;
+        } else if (left is SimpleIdentifier) {
+          fieldName = left;
         } else {
-          fieldName = left as SimpleIdentifier;
+          // Recovery:
+          // Parser has reported invalid assignment.
+          SuperExpression superExpression = left;
+          fieldName = ast.simpleIdentifier(superExpression.superKeyword);
         }
         initializers.add(ast.constructorFieldInitializer(
             thisKeyword,
@@ -879,6 +897,29 @@
     push(ast.nullLiteral(token));
   }
 
+  @override
+  void handleEmptyLiteralSetOrMap(
+      Token leftBrace, Token constKeyword, Token rightBrace) {
+    // TODO(danrubel): From a type resolution standpoint, this could be either
+    // a set literal or a map literal depending upon the context
+    // in which this expression occurs.
+    // For now, generate a map literal.
+    handleLiteralMap(0, leftBrace, constKeyword, rightBrace);
+  }
+
+  void handleLiteralSet(
+      int count, Token leftBracket, Token constKeyword, Token rightBracket) {
+    assert(optional('{', leftBracket));
+    assert(optionalOrNull('const', constKeyword));
+    assert(optional('}', rightBracket));
+    debugEvent("LiteralSet");
+
+    List<Expression> entries = popTypedList(count) ?? <Expression>[];
+    TypeArgumentList typeArguments = pop();
+    push(ast.setLiteral(
+        constKeyword, typeArguments, leftBracket, entries, rightBracket));
+  }
+
   void handleLiteralMap(
       int count, Token leftBracket, Token constKeyword, Token rightBracket) {
     assert(optional('{', leftBracket));
@@ -926,12 +967,15 @@
   }
 
   @override
-  void handleType(Token beginToken) {
+  void handleType(Token beginToken, Token questionMark) {
     debugEvent("Type");
+    if (!enableNonNullable) {
+      reportErrorIfNullableType(questionMark);
+    }
 
     TypeArgumentList arguments = pop();
     Identifier name = pop();
-    push(ast.typeName(name, arguments));
+    push(ast.typeName(name, arguments, question: questionMark));
   }
 
   @override
@@ -1083,15 +1127,19 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
+  void endFunctionType(Token functionToken, Token questionMark) {
     assert(optional('Function', functionToken));
     debugEvent("FunctionType");
+    if (!enableNonNullable) {
+      reportErrorIfNullableType(questionMark);
+    }
 
     FormalParameterList parameters = pop();
     TypeAnnotation returnType = pop();
     TypeParameterList typeParameters = pop();
     push(ast.genericFunctionType(
-        returnType, functionToken, typeParameters, parameters));
+        returnType, functionToken, typeParameters, parameters,
+        question: questionMark));
   }
 
   void handleFormalParameterWithoutValue(Token token) {
@@ -2047,6 +2095,23 @@
     List<SimpleIdentifier> libraryName = pop();
     var name = ast.libraryIdentifier(libraryName);
     List<Annotation> metadata = pop();
+    if (enableNonNullable && metadata != null) {
+      for (Annotation annotation in metadata) {
+        Identifier pragma = annotation.name;
+        if (pragma is SimpleIdentifier && pragma.name == 'pragma') {
+          NodeList<Expression> arguments = annotation.arguments.arguments;
+          if (arguments.length == 1) {
+            Expression tag = arguments[0];
+            if (tag is StringLiteral) {
+              if (tag.stringValue == 'analyzer:non-nullable') {
+                hasPragmaAnalyzerNonNullable = true;
+                break;
+              }
+            }
+          }
+        }
+      }
+    }
     Comment comment = _findComment(metadata, libraryKeyword);
     directives.add(ast.libraryDirective(
         comment, metadata, libraryKeyword, name, semicolon));
@@ -2518,7 +2583,7 @@
     // keyword up to an element?
     handleIdentifier(voidKeyword, IdentifierContext.typeReference);
     handleNoTypeArguments(voidKeyword);
-    handleType(voidKeyword);
+    handleType(voidKeyword, null);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/fasta/error_converter.dart b/pkg/analyzer/lib/src/fasta/error_converter.dart
index 8464578..50f2609 100644
--- a/pkg/analyzer/lib/src/fasta/error_converter.dart
+++ b/pkg/analyzer/lib/src/fasta/error_converter.dart
@@ -1,10 +1,12 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
 import 'package:analyzer/dart/ast/token.dart' show Token;
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:front_end/src/fasta/messages.dart' show Code, Message;
 
 /// An error reporter that knows how to convert a Fasta error into an analyzer
@@ -199,10 +201,6 @@
         errorReporter?.reportErrorForOffset(
             StrongModeCode.INVALID_SUPER_INVOCATION, offset, length);
         return;
-      case "MISSING_CATCH_OR_FINALLY":
-        errorReporter?.reportErrorForOffset(
-            ParserErrorCode.MISSING_CATCH_OR_FINALLY, offset, length);
-        return;
       case "MISSING_CLASS_BODY":
         errorReporter?.reportErrorForOffset(
             ParserErrorCode.MISSING_CLASS_BODY, offset, length);
@@ -280,10 +278,6 @@
             // involved in this error... either async* or sync*
             ['async*']);
         return;
-      case "STACK_OVERFLOW":
-        errorReporter?.reportErrorForOffset(
-            ParserErrorCode.STACK_OVERFLOW, offset, length);
-        return;
       case "SUPER_IN_REDIRECTING_CONSTRUCTOR":
         errorReporter?.reportErrorForOffset(
             CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR,
@@ -326,10 +320,6 @@
         errorReporter?.reportErrorForOffset(
             ScannerErrorCode.UNTERMINATED_STRING_LITERAL, offset, length);
         return;
-      case "VAR_AND_TYPE":
-        errorReporter?.reportErrorForOffset(
-            ParserErrorCode.VAR_AND_TYPE, offset, length);
-        return;
       case "WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER":
         errorReporter?.reportErrorForOffset(
             CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 077f807..b4a0bda 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -12,7 +12,7 @@
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 import 'package:analyzer/src/generated/source.dart' show Source;
 import 'package:analyzer/src/generated/type_system.dart'
-    show StrongTypeSystemImpl, TypeSystem;
+    show Dart2TypeSystem, TypeSystem;
 
 export 'package:analyzer/dart/analysis/declared_variables.dart';
 export 'package:analyzer/dart/constant/value.dart';
@@ -118,7 +118,7 @@
    */
   ConstantEvaluator(this._source, TypeProvider typeProvider,
       {TypeSystem typeSystem})
-      : _typeSystem = typeSystem ?? new StrongTypeSystemImpl(typeProvider),
+      : _typeSystem = typeSystem ?? new Dart2TypeSystem(typeProvider),
         _typeProvider = typeProvider;
 
   EvaluationResult evaluate(Expression expression) {
diff --git a/pkg/analyzer/lib/src/generated/declaration_resolver.dart b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
index 0f0d19b..7175395 100644
--- a/pkg/analyzer/lib/src/generated/declaration_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
@@ -103,7 +103,7 @@
     ConstructorElement element = _match(node.name, _walker.getConstructor(),
         offset: node.name?.offset ?? node.returnType.offset);
     _walk(new ElementWalker.forExecutable(element, _enclosingUnit), () {
-      node.element = element;
+      (node as ConstructorDeclarationImpl).declaredElement = element;
       super.visitConstructorDeclaration(node);
     });
     resolveMetadata(node, node.metadata, element);
@@ -232,7 +232,8 @@
       }
     }
     _setGenericFunctionType(node.returnType, element.returnType);
-    node.functionExpression.element = element;
+    (node.functionExpression as FunctionExpressionImpl).declaredElement =
+        element;
     _walker._elementHolder?.addFunction(element);
     _walk(new ElementWalker.forExecutable(element, _enclosingUnit), () {
       super.visitFunctionDeclaration(node);
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index b759dd0..dbb487e 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -19,6 +19,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/resolver/method_invocation_resolver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -82,7 +83,7 @@
  * combinators that are not defined in the imported library (which is not an
  * error).
  */
-class ElementResolver extends SimpleAstVisitor<Object> {
+class ElementResolver extends SimpleAstVisitor<void> {
   /**
    * The manager for the inheritance mappings.
    */
@@ -104,28 +105,25 @@
   DartType _dynamicType;
 
   /**
-   * The type representing the type 'type'.
+   * The type representing the type 'Type'.
    */
   InterfaceType _typeType;
 
-  /**
-   * The object keeping track of which elements have had their types promoted.
-   */
-  TypePromotionManager _promoteManager;
-
   /// Whether constant evaluation errors should be reported during resolution.
   final bool reportConstEvaluationErrors;
 
+  final MethodInvocationResolver _methodInvocationResolver;
+
   /**
    * Initialize a newly created visitor to work for the given [_resolver] to
    * resolve the nodes in a compilation unit.
    */
   ElementResolver(this._resolver, {this.reportConstEvaluationErrors: true})
       : _inheritance = _resolver.inheritance,
-        _definingLibrary = _resolver.definingLibrary {
+        _definingLibrary = _resolver.definingLibrary,
+        _methodInvocationResolver = new MethodInvocationResolver(_resolver) {
     _dynamicType = _resolver.typeProvider.dynamicType;
     _typeType = _resolver.typeProvider.typeType;
-    _promoteManager = _resolver.promoteManager;
   }
 
   /**
@@ -141,7 +139,7 @@
   }
 
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     Token operator = node.operator;
     TokenType operatorType = operator.type;
     Expression leftHandSide = node.leftHandSide;
@@ -154,14 +152,14 @@
         staticType.isVoid) {
       _recordUndefinedToken(
           null, StaticWarningCode.USE_OF_VOID_RESULT, operator, []);
-      return null;
+      return;
     }
 
     if (operatorType != TokenType.AMPERSAND_AMPERSAND_EQ &&
         operatorType != TokenType.BAR_BAR_EQ &&
         operatorType != TokenType.EQ &&
         operatorType != TokenType.QUESTION_QUESTION_EQ) {
-      operatorType = _operatorFromCompoundAssignment(operatorType);
+      operatorType = operatorFromCompoundAssignment(operatorType);
       if (leftHandSide != null) {
         String methodName = operatorType.lexeme;
         MethodElement staticMethod =
@@ -176,40 +174,35 @@
         }
       }
     }
-    return null;
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     Token operator = node.operator;
     if (operator.isUserDefinableOperator) {
       _resolveBinaryExpression(node, operator.lexeme);
     } else if (operator.type == TokenType.BANG_EQ) {
       _resolveBinaryExpression(node, TokenType.EQ_EQ.lexeme);
     }
-    return null;
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     node.target = _lookupBreakOrContinueTarget(node, node.label, false);
-    return null;
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitCommentReference(CommentReference node) {
+  void visitCommentReference(CommentReference node) {
     Identifier identifier = node.identifier;
     if (identifier is SimpleIdentifier) {
       Element element = _resolveSimpleIdentifier(identifier);
@@ -249,7 +242,7 @@
           // TODO(brianwilkerson) Report this error?
           element = _resolver.nameScope.lookup(identifier, _definingLibrary);
           name.staticElement = element;
-          return null;
+          return;
         }
         LibraryElement library = element.library;
         if (library == null) {
@@ -293,11 +286,10 @@
         }
       }
     }
-    return null;
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     super.visitConstructorDeclaration(node);
     ConstructorElement element = node.declaredElement;
     if (element is ConstructorElementImpl) {
@@ -317,20 +309,18 @@
       }
       resolveMetadata(node);
     }
-    return null;
   }
 
   @override
-  Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     SimpleIdentifier fieldName = node.fieldName;
     ClassElement enclosingClass = _resolver.enclosingClass;
     FieldElement fieldElement = enclosingClass.getField(fieldName.name);
     fieldName.staticElement = fieldElement;
-    return null;
   }
 
   @override
-  Object visitConstructorName(ConstructorName node) {
+  void visitConstructorName(ConstructorName node) {
     DartType type = node.type.type;
     if (type != null && type.isDynamic) {
       // Nothing to do.
@@ -358,29 +348,25 @@
 //        // This is part of a redirecting factory constructor; not sure which error code to use
 //      }
     }
-    return null;
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     node.target = _lookupBreakOrContinueTarget(node, node.label, true);
-    return null;
   }
 
   @override
-  Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     ExportElement exportElement = node.element;
     if (exportElement != null) {
       // The element is null when the URI is invalid
@@ -389,23 +375,21 @@
       _resolveCombinators(exportElement.exportedLibrary, node.combinators);
       resolveMetadata(node);
     }
-    return null;
   }
 
   @override
-  Object visitFieldFormalParameter(FieldFormalParameter node) {
+  void visitFieldFormalParameter(FieldFormalParameter node) {
     _resolveMetadataForParameter(node);
-    return super.visitFieldFormalParameter(node);
+    super.visitFieldFormalParameter(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     Expression function = node.function;
     DartType staticInvokeType = _instantiateGenericMethod(
         function.staticType, node.typeArguments, node);
@@ -417,23 +401,20 @@
     if (parameters != null) {
       node.argumentList.correspondingStaticParameters = parameters;
     }
-    return null;
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     _resolveMetadataForParameter(node);
-    return null;
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     SimpleIdentifier prefixNode = node.prefix;
     if (prefixNode != null) {
       String prefixName = prefixNode.name;
@@ -456,11 +437,10 @@
       }
       resolveMetadata(node);
     }
-    return null;
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     Expression target = node.realTarget;
     DartType staticType = _getStaticType(target);
     String getterMethodName = TokenType.INDEX.lexeme;
@@ -475,7 +455,7 @@
       node.staticElement = setterStaticMethod;
       // generate undefined method warning
       _checkForUndefinedIndexOperator(
-          node, target, getterMethodName, setterStaticMethod, staticType);
+          node, target, setterMethodName, setterStaticMethod, staticType);
       // lookup getter method
       MethodElement getterStaticMethod =
           _lookUpMethod(target, staticType, getterMethodName);
@@ -505,11 +485,10 @@
       _checkForUndefinedIndexOperator(
           node, target, setterMethodName, staticMethod, staticType);
     }
-    return null;
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     ConstructorElement invokedConstructor = node.constructorName.staticElement;
     node.staticElement = invokedConstructor;
     ArgumentList argumentList = node.argumentList;
@@ -520,246 +499,35 @@
     if (parameters != null) {
       argumentList.correspondingStaticParameters = parameters;
     }
-    return null;
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) {
+  void visitLibraryDirective(LibraryDirective node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
-    SimpleIdentifier methodName = node.methodName;
-    //
-    // Synthetic identifiers have been already reported during parsing.
-    //
-    if (methodName.isSynthetic) {
-      return null;
-    }
-    //
-    // We have a method invocation of one of two forms: 'e.m(a1, ..., an)' or
-    // 'm(a1, ..., an)'. The first step is to figure out which executable is
-    // being invoked, using both the static and the propagated type information.
-    //
-    Expression target = node.realTarget;
-    if (target is SuperExpression && !_isSuperInValidContext(target)) {
-      return null;
-    }
-    Element staticElement;
-    if (target == null) {
-      staticElement = _resolveInvokedElement(methodName);
-    } else if (methodName.name == FunctionElement.LOAD_LIBRARY_NAME &&
-        _isDeferredPrefix(target)) {
-      if (node.operator.type == TokenType.QUESTION_PERIOD) {
-        _resolver.errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
-            target,
-            [(target as SimpleIdentifier).name]);
-      }
-      LibraryElement importedLibrary = _getImportedLibrary(target);
-      FunctionElement loadLibraryFunction =
-          importedLibrary?.loadLibraryFunction;
-      methodName.staticElement = loadLibraryFunction;
-      node.staticInvokeType = loadLibraryFunction?.type;
-      return null;
-    } else {
-      //
-      // If this method invocation is of the form 'C.m' where 'C' is a class,
-      // then we don't call resolveInvokedElement(...) which walks up the class
-      // hierarchy, instead we just look for the member in the type only.  This
-      // does not apply to conditional method invocation (i.e. 'C?.m(...)').
-      //
-      bool isConditional = node.operator.type == TokenType.QUESTION_PERIOD;
-      ClassElement typeReference = getTypeReference(target);
-
-      if (typeReference != null) {
-        if (node.isCascaded) {
-          typeReference = _typeType.element;
-        }
-        staticElement = _resolveElement(typeReference, methodName);
-      } else {
-        DartType staticType = _getStaticTypeOrFunctionType(target);
-
-        if (staticType is FunctionType &&
-            methodName.name == FunctionElement.CALL_METHOD_NAME) {
-          if (target is SimpleIdentifier) {
-            methodName.staticElement = target.staticElement;
-          }
-          methodName.staticType = target.staticType;
-          node.staticType = staticType;
-          node.staticInvokeType = staticType;
-          node.argumentList.correspondingStaticParameters =
-              _computeCorrespondingParameters(node.argumentList, staticType);
-          return null;
-        }
-
-        if (target is SuperExpression) {
-          if (staticType is InterfaceTypeImpl) {
-            staticElement = staticType.lookUpInheritedMember(
-                methodName.name, _definingLibrary,
-                concrete: true, forSuperInvocation: true);
-            // We were not able to find the concrete dispatch target.
-            // But we would like to give the user at least some resolution.
-            // So, we retry without the "concrete" requirement.
-            if (staticElement == null) {
-              staticElement = staticType.lookUpInheritedMember(
-                  methodName.name, _definingLibrary,
-                  concrete: false);
-              if (staticElement != null) {
-                _resolver.errorReporter.reportErrorForNode(
-                    CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
-                    methodName,
-                    [staticElement.kind.displayName, methodName.name]);
-              }
-            }
-          }
-        } else {
-          staticElement = _resolveInvokedElementWithTarget(
-              target, staticType, methodName, isConditional);
-        }
-      }
-    }
-
-    staticElement = _convertSetterToGetter(staticElement);
-
-    //
-    // Given the elements, determine the type of the function we are invoking
-    //
-    DartType staticType = _getInvokeType(staticElement);
-    methodName.staticType = staticType;
-
-    //
-    // Instantiate generic function or method if needed.
-    //
-    DartType staticInvokeType = _instantiateGenericMethod(
-        staticType, node.typeArguments, node.methodName);
-
-    //
-    // Record the results.
-    //
-    methodName.staticElement = staticElement;
-    node.staticInvokeType = staticInvokeType;
-    ArgumentList argumentList = node.argumentList;
-    if (staticInvokeType != null) {
-      List<ParameterElement> parameters =
-          _computeCorrespondingParameters(argumentList, staticInvokeType);
-      argumentList.correspondingStaticParameters = parameters;
-    }
-    //
-    // Then check for error conditions.
-    //
-    ErrorCode errorCode = _checkForInvocationError(
-        target, true, staticElement, staticType, methodName.name);
-    if (errorCode != null &&
-        target is SimpleIdentifier &&
-        target.staticElement is PrefixElement) {
-      Identifier functionName =
-          new PrefixedIdentifierImpl.temp(target, methodName);
-      if (_resolver.nameScope.shouldIgnoreUndefined(functionName)) {
-        return null;
-      }
-    }
-    if (errorCode == null) {
-      return null;
-    }
-
-    if (identical(
-            errorCode, StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION) ||
-        identical(errorCode,
-            CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT) ||
-        identical(errorCode, StaticTypeWarningCode.UNDEFINED_FUNCTION)) {
-      if (!_resolver.nameScope.shouldIgnoreUndefined(methodName)) {
-        _resolver.errorReporter
-            .reportErrorForNode(errorCode, methodName, [methodName.name]);
-      }
-    } else if (identical(errorCode, StaticTypeWarningCode.UNDEFINED_METHOD)) {
-      String targetTypeName;
-      if (target == null) {
-        ClassElement enclosingClass = _resolver.enclosingClass;
-        targetTypeName = enclosingClass.displayName;
-        ErrorCode proxyErrorCode = StaticTypeWarningCode.UNDEFINED_METHOD;
-        _recordUndefinedNode(_resolver.enclosingClass, proxyErrorCode,
-            methodName, [methodName.name, targetTypeName]);
-      } else {
-        // ignore Function "call"
-        // (if we are about to create a hint using type propagation,
-        // then we can use type propagation here as well)
-        DartType targetType = null;
-        targetType = _getStaticType(target);
-        if (targetType != null &&
-            targetType.isDartCoreFunction &&
-            methodName.name == FunctionElement.CALL_METHOD_NAME) {
-          return null;
-        }
-        if (!node.isCascaded) {
-          ClassElement typeReference = getTypeReference(target);
-          if (typeReference != null) {
-            ConstructorElement constructor =
-                typeReference.getNamedConstructor(methodName.name);
-            if (constructor != null) {
-              _recordUndefinedNode(
-                  typeReference,
-                  StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR,
-                  methodName,
-                  [methodName.name, typeReference.name]);
-              return null;
-            }
-          }
-        }
-
-        targetTypeName = targetType?.displayName;
-        ErrorCode proxyErrorCode = StaticTypeWarningCode.UNDEFINED_METHOD;
-
-        _recordUndefinedNode(targetType.element, proxyErrorCode, methodName,
-            [methodName.name, targetTypeName]);
-      }
-    } else if (identical(
-        errorCode, StaticTypeWarningCode.UNDEFINED_SUPER_METHOD)) {
-      // Generate the type name.
-      // The error code will never be generated via type propagation
-      DartType getSuperType(DartType type) {
-        if (type is InterfaceType) {
-          InterfaceType superclass = type.superclass;
-          if (superclass != null) return superclass;
-        }
-        return type;
-      }
-
-      DartType targetType = getSuperType(_getStaticType(target));
-      String targetTypeName = targetType?.name;
-      _resolver.errorReporter.reportErrorForNode(
-          StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
-          methodName,
-          [methodName.name, targetTypeName]);
-    } else if (identical(errorCode, StaticWarningCode.USE_OF_VOID_RESULT)) {
-      _resolver.errorReporter.reportErrorForNode(
-          StaticWarningCode.USE_OF_VOID_RESULT, target ?? methodName, []);
-    }
-    return null;
+  void visitMethodInvocation(MethodInvocation node) {
+    _methodInvocationResolver.resolve(node);
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     Expression operand = node.operand;
     String methodName = _getPostfixOperator(node);
     DartType staticType = _getStaticType(operand);
@@ -780,11 +548,10 @@
             [methodName, staticType.displayName]);
       }
     }
-    return null;
   }
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     SimpleIdentifier prefix = node.prefix;
     SimpleIdentifier identifier = node.identifier;
     //
@@ -794,7 +561,7 @@
         _isDeferredPrefix(prefix)) {
       LibraryElement importedLibrary = _getImportedLibrary(prefix);
       identifier.staticElement = importedLibrary?.loadLibraryFunction;
-      return null;
+      return;
     }
     //
     // Check to see whether the prefix is really a prefix.
@@ -810,7 +577,7 @@
         element = _resolver.nameScope.lookup(setterName, _definingLibrary);
       }
       if (element == null && _resolver.nameScope.shouldIgnoreUndefined(node)) {
-        return null;
+        return;
       }
       if (element == null) {
         if (identifier.inSetterContext()) {
@@ -818,7 +585,7 @@
               StaticTypeWarningCode.UNDEFINED_SETTER,
               identifier,
               [identifier.name, prefixElement.name]);
-          return null;
+          return;
         }
         AstNode parent = node.parent;
         if (parent is Annotation) {
@@ -832,7 +599,7 @@
               identifier,
               [identifier.name, prefixElement.name]);
         }
-        return null;
+        return;
       }
       Element accessor = element;
       if (accessor is PropertyAccessorElement && identifier.inSetterContext()) {
@@ -852,7 +619,7 @@
       if (parent is Annotation) {
         _resolveAnnotationElement(parent);
       }
-      return null;
+      return;
     }
     // May be annotation, resolve invocation of "const" constructor.
     AstNode parent = node.parent;
@@ -864,11 +631,10 @@
     // identifier and this is really equivalent to a property access node.
     //
     _resolvePropertyAccess(prefix, identifier, false);
-    return null;
   }
 
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     Token operator = node.operator;
     TokenType operatorType = operator.type;
     if (operatorType.isUserDefinableOperator ||
@@ -896,27 +662,25 @@
         }
       }
     }
-    return null;
   }
 
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     Expression target = node.realTarget;
     if (target is SuperExpression && !_isSuperInValidContext(target)) {
-      return null;
+      return;
     }
     SimpleIdentifier propertyName = node.propertyName;
     _resolvePropertyAccess(target, propertyName, node.isCascaded);
-    return null;
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     ClassElement enclosingClass = _resolver.enclosingClass;
     if (enclosingClass == null) {
       // TODO(brianwilkerson) Report this error.
-      return null;
+      return;
     }
     SimpleIdentifier name = node.constructorName;
     ConstructorElement element;
@@ -928,7 +692,7 @@
     if (element == null) {
       // TODO(brianwilkerson) Report this error and decide what element to
       // associate with the node.
-      return null;
+      return;
     }
     if (name != null) {
       name.staticElement = element;
@@ -940,41 +704,39 @@
     if (parameters != null) {
       argumentList.correspondingStaticParameters = parameters;
     }
-    return null;
   }
 
   @override
-  Object visitSimpleFormalParameter(SimpleFormalParameter node) {
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
     _resolveMetadataForParameter(node);
-    return null;
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     //
     // Synthetic identifiers have been already reported during parsing.
     //
     if (node.isSynthetic) {
-      return null;
+      return;
     }
     //
     // Ignore nodes that should have been resolved before getting here.
     //
     if (node.inDeclarationContext()) {
-      return null;
+      return;
     }
     if (node.staticElement is LocalVariableElement ||
         node.staticElement is ParameterElement) {
-      return null;
+      return;
     }
     AstNode parent = node.parent;
     if (parent is FieldFormalParameter) {
-      return null;
+      return;
     } else if (parent is ConstructorFieldInitializer &&
         parent.fieldName == node) {
-      return null;
+      return;
     } else if (parent is Annotation && parent.constructorName == node) {
-      return null;
+      return;
     }
     //
     // The name dynamic denotes a Type object even though dynamic is not a
@@ -983,7 +745,7 @@
     if (node.name == _dynamicType.name) {
       node.staticElement = _dynamicType.element;
       node.staticType = _typeType;
-      return null;
+      return;
     }
     //
     // Otherwise, the node should be resolved.
@@ -1039,21 +801,20 @@
     if (parent is Annotation) {
       _resolveAnnotationElement(parent);
     }
-    return null;
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     ClassElementImpl enclosingClass =
         AbstractClassElementImpl.getImpl(_resolver.enclosingClass);
     if (enclosingClass == null) {
       // TODO(brianwilkerson) Report this error.
-      return null;
+      return;
     }
     InterfaceType superType = enclosingClass.supertype;
     if (superType == null) {
       // TODO(brianwilkerson) Report this error.
-      return null;
+      return;
     }
     SimpleIdentifier name = node.constructorName;
     String superName = name?.name;
@@ -1071,7 +832,7 @@
             node,
             [superType.displayName]);
       }
-      return null;
+      return;
     } else {
       if (element.isFactory) {
         _resolver.errorReporter.reportErrorForNode(
@@ -1085,11 +846,11 @@
     // TODO(brianwilkerson) Defer this check until we know there's an error (by
     // in-lining _resolveArgumentsToFunction below).
     ClassDeclaration declaration =
-        node.getAncestor((AstNode node) => node is ClassDeclaration);
+        node.thisOrAncestorOfType<ClassDeclaration>();
     Identifier superclassName = declaration.extendsClause?.superclass?.name;
     if (superclassName != null &&
         _resolver.nameScope.shouldIgnoreUndefined(superclassName)) {
-      return null;
+      return;
     }
     ArgumentList argumentList = node.argumentList;
     List<ParameterElement> parameters = _resolveArgumentsToFunction(
@@ -1097,121 +858,25 @@
     if (parameters != null) {
       argumentList.correspondingStaticParameters = parameters;
     }
-    return null;
   }
 
   @override
-  Object visitSuperExpression(SuperExpression node) {
+  void visitSuperExpression(SuperExpression node) {
     if (!_isSuperInValidContext(node)) {
       _resolver.errorReporter.reportErrorForNode(
           CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, node);
     }
-    return super.visitSuperExpression(node);
+    super.visitSuperExpression(node);
   }
 
   @override
-  Object visitTypeParameter(TypeParameter node) {
+  void visitTypeParameter(TypeParameter node) {
     resolveMetadata(node);
-    return null;
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     resolveMetadata(node);
-    return null;
-  }
-
-  /**
-   * Given that we have found code to invoke the given [element], return the
-   * error code that should be reported, or `null` if no error should be
-   * reported. The [target] is the target of the invocation, or `null` if there
-   * was no target. The flag [useStaticContext] should be `true` if the
-   * invocation is in a static constant (does not have access to instance state).
-   */
-  ErrorCode _checkForInvocationError(Expression target, bool useStaticContext,
-      Element element, DartType type, String name) {
-    // Prefix is not declared, instead "prefix.id" are declared.
-    if (element is PrefixElement) {
-      return CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT;
-    } else if (element is PropertyAccessorElement) {
-      //
-      // This is really a function expression invocation.
-      //
-      // TODO(brianwilkerson) Consider the possibility of re-writing the AST.
-      FunctionType getterType = element.type;
-      if (getterType != null) {
-        DartType returnType = getterType.returnType;
-        return _getErrorCodeForExecuting(returnType);
-      }
-    } else if (element is ExecutableElement) {
-      return null;
-    } else if (element is MultiplyDefinedElement) {
-      // The error has already been reported
-      return null;
-    } else if (element == null && target is SuperExpression) {
-      // TODO(jwren) We should split the UNDEFINED_METHOD into two error codes,
-      // this one, and a code that describes the situation where the method was
-      // found, but it was not accessible from the current library.
-      return StaticTypeWarningCode.UNDEFINED_SUPER_METHOD;
-    } else {
-      //
-      // This is really a function expression invocation.
-      //
-      // TODO(brianwilkerson) Consider the possibility of re-writing the AST.
-      if (element is PropertyInducingElement) {
-        PropertyAccessorElement getter = element.getter;
-        FunctionType getterType = getter.type;
-        if (getterType != null) {
-          DartType returnType = getterType.returnType;
-          return _getErrorCodeForExecuting(returnType);
-        }
-      } else if (element is VariableElement) {
-        return _getErrorCodeForExecuting(type);
-      } else {
-        if (target == null) {
-          ClassElement enclosingClass = _resolver.enclosingClass;
-          if (enclosingClass == null) {
-            return StaticTypeWarningCode.UNDEFINED_FUNCTION;
-          } else if (element == null) {
-            // Proxy-conditional warning, based on state of
-            // resolver.getEnclosingClass()
-            return StaticTypeWarningCode.UNDEFINED_METHOD;
-          } else {
-            return StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION;
-          }
-        } else {
-          DartType targetType;
-          if (useStaticContext) {
-            targetType = _getStaticType(target);
-          } else {
-            // Compute and use the propagated type, if it is null, then it may
-            // be the case that static type is some type, in which the static
-            // type should be used.
-            targetType = _getBestType(target);
-          }
-          if (targetType == null) {
-            if (target is Identifier &&
-                _resolver.nameScope.shouldIgnoreUndefined(target)) {
-              return null;
-            }
-            return StaticTypeWarningCode.UNDEFINED_FUNCTION;
-          } else if (targetType.isVoid) {
-            return StaticWarningCode.USE_OF_VOID_RESULT;
-          } else if (!targetType.isDynamic && target is! NullLiteral) {
-            // Proxy-conditional warning, based on state of
-            // targetType.getElement()
-            return StaticTypeWarningCode.UNDEFINED_METHOD;
-          } else if (targetType.isDynamic) {
-            PropertyAccessorElement getter =
-                _resolver.typeProvider.objectType.getGetter(name);
-            if (getter != null && getter.returnType is! FunctionType) {
-              return StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION;
-            }
-          }
-        }
-      }
-    }
-    return null;
   }
 
   /**
@@ -1275,50 +940,6 @@
   }
 
   /**
-   * If the given [element] is a setter, return the getter associated with it.
-   * Otherwise, return the element unchanged.
-   */
-  Element _convertSetterToGetter(Element element) {
-    // TODO(brianwilkerson) Determine whether and why the element could ever be
-    // a setter.
-    if (element is PropertyAccessorElement) {
-      return element.variable.getter;
-    }
-    return element;
-  }
-
-  /**
-   * Return the best type of the given [expression] that is to be used for
-   * type analysis.
-   */
-  DartType _getBestType(Expression expression) {
-    DartType bestType = _resolveTypeParameter(expression.staticType);
-    if (bestType is FunctionType) {
-      //
-      // All function types are subtypes of 'Function', which is itself a
-      // subclass of 'Object'.
-      //
-      bestType = _resolver.typeProvider.functionType;
-    }
-    return bestType;
-  }
-
-  /**
-   * Return an error if the [type], which is presumably being invoked, is not a
-   * function. The errors for non functions may be broken up by type; currently,
-   * it returns a special value for when the type is `void`.
-   */
-  ErrorCode _getErrorCodeForExecuting(DartType type) {
-    if (_isExecutableType(type)) {
-      return null;
-    }
-
-    return type.isVoid
-        ? StaticWarningCode.USE_OF_VOID_RESULT
-        : StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION;
-  }
-
-  /**
    * Assuming that the given [identifier] is a prefix for a deferred import,
    * return the library that is being imported.
    */
@@ -1330,28 +951,6 @@
   }
 
   /**
-   * Given an element, computes the type of the invocation.
-   *
-   * For executable elements (like methods, functions) this is just their type.
-   *
-   * For variables it is their type taking into account any type promotion.
-   *
-   * For calls to getters in Dart, we invoke the function that is returned by
-   * the getter, so the invoke type is the getter's returnType.
-   */
-  DartType _getInvokeType(Element element) {
-    DartType invokeType;
-    if (element is PropertyAccessorElement) {
-      invokeType = element.returnType;
-    } else if (element is ExecutableElement) {
-      invokeType = element.type;
-    } else if (element is VariableElement) {
-      invokeType = _promoteManager.getStaticType(element);
-    }
-    return invokeType ?? DynamicTypeImpl.instance;
-  }
-
-  /**
    * Return the name of the method invoked by the given postfix [expression].
    */
   String _getPostfixOperator(PostfixExpression expression) =>
@@ -1461,25 +1060,6 @@
   }
 
   /**
-   * Return `true` if the given [type] represents an object that could be
-   * invoked using the call operator '()'.
-   */
-  bool _isExecutableType(DartType type) {
-    type = type?.resolveToBound(_resolver.typeProvider.objectType);
-    if (type.isDynamic || type is FunctionType) {
-      return true;
-    } else if (type.isDartCoreFunction) {
-      return true;
-    } else if (type is InterfaceType) {
-      ClassElement classElement = type.element;
-      MethodElement methodElement = classElement.lookUpMethod(
-          FunctionElement.CALL_METHOD_NAME, _definingLibrary);
-      return methodElement != null;
-    }
-    return false;
-  }
-
-  /**
    * Return `true` if the given [element] is a static element.
    */
   bool _isStatic(Element element) {
@@ -1582,18 +1162,18 @@
 
   /**
    * Look up the [FunctionType] of a getter or a method with the given [name]
-   * in the given [targetType].  The [target] is the target of the invocation,
-   * or `null` if there is no target.
+   * in the given [targetType].
    */
-  FunctionType _lookUpGetterType(
-      Expression target, DartType targetType, String name) {
+  FunctionType _lookUpGetterType(DartType targetType, String name,
+      {bool concrete: false, bool forSuper: false}) {
     targetType = _resolveTypeParameter(targetType);
     if (targetType is InterfaceType) {
       var nameObject = new Name(_definingLibrary.source.uri, name);
       return _inheritance.getMember(
         targetType,
         nameObject,
-        forSuper: target is SuperExpression,
+        concrete: concrete,
+        forSuper: forSuper,
       );
     }
     return null;
@@ -1632,41 +1212,6 @@
   }
 
   /**
-   * Return the binary operator that is invoked by the given compound assignment
-   * [operator].
-   */
-  TokenType _operatorFromCompoundAssignment(TokenType operator) {
-    if (operator == TokenType.AMPERSAND_EQ) {
-      return TokenType.AMPERSAND;
-    } else if (operator == TokenType.BAR_EQ) {
-      return TokenType.BAR;
-    } else if (operator == TokenType.CARET_EQ) {
-      return TokenType.CARET;
-    } else if (operator == TokenType.GT_GT_EQ) {
-      return TokenType.GT_GT;
-    } else if (operator == TokenType.LT_LT_EQ) {
-      return TokenType.LT_LT;
-    } else if (operator == TokenType.MINUS_EQ) {
-      return TokenType.MINUS;
-    } else if (operator == TokenType.PERCENT_EQ) {
-      return TokenType.PERCENT;
-    } else if (operator == TokenType.PLUS_EQ) {
-      return TokenType.PLUS;
-    } else if (operator == TokenType.SLASH_EQ) {
-      return TokenType.SLASH;
-    } else if (operator == TokenType.STAR_EQ) {
-      return TokenType.STAR;
-    } else if (operator == TokenType.TILDE_SLASH_EQ) {
-      return TokenType.TILDE_SLASH;
-    } else {
-      // Internal error: Unmapped assignment operator.
-      AnalysisEngine.instance.logger.logError(
-          "Failed to map ${operator.lexeme} to it's corresponding operator");
-      return operator;
-    }
-  }
-
-  /**
    * Record that the given [node] is undefined, causing an error to be reported
    * if appropriate. The [declaringElement] is the element inside which no
    * declaration was found. If this element is a proxy, no error will be
@@ -1752,8 +1297,7 @@
       }
       // Class(args)
       if (element1 is ClassElement) {
-        constructor = new InterfaceTypeImpl(element1)
-            .lookUpConstructor(null, _definingLibrary);
+        constructor = element1.type.lookUpConstructor(null, _definingLibrary);
       } else if (element1 == null) {
         undefined = true;
       }
@@ -1781,8 +1325,8 @@
       }
       // Class.constructor(args)
       if (element1 is ClassElement) {
-        constructor = new InterfaceTypeImpl(element1)
-            .lookUpConstructor(nameNode2.name, _definingLibrary);
+        constructor =
+            element1.type.lookUpConstructor(nameNode2.name, _definingLibrary);
         nameNode2.staticElement = constructor;
       }
       if (element1 == null && element2 == null) {
@@ -1807,8 +1351,7 @@
           return;
         }
         // prefix.Class.constructor(args)
-        constructor = new InterfaceTypeImpl(element2)
-            .lookUpConstructor(name3, _definingLibrary);
+        constructor = element2.type.lookUpConstructor(name3, _definingLibrary);
         nameNode3.staticElement = constructor;
       } else if (element2 == null) {
         undefined = true;
@@ -1894,12 +1437,14 @@
     Expression leftOperand = node.leftOperand;
     if (leftOperand != null) {
       DartType leftType = _getStaticType(leftOperand);
-      var invokeType = _lookUpGetterType(leftOperand, leftType, methodName);
+      var isSuper = leftOperand is SuperExpression;
+      var invokeType = _lookUpGetterType(leftType, methodName,
+          concrete: isSuper, forSuper: isSuper);
       var invokeElement = invokeType?.element;
       node.staticElement = invokeElement;
       node.staticInvokeType = invokeType;
       if (_shouldReportMissingMember(leftType, invokeElement)) {
-        if (leftOperand is SuperExpression) {
+        if (isSuper) {
           _recordUndefinedToken(
               leftType.element,
               StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
@@ -1978,103 +1523,6 @@
   }
 
   /**
-   * Given an invocation of the form 'm(a1, ..., an)', resolve 'm' to the
-   * element being invoked. If the returned element is a method, then the method
-   * will be invoked. If the returned element is a getter, the getter will be
-   * invoked without arguments and the result of that invocation will then be
-   * invoked with the arguments. The [methodName] is the name of the method
-   * being invoked ('m').
-   */
-  Element _resolveInvokedElement(SimpleIdentifier methodName) {
-    //
-    // Look first in the lexical scope.
-    //
-    Element element = _resolver.nameScope.lookup(methodName, _definingLibrary);
-    if (element == null) {
-      //
-      // If it isn't defined in the lexical scope, and the invocation is within
-      // a class, then look in the inheritance scope.
-      //
-      ClassElement enclosingClass = _resolver.enclosingClass;
-      if (enclosingClass != null) {
-        InterfaceType enclosingType = enclosingClass.type;
-        element = _lookUpMethod(null, enclosingType, methodName.name);
-        if (element == null) {
-          //
-          // If there's no method, then it's possible that 'm' is a getter that
-          // returns a function.
-          //
-          element = _lookUpGetter(null, enclosingType, methodName.name);
-        }
-      }
-    }
-    // TODO(brianwilkerson) Report this error.
-    return element;
-  }
-
-  /**
-   * Given an invocation of the form 'e.m(a1, ..., an)', resolve 'e.m' to the
-   * element being invoked. If the returned element is a method, then the method
-   * will be invoked. If the returned element is a getter, the getter will be
-   * invoked without arguments and the result of that invocation will then be
-   * invoked with the arguments. The [target] is the target of the invocation
-   * ('e'). The [targetType] is the type of the target. The [methodName] is th
-   * name of the method being invoked ('m').  [isConditional] indicates
-   * whether the invocation uses a '?.' operator.
-   */
-  Element _resolveInvokedElementWithTarget(Expression target,
-      DartType targetType, SimpleIdentifier methodName, bool isConditional) {
-    String name = methodName.name;
-    if (targetType is InterfaceType) {
-      Element element = _lookUpMethod(target, targetType, name);
-      if (element == null) {
-        //
-        // If there's no method, then it's possible that 'm' is a getter that
-        // returns a function.
-        //
-        // TODO (collinsn): need to add union type support here too, in the
-        // style of [lookUpMethod].
-        element = _lookUpGetter(target, targetType, name);
-      }
-      return element;
-    } else if (targetType is FunctionType &&
-        _resolver.typeProvider.isObjectMethod(name)) {
-      return _resolver.typeProvider.objectType.element.getMethod(name);
-    } else if (target is SimpleIdentifier) {
-      Element targetElement = target.staticElement;
-      if (targetType is FunctionType &&
-          name == FunctionElement.CALL_METHOD_NAME) {
-        return targetElement;
-      }
-      if (targetElement is PrefixElement) {
-        if (isConditional) {
-          _resolver.errorReporter.reportErrorForNode(
-              CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
-              target,
-              [target.name]);
-        }
-        //
-        // Look to see whether the name of the method is really part of a
-        // prefixed identifier for an imported top-level function or top-level
-        // getter that returns a function.
-        //
-        Identifier functionName =
-            new PrefixedIdentifierImpl.temp(target, methodName);
-        Element element =
-            _resolver.nameScope.lookup(functionName, _definingLibrary);
-        if (element != null) {
-          // TODO(brianwilkerson) This isn't a method invocation, it's a
-          // function invocation where the function name is a prefixed
-          // identifier. Consider re-writing the AST.
-          return element;
-        }
-      }
-    }
-    // TODO(brianwilkerson) Report this error.
-    return null;
-  }
-
-  /**
    * Given a [node] that can have annotations associated with it, resolve the
    * annotations in the element model representing annotations to the node.
    */
@@ -2134,10 +1582,16 @@
                 propertyName.name, _definingLibrary,
                 setter: propertyName.inSetterContext(), concrete: false);
             if (staticElement != null) {
-              _resolver.errorReporter.reportErrorForNode(
-                  CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
-                  propertyName,
-                  [staticElement.kind.displayName, propertyName.name]);
+              ClassElementImpl receiverSuperClass =
+                  AbstractClassElementImpl.getImpl(
+                staticType.element.supertype.element,
+              );
+              if (!receiverSuperClass.hasNoSuchMethod) {
+                _resolver.errorReporter.reportErrorForNode(
+                    CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
+                    propertyName,
+                    [staticElement.kind.displayName, propertyName.name]);
+              }
             }
           }
         }
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 91e3739..10894cd 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -17,6 +17,7 @@
 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -40,6 +41,7 @@
 import 'package:path/path.dart' as pathos;
 import 'package:plugin/manager.dart';
 import 'package:plugin/plugin.dart';
+import 'package:pub_semver/pub_semver.dart';
 
 export 'package:analyzer/error/listener.dart' show RecordingErrorListener;
 export 'package:analyzer/src/generated/timestamped_data.dart'
@@ -1147,10 +1149,10 @@
   AnalyzeFunctionBodiesPredicate get analyzeFunctionBodiesPredicate;
 
   /**
-   * DEPRECATED: Return the maximum number of sources for which AST structures should be
+   * Return the maximum number of sources for which AST structures should be
    * kept in the cache.
    *
-   * This setting no longer has any effect.
+   * DEPRECATED: This setting no longer has any effect.
    */
   @deprecated
   int get cacheSize;
@@ -1197,6 +1199,15 @@
   bool get enableConditionalDirectives;
 
   /**
+   * Return a list containing the names of the experiments that are enabled in
+   * the context associated with these options.
+   *
+   * The process around these experiments is described in this
+   * [doc](https://github.com/dart-lang/sdk/blob/master/docs/process/experimental-flags.md).
+   */
+  List<String> get enabledExperiments;
+
+  /**
    * Return a list of the names of the packages for which, if they define a
    * plugin, the plugin should be enabled.
    */
@@ -1301,6 +1312,12 @@
   bool get previewDart2;
 
   /**
+   * The version range for the SDK specified in `pubspec.yaml`, or `null` if
+   * there is no `pubspec.yaml` or if it does not contain an SDK range.
+   */
+  VersionConstraint get sdkVersionConstraint;
+
+  /**
    * Return the opaque signature of the options.
    *
    * The length of the list is guaranteed to equal [signatureLength].
@@ -1338,6 +1355,7 @@
    * Set the values of the cross-context options to match those in the given set
    * of [options].
    */
+  @deprecated
   void setCrossContextOptionsFrom(AnalysisOptions options);
 
   /**
@@ -1394,13 +1412,8 @@
    */
   Uint32List _signature;
 
-  /**
-   * A flag indicating whether declaration casts are allowed in [strongMode]
-   * (they are always allowed in Dart 1.0 mode).
-   *
-   * This option is deprecated and will be removed in a future release.
-   */
-  bool declarationCasts = true;
+  @override
+  VersionConstraint sdkVersionConstraint;
 
   @override
   @deprecated
@@ -1410,6 +1423,9 @@
   bool dart2jsHint = false;
 
   @override
+  List<String> enabledExperiments = const <String>[];
+
+  @override
   List<String> enabledPluginNames = const <String>[];
 
   @override
@@ -1489,13 +1505,6 @@
    */
   bool implicitDynamic = true;
 
-  // A no-op setter.
-  /**
-   * Return `true` to enable mixin declarations.
-   * https://github.com/dart-lang/language/issues/12
-   */
-  bool isMixinSupportEnabled = false;
-
   /**
    * Initialize a newly created set of analysis options to have their default
    * values.
@@ -1509,6 +1518,7 @@
   AnalysisOptionsImpl.from(AnalysisOptions options) {
     analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate;
     dart2jsHint = options.dart2jsHint;
+    enabledExperiments = options.enabledExperiments;
     enabledPluginNames = options.enabledPluginNames;
     enableLazyAssignmentOperators = options.enableLazyAssignmentOperators;
     enableTiming = options.enableTiming;
@@ -1522,15 +1532,14 @@
     preserveComments = options.preserveComments;
     useFastaParser = options.useFastaParser;
     if (options is AnalysisOptionsImpl) {
-      declarationCasts = options.declarationCasts;
       strongModeHints = options.strongModeHints;
       implicitCasts = options.implicitCasts;
       implicitDynamic = options.implicitDynamic;
-      isMixinSupportEnabled = options.isMixinSupportEnabled;
     }
     trackCacheDependencies = options.trackCacheDependencies;
     disableCacheFlushing = options.disableCacheFlushing;
     patchPaths = options.patchPaths;
+    sdkVersionConstraint = options.sdkVersionConstraint;
   }
 
   bool get analyzeFunctionBodies {
@@ -1645,6 +1654,16 @@
     _excludePatterns = patterns;
   }
 
+  /**
+   * Return `true` to enable mixin declarations.
+   * https://github.com/dart-lang/language/issues/12
+   */
+  @deprecated
+  bool get isMixinSupportEnabled => true;
+
+  @deprecated
+  set isMixinSupportEnabled(bool value) {}
+
   @override
   List<Linter> get lintRules => _lintRules ??= const <Linter>[];
 
@@ -1656,9 +1675,11 @@
     _lintRules = rules;
   }
 
+  @deprecated
   @override
   bool get previewDart2 => true;
 
+  @deprecated
   set previewDart2(bool value) {}
 
   @override
@@ -1666,15 +1687,23 @@
     if (_signature == null) {
       ApiSignature buffer = new ApiSignature();
 
+      // Append environment.
+      if (sdkVersionConstraint != null) {
+        buffer.addString(sdkVersionConstraint.toString());
+      }
+
       // Append boolean flags.
-      buffer.addBool(declarationCasts);
       buffer.addBool(enableLazyAssignmentOperators);
       buffer.addBool(implicitCasts);
       buffer.addBool(implicitDynamic);
       buffer.addBool(strongModeHints);
       buffer.addBool(useFastaParser);
-      buffer.addBool(previewDart2);
-      buffer.addBool(isMixinSupportEnabled);
+
+      // Append enabled experiments.
+      buffer.addInt(enabledExperiments.length);
+      for (String experimentName in enabledExperiments) {
+        buffer.addString(experimentName);
+      }
 
       // Append error processors.
       buffer.addInt(errorProcessors.length);
@@ -1721,6 +1750,12 @@
       buffer.addBool(enableLazyAssignmentOperators);
       buffer.addBool(useFastaParser);
 
+      // Append enabled experiments.
+      buffer.addInt(enabledExperiments.length);
+      for (String experimentName in enabledExperiments) {
+        buffer.addString(experimentName);
+      }
+
       // Hash and convert to Uint32List.
       List<int> bytes = buffer.toByteList();
       _unlinkedSignature = new Uint8List.fromList(bytes).buffer.asUint32List();
@@ -1730,9 +1765,9 @@
 
   @override
   void resetToDefaults() {
-    declarationCasts = true;
     dart2jsHint = false;
     disableCacheFlushing = false;
+    enabledExperiments = const <String>[];
     enabledPluginNames = const <String>[];
     enableLazyAssignmentOperators = false;
     enableTiming = false;
@@ -1749,9 +1784,10 @@
     preserveComments = true;
     strongModeHints = false;
     trackCacheDependencies = true;
-    useFastaParser = false;
+    useFastaParser = true;
   }
 
+  @deprecated
   @override
   void setCrossContextOptionsFrom(AnalysisOptions options) {
     enableLazyAssignmentOperators = options.enableLazyAssignmentOperators;
@@ -2686,7 +2722,7 @@
  * An visitor that removes any resolution information from an AST structure when
  * used to visit that structure.
  */
-class ResolutionEraser extends GeneralizingAstVisitor<Object> {
+class ResolutionEraser extends GeneralizingAstVisitor<void> {
   /**
    * A flag indicating whether the elements associated with declarations should
    * be erased.
@@ -2694,122 +2730,122 @@
   bool eraseDeclarations = true;
 
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     node.staticElement = null;
-    return super.visitAssignmentExpression(node);
+    super.visitAssignmentExpression(node);
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     node.staticElement = null;
-    return super.visitBinaryExpression(node);
+    super.visitBinaryExpression(node);
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     node.target = null;
-    return super.visitBreakStatement(node);
+    super.visitBreakStatement(node);
   }
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     if (eraseDeclarations) {
       node.element = null;
     }
-    return super.visitCompilationUnit(node);
+    super.visitCompilationUnit(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     if (eraseDeclarations) {
-      node.element = null;
+      (node as ConstructorDeclarationImpl).declaredElement = null;
     }
-    return super.visitConstructorDeclaration(node);
+    super.visitConstructorDeclaration(node);
   }
 
   @override
-  Object visitConstructorName(ConstructorName node) {
+  void visitConstructorName(ConstructorName node) {
     node.staticElement = null;
-    return super.visitConstructorName(node);
+    super.visitConstructorName(node);
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     node.target = null;
-    return super.visitContinueStatement(node);
+    super.visitContinueStatement(node);
   }
 
   @override
-  Object visitDirective(Directive node) {
+  void visitDirective(Directive node) {
     if (eraseDeclarations) {
       node.element = null;
     }
-    return super.visitDirective(node);
+    super.visitDirective(node);
   }
 
   @override
-  Object visitExpression(Expression node) {
+  void visitExpression(Expression node) {
     node.staticType = null;
-    return super.visitExpression(node);
+    super.visitExpression(node);
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (eraseDeclarations) {
-      node.element = null;
+      (node as FunctionExpressionImpl).declaredElement = null;
     }
-    return super.visitFunctionExpression(node);
+    super.visitFunctionExpression(node);
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     node.staticElement = null;
-    return super.visitFunctionExpressionInvocation(node);
+    super.visitFunctionExpressionInvocation(node);
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     node.staticElement = null;
-    return super.visitIndexExpression(node);
+    super.visitIndexExpression(node);
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     node.staticElement = null;
-    return super.visitInstanceCreationExpression(node);
+    super.visitInstanceCreationExpression(node);
   }
 
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     node.staticElement = null;
-    return super.visitPostfixExpression(node);
+    super.visitPostfixExpression(node);
   }
 
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     node.staticElement = null;
-    return super.visitPrefixExpression(node);
+    super.visitPrefixExpression(node);
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     node.staticElement = null;
-    return super.visitRedirectingConstructorInvocation(node);
+    super.visitRedirectingConstructorInvocation(node);
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (eraseDeclarations || !node.inDeclarationContext()) {
       node.staticElement = null;
     }
-    return super.visitSimpleIdentifier(node);
+    super.visitSimpleIdentifier(node);
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     node.staticElement = null;
-    return super.visitSuperConstructorInvocation(node);
+    super.visitSuperConstructorInvocation(node);
   }
 
   /**
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 207515d..7992ecf 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -34,7 +34,7 @@
  * A visitor used to traverse an AST structure looking for additional errors and
  * warnings not covered by the parser and resolver.
  */
-class ErrorVerifier extends RecursiveAstVisitor<Object> {
+class ErrorVerifier extends RecursiveAstVisitor<void> {
   /**
    * The error reporter by which errors will be reported.
    */
@@ -328,38 +328,38 @@
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     _checkForInvalidAnnotationFromDeferredLibrary(node);
     _checkForMissingJSLibAnnotation(node);
-    return super.visitAnnotation(node);
+    super.visitAnnotation(node);
   }
 
   @override
-  Object visitArgumentList(ArgumentList node) {
+  void visitArgumentList(ArgumentList node) {
     _checkForArgumentTypesNotAssignableInList(node);
-    return super.visitArgumentList(node);
+    super.visitArgumentList(node);
   }
 
   @override
-  Object visitAsExpression(AsExpression node) {
+  void visitAsExpression(AsExpression node) {
     _checkForTypeAnnotationDeferredClass(node.type);
-    return super.visitAsExpression(node);
+    super.visitAsExpression(node);
   }
 
   @override
-  Object visitAssertInitializer(AssertInitializer node) {
+  void visitAssertInitializer(AssertInitializer node) {
     _checkForNonBoolExpression(node);
-    return super.visitAssertInitializer(node);
+    super.visitAssertInitializer(node);
   }
 
   @override
-  Object visitAssertStatement(AssertStatement node) {
+  void visitAssertStatement(AssertStatement node) {
     _checkForNonBoolExpression(node);
-    return super.visitAssertStatement(node);
+    super.visitAssertStatement(node);
   }
 
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     TokenType operatorType = node.operator.type;
     Expression lhs = node.leftHandSide;
     Expression rhs = node.rightHandSide;
@@ -371,20 +371,20 @@
       _checkForArgumentTypeNotAssignableForArgument(rhs);
     }
     _checkForAssignmentToFinal(lhs);
-    return super.visitAssignmentExpression(node);
+    super.visitAssignmentExpression(node);
   }
 
   @override
-  Object visitAwaitExpression(AwaitExpression node) {
+  void visitAwaitExpression(AwaitExpression node) {
     if (!_inAsync) {
       _errorReporter.reportErrorForToken(
           CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, node.awaitKeyword);
     }
-    return super.visitAwaitExpression(node);
+    super.visitAwaitExpression(node);
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     Token operator = node.operator;
     TokenType type = operator.type;
     if (type == TokenType.AMPERSAND_AMPERSAND || type == TokenType.BAR_BAR) {
@@ -398,22 +398,22 @@
       _checkForArgumentTypeNotAssignableForArgument(node.rightOperand);
     }
     _checkForUseOfVoidResult(node.leftOperand);
-    return super.visitBinaryExpression(node);
+    super.visitBinaryExpression(node);
   }
 
   @override
-  Object visitBlock(Block node) {
+  void visitBlock(Block node) {
     _hiddenElements = new HiddenElements(_hiddenElements, node);
     try {
       _checkDuplicateDeclarationInStatements(node.statements);
-      return super.visitBlock(node);
+      super.visitBlock(node);
     } finally {
       _hiddenElements = _hiddenElements.outerElements;
     }
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     bool wasInAsync = _inAsync;
     bool wasInGenerator = _inGenerator;
     bool previousHasReturnWithoutValue = _hasReturnWithoutValue;
@@ -434,11 +434,10 @@
       _returnsWithout = previousReturnsWithout;
       _hasReturnWithoutValue = previousHasReturnWithoutValue;
     }
-    return null;
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     SimpleIdentifier labelNode = node.label;
     if (labelNode != null) {
       Element labelElement = labelNode.staticElement;
@@ -447,24 +446,23 @@
             ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER, labelNode);
       }
     }
-    return null;
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     _checkDuplicateDefinitionInCatchClause(node);
     bool previousIsInCatchClause = _isInCatchClause;
     try {
       _isInCatchClause = true;
       _checkForTypeAnnotationDeferredClass(node.exceptionType);
-      return super.visitCatchClause(node);
+      super.visitCatchClause(node);
     } finally {
       _isInCatchClause = previousIsInCatchClause;
     }
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     ClassElementImpl outerClass = _enclosingClass;
     try {
       _isInNativeClass = node.nativeClause != null;
@@ -491,7 +489,7 @@
       _initializeInitialFieldElementsMap(_enclosingClass.fields);
       _checkForFinalNotInitializedInClass(members);
       _checkForBadFunctionUse(node);
-      return super.visitClassDeclaration(node);
+      super.visitClassDeclaration(node);
     } finally {
       _isInNativeClass = false;
       _initialFieldElementsMap = null;
@@ -500,7 +498,7 @@
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     _checkForBuiltInIdentifierAsName(
         node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME);
     ClassElementImpl outerClassElement = _enclosingClass;
@@ -511,37 +509,37 @@
     } finally {
       _enclosingClass = outerClassElement;
     }
-    return super.visitClassTypeAlias(node);
+    super.visitClassTypeAlias(node);
   }
 
   @override
-  Object visitComment(Comment node) {
+  void visitComment(Comment node) {
     _isInComment = true;
     try {
-      return super.visitComment(node);
+      super.visitComment(node);
     } finally {
       _isInComment = false;
     }
   }
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     _checkDuplicateUnitMembers(node);
     _checkForDeferredPrefixCollisions(node);
-    return super.visitCompilationUnit(node);
+    super.visitCompilationUnit(node);
   }
 
   @override
-  Object visitConditionalExpression(ConditionalExpression node) {
+  void visitConditionalExpression(ConditionalExpression node) {
     _checkForNonBoolCondition(node.condition);
     // TODO(mfairhurst) Enable this and get code compliant.
     //_checkForUseOfVoidResult(node.thenExpression);
     //_checkForUseOfVoidResult(node.elseExpression);
-    return super.visitConditionalExpression(node);
+    super.visitConditionalExpression(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     try {
       ConstructorElement constructorElement = node.declaredElement;
@@ -563,7 +561,7 @@
       _checkForUndefinedConstructorInInitializerImplicit(node);
       _checkForRedirectToNonConstConstructor(node, constructorElement);
       _checkForReturnInGenerativeConstructor(node);
-      return super.visitConstructorDeclaration(node);
+      super.visitConstructorDeclaration(node);
     } finally {
       _isEnclosingConstructorConst = false;
       _isInFactory = false;
@@ -572,7 +570,7 @@
   }
 
   @override
-  Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     _isInConstructorInitializer = true;
     try {
       SimpleIdentifier fieldName = node.fieldName;
@@ -581,14 +579,14 @@
       if (staticElement is FieldElement) {
         _checkForFieldInitializerNotAssignable(node, staticElement);
       }
-      return super.visitConstructorFieldInitializer(node);
+      super.visitConstructorFieldInitializer(node);
     } finally {
       _isInConstructorInitializer = false;
     }
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     SimpleIdentifier labelNode = node.label;
     if (labelNode != null) {
       Element labelElement = labelNode.staticElement;
@@ -598,36 +596,35 @@
             ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH, labelNode);
       }
     }
-    return null;
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     _checkForInvalidAssignment(node.identifier, node.defaultValue);
     _checkForDefaultValueInFunctionTypedParameter(node);
-    return super.visitDefaultFormalParameter(node);
+    super.visitDefaultFormalParameter(node);
   }
 
   @override
-  Object visitDoStatement(DoStatement node) {
+  void visitDoStatement(DoStatement node) {
     _checkForNonBoolCondition(node.condition);
-    return super.visitDoStatement(node);
+    super.visitDoStatement(node);
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     ClassElement outerEnum = _enclosingEnum;
     try {
       _enclosingEnum = node.declaredElement;
       _checkDuplicateEnumMembers(node);
-      return super.visitEnumDeclaration(node);
+      super.visitEnumDeclaration(node);
     } finally {
       _enclosingEnum = outerEnum;
     }
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     ExportElement exportElement = node.element;
     if (exportElement != null) {
       LibraryElement exportedLibrary = exportElement.exportedLibrary;
@@ -635,11 +632,11 @@
       _checkForExportDuplicateLibraryName(node, exportElement, exportedLibrary);
       _checkForExportInternalLibrary(node, exportElement);
     }
-    return super.visitExportDirective(node);
+    super.visitExportDirective(node);
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     bool wasInAsync = _inAsync;
     bool wasInGenerator = _inGenerator;
     try {
@@ -657,7 +654,7 @@
         _checkForReturnOfInvalidType(node.expression, expectedReturnType,
             isArrowFunction: true);
       }
-      return super.visitExpressionFunctionBody(node);
+      super.visitExpressionFunctionBody(node);
     } finally {
       _inAsync = wasInAsync;
       _inGenerator = wasInGenerator;
@@ -665,7 +662,7 @@
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     _isInStaticVariableDeclaration = node.isStatic;
     _isInInstanceVariableDeclaration = !_isInStaticVariableDeclaration;
     if (_isInInstanceVariableDeclaration) {
@@ -676,7 +673,7 @@
       }
     }
     try {
-      return super.visitFieldDeclaration(node);
+      super.visitFieldDeclaration(node);
     } finally {
       _isInStaticVariableDeclaration = false;
       _isInInstanceVariableDeclaration = false;
@@ -684,41 +681,41 @@
   }
 
   @override
-  Object visitFieldFormalParameter(FieldFormalParameter node) {
+  void visitFieldFormalParameter(FieldFormalParameter node) {
     _checkForValidField(node);
     _checkForConstFormalParameter(node);
     _checkForPrivateOptionalParameter(node);
     _checkForFieldInitializingFormalRedirectingConstructor(node);
     _checkForTypeAnnotationDeferredClass(node.type);
-    return super.visitFieldFormalParameter(node);
+    super.visitFieldFormalParameter(node);
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     _checkForInIterable(node);
-    return super.visitForEachStatement(node);
+    super.visitForEachStatement(node);
   }
 
   @override
-  Object visitFormalParameterList(FormalParameterList node) {
+  void visitFormalParameterList(FormalParameterList node) {
     _checkDuplicateDefinitionInParameterList(node);
     _checkUseOfCovariantInParameters(node);
-    return super.visitFormalParameterList(node);
+    super.visitFormalParameterList(node);
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     if (node.condition != null) {
       _checkForNonBoolCondition(node.condition);
     }
     if (node.variables != null) {
       _checkDuplicateVariables(node.variables);
     }
-    return super.visitForStatement(node);
+    super.visitForStatement(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement functionElement = node.declaredElement;
     if (functionElement != null &&
         functionElement.enclosingElement is! CompilationUnitElement) {
@@ -751,31 +748,31 @@
       _checkForTypeAnnotationDeferredClass(returnType);
       _checkForIllegalReturnType(returnType);
       _checkForImplicitDynamicReturn(node.name, node.declaredElement);
-      return super.visitFunctionDeclaration(node);
+      super.visitFunctionDeclaration(node);
     } finally {
       _enclosingFunction = outerFunction;
     }
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     // If this function expression is wrapped in a function declaration, don't
     // change the enclosingFunction field.
     if (node.parent is! FunctionDeclaration) {
       ExecutableElement outerFunction = _enclosingFunction;
       try {
         _enclosingFunction = node.declaredElement;
-        return super.visitFunctionExpression(node);
+        super.visitFunctionExpression(node);
       } finally {
         _enclosingFunction = outerFunction;
       }
     } else {
-      return super.visitFunctionExpression(node);
+      super.visitFunctionExpression(node);
     }
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     Expression functionExpression = node.function;
     DartType expressionType = functionExpression.staticType;
     if (!_checkForUseOfVoidResult(functionExpression) &&
@@ -787,20 +784,20 @@
       _checkTypeArguments(node);
     }
     _checkForImplicitDynamicInvoke(node);
-    return super.visitFunctionExpressionInvocation(node);
+    super.visitFunctionExpressionInvocation(node);
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     _checkForBuiltInIdentifierAsName(
         node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME);
     _checkForDefaultValueInFunctionTypeAlias(node);
     _checkForTypeAliasCannotReferenceItself_function(node);
-    return super.visitFunctionTypeAlias(node);
+    super.visitFunctionTypeAlias(node);
   }
 
   @override
-  Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     bool old = _isInFunctionTypedFormalParameter;
     _isInFunctionTypedFormalParameter = true;
     try {
@@ -828,35 +825,35 @@
             node);
       }
 
-      return super.visitFunctionTypedFormalParameter(node);
+      super.visitFunctionTypedFormalParameter(node);
     } finally {
       _isInFunctionTypedFormalParameter = old;
     }
   }
 
   @override
-  Object visitGenericTypeAlias(GenericTypeAlias node) {
+  void visitGenericTypeAlias(GenericTypeAlias node) {
     if (_hasTypedefSelfReference(node.declaredElement)) {
       _errorReporter.reportErrorForNode(
           CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, node);
     }
-    return super.visitGenericTypeAlias(node);
+    super.visitGenericTypeAlias(node);
   }
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     _checkForNonBoolCondition(node.condition);
-    return super.visitIfStatement(node);
+    super.visitIfStatement(node);
   }
 
   @override
-  Object visitImplementsClause(ImplementsClause node) {
+  void visitImplementsClause(ImplementsClause node) {
     node.interfaces.forEach(_checkForImplicitDynamicType);
-    return super.visitImplementsClause(node);
+    super.visitImplementsClause(node);
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     ImportElement importElement = node.element;
     if (node.prefix != null) {
       _checkForBuiltInIdentifierAsName(
@@ -866,17 +863,17 @@
       _checkForImportDuplicateLibraryName(node, importElement);
       _checkForImportInternalLibrary(node, importElement);
     }
-    return super.visitImportDirective(node);
+    super.visitImportDirective(node);
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     _checkForArgumentTypeNotAssignableForArgument(node.index);
-    return super.visitIndexExpression(node);
+    super.visitIndexExpression(node);
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     bool wasInConstInstanceCreation = _isInConstInstanceCreation;
     _isInConstInstanceCreation = node.isConst;
     try {
@@ -897,33 +894,33 @@
         }
       }
       _checkForImplicitDynamicType(typeName);
-      return super.visitInstanceCreationExpression(node);
+      super.visitInstanceCreationExpression(node);
     } finally {
       _isInConstInstanceCreation = wasInConstInstanceCreation;
     }
   }
 
   @override
-  Object visitIntegerLiteral(IntegerLiteral node) {
+  void visitIntegerLiteral(IntegerLiteral node) {
     _checkForOutOfRange(node);
-    return super.visitIntegerLiteral(node);
+    super.visitIntegerLiteral(node);
   }
 
   @override
-  Object visitInterpolationExpression(InterpolationExpression node) {
+  void visitInterpolationExpression(InterpolationExpression node) {
     _checkForUseOfVoidResult(node.expression);
-    return super.visitInterpolationExpression(node);
+    super.visitInterpolationExpression(node);
   }
 
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     _checkForTypeAnnotationDeferredClass(node.type);
     _checkForUseOfVoidResult(node.expression);
-    return super.visitIsExpression(node);
+    super.visitIsExpression(node);
   }
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     TypeArgumentList typeArguments = node.typeArguments;
     if (typeArguments != null) {
       if (node.isConst) {
@@ -938,11 +935,11 @@
     _checkForImplicitDynamicTypedLiteral(node);
     _checkForListElementTypeNotAssignable(node);
 
-    return super.visitListLiteral(node);
+    super.visitListLiteral(node);
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     TypeArgumentList typeArguments = node.typeArguments;
     if (typeArguments != null) {
       NodeList<TypeAnnotation> arguments = typeArguments.arguments;
@@ -957,11 +954,11 @@
     _checkForImplicitDynamicTypedLiteral(node);
     _checkForMapTypeNotAssignable(node);
     _checkForNonConstMapAsExpressionStatement(node);
-    return super.visitMapLiteral(node);
+    super.visitMapLiteral(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement previousFunction = _enclosingFunction;
     try {
       _isInStaticMethod = node.isStatic;
@@ -981,7 +978,7 @@
       _checkForIllegalReturnType(returnType);
       _checkForImplicitDynamicReturn(node, node.declaredElement);
       _checkForMustCallSuper(node);
-      return super.visitMethodDeclaration(node);
+      super.visitMethodDeclaration(node);
     } finally {
       _enclosingFunction = previousFunction;
       _isInStaticMethod = false;
@@ -989,7 +986,7 @@
   }
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     Expression target = node.realTarget;
     SimpleIdentifier methodName = node.methodName;
     if (target != null) {
@@ -1001,11 +998,11 @@
     }
     _checkTypeArguments(node);
     _checkForImplicitDynamicInvoke(node);
-    return super.visitMethodInvocation(node);
+    super.visitMethodInvocation(node);
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     // TODO(scheglov) Verify for all mixin errors.
     ClassElementImpl outerClass = _enclosingClass;
     try {
@@ -1029,7 +1026,7 @@
       _initializeInitialFieldElementsMap(_enclosingClass.fields);
       _checkForFinalNotInitializedInClass(members);
 //      _checkForBadFunctionUse(node);
-      return super.visitMixinDeclaration(node);
+      super.visitMixinDeclaration(node);
     } finally {
       _initialFieldElementsMap = null;
       _enclosingClass = outerClass;
@@ -1037,31 +1034,31 @@
   }
 
   @override
-  Object visitNativeClause(NativeClause node) {
+  void visitNativeClause(NativeClause node) {
     // TODO(brianwilkerson) Figure out the right rule for when 'native' is
     // allowed.
     if (!_isInSystemLibrary) {
       _errorReporter.reportErrorForNode(
           ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE, node);
     }
-    return super.visitNativeClause(node);
+    super.visitNativeClause(node);
   }
 
   @override
-  Object visitNativeFunctionBody(NativeFunctionBody node) {
+  void visitNativeFunctionBody(NativeFunctionBody node) {
     _checkForNativeFunctionBodyInNonSdkCode(node);
-    return super.visitNativeFunctionBody(node);
+    super.visitNativeFunctionBody(node);
   }
 
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     _checkForAssignmentToFinal(node.operand);
     _checkForIntNotAssignable(node.operand);
-    return super.visitPostfixExpression(node);
+    super.visitPostfixExpression(node);
   }
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     if (node.parent is! Annotation) {
       ClassElement typeReference =
           ElementResolver.getTypeReference(node.prefix);
@@ -1069,11 +1066,11 @@
       _checkForStaticAccessToInstanceMember(typeReference, name);
       _checkForInstanceAccessToStaticMember(typeReference, name);
     }
-    return super.visitPrefixedIdentifier(node);
+    super.visitPrefixedIdentifier(node);
   }
 
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     TokenType operatorType = node.operator.type;
     Expression operand = node.operand;
     if (operatorType == TokenType.BANG) {
@@ -1083,49 +1080,68 @@
     }
     _checkForIntNotAssignable(operand);
     _checkForUseOfVoidResult(operand);
-    return super.visitPrefixExpression(node);
+    super.visitPrefixExpression(node);
   }
 
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     ClassElement typeReference =
         ElementResolver.getTypeReference(node.realTarget);
     SimpleIdentifier propertyName = node.propertyName;
     _checkForStaticAccessToInstanceMember(typeReference, propertyName);
     _checkForInstanceAccessToStaticMember(typeReference, propertyName);
-    return super.visitPropertyAccess(node);
+    super.visitPropertyAccess(node);
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     _isInConstructorInitializer = true;
     try {
-      return super.visitRedirectingConstructorInvocation(node);
+      super.visitRedirectingConstructorInvocation(node);
     } finally {
       _isInConstructorInitializer = false;
     }
   }
 
   @override
-  Object visitRethrowExpression(RethrowExpression node) {
+  void visitRethrowExpression(RethrowExpression node) {
     _checkForRethrowOutsideCatch(node);
-    return super.visitRethrowExpression(node);
+    super.visitRethrowExpression(node);
   }
 
   @override
-  Object visitReturnStatement(ReturnStatement node) {
+  void visitReturnStatement(ReturnStatement node) {
     if (node.expression == null) {
       _returnsWithout.add(node);
     } else {
       _returnsWith.add(node);
     }
     _checkForAllReturnStatementErrorCodes(node);
-    return super.visitReturnStatement(node);
+    super.visitReturnStatement(node);
   }
 
   @override
-  Object visitSimpleFormalParameter(SimpleFormalParameter node) {
+  void visitSetLiteral(SetLiteral node) {
+    TypeArgumentList typeArguments = node.typeArguments;
+    if (typeArguments != null) {
+      if (node.isConst) {
+        NodeList<TypeAnnotation> arguments = typeArguments.arguments;
+        if (arguments.isNotEmpty) {
+          _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
+              CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET);
+        }
+      }
+      _checkForExpectedOneSetTypeArgument(node, typeArguments);
+    }
+    _checkForImplicitDynamicTypedLiteral(node);
+    _checkForSetElementTypeNotAssignable(node);
+
+    super.visitSetLiteral(node);
+  }
+
+  @override
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
     _checkForConstFormalParameter(node);
     _checkForPrivateOptionalParameter(node);
     _checkForTypeAnnotationDeferredClass(node.type);
@@ -1138,88 +1154,87 @@
     // - FunctionTypedFormalParameter is a function type, not dynamic.
     _checkForImplicitDynamicIdentifier(node, node.identifier);
 
-    return super.visitSimpleFormalParameter(node);
+    super.visitSimpleFormalParameter(node);
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     _checkForAmbiguousImport(node);
     _checkForReferenceBeforeDeclaration(node);
     _checkForImplicitThisReferenceInInitializer(node);
-    _checkForTypeParameterIdentifierReferencedByStatic(node);
+    _checkForTypeParameterReferencedByStatic(node);
     if (!_isUnqualifiedReferenceToNonLocalStaticMemberAllowed(node)) {
       _checkForUnqualifiedReferenceToNonLocalStaticMember(node);
     }
-    return super.visitSimpleIdentifier(node);
+    super.visitSimpleIdentifier(node);
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     _isInConstructorInitializer = true;
     try {
-      return super.visitSuperConstructorInvocation(node);
+      super.visitSuperConstructorInvocation(node);
     } finally {
       _isInConstructorInitializer = false;
     }
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     _checkDuplicateDeclarationInStatements(node.statements);
-    return super.visitSwitchCase(node);
+    super.visitSwitchCase(node);
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     _checkDuplicateDeclarationInStatements(node.statements);
-    return super.visitSwitchDefault(node);
+    super.visitSwitchDefault(node);
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSwitchStatement(SwitchStatement node) {
     _checkForSwitchExpressionNotAssignable(node);
     _checkForCaseBlocksNotTerminated(node);
     _checkForMissingEnumConstantInSwitch(node);
-    return super.visitSwitchStatement(node);
+    super.visitSwitchStatement(node);
   }
 
   @override
-  Object visitThisExpression(ThisExpression node) {
+  void visitThisExpression(ThisExpression node) {
     _checkForInvalidReferenceToThis(node);
-    return super.visitThisExpression(node);
+    super.visitThisExpression(node);
   }
 
   @override
-  Object visitThrowExpression(ThrowExpression node) {
+  void visitThrowExpression(ThrowExpression node) {
     _checkForConstEvalThrowsException(node);
     _checkForUseOfVoidResult(node.expression);
-    return super.visitThrowExpression(node);
+    super.visitThrowExpression(node);
   }
 
   @override
-  Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     _checkForFinalNotInitialized(node.variables);
-    return super.visitTopLevelVariableDeclaration(node);
+    super.visitTopLevelVariableDeclaration(node);
   }
 
   @override
-  Object visitTypeArgumentList(TypeArgumentList node) {
+  void visitTypeArgumentList(TypeArgumentList node) {
     NodeList<TypeAnnotation> list = node.arguments;
     for (TypeAnnotation type in list) {
       _checkForTypeAnnotationDeferredClass(type);
     }
-    return super.visitTypeArgumentList(node);
+    super.visitTypeArgumentList(node);
   }
 
   @override
-  Object visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     _checkForTypeArgumentNotMatchingBounds(node);
-    _checkForTypeParameterReferencedByStatic(node);
-    return super.visitTypeName(node);
+    super.visitTypeName(node);
   }
 
   @override
-  Object visitTypeParameter(TypeParameter node) {
+  void visitTypeParameter(TypeParameter node) {
     _checkForBuiltInIdentifierAsName(node.name,
         CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME);
     _checkForTypeParameterSupertypeOfItsBound(node);
@@ -1227,22 +1242,21 @@
     _checkForImplicitDynamicType(node.bound);
     _checkForGenericFunctionType(node.bound);
     node.bound?.accept(_uninstantiatedBoundChecker);
-    return super.visitTypeParameter(node);
+    super.visitTypeParameter(node);
   }
 
   @override
-  Object visitTypeParameterList(TypeParameterList node) {
+  void visitTypeParameterList(TypeParameterList node) {
     _checkDuplicateDefinitionInTypeParameterList(node);
-    return super.visitTypeParameterList(node);
+    super.visitTypeParameterList(node);
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     SimpleIdentifier nameNode = node.name;
     Expression initializerNode = node.initializer;
     // do checks
-    _checkForInvalidAssignment(nameNode, initializerNode,
-        isDeclarationCast: true);
+    _checkForInvalidAssignment(nameNode, initializerNode);
     _checkForImplicitDynamicIdentifier(node, nameNode);
     // visit name
     nameNode.accept(this);
@@ -1268,36 +1282,34 @@
         _hiddenElements.declare(element);
       }
     }
-    // done
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     _checkForTypeAnnotationDeferredClass(node.type);
-    return super.visitVariableDeclarationList(node);
+    super.visitVariableDeclarationList(node);
   }
 
   @override
-  Object visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+  void visitVariableDeclarationStatement(VariableDeclarationStatement node) {
     _checkForFinalNotInitialized(node.variables);
-    return super.visitVariableDeclarationStatement(node);
+    super.visitVariableDeclarationStatement(node);
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     _checkForNonBoolCondition(node.condition);
-    return super.visitWhileStatement(node);
+    super.visitWhileStatement(node);
   }
 
   @override
-  Object visitWithClause(WithClause node) {
+  void visitWithClause(WithClause node) {
     node.mixinTypes.forEach(_checkForImplicitDynamicType);
-    return super.visitWithClause(node);
+    super.visitWithClause(node);
   }
 
   @override
-  Object visitYieldStatement(YieldStatement node) {
+  void visitYieldStatement(YieldStatement node) {
     if (_inGenerator) {
       _checkForYieldOfInvalidType(node.expression, node.star != null);
     } else {
@@ -1310,7 +1322,7 @@
       _errorReporter.reportErrorForNode(errorCode, node);
     }
     _checkForUseOfVoidResult(node.expression);
-    return super.visitYieldStatement(node);
+    super.visitYieldStatement(node);
   }
 
   /**
@@ -1330,7 +1342,6 @@
         !_checkForAllMixinErrorCodes(withClause)) {
       _checkForImplicitDynamicType(superclass);
       _checkForExtendsDeferredClass(superclass);
-      _checkForRecursiveInterfaceInheritance(_enclosingClass);
       _checkForConflictingClassMembers();
       _checkForRepeatedType(implementsClause?.interfaces,
           CompileTimeErrorCode.IMPLEMENTS_REPEATED);
@@ -1725,9 +1736,8 @@
     if (_inGenerator) {
       return;
     }
-    var returnType = _inAsync
-        ? expectedReturnType.flattenFutures(_typeSystem)
-        : expectedReturnType;
+    var returnType =
+        _inAsync ? _typeSystem.flatten(expectedReturnType) : expectedReturnType;
     if (returnType.isDynamic ||
         returnType.isDartCoreNull ||
         returnType.isVoid) {
@@ -1911,8 +1921,7 @@
             if (_checkForMixinSuperclassConstraints(
                 mixinNameIndex, mixinName)) {
               problemReported = true;
-            }
-            if (_checkForMixinSuperInvokedMembers(
+            } else if (_checkForMixinSuperInvokedMembers(
                 mixinTypeIndex, mixinName, mixinElement, mixinType)) {
               problemReported = true;
             }
@@ -2218,24 +2227,20 @@
   }
 
   bool _checkForAssignableExpression(
-      Expression expression, DartType expectedStaticType, ErrorCode errorCode,
-      {bool isDeclarationCast = false}) {
+      Expression expression, DartType expectedStaticType, ErrorCode errorCode) {
     DartType actualStaticType = getStaticType(expression);
     return actualStaticType != null &&
         _checkForAssignableExpressionAtType(
-            expression, actualStaticType, expectedStaticType, errorCode,
-            isDeclarationCast: isDeclarationCast);
+            expression, actualStaticType, expectedStaticType, errorCode);
   }
 
   bool _checkForAssignableExpressionAtType(
       Expression expression,
       DartType actualStaticType,
       DartType expectedStaticType,
-      ErrorCode errorCode,
-      {bool isDeclarationCast = false}) {
+      ErrorCode errorCode) {
     if (!_expressionIsAssignableAtType(
-        expression, actualStaticType, expectedStaticType,
-        isDeclarationCast: isDeclarationCast)) {
+        expression, actualStaticType, expectedStaticType)) {
       _errorReporter.reportTypeErrorForNode(
           errorCode, expression, [actualStaticType, expectedStaticType]);
       return false;
@@ -2565,15 +2570,26 @@
     if (constructor.factoryKeyword != null) {
       return;
     }
+
     // check for mixins
+    var hasInstanceField = false;
     for (var mixin in _enclosingClass.mixins) {
-      if (mixin.element.fields.isNotEmpty) {
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
-            constructor.returnType);
-        return;
+      var fields = mixin.element.fields;
+      for (var i = 0; i < fields.length; ++i) {
+        if (!fields[i].isStatic) {
+          hasInstanceField = true;
+          break;
+        }
       }
     }
+    if (hasInstanceField) {
+      // TODO(scheglov) Provide the list of fields.
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
+          constructor.returnType);
+      return;
+    }
+
     // try to find and check super constructor invocation
     for (ConstructorInitializer initializer in constructor.initializers) {
       if (initializer is SuperConstructorInvocation) {
@@ -2895,6 +2911,24 @@
   }
 
   /**
+   * Verify that if the given set [literal] has type arguments then there is
+   * exactly one. The [typeArguments] are the type arguments.
+   *
+   * See [StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS].
+   */
+  void _checkForExpectedOneSetTypeArgument(
+      SetLiteral literal, TypeArgumentList typeArguments) {
+    // check number of type arguments
+    int count = typeArguments.arguments.length;
+    if (count != 1) {
+      _errorReporter.reportErrorForNode(
+          StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS,
+          typeArguments,
+          [count]);
+    }
+  }
+
+  /**
    * Verify that the given export [directive] has a unique name among other
    * exported libraries. The [exportElement] is the [ExportElement] retrieved
    * from the node, if the element in the node was `null`, then this method is
@@ -3609,8 +3643,7 @@
           StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
           node.iterable,
           [iterableType, loopTypeName]);
-    } else if (!_typeSystem.isAssignableTo(bestIterableType, variableType,
-        isDeclarationCast: true)) {
+    } else if (!_typeSystem.isAssignableTo(bestIterableType, variableType)) {
       _errorReporter.reportTypeErrorForNode(
           StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
           node.iterable,
@@ -3689,8 +3722,7 @@
    *
    * See [StaticTypeWarningCode.INVALID_ASSIGNMENT].
    */
-  void _checkForInvalidAssignment(Expression lhs, Expression rhs,
-      {bool isDeclarationCast = false}) {
+  void _checkForInvalidAssignment(Expression lhs, Expression rhs) {
     if (lhs == null || rhs == null) {
       return;
     }
@@ -3704,8 +3736,7 @@
     }
 
     _checkForAssignableExpression(
-        rhs, leftType, StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        isDeclarationCast: isDeclarationCast);
+        rhs, leftType, StaticTypeWarningCode.INVALID_ASSIGNMENT);
   }
 
   /**
@@ -4154,7 +4185,7 @@
 
       var superMemberType = _inheritanceManager.getMember(
           enclosingType, nameObject,
-          forMixinIndex: mixinIndex, forSuper: true);
+          forMixinIndex: mixinIndex, concrete: true, forSuper: true);
 
       if (superMemberType == null) {
         _errorReporter.reportErrorForNode(
@@ -4321,7 +4352,7 @@
     DartType type = typeName.type;
     if (type is InterfaceType) {
       ClassElement element = type.element;
-      if (element != null && element.isEnum) {
+      if (element.isEnum || element.isMixin) {
         // We have already reported the error.
         return;
       }
@@ -4453,8 +4484,7 @@
       return;
     }
     // prepare statement
-    Statement statement =
-        literal.getAncestor((node) => node is ExpressionStatement);
+    Statement statement = literal.thisOrAncestorOfType<ExpressionStatement>();
     if (statement == null) {
       return;
     }
@@ -4685,86 +4715,6 @@
   }
 
   /**
-   * Check that [_enclosingClass] is not a superinterface to itself.
-   *  The [path] is a list containing the potentially cyclic implements path.
-   *
-   * See [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE],
-   * [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_EXTENDS],
-   * [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS],
-   * [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_ON],
-   * [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_WITH].
-   */
-  bool _checkForRecursiveInterfaceInheritance(ClassElement element,
-      [List<ClassElement> path]) {
-    path ??= <ClassElement>[];
-
-    // Detect error condition.
-    int size = path.length;
-    // If this is not the base case (size > 0), and the enclosing class is the
-    // given class element then an error an error.
-    if (size > 0 && _enclosingClass == element) {
-      String enclosingClassName = _enclosingClass.displayName;
-      if (size > 1) {
-        // Construct a string showing the cyclic implements path:
-        // "A, B, C, D, A"
-        String separator = ", ";
-        StringBuffer buffer = new StringBuffer();
-        for (int i = 0; i < size; i++) {
-          buffer.write(path[i].displayName);
-          buffer.write(separator);
-        }
-        buffer.write(element.displayName);
-        _errorReporter.reportErrorForElement(
-            CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
-            _enclosingClass,
-            [enclosingClassName, buffer.toString()]);
-        return true;
-      } else {
-        // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS or
-        // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS or
-        // RECURSIVE_INTERFACE_INHERITANCE_ON or
-        // RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH
-        _errorReporter.reportErrorForElement(_getBaseCaseErrorCode(element),
-            _enclosingClass, [enclosingClassName]);
-        return true;
-      }
-    }
-
-    if (path.indexOf(element) > 0) {
-      return false;
-    }
-    path.add(element);
-
-    // n-case
-    InterfaceType supertype = element.supertype;
-    if (supertype != null &&
-        _checkForRecursiveInterfaceInheritance(supertype.element, path)) {
-      return true;
-    }
-
-    for (InterfaceType type in element.mixins) {
-      if (_checkForRecursiveInterfaceInheritance(type.element, path)) {
-        return true;
-      }
-    }
-
-    for (InterfaceType type in element.superclassConstraints) {
-      if (_checkForRecursiveInterfaceInheritance(type.element, path)) {
-        return true;
-      }
-    }
-
-    for (InterfaceType type in element.interfaces) {
-      if (_checkForRecursiveInterfaceInheritance(type.element, path)) {
-        return true;
-      }
-    }
-
-    path.removeAt(path.length - 1);
-    return false;
-  }
-
-  /**
    * Check that the given constructor [declaration] has a valid combination of
    * redirected constructor invocation(s), super constructor invocations and
    * field initializers.
@@ -4996,8 +4946,8 @@
     var toType = expectedType;
     var fromType = expressionType;
     if (_inAsync) {
-      toType = toType.flattenFutures(_typeSystem);
-      fromType = fromType.flattenFutures(_typeSystem);
+      toType = _typeSystem.flatten(toType);
+      fromType = _typeSystem.flatten(fromType);
     }
 
     // Anything can be returned to `void` in an arrow bodied function
@@ -5032,6 +4982,41 @@
   }
 
   /**
+   * Verify that the elements in the given set [literal] are subtypes of the
+   * set's static type.
+   *
+   * See [CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE], and
+   * [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE].
+   */
+  void _checkForSetElementTypeNotAssignable(SetLiteral literal) {
+    // Determine the list's element type. We base this on the static type and
+    // not the literal's type arguments because in strong mode, the type
+    // arguments may be inferred.
+    DartType setType = literal.staticType;
+    assert(setType is InterfaceTypeImpl);
+
+    List<DartType> typeArguments = (setType as InterfaceTypeImpl).typeArguments;
+    assert(typeArguments.length == 1);
+
+    DartType setElementType = typeArguments[0];
+
+    // Check every list element.
+    bool isConst = literal.isConst;
+    for (Expression element in literal.elements) {
+      if (isConst) {
+        // TODO(paulberry): this error should be based on the actual type of the
+        // element, not the static type.  See dartbug.com/21119.
+        _checkForArgumentTypeNotAssignableWithExpectedTypes(
+            element,
+            setElementType,
+            CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE);
+      }
+      _checkForArgumentTypeNotAssignableWithExpectedTypes(element,
+          setElementType, StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE);
+    }
+  }
+
+  /**
    * Check the given [typeReference] and that the [name] is not a reference to
    * an instance member.
    *
@@ -5175,10 +5160,10 @@
                 ? argumentNodes[i]
                 : typeName;
         if (argType is FunctionType && argType.typeFormals.isNotEmpty) {
-          _errorReporter.reportTypeErrorForNode(
-              CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT,
-              argumentNode,
-              [argType.typeFormals.join(', ')]);
+          _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT,
+            argumentNode,
+          );
           continue;
         }
         DartType boundType = parameterElements[i].bound;
@@ -5213,12 +5198,11 @@
     }
   }
 
-  void _checkForTypeParameterIdentifierReferencedByStatic(
-      SimpleIdentifier identifier) {
-    var element = identifier.staticElement;
-    if (element is TypeParameterElement &&
-        element.enclosingElement is ClassElement) {
-      if (_isInStaticMethod || _isInStaticVariableDeclaration) {
+  void _checkForTypeParameterReferencedByStatic(SimpleIdentifier identifier) {
+    if (_isInStaticMethod || _isInStaticVariableDeclaration) {
+      var element = identifier.staticElement;
+      if (element is TypeParameterElement &&
+          element.enclosingElement is ClassElement) {
         // The class's type parameters are not in scope for static methods.
         // However all other type parameters are legal (e.g. the static method's
         // type parameters, or a local function's type parameters).
@@ -5229,26 +5213,6 @@
   }
 
   /**
-   * Check whether the given type [name] is a type parameter being used to
-   * define a static member.
-   *
-   * See [StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC].
-   */
-  void _checkForTypeParameterReferencedByStatic(TypeName name) {
-    if (_isInStaticMethod || _isInStaticVariableDeclaration) {
-      DartType type = name.type;
-      // The class's type parameters are not in scope for static methods.
-      // However all other type parameters are legal (e.g. the static method's
-      // type parameters, or a local function's type parameters).
-      if (type is TypeParameterType &&
-          type.element.enclosingElement is ClassElement) {
-        _errorReporter.reportErrorForNode(
-            StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, name);
-      }
-    }
-  }
-
-  /**
    * Check whether the given type [parameter] is a supertype of its bound.
    *
    * See [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND].
@@ -5666,7 +5630,6 @@
     if (!_checkForOnClauseErrorCodes(onClause) &&
         !_checkForImplementsClauseErrorCodes(implementsClause)) {
 //      _checkForImplicitDynamicType(superclass);
-      _checkForRecursiveInterfaceInheritance(_enclosingClass);
       _checkForConflictingClassMembers();
       _checkForRepeatedType(
         onClause?.superclassConstraints,
@@ -5720,10 +5683,10 @@
         DartType argType = typeArgs[i];
 
         if (argType is FunctionType && argType.typeFormals.isNotEmpty) {
-          _errorReporter.reportTypeErrorForNode(
-              CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT,
-              typeArgumentList[i],
-              [argType.typeFormals.join(', ')]);
+          _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT,
+            typeArgumentList[i],
+          );
           continue;
         }
 
@@ -5757,10 +5720,8 @@
   }
 
   bool _expressionIsAssignableAtType(Expression expression,
-      DartType actualStaticType, DartType expectedStaticType,
-      {isDeclarationCast: false}) {
-    return _typeSystem.isAssignableTo(actualStaticType, expectedStaticType,
-        isDeclarationCast: isDeclarationCast);
+      DartType actualStaticType, DartType expectedStaticType) {
+    return _typeSystem.isAssignableTo(actualStaticType, expectedStaticType);
   }
 
   InterfaceType _findInterfaceTypeForMixin(TypeName mixin,
@@ -5827,30 +5788,6 @@
   }
 
   /**
-   * Return the error code that should be used when the given class [element]
-   * references itself directly.
-   */
-  ErrorCode _getBaseCaseErrorCode(ClassElement element) {
-    if (element.supertype?.element == _enclosingClass) {
-      return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_EXTENDS;
-    }
-
-    for (InterfaceType type in element.superclassConstraints) {
-      if (type.element == _enclosingClass) {
-        return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_ON;
-      }
-    }
-
-    for (InterfaceType type in element.mixins) {
-      if (type.element == _enclosingClass) {
-        return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_WITH;
-      }
-    }
-
-    return CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS;
-  }
-
-  /**
    * Given an [expression] in a switch case whose value is expected to be an
    * enum constant, return the name of the constant.
    */
@@ -5953,14 +5890,7 @@
   }
 
   ExecutableElement _getOverriddenMember(Element member) {
-    if (member == null) {
-      return null;
-    }
-    ClassElement classElement =
-        member.getAncestor((element) => element is ClassElement);
-    if (classElement == null) {
-      return null;
-    }
+    ClassElement classElement = member.enclosingElement;
     String name = member.name;
     ClassElement superclass = classElement.supertype?.element;
     Set<ClassElement> visitedClasses = new Set<ClassElement>();
@@ -6082,7 +6012,7 @@
       return identical(parent.constructorName, identifier);
     }
     if (parent is CommentReference) {
-      return parent.newKeyword != null;
+      return true;
     }
     if (parent is ConstructorName) {
       return identical(parent.name, identifier);
@@ -6349,47 +6279,45 @@
       .firstWhere((ElementAnnotation e) => e.isRequired, orElse: () => null);
 }
 
-class _HasTypedefSelfReferenceVisitor
-    extends GeneralizingElementVisitor<Object> {
+class _HasTypedefSelfReferenceVisitor extends GeneralizingElementVisitor<void> {
   final GenericFunctionTypeElement element;
   bool hasSelfReference = false;
 
   _HasTypedefSelfReferenceVisitor(this.element);
 
   @override
-  Object visitClassElement(ClassElement element) {
+  void visitClassElement(ClassElement element) {
     // Typedefs are allowed to reference themselves via classes.
-    return null;
   }
 
   @override
-  Object visitFunctionElement(FunctionElement element) {
+  void visitFunctionElement(FunctionElement element) {
     _addTypeToCheck(element.returnType);
-    return super.visitFunctionElement(element);
+    super.visitFunctionElement(element);
   }
 
   @override
-  Object visitFunctionTypeAliasElement(FunctionTypeAliasElement element) {
+  void visitFunctionTypeAliasElement(FunctionTypeAliasElement element) {
     _addTypeToCheck(element.returnType);
-    return super.visitFunctionTypeAliasElement(element);
+    super.visitFunctionTypeAliasElement(element);
   }
 
   @override
-  Object visitGenericFunctionTypeElement(GenericFunctionTypeElement element) {
+  void visitGenericFunctionTypeElement(GenericFunctionTypeElement element) {
     _addTypeToCheck(element.returnType);
-    return super.visitGenericFunctionTypeElement(element);
+    super.visitGenericFunctionTypeElement(element);
   }
 
   @override
-  Object visitParameterElement(ParameterElement element) {
+  void visitParameterElement(ParameterElement element) {
     _addTypeToCheck(element.type);
-    return super.visitParameterElement(element);
+    super.visitParameterElement(element);
   }
 
   @override
-  Object visitTypeParameterElement(TypeParameterElement element) {
+  void visitTypeParameterElement(TypeParameterElement element) {
     _addTypeToCheck(element.bound);
-    return super.visitTypeParameterElement(element);
+    super.visitTypeParameterElement(element);
   }
 
   void _addTypeToCheck(DartType type) {
diff --git a/pkg/analyzer/lib/src/generated/package.dart b/pkg/analyzer/lib/src/generated/package.dart
deleted file mode 100644
index fba626f..0000000
--- a/pkg/analyzer/lib/src/generated/package.dart
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:collection';
-
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/builder.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:package_config/packages.dart';
-import 'package:yaml/yaml.dart';
-
-/**
- * Traverses the package structure to determine the transitive dependencies for
- * a given package.
- */
-class DependencyFinder {
-  /**
-   * The name of the pubspec.yaml file.
-   */
-  static const String pubspecName = 'pubspec.yaml';
-
-  /**
-   * The resource provider used to access the file system.
-   */
-  final ResourceProvider resourceProvider;
-
-  /**
-   * A table mapping the absolute paths of packages to a list of the names of
-   * the packages on which those packages depend.
-   */
-  final Map<String, List<String>> dependencyMap =
-      new HashMap<String, List<String>>();
-
-  /**
-   * Initialize a newly created dependency finder to use the given
-   * [resourceProvider] to access the file system.
-   */
-  DependencyFinder(this.resourceProvider);
-
-  /**
-   * Return a sorted list of the directories containing all of the packages on
-   * which the package at the given [packagePath] depends. The [packageMap]
-   * maps the names of packages to the directories in which they are contained.
-   *
-   * Throws an [AnalysisException] if any of the packages are missing their
-   * 'pubspec.yaml' file.
-   */
-  List<String> transitiveDependenciesFor(
-      Map<String, List<Folder>> packageMap, String packagePath) {
-    Set<String> processedPackages = new HashSet<String>();
-    Set<String> processedPaths = new HashSet<String>();
-    void process(String packageName) {
-      if (processedPackages.add(packageName)) {
-        List<Folder> folderList = packageMap[packageName];
-        if (folderList == null || folderList.isEmpty) {
-          throw new StateError('No mapping for package "$packageName"');
-        }
-        String packagePath = folderList[0].path;
-        processedPaths.add(packagePath);
-        List<String> dependencies = _dependenciesFor(packagePath);
-        for (String dependency in dependencies) {
-          process(dependency);
-        }
-      }
-    }
-
-    List<String> dependencies = _dependenciesFor(packagePath);
-    dependencies.forEach(process);
-    processedPaths.remove(packagePath);
-    List<String> transitiveDependencies = processedPaths.toList();
-    transitiveDependencies.sort();
-    return transitiveDependencies;
-  }
-
-  /**
-   * Add to the given set of [dependecies] all of the package names used as keys
-   * in the given [yamlMap].
-   */
-  void _collectDependencies(HashSet<String> dependencies, YamlMap yamlMap) {
-    if (yamlMap is Map) {
-      for (var key in yamlMap.keys) {
-        if (key is String) {
-          dependencies.add(key);
-        }
-      }
-    }
-  }
-
-  /**
-   * Return a list of the names of the packages on which the package at the
-   * [packagePath] depends.
-   */
-  List<String> _dependenciesFor(String packagePath) {
-    return dependencyMap.putIfAbsent(packagePath, () {
-      Set<String> dependencies = new HashSet<String>();
-      YamlNode yamlNode = _readPubspec(packagePath);
-      if (yamlNode is YamlMap) {
-        _collectDependencies(dependencies, yamlNode['dependencies']);
-      }
-      return dependencies.toList();
-    });
-  }
-
-  /**
-   * Read the content of the pubspec file in the directory at the given
-   * [directoryPath]. Return `null` if the file does not exist, cannot be read,
-   * or has content that is not valid YAML.
-   */
-  YamlNode _readPubspec(String directoryPath) {
-    try {
-      File yamlFile = resourceProvider
-          .getFolder(directoryPath)
-          .getChildAssumingFile(pubspecName);
-      String yamlContent = yamlFile.readAsStringSync();
-      return loadYamlNode(yamlContent);
-    } catch (exception, stackTrace) {
-      throw new AnalysisException('Missing $pubspecName in $directoryPath',
-          new CaughtException(exception, stackTrace));
-    }
-  }
-}
-
-/**
- * A description of the context in which a package will be analyzed.
- */
-class PackageDescription {
-  /**
-   * The id of the package being described. The id encodes the actual locations
-   * of the package itself and all of the packages on which it depends.
-   */
-  final String id;
-
-  /**
-   * The SDK against which the package will be analyzed.
-   */
-  final DartSdk sdk;
-
-  /**
-   * The analysis options that will be used when analyzing the package.
-   */
-  final AnalysisOptions options;
-
-  /**
-   * Initialize a newly create package description to describe the package with
-   * the given [id] that is being analyzed against the given [sdk] using the
-   * given [options].
-   */
-  PackageDescription(this.id, this.sdk, this.options);
-
-  @override
-  int get hashCode {
-    int hashCode = 0;
-    for (int value in options.signature) {
-      hashCode = JenkinsSmiHash.combine(hashCode, value);
-    }
-    hashCode = JenkinsSmiHash.combine(hashCode, id.hashCode);
-    hashCode = JenkinsSmiHash.combine(hashCode, sdk.hashCode);
-    return JenkinsSmiHash.finish(hashCode);
-  }
-
-  @override
-  bool operator ==(Object other) {
-    return other is PackageDescription &&
-        other.sdk == sdk &&
-        AnalysisOptions.signaturesEqual(
-            other.options.signature, options.signature) &&
-        other.id == id;
-  }
-}
-
-/**
- * Manages the contexts in which each package is analyzed.
- */
-class PackageManager {
-  /**
-   * The resource provider used to access the file system.
-   */
-  final ResourceProvider resourceProvider;
-
-  /**
-   * A table mapping the id's of packages to the context in which the package is
-   * analyzed.
-   */
-  final Map<PackageDescription, AnalysisContext> contextMap =
-      new HashMap<PackageDescription, AnalysisContext>();
-
-  /**
-   * Initialize a newly created package manager.
-   */
-  PackageManager(this.resourceProvider);
-
-  /**
-   * Return the context in which the package at the given [packagePath] should
-   * be analyzed when the given [packages] object is used to resolve package
-   * names, the given [resolver] will be used to resolve 'dart:' URI's, and the
-   * given [options] will control the analysis.
-   */
-  AnalysisContext getContext(String packagePath, Packages packages,
-      DartUriResolver resolver, AnalysisOptions options) {
-    DartSdk sdk = resolver.dartSdk;
-    Map<String, List<Folder>> packageMap =
-        new ContextBuilder(resourceProvider, null, null)
-            .convertPackagesToMap(packages);
-    PackageDescription description =
-        new PackageDescription(_buildId(packagePath, packageMap), sdk, options);
-    return contextMap.putIfAbsent(description, () {
-      AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
-      context.sourceFactory = new SourceFactory(<UriResolver>[
-        resolver,
-        new PackageMapUriResolver(resourceProvider, packageMap),
-        new ResourceUriResolver(resourceProvider)
-      ], packages, resourceProvider);
-      context.analysisOptions = options;
-      return context;
-    });
-  }
-
-  /**
-   * Return the id associated with the package at the given [packagePath] when
-   * the given [packageMap] is used to resolve package names.
-   */
-  String _buildId(String packagePath, Map<String, List<Folder>> packageMap) {
-    DependencyFinder finder = new DependencyFinder(resourceProvider);
-    List<String> dependencies =
-        finder.transitiveDependenciesFor(packageMap, packagePath);
-    StringBuffer buffer = new StringBuffer();
-    buffer.write(packagePath);
-    for (String dependency in dependencies) {
-      buffer.write(';');
-      buffer.write(dependency);
-    }
-    return buffer.toString();
-  }
-}
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index dcaf2a5..b75defe 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -12,6 +12,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
@@ -35,101 +36,65 @@
 
 part 'parser_fasta.dart';
 
-/**
- * A simple data-holder for a method that needs to return multiple values.
- */
+/// A simple data-holder for a method that needs to return multiple values.
 class CommentAndMetadata {
-  /**
-   * The documentation comment that was parsed, or `null` if none was given.
-   */
+  /// The documentation comment that was parsed, or `null` if none was given.
   final Comment comment;
 
-  /**
-   * The metadata that was parsed, or `null` if none was given.
-   */
+  /// The metadata that was parsed, or `null` if none was given.
   final List<Annotation> metadata;
 
-  /**
-   * Initialize a newly created holder with the given [comment] and [metadata].
-   */
+  /// Initialize a newly created holder with the given [comment] and [metadata].
   CommentAndMetadata(this.comment, this.metadata);
 
-  /**
-   * Return `true` if some metadata was parsed.
-   */
+  /// Return `true` if some metadata was parsed.
   bool get hasMetadata => metadata != null && metadata.isNotEmpty;
 }
 
-/**
- * A simple data-holder for a method that needs to return multiple values.
- */
+/// A simple data-holder for a method that needs to return multiple values.
 class FinalConstVarOrType {
-  /**
-   * The 'final', 'const' or 'var' keyword, or `null` if none was given.
-   */
+  /// The 'final', 'const' or 'var' keyword, or `null` if none was given.
   final Token keyword;
 
-  /**
-   * The type, or `null` if no type was specified.
-   */
+  /// The type, or `null` if no type was specified.
   final TypeAnnotation type;
 
-  /**
-   * Initialize a newly created holder with the given [keyword] and [type].
-   */
+  /// Initialize a newly created holder with the given [keyword] and [type].
   FinalConstVarOrType(this.keyword, this.type);
 }
 
-/**
- * A simple data-holder for a method that needs to return multiple values.
- */
+/// A simple data-holder for a method that needs to return multiple values.
 class Modifiers {
-  /**
-   * The token representing the keyword 'abstract', or `null` if the keyword was
-   * not found.
-   */
+  /// The token representing the keyword 'abstract', or `null` if the keyword
+  /// was not found.
   Token abstractKeyword;
 
-  /**
-   * The token representing the keyword 'const', or `null` if the keyword was
-   * not found.
-   */
+  /// The token representing the keyword 'const', or `null` if the keyword was
+  /// not found.
   Token constKeyword;
 
-  /**
-   * The token representing the keyword 'covariant', or `null` if the keyword
-   * was not found.
-   */
+  /// The token representing the keyword 'covariant', or `null` if the keyword
+  /// was not found.
   Token covariantKeyword;
 
-  /**
-   * The token representing the keyword 'external', or `null` if the keyword was
-   * not found.
-   */
+  /// The token representing the keyword 'external', or `null` if the keyword
+  /// was not found.
   Token externalKeyword;
 
-  /**
-   * The token representing the keyword 'factory', or `null` if the keyword was
-   * not found.
-   */
+  /// The token representing the keyword 'factory', or `null` if the keyword was
+  /// not found.
   Token factoryKeyword;
 
-  /**
-   * The token representing the keyword 'final', or `null` if the keyword was
-   * not found.
-   */
+  /// The token representing the keyword 'final', or `null` if the keyword was
+  /// not found.
   Token finalKeyword;
 
-  /**
-   * The token representing the keyword 'static', or `null` if the keyword was
-   * not found.
-   */
+  /// The token representing the keyword 'static', or `null` if the keyword was
+  /// not found.
   Token staticKeyword;
 
-  /**
-   * The token representing the keyword 'var', or `null` if the keyword was not
-   * found.
-   */
+  /// The token representing the keyword 'var', or `null` if the keyword was not
+  /// found.
   Token varKeyword;
 
   @override
@@ -145,11 +110,9 @@
     return buffer.toString();
   }
 
-  /**
-   * If the given [keyword] is not `null`, append it to the given [builder],
-   * prefixing it with a space if [needsSpace] is `true`. Return `true` if
-   * subsequent keywords need to be prefixed with a space.
-   */
+  /// If the given [keyword] is not `null`, append it to the given [builder],
+  /// prefixing it with a space if [needsSpace] is `true`. Return `true` if
+  /// subsequent keywords need to be prefixed with a space.
   bool _appendKeyword(StringBuffer buffer, bool needsSpace, Token keyword) {
     if (keyword != null) {
       if (needsSpace) {
@@ -162,9 +125,7 @@
   }
 }
 
-/**
- * A parser used to parse tokens into an AST structure.
- */
+/// A parser used to parse tokens into an AST structure.
 class Parser {
   static String ASYNC = Keyword.ASYNC.lexeme;
 
@@ -180,91 +141,61 @@
 
   static const int _MAX_TREE_DEPTH = 300;
 
-  /**
-   * A flag indicating whether the analyzer [Parser] factory method
-   * will return a fasta based parser or an analyzer based parser.
-   */
+  /// A flag indicating whether the analyzer [Parser] factory method
+  /// will return a fasta based parser or an analyzer based parser.
   static const bool useFasta =
       const bool.fromEnvironment("useFastaParser", defaultValue: true);
 
-  /**
-   * The source being parsed.
-   */
+  /// The source being parsed.
   final Source _source;
 
-  /**
-   * The error listener that will be informed of any errors that are found
-   * during the parse.
-   */
+  /// The error listener that will be informed of any errors that are found
+  /// during the parse.
   final AnalysisErrorListener _errorListener;
 
-  /**
-   * An [_errorListener] lock, if more than `0`, then errors are not reported.
-   */
+  /// An [_errorListener] lock, if more than `0`, then errors are not reported.
   int _errorListenerLock = 0;
 
-  /**
-   * A flag indicating whether the parser should parse instance creation
-   * expressions that lack either the `new` or `const` keyword.
-   */
+  /// A flag indicating whether the parser should parse instance creation
+  /// expressions that lack either the `new` or `const` keyword.
   bool _enableOptionalNewAndConst = true;
 
-  /**
-   * A flag indicating whether parser is to parse function bodies.
-   */
+  /// A flag indicating whether parser is to parse function bodies.
   bool _parseFunctionBodies = true;
 
-  /**
-   * The next token to be parsed.
-   */
+  /// The next token to be parsed.
   Token _currentToken;
 
-  /**
-   * The depth of the current AST. When this depth is too high, so we're at the
-   * risk of overflowing the stack, we stop parsing and report an error.
-   */
+  /// The depth of the current AST. When this depth is too high, so we're at the
+  /// risk of overflowing the stack, we stop parsing and report an error.
   int _treeDepth = 0;
 
-  /**
-   * A flag indicating whether the parser is currently in a function body marked
-   * as being 'async'.
-   */
+  /// A flag indicating whether the parser is currently in a function body
+  /// marked as being 'async'.
   bool _inAsync = false;
 
-  /**
-   * A flag indicating whether the parser is currently in a function body marked
-   * (by a star) as being a generator.
-   */
+  /// A flag indicating whether the parser is currently in a function body
+  ///  marked(by a star) as being a generator.
   bool _inGenerator = false;
 
-  /**
-   * A flag indicating whether the parser is currently in the body of a loop.
-   */
+  /// A flag indicating whether the parser is currently in the body of a loop.
   bool _inLoop = false;
 
-  /**
-   * A flag indicating whether the parser is currently in a switch statement.
-   */
+  /// A flag indicating whether the parser is currently in a switch statement.
   bool _inSwitch = false;
 
-  /**
-   * A flag indicating whether the parser is currently in a constructor field
-   * initializer, with no intervening parentheses, braces, or brackets.
-   */
+  /// A flag indicating whether the parser is currently in a constructor field
+  /// initializer, with no intervening parentheses, braces, or brackets.
   bool _inInitializer = false;
 
-  /**
-   * A flag indicating whether the parser is to parse generic method syntax.
-   */
+  /// A flag indicating whether the parser is to parse generic method syntax.
   @deprecated
   bool parseGenericMethods = false;
 
   bool allowNativeClause;
 
-  /**
-   * Initialize a newly created parser to parse tokens in the given [_source]
-   * and to report any errors that are found to the given [_errorListener].
-   */
+  /// Initialize a newly created parser to parse tokens in the given [_source]
+  /// and to report any errors that are found to the given [_errorListener].
   factory Parser(Source source, AnalysisErrorListener errorListener,
       {bool useFasta}) {
     if (useFasta ?? Parser.useFasta) {
@@ -276,65 +207,63 @@
 
   Parser.withoutFasta(this._source, this._errorListener);
 
-  /**
-   * Return the current token.
-   */
+  /// Return the current token.
   Token get currentToken => _currentToken;
 
-  /**
-   * Set the token with which the parse is to begin to the given [token].
-   */
+  /// Set the token with which the parse is to begin to the given [token].
   void set currentToken(Token token) {
     this._currentToken = token;
   }
 
-  /**
-   * Return `true` if the parser is to parse asserts in the initializer list of
-   * a constructor.
-   */
+  /// Return `true` if the parser is to parse asserts in the initializer list of
+  /// a constructor.
   @deprecated
   bool get enableAssertInitializer => true;
 
-  /**
-   * Set whether the parser is to parse asserts in the initializer list of a
-   * constructor to match the given [enable] flag.
-   */
+  /// Set whether the parser is to parse asserts in the initializer list of a
+  /// constructor to match the given [enable] flag.
   @deprecated
   void set enableAssertInitializer(bool enable) {}
 
-  /**
-   * Return `true` if the parser should parse instance creation expressions that
-   * lack either the `new` or `const` keyword.
-   */
+  /// Enables or disables non-nullable by default.
+  void set enableNonNullable(bool value) {
+    if (value) {
+      throw new UnimplementedError(
+          'non-nullable experiment not supported by analyzer parser');
+    }
+  }
+
+  /// Return `true` if the parser should parse instance creation expressions
+  /// that lack either the `new` or `const` keyword.
   bool get enableOptionalNewAndConst => _enableOptionalNewAndConst;
 
-  /**
-   * Set whether the parser should parse instance creation expressions that lack
-   * either the `new` or `const` keyword.
-   */
+  /// Set whether the parser should parse instance creation expressions that
+  /// lack either the `new` or `const` keyword.
   void set enableOptionalNewAndConst(bool enable) {
     _enableOptionalNewAndConst = enable;
   }
 
-  /**
-   * Return `true` if the parser is to allow URI's in part-of directives.
-   */
+  /// Enables or disables parsing of set literals.
+  void set enableSetLiterals(bool value) {
+    if (value) {
+      throw new UnimplementedError(
+          'set-literal experiment not supported by analyzer parser');
+    }
+  }
+
+  /// Return `true` if the parser is to allow URI's in part-of directives.
   @deprecated
   bool get enableUriInPartOf => true;
 
-  /**
-   * Set whether the parser is to allow URI's in part-of directives to the given
-   * [enable] flag.
-   */
+  /// Set whether the parser is to allow URI's in part-of directives to the
+  /// given [enable] flag.
   @deprecated
   void set enableUriInPartOf(bool enable) {}
 
-  /**
-   * Return `true` if the current token is the first token of a return type that
-   * is followed by an identifier, possibly followed by a list of type
-   * parameters, followed by a left-parenthesis. This is used by
-   * [parseTypeAlias] to determine whether or not to parse a return type.
-   */
+  /// Return `true` if the current token is the first token of a return type
+  /// that is followed by an identifier, possibly followed by a list of type
+  /// parameters, followed by a left-parenthesis. This is used by
+  /// [parseTypeAlias] to determine whether or not to parse a return type.
   bool get hasReturnTypeInTypeAlias {
     // TODO(brianwilkerson) This is too expensive as implemented and needs to be
     // re-implemented or removed.
@@ -345,11 +274,9 @@
     return _tokenMatchesIdentifier(next);
   }
 
-  /**
-   * Set whether the parser is to parse the async support.
-   *
-   * Support for removing the 'async' library has been removed.
-   */
+  /// Set whether the parser is to parse the async support.
+  ///
+  /// Support for removing the 'async' library has been removed.
   @deprecated
   void set parseAsync(bool parseAsync) {}
 
@@ -359,19 +286,15 @@
   @deprecated
   void set parseConditionalDirectives(bool value) {}
 
-  /**
-   * Set whether parser is to parse function bodies.
-   */
+  /// Set whether parser is to parse function bodies.
   void set parseFunctionBodies(bool parseFunctionBodies) {
     this._parseFunctionBodies = parseFunctionBodies;
   }
 
-  /**
-   * Return the content of a string with the given literal representation. The
-   * [lexeme] is the literal representation of the string. The flag [isFirst] is
-   * `true` if this is the first token in a string literal. The flag [isLast] is
-   * `true` if this is the last token in a string literal.
-   */
+  /// Return the content of a string with the given literal representation. The
+  /// [lexeme] is the literal representation of the string. The flag [isFirst]
+  /// is `true` if this is the first token in a string literal. The flag
+  /// [isLast] is `true` if this is the last token in a string literal.
   String computeStringValue(String lexeme, bool isFirst, bool isLast) {
     StringLexemeHelper helper = new StringLexemeHelper(lexeme, isFirst, isLast);
     int start = helper.start;
@@ -394,9 +317,7 @@
     return buffer.toString();
   }
 
-  /**
-   * Return a synthetic identifier.
-   */
+  /// Return a synthetic identifier.
   SimpleIdentifier createSyntheticIdentifier({bool isDeclaration: false}) {
     Token syntheticToken;
     if (_currentToken.type.isKeyword) {
@@ -414,26 +335,21 @@
         isDeclaration: isDeclaration);
   }
 
-  /**
-   * Return a synthetic string literal.
-   */
+  /// Return a synthetic string literal.
   SimpleStringLiteral createSyntheticStringLiteral() => astFactory
       .simpleStringLiteral(_createSyntheticToken(TokenType.STRING), "");
 
-  /**
-   * Advance to the next token in the token stream, making it the new current
-   * token and return the token that was current before this method was invoked.
-   */
+  /// Advance to the next token in the token stream, making it the new current
+  /// token and return the token that was current before this method was
+  /// invoked.
   Token getAndAdvance() {
     Token token = _currentToken;
     _currentToken = _currentToken.next;
     return token;
   }
 
-  /**
-   * Return `true` if the current token appears to be the beginning of a
-   * function declaration.
-   */
+  /// Return `true` if the current token appears to be the beginning of a
+  /// function declaration.
   bool isFunctionDeclaration() {
     Keyword keyword = _currentToken.keyword;
     Token afterReturnType = skipTypeWithoutFunction(_currentToken);
@@ -478,10 +394,8 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given [token] appears to be the beginning of a
-   * function expression.
-   */
+  /// Return `true` if the given [token] appears to be the beginning of a
+  /// function expression.
   bool isFunctionExpression(Token token) {
     // Function expressions aren't allowed in initializer lists.
     if (_inInitializer) {
@@ -503,30 +417,28 @@
     return lexeme == ASYNC || lexeme == SYNC;
   }
 
-  /**
-   * Return `true` if the current token is the first token in an initialized
-   * variable declaration rather than an expression. This method assumes that we
-   * have already skipped past any metadata that might be associated with the
-   * declaration.
-   *
-   *     initializedVariableDeclaration ::=
-   *         declaredIdentifier ('=' expression)? (',' initializedIdentifier)*
-   *
-   *     declaredIdentifier ::=
-   *         metadata finalConstVarOrType identifier
-   *
-   *     finalConstVarOrType ::=
-   *         'final' type?
-   *       | 'const' type?
-   *       | 'var'
-   *       | type
-   *
-   *     type ::=
-   *         qualified typeArguments?
-   *
-   *     initializedIdentifier ::=
-   *         identifier ('=' expression)?
-   */
+  /// Return `true` if the current token is the first token in an initialized
+  /// variable declaration rather than an expression. This method assumes that
+  /// we have already skipped past any metadata that might be associated with
+  /// the declaration.
+  ///
+  ///     initializedVariableDeclaration ::=
+  ///         declaredIdentifier ('=' expression)? (',' initializedIdentifier)*
+  ///
+  ///     declaredIdentifier ::=
+  ///         metadata finalConstVarOrType identifier
+  ///
+  ///     finalConstVarOrType ::=
+  ///         'final' type?
+  ///       | 'const' type?
+  ///       | 'var'
+  ///       | type
+  ///
+  ///     type ::=
+  ///         qualified typeArguments?
+  ///
+  ///     initializedIdentifier ::=
+  ///         identifier ('=' expression)?
   bool isInitializedVariableDeclaration() {
     Keyword keyword = _currentToken.keyword;
     if (keyword == Keyword.FINAL ||
@@ -601,10 +513,8 @@
     return false;
   }
 
-  /**
-   * Return `true` if the current token appears to be the beginning of a switch
-   * member.
-   */
+  /// Return `true` if the current token appears to be the beginning of a switch
+  /// member.
   bool isSwitchMember() {
     Token token = _currentToken;
     while (_tokenMatches(token, TokenType.IDENTIFIER) &&
@@ -615,14 +525,12 @@
     return keyword == Keyword.CASE || keyword == Keyword.DEFAULT;
   }
 
-  /**
-   * Parse an additive expression. Return the additive expression that was
-   * parsed.
-   *
-   *     additiveExpression ::=
-   *         multiplicativeExpression (additiveOperator multiplicativeExpression)*
-   *       | 'super' (additiveOperator multiplicativeExpression)+
-   */
+  /// Parse an additive expression. Return the additive expression that was
+  /// parsed.
+  ///
+  ///     additiveExpression ::=
+  ///         multiplicativeExpression (additiveOperator multiplicativeExpression)*
+  ///       | 'super' (additiveOperator multiplicativeExpression)+
   Expression parseAdditiveExpression() {
     Expression expression;
     if (_currentToken.keyword == Keyword.SUPER &&
@@ -638,14 +546,12 @@
     return expression;
   }
 
-  /**
-   * Parse an annotation. Return the annotation that was parsed.
-   *
-   * This method assumes that the current token matches [TokenType.AT].
-   *
-   *     annotation ::=
-   *         '@' qualified ('.' identifier)? arguments?
-   */
+  /// Parse an annotation. Return the annotation that was parsed.
+  ///
+  /// This method assumes that the current token matches [TokenType.AT].
+  ///
+  ///     annotation ::=
+  ///         '@' qualified ('.' identifier)? arguments?
   Annotation parseAnnotation() {
     Token atSign = getAndAdvance();
     Identifier name = parsePrefixedIdentifier();
@@ -663,16 +569,14 @@
         atSign, name, period, constructorName, arguments);
   }
 
-  /**
-   * Parse an argument. Return the argument that was parsed.
-   *
-   *     argument ::=
-   *         namedArgument
-   *       | expression
-   *
-   *     namedArgument ::=
-   *         label expression
-   */
+  /// Parse an argument. Return the argument that was parsed.
+  ///
+  ///     argument ::=
+  ///         namedArgument
+  ///       | expression
+  ///
+  ///     namedArgument ::=
+  ///         label expression
   Expression parseArgument() {
     // TODO(brianwilkerson) Consider returning a wrapper indicating whether the
     // expression is a named expression in order to remove the 'is' check in
@@ -688,29 +592,25 @@
     }
   }
 
-  /**
-   * Parse a list of arguments. Return the argument list that was parsed.
-   *
-   * This method assumes that the current token matches [TokenType.OPEN_PAREN].
-   *
-   *     arguments ::=
-   *         '(' argumentList? ')'
-   *
-   *     argumentList ::=
-   *         namedArgument (',' namedArgument)*
-   *       | expressionList (',' namedArgument)*
-   */
+  /// Parse a list of arguments. Return the argument list that was parsed.
+  ///
+  /// This method assumes that the current token matches [TokenType.OPEN_PAREN].
+  ///
+  ///     arguments ::=
+  ///         '(' argumentList? ')'
+  ///
+  ///     argumentList ::=
+  ///         namedArgument (',' namedArgument)*
+  ///       | expressionList (',' namedArgument)*
   ArgumentList parseArgumentList() {
     Token leftParenthesis = getAndAdvance();
     if (_matches(TokenType.CLOSE_PAREN)) {
       return astFactory.argumentList(leftParenthesis, null, getAndAdvance());
     }
 
-    /**
-     * Return `true` if the parser appears to be at the beginning of an argument
-     * even though there was no comma. This is a special case of the more
-     * general recovery technique described below.
-     */
+    /// Return `true` if the parser appears to be at the beginning of an
+    /// argument even though there was no comma. This is a special case of the
+    /// more general recovery technique described below.
     bool isLikelyMissingComma() {
       if (_matchesIdentifier() &&
           _tokenMatches(_currentToken.next, TokenType.COLON) &&
@@ -770,14 +670,12 @@
     }
   }
 
-  /**
-   * Parse an assert statement. Return the assert statement.
-   *
-   * This method assumes that the current token matches `Keyword.ASSERT`.
-   *
-   *     assertStatement ::=
-   *         'assert' '(' expression [',' expression] ')' ';'
-   */
+  /// Parse an assert statement. Return the assert statement.
+  ///
+  /// This method assumes that the current token matches `Keyword.ASSERT`.
+  ///
+  ///     assertStatement ::=
+  ///         'assert' '(' expression [',' expression] ')' ';'
   AssertStatement parseAssertStatement() {
     Token keyword = getAndAdvance();
     Token leftParen = _expect(TokenType.OPEN_PAREN);
@@ -803,16 +701,14 @@
         keyword, leftParen, expression, comma, message, rightParen, semicolon);
   }
 
-  /**
-   * Parse an assignable expression. The [primaryAllowed] is `true` if the
-   * expression is allowed to be a primary without any assignable selector.
-   * Return the assignable expression that was parsed.
-   *
-   *     assignableExpression ::=
-   *         primary (arguments* assignableSelector)+
-   *       | 'super' unconditionalAssignableSelector
-   *       | identifier
-   */
+  /// Parse an assignable expression. The [primaryAllowed] is `true` if the
+  /// expression is allowed to be a primary without any assignable selector.
+  /// Return the assignable expression that was parsed.
+  ///
+  ///     assignableExpression ::=
+  ///         primary (arguments* assignableSelector)+
+  ///       | 'super' unconditionalAssignableSelector
+  ///       | identifier
   Expression parseAssignableExpression(bool primaryAllowed) {
     //
     // A primary expression can start with an identifier. We resolve the
@@ -862,21 +758,19 @@
     }
   }
 
-  /**
-   * Parse an assignable selector. The [prefix] is the expression preceding the
-   * selector. The [optional] is `true` if the selector is optional. Return the
-   * assignable selector that was parsed, or the original prefix if there was no
-   * assignable selector.  If [allowConditional] is false, then the '?.'
-   * operator will still be parsed, but a parse error will be generated.
-   *
-   *     unconditionalAssignableSelector ::=
-   *         '[' expression ']'
-   *       | '.' identifier
-   *
-   *     assignableSelector ::=
-   *         unconditionalAssignableSelector
-   *       | '?.' identifier
-   */
+  /// Parse an assignable selector. The [prefix] is the expression preceding the
+  /// selector. The [optional] is `true` if the selector is optional. Return the
+  /// assignable selector that was parsed, or the original prefix if there was
+  /// no assignable selector.  If [allowConditional] is false, then the '?.'
+  /// operator will still be parsed, but a parse error will be generated.
+  ///
+  ///     unconditionalAssignableSelector ::=
+  ///         '[' expression ']'
+  ///       | '.' identifier
+  ///
+  ///     assignableSelector ::=
+  ///         unconditionalAssignableSelector
+  ///       | '?.' identifier
   Expression parseAssignableSelector(Expression prefix, bool optional,
       {bool allowConditional: true}) {
     TokenType type = _currentToken.type;
@@ -921,28 +815,24 @@
     }
   }
 
-  /**
-   * Parse a await expression. Return the await expression that was parsed.
-   *
-   * This method assumes that the current token matches `_AWAIT`.
-   *
-   *     awaitExpression ::=
-   *         'await' unaryExpression
-   */
+  /// Parse a await expression. Return the await expression that was parsed.
+  ///
+  /// This method assumes that the current token matches `_AWAIT`.
+  ///
+  ///     awaitExpression ::=
+  ///         'await' unaryExpression
   AwaitExpression parseAwaitExpression() {
     Token awaitToken = getAndAdvance();
     Expression expression = parseUnaryExpression();
     return astFactory.awaitExpression(awaitToken, expression);
   }
 
-  /**
-   * Parse a bitwise and expression. Return the bitwise and expression that was
-   * parsed.
-   *
-   *     bitwiseAndExpression ::=
-   *         shiftExpression ('&' shiftExpression)*
-   *       | 'super' ('&' shiftExpression)+
-   */
+  /// Parse a bitwise and expression. Return the bitwise and expression that was
+  /// parsed.
+  ///
+  ///     bitwiseAndExpression ::=
+  ///         shiftExpression ('&' shiftExpression)*
+  ///       | 'super' ('&' shiftExpression)+
   Expression parseBitwiseAndExpression() {
     Expression expression;
     if (_currentToken.keyword == Keyword.SUPER &&
@@ -958,14 +848,12 @@
     return expression;
   }
 
-  /**
-   * Parse a bitwise or expression. Return the bitwise or expression that was
-   * parsed.
-   *
-   *     bitwiseOrExpression ::=
-   *         bitwiseXorExpression ('|' bitwiseXorExpression)*
-   *       | 'super' ('|' bitwiseXorExpression)+
-   */
+  /// Parse a bitwise or expression. Return the bitwise or expression that was
+  /// parsed.
+  ///
+  ///     bitwiseOrExpression ::=
+  ///         bitwiseXorExpression ('|' bitwiseXorExpression)*
+  ///       | 'super' ('|' bitwiseXorExpression)+
   Expression parseBitwiseOrExpression() {
     Expression expression;
     if (_currentToken.keyword == Keyword.SUPER &&
@@ -981,14 +869,12 @@
     return expression;
   }
 
-  /**
-   * Parse a bitwise exclusive-or expression. Return the bitwise exclusive-or
-   * expression that was parsed.
-   *
-   *     bitwiseXorExpression ::=
-   *         bitwiseAndExpression ('^' bitwiseAndExpression)*
-   *       | 'super' ('^' bitwiseAndExpression)+
-   */
+  /// Parse a bitwise exclusive-or expression. Return the bitwise exclusive-or
+  /// expression that was parsed.
+  ///
+  ///     bitwiseXorExpression ::=
+  ///         bitwiseAndExpression ('^' bitwiseAndExpression)*
+  ///       | 'super' ('^' bitwiseAndExpression)+
   Expression parseBitwiseXorExpression() {
     Expression expression;
     if (_currentToken.keyword == Keyword.SUPER &&
@@ -1004,15 +890,13 @@
     return expression;
   }
 
-  /**
-   * Parse a block. Return the block that was parsed.
-   *
-   * This method assumes that the current token matches
-   * [TokenType.OPEN_CURLY_BRACKET].
-   *
-   *     block ::=
-   *         '{' statements '}'
-   */
+  /// Parse a block. Return the block that was parsed.
+  ///
+  /// This method assumes that the current token matches
+  /// [TokenType.OPEN_CURLY_BRACKET].
+  ///
+  ///     block ::=
+  ///         '{' statements '}'
   Block parseBlock() {
     bool isEndOfBlock() {
       TokenType type = _currentToken.type;
@@ -1042,14 +926,12 @@
     return astFactory.block(leftBracket, statements, rightBracket);
   }
 
-  /**
-   * Parse a break statement. Return the break statement that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.BREAK`.
-   *
-   *     breakStatement ::=
-   *         'break' identifier? ';'
-   */
+  /// Parse a break statement. Return the break statement that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.BREAK`.
+  ///
+  ///     breakStatement ::=
+  ///         'break' identifier? ';'
   Statement parseBreakStatement() {
     Token breakKeyword = getAndAdvance();
     SimpleIdentifier label = null;
@@ -1063,24 +945,22 @@
     return astFactory.breakStatement(breakKeyword, label, semicolon);
   }
 
-  /**
-   * Parse a cascade section. Return the expression representing the cascaded
-   * method invocation.
-   *
-   * This method assumes that the current token matches
-   * `TokenType.PERIOD_PERIOD`.
-   *
-   *     cascadeSection ::=
-   *         '..' (cascadeSelector typeArguments? arguments*)
-   *         (assignableSelector typeArguments? arguments*)* cascadeAssignment?
-   *
-   *     cascadeSelector ::=
-   *         '[' expression ']'
-   *       | identifier
-   *
-   *     cascadeAssignment ::=
-   *         assignmentOperator expressionWithoutCascade
-   */
+  /// Parse a cascade section. Return the expression representing the cascaded
+  /// method invocation.
+  ///
+  /// This method assumes that the current token matches
+  /// `TokenType.PERIOD_PERIOD`.
+  ///
+  ///     cascadeSection ::=
+  ///         '..' (cascadeSelector typeArguments? arguments*)
+  ///         (assignableSelector typeArguments? arguments*)* cascadeAssignment?
+  ///
+  ///     cascadeSelector ::=
+  ///         '[' expression ']'
+  ///       | identifier
+  ///
+  ///     cascadeAssignment ::=
+  ///         assignmentOperator expressionWithoutCascade
   Expression parseCascadeSection() {
     Token period = getAndAdvance();
     Expression expression = null;
@@ -1162,18 +1042,16 @@
     return expression;
   }
 
-  /**
-   * Parse a class declaration. The [commentAndMetadata] is the metadata to be
-   * associated with the member. The [abstractKeyword] is the token for the
-   * keyword 'abstract', or `null` if the keyword was not given. Return the
-   * class declaration that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.CLASS`.
-   *
-   *     classDeclaration ::=
-   *         metadata 'abstract'? 'class' name typeParameterList? (extendsClause withClause?)? implementsClause? '{' classMembers '}' |
-   *         metadata 'abstract'? 'class' mixinApplicationClass
-   */
+  /// Parse a class declaration. The [commentAndMetadata] is the metadata to be
+  /// associated with the member. The [abstractKeyword] is the token for the
+  /// keyword 'abstract', or `null` if the keyword was not given. Return the
+  /// class declaration that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.CLASS`.
+  ///
+  ///     classDeclaration ::=
+  ///         metadata 'abstract'? 'class' name typeParameterList? (extendsClause withClause?)? implementsClause? '{' classMembers '}' |
+  ///         metadata 'abstract'? 'class' mixinApplicationClass
   CompilationUnitMember parseClassDeclaration(
       CommentAndMetadata commentAndMetadata, Token abstractKeyword) {
     //
@@ -1292,15 +1170,13 @@
     return classDeclaration;
   }
 
-  /**
-   * Parse a class member. The [className] is the name of the class containing
-   * the member being parsed. Return the class member that was parsed, or `null`
-   * if what was found was not a valid class member.
-   *
-   *     classMemberDefinition ::=
-   *         declaration ';'
-   *       | methodSignature functionBody
-   */
+  /// Parse a class member. The [className] is the name of the class containing
+  /// the member being parsed. Return the class member that was parsed, or
+  /// `null` if what was found was not a valid class member.
+  ///
+  ///     classMemberDefinition ::=
+  ///         declaration ';'
+  ///       | methodSignature functionBody
   ClassMember parseClassMember(String className) {
     CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
     Modifiers modifiers = parseModifiers();
@@ -1648,14 +1524,12 @@
         type);
   }
 
-  /**
-   * Parse a single combinator. Return the combinator that was parsed, or `null`
-   * if no combinator is found.
-   *
-   *     combinator ::=
-   *         'show' identifier (',' identifier)*
-   *       | 'hide' identifier (',' identifier)*
-   */
+  /// Parse a single combinator. Return the combinator that was parsed, or
+  /// `null` if no combinator is found.
+  ///
+  ///     combinator ::=
+  ///         'show' identifier (',' identifier)*
+  ///       | 'hide' identifier (',' identifier)*
   Combinator parseCombinator() {
     if (_matchesKeyword(Keyword.SHOW)) {
       return astFactory.showCombinator(getAndAdvance(), parseIdentifierList());
@@ -1665,14 +1539,12 @@
     return null;
   }
 
-  /**
-   * Parse a list of combinators in a directive. Return the combinators that
-   * were parsed, or `null` if there are no combinators.
-   *
-   *     combinator ::=
-   *         'show' identifier (',' identifier)*
-   *       | 'hide' identifier (',' identifier)*
-   */
+  /// Parse a list of combinators in a directive. Return the combinators that
+  /// were parsed, or `null` if there are no combinators.
+  ///
+  ///     combinator ::=
+  ///         'show' identifier (',' identifier)*
+  ///       | 'hide' identifier (',' identifier)*
   List<Combinator> parseCombinators() {
     List<Combinator> combinators = null;
     while (true) {
@@ -1686,16 +1558,14 @@
     return combinators;
   }
 
-  /**
-   * Parse the documentation comment and metadata preceding a declaration. This
-   * method allows any number of documentation comments to occur before, after
-   * or between the metadata, but only returns the last (right-most)
-   * documentation comment that is found. Return the documentation comment and
-   * metadata that were parsed.
-   *
-   *     metadata ::=
-   *         annotation*
-   */
+  /// Parse the documentation comment and metadata preceding a declaration. This
+  /// method allows any number of documentation comments to occur before, after
+  /// or between the metadata, but only returns the last (right-most)
+  /// documentation comment that is found. Return the documentation comment and
+  /// metadata that were parsed.
+  ///
+  ///     metadata ::=
+  ///         annotation*
   CommentAndMetadata parseCommentAndMetadata() {
     // TODO(brianwilkerson) Consider making the creation of documentation
     // comments be lazy.
@@ -1713,16 +1583,14 @@
     return new CommentAndMetadata(parseDocumentationComment(tokens), metadata);
   }
 
-  /**
-   * Parse a comment reference from the source between square brackets. The
-   * [referenceSource] is the source occurring between the square brackets
-   * within a documentation comment. The [sourceOffset] is the offset of the
-   * first character of the reference source. Return the comment reference that
-   * was parsed, or `null` if no reference could be found.
-   *
-   *     commentReference ::=
-   *         'new'? prefixedIdentifier
-   */
+  /// Parse a comment reference from the source between square brackets. The
+  /// [referenceSource] is the source occurring between the square brackets
+  /// within a documentation comment. The [sourceOffset] is the offset of the
+  /// first character of the reference source. Return the comment reference that
+  /// was parsed, or `null` if no reference could be found.
+  ///
+  ///     commentReference ::=
+  ///         'new'? prefixedIdentifier
   CommentReference parseCommentReference(
       String referenceSource, int sourceOffset) {
     // TODO(brianwilkerson) The errors are not getting the right offset/length
@@ -1822,18 +1690,16 @@
     return null;
   }
 
-  /**
-   * Parse all of the comment references occurring in the given array of
-   * documentation comments. The [tokens] are the comment tokens representing
-   * the documentation comments to be parsed. Return the comment references that
-   * were parsed.
-   *
-   *     commentReference ::=
-   *         '[' 'new'? qualified ']' libraryReference?
-   *
-   *     libraryReference ::=
-   *          '(' stringLiteral ')'
-   */
+  /// Parse all of the comment references occurring in the given array of
+  /// documentation comments. The [tokens] are the comment tokens representing
+  /// the documentation comments to be parsed. Return the comment references
+  /// that were parsed.
+  ///
+  ///     commentReference ::=
+  ///         '[' 'new'? qualified ']' libraryReference?
+  ///
+  ///     libraryReference ::=
+  ///          '(' stringLiteral ')'
   List<CommentReference> parseCommentReferences(
       List<DocumentationCommentToken> tokens) {
     List<CommentReference> references = <CommentReference>[];
@@ -1904,32 +1770,28 @@
     return references;
   }
 
-  /**
-   * Parse a compilation unit, starting with the given [token]. Return the
-   * compilation unit that was parsed.
-   */
+  /// Parse a compilation unit, starting with the given [token]. Return the
+  /// compilation unit that was parsed.
   CompilationUnit parseCompilationUnit(Token token) {
     _currentToken = token;
     return parseCompilationUnit2();
   }
 
-  /**
-   * Parse a compilation unit. Return the compilation unit that was parsed.
-   *
-   * Specified:
-   *
-   *     compilationUnit ::=
-   *         scriptTag? directive* topLevelDeclaration*
-   *
-   * Actual:
-   *
-   *     compilationUnit ::=
-   *         scriptTag? topLevelElement*
-   *
-   *     topLevelElement ::=
-   *         directive
-   *       | topLevelDeclaration
-   */
+  /// Parse a compilation unit. Return the compilation unit that was parsed.
+  ///
+  /// Specified:
+  ///
+  ///     compilationUnit ::=
+  ///         scriptTag? directive* topLevelDeclaration*
+  ///
+  /// Actual:
+  ///
+  ///     compilationUnit ::=
+  ///         scriptTag? topLevelElement*
+  ///
+  ///     topLevelElement ::=
+  ///         directive
+  ///       | topLevelDeclaration
   CompilationUnit parseCompilationUnit2() {
     Token firstToken = _currentToken;
     ScriptTag scriptTag = null;
@@ -2075,23 +1937,21 @@
         firstToken, scriptTag, directives, declarations, _currentToken);
   }
 
-  /**
-   * Parse a compilation unit member. The [commentAndMetadata] is the metadata
-   * to be associated with the member. Return the compilation unit member that
-   * was parsed, or `null` if what was parsed could not be represented as a
-   * compilation unit member.
-   *
-   *     compilationUnitMember ::=
-   *         classDefinition
-   *       | functionTypeAlias
-   *       | external functionSignature
-   *       | external getterSignature
-   *       | external setterSignature
-   *       | functionSignature functionBody
-   *       | returnType? getOrSet identifier formalParameterList functionBody
-   *       | (final | const) type? staticFinalDeclarationList ';'
-   *       | variableDeclaration ';'
-   */
+  /// Parse a compilation unit member. The [commentAndMetadata] is the metadata
+  /// to be associated with the member. Return the compilation unit member that
+  /// was parsed, or `null` if what was parsed could not be represented as a
+  /// compilation unit member.
+  ///
+  ///     compilationUnitMember ::=
+  ///         classDefinition
+  ///       | functionTypeAlias
+  ///       | external functionSignature
+  ///       | external getterSignature
+  ///       | external setterSignature
+  ///       | functionSignature functionBody
+  ///       | returnType? getOrSet identifier formalParameterList functionBody
+  ///       | (final | const) type? staticFinalDeclarationList ';'
+  ///       | variableDeclaration ';'
   CompilationUnitMember parseCompilationUnitMember(
       CommentAndMetadata commentAndMetadata) {
     Modifiers modifiers = parseModifiers();
@@ -2290,13 +2150,11 @@
         _expect(TokenType.SEMICOLON));
   }
 
-  /**
-   * Parse a conditional expression. Return the conditional expression that was
-   * parsed.
-   *
-   *     conditionalExpression ::=
-   *         ifNullExpression ('?' expressionWithoutCascade ':' expressionWithoutCascade)?
-   */
+  /// Parse a conditional expression. Return the conditional expression that was
+  /// parsed.
+  ///
+  ///     conditionalExpression ::=
+  ///         ifNullExpression ('?' expressionWithoutCascade ':' expressionWithoutCascade)?
   Expression parseConditionalExpression() {
     Expression condition = parseIfNullExpression();
     if (_currentToken.type != TokenType.QUESTION) {
@@ -2310,20 +2168,18 @@
         condition, question, thenExpression, colon, elseExpression);
   }
 
-  /**
-   * Parse a configuration in either an import or export directive.
-   *
-   * This method assumes that the current token matches `Keyword.IF`.
-   *
-   *     configuration ::=
-   *         'if' '(' test ')' uri
-   *
-   *     test ::=
-   *         dottedName ('==' stringLiteral)?
-   *
-   *     dottedName ::=
-   *         identifier ('.' identifier)*
-   */
+  /// Parse a configuration in either an import or export directive.
+  ///
+  /// This method assumes that the current token matches `Keyword.IF`.
+  ///
+  ///     configuration ::=
+  ///         'if' '(' test ')' uri
+  ///
+  ///     test ::=
+  ///         dottedName ('==' stringLiteral)?
+  ///
+  ///     dottedName ::=
+  ///         identifier ('.' identifier)*
   Configuration parseConfiguration() {
     Token ifKeyword = getAndAdvance();
     Token leftParenthesis = _expect(TokenType.OPEN_PAREN);
@@ -2344,16 +2200,14 @@
         equalToken, value, rightParenthesis, libraryUri);
   }
 
-  /**
-   * Parse a const expression. Return the const expression that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.CONST`.
-   *
-   *     constExpression ::=
-   *         instanceCreationExpression
-   *       | listLiteral
-   *       | mapLiteral
-   */
+  /// Parse a const expression. Return the const expression that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.CONST`.
+  ///
+  ///     constExpression ::=
+  ///         instanceCreationExpression
+  ///       | listLiteral
+  ///       | mapLiteral
   Expression parseConstExpression() {
     Token keyword = getAndAdvance();
     TokenType type = _currentToken.type;
@@ -2368,14 +2222,12 @@
     return parseInstanceCreationExpression(keyword);
   }
 
-  /**
-   * Parse a field initializer within a constructor. The flag [hasThis] should
-   * be true if the current token is `this`. Return the field initializer that
-   * was parsed.
-   *
-   *     fieldInitializer:
-   *         ('this' '.')? identifier '=' conditionalExpression cascadeSection*
-   */
+  /// Parse a field initializer within a constructor. The flag [hasThis] should
+  /// be true if the current token is `this`. Return the field initializer that
+  /// was parsed.
+  ///
+  ///     fieldInitializer:
+  ///         ('this' '.')? identifier '=' conditionalExpression cascadeSection*
   ConstructorFieldInitializer parseConstructorFieldInitializer(bool hasThis) {
     Token keywordToken = null;
     Token period = null;
@@ -2427,13 +2279,11 @@
     }
   }
 
-  /**
-   * Parse the name of a constructor. Return the constructor name that was
-   * parsed.
-   *
-   *     constructorName:
-   *         type ('.' identifier)?
-   */
+  /// Parse the name of a constructor. Return the constructor name that was
+  /// parsed.
+  ///
+  ///     constructorName:
+  ///         type ('.' identifier)?
   ConstructorName parseConstructorName() {
     TypeName type = parseTypeName(false);
     Token period = null;
@@ -2445,14 +2295,12 @@
     return astFactory.constructorName(type, period, name);
   }
 
-  /**
-   * Parse a continue statement. Return the continue statement that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.CONTINUE`.
-   *
-   *     continueStatement ::=
-   *         'continue' identifier? ';'
-   */
+  /// Parse a continue statement. Return the continue statement that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.CONTINUE`.
+  ///
+  ///     continueStatement ::=
+  ///         'continue' identifier? ';'
   Statement parseContinueStatement() {
     Token continueKeyword = getAndAdvance();
     if (!_inLoop && !_inSwitch) {
@@ -2471,16 +2319,14 @@
     return astFactory.continueStatement(continueKeyword, label, semicolon);
   }
 
-  /**
-   * Parse a directive. The [commentAndMetadata] is the metadata to be
-   * associated with the directive. Return the directive that was parsed.
-   *
-   *     directive ::=
-   *         exportDirective
-   *       | libraryDirective
-   *       | importDirective
-   *       | partDirective
-   */
+  /// Parse a directive. The [commentAndMetadata] is the metadata to be
+  /// associated with the directive. Return the directive that was parsed.
+  ///
+  ///     directive ::=
+  ///         exportDirective
+  ///       | libraryDirective
+  ///       | importDirective
+  ///       | partDirective
   Directive parseDirective(CommentAndMetadata commentAndMetadata) {
     if (_matchesKeyword(Keyword.IMPORT)) {
       return parseImportDirective(commentAndMetadata);
@@ -2498,25 +2344,21 @@
     }
   }
 
-  /**
-   * Parse the script tag and directives in a compilation unit, starting with
-   * the given [token], until the first non-directive is encountered. The
-   * remainder of the compilation unit will not be parsed. Specifically, if
-   * there are directives later in the file, they will not be parsed. Return the
-   * compilation unit that was parsed.
-   */
+  /// Parse the script tag and directives in a compilation unit, starting with
+  /// the given [token], until the first non-directive is encountered. The
+  /// remainder of the compilation unit will not be parsed. Specifically, if
+  /// there are directives later in the file, they will not be parsed. Return
+  /// the compilation unit that was parsed.
   CompilationUnit parseDirectives(Token token) {
     _currentToken = token;
     return parseDirectives2();
   }
 
-  /**
-   * Parse the script tag and directives in a compilation unit until the first
-   * non-directive is encountered. Return the compilation unit that was parsed.
-   *
-   *     compilationUnit ::=
-   *         scriptTag? directive*
-   */
+  /// Parse the script tag and directives in a compilation unit until the first
+  /// non-directive is encountered. Return the compilation unit that was parsed.
+  ///
+  ///     compilationUnit ::=
+  ///         scriptTag? directive*
   CompilationUnit parseDirectives2() {
     Token firstToken = _currentToken;
     ScriptTag scriptTag = null;
@@ -2550,15 +2392,13 @@
         firstToken, scriptTag, directives, null, _currentToken);
   }
 
-  /**
-   * Parse a documentation comment based on the given list of documentation
-   * comment tokens. Return the documentation comment that was parsed, or `null`
-   * if there was no comment.
-   *
-   *     documentationComment ::=
-   *         multiLineComment?
-   *       | singleLineComment*
-   */
+  /// Parse a documentation comment based on the given list of documentation
+  /// comment tokens. Return the documentation comment that was parsed, or
+  /// `null` if there was no comment.
+  ///
+  ///     documentationComment ::=
+  ///         multiLineComment?
+  ///       | singleLineComment*
   Comment parseDocumentationComment(List<DocumentationCommentToken> tokens) {
     if (tokens == null) {
       return null;
@@ -2567,14 +2407,12 @@
     return astFactory.documentationComment(tokens, references);
   }
 
-  /**
-   * Parse a documentation comment. Return the documentation comment that was
-   * parsed, or `null` if there was no comment.
-   *
-   *     documentationComment ::=
-   *         multiLineComment?
-   *       | singleLineComment*
-   */
+  /// Parse a documentation comment. Return the documentation comment that was
+  /// parsed, or `null` if there was no comment.
+  ///
+  ///     documentationComment ::=
+  ///         multiLineComment?
+  ///       | singleLineComment*
   List<DocumentationCommentToken> parseDocumentationCommentTokens() {
     List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[];
     CommentToken commentToken = _currentToken.precedingComments;
@@ -2596,14 +2434,12 @@
     return tokens.isEmpty ? null : tokens;
   }
 
-  /**
-   * Parse a do statement. Return the do statement that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.DO`.
-   *
-   *     doStatement ::=
-   *         'do' statement 'while' '(' expression ')' ';'
-   */
+  /// Parse a do statement. Return the do statement that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.DO`.
+  ///
+  ///     doStatement ::=
+  ///         'do' statement 'while' '(' expression ')' ';'
   Statement parseDoStatement() {
     bool wasInLoop = _inLoop;
     _inLoop = true;
@@ -2622,12 +2458,10 @@
     }
   }
 
-  /**
-   * Parse a dotted name. Return the dotted name that was parsed.
-   *
-   *     dottedName ::=
-   *         identifier ('.' identifier)*
-   */
+  /// Parse a dotted name. Return the dotted name that was parsed.
+  ///
+  ///     dottedName ::=
+  ///         identifier ('.' identifier)*
   DottedName parseDottedName() {
     List<SimpleIdentifier> components = <SimpleIdentifier>[
       parseSimpleIdentifier()
@@ -2638,25 +2472,21 @@
     return astFactory.dottedName(components);
   }
 
-  /**
-   * Parse an empty statement. Return the empty statement that was parsed.
-   *
-   * This method assumes that the current token matches `TokenType.SEMICOLON`.
-   *
-   *     emptyStatement ::=
-   *         ';'
-   */
+  /// Parse an empty statement. Return the empty statement that was parsed.
+  ///
+  /// This method assumes that the current token matches `TokenType.SEMICOLON`.
+  ///
+  ///     emptyStatement ::=
+  ///         ';'
   Statement parseEmptyStatement() => astFactory.emptyStatement(getAndAdvance());
 
-  /**
-   * Parse an enum declaration. The [commentAndMetadata] is the metadata to be
-   * associated with the member. Return the enum declaration that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.ENUM`.
-   *
-   *     enumType ::=
-   *         metadata 'enum' id '{' id (',' id)* (',')? '}'
-   */
+  /// Parse an enum declaration. The [commentAndMetadata] is the metadata to be
+  /// associated with the member. Return the enum declaration that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.ENUM`.
+  ///
+  ///     enumType ::=
+  ///         metadata 'enum' id '{' id (',' id)* (',')? '}'
   EnumDeclaration parseEnumDeclaration(CommentAndMetadata commentAndMetadata) {
     Token keyword = getAndAdvance();
     SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
@@ -2697,14 +2527,12 @@
         rightBracket);
   }
 
-  /**
-   * Parse an equality expression. Return the equality expression that was
-   * parsed.
-   *
-   *     equalityExpression ::=
-   *         relationalExpression (equalityOperator relationalExpression)?
-   *       | 'super' equalityOperator relationalExpression
-   */
+  /// Parse an equality expression. Return the equality expression that was
+  /// parsed.
+  ///
+  ///     equalityExpression ::=
+  ///         relationalExpression (equalityOperator relationalExpression)?
+  ///       | 'super' equalityOperator relationalExpression
   Expression parseEqualityExpression() {
     Expression expression;
     if (_currentToken.keyword == Keyword.SUPER &&
@@ -2726,15 +2554,14 @@
     return expression;
   }
 
-  /**
-   * Parse an export directive. The [commentAndMetadata] is the metadata to be
-   * associated with the directive. Return the export directive that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.EXPORT`.
-   *
-   *     exportDirective ::=
-   *         metadata 'export' stringLiteral configuration* combinator*';'
-   */
+  /// Parse an export directive. The [commentAndMetadata] is the metadata to be
+  /// associated with the directive. Return the export directive that was
+  /// parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.EXPORT`.
+  ///
+  ///     exportDirective ::=
+  ///         metadata 'export' stringLiteral configuration* combinator*';'
   ExportDirective parseExportDirective(CommentAndMetadata commentAndMetadata) {
     Token exportKeyword = getAndAdvance();
     StringLiteral libraryUri = _parseUri();
@@ -2751,25 +2578,21 @@
         semicolon);
   }
 
-  /**
-   * Parse an expression, starting with the given [token]. Return the expression
-   * that was parsed, or `null` if the tokens do not represent a recognizable
-   * expression.
-   */
+  /// Parse an expression, starting with the given [token]. Return the
+  /// expression that was parsed, or `null` if the tokens do not represent a
+  /// recognizable expression.
   Expression parseExpression(Token token) {
     _currentToken = token;
     return parseExpression2();
   }
 
-  /**
-   * Parse an expression that might contain a cascade. Return the expression
-   * that was parsed.
-   *
-   *     expression ::=
-   *         assignableExpression assignmentOperator expression
-   *       | conditionalExpression cascadeSection*
-   *       | throwExpression
-   */
+  /// Parse an expression that might contain a cascade. Return the expression
+  /// that was parsed.
+  ///
+  ///     expression ::=
+  ///         assignableExpression assignmentOperator expression
+  ///       | conditionalExpression cascadeSection*
+  ///       | throwExpression
   Expression parseExpression2() {
     if (_treeDepth > _MAX_TREE_DEPTH) {
       throw new _TooDeepTreeError();
@@ -2812,12 +2635,10 @@
     }
   }
 
-  /**
-   * Parse a list of expressions. Return the expression that was parsed.
-   *
-   *     expressionList ::=
-   *         expression (',' expression)*
-   */
+  /// Parse a list of expressions. Return the expression that was parsed.
+  ///
+  ///     expressionList ::=
+  ///         expression (',' expression)*
   List<Expression> parseExpressionList() {
     List<Expression> expressions = <Expression>[parseExpression2()];
     while (_optional(TokenType.COMMA)) {
@@ -2826,15 +2647,13 @@
     return expressions;
   }
 
-  /**
-   * Parse an expression that does not contain any cascades. Return the
-   * expression that was parsed.
-   *
-   *     expressionWithoutCascade ::=
-   *         assignableExpression assignmentOperator expressionWithoutCascade
-   *       | conditionalExpression
-   *       | throwExpressionWithoutCascade
-   */
+  /// Parse an expression that does not contain any cascades. Return the
+  /// expression that was parsed.
+  ///
+  ///     expressionWithoutCascade ::=
+  ///         assignableExpression assignmentOperator expressionWithoutCascade
+  ///       | conditionalExpression
+  ///       | throwExpressionWithoutCascade
   Expression parseExpressionWithoutCascade() {
     if (_matchesKeyword(Keyword.THROW)) {
       return parseThrowExpressionWithoutCascade();
@@ -2857,32 +2676,28 @@
     return expression;
   }
 
-  /**
-   * Parse a class extends clause. Return the class extends clause that was
-   * parsed.
-   *
-   * This method assumes that the current token matches `Keyword.EXTENDS`.
-   *
-   *     classExtendsClause ::=
-   *         'extends' type
-   */
+  /// Parse a class extends clause. Return the class extends clause that was
+  /// parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.EXTENDS`.
+  ///
+  ///     classExtendsClause ::=
+  ///         'extends' type
   ExtendsClause parseExtendsClause() {
     Token keyword = getAndAdvance();
     TypeName superclass = parseTypeName(false);
     return astFactory.extendsClause(keyword, superclass);
   }
 
-  /**
-   * Parse the 'final', 'const', 'var' or type preceding a variable declaration.
-   * The [optional] is `true` if the keyword and type are optional. Return the
-   * 'final', 'const', 'var' or type that was parsed.
-   *
-   *     finalConstVarOrType ::=
-   *         'final' type?
-   *       | 'const' type?
-   *       | 'var'
-   *       | type
-   */
+  /// Parse the 'final', 'const', 'var' or type preceding a variable
+  /// declaration. The [optional] is `true` if the keyword and type are
+  /// optional. Return the 'final', 'const', 'var' or type that was parsed.
+  ///
+  ///     finalConstVarOrType ::=
+  ///         'final' type?
+  ///       | 'const' type?
+  ///       | 'var'
+  ///       | type
   FinalConstVarOrType parseFinalConstVarOrType(bool optional,
       {bool inFunctionType: false}) {
     Token keywordToken = null;
@@ -2925,19 +2740,17 @@
     return new FinalConstVarOrType(keywordToken, type);
   }
 
-  /**
-   * Parse a formal parameter. At most one of `isOptional` and `isNamed` can be
-   * `true`. The [kind] is the kind of parameter being expected based on the
-   * presence or absence of group delimiters. Return the formal parameter that
-   * was parsed.
-   *
-   *     defaultFormalParameter ::=
-   *         normalFormalParameter ('=' expression)?
-   *
-   *     defaultNamedParameter ::=
-   *         normalFormalParameter ('=' expression)?
-   *         normalFormalParameter (':' expression)?
-   */
+  /// Parse a formal parameter. At most one of `isOptional` and `isNamed` can be
+  /// `true`. The [kind] is the kind of parameter being expected based on the
+  /// presence or absence of group delimiters. Return the formal parameter that
+  /// was parsed.
+  ///
+  ///     defaultFormalParameter ::=
+  ///         normalFormalParameter ('=' expression)?
+  ///
+  ///     defaultNamedParameter ::=
+  ///         normalFormalParameter ('=' expression)?
+  ///         normalFormalParameter (':' expression)?
   FormalParameter parseFormalParameter(ParameterKind kind,
       {bool inFunctionType: false}) {
     NormalFormalParameter parameter =
@@ -3000,28 +2813,26 @@
     return parameter;
   }
 
-  /**
-   * Parse a list of formal parameters. Return the formal parameters that were
-   * parsed.
-   *
-   *     formalParameterList ::=
-   *         '(' ')'
-   *       | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
-   *       | '(' optionalFormalParameters ')'
-   *
-   *     normalFormalParameters ::=
-   *         normalFormalParameter (',' normalFormalParameter)*
-   *
-   *     optionalFormalParameters ::=
-   *         optionalPositionalFormalParameters
-   *       | namedFormalParameters
-   *
-   *     optionalPositionalFormalParameters ::=
-   *         '[' defaultFormalParameter (',' defaultFormalParameter)* ']'
-   *
-   *     namedFormalParameters ::=
-   *         '{' defaultNamedParameter (',' defaultNamedParameter)* '}'
-   */
+  /// Parse a list of formal parameters. Return the formal parameters that were
+  /// parsed.
+  ///
+  ///     formalParameterList ::=
+  ///         '(' ')'
+  ///       | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
+  ///       | '(' optionalFormalParameters ')'
+  ///
+  ///     normalFormalParameters ::=
+  ///         normalFormalParameter (',' normalFormalParameter)*
+  ///
+  ///     optionalFormalParameters ::=
+  ///         optionalPositionalFormalParameters
+  ///       | namedFormalParameters
+  ///
+  ///     optionalPositionalFormalParameters ::=
+  ///         '[' defaultFormalParameter (',' defaultFormalParameter)* ']'
+  ///
+  ///     namedFormalParameters ::=
+  ///         '{' defaultNamedParameter (',' defaultNamedParameter)* '}'
   FormalParameterList parseFormalParameterList({bool inFunctionType: false}) {
     if (_matches(TokenType.OPEN_PAREN)) {
       return _parseFormalParameterListUnchecked(inFunctionType: inFunctionType);
@@ -3035,21 +2846,19 @@
         _createSyntheticToken(TokenType.OPEN_PAREN));
   }
 
-  /**
-   * Parse a for statement. Return the for statement that was parsed.
-   *
-   *     forStatement ::=
-   *         'for' '(' forLoopParts ')' statement
-   *
-   *     forLoopParts ::=
-   *         forInitializerStatement expression? ';' expressionList?
-   *       | declaredIdentifier 'in' expression
-   *       | identifier 'in' expression
-   *
-   *     forInitializerStatement ::=
-   *         localVariableDeclaration ';'
-   *       | expression? ';'
-   */
+  /// Parse a for statement. Return the for statement that was parsed.
+  ///
+  ///     forStatement ::=
+  ///         'for' '(' forLoopParts ')' statement
+  ///
+  ///     forLoopParts ::=
+  ///         forInitializerStatement expression? ';' expressionList?
+  ///       | declaredIdentifier 'in' expression
+  ///       | identifier 'in' expression
+  ///
+  ///     forInitializerStatement ::=
+  ///         localVariableDeclaration ';'
+  ///       | expression? ';'
   Statement parseForStatement() {
     bool wasInLoop = _inLoop;
     _inLoop = true;
@@ -3181,21 +2990,20 @@
     }
   }
 
-  /**
-   * Parse a function body. The [mayBeEmpty] is `true` if the function body is
-   * allowed to be empty. The [emptyErrorCode] is the error code to report if
-   * function body expected, but not found. The [inExpression] is `true` if the
-   * function body is being parsed as part of an expression and therefore does
-   * not have a terminating semicolon. Return the function body that was parsed.
-   *
-   *     functionBody ::=
-   *         '=>' expression ';'
-   *       | block
-   *
-   *     functionExpressionBody ::=
-   *         '=>' expression
-   *       | block
-   */
+  /// Parse a function body. The [mayBeEmpty] is `true` if the function body is
+  /// allowed to be empty. The [emptyErrorCode] is the error code to report if
+  /// function body expected, but not found. The [inExpression] is `true` if the
+  /// function body is being parsed as part of an expression and therefore does
+  /// not have a terminating semicolon. Return the function body that was
+  /// parsed.
+  ///
+  ///     functionBody ::=
+  ///         '=>' expression ';'
+  ///       | block
+  ///
+  ///     functionExpressionBody ::=
+  ///         '=>' expression
+  ///       | block
   FunctionBody parseFunctionBody(
       bool mayBeEmpty, ParserErrorCode emptyErrorCode, bool inExpression) {
     bool wasInAsync = _inAsync;
@@ -3301,19 +3109,17 @@
     }
   }
 
-  /**
-   * Parse a function declaration. The [commentAndMetadata] is the documentation
-   * comment and metadata to be associated with the declaration. The
-   * [externalKeyword] is the 'external' keyword, or `null` if the function is
-   * not external. The [returnType] is the return type, or `null` if there is no
-   * return type. The [isStatement] is `true` if the function declaration is
-   * being parsed as a statement. Return the function declaration that was
-   * parsed.
-   *
-   *     functionDeclaration ::=
-   *         functionSignature functionBody
-   *       | returnType? getOrSet identifier formalParameterList functionBody
-   */
+  /// Parse a function declaration. The [commentAndMetadata] is the
+  /// documentation comment and metadata to be associated with the declaration.
+  /// The [externalKeyword] is the 'external' keyword, or `null` if the
+  /// function is not external. The [returnType] is the return type, or `null`
+  /// if there is no return type. The [isStatement] is `true` if the function
+  /// declaration is being parsed as a statement. Return the function
+  /// declaration that was parsed.
+  ///
+  ///     functionDeclaration ::=
+  ///         functionSignature functionBody
+  ///       | returnType? getOrSet identifier formalParameterList functionBody
   FunctionDeclaration parseFunctionDeclaration(
       CommentAndMetadata commentAndMetadata,
       Token externalKeyword,
@@ -3377,13 +3183,11 @@
         astFactory.functionExpression(typeParameters, parameters, body));
   }
 
-  /**
-   * Parse a function declaration statement. Return the function declaration
-   * statement that was parsed.
-   *
-   *     functionDeclarationStatement ::=
-   *         functionSignature functionBody
-   */
+  /// Parse a function declaration statement. Return the function declaration
+  /// statement that was parsed.
+  ///
+  ///     functionDeclarationStatement ::=
+  ///         functionSignature functionBody
   Statement parseFunctionDeclarationStatement() {
     Modifiers modifiers = parseModifiers();
     _validateModifiersForFunctionDeclarationStatement(modifiers);
@@ -3391,13 +3195,11 @@
         parseCommentAndMetadata(), _parseOptionalReturnType());
   }
 
-  /**
-   * Parse a function expression. Return the function expression that was
-   * parsed.
-   *
-   *     functionExpression ::=
-   *         typeParameters? formalParameterList functionExpressionBody
-   */
+  /// Parse a function expression. Return the function expression that was
+  /// parsed.
+  ///
+  ///     functionExpression ::=
+  ///         typeParameters? formalParameterList functionExpressionBody
   FunctionExpression parseFunctionExpression() {
     TypeParameterList typeParameters = _parseGenericMethodTypeParameters();
     FormalParameterList parameters = parseFormalParameterList();
@@ -3407,29 +3209,27 @@
     return astFactory.functionExpression(typeParameters, parameters, body);
   }
 
-  /**
-   * Parse the portion of a generic function type following the [returnType].
-   *
-   *     functionType ::=
-   *         returnType? 'Function' typeParameters? parameterTypeList
-   *     parameterTypeList ::=
-   *         '(' ')' |
-   *       | '(' normalParameterTypes ','? ')' |
-   *       | '(' normalParameterTypes ',' optionalParameterTypes ')' |
-   *       | '(' optionalParameterTypes ')'
-   *     normalParameterTypes ::=
-   *         normalParameterType (',' normalParameterType)*
-   *     normalParameterType ::=
-   *         type | typedIdentifier
-   *     optionalParameterTypes ::=
-   *         optionalPositionalParameterTypes | namedParameterTypes
-   *     optionalPositionalParameterTypes ::=
-   *         '[' normalParameterTypes ','? ']'
-   *     namedParameterTypes ::=
-   *         '{' typedIdentifier (',' typedIdentifier)* ','? '}'
-   *     typedIdentifier ::=
-   *         type identifier
-   */
+  /// Parse the portion of a generic function type following the [returnType].
+  ///
+  ///     functionType ::=
+  ///         returnType? 'Function' typeParameters? parameterTypeList
+  ///     parameterTypeList ::=
+  ///         '(' ')' |
+  ///       | '(' normalParameterTypes ','? ')' |
+  ///       | '(' normalParameterTypes ',' optionalParameterTypes ')' |
+  ///       | '(' optionalParameterTypes ')'
+  ///     normalParameterTypes ::=
+  ///         normalParameterType (',' normalParameterType)*
+  ///     normalParameterType ::=
+  ///         type | typedIdentifier
+  ///     optionalParameterTypes ::=
+  ///         optionalPositionalParameterTypes | namedParameterTypes
+  ///     optionalPositionalParameterTypes ::=
+  ///         '[' normalParameterTypes ','? ']'
+  ///     namedParameterTypes ::=
+  ///         '{' typedIdentifier (',' typedIdentifier)* ','? '}'
+  ///     typedIdentifier ::=
+  ///         type identifier
   GenericFunctionType parseGenericFunctionTypeAfterReturnType(
       TypeAnnotation returnType) {
     Token functionKeyword = null;
@@ -3450,14 +3250,12 @@
         returnType, functionKeyword, typeParameters, parameters);
   }
 
-  /**
-   * Parse a generic function type alias.
-   *
-   * This method assumes that the current token is an identifier.
-   *
-   *     genericTypeAlias ::=
-   *         'typedef' identifier typeParameterList? '=' functionType ';'
-   */
+  /// Parse a generic function type alias.
+  ///
+  /// This method assumes that the current token is an identifier.
+  ///
+  ///     genericTypeAlias ::=
+  ///         'typedef' identifier typeParameterList? '=' functionType ';'
   GenericTypeAlias parseGenericTypeAlias(
       CommentAndMetadata commentAndMetadata, Token keyword) {
     Identifier name = _parseSimpleIdentifierUnchecked(isDeclaration: true);
@@ -3494,22 +3292,20 @@
         semicolon);
   }
 
-  /**
-   * Parse a getter. The [commentAndMetadata] is the documentation comment and
-   * metadata to be associated with the declaration. The externalKeyword] is the
-   * 'external' token. The staticKeyword] is the static keyword, or `null` if
-   * the getter is not static. The [returnType] the return type that has already
-   * been parsed, or `null` if there was no return type. Return the getter that
-   * was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.GET`.
-   *
-   *     getter ::=
-   *         getterSignature functionBody?
-   *
-   *     getterSignature ::=
-   *         'external'? 'static'? returnType? 'get' identifier
-   */
+  /// Parse a getter. The [commentAndMetadata] is the documentation comment and
+  /// metadata to be associated with the declaration. The externalKeyword] is
+  /// the 'external' token. The staticKeyword] is the static keyword, or `null`
+  /// if the getter is not static. The [returnType] the return type that has
+  /// already been parsed, or `null` if there was no return type. Return the
+  /// getter that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.GET`.
+  ///
+  ///     getter ::=
+  ///         getterSignature functionBody?
+  ///
+  ///     getterSignature ::=
+  ///         'external'? 'static'? returnType? 'get' identifier
   MethodDeclaration parseGetter(CommentAndMetadata commentAndMetadata,
       Token externalKeyword, Token staticKeyword, TypeAnnotation returnType) {
     Token propertyKeyword = getAndAdvance();
@@ -3541,13 +3337,11 @@
         body);
   }
 
-  /**
-   * Parse a list of identifiers. Return the list of identifiers that were
-   * parsed.
-   *
-   *     identifierList ::=
-   *         identifier (',' identifier)*
-   */
+  /// Parse a list of identifiers. Return the list of identifiers that were
+  /// parsed.
+  ///
+  ///     identifierList ::=
+  ///         identifier (',' identifier)*
   List<SimpleIdentifier> parseIdentifierList() {
     List<SimpleIdentifier> identifiers = <SimpleIdentifier>[
       parseSimpleIdentifier()
@@ -3558,12 +3352,10 @@
     return identifiers;
   }
 
-  /**
-   * Parse an if-null expression.  Return the if-null expression that was
-   * parsed.
-   *
-   *     ifNullExpression ::= logicalOrExpression ('??' logicalOrExpression)*
-   */
+  /// Parse an if-null expression.  Return the if-null expression that was
+  /// parsed.
+  ///
+  ///     ifNullExpression ::= logicalOrExpression ('??' logicalOrExpression)*
   Expression parseIfNullExpression() {
     Expression expression = parseLogicalOrExpression();
     while (_currentToken.type == TokenType.QUESTION_QUESTION) {
@@ -3573,14 +3365,12 @@
     return expression;
   }
 
-  /**
-   * Parse an if statement. Return the if statement that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.IF`.
-   *
-   *     ifStatement ::=
-   *         'if' '(' expression ')' statement ('else' statement)?
-   */
+  /// Parse an if statement. Return the if statement that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.IF`.
+  ///
+  ///     ifStatement ::=
+  ///         'if' '(' expression ')' statement ('else' statement)?
   Statement parseIfStatement() {
     Token ifKeyword = getAndAdvance();
     Token leftParenthesis = _expect(TokenType.OPEN_PAREN);
@@ -3597,14 +3387,12 @@
         rightParenthesis, thenStatement, elseKeyword, elseStatement);
   }
 
-  /**
-   * Parse an implements clause. Return the implements clause that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.IMPLEMENTS`.
-   *
-   *     implementsClause ::=
-   *         'implements' type (',' type)*
-   */
+  /// Parse an implements clause. Return the implements clause that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.IMPLEMENTS`.
+  ///
+  ///     implementsClause ::=
+  ///         'implements' type (',' type)*
   ImplementsClause parseImplementsClause() {
     Token keyword = getAndAdvance();
     List<TypeName> interfaces = <TypeName>[];
@@ -3615,15 +3403,14 @@
     return astFactory.implementsClause(keyword, interfaces);
   }
 
-  /**
-   * Parse an import directive. The [commentAndMetadata] is the metadata to be
-   * associated with the directive. Return the import directive that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.IMPORT`.
-   *
-   *     importDirective ::=
-   *         metadata 'import' stringLiteral configuration* (deferred)? ('as' identifier)? combinator*';'
-   */
+  /// Parse an import directive. The [commentAndMetadata] is the metadata to be
+  /// associated with the directive. Return the import directive that was
+  /// parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.IMPORT`.
+  ///
+  ///     importDirective ::=
+  ///         metadata 'import' stringLiteral configuration* (deferred)? ('as' identifier)? combinator*';'
   ImportDirective parseImportDirective(CommentAndMetadata commentAndMetadata) {
     Token importKeyword = getAndAdvance();
     StringLiteral libraryUri = _parseUri();
@@ -3671,25 +3458,23 @@
         semicolon);
   }
 
-  /**
-   * Parse a list of initialized identifiers. The [commentAndMetadata] is the
-   * documentation comment and metadata to be associated with the declaration.
-   * The [staticKeyword] is the static keyword, or `null` if the getter is not
-   * static. The [keyword] is the token representing the 'final', 'const' or
-   * 'var' keyword, or `null` if there is no keyword. The [type] is the type
-   * that has already been parsed, or `null` if 'var' was provided. Return the
-   * getter that was parsed.
-   *
-   *     declaration ::=
-   *         ('static' | 'covariant')? ('var' | type) initializedIdentifierList ';'
-   *       | 'final' type? initializedIdentifierList ';'
-   *
-   *     initializedIdentifierList ::=
-   *         initializedIdentifier (',' initializedIdentifier)*
-   *
-   *     initializedIdentifier ::=
-   *         identifier ('=' expression)?
-   */
+  /// Parse a list of initialized identifiers. The [commentAndMetadata] is the
+  /// documentation comment and metadata to be associated with the declaration.
+  /// The [staticKeyword] is the static keyword, or `null` if the getter is not
+  /// static. The [keyword] is the token representing the 'final', 'const' or
+  /// 'var' keyword, or `null` if there is no keyword. The [type] is the type
+  /// that has already been parsed, or `null` if 'var' was provided. Return the
+  /// getter that was parsed.
+  ///
+  ///     declaration ::=
+  ///         ('static' | 'covariant')? ('var' | type) initializedIdentifierList ';'
+  ///       | 'final' type? initializedIdentifierList ';'
+  ///
+  ///     initializedIdentifierList ::=
+  ///         initializedIdentifier (',' initializedIdentifier)*
+  ///
+  ///     initializedIdentifier ::=
+  ///         identifier ('=' expression)?
   FieldDeclaration parseInitializedIdentifierList(
       CommentAndMetadata commentAndMetadata,
       Token staticKeyword,
@@ -3707,14 +3492,12 @@
         semicolon: _expect(TokenType.SEMICOLON));
   }
 
-  /**
-   * Parse an instance creation expression. The [keyword] is the 'new' or
-   * 'const' keyword that introduces the expression. Return the instance
-   * creation expression that was parsed.
-   *
-   *     instanceCreationExpression ::=
-   *         ('new' | 'const') type ('.' identifier)? argumentList
-   */
+  /// Parse an instance creation expression. The [keyword] is the 'new' or
+  /// 'const' keyword that introduces the expression. Return the instance
+  /// creation expression that was parsed.
+  ///
+  ///     instanceCreationExpression ::=
+  ///         ('new' | 'const') type ('.' identifier)? argumentList
   InstanceCreationExpression parseInstanceCreationExpression(Token keyword) {
     ConstructorName constructorName = parseConstructorName();
     ArgumentList argumentList = _parseArgumentListChecked();
@@ -3722,15 +3505,13 @@
         keyword, constructorName, argumentList);
   }
 
-  /**
-   * Parse a label. Return the label that was parsed.
-   *
-   * This method assumes that the current token matches an identifier and that
-   * the following token matches `TokenType.COLON`.
-   *
-   *     label ::=
-   *         identifier ':'
-   */
+  /// Parse a label. Return the label that was parsed.
+  ///
+  /// This method assumes that the current token matches an identifier and that
+  /// the following token matches `TokenType.COLON`.
+  ///
+  ///     label ::=
+  ///         identifier ':'
   Label parseLabel({bool isDeclaration: false}) {
     SimpleIdentifier label =
         _parseSimpleIdentifierUnchecked(isDeclaration: isDeclaration);
@@ -3738,16 +3519,14 @@
     return astFactory.label(label, colon);
   }
 
-  /**
-   * Parse a library directive. The [commentAndMetadata] is the metadata to be
-   * associated with the directive. Return the library directive that was
-   * parsed.
-   *
-   * This method assumes that the current token matches `Keyword.LIBRARY`.
-   *
-   *     libraryDirective ::=
-   *         metadata 'library' identifier ';'
-   */
+  /// Parse a library directive. The [commentAndMetadata] is the metadata to be
+  /// associated with the directive. Return the library directive that was
+  /// parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.LIBRARY`.
+  ///
+  ///     libraryDirective ::=
+  ///         metadata 'library' identifier ';'
   LibraryDirective parseLibraryDirective(
       CommentAndMetadata commentAndMetadata) {
     Token keyword = getAndAdvance();
@@ -3758,12 +3537,10 @@
         commentAndMetadata.metadata, keyword, libraryName, semicolon);
   }
 
-  /**
-   * Parse a library identifier. Return the library identifier that was parsed.
-   *
-   *     libraryIdentifier ::=
-   *         identifier ('.' identifier)*
-   */
+  /// Parse a library identifier. Return the library identifier that was parsed.
+  ///
+  ///     libraryIdentifier ::=
+  ///         identifier ('.' identifier)*
   LibraryIdentifier parseLibraryIdentifier() {
     List<SimpleIdentifier> components = <SimpleIdentifier>[];
     components.add(parseSimpleIdentifier());
@@ -3773,18 +3550,16 @@
     return astFactory.libraryIdentifier(components);
   }
 
-  /**
-   * Parse a list literal. The [modifier] is the 'const' modifier appearing
-   * before the literal, or `null` if there is no modifier. The [typeArguments]
-   * is the type arguments appearing before the literal, or `null` if there are
-   * no type arguments. Return the list literal that was parsed.
-   *
-   * This method assumes that the current token matches either
-   * `TokenType.OPEN_SQUARE_BRACKET` or `TokenType.INDEX`.
-   *
-   *     listLiteral ::=
-   *         'const'? typeArguments? '[' (expressionList ','?)? ']'
-   */
+  /// Parse a list literal. The [modifier] is the 'const' modifier appearing
+  /// before the literal, or `null` if there is no modifier. The [typeArguments]
+  /// is the type arguments appearing before the literal, or `null` if there are
+  /// no type arguments. Return the list literal that was parsed.
+  ///
+  /// This method assumes that the current token matches either
+  /// `TokenType.OPEN_SQUARE_BRACKET` or `TokenType.INDEX`.
+  ///
+  ///     listLiteral ::=
+  ///         'const'? typeArguments? '[' (expressionList ','?)? ']'
   ListLiteral parseListLiteral(Token modifier, TypeArgumentList typeArguments) {
     if (_matches(TokenType.INDEX)) {
       _splitIndex();
@@ -3815,15 +3590,13 @@
     }
   }
 
-  /**
-   * Parse a list or map literal. The [modifier] is the 'const' modifier
-   * appearing before the literal, or `null` if there is no modifier. Return the
-   * list or map literal that was parsed.
-   *
-   *     listOrMapLiteral ::=
-   *         listLiteral
-   *       | mapLiteral
-   */
+  /// Parse a list or map literal. The [modifier] is the 'const' modifier
+  /// appearing before the literal, or `null` if there is no modifier. Return
+  /// the list or map literal that was parsed.
+  ///
+  ///     listOrMapLiteral ::=
+  ///         listLiteral
+  ///       | mapLiteral
   TypedLiteral parseListOrMapLiteral(Token modifier) {
     TypeArgumentList typeArguments = _parseOptionalTypeArguments();
     if (_matches(TokenType.OPEN_CURLY_BRACKET)) {
@@ -3841,13 +3614,11 @@
         _createSyntheticToken(TokenType.CLOSE_SQUARE_BRACKET));
   }
 
-  /**
-   * Parse a logical and expression. Return the logical and expression that was
-   * parsed.
-   *
-   *     logicalAndExpression ::=
-   *         equalityExpression ('&&' equalityExpression)*
-   */
+  /// Parse a logical and expression. Return the logical and expression that was
+  /// parsed.
+  ///
+  ///     logicalAndExpression ::=
+  ///         equalityExpression ('&&' equalityExpression)*
   Expression parseLogicalAndExpression() {
     Expression expression = parseEqualityExpression();
     while (_currentToken.type == TokenType.AMPERSAND_AMPERSAND) {
@@ -3857,13 +3628,11 @@
     return expression;
   }
 
-  /**
-   * Parse a logical or expression. Return the logical or expression that was
-   * parsed.
-   *
-   *     logicalOrExpression ::=
-   *         logicalAndExpression ('||' logicalAndExpression)*
-   */
+  /// Parse a logical or expression. Return the logical or expression that was
+  /// parsed.
+  ///
+  ///     logicalOrExpression ::=
+  ///         logicalAndExpression ('||' logicalAndExpression)*
   Expression parseLogicalOrExpression() {
     Expression expression = parseLogicalAndExpression();
     while (_currentToken.type == TokenType.BAR_BAR) {
@@ -3873,18 +3642,16 @@
     return expression;
   }
 
-  /**
-   * Parse a map literal. The [modifier] is the 'const' modifier appearing
-   * before the literal, or `null` if there is no modifier. The [typeArguments]
-   * is the type arguments that were declared, or `null` if there are no type
-   * arguments. Return the map literal that was parsed.
-   *
-   * This method assumes that the current token matches
-   * `TokenType.OPEN_CURLY_BRACKET`.
-   *
-   *     mapLiteral ::=
-   *         'const'? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? '}'
-   */
+  /// Parse a map literal. The [modifier] is the 'const' modifier appearing
+  /// before the literal, or `null` if there is no modifier. The [typeArguments]
+  /// is the type arguments that were declared, or `null` if there are no type
+  /// arguments. Return the map literal that was parsed.
+  ///
+  /// This method assumes that the current token matches
+  /// `TokenType.OPEN_CURLY_BRACKET`.
+  ///
+  ///     mapLiteral ::=
+  ///         'const'? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? '}'
   MapLiteral parseMapLiteral(Token modifier, TypeArgumentList typeArguments) {
     Token leftBracket = getAndAdvance();
     if (_matches(TokenType.CLOSE_CURLY_BRACKET)) {
@@ -3910,12 +3677,10 @@
     }
   }
 
-  /**
-   * Parse a map literal entry. Return the map literal entry that was parsed.
-   *
-   *     mapLiteralEntry ::=
-   *         expression ':' expression
-   */
+  /// Parse a map literal entry. Return the map literal entry that was parsed.
+  ///
+  ///     mapLiteralEntry ::=
+  ///         expression ':' expression
   MapLiteralEntry parseMapLiteralEntry() {
     Expression key = parseExpression2();
     Token separator = _expect(TokenType.COLON);
@@ -3923,17 +3688,15 @@
     return astFactory.mapLiteralEntry(key, separator, value);
   }
 
-  /**
-   * Parse the modifiers preceding a declaration. This method allows the
-   * modifiers to appear in any order but does generate errors for duplicated
-   * modifiers. Checks for other problems, such as having the modifiers appear
-   * in the wrong order or specifying both 'const' and 'final', are reported in
-   * one of the methods whose name is prefixed with `validateModifiersFor`.
-   * Return the modifiers that were parsed.
-   *
-   *     modifiers ::=
-   *         ('abstract' | 'const' | 'external' | 'factory' | 'final' | 'static' | 'var')*
-   */
+  /// Parse the modifiers preceding a declaration. This method allows the
+  /// modifiers to appear in any order but does generate errors for duplicated
+  /// modifiers. Checks for other problems, such as having the modifiers appear
+  /// in the wrong order or specifying both 'const' and 'final', are reported in
+  /// one of the methods whose name is prefixed with `validateModifiersFor`.
+  /// Return the modifiers that were parsed.
+  ///
+  ///     modifiers ::=
+  ///         ('abstract' | 'const' | 'external' | 'factory' | 'final' | 'static' | 'var')*
   Modifiers parseModifiers() {
     Modifiers modifiers = new Modifiers();
     bool progress = true;
@@ -4016,14 +3779,12 @@
     return modifiers;
   }
 
-  /**
-   * Parse a multiplicative expression. Return the multiplicative expression
-   * that was parsed.
-   *
-   *     multiplicativeExpression ::=
-   *         unaryExpression (multiplicativeOperator unaryExpression)*
-   *       | 'super' (multiplicativeOperator unaryExpression)+
-   */
+  /// Parse a multiplicative expression. Return the multiplicative expression
+  /// that was parsed.
+  ///
+  ///     multiplicativeExpression ::=
+  ///         unaryExpression (multiplicativeOperator unaryExpression)*
+  ///       | 'super' (multiplicativeOperator unaryExpression)+
   Expression parseMultiplicativeExpression() {
     Expression expression;
     if (_currentToken.keyword == Keyword.SUPER &&
@@ -4039,37 +3800,33 @@
     return expression;
   }
 
-  /**
-   * Parse a new expression. Return the new expression that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.NEW`.
-   *
-   *     newExpression ::=
-   *         instanceCreationExpression
-   */
+  /// Parse a new expression. Return the new expression that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.NEW`.
+  ///
+  ///     newExpression ::=
+  ///         instanceCreationExpression
   InstanceCreationExpression parseNewExpression() =>
       parseInstanceCreationExpression(getAndAdvance());
 
-  /**
-   * Parse a non-labeled statement. Return the non-labeled statement that was
-   * parsed.
-   *
-   *     nonLabeledStatement ::=
-   *         block
-   *       | assertStatement
-   *       | breakStatement
-   *       | continueStatement
-   *       | doStatement
-   *       | forStatement
-   *       | ifStatement
-   *       | returnStatement
-   *       | switchStatement
-   *       | tryStatement
-   *       | whileStatement
-   *       | variableDeclarationList ';'
-   *       | expressionStatement
-   *       | functionSignature functionBody
-   */
+  /// Parse a non-labeled statement. Return the non-labeled statement that was
+  /// parsed.
+  ///
+  ///     nonLabeledStatement ::=
+  ///         block
+  ///       | assertStatement
+  ///       | breakStatement
+  ///       | continueStatement
+  ///       | doStatement
+  ///       | forStatement
+  ///       | ifStatement
+  ///       | returnStatement
+  ///       | switchStatement
+  ///       | tryStatement
+  ///       | whileStatement
+  ///       | variableDeclarationList ';'
+  ///       | expressionStatement
+  ///       | functionSignature functionBody
   Statement parseNonLabeledStatement() {
     // TODO(brianwilkerson) Pass the comment and metadata on where appropriate.
     CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
@@ -4269,25 +4026,23 @@
     }
   }
 
-  /**
-   * Parse a normal formal parameter. Return the normal formal parameter that
-   * was parsed.
-   *
-   *     normalFormalParameter ::=
-   *         functionSignature
-   *       | fieldFormalParameter
-   *       | simpleFormalParameter
-   *
-   *     functionSignature:
-   *         metadata returnType? identifier typeParameters? formalParameterList
-   *
-   *     fieldFormalParameter ::=
-   *         metadata finalConstVarOrType? 'this' '.' identifier
-   *
-   *     simpleFormalParameter ::=
-   *         declaredIdentifier
-   *       | metadata identifier
-   */
+  /// Parse a normal formal parameter. Return the normal formal parameter that
+  /// was parsed.
+  ///
+  ///     normalFormalParameter ::=
+  ///         functionSignature
+  ///       | fieldFormalParameter
+  ///       | simpleFormalParameter
+  ///
+  ///     functionSignature:
+  ///         metadata returnType? identifier typeParameters? formalParameterList
+  ///
+  ///     fieldFormalParameter ::=
+  ///         metadata finalConstVarOrType? 'this' '.' identifier
+  ///
+  ///     simpleFormalParameter ::=
+  ///         declaredIdentifier
+  ///       | metadata identifier
   NormalFormalParameter parseNormalFormalParameter(
       {bool inFunctionType: false}) {
     Token covariantKeyword;
@@ -4387,19 +4142,17 @@
             astFactory.simpleIdentifier(identifier.token, isDeclaration: true));
   }
 
-  /**
-   * Parse an operator declaration. The [commentAndMetadata] is the
-   * documentation comment and metadata to be associated with the declaration.
-   * The [externalKeyword] is the 'external' token. The [returnType] is the
-   * return type that has already been parsed, or `null` if there was no return
-   * type. Return the operator declaration that was parsed.
-   *
-   *     operatorDeclaration ::=
-   *         operatorSignature (';' | functionBody)
-   *
-   *     operatorSignature ::=
-   *         'external'? returnType? 'operator' operator formalParameterList
-   */
+  /// Parse an operator declaration. The [commentAndMetadata] is the
+  /// documentation comment and metadata to be associated with the declaration.
+  /// The [externalKeyword] is the 'external' token. The [returnType] is the
+  /// return type that has already been parsed, or `null` if there was no return
+  /// type. Return the operator declaration that was parsed.
+  ///
+  ///     operatorDeclaration ::=
+  ///         operatorSignature (';' | functionBody)
+  ///
+  ///     operatorSignature ::=
+  ///         'external'? returnType? 'operator' operator formalParameterList
   MethodDeclaration parseOperator(CommentAndMetadata commentAndMetadata,
       Token externalKeyword, TypeName returnType) {
     Token operatorKeyword;
@@ -4414,19 +4167,17 @@
         commentAndMetadata, externalKeyword, returnType, operatorKeyword);
   }
 
-  /**
-   * Parse a part or part-of directive. The [commentAndMetadata] is the metadata
-   * to be associated with the directive. Return the part or part-of directive
-   * that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.PART`.
-   *
-   *     partDirective ::=
-   *         metadata 'part' stringLiteral ';'
-   *
-   *     partOfDirective ::=
-   *         metadata 'part' 'of' identifier ';'
-   */
+  /// Parse a part or part-of directive. The [commentAndMetadata] is the
+  /// metadata to be associated with the directive. Return the part or part-of
+  /// directive that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.PART`.
+  ///
+  ///     partDirective ::=
+  ///         metadata 'part' stringLiteral ';'
+  ///
+  ///     partOfDirective ::=
+  ///         metadata 'part' 'of' identifier ';'
   Directive parsePartOrPartOfDirective(CommentAndMetadata commentAndMetadata) {
     if (_tokenMatchesKeyword(_peek(), Keyword.OF)) {
       return _parsePartOfDirective(commentAndMetadata);
@@ -4434,17 +4185,15 @@
     return _parsePartDirective(commentAndMetadata);
   }
 
-  /**
-   * Parse a postfix expression. Return the postfix expression that was parsed.
-   *
-   *     postfixExpression ::=
-   *         assignableExpression postfixOperator
-   *       | primary selector*
-   *
-   *     selector ::=
-   *         assignableSelector
-   *       | argumentPart
-   */
+  /// Parse a postfix expression. Return the postfix expression that was parsed.
+  ///
+  ///     postfixExpression ::=
+  ///         assignableExpression postfixOperator
+  ///       | primary selector*
+  ///
+  ///     selector ::=
+  ///         assignableSelector
+  ///       | argumentPart
   Expression parsePostfixExpression() {
     Expression operand = parseAssignableExpression(true);
     TokenType type = _currentToken.type;
@@ -4499,40 +4248,36 @@
     return astFactory.postfixExpression(operand, operator);
   }
 
-  /**
-   * Parse a prefixed identifier. Return the prefixed identifier that was
-   * parsed.
-   *
-   *     prefixedIdentifier ::=
-   *         identifier ('.' identifier)?
-   */
+  /// Parse a prefixed identifier. Return the prefixed identifier that was
+  /// parsed.
+  ///
+  ///     prefixedIdentifier ::=
+  ///         identifier ('.' identifier)?
   Identifier parsePrefixedIdentifier() {
     return _parsePrefixedIdentifierAfterIdentifier(parseSimpleIdentifier());
   }
 
-  /**
-   * Parse a primary expression. Return the primary expression that was parsed.
-   *
-   *     primary ::=
-   *         thisExpression
-   *       | 'super' unconditionalAssignableSelector
-   *       | functionExpression
-   *       | literal
-   *       | identifier
-   *       | newExpression
-   *       | constObjectExpression
-   *       | '(' expression ')'
-   *       | argumentDefinitionTest
-   *
-   *     literal ::=
-   *         nullLiteral
-   *       | booleanLiteral
-   *       | numericLiteral
-   *       | stringLiteral
-   *       | symbolLiteral
-   *       | mapLiteral
-   *       | listLiteral
-   */
+  /// Parse a primary expression. Return the primary expression that was parsed.
+  ///
+  ///     primary ::=
+  ///         thisExpression
+  ///       | 'super' unconditionalAssignableSelector
+  ///       | functionExpression
+  ///       | literal
+  ///       | identifier
+  ///       | newExpression
+  ///       | constObjectExpression
+  ///       | '(' expression ')'
+  ///       | argumentDefinitionTest
+  ///
+  ///     literal ::=
+  ///         nullLiteral
+  ///       | booleanLiteral
+  ///       | numericLiteral
+  ///       | stringLiteral
+  ///       | symbolLiteral
+  ///       | mapLiteral
+  ///       | listLiteral
   Expression parsePrimaryExpression() {
     if (_matchesIdentifier()) {
       // TODO(brianwilkerson) The code below was an attempt to recover from an
@@ -4646,16 +4391,14 @@
     }
   }
 
-  /**
-   * Parse a redirecting constructor invocation. The flag [hasPeriod] should be
-   * `true` if the `this` is followed by a period. Return the redirecting
-   * constructor invocation that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.THIS`.
-   *
-   *     redirectingConstructorInvocation ::=
-   *         'this' ('.' identifier)? arguments
-   */
+  /// Parse a redirecting constructor invocation. The flag [hasPeriod] should be
+  /// `true` if the `this` is followed by a period. Return the redirecting
+  /// constructor invocation that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.THIS`.
+  ///
+  ///     redirectingConstructorInvocation ::=
+  ///         'this' ('.' identifier)? arguments
   RedirectingConstructorInvocation parseRedirectingConstructorInvocation(
       bool hasPeriod) {
     Token keyword = getAndAdvance();
@@ -4676,14 +4419,12 @@
         keyword, period, constructorName, argumentList);
   }
 
-  /**
-   * Parse a relational expression. Return the relational expression that was
-   * parsed.
-   *
-   *     relationalExpression ::=
-   *         bitwiseOrExpression ('is' '!'? type | 'as' type | relationalOperator bitwiseOrExpression)?
-   *       | 'super' relationalOperator bitwiseOrExpression
-   */
+  /// Parse a relational expression. Return the relational expression that was
+  /// parsed.
+  ///
+  ///     relationalExpression ::=
+  ///         bitwiseOrExpression ('is' '!'? type | 'as' type | relationalOperator bitwiseOrExpression)?
+  ///       | 'super' relationalOperator bitwiseOrExpression
   Expression parseRelationalExpression() {
     if (_currentToken.keyword == Keyword.SUPER &&
         _currentToken.next.type.isRelationalOperator) {
@@ -4714,25 +4455,21 @@
     return expression;
   }
 
-  /**
-   * Parse a rethrow expression. Return the rethrow expression that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.RETHROW`.
-   *
-   *     rethrowExpression ::=
-   *         'rethrow'
-   */
+  /// Parse a rethrow expression. Return the rethrow expression that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.RETHROW`.
+  ///
+  ///     rethrowExpression ::=
+  ///         'rethrow'
   Expression parseRethrowExpression() =>
       astFactory.rethrowExpression(getAndAdvance());
 
-  /**
-   * Parse a return statement. Return the return statement that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.RETURN`.
-   *
-   *     returnStatement ::=
-   *         'return' expression? ';'
-   */
+  /// Parse a return statement. Return the return statement that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.RETURN`.
+  ///
+  ///     returnStatement ::=
+  ///         'return' expression? ';'
   Statement parseReturnStatement() {
     Token returnKeyword = getAndAdvance();
     if (_matches(TokenType.SEMICOLON)) {
@@ -4743,22 +4480,20 @@
     return astFactory.returnStatement(returnKeyword, expression, semicolon);
   }
 
-  /**
-   * Parse a setter. The [commentAndMetadata] is the documentation comment and
-   * metadata to be associated with the declaration. The [externalKeyword] is
-   * the 'external' token. The [staticKeyword] is the static keyword, or `null`
-   * if the setter is not static. The [returnType] is the return type that has
-   * already been parsed, or `null` if there was no return type. Return the
-   * setter that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.SET`.
-   *
-   *     setter ::=
-   *         setterSignature functionBody?
-   *
-   *     setterSignature ::=
-   *         'external'? 'static'? returnType? 'set' identifier formalParameterList
-   */
+  /// Parse a setter. The [commentAndMetadata] is the documentation comment and
+  /// metadata to be associated with the declaration. The [externalKeyword] is
+  /// the 'external' token. The [staticKeyword] is the static keyword, or `null`
+  /// if the setter is not static. The [returnType] is the return type that has
+  /// already been parsed, or `null` if there was no return type. Return the
+  /// setter that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.SET`.
+  ///
+  ///     setter ::=
+  ///         setterSignature functionBody?
+  ///
+  ///     setterSignature ::=
+  ///         'external'? 'static'? returnType? 'set' identifier formalParameterList
   MethodDeclaration parseSetter(CommentAndMetadata commentAndMetadata,
       Token externalKeyword, Token staticKeyword, TypeAnnotation returnType) {
     Token propertyKeyword = getAndAdvance();
@@ -4786,13 +4521,11 @@
         body);
   }
 
-  /**
-   * Parse a shift expression. Return the shift expression that was parsed.
-   *
-   *     shiftExpression ::=
-   *         additiveExpression (shiftOperator additiveExpression)*
-   *       | 'super' (shiftOperator additiveExpression)+
-   */
+  /// Parse a shift expression. Return the shift expression that was parsed.
+  ///
+  ///     shiftExpression ::=
+  ///         additiveExpression (shiftOperator additiveExpression)*
+  ///       | 'super' (shiftOperator additiveExpression)+
   Expression parseShiftExpression() {
     Expression expression;
     if (_currentToken.keyword == Keyword.SUPER &&
@@ -4808,12 +4541,10 @@
     return expression;
   }
 
-  /**
-   * Parse a simple identifier. Return the simple identifier that was parsed.
-   *
-   *     identifier ::=
-   *         IDENTIFIER
-   */
+  /// Parse a simple identifier. Return the simple identifier that was parsed.
+  ///
+  ///     identifier ::=
+  ///         IDENTIFIER
   SimpleIdentifier parseSimpleIdentifier(
       {bool allowKeyword: false, bool isDeclaration: false}) {
     if (_matchesIdentifier() ||
@@ -4824,22 +4555,18 @@
     return createSyntheticIdentifier(isDeclaration: isDeclaration);
   }
 
-  /**
-   * Parse a statement, starting with the given [token]. Return the statement
-   * that was parsed, or `null` if the tokens do not represent a recognizable
-   * statement.
-   */
+  /// Parse a statement, starting with the given [token]. Return the statement
+  /// that was parsed, or `null` if the tokens do not represent a recognizable
+  /// statement.
   Statement parseStatement(Token token) {
     _currentToken = token;
     return parseStatement2();
   }
 
-  /**
-   * Parse a statement. Return the statement that was parsed.
-   *
-   *     statement ::=
-   *         label* nonLabeledStatement
-   */
+  /// Parse a statement. Return the statement that was parsed.
+  ///
+  ///     statement ::=
+  ///         label* nonLabeledStatement
   Statement parseStatement2() {
     if (_treeDepth > _MAX_TREE_DEPTH) {
       throw new _TooDeepTreeError();
@@ -4866,23 +4593,19 @@
     }
   }
 
-  /**
-   * Parse a sequence of statements, starting with the given [token]. Return the
-   * statements that were parsed, or `null` if the tokens do not represent a
-   * recognizable sequence of statements.
-   */
+  /// Parse a sequence of statements, starting with the given [token]. Return
+  /// the statements that were parsed, or `null` if the tokens do not represent
+  /// a recognizable sequence of statements.
   List<Statement> parseStatements(Token token) {
     _currentToken = token;
     return _parseStatementList();
   }
 
-  /**
-   * Parse a string literal. Return the string literal that was parsed.
-   *
-   *     stringLiteral ::=
-   *         MULTI_LINE_STRING+
-   *       | SINGLE_LINE_STRING+
-   */
+  /// Parse a string literal. Return the string literal that was parsed.
+  ///
+  ///     stringLiteral ::=
+  ///         MULTI_LINE_STRING+
+  ///       | SINGLE_LINE_STRING+
   StringLiteral parseStringLiteral() {
     if (_matches(TokenType.STRING)) {
       return _parseStringLiteralUnchecked();
@@ -4891,15 +4614,13 @@
     return createSyntheticStringLiteral();
   }
 
-  /**
-   * Parse a super constructor invocation. Return the super constructor
-   * invocation that was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.SUPER].
-   *
-   *     superConstructorInvocation ::=
-   *         'super' ('.' identifier)? arguments
-   */
+  /// Parse a super constructor invocation. Return the super constructor
+  /// invocation that was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.SUPER].
+  ///
+  ///     superConstructorInvocation ::=
+  ///         'super' ('.' identifier)? arguments
   SuperConstructorInvocation parseSuperConstructorInvocation() {
     Token keyword = getAndAdvance();
     Token period = null;
@@ -4913,18 +4634,16 @@
         keyword, period, constructorName, argumentList);
   }
 
-  /**
-   * Parse a switch statement. Return the switch statement that was parsed.
-   *
-   *     switchStatement ::=
-   *         'switch' '(' expression ')' '{' switchCase* defaultCase? '}'
-   *
-   *     switchCase ::=
-   *         label* ('case' expression ':') statements
-   *
-   *     defaultCase ::=
-   *         label* 'default' ':' statements
-   */
+  /// Parse a switch statement. Return the switch statement that was parsed.
+  ///
+  ///     switchStatement ::=
+  ///         'switch' '(' expression ')' '{' switchCase* defaultCase? '}'
+  ///
+  ///     switchCase ::=
+  ///         label* ('case' expression ':') statements
+  ///
+  ///     defaultCase ::=
+  ///         label* 'default' ':' statements
   SwitchStatement parseSwitchStatement() {
     bool wasInSwitch = _inSwitch;
     _inSwitch = true;
@@ -5005,14 +4724,12 @@
     }
   }
 
-  /**
-   * Parse a symbol literal. Return the symbol literal that was parsed.
-   *
-   * This method assumes that the current token matches [TokenType.HASH].
-   *
-   *     symbolLiteral ::=
-   *         '#' identifier ('.' identifier)*
-   */
+  /// Parse a symbol literal. Return the symbol literal that was parsed.
+  ///
+  /// This method assumes that the current token matches [TokenType.HASH].
+  ///
+  ///     symbolLiteral ::=
+  ///         '#' identifier ('.' identifier)*
   SymbolLiteral parseSymbolLiteral() {
     Token poundSign = getAndAdvance();
     List<Token> components = <Token>[];
@@ -5038,14 +4755,12 @@
     return astFactory.symbolLiteral(poundSign, components);
   }
 
-  /**
-   * Parse a throw expression. Return the throw expression that was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.THROW].
-   *
-   *     throwExpression ::=
-   *         'throw' expression
-   */
+  /// Parse a throw expression. Return the throw expression that was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.THROW].
+  ///
+  ///     throwExpression ::=
+  ///         'throw' expression
   Expression parseThrowExpression() {
     Token keyword = getAndAdvance();
     TokenType type = _currentToken.type;
@@ -5058,14 +4773,12 @@
     return astFactory.throwExpression(keyword, expression);
   }
 
-  /**
-   * Parse a throw expression. Return the throw expression that was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.THROW].
-   *
-   *     throwExpressionWithoutCascade ::=
-   *         'throw' expressionWithoutCascade
-   */
+  /// Parse a throw expression. Return the throw expression that was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.THROW].
+  ///
+  ///     throwExpressionWithoutCascade ::=
+  ///         'throw' expressionWithoutCascade
   Expression parseThrowExpressionWithoutCascade() {
     Token keyword = getAndAdvance();
     TokenType type = _currentToken.type;
@@ -5078,24 +4791,22 @@
     return astFactory.throwExpression(keyword, expression);
   }
 
-  /**
-   * Parse a try statement. Return the try statement that was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.TRY].
-   *
-   *     tryStatement ::=
-   *         'try' block (onPart+ finallyPart? | finallyPart)
-   *
-   *     onPart ::=
-   *         catchPart block
-   *       | 'on' type catchPart? block
-   *
-   *     catchPart ::=
-   *         'catch' '(' identifier (',' identifier)? ')'
-   *
-   *     finallyPart ::=
-   *         'finally' block
-   */
+  /// Parse a try statement. Return the try statement that was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.TRY].
+  ///
+  ///     tryStatement ::=
+  ///         'try' block (onPart+ finallyPart? | finallyPart)
+  ///
+  ///     onPart ::=
+  ///         catchPart block
+  ///       | 'on' type catchPart? block
+  ///
+  ///     catchPart ::=
+  ///         'catch' '(' identifier (',' identifier)? ')'
+  ///
+  ///     finallyPart ::=
+  ///         'finally' block
   Statement parseTryStatement() {
     Token tryKeyword = getAndAdvance();
     Block body = _parseBlockChecked();
@@ -5147,25 +4858,23 @@
         tryKeyword, body, catchClauses, finallyKeyword, finallyClause);
   }
 
-  /**
-   * Parse a type alias. The [commentAndMetadata] is the metadata to be
-   * associated with the member. Return the type alias that was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.TYPEDEF].
-   *
-   *     typeAlias ::=
-   *         'typedef' typeAliasBody
-   *       | genericTypeAlias
-   *
-   *     typeAliasBody ::=
-   *         functionTypeAlias
-   *
-   *     functionTypeAlias ::=
-   *         functionPrefix typeParameterList? formalParameterList ';'
-   *
-   *     functionPrefix ::=
-   *         returnType? name
-   */
+  /// Parse a type alias. The [commentAndMetadata] is the metadata to be
+  /// associated with the member. Return the type alias that was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.TYPEDEF].
+  ///
+  ///     typeAlias ::=
+  ///         'typedef' typeAliasBody
+  ///       | genericTypeAlias
+  ///
+  ///     typeAliasBody ::=
+  ///         functionTypeAlias
+  ///
+  ///     functionTypeAlias ::=
+  ///         functionPrefix typeParameterList? formalParameterList ';'
+  ///
+  ///     functionPrefix ::=
+  ///         returnType? name
   TypeAlias parseTypeAlias(CommentAndMetadata commentAndMetadata) {
     Token keyword = getAndAdvance();
     if (_matchesIdentifier()) {
@@ -5186,13 +4895,11 @@
     return _parseFunctionTypeAlias(commentAndMetadata, keyword);
   }
 
-  /**
-   * Parse a type.
-   *
-   *     type ::=
-   *         typeWithoutFunction
-   *       | functionType
-   */
+  /// Parse a type.
+  ///
+  ///     type ::=
+  ///         typeWithoutFunction
+  ///       | functionType
   TypeAnnotation parseTypeAnnotation(bool inExpression) {
     TypeAnnotation type = null;
     if (_atGenericFunctionTypeAfterReturnType(_currentToken)) {
@@ -5207,18 +4914,16 @@
     return type;
   }
 
-  /**
-   * Parse a list of type arguments. Return the type argument list that was
-   * parsed.
-   *
-   * This method assumes that the current token matches `TokenType.LT`.
-   *
-   *     typeArguments ::=
-   *         '<' typeList '>'
-   *
-   *     typeList ::=
-   *         type (',' type)*
-   */
+  /// Parse a list of type arguments. Return the type argument list that was
+  /// parsed.
+  ///
+  /// This method assumes that the current token matches `TokenType.LT`.
+  ///
+  ///     typeArguments ::=
+  ///         '<' typeList '>'
+  ///
+  ///     typeList ::=
+  ///         type (',' type)*
   TypeArgumentList parseTypeArgumentList() {
     Token leftBracket = getAndAdvance();
     List<TypeAnnotation> arguments = <TypeAnnotation>[
@@ -5231,26 +4936,22 @@
     return astFactory.typeArgumentList(leftBracket, arguments, rightBracket);
   }
 
-  /**
-   * Parse a type which is not void and is not a function type. Return the type
-   * that was parsed.
-   *
-   *     typeNotVoidWithoutFunction ::=
-   *         qualified typeArguments?
-   */
+  /// Parse a type which is not void and is not a function type. Return the type
+  /// that was parsed.
+  ///
+  ///     typeNotVoidWithoutFunction ::=
+  ///         qualified typeArguments?
   // TODO(eernst): Rename this to `parseTypeNotVoidWithoutFunction`?
   // Apparently,  it was named `parseTypeName` before type arguments existed.
   TypeName parseTypeName(bool inExpression) {
     return _parseTypeName(inExpression);
   }
 
-  /**
-   * Parse a type which is not `void`.
-   *
-   *     typeNotVoid ::=
-   *         functionType
-   *       | typeNotVoidWithoutFunction
-   */
+  /// Parse a type which is not `void`.
+  ///
+  ///     typeNotVoid ::=
+  ///         functionType
+  ///       | typeNotVoidWithoutFunction
   TypeAnnotation parseTypeNotVoid(bool inExpression) {
     TypeAnnotation type = null;
     if (_atGenericFunctionTypeAfterReturnType(_currentToken)) {
@@ -5269,12 +4970,10 @@
     return type;
   }
 
-  /**
-   * Parse a type parameter. Return the type parameter that was parsed.
-   *
-   *     typeParameter ::=
-   *         metadata name ('extends' bound)?
-   */
+  /// Parse a type parameter. Return the type parameter that was parsed.
+  ///
+  ///     typeParameter ::=
+  ///         metadata name ('extends' bound)?
   TypeParameter parseTypeParameter() {
     CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
     SimpleIdentifier name = parseSimpleIdentifier(isDeclaration: true);
@@ -5288,15 +4987,13 @@
         commentAndMetadata.metadata, name, null, null);
   }
 
-  /**
-   * Parse a list of type parameters. Return the list of type parameters that
-   * were parsed.
-   *
-   * This method assumes that the current token matches `TokenType.LT`.
-   *
-   *     typeParameterList ::=
-   *         '<' typeParameter (',' typeParameter)* '>'
-   */
+  /// Parse a list of type parameters. Return the list of type parameters that
+  /// were parsed.
+  ///
+  /// This method assumes that the current token matches `TokenType.LT`.
+  ///
+  ///     typeParameterList ::=
+  ///         '<' typeParameter (',' typeParameter)* '>'
   TypeParameterList parseTypeParameterList() {
     Token leftBracket = getAndAdvance();
     List<TypeParameter> typeParameters = <TypeParameter>[parseTypeParameter()];
@@ -5308,13 +5005,11 @@
         leftBracket, typeParameters, rightBracket);
   }
 
-  /**
-   * Parse a type which is not a function type.
-   *
-   *     typeWithoutFunction ::=
-   *         `void`
-   *       | typeNotVoidWithoutFunction
-   */
+  /// Parse a type which is not a function type.
+  ///
+  ///     typeWithoutFunction ::=
+  ///         `void`
+  ///       | typeNotVoidWithoutFunction
   TypeAnnotation parseTypeWithoutFunction(bool inExpression) {
     if (_currentToken.keyword == Keyword.VOID) {
       return astFactory.typeName(
@@ -5324,17 +5019,15 @@
     }
   }
 
-  /**
-   * Parse a unary expression. Return the unary expression that was parsed.
-   *
-   *     unaryExpression ::=
-   *         prefixOperator unaryExpression
-   *       | awaitExpression
-   *       | postfixExpression
-   *       | unaryOperator 'super'
-   *       | '-' 'super'
-   *       | incrementOperator assignableExpression
-   */
+  /// Parse a unary expression. Return the unary expression that was parsed.
+  ///
+  ///     unaryExpression ::=
+  ///         prefixOperator unaryExpression
+  ///       | awaitExpression
+  ///       | postfixExpression
+  ///       | unaryOperator 'super'
+  ///       | '-' 'super'
+  ///       | incrementOperator assignableExpression
   Expression parseUnaryExpression() {
     TokenType type = _currentToken.type;
     if (type == TokenType.MINUS ||
@@ -5400,13 +5093,11 @@
     return parsePostfixExpression();
   }
 
-  /**
-   * Parse a variable declaration. Return the variable declaration that was
-   * parsed.
-   *
-   *     variableDeclaration ::=
-   *         identifier ('=' expression)?
-   */
+  /// Parse a variable declaration. Return the variable declaration that was
+  /// parsed.
+  ///
+  ///     variableDeclaration ::=
+  ///         identifier ('=' expression)?
   VariableDeclaration parseVariableDeclaration() {
     // TODO(paulberry): prior to the fix for bug 23204, we permitted
     // annotations before variable declarations (e.g. "String @deprecated s;").
@@ -5427,14 +5118,12 @@
     return astFactory.variableDeclaration(name, equals, initializer);
   }
 
-  /**
-   * Parse a variable declaration list. The [commentAndMetadata] is the metadata
-   * to be associated with the variable declaration list. Return the variable
-   * declaration list that was parsed.
-   *
-   *     variableDeclarationList ::=
-   *         finalConstVarOrType variableDeclaration (',' variableDeclaration)*
-   */
+  /// Parse a variable declaration list. The [commentAndMetadata] is the
+  /// metadata to be associated with the variable declaration list. Return the
+  /// variable declaration list that was parsed.
+  ///
+  ///     variableDeclarationList ::=
+  ///         finalConstVarOrType variableDeclaration (',' variableDeclaration)*
   VariableDeclarationList parseVariableDeclarationListAfterMetadata(
       CommentAndMetadata commentAndMetadata) {
     FinalConstVarOrType holder = parseFinalConstVarOrType(false);
@@ -5442,17 +5131,15 @@
         commentAndMetadata, holder.keyword, holder.type);
   }
 
-  /**
-   * Parse a variable declaration list. The [commentAndMetadata] is the metadata
-   * to be associated with the variable declaration list, or `null` if there is
-   * no attempt at parsing the comment and metadata. The [keyword] is the token
-   * representing the 'final', 'const' or 'var' keyword, or `null` if there is
-   * no keyword. The [type] is the type of the variables in the list. Return the
-   * variable declaration list that was parsed.
-   *
-   *     variableDeclarationList ::=
-   *         finalConstVarOrType variableDeclaration (',' variableDeclaration)*
-   */
+  /// Parse a variable declaration list. The [commentAndMetadata] is the
+  /// metadata to be associated with the variable declaration list, or `null`
+  /// if there is no attempt at parsing the comment and metadata. The [keyword]
+  /// is the token representing the 'final', 'const' or 'var' keyword, or
+  /// `null` if there is no keyword. The [type] is the type of the variables in
+  /// the list. Return the variable declaration list that was parsed.
+  ///
+  ///     variableDeclarationList ::=
+  ///         finalConstVarOrType variableDeclaration (',' variableDeclaration)*
   VariableDeclarationList parseVariableDeclarationListAfterType(
       CommentAndMetadata commentAndMetadata,
       Token keyword,
@@ -5472,15 +5159,13 @@
         commentAndMetadata?.metadata, keyword, type, variables);
   }
 
-  /**
-   * Parse a variable declaration statement. The [commentAndMetadata] is the
-   * metadata to be associated with the variable declaration statement, or
-   * `null` if there is no attempt at parsing the comment and metadata. Return
-   * the variable declaration statement that was parsed.
-   *
-   *     variableDeclarationStatement ::=
-   *         variableDeclarationList ';'
-   */
+  /// Parse a variable declaration statement. The [commentAndMetadata] is the
+  /// metadata to be associated with the variable declaration statement, or
+  /// `null` if there is no attempt at parsing the comment and metadata. Return
+  /// the variable declaration statement that was parsed.
+  ///
+  ///     variableDeclarationStatement ::=
+  ///         variableDeclarationList ';'
   VariableDeclarationStatement parseVariableDeclarationStatementAfterMetadata(
       CommentAndMetadata commentAndMetadata) {
     //    Token startToken = currentToken;
@@ -5496,14 +5181,12 @@
     return astFactory.variableDeclarationStatement(variableList, semicolon);
   }
 
-  /**
-   * Parse a while statement. Return the while statement that was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.WHILE].
-   *
-   *     whileStatement ::=
-   *         'while' '(' expression ')' statement
-   */
+  /// Parse a while statement. Return the while statement that was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.WHILE].
+  ///
+  ///     whileStatement ::=
+  ///         'while' '(' expression ')' statement
   Statement parseWhileStatement() {
     bool wasInLoop = _inLoop;
     _inLoop = true;
@@ -5520,14 +5203,12 @@
     }
   }
 
-  /**
-   * Parse a with clause. Return the with clause that was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.WITH`.
-   *
-   *     withClause ::=
-   *         'with' typeName (',' typeName)*
-   */
+  /// Parse a with clause. Return the with clause that was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.WITH`.
+  ///
+  ///     withClause ::=
+  ///         'with' typeName (',' typeName)*
   WithClause parseWithClause() {
     Token withKeyword = getAndAdvance();
     List<TypeName> types = <TypeName>[];
@@ -5538,14 +5219,12 @@
     return astFactory.withClause(withKeyword, types);
   }
 
-  /**
-   * Parse a yield statement. Return the yield statement that was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.YIELD].
-   *
-   *     yieldStatement ::=
-   *         'yield' '*'? expression ';'
-   */
+  /// Parse a yield statement. Return the yield statement that was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.YIELD].
+  ///
+  ///     yieldStatement ::=
+  ///         'yield' '*'? expression ';'
   YieldStatement parseYieldStatement() {
     Token yieldToken = getAndAdvance();
     Token star = null;
@@ -5557,14 +5236,12 @@
     return astFactory.yieldStatement(yieldToken, star, expression, semicolon);
   }
 
-  /**
-   * Parse a formal parameter list, starting at the [startToken], without
-   * actually creating a formal parameter list or changing the current token.
-   * Return the token following the parameter list that was parsed, or `null`
-   * if the given token is not the first token in a valid parameter list.
-   *
-   * This method must be kept in sync with [parseFormalParameterList].
-   */
+  /// Parse a formal parameter list, starting at the [startToken], without
+  /// actually creating a formal parameter list or changing the current token.
+  /// Return the token following the parameter list that was parsed, or `null`
+  /// if the given token is not the first token in a valid parameter list.
+  ///
+  /// This method must be kept in sync with [parseFormalParameterList].
   Token skipFormalParameterList(Token startToken) {
     if (!_tokenMatches(startToken, TokenType.OPEN_PAREN)) {
       return null;
@@ -5572,16 +5249,14 @@
     return (startToken as BeginToken).endToken?.next;
   }
 
-  /**
-   * Parse the portion of a generic function type after the return type,
-   * starting at the [startToken], without actually creating a generic function
-   * type or changing the current token. Return the token following the generic
-   * function type that was parsed, or `null` if the given token is not the
-   * first token in a valid generic function type.
-   *
-   * This method must be kept in sync with
-   * [parseGenericFunctionTypeAfterReturnType].
-   */
+  /// Parse the portion of a generic function type after the return type,
+  /// starting at the [startToken], without actually creating a generic function
+  /// type or changing the current token. Return the token following the generic
+  /// function type that was parsed, or `null` if the given token is not the
+  /// first token in a valid generic function type.
+  ///
+  /// This method must be kept in sync with
+  /// [parseGenericFunctionTypeAfterReturnType].
   Token skipGenericFunctionTypeAfterReturnType(Token startToken) {
     Token next = startToken.next; // Skip 'Function'
     if (_tokenMatches(next, TokenType.LT)) {
@@ -5593,17 +5268,16 @@
     return skipFormalParameterList(next);
   }
 
-  /**
-   * Parse a prefixed identifier, starting at the [startToken], without actually
-   * creating a prefixed identifier or changing the current token. Return the
-   * token following the prefixed identifier that was parsed, or `null` if the
-   * given token is not the first token in a valid prefixed identifier.
-   *
-   * This method must be kept in sync with [parsePrefixedIdentifier].
-   *
-   *     prefixedIdentifier ::=
-   *         identifier ('.' identifier)?
-   */
+  /// Parse a prefixed identifier, starting at the [startToken], without
+  /// actually creating a prefixed identifier or changing the current token.
+  /// Return the token following the prefixed identifier that was parsed, or
+  /// `null` if the given token is not the first token in a valid prefixed
+  /// identifier.
+  ///
+  /// This method must be kept in sync with [parsePrefixedIdentifier].
+  ///
+  ///     prefixedIdentifier ::=
+  ///         identifier ('.' identifier)?
   Token skipPrefixedIdentifier(Token startToken) {
     Token token = skipSimpleIdentifier(startToken);
     if (token == null) {
@@ -5625,17 +5299,15 @@
     return null;
   }
 
-  /**
-   * Parse a simple identifier, starting at the [startToken], without actually
-   * creating a simple identifier or changing the current token. Return the
-   * token following the simple identifier that was parsed, or `null` if the
-   * given token is not the first token in a valid simple identifier.
-   *
-   * This method must be kept in sync with [parseSimpleIdentifier].
-   *
-   *     identifier ::=
-   *         IDENTIFIER
-   */
+  /// Parse a simple identifier, starting at the [startToken], without actually
+  /// creating a simple identifier or changing the current token. Return the
+  /// token following the simple identifier that was parsed, or `null` if the
+  /// given token is not the first token in a valid simple identifier.
+  ///
+  /// This method must be kept in sync with [parseSimpleIdentifier].
+  ///
+  ///     identifier ::=
+  ///         IDENTIFIER
   Token skipSimpleIdentifier(Token startToken) {
     if (_tokenMatches(startToken, TokenType.IDENTIFIER) ||
         _tokenMatchesPseudoKeyword(startToken)) {
@@ -5644,18 +5316,16 @@
     return null;
   }
 
-  /**
-   * Parse a string literal, starting at the [startToken], without actually
-   * creating a string literal or changing the current token. Return the token
-   * following the string literal that was parsed, or `null` if the given token
-   * is not the first token in a valid string literal.
-   *
-   * This method must be kept in sync with [parseStringLiteral].
-   *
-   *     stringLiteral ::=
-   *         MULTI_LINE_STRING+
-   *       | SINGLE_LINE_STRING+
-   */
+  /// Parse a string literal, starting at the [startToken], without actually
+  /// creating a string literal or changing the current token. Return the token
+  /// following the string literal that was parsed, or `null` if the given token
+  /// is not the first token in a valid string literal.
+  ///
+  /// This method must be kept in sync with [parseStringLiteral].
+  ///
+  ///     stringLiteral ::=
+  ///         MULTI_LINE_STRING+
+  ///       | SINGLE_LINE_STRING+
   Token skipStringLiteral(Token startToken) {
     Token token = startToken;
     while (token != null && _tokenMatches(token, TokenType.STRING)) {
@@ -5672,14 +5342,12 @@
     return token;
   }
 
-  /**
-   * Parse a type annotation, starting at the [startToken], without actually
-   * creating a type annotation or changing the current token. Return the token
-   * following the type annotation that was parsed, or `null` if the given token
-   * is not the first token in a valid type annotation.
-   *
-   * This method must be kept in sync with [parseTypeAnnotation].
-   */
+  /// Parse a type annotation, starting at the [startToken], without actually
+  /// creating a type annotation or changing the current token. Return the token
+  /// following the type annotation that was parsed, or `null` if the given
+  /// token is not the first token in a valid type annotation.
+  ///
+  /// This method must be kept in sync with [parseTypeAnnotation].
   Token skipTypeAnnotation(Token startToken) {
     Token next = null;
     if (_atGenericFunctionTypeAfterReturnType(startToken)) {
@@ -5694,21 +5362,19 @@
     return next;
   }
 
-  /**
-   * Parse a list of type arguments, starting at the [startToken], without
-   * actually creating a type argument list or changing the current token.
-   * Return the token following the type argument list that was parsed, or
-   * `null` if the given token is not the first token in a valid type argument
-   * list.
-   *
-   * This method must be kept in sync with [parseTypeArgumentList].
-   *
-   *     typeArguments ::=
-   *         '<' typeList '>'
-   *
-   *     typeList ::=
-   *         type (',' type)*
-   */
+  /// Parse a list of type arguments, starting at the [startToken], without
+  /// actually creating a type argument list or changing the current token.
+  /// Return the token following the type argument list that was parsed, or
+  /// `null` if the given token is not the first token in a valid type argument
+  /// list.
+  ///
+  /// This method must be kept in sync with [parseTypeArgumentList].
+  ///
+  ///     typeArguments ::=
+  ///         '<' typeList '>'
+  ///
+  ///     typeList ::=
+  ///         type (',' type)*
   Token skipTypeArgumentList(Token startToken) {
     Token token = startToken;
     if (!_tokenMatches(token, TokenType.LT)) {
@@ -5740,17 +5406,15 @@
     return null;
   }
 
-  /**
-   * Parse a type name, starting at the [startToken], without actually creating
-   * a type name or changing the current token. Return the token following the
-   * type name that was parsed, or `null` if the given token is not the first
-   * token in a valid type name.
-   *
-   * This method must be kept in sync with [parseTypeName].
-   *
-   *     type ::=
-   *         qualified typeArguments?
-   */
+  /// Parse a type name, starting at the [startToken], without actually creating
+  /// a type name or changing the current token. Return the token following the
+  /// type name that was parsed, or `null` if the given token is not the first
+  /// token in a valid type name.
+  ///
+  /// This method must be kept in sync with [parseTypeName].
+  ///
+  ///     type ::=
+  ///         qualified typeArguments?
   Token skipTypeName(Token startToken) {
     Token token = skipPrefixedIdentifier(startToken);
     if (token == null) {
@@ -5762,14 +5426,13 @@
     return token;
   }
 
-  /**
-   * Parse a type parameter list, starting at the [startToken], without actually
-   * creating a type parameter list or changing the current token. Return the
-   * token following the type parameter list that was parsed, or `null` if the
-   * given token is not the first token in a valid type parameter list.
-   *
-   * This method must be kept in sync with [parseTypeParameterList].
-   */
+  /// Parse a type parameter list, starting at the [startToken], without
+  /// actually creating a type parameter list or changing the current token.
+  /// Return the token following the type parameter list that was parsed, or
+  /// `null` if the given token is not the first token in a valid type parameter
+  /// list.
+  ///
+  /// This method must be kept in sync with [parseTypeParameterList].
   Token skipTypeParameterList(Token startToken) {
     if (!_tokenMatches(startToken, TokenType.LT)) {
       return null;
@@ -5792,14 +5455,12 @@
     return null;
   }
 
-  /**
-   * Parse a typeWithoutFunction, starting at the [startToken], without actually
-   * creating a TypeAnnotation or changing the current token. Return the token
-   * following the typeWithoutFunction that was parsed, or `null` if the given
-   * token is not the first token in a valid typeWithoutFunction.
-   *
-   * This method must be kept in sync with [parseTypeWithoutFunction].
-   */
+  /// Parse a typeWithoutFunction, starting at the [startToken], without
+  /// actually creating a TypeAnnotation or changing the current token. Return
+  /// the token following the typeWithoutFunction that was parsed, or `null` if
+  /// the given token is not the first token in a valid typeWithoutFunction.
+  ///
+  /// This method must be kept in sync with [parseTypeWithoutFunction].
   Token skipTypeWithoutFunction(Token startToken) {
     if (startToken.keyword == Keyword.VOID) {
       return startToken.next;
@@ -5808,20 +5469,16 @@
     }
   }
 
-  /**
-   * Advance to the next token in the token stream.
-   */
+  /// Advance to the next token in the token stream.
   void _advance() {
     _currentToken = _currentToken.next;
   }
 
-  /**
-   * Append the character equivalent of the given [codePoint] to the given
-   * [builder]. Use the [startIndex] and [endIndex] to report an error, and
-   * don't append anything to the builder, if the code point is invalid. The
-   * [escapeSequence] is the escape sequence that was parsed to produce the
-   * code point (used for error reporting).
-   */
+  /// Append the character equivalent of the given [codePoint] to the given
+  /// [builder]. Use the [startIndex] and [endIndex] to report an error, and
+  /// don't append anything to the builder, if the code point is invalid. The
+  /// [escapeSequence] is the escape sequence that was parsed to produce the
+  /// code point (used for error reporting).
   void _appendCodePoint(StringBuffer buffer, String source, int codePoint,
       int startIndex, int endIndex) {
     if (codePoint < 0 || codePoint > Character.MAX_CODE_POINT) {
@@ -5837,10 +5494,8 @@
     }
   }
 
-  /**
-   * Return `true` if we are positioned at the keyword 'Function' in a generic
-   * function type alias.
-   */
+  /// Return `true` if we are positioned at the keyword 'Function' in a generic
+  /// function type alias.
   bool _atGenericFunctionTypeAfterReturnType(Token startToken) {
     if (_tokenMatchesKeyword(startToken, Keyword.FUNCTION)) {
       Token next = startToken.next;
@@ -5853,11 +5508,9 @@
     return false;
   }
 
-  /**
-   * Convert the given [method] declaration into the nearest valid top-level
-   * function declaration (that is, the function declaration that most closely
-   * captures the components of the given method declaration).
-   */
+  /// Convert the given [method] declaration into the nearest valid top-level
+  /// function declaration (that is, the function declaration that most closely
+  /// captures the components of the given method declaration).
   FunctionDeclaration _convertToFunctionDeclaration(MethodDeclaration method) =>
       astFactory.functionDeclaration(
           method.documentationComment,
@@ -5869,12 +5522,10 @@
           astFactory.functionExpression(
               method.typeParameters, method.parameters, method.body));
 
-  /**
-   * Return `true` if the current token could be the start of a compilation unit
-   * member. This method is used for recovery purposes to decide when to stop
-   * skipping tokens after finding an error while parsing a compilation unit
-   * member.
-   */
+  /// Return `true` if the current token could be the start of a compilation
+  /// unit member. This method is used for recovery purposes to decide when to
+  /// stop skipping tokens after finding an error while parsing a compilation
+  /// unit member.
   bool _couldBeStartOfCompilationUnitMember() {
     Keyword keyword = _currentToken.keyword;
     Token next = _currentToken.next;
@@ -5921,23 +5572,17 @@
     return false;
   }
 
-  /**
-   * Return a synthetic token representing the given [keyword].
-   */
+  /// Return a synthetic token representing the given [keyword].
   Token _createSyntheticKeyword(Keyword keyword) =>
       _injectToken(new SyntheticKeywordToken(keyword, _currentToken.offset));
 
-  /**
-   * Return a synthetic token with the given [type].
-   */
+  /// Return a synthetic token with the given [type].
   Token _createSyntheticToken(TokenType type) =>
       _injectToken(new StringToken(type, "", _currentToken.offset));
 
-  /**
-   * Create and return a new token with the given [type]. The token will replace
-   * the first portion of the given [token], so it will have the same offset and
-   * will have any comments that might have preceeded the token.
-   */
+  /// Create and return a new token with the given [type]. The token will
+  /// replace the first portion of the given [token], so it will have the same
+  /// offset and will have any comments that might have preceeded the token.
   Token _createToken(Token token, TokenType type, {bool isBegin: false}) {
     CommentToken comments = token.precedingComments;
     if (comments == null) {
@@ -5951,23 +5596,21 @@
     return new Token(type, token.offset, comments);
   }
 
-  /**
-   * Check that the given [expression] is assignable and report an error if it
-   * isn't.
-   *
-   *     assignableExpression ::=
-   *         primary (arguments* assignableSelector)+
-   *       | 'super' unconditionalAssignableSelector
-   *       | identifier
-   *
-   *     unconditionalAssignableSelector ::=
-   *         '[' expression ']'
-   *       | '.' identifier
-   *
-   *     assignableSelector ::=
-   *         unconditionalAssignableSelector
-   *       | '?.' identifier
-   */
+  /// Check that the given [expression] is assignable and report an error if it
+  /// isn't.
+  ///
+  ///     assignableExpression ::=
+  ///         primary (arguments* assignableSelector)+
+  ///       | 'super' unconditionalAssignableSelector
+  ///       | identifier
+  ///
+  ///     unconditionalAssignableSelector ::=
+  ///         '[' expression ']'
+  ///       | '.' identifier
+  ///
+  ///     assignableSelector ::=
+  ///         unconditionalAssignableSelector
+  ///       | '?.' identifier
   void _ensureAssignable(Expression expression) {
     if (expression != null && !expression.isAssignable) {
       _reportErrorForCurrentToken(
@@ -5975,16 +5618,14 @@
     }
   }
 
-  /**
-   * If the current token has the expected type, return it after advancing to
-   * the next token. Otherwise report an error and return the current token
-   * without advancing.
-   *
-   * Note that the method [_expectGt] should be used if the argument to this
-   * method would be [TokenType.GT].
-   *
-   * The [type] is the type of token that is expected.
-   */
+  /// If the current token has the expected type, return it after advancing to
+  /// the next token. Otherwise report an error and return the current token
+  /// without advancing.
+  ///
+  /// Note that the method [_expectGt] should be used if the argument to this
+  /// method would be [TokenType.GT].
+  ///
+  /// The [type] is the type of token that is expected.
   Token _expect(TokenType type) {
     if (_matches(type)) {
       return getAndAdvance();
@@ -6006,10 +5647,9 @@
     return _createSyntheticToken(type);
   }
 
-  /**
-   * If the current token has the type [TokenType.GT], return it after advancing
-   * to the next token. Otherwise report an error and create a synthetic token.
-   */
+  /// If the current token has the type [TokenType.GT], return it after
+  /// advancing to the next token. Otherwise report an error and create a
+  /// synthetic token.
   Token _expectGt() {
     if (_matchesGt()) {
       return getAndAdvance();
@@ -6019,11 +5659,9 @@
     return _createSyntheticToken(TokenType.GT);
   }
 
-  /**
-   * If the current token is a keyword matching the given [keyword], return it
-   * after advancing to the next token. Otherwise report an error and return the
-   * current token without advancing.
-   */
+  /// If the current token is a keyword matching the given [keyword], return it
+  /// after advancing to the next token. Otherwise report an error and return
+  /// the current token without advancing.
   Token _expectKeyword(Keyword keyword) {
     if (_matchesKeyword(keyword)) {
       return getAndAdvance();
@@ -6035,11 +5673,9 @@
     return _currentToken;
   }
 
-  /**
-   * Search the given list of [ranges] for a range that contains the given
-   * [index]. Return the range that was found, or `null` if none of the ranges
-   * contain the index.
-   */
+  /// Search the given list of [ranges] for a range that contains the given
+  /// [index]. Return the range that was found, or `null` if none of the ranges
+  /// contain the index.
   List<int> _findRange(List<List<int>> ranges, int index) {
     int rangeCount = ranges.length;
     for (int i = 0; i < rangeCount; i++) {
@@ -6053,10 +5689,8 @@
     return null;
   }
 
-  /**
-   * Return a list of the ranges of characters in the given [comment] that
-   * should be treated as code blocks.
-   */
+  /// Return a list of the ranges of characters in the given [comment] that
+  /// should be treated as code blocks.
   List<List<int>> _getCodeBlockRanges(String comment) {
     List<List<int>> ranges = <List<int>>[];
     int length = comment.length;
@@ -6118,11 +5752,9 @@
     return ranges;
   }
 
-  /**
-   * Return the end token associated with the given [beginToken], or `null` if
-   * either the given token is not a begin token or it does not have an end
-   * token associated with it.
-   */
+  /// Return the end token associated with the given [beginToken], or `null` if
+  /// either the given token is not a begin token or it does not have an end
+  /// token associated with it.
   Token _getEndToken(Token beginToken) {
     if (beginToken is BeginToken) {
       return beginToken.endToken;
@@ -6130,10 +5762,8 @@
     return null;
   }
 
-  /**
-   * Inject the given [token] into the token stream immediately before the
-   * current token.
-   */
+  /// Inject the given [token] into the token stream immediately before the
+  /// current token.
   Token _injectToken(Token token) {
     Token previous = _currentToken.previous;
     token.setNext(_currentToken);
@@ -6141,9 +5771,7 @@
     return token;
   }
 
-  /**
-   * Return `true` if the given [character] is a valid hexadecimal digit.
-   */
+  /// Return `true` if the given [character] is a valid hexadecimal digit.
   bool _isHexDigit(int character) =>
       (0x30 <= character && character <= 0x39) ||
       (0x41 <= character && character <= 0x46) ||
@@ -6159,13 +5787,11 @@
     return token != null && _tokenMatches(token, TokenType.OPEN_PAREN);
   }
 
-  /**
-   * Return `true` if it looks like we have found the invocation of a named
-   * constructor following the name of the type:
-   * ```
-   * typeArguments? '.' identifier '('
-   * ```
-   */
+  /// Return `true` if it looks like we have found the invocation of a named
+  /// constructor following the name of the type:
+  /// ```
+  /// typeArguments? '.' identifier '('
+  /// ```
   bool _isLikelyNamedInstanceCreation() {
     Token token = skipTypeArgumentList(_currentToken);
     if (token != null && _tokenMatches(token, TokenType.PERIOD)) {
@@ -6177,17 +5803,16 @@
     return false;
   }
 
-  /**
-   * Given that we have just found bracketed text within the given [comment],
-   * look to see whether that text is (a) followed by a parenthesized link
-   * address, (b) followed by a colon, or (c) followed by optional whitespace
-   * and another square bracket. The [rightIndex] is the index of the right
-   * bracket. Return `true` if the bracketed text is followed by a link address.
-   *
-   * This method uses the syntax described by the
-   * <a href="http://daringfireball.net/projects/markdown/syntax">markdown</a>
-   * project.
-   */
+  /// Given that we have just found bracketed text within the given [comment],
+  /// look to see whether that text is (a) followed by a parenthesized link
+  /// address, (b) followed by a colon, or (c) followed by optional whitespace
+  /// and another square bracket. The [rightIndex] is the index of the right
+  /// bracket. Return `true` if the bracketed text is followed by a link
+  /// address.
+  ///
+  /// This method uses the syntax described by the
+  /// <a href="http://daringfireball.net/projects/markdown/syntax">markdown</a>
+  /// project.
   bool _isLinkText(String comment, int rightIndex) {
     int length = comment.length;
     int index = rightIndex + 1;
@@ -6208,10 +5833,8 @@
     return nextChar == 0x5B;
   }
 
-  /**
-   * Return `true` if the given [startToken] appears to be the beginning of an
-   * operator declaration.
-   */
+  /// Return `true` if the given [startToken] appears to be the beginning of an
+  /// operator declaration.
   bool _isOperator(Token startToken) {
     // Accept any operator here, even if it is not user definable.
     if (!startToken.isOperator) {
@@ -6235,10 +5858,8 @@
     return token != null && _tokenMatches(token, TokenType.OPEN_PAREN);
   }
 
-  /**
-   * Return `true` if the [startToken] appears to be the first token of a type
-   * name that is followed by a variable or field formal parameter.
-   */
+  /// Return `true` if the [startToken] appears to be the first token of a type
+  /// name that is followed by a variable or field formal parameter.
   bool _isTypedIdentifier(Token startToken) {
     Token token = skipTypeAnnotation(startToken);
     if (token == null) {
@@ -6258,10 +5879,8 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given [expression] is a primary expression that is
-   * allowed to be an assignable expression without any assignable selector.
-   */
+  /// Return `true` if the given [expression] is a primary expression that is
+  /// allowed to be an assignable expression without any assignable selector.
   bool _isValidAssignableExpression(Expression expression) {
     if (expression is SimpleIdentifier) {
       return true;
@@ -6273,28 +5892,22 @@
     return false;
   }
 
-  /**
-   * Increments the error reporting lock level. If level is more than `0`, then
-   * [reportError] wont report any error.
-   */
+  /// Increments the error reporting lock level. If level is more than `0`, then
+  /// [reportError] wont report any error.
   void _lockErrorListener() {
     _errorListenerLock++;
   }
 
-  /**
-   * Return `true` if the current token has the given [type]. Note that the
-   * method [_matchesGt] should be used if the argument to this method would be
-   * [TokenType.GT].
-   */
+  /// Return `true` if the current token has the given [type]. Note that the
+  /// method [_matchesGt] should be used if the argument to this method would be
+  /// [TokenType.GT].
   bool _matches(TokenType type) => _currentToken.type == type;
 
-  /**
-   * Return `true` if the current token has a type of [TokenType.GT]. Note that
-   * this method, unlike other variants, will modify the token stream if
-   * possible to match desired type. In particular, if the next token is either
-   * a '>>' or '>>>', the token stream will be re-written and `true` will be
-   * returned.
-   */
+  /// Return `true` if the current token has a type of [TokenType.GT]. Note that
+  /// this method, unlike other variants, will modify the token stream if
+  /// possible to match desired type. In particular, if the next token is either
+  /// a '>>' or '>>>', the token stream will be re-written and `true` will be
+  /// returned.
   bool _matchesGt() {
     TokenType currentType = _currentToken.type;
     if (currentType == TokenType.GT) {
@@ -6330,23 +5943,17 @@
     return false;
   }
 
-  /**
-   * Return `true` if the current token is a valid identifier. Valid identifiers
-   * include built-in identifiers (pseudo-keywords).
-   */
+  /// Return `true` if the current token is a valid identifier. Valid
+  /// identifiers include built-in identifiers (pseudo-keywords).
   bool _matchesIdentifier() => _tokenMatchesIdentifier(_currentToken);
 
-  /**
-   * Return `true` if the current token matches the given [keyword].
-   */
+  /// Return `true` if the current token matches the given [keyword].
   bool _matchesKeyword(Keyword keyword) =>
       _tokenMatchesKeyword(_currentToken, keyword);
 
-  /**
-   * If the current token has the given [type], then advance to the next token
-   * and return `true`. Otherwise, return `false` without advancing. This method
-   * should not be invoked with an argument value of [TokenType.GT].
-   */
+  /// If the current token has the given [type], then advance to the next token
+  /// and return `true`. Otherwise, return `false` without advancing. This
+  /// method should not be invoked with an argument value of [TokenType.GT].
   bool _optional(TokenType type) {
     if (_currentToken.type == type) {
       _advance();
@@ -6355,10 +5962,8 @@
     return false;
   }
 
-  /**
-   * Parse an argument list when we need to check for an open paren and recover
-   * when there isn't one. Return the argument list that was parsed.
-   */
+  /// Parse an argument list when we need to check for an open paren and recover
+  /// when there isn't one. Return the argument list that was parsed.
   ArgumentList _parseArgumentListChecked() {
     if (_matches(TokenType.OPEN_PAREN)) {
       return parseArgumentList();
@@ -6371,14 +5976,13 @@
         null, _createSyntheticToken(TokenType.CLOSE_PAREN));
   }
 
-  /**
-   * Parse an assert within a constructor's initializer list. Return the assert.
-   *
-   * This method assumes that the current token matches `Keyword.ASSERT`.
-   *
-   *     assertInitializer ::=
-   *         'assert' '(' expression [',' expression] ')'
-   */
+  /// Parse an assert within a constructor's initializer list. Return the
+  /// assert.
+  ///
+  /// This method assumes that the current token matches `Keyword.ASSERT`.
+  ///
+  ///     assertInitializer ::=
+  ///         'assert' '(' expression [',' expression] ')'
   AssertInitializer _parseAssertInitializer() {
     Token keyword = getAndAdvance();
     Token leftParen = _expect(TokenType.OPEN_PAREN);
@@ -6401,13 +6005,11 @@
         keyword, leftParen, expression, comma, message, rightParen);
   }
 
-  /**
-   * Parse a block when we need to check for an open curly brace and recover
-   * when there isn't one. Return the block that was parsed.
-   *
-   *     block ::=
-   *         '{' statements '}'
-   */
+  /// Parse a block when we need to check for an open curly brace and recover
+  /// when there isn't one. Return the block that was parsed.
+  ///
+  ///     block ::=
+  ///         '{' statements '}'
   Block _parseBlockChecked() {
     if (_matches(TokenType.OPEN_CURLY_BRACKET)) {
       return parseBlock();
@@ -6421,15 +6023,13 @@
         null, _createSyntheticToken(TokenType.CLOSE_CURLY_BRACKET));
   }
 
-  /**
-   * Parse a list of class members. The [className] is the name of the class
-   * whose members are being parsed. The [closingBracket] is the closing bracket
-   * for the class, or `null` if the closing bracket is missing. Return the list
-   * of class members that were parsed.
-   *
-   *     classMembers ::=
-   *         (metadata memberDefinition)*
-   */
+  /// Parse a list of class members. The [className] is the name of the class
+  /// whose members are being parsed. The [closingBracket] is the closing
+  /// bracket for the class, or `null` if the closing bracket is missing.
+  /// Return the list of class members that were parsed.
+  ///
+  ///     classMembers ::=
+  ///         (metadata memberDefinition)*
   List<ClassMember> _parseClassMembers(String className, Token closingBracket) {
     List<ClassMember> members = <ClassMember>[];
     Token memberStart = _currentToken;
@@ -6461,20 +6061,18 @@
     return members;
   }
 
-  /**
-   * Parse a class type alias. The [commentAndMetadata] is the metadata to be
-   * associated with the member. The [abstractKeyword] is the token representing
-   * the 'abstract' keyword. The [classKeyword] is the token representing the
-   * 'class' keyword. The [className] is the name of the alias, and the
-   * [typeParameters] are the type parameters following the name. Return the
-   * class type alias that was parsed.
-   *
-   *     classTypeAlias ::=
-   *         identifier typeParameters? '=' 'abstract'? mixinApplication
-   *
-   *     mixinApplication ::=
-   *         type withClause implementsClause? ';'
-   */
+  /// Parse a class type alias. The [commentAndMetadata] is the metadata to be
+  /// associated with the member. The [abstractKeyword] is the token
+  /// representing the 'abstract' keyword. The [classKeyword] is the token
+  /// representing the 'class' keyword. The [className] is the name of the
+  /// alias, and the [typeParameters] are the type parameters following the
+  /// name. Return the class type alias that was parsed.
+  ///
+  ///     classTypeAlias ::=
+  ///         identifier typeParameters? '=' 'abstract'? mixinApplication
+  ///
+  ///     mixinApplication ::=
+  ///         type withClause implementsClause? ';'
   ClassTypeAlias _parseClassTypeAliasAfterName(
       CommentAndMetadata commentAndMetadata,
       Token abstractKeyword,
@@ -6524,10 +6122,8 @@
         semicolon);
   }
 
-  /**
-   * Parse a list of configurations. Return the configurations that were parsed,
-   * or `null` if there are no configurations.
-   */
+  /// Parse a list of configurations. Return the configurations that were
+  /// parsed, or `null` if there are no configurations.
   List<Configuration> _parseConfigurations() {
     List<Configuration> configurations = null;
     while (_matchesKeyword(Keyword.IF)) {
@@ -6637,20 +6233,18 @@
         body);
   }
 
-  /**
-   * Parse an enum constant declaration. Return the enum constant declaration
-   * that was parsed.
-   *
-   * Specified:
-   *
-   *     enumConstant ::=
-   *         id
-   *
-   * Actual:
-   *
-   *     enumConstant ::=
-   *         metadata id
-   */
+  /// Parse an enum constant declaration. Return the enum constant declaration
+  /// that was parsed.
+  ///
+  /// Specified:
+  ///
+  ///     enumConstant ::=
+  ///         id
+  ///
+  /// Actual:
+  ///
+  ///     enumConstant ::=
+  ///         metadata id
   EnumConstantDeclaration _parseEnumConstantDeclaration() {
     CommentAndMetadata commentAndMetadata = parseCommentAndMetadata();
     SimpleIdentifier name;
@@ -6663,10 +6257,8 @@
         commentAndMetadata.comment, commentAndMetadata.metadata, name);
   }
 
-  /**
-   * Parse a list of formal parameters given that the list starts with the given
-   * [leftParenthesis]. Return the formal parameters that were parsed.
-   */
+  /// Parse a list of formal parameters given that the list starts with the
+  /// given [leftParenthesis]. Return the formal parameters that were parsed.
   FormalParameterList _parseFormalParameterListAfterParen(Token leftParenthesis,
       {bool inFunctionType: false}) {
     if (_matches(TokenType.CLOSE_PAREN)) {
@@ -6837,27 +6429,23 @@
         leftSquareBracket, rightSquareBracket, rightParenthesis);
   }
 
-  /**
-   * Parse a list of formal parameters. Return the formal parameters that were
-   * parsed.
-   *
-   * This method assumes that the current token matches `TokenType.OPEN_PAREN`.
-   */
+  /// Parse a list of formal parameters. Return the formal parameters that were
+  /// parsed.
+  ///
+  /// This method assumes that the current token matches `TokenType.OPEN_PAREN`.
   FormalParameterList _parseFormalParameterListUnchecked(
       {bool inFunctionType: false}) {
     return _parseFormalParameterListAfterParen(getAndAdvance(),
         inFunctionType: inFunctionType);
   }
 
-  /**
-   * Parse a function declaration statement. The [commentAndMetadata] is the
-   * documentation comment and metadata to be associated with the declaration.
-   * The [returnType] is the return type, or `null` if there is no return type.
-   * Return the function declaration statement that was parsed.
-   *
-   *     functionDeclarationStatement ::=
-   *         functionSignature functionBody
-   */
+  /// Parse a function declaration statement. The [commentAndMetadata] is the
+  /// documentation comment and metadata to be associated with the declaration.
+  /// The [returnType] is the return type, or `null` if there is no return type.
+  /// Return the function declaration statement that was parsed.
+  ///
+  ///     functionDeclarationStatement ::=
+  ///         functionSignature functionBody
   Statement _parseFunctionDeclarationStatementAfterReturnType(
       CommentAndMetadata commentAndMetadata, TypeAnnotation returnType) {
     FunctionDeclaration declaration =
@@ -6875,17 +6463,15 @@
     return astFactory.functionDeclarationStatement(declaration);
   }
 
-  /**
-   * Parse a function type alias. The [commentAndMetadata] is the metadata to be
-   * associated with the member. The [keyword] is the token representing the
-   * 'typedef' keyword. Return the function type alias that was parsed.
-   *
-   *     functionTypeAlias ::=
-   *         functionPrefix typeParameterList? formalParameterList ';'
-   *
-   *     functionPrefix ::=
-   *         returnType? name
-   */
+  /// Parse a function type alias. The [commentAndMetadata] is the metadata to
+  /// be associated with the member. The [keyword] is the token representing the
+  /// 'typedef' keyword. Return the function type alias that was parsed.
+  ///
+  ///     functionTypeAlias ::=
+  ///         functionPrefix typeParameterList? formalParameterList ';'
+  ///
+  ///     functionPrefix ::=
+  ///         returnType? name
   FunctionTypeAlias _parseFunctionTypeAlias(
       CommentAndMetadata commentAndMetadata, Token keyword) {
     TypeAnnotation returnType = null;
@@ -6951,12 +6537,10 @@
     }
   }
 
-  /**
-   * Parse the generic method or function's type parameters.
-   *
-   * For backwards compatibility this can optionally use comments.
-   * See [parseGenericMethodComments].
-   */
+  /// Parse the generic method or function's type parameters.
+  ///
+  /// For backwards compatibility this can optionally use comments.
+  /// See [parseGenericMethodComments].
   TypeParameterList _parseGenericMethodTypeParameters() {
     if (_matches(TokenType.LT)) {
       return parseTypeParameterList();
@@ -6964,15 +6548,13 @@
     return null;
   }
 
-  /**
-   * Parse a library name. The [missingNameError] is the error code to be used
-   * if the library name is missing. The [missingNameToken] is the token
-   * associated with the error produced if the library name is missing. Return
-   * the library name that was parsed.
-   *
-   *     libraryName ::=
-   *         libraryIdentifier
-   */
+  /// Parse a library name. The [missingNameError] is the error code to be used
+  /// if the library name is missing. The [missingNameToken] is the token
+  /// associated with the error produced if the library name is missing. Return
+  /// the library name that was parsed.
+  ///
+  ///     libraryName ::=
+  ///         libraryIdentifier
   LibraryIdentifier _parseLibraryName(
       ParserErrorCode missingNameError, Token missingNameToken) {
     if (_matchesIdentifier()) {
@@ -6989,19 +6571,17 @@
         .libraryIdentifier(<SimpleIdentifier>[createSyntheticIdentifier()]);
   }
 
-  /**
-   * Parse a method declaration. The [commentAndMetadata] is the documentation
-   * comment and metadata to be associated with the declaration. The
-   * [externalKeyword] is the 'external' token. The [staticKeyword] is the
-   * static keyword, or `null` if the getter is not static. The [returnType] is
-   * the return type of the method. The [name] is the name of the method. The
-   * [parameters] is the parameters to the method. Return the method declaration
-   * that was parsed.
-   *
-   *     functionDeclaration ::=
-   *         ('external' 'static'?)? functionSignature functionBody
-   *       | 'external'? functionSignature ';'
-   */
+  /// Parse a method declaration. The [commentAndMetadata] is the documentation
+  /// comment and metadata to be associated with the declaration. The
+  /// [externalKeyword] is the 'external' token. The [staticKeyword] is the
+  /// static keyword, or `null` if the getter is not static. The [returnType] is
+  /// the return type of the method. The [name] is the name of the method. The
+  /// [parameters] is the parameters to the method. Return the method
+  /// declaration that was parsed.
+  ///
+  ///     functionDeclaration ::=
+  ///         ('external' 'static'?)? functionSignature functionBody
+  ///       | 'external'? functionSignature ';'
   MethodDeclaration _parseMethodDeclarationAfterParameters(
       CommentAndMetadata commentAndMetadata,
       Token externalKeyword,
@@ -7037,18 +6617,16 @@
         body);
   }
 
-  /**
-   * Parse a method declaration. The [commentAndMetadata] is the documentation
-   * comment and metadata to be associated with the declaration. The
-   * [externalKeyword] is the 'external' token. The [staticKeyword] is the
-   * static keyword, or `null` if the getter is not static. The [returnType] is
-   * the return type of the method. Return the method declaration that was
-   * parsed.
-   *
-   *     functionDeclaration ::=
-   *         'external'? 'static'? functionSignature functionBody
-   *       | 'external'? functionSignature ';'
-   */
+  /// Parse a method declaration. The [commentAndMetadata] is the documentation
+  /// comment and metadata to be associated with the declaration. The
+  /// [externalKeyword] is the 'external' token. The [staticKeyword] is the
+  /// static keyword, or `null` if the getter is not static. The [returnType] is
+  /// the return type of the method. Return the method declaration that was
+  /// parsed.
+  ///
+  ///     functionDeclaration ::=
+  ///         'external'? 'static'? functionSignature functionBody
+  ///       | 'external'? functionSignature ';'
   MethodDeclaration _parseMethodDeclarationAfterReturnType(
       CommentAndMetadata commentAndMetadata,
       Token externalKeyword,
@@ -7084,34 +6662,30 @@
         parameters);
   }
 
-  /**
-   * Parse a class native clause. Return the native clause that was parsed.
-   *
-   * This method assumes that the current token matches `_NATIVE`.
-   *
-   *     classNativeClause ::=
-   *         'native' name
-   */
+  /// Parse a class native clause. Return the native clause that was parsed.
+  ///
+  /// This method assumes that the current token matches `_NATIVE`.
+  ///
+  ///     classNativeClause ::=
+  ///         'native' name
   NativeClause _parseNativeClause() {
     Token keyword = getAndAdvance();
     StringLiteral name = parseStringLiteral();
     return astFactory.nativeClause(keyword, name);
   }
 
-  /**
-   * Parse an operator declaration starting after the 'operator' keyword. The
-   * [commentAndMetadata] is the documentation comment and metadata to be
-   * associated with the declaration. The [externalKeyword] is the 'external'
-   * token. The [returnType] is the return type that has already been parsed, or
-   * `null` if there was no return type. The [operatorKeyword] is the 'operator'
-   * keyword. Return the operator declaration that was parsed.
-   *
-   *     operatorDeclaration ::=
-   *         operatorSignature (';' | functionBody)
-   *
-   *     operatorSignature ::=
-   *         'external'? returnType? 'operator' operator formalParameterList
-   */
+  /// Parse an operator declaration starting after the 'operator' keyword. The
+  /// [commentAndMetadata] is the documentation comment and metadata to be
+  /// associated with the declaration. The [externalKeyword] is the 'external'
+  /// token. The [returnType] is the return type that has already been parsed,
+  /// or `null` if there was no return type. The [operatorKeyword] is the
+  /// 'operator' keyword. Return the operator declaration that was parsed.
+  ///
+  ///     operatorDeclaration ::=
+  ///         operatorSignature (';' | functionBody)
+  ///
+  ///     operatorSignature ::=
+  ///         'external'? returnType? 'operator' operator formalParameterList
   MethodDeclaration _parseOperatorAfterKeyword(
       CommentAndMetadata commentAndMetadata,
       Token externalKeyword,
@@ -7157,10 +6731,8 @@
         body);
   }
 
-  /**
-   * Parse a return type if one is given, otherwise return `null` without
-   * advancing. Return the return type that was parsed.
-   */
+  /// Parse a return type if one is given, otherwise return `null` without
+  /// advancing. Return the return type that was parsed.
   TypeAnnotation _parseOptionalReturnType() {
     Keyword keyword = _currentToken.keyword;
     if (keyword == Keyword.VOID) {
@@ -7198,10 +6770,8 @@
     return null;
   }
 
-  /**
-   * Parse a [TypeArgumentList] if present, otherwise return null.
-   * This also supports the comment form, if enabled: `/*<T>*/`
-   */
+  /// Parse a [TypeArgumentList] if present, otherwise return null.
+  /// This also supports the comment form, if enabled: `/*<T>*/`
   TypeArgumentList _parseOptionalTypeArguments() {
     if (_matches(TokenType.LT)) {
       return parseTypeArgumentList();
@@ -7209,16 +6779,14 @@
     return null;
   }
 
-  /**
-   * Parse a part directive. The [commentAndMetadata] is the metadata to be
-   * associated with the directive. Return the part or part-of directive that
-   * was parsed.
-   *
-   * This method assumes that the current token matches `Keyword.PART`.
-   *
-   *     partDirective ::=
-   *         metadata 'part' stringLiteral ';'
-   */
+  /// Parse a part directive. The [commentAndMetadata] is the metadata to be
+  /// associated with the directive. Return the part or part-of directive that
+  /// was parsed.
+  ///
+  /// This method assumes that the current token matches `Keyword.PART`.
+  ///
+  ///     partDirective ::=
+  ///         metadata 'part' stringLiteral ';'
   Directive _parsePartDirective(CommentAndMetadata commentAndMetadata) {
     Token partKeyword = getAndAdvance();
     StringLiteral partUri = _parseUri();
@@ -7227,17 +6795,15 @@
         commentAndMetadata.metadata, partKeyword, partUri, semicolon);
   }
 
-  /**
-   * Parse a part-of directive. The [commentAndMetadata] is the metadata to be
-   * associated with the directive. Return the part or part-of directive that
-   * was parsed.
-   *
-   * This method assumes that the current token matches [Keyword.PART] and that
-   * the following token matches the identifier 'of'.
-   *
-   *     partOfDirective ::=
-   *         metadata 'part' 'of' identifier ';'
-   */
+  /// Parse a part-of directive. The [commentAndMetadata] is the metadata to be
+  /// associated with the directive. Return the part or part-of directive that
+  /// was parsed.
+  ///
+  /// This method assumes that the current token matches [Keyword.PART] and that
+  /// the following token matches the identifier 'of'.
+  ///
+  ///     partOfDirective ::=
+  ///         metadata 'part' 'of' identifier ';'
   Directive _parsePartOfDirective(CommentAndMetadata commentAndMetadata) {
     Token partKeyword = getAndAdvance();
     Token ofKeyword = getAndAdvance();
@@ -7266,13 +6832,11 @@
         semicolon);
   }
 
-  /**
-   * Parse a prefixed identifier given that the given [qualifier] was already
-   * parsed. Return the prefixed identifier that was parsed.
-   *
-   *     prefixedIdentifier ::=
-   *         identifier ('.' identifier)?
-   */
+  /// Parse a prefixed identifier given that the given [qualifier] was already
+  /// parsed. Return the prefixed identifier that was parsed.
+  ///
+  ///     prefixedIdentifier ::=
+  ///         identifier ('.' identifier)?
   Identifier _parsePrefixedIdentifierAfterIdentifier(
       SimpleIdentifier qualifier) {
     if (!_matches(TokenType.PERIOD)) {
@@ -7283,28 +6847,24 @@
     return astFactory.prefixedIdentifier(qualifier, period, qualified);
   }
 
-  /**
-   * Parse a prefixed identifier. Return the prefixed identifier that was
-   * parsed.
-   *
-   * This method assumes that the current token matches an identifier.
-   *
-   *     prefixedIdentifier ::=
-   *         identifier ('.' identifier)?
-   */
+  /// Parse a prefixed identifier. Return the prefixed identifier that was
+  /// parsed.
+  ///
+  /// This method assumes that the current token matches an identifier.
+  ///
+  ///     prefixedIdentifier ::=
+  ///         identifier ('.' identifier)?
   Identifier _parsePrefixedIdentifierUnchecked() {
     return _parsePrefixedIdentifierAfterIdentifier(
         _parseSimpleIdentifierUnchecked());
   }
 
-  /**
-   * Parse a simple identifier. Return the simple identifier that was parsed.
-   *
-   * This method assumes that the current token matches an identifier.
-   *
-   *     identifier ::=
-   *         IDENTIFIER
-   */
+  /// Parse a simple identifier. Return the simple identifier that was parsed.
+  ///
+  /// This method assumes that the current token matches an identifier.
+  ///
+  ///     identifier ::=
+  ///         IDENTIFIER
   SimpleIdentifier _parseSimpleIdentifierUnchecked(
       {bool isDeclaration: false}) {
     String lexeme = _currentToken.lexeme;
@@ -7317,13 +6877,11 @@
         isDeclaration: isDeclaration);
   }
 
-  /**
-   * Parse a list of statements within a switch statement. Return the statements
-   * that were parsed.
-   *
-   *     statements ::=
-   *         statement*
-   */
+  /// Parse a list of statements within a switch statement. Return the
+  /// statements that were parsed.
+  ///
+  ///     statements ::=
+  ///         statement*
   List<Statement> _parseStatementList() {
     List<Statement> statements = <Statement>[];
     Token statementStart = _currentToken;
@@ -7343,14 +6901,12 @@
     return statements;
   }
 
-  /**
-   * Parse a string literal that contains interpolations. Return the string
-   * literal that was parsed.
-   *
-   * This method assumes that the current token matches either
-   * [TokenType.STRING_INTERPOLATION_EXPRESSION] or
-   * [TokenType.STRING_INTERPOLATION_IDENTIFIER].
-   */
+  /// Parse a string literal that contains interpolations. Return the string
+  /// literal that was parsed.
+  ///
+  /// This method assumes that the current token matches either
+  /// [TokenType.STRING_INTERPOLATION_EXPRESSION] or
+  /// [TokenType.STRING_INTERPOLATION_IDENTIFIER].
   StringInterpolation _parseStringInterpolation(Token string) {
     List<InterpolationElement> elements = <InterpolationElement>[
       astFactory.interpolationString(
@@ -7396,15 +6952,13 @@
     return astFactory.stringInterpolation(elements);
   }
 
-  /**
-   * Parse a string literal. Return the string literal that was parsed.
-   *
-   * This method assumes that the current token matches `TokenType.STRING`.
-   *
-   *     stringLiteral ::=
-   *         MULTI_LINE_STRING+
-   *       | SINGLE_LINE_STRING+
-   */
+  /// Parse a string literal. Return the string literal that was parsed.
+  ///
+  /// This method assumes that the current token matches `TokenType.STRING`.
+  ///
+  ///     stringLiteral ::=
+  ///         MULTI_LINE_STRING+
+  ///       | SINGLE_LINE_STRING+
   StringLiteral _parseStringLiteralUnchecked() {
     List<StringLiteral> strings = <StringLiteral>[];
     do {
@@ -7422,15 +6976,13 @@
         : astFactory.adjacentStrings(strings);
   }
 
-  /**
-   * Parse a type annotation, possibly superseded by a type name in a comment.
-   * Return the type name that was parsed.
-   *
-   * This method assumes that the current token is an identifier.
-   *
-   *     type ::=
-   *         qualified typeArguments?
-   */
+  /// Parse a type annotation, possibly superseded by a type name in a comment.
+  /// Return the type name that was parsed.
+  ///
+  /// This method assumes that the current token is an identifier.
+  ///
+  ///     type ::=
+  ///         qualified typeArguments?
   TypeAnnotation _parseTypeAnnotationAfterIdentifier() {
     return parseTypeAnnotation(false);
   }
@@ -7450,10 +7002,8 @@
     return astFactory.typeName(typeName, typeArguments);
   }
 
-  /**
-   * Parse a string literal representing a URI. Return the string literal that
-   * was parsed.
-   */
+  /// Parse a string literal representing a URI. Return the string literal that
+  /// was parsed.
   StringLiteral _parseUri() {
     // TODO(brianwilkerson) Should this function also return true for valid
     // top-level keywords?
@@ -7510,17 +7060,15 @@
     return parseStringLiteral();
   }
 
-  /**
-   * Parse a variable declaration statement. The [commentAndMetadata] is the
-   * metadata to be associated with the variable declaration statement, or
-   * `null` if there is no attempt at parsing the comment and metadata. The
-   * [keyword] is the token representing the 'final', 'const' or 'var' keyword,
-   * or `null` if there is no keyword. The [type] is the type of the variables
-   * in the list. Return the variable declaration statement that was parsed.
-   *
-   *     variableDeclarationStatement ::=
-   *         variableDeclarationList ';'
-   */
+  /// Parse a variable declaration statement. The [commentAndMetadata] is the
+  /// metadata to be associated with the variable declaration statement, or
+  /// `null` if there is no attempt at parsing the comment and metadata. The
+  /// [keyword] is the token representing the 'final', 'const' or 'var' keyword,
+  /// or `null` if there is no keyword. The [type] is the type of the variables
+  /// in the list. Return the variable declaration statement that was parsed.
+  ///
+  ///     variableDeclarationStatement ::=
+  ///         variableDeclarationList ';'
   VariableDeclarationStatement _parseVariableDeclarationStatementAfterType(
       CommentAndMetadata commentAndMetadata,
       Token keyword,
@@ -7532,17 +7080,13 @@
     return astFactory.variableDeclarationStatement(variableList, semicolon);
   }
 
-  /**
-   * Return the token that is immediately after the current token. This is
-   * equivalent to [_peekAt](1).
-   */
+  /// Return the token that is immediately after the current token. This is
+  /// equivalent to [_peekAt](1).
   Token _peek() => _currentToken.next;
 
-  /**
-   * Return the token that is the given [distance] after the current token,
-   * where the distance is the number of tokens to look ahead. A distance of `0`
-   * is the current token, `1` is the next token, etc.
-   */
+  /// Return the token that is the given [distance] after the current token,
+  /// where the distance is the number of tokens to look ahead. A distance of
+  /// `0` is the current token, `1` is the next token, etc.
   Token _peekAt(int distance) {
     Token token = _currentToken;
     for (int i = 0; i < distance; i++) {
@@ -7570,9 +7114,7 @@
     return comment;
   }
 
-  /**
-   * Report the given [error].
-   */
+  /// Report the given [error].
   void _reportError(AnalysisError error) {
     if (_errorListenerLock != 0) {
       return;
@@ -7580,29 +7122,23 @@
     _errorListener.onError(error);
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments] associated with
-   * the current token.
-   */
+  /// Report an error with the given [errorCode] and [arguments] associated with
+  /// the current token.
   void _reportErrorForCurrentToken(ParserErrorCode errorCode,
       [List<Object> arguments]) {
     _reportErrorForToken(errorCode, _currentToken, arguments);
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments] associated with
-   * the given [node].
-   */
+  /// Report an error with the given [errorCode] and [arguments] associated with
+  /// the given [node].
   void _reportErrorForNode(ParserErrorCode errorCode, AstNode node,
       [List<Object> arguments]) {
     _reportError(new AnalysisError(
         _source, node.offset, node.length, errorCode, arguments));
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments] associated with
-   * the given [token].
-   */
+  /// Report an error with the given [errorCode] and [arguments] associated with
+  /// the given [token].
   void _reportErrorForToken(ErrorCode errorCode, Token token,
       [List<Object> arguments]) {
     if (token.type == TokenType.EOF) {
@@ -7612,9 +7148,7 @@
         math.max(token.length, 1), errorCode, arguments));
   }
 
-  /**
-   * Skips a block with all containing blocks.
-   */
+  /// Skips a block with all containing blocks.
   void _skipBlock() {
     Token endToken = (_currentToken as BeginToken).endToken;
     if (endToken == null) {
@@ -7630,20 +7164,18 @@
     }
   }
 
-  /**
-   * Parse the 'final', 'const', 'var' or type preceding a variable declaration,
-   * starting at the given token, without actually creating a type or changing
-   * the current token. Return the token following the type that was parsed, or
-   * `null` if the given token is not the first token in a valid type. The
-   * [startToken] is the token at which parsing is to begin. Return the token
-   * following the type that was parsed.
-   *
-   * finalConstVarOrType ::=
-   *   | 'final' type?
-   *   | 'const' type?
-   *   | 'var'
-   *   | type
-   */
+  /// Parse the 'final', 'const', 'var' or type preceding a variable
+  /// declaration, starting at the given token, without actually creating a
+  /// type or changing the current token. Return the token following the type
+  /// that was parsed, or `null` if the given token is not the first token in a
+  /// valid type. The [startToken] is the token at which parsing is to begin.
+  /// Return the token following the type that was parsed.
+  ///
+  /// finalConstVarOrType ::=
+  ///   | 'final' type?
+  ///   | 'const' type?
+  ///   | 'var'
+  ///   | type
   Token _skipFinalConstVarOrType(Token startToken) {
     Keyword keyword = startToken.keyword;
     if (keyword == Keyword.FINAL || keyword == Keyword.CONST) {
@@ -7677,40 +7209,38 @@
     return null;
   }
 
-  /**
-   * Parse a list of formal parameters, starting at the [startToken], without
-   * actually creating a formal parameter list or changing the current token.
-   * Return the token following the formal parameter list that was parsed, or
-   * `null` if the given token is not the first token in a valid list of formal
-   * parameter.
-   *
-   * Note that unlike other skip methods, this method uses a heuristic. In the
-   * worst case, the parameters could be prefixed by metadata, which would
-   * require us to be able to skip arbitrary expressions. Rather than duplicate
-   * the logic of most of the parse methods we simply look for something that is
-   * likely to be a list of parameters and then skip to returning the token
-   * after the closing parenthesis.
-   *
-   * This method must be kept in sync with [parseFormalParameterList].
-   *
-   *     formalParameterList ::=
-   *         '(' ')'
-   *       | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
-   *       | '(' optionalFormalParameters ')'
-   *
-   *     normalFormalParameters ::=
-   *         normalFormalParameter (',' normalFormalParameter)*
-   *
-   *     optionalFormalParameters ::=
-   *         optionalPositionalFormalParameters
-   *       | namedFormalParameters
-   *
-   *     optionalPositionalFormalParameters ::=
-   *         '[' defaultFormalParameter (',' defaultFormalParameter)* ']'
-   *
-   *     namedFormalParameters ::=
-   *         '{' defaultNamedParameter (',' defaultNamedParameter)* '}'
-   */
+  /// Parse a list of formal parameters, starting at the [startToken], without
+  /// actually creating a formal parameter list or changing the current token.
+  /// Return the token following the formal parameter list that was parsed, or
+  /// `null` if the given token is not the first token in a valid list of formal
+  /// parameter.
+  ///
+  /// Note that unlike other skip methods, this method uses a heuristic. In the
+  /// worst case, the parameters could be prefixed by metadata, which would
+  /// require us to be able to skip arbitrary expressions. Rather than duplicate
+  /// the logic of most of the parse methods we simply look for something that
+  /// is likely to be a list of parameters and then skip to returning the token
+  /// after the closing parenthesis.
+  ///
+  /// This method must be kept in sync with [parseFormalParameterList].
+  ///
+  ///     formalParameterList ::=
+  ///         '(' ')'
+  ///       | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
+  ///       | '(' optionalFormalParameters ')'
+  ///
+  ///     normalFormalParameters ::=
+  ///         normalFormalParameter (',' normalFormalParameter)*
+  ///
+  ///     optionalFormalParameters ::=
+  ///         optionalPositionalFormalParameters
+  ///       | namedFormalParameters
+  ///
+  ///     optionalPositionalFormalParameters ::=
+  ///         '[' defaultFormalParameter (',' defaultFormalParameter)* ']'
+  ///
+  ///     namedFormalParameters ::=
+  ///         '{' defaultNamedParameter (',' defaultNamedParameter)* '}'
   Token _skipFormalParameterList(Token startToken) {
     if (!_tokenMatches(startToken, TokenType.OPEN_PAREN)) {
       return null;
@@ -7761,10 +7291,8 @@
     return _skipPastMatchingToken(startToken);
   }
 
-  /**
-   * If the [startToken] is a begin token with an associated end token, then
-   * return the token following the end token. Otherwise, return `null`.
-   */
+  /// If the [startToken] is a begin token with an associated end token, then
+  /// return the token following the end token. Otherwise, return `null`.
   Token _skipPastMatchingToken(Token startToken) {
     if (startToken is! BeginToken) {
       return null;
@@ -7776,15 +7304,13 @@
     return closeParen.next;
   }
 
-  /**
-   * Parse a string literal that contains interpolations, starting at the
-   * [startToken], without actually creating a string literal or changing the
-   * current token. Return the token following the string literal that was
-   * parsed, or `null` if the given token is not the first token in a valid
-   * string literal.
-   *
-   * This method must be kept in sync with [parseStringInterpolation].
-   */
+  /// Parse a string literal that contains interpolations, starting at the
+  /// [startToken], without actually creating a string literal or changing the
+  /// current token. Return the token following the string literal that was
+  /// parsed, or `null` if the given token is not the first token in a valid
+  /// string literal.
+  ///
+  /// This method must be kept in sync with [parseStringInterpolation].
   Token _skipStringInterpolation(Token startToken) {
     Token token = startToken;
     TokenType type = token.type;
@@ -7836,18 +7362,16 @@
     return token;
   }
 
-  /**
-   * Parse a list of type parameters, starting at the [startToken], without
-   * actually creating a type parameter list or changing the current token.
-   * Return the token following the type parameter list that was parsed, or
-   * `null` if the given token is not the first token in a valid type parameter
-   * list.
-   *
-   * This method must be kept in sync with [parseTypeParameterList].
-   *
-   *     typeParameterList ::=
-   *         '<' typeParameter (',' typeParameter)* '>'
-   */
+  /// Parse a list of type parameters, starting at the [startToken], without
+  /// actually creating a type parameter list or changing the current token.
+  /// Return the token following the type parameter list that was parsed, or
+  /// `null` if the given token is not the first token in a valid type parameter
+  /// list.
+  ///
+  /// This method must be kept in sync with [parseTypeParameterList].
+  ///
+  ///     typeParameterList ::=
+  ///         '<' typeParameter (',' typeParameter)* '>'
   Token _skipTypeParameterList(Token startToken) {
     if (!_tokenMatches(startToken, TokenType.LT)) {
       return null;
@@ -7889,10 +7413,8 @@
     return next;
   }
 
-  /**
-   * Assuming that the current token is an index token ('[]'), split it into two
-   * tokens ('[' and ']'), leaving the left bracket as the current token.
-   */
+  /// Assuming that the current token is an index token ('[]'), split it into
+  /// two tokens ('[' and ']'), leaving the left bracket as the current token.
   void _splitIndex() {
     // Split the token into two separate tokens.
     BeginToken leftBracket = _createToken(
@@ -7907,42 +7429,30 @@
     _currentToken = leftBracket;
   }
 
-  /**
-   * Return `true` if the given [token] has the given [type].
-   */
+  /// Return `true` if the given [token] has the given [type].
   bool _tokenMatches(Token token, TokenType type) => token.type == type;
 
-  /**
-   * Return `true` if the given [token] is a valid identifier. Valid identifiers
-   * include built-in identifiers (pseudo-keywords).
-   */
+  /// Return `true` if the given [token] is a valid identifier. Valid
+  /// identifiers include built-in identifiers (pseudo-keywords).
   bool _tokenMatchesIdentifier(Token token) =>
       _tokenMatches(token, TokenType.IDENTIFIER) ||
       _tokenMatchesPseudoKeyword(token);
 
-  /**
-   * Return `true` if the given [token] is either an identifier or a keyword.
-   */
+  /// Return `true` if the given [token] is either an identifier or a keyword.
   bool _tokenMatchesIdentifierOrKeyword(Token token) =>
       _tokenMatches(token, TokenType.IDENTIFIER) || token.type.isKeyword;
 
-  /**
-   * Return `true` if the given [token] matches the given [keyword].
-   */
+  /// Return `true` if the given [token] matches the given [keyword].
   bool _tokenMatchesKeyword(Token token, Keyword keyword) =>
       token.keyword == keyword;
 
-  /**
-   * Return `true` if the given [token] matches a pseudo keyword.
-   */
+  /// Return `true` if the given [token] matches a pseudo keyword.
   bool _tokenMatchesPseudoKeyword(Token token) =>
       token.keyword?.isBuiltInOrPseudo ?? false;
 
-  /**
-   * Translate the characters at the given [index] in the given [lexeme],
-   * appending the translated character to the given [buffer]. The index is
-   * assumed to be valid.
-   */
+  /// Translate the characters at the given [index] in the given [lexeme],
+  /// appending the translated character to the given [buffer]. The index is
+  /// assumed to be valid.
   int _translateCharacter(StringBuffer buffer, String lexeme, int index) {
     int currentChar = lexeme.codeUnitAt(index);
     if (currentChar != 0x5C) {
@@ -8081,10 +7591,8 @@
     return currentIndex + 1;
   }
 
-  /**
-   * Decrements the error reporting lock level. If level is more than `0`, then
-   * [reportError] wont report any error.
-   */
+  /// Decrements the error reporting lock level. If level is more than `0`, then
+  /// [reportError] wont report any error.
   void _unlockErrorListener() {
     if (_errorListenerLock == 0) {
       throw new StateError("Attempt to unlock not locked error listener.");
@@ -8092,10 +7600,8 @@
     _errorListenerLock--;
   }
 
-  /**
-   * Validate that the given [parameterList] does not contain any field
-   * initializers.
-   */
+  /// Validate that the given [parameterList] does not contain any field
+  /// initializers.
   void _validateFormalParameterList(FormalParameterList parameterList) {
     for (FormalParameter parameter in parameterList.parameters) {
       if (parameter is FieldFormalParameter) {
@@ -8106,10 +7612,8 @@
     }
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a class and
-   * return the 'abstract' keyword if there is one.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a class and
+  /// return the 'abstract' keyword if there is one.
   Token _validateModifiersForClass(Modifiers modifiers) {
     _validateModifiersForTopLevelDeclaration(modifiers);
     if (modifiers.constKeyword != null) {
@@ -8128,10 +7632,8 @@
     return modifiers.abstractKeyword;
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a constructor
-   * and return the 'const' keyword if there is one.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a
+  /// constructor and return the 'const' keyword if there is one.
   Token _validateModifiersForConstructor(Modifiers modifiers) {
     if (modifiers.abstractKeyword != null) {
       _reportErrorForToken(
@@ -8171,10 +7673,8 @@
     return constKeyword;
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for an enum and
-   * return the 'abstract' keyword if there is one.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for an enum and
+  /// return the 'abstract' keyword if there is one.
   void _validateModifiersForEnum(Modifiers modifiers) {
     _validateModifiersForTopLevelDeclaration(modifiers);
     if (modifiers.abstractKeyword != null) {
@@ -8196,10 +7696,8 @@
     }
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a field and
-   * return the 'final', 'const' or 'var' keyword if there is one.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a field and
+  /// return the 'final', 'const' or 'var' keyword if there is one.
   Token _validateModifiersForField(Modifiers modifiers) {
     if (modifiers.abstractKeyword != null) {
       _reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_CLASS_MEMBER);
@@ -8258,10 +7756,8 @@
     return Token.lexicallyFirst([constKeyword, finalKeyword, varKeyword]);
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a local
-   * function.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a local
+  /// function.
   void _validateModifiersForFunctionDeclarationStatement(Modifiers modifiers) {
     if (modifiers.abstractKeyword != null ||
         modifiers.constKeyword != null ||
@@ -8275,10 +7771,8 @@
     }
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a getter,
-   * setter, or method.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a getter,
+  /// setter, or method.
   void _validateModifiersForGetterOrSetterOrMethod(Modifiers modifiers) {
     if (modifiers.abstractKeyword != null) {
       _reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_CLASS_MEMBER);
@@ -8313,10 +7807,8 @@
     }
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a getter,
-   * setter, or method.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a getter,
+  /// setter, or method.
   void _validateModifiersForOperator(Modifiers modifiers) {
     if (modifiers.abstractKeyword != null) {
       _reportErrorForCurrentToken(ParserErrorCode.ABSTRACT_CLASS_MEMBER);
@@ -8343,10 +7835,8 @@
     }
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a top-level
-   * declaration.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a top-level
+  /// declaration.
   void _validateModifiersForTopLevelDeclaration(Modifiers modifiers) {
     if (modifiers.covariantKeyword != null) {
       _reportErrorForToken(ParserErrorCode.COVARIANT_TOP_LEVEL_DECLARATION,
@@ -8362,10 +7852,8 @@
     }
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a top-level
-   * function.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a top-level
+  /// function.
   void _validateModifiersForTopLevelFunction(Modifiers modifiers) {
     _validateModifiersForTopLevelDeclaration(modifiers);
     if (modifiers.abstractKeyword != null) {
@@ -8383,10 +7871,8 @@
     }
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a field and
-   * return the 'final', 'const' or 'var' keyword if there is one.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a field and
+  /// return the 'final', 'const' or 'var' keyword if there is one.
   Token _validateModifiersForTopLevelVariable(Modifiers modifiers) {
     _validateModifiersForTopLevelDeclaration(modifiers);
     if (modifiers.abstractKeyword != null) {
@@ -8414,10 +7900,8 @@
     return Token.lexicallyFirst([constKeyword, finalKeyword, varKeyword]);
   }
 
-  /**
-   * Validate that the given set of [modifiers] is appropriate for a class and
-   * return the 'abstract' keyword if there is one.
-   */
+  /// Validate that the given set of [modifiers] is appropriate for a class and
+  /// return the 'abstract' keyword if there is one.
   void _validateModifiersForTypedef(Modifiers modifiers) {
     _validateModifiersForTopLevelDeclaration(modifiers);
     if (modifiers.abstractKeyword != null) {
@@ -8442,9 +7926,7 @@
   }
 }
 
-/**
- * Instances of this class are thrown when the parser detects that AST has
- * too many nested expressions to be parsed safely and avoid possibility of
- * [StackOverflowError] in the parser or during later analysis.
- */
+/// Instances of this class are thrown when the parser detects that AST has
+/// too many nested expressions to be parsed safely and avoid possibility of
+/// [StackOverflowError] in the parser or during later analysis.
 class _TooDeepTreeError {}
diff --git a/pkg/analyzer/lib/src/generated/parser_fasta.dart b/pkg/analyzer/lib/src/generated/parser_fasta.dart
index 946f327..389c230 100644
--- a/pkg/analyzer/lib/src/generated/parser_fasta.dart
+++ b/pkg/analyzer/lib/src/generated/parser_fasta.dart
@@ -27,6 +27,7 @@
       {bool allowNativeClause: false})
       : fastaParser = new fasta.Parser(null),
         astBuilder = new AstBuilder(errorReporter, fileUri, true) {
+    fastaParser.enableSetLiterals = IsEnabledByDefault.set_literals;
     fastaParser.listener = astBuilder;
     astBuilder.parser = fastaParser;
     astBuilder.allowNativeClause = allowNativeClause;
@@ -37,6 +38,15 @@
     astBuilder.allowNativeClause = value;
   }
 
+  /// Enables or disables non-nullable by default.
+  void set enableNonNullable(bool value) {
+    if (IsExpired.non_nullable && value != IsEnabledByDefault.non_nullable) {
+      throw new StateError(
+          'non_nullable may only be set to ${IsEnabledByDefault.non_nullable}');
+    }
+    astBuilder.enableNonNullable = value;
+  }
+
   @override
   bool get enableOptionalNewAndConst => false;
 
@@ -44,6 +54,15 @@
   void set enableOptionalNewAndConst(bool enable) {}
 
   @override
+  void set enableSetLiterals(bool value) {
+    if (IsExpired.set_literals && value != IsEnabledByDefault.set_literals) {
+      throw new StateError(
+          'set_literals may only be set to ${IsEnabledByDefault.set_literals}');
+    }
+    fastaParser.enableSetLiterals = value;
+  }
+
+  @override
   void set parseFunctionBodies(bool parseFunctionBodies) {
     astBuilder.parseFunctionBodies = parseFunctionBodies;
   }
@@ -150,6 +169,8 @@
     currentToken = fastaParser.parseUnit(currentToken);
     CompilationUnitImpl compilationUnit = astBuilder.pop();
     compilationUnit.localDeclarations = astBuilder.localDeclarations;
+    compilationUnit.hasPragmaAnalyzerNonNullable =
+        astBuilder.hasPragmaAnalyzerNonNullable;
     return compilationUnit;
   }
 
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 7fd6ce9..3696609 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -14,6 +14,8 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/exception/exception.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/context/builder.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/ast_factory.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
@@ -32,6 +34,7 @@
 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/workspace/workspace.dart';
 import 'package:path/path.dart' as path;
 
 export 'package:analyzer/src/dart/constant/constant_verifier.dart';
@@ -58,14 +61,14 @@
             nameScope: nameScope);
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void 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;
+      return;
     }
 
     Expression target = node.target;
@@ -73,7 +76,7 @@
       // Possible cases: C() or C<>()
       if (node.realTarget != null) {
         // This isn't a constructor invocation because it's in a cascade.
-        return null;
+        return;
       }
       Element element = nameScope.lookup(methodName, definingLibrary);
       if (element is ClassElement) {
@@ -204,7 +207,6 @@
         }
       }
     }
-    return null;
   }
 
   /// Return the token that should be used in the [InstanceCreationExpression]
@@ -220,27 +222,35 @@
   static InterfaceType getType(TypeSystem typeSystem, 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
+    if (typeParameters.isEmpty) {
+      return type;
+    }
+
+    if (typeArguments == null) {
+      return typeSystem.instantiateToBounds(type);
+    }
+
+    List<DartType> argumentTypes;
+    if (typeArguments.arguments.length == typeParameters.length) {
+      argumentTypes = typeArguments.arguments
           .map((TypeAnnotation argument) => argument.type)
           .toList();
-      List<DartType> parameterTypes = typeParameters
-          .map((TypeParameterElement parameter) => parameter.type)
-          .toList();
-      type = type.substitute2(argumentTypes, parameterTypes);
-    } else if (typeArguments == null && typeParameters != null) {
-      type = typeSystem.instantiateToBounds(type);
+    } else {
+      argumentTypes = List<DartType>.filled(
+          typeParameters.length, DynamicTypeImpl.instance);
     }
-    return type;
+    List<DartType> parameterTypes = typeParameters
+        .map((TypeParameterElement parameter) => parameter.type)
+        .toList();
+    return type.substitute2(argumentTypes, parameterTypes);
   }
 }
 
 /// Instances of the class `BestPracticesVerifier` traverse an AST structure
 /// looking for violations of Dart best practices.
-class BestPracticesVerifier extends RecursiveAstVisitor<Object> {
+class BestPracticesVerifier extends RecursiveAstVisitor<void> {
 //  static String _HASHCODE_GETTER_NAME = "hashCode";
 
   static String _NULL_TYPE_NAME = "Null";
@@ -273,26 +283,36 @@
 
   final _InvalidAccessVerifier _invalidAccessVerifier;
 
+  /// The [WorkspacePackage] in which [_currentLibrary] is declared.
+  WorkspacePackage _workspacePackage;
+
   /// Create a new instance of the [BestPracticesVerifier].
   ///
   /// @param errorReporter the error reporter
   BestPracticesVerifier(
-      this._errorReporter, TypeProvider typeProvider, this._currentLibrary,
-      {TypeSystem typeSystem})
-      : _nullType = typeProvider.nullType,
+    this._errorReporter,
+    TypeProvider typeProvider,
+    this._currentLibrary, {
+    TypeSystem typeSystem,
+    ResourceProvider resourceProvider,
+  })  : _nullType = typeProvider.nullType,
         _futureNullType = typeProvider.futureNullType,
-        _typeSystem = typeSystem ?? new StrongTypeSystemImpl(typeProvider),
+        _typeSystem = typeSystem ?? new Dart2TypeSystem(typeProvider),
         _invalidAccessVerifier =
             new _InvalidAccessVerifier(_errorReporter, _currentLibrary) {
     _inDeprecatedMember = _currentLibrary.hasDeprecated;
+    String libraryPath = _currentLibrary.source.fullName;
+    Workspace workspace = ContextBuilder.createWorkspace(
+        resourceProvider, libraryPath, null /* ContextBuilder */);
+    _workspacePackage = workspace.findPackageFor(libraryPath);
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     ElementAnnotation element =
         resolutionMap.elementAnnotationForAnnotation(node);
+    AstNode parent = node.parent;
     if (element?.isFactory == true) {
-      AstNode parent = node.parent;
       if (parent is MethodDeclaration) {
         _checkForInvalidFactory(parent);
       } else {
@@ -300,52 +320,62 @@
             .reportErrorForNode(HintCode.INVALID_FACTORY_ANNOTATION, node, []);
       }
     } else if (element?.isImmutable == true) {
-      AstNode parent = node.parent;
-      if (parent is! ClassDeclaration) {
+      if (parent is! ClassOrMixinDeclaration && parent is! ClassTypeAlias) {
         _errorReporter.reportErrorForNode(
             HintCode.INVALID_IMMUTABLE_ANNOTATION, node, []);
       }
+    } else if (element?.isLiteral == true) {
+      if (parent is! ConstructorDeclaration ||
+          (parent as ConstructorDeclaration).constKeyword == null) {
+        _errorReporter
+            .reportErrorForNode(HintCode.INVALID_LITERAL_ANNOTATION, node, []);
+      }
+    } else if (element?.isSealed == true) {
+      if (!(parent is ClassDeclaration || parent is ClassTypeAlias)) {
+        _errorReporter.reportErrorForNode(HintCode.INVALID_SEALED_ANNOTATION,
+            node.parent, [node.element.name]);
+      }
     }
-    return super.visitAnnotation(node);
+    super.visitAnnotation(node);
   }
 
   @override
-  Object visitArgumentList(ArgumentList node) {
+  void visitArgumentList(ArgumentList node) {
     for (Expression argument in node.arguments) {
       ParameterElement parameter = argument.staticParameterElement;
       if (parameter?.isOptionalPositional == true) {
         _checkForDeprecatedMemberUse(parameter, argument);
       }
     }
-    return super.visitArgumentList(node);
+    super.visitArgumentList(node);
   }
 
   @override
-  Object visitAsExpression(AsExpression node) {
+  void visitAsExpression(AsExpression node) {
     _checkForUnnecessaryCast(node);
-    return super.visitAsExpression(node);
+    super.visitAsExpression(node);
   }
 
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     TokenType operatorType = node.operator.type;
     if (operatorType == TokenType.EQ) {
       _checkForInvalidAssignment(node.leftHandSide, node.rightHandSide);
     } else {
       _checkForDeprecatedMemberUse(node.staticElement, node);
     }
-    return super.visitAssignmentExpression(node);
+    super.visitAssignmentExpression(node);
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     _checkForDivisionOptimizationHint(node);
     _checkForDeprecatedMemberUse(node.staticElement, node);
-    return super.visitBinaryExpression(node);
+    super.visitBinaryExpression(node);
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     var element = AbstractClassElementImpl.getImpl(node.declaredElement);
     _enclosingClass = element;
     _invalidAccessVerifier._enclosingClass = element;
@@ -359,7 +389,8 @@
       // Commented out until we decide that we want this hint in the analyzer
       //    checkForOverrideEqualsButNotHashCode(node);
       _checkForImmutable(node);
-      return super.visitClassDeclaration(node);
+      _checkForInvalidSealedSuperclass(node);
+      super.visitClassDeclaration(node);
     } finally {
       _enclosingClass = null;
       _invalidAccessVerifier._enclosingClass = null;
@@ -368,7 +399,14 @@
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
+    _checkForImmutable(node);
+    _checkForInvalidSealedSuperclass(node);
+    super.visitClassTypeAlias(node);
+  }
+
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     if (resolutionMap.elementDeclaredByConstructorDeclaration(node).isFactory) {
       if (node.body is BlockFunctionBody) {
         // Check the block for a return statement, if not, create the hint.
@@ -378,37 +416,37 @@
         }
       }
     }
-    return super.visitConstructorDeclaration(node);
+    super.visitConstructorDeclaration(node);
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     _checkForDeprecatedMemberUse(node.uriElement, node);
-    return super.visitExportDirective(node);
+    super.visitExportDirective(node);
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     bool wasInDeprecatedMember = _inDeprecatedMember;
     if (_hasDeprecatedAnnotation(node.metadata)) {
       _inDeprecatedMember = true;
     }
 
     try {
-      return super.visitFieldDeclaration(node);
+      super.visitFieldDeclaration(node);
     } finally {
       _inDeprecatedMember = wasInDeprecatedMember;
     }
   }
 
   @override
-  Object visitFormalParameterList(FormalParameterList node) {
+  void visitFormalParameterList(FormalParameterList node) {
     _checkRequiredParameter(node);
-    return super.visitFormalParameterList(node);
+    super.visitFormalParameterList(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     bool wasInDeprecatedMember = _inDeprecatedMember;
     ExecutableElement element = node.declaredElement;
     if (element != null && element.hasDeprecated) {
@@ -417,42 +455,42 @@
     try {
       _checkForMissingReturn(
           node.returnType, node.functionExpression.body, element, node);
-      return super.visitFunctionDeclaration(node);
+      super.visitFunctionDeclaration(node);
     } finally {
       _inDeprecatedMember = wasInDeprecatedMember;
     }
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     _checkForDeprecatedMemberUse(node.uriElement, node);
     ImportElement importElement = node.element;
     if (importElement != null && importElement.isDeferred) {
       _checkForLoadLibraryFunction(node, importElement);
     }
-    return super.visitImportDirective(node);
+    super.visitImportDirective(node);
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     _checkForDeprecatedMemberUse(node.staticElement, node);
-    return super.visitIndexExpression(node);
+    super.visitIndexExpression(node);
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     _checkForDeprecatedMemberUse(node.staticElement, node);
-    return super.visitInstanceCreationExpression(node);
+    super.visitInstanceCreationExpression(node);
   }
 
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     _checkAllTypeChecks(node);
-    return super.visitIsExpression(node);
+    super.visitIsExpression(node);
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     bool wasInDeprecatedMember = _inDeprecatedMember;
     ExecutableElement element = node.declaredElement;
     if (element != null && element.hasDeprecated) {
@@ -463,14 +501,14 @@
       //checkForOverridingPrivateMember(node);
       _checkForMissingReturn(node.returnType, node.body, element, node);
       _checkForUnnecessaryNoSuchMethod(node);
-      return super.visitMethodDeclaration(node);
+      super.visitMethodDeclaration(node);
     } finally {
       _inDeprecatedMember = wasInDeprecatedMember;
     }
   }
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     _checkForNullAwareHints(node, node.operator);
     DartType staticInvokeType = node.staticInvokeType;
     Element callElement = staticInvokeType?.element;
@@ -478,11 +516,11 @@
         callElement.name == FunctionElement.CALL_METHOD_NAME) {
       _checkForDeprecatedMemberUse(callElement, node);
     }
-    return super.visitMethodInvocation(node);
+    super.visitMethodInvocation(node);
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     _enclosingClass = node.declaredElement;
     _invalidAccessVerifier._enclosingClass = _enclosingClass;
 
@@ -492,7 +530,9 @@
     }
 
     try {
-      return super.visitMixinDeclaration(node);
+      _checkForImmutable(node);
+      _checkForInvalidSealedSuperclass(node);
+      super.visitMixinDeclaration(node);
     } finally {
       _enclosingClass = null;
       _invalidAccessVerifier._enclosingClass = null;
@@ -501,61 +541,61 @@
   }
 
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     _checkForDeprecatedMemberUse(node.staticElement, node);
-    return super.visitPostfixExpression(node);
+    super.visitPostfixExpression(node);
   }
 
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     _checkForDeprecatedMemberUse(node.staticElement, node);
-    return super.visitPrefixExpression(node);
+    super.visitPrefixExpression(node);
   }
 
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     _checkForNullAwareHints(node, node.operator);
-    return super.visitPropertyAccess(node);
+    super.visitPropertyAccess(node);
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     _checkForDeprecatedMemberUse(node.staticElement, node);
-    return super.visitRedirectingConstructorInvocation(node);
+    super.visitRedirectingConstructorInvocation(node);
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     _checkForDeprecatedMemberUseAtIdentifier(node);
     _invalidAccessVerifier.verify(node);
-    return super.visitSimpleIdentifier(node);
+    super.visitSimpleIdentifier(node);
   }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     _checkForDeprecatedMemberUse(node.staticElement, node);
-    return super.visitSuperConstructorInvocation(node);
+    super.visitSuperConstructorInvocation(node);
   }
 
   @override
-  Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     bool wasInDeprecatedMember = _inDeprecatedMember;
     if (_hasDeprecatedAnnotation(node.metadata)) {
       _inDeprecatedMember = true;
     }
 
     try {
-      return super.visitTopLevelVariableDeclaration(node);
+      super.visitTopLevelVariableDeclaration(node);
     } finally {
       _inDeprecatedMember = wasInDeprecatedMember;
     }
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     _checkForInvalidAssignment(node.name, node.initializer);
-    return super.visitVariableDeclaration(node);
+    super.visitVariableDeclaration(node);
   }
 
   /// Check for the passed is expression for the unnecessary type check hint
@@ -641,8 +681,7 @@
     bool isLocalParameter(Element element, AstNode node) {
       if (element is ParameterElement) {
         ExecutableElement definingFunction = element.enclosingElement;
-        FunctionBody body =
-            node.getAncestor((ancestor) => ancestor is FunctionBody);
+        FunctionBody body = node.thisOrAncestorOfType<FunctionBody>();
         while (body != null) {
           ExecutableElement enclosingFunction;
           AstNode parent = body.parent;
@@ -656,7 +695,7 @@
           if (enclosingFunction == definingFunction) {
             return true;
           }
-          body = parent?.getAncestor((ancestor) => ancestor is FunctionBody);
+          body = parent?.thisOrAncestorOfType<FunctionBody>();
         }
       }
       return false;
@@ -753,7 +792,13 @@
     return false;
   }
 
-  void _checkForImmutable(ClassDeclaration node) {
+  /// Checks whether [node] violates the rules of [immutable].
+  ///
+  /// If [node] is marked with [immutable] or inherits from a class or mixin
+  /// marked with [immutable], this function searches the fields of [node] and
+  /// its superclasses, reporting a hint if any non-final instance fields are
+  /// found.
+  void _checkForImmutable(NamedCompilationUnitMember node) {
     /// Return `true` if the given class [element] is annotated with the
     /// `@immutable` annotation.
     bool isImmutable(ClassElement element) {
@@ -792,41 +837,40 @@
 
     /// Return `true` if the given class [element] defines a non-final instance
     /// field.
-    bool hasNonFinalInstanceField(ClassElement element) {
-      for (FieldElement field in element.fields) {
-        if (!field.isSynthetic && !field.isFinal && !field.isStatic) {
-          return true;
-        }
-      }
-      return false;
+    Iterable<String> nonFinalInstanceFields(ClassElement element) {
+      return element.fields
+          .where((FieldElement field) =>
+              !field.isSynthetic && !field.isFinal && !field.isStatic)
+          .map((FieldElement field) => '${element.name}.${field.name}');
     }
 
     /// Return `true` if the given class [element] defines or inherits a
     /// non-final field.
-    bool hasOrInheritsNonFinalInstanceField(
+    Iterable<String> definedOrInheritedNonFinalInstanceFields(
         ClassElement element, HashSet<ClassElement> visited) {
+      Iterable<String> nonFinalFields = [];
       if (visited.add(element)) {
-        if (hasNonFinalInstanceField(element)) {
-          return true;
-        }
-        for (InterfaceType mixin in element.mixins) {
-          if (hasNonFinalInstanceField(mixin.element)) {
-            return true;
-          }
-        }
+        nonFinalFields = nonFinalInstanceFields(element);
+        nonFinalFields = nonFinalFields.followedBy(element.mixins.expand(
+            (InterfaceType mixin) => nonFinalInstanceFields(mixin.element)));
         if (element.supertype != null) {
-          return hasOrInheritsNonFinalInstanceField(
-              element.supertype.element, visited);
+          nonFinalFields = nonFinalFields.followedBy(
+              definedOrInheritedNonFinalInstanceFields(
+                  element.supertype.element, visited));
         }
       }
-      return false;
+      return nonFinalFields;
     }
 
     ClassElement element = node.declaredElement;
-    if (isOrInheritsImmutable(element, new HashSet<ClassElement>()) &&
-        hasOrInheritsNonFinalInstanceField(
-            element, new HashSet<ClassElement>())) {
-      _errorReporter.reportErrorForNode(HintCode.MUST_BE_IMMUTABLE, node.name);
+    if (isOrInheritsImmutable(element, new HashSet<ClassElement>())) {
+      Iterable<String> nonFinalFields =
+          definedOrInheritedNonFinalInstanceFields(
+              element, new HashSet<ClassElement>());
+      if (nonFinalFields.isNotEmpty) {
+        _errorReporter.reportErrorForNode(
+            HintCode.MUST_BE_IMMUTABLE, node.name, [nonFinalFields.join(', ')]);
+      }
     }
   }
 
@@ -849,16 +893,14 @@
         ? ErrorVerifier.getStaticType(lhs)
         : leftVariableElement.type;
     DartType staticRightType = ErrorVerifier.getStaticType(rhs);
-    if (!_typeSystem.isAssignableTo(staticRightType, leftType,
-        isDeclarationCast: true)) {
+    if (!_typeSystem.isAssignableTo(staticRightType, leftType)) {
       // The warning was generated on this rhs
       return false;
     }
     // Test for, and then generate the hint
     DartType bestRightType = rhs.staticType;
     if (leftType != null && bestRightType != null) {
-      if (!_typeSystem.isAssignableTo(bestRightType, leftType,
-          isDeclarationCast: true)) {
+      if (!_typeSystem.isAssignableTo(bestRightType, leftType)) {
         _errorReporter.reportTypeErrorForNode(
             HintCode.INVALID_ASSIGNMENT, rhs, [bestRightType, leftType]);
         return true;
@@ -905,6 +947,38 @@
         decl.name, [decl.name.toString()]);
   }
 
+  void _checkForInvalidSealedSuperclass(NamedCompilationUnitMember node) {
+    bool currentPackageContains(Element element) {
+      String elementLibraryPath = element.library.source.fullName;
+      return _workspacePackage.contains(elementLibraryPath);
+    }
+
+    // [NamedCompilationUnitMember.declaredElement] is not necessarily a
+    // ClassElement, but [_checkForInvalidSealedSuperclass] should only be
+    // called with a [ClassOrMixinDeclaration], or a [ClassTypeAlias]. The
+    // `declaredElement` of these specific classes is a [ClassElement].
+    ClassElement element = node.declaredElement;
+    // TODO(srawlins): Perhaps replace this with a getter on Element, like
+    // `Element.hasOrInheritsSealed`?
+    for (InterfaceType supertype in element.allSupertypes) {
+      ClassElement superclass = supertype.element;
+      if (superclass.hasSealed) {
+        if (!currentPackageContains(superclass)) {
+          if (element.superclassConstraints.contains(supertype)) {
+            // This is a special violation of the sealed class contract,
+            // requiring specific messaging.
+            _errorReporter.reportErrorForNode(HintCode.MIXIN_ON_SEALED_CLASS,
+                node, [superclass.name.toString()]);
+          } else {
+            // This is a regular violation of the sealed class contract.
+            _errorReporter.reportErrorForNode(HintCode.SUBTYPE_OF_SEALED_CLASS,
+                node, [superclass.name.toString()]);
+          }
+        }
+      }
+    }
+  }
+
   /// Check that the imported library does not define a loadLibrary function.
   /// The import has already been determined to be deferred when this is called.
   ///
@@ -954,48 +1028,16 @@
         return;
       }
 
-      if (_typeSystem is StrongTypeSystemImpl) {
-        var flattenedType = body.isAsynchronous
-            ? returnType.flattenFutures(_typeSystem)
-            : returnType;
+      var flattenedType =
+          body.isAsynchronous ? _typeSystem.flatten(returnType) : returnType;
 
-        // dynamic/Null/void are allowed to omit a return.
-        if (flattenedType.isDynamic ||
-            flattenedType.isDartCoreNull ||
-            flattenedType.isVoid) {
-          return;
-        }
-        // Otherwise issue a warning if the block doesn't have a return.
-        if (!ExitDetector.exits(body)) {
-          _errorReporter.reportErrorForNode(
-              HintCode.MISSING_RETURN, errorNode, [returnType.displayName]);
-        }
+      // dynamic/Null/void are allowed to omit a return.
+      if (flattenedType.isDynamic ||
+          flattenedType.isDartCoreNull ||
+          flattenedType.isVoid) {
         return;
       }
-
-      // TODO(leafp): Delete this non-strong mode path
-      // Check that the type is resolvable and not "void"
-      if (returnType.isVoid ||
-          (body.isAsynchronous && _isFutureVoid(returnType))) {
-        return;
-      }
-      // For async, give no hint if the return type does not matter, i.e.
-      // dynamic, Future<Null> or Future<dynamic>.
-      if (body.isAsynchronous) {
-        if (returnType.isDynamic) {
-          return;
-        }
-        if (returnType is InterfaceType && returnType.isDartAsyncFuture) {
-          DartType futureArgument = returnType.typeArguments[0];
-          if (futureArgument.isDynamic ||
-              futureArgument.isDartCoreNull ||
-              futureArgument.isVoid ||
-              futureArgument.isObject) {
-            return;
-          }
-        }
-      }
-      // Check the block for a return statement, if not, create the hint
+      // Otherwise issue a warning if the block doesn't have a return.
       if (!ExitDetector.exits(body)) {
         _errorReporter.reportErrorForNode(
             HintCode.MISSING_RETURN, errorNode, [returnType.displayName]);
@@ -1316,7 +1358,7 @@
 /// Instances of the class `Dart2JSVerifier` traverse an AST structure looking
 /// for hints for code that will be compiled to JS, such as
 /// [HintCode.IS_DOUBLE].
-class Dart2JSVerifier extends RecursiveAstVisitor<Object> {
+class Dart2JSVerifier extends RecursiveAstVisitor<void> {
   /// The name of the `double` type.
   static String _DOUBLE_TYPE_NAME = "double";
 
@@ -1329,9 +1371,9 @@
   Dart2JSVerifier(this._errorReporter);
 
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     _checkForIsDoubleHints(node);
-    return super.visitIsExpression(node);
+    super.visitIsExpression(node);
   }
 
   /// Check for instances of `x is double`, `x is int`, `x is! double` and
@@ -1374,7 +1416,7 @@
 }
 
 /// A visitor that finds dead code and unused labels.
-class DeadCodeVerifier extends RecursiveAstVisitor<Object> {
+class DeadCodeVerifier extends RecursiveAstVisitor<void> {
   /// The error reporter by which errors will be reported.
   final ErrorReporter _errorReporter;
 
@@ -1388,10 +1430,10 @@
   /// to the given [errorReporter] and will use the given [typeSystem] if one is
   /// provided.
   DeadCodeVerifier(this._errorReporter, {TypeSystem typeSystem})
-      : this._typeSystem = typeSystem ?? new StrongTypeSystemImpl(null);
+      : this._typeSystem = typeSystem ?? new Dart2TypeSystem(null);
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     Token operator = node.operator;
     bool isAmpAmp = operator.type == TokenType.AMPERSAND_AMPERSAND;
     bool isBarBar = operator.type == TokenType.BAR_BAR;
@@ -1407,14 +1449,14 @@
                 HintCode.DEAD_CODE, node.rightOperand);
             // Only visit the LHS:
             lhsCondition?.accept(this);
-            return null;
+            return;
           } else if (value == false && isAmpAmp) {
             // Report error on "if" block: false && !e!
             _errorReporter.reportErrorForNode(
                 HintCode.DEAD_CODE, node.rightOperand);
             // Only visit the LHS:
             lhsCondition?.accept(this);
-            return null;
+            return;
           }
         }
       }
@@ -1438,27 +1480,25 @@
 //              }
 //            }
     }
-    return super.visitBinaryExpression(node);
+    super.visitBinaryExpression(node);
   }
 
   /// For each block, this method reports and error on all statements between
   /// the end of the block and the first return statement (assuming there it is
   /// not at the end of the block.)
   @override
-  Object visitBlock(Block node) {
+  void visitBlock(Block node) {
     NodeList<Statement> statements = node.statements;
     _checkForDeadStatementsInNodeList(statements);
-    return null;
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     labelTracker?.recordUsage(node.label?.name);
-    return null;
   }
 
   @override
-  Object visitConditionalExpression(ConditionalExpression node) {
+  void visitConditionalExpression(ConditionalExpression node) {
     Expression conditionExpression = node.condition;
     conditionExpression?.accept(this);
     if (!_isDebugConstant(conditionExpression)) {
@@ -1470,27 +1510,26 @@
           _errorReporter.reportErrorForNode(
               HintCode.DEAD_CODE, node.elseExpression);
           node.thenExpression?.accept(this);
-          return null;
+          return;
         } else {
           // Report error on "if" block: false ? !1! : 2
           _errorReporter.reportErrorForNode(
               HintCode.DEAD_CODE, node.thenExpression);
           node.elseExpression?.accept(this);
-          return null;
+          return;
         }
       }
     }
-    return super.visitConditionalExpression(node);
+    super.visitConditionalExpression(node);
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     labelTracker?.recordUsage(node.label?.name);
-    return null;
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     ExportElement exportElement = node.element;
     if (exportElement != null) {
       // The element is null when the URI is invalid.
@@ -1501,11 +1540,11 @@
         }
       }
     }
-    return super.visitExportDirective(node);
+    super.visitExportDirective(node);
   }
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     Expression conditionExpression = node.condition;
     conditionExpression?.accept(this);
     if (!_isDebugConstant(conditionExpression)) {
@@ -1519,22 +1558,22 @@
             _errorReporter.reportErrorForNode(
                 HintCode.DEAD_CODE, elseStatement);
             node.thenStatement?.accept(this);
-            return null;
+            return;
           }
         } else {
           // Report error on if block: if (false) {!} else {}
           _errorReporter.reportErrorForNode(
               HintCode.DEAD_CODE, node.thenStatement);
           node.elseStatement?.accept(this);
-          return null;
+          return;
         }
       }
     }
-    return super.visitIfStatement(node);
+    super.visitIfStatement(node);
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     ImportElement importElement = node.element;
     if (importElement != null) {
       // The element is null when the URI is invalid, but not when the URI is
@@ -1546,34 +1585,33 @@
         }
       }
     }
-    return super.visitImportDirective(node);
+    super.visitImportDirective(node);
   }
 
   @override
-  Object visitLabeledStatement(LabeledStatement node) {
+  void visitLabeledStatement(LabeledStatement node) {
     _pushLabels(node.labels);
     try {
       super.visitLabeledStatement(node);
     } finally {
       _popLabels();
     }
-    return null;
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     _checkForDeadStatementsInNodeList(node.statements, allowMandated: true);
-    return super.visitSwitchCase(node);
+    super.visitSwitchCase(node);
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     _checkForDeadStatementsInNodeList(node.statements, allowMandated: true);
-    return super.visitSwitchDefault(node);
+    super.visitSwitchDefault(node);
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSwitchStatement(SwitchStatement node) {
     List<Label> labels = <Label>[];
     for (SwitchMember member in node.members) {
       labels.addAll(member.labels);
@@ -1584,11 +1622,10 @@
     } finally {
       _popLabels();
     }
-    return null;
   }
 
   @override
-  Object visitTryStatement(TryStatement node) {
+  void visitTryStatement(TryStatement node) {
     node.body?.accept(this);
     node.finallyBlock?.accept(this);
     NodeList<CatchClause> catchClauses = node.catchClauses;
@@ -1615,7 +1652,7 @@
               int length = lastCatchClause.end - offset;
               _errorReporter.reportErrorForOffset(
                   HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH, offset, length);
-              return null;
+              return;
             }
           }
           int length = visitedTypes.length;
@@ -1630,7 +1667,7 @@
                   offset,
                   length,
                   [currentType.displayName, type.displayName]);
-              return null;
+              return;
             }
           }
           visitedTypes.add(currentType);
@@ -1649,15 +1686,14 @@
           int length = lastCatchClause.end - offset;
           _errorReporter.reportErrorForOffset(
               HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH, offset, length);
-          return null;
+          return;
         }
       }
     }
-    return null;
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     Expression conditionExpression = node.condition;
     conditionExpression?.accept(this);
     if (!_isDebugConstant(conditionExpression)) {
@@ -1667,12 +1703,11 @@
         if (result.value.toBoolValue() == false) {
           // Report error on while block: while (false) {!}
           _errorReporter.reportErrorForNode(HintCode.DEAD_CODE, node.body);
-          return null;
+          return;
         }
       }
     }
     node.body?.accept(this);
-    return null;
   }
 
   /// Resolve the names in the given [combinator] in the scope of the given
@@ -2273,7 +2308,7 @@
 
 /// Instances of the class `EnumMemberBuilder` build the members in enum
 /// declarations.
-class EnumMemberBuilder extends RecursiveAstVisitor<Object> {
+class EnumMemberBuilder extends RecursiveAstVisitor<void> {
   /// The type provider used to access the types needed to build an element
   /// model for enum declarations.
   final TypeProvider _typeProvider;
@@ -2285,7 +2320,7 @@
   EnumMemberBuilder(this._typeProvider);
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     //
     // Finish building the enum.
     //
@@ -2351,7 +2386,7 @@
     enumElement.accessors = getters;
     // Client code isn't allowed to invoke the constructor, so we do not model
     // it.
-    return super.visitEnumDeclaration(node);
+    super.visitEnumDeclaration(node);
   }
 
   /// Create a getter that corresponds to the given [field].
@@ -3636,8 +3671,8 @@
   ///
   /// The returned type may be partially or completely unknown, denoted with an
   /// unknown type `?`, for example `List<?>` or `(?, int) -> void`.
-  /// You can use [StrongTypeSystemImpl.upperBoundForType] or
-  /// [StrongTypeSystemImpl.lowerBoundForType] if you would prefer a known type
+  /// You can use [Dart2TypeSystem.upperBoundForType] or
+  /// [Dart2TypeSystem.lowerBoundForType] if you would prefer a known type
   /// that represents the bound of the context type.
   static DartType getContext(AstNode node) => node?.getProperty(_typeProperty);
 
@@ -3907,38 +3942,38 @@
             nameScope: nameScope);
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     if (_shouldBeSkipped(node)) {
       return null;
     }
-    return super.visitBlockFunctionBody(node);
+    super.visitBlockFunctionBody(node);
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     if (_shouldBeSkipped(node)) {
       return null;
     }
-    return super.visitExpressionFunctionBody(node);
+    super.visitExpressionFunctionBody(node);
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     if (node.isStatic) {
       _addStaticVariables(node.fields.variables);
     }
-    return super.visitFieldDeclaration(node);
+    super.visitFieldDeclaration(node);
   }
 
   @override
-  Object visitNode(AstNode node) {
-    return super.visitNode(node);
+  void visitNode(AstNode node) {
+    super.visitNode(node);
   }
 
   @override
-  Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     _addStaticVariables(node.variables.variables);
-    return super.visitTopLevelVariableDeclaration(node);
+    super.visitTopLevelVariableDeclaration(node);
   }
 
   /// Add all of the [variables] with initializers to the list of variables
@@ -4233,7 +4268,7 @@
     if (fnType.typeFormals.isEmpty) {
       // TODO(jmesserly): this is a legal subtype. We don't currently infer
       // here, but we could.  This is similar to
-      // StrongTypeSystemImpl.inferFunctionTypeInstantiation, but we don't
+      // Dart2TypeSystem.inferFunctionTypeInstantiation, but we don't
       // have the FunctionType yet for the current node, so it's not quite
       // straightforward to apply.
       return null;
@@ -4341,12 +4376,12 @@
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     AstNode parent = node.parent;
     if (identical(parent, _enclosingClassDeclaration) ||
         identical(parent, _enclosingFunctionTypeAlias) ||
         identical(parent, _enclosingMixinDeclaration)) {
-      return null;
+      return;
     }
     node.name?.accept(this);
     node.constructorName?.accept(this);
@@ -4364,11 +4399,10 @@
     } else {
       elementAnnotationImpl.annotationAst = _createCloner().cloneNode(node);
     }
-    return null;
   }
 
   @override
-  Object visitArgumentList(ArgumentList node) {
+  void visitArgumentList(ArgumentList node) {
     DartType callerType = InferenceContext.getContext(node);
     if (callerType is FunctionType) {
       Map<String, DartType> namedParameterTypes =
@@ -4408,26 +4442,24 @@
         }
       }
     }
-    return super.visitArgumentList(node);
+    super.visitArgumentList(node);
   }
 
   @override
-  Object visitAssertInitializer(AssertInitializer node) {
+  void visitAssertInitializer(AssertInitializer node) {
     InferenceContext.setType(node.condition, typeProvider.boolType);
     super.visitAssertInitializer(node);
-    return null;
   }
 
   @override
-  Object visitAssertStatement(AssertStatement node) {
+  void visitAssertStatement(AssertStatement node) {
     InferenceContext.setType(node.condition, typeProvider.boolType);
     super.visitAssertStatement(node);
     _propagateTrueState(node.condition);
-    return null;
   }
 
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     node.leftHandSide?.accept(this);
     TokenType operator = node.operator.type;
     if (operator == TokenType.EQ ||
@@ -4438,21 +4470,20 @@
     node.rightHandSide?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitAwaitExpression(AwaitExpression node) {
+  void visitAwaitExpression(AwaitExpression node) {
     DartType contextType = InferenceContext.getContext(node);
     if (contextType != null) {
       var futureUnion = _createFutureOr(contextType);
       InferenceContext.setType(node.expression, futureUnion);
     }
-    return super.visitAwaitExpression(node);
+    super.visitAwaitExpression(node);
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     TokenType operatorType = node.operator.type;
     Expression leftOperand = node.leftOperand;
     Expression rightOperand = node.rightOperand;
@@ -4527,11 +4558,10 @@
       rightOperand?.accept(this);
     }
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     _overrideManager.enterScope();
     try {
       inferenceContext.pushReturnContext(node);
@@ -4540,28 +4570,26 @@
       _overrideManager.exitScope();
       inferenceContext.popReturnContext(node);
     }
-    return null;
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) {
+  void visitBreakStatement(BreakStatement node) {
     //
     // We do not visit the label because it needs to be visited in the context
     // of the statement.
     //
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitCascadeExpression(CascadeExpression node) {
+  void visitCascadeExpression(CascadeExpression node) {
     InferenceContext.setTypeFromNode(node.target, node);
-    return super.visitCascadeExpression(node);
+    super.visitCascadeExpression(node);
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     //
     // Resolve the metadata in the library scope.
     //
@@ -4582,12 +4610,11 @@
       enclosingClass = outerType;
       _enclosingClassDeclaration = null;
     }
-    return null;
   }
 
   /// Implementation of this method should be synchronized with
   /// [visitClassDeclaration].
-  visitClassDeclarationIncrementally(ClassDeclaration node) {
+  void visitClassDeclarationIncrementally(ClassDeclaration node) {
     //
     // Resolve the metadata in the library scope.
     //
@@ -4603,31 +4630,29 @@
   }
 
   @override
-  Object visitComment(Comment node) {
+  void visitComment(Comment node) {
     AstNode parent = node.parent;
     if (parent is FunctionDeclaration ||
         parent is FunctionTypeAlias ||
         parent is ConstructorDeclaration ||
         parent is MethodDeclaration) {
-      return null;
+      return;
     }
     super.visitComment(node);
-    return null;
   }
 
   @override
-  Object visitCommentReference(CommentReference node) {
+  void visitCommentReference(CommentReference node) {
     //
     // We do not visit the identifier because it needs to be visited in the
     // context of the reference.
     //
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     _overrideManager.enterScope();
     try {
       NodeList<Directive> directives = node.directives;
@@ -4645,11 +4670,10 @@
     }
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitConditionalExpression(ConditionalExpression node) {
+  void visitConditionalExpression(ConditionalExpression node) {
     Expression condition = node.condition;
     condition?.accept(this);
     Expression thenExpression = node.thenExpression;
@@ -4696,11 +4720,10 @@
       _propagateFalseState(condition);
       _propagateState(elseExpression);
     }
-    return null;
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     FunctionBody outerFunctionBody = _currentFunctionBody;
     try {
@@ -4716,7 +4739,6 @@
     ConstructorElementImpl constructor = node.declaredElement;
     constructor.constantInitializers =
         _createCloner().cloneNodeList(node.initializers);
-    return null;
   }
 
   @override
@@ -4732,7 +4754,7 @@
   }
 
   @override
-  Object visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     //
     // We visit the expression, but do not visit the field name because it needs
     // to be visited in the context of the constructor field initializer node.
@@ -4742,11 +4764,10 @@
     node.expression?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitConstructorName(ConstructorName node) {
+  void visitConstructorName(ConstructorName node) {
     //
     // We do not visit either the type name, because it won't be visited anyway,
     // or the name, because it needs to be visited in the context of the
@@ -4754,22 +4775,20 @@
     //
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitContinueStatement(ContinueStatement node) {
+  void visitContinueStatement(ContinueStatement node) {
     //
     // We do not visit the label because it needs to be visited in the context
     // of the statement.
     //
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitDefaultFormalParameter(DefaultFormalParameter node) {
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
     InferenceContext.setType(node.defaultValue,
         resolutionMap.elementDeclaredByFormalParameter(node.parameter)?.type);
     super.visitDefaultFormalParameter(node);
@@ -4785,11 +4804,10 @@
       (element as ConstVariableElement).constantInitializer =
           _createCloner().cloneNode(node.defaultValue);
     }
-    return null;
   }
 
   @override
-  Object visitDoStatement(DoStatement node) {
+  void visitDoStatement(DoStatement node) {
     _overrideManager.enterScope();
     try {
       InferenceContext.setType(node.condition, typeProvider.boolType);
@@ -4799,19 +4817,18 @@
     }
     // TODO(brianwilkerson) If the loop can only be exited because the condition
     // is false, then propagateFalseState(node.getCondition());
-    return null;
   }
 
   @override
-  Object visitEmptyFunctionBody(EmptyFunctionBody node) {
+  void visitEmptyFunctionBody(EmptyFunctionBody node) {
     if (resolveOnlyCommentInFunctionBody) {
-      return null;
+      return;
     }
-    return super.visitEmptyFunctionBody(node);
+    super.visitEmptyFunctionBody(node);
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     //
     // Resolve the metadata in the library scope
     // and associate the annotations with the element.
@@ -4836,13 +4853,12 @@
       enclosingClass = outerType;
       _enclosingClassDeclaration = null;
     }
-    return null;
   }
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     if (resolveOnlyCommentInFunctionBody) {
-      return null;
+      return;
     }
     _overrideManager.enterScope();
     try {
@@ -4852,7 +4868,7 @@
 
       DartType type = node.expression.staticType;
       if (_enclosingFunction.isAsynchronous) {
-        type = type.flattenFutures(typeSystem);
+        type = typeSystem.flatten(type);
       }
       if (type != null) {
         inferenceContext.addReturnOrYieldType(type);
@@ -4861,11 +4877,10 @@
       _overrideManager.exitScope();
       inferenceContext.popReturnContext(node);
     }
-    return null;
   }
 
   @override
-  Object visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     _overrideManager.enterScope();
     try {
       super.visitFieldDeclaration(node);
@@ -4875,18 +4890,16 @@
       _overrideManager.exitScope();
       _overrideManager.applyOverrides(overrides);
     }
-    return null;
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     _overrideManager.enterScope();
     try {
       super.visitForEachStatement(node);
     } finally {
       _overrideManager.exitScope();
     }
-    return null;
   }
 
   @override
@@ -4959,14 +4972,13 @@
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     _overrideManager.enterScope();
     try {
       super.visitForStatement(node);
     } finally {
       _overrideManager.exitScope();
     }
-    return null;
   }
 
   @override
@@ -4988,7 +5000,7 @@
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     FunctionBody outerFunctionBody = _currentFunctionBody;
     try {
@@ -5002,7 +5014,6 @@
       _currentFunctionBody = outerFunctionBody;
       _enclosingFunction = outerFunction;
     }
-    return null;
   }
 
   @override
@@ -5012,7 +5023,7 @@
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     ExecutableElement outerFunction = _enclosingFunction;
     FunctionBody outerFunctionBody = _currentFunctionBody;
     try {
@@ -5021,8 +5032,7 @@
       _overrideManager.enterScope();
       try {
         DartType functionType = InferenceContext.getContext(node);
-        var ts = typeSystem;
-        if (functionType is FunctionType && ts is StrongTypeSystemImpl) {
+        if (functionType is FunctionType) {
           functionType =
               matchFunctionTypeParameters(node.typeParameters, functionType);
           if (functionType is FunctionType) {
@@ -5039,21 +5049,19 @@
       _currentFunctionBody = outerFunctionBody;
       _enclosingFunction = outerFunction;
     }
-    return null;
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     node.function?.accept(this);
     node.accept(elementResolver);
     _inferArgumentTypesForInvocation(node);
     node.argumentList?.accept(this);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     // Resolve the metadata in the library scope.
     if (node.metadata != null) {
       node.metadata.accept(this);
@@ -5065,7 +5073,6 @@
     } finally {
       _enclosingFunctionTypeAlias = outerAlias;
     }
-    return null;
   }
 
   @override
@@ -5075,20 +5082,19 @@
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) => null;
+  void visitGenericFunctionType(GenericFunctionType node) {}
 
   @override
-  Object visitGenericTypeAliasInFunctionScope(GenericTypeAlias node) {
+  void visitGenericTypeAliasInFunctionScope(GenericTypeAlias node) {
     super.visitGenericTypeAliasInFunctionScope(node);
     safelyVisitComment(node.documentationComment);
-    return null;
   }
 
   @override
-  Object visitHideCombinator(HideCombinator node) => null;
+  void visitHideCombinator(HideCombinator node) {}
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     Expression condition = node.condition;
     InferenceContext.setType(condition, typeProvider.boolType);
     condition?.accept(this);
@@ -5147,11 +5153,10 @@
       perBranchOverrides.add(elseOverrides);
       _overrideManager.mergeOverrides(perBranchOverrides);
     }
-    return null;
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     node.target?.accept(this);
     node.accept(elementResolver);
     var method = node.staticElement;
@@ -5161,27 +5166,25 @@
     }
     node.index?.accept(this);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     node.constructorName?.accept(this);
     _inferArgumentTypesForInstanceCreate(node);
     node.argumentList?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitLabel(Label node) => null;
+  void visitLabel(Label node) {}
 
   @override
-  Object visitLibraryIdentifier(LibraryIdentifier node) => null;
+  void visitLibraryIdentifier(LibraryIdentifier node) {}
 
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     InterfaceType listT;
 
     if (node.typeArguments != null) {
@@ -5202,11 +5205,10 @@
       InferenceContext.clearType(node);
     }
     super.visitListLiteral(node);
-    return null;
   }
 
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     InterfaceType mapT;
     if (node.typeArguments != null) {
       var targs = node.typeArguments.arguments.map((t) => t.type).toList();
@@ -5215,6 +5217,15 @@
       }
     } else {
       mapT = typeAnalyzer.inferMapType(node, downwards: true);
+      if (mapT != null &&
+          node.typeArguments == null &&
+          node.entries.isEmpty &&
+          typeSystem.isAssignableTo(typeProvider.setNullType, mapT) &&
+          !typeSystem.isAssignableTo(typeProvider.mapNullNullType, mapT)) {
+        // The node is really an empty set literal with no type arguments, so
+        // don't try to visit the replaced map literal.
+        return;
+      }
     }
     if (mapT != null) {
       DartType kType = mapT.typeArguments[0];
@@ -5228,11 +5239,10 @@
       InferenceContext.clearType(node);
     }
     super.visitMapLiteral(node);
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     FunctionBody outerFunctionBody = _currentFunctionBody;
     try {
@@ -5246,7 +5256,6 @@
       _currentFunctionBody = outerFunctionBody;
       _enclosingFunction = outerFunction;
     }
-    return null;
   }
 
   @override
@@ -5256,7 +5265,7 @@
   }
 
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     //
     // We visit the target and argument list, but do not visit the method name
     // because it needs to be visited in the context of the invocation.
@@ -5267,11 +5276,10 @@
     _inferArgumentTypesForInvocation(node);
     node.argumentList?.accept(this);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     //
     // Resolve the metadata in the library scope.
     //
@@ -5292,31 +5300,29 @@
       enclosingClass = outerType;
       _enclosingMixinDeclaration = null;
     }
-    return null;
   }
 
   @override
-  Object visitNamedExpression(NamedExpression node) {
+  void visitNamedExpression(NamedExpression node) {
     InferenceContext.setTypeFromNode(node.expression, node);
-    return super.visitNamedExpression(node);
+    super.visitNamedExpression(node);
   }
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     node.visitChildren(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitParenthesizedExpression(ParenthesizedExpression node) {
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
     InferenceContext.setTypeFromNode(node.expression, node);
-    return super.visitParenthesizedExpression(node);
+    super.visitParenthesizedExpression(node);
   }
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     //
     // We visit the prefix, but do not visit the identifier because it needs to
     // be visited in the context of the prefix.
@@ -5324,11 +5330,10 @@
     node.prefix?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     //
     // We visit the target, but do not visit the property name because it needs
     // to be visited in the context of the property access node.
@@ -5336,11 +5341,10 @@
     node.target?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitRedirectingConstructorInvocation(
+  void visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     //
     // We visit the argument list, but do not visit the optional identifier
@@ -5352,11 +5356,10 @@
     node.argumentList?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitReturnStatement(ReturnStatement node) {
+  void visitReturnStatement(ReturnStatement node) {
     Expression e = node.expression;
     InferenceContext.setType(e, inferenceContext.returnContext);
     super.visitReturnStatement(node);
@@ -5365,18 +5368,44 @@
     // we're processing erroneous code.
     if (type != null && _enclosingFunction?.isGenerator == false) {
       if (_enclosingFunction.isAsynchronous) {
-        type = type.flattenFutures(typeSystem);
+        type = typeSystem.flatten(type);
       }
       inferenceContext.addReturnOrYieldType(type);
     }
-    return null;
   }
 
   @override
-  Object visitShowCombinator(ShowCombinator node) => null;
+  void visitSetLiteral(SetLiteral node) {
+    InterfaceType setT;
+
+    TypeArgumentList typeArguments = node.typeArguments;
+    if (typeArguments != null) {
+      if (typeArguments.length == 1) {
+        DartType elementType = typeArguments.arguments[0].type;
+        if (!elementType.isDynamic) {
+          setT = typeProvider.setType.instantiate([elementType]);
+        }
+      }
+    } else {
+      setT = typeAnalyzer.inferSetType(node, downwards: true);
+    }
+    if (setT != null) {
+      DartType eType = setT.typeArguments[0];
+      for (Expression child in node.elements) {
+        InferenceContext.setType(child, eType);
+      }
+      InferenceContext.setType(node, setT);
+    } else {
+      InferenceContext.clearType(node);
+    }
+    super.visitSetLiteral(node);
+  }
 
   @override
-  Object visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitShowCombinator(ShowCombinator node) {}
+
+  @override
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     //
     // We visit the argument list, but do not visit the optional identifier
     // because it needs to be visited in the context of the constructor
@@ -5387,11 +5416,10 @@
     node.argumentList?.accept(this);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     _overrideManager.enterScope();
     try {
       InferenceContext.setType(
@@ -5400,22 +5428,20 @@
     } finally {
       _overrideManager.exitScope();
     }
-    return null;
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     _overrideManager.enterScope();
     try {
       super.visitSwitchDefault(node);
     } finally {
       _overrideManager.exitScope();
     }
-    return null;
   }
 
   @override
-  Object visitSwitchStatementInScope(SwitchStatement node) {
+  void visitSwitchStatementInScope(SwitchStatement node) {
     var previousExpressionType = _enclosingSwitchStatementExpressionType;
     try {
       node.expression?.accept(this);
@@ -5424,11 +5450,10 @@
     } finally {
       _enclosingSwitchStatementExpressionType = previousExpressionType;
     }
-    return null;
   }
 
   @override
-  Object visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     _overrideManager.enterScope();
     try {
       super.visitTopLevelVariableDeclaration(node);
@@ -5438,14 +5463,13 @@
       _overrideManager.exitScope();
       _overrideManager.applyOverrides(overrides);
     }
-    return null;
   }
 
   @override
-  Object visitTypeName(TypeName node) => null;
+  void visitTypeName(TypeName node) {}
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     InferenceContext.setTypeFromNode(node.initializer, node);
     super.visitVariableDeclaration(node);
     VariableElement element = node.declaredElement;
@@ -5461,22 +5485,20 @@
       (element as ConstVariableElement).constantInitializer =
           _createCloner().cloneNode(node.initializer);
     }
-    return null;
   }
 
   @override
-  Object visitVariableDeclarationList(VariableDeclarationList node) {
+  void visitVariableDeclarationList(VariableDeclarationList node) {
     for (VariableDeclaration decl in node.variables) {
       VariableElement variableElement =
           resolutionMap.elementDeclaredByVariableDeclaration(decl);
       InferenceContext.setType(decl, variableElement?.type);
     }
     super.visitVariableDeclarationList(node);
-    return null;
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     // Note: since we don't call the base class, we have to maintain
     // _implicitLabelScope ourselves.
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
@@ -5502,11 +5524,10 @@
     // is false, then propagateFalseState(condition);
     node.accept(elementResolver);
     node.accept(typeAnalyzer);
-    return null;
   }
 
   @override
-  Object visitYieldStatement(YieldStatement node) {
+  void visitYieldStatement(YieldStatement node) {
     Expression e = node.expression;
     DartType returnType = inferenceContext.returnContext;
     bool isGenerator = _enclosingFunction?.isGenerator ?? false;
@@ -5542,7 +5563,6 @@
         inferenceContext.addReturnOrYieldType(type);
       }
     }
-    return null;
   }
 
   /// Checks each promoted variable in the current scope for compliance with the
@@ -5600,7 +5620,7 @@
         }
       }
       // async functions expect `Future<T> | T`
-      var futureTypeParam = declaredType.flattenFutures(typeSystem);
+      var futureTypeParam = typeSystem.flatten(declaredType);
       return _createFutureOr(futureTypeParam);
     }
     return declaredType;
@@ -5699,7 +5719,7 @@
     if (typeArguments == null &&
         uninstantiatedType is FunctionType &&
         uninstantiatedType.typeFormals.isNotEmpty &&
-        ts is StrongTypeSystemImpl) {
+        ts is Dart2TypeSystem) {
       return ts.inferGenericFunctionOrType<FunctionType>(
           uninstantiatedType,
           const <ParameterElement>[],
@@ -6110,7 +6130,7 @@
 
 /// The abstract class `ScopedVisitor` maintains name and label scopes as an AST
 /// structure is being visited.
-abstract class ScopedVisitor extends UnifyingAstVisitor<Object> {
+abstract class ScopedVisitor extends UnifyingAstVisitor<void> {
   /// The element for the library containing the compilation unit being visited.
   final LibraryElement definingLibrary;
 
@@ -6185,7 +6205,7 @@
   }
 
   @override
-  Object visitBlock(Block node) {
+  void visitBlock(Block node) {
     Scope outerScope = nameScope;
     try {
       EnclosedScope enclosedScope = new BlockScope(nameScope, node);
@@ -6194,11 +6214,10 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     ImplicitLabelScope implicitOuterScope = _implicitLabelScope;
     try {
       _implicitLabelScope = ImplicitLabelScope.ROOT;
@@ -6206,11 +6225,10 @@
     } finally {
       _implicitLabelScope = implicitOuterScope;
     }
-    return null;
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     SimpleIdentifier exception = node.exceptionParameter;
     if (exception != null) {
       Scope outerScope = nameScope;
@@ -6228,11 +6246,10 @@
     } else {
       super.visitCatchClause(node);
     }
-    return null;
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     ClassElement classElement = node.declaredElement;
     Scope outerScope = nameScope;
     try {
@@ -6256,7 +6273,6 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   void visitClassDeclarationInScope(ClassDeclaration node) {
@@ -6275,7 +6291,7 @@
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     Scope outerScope = nameScope;
     try {
       ClassElement element = node.declaredElement;
@@ -6285,11 +6301,10 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     ConstructorElement constructorElement = node.declaredElement;
     if (constructorElement == null) {
       StringBuffer buffer = new StringBuffer();
@@ -6329,7 +6344,6 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   void visitConstructorDeclarationInScope(ConstructorDeclaration node) {
@@ -6337,17 +6351,16 @@
   }
 
   @override
-  Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     VariableElement element = node.declaredElement;
     if (element != null) {
       nameScope.define(element);
     }
     super.visitDeclaredIdentifier(node);
-    return null;
   }
 
   @override
-  Object visitDoStatement(DoStatement node) {
+  void visitDoStatement(DoStatement node) {
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
       _implicitLabelScope = _implicitLabelScope.nest(node);
@@ -6356,11 +6369,10 @@
     } finally {
       _implicitLabelScope = outerImplicitScope;
     }
-    return null;
   }
 
   @override
-  Object visitEnumDeclaration(EnumDeclaration node) {
+  void visitEnumDeclaration(EnumDeclaration node) {
     ClassElement classElement = node.declaredElement;
     Scope outerScope = nameScope;
     try {
@@ -6382,7 +6394,6 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   void visitEnumMembersInScope(EnumDeclaration node) {
@@ -6392,7 +6403,7 @@
   }
 
   @override
-  Object visitForEachStatement(ForEachStatement node) {
+  void visitForEachStatement(ForEachStatement node) {
     Scope outerNameScope = nameScope;
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
@@ -6403,7 +6414,6 @@
       nameScope = outerNameScope;
       _implicitLabelScope = outerImplicitScope;
     }
-    return null;
   }
 
   /// Visit the given statement after it's scope has been created. This replaces
@@ -6423,7 +6433,7 @@
   }
 
   @override
-  Object visitFormalParameterList(FormalParameterList node) {
+  void visitFormalParameterList(FormalParameterList node) {
     super.visitFormalParameterList(node);
     // We finished resolving function signature, now include formal parameters
     // scope.  Note: we must not do this if the parent is a
@@ -6436,11 +6446,10 @@
     if (nameScope is FunctionTypeScope) {
       (nameScope as FunctionTypeScope).defineParameters();
     }
-    return null;
   }
 
   @override
-  Object visitForStatement(ForStatement node) {
+  void visitForStatement(ForStatement node) {
     Scope outerNameScope = nameScope;
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
@@ -6451,7 +6460,6 @@
       nameScope = outerNameScope;
       _implicitLabelScope = outerImplicitScope;
     }
-    return null;
   }
 
   /// Visit the given statement after it's scope has been created. This replaces
@@ -6468,7 +6476,7 @@
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement functionElement = node.declaredElement;
     if (functionElement != null &&
         functionElement.enclosingElement is! CompilationUnitElement) {
@@ -6487,7 +6495,6 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   void visitFunctionDeclarationInScope(FunctionDeclaration node) {
@@ -6495,7 +6502,7 @@
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is FunctionDeclaration) {
       // We have already created a function scope and don't need to do so again.
       super.visitFunctionExpression(node);
@@ -6528,11 +6535,10 @@
         nameScope = outerScope;
       }
     }
-    return null;
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     Scope outerScope = nameScope;
     try {
       nameScope = new FunctionTypeScope(nameScope, node.declaredElement);
@@ -6540,7 +6546,6 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   void visitFunctionTypeAliasInScope(FunctionTypeAlias node) {
@@ -6548,7 +6553,7 @@
   }
 
   @override
-  Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     Scope outerScope = nameScope;
     try {
       ParameterElement parameterElement = node.declaredElement;
@@ -6569,16 +6574,16 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) {
+  void visitGenericFunctionType(GenericFunctionType node) {
     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);
+      super.visitGenericFunctionType(node);
+      return;
     }
     GenericFunctionTypeElement element = type.element;
     Scope outerScope = nameScope;
@@ -6595,11 +6600,10 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   @override
-  Object visitGenericTypeAlias(GenericTypeAlias node) {
+  void visitGenericTypeAlias(GenericTypeAlias node) {
     GenericTypeAliasElement element = node.declaredElement;
     Scope outerScope = nameScope;
     try {
@@ -6622,34 +6626,29 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
-  Object visitGenericTypeAliasInFunctionScope(GenericTypeAlias node) {
-    return null;
-  }
+  void visitGenericTypeAliasInFunctionScope(GenericTypeAlias node) {}
 
   @override
-  Object visitIfStatement(IfStatement node) {
+  void visitIfStatement(IfStatement node) {
     node.condition?.accept(this);
     visitStatementInScope(node.thenStatement);
     visitStatementInScope(node.elseStatement);
-    return null;
   }
 
   @override
-  Object visitLabeledStatement(LabeledStatement node) {
+  void visitLabeledStatement(LabeledStatement node) {
     LabelScope outerScope = _addScopesFor(node.labels, node.unlabeled);
     try {
       super.visitLabeledStatement(node);
     } finally {
       labelScope = outerScope;
     }
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     Scope outerScope = nameScope;
     try {
       ExecutableElement methodElement = node.declaredElement;
@@ -6664,7 +6663,6 @@
     } finally {
       nameScope = outerScope;
     }
-    return null;
   }
 
   void visitMethodDeclarationInScope(MethodDeclaration node) {
@@ -6672,7 +6670,7 @@
   }
 
   @override
-  Object visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     ClassElement element = node.declaredElement;
 
     Scope outerScope = nameScope;
@@ -6689,7 +6687,6 @@
       nameScope = outerScope;
       enclosingClass = outerClass;
     }
-    return null;
   }
 
   void visitMixinDeclarationInScope(MixinDeclaration node) {
@@ -6727,7 +6724,7 @@
   }
 
   @override
-  Object visitSwitchCase(SwitchCase node) {
+  void visitSwitchCase(SwitchCase node) {
     node.expression.accept(this);
     Scope outerNameScope = nameScope;
     try {
@@ -6736,11 +6733,10 @@
     } finally {
       nameScope = outerNameScope;
     }
-    return null;
   }
 
   @override
-  Object visitSwitchDefault(SwitchDefault node) {
+  void visitSwitchDefault(SwitchDefault node) {
     Scope outerNameScope = nameScope;
     try {
       nameScope = new EnclosedScope(nameScope);
@@ -6748,11 +6744,10 @@
     } finally {
       nameScope = outerNameScope;
     }
-    return null;
   }
 
   @override
-  Object visitSwitchStatement(SwitchStatement node) {
+  void visitSwitchStatement(SwitchStatement node) {
     LabelScope outerScope = labelScope;
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
@@ -6770,7 +6765,6 @@
       labelScope = outerScope;
       _implicitLabelScope = outerImplicitScope;
     }
-    return null;
   }
 
   void visitSwitchStatementInScope(SwitchStatement node) {
@@ -6778,7 +6772,7 @@
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     if (node.parent.parent is! TopLevelVariableDeclaration &&
         node.parent.parent is! FieldDeclaration) {
@@ -6787,11 +6781,10 @@
         nameScope.define(element);
       }
     }
-    return null;
   }
 
   @override
-  Object visitWhileStatement(WhileStatement node) {
+  void visitWhileStatement(WhileStatement node) {
     node.condition?.accept(this);
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
     try {
@@ -6800,7 +6793,6 @@
     } finally {
       _implicitLabelScope = outerImplicitScope;
     }
-    return null;
   }
 
   /// Add scopes for each of the given labels.
@@ -7356,7 +7348,7 @@
         enclosingConstructor is ConstructorDeclaration &&
         enclosingConstructor.redirectedConstructor == constructorName &&
         type is InterfaceType &&
-        ts is StrongTypeSystemImpl) {
+        ts is Dart2TypeSystem) {
       ClassOrMixinDeclaration enclosingClassNode = enclosingConstructor.parent;
       ClassElement enclosingClassElement = enclosingClassNode.declaredElement;
       if (enclosingClassElement == type.element) {
@@ -7889,6 +7881,9 @@
   /// Return the type representing the built-in type 'List'.
   InterfaceType get listType;
 
+  /// Return the type representing 'Map<Null, Null>'.
+  InterfaceType get mapNullNullType;
+
   /// Return the type representing the built-in type 'Map'.
   InterfaceType get mapType;
 
@@ -7908,6 +7903,12 @@
   /// Return the type representing the built-in type 'Object'.
   InterfaceType get objectType;
 
+  /// Return the type representing 'Set<Null>'.
+  InterfaceType get setNullType;
+
+  /// Return the type representing the built-in type 'Set'.
+  InterfaceType get setType;
+
   /// Return the type representing the built-in type 'StackTrace'.
   InterfaceType get stackTraceType;
 
@@ -8025,9 +8026,18 @@
   /// The type representing the built-in type 'Map'.
   InterfaceType _mapType;
 
+  /// The type representing the built-in type 'Map<Null, Null>'.
+  InterfaceType _mapNullNullType;
+
   /// An shared object representing the value 'null'.
   DartObjectImpl _nullObject;
 
+  /// The type representing the type 'Set'.
+  InterfaceType _setType;
+
+  /// The type representing the type 'Set<Null>'.
+  InterfaceType _setNullType;
+
   /// The type representing the type 'Null'.
   InterfaceType _nullType;
 
@@ -8121,6 +8131,9 @@
   InterfaceType get listType => _listType;
 
   @override
+  InterfaceType get mapNullNullType => _mapNullNullType;
+
+  @override
   InterfaceType get mapType => _mapType;
 
   @override
@@ -8141,6 +8154,12 @@
   InterfaceType get objectType => _objectType;
 
   @override
+  InterfaceType get setNullType => _setNullType;
+
+  @override
+  InterfaceType get setType => _setType;
+
+  @override
   InterfaceType get stackTraceType => _stackTraceType;
 
   @override
@@ -8195,6 +8214,7 @@
     _nullType = _getType(coreNamespace, "Null");
     _numType = _getType(coreNamespace, "num");
     _objectType = _getType(coreNamespace, "Object");
+    _setType = _getType(coreNamespace, "Set");
     _stackTraceType = _getType(coreNamespace, "StackTrace");
     _streamType = _getType(asyncNamespace, "Stream");
     _stringType = _getType(coreNamespace, "String");
@@ -8204,6 +8224,8 @@
     _futureDynamicType = _futureType.instantiate(<DartType>[_dynamicType]);
     _futureNullType = _futureType.instantiate(<DartType>[_nullType]);
     _iterableDynamicType = _iterableType.instantiate(<DartType>[_dynamicType]);
+    _mapNullNullType = _mapType.instantiate(<DartType>[_nullType, _nullType]);
+    _setNullType = _setType.instantiate(<DartType>[_nullType]);
     _streamDynamicType = _streamType.instantiate(<DartType>[_dynamicType]);
     // FutureOr<T> is still fairly new, so if we're analyzing an SDK that
     // doesn't have it yet, create an element for it.
@@ -8311,7 +8333,7 @@
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     //
     // Visit annotations, if the annotation is @proxy, on a class, and "proxy"
     // resolves to the proxy annotation in dart.core, then resolve the
@@ -8336,11 +8358,10 @@
         elementAnnotation.element = element;
       }
     }
-    return null;
   }
 
   @override
-  Object visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     super.visitCatchClause(node);
     SimpleIdentifier exception = node.exceptionParameter;
     if (exception != null) {
@@ -8372,11 +8393,10 @@
         // TODO(brianwilkerson) Report the internal error
       }
     }
-    return null;
   }
 
   @override
-  Object visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     _hasReferenceToSuper = false;
     super.visitClassDeclaration(node);
     ClassElementImpl classElement = _getClassElement(node.name);
@@ -8385,7 +8405,6 @@
       classElement.hasBeenInferred = false;
       classElement.hasReferenceToSuper = _hasReferenceToSuper;
     }
-    return null;
   }
 
   @override
@@ -8414,7 +8433,6 @@
     }
     _resolveWithClause(classElement, withClause);
     _resolveImplementsClause(classElement, implementsClause);
-    return null;
   }
 
   @override
@@ -8443,7 +8461,7 @@
   }
 
   @override
-  Object visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     super.visitClassTypeAlias(node);
     ErrorCode errorCode = CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS;
     InterfaceType superclassType =
@@ -8457,15 +8475,14 @@
     }
     _resolveWithClause(classElement, node.withClause);
     _resolveImplementsClause(classElement, node.implementsClause);
-    return null;
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     super.visitConstructorDeclaration(node);
     if (node.declaredElement == null) {
       ClassDeclaration classNode =
-          node.getAncestor((node) => node is ClassDeclaration);
+          node.thisOrAncestorOfType<ClassDeclaration>();
       StringBuffer buffer = new StringBuffer();
       buffer.write("The element for the constructor ");
       buffer.write(node.name == null ? "<unnamed>" : node.name.name);
@@ -8481,11 +8498,10 @@
       AnalysisEngine.instance.logger.logError(buffer.toString(),
           new CaughtException(new AnalysisException(), null));
     }
-    return null;
   }
 
   @override
-  Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     super.visitDeclaredIdentifier(node);
     DartType declaredType;
     TypeAnnotation typeName = node.type;
@@ -8497,11 +8513,10 @@
     LocalVariableElementImpl element =
         node.declaredElement as LocalVariableElementImpl;
     element.declaredType = declaredType;
-    return null;
   }
 
   @override
-  Object visitFieldFormalParameter(FieldFormalParameter node) {
+  void visitFieldFormalParameter(FieldFormalParameter node) {
     super.visitFieldFormalParameter(node);
     Element element = node.identifier.staticElement;
     if (element is ParameterElementImpl) {
@@ -8526,11 +8541,10 @@
     } else {
       // TODO(brianwilkerson) Report this internal error
     }
-    return null;
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     super.visitFunctionDeclaration(node);
     ExecutableElementImpl element =
         node.declaredElement as ExecutableElementImpl;
@@ -8547,19 +8561,17 @@
     element.declaredReturnType = _computeReturnType(node.returnType);
     element.type = new FunctionTypeImpl(element);
     _inferSetterReturnType(element);
-    return null;
   }
 
   @override
-  Object visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     var element = node.declaredElement as GenericTypeAliasElementImpl;
     super.visitFunctionTypeAlias(node);
     element.function.returnType = _computeReturnType(node.returnType);
-    return null;
   }
 
   @override
-  Object visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
     super.visitFunctionTypedFormalParameter(node);
     Element element = node.identifier.staticElement;
     if (element is ParameterElementImpl) {
@@ -8567,28 +8579,26 @@
     } else {
       // TODO(brianwilkerson) Report this internal error
     }
-    return null;
   }
 
   @override
-  Object visitGenericFunctionType(GenericFunctionType node) {
+  void visitGenericFunctionType(GenericFunctionType node) {
     GenericFunctionTypeElementImpl element = node.type?.element;
     if (element != null) {
       super.visitGenericFunctionType(node);
       element.returnType =
           _computeReturnType(node.returnType) ?? DynamicTypeImpl.instance;
     }
-    return null;
   }
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     super.visitMethodDeclaration(node);
     ExecutableElementImpl element =
         node.declaredElement as ExecutableElementImpl;
     if (element == null) {
       ClassDeclaration classNode =
-          node.getAncestor((node) => node is ClassDeclaration);
+          node.thisOrAncestorOfType<ClassDeclaration>();
       StringBuffer buffer = new StringBuffer();
       buffer.write("The element for the method ");
       buffer.write(node.name.name);
@@ -8609,7 +8619,7 @@
     // already set - statically or inferred. We don't want to overwrite them.
     if (LibraryElementImpl.hasResolutionCapability(
         definingLibrary, LibraryResolutionCapability.resolvedTypeNames)) {
-      return null;
+      return;
     }
 
     element.declaredReturnType = _computeReturnType(node.returnType);
@@ -8630,8 +8640,6 @@
         variable.declaredType = type;
       }
     }
-
-    return null;
   }
 
   @override
@@ -8640,25 +8648,24 @@
     MixinElementImpl element = node.declaredElement;
     _resolveOnClause(element, node.onClause);
     _resolveImplementsClause(element, node.implementsClause);
-    return null;
   }
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     // In API mode we need to skip:
     //   - function bodies;
     //   - default values of parameters;
     //   - initializers of top-level variables.
     if (mode == TypeResolverMode.api) {
       if (node is FunctionBody) {
-        return null;
+        return;
       }
       if (node is DefaultFormalParameter) {
         node.parameter.accept(this);
-        return null;
+        return;
       }
       if (node is VariableDeclaration) {
-        return null;
+        return;
       }
     }
 
@@ -8672,7 +8679,8 @@
     if (mode == TypeResolverMode.local) {
       // We are in the state of visiting all nodes.
       if (_localModeVisitAll) {
-        return super.visitNode(node);
+        super.visitNode(node);
+        return;
       }
 
       // Ensure that the name scope is ready.
@@ -8740,15 +8748,14 @@
       } else if (node is VariableDeclarationList) {
         node.variables.forEach(visitNode);
       }
-      return null;
+      return;
     }
-
     // The mode in which we visit all nodes.
-    return super.visitNode(node);
+    super.visitNode(node);
   }
 
   @override
-  Object visitSimpleFormalParameter(SimpleFormalParameter node) {
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
     super.visitSimpleFormalParameter(node);
     DartType declaredType;
     TypeAnnotation typeName = node.type;
@@ -8763,25 +8770,23 @@
     } else {
       // TODO(brianwilkerson) Report the internal error.
     }
-    return null;
   }
 
   @override
-  Object visitSuperExpression(SuperExpression node) {
+  void visitSuperExpression(SuperExpression node) {
     _hasReferenceToSuper = true;
-    return super.visitSuperExpression(node);
+    super.visitSuperExpression(node);
   }
 
   @override
-  Object visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     super.visitTypeName(node);
     _typeNameResolver.nameScope = this.nameScope;
     _typeNameResolver.resolveTypeName(node);
-    return null;
   }
 
   @override
-  Object visitTypeParameter(TypeParameter node) {
+  void visitTypeParameter(TypeParameter node) {
     super.visitTypeParameter(node);
     AstNode parent2 = node.parent?.parent;
     if (parent2 is ClassDeclaration ||
@@ -8800,11 +8805,10 @@
         }
       }
     }
-    return null;
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     var variableList = node.parent as VariableDeclarationList;
     // When the library is resynthesized, the types of field elements are
@@ -8812,7 +8816,7 @@
     if (variableList.parent is FieldDeclaration &&
         LibraryElementImpl.hasResolutionCapability(
             definingLibrary, LibraryResolutionCapability.resolvedTypeNames)) {
-      return null;
+      return;
     }
     // Resolve the type.
     DartType declaredType;
@@ -8826,7 +8830,6 @@
     if (element is VariableElementImpl) {
       element.declaredType = declaredType;
     }
-    return null;
   }
 
   /// Given the [returnType] of a function, compute the return type of the
@@ -9264,20 +9267,20 @@
             nameScope: nameScope);
 
   @override
-  Object visitBlockFunctionBody(BlockFunctionBody node) {
+  void visitBlockFunctionBody(BlockFunctionBody node) {
     assert(_localVariableInfo != null);
-    return super.visitBlockFunctionBody(node);
+    super.visitBlockFunctionBody(node);
   }
 
   @override
-  Object visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     LocalVariableInfo outerLocalVariableInfo = _localVariableInfo;
     try {
       _localVariableInfo ??= new LocalVariableInfo();
       (node.body as FunctionBodyImpl).localVariableInfo = _localVariableInfo;
       _enclosingFunction = node.declaredElement;
-      return super.visitConstructorDeclaration(node);
+      super.visitConstructorDeclaration(node);
     } finally {
       _localVariableInfo = outerLocalVariableInfo;
       _enclosingFunction = outerFunction;
@@ -9285,16 +9288,16 @@
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) => null;
+  void visitExportDirective(ExportDirective node) {}
 
   @override
-  Object visitExpressionFunctionBody(ExpressionFunctionBody node) {
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
     assert(_localVariableInfo != null);
-    return super.visitExpressionFunctionBody(node);
+    super.visitExpressionFunctionBody(node);
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     LocalVariableInfo outerLocalVariableInfo = _localVariableInfo;
     try {
@@ -9302,7 +9305,7 @@
       (node.functionExpression.body as FunctionBodyImpl).localVariableInfo =
           _localVariableInfo;
       _enclosingFunction = node.declaredElement;
-      return super.visitFunctionDeclaration(node);
+      super.visitFunctionDeclaration(node);
     } finally {
       _localVariableInfo = outerLocalVariableInfo;
       _enclosingFunction = outerFunction;
@@ -9310,7 +9313,7 @@
   }
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is! FunctionDeclaration) {
       ExecutableElement outerFunction = _enclosingFunction;
       LocalVariableInfo outerLocalVariableInfo = _localVariableInfo;
@@ -9318,28 +9321,28 @@
         _localVariableInfo ??= new LocalVariableInfo();
         (node.body as FunctionBodyImpl).localVariableInfo = _localVariableInfo;
         _enclosingFunction = node.declaredElement;
-        return super.visitFunctionExpression(node);
+        super.visitFunctionExpression(node);
       } finally {
         _localVariableInfo = outerLocalVariableInfo;
         _enclosingFunction = outerFunction;
       }
     } else {
-      return super.visitFunctionExpression(node);
+      super.visitFunctionExpression(node);
     }
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) => null;
+  void visitImportDirective(ImportDirective node) {}
 
   @override
-  Object visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     LocalVariableInfo outerLocalVariableInfo = _localVariableInfo;
     try {
       _localVariableInfo ??= new LocalVariableInfo();
       (node.body as FunctionBodyImpl).localVariableInfo = _localVariableInfo;
       _enclosingFunction = node.declaredElement;
-      return super.visitMethodDeclaration(node);
+      super.visitMethodDeclaration(node);
     } finally {
       _localVariableInfo = outerLocalVariableInfo;
       _enclosingFunction = outerFunction;
@@ -9347,43 +9350,43 @@
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     // Ignore if already resolved - declaration or type.
     if (node.inDeclarationContext()) {
-      return null;
+      return;
     }
     // Ignore if it cannot be a reference to a local variable.
     AstNode parent = node.parent;
     if (parent is FieldFormalParameter) {
-      return null;
+      return;
     } else if (parent is ConstructorDeclaration && parent.returnType == node) {
-      return null;
+      return;
     } else if (parent is ConstructorFieldInitializer &&
         parent.fieldName == node) {
-      return null;
+      return;
     }
     // Ignore if qualified.
     if (parent is PrefixedIdentifier && identical(parent.identifier, node)) {
-      return null;
+      return;
     }
     if (parent is PropertyAccess && identical(parent.propertyName, node)) {
-      return null;
+      return;
     }
     if (parent is MethodInvocation &&
         identical(parent.methodName, node) &&
         parent.realTarget != null) {
-      return null;
+      return;
     }
     if (parent is ConstructorName) {
-      return null;
+      return;
     }
     if (parent is Label) {
-      return null;
+      return;
     }
     // Prepare VariableElement.
     Element element = nameScope.lookup(node, definingLibrary);
     if (element is! VariableElement) {
-      return null;
+      return;
     }
     // Must be local or parameter.
     ElementKind kind = element.kind;
@@ -9396,13 +9399,10 @@
         }
       }
     }
-    return null;
   }
 
   @override
-  Object visitTypeName(TypeName node) {
-    return null;
-  }
+  void visitTypeName(TypeName node) {}
 }
 
 class _InvalidAccessVerifier {
@@ -9614,7 +9614,7 @@
 }
 
 class _ResolverVisitor_isVariableAccessedInClosure
-    extends RecursiveAstVisitor<Object> {
+    extends RecursiveAstVisitor<void> {
   final Element variable;
 
   bool result = false;
@@ -9624,30 +9624,29 @@
   _ResolverVisitor_isVariableAccessedInClosure(this.variable);
 
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     bool inClosure = this._inClosure;
     try {
       this._inClosure = true;
-      return super.visitFunctionExpression(node);
+      super.visitFunctionExpression(node);
     } finally {
       this._inClosure = inClosure;
     }
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (result) {
-      return null;
+      return;
     }
     if (_inClosure && identical(node.staticElement, variable)) {
       result = true;
     }
-    return null;
   }
 }
 
 class _ResolverVisitor_isVariablePotentiallyMutatedIn
-    extends RecursiveAstVisitor<Object> {
+    extends RecursiveAstVisitor<void> {
   final Element variable;
 
   bool result = false;
@@ -9655,15 +9654,14 @@
   _ResolverVisitor_isVariablePotentiallyMutatedIn(this.variable);
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (result) {
-      return null;
+      return;
     }
     if (identical(node.staticElement, variable)) {
       if (node.inSetterContext()) {
         result = true;
       }
     }
-    return null;
   }
 }
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index d024db1..c7ae2db 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -265,7 +265,7 @@
   }
 }
 
-class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> {
+class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<void> {
   /**
    * The prefix added to the name of a library to form the URI used in code to
    * reference the library.
@@ -351,7 +351,7 @@
   }
 
   @override
-  Object visitMapLiteralEntry(MapLiteralEntry node) {
+  void visitMapLiteralEntry(MapLiteralEntry node) {
     String libraryName = null;
     Expression key = node.key;
     if (key is SimpleStringLiteral) {
@@ -392,7 +392,6 @@
       }
       _librariesMap.setLibrary(libraryName, library);
     }
-    return null;
   }
 }
 
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 5c8b4c3..9b1d4e7 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -17,6 +17,11 @@
 export 'package:analyzer/source/line_info.dart' show LineInfo;
 export 'package:analyzer/source/source_range.dart';
 
+/**
+ * A function that is used to visit [ContentCache] entries.
+ */
+typedef void ContentCacheVisitor(String fullPath, int stamp, String contents);
+
 /// Base class providing implementations for the methods in [Source] that don't
 /// require filesystem access.
 abstract class BasicSource extends Source {
@@ -44,11 +49,6 @@
 }
 
 /**
- * A function that is used to visit [ContentCache] entries.
- */
-typedef void ContentCacheVisitor(String fullPath, int stamp, String contents);
-
-/**
  * A cache used to override the default content of a [Source].
  */
 class ContentCache {
@@ -565,6 +565,12 @@
   Map<String, List<Folder>> get packageMap;
 
   /**
+   * Clear any cached URI resolution information in the [SourceFactory] itself,
+   * and also ask each [UriResolver]s to clear its caches.
+   */
+  void clearCache();
+
+  /**
    * Return a source factory that will resolve URI's in the same way that this
    * source factory does.
    */
@@ -778,6 +784,11 @@
  */
 abstract class UriResolver {
   /**
+   * Clear any cached URI resolution information.
+   */
+  void clearCache() {}
+
+  /**
    * Resolve the given absolute URI. Return a [Source] representing the file to which
    * it was resolved, whether or not the resulting source exists, or `null` if it could not be
    * resolved because the URI is invalid.
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index dfc94e4..89dbcb5 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -11,6 +11,8 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/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;
 import 'package:analyzer/src/dart/element/type.dart';
@@ -28,7 +30,7 @@
  * * Every node representing an expression should be resolved to the Type of the expression.
  * </ol>
  */
-class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
+class StaticTypeAnalyzer extends SimpleAstVisitor<void> {
   /**
    * The resolver driving the resolution and type analysis.
    */
@@ -94,7 +96,7 @@
       FormalParameterList node, DartType functionType) {
     bool inferred = false;
     if (node != null && functionType is FunctionType) {
-      var ts = _typeSystem as StrongTypeSystemImpl;
+      var ts = _typeSystem as Dart2TypeSystem;
       void inferType(ParameterElementImpl p, DartType inferredType) {
         // Check that there is no declared type, and that we have not already
         // inferred a type in some fashion.
@@ -139,7 +141,7 @@
   DartType inferListType(ListLiteral node, {bool downwards: false}) {
     DartType contextType = InferenceContext.getContext(node);
 
-    var ts = _typeSystem as StrongTypeSystemImpl;
+    var ts = _typeSystem as Dart2TypeSystem;
     List<DartType> elementTypes;
     List<ParameterElement> parameters;
 
@@ -171,6 +173,22 @@
 
   ParameterizedType inferMapType(MapLiteral node, {bool downwards: false}) {
     DartType contextType = InferenceContext.getContext(node);
+    if (contextType != null &&
+        node.typeArguments == null &&
+        node.entries.isEmpty &&
+        _typeSystem.isAssignableTo(_typeProvider.setNullType, contextType) &&
+        !_typeSystem.isAssignableTo(
+            _typeProvider.mapNullNullType, contextType)) {
+      // The node is really an empty set literal with no type arguments. Rewrite
+      // the AST and infer the type of the set as appropriate.
+      SetLiteral setLiteral = new AstFactoryImpl().setLiteral(
+          node.constKeyword, null, node.leftBracket, null, node.rightBracket);
+      InferenceContext.setType(setLiteral, contextType);
+      NodeReplacer.replace(node, setLiteral);
+      DartType type = inferSetType(setLiteral, downwards: downwards);
+      setLiteral.staticType = type;
+      return type;
+    }
     List<DartType> elementTypes;
     List<ParameterElement> parameters;
     if (downwards) {
@@ -197,7 +215,7 @@
     }
 
     // Use both downwards and upwards information to infer the type.
-    var ts = _typeSystem as StrongTypeSystemImpl;
+    var ts = _typeSystem as Dart2TypeSystem;
     ParameterizedType inferred = ts.inferGenericFunctionOrType(
         _typeProvider.mapType, parameters, elementTypes, contextType,
         downwards: downwards,
@@ -206,14 +224,46 @@
     return inferred;
   }
 
+  DartType inferSetType(SetLiteral node, {bool downwards: false}) {
+    DartType contextType = InferenceContext.getContext(node);
+
+    var ts = _typeSystem as Dart2TypeSystem;
+    List<DartType> elementTypes;
+    List<ParameterElement> parameters;
+
+    if (downwards) {
+      if (contextType == null) {
+        return null;
+      }
+
+      elementTypes = [];
+      parameters = [];
+    } else {
+      // Also use upwards information to infer the type.
+      elementTypes = node.elements
+          .map((e) => e.staticType)
+          .where((t) => t != null)
+          .toList();
+      var setTypeParam = _typeProvider.setType.typeParameters[0].type;
+      var syntheticParamElement = new ParameterElementImpl.synthetic(
+          'element', setTypeParam, ParameterKind.POSITIONAL);
+      parameters = new List.filled(elementTypes.length, syntheticParamElement);
+    }
+    DartType inferred = ts.inferGenericFunctionOrType<InterfaceType>(
+        _typeProvider.setType, parameters, elementTypes, contextType,
+        downwards: downwards,
+        errorReporter: _resolver.errorReporter,
+        errorNode: node);
+    return inferred;
+  }
+
   /**
    * The Dart Language Specification, 12.5: <blockquote>The static type of a string literal is
    * `String`.</blockquote>
    */
   @override
-  Object visitAdjacentStrings(AdjacentStrings node) {
+  void visitAdjacentStrings(AdjacentStrings node) {
     _recordStaticType(node, _typeProvider.stringType);
-    return null;
   }
 
   /**
@@ -225,9 +275,8 @@
    * The static type of a cast expression <i>e as T</i> is <i>T</i>.</blockquote>
    */
   @override
-  Object visitAsExpression(AsExpression node) {
+  void visitAsExpression(AsExpression node) {
     _recordStaticType(node, _getType(node.type));
-    return null;
   }
 
   /**
@@ -270,7 +319,7 @@
    * <i>e<sub>3</sub></i>.</blockquote>
    */
   @override
-  Object visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     TokenType operator = node.operator.type;
     if (operator == TokenType.EQ) {
       Expression rightHandSide = node.rightHandSide;
@@ -281,7 +330,7 @@
       // bound of the static types of the LHS and RHS.
       _analyzeLeastUpperBound(node, node.leftHandSide, node.rightHandSide,
           read: true);
-      return null;
+      return;
     } else if (operator == TokenType.AMPERSAND_AMPERSAND_EQ ||
         operator == TokenType.BAR_BAR_EQ) {
       _recordStaticType(node, _typeProvider.boolType);
@@ -295,7 +344,6 @@
           staticType);
       _recordStaticType(node, staticType);
     }
-    return null;
   }
 
   /**
@@ -305,7 +353,7 @@
    *   the static type of e.
    */
   @override
-  Object visitAwaitExpression(AwaitExpression node) {
+  void visitAwaitExpression(AwaitExpression node) {
     // Await the Future. This results in whatever type is (ultimately) returned.
     DartType awaitType(DartType awaitedType) {
       if (awaitedType == null) {
@@ -314,11 +362,10 @@
       if (awaitedType.isDartAsyncFutureOr) {
         return awaitType((awaitedType as InterfaceType).typeArguments[0]);
       }
-      return awaitedType.flattenFutures(_typeSystem);
+      return _typeSystem.flatten(awaitedType);
     }
 
     _recordStaticType(node, awaitType(_getStaticType(node.expression)));
-    return null;
   }
 
   /**
@@ -359,14 +406,14 @@
    * <i>super.op(e<sub>2</sub>)</i>.</blockquote>
    */
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     if (node.operator.type == TokenType.QUESTION_QUESTION) {
       // Evaluation of an if-null expression e of the form e1 ?? e2 is
       // equivalent to the evaluation of the expression
       // ((x) => x == null ? e2 : x)(e1).  The static type of e is the least
       // upper bound of the static type of e1 and the static type of e2.
       _analyzeLeastUpperBound(node, node.leftOperand, node.rightOperand);
-      return null;
+      return;
     }
     DartType staticType = node.staticInvokeType?.returnType ?? _dynamicType;
     staticType = _typeSystem.refineBinaryExpressionType(
@@ -375,7 +422,6 @@
         node.rightOperand.staticType,
         staticType);
     _recordStaticType(node, staticType);
-    return null;
   }
 
   /**
@@ -383,9 +429,8 @@
    * bool.</blockquote>
    */
   @override
-  Object visitBooleanLiteral(BooleanLiteral node) {
+  void visitBooleanLiteral(BooleanLiteral node) {
     _recordStaticType(node, _typeProvider.boolType);
-    return null;
   }
 
   /**
@@ -394,9 +439,8 @@
    * t;}(e)</i>.</blockquote>
    */
   @override
-  Object visitCascadeExpression(CascadeExpression node) {
+  void visitCascadeExpression(CascadeExpression node) {
     _recordStaticType(node, _getStaticType(node.target));
-    return null;
   }
 
   /**
@@ -409,16 +453,14 @@
    * and the static type of <i>e<sub>3</sub></i>.</blockquote>
    */
   @override
-  Object visitConditionalExpression(ConditionalExpression node) {
+  void visitConditionalExpression(ConditionalExpression node) {
     _analyzeLeastUpperBound(node, node.thenExpression, node.elseExpression);
-    return null;
   }
 
   @override
-  Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     super.visitDeclaredIdentifier(node);
     _inferForEachLoopVariableType(node);
-    return null;
   }
 
   /**
@@ -426,13 +468,12 @@
    * double.</blockquote>
    */
   @override
-  Object visitDoubleLiteral(DoubleLiteral node) {
+  void visitDoubleLiteral(DoubleLiteral node) {
     _recordStaticType(node, _typeProvider.doubleType);
-    return null;
   }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     FunctionExpression function = node.functionExpression;
     ExecutableElementImpl functionElement =
         node.declaredElement as ExecutableElementImpl;
@@ -441,13 +482,12 @@
       // we only need to handle local functions.
       if (node.returnType == null) {
         _inferLocalFunctionReturnType(node.functionExpression);
-        return null;
+        return;
       }
       functionElement.returnType =
           _computeStaticReturnTypeOfFunctionDeclaration(node);
     }
     _recordStaticType(function, functionElement.type);
-    return null;
   }
 
   /**
@@ -481,14 +521,13 @@
    * specified as dynamic.</blockquote>
    */
   @override
-  Object visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is FunctionDeclaration) {
       // The function type will be resolved and set when we visit the parent
       // node.
-      return null;
+      return;
     }
     _inferLocalFunctionReturnType(node);
-    return null;
   }
 
   /**
@@ -504,11 +543,10 @@
    * static type of <i>i</i> is the declared return type of <i>F</i>.</blockquote>
    */
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     _inferGenericInvocationExpression(node);
     DartType staticType = _computeInvokeReturnType(node.staticInvokeType);
     _recordStaticType(node, staticType);
-    return null;
   }
 
   /**
@@ -517,7 +555,7 @@
    * <i>[]</i> on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>.</blockquote>
    */
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     if (node.inSetterContext()) {
       ExecutableElement staticMethodElement = node.staticElement;
       DartType staticType = _computeArgumentType(staticMethodElement);
@@ -527,7 +565,6 @@
       DartType staticType = _computeStaticReturnType(staticMethodElement);
       _recordStaticType(node, staticType);
     }
-    return null;
   }
 
   /**
@@ -540,11 +577,9 @@
    * form <i>const T(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> is <i>T</i>. </blockquote>
    */
   @override
-  Object visitInstanceCreationExpression(InstanceCreationExpression node) {
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
     _inferInstanceCreationExpression(node);
-
     _recordStaticType(node, node.constructorName.type.type);
-    return null;
   }
 
   /**
@@ -565,7 +600,7 @@
    * </blockquote>
    */
   @override
-  Object visitIntegerLiteral(IntegerLiteral node) {
+  void visitIntegerLiteral(IntegerLiteral node) {
     // Check the parent context for negated integer literals.
     var context = InferenceContext.getContext(
         (node as IntegerLiteralImpl).immediatelyNegated ? node.parent : node);
@@ -576,7 +611,6 @@
     } else {
       _recordStaticType(node, _typeProvider.doubleType);
     }
-    return null;
   }
 
   /**
@@ -586,9 +620,8 @@
    * The static type of an is-expression is `bool`.</blockquote>
    */
   @override
-  Object visitIsExpression(IsExpression node) {
+  void visitIsExpression(IsExpression node) {
     _recordStaticType(node, _typeProvider.boolType);
-    return null;
   }
 
   /**
@@ -600,7 +633,7 @@
    * .</blockquote>
    */
   @override
-  Object visitListLiteral(ListLiteral node) {
+  void visitListLiteral(ListLiteral node) {
     TypeArgumentList typeArguments = node.typeArguments;
 
     // If we have explicit arguments, use them
@@ -615,7 +648,7 @@
       }
       _recordStaticType(
           node, _typeProvider.listType.instantiate(<DartType>[staticType]));
-      return null;
+      return;
     }
 
     DartType listDynamicType =
@@ -631,12 +664,11 @@
       // everything was successful?
       _resolver.inferenceContext.recordInference(node, inferred);
       _recordStaticType(node, inferred);
-      return null;
+      return;
     }
 
     // If we have no type arguments and couldn't infer any, use dynamic.
     _recordStaticType(node, listDynamicType);
-    return null;
   }
 
   /**
@@ -652,12 +684,9 @@
    * <i>String</i>.</blockquote>
    */
   @override
-  Object visitMapLiteral(MapLiteral node) {
+  void visitMapLiteral(MapLiteral node) {
     TypeArgumentList typeArguments = node.typeArguments;
 
-    DartType mapDynamicType = _typeProvider.mapType
-        .instantiate(<DartType>[_dynamicType, _dynamicType]);
-
     // If we have type arguments, use them
     if (typeArguments != null) {
       DartType staticKeyType = _dynamicType;
@@ -677,9 +706,12 @@
           node,
           _typeProvider.mapType
               .instantiate(<DartType>[staticKeyType, staticValueType]));
-      return null;
+      return;
     }
 
+    DartType mapDynamicType = _typeProvider.mapType
+        .instantiate(<DartType>[_dynamicType, _dynamicType]);
+
     // If we have no explicit type arguments, try to infer type arguments.
     ParameterizedType inferred = inferMapType(node);
 
@@ -690,12 +722,11 @@
       // everything was successful?
       _resolver.inferenceContext.recordInference(node, inferred);
       _recordStaticType(node, inferred);
-      return null;
+      return;
     }
 
     // If no type arguments and no inference, use dynamic
     _recordStaticType(node, mapDynamicType);
-    return null;
   }
 
   /**
@@ -735,7 +766,7 @@
    * <i>F</i>.</blockquote>
    */
   @override
-  Object visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     _inferGenericInvocationExpression(node);
     // Record static return type of the static element.
     bool inferredStaticType = _inferMethodInvocationObject(node) ||
@@ -746,14 +777,12 @@
           _computeInvokeReturnType(node.staticInvokeType);
       _recordStaticType(node, staticStaticType);
     }
-    return null;
   }
 
   @override
-  Object visitNamedExpression(NamedExpression node) {
+  void visitNamedExpression(NamedExpression node) {
     Expression expression = node.expression;
     _recordStaticType(node, _getStaticType(expression));
-    return null;
   }
 
   /**
@@ -761,16 +790,14 @@
    * </blockquote>
    */
   @override
-  Object visitNullLiteral(NullLiteral node) {
+  void visitNullLiteral(NullLiteral node) {
     _recordStaticType(node, _typeProvider.nullType);
-    return null;
   }
 
   @override
-  Object visitParenthesizedExpression(ParenthesizedExpression node) {
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
     Expression expression = node.expression;
     _recordStaticType(node, _getStaticType(expression));
-    return null;
   }
 
   /**
@@ -800,7 +827,7 @@
    * = r - 1; return r}(e1, e2)</i></blockquote>
    */
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     Expression operand = node.operand;
     DartType staticType = _getStaticType(operand, read: true);
     TokenType operator = node.operator.type;
@@ -811,14 +838,13 @@
       }
     }
     _recordStaticType(node, staticType);
-    return null;
   }
 
   /**
    * See [visitSimpleIdentifier].
    */
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     SimpleIdentifier prefixedIdentifier = node.identifier;
     Element staticElement = prefixedIdentifier.staticElement;
     DartType staticType = _dynamicType;
@@ -850,7 +876,6 @@
       _recordStaticType(prefixedIdentifier, staticType);
       _recordStaticType(node, staticType);
     }
-    return null;
   }
 
   /**
@@ -859,7 +884,7 @@
    * form <i>op super</i> is equivalent to the method invocation <i>super.op()<i>.</blockquote>
    */
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     TokenType operator = node.operator.type;
     if (operator == TokenType.BANG) {
       _recordStaticType(node, _typeProvider.boolType);
@@ -876,7 +901,6 @@
       }
       _recordStaticType(node, staticType);
     }
-    return null;
   }
 
   /**
@@ -921,7 +945,7 @@
    * The static type of <i>i</i> is the declared return type of <i>m</i>.</blockquote>
    */
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     SimpleIdentifier propertyName = node.propertyName;
     Element staticElement = propertyName.staticElement;
     DartType staticType = _dynamicType;
@@ -937,7 +961,6 @@
       _recordStaticType(propertyName, staticType);
       _recordStaticType(node, staticType);
     }
-    return null;
   }
 
   /**
@@ -945,9 +968,47 @@
    * bottom.</blockquote>
    */
   @override
-  Object visitRethrowExpression(RethrowExpression node) {
+  void visitRethrowExpression(RethrowExpression node) {
     _recordStaticType(node, _typeProvider.bottomType);
-    return null;
+  }
+
+  @override
+  void visitSetLiteral(SetLiteral node) {
+    TypeArgumentList typeArguments = node.typeArguments;
+
+    // If we have type arguments, use them
+    if (typeArguments != null) {
+      DartType elementType = _dynamicType;
+      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
+      if (arguments != null && arguments.length == 1) {
+        DartType type = _getType(arguments[0]);
+        if (type != null) {
+          elementType = type;
+        }
+      }
+      _recordStaticType(
+          node, _typeProvider.setType.instantiate(<DartType>[elementType]));
+      return;
+    }
+
+    DartType setDynamicType =
+        _typeProvider.setType.instantiate(<DartType>[_dynamicType]);
+
+    // If we have no explicit type arguments, try to infer type arguments.
+    ParameterizedType inferred = inferSetType(node);
+
+    if (inferred != setDynamicType) {
+      // TODO(jmesserly): this results in an "inferred" message even when we
+      // in fact had an error above, because it will still attempt to return
+      // a type. Perhaps we should record inference from TypeSystem if
+      // everything was successful?
+      _resolver.inferenceContext.recordInference(node, inferred);
+      _recordStaticType(node, inferred);
+      return;
+    }
+
+    // If no type arguments and no inference, use dynamic
+    _recordStaticType(node, setDynamicType);
   }
 
   /**
@@ -989,7 +1050,7 @@
    * </blockquote>
    */
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     Element element = node.staticElement;
     DartType staticType = _dynamicType;
     if (element is ClassElement) {
@@ -1019,7 +1080,7 @@
       var parent = node.parent;
       if (parent is PrefixedIdentifier && parent.prefix == node ||
           parent is MethodInvocation && parent.target == node) {
-        return null;
+        return;
       }
       staticType = _typeProvider.dynamicType;
     } else if (element is DynamicElementImpl) {
@@ -1029,7 +1090,6 @@
     }
     staticType = _inferGenericInstantiationFromContext(node, staticType);
     _recordStaticType(node, staticType);
-    return null;
   }
 
   /**
@@ -1037,9 +1097,8 @@
    * `String`.</blockquote>
    */
   @override
-  Object visitSimpleStringLiteral(SimpleStringLiteral node) {
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
     _recordStaticType(node, _typeProvider.stringType);
-    return null;
   }
 
   /**
@@ -1047,13 +1106,12 @@
    * `String`.</blockquote>
    */
   @override
-  Object visitStringInterpolation(StringInterpolation node) {
+  void visitStringInterpolation(StringInterpolation node) {
     _recordStaticType(node, _typeProvider.stringType);
-    return null;
   }
 
   @override
-  Object visitSuperExpression(SuperExpression node) {
+  void visitSuperExpression(SuperExpression node) {
     if (thisType == null) {
       // TODO(brianwilkerson) Report this error if it hasn't already been
       // reported.
@@ -1061,13 +1119,11 @@
     } else {
       _recordStaticType(node, thisType);
     }
-    return null;
   }
 
   @override
-  Object visitSymbolLiteral(SymbolLiteral node) {
+  void visitSymbolLiteral(SymbolLiteral node) {
     _recordStaticType(node, _typeProvider.symbolType);
-    return null;
   }
 
   /**
@@ -1075,7 +1131,7 @@
    * interface of the immediately enclosing class.</blockquote>
    */
   @override
-  Object visitThisExpression(ThisExpression node) {
+  void visitThisExpression(ThisExpression node) {
     if (thisType == null) {
       // TODO(brianwilkerson) Report this error if it hasn't already been
       // reported.
@@ -1083,7 +1139,6 @@
     } else {
       _recordStaticType(node, thisType);
     }
-    return null;
   }
 
   /**
@@ -1091,13 +1146,12 @@
    * bottom.</blockquote>
    */
   @override
-  Object visitThrowExpression(ThrowExpression node) {
+  void visitThrowExpression(ThrowExpression node) {
     _recordStaticType(node, _typeProvider.bottomType);
-    return null;
   }
 
   @override
-  Object visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     Expression initializer = node.initializer;
     _inferLocalVariableType(node, initializer);
     if (initializer != null) {
@@ -1108,7 +1162,6 @@
         _resolver.overrideVariable(element, rightType, true);
       }
     }
-    return null;
   }
 
   /**
@@ -1185,7 +1238,7 @@
         type = (type as InterfaceType).typeArguments[0];
       }
       return _typeProvider.futureType
-          .instantiate(<DartType>[type.flattenFutures(_typeSystem)]);
+          .instantiate(<DartType>[_typeSystem.flatten(type)]);
     } else {
       return type;
     }
@@ -1432,7 +1485,7 @@
     var context = InferenceContext.getContext(node);
     if (context is FunctionType &&
         type is FunctionType &&
-        ts is StrongTypeSystemImpl) {
+        ts is Dart2TypeSystem) {
       return ts.inferFunctionTypeInstantiation(context, type,
           errorReporter: _resolver.errorReporter, errorNode: node);
     }
@@ -1481,7 +1534,7 @@
     if (typeArguments == null &&
         fnType is FunctionType &&
         fnType.typeFormals.isNotEmpty &&
-        ts is StrongTypeSystemImpl) {
+        ts is Dart2TypeSystem) {
       // Get the parameters that correspond to the uninstantiated generic.
       List<ParameterElement> rawParameters =
           ResolverVisitor.resolveArgumentsToParameters(
diff --git a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
index 8dcf359..824767b 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
@@ -611,9 +611,12 @@
           parameters: formalParameterList(parameters));
 
   static GenericFunctionType genericFunctionType(TypeAnnotation returnType,
-          TypeParameterList typeParameters, FormalParameterList parameters) =>
+          TypeParameterList typeParameters, FormalParameterList parameters,
+          {bool question: false}) =>
       astFactory.genericFunctionType(returnType,
-          TokenFactory.tokenFromString("Function"), typeParameters, parameters);
+          TokenFactory.tokenFromString("Function"), typeParameters, parameters,
+          question:
+              question ? TokenFactory.tokenFromType(TokenType.QUESTION) : null);
 
   static GenericTypeAlias genericTypeAlias(String name,
           TypeParameterList typeParameters, GenericFunctionType functionType) =>
@@ -1066,6 +1069,15 @@
   static ScriptTag scriptTag(String scriptTag) =>
       astFactory.scriptTag(TokenFactory.tokenFromString(scriptTag));
 
+  static SetLiteral setLiteral(Keyword keyword, TypeArgumentList typeArguments,
+          List<Expression> elements) =>
+      astFactory.setLiteral(
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          typeArguments,
+          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
+          elements,
+          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
+
   static ShowCombinator showCombinator(List<SimpleIdentifier> identifiers) =>
       astFactory.showCombinator(
           TokenFactory.tokenFromString("show"), identifiers);
@@ -1255,8 +1267,11 @@
           [List<TypeAnnotation> arguments]) =>
       astFactory.typeName(name, typeArgumentList(arguments));
 
-  static TypeName typeName4(String name, [List<TypeAnnotation> arguments]) =>
-      astFactory.typeName(identifier3(name), typeArgumentList(arguments));
+  static TypeName typeName4(String name,
+          [List<TypeAnnotation> arguments, bool question = false]) =>
+      astFactory.typeName(identifier3(name), typeArgumentList(arguments),
+          question:
+              question ? TokenFactory.tokenFromType(TokenType.QUESTION) : null);
 
   static TypeParameter typeParameter(String name) =>
       astFactory.typeParameter(null, null, identifier3(name), null, null);
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index 27a7460..8dfa63d 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -416,8 +416,8 @@
       AnalysisContext context, String libraryName) {
     String fileName = "/$libraryName.dart";
     CompilationUnitElementImpl unit = compilationUnit(fileName);
-    LibraryElementImpl library =
-        new LibraryElementImpl(context, libraryName, 0, libraryName.length);
+    LibraryElementImpl library = new LibraryElementImpl(
+        context, null, libraryName, 0, libraryName.length);
     library.definingCompilationUnit = unit;
     return library;
   }
diff --git a/pkg/analyzer/lib/src/generated/testing/element_search.dart b/pkg/analyzer/lib/src/generated/testing/element_search.dart
index 818b56d..c6c7a8f 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_search.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_search.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -15,7 +15,7 @@
   return finder.elements;
 }
 
-class _ElementsByNameFinder extends RecursiveAstVisitor<Null> {
+class _ElementsByNameFinder extends RecursiveAstVisitor<void> {
   final String name;
   final List<Element> elements = [];
 
diff --git a/pkg/analyzer/lib/src/generated/testing/node_search.dart b/pkg/analyzer/lib/src/generated/testing/node_search.dart
index 39889ee..e1fe5f6 100644
--- a/pkg/analyzer/lib/src/generated/testing/node_search.dart
+++ b/pkg/analyzer/lib/src/generated/testing/node_search.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -15,7 +15,7 @@
   return finder.identifiers;
 }
 
-class _DeclaredIdentifiersByNameFinder extends RecursiveAstVisitor<Null> {
+class _DeclaredIdentifiersByNameFinder extends RecursiveAstVisitor<void> {
   final String name;
   final List<SimpleIdentifier> identifiers = [];
 
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
index 17afba9..1f4cc10 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,6 +6,7 @@
 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/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/constant.dart';
@@ -108,6 +109,11 @@
   InterfaceType _mapType;
 
   /**
+   * The type representing the built-in type 'Map'.
+   */
+  InterfaceType _mapNullNullType;
+
+  /**
    * An shared object representing the value 'null'.
    */
   DartObjectImpl _nullObject;
@@ -128,6 +134,16 @@
   InterfaceType _objectType;
 
   /**
+   * The type representing the built-in type 'Set'.
+   */
+  InterfaceType _setType;
+
+  /**
+   * The type representing the built-in type 'Set'.
+   */
+  InterfaceType _setNullType;
+
+  /**
    * The type representing the built-in type 'StackTrace'.
    */
   InterfaceType _stackTraceType;
@@ -168,7 +184,13 @@
    */
   AnalysisContext _context;
 
-  TestTypeProvider([this._context]);
+  /**
+   * The analysis driver, if any. Used to create an appropriate 'dart:async'
+   * library to back `Future<T>`.
+   */
+  AnalysisDriver _driver;
+
+  TestTypeProvider([this._context, this._driver]);
 
   @override
   InterfaceType get boolType {
@@ -377,6 +399,14 @@
   }
 
   @override
+  InterfaceType get mapNullNullType {
+    if (_mapNullNullType == null) {
+      _mapNullNullType = mapType.instantiate(<DartType>[nullType, nullType]);
+    }
+    return _mapNullNullType;
+  }
+
+  @override
   InterfaceType get mapType {
     if (_mapType == null) {
       ClassElementImpl mapElement =
@@ -422,7 +452,7 @@
       // Create a library element for "dart:core"
       // This enables the "isDartCoreNull" getter.
       var library = new LibraryElementImpl.forNode(
-          _context, AstTestFactory.libraryIdentifier2(["dart.core"]));
+          _context, null, AstTestFactory.libraryIdentifier2(["dart.core"]));
       var unit = new CompilationUnitElementImpl();
       library.definingCompilationUnit = unit;
       unit.librarySource = unit.source = new StringSource('', null);
@@ -464,6 +494,23 @@
   }
 
   @override
+  InterfaceType get setNullType {
+    if (_setNullType == null) {
+      _setNullType = setType.instantiate(<DartType>[nullType]);
+    }
+    return _setNullType;
+  }
+
+  @override
+  InterfaceType get setType {
+    if (_setType == null) {
+      ClassElementImpl setElement = ElementFactory.classElement2("Set", ["E"]);
+      _setType = setElement.type;
+    }
+    return _setType;
+  }
+
+  @override
   InterfaceType get stackTraceType {
     if (_stackTraceType == null) {
       ClassElementImpl stackTraceElement =
@@ -558,11 +605,16 @@
   }
 
   void _initDartAsync() {
-    Source asyncSource = _context.sourceFactory.forUri(DartSdk.DART_ASYNC);
-    _context.setContents(asyncSource, "");
+    Source asyncSource;
+    if (_driver == null) {
+      asyncSource = _context.sourceFactory.forUri(DartSdk.DART_ASYNC);
+      _context.setContents(asyncSource, "");
+    } else {
+      asyncSource = _driver.sourceFactory.forUri(DartSdk.DART_ASYNC);
+    }
     CompilationUnitElementImpl asyncUnit = new CompilationUnitElementImpl();
     LibraryElementImpl asyncLibrary = new LibraryElementImpl.forNode(
-        _context, AstTestFactory.libraryIdentifier2(["dart.async"]));
+        _context, null, AstTestFactory.libraryIdentifier2(["dart.async"]));
     asyncLibrary.definingCompilationUnit = asyncUnit;
     asyncUnit.librarySource = asyncUnit.source = asyncSource;
 
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index beb1160..2a2bebe 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -9,6 +9,7 @@
 import 'package:analyzer/dart/ast/token.dart' show Keyword, TokenType;
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/dart/element/type_system.dart' as public;
 import 'package:analyzer/error/listener.dart' show ErrorReporter;
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart' show TypeParameterMember;
@@ -62,680 +63,13 @@
       identical(t, UnknownInferredType.instance);
 }
 
-/// Tracks upper and lower type bounds for a set of type parameters.
-///
-/// This class is used by calling [isSubtypeOf]. When it encounters one of
-/// the type parameters it is inferring, it will record the constraint, and
-/// optimistically assume the constraint will be satisfied.
-///
-/// For example if we are inferring type parameter A, and we ask if
-/// `A <: num`, this will record that A must be a subytpe of `num`. It also
-/// handles cases when A appears as part of the structure of another type, for
-/// example `Iterable<A> <: Iterable<num>` would infer the same constraint
-/// (due to covariant generic types) as would `() -> A <: () -> num`. In
-/// contrast `(A) -> void <: (num) -> void`.
-///
-/// Once the lower/upper bounds are determined, [infer] should be called to
-/// finish the inference. It will instantiate a generic function type with the
-/// inferred types for each type parameter.
-///
-/// It can also optionally compute a partial solution, in case some of the type
-/// parameters could not be inferred (because the constraints cannot be
-/// satisfied), or bail on the inference when this happens.
-///
-/// As currently designed, an instance of this class should only be used to
-/// infer a single call and discarded immediately afterwards.
-class GenericInferrer {
-  final StrongTypeSystemImpl _typeSystem;
-  final TypeProvider typeProvider;
-  final Map<TypeParameterElement, List<_TypeConstraint>> constraints;
-
-  /// Buffer recording constraints recorded while performing a recursive call to
-  /// [_matchSubtypeOf] that might fail, so that any constraints recorded during
-  /// the failed match can be rewound.
-  final _undoBuffer = <_TypeConstraint>[];
-
-  GenericInferrer(this.typeProvider, this._typeSystem,
-      Iterable<TypeParameterElement> typeFormals)
-      : constraints = new HashMap(
-            equals: (x, y) => x.location == y.location,
-            hashCode: (x) => x.location.hashCode) {
-    for (var formal in typeFormals) {
-      constraints[formal] = [];
-    }
-  }
-
-  /// Apply an argument constraint, which asserts that the [argument] staticType
-  /// is a subtype of the [parameterType].
-  void constrainArgument(
-      DartType argumentType, DartType parameterType, String parameterName,
-      {DartType genericType}) {
-    var origin = new _TypeConstraintFromArgument(
-        argumentType, parameterType, parameterName,
-        genericType: genericType);
-    tryMatchSubtypeOf(argumentType, parameterType, origin, covariant: false);
-  }
-
-  /// Constrain a universal function type [fnType] used in a context
-  /// [contextType].
-  void constrainGenericFunctionInContext(
-      FunctionType fnType, DartType contextType) {
-    var origin = new _TypeConstraintFromFunctionContext(fnType, contextType);
-
-    // Since we're trying to infer the instantiation, we want to ignore type
-    // formals as we check the parameters and return type.
-    var inferFnType =
-        fnType.instantiate(TypeParameterTypeImpl.getTypes(fnType.typeFormals));
-    tryMatchSubtypeOf(inferFnType, contextType, origin, covariant: true);
-  }
-
-  /// Apply a return type constraint, which asserts that the [declaredType]
-  /// is a subtype of the [contextType].
-  void constrainReturnType(DartType declaredType, DartType contextType) {
-    var origin = new _TypeConstraintFromReturnType(declaredType, contextType);
-    tryMatchSubtypeOf(declaredType, contextType, origin, covariant: true);
-  }
-
-  /// Given the constraints that were given by calling [isSubtypeOf], find the
-  /// instantiation of the generic function that satisfies these constraints.
-  ///
-  /// If [downwardsInferPhase] is set, we are in the first pass of inference,
-  /// pushing context types down. At that point we are allowed to push down
-  /// `?` to precisely represent an unknown type. If [downwardsInferPhase] is
-  /// false, we are on our final inference pass, have all available information
-  /// including argument types, and must not conclude `?` for any type formal.
-  T infer<T extends ParameterizedType>(
-      T genericType, List<TypeParameterElement> typeFormals,
-      {bool considerExtendsClause: true,
-      ErrorReporter errorReporter,
-      AstNode errorNode,
-      bool downwardsInferPhase: false}) {
-    var fnTypeParams = TypeParameterTypeImpl.getTypes(typeFormals);
-
-    // Initialize the inferred type array.
-    //
-    // In the downwards phase, they all start as `?` to offer reasonable
-    // degradation for f-bounded type parameters.
-    var inferredTypes = new List<DartType>.filled(
-        fnTypeParams.length, UnknownInferredType.instance);
-    var _inferTypeParameter = downwardsInferPhase
-        ? _inferTypeParameterFromContext
-        : _inferTypeParameterFromAll;
-
-    for (int i = 0; i < fnTypeParams.length; i++) {
-      TypeParameterType typeParam = fnTypeParams[i];
-
-      var typeParamBound = typeParam.bound;
-      _TypeConstraint extendsClause;
-      if (considerExtendsClause && !typeParamBound.isDynamic) {
-        extendsClause = new _TypeConstraint.fromExtends(typeParam,
-            typeParam.bound.substitute2(inferredTypes, fnTypeParams));
-      }
-
-      inferredTypes[i] =
-          _inferTypeParameter(constraints[typeParam.element], extendsClause);
-    }
-
-    // If the downwards infer phase has failed, we'll catch this in the upwards
-    // phase later on.
-    if (downwardsInferPhase) {
-      return genericType.instantiate(inferredTypes) as T;
-    }
-
-    // Check the inferred types against all of the constraints.
-    var knownTypes = new HashMap<TypeParameterType, DartType>(
-        equals: (x, y) => x.element == y.element,
-        hashCode: (x) => x.element.hashCode);
-    for (int i = 0; i < fnTypeParams.length; i++) {
-      TypeParameterType typeParam = fnTypeParams[i];
-      var constraints = this.constraints[typeParam.element];
-      var typeParamBound =
-          typeParam.bound.substitute2(inferredTypes, fnTypeParams);
-
-      var inferred = inferredTypes[i];
-      bool success =
-          constraints.every((c) => c.isSatisifedBy(_typeSystem, inferred));
-      if (success && !typeParamBound.isDynamic) {
-        // If everything else succeeded, check the `extends` constraint.
-        var extendsConstraint =
-            new _TypeConstraint.fromExtends(typeParam, typeParamBound);
-        constraints.add(extendsConstraint);
-        success = extendsConstraint.isSatisifedBy(_typeSystem, inferred);
-      }
-
-      if (!success) {
-        errorReporter?.reportErrorForNode(
-            StrongModeCode.COULD_NOT_INFER,
-            errorNode,
-            [typeParam, _formatError(typeParam, inferred, constraints)]);
-
-        // Heuristic: even if we failed, keep the erroneous type.
-        // It should satisfy at least some of the constraints (e.g. the return
-        // context). If we fall back to instantiateToBounds, we'll typically get
-        // more errors (e.g. because `dynamic` is the most common bound).
-      }
-
-      if (inferred is FunctionType && inferred.typeFormals.isNotEmpty) {
-        errorReporter
-            ?.reportErrorForNode(StrongModeCode.COULD_NOT_INFER, errorNode, [
-          typeParam,
-          ' Inferred candidate type $inferred has type parameters'
-              ' ${(inferred as FunctionType).typeFormals}, but a function with'
-              ' type parameters cannot be used as a type argument.'
-        ]);
-
-        // Heuristic: Using a generic function type as a bound makes subtyping
-        // undecidable. Therefore, we cannot keep [inferred] unless we wish to
-        // generate bogus subtyping errors. Instead generate plain [Function],
-        // which is the most general function type.
-        inferred = typeProvider.functionType;
-      }
-
-      if (UnknownInferredType.isKnown(inferred)) {
-        knownTypes[typeParam] = inferred;
-      }
-    }
-
-    // Use instantiate to bounds to finish things off.
-    var hasError = new List<bool>.filled(fnTypeParams.length, false);
-    var result = _typeSystem.instantiateToBounds(genericType,
-        hasError: hasError, knownTypes: knownTypes) as T;
-
-    // Report any errors from instantiateToBounds.
-    for (int i = 0; i < hasError.length; i++) {
-      if (hasError[i]) {
-        TypeParameterType typeParam = fnTypeParams[i];
-        var typeParamBound =
-            typeParam.bound.substitute2(inferredTypes, fnTypeParams);
-        // TODO(jmesserly): improve this error message.
-        errorReporter
-            ?.reportErrorForNode(StrongModeCode.COULD_NOT_INFER, errorNode, [
-          typeParam,
-          "\nRecursive bound cannot be instantiated: '$typeParamBound'."
-              "\nConsider passing explicit type argument(s) "
-              "to the generic.\n\n'"
-        ]);
-      }
-    }
-    return result;
-  }
-
-  /// Tries to make [i1] a subtype of [i2] and accumulate constraints as needed.
-  ///
-  /// The return value indicates whether the match was successful.  If it was
-  /// unsuccessful, any constraints that were accumulated during the match
-  /// attempt have been rewound (see [_rewindConstraints]).
-  bool tryMatchSubtypeOf(DartType t1, DartType t2, _TypeConstraintOrigin origin,
-      {bool covariant}) {
-    int previousRewindBufferLength = _undoBuffer.length;
-    bool success = _matchSubtypeOf(t1, t2, null, origin, covariant: covariant);
-    if (!success) {
-      _rewindConstraints(previousRewindBufferLength);
-    }
-    return success;
-  }
-
-  /// Choose the bound that was implied by the return type, if any.
-  ///
-  /// Which bound this is depends on what positions the type parameter
-  /// appears in. If the type only appears only in a contravariant position,
-  /// we will choose the lower bound instead.
-  ///
-  /// For example given:
-  ///
-  ///     Func1<T, bool> makeComparer<T>(T x) => (T y) => x() == y;
-  ///
-  ///     main() {
-  ///       Func1<num, bool> t = makeComparer/* infer <num> */(42);
-  ///       print(t(42.0)); /// false, no error.
-  ///     }
-  ///
-  /// The constraints we collect are:
-  ///
-  /// * `num <: T`
-  /// * `int <: T`
-  ///
-  /// ... and no upper bound. Therefore the lower bound is the best choice.
-  DartType _chooseTypeFromConstraints(Iterable<_TypeConstraint> constraints,
-      {bool toKnownType: false}) {
-    DartType lower = UnknownInferredType.instance;
-    DartType upper = UnknownInferredType.instance;
-    for (var constraint in constraints) {
-      // Given constraints:
-      //
-      //     L1 <: T <: U1
-      //     L2 <: T <: U2
-      //
-      // These can be combined to produce:
-      //
-      //     LUB(L1, L2) <: T <: GLB(U1, U2).
-      //
-      // This can then be done for all constraints in sequence.
-      //
-      // This resulting constraint may be unsatisfiable; in that case inference
-      // will fail.
-      upper = _getGreatestLowerBound(upper, constraint.upperBound);
-      lower = _typeSystem.getLeastUpperBound(lower, constraint.lowerBound);
-    }
-
-    // Prefer the known bound, if any.
-    // Otherwise take whatever bound has partial information, e.g. `Iterable<?>`
-    //
-    // For both of those, prefer the lower bound (arbitrary heuristic).
-    if (UnknownInferredType.isKnown(lower)) {
-      return lower;
-    }
-    if (UnknownInferredType.isKnown(upper)) {
-      return upper;
-    }
-    if (!identical(UnknownInferredType.instance, lower)) {
-      return toKnownType ? _typeSystem.lowerBoundForType(lower) : lower;
-    }
-    if (!identical(UnknownInferredType.instance, upper)) {
-      return toKnownType ? _typeSystem.upperBoundForType(upper) : upper;
-    }
-    return lower;
-  }
-
-  String _formatError(TypeParameterType typeParam, DartType inferred,
-      Iterable<_TypeConstraint> constraints) {
-    var intro = "Tried to infer '$inferred' for '$typeParam'"
-        " which doesn't work:";
-
-    var constraintsByOrigin = <_TypeConstraintOrigin, List<_TypeConstraint>>{};
-    for (var c in constraints) {
-      constraintsByOrigin.putIfAbsent(c.origin, () => []).add(c);
-    }
-
-    // Only report unique constraint origins.
-    Iterable<_TypeConstraint> isSatisified(bool expected) => constraintsByOrigin
-        .values
-        .where((l) =>
-            l.every((c) => c.isSatisifedBy(_typeSystem, inferred)) == expected)
-        .expand((i) => i);
-
-    String unsatisified = _formatConstraints(isSatisified(false));
-    String satisified = _formatConstraints(isSatisified(true));
-
-    assert(unsatisified.isNotEmpty);
-    if (satisified.isNotEmpty) {
-      satisified = "\nThe type '$inferred' was inferred from:\n$satisified";
-    }
-
-    return '\n\n$intro\n$unsatisified$satisified\n\n'
-        'Consider passing explicit type argument(s) to the generic.\n\n';
-  }
-
-  /// This is first calls strong mode's GLB, but if it fails to find anything
-  /// (i.e. returns the bottom type), we kick in a few additional rules:
-  ///
-  /// - `GLB(FutureOr<A>, B)` is defined as:
-  ///   - `GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>`
-  ///   - `GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>`
-  ///   - else `GLB(FutureOr<A>, B) == GLB(A, B)`
-  /// - `GLB(A, FutureOr<B>) ==  GLB(FutureOr<A>, B)` (defined above),
-  /// - else `GLB(A, B) == Null`
-  DartType _getGreatestLowerBound(DartType t1, DartType t2) {
-    var result = _typeSystem.getGreatestLowerBound(t1, t2);
-    if (result.isBottom) {
-      // See if we can do better by considering FutureOr rules.
-      if (t1 is InterfaceType && t1.isDartAsyncFutureOr) {
-        var t1TypeArg = t1.typeArguments[0];
-        if (t2 is InterfaceType) {
-          //  GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>
-          if (t2.isDartAsyncFutureOr) {
-            var t2TypeArg = t2.typeArguments[0];
-            return typeProvider.futureOrType
-                .instantiate([_getGreatestLowerBound(t1TypeArg, t2TypeArg)]);
-          }
-          // GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>
-          if (t2.isDartAsyncFuture) {
-            var t2TypeArg = t2.typeArguments[0];
-            return typeProvider.futureType
-                .instantiate([_getGreatestLowerBound(t1TypeArg, t2TypeArg)]);
-          }
-        }
-        // GLB(FutureOr<A>, B) == GLB(A, B)
-        return _getGreatestLowerBound(t1TypeArg, t2);
-      }
-      if (t2 is InterfaceType && t2.isDartAsyncFutureOr) {
-        // GLB(A, FutureOr<B>) ==  GLB(FutureOr<A>, B)
-        return _getGreatestLowerBound(t2, t1);
-      }
-      return typeProvider.nullType;
-    }
-    return result;
-  }
-
-  DartType _inferTypeParameterFromAll(
-      List<_TypeConstraint> constraints, _TypeConstraint extendsClause) {
-    // See if we already fixed this type from downwards inference.
-    // If so, then we aren't allowed to change it based on argument types.
-    DartType t = _inferTypeParameterFromContext(
-        constraints.where((c) => c.isDownwards), extendsClause);
-    if (UnknownInferredType.isKnown(t)) {
-      // Remove constraints that aren't downward ones; we'll ignore these for
-      // error reporting, because inference already succeeded.
-      constraints.removeWhere((c) => !c.isDownwards);
-      return t;
-    }
-
-    if (extendsClause != null) {
-      constraints = constraints.toList()..add(extendsClause);
-    }
-
-    var choice = _chooseTypeFromConstraints(constraints, toKnownType: true);
-    return choice;
-  }
-
-  DartType _inferTypeParameterFromContext(
-      Iterable<_TypeConstraint> constraints, _TypeConstraint extendsClause) {
-    DartType t = _chooseTypeFromConstraints(constraints);
-    if (UnknownInferredType.isUnknown(t)) {
-      return t;
-    }
-
-    // If we're about to make our final choice, apply the extends clause.
-    // This gives us a chance to refine the choice, in case it would violate
-    // the `extends` clause. For example:
-    //
-    //     Object obj = math.min/*<infer Object, error>*/(1, 2);
-    //
-    // If we consider the `T extends num` we conclude `<num>`, which works.
-    if (extendsClause != null) {
-      constraints = constraints.toList()..add(extendsClause);
-      return _chooseTypeFromConstraints(constraints);
-    }
-    return t;
-  }
-
-  /// Tries to make [i1] a subtype of [i2] and accumulate constraints as needed.
-  ///
-  /// The return value indicates whether the match was successful.  If it was
-  /// unsuccessful, the caller is responsible for ignoring any constraints that
-  /// were accumulated (see [_rewindConstraints]).
-  bool _matchInterfaceSubtypeOf(InterfaceType i1, InterfaceType i2,
-      Set<Element> visited, _TypeConstraintOrigin origin,
-      {bool covariant}) {
-    if (identical(i1, i2)) {
-      return true;
-    }
-
-    if (i1.element == i2.element) {
-      List<DartType> tArgs1 = i1.typeArguments;
-      List<DartType> tArgs2 = i2.typeArguments;
-      assert(tArgs1.length == tArgs2.length);
-      for (int i = 0; i < tArgs1.length; i++) {
-        if (!_matchSubtypeOf(tArgs1[i], tArgs2[i], visited, origin,
-            covariant: covariant)) {
-          return false;
-        }
-      }
-      return true;
-    }
-    if (i1.isObject) {
-      return false;
-    }
-
-    // Guard against loops in the class hierarchy
-    //
-    // TODO(jmesserly): this function isn't guarding against anything (it's not
-    // passsing down `visitedSet`, so adding the element has no effect).
-    //
-    // If that's fixed, it breaks inference tests for types like
-    // `Iterable<Iterable<?>>` matched aganinst `List<List<int>>`.
-    //
-    // The fix is for type arguments (above) to not pass down `visited`, similar
-    // to how _isInterfaceSubtypeOf does not pass down `visited` for type
-    // arguments.
-    bool guardedInterfaceSubtype(InterfaceType t1) {
-      var visitedSet = visited ?? new HashSet<Element>();
-      if (visitedSet.add(t1.element)) {
-        bool matched = _matchInterfaceSubtypeOf(t1, i2, visited, origin,
-            covariant: covariant);
-        visitedSet.remove(t1.element);
-        return matched;
-      } else {
-        // In the case of a recursive type parameter, consider the subtype
-        // match to have failed.
-        return false;
-      }
-    }
-
-    // We don't need to search the entire class hierarchy, since a given
-    // subclass can't appear multiple times with different generic parameters.
-    // So shortcut to the first match found.
-    //
-    // We don't need undo logic here because if the classes don't match, nothing
-    // is added to the constraint set.
-    var superclass = i1.superclass;
-    if (superclass != null && guardedInterfaceSubtype(superclass)) return true;
-    for (final parent in i1.interfaces) {
-      if (guardedInterfaceSubtype(parent)) return true;
-    }
-    for (final parent in i1.mixins) {
-      if (guardedInterfaceSubtype(parent)) return true;
-    }
-    for (final parent in i1.superclassConstraints) {
-      if (guardedInterfaceSubtype(parent)) return true;
-    }
-    return false;
-  }
-
-  /// Assert that [t1] will be a subtype of [t2], and returns if the constraint
-  /// can be satisfied.
-  ///
-  /// [covariant] must be true if [t1] is a declared type of the generic
-  /// function and [t2] is the context type, or false if the reverse. For
-  /// example [covariant] is used when [t1] is the declared return type
-  /// and [t2] is the context type. Contravariant would be used if [t1] is the
-  /// argument type (i.e. passed in to the generic function) and [t2] is the
-  /// declared parameter type.
-  ///
-  /// [origin] indicates where the constraint came from, for example an argument
-  /// or return type.
-  bool _matchSubtypeOf(DartType t1, DartType t2, Set<Element> visited,
-      _TypeConstraintOrigin origin,
-      {bool covariant}) {
-    if (covariant && t1 is TypeParameterType) {
-      var constraints = this.constraints[t1.element];
-      if (constraints != null) {
-        if (!identical(t2, UnknownInferredType.instance)) {
-          var constraint = new _TypeConstraint(origin, t1, upper: t2);
-          constraints.add(constraint);
-          _undoBuffer.add(constraint);
-        }
-        return true;
-      }
-    }
-    if (!covariant && t2 is TypeParameterType) {
-      var constraints = this.constraints[t2.element];
-      if (constraints != null) {
-        if (!identical(t1, UnknownInferredType.instance)) {
-          var constraint = new _TypeConstraint(origin, t2, lower: t1);
-          constraints.add(constraint);
-          _undoBuffer.add(constraint);
-        }
-        return true;
-      }
-    }
-
-    if (identical(t1, t2)) {
-      return true;
-    }
-
-    // TODO(jmesserly): this logic is taken from subtype.
-    bool matchSubtype(DartType t1, DartType t2) {
-      return _matchSubtypeOf(t1, t2, null, origin, covariant: covariant);
-    }
-
-    // Handle FutureOr<T> union type.
-    if (t1 is InterfaceType && t1.isDartAsyncFutureOr) {
-      var t1TypeArg = t1.typeArguments[0];
-      if (t2 is InterfaceType && t2.isDartAsyncFutureOr) {
-        var t2TypeArg = t2.typeArguments[0];
-        // FutureOr<A> <: FutureOr<B> iff A <: B
-        return matchSubtype(t1TypeArg, t2TypeArg);
-      }
-
-      // given t1 is Future<A> | A, then:
-      // (Future<A> | A) <: t2 iff Future<A> <: t2 and A <: t2.
-      var t1Future = typeProvider.futureType.instantiate([t1TypeArg]);
-      return matchSubtype(t1Future, t2) && matchSubtype(t1TypeArg, t2);
-    }
-
-    if (t2 is InterfaceType && t2.isDartAsyncFutureOr) {
-      // given t2 is Future<A> | A, then:
-      // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
-      var t2TypeArg = t2.typeArguments[0];
-      var t2Future = typeProvider.futureType.instantiate([t2TypeArg]);
-
-      // First we try matching `t1 <: Future<A>`.  If that succeeds *and*
-      // records at least one constraint, then we proceed using that constraint.
-      var previousRewindBufferLength = _undoBuffer.length;
-      var success =
-          tryMatchSubtypeOf(t1, t2Future, origin, covariant: covariant);
-
-      if (_undoBuffer.length != previousRewindBufferLength) {
-        // Trying to match `t1 <: Future<A>` succeeded and recorded constraints,
-        // so those are the constraints we want.
-        return true;
-      } else {
-        // Either `t1 <: Future<A>` failed to match, or it matched trivially
-        // without recording any constraints (e.g. because t1 is `Null`).  We
-        // want constraints, because they let us do more precise inference, so
-        // go ahead and try matching `t1 <: A` to see if it records any
-        // constraints.
-        if (tryMatchSubtypeOf(t1, t2TypeArg, origin, covariant: covariant)) {
-          // Trying to match `t1 <: A` succeeded.  If it recorded constraints,
-          // those are the constraints we want.  If it didn't, then there's no
-          // way we're going to get any constraints.  So either way, we want to
-          // return `true` since the match suceeded and the constraints we want
-          // (if any) have been recorded.
-          return true;
-        } else {
-          // Trying to match `t1 <: A` failed.  So there's no way we are going
-          // to get any constraints.  Just return `success` to indicate whether
-          // the match succeeded.
-          return success;
-        }
-      }
-    }
-
-    // S <: T where S is a type variable
-    //  T is not dynamic or object (handled above)
-    //  True if T == S
-    //  Or true if bound of S is S' and S' <: T
-
-    if (t1 is TypeParameterType) {
-      // Guard against recursive type parameters
-      //
-      // TODO(jmesserly): this function isn't guarding against anything (it's
-      // not passsing down `visitedSet`, so adding the element has no effect).
-      bool guardedSubtype(DartType t1, DartType t2) {
-        var visitedSet = visited ?? new HashSet<Element>();
-        if (visitedSet.add(t1.element)) {
-          bool matched = matchSubtype(t1, t2);
-          visitedSet.remove(t1.element);
-          return matched;
-        } else {
-          // In the case of a recursive type parameter, consider the subtype
-          // match to have failed.
-          return false;
-        }
-      }
-
-      if (t2 is TypeParameterType && t1.definition == t2.definition) {
-        return guardedSubtype(t1.bound, t2.bound);
-      }
-      return guardedSubtype(t1.bound, t2);
-    }
-    if (t2 is TypeParameterType) {
-      return false;
-    }
-
-    if (_isBottom(t1) || _isTop(t2)) return true;
-
-    if (t1 is InterfaceType && t2 is InterfaceType) {
-      return _matchInterfaceSubtypeOf(t1, t2, visited, origin,
-          covariant: covariant);
-    }
-
-    if (t1 is FunctionType && t2 is FunctionType) {
-      return FunctionTypeImpl.relate(t1, t2, matchSubtype,
-          parameterRelation: (p1, p2) {
-            return _matchSubtypeOf(p2.type, p1.type, null, origin,
-                covariant: !covariant);
-          },
-          // Type parameter bounds are invariant.
-          boundsRelation: (t1, t2, p1, p2) =>
-              matchSubtype(t1, t2) && matchSubtype(t2, t1));
-    }
-
-    if (t1 is FunctionType && t2 == typeProvider.functionType) {
-      return true;
-    }
-
-    return false;
-  }
-
-  /// Un-does constraints that were gathered by a failed match attempt, until
-  /// [_undoBuffer] has length [previousRewindBufferLength].
-  ///
-  /// The intended usage is that the caller should record the length of
-  /// [_undoBuffer] before attempting to make a match.  Then, if the match
-  /// fails, pass the recorded length to this method to erase any constraints
-  /// that were recorded during the failed match.
-  void _rewindConstraints(int previousRewindBufferLength) {
-    while (_undoBuffer.length > previousRewindBufferLength) {
-      var constraint = _undoBuffer.removeLast();
-      var element = constraint.typeParameter.element;
-      assert(identical(constraints[element].last, constraint));
-      constraints[element].removeLast();
-    }
-  }
-
-  static String _formatConstraints(Iterable<_TypeConstraint> constraints) {
-    List<List<String>> lineParts =
-        new Set<_TypeConstraintOrigin>.from(constraints.map((c) => c.origin))
-            .map((o) => o.formatError())
-            .toList();
-
-    int prefixMax = lineParts.map((p) => p[0].length).fold(0, math.max);
-
-    // Use a set to prevent identical message lines.
-    // (It's not uncommon for the same constraint to show up in a few places.)
-    var messageLines = new Set<String>.from(lineParts.map((parts) {
-      var prefix = parts[0];
-      var middle = parts[1];
-      var prefixPad = ' ' * (prefixMax - prefix.length);
-      var middlePad = ' ' * (prefixMax);
-      var end = "";
-      if (parts.length > 2) {
-        end = '\n  $middlePad ${parts[2]}';
-      }
-      return '  $prefix$prefixPad $middle$end';
-    }));
-
-    return messageLines.join('\n');
-  }
-}
-
 /**
- * Implementation of [TypeSystem] using the strong mode rules.
- * https://github.com/dart-lang/dev_compiler/blob/master/STRONG_MODE.md
+ * A type system that implements the type semantics for Dart 2.0.
  */
-class StrongTypeSystemImpl extends TypeSystem {
+class Dart2TypeSystem extends TypeSystem {
   static bool _comparingTypeParameterBounds = false;
 
   /**
-   * True if declaration casts should be allowed, otherwise false.
-   *
-   * This affects the behavior of [isAssignableTo].
-   */
-  final bool declarationCasts;
-
-  /**
    * True if implicit casts should be allowed, otherwise false.
    *
    * This affects the behavior of [isAssignableTo].
@@ -744,9 +78,9 @@
 
   final TypeProvider typeProvider;
 
-  StrongTypeSystemImpl(this.typeProvider,
-      {this.declarationCasts: true, this.implicitCasts: true});
+  Dart2TypeSystem(this.typeProvider, {this.implicitCasts: true});
 
+  @deprecated
   @override
   bool get isStrong => true;
 
@@ -1048,8 +382,7 @@
   }
 
   @override
-  bool isAssignableTo(DartType fromType, DartType toType,
-      {bool isDeclarationCast = false}) {
+  bool isAssignableTo(DartType fromType, DartType toType) {
     // An actual subtype
     if (isSubtypeOf(fromType, toType)) {
       return true;
@@ -1063,11 +396,7 @@
       }
     }
 
-    if (isDeclarationCast) {
-      if (!declarationCasts) {
-        return false;
-      }
-    } else if (!implicitCasts) {
+    if (!implicitCasts) {
       return false;
     }
 
@@ -1681,6 +1010,664 @@
   }
 }
 
+/// Tracks upper and lower type bounds for a set of type parameters.
+///
+/// This class is used by calling [isSubtypeOf]. When it encounters one of
+/// the type parameters it is inferring, it will record the constraint, and
+/// optimistically assume the constraint will be satisfied.
+///
+/// For example if we are inferring type parameter A, and we ask if
+/// `A <: num`, this will record that A must be a subytpe of `num`. It also
+/// handles cases when A appears as part of the structure of another type, for
+/// example `Iterable<A> <: Iterable<num>` would infer the same constraint
+/// (due to covariant generic types) as would `() -> A <: () -> num`. In
+/// contrast `(A) -> void <: (num) -> void`.
+///
+/// Once the lower/upper bounds are determined, [infer] should be called to
+/// finish the inference. It will instantiate a generic function type with the
+/// inferred types for each type parameter.
+///
+/// It can also optionally compute a partial solution, in case some of the type
+/// parameters could not be inferred (because the constraints cannot be
+/// satisfied), or bail on the inference when this happens.
+///
+/// As currently designed, an instance of this class should only be used to
+/// infer a single call and discarded immediately afterwards.
+class GenericInferrer {
+  final Dart2TypeSystem _typeSystem;
+  final TypeProvider typeProvider;
+  final Map<TypeParameterElement, List<_TypeConstraint>> constraints;
+
+  /// Buffer recording constraints recorded while performing a recursive call to
+  /// [_matchSubtypeOf] that might fail, so that any constraints recorded during
+  /// the failed match can be rewound.
+  final _undoBuffer = <_TypeConstraint>[];
+
+  GenericInferrer(this.typeProvider, this._typeSystem,
+      Iterable<TypeParameterElement> typeFormals)
+      : constraints = new HashMap(
+            equals: (x, y) => x.location == y.location,
+            hashCode: (x) => x.location.hashCode) {
+    for (var formal in typeFormals) {
+      constraints[formal] = [];
+    }
+  }
+
+  /// Apply an argument constraint, which asserts that the [argument] staticType
+  /// is a subtype of the [parameterType].
+  void constrainArgument(
+      DartType argumentType, DartType parameterType, String parameterName,
+      {DartType genericType}) {
+    var origin = new _TypeConstraintFromArgument(
+        argumentType, parameterType, parameterName,
+        genericType: genericType);
+    tryMatchSubtypeOf(argumentType, parameterType, origin, covariant: false);
+  }
+
+  /// Constrain a universal function type [fnType] used in a context
+  /// [contextType].
+  void constrainGenericFunctionInContext(
+      FunctionType fnType, DartType contextType) {
+    var origin = new _TypeConstraintFromFunctionContext(fnType, contextType);
+
+    // Since we're trying to infer the instantiation, we want to ignore type
+    // formals as we check the parameters and return type.
+    var inferFnType =
+        fnType.instantiate(TypeParameterTypeImpl.getTypes(fnType.typeFormals));
+    tryMatchSubtypeOf(inferFnType, contextType, origin, covariant: true);
+  }
+
+  /// Apply a return type constraint, which asserts that the [declaredType]
+  /// is a subtype of the [contextType].
+  void constrainReturnType(DartType declaredType, DartType contextType) {
+    var origin = new _TypeConstraintFromReturnType(declaredType, contextType);
+    tryMatchSubtypeOf(declaredType, contextType, origin, covariant: true);
+  }
+
+  /// Given the constraints that were given by calling [isSubtypeOf], find the
+  /// instantiation of the generic function that satisfies these constraints.
+  ///
+  /// If [downwardsInferPhase] is set, we are in the first pass of inference,
+  /// pushing context types down. At that point we are allowed to push down
+  /// `?` to precisely represent an unknown type. If [downwardsInferPhase] is
+  /// false, we are on our final inference pass, have all available information
+  /// including argument types, and must not conclude `?` for any type formal.
+  T infer<T extends ParameterizedType>(
+      T genericType, List<TypeParameterElement> typeFormals,
+      {bool considerExtendsClause: true,
+      ErrorReporter errorReporter,
+      AstNode errorNode,
+      bool downwardsInferPhase: false}) {
+    var fnTypeParams = TypeParameterTypeImpl.getTypes(typeFormals);
+
+    // Initialize the inferred type array.
+    //
+    // In the downwards phase, they all start as `?` to offer reasonable
+    // degradation for f-bounded type parameters.
+    var inferredTypes = new List<DartType>.filled(
+        fnTypeParams.length, UnknownInferredType.instance);
+    var _inferTypeParameter = downwardsInferPhase
+        ? _inferTypeParameterFromContext
+        : _inferTypeParameterFromAll;
+
+    for (int i = 0; i < fnTypeParams.length; i++) {
+      TypeParameterType typeParam = fnTypeParams[i];
+
+      var typeParamBound = typeParam.bound;
+      _TypeConstraint extendsClause;
+      if (considerExtendsClause && !typeParamBound.isDynamic) {
+        extendsClause = new _TypeConstraint.fromExtends(typeParam,
+            typeParam.bound.substitute2(inferredTypes, fnTypeParams));
+      }
+
+      inferredTypes[i] =
+          _inferTypeParameter(constraints[typeParam.element], extendsClause);
+    }
+
+    // If the downwards infer phase has failed, we'll catch this in the upwards
+    // phase later on.
+    if (downwardsInferPhase) {
+      return genericType.instantiate(inferredTypes) as T;
+    }
+
+    // Check the inferred types against all of the constraints.
+    var knownTypes = new HashMap<TypeParameterType, DartType>(
+        equals: (x, y) => x.element == y.element,
+        hashCode: (x) => x.element.hashCode);
+    for (int i = 0; i < fnTypeParams.length; i++) {
+      TypeParameterType typeParam = fnTypeParams[i];
+      var constraints = this.constraints[typeParam.element];
+      var typeParamBound =
+          typeParam.bound.substitute2(inferredTypes, fnTypeParams);
+
+      var inferred = inferredTypes[i];
+      bool success =
+          constraints.every((c) => c.isSatisifedBy(_typeSystem, inferred));
+      if (success && !typeParamBound.isDynamic) {
+        // If everything else succeeded, check the `extends` constraint.
+        var extendsConstraint =
+            new _TypeConstraint.fromExtends(typeParam, typeParamBound);
+        constraints.add(extendsConstraint);
+        success = extendsConstraint.isSatisifedBy(_typeSystem, inferred);
+      }
+
+      if (!success) {
+        errorReporter?.reportErrorForNode(
+            StrongModeCode.COULD_NOT_INFER,
+            errorNode,
+            [typeParam, _formatError(typeParam, inferred, constraints)]);
+
+        // Heuristic: even if we failed, keep the erroneous type.
+        // It should satisfy at least some of the constraints (e.g. the return
+        // context). If we fall back to instantiateToBounds, we'll typically get
+        // more errors (e.g. because `dynamic` is the most common bound).
+      }
+
+      if (inferred is FunctionType && inferred.typeFormals.isNotEmpty) {
+        errorReporter
+            ?.reportErrorForNode(StrongModeCode.COULD_NOT_INFER, errorNode, [
+          typeParam,
+          ' Inferred candidate type $inferred has type parameters'
+              ' ${(inferred as FunctionType).typeFormals}, but a function with'
+              ' type parameters cannot be used as a type argument.'
+        ]);
+
+        // Heuristic: Using a generic function type as a bound makes subtyping
+        // undecidable. Therefore, we cannot keep [inferred] unless we wish to
+        // generate bogus subtyping errors. Instead generate plain [Function],
+        // which is the most general function type.
+        inferred = typeProvider.functionType;
+      }
+
+      if (UnknownInferredType.isKnown(inferred)) {
+        knownTypes[typeParam] = inferred;
+      }
+    }
+
+    // Use instantiate to bounds to finish things off.
+    var hasError = new List<bool>.filled(fnTypeParams.length, false);
+    var result = _typeSystem.instantiateToBounds(genericType,
+        hasError: hasError, knownTypes: knownTypes) as T;
+
+    // Report any errors from instantiateToBounds.
+    for (int i = 0; i < hasError.length; i++) {
+      if (hasError[i]) {
+        TypeParameterType typeParam = fnTypeParams[i];
+        var typeParamBound =
+            typeParam.bound.substitute2(inferredTypes, fnTypeParams);
+        // TODO(jmesserly): improve this error message.
+        errorReporter
+            ?.reportErrorForNode(StrongModeCode.COULD_NOT_INFER, errorNode, [
+          typeParam,
+          "\nRecursive bound cannot be instantiated: '$typeParamBound'."
+              "\nConsider passing explicit type argument(s) "
+              "to the generic.\n\n'"
+        ]);
+      }
+    }
+    return result;
+  }
+
+  /// Tries to make [i1] a subtype of [i2] and accumulate constraints as needed.
+  ///
+  /// The return value indicates whether the match was successful.  If it was
+  /// unsuccessful, any constraints that were accumulated during the match
+  /// attempt have been rewound (see [_rewindConstraints]).
+  bool tryMatchSubtypeOf(DartType t1, DartType t2, _TypeConstraintOrigin origin,
+      {bool covariant}) {
+    int previousRewindBufferLength = _undoBuffer.length;
+    bool success = _matchSubtypeOf(t1, t2, null, origin, covariant: covariant);
+    if (!success) {
+      _rewindConstraints(previousRewindBufferLength);
+    }
+    return success;
+  }
+
+  /// Choose the bound that was implied by the return type, if any.
+  ///
+  /// Which bound this is depends on what positions the type parameter
+  /// appears in. If the type only appears only in a contravariant position,
+  /// we will choose the lower bound instead.
+  ///
+  /// For example given:
+  ///
+  ///     Func1<T, bool> makeComparer<T>(T x) => (T y) => x() == y;
+  ///
+  ///     main() {
+  ///       Func1<num, bool> t = makeComparer/* infer <num> */(42);
+  ///       print(t(42.0)); /// false, no error.
+  ///     }
+  ///
+  /// The constraints we collect are:
+  ///
+  /// * `num <: T`
+  /// * `int <: T`
+  ///
+  /// ... and no upper bound. Therefore the lower bound is the best choice.
+  DartType _chooseTypeFromConstraints(Iterable<_TypeConstraint> constraints,
+      {bool toKnownType: false}) {
+    DartType lower = UnknownInferredType.instance;
+    DartType upper = UnknownInferredType.instance;
+    for (var constraint in constraints) {
+      // Given constraints:
+      //
+      //     L1 <: T <: U1
+      //     L2 <: T <: U2
+      //
+      // These can be combined to produce:
+      //
+      //     LUB(L1, L2) <: T <: GLB(U1, U2).
+      //
+      // This can then be done for all constraints in sequence.
+      //
+      // This resulting constraint may be unsatisfiable; in that case inference
+      // will fail.
+      upper = _getGreatestLowerBound(upper, constraint.upperBound);
+      lower = _typeSystem.getLeastUpperBound(lower, constraint.lowerBound);
+    }
+
+    // Prefer the known bound, if any.
+    // Otherwise take whatever bound has partial information, e.g. `Iterable<?>`
+    //
+    // For both of those, prefer the lower bound (arbitrary heuristic).
+    if (UnknownInferredType.isKnown(lower)) {
+      return lower;
+    }
+    if (UnknownInferredType.isKnown(upper)) {
+      return upper;
+    }
+    if (!identical(UnknownInferredType.instance, lower)) {
+      return toKnownType ? _typeSystem.lowerBoundForType(lower) : lower;
+    }
+    if (!identical(UnknownInferredType.instance, upper)) {
+      return toKnownType ? _typeSystem.upperBoundForType(upper) : upper;
+    }
+    return lower;
+  }
+
+  String _formatError(TypeParameterType typeParam, DartType inferred,
+      Iterable<_TypeConstraint> constraints) {
+    var intro = "Tried to infer '$inferred' for '$typeParam'"
+        " which doesn't work:";
+
+    var constraintsByOrigin = <_TypeConstraintOrigin, List<_TypeConstraint>>{};
+    for (var c in constraints) {
+      constraintsByOrigin.putIfAbsent(c.origin, () => []).add(c);
+    }
+
+    // Only report unique constraint origins.
+    Iterable<_TypeConstraint> isSatisified(bool expected) => constraintsByOrigin
+        .values
+        .where((l) =>
+            l.every((c) => c.isSatisifedBy(_typeSystem, inferred)) == expected)
+        .expand((i) => i);
+
+    String unsatisified = _formatConstraints(isSatisified(false));
+    String satisified = _formatConstraints(isSatisified(true));
+
+    assert(unsatisified.isNotEmpty);
+    if (satisified.isNotEmpty) {
+      satisified = "\nThe type '$inferred' was inferred from:\n$satisified";
+    }
+
+    return '\n\n$intro\n$unsatisified$satisified\n\n'
+        'Consider passing explicit type argument(s) to the generic.\n\n';
+  }
+
+  /// This is first calls strong mode's GLB, but if it fails to find anything
+  /// (i.e. returns the bottom type), we kick in a few additional rules:
+  ///
+  /// - `GLB(FutureOr<A>, B)` is defined as:
+  ///   - `GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>`
+  ///   - `GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>`
+  ///   - else `GLB(FutureOr<A>, B) == GLB(A, B)`
+  /// - `GLB(A, FutureOr<B>) ==  GLB(FutureOr<A>, B)` (defined above),
+  /// - else `GLB(A, B) == Null`
+  DartType _getGreatestLowerBound(DartType t1, DartType t2) {
+    var result = _typeSystem.getGreatestLowerBound(t1, t2);
+    if (result.isBottom) {
+      // See if we can do better by considering FutureOr rules.
+      if (t1 is InterfaceType && t1.isDartAsyncFutureOr) {
+        var t1TypeArg = t1.typeArguments[0];
+        if (t2 is InterfaceType) {
+          //  GLB(FutureOr<A>, FutureOr<B>) == FutureOr<GLB(A, B)>
+          if (t2.isDartAsyncFutureOr) {
+            var t2TypeArg = t2.typeArguments[0];
+            return typeProvider.futureOrType
+                .instantiate([_getGreatestLowerBound(t1TypeArg, t2TypeArg)]);
+          }
+          // GLB(FutureOr<A>, Future<B>) == Future<GLB(A, B)>
+          if (t2.isDartAsyncFuture) {
+            var t2TypeArg = t2.typeArguments[0];
+            return typeProvider.futureType
+                .instantiate([_getGreatestLowerBound(t1TypeArg, t2TypeArg)]);
+          }
+        }
+        // GLB(FutureOr<A>, B) == GLB(A, B)
+        return _getGreatestLowerBound(t1TypeArg, t2);
+      }
+      if (t2 is InterfaceType && t2.isDartAsyncFutureOr) {
+        // GLB(A, FutureOr<B>) ==  GLB(FutureOr<A>, B)
+        return _getGreatestLowerBound(t2, t1);
+      }
+      return typeProvider.nullType;
+    }
+    return result;
+  }
+
+  DartType _inferTypeParameterFromAll(
+      List<_TypeConstraint> constraints, _TypeConstraint extendsClause) {
+    // See if we already fixed this type from downwards inference.
+    // If so, then we aren't allowed to change it based on argument types.
+    DartType t = _inferTypeParameterFromContext(
+        constraints.where((c) => c.isDownwards), extendsClause);
+    if (UnknownInferredType.isKnown(t)) {
+      // Remove constraints that aren't downward ones; we'll ignore these for
+      // error reporting, because inference already succeeded.
+      constraints.removeWhere((c) => !c.isDownwards);
+      return t;
+    }
+
+    if (extendsClause != null) {
+      constraints = constraints.toList()..add(extendsClause);
+    }
+
+    var choice = _chooseTypeFromConstraints(constraints, toKnownType: true);
+    return choice;
+  }
+
+  DartType _inferTypeParameterFromContext(
+      Iterable<_TypeConstraint> constraints, _TypeConstraint extendsClause) {
+    DartType t = _chooseTypeFromConstraints(constraints);
+    if (UnknownInferredType.isUnknown(t)) {
+      return t;
+    }
+
+    // If we're about to make our final choice, apply the extends clause.
+    // This gives us a chance to refine the choice, in case it would violate
+    // the `extends` clause. For example:
+    //
+    //     Object obj = math.min/*<infer Object, error>*/(1, 2);
+    //
+    // If we consider the `T extends num` we conclude `<num>`, which works.
+    if (extendsClause != null) {
+      constraints = constraints.toList()..add(extendsClause);
+      return _chooseTypeFromConstraints(constraints);
+    }
+    return t;
+  }
+
+  /// Tries to make [i1] a subtype of [i2] and accumulate constraints as needed.
+  ///
+  /// The return value indicates whether the match was successful.  If it was
+  /// unsuccessful, the caller is responsible for ignoring any constraints that
+  /// were accumulated (see [_rewindConstraints]).
+  bool _matchInterfaceSubtypeOf(InterfaceType i1, InterfaceType i2,
+      Set<Element> visited, _TypeConstraintOrigin origin,
+      {bool covariant}) {
+    if (identical(i1, i2)) {
+      return true;
+    }
+
+    if (i1.element == i2.element) {
+      List<DartType> tArgs1 = i1.typeArguments;
+      List<DartType> tArgs2 = i2.typeArguments;
+      assert(tArgs1.length == tArgs2.length);
+      for (int i = 0; i < tArgs1.length; i++) {
+        if (!_matchSubtypeOf(
+            tArgs1[i], tArgs2[i], new HashSet<Element>(), origin,
+            covariant: covariant)) {
+          return false;
+        }
+      }
+      return true;
+    }
+    if (i1.isObject) {
+      return false;
+    }
+
+    // Guard against loops in the class hierarchy
+    bool guardedInterfaceSubtype(InterfaceType t1) {
+      visited ??= new HashSet<Element>();
+      if (visited.add(t1.element)) {
+        bool matched = _matchInterfaceSubtypeOf(t1, i2, visited, origin,
+            covariant: covariant);
+        visited.remove(t1.element);
+        return matched;
+      } else {
+        // In the case of a recursive type parameter, consider the subtype
+        // match to have failed.
+        return false;
+      }
+    }
+
+    // We don't need to search the entire class hierarchy, since a given
+    // subclass can't appear multiple times with different generic parameters.
+    // So shortcut to the first match found.
+    //
+    // We don't need undo logic here because if the classes don't match, nothing
+    // is added to the constraint set.
+    var superclass = i1.superclass;
+    if (superclass != null && guardedInterfaceSubtype(superclass)) return true;
+    for (final parent in i1.interfaces) {
+      if (guardedInterfaceSubtype(parent)) return true;
+    }
+    for (final parent in i1.mixins) {
+      if (guardedInterfaceSubtype(parent)) return true;
+    }
+    for (final parent in i1.superclassConstraints) {
+      if (guardedInterfaceSubtype(parent)) return true;
+    }
+    return false;
+  }
+
+  /// Assert that [t1] will be a subtype of [t2], and returns if the constraint
+  /// can be satisfied.
+  ///
+  /// [covariant] must be true if [t1] is a declared type of the generic
+  /// function and [t2] is the context type, or false if the reverse. For
+  /// example [covariant] is used when [t1] is the declared return type
+  /// and [t2] is the context type. Contravariant would be used if [t1] is the
+  /// argument type (i.e. passed in to the generic function) and [t2] is the
+  /// declared parameter type.
+  ///
+  /// [origin] indicates where the constraint came from, for example an argument
+  /// or return type.
+  bool _matchSubtypeOf(DartType t1, DartType t2, Set<Element> visited,
+      _TypeConstraintOrigin origin,
+      {bool covariant}) {
+    if (covariant && t1 is TypeParameterType) {
+      var constraints = this.constraints[t1.element];
+      if (constraints != null) {
+        if (!identical(t2, UnknownInferredType.instance)) {
+          var constraint = new _TypeConstraint(origin, t1, upper: t2);
+          constraints.add(constraint);
+          _undoBuffer.add(constraint);
+        }
+        return true;
+      }
+    }
+    if (!covariant && t2 is TypeParameterType) {
+      var constraints = this.constraints[t2.element];
+      if (constraints != null) {
+        if (!identical(t1, UnknownInferredType.instance)) {
+          var constraint = new _TypeConstraint(origin, t2, lower: t1);
+          constraints.add(constraint);
+          _undoBuffer.add(constraint);
+        }
+        return true;
+      }
+    }
+
+    if (identical(t1, t2)) {
+      return true;
+    }
+
+    // TODO(jmesserly): this logic is taken from subtype.
+    bool matchSubtype(DartType t1, DartType t2) {
+      return _matchSubtypeOf(t1, t2, null, origin, covariant: covariant);
+    }
+
+    // Handle FutureOr<T> union type.
+    if (t1 is InterfaceType && t1.isDartAsyncFutureOr) {
+      var t1TypeArg = t1.typeArguments[0];
+      if (t2 is InterfaceType && t2.isDartAsyncFutureOr) {
+        var t2TypeArg = t2.typeArguments[0];
+        // FutureOr<A> <: FutureOr<B> iff A <: B
+        return matchSubtype(t1TypeArg, t2TypeArg);
+      }
+
+      // given t1 is Future<A> | A, then:
+      // (Future<A> | A) <: t2 iff Future<A> <: t2 and A <: t2.
+      var t1Future = typeProvider.futureType.instantiate([t1TypeArg]);
+      return matchSubtype(t1Future, t2) && matchSubtype(t1TypeArg, t2);
+    }
+
+    if (t2 is InterfaceType && t2.isDartAsyncFutureOr) {
+      // given t2 is Future<A> | A, then:
+      // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
+      var t2TypeArg = t2.typeArguments[0];
+      var t2Future = typeProvider.futureType.instantiate([t2TypeArg]);
+
+      // First we try matching `t1 <: Future<A>`.  If that succeeds *and*
+      // records at least one constraint, then we proceed using that constraint.
+      var previousRewindBufferLength = _undoBuffer.length;
+      var success =
+          tryMatchSubtypeOf(t1, t2Future, origin, covariant: covariant);
+
+      if (_undoBuffer.length != previousRewindBufferLength) {
+        // Trying to match `t1 <: Future<A>` succeeded and recorded constraints,
+        // so those are the constraints we want.
+        return true;
+      } else {
+        // Either `t1 <: Future<A>` failed to match, or it matched trivially
+        // without recording any constraints (e.g. because t1 is `Null`).  We
+        // want constraints, because they let us do more precise inference, so
+        // go ahead and try matching `t1 <: A` to see if it records any
+        // constraints.
+        if (tryMatchSubtypeOf(t1, t2TypeArg, origin, covariant: covariant)) {
+          // Trying to match `t1 <: A` succeeded.  If it recorded constraints,
+          // those are the constraints we want.  If it didn't, then there's no
+          // way we're going to get any constraints.  So either way, we want to
+          // return `true` since the match suceeded and the constraints we want
+          // (if any) have been recorded.
+          return true;
+        } else {
+          // Trying to match `t1 <: A` failed.  So there's no way we are going
+          // to get any constraints.  Just return `success` to indicate whether
+          // the match succeeded.
+          return success;
+        }
+      }
+    }
+
+    // S <: T where S is a type variable
+    //  T is not dynamic or object (handled above)
+    //  True if T == S
+    //  Or true if bound of S is S' and S' <: T
+
+    if (t1 is TypeParameterType) {
+      // Guard against recursive type parameters
+      //
+      // TODO(jmesserly): this function isn't guarding against anything (it's
+      // not passsing down `visitedSet`, so adding the element has no effect).
+      bool guardedSubtype(DartType t1, DartType t2) {
+        var visitedSet = visited ?? new HashSet<Element>();
+        if (visitedSet.add(t1.element)) {
+          bool matched = matchSubtype(t1, t2);
+          visitedSet.remove(t1.element);
+          return matched;
+        } else {
+          // In the case of a recursive type parameter, consider the subtype
+          // match to have failed.
+          return false;
+        }
+      }
+
+      if (t2 is TypeParameterType && t1.definition == t2.definition) {
+        return guardedSubtype(t1.bound, t2.bound);
+      }
+      return guardedSubtype(t1.bound, t2);
+    }
+    if (t2 is TypeParameterType) {
+      return false;
+    }
+
+    if (_isBottom(t1) || _isTop(t2)) return true;
+
+    if (t1 is InterfaceType && t2 is InterfaceType) {
+      return _matchInterfaceSubtypeOf(t1, t2, visited, origin,
+          covariant: covariant);
+    }
+
+    if (t1 is FunctionType && t2 is FunctionType) {
+      return FunctionTypeImpl.relate(t1, t2, matchSubtype,
+          parameterRelation: (p1, p2) {
+            return _matchSubtypeOf(p2.type, p1.type, null, origin,
+                covariant: !covariant);
+          },
+          // Type parameter bounds are invariant.
+          boundsRelation: (t1, t2, p1, p2) =>
+              matchSubtype(t1, t2) && matchSubtype(t2, t1));
+    }
+
+    if (t1 is FunctionType && t2 == typeProvider.functionType) {
+      return true;
+    }
+
+    return false;
+  }
+
+  /// Un-does constraints that were gathered by a failed match attempt, until
+  /// [_undoBuffer] has length [previousRewindBufferLength].
+  ///
+  /// The intended usage is that the caller should record the length of
+  /// [_undoBuffer] before attempting to make a match.  Then, if the match
+  /// fails, pass the recorded length to this method to erase any constraints
+  /// that were recorded during the failed match.
+  void _rewindConstraints(int previousRewindBufferLength) {
+    while (_undoBuffer.length > previousRewindBufferLength) {
+      var constraint = _undoBuffer.removeLast();
+      var element = constraint.typeParameter.element;
+      assert(identical(constraints[element].last, constraint));
+      constraints[element].removeLast();
+    }
+  }
+
+  static String _formatConstraints(Iterable<_TypeConstraint> constraints) {
+    List<List<String>> lineParts =
+        new Set<_TypeConstraintOrigin>.from(constraints.map((c) => c.origin))
+            .map((o) => o.formatError())
+            .toList();
+
+    int prefixMax = lineParts.map((p) => p[0].length).fold(0, math.max);
+
+    // Use a set to prevent identical message lines.
+    // (It's not uncommon for the same constraint to show up in a few places.)
+    var messageLines = new Set<String>.from(lineParts.map((parts) {
+      var prefix = parts[0];
+      var middle = parts[1];
+      var prefixPad = ' ' * (prefixMax - prefix.length);
+      var middlePad = ' ' * (prefixMax);
+      var end = "";
+      if (parts.length > 2) {
+        end = '\n  $middlePad ${parts[2]}';
+      }
+      return '  $prefix$prefixPad $middle$end';
+    }));
+
+    return messageLines.join('\n');
+  }
+}
+
+/**
+ * A type system that implements the type semantics for strong mode.
+ */
+@deprecated
+class StrongTypeSystemImpl extends Dart2TypeSystem {
+  StrongTypeSystemImpl(TypeProvider typeProvider) : super(typeProvider);
+}
+
 /**
  * The interface `TypeSystem` defines the behavior of an object representing
  * the type system.  This provides a common location to put methods that act on
@@ -1688,10 +1675,12 @@
  * way for a possible future where we may wish to make the type system
  * pluggable.
  */
-abstract class TypeSystem {
+// TODO(brianwilkerson) Rename this class to TypeSystemImpl.
+abstract class TypeSystem implements public.TypeSystem {
   /**
    * Whether the type system is strong or not.
    */
+  @deprecated
   bool get isStrong;
 
   /**
@@ -1699,6 +1688,40 @@
    */
   TypeProvider get typeProvider;
 
+  @override
+  DartType flatten(DartType type) {
+    if (type is InterfaceType) {
+      // Implement the cases:
+      //  - "If T = FutureOr<S> then flatten(T) = S."
+      //  - "If T = Future<S> then flatten(T) = S."
+      if (type.isDartAsyncFutureOr || type.isDartAsyncFuture) {
+        return type.typeArguments.isNotEmpty
+            ? type.typeArguments[0]
+            : DynamicTypeImpl.instance;
+      }
+      // Implement the case: "Otherwise if T <: Future then let S be a type
+      // such that T << Future<S> and for all R, if T << Future<R> then S << R.
+      // Then flatten(T) = S."
+      //
+      // In other words, given the set of all types R such that T << Future<R>,
+      // let S be the most specific of those types, if any such S exists.
+      //
+      // Since we only care about the most specific type, it is sufficient to
+      // look at the types appearing as a parameter to Future in the type
+      // hierarchy of T.  We don't need to consider the supertypes of those
+      // types, since they are by definition less specific.
+      List<DartType> candidateTypes =
+          _searchTypeHierarchyForFutureTypeParameters(type);
+      DartType flattenResult =
+          InterfaceTypeImpl.findMostSpecificType(candidateTypes, this);
+      if (flattenResult != null) {
+        return flattenResult;
+      }
+    }
+    // Implement the case: "In any other circumstance, flatten(T) = T."
+    return type;
+  }
+
   List<InterfaceType> gatherMixinSupertypeConstraintsForInference(
       ClassElement mixinElement) {
     List<InterfaceType> candidates;
@@ -1758,16 +1781,10 @@
     // In Dart 2, the result is `Function` iff T is `Function`, otherwise the
     // result is `Object`.
     if (type1 is FunctionType && type2 is InterfaceType) {
-      if (isStrong) {
-        return type2.isDartCoreFunction ? type2 : typeProvider.objectType;
-      }
-      type1 = typeProvider.functionType;
+      return type2.isDartCoreFunction ? type2 : typeProvider.objectType;
     }
     if (type2 is FunctionType && type1 is InterfaceType) {
-      if (isStrong) {
-        return type1.isDartCoreFunction ? type1 : typeProvider.objectType;
-      }
-      type2 = typeProvider.functionType;
+      return type1.isDartCoreFunction ? type1 : typeProvider.objectType;
     }
 
     // At this point type1 and type2 should both either be interface types or
@@ -1819,8 +1836,7 @@
    * Return `true` if the [leftType] is assignable to the [rightType] (that is,
    * if leftType <==> rightType).
    */
-  bool isAssignableTo(DartType leftType, DartType rightType,
-      {bool isDeclarationCast = false});
+  bool isAssignableTo(DartType leftType, DartType rightType);
 
   /**
    * Return `true` if the [leftType] is more specific than the [rightType]
@@ -1843,6 +1859,11 @@
    */
   bool isSubtypeOf(DartType leftType, DartType rightType);
 
+  @override
+  DartType leastUpperBound(DartType leftType, DartType rightType) {
+    return getLeastUpperBound(leftType, 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.
@@ -1957,6 +1978,11 @@
     return currentType;
   }
 
+  @override
+  DartType resolveToBound(DartType type) {
+    return instantiateToBounds(type);
+  }
+
   /**
    * Tries to promote from the first type from the second type, and returns the
    * promoted type if it succeeds, otherwise null.
@@ -1967,7 +1993,7 @@
    * null.
    *
    * In strong mode, this can potentially return a different type, see
-   * the override in [StrongTypeSystemImpl].
+   * the override in [Dart2TypeSystem].
    */
   DartType tryPromoteToType(DartType to, DartType from);
 
@@ -2084,6 +2110,32 @@
   DartType _interfaceLeastUpperBound(InterfaceType type1, InterfaceType type2);
 
   /**
+   * Starting from the given [type], search its class hierarchy for types of the
+   * form Future<R>, and return a list of the resulting R's.
+   */
+  List<DartType> _searchTypeHierarchyForFutureTypeParameters(DartType type) {
+    List<DartType> result = <DartType>[];
+    HashSet<ClassElement> visitedClasses = new HashSet<ClassElement>();
+    void recurse(InterfaceTypeImpl type) {
+      if (type.isDartAsyncFuture && type.typeArguments.isNotEmpty) {
+        result.add(type.typeArguments[0]);
+      }
+      if (visitedClasses.add(type.element)) {
+        if (type.superclass != null) {
+          recurse(type.superclass);
+        }
+        for (InterfaceType interface in type.interfaces) {
+          recurse(interface);
+        }
+        visitedClasses.remove(type.element);
+      }
+    }
+
+    recurse(type);
+    return result;
+  }
+
+  /**
    * Given two [DartType]s [type1] and [type2] at least one of which is a
    * [TypeParameterType], return their least upper bound in a type system
    * specific manner.
@@ -2095,8 +2147,7 @@
    */
   static TypeSystem create(AnalysisContext context) {
     var options = context.analysisOptions as AnalysisOptionsImpl;
-    return new StrongTypeSystemImpl(context.typeProvider,
-        declarationCasts: options.declarationCasts,
+    return new Dart2TypeSystem(context.typeProvider,
         implicitCasts: options.implicitCasts);
   }
 }
diff --git a/pkg/analyzer/lib/src/generated/workspace.dart b/pkg/analyzer/lib/src/generated/workspace.dart
deleted file mode 100644
index c122845..0000000
--- a/pkg/analyzer/lib/src/generated/workspace.dart
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-
-/**
- * Abstract superclass of classes that provide information about the workspace
- * in which analysis is being performed.
- */
-abstract class Workspace {
-  /**
-   * Return `true` if this workspace defines a single "project" and that
-   * "project" depends upon flutter.
-   */
-  bool get hasFlutterDependency => packageMap?.containsKey('flutter') ?? false;
-
-  /**
-   * Return a (possibly null) map of package sources.
-   */
-  Map<String, List<Folder>> get packageMap;
-
-  /**
-   * The [UriResolver] that can resolve `package` URIs.
-   */
-  UriResolver get packageUriResolver;
-
-  /**
-   * Create the [SourceFactory] for resolving Uris to [Source]s.
-   * The [sdk] may be `null`.
-   */
-  SourceFactory createSourceFactory(DartSdk sdk);
-}
diff --git a/pkg/analyzer/lib/src/hint/sdk_constraint_extractor.dart b/pkg/analyzer/lib/src/hint/sdk_constraint_extractor.dart
index 9ff1b29..0cd3180 100644
--- a/pkg/analyzer/lib/src/hint/sdk_constraint_extractor.dart
+++ b/pkg/analyzer/lib/src/hint/sdk_constraint_extractor.dart
@@ -12,44 +12,84 @@
   /// The file from which the constraint is to be extracted.
   final File pubspecFile;
 
-  /// The version range that was
+  /// A flag indicating whether the [_constraintText], [_constraintOffset] and
+  /// [_constraint] have been initialized.
+  bool _initialized = false;
+
+  /// The text of the constraint, or `null` if the range has not yet been
+  /// computed or if there was an error when attempting to compute the range.
+  String _constraintText;
+
+  /// The offset of the constraint text, or `-1` if the offset is not known.
+  int _constraintOffset = -1;
+
+  /// The cached range of supported versions, or `null` if the range has not yet
+  /// been computed or if there was an error when attempting to compute the
+  /// range.
   VersionConstraint _constraint;
 
   /// Initialize a newly created extractor to extract the SDK version constraint
   /// from the given `pubspec.yaml` file.
   SdkConstraintExtractor(this.pubspecFile);
 
-  /// Return the range of supported versions.
+  /// Return the range of supported versions, or `null` if the range could not
+  /// be computed.
   VersionConstraint constraint() {
     if (_constraint == null) {
-      try {
-        String constraintText = _getConstraintText();
-        if (constraintText != null) {
-          _constraint = new VersionConstraint.parse(constraintText);
+      String text = constraintText();
+      if (text != null) {
+        try {
+          _constraint = new VersionConstraint.parse(text);
+        } catch (e) {
+          // Ignore this, leaving [_constraint] unset.
         }
-      } catch (e) {
-        // Return `null` by falling through without setting `_versionRange`.
       }
     }
     return _constraint;
   }
 
+  /// Return the offset of the constraint text.
+  int constraintOffset() {
+    if (_constraintText == null) {
+      _initializeTextAndOffset();
+    }
+    return _constraintOffset;
+  }
+
   /// Return the constraint text following "sdk:".
-  String _getConstraintText() {
-    String fileContent = pubspecFile.readAsStringSync();
-    YamlDocument document = loadYamlDocument(fileContent);
-    YamlNode contents = document.contents;
-    if (contents is YamlMap) {
-      var environment = contents['environment'];
-      if (environment is YamlMap) {
-        var sdk = environment['sdk'];
-        if (sdk is String) {
-          return sdk;
-        } else if (sdk is YamlScalar) {
-          return sdk.toString();
+  String constraintText() {
+    if (_constraintText == null) {
+      _initializeTextAndOffset();
+    }
+    return _constraintText;
+  }
+
+  /// Initialize both [_constraintText] and [_constraintOffset], or neither if
+  /// there is an error or if the pubspec does not contain an sdk constraint.
+  void _initializeTextAndOffset() {
+    if (!_initialized) {
+      _initialized = true;
+      try {
+        String fileContent = pubspecFile.readAsStringSync();
+        YamlDocument document = loadYamlDocument(fileContent);
+        YamlNode contents = document.contents;
+        if (contents is YamlMap) {
+          YamlNode environment = contents.nodes['environment'];
+          if (environment is YamlMap) {
+            YamlNode sdk = environment.nodes['sdk'];
+            if (sdk is YamlScalar) {
+              _constraintText = sdk.value;
+              _constraintOffset = sdk.span.start.offset;
+              if (sdk.style == ScalarStyle.SINGLE_QUOTED ||
+                  sdk.style == ScalarStyle.DOUBLE_QUOTED) {
+                _constraintOffset++;
+              }
+            }
+          }
         }
+      } catch (e) {
+        // Ignore this, leaving both fields unset.
       }
     }
-    return null;
   }
 }
diff --git a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
index 3636897..cc2231a 100644
--- a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
+++ b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
@@ -23,8 +23,8 @@
   /// The typ provider used to access SDK types.
   final TypeProvider _typeProvider;
 
-  /// The range of versions of the SDK that are allowed by the SDK constraints.
-  final VersionRange _versionRange;
+  /// The version constraint for the SDK.
+  final VersionConstraint _versionConstraint;
 
   /// A cached flag indicating whether references to Future and Stream need to
   /// be checked. Use [] to access this field.
@@ -33,15 +33,25 @@
   /// Initialize a newly created verifier to use the given [_errorReporter] to
   /// report errors.
   SdkConstraintVerifier(this._errorReporter, this._containingLibrary,
-      this._typeProvider, this._versionRange);
+      this._typeProvider, this._versionConstraint);
 
   /// Return a range covering every version up to, but not including, 2.1.0.
   VersionRange get before_2_1_0 =>
       new VersionRange(max: Version.parse('2.1.0'), includeMax: false);
 
   /// Return `true` if references to Future and Stream need to be checked.
-  bool get checkFutureAndStream =>
-      _checkFutureAndStream ??= !before_2_1_0.intersect(_versionRange).isEmpty;
+  bool get checkFutureAndStream => _checkFutureAndStream ??=
+      !before_2_1_0.intersect(_versionConstraint).isEmpty;
+
+  @override
+  void visitHideCombinator(HideCombinator node) {
+    // Don't flag references to either `Future` or `Stream` within a combinator.
+  }
+
+  @override
+  void visitShowCombinator(ShowCombinator node) {
+    // Don't flag references to either `Future` or `Stream` within a combinator.
+  }
 
   @override
   void visitSimpleIdentifier(SimpleIdentifier node) {
diff --git a/pkg/analyzer/lib/src/lint/analysis.dart b/pkg/analyzer/lib/src/lint/analysis.dart
index bc4e089..65fde36 100644
--- a/pkg/analyzer/lib/src/lint/analysis.dart
+++ b/pkg/analyzer/lib/src/lint/analysis.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,12 +6,15 @@
 import 'dart:collection';
 import 'dart:io' as io;
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/file_system.dart'
     show File, Folder, ResourceProvider, ResourceUriResolver;
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
@@ -25,8 +28,6 @@
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/util/sdk.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:package_config/packages.dart' show Packages;
 import 'package:package_config/packages_file.dart' as pkgfile show parse;
 import 'package:package_config/src/packages_impl.dart' show MapPackages;
@@ -49,7 +50,6 @@
 AnalysisOptions _buildAnalyzerOptions(LinterOptions options) {
   AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl();
   analysisOptions.hint = false;
-  analysisOptions.previewDart2 = options.previewDart2;
   analysisOptions.lint = options.enableLints;
   analysisOptions.generateSdkErrors = options.showSdkWarnings;
   analysisOptions.enableTiming = options.enableTiming;
@@ -83,9 +83,6 @@
   /// Whether to use Dart's Strong Mode analyzer.
   bool strongMode = true;
 
-  /// Whether to use Dart 2.0 features.
-  bool previewDart2 = false;
-
   /// The mock SDK (to speed up testing) or `null` to use the actual SDK.
   DartSdk mockSdk;
 
@@ -100,6 +97,13 @@
   void set enableAssertInitializer(bool enable) {
     // Ignored because the option is now always enabled.
   }
+
+  /// Whether to use Dart 2.0 features.
+  @deprecated
+  bool get previewDart2 => true;
+
+  @deprecated
+  void set previewDart2(bool value) {}
 }
 
 class LintDriver {
@@ -250,7 +254,18 @@
 /// [errorSink].
 class StdLogger extends Logger {
   @override
-  void logError(String message, [exception]) => errorSink.writeln(message);
+  void logError(String message, [exception]) {
+    errorSink.writeln(message);
+    if (exception != null) {
+      errorSink.writeln(exception);
+    }
+  }
+
   @override
-  void logInformation(String message, [exception]) => outSink.writeln(message);
+  void logInformation(String message, [exception]) {
+    outSink.writeln(message);
+    if (exception != null) {
+      outSink.writeln(exception);
+    }
+  }
 }
diff --git a/pkg/analyzer/lib/src/lint/linter.dart b/pkg/analyzer/lib/src/lint/linter.dart
index 1732ba7..348322f 100644
--- a/pkg/analyzer/lib/src/lint/linter.dart
+++ b/pkg/analyzer/lib/src/lint/linter.dart
@@ -1,14 +1,20 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 import 'dart:io';
 
-import 'package:analyzer/analyzer.dart';
 import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/file_system.dart' as file_system;
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/dart/error/lint_codes.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisErrorInfo, AnalysisErrorInfoImpl, Logger;
 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException;
@@ -200,6 +206,16 @@
   TypeProvider get typeProvider;
 
   TypeSystem get typeSystem;
+
+  /// Return `true` if it would be valid for the given instance creation
+  /// [expression] to have a keyword of `const`.
+  ///
+  /// The [expression] is expected to be a node within one of the compilation
+  /// units in [allUnits].
+  ///
+  /// Note that this method can cause constant evaluation to occur, which can be
+  /// computationally expensive.
+  bool canBeConst(InstanceCreationExpression expression);
 }
 
 /// Implementation of [LinterContext]
@@ -221,6 +237,34 @@
 
   LinterContextImpl(this.allUnits, this.currentUnit, this.declaredVariables,
       this.typeProvider, this.typeSystem);
+
+  @override
+  bool canBeConst(InstanceCreationExpression expression) {
+    //
+    // Verify that the invoked constructor is a const constructor.
+    //
+    ConstructorElement element = expression.staticElement;
+    if (element == null || !element.isConst) {
+      return false;
+    }
+    //
+    // Verify that the evaluation of the constructor would not produce an
+    // exception.
+    //
+    Token oldKeyword = expression.keyword;
+    ConstantAnalysisErrorListener listener =
+        new ConstantAnalysisErrorListener();
+    try {
+      expression.keyword = new KeywordToken(Keyword.CONST, expression.offset);
+      LibraryElement library = element.library;
+      ErrorReporter errorReporter = new ErrorReporter(listener, element.source);
+      expression.accept(new ConstantVerifier(
+          errorReporter, library, typeProvider, declaredVariables));
+    } finally {
+      expression.keyword = oldKeyword;
+    }
+    return !listener.hasConstError;
+  }
 }
 
 class LinterContextUnit {
@@ -319,15 +363,21 @@
   @override
   AstVisitor getVisitor() => null;
 
-  void reportLint(AstNode node, {bool ignoreSyntheticNodes: true}) {
+  void reportLint(AstNode node,
+      {List<Object> arguments: const [],
+      ErrorCode errorCode,
+      bool ignoreSyntheticNodes: true}) {
     if (node != null && (!node.isSynthetic || !ignoreSyntheticNodes)) {
-      reporter.reportErrorForNode(lintCode, node, []);
+      reporter.reportErrorForNode(lintCode, node, arguments);
     }
   }
 
-  void reportLintForToken(Token token, {bool ignoreSyntheticTokens: true}) {
+  void reportLintForToken(Token token,
+      {List<Object> arguments: const [],
+      ErrorCode errorCode,
+      bool ignoreSyntheticTokens: true}) {
     if (token != null && (!token.isSynthetic || !ignoreSyntheticTokens)) {
-      reporter.reportErrorForToken(lintCode, token, []);
+      reporter.reportErrorForToken(lintCode, token, arguments);
     }
   }
 
@@ -380,27 +430,19 @@
   /// This method is invoked to let the [LintRule] register node processors
   /// in the given [registry].
   ///
-  /// In a future release of the analyzer, a `context` argument will be added.
-  /// To opt into the new API, use [NodeLintRuleWithContext] instead.
-  void registerNodeProcessors(NodeLintRegistry registry);
+  /// The node processors may use the provided [context] to access information
+  /// that is not available from the AST nodes or their associated elements.
+  void registerNodeProcessors(NodeLintRegistry registry, LinterContext context);
 }
 
 /// [LintRule]s that implement this interface want to process only some types
 /// of AST nodes, and will register their processors in the registry.
 ///
-/// TODO(paulberry): once NodeLintRule is removed, rename this interface to
-/// NodeLintRule.
-abstract class NodeLintRuleWithContext extends NodeLintRule {
-  /// This method is invoked to let the [LintRule] register node processors
-  /// in the given [registry].
-  ///
-  /// The node processors may use the provided [context] to access information
-  /// that is not available from the AST nodes or their associated elements.
-  /// In a future release of the analyzer, [context] will become a required
-  /// parameter.
-  void registerNodeProcessors(NodeLintRegistry registry,
-      [LinterContext context]);
-}
+/// This class exists solely to allow a smoother transition from analyzer
+/// version 0.33.*.  It will be removed in a future analyzer release, so please
+/// use [NodeLintRule] instead.
+@deprecated
+abstract class NodeLintRuleWithContext extends NodeLintRule {}
 
 class PrintingReporter implements Reporter, Logger {
   final Printer _print;
diff --git a/pkg/analyzer/lib/src/lint/linter_visitor.dart b/pkg/analyzer/lib/src/lint/linter_visitor.dart
index fbf259b..7b2374e 100644
--- a/pkg/analyzer/lib/src/lint/linter_visitor.dart
+++ b/pkg/analyzer/lib/src/lint/linter_visitor.dart
@@ -19,6 +19,12 @@
   LinterVisitor(this.registry, this.exceptionHandler);
 
   @override
+  void visitAnnotation(Annotation node) {
+    _runSubscriptions(node, registry._forAnnotation);
+    super.visitAnnotation(node);
+  }
+
+  @override
   void visitAsExpression(AsExpression node) {
     _runSubscriptions(node, registry._forAsExpression);
     super.visitAsExpression(node);
@@ -680,6 +686,7 @@
 /// The container to register visitors for separate AST node types.
 class NodeLintRegistry {
   final bool enableTiming;
+  final List<_Subscription<Annotation>> _forAnnotation = [];
   final List<_Subscription<AsExpression>> _forAsExpression = [];
   final List<_Subscription<AssertInitializer>> _forAssertInitializer = [];
   final List<_Subscription<AssertStatement>> _forAssertStatement = [];
@@ -808,6 +815,10 @@
 
   NodeLintRegistry(this.enableTiming);
 
+  void addAnnotation(LintRule linter, AstVisitor visitor) {
+    _forAnnotation.add(new _Subscription(linter, visitor, _getTimer(linter)));
+  }
+
   void addAsExpression(LintRule linter, AstVisitor visitor) {
     _forAsExpression.add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
diff --git a/pkg/analyzer/lib/src/lint/options_rule_validator.dart b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
index 2d6911a..9b28b1a 100644
--- a/pkg/analyzer/lib/src/lint/options_rule_validator.dart
+++ b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
@@ -2,13 +2,39 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
+import 'dart:collection';
+
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/analysis_options/error/option_codes.dart';
+import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/lint/registry.dart';
 import 'package:analyzer/src/plugin/options.dart';
 import 'package:analyzer/src/util/yaml.dart';
 import 'package:yaml/yaml.dart';
 
 /**
+ * A hint code indicating reference to a deprecated lint.
+ *
+ * Parameters:
+ * 0: the rule name
+ */
+const AnalysisOptionsHintCode DEPRECATED_LINT_HINT =
+    const AnalysisOptionsHintCode('DEPRECATED_LINT_HINT',
+        "'{0}' is a deprecated lint rule and should not be used");
+
+/**
+ * Duplicate rules.
+ *
+ * Parameters:
+ * 0: the rule name
+ */
+const AnalysisOptionsHintCode DUPLICATE_RULE_HINT = const AnalysisOptionsHintCode(
+    'DUPLICATE_RULE',
+    "The rule {0} is already specified and doesn't need to be specified again.",
+    correction: "Try removing all but one specification of the rule.");
+
+/**
  * An error code indicating an undefined lint rule.
  *
  * Parameters:
@@ -19,12 +45,25 @@
         'UNDEFINED_LINT_WARNING', "'{0}' is not a recognized lint rule");
 
 /**
+ * Rule provider.
+ */
+typedef LintRuleProvider = Iterable<LintRule> Function();
+
+/**
  * Validates `linter` rule configurations.
  */
 class LinterRuleOptionsValidator extends OptionsValidator {
   static const linter = 'linter';
   static const rulesKey = 'rules';
 
+  final LintRuleProvider ruleProvider;
+
+  LinterRuleOptionsValidator({LintRuleProvider provider})
+      : ruleProvider = provider ?? (() => Registry.ruleRegistry.rules);
+
+  LintRule getRegisteredLint(Object value) => ruleProvider()
+      .firstWhere((rule) => rule.name == value, orElse: () => null);
+
   @override
   List<AnalysisError> validate(ErrorReporter reporter, YamlMap options) {
     List<AnalysisError> errors = <AnalysisError>[];
@@ -38,13 +77,21 @@
 
   validateRules(YamlNode rules, ErrorReporter reporter) {
     if (rules is YamlList) {
-      List<String> registeredLints =
-          Registry.ruleRegistry.map((r) => r.name).toList();
+      Set<String> seenRules = new HashSet<String>();
       rules.nodes.forEach((YamlNode ruleNode) {
         Object value = ruleNode.value;
-        if (value != null && !registeredLints.contains(value)) {
-          reporter.reportErrorForSpan(
-              UNDEFINED_LINT_WARNING, ruleNode.span, [value]);
+        if (value != null) {
+          LintRule rule = getRegisteredLint(value);
+          if (rule == null) {
+            reporter.reportErrorForSpan(
+                UNDEFINED_LINT_WARNING, ruleNode.span, [value]);
+          } else if (!seenRules.add(rule.name)) {
+            reporter.reportErrorForSpan(
+                DUPLICATE_RULE_HINT, ruleNode.span, [value]);
+          } else if (rule.maturity == Maturity.deprecated) {
+            reporter.reportErrorForSpan(
+                DEPRECATED_LINT_HINT, ruleNode.span, [value]);
+          }
         }
       });
     }
diff --git a/pkg/analyzer/lib/src/lint/project.dart b/pkg/analyzer/lib/src/lint/project.dart
index f87c70f..7243747 100644
--- a/pkg/analyzer/lib/src/lint/project.dart
+++ b/pkg/analyzer/lib/src/lint/project.dart
@@ -5,6 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -135,7 +136,7 @@
     for (Source source in sources) {
       String path = source.uri.path;
       if (path.startsWith(libDir) && !path.startsWith(libSrcDir)) {
-        AnalysisResult result = await driver.getResult(source.fullName);
+        ResolvedUnitResult result = await driver.getResult(source.fullName);
         LibraryElement library = result.libraryElement;
 
         NamespaceBuilder namespaceBuilder = new NamespaceBuilder();
diff --git a/pkg/analyzer/lib/src/lint/pub.dart b/pkg/analyzer/lib/src/lint/pub.dart
index 1db39bf..8e6deed 100644
--- a/pkg/analyzer/lib/src/lint/pub.dart
+++ b/pkg/analyzer/lib/src/lint/pub.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -81,8 +81,7 @@
   PSEntry get version;
 }
 
-abstract class PSDependencyList extends Object
-    with IterableMixin<PSDependency> {}
+abstract class PSDependencyList with IterableMixin<PSDependency> {}
 
 class PSEntry {
   final PSNode key;
@@ -110,7 +109,7 @@
   String get text;
 }
 
-abstract class PSNodeList extends Object with IterableMixin<PSNode> {
+abstract class PSNodeList with IterableMixin<PSNode> {
   @override
   Iterator<PSNode> get iterator;
   PSNode get token;
@@ -137,8 +136,8 @@
   T visitPackageAuthors(PSNodeList authors) => null;
   T visitPackageDependencies(PSDependencyList dependencies) => null;
   T visitPackageDependency(PSDependency dependency) => null;
-  T visitPackageDependencyOverrides(PSDependencyList dependencies) => null;
   T visitPackageDependencyOverride(PSDependency dependency) => null;
+  T visitPackageDependencyOverrides(PSDependencyList dependencies) => null;
   T visitPackageDescription(PSEntry description) => null;
   T visitPackageDevDependencies(PSDependencyList dependencies) => null;
   T visitPackageDevDependency(PSDependency dependency) => null;
diff --git a/pkg/analyzer/lib/src/lint/registry.dart b/pkg/analyzer/lib/src/lint/registry.dart
index 24b5e47..4e02ac7 100644
--- a/pkg/analyzer/lib/src/lint/registry.dart
+++ b/pkg/analyzer/lib/src/lint/registry.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -10,7 +10,7 @@
 /**
  * Registry of lint rules.
  */
-class Registry extends Object with IterableMixin<LintRule> {
+class Registry with IterableMixin<LintRule> {
   /**
    * The default registry to be used by clients.
    */
diff --git a/pkg/analyzer/lib/src/lint/util.dart b/pkg/analyzer/lib/src/lint/util.dart
index 39248bc..2e12794 100644
--- a/pkg/analyzer/lib/src/lint/util.dart
+++ b/pkg/analyzer/lib/src/lint/util.dart
@@ -1,17 +1,20 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:io';
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/parser.dart' show Parser;
 import 'package:analyzer/src/string_source.dart' show StringSource;
-import 'package:path/path.dart' as p;
+import 'package:path/path.dart' as path;
 
 final _identifier = new RegExp(r'^([(_|$)a-zA-Z]+([_a-zA-Z0-9])*)$');
 
@@ -32,21 +35,21 @@
 String createLibraryNamePrefix(
     {String libraryPath, String projectRoot, String packageName}) {
   // Use the posix context to canonicalize separators (`\`).
-  var libraryDirectory = p.posix.dirname(libraryPath);
-  var path = p.posix.relative(libraryDirectory, from: projectRoot);
+  var libraryDirectory = path.posix.dirname(libraryPath);
+  var relativePath = path.posix.relative(libraryDirectory, from: projectRoot);
   // Drop 'lib/'.
-  var segments = p.split(path);
+  var segments = path.split(relativePath);
   if (segments[0] == 'lib') {
-    path = p.posix.joinAll(segments.sublist(1));
+    relativePath = path.posix.joinAll(segments.sublist(1));
   }
   // Replace separators.
-  path = path.replaceAll('/', '.');
+  relativePath = relativePath.replaceAll('/', '.');
   // Add separator if needed.
-  if (path.isNotEmpty) {
-    path = '.$path';
+  if (relativePath.isNotEmpty) {
+    relativePath = '.$relativePath';
   }
 
-  return '$packageName$path';
+  return '$packageName$relativePath';
 }
 
 /// Returns `true` if this [fileName] is a Dart file.
diff --git a/pkg/analyzer/lib/src/summary/expr_builder.dart b/pkg/analyzer/lib/src/summary/expr_builder.dart
index 66112ea..e6af09e 100644
--- a/pkg/analyzer/lib/src/summary/expr_builder.dart
+++ b/pkg/analyzer/lib/src/summary/expr_builder.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -23,7 +23,7 @@
 
   final UnitResynthesizer resynthesizer;
   final ElementImpl context;
-  final UnlinkedExpr uc;
+  final UnlinkedExpr _uc;
   final bool requireValidConst;
 
   int intPtr = 0;
@@ -37,250 +37,258 @@
 
   final Map<String, ParameterElement> parametersInScope;
 
-  ExprBuilder(this.resynthesizer, this.context, this.uc,
+  ExprBuilder(this.resynthesizer, this.context, this._uc,
       {this.requireValidConst: true,
       this.localFunctions,
       Map<String, ParameterElement> parametersInScope})
       : this.parametersInScope =
             parametersInScope ?? _parametersInScope(context);
 
+  bool get hasNonEmptyExpr => _uc != null && _uc.operations.isNotEmpty;
+
   Expression build() {
-    if (requireValidConst && !uc.isValidConst) {
+    if (requireValidConst && !_uc.isValidConst) {
       return null;
     }
-    try {
-      for (UnlinkedExprOperation operation in uc.operations) {
-        switch (operation) {
-          case UnlinkedExprOperation.pushNull:
-            _push(AstTestFactory.nullLiteral());
-            break;
-          // bool
-          case UnlinkedExprOperation.pushFalse:
-            _push(AstTestFactory.booleanLiteral(false));
-            break;
-          case UnlinkedExprOperation.pushTrue:
-            _push(AstTestFactory.booleanLiteral(true));
-            break;
-          // literals
-          case UnlinkedExprOperation.pushInt:
-            int value = uc.ints[intPtr++];
-            _push(AstTestFactory.integer(value));
-            break;
-          case UnlinkedExprOperation.pushLongInt:
-            int value = 0;
-            int count = uc.ints[intPtr++];
-            for (int i = 0; i < count; i++) {
-              int next = uc.ints[intPtr++];
-              value = value << 32 | next;
-            }
-            _push(AstTestFactory.integer(value));
-            break;
-          case UnlinkedExprOperation.pushDouble:
-            double value = uc.doubles[doublePtr++];
-            _push(AstTestFactory.doubleLiteral(value));
-            break;
-          case UnlinkedExprOperation.makeSymbol:
-            String component = uc.strings[stringPtr++];
-            _push(AstTestFactory.symbolLiteral([component]));
-            break;
-          // String
-          case UnlinkedExprOperation.pushString:
-            String value = uc.strings[stringPtr++];
-            _push(AstTestFactory.string2(value));
-            break;
-          case UnlinkedExprOperation.concatenate:
-            int count = uc.ints[intPtr++];
-            List<InterpolationElement> elements = <InterpolationElement>[];
-            for (int i = 0; i < count; i++) {
-              Expression expr = _pop();
-              InterpolationElement element = _newInterpolationElement(expr);
-              elements.insert(0, element);
-            }
-            _push(AstTestFactory.string(elements));
-            break;
-          // binary
-          case UnlinkedExprOperation.equal:
-            _pushBinary(TokenType.EQ_EQ);
-            break;
-          case UnlinkedExprOperation.notEqual:
-            _pushBinary(TokenType.BANG_EQ);
-            break;
-          case UnlinkedExprOperation.and:
-            _pushBinary(TokenType.AMPERSAND_AMPERSAND);
-            break;
-          case UnlinkedExprOperation.or:
-            _pushBinary(TokenType.BAR_BAR);
-            break;
-          case UnlinkedExprOperation.bitXor:
-            _pushBinary(TokenType.CARET);
-            break;
-          case UnlinkedExprOperation.bitAnd:
-            _pushBinary(TokenType.AMPERSAND);
-            break;
-          case UnlinkedExprOperation.bitOr:
-            _pushBinary(TokenType.BAR);
-            break;
-          case UnlinkedExprOperation.bitShiftLeft:
-            _pushBinary(TokenType.LT_LT);
-            break;
-          case UnlinkedExprOperation.bitShiftRight:
-            _pushBinary(TokenType.GT_GT);
-            break;
-          case UnlinkedExprOperation.add:
-            _pushBinary(TokenType.PLUS);
-            break;
-          case UnlinkedExprOperation.subtract:
-            _pushBinary(TokenType.MINUS);
-            break;
-          case UnlinkedExprOperation.multiply:
-            _pushBinary(TokenType.STAR);
-            break;
-          case UnlinkedExprOperation.divide:
-            _pushBinary(TokenType.SLASH);
-            break;
-          case UnlinkedExprOperation.floorDivide:
-            _pushBinary(TokenType.TILDE_SLASH);
-            break;
-          case UnlinkedExprOperation.modulo:
-            _pushBinary(TokenType.PERCENT);
-            break;
-          case UnlinkedExprOperation.greater:
-            _pushBinary(TokenType.GT);
-            break;
-          case UnlinkedExprOperation.greaterEqual:
-            _pushBinary(TokenType.GT_EQ);
-            break;
-          case UnlinkedExprOperation.less:
-            _pushBinary(TokenType.LT);
-            break;
-          case UnlinkedExprOperation.lessEqual:
-            _pushBinary(TokenType.LT_EQ);
-            break;
-          // prefix
-          case UnlinkedExprOperation.complement:
-            _pushPrefix(TokenType.TILDE);
-            break;
-          case UnlinkedExprOperation.negate:
-            _pushPrefix(TokenType.MINUS);
-            break;
-          case UnlinkedExprOperation.not:
-            _pushPrefix(TokenType.BANG);
-            break;
-          // conditional
-          case UnlinkedExprOperation.conditional:
-            Expression elseExpr = _pop();
-            Expression thenExpr = _pop();
-            Expression condition = _pop();
-            _push(AstTestFactory.conditionalExpression(
-                condition, thenExpr, elseExpr));
-            break;
-          case UnlinkedExprOperation.invokeMethodRef:
-            _pushInvokeMethodRef();
-            break;
-          case UnlinkedExprOperation.invokeMethod:
-            List<Expression> arguments = _buildArguments();
-            TypeArgumentList typeArguments = _buildTypeArguments();
-            Expression target = _pop();
-            String name = uc.strings[stringPtr++];
-            _push(AstTestFactory.methodInvocation3(
-                target, name, typeArguments, arguments));
-            break;
-          // containers
-          case UnlinkedExprOperation.makeUntypedList:
-            _pushList(null);
-            break;
-          case UnlinkedExprOperation.makeTypedList:
-            TypeAnnotation itemType = _newTypeName();
-            _pushList(
-                AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
-            break;
-          case UnlinkedExprOperation.makeUntypedMap:
-            _pushMap(null);
-            break;
-          case UnlinkedExprOperation.makeTypedMap:
-            TypeAnnotation keyType = _newTypeName();
-            TypeAnnotation valueType = _newTypeName();
-            _pushMap(AstTestFactory.typeArgumentList(
-                <TypeAnnotation>[keyType, valueType]));
-            break;
-          case UnlinkedExprOperation.pushReference:
-            _pushReference();
-            break;
-          case UnlinkedExprOperation.extractProperty:
-            _pushExtractProperty();
-            break;
-          case UnlinkedExprOperation.invokeConstructor:
-            _pushInstanceCreation();
-            break;
-          case UnlinkedExprOperation.pushParameter:
-            String name = uc.strings[stringPtr++];
-            SimpleIdentifier identifier = AstTestFactory.identifier3(name);
-            identifier.staticElement = parametersInScope[name];
-            _push(identifier);
-            break;
-          case UnlinkedExprOperation.ifNull:
-            _pushBinary(TokenType.QUESTION_QUESTION);
-            break;
-          case UnlinkedExprOperation.await:
-            Expression expression = _pop();
-            _push(AstTestFactory.awaitExpression(expression));
-            break;
-          case UnlinkedExprOperation.pushLocalFunctionReference:
-            _pushLocalFunctionReference();
-            break;
-          case UnlinkedExprOperation.assignToRef:
-            var ref = _createReference();
-            _push(_createAssignment(ref));
-            break;
-          case UnlinkedExprOperation.typeCast:
-            Expression expression = _pop();
-            TypeAnnotation type = _newTypeName();
-            _push(AstTestFactory.asExpression(expression, type));
-            break;
-          case UnlinkedExprOperation.typeCheck:
-            Expression expression = _pop();
-            TypeAnnotation type = _newTypeName();
-            _push(AstTestFactory.isExpression(expression, false, type));
-            break;
-          case UnlinkedExprOperation.throwException:
-            Expression expression = _pop();
-            _push(AstTestFactory.throwExpression2(expression));
-            break;
-          case UnlinkedExprOperation.assignToProperty:
-            Expression target = _pop();
-            String name = uc.strings[stringPtr++];
-            SimpleIdentifier propertyNode = AstTestFactory.identifier3(name);
-            PropertyAccess propertyAccess =
-                AstTestFactory.propertyAccess(target, propertyNode);
-            _push(_createAssignment(propertyAccess));
-            break;
-          case UnlinkedExprOperation.assignToIndex:
-            Expression index = _pop();
-            Expression target = _pop();
-            IndexExpression indexExpression =
-                AstTestFactory.indexExpression(target, index);
-            _push(_createAssignment(indexExpression));
-            break;
-          case UnlinkedExprOperation.extractIndex:
-            Expression index = _pop();
-            Expression target = _pop();
-            _push(AstTestFactory.indexExpression(target, index));
-            break;
-          case UnlinkedExprOperation.pushSuper:
-          case UnlinkedExprOperation.pushThis:
-            throw const _InvalidConstantException(); // TODO(paulberry)
-          case UnlinkedExprOperation.cascadeSectionBegin:
-          case UnlinkedExprOperation.cascadeSectionEnd:
-          case UnlinkedExprOperation.pushLocalFunctionReference:
-          case UnlinkedExprOperation.pushError:
-          case UnlinkedExprOperation.pushTypedAbstract:
-          case UnlinkedExprOperation.pushUntypedAbstract:
-            throw new UnimplementedError(
-                'Unexpected $operation in a constant expression.');
-        }
+    for (UnlinkedExprOperation operation in _uc.operations) {
+      switch (operation) {
+        case UnlinkedExprOperation.pushNull:
+          _push(AstTestFactory.nullLiteral());
+          break;
+        // bool
+        case UnlinkedExprOperation.pushFalse:
+          _push(AstTestFactory.booleanLiteral(false));
+          break;
+        case UnlinkedExprOperation.pushTrue:
+          _push(AstTestFactory.booleanLiteral(true));
+          break;
+        // literals
+        case UnlinkedExprOperation.pushInt:
+          int value = _uc.ints[intPtr++];
+          _push(AstTestFactory.integer(value));
+          break;
+        case UnlinkedExprOperation.pushLongInt:
+          int value = 0;
+          int count = _uc.ints[intPtr++];
+          for (int i = 0; i < count; i++) {
+            int next = _uc.ints[intPtr++];
+            value = value << 32 | next;
+          }
+          _push(AstTestFactory.integer(value));
+          break;
+        case UnlinkedExprOperation.pushDouble:
+          double value = _uc.doubles[doublePtr++];
+          _push(AstTestFactory.doubleLiteral(value));
+          break;
+        case UnlinkedExprOperation.makeSymbol:
+          String component = _uc.strings[stringPtr++];
+          _push(AstTestFactory.symbolLiteral([component]));
+          break;
+        // String
+        case UnlinkedExprOperation.pushString:
+          String value = _uc.strings[stringPtr++];
+          _push(AstTestFactory.string2(value));
+          break;
+        case UnlinkedExprOperation.concatenate:
+          int count = _uc.ints[intPtr++];
+          List<InterpolationElement> elements = <InterpolationElement>[];
+          for (int i = 0; i < count; i++) {
+            Expression expr = _pop();
+            InterpolationElement element = _newInterpolationElement(expr);
+            elements.insert(0, element);
+          }
+          _push(AstTestFactory.string(elements));
+          break;
+        // binary
+        case UnlinkedExprOperation.equal:
+          _pushBinary(TokenType.EQ_EQ);
+          break;
+        case UnlinkedExprOperation.notEqual:
+          _pushBinary(TokenType.BANG_EQ);
+          break;
+        case UnlinkedExprOperation.and:
+          _pushBinary(TokenType.AMPERSAND_AMPERSAND);
+          break;
+        case UnlinkedExprOperation.or:
+          _pushBinary(TokenType.BAR_BAR);
+          break;
+        case UnlinkedExprOperation.bitXor:
+          _pushBinary(TokenType.CARET);
+          break;
+        case UnlinkedExprOperation.bitAnd:
+          _pushBinary(TokenType.AMPERSAND);
+          break;
+        case UnlinkedExprOperation.bitOr:
+          _pushBinary(TokenType.BAR);
+          break;
+        case UnlinkedExprOperation.bitShiftLeft:
+          _pushBinary(TokenType.LT_LT);
+          break;
+        case UnlinkedExprOperation.bitShiftRight:
+          _pushBinary(TokenType.GT_GT);
+          break;
+        case UnlinkedExprOperation.add:
+          _pushBinary(TokenType.PLUS);
+          break;
+        case UnlinkedExprOperation.subtract:
+          _pushBinary(TokenType.MINUS);
+          break;
+        case UnlinkedExprOperation.multiply:
+          _pushBinary(TokenType.STAR);
+          break;
+        case UnlinkedExprOperation.divide:
+          _pushBinary(TokenType.SLASH);
+          break;
+        case UnlinkedExprOperation.floorDivide:
+          _pushBinary(TokenType.TILDE_SLASH);
+          break;
+        case UnlinkedExprOperation.modulo:
+          _pushBinary(TokenType.PERCENT);
+          break;
+        case UnlinkedExprOperation.greater:
+          _pushBinary(TokenType.GT);
+          break;
+        case UnlinkedExprOperation.greaterEqual:
+          _pushBinary(TokenType.GT_EQ);
+          break;
+        case UnlinkedExprOperation.less:
+          _pushBinary(TokenType.LT);
+          break;
+        case UnlinkedExprOperation.lessEqual:
+          _pushBinary(TokenType.LT_EQ);
+          break;
+        // prefix
+        case UnlinkedExprOperation.complement:
+          _pushPrefix(TokenType.TILDE);
+          break;
+        case UnlinkedExprOperation.negate:
+          _pushPrefix(TokenType.MINUS);
+          break;
+        case UnlinkedExprOperation.not:
+          _pushPrefix(TokenType.BANG);
+          break;
+        // conditional
+        case UnlinkedExprOperation.conditional:
+          Expression elseExpr = _pop();
+          Expression thenExpr = _pop();
+          Expression condition = _pop();
+          _push(AstTestFactory.conditionalExpression(
+              condition, thenExpr, elseExpr));
+          break;
+        case UnlinkedExprOperation.invokeMethodRef:
+          _pushInvokeMethodRef();
+          break;
+        case UnlinkedExprOperation.invokeMethod:
+          List<Expression> arguments = _buildArguments();
+          TypeArgumentList typeArguments = _buildTypeArguments();
+          Expression target = _pop();
+          String name = _uc.strings[stringPtr++];
+          _push(AstTestFactory.methodInvocation3(
+              target, name, typeArguments, arguments));
+          break;
+        // containers
+        case UnlinkedExprOperation.makeUntypedList:
+          _pushList(null);
+          break;
+        case UnlinkedExprOperation.makeTypedList:
+          TypeAnnotation itemType = _newTypeName();
+          _pushList(
+              AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
+          break;
+        case UnlinkedExprOperation.makeUntypedMap:
+          _pushMap(null);
+          break;
+        case UnlinkedExprOperation.makeTypedMap:
+          TypeAnnotation keyType = _newTypeName();
+          TypeAnnotation valueType = _newTypeName();
+          _pushMap(AstTestFactory.typeArgumentList(
+              <TypeAnnotation>[keyType, valueType]));
+          break;
+        case UnlinkedExprOperation.makeUntypedSet:
+          _pushSet(null);
+          break;
+        case UnlinkedExprOperation.makeTypedSet:
+          TypeAnnotation itemType = _newTypeName();
+          _pushSet(AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
+          break;
+        case UnlinkedExprOperation.pushReference:
+          _pushReference();
+          break;
+        case UnlinkedExprOperation.extractProperty:
+          _pushExtractProperty();
+          break;
+        case UnlinkedExprOperation.invokeConstructor:
+          _pushInstanceCreation();
+          break;
+        case UnlinkedExprOperation.pushParameter:
+          String name = _uc.strings[stringPtr++];
+          SimpleIdentifier identifier = AstTestFactory.identifier3(name);
+          identifier.staticElement = parametersInScope[name];
+          _push(identifier);
+          break;
+        case UnlinkedExprOperation.ifNull:
+          _pushBinary(TokenType.QUESTION_QUESTION);
+          break;
+        case UnlinkedExprOperation.await:
+          Expression expression = _pop();
+          _push(AstTestFactory.awaitExpression(expression));
+          break;
+        case UnlinkedExprOperation.pushLocalFunctionReference:
+          _pushLocalFunctionReference();
+          break;
+        case UnlinkedExprOperation.assignToRef:
+          var ref = _createReference();
+          _push(_createAssignment(ref));
+          break;
+        case UnlinkedExprOperation.typeCast:
+          Expression expression = _pop();
+          TypeAnnotation type = _newTypeName();
+          _push(AstTestFactory.asExpression(expression, type));
+          break;
+        case UnlinkedExprOperation.typeCheck:
+          Expression expression = _pop();
+          TypeAnnotation type = _newTypeName();
+          _push(AstTestFactory.isExpression(expression, false, type));
+          break;
+        case UnlinkedExprOperation.throwException:
+          Expression expression = _pop();
+          _push(AstTestFactory.throwExpression2(expression));
+          break;
+        case UnlinkedExprOperation.assignToProperty:
+          Expression target = _pop();
+          String name = _uc.strings[stringPtr++];
+          SimpleIdentifier propertyNode = AstTestFactory.identifier3(name);
+          PropertyAccess propertyAccess =
+              AstTestFactory.propertyAccess(target, propertyNode);
+          _push(_createAssignment(propertyAccess));
+          break;
+        case UnlinkedExprOperation.assignToIndex:
+          Expression index = _pop();
+          Expression target = _pop();
+          IndexExpression indexExpression =
+              AstTestFactory.indexExpression(target, index);
+          _push(_createAssignment(indexExpression));
+          break;
+        case UnlinkedExprOperation.extractIndex:
+          Expression index = _pop();
+          Expression target = _pop();
+          _push(AstTestFactory.indexExpression(target, index));
+          break;
+        case UnlinkedExprOperation.pushSuper:
+          _push(AstTestFactory.superExpression());
+          break;
+        case UnlinkedExprOperation.pushThis:
+          _push(AstTestFactory.thisExpression());
+          break;
+        case UnlinkedExprOperation.cascadeSectionBegin:
+        case UnlinkedExprOperation.cascadeSectionEnd:
+        case UnlinkedExprOperation.pushLocalFunctionReference:
+        case UnlinkedExprOperation.pushError:
+        case UnlinkedExprOperation.pushTypedAbstract:
+        case UnlinkedExprOperation.pushUntypedAbstract:
+          throw new UnimplementedError(
+              'Unexpected $operation in a constant expression.');
       }
-    } on _InvalidConstantException {
-      return AstTestFactory.identifier3(r'#invalidConst');
     }
     return stack.single;
   }
@@ -288,13 +296,13 @@
   List<Expression> _buildArguments() {
     List<Expression> arguments;
     {
-      int numNamedArgs = uc.ints[intPtr++];
-      int numPositionalArgs = uc.ints[intPtr++];
+      int numNamedArgs = _uc.ints[intPtr++];
+      int numPositionalArgs = _uc.ints[intPtr++];
       int numArgs = numNamedArgs + numPositionalArgs;
       arguments = _removeTopItems(numArgs);
       // add names to the named arguments
       for (int i = 0; i < numNamedArgs; i++) {
-        String name = uc.strings[stringPtr++];
+        String name = _uc.strings[stringPtr++];
         int index = numPositionalArgs + i;
         arguments[index] =
             AstTestFactory.namedExpression2(name, arguments[index]);
@@ -324,7 +332,7 @@
       constructorName.name?.staticElement = constructorElement;
 
       var creation = astFactory.instanceCreationExpression(
-          uc.isValidConst
+          _uc.isValidConst
               ? TokenFactory.tokenFromKeyword(Keyword.CONST)
               : TokenFactory.tokenFromKeyword(Keyword.NEW),
           constructorName,
@@ -430,16 +438,13 @@
         ..staticElement = element;
       return AstTestFactory.identifier(enclosing, identifier);
     }
-    if (requireValidConst && element == null) {
-      throw const _InvalidConstantException();
-    }
     SimpleIdentifier property = AstTestFactory.identifier3(info.name)
       ..staticElement = element;
     return AstTestFactory.propertyAccess(enclosing, property);
   }
 
   TypeArgumentList _buildTypeArguments() {
-    int numTypeArguments = uc.ints[intPtr++];
+    int numTypeArguments = _uc.ints[intPtr++];
     if (numTypeArguments == 0) {
       return null;
     }
@@ -480,7 +485,7 @@
       return AstTestFactory.postfixExpression(lhs, tokenType);
     }
 
-    switch (uc.assignmentOperators[assignmentOperatorPtr++]) {
+    switch (_uc.assignmentOperators[assignmentOperatorPtr++]) {
       case UnlinkedExprAssignOperator.assign:
         return binary(TokenType.EQ);
       case UnlinkedExprAssignOperator.ifNull:
@@ -521,13 +526,17 @@
   }
 
   Expression _createReference() {
-    EntityRef ref = uc.references[refPtr++];
-    ReferenceInfo info = resynthesizer.getReferenceInfo(ref.reference);
-    Expression node = _buildIdentifierSequence(info);
-    if (requireValidConst && node is Identifier && node.staticElement == null) {
-      throw const _InvalidConstantException();
+    EntityRef ref = _uc.references[refPtr++];
+    if (ref.paramReference != 0) {
+      // This is a reference to a type parameter.  For type inference purposes
+      // we don't actually need to know which type parameter it's a reference
+      // to; we just need to know that it represents a type.  So map it to
+      // `Object`.
+      return AstTestFactory.identifier3('Object')
+        ..staticElement = resynthesizer.typeProvider.objectType.element;
     }
-    return node;
+    ReferenceInfo info = resynthesizer.getReferenceInfo(ref.reference);
+    return _buildIdentifierSequence(info);
   }
 
   PropertyAccessorElement _getStringLengthElement() =>
@@ -564,7 +573,7 @@
    * corresponding to this type.
    */
   TypeAnnotation _newTypeName() {
-    EntityRef typeRef = uc.references[refPtr++];
+    EntityRef typeRef = _uc.references[refPtr++];
     DartType type = resynthesizer.buildType(context, typeRef);
     return _buildTypeAst(type);
   }
@@ -583,7 +592,7 @@
 
   void _pushExtractProperty() {
     Expression target = _pop();
-    String name = uc.strings[stringPtr++];
+    String name = _uc.strings[stringPtr++];
     SimpleIdentifier propertyNode = AstTestFactory.identifier3(name);
     // Only String.length property access can be potentially resolved.
     if (name == 'length') {
@@ -593,7 +602,7 @@
   }
 
   void _pushInstanceCreation() {
-    EntityRef ref = uc.references[refPtr++];
+    EntityRef ref = _uc.references[refPtr++];
     ReferenceInfo info = resynthesizer.getReferenceInfo(ref.reference);
     // prepare ConstructorElement
     TypeName typeNode;
@@ -605,11 +614,11 @@
       } else if (info.element is ClassElement) {
         constructorName = null;
       } else {
-        List<Expression> arguments = _buildArguments();
-        SimpleIdentifier name = AstTestFactory.identifier3(info.name);
-        name.staticElement = info.element;
-        name.setProperty(ARGUMENT_LIST, AstTestFactory.argumentList(arguments));
-        _push(name);
+        // Unexpected element, consider it unresolved.
+        _buildArguments();
+        var identifier = AstTestFactory.identifier3('__unresolved__')
+          ..staticType = resynthesizer.typeProvider.dynamicType;
+        _push(identifier);
         return;
       }
       InterfaceType definingType = resynthesizer.createConstructorDefiningType(
@@ -657,9 +666,6 @@
       constructorNode = AstTestFactory.constructorName(typeNode, null);
     }
     constructorNode.staticElement = constructorElement;
-    if (constructorElement == null) {
-      throw const _InvalidConstantException();
-    }
     // create InstanceCreationExpression
     InstanceCreationExpression instanceCreation =
         AstTestFactory.instanceCreationExpression(
@@ -672,7 +678,7 @@
 
   void _pushInvokeMethodRef() {
     List<Expression> arguments = _buildArguments();
-    EntityRef ref = uc.references[refPtr++];
+    EntityRef ref = _uc.references[refPtr++];
     ReferenceInfo info = resynthesizer.getReferenceInfo(ref.reference);
     Expression node = _buildIdentifierSequence(info);
     TypeArgumentList typeArguments = _buildTypeArguments();
@@ -706,7 +712,7 @@
   }
 
   void _pushList(TypeArgumentList typeArguments) {
-    int count = uc.ints[intPtr++];
+    int count = _uc.ints[intPtr++];
     List<Expression> elements = <Expression>[];
     for (int i = 0; i < count; i++) {
       elements.insert(0, _pop());
@@ -720,11 +726,10 @@
   }
 
   void _pushLocalFunctionReference() {
-    _throwIfConst();
-    int popCount = uc.ints[intPtr++];
+    int popCount = _uc.ints[intPtr++];
     // Note: nonzero popCount is no longer used.
     assert(popCount == 0);
-    int functionIndex = uc.ints[intPtr++];
+    int functionIndex = _uc.ints[intPtr++];
     var localFunction = localFunctions[functionIndex];
     var parametersInScope =
         new Map<String, ParameterElement>.from(this.parametersInScope);
@@ -761,14 +766,14 @@
       functionBody = astFactory.expressionFunctionBody(asyncKeyword,
           TokenFactory.tokenFromType(TokenType.FUNCTION), bodyExpr, null);
     }
-    var functionExpression = astFactory.functionExpression(
+    FunctionExpressionImpl functionExpression = astFactory.functionExpression(
         null, AstTestFactory.formalParameterList(parameters), functionBody);
-    functionExpression.element = functionElement;
+    functionExpression.declaredElement = functionElement;
     _push(functionExpression);
   }
 
   void _pushMap(TypeArgumentList typeArguments) {
-    int count = uc.ints[intPtr++];
+    int count = _uc.ints[intPtr++];
     List<MapLiteralEntry> entries = <MapLiteralEntry>[];
     for (int i = 0; i < count; i++) {
       Expression value = _pop();
@@ -796,6 +801,15 @@
     _push(_createReference());
   }
 
+  void _pushSet(TypeArgumentList typeArguments) {
+    int count = _uc.ints[intPtr++];
+    List<Expression> elements = <Expression>[];
+    for (int i = 0; i < count; i++) {
+      elements.insert(0, _pop());
+    }
+    _push(AstTestFactory.setLiteral(Keyword.CONST, typeArguments, elements));
+  }
+
   List<Expression> _removeTopItems(int count) {
     int start = stack.length - count;
     int end = stack.length;
@@ -804,12 +818,6 @@
     return items;
   }
 
-  void _throwIfConst() {
-    if (requireValidConst) {
-      throw const _InvalidConstantException();
-    }
-  }
-
   /// Figures out the default value of [parametersInScope] based on [context].
   ///
   /// If [context] is (or contains) a constructor, then its parameters are used.
@@ -827,11 +835,3 @@
     return result;
   }
 }
-
-/**
- * This exception is thrown when we detect that the constant expression
- * being resynthesized is not a valid constant expression.
- */
-class _InvalidConstantException {
-  const _InvalidConstantException();
-}
diff --git a/pkg/analyzer/lib/src/summary/flat_buffers.dart b/pkg/analyzer/lib/src/summary/flat_buffers.dart
index 3449a3b..c291d61 100644
--- a/pkg/analyzer/lib/src/summary/flat_buffers.dart
+++ b/pkg/analyzer/lib/src/summary/flat_buffers.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -757,7 +757,7 @@
 /**
  * List of booleans backed by 8-bit unsigned integers.
  */
-class _FbBoolList extends Object with ListMixin<bool> implements List<bool> {
+class _FbBoolList with ListMixin<bool> implements List<bool> {
   final BufferContext bc;
   final int offset;
   int _length;
@@ -829,7 +829,7 @@
 /**
  * The base class for immutable lists read from flat buffers.
  */
-abstract class _FbList<E> extends Object with ListMixin<E> implements List<E> {
+abstract class _FbList<E> with ListMixin<E> implements List<E> {
   final BufferContext bc;
   final int offset;
   int _length;
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 0a66bae..3c8019c 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -8291,6 +8291,7 @@
   bool _isValidConst;
   List<idl.UnlinkedExprOperation> _operations;
   List<EntityRefBuilder> _references;
+  String _sourceRepresentation;
   List<String> _strings;
 
   @override
@@ -8352,6 +8353,15 @@
   }
 
   @override
+  String get sourceRepresentation => _sourceRepresentation ??= '';
+
+  /// String representation of the expression in a form suitable to be tokenized
+  /// and parsed.
+  void set sourceRepresentation(String value) {
+    this._sourceRepresentation = value;
+  }
+
+  @override
   List<String> get strings => _strings ??= <String>[];
 
   /// Sequence of strings consumed by the operations `pushString` and
@@ -8367,6 +8377,7 @@
       bool isValidConst,
       List<idl.UnlinkedExprOperation> operations,
       List<EntityRefBuilder> references,
+      String sourceRepresentation,
       List<String> strings})
       : _assignmentOperators = assignmentOperators,
         _doubles = doubles,
@@ -8374,6 +8385,7 @@
         _isValidConst = isValidConst,
         _operations = operations,
         _references = references,
+        _sourceRepresentation = sourceRepresentation,
         _strings = strings;
 
   /**
@@ -8436,6 +8448,7 @@
         signature.addInt(x.index);
       }
     }
+    signature.addString(this._sourceRepresentation ?? '');
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
@@ -8444,6 +8457,7 @@
     fb.Offset offset_ints;
     fb.Offset offset_operations;
     fb.Offset offset_references;
+    fb.Offset offset_sourceRepresentation;
     fb.Offset offset_strings;
     if (!(_assignmentOperators == null || _assignmentOperators.isEmpty)) {
       offset_assignmentOperators = fbBuilder
@@ -8463,6 +8477,10 @@
       offset_references = fbBuilder
           .writeList(_references.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_sourceRepresentation != null) {
+      offset_sourceRepresentation =
+          fbBuilder.writeString(_sourceRepresentation);
+    }
     if (!(_strings == null || _strings.isEmpty)) {
       offset_strings = fbBuilder
           .writeList(_strings.map((b) => fbBuilder.writeString(b)).toList());
@@ -8486,6 +8504,9 @@
     if (offset_references != null) {
       fbBuilder.addOffset(2, offset_references);
     }
+    if (offset_sourceRepresentation != null) {
+      fbBuilder.addOffset(7, offset_sourceRepresentation);
+    }
     if (offset_strings != null) {
       fbBuilder.addOffset(3, offset_strings);
     }
@@ -8515,6 +8536,7 @@
   bool _isValidConst;
   List<idl.UnlinkedExprOperation> _operations;
   List<idl.EntityRef> _references;
+  String _sourceRepresentation;
   List<String> _strings;
 
   @override
@@ -8563,6 +8585,13 @@
   }
 
   @override
+  String get sourceRepresentation {
+    _sourceRepresentation ??=
+        const fb.StringReader().vTableGet(_bc, _bcOffset, 7, '');
+    return _sourceRepresentation;
+  }
+
+  @override
   List<String> get strings {
     _strings ??= const fb.ListReader<String>(const fb.StringReader())
         .vTableGet(_bc, _bcOffset, 3, const <String>[]);
@@ -8590,6 +8619,8 @@
     if (references.isNotEmpty)
       _result["references"] =
           references.map((_value) => _value.toJson()).toList();
+    if (sourceRepresentation != '')
+      _result["sourceRepresentation"] = sourceRepresentation;
     if (strings.isNotEmpty) _result["strings"] = strings;
     return _result;
   }
@@ -8602,6 +8633,7 @@
         "isValidConst": isValidConst,
         "operations": operations,
         "references": references,
+        "sourceRepresentation": sourceRepresentation,
         "strings": strings,
       };
 
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 4289b7f..5d328ce 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -107,6 +107,9 @@
   /// The synthetic `values` getter of an enum.
   enumValues,
 
+  /// The synthetic `toString` method of an enum.
+  enumToString,
+
   /// The containing unit itself.
   unit
 }
@@ -639,7 +642,19 @@
   pushThis,
 
   /// Push `super` expression onto the stack.
-  pushSuper
+  pushSuper,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), place them in a [Set], and push the result back
+  /// onto the stack.  The type parameter for the [Set] is implicitly
+  /// `dynamic`.
+  makeUntypedSet,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), place them in a [Set], and push the result back
+  /// onto the stack.  The type parameter for the [Set] is obtained from
+  /// [UnlinkedExpr.references].
+  makeTypedSet
 }
 
 /// Enum used to indicate the kind of a parameter.
@@ -1656,6 +1671,10 @@
   /// actual entity being referred to may be something other than a type.
   references:[EntityRef] (id: 2);
 
+  /// String representation of the expression in a form suitable to be tokenized
+  /// and parsed.
+  sourceRepresentation:string (id: 7);
+
   /// Sequence of strings consumed by the operations `pushString` and
   /// `invokeConstructor`.
   strings:[string] (id: 3);
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 8a85d55..d3dff59 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -502,6 +502,9 @@
   /// The synthetic `values` getter of an enum.
   enumValues,
 
+  /// The synthetic `toString` method of an enum.
+  enumToString,
+
   /// The containing unit itself.
   unit
 }
@@ -1528,6 +1531,11 @@
   @Id(2)
   List<EntityRef> get references;
 
+  /// String representation of the expression in a form suitable to be tokenized
+  /// and parsed.
+  @Id(7)
+  String get sourceRepresentation;
+
   /// Sequence of strings consumed by the operations `pushString` and
   /// `invokeConstructor`.
   @Id(3)
@@ -1954,6 +1962,18 @@
 
   /// Push `super` expression onto the stack.
   pushSuper,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), place them in a [Set], and push the result back
+  /// onto the stack.  The type parameter for the [Set] is implicitly
+  /// `dynamic`.
+  makeUntypedSet,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), place them in a [Set], and push the result back
+  /// onto the stack.  The type parameter for the [Set] is obtained from
+  /// [UnlinkedExpr.references].
+  makeTypedSet,
 }
 
 /// Unlinked summary information about an import declaration.
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index 7feaae8..b9b065e 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -1,7 +1,9 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/session.dart';
+
 /// This library is capable of producing linked summaries from unlinked
 /// ones (or prelinked ones).  It functions by building a miniature
 /// element model to represent the contents of the summaries, and then
@@ -416,14 +418,12 @@
   AnalysisOptionsForLink(this._linker);
 
   @override
-  bool get declarationCasts => true;
-
-  @override
   bool get hint => false;
 
   @override
   bool get implicitCasts => true;
 
+  @deprecated
   @override
   bool get previewDart2 => true;
 
@@ -439,7 +439,7 @@
 
 /// Element representing a class or enum resynthesized from a summary
 /// during linking.
-abstract class ClassElementForLink extends Object
+abstract class ClassElementForLink
     with ReferenceableElementForLink
     implements AbstractClassElementImpl {
   Map<String, ReferenceableElementForLink> _containedNames;
@@ -700,6 +700,9 @@
       _unlinkedClass.interfaces.map(_computeInterfaceType).toList();
 
   @override
+  bool get isAbstract => _unlinkedClass.isAbstract;
+
+  @override
   bool get isEnum => false;
 
   @override
@@ -800,6 +803,9 @@
   String get name => _unlinkedClass.name;
 
   @override
+  AnalysisSession get session => enclosingUnit.session;
+
+  @override
   List<InterfaceType> get superclassConstraints {
     if (_superclassConstraints == null) {
       if (isMixin) {
@@ -1008,6 +1014,9 @@
   bool get isMixin => false;
 
   @override
+  bool get isAbstract => false;
+
+  @override
   bool get isObject => false;
 
   @override
@@ -1229,6 +1238,9 @@
   ResynthesizerContext get resynthesizerContext => this;
 
   @override
+  AnalysisSession get session => library.session;
+
+  @override
   List<TopLevelVariableElementForLink> get topLevelVariables {
     if (_topLevelVariables == null) {
       List<Expression> initializerExpressionsForInference;
@@ -1908,6 +1920,7 @@
           break;
         case UnlinkedExprOperation.makeUntypedList:
         case UnlinkedExprOperation.makeUntypedMap:
+        case UnlinkedExprOperation.makeUntypedSet:
           intPtr++;
           break;
         case UnlinkedExprOperation.assignToRef:
@@ -1930,6 +1943,7 @@
           refPtr += numTypeArguments;
           break;
         case UnlinkedExprOperation.makeTypedList:
+        case UnlinkedExprOperation.makeTypedSet:
           refPtr++;
           intPtr++;
           break;
@@ -2221,7 +2235,7 @@
 
 /// Base class for executable elements resynthesized from a summary during
 /// linking.
-abstract class ExecutableElementForLink extends Object
+abstract class ExecutableElementForLink
     with TypeParameterizedElementMixin, ParameterParentElementForLink
     implements ExecutableElementImpl {
   /// The unlinked representation of the method in the summary.
@@ -2339,6 +2353,9 @@
   }
 
   @override
+  AnalysisSession get session => compilationUnit.session;
+
+  @override
   FunctionTypeImpl get type => _type ??= new FunctionTypeImpl(this);
 
   @override
@@ -2501,7 +2518,7 @@
         expression = AstCloner().cloneNode(expressionForInference);
         expression.accept(LocalElementBuilder(ElementHolder(), null));
       }
-    } else if (_builder.uc != null && _builder.uc.operations.isNotEmpty) {
+    } else if (_builder.hasNonEmptyExpr) {
       expression = _builder.build();
     }
     if (expression == null) {
@@ -2722,7 +2739,7 @@
 
 /// Element representing a function-typed parameter resynthesied from a summary
 /// during linking.
-class FunctionElementForLink_FunctionTypedParam extends Object
+class FunctionElementForLink_FunctionTypedParam
     with ParameterParentElementForLink
     implements FunctionElement {
   @override
@@ -2775,7 +2792,7 @@
 }
 
 /// Element representing the initializer expression of a variable.
-class FunctionElementForLink_Initializer extends Object
+class FunctionElementForLink_Initializer
     with ReferenceableElementForLink, TypeParameterizedElementMixin
     implements FunctionElementForLink_Local {
   /// The variable for which this element is the initializer.
@@ -3086,7 +3103,7 @@
 }
 
 /// Element representing a typedef resynthesized from a summary during linking.
-class FunctionTypeAliasElementForLink extends Object
+class FunctionTypeAliasElementForLink
     with
         TypeParameterizedElementMixin,
         ParameterParentElementForLink,
@@ -3147,6 +3164,9 @@
       enclosingElement.resolveTypeRef(this, _unlinkedTypedef.returnType);
 
   @override
+  AnalysisSession get session => enclosingElement.session;
+
+  @override
   TypeParameterizedElementMixin get typeParameterContext => this;
 
   @override
@@ -3198,7 +3218,7 @@
 
 /// Element representing a generic function resynthesized from a summary during
 /// linking.
-class GenericFunctionTypeElementForLink extends Object
+class GenericFunctionTypeElementForLink
     with
         TypeParameterizedElementMixin,
         ParameterParentElementForLink,
@@ -3262,6 +3282,9 @@
       _returnType ??= enclosingUnit.resolveTypeRef(this, _unlinkedReturnType);
 
   @override
+  AnalysisSession get session => enclosingElement.session;
+
+  @override
   FunctionType get type {
     return _type ??= new FunctionTypeImpl(this);
   }
@@ -3278,7 +3301,7 @@
 
 /// Element representing a generic typedef resynthesized from a summary during
 /// linking.
-class GenericTypeAliasElementForLink extends Object
+class GenericTypeAliasElementForLink
     with
         TypeParameterizedElementMixin,
         ParameterParentElementForLink,
@@ -3342,6 +3365,9 @@
       this, _unlinkedTypedef.returnType.syntheticReturnType);
 
   @override
+  AnalysisSession get session => enclosingElement.session;
+
+  @override
   TypeParameterizedElementMixin get typeParameterContext => this;
 
   @override
@@ -3962,7 +3988,7 @@
 
   /// Get an instance of [TypeSystem] for use during linking.
   TypeSystem get typeSystem =>
-      _typeSystem ??= new StrongTypeSystemImpl(typeProvider);
+      _typeSystem ??= new Dart2TypeSystem(typeProvider);
 
   /// Get the element representing `void`.
   SpecialTypeElementForLink get voidElement => _voidElement ??=
@@ -4075,8 +4101,7 @@
 /// Accesses to a chain of non-static members separated by '.' are handled by
 /// creating a [NonstaticMemberElementForLink] that points to another
 /// [NonstaticMemberElementForLink], to whatever nesting level is necessary.
-class NonstaticMemberElementForLink extends Object
-    with ReferenceableElementForLink {
+class NonstaticMemberElementForLink with ReferenceableElementForLink {
   /// The [ReferenceableElementForLink] which is the target of the non-static
   /// reference.
   final ReferenceableElementForLink _target;
@@ -4238,18 +4263,6 @@
     if (isExplicitlyCovariant || inheritsCovariant) {
       return true;
     }
-    for (UnlinkedExpr annotation in unlinkedParam.annotations) {
-      if (annotation.operations.length == 1 &&
-          annotation.operations[0] == UnlinkedExprOperation.pushReference) {
-        ReferenceableElementForLink element =
-            this.compilationUnit.resolveRef(annotation.references[0].reference);
-        if (element is PropertyAccessorElementForLink &&
-            element.name == 'checked' &&
-            element.library.name == 'meta') {
-          return true;
-        }
-      }
-    }
     return false;
   }
 
@@ -4455,7 +4468,7 @@
 
 /// Specialization of [PropertyAccessorElementForLink] for synthetic accessors
 /// implied by the synthetic fields of an enum declaration.
-class PropertyAccessorElementForLink_EnumField extends Object
+class PropertyAccessorElementForLink_EnumField
     with ReferenceableElementForLink
     implements PropertyAccessorElementForLink {
   @override
@@ -4472,6 +4485,9 @@
   Element get enclosingElement => variable.enclosingElement;
 
   @override
+  bool get isAbstract => false;
+
+  @override
   bool get isGetter => true;
 
   @override
@@ -4592,7 +4608,7 @@
 
 /// Specialization of [PropertyAccessorElementForLink] for synthetic accessors
 /// implied by a field or variable declaration.
-class PropertyAccessorElementForLink_Variable extends Object
+class PropertyAccessorElementForLink_Variable
     with ReferenceableElementForLink
     implements PropertyAccessorElementForLink {
   @override
@@ -4710,7 +4726,7 @@
 /// Base class representing an element which can be the target of a reference.
 /// When used as a mixin, implements the default behavior shared by most
 /// elements.
-abstract class ReferenceableElementForLink implements Element {
+mixin ReferenceableElementForLink implements Element {
   /// If this element is a class reference, return it. Otherwise return `null`.
   ClassElementForLink get asClass => null;
 
@@ -4989,8 +5005,7 @@
 }
 
 /// Element used for references to special types such as `void`.
-class SpecialTypeElementForLink extends Object
-    with ReferenceableElementForLink {
+class SpecialTypeElementForLink with ReferenceableElementForLink {
   final Linker linker;
   final DartType type;
 
@@ -5178,9 +5193,11 @@
           break;
         case UnlinkedExprOperation.makeUntypedList:
         case UnlinkedExprOperation.makeUntypedMap:
+        case UnlinkedExprOperation.makeUntypedSet:
           intPtr++;
           break;
         case UnlinkedExprOperation.makeTypedList:
+        case UnlinkedExprOperation.makeTypedSet:
           refPtr++;
           intPtr++;
           break;
@@ -5276,7 +5293,7 @@
             bodyType = (bodyType as InterfaceType).typeArguments[0];
           }
           bodyType = typeProvider.futureType
-              .instantiate([bodyType.flattenFutures(typeSystem)]);
+              .instantiate([typeSystem.flatten(bodyType)]);
         }
         functionElement._setInferredType(bodyType);
       }
@@ -5304,9 +5321,12 @@
   InterfaceType _iterableType;
   InterfaceType _listType;
   InterfaceType _mapType;
+  InterfaceType _mapNullNullType;
   InterfaceType _nullType;
   InterfaceType _numType;
   InterfaceType _objectType;
+  InterfaceType _setType;
+  InterfaceType _setNullType;
   InterfaceType _stackTraceType;
   InterfaceType _streamDynamicType;
   InterfaceType _streamType;
@@ -5375,6 +5395,10 @@
       _listType ??= _buildInterfaceType(_linker.coreLibrary, 'List');
 
   @override
+  InterfaceType get mapNullNullType =>
+      _mapNullNullType ??= mapType.instantiate(<DartType>[nullType, nullType]);
+
+  @override
   InterfaceType get mapType =>
       _mapType ??= _buildInterfaceType(_linker.coreLibrary, 'Map');
 
@@ -5397,6 +5421,14 @@
       _objectType ??= _buildInterfaceType(_linker.coreLibrary, 'Object');
 
   @override
+  InterfaceType get setNullType =>
+      _setNullType ??= setType.instantiate(<DartType>[nullType]);
+
+  @override
+  InterfaceType get setType =>
+      _setType ??= _buildInterfaceType(_linker.coreLibrary, 'Set');
+
+  @override
   InterfaceType get stackTraceType => _stackTraceType ??=
       _buildInterfaceType(_linker.coreLibrary, 'StackTrace');
 
@@ -5434,7 +5466,7 @@
 }
 
 /// Singleton element used for unresolved references.
-class UndefinedElementForLink extends Object with ReferenceableElementForLink {
+class UndefinedElementForLink with ReferenceableElementForLink {
   static final UndefinedElementForLink instance =
       new UndefinedElementForLink._();
 
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index 801ab29..dc9e818 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -1,6 +1,7 @@
 import 'dart:io' as io;
 import 'dart:math' show min;
 
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/cache.dart';
@@ -73,8 +74,9 @@
  */
 class InputPackagesResultProvider extends ResynthesizerResultProvider {
   InputPackagesResultProvider(
-      InternalAnalysisContext context, SummaryDataStore dataStore)
-      : super(context, dataStore) {
+      InternalAnalysisContext context, SummaryDataStore dataStore,
+      {AnalysisSession session})
+      : super(context, session, dataStore) {
     createResynthesizer();
     context.typeProvider = resynthesizer.typeProvider;
     resynthesizer.finishCoreAsyncLibraries();
@@ -167,11 +169,12 @@
  */
 abstract class ResynthesizerResultProvider extends ResultProvider {
   final InternalAnalysisContext context;
+  final AnalysisSession session;
   final SummaryDataStore _dataStore;
 
   StoreBasedSummaryResynthesizer _resynthesizer;
 
-  ResynthesizerResultProvider(this.context, this._dataStore);
+  ResynthesizerResultProvider(this.context, this.session, this._dataStore);
 
   SummaryResynthesizer get resynthesizer => _resynthesizer;
 
@@ -317,7 +320,7 @@
    */
   void createResynthesizer() {
     _resynthesizer = new StoreBasedSummaryResynthesizer(
-        context, context.sourceFactory, true, _dataStore);
+        context, session, context.sourceFactory, true, _dataStore);
   }
 
   /**
@@ -334,9 +337,13 @@
 class StoreBasedSummaryResynthesizer extends SummaryResynthesizer {
   final SummaryDataStore _dataStore;
 
-  StoreBasedSummaryResynthesizer(AnalysisContext context,
-      SourceFactory sourceFactory, bool _, this._dataStore)
-      : super(context, sourceFactory, true);
+  StoreBasedSummaryResynthesizer(
+      AnalysisContext context,
+      AnalysisSession session,
+      SourceFactory sourceFactory,
+      bool _,
+      this._dataStore)
+      : super(context, session, sourceFactory, true);
 
   @override
   LinkedLibrary getLinkedSummary(String uri) {
diff --git a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
index 4d78177..4c2e4db 100644
--- a/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
+++ b/pkg/analyzer/lib/src/summary/public_namespace_computer.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 2add257..ae35bf7 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -4,6 +4,7 @@
 
 import 'dart:collection';
 
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
@@ -171,8 +172,9 @@
   final Map<String, LibraryElement> _resynthesizedLibraries =
       <String, LibraryElement>{};
 
-  SummaryResynthesizer(AnalysisContext context, this.sourceFactory, bool _)
-      : super(context) {
+  SummaryResynthesizer(AnalysisContext context, AnalysisSession session,
+      this.sourceFactory, bool _)
+      : super(context, session) {
     _buildTypeProvider();
   }
 
@@ -327,7 +329,7 @@
       Source librarySource = _getSource(uri);
       if (serializedLibrary == null) {
         LibraryElementImpl libraryElement =
-            new LibraryElementImpl(context, '', -1, 0);
+            new LibraryElementImpl(context, session, '', -1, 0);
         libraryElement.isSynthetic = true;
         CompilationUnitElementImpl unitElement =
             new CompilationUnitElementImpl();
@@ -337,6 +339,7 @@
         libraryElement.createLoadLibraryFunction(typeProvider);
         libraryElement.publicNamespace = new Namespace({});
         libraryElement.exportNamespace = new Namespace({});
+        _resynthesizedUnits[uri] = {uri: unitElement};
         return libraryElement;
       }
       UnlinkedUnit unlinkedSummary = getUnlinkedSummary(uri);
@@ -519,7 +522,7 @@
 
 /// [UnitResynthesizerMixin] contains methods useful for implementing the
 /// [UnitResynthesizer] interface.
-abstract class UnitResynthesizerMixin implements UnitResynthesizer {
+mixin UnitResynthesizerMixin implements UnitResynthesizer {
   @override
   DartType createConstructorDefiningType(ElementImpl context,
       ReferenceInfo info, List<EntityRef> typeArgumentRefs) {
@@ -579,6 +582,9 @@
 
   @override
   ElementLocation get location => actualElement.location;
+
+  @override
+  AnalysisSession get session => enclosingElement.session;
 }
 
 /// Specialization of [LibraryResynthesizer] for resynthesis from linked
@@ -698,6 +704,7 @@
     bool hasName = unlinkedUnits[0].libraryName.isNotEmpty;
     library = new LibraryElementImpl.forSerialized(
         summaryResynthesizer.context,
+        summaryResynthesizer.session,
         unlinkedUnits[0].libraryName,
         hasName ? unlinkedUnits[0].libraryNameOffset : -1,
         unlinkedUnits[0].libraryNameLength,
@@ -1242,21 +1249,13 @@
     if (constExpr == null) {
       // Invalid constant expression.
     } else if (constExpr is Identifier) {
-      var element = constExpr.staticElement;
       ArgumentList arguments = constExpr.getProperty(ExprBuilder.ARGUMENT_LIST);
-      if (element is PropertyAccessorElement && arguments == null) {
-        elementAnnotation.element = element;
-        elementAnnotation.annotationAst = AstTestFactory.annotation(constExpr);
-      } else if (element is ConstructorElement && arguments != null) {
-        elementAnnotation.element = element;
-        elementAnnotation.annotationAst =
-            AstTestFactory.annotation2(constExpr, null, arguments);
-      } else {
-        elementAnnotation.annotationAst = AstTestFactory.annotation(
-            AstTestFactory.identifier3(r'#invalidConst'));
-      }
-    } else if (constExpr is InstanceCreationExpression) {
       elementAnnotation.element = constExpr.staticElement;
+      elementAnnotation.annotationAst =
+          AstTestFactory.annotation2(constExpr, null, arguments);
+    } else if (constExpr is InstanceCreationExpression) {
+      var element = constExpr.staticElement;
+      elementAnnotation.element = element;
       Identifier typeName = constExpr.constructorName.type.name;
       SimpleIdentifier constructorName = constExpr.constructorName.name;
       if (typeName is SimpleIdentifier && constructorName != null) {
@@ -1273,20 +1272,10 @@
       var propertyName = constExpr.propertyName;
       var propertyElement = propertyName.staticElement;
       ArgumentList arguments = constExpr.getProperty(ExprBuilder.ARGUMENT_LIST);
-      if (propertyElement is PropertyAccessorElement && arguments == null) {
-        elementAnnotation.element = propertyElement;
-        elementAnnotation.annotationAst =
-            AstTestFactory.annotation2(target, propertyName, null)
-              ..element = propertyElement;
-      } else if (propertyElement is ConstructorElement && arguments != null) {
-        elementAnnotation.element = propertyElement;
-        elementAnnotation.annotationAst =
-            AstTestFactory.annotation2(target, propertyName, arguments)
-              ..element = propertyElement;
-      } else {
-        elementAnnotation.annotationAst = AstTestFactory.annotation(
-            AstTestFactory.identifier3(r'#invalidConst'));
-      }
+      elementAnnotation.element = propertyElement;
+      elementAnnotation.annotationAst =
+          AstTestFactory.annotation2(target, propertyName, arguments)
+            ..element = propertyElement;
     } else {
       throw new StateError(
           'Unexpected annotation type: ${constExpr.runtimeType}');
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index ae126f3..df89a01 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -355,7 +355,7 @@
       } on StateError {
         return new UnlinkedExprBuilder()..isValidConst = false;
       }
-      return serializer.toBuilder();
+      return serializer.toBuilder(a.atSign.next, a.endToken);
     }).toList();
   }
 
@@ -486,7 +486,7 @@
     _ConstExprSerializer serializer = new _ConstExprSerializer(
         forConst, this, localClosureIndexMap, parameterNames);
     serializer.serialize(expression);
-    return serializer.toBuilder();
+    return serializer.toBuilder(expression.beginToken, expression.endToken);
   }
 
   /// Serialize a [Comment] node into an [UnlinkedDocumentationComment] object.
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index 6bb8870..0fc9762 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -58,6 +58,34 @@
   throw new StateError('Unexpected initializer type ${node.runtimeType}');
 }
 
+/// Converts all the tokens between [startToken] and [endToken] (inclusive) into
+/// a string which, when scanned, will yield the same tokens back.
+String tokensToString(Token startToken, Token endToken) {
+  var buffer = StringBuffer();
+  var token = startToken;
+  var spaceNeeded = false;
+  while (true) {
+    if (token.type == TokenType.STRING_INTERPOLATION_EXPRESSION) {
+      buffer.write(token.lexeme);
+      buffer.write(tokensToString(token.next, token.endGroup));
+      spaceNeeded = false;
+      token = token.endGroup;
+    } else if (token.type == TokenType.STRING_INTERPOLATION_IDENTIFIER) {
+      buffer.write(token.lexeme);
+      buffer.write(token.next.lexeme);
+      spaceNeeded = false;
+      token = token.next;
+    } else {
+      if (spaceNeeded) buffer.write(' ');
+      buffer.write(token.lexeme);
+      spaceNeeded = true;
+    }
+    if (identical(token, endToken)) break;
+    token = token.next;
+  }
+  return buffer.toString();
+}
+
 /// Instances of this class keep track of intermediate state during
 /// serialization of a single constant [Expression].
 abstract class AbstractConstExprSerializer {
@@ -175,7 +203,7 @@
 
   /// Return the [UnlinkedExprBuilder] that corresponds to the state of this
   /// serializer.
-  UnlinkedExprBuilder toBuilder() {
+  UnlinkedExprBuilder toBuilder(Token startToken, Token endToken) {
     return new UnlinkedExprBuilder(
         isValidConst: isValidConst,
         operations: operations,
@@ -183,7 +211,8 @@
         ints: ints,
         doubles: doubles,
         strings: strings,
-        references: references);
+        references: references,
+        sourceRepresentation: tokensToString(startToken, endToken));
   }
 
   /// Return `true` if the given [expr] is a sequence of identifiers.
@@ -317,6 +346,8 @@
       _serializeListLiteral(expr);
     } else if (expr is MapLiteral) {
       _serializeMapLiteral(expr);
+    } else if (expr is SetLiteral) {
+      _serializeSetLiteral(expr);
     } else if (expr is MethodInvocation) {
       _serializeMethodInvocation(expr);
     } else if (expr is BinaryExpression) {
@@ -621,6 +652,23 @@
     }
   }
 
+  void _serializeSetLiteral(SetLiteral expr) {
+    if (forConst || expr.typeArguments == null) {
+      List<Expression> elements = expr.elements;
+      elements.forEach(_serialize);
+      ints.add(elements.length);
+    } else {
+      ints.add(0);
+    }
+    if (expr.typeArguments != null &&
+        expr.typeArguments.arguments.length == 1) {
+      references.add(serializeType(expr.typeArguments.arguments[0]));
+      operations.add(UnlinkedExprOperation.makeTypedSet);
+    } else {
+      operations.add(UnlinkedExprOperation.makeUntypedSet);
+    }
+  }
+
   void _serializeString(StringLiteral expr) {
     if (expr is AdjacentStrings) {
       if (expr.strings.every((string) => string is SimpleStringLiteral)) {
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 9964703..ba4cc40 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -26,7 +26,7 @@
    * data that was previously not summarized), this value should be incremented
    * by 1.
    */
-  static const int currentMinorVersion = 0;
+  static const int currentMinorVersion = 1;
 
   final List<String> _linkedLibraryUris = <String>[];
   final List<LinkedLibraryBuilder> _linkedLibraries = <LinkedLibraryBuilder>[];
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index 9fc486b..b60e627 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -131,10 +131,13 @@
   InterfaceType _iterableType;
   InterfaceType _listType;
   InterfaceType _mapType;
+  InterfaceType _mapNullNullType;
   DartObjectImpl _nullObject;
   InterfaceType _nullType;
   InterfaceType _numType;
   InterfaceType _objectType;
+  InterfaceType _setType;
+  InterfaceType _setNullType;
   InterfaceType _stackTraceType;
   InterfaceType _streamDynamicType;
   InterfaceType _streamType;
@@ -247,6 +250,13 @@
   }
 
   @override
+  InterfaceType get mapNullNullType {
+    assert(_coreLibrary != null);
+    return _mapNullNullType ??=
+        mapType.instantiate(<DartType>[nullType, nullType]);
+  }
+
+  @override
   InterfaceType get mapType {
     assert(_coreLibrary != null);
     _mapType ??= _getType(_coreLibrary, "Map");
@@ -283,6 +293,18 @@
   }
 
   @override
+  InterfaceType get setNullType {
+    assert(_coreLibrary != null);
+    return _setNullType ??= setType.instantiate(<DartType>[nullType]);
+  }
+
+  @override
+  InterfaceType get setType {
+    assert(_coreLibrary != null);
+    return _setType ??= _getType(_coreLibrary, "Set");
+  }
+
+  @override
   InterfaceType get stackTraceType {
     assert(_coreLibrary != null);
     _stackTraceType ??= _getType(_coreLibrary, "StackTrace");
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 7e5c4bc..81198ab 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -13,6 +13,8 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/exception/exception.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/dart/ast/ast.dart'
@@ -1627,7 +1629,7 @@
     //
     if (libraryElement == null) {
       libraryElement =
-          new LibraryElementImpl.forNode(owningContext, libraryNameNode);
+          new LibraryElementImpl.forNode(owningContext, null, libraryNameNode);
       libraryElement.isSynthetic = modificationTime < 0;
       libraryElement.definingCompilationUnit = definingCompilationUnitElement;
       libraryElement.entryPoint = entryPoint;
@@ -2861,10 +2863,11 @@
     // Dart best practices.
     var inheritanceManager2 = new InheritanceManager2(context.typeSystem);
     TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
+    ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
 
     unit.accept(new BestPracticesVerifier(
         errorReporter, typeProvider, libraryElement,
-        typeSystem: typeSystem));
+        typeSystem: typeSystem, resourceProvider: resourceProvider));
     unit.accept(new OverrideVerifier(
       inheritanceManager2,
       libraryElement,
@@ -3235,7 +3238,7 @@
           "${variable.displayName} at $offset in $variableSource");
     }
     VariableDeclaration declaration =
-        node.getAncestor((AstNode ancestor) => ancestor is VariableDeclaration);
+        node.thisOrAncestorOfType<VariableDeclaration>();
     if (declaration == null || declaration.name != node) {
       Source variableSource = variable.source;
       Source unitSource =
@@ -5451,9 +5454,8 @@
     if (options.strongMode) {
       CodeChecker checker = new CodeChecker(
           typeProvider,
-          new StrongTypeSystemImpl(typeProvider,
-              implicitCasts: options.implicitCasts,
-              declarationCasts: options.declarationCasts),
+          new Dart2TypeSystem(typeProvider,
+              implicitCasts: options.implicitCasts),
           errorListener,
           options);
       checker.visitCompilationUnit(unit);
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index c1c96b6..8c56720 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -1,12 +1,15 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/source/error_processor.dart';
 import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
+import 'package:analyzer/src/analysis_options/error/option_codes.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -42,6 +45,7 @@
   static const String enableSuperMixins = 'enableSuperMixins';
   static const String enablePreviewDart2 = 'enablePreviewDart2';
 
+  static const String enableExperiment = 'enable-experiment';
   static const String errors = 'errors';
   static const String exclude = 'exclude';
   static const String include = 'include';
@@ -69,6 +73,7 @@
 
   /// Supported top-level `analyzer` options.
   static const List<String> topLevel = const [
+    enableExperiment,
     errors,
     exclude,
     language,
@@ -94,6 +99,7 @@
           new TopLevelAnalyzerOptionsValidator(),
           new StrongModeOptionValueValidator(),
           new ErrorFilterOptionValidator(),
+          new EnabledExperimentsValidator(),
           new LanguageOptionValidator()
         ]);
 }
@@ -109,6 +115,45 @@
       validators.forEach((v) => v.validate(reporter, options));
 }
 
+/// Validates `analyzer` language configuration options.
+class EnabledExperimentsValidator extends OptionsValidator {
+  ErrorBuilder builder = new ErrorBuilder(AnalyzerOptions.languageOptions);
+  ErrorBuilder trueOrFalseBuilder = new TrueOrFalseValueErrorBuilder();
+
+  @override
+  void validate(ErrorReporter reporter, YamlMap options) {
+    var analyzer = getValue(options, AnalyzerOptions.analyzer);
+    if (analyzer is YamlMap) {
+      var experimentNames =
+          getValue(analyzer, AnalyzerOptions.enableExperiment);
+      if (experimentNames is YamlList) {
+        var flags =
+            experimentNames.nodes.map((node) => node.toString()).toList();
+        for (var validationResult in validateFlags(flags)) {
+          var flagIndex = validationResult.stringIndex;
+          var span = experimentNames.nodes[flagIndex].span;
+          if (validationResult is UnrecognizedFlag) {
+            reporter.reportErrorForSpan(
+                AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITHOUT_VALUES,
+                span,
+                [AnalyzerOptions.enableExperiment, flags[flagIndex]]);
+          } else {
+            reporter.reportErrorForSpan(
+                AnalysisOptionsWarningCode.INVALID_OPTION,
+                span,
+                [AnalyzerOptions.enableExperiment, validationResult.message]);
+          }
+        }
+      } else if (experimentNames != null) {
+        reporter.reportErrorForSpan(
+            AnalysisOptionsWarningCode.INVALID_SECTION_FORMAT,
+            experimentNames.span,
+            [AnalyzerOptions.enableExperiment]);
+      }
+    }
+  }
+}
+
 /// Builds error reports with value proposals.
 class ErrorBuilder {
   String proposal;
@@ -578,10 +623,24 @@
       var strongMode = getValue(analyzer, AnalyzerOptions.strong_mode);
       _applyStrongOptions(options, strongMode);
 
-      // Set filters.
+      // Process filters.
       var filters = getValue(analyzer, AnalyzerOptions.errors);
       _applyProcessors(options, filters);
 
+      // Process enabled experiments.
+      var experimentNames =
+          getValue(analyzer, AnalyzerOptions.enableExperiment);
+      if (experimentNames is YamlList) {
+        List<String> enabledExperiments = <String>[];
+        for (var element in experimentNames.nodes) {
+          String experimentName = _toString(element);
+          if (experimentName != null) {
+            enabledExperiments.add(experimentName);
+          }
+        }
+        options.enabledExperiments = enabledExperiments;
+      }
+
       // Process language options.
       var language = getValue(analyzer, AnalyzerOptions.language);
       _applyLanguageOptions(options, language);
@@ -661,9 +720,6 @@
       AnalysisOptionsImpl options, String feature, Object value) {
     bool boolValue = toBool(value);
     if (boolValue != null) {
-      if (feature == AnalyzerOptions.declarationCasts) {
-        options.declarationCasts = boolValue;
-      }
       if (feature == AnalyzerOptions.implicitCasts) {
         options.implicitCasts = boolValue;
       }
diff --git a/pkg/analyzer/lib/src/task/strong/ast_properties.dart b/pkg/analyzer/lib/src/task/strong/ast_properties.dart
index 7fd42485..d2fea4e 100644
--- a/pkg/analyzer/lib/src/task/strong/ast_properties.dart
+++ b/pkg/analyzer/lib/src/task/strong/ast_properties.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,17 +6,37 @@
 ///
 /// These properties are not public, but provided by use of back-ends such as
 /// Dart Dev Compiler.
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 
-const String _hasImplicitCasts = '_hasImplicitCasts';
-const String _implicitOperationCast = '_implicitAssignmentCast';
-const String _implicitCast = '_implicitCast';
-const String _isDynamicInvoke = '_isDynamicInvoke';
 const String _classCovariantParameters = '_classCovariantParameters';
-const String _superclassCovariantParameters = '_superclassCovariantParameters';
 const String _covariantPrivateMembers = '_covariantPrivateMembers';
+const String _hasImplicitCasts = '_hasImplicitCasts';
+const String _implicitCast = '_implicitCast';
+const String _implicitOperationCast = '_implicitAssignmentCast';
+const String _isDynamicInvoke = '_isDynamicInvoke';
+const String _superclassCovariantParameters = '_superclassCovariantParameters';
+
+/// Returns a list of parameters and method type parameters in this class
+/// declaration that need a check at runtime to ensure soundness.
+Set<Element> getClassCovariantParameters(Declaration node) {
+  return node.getProperty(_classCovariantParameters);
+}
+
+/// Gets the private setters and methods that are accessed unsafely from
+/// this compilation unit.
+///
+/// These members will require a check.
+Set<ExecutableElement> getCovariantPrivateMembers(CompilationUnit node) {
+  return node.getProperty(_covariantPrivateMembers);
+}
+
+/// If this expression has an implicit cast, returns the type it is coerced to,
+/// otherwise returns null.
+DartType getImplicitCast(Expression node) {
+  return node.getProperty<DartType>(_implicitCast);
+}
 
 /// If this expression needs an implicit cast on a subexpression that cannot be
 /// expressed anywhere else, returns the type it is coerced to.
@@ -28,10 +48,11 @@
   return node.getProperty<DartType>(_implicitOperationCast);
 }
 
-/// If this expression has an implicit cast, returns the type it is coerced to,
-/// otherwise returns null.
-DartType getImplicitCast(Expression node) {
-  return node.getProperty<DartType>(_implicitCast);
+/// Returns a list of parameters and method type parameters from mixins and
+/// superclasses of this class that need a stub method to check their type at
+/// runtime for soundness.
+Set<Element> getSuperclassCovariantParameters(Declaration node) {
+  return node.getProperty(_superclassCovariantParameters);
 }
 
 /// True if this compilation unit has any implicit casts, otherwise false.
@@ -47,59 +68,38 @@
   return node.getProperty<bool>(_isDynamicInvoke) ?? false;
 }
 
+/// Sets [getClassCovariantParameters] property for this class.
+void setClassCovariantParameters(Declaration node, Set<Element> value) {
+  node.setProperty(_classCovariantParameters, value);
+}
+
+/// Sets [getCovariantPrivateMembers] property for this compilation unit.
+void setCovariantPrivateMembers(
+    CompilationUnit node, Set<ExecutableElement> value) {
+  node.setProperty(_covariantPrivateMembers, value);
+}
+
 /// Sets [hasImplicitCasts] property for this compilation unit.
 void setHasImplicitCasts(CompilationUnit node, bool value) {
   node.setProperty(_hasImplicitCasts, value == true ? true : null);
 }
 
-/// Sets the result of [getImplicitOperationCast] for this node.
-void setImplicitOperationCast(Expression node, DartType type) {
-  node.setProperty(_implicitOperationCast, type);
-}
-
 /// Sets the result of [getImplicitCast] for this node.
 void setImplicitCast(Expression node, DartType type) {
   node.setProperty(_implicitCast, type);
 }
 
+/// Sets the result of [getImplicitOperationCast] for this node.
+void setImplicitOperationCast(Expression node, DartType type) {
+  node.setProperty(_implicitOperationCast, type);
+}
+
 /// Sets [isDynamicInvoke] property for this expression.
 void setIsDynamicInvoke(Expression node, bool value) {
   node.setProperty(_isDynamicInvoke, value == true ? true : null);
 }
 
-/// Returns a list of parameters and method type parameters in this class
-/// declaration that need a check at runtime to ensure soundness.
-Set<Element> getClassCovariantParameters(Declaration node) {
-  return node.getProperty(_classCovariantParameters);
-}
-
-/// Sets [getClassCovariantParameters] property for this class.
-void setClassCovariantParameters(Declaration node, Set<Element> value) {
-  node.setProperty(_classCovariantParameters, value);
-}
-
-/// Returns a list of parameters and method type parameters from mixins and
-/// superclasses of this class that need a stub method to check their type at
-/// runtime for soundness.
-Set<Element> getSuperclassCovariantParameters(Declaration node) {
-  return node.getProperty(_superclassCovariantParameters);
-}
-
 /// Sets [getSuperclassCovariantParameters] property for this class.
 void setSuperclassCovariantParameters(Declaration node, Set<Element> value) {
   node.setProperty(_superclassCovariantParameters, value);
 }
-
-/// Gets the private setters and methods that are accessed unsafely from
-/// this compilation unit.
-///
-/// These members will require a check.
-Set<ExecutableElement> getCovariantPrivateMembers(CompilationUnit node) {
-  return node.getProperty(_covariantPrivateMembers);
-}
-
-/// Sets [getCovariantPrivateMembers] property for this compilation unit.
-void setCovariantPrivateMembers(
-    CompilationUnit node, Set<ExecutableElement> value) {
-  node.setProperty(_covariantPrivateMembers, value);
-}
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index a830600..3583fb3 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -6,7 +6,6 @@
 // refactored to fit into analyzer.
 import 'dart:collection';
 
-import 'package:analyzer/analyzer.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/token.dart' show TokenType;
@@ -14,7 +13,10 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/source/error_processor.dart' show ErrorProcessor;
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -110,7 +112,7 @@
 
 /// Checks the body of functions and properties.
 class CodeChecker extends RecursiveAstVisitor {
-  final StrongTypeSystemImpl rules;
+  final Dart2TypeSystem rules;
   final TypeProvider typeProvider;
   final AnalysisErrorListener reporter;
   final AnalysisOptionsImpl _options;
@@ -120,7 +122,7 @@
   bool _hasImplicitCasts;
   HashSet<ExecutableElement> _covariantPrivateMembers;
 
-  CodeChecker(TypeProvider typeProvider, StrongTypeSystemImpl rules,
+  CodeChecker(TypeProvider typeProvider, Dart2TypeSystem rules,
       AnalysisErrorListener reporter, this._options)
       : typeProvider = typeProvider,
         rules = rules,
@@ -156,34 +158,17 @@
     checkForCast(expr, type);
   }
 
-  void checkDeclarationCast(Expression expr, DartType type) {
-    checkForCast(expr, type, isDeclarationCast: true);
-  }
-
-  void checkForCast(Expression expr, DartType type,
-      {bool isDeclarationCast = false}) {
-    if (expr is ParenthesizedExpression) {
-      checkForCast(expr.expression, type);
-    } else {
-      _checkImplicitCast(expr, type, isDeclarationCast: isDeclarationCast);
-    }
-  }
-
   /// Analyzer checks boolean conversions, but we need to check too, because
   /// it uses the default assignability rules that allow `dynamic` and `Object`
   /// to be assigned to bool with no message.
   void checkBoolean(Expression expr) =>
       checkAssignment(expr, typeProvider.boolType);
 
-  void _checkFunctionApplication(InvocationExpression node) {
-    var ft = _getTypeAsCaller(node);
-
-    if (_isDynamicCall(node, ft)) {
-      // If f is Function and this is a method invocation, we should have
-      // gotten an analyzer error, so no need to issue another error.
-      _recordDynamicInvoke(node, node.function);
+  void checkForCast(Expression expr, DartType type) {
+    if (expr is ParenthesizedExpression) {
+      checkForCast(expr.expression, type);
     } else {
-      checkArgumentList(node.argumentList, ft);
+      _checkImplicitCast(expr, type);
     }
   }
 
@@ -305,7 +290,6 @@
     }
   }
 
-  // Check invocations
   @override
   void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     var field = node.fieldName;
@@ -315,6 +299,7 @@
     node.visitChildren(this);
   }
 
+  // Check invocations
   @override
   void visitDefaultFormalParameter(DefaultFormalParameter node) {
     // Check that defaults have the proper subtype.
@@ -391,7 +376,7 @@
         // Insert a cast from the sequence's element type to the loop variable's
         // if needed.
         _checkImplicitCast(loopVariable, _getExpressionType(loopVariable),
-            from: elementType, isDeclarationCast: true);
+            from: elementType);
       }
     }
 
@@ -517,7 +502,9 @@
   visitMethodInvocation(MethodInvocation node) {
     var target = node.realTarget;
     var element = node.methodName.staticElement;
-    if (element == null && !typeProvider.isObjectMethod(node.methodName.name)) {
+    if (element == null &&
+        !typeProvider.isObjectMethod(node.methodName.name) &&
+        node.methodName.name != FunctionElement.CALL_METHOD_NAME) {
       _recordDynamicInvoke(node, target);
 
       // Mark the tear-off as being dynamic, too. This lets us distinguish
@@ -535,7 +522,9 @@
       // we call [checkFunctionApplication].
       setIsDynamicInvoke(node.methodName, true);
     } else {
-      _checkImplicitCovarianceCast(node, target, element);
+      var invokeType = (node as MethodInvocationImpl).methodNameType;
+      _checkImplicitCovarianceCast(node, target, element,
+          invokeType is FunctionType ? invokeType : null);
       _checkFunctionApplication(node);
     }
     // Don't visit methodName, we already checked things related to the call.
@@ -630,11 +619,11 @@
   void visitVariableDeclarationList(VariableDeclarationList node) {
     TypeAnnotation type = node.type;
 
-    for (VariableDeclaration variable in node.variables) {
-      var initializer = variable.initializer;
-      if (initializer != null) {
-        if (type != null) {
-          checkDeclarationCast(initializer, type.type);
+    if (type != null) {
+      for (VariableDeclaration variable in node.variables) {
+        var initializer = variable.initializer;
+        if (initializer != null) {
+          checkForCast(initializer, type.type);
         }
       }
     }
@@ -695,13 +684,57 @@
   void _checkFieldAccess(
       AstNode node, Expression target, SimpleIdentifier field) {
     var element = field.staticElement;
-    _checkImplicitCovarianceCast(node, target, element);
+    var invokeType = element is ExecutableElement ? element.type : null;
+    _checkImplicitCovarianceCast(node, target, element, invokeType);
     if (element == null && !typeProvider.isObjectMember(field.name)) {
       _recordDynamicInvoke(node, target);
     }
     node.visitChildren(this);
   }
 
+  void _checkFunctionApplication(InvocationExpression node) {
+    var ft = _getTypeAsCaller(node);
+
+    if (_isDynamicCall(node, ft)) {
+      // If f is Function and this is a method invocation, we should have
+      // gotten an analyzer error, so no need to issue another error.
+      _recordDynamicInvoke(node, node.function);
+    } else {
+      checkArgumentList(node.argumentList, ft);
+    }
+  }
+
+  /// Given an expression [expr] of type [fromType], returns true if an implicit
+  /// downcast is required, false if it is not, or null if the types are
+  /// unrelated.
+  bool _checkFunctionTypeCasts(
+      Expression expr, FunctionType to, DartType fromType) {
+    bool callTearoff = false;
+    FunctionType from;
+    if (fromType is FunctionType) {
+      from = fromType;
+    } else if (fromType is InterfaceType) {
+      from = rules.getCallMethodType(fromType);
+      callTearoff = true;
+    }
+    if (from == null) {
+      return null; // unrelated
+    }
+
+    if (rules.isSubtypeOf(from, to)) {
+      // Sound subtype.
+      // However we may still need cast if we have a call tearoff.
+      return callTearoff;
+    }
+
+    if (rules.isSubtypeOf(to, from)) {
+      // Assignable, but needs cast.
+      return true;
+    }
+
+    return null;
+  }
+
   /// Checks if an implicit cast of [expr] from [from] type to [to] type is
   /// needed, and if so records it.
   ///
@@ -710,19 +743,99 @@
   /// If [expr] does not require an implicit cast because it is not related to
   /// [to] or is already a subtype of it, does nothing.
   void _checkImplicitCast(Expression expr, DartType to,
-      {DartType from, bool opAssign: false, bool isDeclarationCast: false}) {
+      {DartType from, bool opAssign: false}) {
     from ??= _getExpressionType(expr);
 
-    if (_needsImplicitCast(expr, to,
-            from: from, isDeclarationCast: isDeclarationCast) ==
-        true) {
+    if (_needsImplicitCast(expr, to, from: from) == true) {
       _recordImplicitCast(expr, to, from: from, opAssign: opAssign);
     }
   }
 
+  /// If we're calling into [element] through the [target], we may need to
+  /// insert a caller side check for soundness on the result of the expression
+  /// [node].  The [invokeType] is the type of the [element] in the [target].
+  ///
+  /// This happens when [target] is an unsafe covariant interface, and [element]
+  /// could return a type that is not a subtype of the expected static type
+  /// given target's type. For example:
+  ///
+  ///     typedef F<T>(T t);
+  ///     class C<T> {
+  ///       F<T> f;
+  ///       C(this.f);
+  ///     }
+  ///     test1() {
+  ///       C<Object> c = new C<int>((int x) => x + 42));
+  ///       F<Object> f = c.f; // need an implicit cast here.
+  ///       f('hello');
+  ///     }
+  ///
+  /// Here target is `c`, the target type is `C<Object>`, the member is
+  /// `get f() -> F<T>`, and the expression node is `c.f`. When we call `c.f`
+  /// the expected static result is `F<Object>`. However `c.f` actually returns
+  /// `F<int>`, which is not a subtype of `F<Object>`. So this method will add
+  /// an implicit cast `(c.f as F<Object>)` to guard against this case.
+  ///
+  /// Note that it is possible for the cast to succeed, for example:
+  /// `new C<int>((Object x) => '$x'))`. It is safe to pass any object to that
+  /// function, including an `int`.
+  void _checkImplicitCovarianceCast(Expression node, Expression target,
+      Element element, FunctionType invokeType) {
+    // If we're calling an instance method or getter, then we
+    // want to check the result type.
+    //
+    // We intentionally ignore method tear-offs, because those methods have
+    // covariance checks for their parameters inside the method.
+    var targetType = target?.staticType;
+    if (element is ExecutableElement &&
+        _isInstanceMember(element) &&
+        targetType is InterfaceType &&
+        targetType.typeArguments.isNotEmpty &&
+        !_targetHasKnownGenericTypeArguments(target)) {
+      // Track private setters/method calls. We can sometimes eliminate the
+      // parameter check in code generation, if it was never needed.
+      // This member will need a check, however, because we are calling through
+      // an unsafe target.
+      if (element.isPrivate && element.parameters.isNotEmpty) {
+        _covariantPrivateMembers
+            .add(element is ExecutableMember ? element.baseElement : element);
+      }
+
+      // Get the lower bound of the declared return type (e.g. `F<Null>`) and
+      // see if it can be assigned to the expected type (e.g. `F<Object>`).
+      //
+      // That way we can tell if any lower `T` will work or not.
+      var classType = targetType.element.type;
+      var classLowerBound = classType.instantiate(new List.filled(
+          classType.typeParameters.length, typeProvider.nullType));
+      var memberLowerBound = _lookUpMember(classLowerBound, element).type;
+      var expectedType = invokeType.returnType;
+
+      if (!rules.isSubtypeOf(memberLowerBound.returnType, expectedType)) {
+        var isMethod = element is MethodElement;
+        var isCall = node is MethodInvocation;
+
+        if (isMethod && !isCall) {
+          // If `o.m` is a method tearoff, cast to the method type.
+          setImplicitCast(node, invokeType);
+        } else if (!isMethod && isCall) {
+          // If `o.g()` is calling a field/getter `g`, we need to cast `o.g`
+          // before the call: `(o.g as expectedType)(args)`.
+          // This cannot be represented by an `as` node without changing the
+          // Dart AST structure, so we record it as a special cast.
+          setImplicitOperationCast(node, expectedType);
+        } else {
+          // For method calls `o.m()` or getters `o.g`, simply cast the result.
+          setImplicitCast(node, expectedType);
+        }
+        _hasImplicitCasts = true;
+      }
+    }
+  }
+
   void _checkReturnOrYield(Expression expression, AstNode node,
       {bool yieldStar: false}) {
-    FunctionBody body = node.getAncestor((n) => n is FunctionBody);
+    FunctionBody body = node.thisOrAncestorOfType<FunctionBody>();
     var type = _getExpectedReturnType(body, yieldStar: yieldStar);
     if (type == null) {
       // We have a type mismatch: the async/async*/sync* modifier does
@@ -777,144 +890,6 @@
     }
   }
 
-  DartType _getExpressionType(Expression expr) =>
-      getExpressionType(expr, rules, typeProvider);
-
-  /// If we're calling into [member] through the [target], we may need to
-  /// insert a caller side check for soundness on the result of the expression
-  /// [node].
-  ///
-  /// This happens when [target] is an unsafe covariant interface, and [member]
-  /// could return a type that is not a subtype of the expected static type
-  /// given target's type. For example:
-  ///
-  ///     typedef F<T>(T t);
-  ///     class C<T> {
-  ///       F<T> f;
-  ///       C(this.f);
-  ///     }
-  ///     test1() {
-  ///       C<Object> c = new C<int>((int x) => x + 42));
-  ///       F<Object> f = c.f; // need an implicit cast here.
-  ///       f('hello');
-  ///     }
-  ///
-  /// Here target is `c`, the target type is `C<Object>`, the member is
-  /// `get f() -> F<T>`, and the expression node is `c.f`. When we call `c.f`
-  /// the expected static result is `F<Object>`. However `c.f` actually returns
-  /// `F<int>`, which is not a subtype of `F<Object>`. So this method will add
-  /// an implicit cast `(c.f as F<Object>)` to guard against this case.
-  ///
-  /// Note that it is possible for the cast to succeed, for example:
-  /// `new C<int>((Object x) => '$x'))`. It is safe to pass any object to that
-  /// function, including an `int`.
-  void _checkImplicitCovarianceCast(
-      Expression node, Expression target, Element member) {
-    // If we're calling an instance method or getter, then we
-    // want to check the result type.
-    //
-    // We intentionally ignore method tear-offs, because those methods have
-    // covariance checks for their parameters inside the method.
-    var targetType = target?.staticType;
-    if (member is ExecutableElement &&
-        _isInstanceMember(member) &&
-        targetType is InterfaceType &&
-        targetType.typeArguments.isNotEmpty &&
-        !_targetHasKnownGenericTypeArguments(target)) {
-      // Track private setters/method calls. We can sometimes eliminate the
-      // parameter check in code generation, if it was never needed.
-      // This member will need a check, however, because we are calling through
-      // an unsafe target.
-      if (member.isPrivate && member.parameters.isNotEmpty) {
-        _covariantPrivateMembers
-            .add(member is ExecutableMember ? member.baseElement : member);
-      }
-
-      // Get the lower bound of the declared return type (e.g. `F<Null>`) and
-      // see if it can be assigned to the expected type (e.g. `F<Object>`).
-      //
-      // That way we can tell if any lower `T` will work or not.
-      var classType = targetType.element.type;
-      var classLowerBound = classType.instantiate(new List.filled(
-          classType.typeParameters.length, typeProvider.nullType));
-      var memberLowerBound = _lookUpMember(classLowerBound, member).type;
-      var expectedType = member.returnType;
-
-      if (!rules.isSubtypeOf(memberLowerBound.returnType, expectedType)) {
-        var isMethod = member is MethodElement;
-        var isCall = node is MethodInvocation;
-
-        if (isMethod && !isCall) {
-          // If `o.m` is a method tearoff, cast to the method type.
-          setImplicitCast(node, member.type);
-        } else if (!isMethod && isCall) {
-          // If `o.g()` is calling a field/getter `g`, we need to cast `o.g`
-          // before the call: `(o.g as expectedType)(args)`.
-          // This cannot be represented by an `as` node without changing the
-          // Dart AST structure, so we record it as a special cast.
-          setImplicitOperationCast(node, expectedType);
-        } else {
-          // For method calls `o.m()` or getters `o.g`, simply cast the result.
-          setImplicitCast(node, expectedType);
-        }
-        _hasImplicitCasts = true;
-      }
-    }
-  }
-
-  /// Returns true if we can safely skip the covariance checks because [target]
-  /// has known type arguments, such as `this` `super` or a non-factory `new`.
-  ///
-  /// For example:
-  ///
-  ///     class C<T> {
-  ///       T _t;
-  ///     }
-  ///     class D<T> extends C<T> {
-  ///        method<S extends T>(T t, C<T> c) {
-  ///          // implicit cast: t as T;
-  ///          // implicit cast: c as C<T>;
-  ///
-  ///          // These do not need further checks. The type parameter `T` for
-  ///          // `this` must be the same as our `T`
-  ///          this._t = t;
-  ///          super._t = t;
-  ///          new C<T>()._t = t; // non-factory
-  ///
-  ///          // This needs further checks. The type of `c` could be `C<S>` for
-  ///          // some `S <: T`.
-  ///          c._t = t;
-  ///          // factory statically returns `C<T>`, dynamically returns `C<S>`.
-  ///          new F<T, S>()._t = t;
-  ///        }
-  ///     }
-  ///     class F<T, S extends T> extends C<T> {
-  ///       factory F() => new C<S>();
-  ///     }
-  ///
-  bool _targetHasKnownGenericTypeArguments(Expression target) {
-    return target == null || // implicit this
-        target is ThisExpression ||
-        target is SuperExpression ||
-        target is InstanceCreationExpression &&
-            target.staticElement?.isFactory == false;
-  }
-
-  bool _isInstanceMember(ExecutableElement e) =>
-      !e.isStatic &&
-      (e is MethodElement ||
-          e is PropertyAccessorElement && e.variable is FieldElement);
-
-  ExecutableElement _lookUpMember(InterfaceType type, ExecutableElement e) {
-    var name = e.name;
-    var library = e.library;
-    return e is PropertyAccessorElement
-        ? (e.isGetter
-            ? type.lookUpInheritedGetter(name, library: library)
-            : type.lookUpInheritedSetter(name, library: library))
-        : type.lookUpInheritedMethod(name, library: library);
-  }
-
   /// Gets the expected return type of the given function [body], either from
   /// a normal return/yield, or from a yield*.
   DartType _getExpectedReturnType(FunctionBody body, {bool yieldStar: false}) {
@@ -971,6 +946,9 @@
     }
   }
 
+  DartType _getExpressionType(Expression expr) =>
+      getExpressionType(expr, rules, typeProvider);
+
   /// Given an expression, return its type assuming it is
   /// in the caller position of a call (that is, accounting
   /// for the possibility of a call method).  Returns null
@@ -991,35 +969,28 @@
     return ft == null;
   }
 
-  /// Given an expression [expr] of type [fromType], returns true if an implicit
-  /// downcast is required, false if it is not, or null if the types are
-  /// unrelated.
-  bool _checkFunctionTypeCasts(
-      Expression expr, FunctionType to, DartType fromType) {
-    bool callTearoff = false;
-    FunctionType from;
-    if (fromType is FunctionType) {
-      from = fromType;
-    } else if (fromType is InterfaceType) {
-      from = rules.getCallMethodType(fromType);
-      callTearoff = true;
-    }
-    if (from == null) {
-      return null; // unrelated
-    }
+  bool _isInstanceMember(ExecutableElement e) =>
+      !e.isStatic &&
+      (e is MethodElement ||
+          e is PropertyAccessorElement && e.variable is FieldElement);
 
-    if (rules.isSubtypeOf(from, to)) {
-      // Sound subtype.
-      // However we may still need cast if we have a call tearoff.
-      return callTearoff;
-    }
+  ExecutableElement _lookUpMember(InterfaceType type, ExecutableElement e) {
+    var name = e.name;
+    var library = e.library;
+    return e is PropertyAccessorElement
+        ? (e.isGetter
+            ? type.lookUpInheritedGetter(name, library: library)
+            : type.lookUpInheritedSetter(name, library: library))
+        : type.lookUpInheritedMethod(name, library: library);
+  }
 
-    if (rules.isSubtypeOf(to, from)) {
-      // Assignable, but needs cast.
-      return true;
+  void _markImplicitCast(Expression expr, DartType to, {bool opAssign: false}) {
+    if (opAssign) {
+      setImplicitOperationCast(expr, to);
+    } else {
+      setImplicitCast(expr, to);
     }
-
-    return null;
+    _hasImplicitCasts = true;
   }
 
   /// Returns true if we need an implicit cast of [expr] from [from] type to
@@ -1029,8 +1000,7 @@
   /// downcast implicitly).
   ///
   /// If [from] is omitted, uses the static type of [expr]
-  bool _needsImplicitCast(Expression expr, DartType to,
-      {DartType from, bool isDeclarationCast: false}) {
+  bool _needsImplicitCast(Expression expr, DartType to, {DartType from}) {
     from ??= _getExpressionType(expr);
 
     // Void is considered Top, but may only be *explicitly* cast.
@@ -1047,7 +1017,7 @@
     }
 
     // Down cast or legal sideways cast, coercion needed.
-    if (rules.isAssignableTo(from, to, isDeclarationCast: isDeclarationCast)) {
+    if (rules.isAssignableTo(from, to)) {
       return true;
     }
 
@@ -1074,15 +1044,6 @@
     if (target != null) setIsDynamicInvoke(target, true);
   }
 
-  void _markImplicitCast(Expression expr, DartType to, {bool opAssign: false}) {
-    if (opAssign) {
-      setImplicitOperationCast(expr, to);
-    } else {
-      setImplicitCast(expr, to);
-    }
-    _hasImplicitCasts = true;
-  }
-
   /// Records an implicit cast for the [expr] from [from] to [to].
   ///
   /// This will emit the appropriate error/warning/hint message as well as mark
@@ -1109,6 +1070,9 @@
       } else if (expr is MapLiteral) {
         _recordMessage(
             expr, StrongModeCode.INVALID_CAST_LITERAL_MAP, [from, to]);
+      } else if (expr is SetLiteral) {
+        _recordMessage(
+            expr, StrongModeCode.INVALID_CAST_LITERAL_SET, [from, to]);
       } else {
         _recordMessage(
             expr, StrongModeCode.INVALID_CAST_LITERAL, [expr, from, to]);
@@ -1207,6 +1171,44 @@
     }
   }
 
+  /// Returns true if we can safely skip the covariance checks because [target]
+  /// has known type arguments, such as `this` `super` or a non-factory `new`.
+  ///
+  /// For example:
+  ///
+  ///     class C<T> {
+  ///       T _t;
+  ///     }
+  ///     class D<T> extends C<T> {
+  ///        method<S extends T>(T t, C<T> c) {
+  ///          // implicit cast: t as T;
+  ///          // implicit cast: c as C<T>;
+  ///
+  ///          // These do not need further checks. The type parameter `T` for
+  ///          // `this` must be the same as our `T`
+  ///          this._t = t;
+  ///          super._t = t;
+  ///          new C<T>()._t = t; // non-factory
+  ///
+  ///          // This needs further checks. The type of `c` could be `C<S>` for
+  ///          // some `S <: T`.
+  ///          c._t = t;
+  ///          // factory statically returns `C<T>`, dynamically returns `C<S>`.
+  ///          new F<T, S>()._t = t;
+  ///        }
+  ///     }
+  ///     class F<T, S extends T> extends C<T> {
+  ///       factory F() => new C<S>();
+  ///     }
+  ///
+  bool _targetHasKnownGenericTypeArguments(Expression target) {
+    return target == null || // implicit this
+        target is ThisExpression ||
+        target is SuperExpression ||
+        target is InstanceCreationExpression &&
+            target.staticElement?.isFactory == false;
+  }
+
   void _validateTopLevelInitializer(String name, Expression n) {
     n.accept(new _TopLevelInitializerValidator(this, name));
   }
@@ -1216,7 +1218,7 @@
 /// check overrides between classes and superclasses, interfaces, and mixin
 /// applications.
 class _OverrideChecker {
-  final StrongTypeSystemImpl rules;
+  final Dart2TypeSystem rules;
 
   _OverrideChecker(CodeChecker checker) : rules = checker.rules;
 
@@ -1229,6 +1231,36 @@
     _checkForCovariantGenerics(node, element);
   }
 
+  /// Visits each member on the class [node] and calls [checkMember] with the
+  /// corresponding instance element and AST node (for error reporting).
+  ///
+  /// See also [_checkTypeMembers], which is used when the class AST node is not
+  /// available.
+  void _checkClassMembers(Declaration node,
+      void checkMember(ExecutableElement member, ClassMember location)) {
+    for (var member in _classMembers(node)) {
+      if (member is FieldDeclaration) {
+        if (member.isStatic) {
+          continue;
+        }
+        for (var variable in member.fields.variables) {
+          var element = variable.declaredElement as PropertyInducingElement;
+          checkMember(element.getter, member);
+          if (!variable.isFinal && !variable.isConst) {
+            checkMember(element.setter, member);
+          }
+        }
+      } else if (member is MethodDeclaration) {
+        if (member.isStatic) {
+          continue;
+        }
+        checkMember(member.declaredElement, member);
+      } else {
+        assert(member is ConstructorDeclaration);
+      }
+    }
+  }
+
   /// Finds implicit casts that we need on parameters and type formals to
   /// ensure soundness of covariant generics, and records them on the [node].
   ///
@@ -1273,86 +1305,24 @@
     setSuperclassCovariantParameters(node, checks);
   }
 
-  /// For each member of this class and non-overridden inherited member, we
-  /// check to see if any generic super interface permits an unsound call to the
-  /// concrete member. For example:
+  /// Visits the [type] and calls [checkMember] for each instance member.
   ///
-  /// We must check non-overridden inherited members because this class could
-  /// contain a new interface that permits unsound access to that member. In
-  /// those cases, the class is expected to insert stub that checks the type
-  /// before calling `super`. For example:
-  ///
-  ///     class C<T> {
-  ///       add(T t) {}
-  ///     }
-  ///     class D {
-  ///       add(int t) {}
-  ///     }
-  ///     class E extends D implements C<int> {
-  ///       // C<Object>.add is unsafe, and D.m is marked for a check.
-  ///       //
-  ///       // one way to implement this is to generate a stub method:
-  ///       // add(t) => super.add(t as int);
-  ///     }
-  ///
-  Set<Element> _findSuperclassCovariantChecks(ClassElement element,
-      Set<ClassElement> allCovariant, HashSet<String> seenConcreteMembers) {
-    var visited = new HashSet<ClassElement>()..add(element);
-    var superChecks = _createCovariantCheckSet();
-    var existingChecks = _createCovariantCheckSet();
-
-    void visitImmediateSuper(InterfaceType type) {
-      // For members of mixins/supertypes, check them against new interfaces,
-      // and also record any existing checks they already had.
-      var oldCovariant = _findAllGenericInterfaces(type);
-      var newCovariant = allCovariant.difference(oldCovariant);
-      if (newCovariant.isEmpty) return;
-
-      void visitSuper(InterfaceType type) {
-        var element = type.element;
-        if (visited.add(element)) {
-          var members = _getConcreteMembers(type, seenConcreteMembers);
-          _findCovariantChecks(members, newCovariant, superChecks);
-          _findCovariantChecks(members, oldCovariant, existingChecks);
-          element.mixins.reversed.forEach(visitSuper);
-          var s = element.supertype;
-          if (s != null) visitSuper(s);
-        }
-      }
-
-      visitSuper(type);
+  /// See also [_checkClassMembers], which should be used when the class AST
+  /// node is available to allow for better error locations
+  void _checkTypeMembers(
+      InterfaceType type, void checkMember(ExecutableElement member)) {
+    void checkHelper(ExecutableElement e) {
+      if (!e.isStatic) checkMember(e);
     }
 
-    element.mixins.reversed.forEach(visitImmediateSuper);
-    var s = element.supertype;
-    if (s != null) visitImmediateSuper(s);
-
-    superChecks.removeAll(existingChecks);
-    return superChecks;
+    type.methods.forEach(checkHelper);
+    type.accessors.forEach(checkHelper);
   }
 
-  /// Gets all concrete instance members declared on this type, skipping already
-  /// [seenConcreteMembers] and adding any found ones to it.
-  ///
-  /// By tracking the set of seen members, we can visit superclasses and mixins
-  /// and ultimately collect every most-derived member exposed by a given type.
-  static List<ExecutableElement> _getConcreteMembers(
-      InterfaceType type, HashSet<String> seenConcreteMembers) {
-    var members = <ExecutableElement>[];
-    for (var declaredMembers in [type.accessors, type.methods]) {
-      for (var member in declaredMembers) {
-        // We only visit each most derived concrete member.
-        // To avoid visiting an overridden superclass member, we skip members
-        // we've seen, and visit starting from the class, then mixins in
-        // reverse order, then superclasses.
-        if (!member.isStatic &&
-            !member.isAbstract &&
-            seenConcreteMembers.add(member.name)) {
-          members.add(member);
-        }
-      }
-    }
-    return members;
+  /// If node is a [ClassDeclaration] returns its members, otherwise if node is
+  /// a [ClassTypeAlias] this returns an empty list.
+  Iterable<ClassMember> _classMembers(Declaration node) {
+    return node is ClassDeclaration ? node.members : [];
   }
 
   /// Find all covariance checks on parameters/type parameters needed for
@@ -1453,6 +1423,64 @@
     });
   }
 
+  /// For each member of this class and non-overridden inherited member, we
+  /// check to see if any generic super interface permits an unsound call to the
+  /// concrete member. For example:
+  ///
+  /// We must check non-overridden inherited members because this class could
+  /// contain a new interface that permits unsound access to that member. In
+  /// those cases, the class is expected to insert stub that checks the type
+  /// before calling `super`. For example:
+  ///
+  ///     class C<T> {
+  ///       add(T t) {}
+  ///     }
+  ///     class D {
+  ///       add(int t) {}
+  ///     }
+  ///     class E extends D implements C<int> {
+  ///       // C<Object>.add is unsafe, and D.m is marked for a check.
+  ///       //
+  ///       // one way to implement this is to generate a stub method:
+  ///       // add(t) => super.add(t as int);
+  ///     }
+  ///
+  Set<Element> _findSuperclassCovariantChecks(ClassElement element,
+      Set<ClassElement> allCovariant, HashSet<String> seenConcreteMembers) {
+    var visited = new HashSet<ClassElement>()..add(element);
+    var superChecks = _createCovariantCheckSet();
+    var existingChecks = _createCovariantCheckSet();
+
+    void visitImmediateSuper(InterfaceType type) {
+      // For members of mixins/supertypes, check them against new interfaces,
+      // and also record any existing checks they already had.
+      var oldCovariant = _findAllGenericInterfaces(type);
+      var newCovariant = allCovariant.difference(oldCovariant);
+      if (newCovariant.isEmpty) return;
+
+      void visitSuper(InterfaceType type) {
+        var element = type.element;
+        if (visited.add(element)) {
+          var members = _getConcreteMembers(type, seenConcreteMembers);
+          _findCovariantChecks(members, newCovariant, superChecks);
+          _findCovariantChecks(members, oldCovariant, existingChecks);
+          element.mixins.reversed.forEach(visitSuper);
+          var s = element.supertype;
+          if (s != null) visitSuper(s);
+        }
+      }
+
+      visitSuper(type);
+    }
+
+    element.mixins.reversed.forEach(visitImmediateSuper);
+    var s = element.supertype;
+    if (s != null) visitImmediateSuper(s);
+
+    superChecks.removeAll(existingChecks);
+    return superChecks;
+  }
+
   static Set<Element> _createCovariantCheckSet() {
     return new LinkedHashSet(
         equals: _equalMemberElements, hashCode: _hashCodeMemberElements);
@@ -1468,11 +1496,6 @@
     return x == y;
   }
 
-  static int _hashCodeMemberElements(Element x) {
-    x = x is Member ? x.baseElement : x;
-    return x.hashCode;
-  }
-
   /// Find all generic interfaces that are implemented by [type], including
   /// [type] itself if it is generic.
   ///
@@ -1503,58 +1526,37 @@
     return genericSupertypes;
   }
 
-  /// Visits each member on the class [node] and calls [checkMember] with the
-  /// corresponding instance element and AST node (for error reporting).
+  /// Gets all concrete instance members declared on this type, skipping already
+  /// [seenConcreteMembers] and adding any found ones to it.
   ///
-  /// See also [_checkTypeMembers], which is used when the class AST node is not
-  /// available.
-  void _checkClassMembers(Declaration node,
-      void checkMember(ExecutableElement member, ClassMember location)) {
-    for (var member in _classMembers(node)) {
-      if (member is FieldDeclaration) {
-        if (member.isStatic) {
-          continue;
+  /// By tracking the set of seen members, we can visit superclasses and mixins
+  /// and ultimately collect every most-derived member exposed by a given type.
+  static List<ExecutableElement> _getConcreteMembers(
+      InterfaceType type, HashSet<String> seenConcreteMembers) {
+    var members = <ExecutableElement>[];
+    for (var declaredMembers in [type.accessors, type.methods]) {
+      for (var member in declaredMembers) {
+        // We only visit each most derived concrete member.
+        // To avoid visiting an overridden superclass member, we skip members
+        // we've seen, and visit starting from the class, then mixins in
+        // reverse order, then superclasses.
+        if (!member.isStatic &&
+            !member.isAbstract &&
+            seenConcreteMembers.add(member.name)) {
+          members.add(member);
         }
-        for (var variable in member.fields.variables) {
-          var element = variable.declaredElement as PropertyInducingElement;
-          checkMember(element.getter, member);
-          if (!variable.isFinal && !variable.isConst) {
-            checkMember(element.setter, member);
-          }
-        }
-      } else if (member is MethodDeclaration) {
-        if (member.isStatic) {
-          continue;
-        }
-        checkMember(member.declaredElement, member);
-      } else {
-        assert(member is ConstructorDeclaration);
       }
     }
+    return members;
   }
 
-  /// Visits the [type] and calls [checkMember] for each instance member.
-  ///
-  /// See also [_checkClassMembers], which should be used when the class AST
-  /// node is available to allow for better error locations
-  void _checkTypeMembers(
-      InterfaceType type, void checkMember(ExecutableElement member)) {
-    void checkHelper(ExecutableElement e) {
-      if (!e.isStatic) checkMember(e);
-    }
-
-    type.methods.forEach(checkHelper);
-    type.accessors.forEach(checkHelper);
-  }
-
-  /// If node is a [ClassDeclaration] returns its members, otherwise if node is
-  /// a [ClassTypeAlias] this returns an empty list.
-  Iterable<ClassMember> _classMembers(Declaration node) {
-    return node is ClassDeclaration ? node.members : [];
+  static int _hashCodeMemberElements(Element x) {
+    x = x is Member ? x.baseElement : x;
+    return x.hashCode;
   }
 }
 
-class _TopLevelInitializerValidator extends RecursiveAstVisitor<Null> {
+class _TopLevelInitializerValidator extends RecursiveAstVisitor<void> {
   final CodeChecker _codeChecker;
   final String _name;
 
diff --git a/pkg/analyzer/lib/src/test_utilities/ast_type_matchers.dart b/pkg/analyzer/lib/src/test_utilities/ast_type_matchers.dart
new file mode 100644
index 0000000..a56dddf
--- /dev/null
+++ b/pkg/analyzer/lib/src/test_utilities/ast_type_matchers.dart
@@ -0,0 +1,306 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:test/test.dart';
+
+const isAdjacentStrings = const TypeMatcher<AdjacentStrings>();
+
+const isAnnotatedNode = const TypeMatcher<AnnotatedNode>();
+
+const isAnnotation = const TypeMatcher<Annotation>();
+
+const isArgumentList = const TypeMatcher<ArgumentList>();
+
+const isAsExpression = const TypeMatcher<AsExpression>();
+
+const isAssertInitializer = const TypeMatcher<AssertInitializer>();
+
+const isAssertion = const TypeMatcher<Assertion>();
+
+const isAssertStatement = const TypeMatcher<AssertStatement>();
+
+const isAssignmentExpression = const TypeMatcher<AssignmentExpression>();
+
+const isAwaitExpression = const TypeMatcher<AwaitExpression>();
+
+const isBinaryExpression = const TypeMatcher<BinaryExpression>();
+
+const isBlock = const TypeMatcher<Block>();
+
+const isBlockFunctionBody = const TypeMatcher<BlockFunctionBody>();
+
+const isBooleanLiteral = const TypeMatcher<BooleanLiteral>();
+
+const isBreakStatement = const TypeMatcher<BreakStatement>();
+
+const isCascadeExpression = const TypeMatcher<CascadeExpression>();
+
+const isCatchClause = const TypeMatcher<CatchClause>();
+
+const isClassDeclaration = const TypeMatcher<ClassDeclaration>();
+
+const isClassMember = const TypeMatcher<ClassMember>();
+
+const isClassOrMixinDeclaration = const TypeMatcher<ClassOrMixinDeclaration>();
+
+const isClassTypeAlias = const TypeMatcher<ClassTypeAlias>();
+
+const isCombinator = const TypeMatcher<Combinator>();
+
+const isComment = const TypeMatcher<Comment>();
+
+const isCommentReference = const TypeMatcher<CommentReference>();
+
+const isCompilationUnit = const TypeMatcher<CompilationUnit>();
+
+const isCompilationUnitMember = const TypeMatcher<CompilationUnitMember>();
+
+const isConditionalExpression = const TypeMatcher<ConditionalExpression>();
+
+const isConfiguration = const TypeMatcher<Configuration>();
+
+const isConstructorDeclaration = const TypeMatcher<ConstructorDeclaration>();
+
+const isConstructorFieldInitializer =
+    const TypeMatcher<ConstructorFieldInitializer>();
+
+const isConstructorInitializer = const TypeMatcher<ConstructorInitializer>();
+
+const isConstructorName = const TypeMatcher<ConstructorName>();
+
+const isConstructorReferenceNode =
+    const TypeMatcher<ConstructorReferenceNode>();
+
+const isContinueStatement = const TypeMatcher<ContinueStatement>();
+
+const isDeclaration = const TypeMatcher<Declaration>();
+
+const isDeclaredIdentifier = const TypeMatcher<DeclaredIdentifier>();
+
+const isDefaultFormalParameter = const TypeMatcher<DefaultFormalParameter>();
+
+const isDirective = const TypeMatcher<Directive>();
+
+const isDoStatement = const TypeMatcher<DoStatement>();
+
+const isDottedName = const TypeMatcher<DottedName>();
+
+const isDoubleLiteral = const TypeMatcher<DoubleLiteral>();
+
+const isEmptyFunctionBody = const TypeMatcher<EmptyFunctionBody>();
+
+const isEmptyStatement = const TypeMatcher<EmptyStatement>();
+
+const isEnumConstantDeclaration = const TypeMatcher<EnumConstantDeclaration>();
+
+const isEnumDeclaration = const TypeMatcher<EnumDeclaration>();
+
+const isExportDirective = const TypeMatcher<ExportDirective>();
+
+const isExpression = const TypeMatcher<Expression>();
+
+const isExpressionFunctionBody = const TypeMatcher<ExpressionFunctionBody>();
+
+const isExpressionStatement = const TypeMatcher<ExpressionStatement>();
+
+const isExtendsClause = const TypeMatcher<ExtendsClause>();
+
+const isFieldDeclaration = const TypeMatcher<FieldDeclaration>();
+
+const isFieldFormalParameter = const TypeMatcher<FieldFormalParameter>();
+
+const isForEachStatement = const TypeMatcher<ForEachStatement>();
+
+const isFormalParameter = const TypeMatcher<FormalParameter>();
+
+const isFormalParameterList = const TypeMatcher<FormalParameterList>();
+
+const isForStatement = const TypeMatcher<ForStatement>();
+
+const isFunctionBody = const TypeMatcher<FunctionBody>();
+
+const isFunctionDeclaration = const TypeMatcher<FunctionDeclaration>();
+
+const isFunctionDeclarationStatement =
+    const TypeMatcher<FunctionDeclarationStatement>();
+
+const isFunctionExpression = const TypeMatcher<FunctionExpression>();
+
+const isFunctionExpressionInvocation =
+    const TypeMatcher<FunctionExpressionInvocation>();
+
+const isFunctionTypeAlias = const TypeMatcher<FunctionTypeAlias>();
+
+const isFunctionTypedFormalParameter =
+    const TypeMatcher<FunctionTypedFormalParameter>();
+
+const isGenericFunctionType = const TypeMatcher<GenericFunctionType>();
+
+const isGenericTypeAlias = const TypeMatcher<GenericTypeAlias>();
+
+const isHideCombinator = const TypeMatcher<HideCombinator>();
+
+const isIdentifier = const TypeMatcher<Identifier>();
+
+const isIfStatement = const TypeMatcher<IfStatement>();
+
+const isImplementsClause = const TypeMatcher<ImplementsClause>();
+
+const isImportDirective = const TypeMatcher<ImportDirective>();
+
+const isIndexExpression = const TypeMatcher<IndexExpression>();
+
+const isInstanceCreationExpression =
+    const TypeMatcher<InstanceCreationExpression>();
+
+const isIntegerLiteral = const TypeMatcher<IntegerLiteral>();
+
+const isInterpolationElement = const TypeMatcher<InterpolationElement>();
+
+const isInterpolationExpression = const TypeMatcher<InterpolationExpression>();
+
+const isInterpolationString = const TypeMatcher<InterpolationString>();
+
+const isInvocationExpression = const TypeMatcher<InvocationExpression>();
+
+const isIsExpression = const TypeMatcher<IsExpression>();
+
+const isLabel = const TypeMatcher<Label>();
+
+const isLabeledStatement = const TypeMatcher<LabeledStatement>();
+
+const isLibraryDirective = const TypeMatcher<LibraryDirective>();
+
+const isLibraryIdentifier = const TypeMatcher<LibraryIdentifier>();
+
+const isListLiteral = const TypeMatcher<ListLiteral>();
+
+const isLiteral = const TypeMatcher<Literal>();
+
+const isMapLiteral = const TypeMatcher<MapLiteral>();
+
+const isMapLiteralEntry = const TypeMatcher<MapLiteralEntry>();
+
+const isMethodDeclaration = const TypeMatcher<MethodDeclaration>();
+
+const isMethodInvocation = const TypeMatcher<MethodInvocation>();
+
+const isMethodReferenceExpression =
+    const TypeMatcher<MethodReferenceExpression>();
+
+const isMixinDeclaration = const TypeMatcher<MixinDeclaration>();
+
+const isNamedCompilationUnitMember =
+    const TypeMatcher<NamedCompilationUnitMember>();
+
+const isNamedExpression = const TypeMatcher<NamedExpression>();
+
+const isNamedType = const TypeMatcher<NamedType>();
+
+const isNamespaceDirective = const TypeMatcher<NamespaceDirective>();
+
+const isNativeClause = const TypeMatcher<NativeClause>();
+
+const isNativeFunctionBody = const TypeMatcher<NativeFunctionBody>();
+
+const isNormalFormalParameter = const TypeMatcher<NormalFormalParameter>();
+
+const isNullLiteral = const TypeMatcher<NullLiteral>();
+
+const isOnClause = const TypeMatcher<OnClause>();
+
+const isParenthesizedExpression = const TypeMatcher<ParenthesizedExpression>();
+
+const isPartDirective = const TypeMatcher<PartDirective>();
+
+const isPartOfDirective = const TypeMatcher<PartOfDirective>();
+
+const isPostfixExpression = const TypeMatcher<PostfixExpression>();
+
+const isPrefixedIdentifier = const TypeMatcher<PrefixedIdentifier>();
+
+const isPrefixExpression = const TypeMatcher<PrefixExpression>();
+
+const isPropertyAccess = const TypeMatcher<PropertyAccess>();
+
+const isRedirectingConstructorInvocation =
+    const TypeMatcher<RedirectingConstructorInvocation>();
+
+const isRethrowExpression = const TypeMatcher<RethrowExpression>();
+
+const isReturnStatement = const TypeMatcher<ReturnStatement>();
+
+const isScriptTag = const TypeMatcher<ScriptTag>();
+
+const isSetLiteral = const TypeMatcher<SetLiteral>();
+
+const isShowCombinator = const TypeMatcher<ShowCombinator>();
+
+const isSimpleFormalParameter = const TypeMatcher<SimpleFormalParameter>();
+
+const isSimpleIdentifier = const TypeMatcher<SimpleIdentifier>();
+
+const isSimpleStringLiteral = const TypeMatcher<SimpleStringLiteral>();
+
+const isSingleStringLiteral = const TypeMatcher<SingleStringLiteral>();
+
+const isStatement = const TypeMatcher<Statement>();
+
+const isStringInterpolation = const TypeMatcher<StringInterpolation>();
+
+const isStringLiteral = const TypeMatcher<StringLiteral>();
+
+const isSuperConstructorInvocation =
+    const TypeMatcher<SuperConstructorInvocation>();
+
+const isSuperExpression = const TypeMatcher<SuperExpression>();
+
+const isSwitchCase = const TypeMatcher<SwitchCase>();
+
+const isSwitchDefault = const TypeMatcher<SwitchDefault>();
+
+const isSwitchMember = const TypeMatcher<SwitchMember>();
+
+const isSwitchStatement = const TypeMatcher<SwitchStatement>();
+
+const isSymbolLiteral = const TypeMatcher<SymbolLiteral>();
+
+const isThisExpression = const TypeMatcher<ThisExpression>();
+
+const isThrowExpression = const TypeMatcher<ThrowExpression>();
+
+const isTopLevelVariableDeclaration =
+    const TypeMatcher<TopLevelVariableDeclaration>();
+
+const isTryStatement = const TypeMatcher<TryStatement>();
+
+const isTypeAlias = const TypeMatcher<TypeAlias>();
+
+const isTypeAnnotation = const TypeMatcher<TypeAnnotation>();
+
+const isTypeArgumentList = const TypeMatcher<TypeArgumentList>();
+
+const isTypedLiteral = const TypeMatcher<TypedLiteral>();
+
+const isTypeName = const TypeMatcher<TypeName>();
+
+const isTypeParameter = const TypeMatcher<TypeParameter>();
+
+const isTypeParameterList = const TypeMatcher<TypeParameterList>();
+
+const isUriBasedDirective = const TypeMatcher<UriBasedDirective>();
+
+const isVariableDeclaration = const TypeMatcher<VariableDeclaration>();
+
+const isVariableDeclarationList = const TypeMatcher<VariableDeclarationList>();
+
+const isVariableDeclarationStatement =
+    const TypeMatcher<VariableDeclarationStatement>();
+
+const isWhileStatement = const TypeMatcher<WhileStatement>();
+
+const isWithClause = const TypeMatcher<WithClause>();
+
+const isYieldStatement = const TypeMatcher<YieldStatement>();
diff --git a/pkg/analyzer/lib/src/test_utilities/element_type_matchers.dart b/pkg/analyzer/lib/src/test_utilities/element_type_matchers.dart
new file mode 100644
index 0000000..c141414
--- /dev/null
+++ b/pkg/analyzer/lib/src/test_utilities/element_type_matchers.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:test/test.dart';
+
+const isClassElement = const TypeMatcher<ClassElement>();
+
+const isClassMemberElement = const TypeMatcher<ClassMemberElement>();
+
+const isCompilationUnitElement = const TypeMatcher<CompilationUnitElement>();
+
+const isConstructorElement = const TypeMatcher<ConstructorElement>();
+
+const isElementAnnotation = const TypeMatcher<ElementAnnotation>();
+
+const isExecutableElement = const TypeMatcher<ExecutableElement>();
+
+const isExportElement = const TypeMatcher<ExportElement>();
+
+const isFieldElement = const TypeMatcher<FieldElement>();
+
+const isFieldFormalParameterElement =
+    const TypeMatcher<FieldFormalParameterElement>();
+
+const isFunctionElement = const TypeMatcher<FunctionElement>();
+
+const isFunctionTypeAliasElement =
+    const TypeMatcher<FunctionTypeAliasElement>();
+
+const isFunctionTypedElement = const TypeMatcher<FunctionTypedElement>();
+
+const isGenericFunctionTypeElement =
+    const TypeMatcher<GenericFunctionTypeElement>();
+
+const isGenericTypeAliasElement = const TypeMatcher<GenericTypeAliasElement>();
+
+const isHideElementCombinator = const TypeMatcher<HideElementCombinator>();
+
+const isImportElement = const TypeMatcher<ImportElement>();
+
+const isLabelElement = const TypeMatcher<LabelElement>();
+
+const isLibraryElement = const TypeMatcher<LibraryElement>();
+
+const isLocalElement = const TypeMatcher<LocalElement>();
+
+const isLocalVariableElement = const TypeMatcher<LocalVariableElement>();
+
+const isMethodElement = const TypeMatcher<MethodElement>();
+
+const isNamespaceCombinator = const TypeMatcher<NamespaceCombinator>();
+
+const isParameterElement = const TypeMatcher<ParameterElement>();
+
+const isPrefixElement = const TypeMatcher<PrefixElement>();
+
+const isPropertyAccessorElement = const TypeMatcher<PropertyAccessorElement>();
+
+const isPropertyInducingElement = const TypeMatcher<PropertyInducingElement>();
+
+const isShowElementCombinator = const TypeMatcher<ShowElementCombinator>();
+
+const isTopLevelVariableElement = const TypeMatcher<TopLevelVariableElement>();
+
+const isTypeDefiningElement = const TypeMatcher<TypeDefiningElement>();
+
+const isTypeParameterElement = const TypeMatcher<TypeParameterElement>();
+
+const isTypeParameterizedElement =
+    const TypeMatcher<TypeParameterizedElement>();
+
+const isUriReferencedElement = const TypeMatcher<UriReferencedElement>();
+
+const isVariableElement = const TypeMatcher<VariableElement>();
diff --git a/pkg/analyzer_plugin/test/support/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
similarity index 82%
rename from pkg/analyzer_plugin/test/support/mock_sdk.dart
rename to pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index f76516c4..b48d3c49 100644
--- a/pkg/analyzer_plugin/test/support/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -1,9 +1,9 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// 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' as resource;
-import 'package:analyzer/file_system/memory_file_system.dart' as resource;
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
@@ -11,6 +11,7 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
 import 'package:analyzer/src/summary/summary_file_builder.dart';
+import 'package:meta/meta.dart';
 
 const String librariesContent = r'''
 const Map<String, LibraryInfo> libraries = const {
@@ -42,11 +43,10 @@
   factory Future.microtask(FutureOr<T> computation()) => null;
   factory Future.value([FutureOr<T> result]) => null;
 
-  static Future<List<T>> wait<T>(
-      Iterable<Future<T>> futures) => null;
   Future<R> then<R>(FutureOr<R> onValue(T value)) => null;
-
   Future<T> whenComplete(action());
+  
+  static Future<List<T>> wait<T>(Iterable<Future<T>> futures) => null;
 }
 
 class FutureOr<T> {}
@@ -60,12 +60,9 @@
   bool get isCompleted;
 }
 
-class _StreamIterator<T> implements StreamIterator<T> {}
-class _AsyncStarStreamController {}
-Function _asyncThenWrapperHelper(continuation) {}
-Function _asyncErrorWrapperHelper(continuation) {}
-Future _awaitHelper(
-    object, Function thenCallback, Function errorCallback, var awaiter) {}
+abstract class Timer {
+  static void run(void callback()) {}
+}
 ''', const <String, String>{
   '$sdkRoot/lib/async/stream.dart': r'''
 part of dart.async;
@@ -108,6 +105,7 @@
 library dart.collection;
 
 abstract class HashMap<K, V> implements Map<K, V> {}
+abstract class LinkedHashMap<K, V> implements Map<K, V> {}
 ''');
 
 const _MockSdkLibrary _LIB_CONVERT = const _MockSdkLibrary(
@@ -124,104 +122,34 @@
     const _MockSdkLibrary('dart:core', '$sdkRoot/lib/core/core.dart', '''
 library dart.core;
 
-import 'dart:async';
-import 'dart:_internal';
+import 'dart:async'; // ignore: unused_import
 
-class Object {
-  const Object();
-  bool operator ==(other) => identical(this, other);
-  String toString() => 'a string';
-  int get hashCode => 0;
-  Type get runtimeType => null;
-  dynamic noSuchMethod(Invocation invocation) => null;
+export 'dart:async' show Future, Stream;
+
+const deprecated = const Deprecated("next release");
+
+const override = const _Override();
+
+const proxy = const _Proxy();
+
+external bool identical(Object a, Object b);
+
+void print(Object object) {}
+
+class bool extends Object {
+  external const factory bool.fromEnvironment(String name,
+      {bool defaultValue: false});
 }
 
-class Function {}
-class StackTrace {}
-
-class Symbol {
-  const factory Symbol(String name) = _SymbolImpl;
-}
-
-class _SymbolImpl {
-  const _SymbolImpl(String name);
-}
-
-class Type {}
-
 abstract class Comparable<T> {
   int compareTo(T other);
 }
 
-abstract class Pattern {}
-abstract class String implements Comparable<String>, Pattern {
-  external factory String.fromCharCodes(Iterable<int> charCodes,
-                                        [int start = 0, int end]);
-  String operator +(String other) => null;
-  bool operator ==(Object other);
-  bool get isEmpty => false;
-  bool get isNotEmpty => false;
-  int get length => 0;
-  int codeUnitAt(int index);
-  String substring(int len) => null;
-  String toLowerCase();
-  String toUpperCase();
-  List<int> get codeUnits;
-}
-abstract class RegExp implements Pattern {
-  external factory RegExp(String source);
-}
+class DateTime extends Object {}
 
-class bool extends Object {
-  external const factory bool.fromEnvironment(String name,
-                                              {bool defaultValue: false});
-}
-
-abstract class Invocation {}
-
-abstract class num implements Comparable<num> {
-  bool operator ==(Object other);
-  bool operator <(num other);
-  bool operator <=(num other);
-  bool operator >(num other);
-  bool operator >=(num other);
-  num operator +(num other);
-  num operator -(num other);
-  num operator *(num other);
-  double operator /(num other);
-  int operator ^(int other);
-  int operator |(int other);
-  int operator <<(int other);
-  int operator >>(int other);
-  int operator ~/(num other);
-  num operator %(num other);
-  int operator ~();
-  num operator -();
-  int toInt();
-  double toDouble();
-  num abs();
-  int round();
-}
-abstract class int extends num {
-  external const factory int.fromEnvironment(String name, {int defaultValue});
-
-  bool get isNegative;
-  bool get isEven => false;
-
-  int operator &(int other);
-  int operator |(int other);
-  int operator ^(int other);
-  int operator ~();
-  int operator <<(int shiftAmount);
-  int operator >>(int shiftAmount);
-
-  int operator -();
-
-  external static int parse(String source,
-                            { int radix,
-                              int onError(String source) });
-
-  String toString();
+class Deprecated extends Object {
+  final String expires;
+  const Deprecated(this.expires);
 }
 
 abstract class double extends num {
@@ -231,89 +159,25 @@
   static const double MIN_POSITIVE = 5e-324;
   static const double MAX_FINITE = 1.7976931348623157e+308;
 
-  double remainder(num other);
+  double get sign;
+  double operator %(num other);
+  double operator *(num other);
   double operator +(num other);
   double operator -(num other);
-  double operator *(num other);
-  double operator %(num other);
-  double operator /(num other);
-  int operator ~/(num other);
   double operator -();
+  double operator /(num other);
   double abs();
-  double get sign;
-  int round();
-  int floor();
   int ceil();
-  int truncate();
-  double roundToDouble();
-  double floorToDouble();
   double ceilToDouble();
+  int floor();
+  double floorToDouble();
+  double remainder(num other);
+  int round();
+  double roundToDouble();
+  int truncate();
   double truncateToDouble();
-  external static double parse(String source,
-                               [double onError(String source)]);
-}
-
-class DateTime extends Object {}
-
-class Null extends Object {
-  factory Null._uninstantiable() => null;
-}
-
-class Deprecated extends Object {
-  final String expires;
-  const Deprecated(this.expires);
-}
-const Object deprecated = const Deprecated("next release");
-
-class Iterator<E> {
-  bool moveNext();
-  E get current;
-}
-
-abstract class Iterable<E> {
-  Iterator<E> get iterator;
-  bool get isEmpty;
-  E get first;
-  int get length;
-
-  Iterable<R> map<R>(R f(E e));
-
-  R fold<R>(R initialValue,
-      R combine(R previousValue, E element)) => null;
-
-  Iterable<T> expand<T>(Iterable<T> f(E element));
-
-  Iterable<E> where(bool test(E element));
-
-  void forEach(void f(E element));
-
-  List<E> toList();
-}
-
-class List<E> implements Iterable<E> {
-  List([int length]);
-  factory List.from(Iterable elements, {bool growable: true}) => null;
-  void add(E value) {}
-  void addAll(Iterable<E> iterable) {}
-  E operator [](int index) => null;
-  void operator []=(int index, E value) {}
-  Iterator<E> get iterator => null;
-  void clear() {}
-
-  bool get isEmpty => false;
-  E get first => null;
-  E get last => null;
-
-}
-
-class Map<K, V> extends Object {
-  Iterable<K> get keys => null;
-  int get length;
-  Iterable<V> get values;
-  V operator [](K key) => null;
-  void operator []=(K key, V value) {}
-  Map<RK, RV> cast<RK, RV>();
-  bool containsKey(Object key);
+  int operator ~/(num other);
+  external static double parse(String source, [double onError(String source)]);
 }
 
 class Duration implements Comparable<Duration> {}
@@ -322,36 +186,166 @@
   factory Exception([var message]) => null;
 }
 
-external bool identical(Object a, Object b);
+class Function {}
 
-void print(Object object) {}
+abstract class int extends num {
+  external const factory int.fromEnvironment(String name, {int defaultValue});
 
-class _Proxy { const _Proxy(); }
-const Object proxy = const _Proxy();
+  bool get isEven => false;
+  bool get isNegative;
 
-class _Override { const _Override(); }
-const Object override = const _Override();
+  int operator &(int other);
+  int operator -();
+  int operator <<(int shiftAmount);
+  int operator >>(int shiftAmount);
+  int operator ^(int other);
+  String toString();
 
-class _CompileTimeError {
-  final String _errorMsg;
-  _CompileTimeError(this._errorMsg);
+  int operator |(int other);
+
+  int operator ~();
+
+  external static int parse(String source,
+      {int radix, int onError(String source)});
 }
 
-class AbstractClassInstantiationError {
-  AbstractClassInstantiationError(String className);
+abstract class Invocation {}
+
+abstract class Iterable<E> {
+  E get first;
+  bool get isEmpty;
+  Iterator<E> get iterator;
+  int get length;
+
+  Iterable<T> expand<T>(Iterable<T> f(E element));
+
+  R fold<R>(R initialValue, R combine(R previousValue, E element)) => null;
+
+  void forEach(void f(E element));
+
+  Iterable<R> map<R>(R f(E e));
+
+  List<E> toList();
+
+  Iterable<E> where(bool test(E element));
 }
 
-class FallThroughError {
-  FallThroughError();
-  FallThroughError._create(String url, int line);
+abstract class Iterator<E> {
+  E get current;
+  bool moveNext();
 }
 
-abstract class _SyncIterable implements Iterable {}
-class _InvocationMirror {
-  _InvocationMirror._withoutType(
-      String _functionName, List<Type> _typeArguments,
-      List _positionalArguments, Map<Symbol, dynamic>_namedArguments,
-      bool _isSuperInvocation);
+class List<E> implements Iterable<E> {
+  List([int length]);
+  factory List.from(Iterable elements, {bool growable: true}) => null;
+
+  E get last => null;
+  E operator [](int index) => null;
+  void operator []=(int index, E value) {}
+
+  void add(E value) {}
+  void addAll(Iterable<E> iterable) {}
+  void clear() {}
+
+  noSuchMethod(Invocation invocation) => null;
+}
+
+class Map<K, V> {
+  Iterable<K> get keys => null;
+  int get length => 0;
+  Iterable<V> get values => null;
+  V operator [](K key) => null;
+  void operator []=(K key, V value) {}
+  Map<RK, RV> cast<RK, RV>() => null;
+  bool containsKey(Object key) => false;
+}
+
+class Null extends Object {
+  factory Null._uninstantiable() => null;
+}
+
+abstract class num implements Comparable<num> {
+  num operator %(num other);
+  num operator *(num other);
+  num operator +(num other);
+  num operator -(num other);
+  num operator -();
+  double operator /(num other);
+  bool operator <(num other);
+  int operator <<(int other);
+  bool operator <=(num other);
+  bool operator ==(Object other);
+  bool operator >(num other);
+  bool operator >=(num other);
+  int operator >>(int other);
+  int operator ^(int other);
+  num abs();
+  int round();
+  double toDouble();
+  int toInt();
+  int operator |(int other);
+  int operator ~();
+  int operator ~/(num other);
+}
+
+class Object {
+  const Object();
+  int get hashCode => 0;
+  Type get runtimeType => null;
+  bool operator ==(other) => identical(this, other);
+  dynamic noSuchMethod(Invocation invocation) => null;
+  String toString() => 'a string';
+}
+
+abstract class Pattern {}
+
+abstract class RegExp implements Pattern {
+  external factory RegExp(String source);
+}
+
+abstract class Set<E> implements Iterable<E> {
+  Set<R> cast<R>();
+}
+
+class StackTrace {}
+
+abstract class String implements Comparable<String>, Pattern {
+  external factory String.fromCharCodes(Iterable<int> charCodes,
+      [int start = 0, int end]);
+  List<int> get codeUnits;
+  bool get isEmpty => false;
+  bool get isNotEmpty => false;
+  int get length => 0;
+  String operator +(String other) => null;
+  bool operator ==(Object other);
+  int codeUnitAt(int index);
+  String substring(int len) => null;
+  String toLowerCase();
+  String toUpperCase();
+}
+
+class Symbol {
+  const factory Symbol(String name) = _SymbolImpl;
+}
+
+class Type {}
+
+class Uri {
+  static List<int> parseIPv6Address(String host, [int start = 0, int end]) {
+    return null;
+  }
+}
+
+class _Override {
+  const _Override();
+}
+
+class _Proxy {
+  const _Proxy();
+}
+
+class _SymbolImpl {
+  const _SymbolImpl(String name);
 }
 ''');
 
@@ -470,7 +464,7 @@
     "dart:math": "$sdkRoot/lib/math/math.dart"
   };
 
-  final resource.MemoryResourceProvider provider;
+  final MemoryResourceProvider resourceProvider;
 
   final Map<String, String> uriMap = {};
 
@@ -487,33 +481,30 @@
    */
   PackageBundle _bundle;
 
-  MockSdk(
-      {bool generateSummaryFiles: false,
-      resource.MemoryResourceProvider resourceProvider})
-      : provider = resourceProvider ?? new resource.MemoryResourceProvider() {
+  MockSdk({bool generateSummaryFiles: false, @required this.resourceProvider}) {
     _URI_MAP.forEach((uri, path) {
-      uriMap[uri] = provider.convertPath(path);
+      uriMap[uri] = resourceProvider.convertPath(path);
     });
 
     for (_MockSdkLibrary library in _LIBRARIES) {
-      var convertedLibrary = library._toProvider(provider);
+      var convertedLibrary = library._toProvider(resourceProvider);
       sdkLibraries.add(convertedLibrary);
     }
 
     for (_MockSdkLibrary library in sdkLibraries) {
-      provider.newFile(library.path, library.content);
+      resourceProvider.newFile(library.path, library.content);
       library.parts.forEach((String path, String content) {
-        provider.newFile(path, content);
+        resourceProvider.newFile(path, content);
       });
     }
-    provider.newFile(
-        provider.convertPath(
+    resourceProvider.newFile(
+        resourceProvider.convertPath(
             '$sdkRoot/lib/_internal/sdk_library_metadata/lib/libraries.dart'),
         librariesContent);
     if (generateSummaryFiles) {
       List<int> bytes = _computeLinkedBundleBytes();
-      provider.newFileWithBytes(
-          provider.convertPath('/lib/_internal/strong.sum'), bytes);
+      resourceProvider.newFileWithBytes(
+          resourceProvider.convertPath('/lib/_internal/strong.sum'), bytes);
     }
   }
 
@@ -536,28 +527,29 @@
 
   @override
   Source fromFileUri(Uri uri) {
-    String filePath = provider.pathContext.fromUri(uri);
-    if (!filePath.startsWith(provider.convertPath('$sdkRoot/lib/'))) {
+    String filePath = resourceProvider.pathContext.fromUri(uri);
+    if (!filePath.startsWith(resourceProvider.convertPath('$sdkRoot/lib/'))) {
       return null;
     }
     for (SdkLibrary library in sdkLibraries) {
       String libraryPath = library.path;
       if (filePath == libraryPath) {
         try {
-          resource.File file = provider.getResource(filePath);
+          File file = resourceProvider.getResource(filePath);
           Uri dartUri = Uri.parse(library.shortName);
           return file.createSource(dartUri);
         } catch (exception) {
           return null;
         }
       }
-      String libraryRootPath = provider.pathContext.dirname(libraryPath) +
-          provider.pathContext.separator;
+      String libraryRootPath =
+          resourceProvider.pathContext.dirname(libraryPath) +
+              resourceProvider.pathContext.separator;
       if (filePath.startsWith(libraryRootPath)) {
         String pathInLibrary = filePath.substring(libraryRootPath.length);
         String uriStr = '${library.shortName}/$pathInLibrary';
         try {
-          resource.File file = provider.getResource(filePath);
+          File file = resourceProvider.getResource(filePath);
           Uri dartUri = Uri.parse(uriStr);
           return file.createSource(dartUri);
         } catch (exception) {
@@ -571,8 +563,8 @@
   @override
   PackageBundle getLinkedBundle() {
     if (_bundle == null) {
-      resource.File summaryFile =
-          provider.getFile(provider.convertPath('/lib/_internal/strong.sum'));
+      File summaryFile = resourceProvider
+          .getFile(resourceProvider.convertPath('/lib/_internal/strong.sum'));
       List<int> bytes;
       if (summaryFile.exists) {
         bytes = summaryFile.readAsBytesSync();
@@ -598,7 +590,7 @@
   Source mapDartUri(String dartUri) {
     String path = uriMap[dartUri];
     if (path != null) {
-      resource.File file = provider.getResource(path);
+      File file = resourceProvider.getResource(path);
       Uri uri = new Uri(scheme: 'dart', path: dartUri.substring(5));
       return file.createSource(uri);
     }
@@ -619,14 +611,9 @@
 }
 
 class _MockSdkLibrary implements SdkLibrary {
-  @override
   final String shortName;
-
-  @override
   final String path;
-
   final String content;
-
   final Map<String, String> parts;
 
   const _MockSdkLibrary(this.shortName, this.path, this.content,
@@ -653,7 +640,7 @@
   @override
   bool get isVmLibrary => throw new UnimplementedError();
 
-  _MockSdkLibrary _toProvider(resource.MemoryResourceProvider provider) {
+  _MockSdkLibrary _toProvider(MemoryResourceProvider provider) {
     return new _MockSdkLibrary(
       shortName,
       provider.convertPath(path),
diff --git a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
index a24767d..4eba2df 100644
--- a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
+++ b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
@@ -13,16 +13,14 @@
  * for manipulating the file system. The utility methods all take a posix style
  * path and convert it as appropriate for the actual platform.
  */
-class ResourceProviderMixin {
+mixin ResourceProviderMixin {
   MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
 
-  String convertPath(String path) => resourceProvider.convertPath(path);
-
   /// Convert the given [path] to be a valid import uri for this provider's path context.
   /// The URI will use forward slashes on all platforms and absolute paths on Windows
   /// will be formatted as /X:/path/file.dart
   String convertAbsolutePathToUri(String path) {
-    path = resourceProvider.convertPath(path);
+    path = convertPath(path);
 
     // On Windows, absolute import paths are not quite the same as a normal fs path.
     // C:\test.dart must be imported as one of:
@@ -38,23 +36,25 @@
     return path.replaceAll(r'\', '/');
   }
 
+  String convertPath(String path) => resourceProvider.convertPath(path);
+
   void deleteFile(String path) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     resourceProvider.deleteFile(convertedPath);
   }
 
   void deleteFolder(String path) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     resourceProvider.deleteFolder(convertedPath);
   }
 
   File getFile(String path) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     return resourceProvider.getFile(convertedPath);
   }
 
   Folder getFolder(String path) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     return resourceProvider.getFolder(convertedPath);
   }
 
@@ -70,32 +70,37 @@
           .join(part1, part2, part3, part4, part5, part6, part7, part8);
 
   void modifyFile(String path, String content) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     resourceProvider.modifyFile(convertedPath, content);
   }
 
   File newFile(String path, {String content = ''}) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     return resourceProvider.newFile(convertedPath, content);
   }
 
   File newFileWithBytes(String path, List<int> bytes) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     return resourceProvider.newFileWithBytes(convertedPath, bytes);
   }
 
   Folder newFolder(String path) {
-    String convertedPath = resourceProvider.convertPath(path);
+    String convertedPath = convertPath(path);
     return resourceProvider.newFolder(convertedPath);
   }
 
-  File newOptionsFile(String directoryPath) {
-    return newFile(resourceProvider.pathContext
-        .join(directoryPath, ContextLocatorImpl.ANALYSIS_OPTIONS_NAME));
+  File newOptionsFile(String directoryPath, {String content = ''}) {
+    String path = join(directoryPath, ContextLocatorImpl.ANALYSIS_OPTIONS_NAME);
+    return newFile(path, content: content);
   }
 
   File newPackagesFile(String directoryPath) {
-    return newFile(resourceProvider.pathContext
-        .join(directoryPath, ContextLocatorImpl.PACKAGES_FILE_NAME));
+    String path = join(directoryPath, ContextLocatorImpl.PACKAGES_FILE_NAME);
+    return newFile(path);
+  }
+
+  Uri toUri(String path) {
+    path = convertPath(path);
+    return resourceProvider.pathContext.toUri(path);
   }
 }
diff --git a/pkg/analyzer/lib/src/workspace/basic.dart b/pkg/analyzer/lib/src/workspace/basic.dart
new file mode 100644
index 0000000..bfeb81b9
--- /dev/null
+++ b/pkg/analyzer/lib/src/workspace/basic.dart
@@ -0,0 +1,118 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:analyzer/src/workspace/workspace.dart';
+import 'package:package_config/packages.dart';
+
+/**
+ * Information about a default Dart workspace.
+ */
+class BasicWorkspace extends Workspace {
+  /**
+   * The [ResourceProvider] by which paths are converted into [Resource]s.
+   */
+  final ResourceProvider provider;
+
+  /**
+   * The absolute workspace root path.
+   */
+  final String root;
+
+  final ContextBuilder _builder;
+
+  Map<String, List<Folder>> _packageMap;
+
+  Packages _packages;
+
+  /**
+   * The singular package in this workspace.
+   *
+   * Each basic workspace is itself one package.
+   */
+  BasicWorkspacePackage _theOnlyPackage;
+
+  BasicWorkspace._(this.provider, this.root, this._builder);
+
+  @override
+  Map<String, List<Folder>> get packageMap {
+    _packageMap ??= _builder.convertPackagesToMap(packages);
+    return _packageMap;
+  }
+
+  Packages get packages {
+    _packages ??= _builder.createPackageMap(root);
+    return _packages;
+  }
+
+  @override
+  UriResolver get packageUriResolver =>
+      new PackageMapUriResolver(provider, packageMap);
+
+  @override
+  SourceFactory createSourceFactory(DartSdk sdk, SummaryDataStore summaryData) {
+    if (summaryData != null) {
+      throw new UnsupportedError(
+          'Summary files are not supported in a basic workspace.');
+    }
+    List<UriResolver> resolvers = <UriResolver>[];
+    if (sdk != null) {
+      resolvers.add(new DartUriResolver(sdk));
+    }
+    resolvers.add(packageUriResolver);
+    resolvers.add(new ResourceUriResolver(provider));
+    return new SourceFactory(resolvers, packages, provider);
+  }
+
+  @override
+  WorkspacePackage findPackageFor(String filePath) {
+    final Folder folder = provider.getFolder(filePath);
+    if (provider.pathContext.isWithin(root, folder.path)) {
+      _theOnlyPackage ??= new BasicWorkspacePackage(root, this);
+      return _theOnlyPackage;
+    } else {
+      return null;
+    }
+  }
+
+  /**
+   * Find the basic workspace that contains the given [path].
+   */
+  static BasicWorkspace find(
+      ResourceProvider provider, String path, ContextBuilder builder) {
+    Resource resource = provider.getResource(path);
+    if (resource is File) {
+      path = resource.parent.path;
+    }
+    return new BasicWorkspace._(provider, path, builder);
+  }
+}
+
+/**
+ * Information about a package defined in a _BasicWorkspace.
+ *
+ * Separate from [Packages] or package maps, this class is designed to simply
+ * understand whether arbitrary file paths represent libraries declared within
+ * a given package in a _BasicWorkspace.
+ */
+class BasicWorkspacePackage extends WorkspacePackage {
+  final String root;
+
+  final BasicWorkspace workspace;
+
+  BasicWorkspacePackage(this.root, this.workspace);
+
+  @override
+  bool contains(String path) {
+    // There is a 1-1 relationship between _BasicWorkspaces and
+    // _BasicWorkspacePackages. If a file is in a package's workspace,
+    // then it is in the package as well.
+    return workspace.provider.pathContext.isWithin(root, path);
+  }
+}
diff --git a/pkg/analyzer/lib/src/generated/bazel.dart b/pkg/analyzer/lib/src/workspace/bazel.dart
similarity index 72%
rename from pkg/analyzer/lib/src/generated/bazel.dart
rename to pkg/analyzer/lib/src/workspace/bazel.dart
index 68e19fb..d4a83b9c 100644
--- a/pkg/analyzer/lib/src/generated/bazel.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel.dart
@@ -10,9 +10,10 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/generated/workspace.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/util/uri.dart';
-import 'package:path/path.dart';
+import 'package:analyzer/src/workspace/workspace.dart';
+import 'package:path/path.dart' as path;
 
 /**
  * Instances of the class `BazelFileUriResolver` resolve `file` URI's by first
@@ -31,8 +32,8 @@
     if (!ResourceUriResolver.isFileUri(uri)) {
       return null;
     }
-    String path = fileUriToNormalizedPath(provider.pathContext, uri);
-    File file = workspace.findFile(path);
+    String filePath = fileUriToNormalizedPath(provider.pathContext, uri);
+    File file = workspace.findFile(filePath);
     if (file != null) {
       return file.createSource(actualUri ?? uri);
     }
@@ -45,7 +46,7 @@
  */
 class BazelPackageUriResolver extends UriResolver {
   final BazelWorkspace _workspace;
-  final Context _context;
+  final path.Context _context;
 
   /**
    * The cache of absolute [Uri]s to [Source]s mappings.
@@ -57,6 +58,11 @@
         _context = workspace.provider.pathContext;
 
   @override
+  void clearCache() {
+    _sourceCache.clear();
+  }
+
+  @override
   Source resolveAbsolute(Uri uri, [Uri actualUri]) {
     return _sourceCache.putIfAbsent(uri, () {
       if (uri.scheme != 'package') {
@@ -75,15 +81,15 @@
       String filePath = fileUriPart.replaceAll('/', _context.separator);
 
       if (packageName.indexOf('.') == -1) {
-        String path = _context.join(_workspace.root, 'third_party', 'dart',
-            packageName, 'lib', filePath);
-        File file = _workspace.findFile(path);
+        String fullFilePath = _context.join(_workspace.root, 'third_party',
+            'dart', packageName, 'lib', filePath);
+        File file = _workspace.findFile(fullFilePath);
         return file?.createSource(uri);
       } else {
         String packagePath = packageName.replaceAll('.', _context.separator);
-        String path =
+        String fullFilePath =
             _context.join(_workspace.root, packagePath, 'lib', filePath);
-        File file = _workspace.findFile(path);
+        File file = _workspace.findFile(fullFilePath);
         return file?.createSource(uri);
       }
     });
@@ -91,12 +97,12 @@
 
   @override
   Uri restoreAbsolute(Source source) {
-    Context context = _workspace.provider.pathContext;
-    String path = source.fullName;
+    path.Context context = _workspace.provider.pathContext;
+    String filePath = source.fullName;
 
-    Uri restore(String root, String path) {
-      if (root != null && context.isWithin(root, path)) {
-        String relative = context.relative(path, from: root);
+    Uri restore(String root, String filePath) {
+      if (root != null && context.isWithin(root, filePath)) {
+        String relative = context.relative(filePath, from: root);
         List<String> components = context.split(relative);
         if (components.length > 4 &&
             components[0] == 'third_party' &&
@@ -126,7 +132,7 @@
       _workspace.readonly,
       _workspace.root
     ]) {
-      Uri uri = restore(root, path);
+      Uri uri = restore(root, filePath);
       if (uri != null) {
         return uri;
       }
@@ -144,6 +150,13 @@
   static const String _READONLY = 'READONLY';
 
   /**
+   * The name of the file that identifies a set of Bazel Targets.
+   *
+   * For Dart package purposes, a BUILD file identifies a package.
+   */
+  static const String _buildFileName = 'BUILD';
+
+  /**
    * Default prefix for "-genfiles" and "-bin" that will be assumed if no build
    * output symlinks are found.
    */
@@ -185,13 +198,16 @@
   UriResolver get packageUriResolver => new BazelPackageUriResolver(this);
 
   @override
-  SourceFactory createSourceFactory(DartSdk sdk) {
+  SourceFactory createSourceFactory(DartSdk sdk, SummaryDataStore summaryData) {
     List<UriResolver> resolvers = <UriResolver>[];
     if (sdk != null) {
       resolvers.add(new DartUriResolver(sdk));
     }
     resolvers.add(packageUriResolver);
     resolvers.add(new BazelFileUriResolver(this));
+    if (summaryData != null) {
+      resolvers.add(InSummaryUriResolver(provider, summaryData));
+    }
     return new SourceFactory(resolvers, null, provider);
   }
 
@@ -203,7 +219,7 @@
    * not in the workspace [root].
    */
   File findFile(String absolutePath) {
-    Context context = provider.pathContext;
+    path.Context context = provider.pathContext;
     try {
       String relative = context.relative(absolutePath, from: root);
       if (relative == '.') {
@@ -242,8 +258,34 @@
     }
   }
 
+  @override
+  WorkspacePackage findPackageFor(String filePath) {
+    path.Context context = provider.pathContext;
+    Folder folder = provider.getFolder(context.dirname(filePath));
+
+    while (true) {
+      Folder parent = folder.parent;
+      if (parent == null) {
+        return null;
+      }
+      if (parent.path.length < root.length) {
+        // We've walked up outside of [root], so [path] is definitely not
+        // defined in any package in this workspace.
+        return null;
+      }
+
+      if (folder.getChildAssumingFile(_buildFileName).exists) {
+        // Found the BUILD file, denoting a Dart package.
+        return BazelWorkspacePackage(folder.path, this);
+      }
+
+      // Go up a folder.
+      folder = parent;
+    }
+  }
+
   /**
-   * Find the Bazel workspace that contains the given [path].
+   * Find the Bazel workspace that contains the given [filePath].
    *
    * Return `null` if a workspace markers, such as the `WORKSPACE` file, or
    * the sibling `READONLY` folder cannot be found.
@@ -255,16 +297,9 @@
    * folder, but there is corresponding folder 'foo' in `READONLY`, i.e. the
    * corresponding readonly workspace root.
    */
-  static BazelWorkspace find(ResourceProvider provider, String path) {
-    Context context = provider.pathContext;
-
-    // Ensure that the path is absolute and normalized.
-    if (!context.isAbsolute(path)) {
-      throw new ArgumentError('not absolute: $path');
-    }
-    path = context.normalize(path);
-
-    Folder folder = provider.getFolder(path);
+  static BazelWorkspace find(ResourceProvider provider, String filePath) {
+    path.Context context = provider.pathContext;
+    Folder folder = provider.getFolder(filePath);
     while (true) {
       Folder parent = folder.parent;
       if (parent == null) {
@@ -317,7 +352,7 @@
    * exists.
    */
   static String _findSymlinkPrefix(ResourceProvider provider, String root) {
-    Context context = provider.pathContext;
+    path.Context context = provider.pathContext;
     if (provider.getFolder(context.join(root, 'blaze-genfiles')).exists) {
       return 'blaze';
     }
@@ -328,3 +363,33 @@
     return defaultSymlinkPrefix;
   }
 }
+
+/**
+ * Information about a package defined in a BazelWorkspace.
+ *
+ * Separate from [Packages] or package maps, this class is designed to simply
+ * understand whether arbitrary file paths represent libraries declared within
+ * a given package in a BazelWorkspace.
+ */
+class BazelWorkspacePackage extends WorkspacePackage {
+  final String root;
+
+  final BazelWorkspace workspace;
+
+  BazelWorkspacePackage(this.root, this.workspace);
+
+  @override
+  bool contains(String path) {
+    if (workspace.findFile(path) == null) {
+      return false;
+    }
+    if (!workspace.provider.pathContext.isWithin(root, path)) {
+      return false;
+    }
+
+    // Just because [path] is within [root] does not mean it is in this
+    // package; it could be in a "subpackage." Must go through the work of
+    // learning exactly which package [path] is contained in.
+    return workspace.findPackageFor(path).root == root;
+  }
+}
diff --git a/pkg/analyzer/lib/src/generated/gn.dart b/pkg/analyzer/lib/src/workspace/gn.dart
similarity index 67%
rename from pkg/analyzer/lib/src/generated/gn.dart
rename to pkg/analyzer/lib/src/workspace/gn.dart
index abbed00..77ef5e8 100644
--- a/pkg/analyzer/lib/src/generated/gn.dart
+++ b/pkg/analyzer/lib/src/workspace/gn.dart
@@ -10,13 +10,14 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/generated/workspace.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/util/uri.dart';
+import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:package_config/packages.dart';
 import 'package:package_config/packages_file.dart';
 import 'package:package_config/src/packages_impl.dart';
-import 'package:path/path.dart';
+import 'package:path/path.dart' as path;
 
 /**
  * Information about a Gn workspace.
@@ -28,6 +29,13 @@
   static const String _jiriRootName = '.jiri_root';
 
   /**
+   * The name of the file that identifies a set of GN Targets.
+   *
+   * For Dart package purposes, a BUILD.gn file identifies a package.
+   */
+  static const String _buildFileName = 'BUILD.gn';
+
+  /**
    * The resource provider used to access the file system.
    */
   final ResourceProvider provider;
@@ -70,7 +78,11 @@
       new PackageMapUriResolver(provider, packageMap);
 
   @override
-  SourceFactory createSourceFactory(DartSdk sdk) {
+  SourceFactory createSourceFactory(DartSdk sdk, SummaryDataStore summaryData) {
+    if (summaryData != null) {
+      throw new UnsupportedError(
+          'Summary files are not supported in a GN workspace.');
+    }
     List<UriResolver> resolvers = <UriResolver>[];
     if (sdk != null) {
       resolvers.add(new DartUriResolver(sdk));
@@ -95,6 +107,30 @@
     return null;
   }
 
+  @override
+  WorkspacePackage findPackageFor(String path) {
+    Folder folder = provider.getFolder(provider.pathContext.dirname(path));
+
+    while (true) {
+      Folder parent = folder.parent;
+      if (parent == null) {
+        return null;
+      }
+      if (parent.path.length < root.length) {
+        // We've walked up outside of [root], so [path] is definitely not
+        // defined in any package in this workspace.
+        return null;
+      }
+
+      if (folder.getChildAssumingFile(_buildFileName).exists) {
+        return GnWorkspacePackage(folder.path, this);
+      }
+
+      // Go up a folder.
+      folder = parent;
+    }
+  }
+
   /**
    * Creates an alternate representation for available packages.
    */
@@ -103,8 +139,8 @@
     if (packages != null && packages != Packages.noPackages) {
       var pathContext = provider.pathContext;
       packages.asMap().forEach((String packageName, Uri uri) {
-        String path = fileUriToNormalizedPath(pathContext, uri);
-        folderMap[packageName] = [provider.getFolder(path)];
+        String filePath = fileUriToNormalizedPath(pathContext, uri);
+        folderMap[packageName] = [provider.getFolder(filePath)];
       });
     }
     return folderMap;
@@ -114,8 +150,8 @@
    * Loads the packages from the .packages file.
    */
   Packages _createPackages() {
-    Map<String, Uri> map = _packagesFilePaths.map((String path) {
-      File configFile = provider.getFile(path);
+    Map<String, Uri> map = _packagesFilePaths.map((String filePath) {
+      File configFile = provider.getFile(filePath);
       List<int> bytes = configFile.readAsBytesSync();
       return parse(bytes, configFile.toUri());
     }).reduce((mapOne, mapTwo) {
@@ -142,10 +178,10 @@
    * replacing the values in the map.
    */
   void _resolveSymbolicLinks(Map<String, Uri> map) {
-    Context pathContext = provider.pathContext;
+    path.Context pathContext = provider.pathContext;
     for (String packageName in map.keys) {
-      String path = fileUriToNormalizedPath(pathContext, map[packageName]);
-      Folder folder = provider.getFolder(path);
+      String filePath = fileUriToNormalizedPath(pathContext, map[packageName]);
+      Folder folder = provider.getFolder(filePath);
       String folderPath = _resolveSymbolicLink(folder);
       // Add a '.' so that the URI is suitable for resolving relative URI's
       // against it.
@@ -155,39 +191,32 @@
   }
 
   /**
-   * Find the GN workspace that contains the given [path].
+   * Find the GN workspace that contains the given [filePath].
    *
    * Return `null` if a workspace could not be found. For a workspace to be
    * found, both a `.jiri_root` file must be found, and at least one "packages"
-   * file must be found in [path]'s output directory.
+   * file must be found in [filePath]'s output directory.
    */
-  static GnWorkspace find(ResourceProvider provider, String path) {
-    Context context = provider.pathContext;
-
-    // Ensure that the path is absolute and normalized.
-    if (!context.isAbsolute(path)) {
-      throw new ArgumentError('Not an absolute path: $path');
-    }
-    path = context.normalize(path);
-
-    Folder folder = provider.getFolder(path);
+  static GnWorkspace find(ResourceProvider provider, String filePath) {
+    Folder folder = provider.getFolder(filePath);
     while (true) {
       Folder parent = folder.parent;
       if (parent == null) {
         return null;
       }
 
-      // Found the .jiri_root file, must be a non-git workspace.
       if (folder.getChildAssumingFolder(_jiriRootName).exists) {
+        // Found the .jiri_root file, must be a non-git workspace.
         String root = folder.path;
-        List<String> packagesFiles = _findPackagesFile(provider, root, path);
+        List<String> packagesFiles =
+            _findPackagesFile(provider, root, filePath);
         if (packagesFiles.isEmpty) {
           return null;
         }
         return new GnWorkspace._(provider, root, packagesFiles);
       }
 
-      // Go up one folder.
+      // Go up a folder.
       folder = parent;
     }
   }
@@ -204,10 +233,10 @@
   static List<String> _findPackagesFile(
     ResourceProvider provider,
     String root,
-    String path,
+    String filePath,
   ) {
-    Context pathContext = provider.pathContext;
-    String sourceDirectory = pathContext.relative(path, from: root);
+    path.Context pathContext = provider.pathContext;
+    String sourceDirectory = pathContext.relative(filePath, from: root);
     Folder outDirectory = _getOutDirectory(root, provider);
     if (outDirectory == null) {
       return const <String>[];
@@ -234,7 +263,7 @@
    * that file cannot be found, looks for standard output directory locations.
    */
   static Folder _getOutDirectory(String root, ResourceProvider provider) {
-    Context pathContext = provider.pathContext;
+    path.Context pathContext = provider.pathContext;
     File config = provider.getFile(pathContext.join(root, '.config'));
     if (config.exists) {
       String content = config.readAsStringSync();
@@ -242,11 +271,11 @@
           new RegExp(r'^FUCHSIA_BUILD_DIR=["\x27](.+)["\x27]$', multiLine: true)
               .firstMatch(content);
       if (match != null) {
-        String path = match.group(1);
-        if (pathContext.isRelative(path)) {
-          path = pathContext.join(root, path);
+        String buildDirPath = match.group(1);
+        if (pathContext.isRelative(buildDirPath)) {
+          buildDirPath = pathContext.join(root, buildDirPath);
         }
-        return provider.getFolder(path);
+        return provider.getFolder(buildDirPath);
       }
     }
     Folder outDirectory = provider.getFolder(pathContext.join(root, 'out'));
@@ -265,3 +294,33 @@
     }, orElse: () => null);
   }
 }
+
+/**
+ * Information about a package defined in a GnWorkspace.
+ *
+ * Separate from [Packages] or package maps, this class is designed to simply
+ * understand whether arbitrary file paths represent libraries declared within
+ * a given package in a GnWorkspace.
+ */
+class GnWorkspacePackage extends WorkspacePackage {
+  final String root;
+
+  final GnWorkspace workspace;
+
+  GnWorkspacePackage(this.root, this.workspace);
+
+  @override
+  bool contains(String path) {
+    if (workspace.findFile(path) == null) {
+      return false;
+    }
+    if (!workspace.provider.pathContext.isWithin(root, path)) {
+      return false;
+    }
+
+    // Just because [path] is within [root] does not mean it is in this
+    // package; it could be in a "subpackage." Must go through the work of
+    // learning exactly which package [path] is contained in.
+    return workspace.findPackageFor(path).root == root;
+  }
+}
diff --git a/pkg/analyzer/lib/src/generated/package_build.dart b/pkg/analyzer/lib/src/workspace/package_build.dart
similarity index 72%
rename from pkg/analyzer/lib/src/generated/package_build.dart
rename to pkg/analyzer/lib/src/workspace/package_build.dart
index 8effaf9..d33e17a 100644
--- a/pkg/analyzer/lib/src/generated/package_build.dart
+++ b/pkg/analyzer/lib/src/workspace/package_build.dart
@@ -11,11 +11,12 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/generated/workspace.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/util/uri.dart';
+import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:package_config/packages.dart';
-import 'package:path/path.dart';
+import 'package:path/path.dart' as path;
 import 'package:yaml/yaml.dart';
 
 /**
@@ -35,8 +36,8 @@
     if (!ResourceUriResolver.isFileUri(uri)) {
       return null;
     }
-    String path = fileUriToNormalizedPath(provider.pathContext, uri);
-    File file = workspace.findFile(path);
+    String filePath = fileUriToNormalizedPath(provider.pathContext, uri);
+    File file = workspace.findFile(filePath);
     if (file != null) {
       return file.createSource(actualUri ?? uri);
     }
@@ -50,7 +51,7 @@
 class PackageBuildPackageUriResolver extends UriResolver {
   final PackageBuildWorkspace _workspace;
   final UriResolver _normalUriResolver;
-  final Context _context;
+  final path.Context _context;
 
   /**
    * The cache of absolute [Uri]s to [Source]s mappings.
@@ -98,12 +99,11 @@
 
   @override
   Uri restoreAbsolute(Source source) {
-    Context context = _workspace.provider.pathContext;
-    String path = source.fullName;
+    String filePath = source.fullName;
 
-    if (context.isWithin(_workspace.root, path)) {
-      String relative = context.relative(path, from: _workspace.root);
-      List<String> components = context.split(relative);
+    if (_context.isWithin(_workspace.root, filePath)) {
+      String relative = _context.relative(filePath, from: _workspace.root);
+      List<String> components = _context.split(relative);
       if (components.length > 4 &&
           components[0] == 'build' &&
           components[1] == 'generated' &&
@@ -174,6 +174,13 @@
    */
   Packages _packages;
 
+  /**
+   * The singular package in this workspace.
+   *
+   * Each "package:build" workspace is itself one package.
+   */
+  PackageBuildWorkspacePackage _theOnlyPackage;
+
   PackageBuildWorkspace._(
       this.provider, this.root, this.projectPackageName, this._builder);
 
@@ -205,9 +212,10 @@
     if (!packageMap.containsKey(packageName)) {
       return null;
     }
-    String path = context.join(
+    path.Context context = provider.pathContext;
+    String fullBuiltPath = context.join(
         root, _dartToolRootName, 'build', 'generated', packageName, builtPath);
-    return provider.getFile(path);
+    return provider.getFile(fullBuiltPath);
   }
 
   /**
@@ -217,13 +225,18 @@
    * `bin/`, `web/`, and `test/` etc can all be built as well. This method
    * exists to give a name to that prefix processing step.
    */
-  String builtPackageSourcePath(String path) {
-    assert(context.isRelative(path));
-    return context.join('lib', path);
+  String builtPackageSourcePath(String filePath) {
+    path.Context context = provider.pathContext;
+    assert(context.isRelative(filePath), 'Not a relative path: $filePath');
+    return context.join('lib', filePath);
   }
 
   @override
-  SourceFactory createSourceFactory(DartSdk sdk) {
+  SourceFactory createSourceFactory(DartSdk sdk, SummaryDataStore summaryData) {
+    if (summaryData != null) {
+      throw new UnsupportedError(
+          'Summary files are not supported in a package:build workspace.');
+    }
     List<UriResolver> resolvers = <UriResolver>[];
     if (sdk != null) {
       resolvers.add(new DartUriResolver(sdk));
@@ -234,44 +247,48 @@
   }
 
   /**
-   * Return the file with the given [path], looking first into directories for
+   * Return the file with the given [filePath], looking first into directories for
    * source files, and then in the generated directory
    * `.dart_tool/build/generated/$projectPackageName/$FILE`. The file in the
    * workspace root is returned even if it does not exist. Return `null` if the
-   * given [path] is not in the workspace [root].
+   * given [filePath] is not in the workspace [root].
    */
-  File findFile(String path) {
-    assert(context.isAbsolute(path));
+  File findFile(String filePath) {
+    path.Context context = provider.pathContext;
+    assert(context.isAbsolute(filePath), 'Not an absolute path: $filePath');
     try {
-      final String builtPath = context.relative(path, from: root);
+      final String builtPath = context.relative(filePath, from: root);
       final File file = builtFile(builtPath, projectPackageName);
 
       if (file.exists) {
         return file;
       }
 
-      return provider.getFile(path);
+      return provider.getFile(filePath);
     } catch (_) {
       return null;
     }
   }
 
+  @override
+  WorkspacePackage findPackageFor(String filePath) {
+    final Folder folder = provider.getFolder(filePath);
+    if (provider.pathContext.isWithin(root, folder.path)) {
+      _theOnlyPackage ??= new PackageBuildWorkspacePackage(root, this);
+      return _theOnlyPackage;
+    } else {
+      return null;
+    }
+  }
+
   /**
-   * Find the package:build workspace that contains the given [path].
+   * Find the package:build workspace that contains the given [filePath].
    *
-   * Return `null` if the path is not in a package:build workspace.
+   * Return `null` if the filePath is not in a package:build workspace.
    */
   static PackageBuildWorkspace find(
-      ResourceProvider provider, String path, ContextBuilder builder) {
-    Context context = provider.pathContext;
-
-    // Ensure that the path is absolute and normalized.
-    if (!context.isAbsolute(path)) {
-      throw new ArgumentError('Not an absolute path: $path');
-    }
-    path = context.normalize(path);
-
-    Folder folder = provider.getFolder(path);
+      ResourceProvider provider, String filePath, ContextBuilder builder) {
+    Folder folder = provider.getFolder(filePath);
     while (true) {
       Folder parent = folder.parent;
       if (parent == null) {
@@ -299,3 +316,26 @@
     }
   }
 }
+
+/**
+ * Information about a package defined in a PackageBuildWorkspace.
+ *
+ * Separate from [Packages] or package maps, this class is designed to simply
+ * understand whether arbitrary file paths represent libraries declared within
+ * a given package in a PackageBuildWorkspace.
+ */
+class PackageBuildWorkspacePackage extends WorkspacePackage {
+  final String root;
+
+  final PackageBuildWorkspace workspace;
+
+  PackageBuildWorkspacePackage(this.root, this.workspace);
+
+  @override
+  bool contains(String path) {
+    // There is a 1-1 relationship between PackageBuildWorkspaces and
+    // PackageBuildWorkspacePackages. If a file is in a package's workspace,
+    // then it is in the package as well.
+    return workspace.findFile(path) != null;
+  }
+}
diff --git a/pkg/analyzer/lib/src/workspace/workspace.dart b/pkg/analyzer/lib/src/workspace/workspace.dart
new file mode 100644
index 0000000..be58cdb
--- /dev/null
+++ b/pkg/analyzer/lib/src/workspace/workspace.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/package_bundle_reader.dart';
+
+/**
+ * Abstract superclass of classes that provide information about the workspace
+ * in which analysis is being performed.
+ */
+abstract class Workspace {
+  /**
+   * Return `true` if this workspace defines a single "project" and that
+   * "project" depends upon flutter.
+   */
+  bool get hasFlutterDependency => packageMap?.containsKey('flutter') ?? false;
+
+  /**
+   * Return a (possibly null) map of package sources.
+   */
+  Map<String, List<Folder>> get packageMap;
+
+  /**
+   * The [UriResolver] that can resolve `package` URIs.
+   */
+  UriResolver get packageUriResolver;
+
+  /**
+   * The absolute workspace root path.
+   */
+  String get root;
+
+  /**
+   * Create the source factory that should be used to resolve Uris to [Source]s.
+   * The [sdk] may be `null`. The [summaryData] can also be `null`.
+   */
+  SourceFactory createSourceFactory(DartSdk sdk, SummaryDataStore summaryData);
+
+  /**
+   * Find the [WorkspacePackage] where the library at [path] is defined.
+   *
+   * Separate from [Packages] or [packageMap], this method is designed to find
+   * the package, by its root, in which a library at an arbitrary path is
+   * defined.
+   */
+  WorkspacePackage findPackageFor(String path);
+}
+
+/**
+ * Abstract superclass of classes that provide information about a package
+ * defined in a Workspace.
+ *
+ * Separate from [Packages] or package maps, this class is designed to simply
+ * understand whether arbitrary file paths represent libraries declared within
+ * a given package in a Workspace.
+ */
+abstract class WorkspacePackage {
+  String get root;
+
+  Workspace get workspace;
+
+  bool contains(String path);
+}
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index d6cd53d..33c10f2 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer
-version: 0.33.6+1-dev
+version: 0.34.2-dev
 author: Dart Team <misc@dartlang.org>
 description: Static analyzer for Dart.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
@@ -11,10 +11,10 @@
   collection: ^1.10.1
   convert: ^2.0.0
   crypto: '>=1.1.1 <3.0.0'
-  front_end: 0.1.6+8
+  front_end: 0.1.8
   glob: ^1.0.3
   html: '>=0.12.0 <1.14.0'
-  kernel: 0.3.6+8
+  kernel: 0.3.8
   meta: ^1.0.2
   package_config: '>=0.1.5 <2.0.0'
   path: '>=0.9.0 <2.0.0'
diff --git a/pkg/analyzer/test/dart/ast/visitor_test.dart b/pkg/analyzer/test/dart/ast/visitor_test.dart
index f246a06..0a8e8dd 100644
--- a/pkg/analyzer/test/dart/ast/visitor_test.dart
+++ b/pkg/analyzer/test/dart/ast/visitor_test.dart
@@ -4,11 +4,11 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/src/test_utilities/ast_type_matchers.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/parser_test.dart' show ParserTestCase;
-import '../../generated/test_support.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -40,23 +40,15 @@
 }''';
     CompilationUnit unit = parseCompilationUnit(source);
     List<AstNode> nodes = new List<AstNode>();
-    BreadthFirstVisitor<Object> visitor =
+    _BreadthFirstVisitorTestHelper visitor =
         new _BreadthFirstVisitorTestHelper(nodes);
     visitor.visitAllNodes(unit);
     expect(nodes, hasLength(59));
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is CompilationUnit, CompilationUnit, nodes[0]);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassDeclaration, ClassDeclaration, nodes[2]);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionDeclaration, FunctionDeclaration, nodes[3]);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionDeclarationStatement,
-        FunctionDeclarationStatement,
-        nodes[27]);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is IntegerLiteral, IntegerLiteral, nodes[58]);
-    //3
+    expect(nodes[0], isCompilationUnit);
+    expect(nodes[2], isClassDeclaration);
+    expect(nodes[3], isFunctionDeclaration);
+    expect(nodes[27], isFunctionDeclarationStatement);
+    expect(nodes[58], isIntegerLiteral); // 3
   }
 }
 
@@ -64,14 +56,14 @@
  * A helper class used to collect the nodes that were visited and to preserve
  * the order in which they were visited.
  */
-class _BreadthFirstVisitorTestHelper extends BreadthFirstVisitor<Object> {
+class _BreadthFirstVisitorTestHelper extends BreadthFirstVisitor<void> {
   List<AstNode> nodes;
 
   _BreadthFirstVisitorTestHelper(this.nodes) : super();
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     nodes.add(node);
-    return super.visitNode(node);
+    super.visitNode(node);
   }
 }
diff --git a/pkg/analyzer/test/dart/element/builder_test.dart b/pkg/analyzer/test/dart/element/builder_test.dart
index f460cfc..b476b61 100644
--- a/pkg/analyzer/test/dart/element/builder_test.dart
+++ b/pkg/analyzer/test/dart/element/builder_test.dart
@@ -1207,7 +1207,7 @@
  * It is used to test the [ApiElementBuilder] itself, and its usage by
  * [ElementBuilder].
  */
-abstract class _ApiElementBuilderTestMixin {
+mixin _ApiElementBuilderTestMixin {
   CompilationUnit get compilationUnit;
 
   void set isMixinSupportEnabled(bool value);
@@ -1948,9 +1948,7 @@
     expect(accessor.isSetter, isFalse);
     expect(accessor.isSynthetic, isFalse);
     expect(accessor.typeParameters, hasLength(0));
-    PropertyInducingElement variable = accessor.variable;
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableElement,
-        TopLevelVariableElement, variable);
+    TopLevelVariableElement variable = accessor.variable;
     expect(variable.isSynthetic, isTrue);
   }
 
@@ -2012,9 +2010,7 @@
     expect(accessor.isSetter, isTrue);
     expect(accessor.isSynthetic, isFalse);
     expect(accessor.typeParameters, hasLength(0));
-    PropertyInducingElement variable = accessor.variable;
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableElement,
-        TopLevelVariableElement, variable);
+    TopLevelVariableElement variable = accessor.variable;
     expect(variable.isSynthetic, isTrue);
   }
 
diff --git a/pkg/analyzer/test/file_system/file_system_test_support.dart b/pkg/analyzer/test/file_system/file_system_test_support.dart
new file mode 100644
index 0000000..25c0d4b
--- /dev/null
+++ b/pkg/analyzer/test/file_system/file_system_test_support.dart
@@ -0,0 +1,749 @@
+// 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/generated/source.dart';
+import 'package:meta/meta.dart';
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+final isFile = new TypeMatcher<File>();
+final isFileSystemException = new TypeMatcher<FileSystemException>();
+final isFolder = new TypeMatcher<Folder>();
+
+abstract class FileSystemTestSupport {
+  /// The content used for the file at the [defaultFilePath] if it is created
+  /// and no other content is provided.
+  String get defaultFileContent;
+
+  /// A path to a file within the [defaultFolderPath] that can be used by tests.
+  String get defaultFilePath;
+
+  /// A path to a folder within the [tempPath] that can be used by tests.
+  String get defaultFolderPath;
+
+  /// Return the resource provider to be used by the tests.
+  ResourceProvider get provider;
+
+  /// The absolute path to the temporary directory in which all of the tests are
+  /// to work.
+  String get tempPath;
+
+  /// Return a file accessed through the resource provider. If [exists] is
+  /// `true` then the returned file will exist, otherwise it won't. If [content]
+  /// is provided then the file will have the given content, otherwise it will
+  /// have the [defaultFileContent]. If the file does not exist then the content
+  /// is ignored. If a [filePath] is provided, then the file will be located at
+  /// that path; otherwise the file will have the [defaultFilePath].
+  File getFile({@required bool exists, String content, String filePath});
+
+  /// Return a folder accessed through the resource provider. If [exists] is
+  /// `true` then the returned folder will exist, otherwise it won't. If a
+  /// [folderPath] is provided, then the folder will be located at that path;
+  /// otherwise the folder will have the [defaultFolderPath].
+  Folder getFolder({@required bool exists, String folderPath});
+
+  /// Return a file path composed of the provided parts as defined by the
+  /// current path context.
+  String join(String part1,
+          [String part2,
+          String part3,
+          String part4,
+          String part5,
+          String part6]) =>
+      provider.pathContext.join(part1, part2, part3, part4, part5, part6);
+}
+
+/// Unlike most test mixins, this mixin defines some abstract test methods.
+/// These are tests whose behavior differs between the two implementations of
+/// the file system and therefore need to be implemented differently. (They
+/// probably shouldn't differ, but they do.) The abstract methods exist so that
+/// we cannot forget to implement the tests for each implementation.
+mixin FileTestMixin implements FileSystemTestSupport {
+  @failingTest
+  test_changes() {
+    // TODO(brianwilkerson) Implement this.
+    fail('Not tested');
+  }
+
+  test_copyTo_existing() {
+    File file = getFile(exists: true, content: 'contents');
+    Folder destination = provider.getFolder(join(tempPath, 'destination'));
+
+    File copy = file.copyTo(destination);
+    expect(copy.parent, destination);
+    expect(copy.shortName, file.shortName);
+    expect(copy.exists, isTrue);
+    expect(copy.readAsStringSync(), 'contents');
+  }
+
+  test_copyTo_notExisting() {
+    File file = getFile(exists: false);
+    Folder destination = provider.getFolder(join(tempPath, 'destination'));
+
+    expect(() => file.copyTo(destination), throwsA(isFileSystemException));
+  }
+
+  test_createSource() {
+    File file = getFile(exists: true);
+
+    Source source = file.createSource();
+    expect(source, isNotNull);
+    expect(source.fullName, defaultFilePath);
+    expect(source.uriKind, UriKind.FILE_URI);
+    expect(source.uri, new Uri.file(defaultFilePath));
+    expect(source.exists(), isTrue);
+    expect(source.contents.data, defaultFileContent);
+  }
+
+  test_delete_existing() {
+    File file = getFile(exists: true);
+    expect(file.exists, isTrue);
+
+    file.delete();
+    expect(file.exists, isFalse);
+  }
+
+  test_delete_notExisting();
+
+  test_equals_beforeAndAfterCreate() {
+    File file1 = getFile(exists: false);
+    File file2 = getFile(exists: true);
+
+    expect(file1 == file2, isTrue);
+  }
+
+  test_equals_differentPaths() {
+    File file1 = getFile(exists: true);
+    File file2 = getFile(exists: true, filePath: join(tempPath, 'file2.txt'));
+
+    expect(file1 == file2, isFalse);
+  }
+
+  test_equals_samePath() {
+    File file1 = getFile(exists: true);
+    File file2 = provider.getResource(file1.path);
+
+    expect(file1 == file2, isTrue);
+  }
+
+  test_exists_existing() {
+    File file = getFile(exists: true);
+
+    expect(file.exists, isTrue);
+  }
+
+  test_exists_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(file.exists, isFalse);
+  }
+
+  test_hashCode_samePath() {
+    File file1 = getFile(exists: true);
+    File file2 = provider.getResource(file1.path);
+
+    expect(file1.hashCode, equals(file2.hashCode));
+  }
+
+  test_isOrContains_false() {
+    File file = getFile(exists: false);
+
+    expect(file.isOrContains(join(tempPath, 'foo', 'a.dart')), isFalse);
+  }
+
+  test_isOrContains_true() {
+    File file = getFile(exists: false);
+
+    expect(file.isOrContains(file.path), isTrue);
+  }
+
+  test_lengthSync_existing() {
+    File file = getFile(exists: true);
+    List<int> bytes = <int>[1, 2, 3, 4, 5];
+    file.writeAsBytesSync(bytes);
+
+    expect(file.lengthSync, bytes.length);
+  }
+
+  test_lengthSync_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(() => file.lengthSync, throwsA(isFileSystemException));
+  }
+
+  test_modificationStamp_existing() {
+    File file = getFile(exists: true);
+
+    expect(file.modificationStamp, isNonNegative);
+  }
+
+  test_modificationStamp_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(() => file.modificationStamp, throwsA(isFileSystemException));
+  }
+
+  test_parent() {
+    File file = getFile(exists: true);
+
+    Folder parent = file.parent;
+    expect(parent, isNotNull);
+    expect(parent.exists, isTrue);
+    expect(parent.path, defaultFolderPath);
+  }
+
+  test_path() {
+    File file = getFile(exists: false);
+
+    expect(file.path, defaultFilePath);
+  }
+
+  test_readAsBytesSync_existing() {
+    File file = getFile(exists: true);
+
+    expect(file.readAsBytesSync(), <int>[97]);
+  }
+
+  test_readAsBytesSync_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(() => file.readAsBytesSync(), throwsA(isFileSystemException));
+  }
+
+  test_readAsStringSync_existing() {
+    File file = getFile(exists: true);
+
+    expect(file.readAsStringSync(), defaultFileContent);
+  }
+
+  test_readAsStringSync_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(() => file.readAsStringSync(), throwsA(isFileSystemException));
+  }
+
+  test_renameSync_existing() {
+    String oldPath = join(tempPath, 'file.txt');
+    String newPath = join(tempPath, 'new-file.txt');
+    File oldFile = getFile(exists: true, filePath: oldPath);
+
+    File newFile = oldFile.renameSync(newPath);
+    expect(oldFile.path, oldPath);
+    expect(oldFile.exists, isFalse);
+    expect(newFile.path, newPath);
+    expect(newFile.exists, isTrue);
+    expect(newFile.readAsStringSync(), defaultFileContent);
+  }
+
+  test_renameSync_existing_conflictsWithFile() {
+    String oldPath = join(tempPath, 'file.txt');
+    String newPath = join(tempPath, 'new-file.txt');
+    File oldFile = getFile(content: 'old', exists: true, filePath: oldPath);
+    File newFile = getFile(content: 'new', exists: true, filePath: newPath);
+
+    oldFile.renameSync(newPath);
+    expect(oldFile.path, oldPath);
+    expect(oldFile.exists, isFalse);
+    expect(newFile.path, newPath);
+    expect(newFile.exists, isTrue);
+    expect(newFile.readAsStringSync(), 'old');
+  }
+
+  test_renameSync_existing_conflictsWithFolder() {
+    String oldPath = join(tempPath, 'file.txt');
+    String newPath = join(tempPath, 'new-baz');
+    File oldFile = getFile(exists: true, filePath: oldPath);
+    Folder newFolder = getFolder(exists: true, folderPath: newPath);
+
+    expect(() => oldFile.renameSync(newPath), throwsA(isFileSystemException));
+    expect(oldFile.path, oldPath);
+    expect(oldFile.exists, isTrue);
+    expect(newFolder.path, newPath);
+    expect(newFolder.exists, isTrue);
+  }
+
+  test_renameSync_notExisting();
+
+  test_resolveSymbolicLinksSync_links_existing();
+
+  test_resolveSymbolicLinksSync_noLinks_existing() {
+    File file = getFile(exists: true);
+
+    expect(file.resolveSymbolicLinksSync(), file);
+  }
+
+  test_resolveSymbolicLinksSync_noLinks_notExisting();
+
+  test_shortName() {
+    File file = getFile(exists: false);
+
+    expect(file.shortName, 'test.dart');
+  }
+
+  test_toString() {
+    File file = getFile(exists: false);
+
+    expect(file.toString(), defaultFilePath);
+  }
+
+  test_toUri() {
+    File file = getFile(exists: true);
+
+    expect(file.toUri(), new Uri.file(file.path));
+  }
+
+  test_writeAsBytesSync_existing() {
+    File file = getFile(exists: true);
+
+    file.writeAsBytesSync(<int>[99, 99]);
+    expect(file.readAsBytesSync(), <int>[99, 99]);
+  }
+
+  test_writeAsBytesSync_notExisting();
+
+  test_writeAsStringSync_existing() {
+    File file = getFile(exists: true);
+
+    file.writeAsStringSync('cc');
+    expect(file.readAsStringSync(), 'cc');
+  }
+
+  test_writeAsStringSync_notExisting();
+}
+
+mixin FolderTestMixin implements FileSystemTestSupport {
+  test_canonicalizePath_absolute() {
+    Folder folder = getFolder(exists: false);
+    String path2 = join(tempPath, 'folder2');
+
+    expect(folder.canonicalizePath(path2), equals(path2));
+  }
+
+  test_canonicalizePath_absolute_dot() {
+    Folder folder = getFolder(exists: false);
+    String path2 = join(tempPath, 'folder2');
+
+    expect(folder.canonicalizePath(join(path2, '.', 'baz')),
+        equals(join(path2, 'baz')));
+  }
+
+  test_canonicalizePath_absolute_dotDot() {
+    Folder folder = getFolder(exists: false);
+    String path2 = join(tempPath, 'folder2');
+    String path3 = join(tempPath, 'folder3');
+
+    expect(
+        folder.canonicalizePath(join(path2, '..', 'folder3')), equals(path3));
+  }
+
+  test_canonicalizePath_relative() {
+    Folder folder = getFolder(exists: false);
+
+    expect(
+        folder.canonicalizePath('baz'), equals(join(defaultFolderPath, 'baz')));
+  }
+
+  test_canonicalizePath_relative_dot() {
+    Folder folder = getFolder(exists: false);
+
+    expect(folder.canonicalizePath(join('.', 'baz')),
+        equals(join(defaultFolderPath, 'baz')));
+  }
+
+  test_canonicalizePath_relative_dotDot() {
+    Folder folder = getFolder(exists: false);
+    String path2 = join(tempPath, 'folder2');
+
+    expect(folder.canonicalizePath(join('..', 'folder2')), equals(path2));
+  }
+
+  @failingTest
+  test_changes() {
+    // TODO(brianwilkerson) Implement this.
+    fail('Not tested');
+  }
+
+  test_contains_immediateChild() {
+    Folder folder = getFolder(exists: false);
+
+    expect(folder.contains(join(defaultFolderPath, 'aaa.txt')), isTrue);
+  }
+
+  test_contains_nestedChild() {
+    Folder folder = getFolder(exists: false);
+
+    expect(folder.contains(join(defaultFolderPath, 'aaa', 'bbb.txt')), isTrue);
+  }
+
+  test_contains_self() {
+    Folder folder = getFolder(exists: false);
+
+    expect(folder.contains(defaultFolderPath), isFalse);
+  }
+
+  test_contains_unrelated() {
+    Folder folder = getFolder(exists: false);
+
+    expect(folder.contains(join(tempPath, 'baz.txt')), isFalse);
+  }
+
+  test_copyTo() {
+    Folder source =
+        getFolder(exists: true, folderPath: join(tempPath, 'source'));
+    String sourcePath = source.path;
+    Folder subdirectory =
+        getFolder(exists: true, folderPath: join(sourcePath, 'subdir'));
+    String subdirectoryPath = subdirectory.path;
+    getFile(
+        exists: true,
+        content: 'file1',
+        filePath: join(sourcePath, 'file1.txt'));
+    getFile(
+        exists: true,
+        content: 'file2',
+        filePath: join(subdirectoryPath, 'file2.txt'));
+    Folder destination =
+        getFolder(exists: true, folderPath: join(tempPath, 'destination'));
+
+    Folder copy = source.copyTo(destination);
+    expect(copy.parent, destination);
+    _verifyStructure(copy, source);
+  }
+
+  test_create() {
+    Folder folder = getFolder(exists: false);
+    expect(folder.exists, isFalse);
+
+    folder.create();
+    expect(folder.exists, isTrue);
+  }
+
+  test_delete() {
+    File file =
+        getFile(exists: true, filePath: join(defaultFolderPath, 'myFile'));
+    Folder folder = file.parent;
+    expect(folder.exists, isTrue);
+    expect(file.exists, isTrue);
+
+    folder.delete();
+    expect(folder.exists, isFalse);
+    expect(file.exists, isFalse);
+  }
+
+  test_equals_differentPaths() {
+    Folder folder1 =
+        getFolder(exists: true, folderPath: join(tempPath, 'folder1'));
+    Folder folder2 =
+        getFolder(exists: true, folderPath: join(tempPath, 'folder2'));
+
+    expect(folder1 == folder2, isFalse);
+  }
+
+  test_equals_samePath() {
+    Folder folder1 = getFolder(exists: false);
+    Folder folder2 = getFolder(exists: false);
+
+    expect(folder1 == folder2, isTrue);
+  }
+
+  test_getChild_doesNotExist() {
+    Folder folder = getFolder(exists: true);
+
+    var child = folder.getChild('no-such-resource');
+    expect(child, isNotNull);
+    expect(child.exists, isFalse);
+  }
+
+  test_getChild_file() {
+    Folder folder = getFolder(exists: true);
+    getFile(exists: true, filePath: join(defaultFolderPath, 'myFile'));
+
+    var child = folder.getChild('myFile');
+    expect(child, isFile);
+    expect(child.exists, isTrue);
+  }
+
+  test_getChild_folder() {
+    Folder folder = getFolder(exists: true);
+    getFolder(exists: true, folderPath: join(folder.path, 'myFolder'));
+
+    var child = folder.getChild('myFolder');
+    expect(child, isFolder);
+    expect(child.exists, isTrue);
+  }
+
+  test_getChildAssumingFile_doesNotExist() {
+    Folder folder = getFolder(exists: true);
+
+    File child = folder.getChildAssumingFile('myFile');
+    expect(child, isNotNull);
+    expect(child.exists, isFalse);
+  }
+
+  test_getChildAssumingFile_file() {
+    Folder folder = getFolder(exists: true);
+    getFile(exists: true, filePath: join(defaultFolderPath, 'myFile'));
+
+    File child = folder.getChildAssumingFile('myFile');
+    expect(child, isNotNull);
+    expect(child.exists, isTrue);
+  }
+
+  test_getChildAssumingFile_folder() {
+    Folder folder = getFolder(exists: true);
+    getFolder(exists: true, folderPath: join(defaultFolderPath, 'myFolder'));
+
+    File child = folder.getChildAssumingFile('myFolder');
+    expect(child, isNotNull);
+    expect(child.exists, isFalse);
+  }
+
+  test_getChildAssumingFolder_doesNotExist() {
+    Folder folder = getFolder(exists: true);
+
+    Folder child = folder.getChildAssumingFolder('myFile');
+    expect(child, isNotNull);
+    expect(child.exists, isFalse);
+  }
+
+  test_getChildAssumingFolder_file() {
+    Folder folder = getFolder(exists: true);
+    getFile(exists: true, filePath: join(defaultFolderPath, 'myFile'));
+
+    Folder child = folder.getChildAssumingFolder('myFile');
+    expect(child, isNotNull);
+    expect(child.exists, isFalse);
+  }
+
+  test_getChildAssumingFolder_folder() {
+    Folder folder = getFolder(exists: true);
+    getFolder(exists: true, folderPath: join(defaultFolderPath, 'myFolder'));
+
+    Folder child = folder.getChildAssumingFolder('myFolder');
+    expect(child, isNotNull);
+    expect(child.exists, isTrue);
+  }
+
+  test_getChildren_doesNotExist() {
+    Folder folder = getFolder(exists: true);
+
+    folder = folder.getChildAssumingFolder('no-such-folder');
+    expect(() => folder.getChildren(), throwsA(isFileSystemException));
+  }
+
+  test_getChildren_exists() {
+    Folder folder = getFolder(exists: true);
+    // create 2 files and 1 folder
+    getFile(exists: true, filePath: join(defaultFolderPath, 'a.txt'));
+    getFolder(exists: true, folderPath: join(defaultFolderPath, 'bFolder'));
+    getFile(exists: true, filePath: join(defaultFolderPath, 'c.txt'));
+
+    // prepare 3 children
+    List<Resource> children = folder.getChildren();
+    expect(children, hasLength(3));
+    children.sort((a, b) => a.shortName.compareTo(b.shortName));
+    // check that each child exists
+    children.forEach((child) {
+      expect(child.exists, true);
+    });
+    // check names
+    expect(children[0].shortName, 'a.txt');
+    expect(children[1].shortName, 'bFolder');
+    expect(children[2].shortName, 'c.txt');
+    // check types
+    expect(children[0], isFile);
+    expect(children[1], isFolder);
+    expect(children[2], isFile);
+  }
+
+  test_hashCode() {
+    Folder folder1 = getFolder(exists: false);
+    Folder folder2 = getFolder(exists: false);
+
+    expect(folder1.hashCode, folder2.hashCode);
+  }
+
+  test_isOrContains_containedFile() {
+    Folder folder = getFolder(exists: true);
+
+    expect(folder.isOrContains(join(defaultFolderPath, 'aaa.txt')), isTrue);
+  }
+
+  test_isOrContains_deeplyContained() {
+    Folder folder = getFolder(exists: true);
+
+    expect(
+        folder.isOrContains(join(defaultFolderPath, 'aaa', 'bbb.txt')), isTrue);
+  }
+
+  test_isOrContains_notContained() {
+    Folder folder = getFolder(exists: true);
+
+    expect(folder.isOrContains(join(tempPath, 'baz.txt')), isFalse);
+  }
+
+  test_isOrContains_same() {
+    Folder folder = getFolder(exists: true);
+
+    expect(folder.isOrContains(defaultFolderPath), isTrue);
+  }
+
+  test_parent() {
+    Folder folder = getFolder(exists: true);
+
+    Folder parent = folder.parent;
+    expect(parent.path, equals(tempPath));
+    //
+    // Since the OS is in control of where tempPath is, we don't know how far it
+    // should be from the root. So just verify that each call to parent results
+    // in a folder with a shorter path, and that we reach the root eventually.
+    //
+    while (true) {
+      Folder grandParent = parent.parent;
+      if (grandParent == null) {
+        break;
+      }
+      expect(grandParent.path.length, lessThan(parent.path.length));
+      parent = grandParent;
+    }
+  }
+
+  test_toUri() {
+    Folder folder = getFolder(exists: true);
+
+    expect(folder.toUri(), new Uri.directory(defaultFolderPath));
+  }
+
+  /**
+   * Verify that the [copy] has the same name and content as the [source].
+   */
+  void _verifyStructure(Folder copy, Folder source) {
+    expect(copy.shortName, source.shortName);
+    Map<String, File> sourceFiles = <String, File>{};
+    Map<String, Folder> sourceFolders = <String, Folder>{};
+    for (Resource child in source.getChildren()) {
+      if (child is File) {
+        sourceFiles[child.shortName] = child;
+      } else if (child is Folder) {
+        sourceFolders[child.shortName] = child;
+      } else {
+        fail('Unknown class of resource: ${child.runtimeType}');
+      }
+    }
+    Map<String, File> copyFiles = <String, File>{};
+    Map<String, Folder> copyFolders = <String, Folder>{};
+    for (Resource child in source.getChildren()) {
+      if (child is File) {
+        copyFiles[child.shortName] = child;
+      } else if (child is Folder) {
+        copyFolders[child.shortName] = child;
+      } else {
+        fail('Unknown class of resource: ${child.runtimeType}');
+      }
+    }
+    for (String fileName in sourceFiles.keys) {
+      File sourceChild = sourceFiles[fileName];
+      File copiedChild = copyFiles[fileName];
+      if (copiedChild == null) {
+        fail('Failed to copy file ${sourceChild.path}');
+      }
+      expect(copiedChild.readAsStringSync(), sourceChild.readAsStringSync(),
+          reason: 'Incorrectly copied file ${sourceChild.path}');
+    }
+    for (String fileName in sourceFolders.keys) {
+      Folder sourceChild = sourceFolders[fileName];
+      Folder copiedChild = copyFolders[fileName];
+      if (copiedChild == null) {
+        fail('Failed to copy folder ${sourceChild.path}');
+      }
+      _verifyStructure(copiedChild, sourceChild);
+    }
+  }
+}
+
+mixin ResourceProviderTestMixin implements FileSystemTestSupport {
+  test_getFile_existing() {
+    getFile(exists: true);
+
+    File file = provider.getFile(defaultFilePath);
+    expect(file, isNotNull);
+    expect(file.path, defaultFilePath);
+    expect(file.exists, isTrue);
+  }
+
+  test_getFile_notExisting() {
+    File file = provider.getFile(defaultFilePath);
+    expect(file, isNotNull);
+    expect(file.path, defaultFilePath);
+    expect(file.exists, isFalse);
+  }
+
+  test_getFolder_existing() {
+    getFolder(exists: true);
+
+    Folder folder = provider.getFolder(defaultFolderPath);
+    expect(folder, isNotNull);
+    expect(folder.path, defaultFolderPath);
+    expect(folder.exists, isTrue);
+  }
+
+  test_getFolder_notExisting() {
+    Folder folder = provider.getFolder(defaultFolderPath);
+    expect(folder, isNotNull);
+    expect(folder.path, defaultFolderPath);
+    expect(folder.exists, isFalse);
+  }
+
+  test_getModificationTimes_existing() async {
+    Source source = getFile(exists: true).createSource();
+
+    List<int> times = await provider.getModificationTimes([source]);
+    expect(times, [source.modificationStamp]);
+  }
+
+  test_getModificationTimes_notExisting() async {
+    Source source = getFile(exists: false).createSource();
+
+    List<int> times = await provider.getModificationTimes([source]);
+    expect(times, [-1]);
+  }
+
+  test_getResource_file_existing() {
+    String filePath = getFile(exists: true).path;
+
+    Resource resource = provider.getResource(filePath);
+    expect(resource, isFile);
+  }
+
+  test_getResource_folder_existing() {
+    String filePath = getFolder(exists: true).path;
+
+    Resource resource = provider.getResource(filePath);
+    expect(resource, isFolder);
+  }
+
+  test_getResource_notExisting() {
+    String resourcePath = getFile(exists: false).path;
+
+    Resource resource = provider.getResource(resourcePath);
+    expect(resource, isFile);
+  }
+
+  test_getStateLocation_uniqueness() {
+    Folder folderOne = provider.getStateLocation('one');
+    expect(folderOne, isNotNull);
+
+    Folder folderTwo = provider.getStateLocation('two');
+    expect(folderTwo, isNotNull);
+    expect(folderTwo, isNot(equals(folderOne)));
+
+    expect(provider.getStateLocation('one'), equals(folderOne));
+  }
+
+  test_pathContext() {
+    expect(provider.pathContext, path.context);
+  }
+}
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart
index 1c58e09..443e842 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -3,36 +3,92 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:core';
 
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:path/path.dart' as pathos;
+import 'package:meta/meta.dart';
+import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:watcher/watcher.dart';
 
+import 'file_system_test_support.dart';
+
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(FileSystemExceptionTest);
-    defineReflectiveTests(FileTest);
-    defineReflectiveTests(FolderTest);
     defineReflectiveTests(MemoryFileSourceExistingTest);
     defineReflectiveTests(MemoryFileSourceNotExistingTest);
+    defineReflectiveTests(MemoryFileTest);
+    defineReflectiveTests(MemoryFolderTest);
     defineReflectiveTests(MemoryResourceProviderTest);
   });
 }
 
-final _isFile = new TypeMatcher<File>();
-final _isFileSystemException = new TypeMatcher<FileSystemException>();
-final _isFolder = new TypeMatcher<Folder>();
+abstract class BaseTest extends FileSystemTestSupport {
+  /// The resource provider to be used by the tests. Tests should use [provider]
+  /// to access the resource provider.
+  MemoryResourceProvider _provider;
+
+  /// The absolute path to the temporary directory in which all of the tests are
+  /// to work.
+  String tempPath;
+
+  /// A path to a folder within the [tempPath] that can be used by tests.
+  String defaultFolderPath;
+
+  /// A path to a file within the [defaultFolderPath] that can be used by tests.
+  String defaultFilePath;
+
+  /// The content used for the file at the [defaultFilePath] if it is created
+  /// and no other content is provided.
+  String get defaultFileContent => 'a';
+
+  /// Return the resource provider to be used by the tests.
+  MemoryResourceProvider get provider => _provider ??= createProvider();
+
+  /// Create the resource provider to be used by the tests. Subclasses can
+  /// override this method to change the class of resource provider that is
+  /// used.
+  MemoryResourceProvider createProvider() => new MemoryResourceProvider();
+
+  File getFile({@required bool exists, String content, String filePath}) {
+    if (filePath == null) {
+      filePath = defaultFilePath;
+    } else {
+      filePath = provider.convertPath(filePath);
+    }
+    if (exists) {
+      provider.newFile(filePath, content ?? defaultFileContent);
+    }
+    return provider.getFile(filePath);
+  }
+
+  Folder getFolder({@required bool exists, String folderPath}) {
+    if (folderPath == null) {
+      folderPath = defaultFolderPath;
+    } else {
+      folderPath = provider.convertPath(folderPath);
+    }
+    if (exists) {
+      provider.newFolder(folderPath);
+    }
+    return provider.getFolder(folderPath);
+  }
+
+  setUp() {
+    tempPath = provider.convertPath('/temp');
+    defaultFolderPath = join(tempPath, 'bar');
+    defaultFilePath = join(tempPath, 'bar', 'test.dart');
+  }
+}
 
 @reflectiveTest
 class FileSystemExceptionTest {
-  void test_constructor() {
+  test_constructor() {
     var exception = new FileSystemException('/my/path', 'my message');
     expect(exception.path, '/my/path');
     expect(exception.message, 'my message');
@@ -42,766 +98,289 @@
 }
 
 @reflectiveTest
-class FileTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
-
-  void test_copy() {
-    String contents = 'contents';
-    File file =
-        provider.newFile(provider.convertPath('/foo/file.txt'), contents);
-    Folder destination =
-        provider.getFolder(provider.convertPath('/destination'));
-
-    File copy = file.copyTo(destination);
-    expect(copy.parent, destination);
-    expect(copy.shortName, file.shortName);
-    expect(copy.readAsStringSync(), contents);
-  }
-
-  void test_delete() {
-    File file =
-        provider.newFile(provider.convertPath('/foo/file.txt'), 'content');
-    expect(file.exists, isTrue);
-    // delete
-    file.delete();
-    expect(file.exists, isFalse);
-  }
-
-  void test_equals_beforeAndAfterCreate() {
-    String path = provider.convertPath('/file.txt');
-    File file1 = provider.getResource(path);
-    provider.newFile(path, 'contents');
-    File file2 = provider.getResource(path);
-    expect(file1 == file2, isTrue);
-  }
-
-  void test_equals_false() {
-    File fileA = provider.getResource(provider.convertPath('/fileA.txt'));
-    File fileB = provider.getResource(provider.convertPath('/fileB.txt'));
-    expect(fileA == new Object(), isFalse);
-    expect(fileA == fileB, isFalse);
-  }
-
-  void test_equals_true() {
-    File file = provider.getResource(provider.convertPath('/file.txt'));
-    expect(file == file, isTrue);
-  }
-
-  void test_exists_false() {
-    File file = provider.getResource(provider.convertPath('/file.txt'));
-    expect(file, isNotNull);
-    expect(file.exists, isFalse);
-  }
-
-  void test_exists_true() {
-    String path = provider.convertPath('/foo/file.txt');
-    provider.newFile(path, 'qwerty');
-    File file = provider.getResource(path);
-    expect(file, isNotNull);
-    expect(file.exists, isTrue);
-  }
-
-  void test_fullName() {
-    String path = provider.convertPath('/foo/bar/file.txt');
-    File file = provider.getResource(path);
-    expect(file.path, path);
-  }
-
-  void test_hashCode() {
-    String path = provider.convertPath('/foo/bar/file.txt');
-    File file1 = provider.getResource(path);
-    provider.newFile(path, 'contents');
-    File file2 = provider.getResource(path);
-    expect(file1.hashCode, equals(file2.hashCode));
-  }
-
-  void test_isOrContains() {
-    String path = provider.convertPath('/foo/bar/file.txt');
-    File file = provider.getResource(path);
-    expect(file.isOrContains(path), isTrue);
-    expect(file.isOrContains(provider.convertPath('/foo/bar')), isFalse);
-  }
-
-  void test_lengthSync_doesNotExist() {
-    File file = provider.getResource(provider.convertPath('/test.txt'));
-    expect(() {
-      file.lengthSync;
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_lengthSync_exists() {
-    List<int> bytes = <int>[1, 2, 3, 4, 5];
-    File file =
-        provider.newFileWithBytes(provider.convertPath('/file.bin'), bytes);
-    expect(file.lengthSync, bytes.length);
-  }
-
-  void test_modificationStamp_doesNotExist() {
-    String path = provider.convertPath('/foo/bar/file.txt');
-    File file = provider.newFile(path, 'qwerty');
-    provider.deleteFile(path);
-    expect(() {
-      file.modificationStamp;
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_modificationStamp_exists() {
-    String path = provider.convertPath('/foo/bar/file.txt');
-    File file = provider.newFile(path, 'qwerty');
-    expect(file.modificationStamp, isNonNegative);
-  }
-
-  void test_parent() {
-    String path = provider.convertPath('/foo/bar/file.txt');
-    provider.newFile(path, 'content');
-    File file = provider.getResource(path);
-    Resource parent = file.parent;
-    expect(parent, _isFolder);
-    expect(parent.path, equals(provider.convertPath('/foo/bar')));
-  }
-
-  void test_readAsBytesSync_doesNotExist() {
-    File file = provider.getResource(provider.convertPath('/test.bin'));
-    expect(() {
-      file.readAsBytesSync();
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_readAsBytesSync_exists() {
-    List<int> bytes = <int>[1, 2, 3, 4, 5];
-    File file =
-        provider.newFileWithBytes(provider.convertPath('/file.bin'), bytes);
-    expect(file.readAsBytesSync(), bytes);
-  }
-
-  void test_readAsStringSync_doesNotExist() {
-    File file = provider.getResource(provider.convertPath('/test.txt'));
-    expect(() {
-      file.readAsStringSync();
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_readAsStringSync_exists() {
-    File file = provider.newFile(provider.convertPath('/file.txt'), 'abc');
-    expect(file.readAsStringSync(), 'abc');
-  }
-
-  void test_renameSync_newDoesNotExist() {
-    String oldPath = provider.convertPath('/foo/bar/file.txt');
-    String newPath = provider.convertPath('/foo/bar/new-file.txt');
-    File file = provider.newFile(oldPath, 'text');
-    File newFile = file.renameSync(newPath);
-    expect(file.path, oldPath);
-    expect(file.exists, isFalse);
-    expect(newFile.path, newPath);
-    expect(newFile.exists, isTrue);
-    expect(newFile.readAsStringSync(), 'text');
-  }
-
-  void test_renameSync_newExists_file() {
-    String oldPath = provider.convertPath('/foo/bar/file.txt');
-    String newPath = provider.convertPath('/foo/bar/new-file.txt');
-    File file = provider.newFile(oldPath, 'text');
-    provider.newFile(newPath, 'new text');
-    File newFile = file.renameSync(newPath);
-    expect(file.path, oldPath);
-    expect(file.exists, isFalse);
-    expect(newFile.path, newPath);
-    expect(newFile.exists, isTrue);
-    expect(newFile.readAsStringSync(), 'text');
-  }
-
-  void test_renameSync_newExists_folder() {
-    String oldPath = provider.convertPath('/foo/bar/file.txt');
-    String newPath = provider.convertPath('/foo/bar/baz');
-    File file = provider.newFile(oldPath, 'text');
-    provider.newFolder(newPath);
-    expect(() {
-      file.renameSync(newPath);
-    }, throwsA(_isFileSystemException));
-    expect(file.path, oldPath);
-    expect(file.exists, isTrue);
-  }
-
-  void test_resolveSymbolicLinksSync() {
-    File file = provider.newFile(provider.convertPath('/test.txt'), 'text');
-    expect(file.resolveSymbolicLinksSync(), file);
-  }
-
-  void test_shortName() {
-    File file = provider.getResource(provider.convertPath('/foo/bar/file.txt'));
-    expect(file.shortName, 'file.txt');
-  }
-
-  void test_toString() {
-    String path = provider.convertPath('/foo/bar/file.txt');
-    File file = provider.getResource(path);
-    expect(file.toString(), path);
-  }
-
-  void test_toUri() {
-    String path = provider.convertPath('/foo/file.txt');
-    File file = provider.newFile(path, '');
-    expect(file.toUri(), provider.pathContext.toUri(path));
-  }
-
-  void test_writeAsBytesSync_existing() {
-    List<int> content = <int>[1, 2];
-    File file = provider.newFileWithBytes(
-        provider.convertPath('/foo/file.bin'), content);
-    expect(file.readAsBytesSync(), content);
-    // write new bytes
-    content = <int>[10, 20];
-    file.writeAsBytesSync(content);
-    expect(file.readAsBytesSync(), content);
-  }
-
-  void test_writeAsBytesSync_new() {
-    File file = provider.getFile(provider.convertPath('/foo/file.bin'));
-    expect(file.exists, false);
-    // write new bytes
-    List<int> content = <int>[10, 20];
-    file.writeAsBytesSync(content);
-    expect(file.exists, true);
-    expect(file.readAsBytesSync(), content);
-  }
-
-  void test_writeAsStringSync_existing() {
-    String content = 'ab';
-    File file =
-        provider.newFile(provider.convertPath('/foo/file.txt'), content);
-    expect(file.readAsStringSync(), content);
-    // write new bytes
-    content = 'CD';
-    file.writeAsStringSync(content);
-    expect(file.readAsStringSync(), content);
-  }
-
-  void test_writeAsStringSync_new() {
-    File file = provider.getFile(provider.convertPath('/foo/file.txt'));
-    expect(file.exists, false);
-    // write new bytes
-    String content = 'ef';
-    file.writeAsStringSync(content);
-    expect(file.exists, true);
-    expect(file.readAsStringSync(), content);
-  }
-}
-
-@reflectiveTest
-class FolderTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
-  String path;
-  Folder folder;
-
-  void setUp() {
-    path = provider.convertPath('/foo/bar');
-    folder = provider.newFolder(path);
-  }
-
-  void test_canonicalizePath() {
-    expect(folder.canonicalizePath(provider.convertPath('baz')),
-        equals(provider.convertPath('/foo/bar/baz')));
-    expect(folder.canonicalizePath(provider.convertPath('/baz')),
-        equals(provider.convertPath('/baz')));
-    expect(folder.canonicalizePath(provider.convertPath('../baz')),
-        equals(provider.convertPath('/foo/baz')));
-    expect(folder.canonicalizePath(provider.convertPath('/a/b/../c')),
-        equals(provider.convertPath('/a/c')));
-    expect(folder.canonicalizePath(provider.convertPath('./baz')),
-        equals(provider.convertPath('/foo/bar/baz')));
-    expect(folder.canonicalizePath(provider.convertPath('/a/b/./c')),
-        equals(provider.convertPath('/a/b/c')));
-  }
-
-  void test_contains() {
-    expect(folder.contains(provider.convertPath('/foo/bar/aaa.txt')), isTrue);
-    expect(
-        folder.contains(provider.convertPath('/foo/bar/aaa/bbb.txt')), isTrue);
-    expect(folder.contains(provider.convertPath('/baz.txt')), isFalse);
-    expect(folder.contains(provider.convertPath('/foo/bar')), isFalse);
-  }
-
-  void test_copy() {
-    String sourcePath = provider.convertPath('/source');
-    String subdirPath = provider.convertPath('/source/subdir');
-    provider.newFolder(sourcePath);
-    provider.newFolder(subdirPath);
-    provider.newFile(provider.convertPath('/source/file1.txt'), 'file1');
-    provider.newFile(provider.convertPath('/source/subdir/file2.txt'), 'file2');
-    Folder source = provider.getFolder(sourcePath);
-    Folder destination =
-        provider.getFolder(provider.convertPath('/destination'));
-
-    Folder copy = source.copyTo(destination);
-    expect(copy.parent, destination);
-    _verifyStructure(copy, source);
-  }
-
-  void test_delete() {
-    Folder folder = provider.newFolder(provider.convertPath('/foo'));
-    Folder barFolder = provider.newFolder(provider.convertPath('/foo/bar'));
-    File aFile = provider.newFile(provider.convertPath('/foo/bar/a.txt'), '');
-    File bFile = provider.newFile(provider.convertPath('/foo/b.txt'), '');
-    expect(folder.exists, isTrue);
-    expect(barFolder.exists, isTrue);
-    expect(aFile.exists, isTrue);
-    expect(bFile.exists, isTrue);
-    // delete 'folder'
-    folder.delete();
-    expect(folder.exists, isFalse);
-    expect(barFolder.exists, isFalse);
-    expect(aFile.exists, isFalse);
-    expect(bFile.exists, isFalse);
-  }
-
-  void test_equal_false() {
-    String path2 = provider.convertPath('/foo/baz');
-    Folder folder2 = provider.newFolder(path2);
-    expect(folder == folder2, isFalse);
-  }
-
-  void test_equal_true() {
-    Folder folder2 = provider.getResource(path);
-    expect(folder == folder2, isTrue);
-  }
-
-  void test_getChild_doesNotExist() {
-    File file = folder.getChild('file.txt');
-    expect(file, isNotNull);
-    expect(file.exists, isFalse);
-  }
-
-  void test_getChild_file() {
-    provider.newFile(provider.convertPath('/foo/bar/file.txt'), 'content');
-    File child = folder.getChild('file.txt');
-    expect(child, isNotNull);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChild_folder() {
-    provider.newFolder(provider.convertPath('/foo/bar/baz'));
-    Folder child = folder.getChild('baz');
-    expect(child, isNotNull);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChildAssumingFile_doesNotExist() {
-    File child = folder.getChildAssumingFile('name');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFile_file() {
-    provider.newFile(provider.convertPath('/foo/bar/name'), 'content');
-    File child = folder.getChildAssumingFile('name');
-    expect(child, isNotNull);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChildAssumingFile_folder() {
-    provider.newFolder(provider.convertPath('/foo/bar/name'));
-    File child = folder.getChildAssumingFile('name');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFolder_doesNotExist() {
-    Folder child = folder.getChildAssumingFolder('foldername');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFolder_file() {
-    provider.newFile(provider.convertPath('/foo/bar/foldername'), 'content');
-    Folder child = folder.getChildAssumingFolder('foldername');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFolder_folder() {
-    provider.newFolder(provider.convertPath('/foo/bar/foldername'));
-    Folder child = folder.getChildAssumingFolder('foldername');
-    expect(child, isNotNull);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChildren_doesNotExist() {
-    folder = folder.getChildAssumingFolder('no-such-folder');
-    expect(() {
-      folder.getChildren();
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_getChildren_exists() {
-    provider.newFile(provider.convertPath('/foo/bar/a.txt'), 'aaa');
-    provider.newFolder(provider.convertPath('/foo/bar/bFolder'));
-    provider.newFile(provider.convertPath('/foo/bar/c.txt'), 'ccc');
-    // prepare 3 children
-    List<Resource> children = folder.getChildren();
-    expect(children, hasLength(3));
-    children.sort((a, b) => a.shortName.compareTo(b.shortName));
-    // check that each child exists
-    children.forEach((child) {
-      expect(child.exists, true);
-    });
-    // check names
-    expect(children[0].shortName, 'a.txt');
-    expect(children[1].shortName, 'bFolder');
-    expect(children[2].shortName, 'c.txt');
-    // check types
-    expect(children[0], _isFile);
-    expect(children[1], _isFolder);
-    expect(children[2], _isFile);
-  }
-
-  void test_hashCode() {
-    Folder folder2 = provider.getResource(path);
-    expect(folder.hashCode, folder2.hashCode);
-  }
-
-  void test_isOrContains() {
-    expect(folder.isOrContains(provider.convertPath('/foo/bar')), isTrue);
-    expect(
-        folder.isOrContains(provider.convertPath('/foo/bar/aaa.txt')), isTrue);
-    expect(folder.isOrContains(provider.convertPath('/foo/bar/aaa/bbb.txt')),
-        isTrue);
-    expect(folder.isOrContains(provider.convertPath('/baz.txt')), isFalse);
-  }
-
-  void test_parent() {
-    Resource parent1 = folder.parent;
-    expect(parent1, _isFolder);
-    expect(parent1.path, equals(provider.convertPath('/foo')));
-    Resource parent2 = parent1.parent;
-    expect(parent2, _isFolder);
-    expect(parent2.path, equals(provider.convertPath('/')));
-    expect(parent2.parent, isNull);
-  }
-
-  void test_toUri() {
-    String path = provider.convertPath('/foo/directory');
-    Folder folder = provider.newFolder(path);
-    expect(folder.toUri(), provider.pathContext.toUri(path + '/'));
-  }
-
-  /**
-   * Verify that the [copy] has the same name and content as the [source].
-   */
-  void _verifyStructure(Folder copy, Folder source) {
-    expect(copy.shortName, source.shortName);
-    Map<String, File> sourceFiles = <String, File>{};
-    Map<String, Folder> sourceFolders = <String, Folder>{};
-    for (Resource child in source.getChildren()) {
-      if (child is File) {
-        sourceFiles[child.shortName] = child;
-      } else if (child is Folder) {
-        sourceFolders[child.shortName] = child;
-      } else {
-        fail('Unknown class of resource: ${child.runtimeType}');
-      }
-    }
-    Map<String, File> copyFiles = <String, File>{};
-    Map<String, Folder> copyFolders = <String, Folder>{};
-    for (Resource child in source.getChildren()) {
-      if (child is File) {
-        copyFiles[child.shortName] = child;
-      } else if (child is Folder) {
-        copyFolders[child.shortName] = child;
-      } else {
-        fail('Unknown class of resource: ${child.runtimeType}');
-      }
-    }
-    for (String fileName in sourceFiles.keys) {
-      File sourceChild = sourceFiles[fileName];
-      File copiedChild = copyFiles[fileName];
-      if (copiedChild == null) {
-        fail('Failed to copy file ${sourceChild.path}');
-      }
-      expect(copiedChild.readAsStringSync(), sourceChild.readAsStringSync(),
-          reason: 'Incorrectly copied file ${sourceChild.path}');
-    }
-    for (String fileName in sourceFolders.keys) {
-      Folder sourceChild = sourceFolders[fileName];
-      Folder copiedChild = copyFolders[fileName];
-      if (copiedChild == null) {
-        fail('Failed to copy folder ${sourceChild.path}');
-      }
-      _verifyStructure(copiedChild, sourceChild);
-    }
-  }
-}
-
-@reflectiveTest
-class MemoryFileSourceExistingTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
-  String path;
+class MemoryFileSourceExistingTest extends BaseTest {
+  String sourcePath;
   Source source;
 
   setUp() {
-    path = provider.convertPath('/foo/test.dart');
-    File file = provider.newFile(path, 'library test;');
+    super.setUp();
+    File file = getFile(exists: true);
+    sourcePath = file.path;
     source = file.createSource();
   }
 
-  void test_contents() {
+  test_contents() {
     TimestampedData<String> contents = source.contents;
-    expect(contents.data, 'library test;');
+    expect(contents.data, defaultFileContent);
   }
 
-  void test_encoding() {
-    String expected = 'file:///foo/test.dart';
-    if (provider.pathContext.style == pathos.windows.style) {
-      expected = 'file:///C:/foo/test.dart';
-    }
-    expect(source.encoding, expected);
+  test_encoding() {
+    expect(source.encoding, new Uri.file(defaultFilePath).toString());
   }
 
-  void test_equals_false_differentFile() {
-    File fileA = provider.newFile(provider.convertPath('/foo/a.dart'), '');
-    File fileB = provider.newFile(provider.convertPath('/foo/b.dart'), '');
+  test_equals_false_differentFile() {
+    File fileA = getFile(exists: false, filePath: join(tempPath, 'a.dart'));
+    File fileB = getFile(exists: false, filePath: join(tempPath, 'b.dart'));
     Source sourceA = fileA.createSource();
     Source sourceB = fileB.createSource();
+
     expect(sourceA == sourceB, isFalse);
   }
 
-  void test_equals_false_notMemorySource() {
-    File file = provider.newFile(path, '');
-    Source source = file.createSource();
+  test_equals_false_notMemorySource() {
     expect(source == new Object(), isFalse);
   }
 
-  void test_equals_true_sameFile() {
-    File file = provider.newFile(path, '');
-    Source sourceA = file.createSource();
-    Source sourceB = file.createSource();
+  test_equals_true_sameFile() {
+    Source sourceA = getFile(exists: false).createSource();
+    Source sourceB = getFile(exists: false).createSource();
+
     expect(sourceA == sourceB, isTrue);
   }
 
-  void test_equals_true_self() {
-    File file = provider.newFile(path, '');
-    Source source = file.createSource();
+  test_equals_true_self() {
     expect(source == source, isTrue);
   }
 
-  void test_exists() {
+  test_exists() {
     expect(source.exists(), isTrue);
   }
 
-  void test_fullName() {
-    expect(source.fullName, path);
+  test_fullName() {
+    expect(source.fullName, sourcePath);
   }
 
-  void test_hashCode() {
-    source.hashCode;
+  test_hashCode() {
+    expect(source.hashCode, isNotNull);
   }
 
-  void test_resolveRelative() {
+  test_resolveRelative() {
     Uri relative = resolveRelativeUri(
         source.uri,
         provider.pathContext
             .toUri(provider.pathContext.join('bar', 'baz.dart')));
-    expect(relative,
-        provider.pathContext.toUri(provider.convertPath('/foo/bar/baz.dart')));
+    expect(
+        relative,
+        provider.pathContext
+            .toUri(provider.convertPath('/temp/bar/bar/baz.dart')));
   }
 
-  void test_resolveRelative_dart() {
-    File file =
-        provider.newFile(provider.convertPath('/sdk/lib/core/core.dart'), '');
+  test_resolveRelative_dart() {
+    File file = getFile(
+        exists: false,
+        filePath: provider.convertPath('/sdk/lib/core/core.dart'));
     Source source = file.createSource(Uri.parse('dart:core'));
+
     Uri resolved = resolveRelativeUri(source.uri, Uri.parse('int.dart'));
     expect(resolved.toString(), 'dart:core/int.dart');
   }
 
-  void test_shortName() {
+  test_shortName() {
     expect(source.shortName, 'test.dart');
   }
 }
 
 @reflectiveTest
-class MemoryFileSourceNotExistingTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
-  String path;
+class MemoryFileSourceNotExistingTest extends BaseTest {
+  String sourcePath;
   Source source;
 
   setUp() {
-    path = provider.convertPath('/foo/test.dart');
-    File file = provider.getResource(path);
+    super.setUp();
+    File file = getFile(exists: false);
+    sourcePath = file.path;
     source = file.createSource();
   }
 
-  void test_contents() {
-    expect(() {
-      source.contents;
-    }, throwsA(_isFileSystemException));
+  test_contents() {
+    expect(() => source.contents, throwsA(isFileSystemException));
   }
 
-  void test_encoding() {
-    String expected = 'file:///foo/test.dart';
-    if (provider.pathContext.style == pathos.windows.style) {
-      expected = 'file:///C:/foo/test.dart';
-    }
-    expect(source.encoding, expected);
+  test_encoding() {
+    expect(source.encoding, new Uri.file(defaultFilePath).toString());
   }
 
-  void test_exists() {
+  test_exists() {
     expect(source.exists(), isFalse);
   }
 
-  void test_fullName() {
-    expect(source.fullName, path);
+  test_fullName() {
+    expect(source.fullName, sourcePath);
   }
 
-  void test_modificationStamp() {
+  test_modificationStamp() {
     expect(source.modificationStamp, -1);
   }
 
-  void test_resolveRelative() {
+  test_resolveRelative() {
     Uri relative = resolveRelativeUri(
         source.uri,
         provider.pathContext
             .toUri(provider.pathContext.join('bar', 'baz.dart')));
-    expect(relative,
-        provider.pathContext.toUri(provider.convertPath('/foo/bar/baz.dart')));
+    expect(
+        relative,
+        provider.pathContext
+            .toUri(provider.convertPath('/temp/bar/bar/baz.dart')));
   }
 
-  void test_shortName() {
+  test_shortName() {
     expect(source.shortName, 'test.dart');
   }
 }
 
 @reflectiveTest
-class MemoryResourceProviderTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
-
-  void test_deleteFile_folder() {
-    String path = provider.convertPath('/my/file');
-    provider.newFolder(path);
-    expect(() {
-      provider.deleteFile(path);
-    }, throwsArgumentError);
-    expect(provider.getResource(path), _isFolder);
-  }
-
-  void test_deleteFile_notExistent() {
-    String path = provider.convertPath('/my/file');
-    expect(() {
-      provider.deleteFile(path);
-    }, throwsArgumentError);
-    Resource file = provider.getResource(path);
-    expect(file, isNotNull);
+class MemoryFileTest extends BaseTest with FileTestMixin {
+  @override
+  test_delete_notExisting() {
+    File file = getFile(exists: false);
     expect(file.exists, isFalse);
+
+    expect(() => file.delete(), throwsA(const TypeMatcher<ArgumentError>()));
   }
 
-  void test_deleteFile_success() {
-    String path = provider.convertPath('/my/file');
-    provider.newFile(path, 'contents');
-    Resource file = provider.getResource(path);
-    expect(file, _isFile);
+  @override
+  test_renameSync_notExisting() {
+    String oldPath = join(tempPath, 'file.txt');
+    String newPath = join(tempPath, 'new-file.txt');
+    File oldFile = getFile(exists: true, filePath: oldPath);
+
+    File newFile = oldFile.renameSync(newPath);
+    expect(oldFile.path, oldPath);
+    expect(oldFile.exists, isFalse);
+    expect(newFile.path, newPath);
+    expect(newFile.exists, isTrue);
+    expect(newFile.readAsStringSync(), defaultFileContent);
+  }
+
+  @failingTest
+  @override
+  test_resolveSymbolicLinksSync_links_existing() {
+    // TODO(brianwilkerson) Decide how to test this given that we cannot
+    // create a link in a MemoryResourceProvider.
+    fail('Not tested');
+  }
+
+  @override
+  test_resolveSymbolicLinksSync_noLinks_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(file.resolveSymbolicLinksSync(), file);
+  }
+
+  @override
+  test_writeAsBytesSync_notExisting() {
+    File file = getFile(exists: false);
+
+    file.writeAsBytesSync(<int>[99, 99]);
+    expect(file.exists, true);
+    expect(file.readAsBytesSync(), <int>[99, 99]);
+  }
+
+  @override
+  test_writeAsStringSync_notExisting() {
+    File file = getFile(exists: false);
+
+    file.writeAsStringSync('cc');
+    expect(file.exists, true);
+    expect(file.readAsStringSync(), 'cc');
+  }
+}
+
+@reflectiveTest
+class MemoryFolderTest extends BaseTest with FolderTestMixin {}
+
+@reflectiveTest
+class MemoryResourceProviderTest extends BaseTest
+    with ResourceProviderTestMixin {
+  test_deleteFile_existing() {
+    File file = getFile(exists: true);
     expect(file.exists, isTrue);
-    provider.deleteFile(path);
+
+    provider.deleteFile(defaultFilePath);
     expect(file.exists, isFalse);
   }
 
-  test_getFolder_existing() async {
-    String path = provider.convertPath('/foo/bar');
-    provider.newFolder(path);
-    Folder folder = provider.getFolder(path);
-    expect(folder, isNotNull);
-    expect(folder.path, path);
+  test_deleteFile_folder() {
+    Folder folder = getFolder(exists: true);
+
+    expect(() => provider.deleteFile(defaultFolderPath), throwsArgumentError);
     expect(folder.exists, isTrue);
   }
 
-  test_getFolder_notExisting() async {
-    String path = provider.convertPath('/foo/bar');
-    Folder folder = provider.getFolder(path);
-    expect(folder, isNotNull);
-    expect(folder.path, path);
-    expect(folder.exists, isFalse);
+  @override
+  test_pathContext() {
+    if (path.style == path.Style.windows) {
+      // On Windows the path context is replaced by one whose current directory
+      // is the root of the 'C' drive.
+      path.Context context = provider.pathContext;
+      expect(context.style, path.Style.windows);
+      expect(context.current, 'C:\\');
+    } else {
+      super.test_pathContext();
+    }
   }
 
-  test_getModificationTimes() async {
-    File file = provider.newFile(provider.convertPath('/test.dart'), '');
-    Source source = file.createSource();
-    List<int> times = await provider.getModificationTimes([source]);
-    expect(times, [source.modificationStamp]);
-  }
+  test_deleteFile_notExisting() {
+    File file = getFile(exists: false);
 
-  void test_getStateLocation_uniqueness() {
-    String idOne = 'one';
-    Folder folderOne = provider.getStateLocation(idOne);
-    expect(folderOne, isNotNull);
-    String idTwo = 'two';
-    Folder folderTwo = provider.getStateLocation(idTwo);
-    expect(folderTwo, isNotNull);
-    expect(folderTwo, isNot(equals(folderOne)));
-    expect(provider.getStateLocation(idOne), equals(folderOne));
-  }
-
-  void test_modifyFile_isFolder() {
-    String path = provider.convertPath('/my/file');
-    provider.newFolder(path);
-    expect(() {
-      provider.modifyFile(path, 'contents');
-    }, throwsArgumentError);
-    expect(provider.getResource(path), _isFolder);
-  }
-
-  void test_modifyFile_notExistent() {
-    String path = provider.convertPath('/my/file');
-    expect(() {
-      provider.modifyFile(path, 'contents');
-    }, throwsArgumentError);
-    Resource file = provider.getResource(path);
-    expect(file, isNotNull);
+    expect(() => provider.deleteFile(defaultFilePath), throwsArgumentError);
     expect(file.exists, isFalse);
   }
 
-  void test_modifyFile_success() {
-    String path = provider.convertPath('/my/file');
-    provider.newFile(path, 'contents 1');
-    Resource file = provider.getResource(path);
-    expect(file, _isFile);
-    Source source = (file as File).createSource();
-    expect(source.contents.data, equals('contents 1'));
-    provider.modifyFile(path, 'contents 2');
-    expect(source.contents.data, equals('contents 2'));
+  test_modifyFile_existing_file() {
+    File file = getFile(exists: true);
+
+    provider.modifyFile(file.path, 'contents 2');
+    expect(file.readAsStringSync(), 'contents 2');
   }
 
-  void test_newFileWithBytes() {
-    String path = provider.convertPath('/my/file');
+  test_modifyFile_existing_folder() {
+    getFolder(exists: true);
+
+    expect(() => provider.modifyFile(defaultFolderPath, 'contents'),
+        throwsArgumentError);
+    expect(provider.getResource(defaultFolderPath), isFolder);
+  }
+
+  test_modifyFile_notExisting() {
+    getFile(exists: false);
+
+    expect(() => provider.modifyFile(defaultFilePath, 'contents'),
+        throwsArgumentError);
+    Resource file = provider.getResource(defaultFilePath);
+    expect(file, isFile);
+    expect(file.exists, isFalse);
+  }
+
+  test_newFileWithBytes() {
     List<int> bytes = <int>[1, 2, 3, 4, 5];
-    provider.newFileWithBytes(path, bytes);
-    File file = provider.getResource(path);
-    expect(file, isNotNull);
+
+    provider.newFileWithBytes(defaultFilePath, bytes);
+    Resource file = provider.getResource(defaultFilePath);
+    expect(file, isFile);
     expect(file.exists, isTrue);
-    expect(file.readAsBytesSync(), bytes);
+    expect((file as File).readAsBytesSync(), bytes);
   }
 
-  void test_newFolder_alreadyExists_asFile() {
-    provider.newFile(provider.convertPath('/my/file'), 'qwerty');
-    expect(() {
-      provider.newFolder(provider.convertPath('/my/file'));
-    }, throwsArgumentError);
+  test_newFolder_emptyPath() {
+    expect(() => provider.newFolder(''), throwsArgumentError);
   }
 
-  void test_newFolder_alreadyExists_asFolder() {
-    String path = provider.convertPath('/my/folder');
-    Folder folder = provider.newFolder(path);
-    Folder newFolder = provider.newFolder(path);
+  test_newFolder_existing_file() {
+    getFile(exists: true);
+
+    expect(() => provider.newFolder(defaultFilePath), throwsArgumentError);
+  }
+
+  test_newFolder_existing_folder() {
+    Folder folder = getFolder(exists: true);
+
+    Folder newFolder = provider.newFolder(folder.path);
     expect(newFolder, folder);
   }
 
-  void test_newFolder_emptyPath() {
-    expect(() {
-      provider.newFolder('');
-    }, throwsArgumentError);
-  }
-
-  void test_newFolder_notAbsolute() {
-    expect(() {
-      provider.newFolder('not/absolute');
-    }, throwsArgumentError);
+  test_newFolder_notAbsolute() {
+    expect(() => provider.newFolder('not/absolute'), throwsArgumentError);
   }
 
   test_watch_createFile() {
@@ -810,6 +389,7 @@
     return _watchingFolder(rootPath, (changesReceived) {
       expect(changesReceived, hasLength(0));
       String path = provider.pathContext.join(rootPath, 'foo');
+
       provider.newFile(path, 'contents');
       return _delayed(() {
         expect(changesReceived, hasLength(1));
@@ -826,6 +406,7 @@
     provider.newFile(path, 'contents 1');
     return _watchingFolder(rootPath, (changesReceived) {
       expect(changesReceived, hasLength(0));
+
       provider.deleteFile(path);
       return _delayed(() {
         expect(changesReceived, hasLength(1));
@@ -842,6 +423,7 @@
     provider.newFile(path, 'contents 1');
     return _watchingFolder(rootPath, (changesReceived) {
       expect(changesReceived, hasLength(0));
+
       provider.modifyFile(path, 'contents 2');
       return _delayed(() {
         expect(changesReceived, hasLength(1));
@@ -860,6 +442,7 @@
     provider.newFile(path, 'contents 1');
     return _watchingFolder(rootPath, (changesReceived) {
       expect(changesReceived, hasLength(0));
+
       provider.modifyFile(path, 'contents 2');
       return _delayed(() {
         expect(changesReceived, hasLength(1));
diff --git a/pkg/analyzer/test/file_system/overlay_file_system_test.dart b/pkg/analyzer/test/file_system/overlay_file_system_test.dart
index 3460d9a..c422ade 100644
--- a/pkg/analyzer/test/file_system/overlay_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/overlay_file_system_test.dart
@@ -1,9 +1,7 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:core';
-
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/file_system/overlay_file_system.dart';
@@ -731,6 +729,16 @@
     expect(provider.getStateLocation(idOne), equals(folderOne));
   }
 
+  test_hasOverlay() {
+    expect(provider.hasOverlay(defaultFilePath), isFalse);
+
+    provider.setOverlay(defaultFilePath, content: 'x', modificationStamp: 0);
+    expect(provider.hasOverlay(defaultFilePath), isTrue);
+
+    provider.removeOverlay(defaultFilePath);
+    expect(provider.hasOverlay(defaultFilePath), isFalse);
+  }
+
   test_pathContext() {
     expect(provider.pathContext, baseProvider.pathContext);
   }
diff --git a/pkg/analyzer/test/file_system/physical_file_system_test.dart b/pkg/analyzer/test/file_system/physical_file_system_test.dart
new file mode 100644
index 0000000..11e744e
--- /dev/null
+++ b/pkg/analyzer/test/file_system/physical_file_system_test.dart
@@ -0,0 +1,163 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io' as io;
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:meta/meta.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'file_system_test_support.dart';
+
+main() {
+  if (!new bool.fromEnvironment('skipPhysicalResourceProviderTests')) {
+    defineReflectiveSuite(() {
+      defineReflectiveTests(PhysicalFileTest);
+      defineReflectiveTests(PhysicalFolderTest);
+      defineReflectiveTests(PhysicalResourceProviderTest);
+    });
+  }
+}
+
+abstract class BaseTest extends FileSystemTestSupport {
+  /// The resource provider to be used by the tests. Tests should use [provider]
+  /// to access the resource provider.
+  PhysicalResourceProvider _provider;
+
+  /// A temporary directory on disk. All files and folders created by the tests
+  /// should be inside this directory.
+  io.Directory tempDirectory;
+
+  /// The absolute path to the [tempDirectory]. This path will contain a
+  /// symbolic link on some operating systems.
+  String tempPath;
+
+  /// A path to a folder within the [tempDirectory] that can be used by tests.
+  String defaultFolderPath;
+
+  /// A path to a file within the [defaultFolderPath] that can be used by tests.
+  String defaultFilePath;
+
+  /// The content used for the file at the [defaultFilePath] if it is created
+  /// and no other content is provided.
+  String get defaultFileContent => 'a';
+
+  /// Return the resource provider to be used by the tests.
+  PhysicalResourceProvider get provider => _provider ??= createProvider();
+
+  /// Create the resource provider to be used by the tests. Subclasses can
+  /// override this method to change the class of resource provider that is
+  /// used.
+  PhysicalResourceProvider createProvider() =>
+      new PhysicalResourceProvider(null);
+
+  File getFile({@required bool exists, String content, String filePath}) {
+    File file = provider.getFile(filePath ?? defaultFilePath);
+    if (exists) {
+      file.parent.create();
+      file.writeAsStringSync(content ?? defaultFileContent);
+    }
+    return file;
+  }
+
+  Folder getFolder({@required bool exists, String folderPath}) {
+    Folder folder = provider.getFolder(folderPath ?? defaultFolderPath);
+    if (exists) {
+      folder.create();
+    }
+    return folder;
+  }
+
+  setUp() {
+    tempDirectory = io.Directory.systemTemp.createTempSync('test_resource');
+    //
+    // On some platforms the path to the temp directory includes a symbolic
+    // link. We remove that so that only the tests designed to test the behavior
+    // of symbolic links will do so.
+    //
+    tempPath = tempDirectory.absolute.resolveSymbolicLinksSync();
+    defaultFolderPath = join(tempPath, 'bar');
+    defaultFilePath = join(tempPath, 'bar', 'test.dart');
+  }
+
+  tearDown() {
+    tempDirectory.deleteSync(recursive: true);
+  }
+}
+
+@reflectiveTest
+class PhysicalFileTest extends BaseTest with FileTestMixin {
+  @override
+  test_delete_notExisting() {
+    File file = getFile(exists: false);
+    expect(file.exists, isFalse);
+
+    expect(() => file.delete(), throwsA(isFileSystemException));
+  }
+
+  @override
+  test_renameSync_notExisting() {
+    String oldPath = join(tempPath, 'file.txt');
+    String newPath = join(tempPath, 'new-file.txt');
+    File oldFile = getFile(exists: false, filePath: oldPath);
+
+    expect(() => oldFile.renameSync(newPath), throwsA(isFileSystemException));
+  }
+
+  @override
+  test_resolveSymbolicLinksSync_links_existing() {
+    String pathA = join(tempPath, defaultFileContent);
+    String pathB = join(pathA, 'b');
+    new io.Directory(pathB).createSync(recursive: true);
+    String filePath = join(pathB, 'test.txt');
+    io.File testFile = new io.File(filePath);
+    testFile.writeAsStringSync('test');
+
+    String pathC = join(tempPath, 'c');
+    String pathD = join(pathC, 'd');
+    new io.Link(pathD).createSync(pathA, recursive: true);
+
+    String pathE = join(tempPath, 'e');
+    String pathF = join(pathE, 'f');
+    new io.Link(pathF).createSync(pathC, recursive: true);
+
+    String linkPath = join(tempPath, 'e', 'f', 'd', 'b', 'test.txt');
+    File file = provider.getFile(linkPath);
+
+    expect(file.resolveSymbolicLinksSync().path,
+        testFile.resolveSymbolicLinksSync());
+  }
+
+  @override
+  test_resolveSymbolicLinksSync_noLinks_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(
+        () => file.resolveSymbolicLinksSync(), throwsA(isFileSystemException));
+  }
+
+  @override
+  test_writeAsBytesSync_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(() => file.writeAsBytesSync(<int>[99, 99]),
+        throwsA(isFileSystemException));
+  }
+
+  @override
+  test_writeAsStringSync_notExisting() {
+    File file = getFile(exists: false);
+
+    expect(() => file.writeAsStringSync('cc'), throwsA(isFileSystemException));
+  }
+}
+
+@reflectiveTest
+class PhysicalFolderTest extends BaseTest with FolderTestMixin {}
+
+@reflectiveTest
+class PhysicalResourceProviderTest extends BaseTest
+    with ResourceProviderTestMixin {}
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
deleted file mode 100644
index 4417780..0000000
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
+++ /dev/null
@@ -1,565 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:core';
-import 'dart:io' as io;
-
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:path/path.dart' as pathos;
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-main() {
-  if (!new bool.fromEnvironment('skipPhysicalResourceProviderTests')) {
-    defineReflectiveSuite(() {
-      defineReflectiveTests(PhysicalResourceProviderTest);
-      defineReflectiveTests(FileTest);
-      defineReflectiveTests(FolderTest);
-    });
-  }
-}
-
-final _isFile = new TypeMatcher<File>();
-final _isFileSystemException = new TypeMatcher<FileSystemException>();
-final _isFolder = new TypeMatcher<Folder>();
-
-String join(String part1, [String part2, String part3]) =>
-    pathos.join(part1, part2, part3);
-
-class BaseTest {
-  io.Directory tempDirectory;
-  String tempPath;
-
-  setUp() {
-    tempDirectory = io.Directory.systemTemp.createTempSync('test_resource');
-    tempPath = tempDirectory.absolute.path;
-  }
-
-  tearDown() {
-    tempDirectory.deleteSync(recursive: true);
-  }
-}
-
-@reflectiveTest
-class FileTest extends BaseTest {
-  String path;
-  File file;
-
-  setUp() {
-    super.setUp();
-    path = join(tempPath, 'file.txt');
-    file = PhysicalResourceProvider.INSTANCE.getResource(path);
-  }
-
-  void test_copy() {
-    PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
-    String contents = 'contents';
-    new io.File(path).writeAsStringSync(contents);
-    Folder destination = provider.getFolder(join(tempPath, 'destination'));
-
-    File copy = file.copyTo(destination);
-    expect(copy.parent, destination);
-    expect(copy.shortName, file.shortName);
-    expect(copy.readAsStringSync(), contents);
-  }
-
-  void test_createSource() {
-    new io.File(path).writeAsStringSync('contents');
-    Source source = file.createSource();
-    expect(source.uriKind, UriKind.FILE_URI);
-    expect(source.exists(), isTrue);
-    expect(source.contents.data, 'contents');
-  }
-
-  void test_delete() {
-    new io.File(path).writeAsStringSync('contents');
-    expect(file.exists, isTrue);
-    // delete
-    file.delete();
-    expect(file.exists, isFalse);
-  }
-
-  void test_equals_differentPaths() {
-    String path2 = join(tempPath, 'file2.txt');
-    File file2 = PhysicalResourceProvider.INSTANCE.getResource(path2);
-    expect(file == file2, isFalse);
-  }
-
-  void test_equals_samePath() {
-    new io.File(path).writeAsStringSync('contents');
-    File file2 = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(file == file2, isTrue);
-  }
-
-  void test_exists_false() {
-    expect(file.exists, isFalse);
-  }
-
-  void test_exists_true() {
-    new io.File(path).writeAsStringSync('contents');
-    expect(file.exists, isTrue);
-  }
-
-  void test_fullName() {
-    expect(file.path, path);
-  }
-
-  void test_hashCode() {
-    new io.File(path).writeAsStringSync('contents');
-    File file2 = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(file.hashCode, equals(file2.hashCode));
-  }
-
-  void test_isOrContains() {
-    File file = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(file.isOrContains(path), isTrue);
-    expect(file.isOrContains('foo'), isFalse);
-  }
-
-  void test_lengthSync_doesNotExist() {
-    File file = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(() {
-      file.lengthSync;
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_lengthSync_exists() {
-    List<int> bytes = <int>[1, 2, 3, 4, 5];
-    new io.File(path).writeAsBytesSync(bytes);
-    expect(file.lengthSync, bytes.length);
-  }
-
-  void test_modificationStamp_doesNotExist() {
-    File file = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(() {
-      file.modificationStamp;
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_modificationStamp_exists() {
-    new io.File(path).writeAsStringSync('contents');
-    File file = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(file.modificationStamp, isNonNegative);
-  }
-
-  void test_parent() {
-    Resource parent = file.parent;
-    expect(parent, _isFolder);
-    expect(parent.path, equals(tempPath));
-  }
-
-  void test_readAsBytesSync_doesNotExist() {
-    path = join(tempPath, 'doesNotExist.txt');
-    File file = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(() {
-      file.readAsBytesSync();
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_readAsBytesSync_exists() {
-    List<int> bytes = <int>[1, 2, 3, 4, 5];
-    new io.File(path).writeAsBytesSync(bytes);
-    expect(file.readAsBytesSync(), bytes);
-  }
-
-  void test_readAsStringSync_doesNotExist() {
-    File file = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(() {
-      file.readAsStringSync();
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_readAsStringSync_exists() {
-    new io.File(path).writeAsStringSync('abc');
-    File file = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(file.readAsStringSync(), 'abc');
-  }
-
-  void test_renameSync_newDoesNotExist() {
-    pathos.Context pathContext = PhysicalResourceProvider.INSTANCE.pathContext;
-    String oldPath = pathContext.join(tempPath, 'file.txt');
-    String newPath = pathContext.join(tempPath, 'new-file.txt');
-    new io.File(oldPath).writeAsStringSync('text');
-    File file = PhysicalResourceProvider.INSTANCE.getResource(oldPath);
-    File newFile = file.renameSync(newPath);
-    expect(file.path, oldPath);
-    expect(file.exists, isFalse);
-    expect(newFile.path, newPath);
-    expect(newFile.exists, isTrue);
-    expect(newFile.readAsStringSync(), 'text');
-  }
-
-  test_renameSync_newExists_file() async {
-    pathos.Context pathContext = PhysicalResourceProvider.INSTANCE.pathContext;
-    String oldPath = pathContext.join(tempPath, 'file.txt');
-    String newPath = pathContext.join(tempPath, 'new-file.txt');
-    new io.File(oldPath).writeAsStringSync('text');
-    new io.File(newPath).writeAsStringSync('new text');
-    File file = PhysicalResourceProvider.INSTANCE.getResource(oldPath);
-    File newFile = file.renameSync(newPath);
-    expect(file.path, oldPath);
-    expect(file.exists, isFalse);
-    expect(newFile.path, newPath);
-    expect(newFile.exists, isTrue);
-    expect(newFile.readAsStringSync(), 'text');
-  }
-
-  void test_renameSync_newExists_folder() {
-    pathos.Context pathContext = PhysicalResourceProvider.INSTANCE.pathContext;
-    String oldPath = pathContext.join(tempPath, 'file.txt');
-    String newPath = pathContext.join(tempPath, 'foo');
-    new io.File(oldPath).writeAsStringSync('text');
-    new io.Directory(newPath).createSync();
-    File file = PhysicalResourceProvider.INSTANCE.getResource(oldPath);
-    expect(() {
-      file.renameSync(newPath);
-    }, throwsA(_isFileSystemException));
-    expect(file.path, oldPath);
-    expect(file.exists, isTrue);
-  }
-
-  void test_resolveSymbolicLinksSync_links() {
-    pathos.Context pathContext = PhysicalResourceProvider.INSTANCE.pathContext;
-    String pathA = pathContext.join(tempPath, 'a');
-    String pathB = pathContext.join(pathA, 'b');
-    new io.Directory(pathB).createSync(recursive: true);
-    String filePath = pathContext.join(pathB, 'test.txt');
-    io.File testFile = new io.File(filePath);
-    testFile.writeAsStringSync('test');
-
-    String pathC = pathContext.join(tempPath, 'c');
-    String pathD = pathContext.join(pathC, 'd');
-    new io.Link(pathD).createSync(pathA, recursive: true);
-
-    String pathE = pathContext.join(tempPath, 'e');
-    String pathF = pathContext.join(pathE, 'f');
-    new io.Link(pathF).createSync(pathC, recursive: true);
-
-    String linkPath =
-        pathContext.join(tempPath, 'e', 'f', 'd', 'b', 'test.txt');
-    File file = PhysicalResourceProvider.INSTANCE.getFile(linkPath);
-    expect(file.resolveSymbolicLinksSync().path,
-        testFile.resolveSymbolicLinksSync());
-  }
-
-  void test_resolveSymbolicLinksSync_noLinks() {
-    //
-    // On some platforms the path to the temp directory includes a symbolic
-    // link. We remove that from the equation before creating the File in order
-    // to show that the operation works as expected without symbolic links.
-    //
-    io.File ioFile = new io.File(path);
-    ioFile.writeAsStringSync('test');
-    file = PhysicalResourceProvider.INSTANCE
-        .getFile(ioFile.resolveSymbolicLinksSync());
-    expect(file.resolveSymbolicLinksSync(), file);
-  }
-
-  void test_shortName() {
-    expect(file.shortName, 'file.txt');
-  }
-
-  void test_toString() {
-    expect(file.toString(), path);
-  }
-
-  void test_toUri() {
-    String path = io.Platform.isWindows ? r'C:\foo\file.txt' : '/foo/file.txt';
-    File file = PhysicalResourceProvider.INSTANCE.getFile(path);
-    expect(file.toUri(), new Uri.file(path));
-  }
-
-  void test_writeAsBytesSync() {
-    List<int> content = <int>[1, 2];
-    new io.File(path).writeAsBytesSync(content);
-    expect(file.readAsBytesSync(), content);
-    // write new bytes
-    content = <int>[10, 20];
-    file.writeAsBytesSync(content);
-    expect(file.readAsBytesSync(), content);
-  }
-
-  void test_writeAsStringSync() {
-    String content = 'ab';
-    new io.File(path).writeAsStringSync(content);
-    expect(file.readAsStringSync(), content);
-    // write new bytes
-    content = 'CD';
-    file.writeAsStringSync(content);
-    expect(file.readAsStringSync(), content);
-  }
-}
-
-@reflectiveTest
-class FolderTest extends BaseTest {
-  String path;
-  Folder folder;
-
-  setUp() {
-    super.setUp();
-    path = join(tempPath, 'folder');
-    new io.Directory(path).createSync();
-    folder = PhysicalResourceProvider.INSTANCE.getResource(path);
-  }
-
-  void test_canonicalizePath() {
-    String path2 = join(tempPath, 'folder2');
-    String path3 = join(tempPath, 'folder3');
-    expect(folder.canonicalizePath('baz'), equals(join(path, 'baz')));
-    expect(folder.canonicalizePath(path2), equals(path2));
-    expect(folder.canonicalizePath(join('..', 'folder2')), equals(path2));
-    expect(
-        folder.canonicalizePath(join(path2, '..', 'folder3')), equals(path3));
-    expect(
-        folder.canonicalizePath(join('.', 'baz')), equals(join(path, 'baz')));
-    expect(folder.canonicalizePath(join(path2, '.', 'baz')),
-        equals(join(path2, 'baz')));
-  }
-
-  void test_contains() {
-    expect(folder.contains(join(path, 'aaa.txt')), isTrue);
-    expect(folder.contains(join(path, 'aaa', 'bbb.txt')), isTrue);
-    expect(folder.contains(join(tempPath, 'baz.txt')), isFalse);
-    expect(folder.contains(path), isFalse);
-  }
-
-  void test_copy() {
-    PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
-    String sourcePath = join(tempPath, 'source');
-    String subdirPath = join(sourcePath, 'subdir');
-    new io.Directory(sourcePath).createSync();
-    new io.Directory(subdirPath).createSync();
-    new io.File(join(sourcePath, 'file1.txt')).writeAsStringSync('file1');
-    new io.File(join(subdirPath, 'file2.txt')).writeAsStringSync('file2');
-    Folder source = provider.getFolder(sourcePath);
-    Folder destination = provider.getFolder(join(tempPath, 'destination'));
-
-    Folder copy = source.copyTo(destination);
-    expect(copy.parent, destination);
-    _verifyStructure(copy, source);
-  }
-
-  void test_delete() {
-    new io.File(join(path, 'myFile')).createSync();
-    var child = folder.getChild('myFile');
-    expect(child, _isFile);
-    expect(child.exists, isTrue);
-    // delete "folder"
-    folder.delete();
-    expect(child.exists, isFalse);
-  }
-
-  void test_equals_differentPaths() {
-    String path2 = join(tempPath, 'folder2');
-    new io.Directory(path2).createSync();
-    Folder folder2 = PhysicalResourceProvider.INSTANCE.getResource(path2);
-    expect(folder == folder2, isFalse);
-  }
-
-  void test_equals_samePath() {
-    Folder folder2 = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(folder == folder2, isTrue);
-  }
-
-  void test_getChild_doesNotExist() {
-    var child = folder.getChild('no-such-resource');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChild_file() {
-    new io.File(join(path, 'myFile')).createSync();
-    var child = folder.getChild('myFile');
-    expect(child, _isFile);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChild_folder() {
-    new io.Directory(join(path, 'myFolder')).createSync();
-    var child = folder.getChild('myFolder');
-    expect(child, _isFolder);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChildAssumingFile_doesNotExist() {
-    File child = folder.getChildAssumingFile('no-such-resource');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFile_file() {
-    new io.File(join(path, 'myFile')).createSync();
-    File child = folder.getChildAssumingFile('myFile');
-    expect(child, isNotNull);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChildAssumingFile_folder() {
-    new io.Directory(join(path, 'myFolder')).createSync();
-    File child = folder.getChildAssumingFile('myFolder');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFolder_doesNotExist() {
-    Folder child = folder.getChildAssumingFolder('no-such-resource');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFolder_file() {
-    new io.File(join(path, 'myFile')).createSync();
-    Folder child = folder.getChildAssumingFolder('myFile');
-    expect(child, isNotNull);
-    expect(child.exists, isFalse);
-  }
-
-  void test_getChildAssumingFolder_folder() {
-    new io.Directory(join(path, 'myFolder')).createSync();
-    Folder child = folder.getChildAssumingFolder('myFolder');
-    expect(child, isNotNull);
-    expect(child.exists, isTrue);
-  }
-
-  void test_getChildren_doesNotExist() {
-    folder = folder.getChildAssumingFolder('no-such-folder');
-    expect(() {
-      folder.getChildren();
-    }, throwsA(_isFileSystemException));
-  }
-
-  void test_getChildren_exists() {
-    // create 2 files and 1 folder
-    new io.File(join(path, 'a.txt')).createSync();
-    new io.Directory(join(path, 'bFolder')).createSync();
-    new io.File(join(path, 'c.txt')).createSync();
-    // prepare 3 children
-    List<Resource> children = folder.getChildren();
-    expect(children, hasLength(3));
-    children.sort((a, b) => a.shortName.compareTo(b.shortName));
-    // check that each child exists
-    children.forEach((child) {
-      expect(child.exists, true);
-    });
-    // check names
-    expect(children[0].shortName, 'a.txt');
-    expect(children[1].shortName, 'bFolder');
-    expect(children[2].shortName, 'c.txt');
-    // check types
-    expect(children[0], _isFile);
-    expect(children[1], _isFolder);
-    expect(children[2], _isFile);
-  }
-
-  void test_hashCode() {
-    Folder folder2 = PhysicalResourceProvider.INSTANCE.getResource(path);
-    expect(folder.hashCode, equals(folder2.hashCode));
-  }
-
-  void test_isOrContains() {
-    expect(folder.isOrContains(path), isTrue);
-    expect(folder.isOrContains(join(path, 'aaa.txt')), isTrue);
-    expect(folder.isOrContains(join(path, 'aaa', 'bbb.txt')), isTrue);
-    expect(folder.isOrContains(join(tempPath, 'baz.txt')), isFalse);
-  }
-
-  void test_parent() {
-    Resource parent = folder.parent;
-    expect(parent, _isFolder);
-    expect(parent.path, equals(tempPath));
-
-    // Since the OS is in control of where tempPath is, we don't know how
-    // far it should be from the root.  So just verify that each call to
-    // parent results in a a folder with a shorter path, and that we
-    // reach the root eventually.
-    while (true) {
-      Resource grandParent = parent.parent;
-      if (grandParent == null) {
-        break;
-      }
-      expect(grandParent, _isFolder);
-      expect(grandParent.path.length, lessThan(parent.path.length));
-      parent = grandParent;
-    }
-  }
-
-  void test_toUri() {
-    String path =
-        io.Platform.isWindows ? r'C:\foo\directory' : '/foo/directory';
-    Folder folder = PhysicalResourceProvider.INSTANCE.getFolder(path);
-    expect(folder.toUri(), new Uri.directory(path));
-  }
-
-  /**
-   * Verify that the [copy] has the same name and content as the [source].
-   */
-  void _verifyStructure(Folder copy, Folder source) {
-    expect(copy.shortName, source.shortName);
-    Map<String, File> sourceFiles = <String, File>{};
-    Map<String, Folder> sourceFolders = <String, Folder>{};
-    for (Resource child in source.getChildren()) {
-      if (child is File) {
-        sourceFiles[child.shortName] = child;
-      } else if (child is Folder) {
-        sourceFolders[child.shortName] = child;
-      } else {
-        fail('Unknown class of resource: ${child.runtimeType}');
-      }
-    }
-    Map<String, File> copyFiles = <String, File>{};
-    Map<String, Folder> copyFolders = <String, Folder>{};
-    for (Resource child in source.getChildren()) {
-      if (child is File) {
-        copyFiles[child.shortName] = child;
-      } else if (child is Folder) {
-        copyFolders[child.shortName] = child;
-      } else {
-        fail('Unknown class of resource: ${child.runtimeType}');
-      }
-    }
-    for (String fileName in sourceFiles.keys) {
-      File sourceChild = sourceFiles[fileName];
-      File copiedChild = copyFiles[fileName];
-      if (copiedChild == null) {
-        fail('Failed to copy file ${sourceChild.path}');
-      }
-      expect(copiedChild.readAsStringSync(), sourceChild.readAsStringSync(),
-          reason: 'Incorrectly copied file ${sourceChild.path}');
-    }
-    for (String fileName in sourceFolders.keys) {
-      Folder sourceChild = sourceFolders[fileName];
-      Folder copiedChild = copyFolders[fileName];
-      if (copiedChild == null) {
-        fail('Failed to copy folder ${sourceChild.path}');
-      }
-      _verifyStructure(copiedChild, sourceChild);
-    }
-  }
-}
-
-@reflectiveTest
-class PhysicalResourceProviderTest extends BaseTest {
-  test_getModificationTimes() async {
-    PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
-    String path = join(tempPath, 'file1.txt');
-    new io.File(path).writeAsStringSync('');
-    Source source = provider.getFile(path).createSource();
-    List<int> times = await provider.getModificationTimes([source]);
-    expect(times, [source.modificationStamp]);
-  }
-
-  void test_getStateLocation_uniqueness() {
-    PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
-    String idOne = 'one';
-    Folder folderOne = provider.getStateLocation(idOne);
-    expect(folderOne, isNotNull);
-    String idTwo = 'two';
-    Folder folderTwo = provider.getStateLocation(idTwo);
-    expect(folderTwo, isNotNull);
-    expect(folderTwo, isNot(equals(folderOne)));
-    expect(provider.getStateLocation(idOne), equals(folderOne));
-  }
-}
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart
index 7c1cd9e..6f68a1e 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_watch_test.dart
@@ -1,9 +1,8 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:core';
 import 'dart:io' as io;
 
 import 'package:analyzer/file_system/file_system.dart';
@@ -13,7 +12,7 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:watcher/watcher.dart';
 
-import 'physical_resource_provider_test.dart' show BaseTest;
+import 'physical_file_system_test.dart' show BaseTest;
 
 main() {
   if (!new bool.fromEnvironment('skipPhysicalResourceProviderTests')) {
diff --git a/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart b/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart
index 4bb689e..27994af 100644
--- a/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart
+++ b/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart
@@ -1,10 +1,10 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -15,52 +15,55 @@
 }
 
 @reflectiveTest
-class ResourceUriResolverTest {
-  MemoryResourceProvider provider;
+class ResourceUriResolverTest with ResourceProviderMixin {
   ResourceUriResolver resolver;
 
   void setUp() {
-    provider = new MemoryResourceProvider();
-    resolver = new ResourceUriResolver(provider);
-    provider.newFile(provider.convertPath('/test.dart'), '');
-    provider.newFolder(provider.convertPath('/folder'));
+    resolver = new ResourceUriResolver(resourceProvider);
+    newFile('/test.dart');
+    newFolder('/folder');
   }
 
   void test_creation() {
-    expect(provider, isNotNull);
+    expect(resourceProvider, isNotNull);
     expect(resolver, isNotNull);
   }
 
   void test_resolveAbsolute_file() {
-    var uri = provider.pathContext.toUri(provider.convertPath('/test.dart'));
+    var uri = toUri('/test.dart');
+
     Source source = resolver.resolveAbsolute(uri);
     expect(source, isNotNull);
     expect(source.exists(), isTrue);
-    expect(source.fullName, provider.convertPath('/test.dart'));
+    expect(source.fullName, convertPath('/test.dart'));
   }
 
   void test_resolveAbsolute_folder() {
-    var uri = provider.pathContext.toUri(provider.convertPath('/folder'));
+    var uri = toUri('/folder');
+
     Source source = resolver.resolveAbsolute(uri);
     expect(source, isNotNull);
     expect(source.exists(), isFalse);
-    expect(source.fullName, provider.convertPath('/folder'));
+    expect(source.fullName, convertPath('/folder'));
   }
 
   void test_resolveAbsolute_notFile_dartUri() {
     var uri = new Uri(scheme: 'dart', path: 'core');
+
     Source source = resolver.resolveAbsolute(uri);
     expect(source, isNull);
   }
 
   void test_resolveAbsolute_notFile_httpsUri() {
     var uri = new Uri(scheme: 'https', path: '127.0.0.1/test.dart');
+
     Source source = resolver.resolveAbsolute(uri);
     expect(source, isNull);
   }
 
   void test_restoreAbsolute() {
-    var uri = provider.pathContext.toUri(provider.convertPath('/test.dart'));
+    var uri = toUri('/test.dart');
+
     Source source = resolver.resolveAbsolute(uri);
     expect(source, isNotNull);
     expect(resolver.restoreAbsolute(source), uri);
diff --git a/pkg/analyzer/test/file_system/test_all.dart b/pkg/analyzer/test/file_system/test_all.dart
index 48ca361..8fe75cc 100644
--- a/pkg/analyzer/test/file_system/test_all.dart
+++ b/pkg/analyzer/test/file_system/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,17 +6,16 @@
 
 import 'memory_file_system_test.dart' as memory_file_system;
 import 'overlay_file_system_test.dart' as overlay_file_system;
-import 'physical_resource_provider_test.dart' as physical_resource_provider;
+import 'physical_file_system_test.dart' as physical_file_system;
 import 'physical_resource_provider_watch_test.dart'
     as physical_resource_provider_watch_test;
 import 'resource_uri_resolver_test.dart' as resource_uri_resolver;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
     memory_file_system.main();
     overlay_file_system.main();
-    physical_resource_provider.main();
+    physical_file_system.main();
     physical_resource_provider_watch_test.main();
     resource_uri_resolver.main();
   }, name: 'file system');
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 4ac956a..1b05603 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -23,7 +23,7 @@
 import 'package:analyzer/src/generated/java_io.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/sdk_io.dart';
+import 'package:analyzer/src/generated/sdk_io.dart'; // ignore: deprecated_member_use
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
@@ -31,6 +31,7 @@
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
 import 'package:analyzer/src/generated/testing/token_factory.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/test_utilities/element_type_matchers.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:path/path.dart' as path;
 import 'package:source_span/source_span.dart';
@@ -50,6 +51,7 @@
     defineReflectiveTests(ElementLocatorTest);
     defineReflectiveTests(EnumMemberBuilderTest);
     defineReflectiveTests(ErrorReporterTest);
+    defineReflectiveTests(ErrorReporterTest2);
     defineReflectiveTests(ErrorSeverityTest);
     defineReflectiveTests(ExitDetectorTest);
     defineReflectiveTests(ExitDetectorTest2);
@@ -150,16 +152,14 @@
 
   void test_restoreAbsolute_library() {
     _SourceMock source = new _SourceMock();
-    Uri fileUri = resourceProvider.pathContext.toUri(coreCorePath);
-    source.uri = fileUri;
+    source.uri = toUri('/sdk/lib/core/core.dart');
     Uri dartUri = resolver.restoreAbsolute(source);
     expect(dartUri.toString(), 'dart:core');
   }
 
   void test_restoreAbsolute_part() {
     _SourceMock source = new _SourceMock();
-    Uri fileUri = resourceProvider.pathContext.toUri(coreIntPath);
-    source.uri = fileUri;
+    source.uri = toUri('/sdk/lib/core/int.dart');
     Uri dartUri = resolver.restoreAbsolute(source);
     expect(dartUri.toString(), 'dart:core/int.dart');
   }
@@ -189,22 +189,19 @@
   x += 1;
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodElement, MethodElement, element);
+    expect(element, isMethodElement);
   }
 
   test_locate_BinaryExpression() async {
     AstNode id = await _findNodeIn("+", "var x = 3 + 4;");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodElement, MethodElement, element);
+    expect(element, isMethodElement);
   }
 
   test_locate_ClassDeclaration() async {
     AstNode id = await _findNodeIn("class", "class A { }");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassElement, ClassElement, element);
+    expect(element, isClassElement);
   }
 
   test_locate_CompilationUnit() async {
@@ -220,26 +217,23 @@
   A.bar() {}
 }''');
     ConstructorDeclaration declaration =
-        id.getAncestor((node) => node is ConstructorDeclaration);
+        id.thisOrAncestorOfType<ConstructorDeclaration>();
     Element element = ElementLocator.locate(declaration);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ConstructorElement, ConstructorElement, element);
+    expect(element, isConstructorElement);
   }
 
   test_locate_ExportDirective() async {
     AstNode id = await _findNodeIn("export", "export 'dart:core';");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ExportElement, ExportElement, element);
+    expect(element, isExportElement);
   }
 
   test_locate_FunctionDeclaration() async {
     AstNode id = await _findNodeIn("f", "int f() => 3;");
     FunctionDeclaration declaration =
-        id.getAncestor((node) => node is FunctionDeclaration);
+        id.thisOrAncestorOfType<FunctionDeclaration>();
     Element element = ElementLocator.locate(declaration);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionElement, FunctionElement, element);
+    expect(element, isFunctionElement);
   }
 
   test_locate_Identifier_annotationClass_namedConstructor_forSimpleFormalParameter() async {
@@ -250,8 +244,7 @@
 void main(@Class.name() parameter) {
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassElement, ClassElement, element);
+    expect(element, isClassElement);
   }
 
   test_locate_Identifier_annotationClass_unnamedConstructor_forSimpleFormalParameter() async {
@@ -262,15 +255,13 @@
 void main(@Class() parameter) {
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ConstructorElement, ConstructorElement, element);
+    expect(element, isConstructorElement);
   }
 
   test_locate_Identifier_className() async {
     AstNode id = await _findNodeIn("A", "class A { }");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassElement, ClassElement, element);
+    expect(element, isClassElement);
   }
 
   test_locate_Identifier_constructor_named() async {
@@ -279,8 +270,7 @@
   A.bar() {}
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ConstructorElement, ConstructorElement, element);
+    expect(element, isConstructorElement);
   }
 
   test_locate_Identifier_constructor_unnamed() async {
@@ -289,22 +279,19 @@
   A() {}
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ConstructorElement, ConstructorElement, element);
+    expect(element, isConstructorElement);
   }
 
   test_locate_Identifier_fieldName() async {
     AstNode id = await _findNodeIn("x", "class A { var x; }");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldElement, FieldElement, element);
+    expect(element, isFieldElement);
   }
 
   test_locate_Identifier_libraryDirective() async {
     AstNode id = await _findNodeIn("foo", "library foo.bar;");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is LibraryElement, LibraryElement, element);
+    expect(element, isLibraryElement);
   }
 
   test_locate_Identifier_propertyAccess() async {
@@ -313,15 +300,13 @@
  int x = 'foo'.length;
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccessorElement,
-        PropertyAccessorElement, element);
+    expect(element, isPropertyAccessorElement);
   }
 
   test_locate_ImportDirective() async {
     AstNode id = await _findNodeIn("import", "import 'dart:core';");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ImportElement, ImportElement, element);
+    expect(element, isImportElement);
   }
 
   test_locate_IndexExpression() async {
@@ -331,8 +316,7 @@
   var y = x[0];
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodElement, MethodElement, element);
+    expect(element, isMethodElement);
   }
 
   test_locate_InstanceCreationExpression() async {
@@ -342,8 +326,7 @@
  new A();
 }''');
     Element element = ElementLocator.locate(node);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ConstructorElement, ConstructorElement, element);
+    expect(element, isConstructorElement);
   }
 
   test_locate_InstanceCreationExpression_type_prefixedIdentifier() async {
@@ -387,8 +370,7 @@
   test_locate_LibraryDirective() async {
     AstNode id = await _findNodeIn("library", "library foo;");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is LibraryElement, LibraryElement, element);
+    expect(element, isLibraryElement);
   }
 
   test_locate_MethodDeclaration() async {
@@ -397,10 +379,9 @@
   void m() {}
 }''');
     MethodDeclaration declaration =
-        id.getAncestor((node) => node is MethodDeclaration);
+        id.thisOrAncestorOfType<MethodDeclaration>();
     Element element = ElementLocator.locate(declaration);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodElement, MethodElement, element);
+    expect(element, isMethodElement);
   }
 
   test_locate_MethodInvocation_method() async {
@@ -412,8 +393,7 @@
  var f = new A().bar();
 }''');
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodElement, MethodElement, element);
+    expect(element, isMethodElement);
   }
 
   test_locate_MethodInvocation_topLevel() async {
@@ -425,11 +405,9 @@
     CompilationUnit cu = await _resolveContents(code);
     int offset = code.indexOf('foo(0)');
     AstNode node = new NodeLocator(offset).searchWithin(cu);
-    MethodInvocation invocation =
-        node.getAncestor((n) => n is MethodInvocation);
+    MethodInvocation invocation = node.thisOrAncestorOfType<MethodInvocation>();
     Element element = ElementLocator.locate(invocation);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionElement, FunctionElement, element);
+    expect(element, isFunctionElement);
   }
 
   test_locate_PartOfDirective() async {
@@ -444,15 +422,13 @@
         analysisContext.resolveCompilationUnit2(unitSource, librarySource);
     PartOfDirective partOf = unit.directives.first;
     Element element = ElementLocator.locate(partOf);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is LibraryElement, LibraryElement, element);
+    expect(element, isLibraryElement);
   }
 
   test_locate_PostfixExpression() async {
     AstNode id = await _findNodeIn("++", "int addOne(int x) => x++;");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodElement, MethodElement, element);
+    expect(element, isMethodElement);
   }
 
   test_locate_PrefixedIdentifier() async {
@@ -460,25 +436,22 @@
 import 'dart:core' as core;
 core.int value;''');
     PrefixedIdentifier identifier =
-        id.getAncestor((node) => node is PrefixedIdentifier);
+        id.thisOrAncestorOfType<PrefixedIdentifier>();
     Element element = ElementLocator.locate(identifier);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassElement, ClassElement, element);
+    expect(element, isClassElement);
   }
 
   test_locate_PrefixExpression() async {
     AstNode id = await _findNodeIn("++", "int addOne(int x) => ++x;");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodElement, MethodElement, element);
+    expect(element, isMethodElement);
   }
 
   test_locate_StringLiteral_exportUri() async {
     addNamedSource("/foo.dart", "library foo;");
     AstNode id = await _findNodeIn("'foo.dart'", "export 'foo.dart';");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is LibraryElement, LibraryElement, element);
+    expect(element, isLibraryElement);
   }
 
   test_locate_StringLiteral_expression() async {
@@ -492,8 +465,7 @@
     AstNode id = await _findNodeIn(
         "'foo.dart'", "import 'foo.dart'; class B extends A {}");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is LibraryElement, LibraryElement, element);
+    expect(element, isLibraryElement);
   }
 
   test_locate_StringLiteral_partUri() async {
@@ -501,17 +473,15 @@
     AstNode id =
         await _findNodeIn("'foo.dart'", "library app; part 'foo.dart';");
     Element element = ElementLocator.locate(id);
-    EngineTestCase.assertInstanceOf((obj) => obj is CompilationUnitElement,
-        CompilationUnitElement, element);
+    expect(element, isCompilationUnitElement);
   }
 
   test_locate_VariableDeclaration() async {
     AstNode id = await _findNodeIn("x", "var x = 'abc';");
     VariableDeclaration declaration =
-        id.getAncestor((node) => node is VariableDeclaration);
+        id.thisOrAncestorOfType<VariableDeclaration>();
     Element element = ElementLocator.locate(declaration);
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableElement,
-        TopLevelVariableElement, element);
+    expect(element, isTopLevelVariableElement);
   }
 
   /**
@@ -669,11 +639,8 @@
 @reflectiveTest
 class ErrorReporterTest extends EngineTestCase {
   /**
-   * Create a type with the given name in a compilation unit with the given name.
-   *
-   * @param fileName the name of the compilation unit containing the class
-   * @param typeName the name of the type to be created
-   * @return the type that was created
+   * Return a newly created interface type with the given [typeName] in a
+   * compilation unit with the given [fileName].
    */
   InterfaceType createType(String fileName, String typeName) {
     CompilationUnitElementImpl unit = ElementFactory.compilationUnit(fileName);
@@ -748,7 +715,7 @@
         AstTestFactory.identifier3("x"),
         [firstType, secondType]);
     AnalysisError error = listener.errors[0];
-    expect(error.message.indexOf("(") < 0, isTrue);
+    expect(error.message.contains("("), isFalse);
   }
 
   test_reportTypeErrorForNode_sameName() async {
@@ -763,7 +730,69 @@
         AstTestFactory.identifier3("x"),
         [firstType, secondType]);
     AnalysisError error = listener.errors[0];
-    expect(error.message.indexOf("(") >= 0, isTrue);
+    expect(error.message.contains("("), isTrue);
+  }
+}
+
+@reflectiveTest
+class ErrorReporterTest2 extends ResolverTestCase {
+  test_reportTypeErrorForNode_sameName_functionType() async {
+    addNamedSource('/a.dart', '''
+class A {}
+''');
+    addNamedSource('/b.dart', '''
+class A {}
+''');
+    CompilationUnit unit = await resolveSource('''
+import 'a.dart' as a;
+import 'b.dart' as b;
+
+a.A Function() fa;
+b.A Function() fb;
+''');
+
+    GatheringErrorListener listener = new GatheringErrorListener();
+    ErrorReporter reporter =
+        new ErrorReporter(listener, unit.declaredElement.source);
+    TopLevelVariableDeclaration fa = unit.declarations[0];
+    TopLevelVariableDeclaration fb = unit.declarations[1];
+    reporter.reportTypeErrorForNode(
+        StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+        AstTestFactory.identifier3('x'),
+        [fa.variables.type.type, fb.variables.type.type]);
+    AnalysisError error = listener.errors[0];
+    expect(error.message.contains('a.dart'), isTrue);
+    expect(error.message.contains('b.dart'), isTrue);
+  }
+
+  test_reportTypeErrorForNode_sameName_nested() async {
+    addNamedSource('/a.dart', '''
+class A {}
+''');
+    addNamedSource('/b.dart', '''
+class A {}
+''');
+    CompilationUnit unit = await resolveSource('''
+import 'a.dart' as a;
+import 'b.dart' as b;
+
+B<a.A> ba;
+B<b.A> bb;
+class B<T> {}
+''');
+
+    GatheringErrorListener listener = new GatheringErrorListener();
+    ErrorReporter reporter =
+        new ErrorReporter(listener, unit.declaredElement.source);
+    TopLevelVariableDeclaration fa = unit.declarations[0];
+    TopLevelVariableDeclaration fb = unit.declarations[1];
+    reporter.reportTypeErrorForNode(
+        StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+        AstTestFactory.identifier3('x'),
+        [fa.variables.type.type, fb.variables.type.type]);
+    AnalysisError error = listener.errors[0];
+    expect(error.message.contains('a.dart'), isTrue);
+    expect(error.message.contains('b.dart'), isTrue);
   }
 }
 
@@ -2053,31 +2082,27 @@
   }
 }
 
-class _SimpleDartSdkTest extends Object with ResourceProviderMixin {
-  String coreCorePath;
-  String coreIntPath;
+class _SimpleDartSdkTest with ResourceProviderMixin {
   DartSdk sdk;
 
   void setUp() {
-    Folder sdkFolder =
-        resourceProvider.newFolder(resourceProvider.convertPath('/sdk'));
-    resourceProvider.newFile(
-        resourceProvider.convertPath(
-            '/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart'),
-        '''
+    newFile('/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart',
+        content: '''
 const Map<String, LibraryInfo> libraries = const {
   "core": const LibraryInfo("core/core.dart")
 };
 ''');
-    coreCorePath = resourceProvider.convertPath('/sdk/lib/core/core.dart');
-    resourceProvider.newFile(coreCorePath, '''
+
+    newFile('/sdk/lib/core/core.dart', content: '''
 library dart.core;
 part 'int.dart';
 ''');
-    coreIntPath = resourceProvider.convertPath('/sdk/lib/core/int.dart');
-    resourceProvider.newFile(coreIntPath, '''
+
+    newFile('/sdk/lib/core/int.dart', content: '''
 part of dart.core;
 ''');
+
+    Folder sdkFolder = newFolder('/sdk');
     sdk = new FolderBasedDartSdk(resourceProvider, sdkFolder);
   }
 }
diff --git a/pkg/analyzer/test/generated/analysis_context_factory.dart b/pkg/analyzer/test/generated/analysis_context_factory.dart
index 0226a04..0ab45f5 100644
--- a/pkg/analyzer/test/generated/analysis_context_factory.dart
+++ b/pkg/analyzer/test/generated/analysis_context_factory.dart
@@ -130,6 +130,7 @@
       objectClassElement,
       overrideClassElement,
       proxyClassElement,
+      provider.setType.element,
       provider.stackTraceType.element,
       provider.stringType.element,
       provider.symbolType.element,
@@ -173,13 +174,15 @@
       proxyTopLevelVariableElt
     ];
     LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
-        coreContext, AstTestFactory.libraryIdentifier2(["dart", "core"]));
+        coreContext, null, AstTestFactory.libraryIdentifier2(["dart", "core"]));
     coreLibrary.definingCompilationUnit = coreUnit;
     //
     // dart:async
     //
     LibraryElementImpl asyncLibrary = new LibraryElementImpl.forNode(
-        coreContext, AstTestFactory.libraryIdentifier2(["dart", "async"]));
+        coreContext,
+        null,
+        AstTestFactory.libraryIdentifier2(["dart", "async"]));
     CompilationUnitElementImpl asyncUnit = new CompilationUnitElementImpl();
     Source asyncSource = sourceFactory.forUri(DartSdk.DART_ASYNC);
     coreContext.setContents(asyncSource, "");
@@ -329,7 +332,7 @@
     htmlUnit.topLevelVariables = <TopLevelVariableElement>[document];
     htmlUnit.accessors = <PropertyAccessorElement>[document.getter];
     LibraryElementImpl htmlLibrary = new LibraryElementImpl.forNode(coreContext,
-        AstTestFactory.libraryIdentifier2(["dart", "dom", "html"]));
+        null, AstTestFactory.libraryIdentifier2(["dart", "dom", "html"]));
     htmlLibrary.definingCompilationUnit = htmlUnit;
     //
     // dart:math
@@ -390,7 +393,7 @@
     ];
     mathUnit.types = <ClassElement>[randomElement];
     LibraryElementImpl mathLibrary = new LibraryElementImpl.forNode(
-        coreContext, AstTestFactory.libraryIdentifier2(["dart", "math"]));
+        coreContext, null, AstTestFactory.libraryIdentifier2(["dart", "math"]));
     mathLibrary.definingCompilationUnit = mathUnit;
     //
     // Set empty sources for the rest of the libraries.
@@ -534,8 +537,9 @@
   Map<String, Source> sourceMap = new HashMap<String, Source>();
 
   TestPackageUriResolver(Map<String, String> map) {
-    map.forEach((String uri, String contents) {
-      sourceMap[uri] = new StringSource(contents, '/test_pkg_source.dart');
+    map.forEach((String name, String contents) {
+      sourceMap['package:$name/$name.dart'] =
+          new StringSource(contents, '/$name/lib/$name.dart');
     });
   }
 
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_driver_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_driver_test.dart
index b8d01e9..2a3d968 100644
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_driver_test.dart
+++ b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_driver_test.dart
@@ -1,14 +1,19 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'checked_mode_compile_time_error_code_test.dart';
+import 'resolver_test_case.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CheckedModeCompileTimeErrorCodeTest_Driver);
+    defineReflectiveTests(SetElementTypeNotAssignableTest);
   });
 }
 
@@ -18,3 +23,23 @@
   @override
   bool get enableNewAnalysisDriver => true;
 }
+
+@reflectiveTest
+class SetElementTypeNotAssignableTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_simple() async {
+    Source source = addSource("var v = const <String>{42};");
+    await computeAnalysisResult(source);
+    // TODO(brianwilkerson) Fix this so that only one error is produced.
+    assertErrors(source, [
+      CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
+      StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+}
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
index 32623b2..6bfb23d 100644
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
@@ -28,8 +28,7 @@
 var v = const A(3, 2);
 ''');
     await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
     verify([source]);
   }
 
@@ -634,8 +633,7 @@
 }
 var v = const A.a1(0);''');
     await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
     verify([source]);
   }
 
@@ -651,8 +649,7 @@
 const f = const D('0.0');
 ''');
     await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
     verify([source]);
   }
 
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 e2ad9cf..9ff1460 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
@@ -1,14 +1,22 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'compile_time_error_code_test.dart';
+import 'resolver_test_case.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(CompileTimeErrorCodeTest_Driver);
+    defineReflectiveTests(ConstSetElementTypeImplementsEqualsTest);
+    defineReflectiveTests(InvalidTypeArgumentInConstSetTest);
+    defineReflectiveTests(NonConstSetElementFromDeferredLibraryTest);
+    defineReflectiveTests(NonConstSetElementTest);
   });
 }
 
@@ -31,12 +39,6 @@
 
   @override
   @failingTest
-  test_genericFunctionTypeArgument_typedef() {
-    return super.test_genericFunctionTypeArgument_typedef();
-  }
-
-  @override
-  @failingTest
   test_invalidIdentifierInAsync_async() {
     return super.test_invalidIdentifierInAsync_async();
   }
@@ -95,3 +97,188 @@
     return super.test_yieldInNonGenerator_sync();
   }
 }
+
+@reflectiveTest
+class ConstSetElementTypeImplementsEqualsTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_constField() async {
+    Source source = addSource(r'''
+class A {
+  static const a = const A();
+  const A();
+  operator ==(other) => false;
+}
+main() {
+  const {A.a};
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source,
+        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+    verify([source]);
+  }
+
+  test_direct() async {
+    Source source = addSource(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+main() {
+  const {const A()};
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source,
+        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+    verify([source]);
+  }
+
+  test_dynamic() async {
+    // Note: static type of B.a is "dynamic", but actual type of the const
+    // object is A.  We need to make sure we examine the actual type when
+    // deciding whether there is a problem with operator==.
+    Source source = addSource(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+class B {
+  static const a = const A();
+}
+main() {
+  const {B.a};
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source,
+        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+    verify([source]);
+  }
+
+  test_factory() async {
+    Source source = addSource(r'''
+class A { const factory A() = B; }
+
+class B implements A {
+  const B();
+
+  operator ==(o) => true;
+}
+
+main() {
+  var m = const {const A()};
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source,
+        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+    verify([source]);
+  }
+
+  test_super() async {
+    Source source = addSource(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+class B extends A {
+  const B();
+}
+main() {
+  const {const B()};
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source,
+        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+    verify([source]);
+  }
+}
+
+@reflectiveTest
+class InvalidTypeArgumentInConstSetTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_class() async {
+    Source source = addSource(r'''
+class A<E> {
+  m() {
+    return const <E>{};
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(
+        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
+    verify([source]);
+  }
+}
+
+@reflectiveTest
+class NonConstSetElementFromDeferredLibraryTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_topLevelVariable_immediate() async {
+    await resolveWithErrors(<String>[
+      r'''
+library lib1;
+const int c = 1;''',
+      r'''
+library root;
+import 'lib1.dart' deferred as a;
+f() {
+  return const {a.c};
+}'''
+    ], [
+      CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+
+  test_topLevelVariable_nested() async {
+    await resolveWithErrors(<String>[
+      r'''
+library lib1;
+const int c = 1;''',
+      r'''
+library root;
+import 'lib1.dart' deferred as a;
+f() {
+  return const {a.c + 1};
+}'''
+    ], [
+      CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
+    ]);
+  }
+}
+
+@reflectiveTest
+class NonConstSetElementTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_parameter() async {
+    Source source = addSource(r'''
+f(a) {
+  return const {a};
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+    verify([source]);
+  }
+}
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 a04cda9..c266770 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -38,12 +38,6 @@
 
   @override
   @failingTest
-  test_genericFunctionTypeArgument_typedef() {
-    return super.test_genericFunctionTypeArgument_typedef();
-  }
-
-  @override
-  @failingTest
   test_invalidIdentifierInAsync_async() {
     return super.test_invalidIdentifierInAsync_async();
   }
@@ -895,37 +889,6 @@
     verify([source]);
   }
 
-  test_constConstructorWithMixinWithField() async {
-    Source source = addSource(r'''
-class A {
-  var a;
-}
-class B extends Object with A {
-  const B();
-}''');
-    await computeAnalysisResult(source);
-
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
-      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
-    ]);
-    verify([source]);
-  }
-
-  test_constConstructorWithMixinWithField_final() async {
-    Source source = addSource(r'''
-class A {
-  final int a = 0;
-}
-class B extends Object with A {
-  const B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD]);
-    verify([source]);
-  }
-
   test_constConstructorWithNonConstSuper_explicit() async {
     Source source = addSource(r'''
 class A {
@@ -1235,9 +1198,9 @@
   }
 
   test_constEvalTypeInt_binary() async {
-    await _check_constEvalTypeInt_withParameter_binary("p ^ ''");
-    await _check_constEvalTypeInt_withParameter_binary("p & ''");
-    await _check_constEvalTypeInt_withParameter_binary("p | ''");
+    await _check_constEvalTypeBoolOrInt_withParameter_binary("p ^ ''");
+    await _check_constEvalTypeBoolOrInt_withParameter_binary("p & ''");
+    await _check_constEvalTypeBoolOrInt_withParameter_binary("p | ''");
     await _check_constEvalTypeInt_withParameter_binary("p >> ''");
     await _check_constEvalTypeInt_withParameter_binary("p << ''");
   }
@@ -2406,36 +2369,6 @@
     verify([source]);
   }
 
-  test_genericFunctionTypeArgument_class() async {
-    Source source = addSource(r'''
-class C<T> {}
-C<T Function<T>(T)> c;''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT]);
-    verify([source]);
-  }
-
-  test_genericFunctionTypeArgument_function() async {
-    Source source = addSource(r'''
-T f<T>(T) => null;
-main() { f<S Function<S>(S)>(null); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT]);
-    verify([source]);
-  }
-
-  test_genericFunctionTypeArgument_functionType() async {
-    Source source = addSource(r'''
-T Function<T>(T) f;
-main() { f<S Function<S>(S)>(null); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT]);
-    verify([source]);
-  }
-
   test_genericFunctionTypeArgument_inference_function() async {
     Source source = addSource(r'''
 T f<T>(T t) => null;
@@ -2465,29 +2398,6 @@
     verify([source]);
   }
 
-  test_genericFunctionTypeArgument_method() async {
-    Source source = addSource(r'''
-class C {
-  T f<T>(T) => null;
-}
-main() { new C().f<S Function<S>(S)>(null); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT]);
-    verify([source]);
-  }
-
-  test_genericFunctionTypeArgument_typedef() async {
-    // TODO(mfairhurst) diagnose these parse errors to give the correct error
-    Source source = addSource(r'''
-typedef T f<T>(T t);
-final T<Function<S>(int)> x = null;''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.GENERIC_FUNCTION_CANNOT_BE_TYPE_ARGUMENT]);
-    verify([source]);
-  }
-
   test_genericFunctionTypeAsBound_class() async {
     Source source = addSource(r'''
 class C<T extends S Function<S>(S)> {
@@ -4730,7 +4640,7 @@
 }''');
     await computeAnalysisResult(source);
     assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
+      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
     verify([source]);
@@ -5076,23 +4986,6 @@
     verify([source]);
   }
 
-  test_prefix_conditionalPropertyAccess_call() async {
-    addNamedSource('/lib.dart', '''
-library lib;
-g() {}
-''');
-    Source source = addSource('''
-import 'lib.dart' as p;
-f() {
-  p?.g();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
-  }
-
   test_prefix_conditionalPropertyAccess_call_loadLibrary() async {
     addNamedSource('/lib.dart', '''
 library lib;
@@ -5175,36 +5068,6 @@
     verify([source]);
   }
 
-  test_prefix_unqualified_invocation_in_method() async {
-    addNamedSource('/lib.dart', 'librarylib;');
-    Source source = addSource('''
-import 'lib.dart' as p;
-class C {
-  f() {
-    p();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
-  }
-
-  test_prefix_unqualified_invocation_not_in_method() async {
-    addNamedSource('/lib.dart', 'librarylib;');
-    Source source = addSource('''
-import 'lib.dart' as p;
-f() {
-  p();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
-  }
-
   test_prefixCollidesWithTopLevelMembers_functionTypeAlias() async {
     addNamedSource("/lib.dart", r'''
 library lib;
@@ -5423,9 +5286,9 @@
   }
 
   test_recursiveCompileTimeConstant_fromMapLiteral() async {
-    resourceProvider.newFile(
-      resourceProvider.convertPath('/constants.dart'),
-      r'''
+    newFile(
+      '/constants.dart',
+      content: r'''
 const int x = y;
 const int y = x;
 ''',
@@ -6334,7 +6197,7 @@
     assertErrors(test, [HintCode.UNUSED_IMPORT]);
 
     // Remove the overlay in the same way as AnalysisServer.
-    resourceProvider.deleteFile(target.fullName);
+    deleteFile(target.fullName);
     if (enableNewAnalysisDriver) {
       driver.removeFile(target.fullName);
     } else {
@@ -6352,7 +6215,7 @@
     await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
 
-    String targetPath = resourceProvider.convertPath('/target.dart');
+    String targetPath = convertPath('/target.dart');
     if (enableNewAnalysisDriver) {
       // Add an overlay in the same way as AnalysisServer.
       fileContentOverlay[targetPath] = '';
@@ -6592,7 +6455,7 @@
     verify([source]);
   }
 
-  Future<Null> _check_constEvalThrowsException_binary_null(
+  Future<void> _check_constEvalThrowsException_binary_null(
       String expr, bool resolved) async {
     Source source = addSource("const C = $expr;");
     await computeAnalysisResult(source);
@@ -6602,7 +6465,7 @@
     }
   }
 
-  Future<Null> _check_constEvalTypeBool_withParameter_binary(
+  Future<void> _check_constEvalTypeBool_withParameter_binary(
       String expr) async {
     Source source = addSource('''
 class A {
@@ -6617,7 +6480,22 @@
     verify([source]);
   }
 
-  Future<Null> _check_constEvalTypeInt_withParameter_binary(String expr) async {
+  Future<void> _check_constEvalTypeBoolOrInt_withParameter_binary(
+      String expr) async {
+    Source source = addSource('''
+class A {
+  final a;
+  const A(int p) : a = $expr;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+  }
+
+  Future<void> _check_constEvalTypeInt_withParameter_binary(String expr) async {
     Source source = addSource('''
 class A {
   final a;
@@ -6631,7 +6509,7 @@
     verify([source]);
   }
 
-  Future<Null> _check_constEvalTypeNum_withParameter_binary(String expr) async {
+  Future<void> _check_constEvalTypeNum_withParameter_binary(String expr) async {
     Source source = addSource('''
 class A {
   final a;
@@ -6645,7 +6523,7 @@
     verify([source]);
   }
 
-  Future<Null> _check_wrongNumberOfParametersForOperator(
+  Future<void> _check_wrongNumberOfParametersForOperator(
       String name, String parameters) async {
     Source source = addSource('''
 class A {
@@ -6657,12 +6535,12 @@
     verify([source]);
   }
 
-  Future<Null> _check_wrongNumberOfParametersForOperator1(String name) async {
+  Future<void> _check_wrongNumberOfParametersForOperator1(String name) async {
     await _check_wrongNumberOfParametersForOperator(name, "");
     await _check_wrongNumberOfParametersForOperator(name, "a, b");
   }
 
-  Future<Null> _privateCollisionInMixinApplicationTest(String testCode) async {
+  Future<void> _privateCollisionInMixinApplicationTest(String testCode) async {
     addNamedSource('/lib1.dart', '''
 class A {
   int _x;
diff --git a/pkg/analyzer/test/generated/constant_test.dart b/pkg/analyzer/test/generated/constant_test.dart
index 8c5dadf..12c9c85 100644
--- a/pkg/analyzer/test/generated/constant_test.dart
+++ b/pkg/analyzer/test/generated/constant_test.dart
@@ -15,7 +15,6 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'resolver_test_case.dart';
-import 'test_support.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -478,11 +477,8 @@
         analysisContext.resolveCompilationUnit(source, library);
     expect(unit, isNotNull);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
-    CompilationUnitMember declaration = declarations[0];
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration,
-        TopLevelVariableDeclaration, declaration);
-    NodeList<VariableDeclaration> variables =
-        (declaration as TopLevelVariableDeclaration).variables.variables;
+    TopLevelVariableDeclaration declaration = declarations[0];
+    NodeList<VariableDeclaration> variables = declaration.variables.variables;
     expect(variables, hasLength(1));
     ConstantEvaluator evaluator = new ConstantEvaluator(
         source, analysisContext.typeProvider,
diff --git a/pkg/analyzer/test/generated/declaration_resolver_test.dart b/pkg/analyzer/test/generated/declaration_resolver_test.dart
index 0a991f7..26dd5a1 100644
--- a/pkg/analyzer/test/generated/declaration_resolver_test.dart
+++ b/pkg/analyzer/test/generated/declaration_resolver_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -58,7 +58,7 @@
     }
   }
 
-  Future<Null> setupCode(String code) async {
+  Future<void> setupCode(String code) async {
     this.code = code;
     unit = await resolveSource(code + ' const a = null;');
     unit2 = _cloneResolveUnit(unit);
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index 75e534a..58c0a5c 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -277,7 +277,7 @@
     });
   }
 
-  Future<Null> _validateAnnotation(
+  Future<void> _validateAnnotation(
       String annotationPrefix,
       String annotationText,
       validator(SimpleIdentifier name1, SimpleIdentifier name2,
@@ -829,31 +829,6 @@
     _listener.assertNoErrors();
   }
 
-  test_visitMethodInvocation_namedParameter() async {
-    ClassElementImpl classA = ElementFactory.classElement2("A");
-    String methodName = "m";
-    String parameterName = "p";
-    MethodElementImpl method = ElementFactory.methodElement(methodName, null);
-    ParameterElement parameter = ElementFactory.namedParameter(parameterName);
-    method.parameters = <ParameterElement>[parameter];
-    classA.methods = <MethodElement>[method];
-    SimpleIdentifier left = AstTestFactory.identifier3("i");
-    left.staticType = classA.type;
-    MethodInvocation invocation = AstTestFactory.methodInvocation(
-        left, methodName, [
-      AstTestFactory.namedExpression2(parameterName, AstTestFactory.integer(0))
-    ]);
-    _resolveNode(invocation);
-    expect(invocation.methodName.staticElement, same(method));
-    expect(
-        (invocation.argumentList.arguments[0] as NamedExpression)
-            .name
-            .label
-            .staticElement,
-        same(parameter));
-    _listener.assertNoErrors();
-  }
-
   test_visitPostfixExpression() async {
     InterfaceType numType = _typeProvider.numType;
     SimpleIdentifier operand = AstTestFactory.identifier3("i");
@@ -1074,10 +1049,8 @@
     AstTestFactory.assignmentExpression(
         node, TokenType.EQ, AstTestFactory.integer(0));
     _resolveInClass(node, classA);
-    Element element = node.staticElement;
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccessorElement,
-        PropertyAccessorElement, element);
-    expect((element as PropertyAccessorElement).isSetter, isTrue);
+    PropertyAccessorElement element = node.staticElement;
+    expect(element.isSetter, isTrue);
     _listener.assertNoErrors();
   }
 
@@ -1290,8 +1263,7 @@
 
   @override
   void setUp() {
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl()
-      ..previewDart2 = true;
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     resetWith(options: options);
   }
 
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
index bcf3bad..0a7da26 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,7 +7,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart';
-import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/task/options.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -15,20 +15,7 @@
 import '../src/util/yaml_test.dart';
 import 'resolver_test_case.dart';
 
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(HintCodeTest);
-  });
-}
-
-@reflectiveTest
-class HintCodeTest extends ResolverTestCase {
-  @override
-  void reset() {
-    super.resetWith(packages: [
-      [
-        'meta',
-        r'''
+final metaLibraryStub = r'''
 library meta;
 
 const _AlwaysThrows alwaysThrows = const _AlwaysThrows();
@@ -70,8 +57,297 @@
 class _VisibleForTesting {
   const _VisibleForTesting();
 }
+''';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CrossPackageHintCodeTest);
+    defineReflectiveTests(HintCodeTest);
+  });
+}
+
+@reflectiveTest
+class CrossPackageHintCodeTest extends ResolverTestCase {
+  /// Write a pubspec file at [root], so that BestPracticesVerifier can see that
+  /// [root] is the root of a BasicWorkspace, and a BasicWorkspacePackage.
+  void newBasicPackage(String root) {
+    newFile('$root/pubspec.yaml');
+  }
+
+  test_subtypeOfSealedClass_extending() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
 '''
-      ],
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    class Bar extends Foo {}
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedClass_implementing() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+'''
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    class Bar implements Foo {}
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedClass_with() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+'''
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    class Bar extends Object with Foo {}
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedMixin_with() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed mixin Foo {}
+'''
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    class Bar extends Object with Foo {}
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedClass_mixinOn() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+'''
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    mixin Bar on Foo {}
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.MIXIN_ON_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedClass_mixinImplements() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+'''
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    mixin Bar implements Foo {}
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedClass_mixinApplication() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+'''
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    class Bar1 {}
+                    class Bar2 = Bar1 with Foo;
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedMixin_mixinApplication() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+      [
+        'foo',
+        r'''
+import 'package:meta/meta.dart';
+@sealed mixin Foo {}
+'''
+      ]
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:foo/foo.dart';
+                    class Bar1 {}
+                    class Bar2 = Bar1 with Foo;
+                    ''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedClass_withinLibrary_OK() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                    import 'package:meta/meta.dart';
+                    @sealed class Foo {}
+
+                    class Bar1 extends Foo {}
+                    class Bar2 implements Foo {}
+                    class Bar4 = Bar1 with Foo;
+                    mixin Bar5 on Foo {}
+                    mixin Bar6 implements Foo {}
+                    ''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_subtypeOfSealedClass_withinPart_OK() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source1 = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                     import 'package:meta/meta.dart';
+                     part 'part1.dart';
+                     @sealed class Foo {}
+                     ''');
+    addNamedSource('/pkg1/lib/part1.dart', r'''
+                     part of 'lib1.dart';
+                     class Bar1 extends Foo {}
+                     class Bar2 implements Foo {}
+                     class Bar4 = Bar1 with Foo;
+                     mixin Bar5 on Foo {}
+                     mixin Bar6 implements Foo {}
+                     ''');
+    await computeAnalysisResult(source1);
+    assertNoErrors(source1);
+    verify([source1]);
+  }
+
+  test_subtypeOfSealedClass_withinPackageLibDirectory_OK() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source1 = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                     import 'package:meta/meta.dart';
+                     @sealed class Foo {}
+                     ''');
+    addNamedSource('/pkg1/lib/src/lib2.dart', r'''
+                     class Bar1 extends Foo {}
+                     class Bar2 implements Foo {}
+                     class Bar4 = Bar1 with Foo;
+                     mixin Bar5 on Foo {}
+                     mixin Bar6 implements Foo {}
+                     ''');
+    await computeAnalysisResult(source1);
+    assertNoErrors(source1);
+    verify([source1]);
+  }
+
+  test_subtypeOfSealedClass_withinPackageTestDirectory_OK() async {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
+    ]);
+
+    newBasicPackage('/pkg1');
+    Source source1 = addNamedSource('/pkg1/lib/lib1.dart', r'''
+                     import 'package:meta/meta.dart';
+                     @sealed class Foo {}
+                     ''');
+    addNamedSource('/pkg1/test/test.dart', r'''
+                     class Bar1 extends Foo {}
+                     class Bar2 implements Foo {}
+                     class Bar4 = Bar1 with Foo;
+                     mixin Bar5 on Foo {}
+                     mixin Bar6 implements Foo {}
+                     ''');
+    await computeAnalysisResult(source1);
+    assertNoErrors(source1);
+    verify([source1]);
+  }
+}
+
+@reflectiveTest
+class HintCodeTest extends ResolverTestCase {
+  @override
+  void reset() {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub],
       [
         'js',
         r'''
@@ -96,164 +372,6 @@
     ]);
   }
 
-  test_argumentTypeNotAssignable_functionType() async {
-    Source source = addSource(r'''
-m() {
-  var a = new A();
-  a.n(() => 0);
-}
-class A {
-  n(void f(int i)) {}
-}''');
-    await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    } else {
-      assertErrors(source, [HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    }
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_message() async {
-    // The implementation of HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE assumes that
-    // StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE has the same message.
-    expect(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE.message,
-        HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE.message);
-  }
-
-  test_argumentTypeNotAssignable_type() async {
-    Source source = addSource(r'''
-m() {
-  var i = '';
-  n(i);
-}
-n(int i) {}''');
-    await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    } else {
-      assertErrors(source, [HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    }
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_after_cascade() async {
-    Source source = addSource(r'''
-m(x) {
-  x..a?.b.c;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_before_cascade() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a..m();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_cascade_parenthesis() async {
-    Source source = addSource(r'''
-m(x) {
-  (x?.a)..m();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_false_methodInvocation() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a()?.b();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_false_null() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a.hashCode;
-  x?.a.runtimeType;
-  x?.a.toString();
-  x?.b().hashCode;
-  x?.b().runtimeType;
-  x?.b().toString();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_false_propertyAccess() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a?.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_methodInvocation() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a.b();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_parenthesized() async {
-    Source source = addSource(r'''
-m(x) {
-  (x?.a).b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_propertyAccess() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
-  test_canBeNullAfterNullAware_several() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a
-    ..m()
-    ..m();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
-    verify([source]);
-  }
-
   test_deadCode_deadBlock_conditionalElse() async {
     Source source = addSource(r'''
 f() {
@@ -790,233 +908,6 @@
     verify([source]);
   }
 
-  test_deprecatedAnnotationUse_assignment() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A operator+(A a) { return a; }
-}
-f(A a) {
-  A b;
-  a += b;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_call() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  call() {}
-  m() {
-    A a = new A();
-    a();
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_deprecated() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  m() {}
-  n() {m();}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_Deprecated() async {
-    Source source = addSource(r'''
-class A {
-  @Deprecated('0.9')
-  m() {}
-  n() {m();}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_export() async {
-    Source source = addSource("export 'deprecated_library.dart';");
-    addNamedSource("/deprecated_library.dart", r'''
-@deprecated
-library deprecated_library;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_field() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  int x = 1;
-}
-f(A a) {
-  return a.x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_getter() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  get m => 1;
-}
-f(A a) {
-  return a.m;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_import() async {
-    Source source = addSource(r'''
-import 'deprecated_library.dart';
-f(A a) {}''');
-    addNamedSource("/deprecated_library.dart", r'''
-@deprecated
-library deprecated_library;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_indexExpression() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  operator[](int i) {}
-}
-f(A a) {
-  return a[1];
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_instanceCreation() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A(int i) {}
-}
-f() {
-  A a = new A(1);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_instanceCreation_namedConstructor() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A.named(int i) {}
-}
-f() {
-  A a = new A.named(1);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_named() async {
-    Source source = addSource(r'''
-class A {
-  m({@deprecated int x}) {}
-  n() {m(x: 1);}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_operator() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  operator+(A a) {}
-}
-f(A a) {
-  A b;
-  return a + b;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_positional() async {
-    Source source = addSource(r'''
-class A {
-  m([@deprecated int x]) {}
-  n() {m(1);}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_setter() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  set s(v) {}
-}
-f(A a) {
-  return a.s = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_superConstructor() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A() {}
-}
-class B extends A {
-  B() : super() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_superConstructor_namedConstructor() async {
-    Source source = addSource(r'''
-class A {
-  @deprecated
-  A.named() {}
-}
-class B extends A {
-  B() : super.named() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
-    verify([source]);
-  }
-
   test_deprecatedFunction_class() async {
     Source source = addSource(r'''
 class Function {}
@@ -1070,53 +961,6 @@
     verify([source]);
   }
 
-  test_divisionOptimization_double() async {
-    Source source = addSource(r'''
-f(double x, double y) {
-  var v = (x / y).toInt();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    verify([source]);
-  }
-
-  test_divisionOptimization_int() async {
-    Source source = addSource(r'''
-f(int x, int y) {
-  var v = (x / y).toInt();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    verify([source]);
-  }
-
-  test_divisionOptimization_propagatedType() async {
-    // Tests the propagated type information of the '/' method
-    Source source = addSource(r'''
-f(x, y) {
-  x = 1;
-  y = 1;
-  var v = (x / y).toInt();
-}''');
-    await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    }
-    verify([source]);
-  }
-
-  test_divisionOptimization_wrappedBinaryExpression() async {
-    Source source = addSource(r'''
-f(int x, int y) {
-  var v = (((x / y))).toInt();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DIVISION_OPTIMIZATION]);
-    verify([source]);
-  }
-
   test_duplicateImport() async {
     Source source = addSource(r'''
 library L;
@@ -1395,11 +1239,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    } else {
-      assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
   }
 
@@ -1411,11 +1251,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    } else {
-      assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
   }
 
@@ -1437,11 +1273,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    } else {
-      assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
   }
 
@@ -1461,11 +1293,7 @@
   int n = p1 + p2;
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    } else {
-      assertErrors(source, [HintCode.INVALID_ASSIGNMENT]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verify([source]);
   }
 
@@ -1482,63 +1310,29 @@
     verify([source]);
   }
 
-  test_invalidRequiredParam_on_named_parameter_with_default() async {
-    Source source = addNamedSource('/lib1.dart', r'''
+  test_invalidLiteralAnnotation_nonConstConstructor() async {
+    Source source = addSource(r'''
 import 'package:meta/meta.dart';
-
-m({@required a = 1}) => null;
+class A {
+  @literal
+  A() {}
+}
 ''');
     await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]);
+    assertErrors(source, [HintCode.INVALID_LITERAL_ANNOTATION]);
     verify([source]);
   }
 
-  test_invalidRequiredParam_on_positional_parameter() async {
-    Source source = addNamedSource('/lib1.dart', r'''
+  test_invalidLiteralAnnotation_nonConstructor() async {
+    Source source = addSource(r'''
 import 'package:meta/meta.dart';
-
-m([@required a]) => null;
+class A {
+  @literal
+  void m() {}
+}
 ''');
     await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]);
-    verify([source]);
-  }
-
-  test_invalidRequiredParam_on_positional_parameter_with_default() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-m([@required a = 1]) => null;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]);
-    verify([source]);
-  }
-
-  test_invalidRequiredParam_on_required_parameter() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-m(@required a) => null;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]);
-    verify([source]);
-  }
-
-  test_invalidRequiredParam_valid() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-m1() => null;
-m2(a) => null;
-m3([a]) => null;
-m4({a}) => null;
-m5({@required a}) => null;
-m6({a, @required b}) => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
+    assertErrors(source, [HintCode.INVALID_LITERAL_ANNOTATION]);
     verify([source]);
   }
 
@@ -1553,17 +1347,6 @@
     verify([source]);
   }
 
-  test_invalidSealedAnnotation_onMixin() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-@sealed mixin M {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_invalidSealedAnnotation_onMixinApplication() async {
     Source source = addNamedSource('/lib1.dart', r'''
 import 'package:meta/meta.dart';
@@ -1579,6 +1362,17 @@
     verify([source]);
   }
 
+  test_invalidSealedAnnotation_onMixin() async {
+    Source source = addNamedSource('/lib1.dart', r'''
+import 'package:meta/meta.dart';
+
+@sealed mixin M {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.INVALID_SEALED_ANNOTATION]);
+    verify([source]);
+  }
+
   test_invalidSealedAnnotation_onNonClass() async {
     Source source = addNamedSource('/lib1.dart', r'''
 import 'package:meta/meta.dart';
@@ -2594,6 +2388,19 @@
     verify([source]);
   }
 
+  test_mustBeImmutable_directMixin() async {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+@immutable
+mixin A {
+  int x;
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
+    verify([source]);
+  }
+
   test_mustBeImmutable_extends() async {
     Source source = addSource(r'''
 import 'package:meta/meta.dart';
@@ -2608,6 +2415,21 @@
     verify([source]);
   }
 
+  test_mustBeImmutable_mixinApplicationBase() async {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  int x;
+}
+class B {}
+@immutable
+class C = A with B;
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
+    verify([source]);
+  }
+
   test_mustBeImmutable_fromMixin() async {
     Source source = addSource(r'''
 import 'package:meta/meta.dart';
@@ -2636,6 +2458,21 @@
     verify([source]);
   }
 
+  test_mustBeImmutable_mixinApplication() async {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {}
+class B {
+  int x;
+}
+class C = A with B;
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
+    verify([source]);
+  }
+
   test_mustCallSuper() async {
     Source source = addSource(r'''
 import 'package:meta/meta.dart';
@@ -3931,11 +3768,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_GETTER]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   test_undefinedIdentifier_exportHide() async {
@@ -3980,38 +3813,6 @@
     verify([source]);
   }
 
-  test_undefinedMethod() async {
-    Source source = addSource(r'''
-f() {
-  var a = 'str';
-  a.notAMethodOnString();
-}''');
-    await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_METHOD]);
-    }
-  }
-
-  test_undefinedMethod_assignmentExpression() async {
-    Source source = addSource(r'''
-class A {}
-class B {
-  f(var a, var a2) {
-    a = new A();
-    a2 = new A();
-    a += a2;
-  }
-}''');
-    await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_METHOD]);
-    }
-  }
-
   test_undefinedOperator_binaryExpression() async {
     Source source = addSource(r'''
 class A {}
@@ -4021,11 +3822,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   test_undefinedOperator_indexBoth() async {
@@ -4037,11 +3834,10 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-    }
+    assertErrors(source, [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+    ]);
   }
 
   test_undefinedOperator_indexGetter() async {
@@ -4053,11 +3849,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   test_undefinedOperator_indexSetter() async {
@@ -4069,11 +3861,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   test_undefinedOperator_postfixExpression() async {
@@ -4085,11 +3873,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-    }
+    assertNoErrors(source);
   }
 
   test_undefinedOperator_prefixExpression() async {
@@ -4101,11 +3885,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_OPERATOR]);
-    }
+    assertNoErrors(source);
   }
 
   test_undefinedSetter() async {
@@ -4117,11 +3897,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
-    } else {
-      assertErrors(source, [HintCode.UNDEFINED_SETTER]);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
   }
 
   test_unnecessaryCast_type_supertype() async {
diff --git a/pkg/analyzer/test/generated/inheritance_manager_test.dart b/pkg/analyzer/test/generated/inheritance_manager_test.dart
index fa5b0d4..d6def33 100644
--- a/pkg/analyzer/test/generated/inheritance_manager_test.dart
+++ b/pkg/analyzer/test/generated/inheritance_manager_test.dart
@@ -28,7 +28,7 @@
 }
 
 @reflectiveTest
-class InheritanceManagerTest extends Object with ResourceProviderMixin {
+class InheritanceManagerTest with ResourceProviderMixin {
   /**
    * The type provider used to access the types.
    */
diff --git a/pkg/analyzer/test/generated/invalid_code_test.dart b/pkg/analyzer/test/generated/invalid_code_test.dart
index 253b063..3d24f99 100644
--- a/pkg/analyzer/test/generated/invalid_code_test.dart
+++ b/pkg/analyzer/test/generated/invalid_code_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -48,7 +48,7 @@
 ''');
   }
 
-  Future<Null> _assertCanBeAnalyzed(String text) async {
+  Future<void> _assertCanBeAnalyzed(String text) async {
     Source source = addSource(text);
     var analysisResult = await computeAnalysisResult(source);
     expect(analysisResult.errors, isNotEmpty);
diff --git a/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
index c524c9c..300cae8 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
@@ -1,42 +1,73 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'non_error_resolver_test.dart';
+import 'resolver_test_case.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonErrorResolverTest_Driver);
+    defineReflectiveTests(NonConstantValueInInitializer);
   });
 }
 
 @reflectiveTest
+class NonConstantValueInInitializer extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.constant_update_2018];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_intLiteralInDoubleContext_const_exact() async {
+    Source source = addSource(r'''
+const double x = 0;
+class C {
+  const C(double y) : assert(y is double), assert(x is double);
+}
+@C(0)
+@C(-0)
+@C(0x0)
+@C(-0x0)
+void main() {
+  const C(0);
+  const C(-0);
+  const C(0x0);
+  const C(-0x0);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_isCheckInConstAssert() async {
+    Source source = addSource(r'''
+class C {
+  const C() : assert(1 is int);
+}
+
+void main() {
+  const C();
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+}
+
+@reflectiveTest
 class NonErrorResolverTest_Driver extends NonErrorResolverTestBase {
   @override
   bool get enableNewAnalysisDriver => true;
 
   @override
   @failingTest
-  test_constConstructorWithMixinWithField_withoutSuperMixins() {
-    return super.test_constConstructorWithMixinWithField_withoutSuperMixins();
-  }
-
-  @override
-  @failingTest
-  test_intLiteralInDoubleContext_const_exact() {
-    return super.test_intLiteralInDoubleContext_const_exact();
-  }
-
-  @override
-  @failingTest
-  test_null_callMethod() {
-    return super.test_null_callMethod();
-  }
-
-  @override
-  @failingTest
   test_null_callOperator() {
     return super.test_null_callOperator();
   }
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 25ce0a7..7eb938a 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -16,7 +16,6 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'resolver_test_case.dart';
-import 'test_support.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -27,12 +26,6 @@
 @reflectiveTest
 class NonErrorResolverTest extends NonErrorResolverTestBase {
   @override
-  @failingTest
-  test_constConstructorWithMixinWithField_withoutSuperMixins() {
-    return super.test_constConstructorWithMixinWithField_withoutSuperMixins();
-  }
-
-  @override
   @failingTest // Does not work with old task model
   test_infer_mixin_new_syntax() {
     return super.test_infer_mixin_new_syntax();
@@ -51,12 +44,6 @@
   }
 
   @override
-  @failingTest
-  test_intLiteralInDoubleContext_const_exact() {
-    return super.test_intLiteralInDoubleContext_const_exact();
-  }
-
-  @override
   @failingTest // Fails with the old task model
   test_issue_32394() {
     return super.test_issue_32394();
@@ -76,12 +63,6 @@
 
   @override
   @failingTest
-  test_null_callMethod() {
-    return super.test_null_callMethod();
-  }
-
-  @override
-  @failingTest
   test_null_callOperator() {
     return super.test_null_callOperator();
   }
@@ -307,7 +288,7 @@
   }
 
   test_argumentTypeNotAssignable_optionalNew() async {
-    resetWith(options: new AnalysisOptionsImpl()..previewDart2 = true);
+    resetWith(options: new AnalysisOptionsImpl());
     Source source = addSource(r'''
 class Widget { }
 
@@ -978,220 +959,6 @@
     expect(classC.documentationComment, isNotNull);
   }
 
-  test_commentReference_beforeConstructor() async {
-    String code = r'''
-abstract class A {
-  /// [p]
-  A(int p) {}
-}''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, "p]");
-      expect(ref.staticElement, new TypeMatcher<ParameterElement>());
-    }
-  }
-
-  test_commentReference_beforeEnum() async {
-    String code = r'''
-/// This is the [Samurai] kind.
-enum Samurai {
-  /// Use [int].
-  WITH_SWORD,
-  /// Like [WITH_SWORD], but only without one.
-  WITHOUT_SWORD
-}''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, 'Samurai]');
-      ClassElement refElement = ref.staticElement;
-      expect(refElement, isNotNull);
-      expect(refElement.name, 'Samurai');
-    }
-    {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, 'int]');
-      ClassElement refElement = ref.staticElement;
-      expect(refElement, isNotNull);
-      expect(refElement.name, 'int');
-    }
-    {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, 'WITH_SWORD]');
-      PropertyAccessorElement refElement = ref.staticElement;
-      expect(refElement, isNotNull);
-      expect(refElement.name, 'WITH_SWORD');
-    }
-  }
-
-  test_commentReference_beforeFunction_blockBody() async {
-    String code = r'''
-/// [p]
-foo(int p) {
-}''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    SimpleIdentifier ref =
-        EngineTestCase.findSimpleIdentifier(unit, code, 'p]');
-    expect(ref.staticElement, new TypeMatcher<ParameterElement>());
-  }
-
-  test_commentReference_beforeFunction_expressionBody() async {
-    String code = r'''
-/// [p]
-foo(int p) => null;''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    SimpleIdentifier ref =
-        EngineTestCase.findSimpleIdentifier(unit, code, 'p]');
-    expect(ref.staticElement, new TypeMatcher<ParameterElement>());
-  }
-
-  test_commentReference_beforeFunctionTypeAlias() async {
-    String code = r'''
-/// [p]
-typedef Foo(int p);
-''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    SimpleIdentifier ref =
-        EngineTestCase.findSimpleIdentifier(unit, code, 'p]');
-    expect(ref.staticElement, new TypeMatcher<ParameterElement>());
-  }
-
-  test_commentReference_beforeGenericTypeAlias() async {
-    String code = r'''
-/// Can resolve [T], [S], and [p].
-typedef Foo<T> = Function<S>(int p);
-''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-
-    Element getElement(String search) {
-      return EngineTestCase.findSimpleIdentifier(unit, code, search)
-          .staticElement;
-    }
-
-    expect(getElement('T]'), new TypeMatcher<TypeParameterElement>());
-    expect(getElement('S]'), new TypeMatcher<TypeParameterElement>());
-    expect(getElement('p]'), new TypeMatcher<ParameterElement>());
-  }
-
-  test_commentReference_beforeGetter() async {
-    String code = r'''
-abstract class A {
-  /// [int]
-  get g => null;
-}''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, 'int]');
-      expect(ref.staticElement, isNotNull);
-    }
-  }
-
-  test_commentReference_beforeMethod() async {
-    String code = r'''
-abstract class A {
-  /// [p1]
-  ma(int p1) {}
-  /// [p2]
-  mb(int p2);
-  /// [p3] and [p4]
-  mc(int p3, p4());
-  /// [p5]
-  md(int p5, {int p6});
-}''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    assertIsParameter(String search) {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, search);
-      expect(ref.staticElement, new TypeMatcher<ParameterElement>());
-    }
-
-    assertIsParameter('p1');
-    assertIsParameter('p2');
-    assertIsParameter('p3');
-    assertIsParameter('p4');
-    assertIsParameter('p5');
-    assertIsParameter('p6');
-  }
-
-  test_commentReference_class() async {
-    String code = r'''
-/// [foo]
-class A {
-  foo() {}
-}''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    SimpleIdentifier ref =
-        EngineTestCase.findSimpleIdentifier(unit, code, 'foo]');
-    expect(ref.staticElement, new TypeMatcher<MethodElement>());
-  }
-
-  test_commentReference_setter() async {
-    String code = r'''
-class A {
-  /// [x] in A
-  mA() {}
-  set x(value) {}
-}
-class B extends A {
-  /// [x] in B
-  mB() {}
-}
-''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, "x] in A");
-      expect(ref.staticElement, new TypeMatcher<PropertyAccessorElement>());
-    }
-    {
-      SimpleIdentifier ref =
-          EngineTestCase.findSimpleIdentifier(unit, code, 'x] in B');
-      expect(ref.staticElement, new TypeMatcher<PropertyAccessorElement>());
-    }
-  }
-
   test_concreteClassWithAbstractMember() async {
     Source source = addSource(r'''
 abstract class A {
@@ -1277,32 +1044,6 @@
     verify([source]);
   }
 
-  test_constConstructorWithMixinWithField_withoutSuperMixins() async {
-    Source source = addSource(r'''
-class M {
-}
-class A extends Object with M {
-  const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION
-    ]);
-    verify([source]);
-  }
-
-  test_constConstructorWithMixinWithField_withSuperMixins_new_syntax() async {
-    Source source = addSource(r'''
-mixin M {
-}
-class A extends Object with M {
-  const A();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_constConstructorWithNonConstSuper_explicit() async {
     Source source = addSource(r'''
 class A {
@@ -2863,29 +2604,6 @@
     verify([source]);
   }
 
-  test_intLiteralInDoubleContext_const_exact() async {
-    // TODO(mfairhurst): get the commented out assertions to pass.
-    Source source = addSource(r'''
-class C {
-  const C(double x)
-    : assert("$x" == "0.0")
-    , assert(identical(x, 0.0));
-}
-@C(0)
-@C(-0)
-@C(0x0)
-@C(-0x0)
-void main() {
-  const C(0);
-  const C(-0);
-  const C(0x0);
-  const C(-0x0);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_invalidAnnotation_constantVariable_field() async {
     Source source = addSource(r'''
 @A.C
@@ -3450,86 +3168,6 @@
     verify([source]);
   }
 
-  test_invocationOfNonFunction_dynamic() async {
-    Source source = addSource(r'''
-class A {
-  var f;
-}
-class B extends A {
-  g() {
-    f();
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invocationOfNonFunction_functionTypeTypeParameter() async {
-    Source source = addSource(r'''
-typedef void Action<T>(T x);
-class C<T, U extends Action<T>> {
-  T value;
-  U action;
-  C(this.value, [this.action]);
-  void act() {
-    action(value);
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invocationOfNonFunction_getter() async {
-    Source source = addSource(r'''
-class A {
-  var g;
-}
-f() {
-  A a;
-  a.g();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invocationOfNonFunction_localVariable() async {
-    Source source = addSource(r'''
-f() {
-  var g;
-  g();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invocationOfNonFunction_localVariable_dynamic() async {
-    Source source = addSource(r'''
-f() {}
-main() {
-  var v = f;
-  v();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invocationOfNonFunction_Object() async {
-    Source source = addSource(r'''
-main() {
-  Object v = null;
-  v();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    verify([source]);
-  }
-
   Future test_issue32114() async {
     addNamedSource('/a.dart', '''
 class O {}
@@ -4795,15 +4433,6 @@
     verify([source]);
   }
 
-  test_null_callMethod() async {
-    Source source = addSource(r'''
-main() {
-  null.m();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
   test_null_callOperator() async {
     Source source = addSource(r'''
 main() {
@@ -4819,7 +4448,7 @@
   }
 
   test_optionalNew_rewrite() async {
-    resetWith(options: new AnalysisOptionsImpl()..previewDart2 = true);
+    resetWith(options: new AnalysisOptionsImpl());
     Source source = addSource(r'''
 import 'b.dart';
 main() {
@@ -4859,7 +4488,7 @@
   }
 
   test_optionalNew_rewrite_instantiatesToBounds() async {
-    resetWith(options: new AnalysisOptionsImpl()..previewDart2 = true);
+    resetWith(options: new AnalysisOptionsImpl());
     Source source = addSource(r'''
 import 'b.dart';
 
@@ -5156,6 +4785,16 @@
     verify([source]);
   }
 
+  test_regress34906() async {
+    Source source = addSource(r'''
+typedef G<X, Y extends Function(X)> = X Function(Function(Y));
+G<dynamic, Function(Null)> superBoundedG;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
   test_rethrowOutsideCatch() async {
     Source source = addSource(r'''
 class A {
@@ -6078,20 +5717,6 @@
     verify([source]);
   }
 
-  test_unqualifiedReferenceToNonLocalStaticMember_fromComment_new() async {
-    Source source = addSource(r'''
-class A {
-  A() {}
-  A.named() {}
-}
-/// [new A] or [new A.named]
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_unusedShownName_unresolved() async {
     Source source = addSource(r'''
 import 'dart:math' show max, FooBar;
@@ -6437,7 +6062,7 @@
     verify([source]);
   }
 
-  Future<Null> _check_wrongNumberOfParametersForOperator(
+  Future<void> _check_wrongNumberOfParametersForOperator(
       String name, String parameters) async {
     Source source = addSource("""
 class A {
@@ -6448,7 +6073,7 @@
     verify([source]);
   }
 
-  Future<Null> _check_wrongNumberOfParametersForOperator1(String name) async {
+  Future<void> _check_wrongNumberOfParametersForOperator1(String name) async {
     await _check_wrongNumberOfParametersForOperator(name, "a");
   }
 }
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
index b6053b6..f1af9c5 100644
--- a/pkg/analyzer/test/generated/non_hint_code_test.dart
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -26,10 +26,14 @@
 library meta;
 
 const _AlwaysThrows alwaysThrows = const _AlwaysThrows();
+const _Literal literal = const _Literal();
 
 class _AlwaysThrows {
   const _AlwaysThrows();
 }
+class _Literal {
+  const _Literal();
+}
 '''
       ]
     ]);
@@ -269,224 +273,6 @@
     verify([source]);
   }
 
-  test_deprecatedAnnotationUse_namedParameter_inDefiningFunction() async {
-    Source source = addSource(r'''
-f({@deprecated int x}) => x;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_namedParameter_inDefiningLocalFunction() async {
-    Source source = addSource(r'''
-class C {
-  m() {
-    f({@deprecated int x}) {
-      return x;
-    }
-    return f();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_namedParameter_inDefiningMethod() async {
-    Source source = addSource(r'''
-class C {
-  m({@deprecated int x}) {
-    return x;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedAnnotationUse_namedParameter_inNestedLocalFunction() async {
-    Source source = addSource(r'''
-class C {
-  m({@deprecated int x}) {
-    f() {
-      return x;
-    }
-    return f();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedClass() async {
-    Source source = addSource(r'''
-@deprecated
-f() {}
-
-@deprecated
-class C {
-  m() {
-    f();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedField() async {
-    Source source = addSource(r'''
-@deprecated
-class C {}
-
-class X {
-  @deprecated
-  C f;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedFunction() async {
-    Source source = addSource(r'''
-@deprecated
-f() {}
-
-@deprecated
-g() {
-  f();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedLibrary() async {
-    Source source = addSource(r'''
-@deprecated
-library lib;
-
-@deprecated
-f() {}
-
-class C {
-  m() {
-    f();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedMethod() async {
-    Source source = addSource(r'''
-@deprecated
-f() {}
-
-class C {
-  @deprecated
-  m() {
-    f();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedMethod_inDeprecatedClass() async {
-    Source source = addSource(r'''
-@deprecated
-f() {}
-
-@deprecated
-class C {
-  @deprecated
-  m() {
-    f();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedMixin() async {
-    Source source = addSource(r'''
-@deprecated
-f() {}
-
-@deprecated
-mixin M {
-  m() {
-    f();
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_inDeprecatedTopLevelVariable() async {
-    Source source = addSource(r'''
-@deprecated
-class C {}
-
-@deprecated
-C v;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_divisionOptimization() async {
-    Source source = addSource(r'''
-f(int x, int y) {
-  var v = x / y.toInt();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_divisionOptimization_supressIfDivisionNotDefinedInCore() async {
-    Source source = addSource(r'''
-f(x, y) {
-  var v = (x / y).toInt();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_divisionOptimization_supressIfDivisionOverridden() async {
-    Source source = addSource(r'''
-class A {
-  num operator /(x) { return x; }
-}
-f(A x, A y) {
-  var v = (x / y).toInt();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_duplicateImport_as() async {
     Source source = addSource(r'''
 library L;
@@ -684,6 +470,19 @@
     verify([source]);
   }
 
+  test_invalidLiteralAnnotation_constConstructor() async {
+    Source source = addSource(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
   test_overrideOnNonOverridingField_inInterface() async {
     Source source = addSource(r'''
 class A {
@@ -700,14 +499,10 @@
   int c;
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(
-        source,
-        [CompileTimeErrorCode.INVALID_OVERRIDE],
-      );
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(
+      source,
+      [CompileTimeErrorCode.INVALID_OVERRIDE],
+    );
     verify([source]);
   }
 
@@ -727,14 +522,10 @@
   int c;
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(
-        source,
-        [CompileTimeErrorCode.INVALID_OVERRIDE],
-      );
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(
+      source,
+      [CompileTimeErrorCode.INVALID_OVERRIDE],
+    );
     verify([source]);
   }
 
@@ -943,11 +734,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   test_undefinedMethod_assignmentExpression_inSubtype() async {
@@ -975,24 +762,6 @@
     assertNoErrors(source);
   }
 
-  test_undefinedMethod_inSubtype() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  b() {}
-}
-f() {
-  var a = new A();
-  a.b();
-}''');
-    await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
-    } else {
-      assertNoErrors(source);
-    }
-  }
-
   test_undefinedMethod_unionType_all() async {
     Source source = addSource(r'''
 class A {
@@ -1045,11 +814,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   test_undefinedOperator_indexBoth_inSubtype() async {
@@ -1064,11 +829,10 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(source, [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+    ]);
   }
 
   test_undefinedOperator_indexGetter_inSubtype() async {
@@ -1083,11 +847,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   test_undefinedOperator_indexSetter_inSubtype() async {
@@ -1102,11 +862,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
   test_undefinedOperator_postfixExpression() async {
@@ -1151,11 +907,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
-    } else {
-      assertNoErrors(source);
-    }
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
   }
 
   test_unnecessaryCast_13855_parameter_A() async {
@@ -1236,7 +988,7 @@
   (c ? f(): new Future.value(0) as Future<int>).then((int value) {});
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2 && enableNewAnalysisDriver) {
+    if (enableNewAnalysisDriver) {
       assertErrors(source, [HintCode.UNNECESSARY_CAST]);
     } else {
       assertNoErrors(source);
@@ -1535,6 +1287,9 @@
 }
 
 class PubSuggestionCodeTest extends ResolverTestCase {
+  // TODO(brianwilkerson) The tests in this class are not being run, and all but
+  //  the first would fail. We should implement these checks and enable the
+  //  tests.
   test_import_package() async {
     Source source = addSource("import 'package:somepackage/other.dart';");
     await computeAnalysisResult(source);
diff --git a/pkg/analyzer/test/generated/package_test.dart b/pkg/analyzer/test/generated/package_test.dart
deleted file mode 100644
index 1921f63..0000000
--- a/pkg/analyzer/test/generated/package_test.dart
+++ /dev/null
@@ -1,261 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/package.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:package_config/packages.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../src/context/mock_sdk.dart';
-import 'resolver_test_case.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(DependencyFinderTest);
-    defineReflectiveTests(PackageDescriptionTest);
-    defineReflectiveTests(PackageManagerTest);
-  });
-}
-
-/**
- * The name of the pubspec.yaml file.
- */
-const String pubspecName = 'pubspec.yaml';
-
-@reflectiveTest
-class DependencyFinderTest extends ResolverTestCase {
-  void test_transitiveDependenciesFor_circularDependencies() {
-    var pathContext = resourceProvider.pathContext;
-    String packageA = resourceProvider.convertPath('/pub-cache/a-1.0');
-    String packageB = resourceProvider.convertPath('/pub-cache/b-1.0');
-    String packageC = resourceProvider.convertPath('/pub-cache/c-1.0');
-    resourceProvider.newFile(pathContext.join(packageA, pubspecName), '''
-    dependencies:
-      b: any
-    ''');
-    resourceProvider.newFile(pathContext.join(packageB, pubspecName), '''
-    dependencies:
-      c: any
-    ''');
-    resourceProvider.newFile(pathContext.join(packageC, pubspecName), '''
-    dependencies:
-      a: any
-    ''');
-    Map<String, List<Folder>> packageMap = <String, List<Folder>>{
-      'a': <Folder>[resourceProvider.getFolder(packageA)],
-      'b': <Folder>[resourceProvider.getFolder(packageB)],
-      'c': <Folder>[resourceProvider.getFolder(packageC)],
-    };
-
-    DependencyFinder finder = new DependencyFinder(resourceProvider);
-    List<String> result =
-        finder.transitiveDependenciesFor(packageMap, packageA);
-    expect(result, unorderedEquals([packageB, packageC]));
-  }
-
-  void test_transitiveDependenciesFor_missingPubspec() {
-    String packagePath = resourceProvider.convertPath('/pub-cache/a-1.0');
-    Map<String, List<Folder>> packageMap = <String, List<Folder>>{
-      'a': <Folder>[resourceProvider.getFolder(packagePath)]
-    };
-
-    DependencyFinder finder = new DependencyFinder(resourceProvider);
-    expect(() => finder.transitiveDependenciesFor(packageMap, packagePath),
-        throwsA(new TypeMatcher<AnalysisException>()));
-  }
-
-  void test_transitiveDependenciesFor_noDependencies() {
-    var pathContext = resourceProvider.pathContext;
-    String packagePath = resourceProvider.convertPath('/pub-cache/a-1.0');
-    resourceProvider.newFile(pathContext.join(packagePath, pubspecName), '');
-    Map<String, List<Folder>> packageMap = <String, List<Folder>>{
-      'a': <Folder>[resourceProvider.getFolder(packagePath)]
-    };
-
-    DependencyFinder finder = new DependencyFinder(resourceProvider);
-    List<String> result =
-        finder.transitiveDependenciesFor(packageMap, packagePath);
-    expect(result, hasLength(0));
-  }
-
-  void test_transitiveDependenciesFor_overlappingDependencies() {
-    var pathContext = resourceProvider.pathContext;
-    String packageA = resourceProvider.convertPath('/pub-cache/a-1.0');
-    String packageB = resourceProvider.convertPath('/pub-cache/b-1.0');
-    String packageC = resourceProvider.convertPath('/pub-cache/c-1.0');
-    String packageD = resourceProvider.convertPath('/pub-cache/d-1.0');
-    resourceProvider.newFile(pathContext.join(packageA, pubspecName), '''
-    dependencies:
-      b: any
-      c: any
-    ''');
-    resourceProvider.newFile(pathContext.join(packageB, pubspecName), '''
-    dependencies:
-      d: any
-    ''');
-    resourceProvider.newFile(pathContext.join(packageC, pubspecName), '''
-    dependencies:
-      d: any
-    ''');
-    resourceProvider.newFile(pathContext.join(packageD, pubspecName), '');
-    Map<String, List<Folder>> packageMap = <String, List<Folder>>{
-      'a': <Folder>[resourceProvider.getFolder(packageA)],
-      'b': <Folder>[resourceProvider.getFolder(packageB)],
-      'c': <Folder>[resourceProvider.getFolder(packageC)],
-      'd': <Folder>[resourceProvider.getFolder(packageD)],
-    };
-
-    DependencyFinder finder = new DependencyFinder(resourceProvider);
-    List<String> result =
-        finder.transitiveDependenciesFor(packageMap, packageA);
-    expect(result, unorderedEquals([packageB, packageC, packageD]));
-  }
-
-  void test_transitiveDependenciesFor_simpleDependencies() {
-    var pathContext = resourceProvider.pathContext;
-    String packageA = resourceProvider.convertPath('/pub-cache/a-1.0');
-    String packageB = resourceProvider.convertPath('/pub-cache/b-1.0');
-    String packageC = resourceProvider.convertPath('/pub-cache/c-1.0');
-    resourceProvider.newFile(pathContext.join(packageA, pubspecName), '''
-    dependencies:
-      b: any
-      c: any
-    ''');
-    resourceProvider.newFile(pathContext.join(packageB, pubspecName), '');
-    resourceProvider.newFile(pathContext.join(packageC, pubspecName), '');
-    Map<String, List<Folder>> packageMap = <String, List<Folder>>{
-      'a': <Folder>[resourceProvider.getFolder(packageA)],
-      'b': <Folder>[resourceProvider.getFolder(packageB)],
-      'c': <Folder>[resourceProvider.getFolder(packageC)],
-    };
-
-    DependencyFinder finder = new DependencyFinder(resourceProvider);
-    List<String> result =
-        finder.transitiveDependenciesFor(packageMap, packageA);
-    expect(result, unorderedEquals([packageB, packageC]));
-  }
-}
-
-@reflectiveTest
-class PackageDescriptionTest extends ResolverTestCase {
-  void test_equal_false_differentOptions() {
-    String packageId = 'path1;path2';
-    DartSdk sdk = new MockSdk();
-    AnalysisOptionsImpl options1 = new AnalysisOptionsImpl();
-    AnalysisOptionsImpl options2 = new AnalysisOptionsImpl();
-    options2.enableLazyAssignmentOperators =
-        !options1.enableLazyAssignmentOperators;
-    PackageDescription first = new PackageDescription(packageId, sdk, options1);
-    PackageDescription second =
-        new PackageDescription(packageId, sdk, options2);
-    expect(first == second, isFalse);
-  }
-
-  void test_equal_false_differentPaths() {
-    String packageId1 = 'path1;path2';
-    String packageId2 = 'path1;path3';
-    DartSdk sdk = new MockSdk();
-    AnalysisOptions options = new AnalysisOptionsImpl();
-    PackageDescription first = new PackageDescription(packageId1, sdk, options);
-    PackageDescription second =
-        new PackageDescription(packageId2, sdk, options);
-    expect(first == second, isFalse);
-  }
-
-  void test_equal_false_differentSdks() {
-    String packageId = 'path1;path2';
-    DartSdk sdk1 = new MockSdk();
-    DartSdk sdk2 = new MockSdk();
-    AnalysisOptions options = new AnalysisOptionsImpl();
-    PackageDescription first = new PackageDescription(packageId, sdk1, options);
-    PackageDescription second =
-        new PackageDescription(packageId, sdk2, options);
-    expect(first == second, isFalse);
-  }
-
-  void test_equal_true() {
-    String packageId = 'path1;path2';
-    DartSdk sdk = new MockSdk();
-    AnalysisOptions options = new AnalysisOptionsImpl();
-    PackageDescription first = new PackageDescription(packageId, sdk, options);
-    PackageDescription second = new PackageDescription(packageId, sdk, options);
-    expect(first == second, isTrue);
-  }
-}
-
-@reflectiveTest
-class PackageManagerTest extends ResolverTestCase {
-  void test_getContext() {
-    var pathContext = resourceProvider.pathContext;
-    String packageA = resourceProvider.convertPath('/pub-cache/a-1.0');
-    String packageB1 = resourceProvider.convertPath('/pub-cache/b-1.0');
-    String packageB2 = resourceProvider.convertPath('/pub-cache/b-2.0');
-    String packageC = resourceProvider.convertPath('/pub-cache/c-1.0');
-    resourceProvider.newFile(pathContext.join(packageA, pubspecName), '''
-    dependencies:
-      b: any
-      c: any
-    ''');
-    resourceProvider.newFile(pathContext.join(packageB1, pubspecName), '');
-    resourceProvider.newFile(pathContext.join(packageB2, pubspecName), '');
-    resourceProvider.newFile(pathContext.join(packageC, pubspecName), '');
-
-    Packages packages1 = new _MockPackages(<String, Uri>{
-      'a': pathContext.toUri(packageA),
-      'b': pathContext.toUri(packageB1),
-      'c': pathContext.toUri(packageC),
-    });
-    DartUriResolver resolver = new DartUriResolver(new MockSdk());
-    AnalysisOptions options = new AnalysisOptionsImpl();
-    //
-    // Verify that we can compute a context for a package.
-    //
-    PackageManager manager = new PackageManager(resourceProvider);
-    AnalysisContext context1 =
-        manager.getContext(packageA, packages1, resolver, options);
-    expect(context1, isNotNull);
-    //
-    // Verify that if we have the same package map we get the same context.
-    //
-    AnalysisContext context2 =
-        manager.getContext(packageA, packages1, resolver, options);
-    expect(context2, same(context1));
-    //
-    // Verify that if we have a different package map we get a different context.
-    //
-    Packages packages3 = new _MockPackages(<String, Uri>{
-      'a': pathContext.toUri(packageA),
-      'b': pathContext.toUri(packageB2),
-      'c': pathContext.toUri(packageC),
-    });
-    AnalysisContext context3 =
-        manager.getContext(packageA, packages3, resolver, options);
-    expect(context3, isNot(same(context1)));
-  }
-}
-
-/**
- * An implementation of [Packages] used for testing.
- */
-class _MockPackages implements Packages {
-  final Map<String, Uri> map;
-
-  _MockPackages(this.map);
-
-  @override
-  Iterable<String> get packages => map.keys;
-
-  @override
-  Map<String, Uri> asMap() => map;
-
-  @override
-  Uri resolve(Uri packageUri, {Uri notFound(Uri packageUri)}) {
-    fail('Unexpected invocation of resolve');
-  }
-}
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index f692d58..0808c6b 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -201,12 +201,6 @@
   }
 
   @override
-  void beginExpressionStatement(Token token) {
-    super.beginExpressionStatement(token);
-    begin('ExpressionStatement');
-  }
-
-  @override
   void beginFactoryMethod(
       Token lastConsumed, Token externalToken, Token constToken) {
     super.beginFactoryMethod(lastConsumed, externalToken, constToken);
@@ -682,12 +676,6 @@
   }
 
   @override
-  void endExpressionStatement(Token token) {
-    end('ExpressionStatement');
-    super.endExpressionStatement(token);
-  }
-
-  @override
   void endFactoryMethod(
       Token beginToken, Token factoryKeyword, Token endToken) {
     end('FactoryMethod');
@@ -776,9 +764,9 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
+  void endFunctionType(Token functionToken, Token questionMark) {
     end('FunctionType');
-    super.endFunctionType(functionToken);
+    super.endFunctionType(functionToken, questionMark);
   }
 
   @override
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 2e121cc..1f618d1 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,6 +7,7 @@
 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart' show ErrorReporter;
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
@@ -14,9 +15,11 @@
 import 'package:analyzer/src/generated/parser.dart' as analyzer;
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/string_source.dart';
+import 'package:analyzer/src/test_utilities/ast_type_matchers.dart';
+import 'package:front_end/src/fasta/parser/forwarding_listener.dart' as fasta;
+import 'package:front_end/src/fasta/parser/parser.dart' as fasta;
 import 'package:front_end/src/fasta/scanner.dart'
     show ScannerResult, scanString;
-import 'package:front_end/src/fasta/parser/parser.dart' as fasta;
 import 'package:front_end/src/fasta/scanner/error_token.dart' show ErrorToken;
 import 'package:front_end/src/fasta/scanner/string_scanner.dart';
 import 'package:front_end/src/scanner/errors.dart' show translateErrorToken;
@@ -34,6 +37,7 @@
     defineReflectiveTests(ErrorParserTest_Fasta);
     defineReflectiveTests(ExpressionParserTest_Fasta);
     defineReflectiveTests(FormalParameterParserTest_Fasta);
+    defineReflectiveTests(NNBDParserTest_Fasta);
     defineReflectiveTests(RecoveryParserTest_Fasta);
     defineReflectiveTests(SimpleParserTest_Fasta);
     defineReflectiveTests(StatementParserTest_Fasta);
@@ -69,6 +73,7 @@
     // Run parser
     ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
     fasta.Parser parser = new fasta.Parser(null);
+    parser.enableSetLiterals = IsEnabledByDefault.set_literals;
     AstBuilder astBuilder = new AstBuilder(errorReporter, source.uri, true);
     parser.listener = astBuilder;
     astBuilder.parser = parser;
@@ -104,7 +109,64 @@
  */
 @reflectiveTest
 class ComplexParserTest_Fasta extends FastaParserTestCase
-    with ComplexParserTestMixin {}
+    with ComplexParserTestMixin {
+  void test_conditionalExpression_precedence_nullableType_as2() {
+    ExpressionStatement statement = parseStatement('x as bool? ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, isAsExpression);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+    assertErrors(
+        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 9, 1)]);
+  }
+
+  void test_conditionalExpression_precedence_nullableType_as3() {
+    ExpressionStatement statement =
+        parseStatement('(x as bool?) ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, isParenthesizedExpression);
+    expect((condition as ParenthesizedExpression).expression, isAsExpression);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+    assertErrors(
+        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 10, 1)]);
+  }
+
+  void test_conditionalExpression_precedence_nullableType_is2() {
+    ExpressionStatement statement =
+        parseStatement('x is String? ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, isIsExpression);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+    assertErrors(
+        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 11, 1)]);
+  }
+
+  void test_conditionalExpression_precedence_nullableType_is3() {
+    ExpressionStatement statement =
+        parseStatement('(x is String?) ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, isParenthesizedExpression);
+    expect((condition as ParenthesizedExpression).expression, isIsExpression);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+    assertErrors(
+        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 12, 1)]);
+  }
+}
 
 /**
  * Tests of the fasta parser based on [ErrorParserTest].
@@ -144,7 +206,10 @@
   void test_invalidOperatorAfterSuper_constructorInitializer2() {
     parseCompilationUnit('class C { C() : super?.namedConstructor(); }',
         errors: [
-          expectedError(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, 21, 2)
+          expectedError(
+              ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER,
+              21,
+              2)
         ]);
   }
 
@@ -190,13 +255,140 @@
     //   Actual: TokenType:<MINUS_MINUS>
     super.test_parseUnaryExpression_decrement_super_withComment();
   }
+
+  void test_mapLiteral() {
+    MapLiteral map = parseExpression('{3: 6}', parseSetLiterals: true);
+    expect(map.constKeyword, isNull);
+    expect(map.typeArguments, isNull);
+    expect(map.entries, hasLength(1));
+    MapLiteralEntry entry = map.entries[0];
+    IntegerLiteral key = entry.key;
+    expect(key.value, 3);
+    IntegerLiteral value = entry.value;
+    expect(value.value, 6);
+  }
+
+  void test_mapLiteral_const() {
+    MapLiteral map = parseExpression('const {3: 6}', parseSetLiterals: true);
+    expect(map.constKeyword, isNotNull);
+    expect(map.typeArguments, isNull);
+    expect(map.entries, hasLength(1));
+    MapLiteralEntry entry = map.entries[0];
+    IntegerLiteral key = entry.key;
+    expect(key.value, 3);
+    IntegerLiteral value = entry.value;
+    expect(value.value, 6);
+  }
+
+  void test_setLiteral() {
+    SetLiteral set = parseExpression('{3}', parseSetLiterals: true);
+    expect(set.constKeyword, isNull);
+    expect(set.typeArguments, isNull);
+    expect(set.elements, hasLength(1));
+    IntegerLiteral value = set.elements[0];
+    expect(value.value, 3);
+  }
+
+  void test_setLiteral_const() {
+    SetLiteral set = parseExpression('const {3, 6}', parseSetLiterals: true);
+    expect(set.constKeyword, isNotNull);
+    expect(set.typeArguments, isNull);
+    expect(set.elements, hasLength(2));
+    IntegerLiteral value1 = set.elements[0];
+    expect(value1.value, 3);
+    IntegerLiteral value2 = set.elements[1];
+    expect(value2.value, 6);
+  }
+
+  void test_setLiteral_const_typeArgument() {
+    SetLiteral set = parseExpression('const <int>{3}', parseSetLiterals: true);
+    expect(set.constKeyword, isNotNull);
+    expect(set.typeArguments.arguments, hasLength(1));
+    NamedType typeArg = set.typeArguments.arguments[0];
+    expect(typeArg.name.name, 'int');
+    expect(set.elements.length, 1);
+    IntegerLiteral value = set.elements[0];
+    expect(value.value, 3);
+  }
+
+  void test_setLiteral_invalid_map_entry() {
+    parseExpression('<int>{1: 1}', parseSetLiterals: true, errors: [
+      expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1),
+    ]);
+  }
+
+  @failingTest
+  void test_setLiteral_invalid_too_many_type_arguments1() {
+    parseExpression('<int, int, int>{}', parseSetLiterals: true, errors: [
+      // TODO(danrubel): Currently the resolver reports invalid number of
+      // type arguments, but the parser could report this.
+      expectedError(
+          /* ParserErrorCode.EXPECTED_ONE_TYPE_VARIABLE */
+          ParserErrorCode.EXPECTED_TOKEN,
+          15,
+          1),
+    ]);
+  }
+
+  @failingTest
+  void test_setLiteral_invalid_too_many_type_arguments2() {
+    parseExpression('<int, int, int>{1}', parseSetLiterals: true, errors: [
+      // TODO(danrubel): Currently the resolver reports invalid number of
+      // type arguments, but the parser could report this.
+      expectedError(
+          /* ParserErrorCode.EXPECTED_ONE_TYPE_VARIABLE */
+          ParserErrorCode.EXPECTED_TOKEN,
+          15,
+          1),
+    ]);
+  }
+
+  @failingTest
+  void test_setLiteral_invalid_too_many_type_arguments3() {
+    parseExpression('<int, int>{1}', parseSetLiterals: true, errors: [
+      // TODO(danrubel): Currently the resolver reports invalid number of
+      // type arguments, but the parser could report this.
+      expectedError(
+          /* ParserErrorCode.EXPECTED_ONE_TYPE_VARIABLE */
+          ParserErrorCode.EXPECTED_TOKEN,
+          10,
+          1),
+    ]);
+  }
+
+  void test_setLiteral_nested_typeArgument() {
+    SetLiteral set = parseExpression('<Set<int>>{{3}}', parseSetLiterals: true);
+    expect(set.constKeyword, isNull);
+    expect(set.typeArguments.arguments, hasLength(1));
+    NamedType typeArg1 = set.typeArguments.arguments[0];
+    expect(typeArg1.name.name, 'Set');
+    expect(typeArg1.typeArguments.arguments, hasLength(1));
+    NamedType typeArg2 = typeArg1.typeArguments.arguments[0];
+    expect(typeArg2.name.name, 'int');
+    expect(set.elements.length, 1);
+    SetLiteral intSet = set.elements[0];
+    expect(intSet.elements, hasLength(1));
+    IntegerLiteral value = intSet.elements[0];
+    expect(value.value, 3);
+  }
+
+  void test_setLiteral_typeArgument() {
+    SetLiteral set = parseExpression('<int>{3}', parseSetLiterals: true);
+    expect(set.constKeyword, isNull);
+    expect(set.typeArguments.arguments, hasLength(1));
+    NamedType typeArg = set.typeArguments.arguments[0];
+    expect(typeArg.name.name, 'int');
+    expect(set.elements.length, 1);
+    IntegerLiteral value = set.elements[0];
+    expect(value.value, 3);
+  }
 }
 
 /**
  * Implementation of [AbstractParserTestCase] specialized for testing the
  * Fasta parser.
  */
-class FastaParserTestCase extends Object
+class FastaParserTestCase
     with ParserTestHelpers
     implements AbstractParserTestCase {
   static final List<ErrorCode> NO_ERROR_COMPARISON = <ErrorCode>[];
@@ -393,6 +585,7 @@
     // Run parser
     ErrorReporter errorReporter = new ErrorReporter(listener, source);
     fasta.Parser parser = new fasta.Parser(null);
+    parser.enableSetLiterals = IsEnabledByDefault.set_literals;
     AstBuilder astBuilder = new AstBuilder(errorReporter, source.uri, true);
     parser.listener = astBuilder;
     astBuilder.parser = parser;
@@ -446,8 +639,10 @@
   Expression parseExpression(String source,
       {List<ErrorCode> codes,
       List<ExpectedError> errors,
-      int expectedEndOffset}) {
+      int expectedEndOffset,
+      bool parseSetLiterals = false}) {
     createParser(source, expectedEndOffset: expectedEndOffset);
+    _parserProxy.fastaParser.enableSetLiterals = parseSetLiterals;
     Expression result = _parserProxy.parseExpression2();
     assertErrors(codes: codes, errors: errors);
     return result;
@@ -900,6 +1095,15 @@
 @reflectiveTest
 class RecoveryParserTest_Fasta extends FastaParserTestCase
     with RecoveryParserTestMixin {
+  @override
+  void test_equalityExpression_precedence_relational_right() {
+    parseExpression("== is", codes: [
+      ParserErrorCode.EXPECTED_TYPE_NAME,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER
+    ]);
+  }
+
   void test_invalidTypeParameters_super() {
     parseCompilationUnit('class C<X super Y> {}', errors: [
       // TODO(danrubel): Improve recovery.
@@ -916,15 +1120,6 @@
   }
 
   @override
-  void test_equalityExpression_precedence_relational_right() {
-    parseExpression("== is", codes: [
-      ParserErrorCode.EXPECTED_TYPE_NAME,
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.MISSING_IDENTIFIER
-    ]);
-  }
-
-  @override
   void test_relationalExpression_missing_LHS_RHS() {
     parseExpression("is", codes: [
       ParserErrorCode.EXPECTED_TYPE_NAME,
@@ -1288,3 +1483,146 @@
     expectCommentText(declaration.documentationComment, '/// Doc');
   }
 }
+
+/**
+ * Tests of the fasta parser based on [ComplexParserTestMixin].
+ */
+@reflectiveTest
+class NNBDParserTest_Fasta extends FastaParserTestCase {
+  parseNNBDCompilationUnit(String code, {List<ExpectedError> errors}) {
+    createParser('''
+@pragma('analyzer:non-nullable') library nnbd.parser.test;
+$code
+''');
+    _parserProxy.astBuilder.enableNonNullable = true;
+    CompilationUnit unit = _parserProxy.parseCompilationUnit2();
+    assertNoErrors();
+    return unit;
+  }
+
+  void test_assignment_complex() {
+    parseNNBDCompilationUnit('D? foo(X? x) { X? x1; X? x2 = x + bar(7); }');
+  }
+
+  void test_assignment_simple() {
+    parseNNBDCompilationUnit('D? foo(X? x) { X? x1; X? x2 = x; }');
+  }
+
+  void test_gft_nullable() {
+    parseNNBDCompilationUnit('main() { C? Function() x = 7; }');
+  }
+
+  void test_gft_nullable_1() {
+    parseNNBDCompilationUnit('main() { C Function()? x = 7; }');
+  }
+
+  void test_gft_nullable_2() {
+    parseNNBDCompilationUnit('main() { C? Function()? x = 7; }');
+  }
+
+  void test_gft_nullable_3() {
+    parseNNBDCompilationUnit('main() { C? Function()? Function()? x = 7; }');
+  }
+
+  void test_gft_nullable_prefixed() {
+    parseNNBDCompilationUnit('main() { C.a? Function()? x = 7; }');
+  }
+
+  void test_conditional() {
+    parseNNBDCompilationUnit('D? foo(X? x) { X ? 7 : y; }');
+  }
+
+  void test_conditional_complex() {
+    parseNNBDCompilationUnit('D? foo(X? x) { X ? x2 = x + bar(7) : y; }');
+  }
+
+  void test_conditional_simple() {
+    parseNNBDCompilationUnit('D? foo(X? x) { X ? x2 = x : y; }');
+  }
+
+  void test_for() {
+    parseNNBDCompilationUnit('main() { for(int x = 0; x < 7; ++x) { } }');
+  }
+
+  void test_for_conditional() {
+    parseNNBDCompilationUnit(
+        'main() { for(x ? y = 7 : y = 8; y < 10; ++y) { } }');
+  }
+
+  void test_for_nullable() {
+    parseNNBDCompilationUnit('main() { for(int? x = 0; x < 7; ++x) { } }');
+  }
+
+  void test_foreach() {
+    parseNNBDCompilationUnit('main() { for(int x in [7]) { } }');
+  }
+
+  void test_foreach_nullable() {
+    parseNNBDCompilationUnit('main() { for(int? x in [7, null]) { } }');
+  }
+
+  void test_is_nullable() {
+    CompilationUnit unit =
+        parseNNBDCompilationUnit('main() { x is String? ? (x + y) : z; }');
+    FunctionDeclaration function = unit.declarations[0];
+    BlockFunctionBody body = function.functionExpression.body;
+    ExpressionStatement statement = body.block.statements[0];
+    ConditionalExpression expression = statement.expression;
+
+    IsExpression condition = expression.condition;
+    expect((condition.type as NamedType).question, isNotNull);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+  }
+
+  void test_is_nullable_parenthesis() {
+    CompilationUnit unit =
+        parseNNBDCompilationUnit('main() { (x is String?) ? (x + y) : z; }');
+    FunctionDeclaration function = unit.declarations[0];
+    BlockFunctionBody body = function.functionExpression.body;
+    ExpressionStatement statement = body.block.statements[0];
+    ConditionalExpression expression = statement.expression;
+
+    ParenthesizedExpression condition = expression.condition;
+    IsExpression isExpression = condition.expression;
+    expect((isExpression.type as NamedType).question, isNotNull);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+  }
+
+  void test_pragma_missing() {
+    createParser("library foo;");
+    _parserProxy.astBuilder.enableNonNullable = true;
+    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
+    expect(unit.hasPragmaAnalyzerNonNullable, false);
+  }
+
+  void test_pragma_non_nullable() {
+    createParser("@pragma('analyzer:non-nullable') library foo;");
+    _parserProxy.astBuilder.enableNonNullable = true;
+    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
+    expect(unit.hasPragmaAnalyzerNonNullable, true);
+  }
+
+  void test_pragma_non_nullable_not_enabled() {
+    createParser("@pragma('analyzer:non-nullable') library foo;");
+    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
+    expect(unit.hasPragmaAnalyzerNonNullable, false);
+  }
+
+  void test_pragma_other() {
+    createParser("@pragma('analyzer:foo') library foo;");
+    _parserProxy.astBuilder.enableNonNullable = true;
+    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
+    expect(unit.hasPragmaAnalyzerNonNullable, false);
+  }
+
+  void test_enableNonNullable_false() {
+    parseCompilationUnit('main() { x is String? ? (x + y) : z; }',
+        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 20, 1)]);
+  }
+}
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 1f5382c..bab974d 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -24,6 +24,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'package:analyzer/src/test_utilities/ast_type_matchers.dart';
 import 'test_support.dart';
 
 main() {
@@ -251,7 +252,7 @@
  * Instances of the class `AstValidator` are used to validate the correct construction of an
  * AST structure.
  */
-class AstValidator extends UnifyingAstVisitor<Object> {
+class AstValidator extends UnifyingAstVisitor<void> {
   /**
    * A list containing the errors found while traversing the AST structure.
    */
@@ -274,9 +275,9 @@
   }
 
   @override
-  Object visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     _validate(node);
-    return super.visitNode(node);
+    super.visitNode(node);
   }
 
   /**
@@ -335,23 +336,20 @@
 /**
  * Tests which exercise the parser using a class member.
  */
-abstract class ClassMemberParserTestMixin implements AbstractParserTestCase {
+mixin ClassMemberParserTestMixin implements AbstractParserTestCase {
   void test_parseAwaitExpression_asStatement_inAsync() {
     createParser('m() async { await x; }');
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     FunctionBody body = method.body;
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is BlockFunctionBody, BlockFunctionBody, body);
+    expect(body, isBlockFunctionBody);
     Statement statement = (body as BlockFunctionBody).block.statements[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ExpressionStatement, ExpressionStatement, statement);
+    expect(statement, isExpressionStatement);
     Expression expression = (statement as ExpressionStatement).expression;
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is AwaitExpression, AwaitExpression, expression);
+    expect(expression, isAwaitExpression);
     expect((expression as AwaitExpression).awaitKeyword, isNotNull);
     expect((expression as AwaitExpression).expression, isNotNull);
   }
@@ -361,16 +359,12 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     FunctionBody body = method.body;
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is BlockFunctionBody, BlockFunctionBody, body);
+    expect(body, isBlockFunctionBody);
     Statement statement = (body as BlockFunctionBody).block.statements[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is VariableDeclarationStatement,
-        VariableDeclarationStatement,
-        statement);
+    expect(statement, isVariableDeclarationStatement);
   }
 
   void test_parseAwaitExpression_inSync() {
@@ -391,20 +385,15 @@
             expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 29, 1)
           ]);
     FunctionBody body = method.body;
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is BlockFunctionBody, BlockFunctionBody, body);
+    expect(body, isBlockFunctionBody);
     Statement statement = (body as BlockFunctionBody).block.statements[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ReturnStatement, ReturnStatement, statement);
+    expect(statement, isReturnStatement);
     Expression expression = (statement as ReturnStatement).expression;
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is BinaryExpression, BinaryExpression, expression);
+    expect(expression, isBinaryExpression);
     if (!usingFastaParser) {
       // TODO(danrubel): capture `await` keywords in fasta generated AST
-      EngineTestCase.assertInstanceOf((obj) => obj is AwaitExpression,
-          AwaitExpression, (expression as BinaryExpression).leftOperand);
-      EngineTestCase.assertInstanceOf((obj) => obj is AwaitExpression,
-          AwaitExpression, (expression as BinaryExpression).rightOperand);
+      expect((expression as BinaryExpression).leftOperand, isAwaitExpression);
+      expect((expression as BinaryExpression).rightOperand, isAwaitExpression);
     }
   }
 
@@ -421,7 +410,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ConstructorDeclaration>());
+    expect(member, isConstructorDeclaration);
     ConstructorDeclaration constructor = member;
     expect(constructor.body, isNotNull);
     expect(constructor.separator, isNotNull);
@@ -440,7 +429,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNotNull);
     expect(field.documentationComment, isNull);
@@ -459,7 +448,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
@@ -489,9 +478,9 @@
 ''');
     ClassMember member = parser.parseClassMember('C');
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     VariableDeclarationList fields = (member as FieldDeclaration).fields;
-    expect(fields.type, new TypeMatcher<GenericFunctionType>());
+    expect(fields.type, isGenericFunctionType);
   }
 
   void test_parseClassMember_field_gftType_noReturnType() {
@@ -500,9 +489,9 @@
 ''');
     ClassMember member = parser.parseClassMember('C');
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     VariableDeclarationList fields = (member as FieldDeclaration).fields;
-    expect(fields.type, new TypeMatcher<GenericFunctionType>());
+    expect(fields.type, isGenericFunctionType);
   }
 
   void test_parseClassMember_field_instance_prefixedType() {
@@ -510,7 +499,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
@@ -530,7 +519,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
@@ -549,7 +538,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
@@ -568,7 +557,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
@@ -588,7 +577,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
@@ -639,7 +628,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FieldDeclaration>());
+    expect(member, isFieldDeclaration);
     FieldDeclaration field = member;
     expect(field.covariantKeyword, isNull);
     expect(field.documentationComment, isNull);
@@ -658,7 +647,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -676,7 +665,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -695,7 +684,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNotNull);
@@ -719,7 +708,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.body, isNotNull);
     expect(method.documentationComment, isNull);
@@ -738,7 +727,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -757,7 +746,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -783,7 +772,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -802,7 +791,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -825,7 +814,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -855,7 +844,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -875,7 +864,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -894,7 +883,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -913,7 +902,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -932,7 +921,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -951,7 +940,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -971,9 +960,8 @@
 ''');
     ClassMember member = parser.parseClassMember('C');
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
-    expect((member as MethodDeclaration).body,
-        new TypeMatcher<ExpressionFunctionBody>());
+    expect(member, isMethodDeclaration);
+    expect((member as MethodDeclaration).body, isExpressionFunctionBody);
   }
 
   void test_parseClassMember_method_gftReturnType_voidReturnType() {
@@ -982,9 +970,8 @@
 ''');
     ClassMember member = parser.parseClassMember('C');
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
-    expect((member as MethodDeclaration).body,
-        new TypeMatcher<ExpressionFunctionBody>());
+    expect(member, isMethodDeclaration);
+    expect((member as MethodDeclaration).body, isExpressionFunctionBody);
   }
 
   void test_parseClassMember_method_native_allowed() {
@@ -1066,7 +1053,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1085,7 +1072,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1104,7 +1091,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1123,7 +1110,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1143,7 +1130,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1162,7 +1149,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1181,7 +1168,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1200,7 +1187,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1219,7 +1206,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1272,7 +1259,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1291,21 +1278,21 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
     expect(method.modifierKeyword, isNull);
     expect(method.propertyKeyword, isNull);
-    expect(method.returnType, new TypeMatcher<GenericFunctionType>());
+    expect(method.returnType, isGenericFunctionType);
     expect(method.name, isNotNull);
     expect(method.operatorKeyword, isNotNull);
     expect(method.typeParameters, isNull);
     expect(method.parameters, isNotNull);
     NodeList<FormalParameter> parameters = method.parameters.parameters;
     expect(parameters, hasLength(1));
-    expect((parameters[0] as SimpleFormalParameter).type,
-        new TypeMatcher<GenericFunctionType>());
+    expect(
+        (parameters[0] as SimpleFormalParameter).type, isGenericFunctionType);
     expect(method.body, isNotNull);
   }
 
@@ -1314,7 +1301,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1333,7 +1320,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1352,7 +1339,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
@@ -1386,7 +1373,7 @@
     expect(constructor.redirectedConstructor.type.name.name, 'prefix.B');
     expect(constructor.redirectedConstructor.period.type, TokenType.PERIOD);
     expect(constructor.redirectedConstructor.name.name, 'foo');
-    expect(constructor.body, new TypeMatcher<EmptyFunctionBody>());
+    expect(constructor.body, isEmptyFunctionBody);
   }
 
   void test_parseClassMember_redirectingFactory_expressionBody() {
@@ -1419,7 +1406,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ConstructorDeclaration>());
+    expect(member, isConstructorDeclaration);
     ConstructorDeclaration constructor = member;
     expect(constructor.externalKeyword, isNull);
     expect(constructor.constKeyword, isNull);
@@ -1436,7 +1423,7 @@
     expect(constructor.redirectedConstructor.type.name.name, 'B');
     expect(constructor.redirectedConstructor.period, isNull);
     expect(constructor.redirectedConstructor.name, isNull);
-    expect(constructor.body, new TypeMatcher<EmptyFunctionBody>());
+    expect(constructor.body, isEmptyFunctionBody);
   }
 
   void test_parseConstructor_assert() {
@@ -1444,12 +1431,12 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ConstructorDeclaration>());
+    expect(member, isConstructorDeclaration);
     ConstructorDeclaration constructor = member as ConstructorDeclaration;
     NodeList<ConstructorInitializer> initializers = constructor.initializers;
     expect(initializers, hasLength(3));
     ConstructorInitializer initializer = initializers[1];
-    expect(initializer, new TypeMatcher<AssertInitializer>());
+    expect(initializer, isAssertInitializer);
     AssertInitializer assertInitializer = initializer;
     expect(assertInitializer.condition, isNotNull);
     expect(assertInitializer.message, isNull);
@@ -1483,7 +1470,7 @@
     expect(constructor.separator, isNull);
     expect(constructor.initializers, isEmpty);
     expect(constructor.redirectedConstructor, isNull);
-    expect(constructor.body, new TypeMatcher<ExpressionFunctionBody>());
+    expect(constructor.body, isExpressionFunctionBody);
   }
 
   void test_parseConstructor_initializers_field() {
@@ -1491,7 +1478,7 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ConstructorDeclaration>());
+    expect(member, isConstructorDeclaration);
     ConstructorDeclaration constructor = member as ConstructorDeclaration;
     NodeList<ConstructorInitializer> initializers = constructor.initializers;
     expect(initializers, hasLength(2));
@@ -1531,7 +1518,7 @@
     expect(constructor.separator, isNull);
     expect(constructor.initializers, isEmpty);
     expect(constructor.redirectedConstructor, isNull);
-    expect(constructor.body, new TypeMatcher<EmptyFunctionBody>());
+    expect(constructor.body, isEmptyFunctionBody);
   }
 
   void test_parseConstructor_unnamed() {
@@ -1551,7 +1538,7 @@
     expect(constructor.separator, isNull);
     expect(constructor.initializers, isEmpty);
     expect(constructor.redirectedConstructor, isNull);
-    expect(constructor.body, new TypeMatcher<EmptyFunctionBody>());
+    expect(constructor.body, isEmptyFunctionBody);
   }
 
   void test_parseConstructor_with_pseudo_function_literal() {
@@ -1561,19 +1548,15 @@
     ClassMember member = parser.parseClassMember('C');
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ConstructorDeclaration>());
+    expect(member, isConstructorDeclaration);
     ConstructorDeclaration constructor = member as ConstructorDeclaration;
     NodeList<ConstructorInitializer> initializers = constructor.initializers;
     expect(initializers, hasLength(1));
     ConstructorInitializer initializer = initializers[0];
-    EngineTestCase.assertInstanceOf((obj) => obj is ConstructorFieldInitializer,
-        ConstructorFieldInitializer, initializer);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ParenthesizedExpression,
-        ParenthesizedExpression,
-        (initializer as ConstructorFieldInitializer).expression);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is BlockFunctionBody, BlockFunctionBody, constructor.body);
+    expect(initializer, isConstructorFieldInitializer);
+    expect((initializer as ConstructorFieldInitializer).expression,
+        isParenthesizedExpression);
+    expect(constructor.body, isBlockFunctionBody);
   }
 
   void test_parseConstructorFieldInitializer_qualified() {
@@ -1771,43 +1754,36 @@
  *
  * Simpler tests should be defined in the class [SimpleParserTest].
  */
-abstract class ComplexParserTestMixin implements AbstractParserTestCase {
+mixin ComplexParserTestMixin implements AbstractParserTestCase {
   void test_additiveExpression_normal() {
     BinaryExpression expression = parseExpression("x + y - z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_additiveExpression_noSpaces() {
     BinaryExpression expression = parseExpression("i+1");
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
-    EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral,
-        IntegerLiteral, expression.rightOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
+    expect(expression.rightOperand, isIntegerLiteral);
   }
 
   void test_additiveExpression_precedence_multiplicative_left() {
     BinaryExpression expression = parseExpression("x * y + z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_additiveExpression_precedence_multiplicative_left_withSuper() {
     BinaryExpression expression = parseExpression("super * y - z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_additiveExpression_precedence_multiplicative_right() {
     BinaryExpression expression = parseExpression("x + y * z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_additiveExpression_super() {
     BinaryExpression expression = parseExpression("super + y - z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_assignableExpression_arguments_normal_chain() {
@@ -1816,10 +1792,7 @@
     //
     // a(b)(c).d(e)
     //
-    MethodInvocation invocation2 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation,
-        MethodInvocation,
-        propertyAccess1.target);
+    MethodInvocation invocation2 = propertyAccess1.target;
     expect(invocation2.methodName.name, "d");
     expect(invocation2.typeArguments, isNull);
     ArgumentList argumentList2 = invocation2.argumentList;
@@ -1828,10 +1801,7 @@
     //
     // a(b)(c)
     //
-    FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionExpressionInvocation,
-        FunctionExpressionInvocation,
-        invocation2.target);
+    FunctionExpressionInvocation invocation3 = invocation2.target;
     expect(invocation3.typeArguments, isNull);
     ArgumentList argumentList3 = invocation3.argumentList;
     expect(argumentList3, isNotNull);
@@ -1839,10 +1809,7 @@
     //
     // a(b)
     //
-    MethodInvocation invocation4 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation,
-        MethodInvocation,
-        invocation3.function);
+    MethodInvocation invocation4 = invocation3.function;
     expect(invocation4.methodName.name, "a");
     expect(invocation4.typeArguments, isNull);
     ArgumentList argumentList4 = invocation4.argumentList;
@@ -1857,106 +1824,86 @@
 
   void test_assignmentExpression_compound() {
     AssignmentExpression expression = parseExpression("x = y = 0");
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftHandSide);
-    EngineTestCase.assertInstanceOf((obj) => obj is AssignmentExpression,
-        AssignmentExpression, expression.rightHandSide);
+    expect(expression.leftHandSide, isSimpleIdentifier);
+    expect(expression.rightHandSide, isAssignmentExpression);
   }
 
   void test_assignmentExpression_indexExpression() {
     AssignmentExpression expression = parseExpression("x[1] = 0");
-    EngineTestCase.assertInstanceOf((obj) => obj is IndexExpression,
-        IndexExpression, expression.leftHandSide);
-    EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral,
-        IntegerLiteral, expression.rightHandSide);
+    expect(expression.leftHandSide, isIndexExpression);
+    expect(expression.rightHandSide, isIntegerLiteral);
   }
 
   void test_assignmentExpression_prefixedIdentifier() {
     AssignmentExpression expression = parseExpression("x.y = 0");
-    EngineTestCase.assertInstanceOf((obj) => obj is PrefixedIdentifier,
-        PrefixedIdentifier, expression.leftHandSide);
-    EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral,
-        IntegerLiteral, expression.rightHandSide);
+    expect(expression.leftHandSide, isPrefixedIdentifier);
+    expect(expression.rightHandSide, isIntegerLiteral);
   }
 
   void test_assignmentExpression_propertyAccess() {
     AssignmentExpression expression = parseExpression("super.y = 0");
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyAccess,
-        PropertyAccess, expression.leftHandSide);
-    EngineTestCase.assertInstanceOf((obj) => obj is IntegerLiteral,
-        IntegerLiteral, expression.rightHandSide);
+    expect(expression.leftHandSide, isPropertyAccess);
+    expect(expression.rightHandSide, isIntegerLiteral);
   }
 
   void test_bitwiseAndExpression_normal() {
     BinaryExpression expression = parseExpression("x & y & z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseAndExpression_precedence_equality_left() {
     BinaryExpression expression = parseExpression("x == y && z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseAndExpression_precedence_equality_right() {
     BinaryExpression expression = parseExpression("x && y == z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_bitwiseAndExpression_super() {
     BinaryExpression expression = parseExpression("super & y & z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseOrExpression_normal() {
     BinaryExpression expression = parseExpression("x | y | z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseOrExpression_precedence_xor_left() {
     BinaryExpression expression = parseExpression("x ^ y | z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseOrExpression_precedence_xor_right() {
     BinaryExpression expression = parseExpression("x | y ^ z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_bitwiseOrExpression_super() {
     BinaryExpression expression = parseExpression("super | y | z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseXorExpression_normal() {
     BinaryExpression expression = parseExpression("x ^ y ^ z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseXorExpression_precedence_and_left() {
     BinaryExpression expression = parseExpression("x & y ^ z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseXorExpression_precedence_and_right() {
     BinaryExpression expression = parseExpression("x ^ y & z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_bitwiseXorExpression_super() {
     BinaryExpression expression = parseExpression("super ^ y ^ z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_cascade_withAssignment() {
@@ -1964,11 +1911,9 @@
         parseExpression("new Map()..[3] = 4 ..[0] = 11");
     Expression target = cascade.target;
     for (Expression section in cascade.cascadeSections) {
-      EngineTestCase.assertInstanceOf(
-          (obj) => obj is AssignmentExpression, AssignmentExpression, section);
+      expect(section, isAssignmentExpression);
       Expression lhs = (section as AssignmentExpression).leftHandSide;
-      EngineTestCase.assertInstanceOf(
-          (obj) => obj is IndexExpression, IndexExpression, lhs);
+      expect(lhs, isIndexExpression);
       IndexExpression index = lhs as IndexExpression;
       expect(index.isCascaded, isTrue);
       expect(index.realTarget, same(target));
@@ -1977,39 +1922,110 @@
 
   void test_conditionalExpression_precedence_ifNullExpression() {
     ConditionalExpression expression = parseExpression('a ?? b ? y : z');
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.condition);
+    expect(expression.condition, isBinaryExpression);
   }
 
   void test_conditionalExpression_precedence_logicalOrExpression() {
     ConditionalExpression expression = parseExpression("a | b ? y : z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.condition);
+    expect(expression.condition, isBinaryExpression);
   }
 
-  void test_conditionalExpression_precedence_nullableType_as() {
-    Expression expression = parseExpression('x as String ? (x + y) : z');
-    expect(expression, isNotNull);
-    expect(expression, new TypeMatcher<ConditionalExpression>());
-    ConditionalExpression conditional = expression;
-    Expression condition = conditional.condition;
-    expect(condition, new TypeMatcher<AsExpression>());
-    Expression thenExpression = conditional.thenExpression;
+  void test_conditionalExpression_precedence_withAssignment() {
+    ExpressionStatement statement = parseStatement('b ? c = true : g();');
+    ConditionalExpression expression = statement.expression;
+    expect(expression.condition, new TypeMatcher<SimpleIdentifier>());
+    expect(expression.thenExpression, new TypeMatcher<AssignmentExpression>());
+  }
+
+  void test_conditionalExpression_precedence_withAssignment2() {
+    ExpressionStatement statement = parseStatement('b.x ? c = true : g();');
+    ConditionalExpression expression = statement.expression;
+    expect(expression.condition, new TypeMatcher<PrefixedIdentifier>());
+    expect(expression.thenExpression, new TypeMatcher<AssignmentExpression>());
+  }
+
+  void test_conditionalExpression_prefixedValue() {
+    ExpressionStatement statement = parseStatement('a.b ? y : z;');
+    ConditionalExpression expression = statement.expression;
+    expect(expression.condition, new TypeMatcher<PrefixedIdentifier>());
+    expect(expression.thenExpression, new TypeMatcher<SimpleIdentifier>());
+  }
+
+  void test_conditionalExpression_prefixedValue2() {
+    ExpressionStatement statement = parseStatement('a.b ? x.y : z;');
+    ConditionalExpression expression = statement.expression;
+    expect(expression.condition, new TypeMatcher<PrefixedIdentifier>());
+    expect(expression.thenExpression, new TypeMatcher<PrefixedIdentifier>());
+  }
+
+  void test_conditionalExpression_precedence_prefixedNullableType_is() {
+    ExpressionStatement statement = parseStatement('x is p.A ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+
+    Expression condition = expression.condition;
+    expect(condition, new TypeMatcher<IsExpression>());
+    Expression thenExpression = expression.thenExpression;
     expect(thenExpression, new TypeMatcher<ParenthesizedExpression>());
-    Expression elseExpression = conditional.elseExpression;
+    Expression elseExpression = expression.elseExpression;
     expect(elseExpression, new TypeMatcher<SimpleIdentifier>());
   }
 
+  void test_conditionalExpression_precedence_nullableType_as() {
+    ExpressionStatement statement = parseStatement('x as bool ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, isAsExpression);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+  }
+
   void test_conditionalExpression_precedence_nullableType_is() {
-    Expression expression = parseExpression('x is String ? (x + y) : z');
-    expect(expression, isNotNull);
-    expect(expression, new TypeMatcher<ConditionalExpression>());
-    ConditionalExpression conditional = expression;
-    Expression condition = conditional.condition;
+    ExpressionStatement statement =
+        parseStatement('x is String ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, isIsExpression);
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, isParenthesizedExpression);
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, isSimpleIdentifier);
+  }
+
+  void test_conditionalExpression_precedence_nullableTypeWithTypeArg1_is() {
+    ExpressionStatement statement =
+        parseStatement('x is String<S> ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
     expect(condition, new TypeMatcher<IsExpression>());
-    Expression thenExpression = conditional.thenExpression;
+    Expression thenExpression = expression.thenExpression;
     expect(thenExpression, new TypeMatcher<ParenthesizedExpression>());
-    Expression elseExpression = conditional.elseExpression;
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, new TypeMatcher<SimpleIdentifier>());
+  }
+
+  void test_conditionalExpression_precedence_nullableTypeWithTypeArg1GFT_is() {
+    ExpressionStatement statement =
+        parseStatement('x is String<S> Function() ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, new TypeMatcher<IsExpression>());
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, new TypeMatcher<ParenthesizedExpression>());
+    Expression elseExpression = expression.elseExpression;
+    expect(elseExpression, new TypeMatcher<SimpleIdentifier>());
+  }
+
+  void test_conditionalExpression_precedence_nullableTypeWithTypeArg2_is() {
+    ExpressionStatement statement =
+        parseStatement('x is String<S,T> ? (x + y) : z;');
+    ConditionalExpression expression = statement.expression;
+    Expression condition = expression.condition;
+    expect(condition, new TypeMatcher<IsExpression>());
+    Expression thenExpression = expression.thenExpression;
+    expect(thenExpression, new TypeMatcher<ParenthesizedExpression>());
+    Expression elseExpression = expression.elseExpression;
     expect(elseExpression, new TypeMatcher<SimpleIdentifier>());
   }
 
@@ -2027,83 +2043,75 @@
   void test_equalityExpression_normal() {
     BinaryExpression expression = parseExpression("x == y != z",
         codes: [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_equalityExpression_precedence_relational_left() {
     BinaryExpression expression = parseExpression("x is y == z");
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is IsExpression, IsExpression, expression.leftOperand);
+    expect(expression.leftOperand, isIsExpression);
   }
 
   void test_equalityExpression_precedence_relational_right() {
     BinaryExpression expression = parseExpression("x == y is z");
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is IsExpression, IsExpression, expression.rightOperand);
+    expect(expression.rightOperand, isIsExpression);
   }
 
   void test_equalityExpression_super() {
     BinaryExpression expression = parseExpression("super == y != z",
         codes: [ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_ifNullExpression() {
     BinaryExpression expression = parseExpression('x ?? y ?? z');
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_ifNullExpression_precedence_logicalOr_left() {
     BinaryExpression expression = parseExpression('x || y ?? z');
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_ifNullExpression_precedence_logicalOr_right() {
     BinaryExpression expression = parseExpression('x ?? y || z');
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_logicalAndExpression() {
     BinaryExpression expression = parseExpression("x && y && z");
-    expect(expression.leftOperand, new TypeMatcher<BinaryExpression>());
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_logicalAndExpression_precedence_bitwiseOr_left() {
     BinaryExpression expression = parseExpression("x | y < z");
-    expect(expression.leftOperand, new TypeMatcher<BinaryExpression>());
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_logicalAndExpression_precedence_bitwiseOr_right() {
     BinaryExpression expression = parseExpression("x < y | z");
-    expect(expression.rightOperand, new TypeMatcher<BinaryExpression>());
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_logicalAndExpressionStatement() {
     // Assert that `<` and `>` are not interpreted as type arguments.
     ExpressionStatement statement = parseStatement("C<T && T>U;");
     BinaryExpression expression = statement.expression;
-    expect(expression.leftOperand, new TypeMatcher<BinaryExpression>());
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_logicalOrExpression() {
     BinaryExpression expression = parseExpression("x || y || z");
-    expect(expression.leftOperand, new TypeMatcher<BinaryExpression>());
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_logicalOrExpression_precedence_logicalAnd_left() {
     BinaryExpression expression = parseExpression("x && y || z");
-    expect(expression.leftOperand, new TypeMatcher<BinaryExpression>());
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_logicalOrExpression_precedence_logicalAnd_right() {
     BinaryExpression expression = parseExpression("x || y && z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_methodInvocation1() {
@@ -2133,62 +2141,52 @@
   void test_multipleLabels_statement() {
     LabeledStatement statement = parseStatement("a: b: c: return x;");
     expect(statement.labels, hasLength(3));
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ReturnStatement, ReturnStatement, statement.statement);
+    expect(statement.statement, isReturnStatement);
   }
 
   void test_multiplicativeExpression_normal() {
     BinaryExpression expression = parseExpression("x * y / z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_multiplicativeExpression_precedence_unary_left() {
     BinaryExpression expression = parseExpression("-x * y");
-    EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression,
-        PrefixExpression, expression.leftOperand);
+    expect(expression.leftOperand, isPrefixExpression);
   }
 
   void test_multiplicativeExpression_precedence_unary_right() {
     BinaryExpression expression = parseExpression("x * -y");
-    EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression,
-        PrefixExpression, expression.rightOperand);
+    expect(expression.rightOperand, isPrefixExpression);
   }
 
   void test_multiplicativeExpression_super() {
     BinaryExpression expression = parseExpression("super * y / z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_relationalExpression_precedence_shift_right() {
     IsExpression expression = parseExpression("x << y is z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.expression);
+    expect(expression.expression, isBinaryExpression);
   }
 
   void test_shiftExpression_normal() {
     BinaryExpression expression = parseExpression("x >> 4 << 3");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_shiftExpression_precedence_additive_left() {
     BinaryExpression expression = parseExpression("x + y << z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_shiftExpression_precedence_additive_right() {
     BinaryExpression expression = parseExpression("x << y + z");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_shiftExpression_super() {
     BinaryExpression expression = parseExpression("super >> 4 << 3");
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_topLevelFunction_nestedGenericFunction() {
@@ -2208,10 +2206,7 @@
     //
     // a<E>(b)<F>(c).d<G>(e)
     //
-    MethodInvocation invocation2 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation,
-        MethodInvocation,
-        propertyAccess1.target);
+    MethodInvocation invocation2 = propertyAccess1.target;
     expect(invocation2.methodName.name, "d");
     expect(invocation2.typeArguments, isNotNull);
     ArgumentList argumentList2 = invocation2.argumentList;
@@ -2220,10 +2215,7 @@
     //
     // a<E>(b)<F>(c)
     //
-    FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionExpressionInvocation,
-        FunctionExpressionInvocation,
-        invocation2.target);
+    FunctionExpressionInvocation invocation3 = invocation2.target;
     expect(invocation3.typeArguments, isNotNull);
     ArgumentList argumentList3 = invocation3.argumentList;
     expect(argumentList3, isNotNull);
@@ -2231,10 +2223,7 @@
     //
     // a(b)
     //
-    MethodInvocation invocation4 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation,
-        MethodInvocation,
-        invocation3.function);
+    MethodInvocation invocation4 = invocation3.function;
     expect(invocation4.methodName.name, "a");
     expect(invocation4.typeArguments, isNotNull);
     ArgumentList argumentList4 = invocation4.argumentList;
@@ -2260,7 +2249,7 @@
   }
 }
 
-abstract class ErrorParserTestMixin implements AbstractParserTestCase {
+mixin ErrorParserTestMixin implements AbstractParserTestCase {
   void test_abstractClassMember_constructor() {
     createParser('abstract C.c();');
     ClassMember member = parser.parseClassMember('C');
@@ -3890,6 +3879,41 @@
     ]);
   }
 
+  void test_invalidConstructorSuperAssignment() {
+    createParser("C() : super = 42;");
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrors(usingFastaParser
+        ? [expectedError(ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR, 6, 5)]
+        : [
+            expectedError(ParserErrorCode.EXPECTED_TOKEN, 14, 1),
+            expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 16, 2),
+            expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 16, 2),
+            expectedError(
+                ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, 16, 0),
+          ]);
+  }
+
+  void test_invalidConstructorSuperFieldAssignment() {
+    createParser("C() : super.a = 42;");
+    ClassMember member = parser.parseClassMember('C');
+    expectNotNullIfNoErrors(member);
+    listener.assertErrors(usingFastaParser
+        ? [
+            expectedError(
+                ParserErrorCode.FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS,
+                12,
+                1)
+          ]
+        : [
+            expectedError(ParserErrorCode.EXPECTED_TOKEN, 14, 1),
+            expectedError(ParserErrorCode.EXPECTED_TYPE_NAME, 16, 2),
+            expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 16, 2),
+            expectedError(
+                ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR, 16, 0),
+          ]);
+  }
+
   void test_invalidHexEscape_invalidDigit() {
     StringLiteral literal = parseExpression("'not \\x0 a'",
         errors: [expectedError(ParserErrorCode.INVALID_HEX_ESCAPE, 5, 3)]);
@@ -3969,13 +3993,24 @@
   void test_invalidOperatorAfterSuper_assignableExpression() {
     Expression expression = parseAssignableExpression('super?.v', false);
     expectNotNullIfNoErrors(expression);
-    listener.assertErrors(
-        [expectedError(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, 5, 2)]);
+    listener.assertErrors([
+      expectedError(
+          usingFastaParser
+              ? ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
+              : ParserErrorCode.INVALID_OPERATOR_FOR_SUPER,
+          5,
+          2)
+    ]);
   }
 
   void test_invalidOperatorAfterSuper_primaryExpression() {
     Expression expression = parseExpression('super?.v', errors: [
-      expectedError(ParserErrorCode.INVALID_OPERATOR_FOR_SUPER, 5, 2)
+      expectedError(
+          usingFastaParser
+              ? ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
+              : ParserErrorCode.INVALID_OPERATOR_FOR_SUPER,
+          5,
+          2)
     ]);
     expectNotNullIfNoErrors(expression);
   }
@@ -4213,7 +4248,7 @@
             expectedError(ParserErrorCode.EXPECTED_TOKEN, 0, 0), // close paren
             expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 0, 0)
           ]);
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(
         method.parameters.toString(), usingFastaParser ? '(E)' : '(E, extends)',
@@ -4233,7 +4268,7 @@
             expectedError(ParserErrorCode.EXPECTED_TOKEN, 0, 0) /*)*/,
             expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 0, 0)
           ]);
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.typeParameters.toString(), '<E, hello>',
         reason: 'parser recovers what it can');
@@ -4267,7 +4302,7 @@
     BlockFunctionBody blockBody = declaration.functionExpression.body;
     ExpressionStatement statement = (blockBody).block.statements.first;
     Expression expression = (statement).expression;
-    expect(expression, new TypeMatcher<SuperExpression>());
+    expect(expression, isSuperExpression);
     SuperExpression superExpression = expression;
     expect(superExpression.superKeyword, isNotNull);
   }
@@ -4537,7 +4572,7 @@
       expectedError(ParserErrorCode.MISSING_METHOD_PARAMETERS,
           usingFastaParser ? 5 : 7, 1)
     ]);
-    expect(member, new TypeMatcher<MethodDeclaration>());
+    expect(member, isMethodDeclaration);
     MethodDeclaration method = member;
     expect(method.parameters, hasLength(0));
   }
@@ -4794,14 +4829,14 @@
       expression = parser.parsePrimaryExpression();
       listener.assertErrors(
           [expectedError(ParserErrorCode.NAMED_FUNCTION_EXPRESSION, 0, 1)]);
-      expect(expression, new TypeMatcher<FunctionExpression>());
+      expect(expression, isFunctionExpression);
     } else {
       expression = parsePrimaryExpression('f() {}');
       expectNotNullIfNoErrors(expression);
       // Should generate an error.
       //listener.assertErrors(
       //    [expectedError(ParserErrorCode.NAMED_FUNCTION_EXPRESSION, 0, 1)]);
-      //expect(expression, new TypeMatcher<FunctionExpression>());
+      //expect(expression, isFunctionExpression);
     }
   }
 
@@ -5225,7 +5260,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expectNotNullIfNoErrors(member);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration function = member;
     expect(function.functionExpression.parameters, isNull);
   }
@@ -5698,7 +5733,7 @@
 class ExpressionParserTest extends ParserTestCase
     with ExpressionParserTestMixin {}
 
-abstract class ExpressionParserTestMixin implements AbstractParserTestCase {
+mixin ExpressionParserTestMixin implements AbstractParserTestCase {
   void test_namedArgument() {
     var invocation = parseExpression('m(a: 1, b: 2)') as MethodInvocation;
     List<Expression> arguments = invocation.argumentList.arguments;
@@ -5728,7 +5763,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var binaryExpression = expression as BinaryExpression;
-    expect(binaryExpression.leftOperand, new TypeMatcher<SuperExpression>());
+    expect(binaryExpression.leftOperand, isSuperExpression);
     expect(binaryExpression.operator, isNotNull);
     expect(binaryExpression.operator.type, TokenType.PLUS);
     expect(binaryExpression.rightOperand, isNotNull);
@@ -5872,8 +5907,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var propertyAccess = expression as PropertyAccess;
-    EngineTestCase.assertInstanceOf((obj) => obj is SuperExpression,
-        SuperExpression, propertyAccess.target);
+    expect(propertyAccess.target, isSuperExpression);
     expect(propertyAccess.operator, isNotNull);
     expect(propertyAccess.propertyName, isNotNull);
   }
@@ -5883,7 +5917,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var indexExpression = expression as IndexExpression;
-    expect(indexExpression.target, new TypeMatcher<SuperExpression>());
+    expect(indexExpression.target, isSuperExpression);
     expect(indexExpression.leftBracket, isNotNull);
     expect(indexExpression.index, isNotNull);
     expect(indexExpression.rightBracket, isNotNull);
@@ -5949,7 +5983,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var binaryExpression = expression as BinaryExpression;
-    expect(binaryExpression.leftOperand, new TypeMatcher<SuperExpression>());
+    expect(binaryExpression.leftOperand, isSuperExpression);
     expect(binaryExpression.operator, isNotNull);
     expect(binaryExpression.operator.type, TokenType.AMPERSAND);
     expect(binaryExpression.rightOperand, isNotNull);
@@ -5971,7 +6005,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var binaryExpression = expression as BinaryExpression;
-    expect(binaryExpression.leftOperand, new TypeMatcher<SuperExpression>());
+    expect(binaryExpression.leftOperand, isSuperExpression);
     expect(binaryExpression.operator, isNotNull);
     expect(binaryExpression.operator.type, TokenType.BAR);
     expect(binaryExpression.rightOperand, isNotNull);
@@ -5993,7 +6027,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var binaryExpression = expression as BinaryExpression;
-    expect(binaryExpression.leftOperand, new TypeMatcher<SuperExpression>());
+    expect(binaryExpression.leftOperand, isSuperExpression);
     expect(binaryExpression.operator, isNotNull);
     expect(binaryExpression.operator.type, TokenType.CARET);
     expect(binaryExpression.rightOperand, isNotNull);
@@ -6015,7 +6049,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as FunctionExpressionInvocation;
-    expect(section.function, new TypeMatcher<IndexExpression>());
+    expect(section.function, isIndexExpression);
     expect(section.typeArguments, isNull);
     expect(section.argumentList, isNotNull);
   }
@@ -6025,7 +6059,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as FunctionExpressionInvocation;
-    expect(section.function, new TypeMatcher<IndexExpression>());
+    expect(section.function, isIndexExpression);
     expect(section.typeArguments, isNotNull);
     expect(section.argumentList, isNotNull);
   }
@@ -6035,7 +6069,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as MethodInvocation;
-    expect(section.target, new TypeMatcher<MethodInvocation>());
+    expect(section.target, isMethodInvocation);
     expect(section.operator, isNotNull);
     expect(section.methodName, isNotNull);
     expect(section.typeArguments, isNull);
@@ -6048,7 +6082,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as MethodInvocation;
-    expect(section.target, new TypeMatcher<MethodInvocation>());
+    expect(section.target, isMethodInvocation);
     expect(section.operator, isNotNull);
     expect(section.methodName, isNotNull);
     expect(section.typeArguments, isNotNull);
@@ -6085,8 +6119,7 @@
     expect(section.leftHandSide, isNotNull);
     expect(section.operator, isNotNull);
     Expression rhs = section.rightHandSide;
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is IntegerLiteral, IntegerLiteral, rhs);
+    expect(rhs, isIntegerLiteral);
   }
 
   void test_parseCascadeSection_p_assign_withCascade_typeArguments() {
@@ -6097,8 +6130,7 @@
     expect(section.leftHandSide, isNotNull);
     expect(section.operator, isNotNull);
     Expression rhs = section.rightHandSide;
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is IntegerLiteral, IntegerLiteral, rhs);
+    expect(rhs, isIntegerLiteral);
   }
 
   void test_parseCascadeSection_p_builtIn() {
@@ -6142,7 +6174,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as FunctionExpressionInvocation;
-    expect(section.function, new TypeMatcher<MethodInvocation>());
+    expect(section.function, isMethodInvocation);
     expect(section.typeArguments, isNull);
     expect(section.argumentList, isNotNull);
     expect(section.argumentList.arguments, hasLength(1));
@@ -6153,7 +6185,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as FunctionExpressionInvocation;
-    expect(section.function, new TypeMatcher<MethodInvocation>());
+    expect(section.function, isMethodInvocation);
     expect(section.typeArguments, isNotNull);
     expect(section.argumentList, isNotNull);
     expect(section.argumentList.arguments, hasLength(1));
@@ -6164,7 +6196,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as FunctionExpressionInvocation;
-    expect(section.function, new TypeMatcher<MethodInvocation>());
+    expect(section.function, isMethodInvocation);
     expect(section.typeArguments, isNull);
     expect(section.argumentList, isNotNull);
     expect(section.argumentList.arguments, hasLength(1));
@@ -6176,7 +6208,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var section = expression as FunctionExpressionInvocation;
-    expect(section.function, new TypeMatcher<MethodInvocation>());
+    expect(section.function, isMethodInvocation);
     expect(section.typeArguments, isNotNull);
     expect(section.argumentList, isNotNull);
     expect(section.argumentList.arguments, hasLength(1));
@@ -6217,7 +6249,7 @@
     Expression expression = parseConstExpression('const A()');
     expect(expression, isNotNull);
     assertNoErrors();
-    expect(expression, new TypeMatcher<InstanceCreationExpression>());
+    expect(expression, isInstanceCreationExpression);
     InstanceCreationExpression instanceCreation = expression;
     expect(instanceCreation.keyword, isNotNull);
     ConstructorName name = instanceCreation.constructorName;
@@ -6299,7 +6331,7 @@
     BinaryExpression expression = parseEqualityExpression('super == y');
     expect(expression, isNotNull);
     assertNoErrors();
-    expect(expression.leftOperand, new TypeMatcher<SuperExpression>());
+    expect(expression.leftOperand, isSuperExpression);
     expect(expression.operator, isNotNull);
     expect(expression.operator.type, TokenType.EQ_EQ);
     expect(expression.rightOperand, isNotNull);
@@ -6386,7 +6418,7 @@
   void test_parseExpression_invokeFunctionExpression() {
     Expression expression = parseExpression('(a) {return a + a;} (3)');
     var invocation = expression as FunctionExpressionInvocation;
-    expect(invocation.function, new TypeMatcher<FunctionExpression>());
+    expect(invocation.function, isFunctionExpression);
     FunctionExpression functionExpression =
         invocation.function as FunctionExpression;
     expect(functionExpression.parameters, isNotNull);
@@ -6477,7 +6509,7 @@
     Expression expression = parseExpression('super.b.c<D>()');
     MethodInvocation invocation = expression as MethodInvocation;
     Expression target = invocation.target;
-    expect(target, new TypeMatcher<PropertyAccess>());
+    expect(target, isPropertyAccess);
     expect(invocation.methodName, isNotNull);
     expect(invocation.methodName.name, 'c');
     expect(invocation.typeArguments, isNotNull);
@@ -6986,7 +7018,7 @@
     expect(expression, isNotNull);
     assertNoErrors();
     var binaryExpression = expression as BinaryExpression;
-    expect(binaryExpression.leftOperand, new TypeMatcher<SuperExpression>());
+    expect(binaryExpression.leftOperand, isSuperExpression);
     expect(binaryExpression.operator, isNotNull);
     expect(binaryExpression.operator.type, TokenType.STAR);
     expect(binaryExpression.rightOperand, isNotNull);
@@ -7249,7 +7281,7 @@
     Expression expression = parsePrimaryExpression('null');
     expect(expression, isNotNull);
     assertNoErrors();
-    expect(expression, new TypeMatcher<NullLiteral>());
+    expect(expression, isNullLiteral);
     NullLiteral literal = expression;
     expect(literal.literal, isNotNull);
   }
@@ -7360,7 +7392,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, new TypeMatcher<GenericFunctionType>());
+    expect(asExpression.type, isGenericFunctionType);
   }
 
   void test_parseRelationalExpression_as_functionType_returnType() {
@@ -7371,7 +7403,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, new TypeMatcher<GenericFunctionType>());
+    expect(asExpression.type, isGenericFunctionType);
   }
 
   void test_parseRelationalExpression_as_generic() {
@@ -7381,7 +7413,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, new TypeMatcher<TypeName>());
+    expect(asExpression.type, isTypeName);
   }
 
   void test_parseRelationalExpression_as_simple() {
@@ -7391,7 +7423,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, new TypeMatcher<TypeName>());
+    expect(asExpression.type, isTypeName);
   }
 
   void test_parseRelationalExpression_as_simple_function() {
@@ -7401,7 +7433,7 @@
     var asExpression = expression as AsExpression;
     expect(asExpression.expression, isNotNull);
     expect(asExpression.asOperator, isNotNull);
-    expect(asExpression.type, new TypeMatcher<TypeName>());
+    expect(asExpression.type, isTypeName);
   }
 
   void test_parseRelationalExpression_is() {
@@ -7529,16 +7561,15 @@
     assertNoErrors();
     var interpolation = expression as StringInterpolation;
     expect(interpolation.elements, hasLength(3));
-    expect(interpolation.elements[0], new TypeMatcher<InterpolationString>());
+    expect(interpolation.elements[0], isInterpolationString);
     InterpolationString element0 = interpolation.elements[0];
     expect(element0.value, 'x');
-    expect(
-        interpolation.elements[1], new TypeMatcher<InterpolationExpression>());
+    expect(interpolation.elements[1], isInterpolationExpression);
     InterpolationExpression element1 = interpolation.elements[1];
     expect(element1.leftBracket.lexeme, '\$');
-    expect(element1.expression, new TypeMatcher<SimpleIdentifier>());
+    expect(element1.expression, isSimpleIdentifier);
     expect(element1.rightBracket, isNull);
-    expect(interpolation.elements[2], new TypeMatcher<InterpolationString>());
+    expect(interpolation.elements[2], isInterpolationString);
     InterpolationString element2 = interpolation.elements[2];
     expect(element2.value, '');
   }
@@ -7547,7 +7578,7 @@
     Expression expression = parseStringLiteral("'a \${b} c \$this d'");
     expect(expression, isNotNull);
     assertNoErrors();
-    expect(expression, new TypeMatcher<StringInterpolation>());
+    expect(expression, isStringInterpolation);
     StringInterpolation literal = expression;
     NodeList<InterpolationElement> elements = literal.elements;
     expect(elements, hasLength(5));
@@ -7577,14 +7608,13 @@
     assertNoErrors();
     var interpolation = expression as StringInterpolation;
     expect(interpolation.elements, hasLength(3));
-    expect(interpolation.elements[0], new TypeMatcher<InterpolationString>());
+    expect(interpolation.elements[0], isInterpolationString);
     InterpolationString element0 = interpolation.elements[0];
     expect(element0.value, 'x');
-    expect(
-        interpolation.elements[1], new TypeMatcher<InterpolationExpression>());
+    expect(interpolation.elements[1], isInterpolationExpression);
     InterpolationExpression element1 = interpolation.elements[1];
-    expect(element1.expression, new TypeMatcher<SimpleIdentifier>());
-    expect(interpolation.elements[2], new TypeMatcher<InterpolationString>());
+    expect(element1.expression, isSimpleIdentifier);
+    expect(interpolation.elements[2], isInterpolationString);
     InterpolationString element2 = interpolation.elements[2];
     expect(element2.value, '');
   }
@@ -7667,14 +7697,13 @@
     assertNoErrors();
     var interpolation = expression as StringInterpolation;
     expect(interpolation.elements, hasLength(3));
-    expect(interpolation.elements[0], new TypeMatcher<InterpolationString>());
+    expect(interpolation.elements[0], isInterpolationString);
     InterpolationString element0 = interpolation.elements[0];
     expect(element0.value, '');
-    expect(
-        interpolation.elements[1], new TypeMatcher<InterpolationExpression>());
+    expect(interpolation.elements[1], isInterpolationExpression);
     InterpolationExpression element1 = interpolation.elements[1];
-    expect(element1.expression, new TypeMatcher<SimpleIdentifier>());
-    expect(interpolation.elements[2], new TypeMatcher<InterpolationString>());
+    expect(element1.expression, isSimpleIdentifier);
+    expect(interpolation.elements[2], isInterpolationString);
     InterpolationString element2 = interpolation.elements[2];
     expect(element2.value, "'y");
   }
@@ -7685,14 +7714,13 @@
     assertNoErrors();
     var interpolation = expression as StringInterpolation;
     expect(interpolation.elements, hasLength(3));
-    expect(interpolation.elements[0], new TypeMatcher<InterpolationString>());
+    expect(interpolation.elements[0], isInterpolationString);
     InterpolationString element0 = interpolation.elements[0];
     expect(element0.value, '');
-    expect(
-        interpolation.elements[1], new TypeMatcher<InterpolationExpression>());
+    expect(interpolation.elements[1], isInterpolationExpression);
     InterpolationExpression element1 = interpolation.elements[1];
-    expect(element1.expression, new TypeMatcher<SimpleIdentifier>());
-    expect(interpolation.elements[2], new TypeMatcher<InterpolationString>());
+    expect(element1.expression, isSimpleIdentifier);
+    expect(interpolation.elements[2], isInterpolationString);
     InterpolationString element2 = interpolation.elements[2];
     expect(element2.value, 'y');
   }
@@ -7730,14 +7758,13 @@
     assertNoErrors();
     var interpolation = expression as StringInterpolation;
     expect(interpolation.elements, hasLength(3));
-    expect(interpolation.elements[0], new TypeMatcher<InterpolationString>());
+    expect(interpolation.elements[0], isInterpolationString);
     InterpolationString element0 = interpolation.elements[0];
     expect(element0.value, '');
-    expect(
-        interpolation.elements[1], new TypeMatcher<InterpolationExpression>());
+    expect(interpolation.elements[1], isInterpolationExpression);
     InterpolationExpression element1 = interpolation.elements[1];
-    expect(element1.expression, new TypeMatcher<SimpleIdentifier>());
-    expect(interpolation.elements[2], new TypeMatcher<InterpolationString>());
+    expect(element1.expression, isSimpleIdentifier);
+    expect(interpolation.elements[2], isInterpolationString);
     InterpolationString element2 = interpolation.elements[2];
     expect(element2.value, '"');
   }
@@ -7757,14 +7784,13 @@
     assertNoErrors();
     var interpolation = expression as StringInterpolation;
     expect(interpolation.elements, hasLength(3));
-    expect(interpolation.elements[0], new TypeMatcher<InterpolationString>());
+    expect(interpolation.elements[0], isInterpolationString);
     InterpolationString element0 = interpolation.elements[0];
     expect(element0.value, '');
-    expect(
-        interpolation.elements[1], new TypeMatcher<InterpolationExpression>());
+    expect(interpolation.elements[1], isInterpolationExpression);
     InterpolationExpression element1 = interpolation.elements[1];
-    expect(element1.expression, new TypeMatcher<SimpleIdentifier>());
-    expect(interpolation.elements[2], new TypeMatcher<InterpolationString>());
+    expect(element1.expression, isSimpleIdentifier);
+    expect(interpolation.elements[2], isInterpolationString);
     InterpolationString element2 = interpolation.elements[2];
     expect(element2.value, 'y');
   }
@@ -8013,8 +8039,7 @@
  * The class [FormalParameterParserTestMixin] defines parser tests that test
  * the parsing of formal parameters.
  */
-abstract class FormalParameterParserTestMixin
-    implements AbstractParserTestCase {
+mixin FormalParameterParserTestMixin implements AbstractParserTestCase {
   void test_parseConstructorParameter_this() {
     parseCompilationUnit('''
 class C {
@@ -8045,7 +8070,7 @@
         parseFormalParameter('covariant final a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8064,7 +8089,7 @@
     FormalParameter parameter = parseFormalParameter('covariant final a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8079,7 +8104,7 @@
         parseFormalParameter('covariant final a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8099,7 +8124,7 @@
         parseFormalParameter('covariant final A a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8119,7 +8144,7 @@
         parseFormalParameter('covariant final A a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8134,7 +8159,7 @@
         parseFormalParameter('covariant final A a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8154,12 +8179,12 @@
         parseFormalParameter('covariant String Function(int) a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNull);
-    expect(simpleParameter.type, new TypeMatcher<GenericFunctionType>());
+    expect(simpleParameter.type, isGenericFunctionType);
     expect(simpleParameter.isRequired, isTrue);
   }
 
@@ -8169,7 +8194,7 @@
         parseFormalParameter('covariant A a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8189,7 +8214,7 @@
         parseFormalParameter('covariant A<B<C>> a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8204,7 +8229,7 @@
         parseFormalParameter('covariant A a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8224,7 +8249,7 @@
         parseFormalParameter('covariant var a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8243,7 +8268,7 @@
     FormalParameter parameter = parseFormalParameter('covariant var a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNotNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8258,7 +8283,7 @@
         parseFormalParameter('covariant var a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8277,7 +8302,7 @@
     FormalParameter parameter = parseFormalParameter('final a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8296,7 +8321,7 @@
     FormalParameter parameter = parseFormalParameter('final a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8310,7 +8335,7 @@
     FormalParameter parameter = parseFormalParameter('final a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8329,7 +8354,7 @@
     FormalParameter parameter = parseFormalParameter('final A a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8348,7 +8373,7 @@
     FormalParameter parameter = parseFormalParameter('final A a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8362,7 +8387,7 @@
     FormalParameter parameter = parseFormalParameter('final A a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8382,12 +8407,12 @@
         parseFormalParameter('String Function(int) a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
     expect(simpleParameter.keyword, isNull);
-    expect(simpleParameter.type, new TypeMatcher<GenericFunctionType>());
+    expect(simpleParameter.type, isGenericFunctionType);
     expect(simpleParameter.isRequired, isTrue);
   }
 
@@ -8396,7 +8421,7 @@
     FormalParameter parameter = parseFormalParameter('A a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8415,7 +8440,7 @@
     FormalParameter parameter = parseFormalParameter('A a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8434,7 +8459,7 @@
     FormalParameter parameter = parseFormalParameter('A a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8448,7 +8473,7 @@
     FormalParameter parameter = parseFormalParameter('A a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8467,7 +8492,7 @@
     FormalParameter parameter = parseFormalParameter('A a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8486,7 +8511,7 @@
     FormalParameter parameter = parseFormalParameter('var a : null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8505,7 +8530,7 @@
     FormalParameter parameter = parseFormalParameter('var a', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.identifier, isNotNull);
@@ -8519,7 +8544,7 @@
     FormalParameter parameter = parseFormalParameter('var a = null', kind);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<DefaultFormalParameter>());
+    expect(parameter, isDefaultFormalParameter);
     DefaultFormalParameter defaultParameter = parameter;
     SimpleFormalParameter simpleParameter =
         defaultParameter.parameter as SimpleFormalParameter;
@@ -8612,18 +8637,18 @@
     NodeList<FormalParameter> parameters = list.parameters;
     expect(parameters, hasLength(2));
 
-    expect(parameters[0], new TypeMatcher<SimpleFormalParameter>());
+    expect(parameters[0], isSimpleFormalParameter);
     SimpleFormalParameter required = parameters[0];
     expect(required.identifier, isNull);
-    expect(required.type, new TypeMatcher<TypeName>());
+    expect(required.type, isTypeName);
     expect((required.type as TypeName).name.name, 'A');
 
-    expect(parameters[1], new TypeMatcher<DefaultFormalParameter>());
+    expect(parameters[1], isDefaultFormalParameter);
     DefaultFormalParameter named = parameters[1];
     expect(named.identifier, isNotNull);
-    expect(named.parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(named.parameter, isSimpleFormalParameter);
     SimpleFormalParameter simple = named.parameter;
-    expect(simple.type, new TypeMatcher<TypeName>());
+    expect(simple.type, isTypeName);
     expect((simple.type as TypeName).name.name, 'B');
   }
 
@@ -8787,7 +8812,7 @@
         errorCodes:
             usingFastaParser ? [ParserErrorCode.EXTRANEOUS_MODIFIER] : []);
     expect(parameter, isNotNull);
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNotNull);
     expect(fieldParameter.type, isNull);
@@ -8801,7 +8826,7 @@
         errorCodes:
             usingFastaParser ? [ParserErrorCode.EXTRANEOUS_MODIFIER] : []);
     expect(parameter, isNotNull);
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNotNull);
     expect(fieldParameter.type, isNotNull);
@@ -8814,7 +8839,7 @@
         parseNormalFormalParameter('final this.a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNotNull);
     expect(fieldParameter.type, isNull);
@@ -8827,7 +8852,7 @@
         parseNormalFormalParameter('final A this.a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNotNull);
     expect(fieldParameter.type, isNotNull);
@@ -8839,7 +8864,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('this.a(B b)');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNull);
     expect(fieldParameter.type, isNull);
@@ -8853,7 +8878,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('this.a()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNull);
     expect(fieldParameter.type, isNull);
@@ -8872,7 +8897,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('this.a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNull);
     expect(fieldParameter.type, isNull);
@@ -8884,7 +8909,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('A this.a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNull);
     expect(fieldParameter.type, isNotNull);
@@ -8896,7 +8921,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('var this.a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FieldFormalParameter>());
+    expect(parameter, isFieldFormalParameter);
     FieldFormalParameter fieldParameter = parameter;
     expect(fieldParameter.keyword, isNotNull);
     expect(fieldParameter.type, isNull);
@@ -8930,7 +8955,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('a()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.returnType, isNull);
     expect(functionParameter.identifier, isNotNull);
@@ -8943,7 +8968,7 @@
         parseNormalFormalParameter('covariant a()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.covariantKeyword, isNotNull);
     expect(functionParameter.returnType, isNull);
@@ -8956,7 +8981,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('a<E>()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.returnType, isNull);
     expect(functionParameter.identifier, isNotNull);
@@ -8968,7 +8993,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('A a()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.returnType, isNotNull);
     expect(functionParameter.identifier, isNotNull);
@@ -8980,7 +9005,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('A a<E>()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.returnType, isNotNull);
     expect(functionParameter.identifier, isNotNull);
@@ -8993,7 +9018,7 @@
         parseNormalFormalParameter('covariant void a()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.covariantKeyword, isNotNull);
     expect(functionParameter.returnType, isNotNull);
@@ -9006,7 +9031,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('void a()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.returnType, isNotNull);
     expect(functionParameter.identifier, isNotNull);
@@ -9018,7 +9043,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('void a<E>()');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<FunctionTypedFormalParameter>());
+    expect(parameter, isFunctionTypedFormalParameter);
     FunctionTypedFormalParameter functionParameter = parameter;
     expect(functionParameter.returnType, isNotNull);
     expect(functionParameter.identifier, isNotNull);
@@ -9037,7 +9062,7 @@
         errorCodes:
             usingFastaParser ? [ParserErrorCode.EXTRANEOUS_MODIFIER] : []);
     expect(parameter, isNotNull);
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNull);
@@ -9049,7 +9074,7 @@
         errorCodes:
             usingFastaParser ? [ParserErrorCode.EXTRANEOUS_MODIFIER] : []);
     expect(parameter, isNotNull);
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNotNull);
@@ -9060,7 +9085,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('final a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNull);
@@ -9071,7 +9096,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('final A a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.keyword, isNotNull);
     expect(simpleParameter.type, isNotNull);
@@ -9083,7 +9108,7 @@
         parseNormalFormalParameter('a', inFunctionType: true);
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.keyword, isNull);
     expect(simpleParameter.type, isNotNull);
@@ -9094,7 +9119,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.keyword, isNull);
     expect(simpleParameter.type, isNull);
@@ -9105,7 +9130,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('covariant');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.covariantKeyword, isNull);
     expect(simpleParameter.keyword, isNull);
@@ -9117,7 +9142,7 @@
     NormalFormalParameter parameter = parseNormalFormalParameter('A a');
     expect(parameter, isNotNull);
     assertNoErrors();
-    expect(parameter, new TypeMatcher<SimpleFormalParameter>());
+    expect(parameter, isSimpleFormalParameter);
     SimpleFormalParameter simpleParameter = parameter;
     expect(simpleParameter.keyword, isNull);
     expect(simpleParameter.type, isNotNull);
@@ -9908,7 +9933,7 @@
  *
  * Intended to be mixed in to parser test case classes.
  */
-class ParserTestHelpers {
+mixin ParserTestHelpers {
   void expectCommentText(Comment comment, String expectedText) {
     expect(comment.beginToken, same(comment.endToken));
     expect(comment.beginToken.lexeme, expectedText);
@@ -9937,12 +9962,11 @@
  * invalid code sequences to ensure that the correct recovery steps are taken in
  * the parser.
  */
-abstract class RecoveryParserTestMixin implements AbstractParserTestCase {
+mixin RecoveryParserTestMixin implements AbstractParserTestCase {
   void test_additiveExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("+ y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -9951,27 +9975,23 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_additiveExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x +", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_additiveExpression_missing_RHS_super() {
     BinaryExpression expression =
         parseExpression("super +", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -9981,8 +10001,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_additiveExpression_precedence_multiplicative_right() {
@@ -9991,8 +10010,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_additiveExpression_super() {
@@ -10000,15 +10018,14 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_assignableSelector() {
     IndexExpression expression =
         parseExpression("a.b[]", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
     Expression index = expression.index;
-    expect(index, new TypeMatcher<SimpleIdentifier>());
+    expect(index, isSimpleIdentifier);
     expect(index.isSynthetic, isTrue);
   }
 
@@ -10016,8 +10033,7 @@
     AssignmentExpression expression =
         parseExpression("= y = 0", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
     Expression syntheticExpression = expression.leftHandSide;
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, syntheticExpression);
+    expect(syntheticExpression, isSimpleIdentifier);
     expect(syntheticExpression.isSynthetic, isTrue);
   }
 
@@ -10026,8 +10042,7 @@
         parseExpression("x = = 0", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
     Expression syntheticExpression =
         (expression.rightHandSide as AssignmentExpression).leftHandSide;
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, syntheticExpression);
+    expect(syntheticExpression, isSimpleIdentifier);
     expect(syntheticExpression.isSynthetic, isTrue);
   }
 
@@ -10036,32 +10051,28 @@
         parseExpression("x = y =", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
     Expression syntheticExpression =
         (expression.rightHandSide as AssignmentExpression).rightHandSide;
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, syntheticExpression);
+    expect(syntheticExpression, isSimpleIdentifier);
     expect(syntheticExpression.isSynthetic, isTrue);
   }
 
   void test_assignmentExpression_missing_LHS() {
     AssignmentExpression expression =
         parseExpression("= 0", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftHandSide);
+    expect(expression.leftHandSide, isSimpleIdentifier);
     expect(expression.leftHandSide.isSynthetic, isTrue);
   }
 
   void test_assignmentExpression_missing_RHS() {
     AssignmentExpression expression =
         parseExpression("x =", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftHandSide);
+    expect(expression.leftHandSide, isSimpleIdentifier);
     expect(expression.rightHandSide.isSynthetic, isTrue);
   }
 
   void test_bitwiseAndExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("& y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -10070,27 +10081,23 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_bitwiseAndExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x &", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_bitwiseAndExpression_missing_RHS_super() {
     BinaryExpression expression =
         parseExpression("super &", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -10100,8 +10107,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseAndExpression_precedence_equality_right() {
@@ -10110,8 +10116,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_bitwiseAndExpression_super() {
@@ -10119,15 +10124,13 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseOrExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("| y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -10136,27 +10139,23 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_bitwiseOrExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x |", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_bitwiseOrExpression_missing_RHS_super() {
     BinaryExpression expression =
         parseExpression("super |", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -10166,8 +10165,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseOrExpression_precedence_xor_right() {
@@ -10176,8 +10174,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_bitwiseOrExpression_super() {
@@ -10185,15 +10182,13 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseXorExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("^ y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -10202,27 +10197,23 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_bitwiseXorExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x ^", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_bitwiseXorExpression_missing_RHS_super() {
     BinaryExpression expression =
         parseExpression("super ^", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -10232,8 +10223,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_bitwiseXorExpression_precedence_and_right() {
@@ -10242,8 +10232,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_bitwiseXorExpression_super() {
@@ -10251,8 +10240,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_classTypeAlias_withBody() {
@@ -10298,10 +10286,9 @@
     Expression expression =
         parseExpression('x ? y :', codes: [ParserErrorCode.MISSING_IDENTIFIER]);
     expectNotNullIfNoErrors(expression);
-    expect(expression, new TypeMatcher<ConditionalExpression>());
+    expect(expression, isConditionalExpression);
     ConditionalExpression conditionalExpression = expression;
-    expect(conditionalExpression.elseExpression,
-        new TypeMatcher<SimpleIdentifier>());
+    expect(conditionalExpression.elseExpression, isSimpleIdentifier);
     expect(conditionalExpression.elseExpression.isSynthetic, isTrue);
   }
 
@@ -10309,10 +10296,9 @@
     Expression expression =
         parseExpression('x ? : z', codes: [ParserErrorCode.MISSING_IDENTIFIER]);
     expectNotNullIfNoErrors(expression);
-    expect(expression, new TypeMatcher<ConditionalExpression>());
+    expect(expression, isConditionalExpression);
     ConditionalExpression conditionalExpression = expression;
-    expect(conditionalExpression.thenExpression,
-        new TypeMatcher<SimpleIdentifier>());
+    expect(conditionalExpression.thenExpression, isSimpleIdentifier);
     expect(conditionalExpression.thenExpression.isSynthetic, isTrue);
   }
 
@@ -10342,8 +10328,7 @@
   void test_equalityExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("== y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -10352,27 +10337,23 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_equalityExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x ==", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_equalityExpression_missing_RHS_super() {
     BinaryExpression expression = parseExpression("super ==",
         codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -10383,8 +10364,7 @@
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
     if (!usingFastaParser) {
-      EngineTestCase.assertInstanceOf(
-          (obj) => obj is IsExpression, IsExpression, expression.leftOperand);
+      expect(expression.leftOperand, isIsExpression);
     }
   }
 
@@ -10394,8 +10374,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is IsExpression, IsExpression, expression.rightOperand);
+    expect(expression.rightOperand, isIsExpression);
   }
 
   void test_equalityExpression_super() {
@@ -10404,8 +10383,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_equalityExpression_superRHS() {
@@ -10423,8 +10401,7 @@
 //        [expectedError(ParserErrorCode.MISSING_IDENTIFIER, 0, 1)]);
     expect(result, hasLength(4));
     Expression syntheticExpression = result[0];
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, syntheticExpression);
+    expect(syntheticExpression, isSimpleIdentifier);
     expect(syntheticExpression.isSynthetic, isTrue);
   }
 
@@ -10437,8 +10414,7 @@
 //        [expectedError(ParserErrorCode.MISSING_IDENTIFIER, 6, 1)]);
     expect(result, hasLength(4));
     Expression syntheticExpression = result[2];
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, syntheticExpression);
+    expect(syntheticExpression, isSimpleIdentifier);
     expect(syntheticExpression.isSynthetic, isTrue);
   }
 
@@ -10456,8 +10432,7 @@
           [expectedError(ParserErrorCode.MISSING_IDENTIFIER, 8, 0)]);
       expect(result, hasLength(4));
       Expression syntheticExpression = result[3];
-      EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-          SimpleIdentifier, syntheticExpression);
+      expect(syntheticExpression, isSimpleIdentifier);
       expect(syntheticExpression.isSynthetic, isTrue);
     }
   }
@@ -10474,8 +10449,7 @@
     ClassDeclaration declaration = unit.declarations[0] as ClassDeclaration;
     NodeList<ClassMember> members = declaration.members;
     ClassMember fieldDecl = members[1];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldDeclaration, FieldDeclaration, fieldDecl);
+    expect(fieldDecl, isFieldDeclaration);
     NodeList<VariableDeclaration> vars =
         (fieldDecl as FieldDeclaration).fields.variables;
     expect(vars, hasLength(1));
@@ -10549,20 +10523,17 @@
     listener.assertErrors([
       expectedError(ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER, 6, 1)
     ]);
-    expect(member, new TypeMatcher<ConstructorDeclaration>());
+    expect(member, isConstructorDeclaration);
     NodeList<ConstructorInitializer> initializers =
         (member as ConstructorDeclaration).initializers;
     expect(initializers, hasLength(1));
     ConstructorInitializer initializer = initializers[0];
-    expect(initializer, new TypeMatcher<ConstructorFieldInitializer>());
+    expect(initializer, isConstructorFieldInitializer);
     Expression expression =
         (initializer as ConstructorFieldInitializer).expression;
     expect(expression, isNotNull);
-    expect(
-        expression,
-        usingFastaParser
-            ? new TypeMatcher<MethodInvocation>()
-            : new TypeMatcher<ParenthesizedExpression>());
+    expect(expression,
+        usingFastaParser ? isMethodInvocation : isParenthesizedExpression);
   }
 
   void test_incomplete_constructorInitializers_this() {
@@ -10667,8 +10638,7 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration,
-        TopLevelVariableDeclaration, member);
+    expect(member, isTopLevelVariableDeclaration);
     NodeList<VariableDeclaration> variables =
         (member as TopLevelVariableDeclaration).variables.variables;
     expect(variables, hasLength(1));
@@ -10686,8 +10656,7 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration,
-        TopLevelVariableDeclaration, member);
+    expect(member, isTopLevelVariableDeclaration);
     NodeList<VariableDeclaration> variables =
         (member as TopLevelVariableDeclaration).variables.variables;
     expect(variables, hasLength(1));
@@ -10703,8 +10672,7 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration,
-        TopLevelVariableDeclaration, member);
+    expect(member, isTopLevelVariableDeclaration);
     NodeList<VariableDeclaration> variables =
         (member as TopLevelVariableDeclaration).variables.variables;
     expect(variables, hasLength(1));
@@ -10720,8 +10688,7 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
-    EngineTestCase.assertInstanceOf((obj) => obj is TopLevelVariableDeclaration,
-        TopLevelVariableDeclaration, member);
+    expect(member, isTopLevelVariableDeclaration);
     NodeList<VariableDeclaration> variables =
         (member as TopLevelVariableDeclaration).variables.variables;
     expect(variables, hasLength(1));
@@ -10740,13 +10707,11 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassDeclaration, ClassDeclaration, unitMember);
+    expect(unitMember, isClassDeclaration);
     NodeList<ClassMember> members = (unitMember as ClassDeclaration).members;
     expect(members, hasLength(1));
     ClassMember classMember = members[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
+    expect(classMember, isFieldDeclaration);
     VariableDeclarationList fieldList =
         (classMember as FieldDeclaration).fields;
     expect(fieldList.keyword.keyword, Keyword.CONST);
@@ -10767,13 +10732,11 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassDeclaration, ClassDeclaration, unitMember);
+    expect(unitMember, isClassDeclaration);
     NodeList<ClassMember> members = (unitMember as ClassDeclaration).members;
     expect(members, hasLength(1));
     ClassMember classMember = members[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
+    expect(classMember, isFieldDeclaration);
     VariableDeclarationList fieldList =
         (classMember as FieldDeclaration).fields;
     expect(fieldList.keyword.keyword, Keyword.FINAL);
@@ -10798,13 +10761,11 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassDeclaration, ClassDeclaration, unitMember);
+    expect(unitMember, isClassDeclaration);
     NodeList<ClassMember> members = (unitMember as ClassDeclaration).members;
     expect(members, hasLength(1));
     ClassMember classMember = members[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
+    expect(classMember, isFieldDeclaration);
     FieldDeclaration declaration = classMember;
     expect(declaration.staticKeyword.lexeme, 'static');
     VariableDeclarationList fieldList = declaration.fields;
@@ -10823,13 +10784,11 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassDeclaration, ClassDeclaration, unitMember);
+    expect(unitMember, isClassDeclaration);
     NodeList<ClassMember> members = (unitMember as ClassDeclaration).members;
     expect(members, hasLength(1));
     ClassMember classMember = members[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
+    expect(classMember, isFieldDeclaration);
     FieldDeclaration declaration = classMember;
     expect(declaration.staticKeyword.lexeme, 'static');
     VariableDeclarationList fieldList = declaration.fields;
@@ -10855,13 +10814,11 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassDeclaration, ClassDeclaration, unitMember);
+    expect(unitMember, isClassDeclaration);
     NodeList<ClassMember> members = (unitMember as ClassDeclaration).members;
     expect(members, hasLength(1));
     ClassMember classMember = members[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
+    expect(classMember, isFieldDeclaration);
     VariableDeclarationList fieldList =
         (classMember as FieldDeclaration).fields;
     TypeName type = fieldList.type;
@@ -10888,13 +10845,11 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassDeclaration, ClassDeclaration, unitMember);
+    expect(unitMember, isClassDeclaration);
     NodeList<ClassMember> members = (unitMember as ClassDeclaration).members;
     expect(members, hasLength(1));
     ClassMember classMember = members[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
+    expect(classMember, isFieldDeclaration);
     VariableDeclarationList fieldList =
         (classMember as FieldDeclaration).fields;
     expect(fieldList.keyword.keyword, Keyword.VAR);
@@ -10910,7 +10865,7 @@
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 12, 4),
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 17, 1)
     ]);
-    expect(statement, new TypeMatcher<ForStatement>());
+    expect(statement, isForStatement);
     expect(statement.toSource(), 'for (String item; i;) {}');
     expect(statement.leftSeparator, isNotNull);
     expect(statement.leftSeparator.type, TokenType.SEMICOLON);
@@ -10922,7 +10877,7 @@
     Statement statement = parseStatement('String v }', expectedEndOffset: 9);
     listener
         .assertErrors([expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1)]);
-    expect(statement, new TypeMatcher<VariableDeclarationStatement>());
+    expect(statement, isVariableDeclarationStatement);
     expect(statement.toSource(), 'String v;');
   }
 
@@ -10932,7 +10887,7 @@
       expectedError(ParserErrorCode.MISSING_IDENTIFIER, 6, 1),
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 6, 1)
     ]);
-    expect(statement, new TypeMatcher<VariableDeclarationStatement>());
+    expect(statement, isVariableDeclarationStatement);
     expect(statement.toSource(), 'final ;');
   }
 
@@ -10941,7 +10896,7 @@
         parseStatement('String v String v2;', expectedEndOffset: 9);
     listener
         .assertErrors([expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1)]);
-    expect(statement, new TypeMatcher<VariableDeclarationStatement>());
+    expect(statement, isVariableDeclarationStatement);
     expect(statement.toSource(), 'String v;');
   }
 
@@ -10950,7 +10905,7 @@
         parseStatement('String v if (true) {}', expectedEndOffset: 9);
     listener
         .assertErrors([expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1)]);
-    expect(statement, new TypeMatcher<VariableDeclarationStatement>());
+    expect(statement, isVariableDeclarationStatement);
     expect(statement.toSource(), 'String v;');
   }
 
@@ -10958,7 +10913,7 @@
     Statement statement = parseStatement('String v {}', expectedEndOffset: 9);
     listener
         .assertErrors([expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1)]);
-    expect(statement, new TypeMatcher<VariableDeclarationStatement>());
+    expect(statement, isVariableDeclarationStatement);
     expect(statement.toSource(), 'String v;');
   }
 
@@ -10967,7 +10922,7 @@
         parseStatement('List<String> v {}', expectedEndOffset: 15);
     listener
         .assertErrors([expectedError(ParserErrorCode.EXPECTED_TOKEN, 13, 1)]);
-    expect(statement, new TypeMatcher<VariableDeclarationStatement>());
+    expect(statement, isVariableDeclarationStatement);
     expect(statement.toSource(), 'List<String> v;');
   }
 
@@ -11145,8 +11100,7 @@
       SimpleIdentifier simpleId = thenStatement.expression;
       expect(simpleId.isSynthetic, isTrue);
     } else {
-      EngineTestCase.assertInstanceOf((obj) => obj is EmptyStatement,
-          EmptyStatement, ifStatement.thenStatement);
+      expect(ifStatement.thenStatement, isEmptyStatement);
     }
   }
 
@@ -11244,8 +11198,7 @@
   void test_logicalAndExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("&& y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -11254,19 +11207,16 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_logicalAndExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x &&", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -11276,8 +11226,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_logicalAndExpression_precedence_bitwiseOr_right() {
@@ -11286,15 +11235,13 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_logicalOrExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("|| y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -11303,19 +11250,16 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_logicalOrExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x ||", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -11325,8 +11269,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_logicalOrExpression_precedence_logicalAnd_right() {
@@ -11335,8 +11278,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_method_missingBody() {
@@ -11378,11 +11320,9 @@
         unit.declarations[0] as ClassDeclaration;
     NodeList<ClassMember> members = classDeclaration.members;
     expect(members, hasLength(2));
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodDeclaration, MethodDeclaration, members[0]);
+    expect(members[0], isMethodDeclaration);
     ClassMember member = members[1];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodDeclaration, MethodDeclaration, member);
+    expect(member, isMethodDeclaration);
     expect((member as MethodDeclaration).name.name, "foo");
   }
 
@@ -11397,7 +11337,7 @@
       // existing annotation can be associated with a class member.
       expect(member, isNull);
     } else {
-      expect(member, new TypeMatcher<MethodDeclaration>());
+      expect(member, isMethodDeclaration);
       MethodDeclaration method = member;
       expect(method.documentationComment, isNull);
       NodeList<Annotation> metadata = method.metadata;
@@ -11409,7 +11349,7 @@
   void test_missingSemicolon_varialeDeclarationList() {
     void verify(CompilationUnitMember member, String expectedTypeName,
         String expectedName, String expectedSemicolon) {
-      expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+      expect(member, isTopLevelVariableDeclaration);
       TopLevelVariableDeclaration declaration = member;
       VariableDeclarationList variableList = declaration.variables;
       expect(variableList, isNotNull);
@@ -11443,8 +11383,7 @@
   void test_multiplicativeExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("* y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -11453,42 +11392,36 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_multiplicativeExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x *", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_multiplicativeExpression_missing_RHS_super() {
     BinaryExpression expression =
         parseExpression("super *", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_multiplicativeExpression_precedence_unary_left() {
     BinaryExpression expression =
         parseExpression("-x *", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression,
-        PrefixExpression, expression.leftOperand);
+    expect(expression.leftOperand, isPrefixExpression);
   }
 
   void test_multiplicativeExpression_precedence_unary_right() {
     BinaryExpression expression =
         parseExpression("* -y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is PrefixExpression,
-        PrefixExpression, expression.rightOperand);
+    expect(expression.rightOperand, isPrefixExpression);
   }
 
   void test_multiplicativeExpression_super() {
@@ -11497,8 +11430,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_namedParameterOutsideGroup() {
@@ -11537,8 +11469,7 @@
   void test_prefixExpression_missing_operand_minus() {
     PrefixExpression expression =
         parseExpression("-", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is SimpleIdentifier, SimpleIdentifier, expression.operand);
+    expect(expression.operand, isSimpleIdentifier);
     expect(expression.operand.isSynthetic, isTrue);
     expect(expression.operator.type, TokenType.MINUS);
   }
@@ -11575,8 +11506,7 @@
   void test_relationalExpression_missing_LHS() {
     IsExpression expression =
         parseExpression("is y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.expression);
+    expect(expression.expression, isSimpleIdentifier);
     expect(expression.expression.isSynthetic, isTrue);
   }
 
@@ -11585,19 +11515,16 @@
       ParserErrorCode.EXPECTED_TYPE_NAME,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.expression);
+    expect(expression.expression, isSimpleIdentifier);
     expect(expression.expression.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is TypeName, TypeName, expression.type);
+    expect(expression.type, isTypeName);
     expect(expression.type.isSynthetic, isTrue);
   }
 
   void test_relationalExpression_missing_RHS() {
     IsExpression expression =
         parseExpression("x is", codes: [ParserErrorCode.EXPECTED_TYPE_NAME]);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is TypeName, TypeName, expression.type);
+    expect(expression.type, isTypeName);
     expect(expression.type.isSynthetic, isTrue);
   }
 
@@ -11607,15 +11534,13 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.expression);
+    expect(expression.expression, isBinaryExpression);
   }
 
   void test_shiftExpression_missing_LHS() {
     BinaryExpression expression =
         parseExpression("<< y", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
   }
 
@@ -11624,27 +11549,23 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.leftOperand);
+    expect(expression.leftOperand, isSimpleIdentifier);
     expect(expression.leftOperand.isSynthetic, isTrue);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_shiftExpression_missing_RHS() {
     BinaryExpression expression =
         parseExpression("x <<", codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
   void test_shiftExpression_missing_RHS_super() {
     BinaryExpression expression = parseExpression("super <<",
         codes: [ParserErrorCode.MISSING_IDENTIFIER]);
-    EngineTestCase.assertInstanceOf((obj) => obj is SimpleIdentifier,
-        SimpleIdentifier, expression.rightOperand);
+    expect(expression.rightOperand, isSimpleIdentifier);
     expect(expression.rightOperand.isSynthetic, isTrue);
   }
 
@@ -11654,8 +11575,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_shiftExpression_precedence_unary_right() {
@@ -11664,8 +11584,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.rightOperand);
+    expect(expression.rightOperand, isBinaryExpression);
   }
 
   void test_shiftExpression_super() {
@@ -11673,8 +11592,7 @@
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
-    EngineTestCase.assertInstanceOf((obj) => obj is BinaryExpression,
-        BinaryExpression, expression.leftOperand);
+    expect(expression.leftOperand, isBinaryExpression);
   }
 
   void test_typedef_eof() {
@@ -11685,8 +11603,7 @@
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionTypeAlias, FunctionTypeAlias, member);
+    expect(member, isFunctionTypeAlias);
   }
 
   void test_unaryPlus() {
@@ -12195,7 +12112,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<EmptyFunctionBody>());
+    expect(functionBody, isEmptyFunctionBody);
   }
 
   void test_parseFunctionBody_skip_block_invalid() {
@@ -12204,7 +12121,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     listener.assertErrorsWithCodes([ScannerErrorCode.EXPECTED_TOKEN]);
-    expect(functionBody, new TypeMatcher<EmptyFunctionBody>());
+    expect(functionBody, isEmptyFunctionBody);
   }
 
   void test_parseFunctionBody_skip_blocks() {
@@ -12213,7 +12130,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<EmptyFunctionBody>());
+    expect(functionBody, isEmptyFunctionBody);
   }
 
   void test_parseFunctionBody_skip_expression() {
@@ -12222,7 +12139,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<EmptyFunctionBody>());
+    expect(functionBody, isEmptyFunctionBody);
   }
 
   void test_parseModifiers_abstract() {
@@ -12505,13 +12422,13 @@
  *
  * More complex tests should be defined in the class [ComplexParserTest].
  */
-abstract class SimpleParserTestMixin implements AbstractParserTestCase {
+mixin SimpleParserTestMixin implements AbstractParserTestCase {
   ConstructorName parseConstructorName(String name) {
     createParser('new $name();');
     Statement statement = parser.parseStatement2();
-    expect(statement, new TypeMatcher<ExpressionStatement>());
+    expect(statement, isExpressionStatement);
     Expression expression = (statement as ExpressionStatement).expression;
-    expect(expression, new TypeMatcher<InstanceCreationExpression>());
+    expect(expression, isInstanceCreationExpression);
     return (expression as InstanceCreationExpression).constructorName;
   }
 
@@ -12559,7 +12476,7 @@
    */
   void parseStatementList(String content, int expectedCount) {
     Statement statement = parseStatement('{$content}');
-    expect(statement, new TypeMatcher<Block>());
+    expect(statement, isBlock);
     Block block = statement;
     expect(block.statements, hasLength(expectedCount));
   }
@@ -13000,7 +12917,7 @@
     CommentReference reference = parseCommentReference('new a.b', 7);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<PrefixedIdentifier>());
+    expect(reference.identifier, isPrefixedIdentifier);
     PrefixedIdentifier prefixedIdentifier = reference.identifier;
     SimpleIdentifier prefix = prefixedIdentifier.prefix;
     expect(prefix.token, isNotNull);
@@ -13018,7 +12935,7 @@
     CommentReference reference = parseCommentReference('new a', 5);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<SimpleIdentifier>());
+    expect(reference.identifier, isSimpleIdentifier);
     SimpleIdentifier identifier = reference.identifier;
     expect(identifier.token, isNotNull);
     expect(identifier.name, "a");
@@ -13030,7 +12947,7 @@
     CommentReference reference = parseCommentReference('operator ==', 5);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<SimpleIdentifier>());
+    expect(reference.identifier, isSimpleIdentifier);
     SimpleIdentifier identifier = reference.identifier;
     expect(identifier.token, isNotNull);
     expect(identifier.name, "==");
@@ -13042,7 +12959,7 @@
     CommentReference reference = parseCommentReference('Object.operator==', 7);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<PrefixedIdentifier>());
+    expect(reference.identifier, isPrefixedIdentifier);
     PrefixedIdentifier prefixedIdentifier = reference.identifier;
     SimpleIdentifier prefix = prefixedIdentifier.prefix;
     expect(prefix.token, isNotNull);
@@ -13060,7 +12977,7 @@
     CommentReference reference = parseCommentReference('==', 5);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<SimpleIdentifier>());
+    expect(reference.identifier, isSimpleIdentifier);
     SimpleIdentifier identifier = reference.identifier;
     expect(identifier.token, isNotNull);
     expect(identifier.name, "==");
@@ -13072,7 +12989,7 @@
     CommentReference reference = parseCommentReference('Object.==', 7);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<PrefixedIdentifier>());
+    expect(reference.identifier, isPrefixedIdentifier);
     PrefixedIdentifier prefixedIdentifier = reference.identifier;
     SimpleIdentifier prefix = prefixedIdentifier.prefix;
     expect(prefix.token, isNotNull);
@@ -13090,7 +13007,7 @@
     CommentReference reference = parseCommentReference('a.b', 7);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<PrefixedIdentifier>());
+    expect(reference.identifier, isPrefixedIdentifier);
     PrefixedIdentifier prefixedIdentifier = reference.identifier;
     SimpleIdentifier prefix = prefixedIdentifier.prefix;
     expect(prefix.token, isNotNull);
@@ -13108,7 +13025,7 @@
     CommentReference reference = parseCommentReference('a', 5);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<SimpleIdentifier>());
+    expect(reference.identifier, isSimpleIdentifier);
     SimpleIdentifier identifier = reference.identifier;
     expect(identifier.token, isNotNull);
     expect(identifier.name, "a");
@@ -13120,7 +13037,7 @@
     CommentReference reference = parseCommentReference('', 5);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    expect(reference.identifier, new TypeMatcher<SimpleIdentifier>());
+    expect(reference.identifier, isSimpleIdentifier);
     SimpleIdentifier identifier = reference.identifier;
     expect(identifier, isNotNull);
     expect(identifier.isSynthetic, isTrue);
@@ -13141,10 +13058,7 @@
     CommentReference reference = parseCommentReference('this', 5);
     expectNotNullIfNoErrors(reference);
     assertNoErrors();
-    SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(
-        (obj) => obj is SimpleIdentifier,
-        SimpleIdentifier,
-        reference.identifier);
+    SimpleIdentifier identifier = reference.identifier;
     expect(identifier.token, isNotNull);
     expect(identifier.name, "a");
     expect(identifier.offset, 5);
@@ -13675,7 +13589,7 @@
     assertNoErrors();
     expect(clause.extendsKeyword, isNotNull);
     expect(clause.superclass, isNotNull);
-    expect(clause.superclass, new TypeMatcher<TypeName>());
+    expect(clause.superclass, isTypeName);
   }
 
   void test_parseFunctionBody_block() {
@@ -13683,7 +13597,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<BlockFunctionBody>());
+    expect(functionBody, isBlockFunctionBody);
     BlockFunctionBody body = functionBody;
     expect(body.keyword, isNull);
     expect(body.star, isNull);
@@ -13698,7 +13612,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<BlockFunctionBody>());
+    expect(functionBody, isBlockFunctionBody);
     BlockFunctionBody body = functionBody;
     expect(body.keyword, isNotNull);
     expect(body.keyword.lexeme, Parser.ASYNC);
@@ -13714,7 +13628,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<BlockFunctionBody>());
+    expect(functionBody, isBlockFunctionBody);
     BlockFunctionBody body = functionBody;
     expect(body.keyword, isNotNull);
     expect(body.keyword.lexeme, Parser.ASYNC);
@@ -13730,7 +13644,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<BlockFunctionBody>());
+    expect(functionBody, isBlockFunctionBody);
     BlockFunctionBody body = functionBody;
     expect(body.keyword, isNotNull);
     expect(body.keyword.lexeme, Parser.SYNC);
@@ -13746,7 +13660,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(true, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<EmptyFunctionBody>());
+    expect(functionBody, isEmptyFunctionBody);
     EmptyFunctionBody body = functionBody;
     expect(body.semicolon, isNotNull);
   }
@@ -13756,7 +13670,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<ExpressionFunctionBody>());
+    expect(functionBody, isExpressionFunctionBody);
     ExpressionFunctionBody body = functionBody;
     expect(body.keyword, isNull);
     expect(body.functionDefinition, isNotNull);
@@ -13772,7 +13686,7 @@
     FunctionBody functionBody = parser.parseFunctionBody(false, null, false);
     expectNotNullIfNoErrors(functionBody);
     assertNoErrors();
-    expect(functionBody, new TypeMatcher<ExpressionFunctionBody>());
+    expect(functionBody, isExpressionFunctionBody);
     ExpressionFunctionBody body = functionBody;
     expect(body.keyword, isNotNull);
     expect(body.keyword.lexeme, Parser.ASYNC);
@@ -13852,7 +13766,7 @@
     expect(unit, isNotNull);
     FunctionDeclaration f = unit.declarations[0];
     ExpressionFunctionBody body = f.functionExpression.body;
-    expect(body.expression, new TypeMatcher<InstanceCreationExpression>());
+    expect(body.expression, isInstanceCreationExpression);
     InstanceCreationExpressionImpl creation = body.expression;
     expect(creation.keyword, isNull);
     ConstructorName constructorName = creation.constructorName;
@@ -13873,7 +13787,7 @@
     expect(unit, isNotNull);
     FunctionDeclaration f = unit.declarations[0];
     ExpressionFunctionBody body = f.functionExpression.body;
-    expect(body.expression, new TypeMatcher<InstanceCreationExpression>());
+    expect(body.expression, isInstanceCreationExpression);
     InstanceCreationExpressionImpl creation = body.expression;
     expect(creation.keyword, isNull);
     ConstructorName constructorName = creation.constructorName;
@@ -13891,7 +13805,7 @@
     expect(unit, isNotNull);
     FunctionDeclaration f = unit.declarations[0];
     ExpressionFunctionBody body = f.functionExpression.body;
-    expect(body.expression, new TypeMatcher<InstanceCreationExpression>());
+    expect(body.expression, isInstanceCreationExpression);
     InstanceCreationExpression creation = body.expression;
     expect(creation.keyword, isNull);
     ConstructorName constructorName = creation.constructorName;
@@ -13990,13 +13904,13 @@
 Function<A>(core.List<core.int> x) m() => null;
 ''');
     Statement statement = parser.parseStatement2();
-    expect(statement, new TypeMatcher<FunctionDeclarationStatement>());
+    expect(statement, isFunctionDeclarationStatement);
     expect(
         (statement as FunctionDeclarationStatement)
             .functionDeclaration
             .functionExpression
             .body,
-        new TypeMatcher<ExpressionFunctionBody>());
+        isExpressionFunctionBody);
   }
 
   void test_parseStatements_multiple() {
@@ -14033,16 +13947,16 @@
     NodeList<FormalParameter> parameters = parameterList.parameters;
     expect(parameters, hasLength(2));
 
-    expect(parameters[0], new TypeMatcher<SimpleFormalParameter>());
+    expect(parameters[0], isSimpleFormalParameter);
     SimpleFormalParameter parameter = parameters[0];
     expect(parameter.identifier, isNull);
-    expect(parameter.type, new TypeMatcher<TypeName>());
+    expect(parameter.type, isTypeName);
     expect((parameter.type as TypeName).name.name, 'int');
 
-    expect(parameters[1], new TypeMatcher<SimpleFormalParameter>());
+    expect(parameters[1], isSimpleFormalParameter);
     parameter = parameters[1];
     expect(parameter.identifier, isNull);
-    expect(parameter.type, new TypeMatcher<TypeName>());
+    expect(parameter.type, isTypeName);
     expect((parameter.type as TypeName).name.name, 'int');
   }
 
@@ -14118,18 +14032,18 @@
     NodeList<FormalParameter> parameters = parameterList.parameters;
     expect(parameters, hasLength(2));
 
-    expect(parameters[0], new TypeMatcher<SimpleFormalParameter>());
+    expect(parameters[0], isSimpleFormalParameter);
     SimpleFormalParameter parameter = parameters[0];
     expect(parameter.identifier, isNotNull);
     expect(parameter.identifier.name, 's');
-    expect(parameter.type, new TypeMatcher<TypeName>());
+    expect(parameter.type, isTypeName);
     expect((parameter.type as TypeName).name.name, 'String');
 
-    expect(parameters[1], new TypeMatcher<SimpleFormalParameter>());
+    expect(parameters[1], isSimpleFormalParameter);
     parameter = parameters[1];
     expect(parameter.identifier, isNotNull);
     expect(parameter.identifier.name, 'i');
-    expect(parameter.type, new TypeMatcher<TypeName>());
+    expect(parameter.type, isTypeName);
     expect((parameter.type as TypeName).name.name, 'int');
   }
 
@@ -14304,7 +14218,7 @@
     TypeParameter parameter = parser.parseTypeParameter();
     expectNotNullIfNoErrors(parameter);
     assertNoErrors();
-    expect(parameter.bound, new TypeMatcher<GenericFunctionType>());
+    expect(parameter.bound, isGenericFunctionType);
     expect(parameter.extendsKeyword, isNotNull);
     expect(parameter.name, isNotNull);
   }
@@ -14314,7 +14228,7 @@
     TypeParameter parameter = parser.parseTypeParameter();
     expectNotNullIfNoErrors(parameter);
     assertNoErrors();
-    expect(parameter.bound, new TypeMatcher<GenericFunctionType>());
+    expect(parameter.bound, isGenericFunctionType);
     expect(parameter.extendsKeyword, isNotNull);
     expect(parameter.name, isNotNull);
   }
@@ -14324,7 +14238,7 @@
     TypeParameter parameter = parser.parseTypeParameter();
     expectNotNullIfNoErrors(parameter);
     assertNoErrors();
-    expect(parameter.bound, new TypeMatcher<TypeName>());
+    expect(parameter.bound, isTypeName);
     expect(parameter.extendsKeyword, isNotNull);
     expect(parameter.name, isNotNull);
   }
@@ -14334,7 +14248,7 @@
     TypeParameter parameter = parser.parseTypeParameter();
     expectNotNullIfNoErrors(parameter);
     assertNoErrors();
-    expect(parameter.bound, new TypeMatcher<TypeName>());
+    expect(parameter.bound, isTypeName);
     expect(parameter.extendsKeyword, isNotNull);
     expect(parameter.name, isNotNull);
   }
@@ -14459,7 +14373,7 @@
  * The class [FormalParameterParserTestMixin] defines parser tests that test
  * the parsing statements.
  */
-abstract class StatementParserTestMixin implements AbstractParserTestCase {
+mixin StatementParserTestMixin implements AbstractParserTestCase {
   void test_invalid_typeParamAnnotation() {
     parseCompilationUnit('main() { C<@Foo T> v; }',
         errors: usingFastaParser
@@ -15111,7 +15025,7 @@
         as FunctionDeclarationStatement;
     assertNoErrors();
     FunctionDeclaration function = statement.functionDeclaration;
-    expect(function.returnType, new TypeMatcher<GenericFunctionType>());
+    expect(function.returnType, isGenericFunctionType);
   }
 
   void test_parseNonLabeledStatement_null() {
@@ -15155,7 +15069,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    expect(variableList.type, new TypeMatcher<GenericFunctionType>());
+    expect(variableList.type, isGenericFunctionType);
   }
 
   void
@@ -15168,7 +15082,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    expect(variableList.type, new TypeMatcher<GenericFunctionType>());
+    expect(variableList.type, isGenericFunctionType);
   }
 
   void
@@ -15180,7 +15094,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    expect(variableList.type, new TypeMatcher<GenericFunctionType>());
+    expect(variableList.type, isGenericFunctionType);
   }
 
   void
@@ -15192,7 +15106,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    expect(variableList.type, new TypeMatcher<GenericFunctionType>());
+    expect(variableList.type, isGenericFunctionType);
   }
 
   void
@@ -15204,7 +15118,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    expect(variableList.type, new TypeMatcher<GenericFunctionType>());
+    expect(variableList.type, isGenericFunctionType);
   }
 
   void test_parseNonLabeledStatement_variableDeclaration_gftType_returnType() {
@@ -15215,7 +15129,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    expect(variableList.type, new TypeMatcher<GenericFunctionType>());
+    expect(variableList.type, isGenericFunctionType);
   }
 
   void
@@ -15227,7 +15141,7 @@
     List<VariableDeclaration> variables = variableList.variables;
     expect(variables, hasLength(1));
     expect(variables[0].name.name, 'v');
-    expect(variableList.type, new TypeMatcher<GenericFunctionType>());
+    expect(variableList.type, isGenericFunctionType);
   }
 
   void test_parseNonLabeledStatement_variableDeclaration_typeParam() {
@@ -15270,8 +15184,7 @@
     TypeName typeName = variableList.type;
     expect(typeName.name.name, 'C');
     expect(typeName.typeArguments.arguments, hasLength(1));
-    expect(typeName.typeArguments.arguments[0],
-        new TypeMatcher<GenericFunctionType>());
+    expect(typeName.typeArguments.arguments[0], isGenericFunctionType);
   }
 
   void test_parseStatement_emptyTypeArgumentList() {
@@ -15291,7 +15204,7 @@
         parseStatement('void Function<A>(core.List<core.int> x) m() => null;')
             as FunctionDeclarationStatement;
     expect(statement.functionDeclaration.functionExpression.body,
-        new TypeMatcher<ExpressionFunctionBody>());
+        isExpressionFunctionBody);
   }
 
   void test_parseStatement_functionDeclaration_noReturnType() {
@@ -15835,7 +15748,7 @@
  * Tests which exercise the parser using a complete compilation unit or
  * compilation unit member.
  */
-abstract class TopLevelParserTestMixin implements AbstractParserTestCase {
+mixin TopLevelParserTestMixin implements AbstractParserTestCase {
   void test_function_literal_allowed_at_toplevel() {
     parseCompilationUnit("var x = () {};");
   }
@@ -15890,7 +15803,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNotNull);
@@ -15909,7 +15822,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -15929,7 +15842,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -15948,7 +15861,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -15967,7 +15880,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -15987,7 +15900,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -16007,7 +15920,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -16029,7 +15942,7 @@
     {
       var annotation = declaration.metadata[0];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<SimpleIdentifier>());
+      expect(annotation.name, isSimpleIdentifier);
       expect(annotation.name.name, 'A');
       expect(annotation.period, isNull);
       expect(annotation.constructorName, isNull);
@@ -16039,7 +15952,7 @@
     {
       var annotation = declaration.metadata[1];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<SimpleIdentifier>());
+      expect(annotation.name, isSimpleIdentifier);
       expect(annotation.name.name, 'B');
       expect(annotation.period, isNull);
       expect(annotation.constructorName, isNull);
@@ -16050,7 +15963,7 @@
     {
       var annotation = declaration.metadata[2];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<PrefixedIdentifier>());
+      expect(annotation.name, isPrefixedIdentifier);
       expect(annotation.name.name, 'C.foo');
       expect(annotation.period, isNull);
       expect(annotation.constructorName, isNull);
@@ -16061,7 +15974,7 @@
     {
       var annotation = declaration.metadata[3];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<PrefixedIdentifier>());
+      expect(annotation.name, isPrefixedIdentifier);
       expect(annotation.name.name, 'd.E');
       expect(annotation.period, isNotNull);
       expect(annotation.constructorName, isNotNull);
@@ -16082,7 +15995,7 @@
     } else {
       assertNoErrors();
     }
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     NativeClause nativeClause = declaration.nativeClause;
     expect(nativeClause, isNotNull);
@@ -16097,7 +16010,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -16116,7 +16029,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassTypeAlias>());
+    expect(member, isClassTypeAlias);
     ClassTypeAlias typeAlias = member;
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name, isNotNull);
@@ -16134,7 +16047,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassTypeAlias>());
+    expect(member, isClassTypeAlias);
     ClassTypeAlias typeAlias = member;
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name, isNotNull);
@@ -16151,7 +16064,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
@@ -16379,7 +16292,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+    expect(member, isTopLevelVariableDeclaration);
     TopLevelVariableDeclaration declaration = member;
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -16390,7 +16303,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassDeclaration>());
+    expect(member, isClassDeclaration);
     ClassDeclaration declaration = member;
     expect(declaration.name.name, "A");
     expect(declaration.members, hasLength(0));
@@ -16401,7 +16314,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassTypeAlias>());
+    expect(member, isClassTypeAlias);
     ClassTypeAlias declaration = member;
     expect(declaration.name.name, "A");
     expect(declaration.abstractKeyword, isNotNull);
@@ -16412,7 +16325,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+    expect(member, isTopLevelVariableDeclaration);
     TopLevelVariableDeclaration declaration = member;
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -16434,7 +16347,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+    expect(member, isTopLevelVariableDeclaration);
     TopLevelVariableDeclaration declaration = member;
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -16446,7 +16359,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.externalKeyword, isNotNull);
     expect(declaration.functionExpression, isNotNull);
@@ -16458,7 +16371,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.externalKeyword, isNotNull);
     expect(declaration.functionExpression, isNotNull);
@@ -16470,7 +16383,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.returnType, isNull);
     expect(declaration.functionExpression.typeParameters, isNotNull);
@@ -16482,7 +16395,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.returnType, isNull);
     expect(declaration.functionExpression.typeParameters, isNotNull);
@@ -16493,7 +16406,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.returnType, isNotNull);
     expect(declaration.functionExpression.typeParameters, isNotNull);
@@ -16504,7 +16417,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.functionExpression, isNotNull);
     expect(declaration.propertyKeyword, isNull);
@@ -16535,7 +16448,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.functionExpression, isNotNull);
     expect(declaration.propertyKeyword, isNull);
@@ -16546,7 +16459,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.functionExpression, isNotNull);
     expect(declaration.propertyKeyword, isNull);
@@ -16557,7 +16470,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.returnType, isNotNull);
   }
@@ -16567,7 +16480,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.externalKeyword, isNotNull);
     expect(declaration.functionExpression, isNotNull);
@@ -16580,7 +16493,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.externalKeyword, isNotNull);
     expect(declaration.functionExpression, isNotNull);
@@ -16592,7 +16505,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.functionExpression, isNotNull);
     expect(declaration.propertyKeyword, isNotNull);
@@ -16603,7 +16516,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.functionExpression, isNotNull);
     expect(declaration.propertyKeyword, isNotNull);
@@ -16614,7 +16527,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.externalKeyword, isNotNull);
     expect(declaration.functionExpression, isNotNull);
@@ -16626,7 +16539,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.externalKeyword, isNotNull);
     expect(declaration.functionExpression, isNotNull);
@@ -16638,7 +16551,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.functionExpression, isNotNull);
     expect(declaration.propertyKeyword, isNotNull);
@@ -16650,7 +16563,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<FunctionDeclaration>());
+    expect(member, isFunctionDeclaration);
     FunctionDeclaration declaration = member;
     expect(declaration.functionExpression, isNotNull);
     expect(declaration.propertyKeyword, isNotNull);
@@ -16662,7 +16575,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassTypeAlias>());
+    expect(member, isClassTypeAlias);
     ClassTypeAlias typeAlias = member;
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name.name, "C");
@@ -16681,7 +16594,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassTypeAlias>());
+    expect(member, isClassTypeAlias);
     ClassTypeAlias typeAlias = member;
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name.name, "C");
@@ -16699,7 +16612,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassTypeAlias>());
+    expect(member, isClassTypeAlias);
     ClassTypeAlias typeAlias = member;
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name.name, "C");
@@ -16717,7 +16630,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<ClassTypeAlias>());
+    expect(member, isClassTypeAlias);
     ClassTypeAlias typeAlias = member;
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name.name, "C");
@@ -16753,7 +16666,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+    expect(member, isTopLevelVariableDeclaration);
     TopLevelVariableDeclaration declaration = member;
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -16767,7 +16680,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+    expect(member, isTopLevelVariableDeclaration);
     TopLevelVariableDeclaration declaration = member;
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -16784,7 +16697,7 @@
     expect(unit.declarations, hasLength(1));
     TopLevelVariableDeclaration declaration =
         unit.declarations[0] as TopLevelVariableDeclaration;
-    expect(declaration.variables.type, new TypeMatcher<GenericFunctionType>());
+    expect(declaration.variables.type, isGenericFunctionType);
   }
 
   void test_parseCompilationUnitMember_variable_gftType_noReturnType() {
@@ -16809,7 +16722,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+    expect(member, isTopLevelVariableDeclaration);
     TopLevelVariableDeclaration declaration = member;
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -16820,7 +16733,7 @@
     CompilationUnitMember member = parseFullCompilationUnitMember();
     expect(member, isNotNull);
     assertNoErrors();
-    expect(member, new TypeMatcher<TopLevelVariableDeclaration>());
+    expect(member, isTopLevelVariableDeclaration);
     TopLevelVariableDeclaration declaration = member;
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -17250,7 +17163,7 @@
     {
       var annotation = parameters[0].metadata[0];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<SimpleIdentifier>());
+      expect(annotation.name, isSimpleIdentifier);
       expect(annotation.name.name, 'A');
       expect(annotation.period, isNull);
       expect(annotation.constructorName, isNull);
@@ -17260,7 +17173,7 @@
     {
       var annotation = parameters[1].metadata[0];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<SimpleIdentifier>());
+      expect(annotation.name, isSimpleIdentifier);
       expect(annotation.name.name, 'B');
       expect(annotation.period, isNull);
       expect(annotation.constructorName, isNull);
@@ -17271,7 +17184,7 @@
     {
       var annotation = parameters[2].metadata[0];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<PrefixedIdentifier>());
+      expect(annotation.name, isPrefixedIdentifier);
       expect(annotation.name.name, 'C.foo');
       expect(annotation.period, isNull);
       expect(annotation.constructorName, isNull);
@@ -17282,7 +17195,7 @@
     {
       var annotation = parameters[3].metadata[0];
       expect(annotation.atSign, isNotNull);
-      expect(annotation.name, new TypeMatcher<PrefixedIdentifier>());
+      expect(annotation.name, isPrefixedIdentifier);
       expect(annotation.name.name, 'd.E');
       expect(annotation.period, isNotNull);
       expect(annotation.constructorName, isNotNull);
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 2c0bdfd..0558400 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -413,7 +413,7 @@
  * Instances of the class `StaticTypeVerifier` verify that all of the nodes in an AST
  * structure that should have a static type associated with them do have a static type.
  */
-class StaticTypeVerifier extends GeneralizingAstVisitor<Object> {
+class StaticTypeVerifier extends GeneralizingAstVisitor<void> {
   /**
    * A list containing all of the AST Expression nodes that were not resolved.
    */
@@ -479,19 +479,19 @@
   }
 
   @override
-  Object visitBreakStatement(BreakStatement node) => null;
+  void visitBreakStatement(BreakStatement node) {}
 
   @override
-  Object visitCommentReference(CommentReference node) => null;
+  void visitCommentReference(CommentReference node) {}
 
   @override
-  Object visitContinueStatement(ContinueStatement node) => null;
+  void visitContinueStatement(ContinueStatement node) {}
 
   @override
-  Object visitExportDirective(ExportDirective node) => null;
+  void visitExportDirective(ExportDirective node) {}
 
   @override
-  Object visitExpression(Expression node) {
+  void visitExpression(Expression node) {
     node.visitChildren(this);
     DartType staticType = node.staticType;
     if (staticType == null) {
@@ -499,66 +499,65 @@
     } else {
       _resolvedExpressionCount++;
     }
-    return null;
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) => null;
+  void visitImportDirective(ImportDirective node) {}
 
   @override
-  Object visitLabel(Label node) => null;
+  void visitLabel(Label node) {}
 
   @override
-  Object visitLibraryIdentifier(LibraryIdentifier node) => null;
+  void visitLibraryIdentifier(LibraryIdentifier node) {}
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     // In cases where we have a prefixed identifier where the prefix is dynamic,
     // we don't want to assert that the node will have a type.
     if (node.staticType == null &&
         resolutionMap.staticTypeForExpression(node.prefix).isDynamic) {
-      return null;
+      return;
     }
-    return super.visitPrefixedIdentifier(node);
+    super.visitPrefixedIdentifier(node);
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     // In cases where identifiers are being used for something other than an
     // expressions, then they can be ignored.
     AstNode parent = node.parent;
     if (parent is MethodInvocation && identical(node, parent.methodName)) {
-      return null;
+      return;
     } else if (parent is RedirectingConstructorInvocation &&
         identical(node, parent.constructorName)) {
-      return null;
+      return;
     } else if (parent is SuperConstructorInvocation &&
         identical(node, parent.constructorName)) {
-      return null;
+      return;
     } else if (parent is ConstructorName && identical(node, parent.name)) {
-      return null;
+      return;
     } else if (parent is ConstructorFieldInitializer &&
         identical(node, parent.fieldName)) {
-      return null;
+      return;
     } else if (node.staticElement is PrefixElement) {
       // Prefixes don't have a type.
-      return null;
+      return;
     }
-    return super.visitSimpleIdentifier(node);
+    super.visitSimpleIdentifier(node);
   }
 
   @override
-  Object visitTypeAnnotation(TypeAnnotation node) {
+  void visitTypeAnnotation(TypeAnnotation node) {
     if (node.type == null) {
       _unresolvedTypes.add(node);
     } else {
       _resolvedTypeCount++;
     }
-    return super.visitTypeAnnotation(node);
+    super.visitTypeAnnotation(node);
   }
 
   @override
-  Object visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     // Note: do not visit children from this node, the child SimpleIdentifier in
     // TypeName (i.e. "String") does not have a static type defined.
     // TODO(brianwilkerson) Not visiting the children means that we won't catch
@@ -568,7 +567,6 @@
     } else {
       _resolvedTypeCount++;
     }
-    return null;
   }
 
   String _getFileName(AstNode node) {
@@ -856,77 +854,6 @@
     }
   }
 
-  test_functionExpression_asInvocationArgument() async {
-    if (previewDart2) {
-      return;
-    }
-    String code = r'''
-class MyMap<K, V> {
-  forEach(f(K key, V value)) {}
-}
-f(MyMap<int, String> m) {
-  m.forEach((k, v) {
-    k;
-    v;
-  });
-}''';
-    Source source = addSource(code);
-    CompilationUnit unit = await _computeResolvedUnit(source);
-    // k
-    SimpleIdentifier kIdentifier = EngineTestCase.findNode(
-        unit, code, "k;", (node) => node is SimpleIdentifier);
-    expect(kIdentifier.staticType, typeProvider.dynamicType);
-    // v
-    SimpleIdentifier vIdentifier = EngineTestCase.findNode(
-        unit, code, "v;", (node) => node is SimpleIdentifier);
-    expect(vIdentifier.staticType, typeProvider.dynamicType);
-  }
-
-  test_functionExpression_asInvocationArgument_functionExpressionInvocation() async {
-    if (previewDart2) {
-      return;
-    }
-    String code = r'''
-main() {
-  (f(String value)) {} ((v) {
-    v;
-  });
-}''';
-    Source source = addSource(code);
-    CompilationUnit unit = await _computeResolvedUnit(source);
-    // v
-    FormalParameter vParameter = EngineTestCase.findNode(
-        unit, code, "v)", (node) => node is FormalParameter);
-    expect(vParameter.identifier.staticType, typeProvider.dynamicType);
-    SimpleIdentifier vIdentifier = EngineTestCase.findNode(
-        unit, code, "v;", (node) => node is SimpleIdentifier);
-    expect(vIdentifier.staticType, typeProvider.dynamicType);
-  }
-
-  test_functionExpression_asInvocationArgument_keepIfLessSpecific() async {
-    if (previewDart2) {
-      return;
-    }
-    String code = r'''
-class MyList {
-  forEach(f(Object value)) {}
-}
-f(MyList list) {
-  list.forEach((int v) {
-    v;
-  });
-}''';
-    Source source = addSource(code);
-    CompilationUnit unit = await _computeResolvedUnit(source);
-    // v
-    FormalParameter vParameter = EngineTestCase.findNode(
-        unit, code, "v)", (node) => node is SimpleFormalParameter);
-    expect(vParameter.identifier.staticType, typeProvider.intType);
-    SimpleIdentifier vIdentifier = EngineTestCase.findNode(
-        unit, code, "v;", (node) => node is SimpleIdentifier);
-    expect(vIdentifier.staticType, typeProvider.intType);
-  }
-
   test_functionExpression_asInvocationArgument_notSubtypeOfStaticType() async {
     String code = r'''
 class A {
@@ -946,50 +873,6 @@
         same(0));
   }
 
-  test_functionExpression_asInvocationArgument_replaceIfMoreSpecific() async {
-    if (previewDart2) {
-      return;
-    }
-    String code = r'''
-class MyList<E> {
-  forEach(f(E value)) {}
-}
-f(MyList<String> list) {
-  list.forEach((Object v) {
-    v;
-  });
-}''';
-    Source source = addSource(code);
-    CompilationUnit unit = await _computeResolvedUnit(source);
-    // v
-    FormalParameter vParameter = EngineTestCase.findNode(
-        unit, code, "v)", (node) => node is SimpleFormalParameter);
-    expect(vParameter.identifier.staticType, typeProvider.objectType);
-  }
-
-  test_initializer() async {
-    if (previewDart2) {
-      return;
-    }
-    Source source = addSource(r'''
-f() {
-  var v = 0;
-  return v;
-}''');
-    CompilationUnit unit = await _computeResolvedUnit(source);
-    FunctionDeclaration function = unit.declarations[0] as FunctionDeclaration;
-    BlockFunctionBody body =
-        function.functionExpression.body as BlockFunctionBody;
-    NodeList<Statement> statements = body.block.statements;
-    // Type of 'v' in declaration.
-    {
-      VariableDeclarationStatement statement =
-          statements[0] as VariableDeclarationStatement;
-      SimpleIdentifier variableName = statement.variables.variables[0].name;
-      expect(variableName.staticType, typeProvider.dynamicType);
-    }
-  }
-
   test_initializer_hasStaticType() async {
     Source source = addSource(r'''
 f() {
@@ -1168,23 +1051,6 @@
     expect(getter.staticType, typeProvider.dynamicType);
   }
 
-  test_objectAccessInference_enabled_for_cascades() async {
-    if (previewDart2) {
-      return;
-    }
-    String name = 'hashCode';
-    String code = '''
-main() {
-  dynamic obj;
-  obj..$name..$name; // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    PropertyAccess access =
-        findMarkedIdentifier(code, unit, "; // marker").parent;
-    expect(access.staticType, typeProvider.dynamicType);
-    expect(access.realTarget.staticType, typeProvider.dynamicType);
-  }
-
   test_objectMethodInference_disabled_for_library_prefix() async {
     String name = 'toString';
     addNamedSource('/helper.dart', '''
@@ -1223,38 +1089,6 @@
     expect(methodInvoke.staticType, typeProvider.dynamicType);
   }
 
-  test_objectMethodInference_enabled_for_cascades() async {
-    if (previewDart2) {
-      return;
-    }
-    String name = 'toString';
-    String code = '''
-main() {
-  dynamic obj;
-  obj..$name()..$name(); // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    SimpleIdentifier methodName =
-        findMarkedIdentifier(code, unit, "(); // marker");
-    MethodInvocation methodInvoke = methodName.parent;
-
-    expect(methodInvoke.staticType, typeProvider.dynamicType);
-    expect(methodInvoke.realTarget.staticType, typeProvider.dynamicType);
-  }
-
-  test_propagatedReturnType_localFunction() async {
-    if (previewDart2) {
-      return;
-    }
-    String code = r'''
-main() {
-  f() => 42;
-  var v = f();
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.dynamicType);
-  }
-
   /**
    * Return the resolved unit for the given [source].
    *
@@ -1293,6 +1127,7 @@
         _classElement("Iterable", objectType, ["T"]).type;
     InterfaceType listType = _classElement("List", objectType, ["E"]).type;
     InterfaceType mapType = _classElement("Map", objectType, ["K", "V"]).type;
+    InterfaceType setType = _classElement("Set", objectType, ["E"]).type;
     InterfaceType stackTraceType = _classElement("StackTrace", objectType).type;
     InterfaceType streamType = _classElement("Stream", objectType, ["T"]).type;
     InterfaceType stringType = _classElement("String", objectType).type;
@@ -1307,24 +1142,28 @@
       iterableType.element,
       listType.element,
       mapType.element,
+      setType.element,
       objectType.element,
       stackTraceType.element,
       stringType.element,
       symbolType.element,
       typeType.element
     ];
+    coreUnit.source = new TestSource('dart:core');
+    coreUnit.librarySource = coreUnit.source;
     CompilationUnitElementImpl asyncUnit = new CompilationUnitElementImpl();
     asyncUnit.types = <ClassElement>[
       futureType.element,
       futureOrType.element,
       streamType.element
     ];
-    AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
+    asyncUnit.source = new TestSource('dart:async');
+    asyncUnit.librarySource = asyncUnit.source;
     LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
-        context, AstTestFactory.libraryIdentifier2(["dart.core"]));
+        null, null, AstTestFactory.libraryIdentifier2(["dart.core"]));
     coreLibrary.definingCompilationUnit = coreUnit;
     LibraryElementImpl asyncLibrary = new LibraryElementImpl.forNode(
-        context, AstTestFactory.libraryIdentifier2(["dart.async"]));
+        null, null, AstTestFactory.libraryIdentifier2(["dart.async"]));
     asyncLibrary.definingCompilationUnit = asyncUnit;
     //
     // Create a type provider and ensure that it can return the expected types.
@@ -1425,7 +1264,7 @@
         resourceProvider: resourceProvider);
     Source librarySource = new FileSource(getFile("/lib.dart"));
     LibraryElementImpl element = new LibraryElementImpl.forNode(
-        context, AstTestFactory.libraryIdentifier2(["lib"]));
+        context, null, AstTestFactory.libraryIdentifier2(["lib"]));
     element.definingCompilationUnit = new CompilationUnitElementImpl();
     _typeProvider = new TestTypeProvider();
     libraryScope = new LibraryScope(element);
@@ -1462,7 +1301,7 @@
       InternalAnalysisContext context = AnalysisContextFactory.contextWithCore(
           resourceProvider: resourceProvider);
       var source = getFile('/test.dart').createSource();
-      var libraryElement = new LibraryElementImpl.forNode(context, null)
+      var libraryElement = new LibraryElementImpl.forNode(context, null, null)
         ..definingCompilationUnit = unitElement;
       var libraryScope = new LibraryScope(libraryElement);
       var visitor = new TypeResolverVisitor(
@@ -2332,7 +2171,7 @@
       InternalAnalysisContext context = AnalysisContextFactory.contextWithCore(
           resourceProvider: resourceProvider);
       var source = getFile('/test.dart').createSource();
-      var libraryElement = new LibraryElementImpl.forNode(context, null)
+      var libraryElement = new LibraryElementImpl.forNode(context, null, null)
         ..definingCompilationUnit = unitElement;
       libraryScope = new LibraryScope(libraryElement);
       visitor = new TypeResolverVisitor(
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index d7a954d..485d871 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -1,9 +1,10 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
@@ -11,9 +12,10 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/error/codes.dart';
@@ -26,11 +28,10 @@
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 
-import '../src/context/mock_sdk.dart';
 import 'analysis_context_factory.dart';
 import 'test_support.dart';
 
@@ -38,7 +39,7 @@
  * An AST visitor used to verify that all of the nodes in an AST structure that
  * should have been resolved were resolved.
  */
-class ResolutionVerifier extends RecursiveAstVisitor<Object> {
+class ResolutionVerifier extends RecursiveAstVisitor<void> {
   /**
    * A set containing nodes that are known to not be resolvable and should
    * therefore not cause the test to fail.
@@ -88,7 +89,7 @@
   }
 
   @override
-  Object visitAnnotation(Annotation node) {
+  void visitAnnotation(Annotation node) {
     node.visitChildren(this);
     ElementAnnotation elementAnnotation = node.elementAnnotation;
     if (elementAnnotation == null) {
@@ -98,154 +99,153 @@
     } else if (elementAnnotation is! ElementAnnotation) {
       _wrongTypedNodes.add(node);
     }
-    return null;
   }
 
   @override
-  Object visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     node.visitChildren(this);
     if (!node.operator.isUserDefinableOperator) {
-      return null;
+      return;
     }
     DartType operandType = node.leftOperand.staticType;
     if (operandType == null || operandType.isDynamic) {
-      return null;
+      return;
     }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
+    _checkResolved(node, node.staticElement, (node) => node is MethodElement);
   }
 
   @override
-  Object visitCommentReference(CommentReference node) => null;
+  void visitCommentReference(CommentReference node) {}
 
   @override
-  Object visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     node.visitChildren(this);
-    return _checkResolved(
+    _checkResolved(
         node, node.declaredElement, (node) => node is CompilationUnitElement);
   }
 
   @override
-  Object visitExportDirective(ExportDirective node) =>
-      _checkResolved(node, node.element, (node) => node is ExportElement);
+  void visitExportDirective(ExportDirective node) {
+    _checkResolved(node, node.element, (node) => node is ExportElement);
+  }
 
   @override
-  Object visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     node.visitChildren(this);
     if (node.declaredElement is LibraryElement) {
       _wrongTypedNodes.add(node);
     }
-    return null;
   }
 
   @override
-  Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     node.visitChildren(this);
     // TODO(brianwilkerson) If we start resolving function expressions, then
     // conditionally check to see whether the node was resolved correctly.
-    return null;
     //checkResolved(node, node.getElement(), FunctionElement.class);
   }
 
   @override
-  Object visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     // Not sure how to test the combinators given that it isn't an error if the
     // names are not defined.
     _checkResolved(node, node.element, (node) => node is ImportElement);
     SimpleIdentifier prefix = node.prefix;
     if (prefix == null) {
-      return null;
+      return;
     }
-    return _checkResolved(
+    _checkResolved(
         prefix, prefix.staticElement, (node) => node is PrefixElement);
   }
 
   @override
-  Object visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     node.visitChildren(this);
     DartType targetType = node.realTarget.staticType;
     if (targetType == null || targetType.isDynamic) {
-      return null;
+      return;
     }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
+    _checkResolved(node, node.staticElement, (node) => node is MethodElement);
   }
 
   @override
-  Object visitLibraryDirective(LibraryDirective node) =>
-      _checkResolved(node, node.element, (node) => node is LibraryElement);
+  void visitLibraryDirective(LibraryDirective node) {
+    _checkResolved(node, node.element, (node) => node is LibraryElement);
+  }
 
   @override
-  Object visitNamedExpression(NamedExpression node) =>
-      node.expression.accept(this);
+  void visitNamedExpression(NamedExpression node) {
+    node.expression.accept(this);
+  }
 
   @override
-  Object visitPartDirective(PartDirective node) => _checkResolved(
-      node, node.element, (node) => node is CompilationUnitElement);
+  void visitPartDirective(PartDirective node) {
+    _checkResolved(
+        node, node.element, (node) => node is CompilationUnitElement);
+  }
 
   @override
-  Object visitPartOfDirective(PartOfDirective node) =>
-      _checkResolved(node, node.element, (node) => node is LibraryElement);
+  void visitPartOfDirective(PartOfDirective node) {
+    _checkResolved(node, node.element, (node) => node is LibraryElement);
+  }
 
   @override
-  Object visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     node.visitChildren(this);
     if (!node.operator.isUserDefinableOperator) {
-      return null;
+      return;
     }
     DartType operandType = node.operand.staticType;
     if (operandType == null || operandType.isDynamic) {
-      return null;
+      return;
     }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
+    _checkResolved(node, node.staticElement, (node) => node is MethodElement);
   }
 
   @override
-  Object visitPrefixedIdentifier(PrefixedIdentifier node) {
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
     SimpleIdentifier prefix = node.prefix;
     prefix.accept(this);
     DartType prefixType = prefix.staticType;
     if (prefixType == null || prefixType.isDynamic) {
-      return null;
+      return;
     }
-    return _checkResolved(node, node.staticElement, null);
+    _checkResolved(node, node.staticElement, null);
   }
 
   @override
-  Object visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     node.visitChildren(this);
     if (!node.operator.isUserDefinableOperator) {
-      return null;
+      return;
     }
     DartType operandType = node.operand.staticType;
     if (operandType == null || operandType.isDynamic) {
-      return null;
+      return;
     }
-    return _checkResolved(
-        node, node.staticElement, (node) => node is MethodElement);
+    _checkResolved(node, node.staticElement, (node) => node is MethodElement);
   }
 
   @override
-  Object visitPropertyAccess(PropertyAccess node) {
+  void visitPropertyAccess(PropertyAccess node) {
     Expression target = node.realTarget;
     target.accept(this);
     DartType targetType = target.staticType;
     if (targetType == null || targetType.isDynamic) {
-      return null;
+      return;
     }
-    return node.propertyName.accept(this);
+    node.propertyName.accept(this);
   }
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.name == "void") {
-      return null;
+      return;
     }
     if (resolutionMap.staticTypeForExpression(node) != null &&
         resolutionMap.staticTypeForExpression(node).isDynamic &&
         node.staticElement == null) {
-      return null;
+      return;
     }
     AstNode parent = node.parent;
     if (parent is MethodInvocation) {
@@ -254,14 +254,14 @@
         Expression target = invocation.realTarget;
         DartType targetType = target == null ? null : target.staticType;
         if (targetType == null || targetType.isDynamic) {
-          return null;
+          return;
         }
       }
     }
-    return _checkResolved(node, node.staticElement, null);
+    _checkResolved(node, node.staticElement, null);
   }
 
-  Object _checkResolved(
+  void _checkResolved(
       AstNode node, Element element, Predicate<Element> predicate) {
     if (element == null) {
       if (_knownExceptions == null || !_knownExceptions.contains(node)) {
@@ -272,7 +272,6 @@
         _wrongTypedNodes.add(node);
       }
     }
-    return null;
   }
 
   String _getFileName(AstNode node) {
@@ -310,12 +309,7 @@
   }
 }
 
-class ResolverTestCase extends EngineTestCase {
-  /**
-   * The resource provider used by the test case.
-   */
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class ResolverTestCase extends EngineTestCase with ResourceProviderMixin {
   /**
    * The analysis context used to parse the compilation units being resolved.
    */
@@ -348,10 +342,13 @@
    */
   AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
 
-  bool get enableNewAnalysisDriver => false;
+  /**
+   * Return the list of experiments that are to be enabled for tests in this
+   * class.
+   */
+  List<String> get enabledExperiments => null;
 
-  /// TODO(brianwilkerson) Remove this getter.
-  bool get previewDart2 => true;
+  bool get enableNewAnalysisDriver => false;
 
   /**
    * Return a type provider that can be used to test the results of resolution.
@@ -362,7 +359,7 @@
   TypeProvider get typeProvider {
     if (enableNewAnalysisDriver) {
       if (analysisResults.isEmpty) {
-        fail('typeProvider can be called after computing an analysis result.');
+        fail('typeProvider called before computing an analysis result.');
       }
       return analysisResults
           .values.first.unit.declaredElement.context.typeProvider;
@@ -373,10 +370,17 @@
 
   /**
    * Return a type system that can be used to test the results of resolution.
-   *
-   * @return a type system
    */
-  TypeSystem get typeSystem => analysisContext2.typeSystem;
+  TypeSystem get typeSystem {
+    if (enableNewAnalysisDriver) {
+      if (analysisResults.isEmpty) {
+        fail('typeSystem called before computing an analysis result.');
+      }
+      return analysisResults.values.first.typeSystem;
+    } else {
+      return analysisContext2.typeSystem;
+    }
+  }
 
   /**
    * Add a source file with the given [filePath] in the root of the file system.
@@ -384,8 +388,8 @@
    * set in the content provider. Return the source representing the added file.
    */
   Source addNamedSource(String filePath, String contents) {
-    filePath = resourceProvider.convertPath(filePath);
-    File file = resourceProvider.newFile(filePath, contents);
+    filePath = convertPath(filePath);
+    File file = newFile(filePath, content: contents);
     Source source = file.createSource();
     if (enableNewAnalysisDriver) {
       driver.addFile(filePath);
@@ -452,7 +456,7 @@
    * Like [assertErrors], but takes a string of source code.
    */
   // TODO(rnystrom): Use this in more tests that have the same structure.
-  Future<Null> assertErrorsInCode(String code, List<ErrorCode> errors,
+  Future<void> assertErrorsInCode(String code, List<ErrorCode> errors,
       {bool verify: true}) async {
     Source source = addSource(code);
     await computeAnalysisResult(source);
@@ -467,7 +471,7 @@
    *
    * Like [assertErrors], but takes a string of source code.
    */
-  Future<Null> assertErrorsInUnverifiedCode(
+  Future<void> assertErrorsInUnverifiedCode(
       String code, List<ErrorCode> errors) async {
     Source source = addSource(code);
     await computeAnalysisResult(source);
@@ -489,7 +493,7 @@
    * Asserts that [code] has no errors or warnings.
    */
   // TODO(rnystrom): Use this in more tests that have the same structure.
-  Future<Null> assertNoErrorsInCode(String code) async {
+  Future<void> assertNoErrorsInCode(String code) async {
     Source source = addSource(code);
     await computeAnalysisResult(source);
     assertNoErrors(source);
@@ -529,9 +533,9 @@
   Future<TestAnalysisResult> computeAnalysisResult(Source source) async {
     TestAnalysisResult analysisResult;
     if (enableNewAnalysisDriver) {
-      AnalysisResult result = await driver.getResult(source.fullName);
-      analysisResult =
-          new TestAnalysisResult(source, result.unit, result.errors);
+      ResolvedUnitResult result = await driver.getResult(source.fullName);
+      analysisResult = new TestAnalysisResult(
+          source, result.unit, result.errors, result.typeSystem);
     } else {
       analysisContext2.computeKindOf(source);
       List<Source> libraries = analysisContext2.getLibrariesContaining(source);
@@ -539,7 +543,8 @@
         CompilationUnit unit =
             analysisContext.resolveCompilationUnit2(source, libraries.first);
         List<AnalysisError> errors = analysisContext.computeErrors(source);
-        analysisResult = new TestAnalysisResult(source, unit, errors);
+        analysisResult = new TestAnalysisResult(
+            source, unit, errors, analysisContext2.typeSystem);
       }
     }
     analysisResults[source] = analysisResult;
@@ -570,7 +575,7 @@
    * give it an empty content. Return the source that was created.
    */
   Source createNamedSource(String fileName) {
-    Source source = resourceProvider.getFile(fileName).createSource();
+    Source source = getFile(fileName).createSource();
     analysisContext2.setContents(source, '');
     return source;
   }
@@ -585,7 +590,7 @@
   LibraryElementImpl createTestLibrary(
       AnalysisContext context, String libraryName,
       [List<String> typeNames]) {
-    String fileName = resourceProvider.convertPath("/test/$libraryName.dart");
+    String fileName = convertPath("/test/$libraryName.dart");
     Source definingCompilationUnitSource = createNamedSource(fileName);
     List<CompilationUnitElement> sourcedCompilationUnits;
     if (typeNames == null) {
@@ -611,7 +616,9 @@
     compilationUnit.librarySource =
         compilationUnit.source = definingCompilationUnitSource;
     LibraryElementImpl library = new LibraryElementImpl.forNode(
-        context, AstTestFactory.libraryIdentifier2([libraryName]));
+        context,
+        driver?.currentSession,
+        AstTestFactory.libraryIdentifier2([libraryName]));
     library.definingCompilationUnit = compilationUnit;
     library.parts = sourcedCompilationUnits;
     return library;
@@ -662,6 +669,10 @@
       fail('Only packages or options can be specified.');
     }
     options ??= defaultAnalysisOptions;
+    List<String> experiments = enabledExperiments;
+    if (experiments != null) {
+      (options as AnalysisOptionsImpl).enabledExperiments = experiments;
+    }
     if (enableNewAnalysisDriver) {
       DartSdk sdk = new MockSdk(resourceProvider: resourceProvider)
         ..context.analysisOptions = options;
@@ -674,10 +685,8 @@
         var packageMap = <String, List<Folder>>{};
         packages.forEach((args) {
           String name = args[0];
-          String path =
-              resourceProvider.convertPath('/packages/$name/$name.dart');
           String content = args[1];
-          File file = resourceProvider.newFile(path, content);
+          File file = newFile('/packages/$name/$name.dart', content: content);
           packageMap[name] = <Folder>[file.parent];
         });
         resolvers.add(new PackageMapUriResolver(resourceProvider, packageMap));
@@ -702,7 +711,7 @@
         packages.forEach((args) {
           String name = args[0];
           String content = args[1];
-          packageMap['package:$name/$name.dart'] = content;
+          packageMap[name] = content;
         });
         analysisContext2 = AnalysisContextFactory.contextWithCoreAndPackages(
             packageMap,
@@ -764,7 +773,7 @@
     return null;
   }
 
-  Future<Null> resolveWithAndWithoutExperimental(
+  Future<void> resolveWithAndWithoutExperimental(
       List<String> strSources,
       List<ErrorCode> codesWithoutExperimental,
       List<ErrorCode> codesWithExperimental) async {
@@ -786,7 +795,7 @@
     verify([source]);
   }
 
-  Future<Null> resolveWithErrors(
+  Future<void> resolveWithErrors(
       List<String> strSources, List<ErrorCode> codes) async {
     Source source = await resolveSources(strSources);
     assertErrors(source, codes);
@@ -832,6 +841,19 @@
   CompilationUnit testUnit;
 
   /**
+   * Find the expression that starts at the offset of [search] and validate its
+   * that its static type matches the given [type].
+   *
+   * If [type] is a string, validates that the expression's static type
+   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
+   * to match the type.
+   */
+  void expectExpressionType(String search, type) {
+    Expression expression = findExpression(search);
+    _expectType(expression.staticType, type);
+  }
+
+  /**
    * Looks up the identifier with [name] and validates that its type type
    * stringifies to [type] and that its generics match the given stringified
    * output.
@@ -889,18 +911,22 @@
   void expectInitializerType(String name, type) {
     SimpleIdentifier identifier = findIdentifier(name);
     VariableDeclaration declaration =
-        identifier.getAncestor((node) => node is VariableDeclaration);
+        identifier.thisOrAncestorOfType<VariableDeclaration>();
     Expression initializer = declaration.initializer;
     _expectType(initializer.staticType, type);
   }
 
-  SimpleIdentifier findIdentifier(String search) {
-    SimpleIdentifier identifier = EngineTestCase.findNode(
-        testUnit, testCode, search, (node) => node is SimpleIdentifier);
-    return identifier;
+  Expression findExpression(String search) {
+    return EngineTestCase.findNode(
+        testUnit, testCode, search, (node) => node is Expression);
   }
 
-  Future<Null> resolveTestUnit(String code, {bool noErrors: true}) async {
+  SimpleIdentifier findIdentifier(String search) {
+    return EngineTestCase.findNode(
+        testUnit, testCode, search, (node) => node is SimpleIdentifier);
+  }
+
+  Future<void> resolveTestUnit(String code, {bool noErrors: true}) async {
     testCode = code;
     testSource = addSource(testCode);
     TestAnalysisResult analysisResult = await computeAnalysisResult(testSource);
@@ -930,6 +956,7 @@
   final Source source;
   final CompilationUnit unit;
   final List<AnalysisError> errors;
+  final TypeSystem typeSystem;
 
-  TestAnalysisResult(this.source, this.unit, this.errors);
+  TestAnalysisResult(this.source, this.unit, this.errors, this.typeSystem);
 }
diff --git a/pkg/analyzer/test/generated/sdk_test.dart b/pkg/analyzer/test/generated/sdk_test.dart
index f311ea9..6dae63b 100644
--- a/pkg/analyzer/test/generated/sdk_test.dart
+++ b/pkg/analyzer/test/generated/sdk_test.dart
@@ -4,10 +4,11 @@
 
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/context/mock_sdk.dart';
 import 'test_support.dart';
 
 main() {
@@ -18,14 +19,14 @@
 }
 
 @reflectiveTest
-class DartSdkManagerTest extends EngineTestCase {
+class DartSdkManagerTest extends EngineTestCase with ResourceProviderMixin {
   void test_anySdk() {
     DartSdkManager manager = new DartSdkManager('/a/b/c', false);
     expect(manager.anySdk, isNull);
 
     AnalysisOptions options = new AnalysisOptionsImpl();
     SdkDescription description = new SdkDescription(<String>['/c/d'], options);
-    DartSdk sdk = new MockSdk();
+    DartSdk sdk = new MockSdk(resourceProvider: resourceProvider);
     manager.getSdk(description, () => sdk);
     expect(manager.anySdk, same(sdk));
   }
@@ -34,11 +35,11 @@
     DartSdkManager manager = new DartSdkManager('/a/b/c', false);
     AnalysisOptions options = new AnalysisOptionsImpl();
     SdkDescription description1 = new SdkDescription(<String>['/c/d'], options);
-    DartSdk sdk1 = new MockSdk();
+    DartSdk sdk1 = new MockSdk(resourceProvider: resourceProvider);
     DartSdk result1 = manager.getSdk(description1, () => sdk1);
     expect(result1, same(sdk1));
     SdkDescription description2 = new SdkDescription(<String>['/e/f'], options);
-    DartSdk sdk2 = new MockSdk();
+    DartSdk sdk2 = new MockSdk(resourceProvider: resourceProvider);
     DartSdk result2 = manager.getSdk(description2, () => sdk2);
     expect(result2, same(sdk2));
 
@@ -50,7 +51,7 @@
     DartSdkManager manager = new DartSdkManager('/a/b/c', false);
     AnalysisOptions options = new AnalysisOptionsImpl();
     SdkDescription description = new SdkDescription(<String>['/c/d'], options);
-    DartSdk sdk = new MockSdk();
+    DartSdk sdk = new MockSdk(resourceProvider: resourceProvider);
     DartSdk result = manager.getSdk(description, () => sdk);
     expect(result, same(sdk));
     manager.getSdk(description, _failIfAbsent);
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
index 3d64b48..634605f 100644
--- a/pkg/analyzer/test/generated/simple_resolver_test.dart
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -142,7 +142,7 @@
     }
     // get parameter
     Expression rhs = assignment.rightHandSide;
-    expect(rhs.staticParameterElement, previewDart2 ? isNotNull : isNull);
+    expect(rhs.staticParameterElement, isNotNull);
   }
 
   test_argumentResolution_setter_propagated_propertyAccess() async {
@@ -166,7 +166,7 @@
     }
     // get parameter
     Expression rhs = assignment.rightHandSide;
-    expect(rhs.staticParameterElement, previewDart2 ? isNotNull : isNull);
+    expect(rhs.staticParameterElement, isNotNull);
   }
 
   test_argumentResolution_setter_static() async {
@@ -376,42 +376,6 @@
     verify([source]);
   }
 
-  test_commentReference_class() async {
-    Source source = addSource(r'''
-f() {}
-/** [A] [new A] [A.n] [new A.n] [m] [f] */
-class A {
-  A() {}
-  A.n() {}
-  m() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_commentReference_parameter() async {
-    Source source = addSource(r'''
-class A {
-  A() {}
-  A.n() {}
-  /** [e] [f] */
-  m(e, f()) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_commentReference_singleLine() async {
-    Source source = addSource(r'''
-/// [A]
-class A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_continueTarget_labeled() async {
     // Verify that the target of the label is correctly found and is recorded
     // as the unlabeled portion of the statement.
@@ -1165,20 +1129,19 @@
     await computeAnalysisResult(source);
     assertNoErrors(source);
     verify([source]);
+
     CompilationUnit unit = resolveCompilationUnit(source, library);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(2));
-    Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
-        .variables
-        .variables[0]
-        .name
-        .staticElement;
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
-        PropertyInducingElement, expectedElement);
-    expectedElement = (expectedElement as PropertyInducingElement).getter;
-    Element actualElement =
-        (declarations[1] as ClassDeclaration).metadata[0].name.staticElement;
-    expect(actualElement, same(expectedElement));
+
+    TopLevelVariableDeclaration variableDeclaration = declarations[0];
+    ClassDeclaration classDeclaration = declarations[1];
+
+    PropertyInducingElement expectedElement =
+        variableDeclaration.variables.variables[0].name.staticElement;
+
+    Element actualElement = classDeclaration.metadata[0].name.staticElement;
+    expect(actualElement, same(expectedElement.getter));
   }
 
   test_metadata_field() async {
@@ -1371,17 +1334,15 @@
     CompilationUnit unit = resolveCompilationUnit(source, library);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(2));
-    Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
-        .variables
-        .variables[0]
-        .name
-        .staticElement;
-    EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
-        PropertyInducingElement, expectedElement);
-    expectedElement = (expectedElement as PropertyInducingElement).getter;
-    Element actualElement =
-        (declarations[1] as FunctionTypeAlias).metadata[0].name.staticElement;
-    expect(actualElement, same(expectedElement));
+
+    TopLevelVariableDeclaration variableDeclaration = declarations[0];
+    FunctionTypeAlias functionTypeAlias = declarations[1];
+
+    PropertyInducingElement expectedElement =
+        variableDeclaration.variables.variables[0].name.staticElement;
+
+    Element actualElement = functionTypeAlias.metadata[0].name.staticElement;
+    expect(actualElement, same(expectedElement.getter));
   }
 
   test_method_fromMixin() async {
@@ -1717,7 +1678,7 @@
 }
 
 class _SimpleResolverTest_localVariable_types_invoked
-    extends RecursiveAstVisitor<Object> {
+    extends RecursiveAstVisitor<void> {
   final SimpleResolverTest test;
 
   List<bool> found;
@@ -1729,25 +1690,20 @@
       : super();
 
   @override
-  Object visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.name == "myVar" && node.parent is MethodInvocation) {
       try {
         found[0] = true;
         // check static type
         DartType staticType = node.staticType;
-        if (test.previewDart2) {
-          expect(staticType is FunctionType, isTrue);
-          FunctionType functionType = staticType;
-          expect(
-              functionType.parameters[0].type, same(test.typeProvider.intType));
-          expect(functionType.returnType, same(test.typeProvider.stringType));
-        } else {
-          expect(staticType, same(test.typeProvider.dynamicType));
-        }
+        expect(staticType is FunctionType, isTrue);
+        FunctionType functionType = staticType;
+        expect(
+            functionType.parameters[0].type, same(test.typeProvider.intType));
+        expect(functionType.returnType, same(test.typeProvider.stringType));
       } on AnalysisException catch (e, stackTrace) {
         thrownException[0] = new CaughtException(e, stackTrace);
       }
     }
-    return null;
   }
 }
diff --git a/pkg/analyzer/test/generated/source_factory_test.dart b/pkg/analyzer/test/generated/source_factory_test.dart
index 09a3c10..767de68 100644
--- a/pkg/analyzer/test/generated/source_factory_test.dart
+++ b/pkg/analyzer/test/generated/source_factory_test.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/src/generated/utilities_dart.dart' as utils;
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/source/source_resource.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:package_config/packages.dart';
 import 'package:package_config/packages_file.dart' as pkgfile show parse;
 import 'package:package_config/src/packages_impl.dart';
@@ -217,9 +218,7 @@
 }
 
 @reflectiveTest
-class SourceFactoryTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class SourceFactoryTest with ResourceProviderMixin {
   void test_creation() {
     expect(new SourceFactory([]), isNotNull);
   }
@@ -252,12 +251,11 @@
   void test_resolveUri_nonAbsolute_absolute() {
     SourceFactory factory =
         new SourceFactory([new AbsoluteUriResolver(resourceProvider)]);
-    String sourcePath = resourceProvider.convertPath('/does/not/exist.dart');
+    String sourcePath = convertPath('/does/not/exist.dart');
     String targetRawPath = '/does/not/matter.dart';
-    String targetPath = resourceProvider.convertPath(targetRawPath);
-    String targetUri =
-        resourceProvider.pathContext.toUri(targetRawPath).toString();
-    Source sourceSource = new FileSource(resourceProvider.getFile(sourcePath));
+    String targetPath = convertPath(targetRawPath);
+    String targetUri = toUri(targetRawPath).toString();
+    Source sourceSource = new FileSource(getFile(sourcePath));
     Source result = factory.resolveUri(sourceSource, targetUri);
     expect(result.fullName, targetPath);
   }
@@ -265,10 +263,9 @@
   void test_resolveUri_nonAbsolute_relative() {
     SourceFactory factory =
         new SourceFactory([new AbsoluteUriResolver(resourceProvider)]);
-    String path = _p('/does/not/have.dart');
-    Source containingSource = new FileSource(resourceProvider.getFile(path));
+    Source containingSource = new FileSource(getFile('/does/not/have.dart'));
     Source result = factory.resolveUri(containingSource, 'exist.dart');
-    expect(result.fullName, _p('/does/not/exist.dart'));
+    expect(result.fullName, convertPath('/does/not/exist.dart'));
   }
 
   void test_resolveUri_nonAbsolute_relative_package() {
@@ -301,8 +298,8 @@
   }
 
   void test_restoreUri() {
-    File file1 = resourceProvider.getFile(_p("/some/file1.dart"));
-    File file2 = resourceProvider.getFile(_p("/some/file2.dart"));
+    File file1 = getFile("/some/file1.dart");
+    File file2 = getFile("/some/file2.dart");
     Source source1 = new FileSource(file1);
     Source source2 = new FileSource(file2);
     Uri expected1 = Uri.parse("file:///my_file.dart");
@@ -311,11 +308,6 @@
     expect(factory.restoreUri(source1), same(expected1));
     expect(factory.restoreUri(source2), same(null));
   }
-
-  /**
-   * Return the [resourceProvider] specific path for the given Posix [path].
-   */
-  String _p(String path) => resourceProvider.convertPath(path);
 }
 
 class UriResolver_absolute extends UriResolver {
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index 8995879..eae9fe1 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -8,6 +8,7 @@
 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/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
@@ -33,6 +34,8 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(StaticTypeAnalyzerTest);
     defineReflectiveTests(StaticTypeAnalyzer2Test);
+    defineReflectiveTests(StaticTypeAnalyzer3Test);
+    defineReflectiveTests(StaticTypeAnalyzerWithSetLiteralsTest);
   });
 }
 
@@ -57,7 +60,7 @@
 }
 ''';
     await resolveTestUnit(code);
-    expectInitializerType('foo', previewDart2 ? 'int' : 'dynamic');
+    expectInitializerType('foo', 'int');
   }
 
   test_FunctionExpressionInvocation_curried() async {
@@ -117,11 +120,7 @@
 }
 """;
     await resolveTestUnit(code);
-    if (previewDart2) {
-      expectIdentifierType("p()", '() → dynamic');
-    } else {
-      expectIdentifierType("p()", DynamicTypeImpl.instance);
-    }
+    expectIdentifierType("p()", '() → dynamic');
   }
 
   test_staticMethods_classTypeParameters() async {
@@ -156,7 +155,7 @@
       FunctionTypeImpl type = expectFunctionType('m);', '<S>(S) → void',
           elementTypeParams: '[S]',
           typeFormals: '[S]',
-          identifierType: previewDart2 ? '<S>(S) → void' : '(dynamic) → void');
+          identifierType: '<S>(S) → void');
 
       typeS = type.typeFormals[0].type;
       type = type.instantiate([DynamicTypeImpl.instance]);
@@ -172,8 +171,7 @@
           typeParams: '[S]',
           typeArgs: '[S]',
           typeFormals: '[U]',
-          identifierType:
-              previewDart2 ? '<U>(S, U) → void' : '(S, dynamic) → void');
+          identifierType: '<U>(S, U) → void');
 
       type = type.instantiate([DynamicTypeImpl.instance]);
       expect(type.toString(), '(S, dynamic) → void');
@@ -184,6 +182,48 @@
   }
 }
 
+/**
+ * End-to-end tests of the static type analyzer that use the new driver.
+ */
+@reflectiveTest
+class StaticTypeAnalyzer3Test extends StaticTypeAnalyzer2TestShared {
+  bool get enableNewAnalysisDriver => true;
+
+  test_emptyMapLiteral_initializer_var() async {
+    String code = r'''
+main() {
+  var v = {};
+}
+''';
+    await resolveTestUnit(code);
+    expectExpressionType('{}', 'Map<dynamic, dynamic>');
+  }
+
+  test_emptyMapLiteral_parameter_typed() async {
+    String code = r'''
+main() {
+  useMap({});
+}
+void useMap(Map<int, int> m) {
+}
+''';
+    await resolveTestUnit(code);
+    expectExpressionType('{}', 'Map<int, int>');
+  }
+
+  test_emptySetLiteral_parameter_typed() async {
+    String code = r'''
+main() {
+  useSet({});
+}
+void useSet(Set<int> s) {
+}
+''';
+    await resolveTestUnit(code);
+    expectExpressionType('{}', 'Set<int>');
+  }
+}
+
 @reflectiveTest
 class StaticTypeAnalyzerTest extends EngineTestCase with ResourceProviderMixin {
   /**
@@ -206,9 +246,6 @@
    */
   TypeProvider _typeProvider;
 
-  /// TODO(brianwilkerson) Remove this getter.
-  bool get previewDart2 => true;
-
   /**
    * The type system used to analyze the test cases.
    */
@@ -661,8 +698,6 @@
   void test_visitFunctionExpression_async_expression() {
     // () async => e, where e has type int
     InterfaceType intType = _typeProvider.intType;
-    InterfaceType futureIntType =
-        _typeProvider.futureType.instantiate(<DartType>[intType]);
     Expression expression = _resolvedVariable(intType, 'e');
     ExpressionFunctionBody body =
         AstTestFactory.expressionFunctionBody(expression);
@@ -670,17 +705,13 @@
     FunctionExpression node = _resolvedFunctionExpression(
         AstTestFactory.formalParameterList([]), body);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertFunctionType(
-          _typeProvider.futureType
-              .instantiate(<DartType>[_typeProvider.dynamicType]),
-          null,
-          null,
-          null,
-          resultType);
-    } else {
-      _assertFunctionType(futureIntType, null, null, null, resultType);
-    }
+    _assertFunctionType(
+        _typeProvider.futureType
+            .instantiate(<DartType>[_typeProvider.dynamicType]),
+        null,
+        null,
+        null,
+        resultType);
     _listener.assertNoErrors();
   }
 
@@ -696,17 +727,13 @@
     FunctionExpression node = _resolvedFunctionExpression(
         AstTestFactory.formalParameterList([]), body);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertFunctionType(
-          _typeProvider.futureType
-              .instantiate(<DartType>[_typeProvider.dynamicType]),
-          null,
-          null,
-          null,
-          resultType);
-    } else {
-      _assertFunctionType(futureIntType, null, null, null, resultType);
-    }
+    _assertFunctionType(
+        _typeProvider.futureType
+            .instantiate(<DartType>[_typeProvider.dynamicType]),
+        null,
+        null,
+        null,
+        resultType);
     _listener.assertNoErrors();
   }
 
@@ -724,17 +751,13 @@
     FunctionExpression node = _resolvedFunctionExpression(
         AstTestFactory.formalParameterList([]), body);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertFunctionType(
-          _typeProvider.futureType
-              .instantiate(<DartType>[_typeProvider.dynamicType]),
-          null,
-          null,
-          null,
-          resultType);
-    } else {
-      _assertFunctionType(futureIntType, null, null, null, resultType);
-    }
+    _assertFunctionType(
+        _typeProvider.futureType
+            .instantiate(<DartType>[_typeProvider.dynamicType]),
+        null,
+        null,
+        null,
+        resultType);
     _listener.assertNoErrors();
   }
 
@@ -800,13 +823,8 @@
     DartType resultType = _analyze(node);
     Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
     expectedNamedTypes["p"] = dynamicType;
-    if (previewDart2) {
-      _assertFunctionType(
-          dynamicType, null, null, expectedNamedTypes, resultType);
-    } else {
-      _assertFunctionType(
-          _typeProvider.intType, null, null, expectedNamedTypes, resultType);
-    }
+    _assertFunctionType(
+        dynamicType, null, null, expectedNamedTypes, resultType);
     _listener.assertNoErrors();
   }
 
@@ -838,13 +856,8 @@
         AstTestFactory.expressionFunctionBody(_resolvedInteger(0)));
     _analyze5(p);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertFunctionType(
-          dynamicType, <DartType>[dynamicType], null, null, resultType);
-    } else {
-      _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType], null,
-          null, resultType);
-    }
+    _assertFunctionType(
+        dynamicType, <DartType>[dynamicType], null, null, resultType);
     _listener.assertNoErrors();
   }
 
@@ -883,13 +896,8 @@
     DartType resultType = _analyze(node);
     Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
     expectedNamedTypes["p2"] = dynamicType;
-    if (previewDart2) {
-      _assertFunctionType(dynamicType, <DartType>[dynamicType], null,
-          expectedNamedTypes, resultType);
-    } else {
-      _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType], null,
-          expectedNamedTypes, resultType);
-    }
+    _assertFunctionType(dynamicType, <DartType>[dynamicType], null,
+        expectedNamedTypes, resultType);
     _listener.assertNoErrors();
   }
 
@@ -926,13 +934,8 @@
     _analyze5(p1);
     _analyze5(p2);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertFunctionType(dynamicType, <DartType>[dynamicType],
-          <DartType>[dynamicType], null, resultType);
-    } else {
-      _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType],
-          <DartType>[dynamicType], null, resultType);
-    }
+    _assertFunctionType(dynamicType, <DartType>[dynamicType],
+        <DartType>[dynamicType], null, resultType);
     _listener.assertNoErrors();
   }
 
@@ -967,13 +970,8 @@
         AstTestFactory.expressionFunctionBody(_resolvedInteger(0)));
     _analyze5(p);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertFunctionType(
-          dynamicType, null, <DartType>[dynamicType], null, resultType);
-    } else {
-      _assertFunctionType(_typeProvider.intType, null, <DartType>[dynamicType],
-          null, resultType);
-    }
+    _assertFunctionType(
+        dynamicType, null, <DartType>[dynamicType], null, resultType);
     _listener.assertNoErrors();
   }
 
@@ -1139,16 +1137,9 @@
     // [0]
     Expression node = AstTestFactory.listLiteral([_resolvedInteger(0)]);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertType2(
-          _typeProvider.listType.instantiate(<DartType>[_typeProvider.intType]),
-          resultType);
-    } else {
-      _assertType2(
-          _typeProvider.listType
-              .instantiate(<DartType>[_typeProvider.dynamicType]),
-          resultType);
-    }
+    _assertType2(
+        _typeProvider.listType.instantiate(<DartType>[_typeProvider.intType]),
+        resultType);
     _listener.assertNoErrors();
   }
 
@@ -1194,17 +1185,10 @@
     Expression node = AstTestFactory.mapLiteral2(
         [AstTestFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
     DartType resultType = _analyze(node);
-    if (previewDart2) {
-      _assertType2(
-          _typeProvider.mapType.instantiate(
-              <DartType>[_typeProvider.dynamicType, _typeProvider.intType]),
-          resultType);
-    } else {
-      _assertType2(
-          _typeProvider.mapType.instantiate(
-              <DartType>[_typeProvider.dynamicType, _typeProvider.dynamicType]),
-          resultType);
-    }
+    _assertType2(
+        _typeProvider.mapType.instantiate(
+            <DartType>[_typeProvider.dynamicType, _typeProvider.intType]),
+        resultType);
     _listener.assertNoErrors();
   }
 
@@ -1467,9 +1451,7 @@
       List<DartType> expectedOptionalTypes,
       Map<String, DartType> expectedNamedTypes,
       DartType actualType) {
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is FunctionType, FunctionType, actualType);
-    FunctionType functionType = actualType as FunctionType;
+    FunctionType functionType = actualType;
     List<DartType> normalTypes = functionType.normalParameterTypes;
     if (expectedNormalTypes == null) {
       expect(normalTypes, hasLength(0));
@@ -1517,8 +1499,6 @@
 
   void _assertType2(DartType expectedType, DartType actualType) {
     if (expectedType is InterfaceTypeImpl) {
-      EngineTestCase.assertInstanceOf(
-          (obj) => obj is InterfaceTypeImpl, InterfaceTypeImpl, actualType);
       _assertType(expectedType, actualType as InterfaceTypeImpl);
     }
     // TODO(brianwilkerson) Compare other kinds of types then make this a shared
@@ -1545,7 +1525,7 @@
     definingCompilationUnit.librarySource =
         definingCompilationUnit.source = source;
     LibraryElementImpl definingLibrary =
-        new LibraryElementImpl.forNode(context, null);
+        new LibraryElementImpl.forNode(context, null, null);
     definingLibrary.definingCompilationUnit = definingCompilationUnit;
     _typeProvider = context.typeProvider;
     _visitor = new ResolverVisitor(
@@ -1555,7 +1535,7 @@
     return _visitor.typeAnalyzer;
   }
 
-  DartType _flatten(DartType type) => type.flattenFutures(_typeSystem);
+  DartType _flatten(DartType type) => _typeSystem.flatten(type);
 
   /**
    * Return a boolean literal with the given [value] that has been resolved to
@@ -1606,7 +1586,7 @@
     FunctionElementImpl element = new FunctionElementImpl.forNode(null);
     element.parameters = parameterElements;
     element.type = new FunctionTypeImpl(element);
-    node.element = element;
+    (node as FunctionExpressionImpl).declaredElement = element;
     return node;
   }
 
@@ -1667,3 +1647,25 @@
     (element as ParameterElementImpl).type = type;
   }
 }
+
+/**
+ * End-to-end tests of the static type analyzer that use the new driver and
+ * enable the set-literals experiment.
+ */
+@reflectiveTest
+class StaticTypeAnalyzerWithSetLiteralsTest
+    extends StaticTypeAnalyzer2TestShared {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  bool get enableNewAnalysisDriver => true;
+
+  test_emptySetLiteral_initializer_typed_nested() async {
+    String code = r'''
+Set<Set<int>> ints = {{}};
+''';
+    await resolveTestUnit(code);
+    expectExpressionType('{}', 'Set<int>');
+    expectExpressionType('{{}}', 'Set<Set<int>>');
+  }
+}
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index e4f9e69..283d077 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -2,12 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/java_core.dart' show formatList;
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'resolver_test_case.dart';
@@ -30,21 +27,6 @@
 }''', [StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT]);
   }
 
-  test_ambiguousImport_function() async {
-    Source source = addSource(r'''
-import 'lib1.dart';
-import 'lib2.dart';
-g() { return f(); }''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-f() {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-f() {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
-  }
-
   test_assert_message_suppresses_type_promotion() async {
     // If a variable is assigned to inside the expression for an assert
     // message, type promotion should be suppressed, just as it would be if the
@@ -218,11 +200,12 @@
 }''', [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
   }
 
-  test_expectedTwoMapTypeArguments_one() async {
+  @failingTest
+  test_expectedOneSetTypeArgument() async {
     await assertErrorsInCode(r'''
 main() {
-  <int> {};
-}''', [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
+  <int, int>{2, 3};
+}''', [StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS]);
   }
 
   test_expectedTwoMapTypeArguments_three() async {
@@ -457,16 +440,6 @@
 ''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
   }
 
-  test_instanceAccessToStaticMember_method_invocation() async {
-    await assertErrorsInCode(r'''
-class A {
-  static m() {}
-}
-main(A a) {
-  a.m();
-}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-  }
-
   test_instanceAccessToStaticMember_method_reference() async {
     await assertErrorsInCode(r'''
 class A {
@@ -617,85 +590,6 @@
 }''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
   }
 
-  test_invocationOfNonFunction_class() async {
-    await assertErrorsInCode(r'''
-class A {
-  void m() {
-    A();
-  }
-}''', previewDart2 ? [] : [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-  }
-
-  test_invocationOfNonFunction_dynamic() async {
-    await assertErrorsInCode(r'''
-main() {
-  dynamic d;
-  d.hashCode();
-}
-''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-  }
-
-  test_invocationOfNonFunction_localGenericFunction() async {
-    // Invoking `.call` on a `Function` type works similarly to invoking it on
-    // `dynamic`--the invocation is accepted at compile time, and all type
-    // checking is deferred until runtime.
-    await assertErrorsInCode('''
-f(Function f) {
-  return f();
-}''', []);
-  }
-
-  test_invocationOfNonFunction_localObject() async {
-    await assertErrorsInCode('''
-f(Object o) {
-  return o();
-}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-  }
-
-  test_invocationOfNonFunction_localVariable() async {
-    await assertErrorsInCode(r'''
-f() {
-  int x;
-  return x();
-}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-  }
-
-  test_invocationOfNonFunction_ordinaryInvocation() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int x;
-}
-class B {
-  m() {
-    A.x();
-  }
-}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    // A call to verify(source) fails as A.x() cannot be resolved.
-  }
-
-  test_invocationOfNonFunction_staticInvocation() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int get g => 0;
-  f() {
-    A.g();
-  }
-}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-    // A call to verify(source) fails as g() cannot be resolved.
-  }
-
-  test_invocationOfNonFunction_superExpression() async {
-    await assertErrorsInCode(r'''
-class A {
-  int get g => 0;
-}
-class B extends A {
-  m() {
-    var v = super.g();
-  }
-}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION]);
-  }
-
   test_invocationOfNonFunctionExpression_literal() async {
     await assertErrorsInCode(r'''
 f() {
@@ -1348,34 +1242,6 @@
 }''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
-  test_undefinedFunction() async {
-    await assertErrorsInCode(r'''
-void f() {
-  g();
-}''', [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
-  }
-
-  test_undefinedFunction_inCatch() async {
-    await assertErrorsInCode(r'''
-void f() {
-  try {
-  } on Object {
-    g();
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
-  }
-
-  test_undefinedFunction_inImportedLib() async {
-    Source source = addSource(r'''
-import 'lib.dart' as f;
-main() { return f.g(); }''');
-    addNamedSource("/lib.dart", r'''
-library lib;
-h() {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_FUNCTION]);
-  }
-
   test_undefinedGetter() async {
     await assertErrorsInUnverifiedCode(r'''
 class T {}
@@ -1433,12 +1299,11 @@
   test_undefinedGetter_typeLiteral_conditionalAccess() async {
     // When applied to a type literal, the conditional access operator '?.'
     // cannot be used to access instance getters of Type.
-    // TODO(brianwilkerson) We cannot verify in previewDart2 because hashCode
-    // isn't resolved.
+    // TODO(brianwilkerson) We cannot verify because hashCode isn't resolved.
     await assertErrorsInCode('''
 class A {}
 f() => A?.hashCode;
-''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: !previewDart2);
+''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
   }
 
   test_undefinedGetter_wrongNumberOfTypeArguments_tooLittle() async {
@@ -1471,15 +1336,6 @@
 }''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
   }
 
-  test_undefinedMethod() async {
-    await assertErrorsInCode(r'''
-class A {
-  void m() {
-    n();
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
   test_undefinedMethod_assignmentExpression() async {
     await assertErrorsInCode(r'''
 class A {}
@@ -1491,17 +1347,6 @@
 }''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
-  test_undefinedMethod_generic_function_call() async {
-    // Invoking `.call` on a `Function` type works similarly to invoking it on
-    // `dynamic`--the invocation is accepted at compile time, and all type
-    // checking is deferred until runtime.
-    await assertErrorsInCode('''
-f(Function f) {
-  f.call();
-}
-''', []);
-  }
-
   test_undefinedMethod_ignoreTypePropagation() async {
     await assertErrorsInCode(r'''
 class A {}
@@ -1521,14 +1366,6 @@
         [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
-  test_undefinedMethod_object_call() async {
-    await assertErrorsInCode('''
-f(Object o) {
-  o.call();
-}
-''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
   test_undefinedMethod_ofNull() async {
     // TODO(scheglov) Track https://github.com/dart-lang/sdk/issues/28430 to
     // decide whether a warning should be reported here.
@@ -1540,69 +1377,15 @@
 ''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
   }
 
-  test_undefinedMethod_private() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-class A {
-  _foo() {}
-}''');
-    await assertErrorsInCode(r'''
-import 'lib.dart';
-class B extends A {
-  test() {
-    _foo();
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedMethod_proxy_annotation_fakeProxy() async {
-    await assertErrorsInCode(r'''
-library L;
-class Fake {
-  const Fake();
-}
-const proxy = const Fake();
-@proxy class PrefixProxy {}
-main() {
-  new PrefixProxy().foo();
-}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedMethod_typeLiteral_cascadeTarget() async {
-    await assertErrorsInCode('''
-class T {
-  static void foo() {}
-}
-main() {
-  T..foo();
-}
-''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedMethod_typeLiteral_conditionalAccess() async {
-    // When applied to a type literal, the conditional access operator '?.'
-    // cannot be used to access instance methods of Type.
-    await assertErrorsInCode('''
-class A {}
-f() => A?.toString();
-''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
   test_undefinedMethodWithConstructor() async {
-    // TODO(brianwilkerson) We cannot verify in previewDart2 because 'C' could
-    // not be resolved.
-    await assertErrorsInCode(
-        r'''
+    // TODO(brianwilkerson) We cannot verify because 'C' could not be resolved.
+    await assertErrorsInCode(r'''
 class C {
   C.m();
 }
 f() {
   C c = C.m();
-}''',
-        previewDart2
-            ? []
-            : [StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR],
-        verify: !previewDart2);
+}''', [], verify: false);
   }
 
   test_undefinedOperator_indexBoth() async {
@@ -1610,7 +1393,10 @@
 class A {}
 f(A a) {
   a[0]++;
-}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+}''', [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+    ]);
   }
 
   test_undefinedOperator_indexGetter() async {
@@ -1701,18 +1487,6 @@
 ''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
   }
 
-  test_unqualifiedReferenceToNonLocalStaticMember_method() async {
-    await assertErrorsInCode(r'''
-class A {
-  static void a() {}
-}
-class B extends A {
-  void b() {
-    a();
-  }
-}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
-  }
-
   test_unqualifiedReferenceToNonLocalStaticMember_setter() async {
     await assertErrorsInCode(r'''
 class A {
@@ -1883,26 +1657,6 @@
     resetWith(options: options);
   }
 
-  test_genericMethodWrongNumberOfTypeArguments() async {
-    Source source = addSource('''
-f() {}
-main() {
-  f<int>();
-}
-''');
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD]);
-    for (AnalysisError error in analysisResult.errors) {
-      if (error.errorCode ==
-          StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS) {
-        expect(error.message,
-            formatList(error.errorCode.message, ['() → dynamic', 0, 1]));
-      }
-    }
-    verify([source]);
-  }
-
   test_legalAsyncGeneratorReturnType_function_supertypeOfStream() async {
     await assertErrorsInCode('''
 import 'dart:async';
diff --git a/pkg/analyzer/test/generated/static_warning_code_driver_test.dart b/pkg/analyzer/test/generated/static_warning_code_driver_test.dart
index adf005d..ec8e367 100644
--- a/pkg/analyzer/test/generated/static_warning_code_driver_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_driver_test.dart
@@ -1,18 +1,39 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'resolver_test_case.dart';
 import 'static_warning_code_test.dart';
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(SetElementTypeNotAssignableTest);
     defineReflectiveTests(StaticWarningCodeTest_Driver);
   });
 }
 
 @reflectiveTest
+class SetElementTypeNotAssignableTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_setElementTypeNotAssignable() async {
+    Source source = addSource("var v = <String>{42};");
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+}
+
+@reflectiveTest
 class StaticWarningCodeTest_Driver extends StaticWarningCodeTest {
   @override
   bool get enableNewAnalysisDriver => true;
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 4b7068e..f5b8968 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -4,6 +4,7 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:test/test.dart';
@@ -13,11 +14,54 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(EqualValuesInConstSetTest);
     defineReflectiveTests(StaticWarningCodeTest);
   });
 }
 
 @reflectiveTest
+class EqualValuesInConstSetTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.set_literals];
+
+  @override
+  bool get enableNewAnalysisDriver => true;
+
+  test_simpleValues() async {
+    Source source = addSource('var s = const {0, 1, 0};');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticWarningCode.EQUAL_VALUES_IN_CONST_SET]);
+    verify([source]);
+  }
+
+  test_valuesWithEqualTypeParams() async {
+    Source source = addSource(r'''
+class A<T> {
+  const A();
+}
+var s = const {A<int>(), A<int>()};
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticWarningCode.EQUAL_VALUES_IN_CONST_SET]);
+    verify([source]);
+  }
+
+  test_valuesWithUnequalTypeParams() async {
+    // No error should be produced because A<int> and A<num> are different
+    // types.
+    Source source = addSource(r'''
+class A<T> {
+  const A();
+}
+const s = {A<int>(), A<num>()};
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+}
+
+@reflectiveTest
 class StaticWarningCodeTest extends ResolverTestCase {
   fail_argumentTypeNotAssignable_tearOff_required() async {
     Source source = addSource(r'''
@@ -274,24 +318,6 @@
     assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
   }
 
-  test_ambiguousImport_withPrefix() async {
-    Source source = addSource(r'''
-library test;
-import 'lib1.dart' as p;
-import 'lib2.dart' as p;
-main() {
-  p.f();
-}''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-f() {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-f() {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
-  }
-
   test_argumentTypeNotAssignable_ambiguousClassName() async {
     // See dartbug.com/19624
     Source source = addNamedSource("/lib1.dart", r'''
@@ -315,10 +341,6 @@
     expect(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, error.errorCode);
     String message = error.message;
     expect(message.indexOf("_A") != -1, isTrue);
-    if (!previewDart2) {
-      expect(message.indexOf("lib1.dart") != -1, isTrue);
-      expect(message.indexOf("lib2.dart") != -1, isTrue);
-    }
   }
 
   test_argumentTypeNotAssignable_annotation_namedConstructor() async {
@@ -501,11 +523,7 @@
   acceptFunNumOptBool(funNumBool);
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StrongModeCode.INVALID_CAST_FUNCTION]);
-    } else {
-      assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    }
+    assertErrors(source, [StrongModeCode.INVALID_CAST_FUNCTION]);
     verify([source]);
   }
 
@@ -1111,15 +1129,10 @@
   A(String this.x) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [
-        StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
-        StrongModeCode.INVALID_PARAMETER_DECLARATION
-      ]);
-    } else {
-      assertErrors(
-          source, [StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE]);
-    }
+    assertErrors(source, [
+      StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
+      StrongModeCode.INVALID_PARAMETER_DECLARATION
+    ]);
     verify([source]);
   }
 
@@ -1356,11 +1369,7 @@
 }
 ''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    }
+    assertNoErrors(source);
   }
 
   test_generalizedVoid_interpolateVoidValueError() async {
@@ -1374,51 +1383,6 @@
     assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
   }
 
-  test_generalizedVoid_invocationOfVoidFieldError() async {
-    Source source = addSource(r'''
-class Container<T>{
-  T value;
-}
-void main(Container<void> voidContainer) {
-  voidContainer.value();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
-  test_generalizedVoid_invocationOfVoidLocalError() async {
-    Source source = addSource(r'''
-void main() {
-  void x;
-  x();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
-  test_generalizedVoid_invocationOfVoidResultError() async {
-    Source source = addSource(r'''
-void main() {
-  main()();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
-  test_generalizedVoid_invocationOfVoidToplevelError() async {
-    Source source = addSource(r'''
-void x;
-void main() {
-  x();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
   test_generalizedVoid_negateVoidValueError() async {
     Source source = addSource(r'''
 void main() {
@@ -1533,28 +1497,6 @@
     assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
   }
 
-  test_generalizedVoid_useOfVoidCallMethodError() async {
-    Source source = addSource(r'''
-void main() {
-  void x;
-  x.toString();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
-  test_generalizedVoid_useOfVoidCallMethodWithNullError() async {
-    Source source = addSource(r'''
-void main() {
-  void x;
-  x?.toString();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
   test_generalizedVoid_useOfVoidCallSetterError() async {
     Source source = addSource(r'''
 void main() {
@@ -1566,17 +1508,6 @@
     assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
   }
 
-  test_generalizedVoid_useOfVoidCascadeError() async {
-    Source source = addSource(r'''
-void main() {
-  void x;
-  x..toString();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
   test_generalizedVoid_useOfVoidCastsOk() async {
     Source source = addSource(r'''
 void use(dynamic x) { }
@@ -2257,13 +2188,7 @@
 }
 ''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [
-        StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL
-      ]);
-    }
+    assertNoErrors(source);
     verify([source]);
   }
 
@@ -2280,12 +2205,7 @@
 }
 ''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source,
-          [StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED]);
-    }
+    assertNoErrors(source);
     verify([source]);
   }
 
@@ -2368,12 +2288,7 @@
   m({int p : 1}) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source,
-          [StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED]);
-    }
+    assertNoErrors(source);
     verify([source]);
   }
 
@@ -2386,13 +2301,7 @@
   m([int p = 1]) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [
-        StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL
-      ]);
-    }
+    assertNoErrors(source);
     verify([source]);
   }
 
@@ -2405,11 +2314,7 @@
   m({a}) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    } else {
-      assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_NAMED]);
-    }
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
     verify([source]);
   }
 
@@ -2422,11 +2327,7 @@
   m({a, c}) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    } else {
-      assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_NAMED]);
-    }
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
     verify([source]);
   }
 
@@ -2439,11 +2340,7 @@
   m([a]) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    } else {
-      assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_POSITIONAL]);
-    }
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
     verify([source]);
   }
 
@@ -2456,11 +2353,7 @@
   m(a, b, [c]) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    } else {
-      assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_POSITIONAL]);
-    }
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
     verify([source]);
   }
 
@@ -2473,11 +2366,7 @@
   m(a, [c, d]) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    } else {
-      assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_POSITIONAL]);
-    }
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
     verify([source]);
   }
 
@@ -2490,11 +2379,7 @@
   m(a, b) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    } else {
-      assertErrors(source, [StaticWarningCode.INVALID_OVERRIDE_REQUIRED]);
-    }
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
     verify([source]);
   }
 
@@ -2507,12 +2392,7 @@
   void set s(String v) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    } else {
-      assertErrors(source,
-          [StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]);
-    }
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
     verify([source]);
   }
 
@@ -2529,15 +2409,10 @@
   set setter14(String _) => null;
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [
-        CompileTimeErrorCode.INVALID_OVERRIDE,
-        CompileTimeErrorCode.INVALID_OVERRIDE,
-      ]);
-    } else {
-      assertErrors(source,
-          [StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]);
-    }
+    assertErrors(source, [
+      CompileTimeErrorCode.INVALID_OVERRIDE,
+      CompileTimeErrorCode.INVALID_OVERRIDE,
+    ]);
     verify([source]);
   }
 
@@ -2555,15 +2430,10 @@
   set setter14(String _) => null;
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [
-        CompileTimeErrorCode.INVALID_OVERRIDE,
-        CompileTimeErrorCode.INVALID_OVERRIDE
-      ]);
-    } else {
-      assertErrors(source,
-          [StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]);
-    }
+    assertErrors(source, [
+      CompileTimeErrorCode.INVALID_OVERRIDE,
+      CompileTimeErrorCode.INVALID_OVERRIDE
+    ]);
     verify([source]);
   }
 
@@ -2579,15 +2449,10 @@
   set s(double d) {}
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [
-        CompileTimeErrorCode.INVALID_OVERRIDE,
-        CompileTimeErrorCode.INVALID_OVERRIDE
-      ]);
-    } else {
-      assertErrors(source,
-          [StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]);
-    }
+    assertErrors(source, [
+      CompileTimeErrorCode.INVALID_OVERRIDE,
+      CompileTimeErrorCode.INVALID_OVERRIDE
+    ]);
     verify([source]);
   }
 
@@ -2653,14 +2518,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertErrors(source, [StaticWarningCode.RETURN_WITHOUT_VALUE]);
-    } else {
-      assertErrors(source, [
-        StaticWarningCode.MIXED_RETURN_TYPES,
-        StaticWarningCode.MIXED_RETURN_TYPES
-      ]);
-    }
+    assertErrors(source, [StaticWarningCode.RETURN_WITHOUT_VALUE]);
     verify([source]);
   }
 
@@ -3451,11 +3309,7 @@
 Null f() {return;}
 ''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [StaticWarningCode.RETURN_WITHOUT_VALUE]);
-    }
+    assertNoErrors(source);
   }
 
   test_staticAccessToInstanceMember_method_invocation() async {
@@ -3813,11 +3667,7 @@
   }
 }''');
     await computeAnalysisResult(source);
-    if (previewDart2) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    }
+    assertNoErrors(source);
   }
 
   test_typeTestNonType() async {
@@ -3974,29 +3824,6 @@
     assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
-  test_undefinedStaticMethodOrGetter_method() async {
-    Source source = addSource(r'''
-class C {}
-f(var p) {
-  f(C.m());
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedStaticMethodOrGetter_method_inSuperclass() async {
-    Source source = addSource(r'''
-class S {
-  static m() {}
-}
-class C extends S {}
-f(var p) {
-  f(C.m());
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
   test_undefinedStaticMethodOrGetter_setter_inSuperclass() async {
     Source source = addSource(r'''
 class S {
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index 70a60b6..88127b5 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -17,6 +17,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../src/dart/resolution/find_node.dart';
 import '../utils.dart';
 import 'resolver_test_case.dart';
 
@@ -445,6 +446,27 @@
     expect(covariantE.toList(), []);
   }
 
+  test_covarianceChecks2() async {
+    var content = r'''
+class View<T1> {
+  View<T1> create() => this;
+}
+
+class Bar<T2> extends View<Bar<T2>> {}
+
+main() {
+  var b = new Bar<int>();
+  b.create();
+}
+''';
+    var source = addSource(content);
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    var findNode = FindNode(content, unit);
+    expect(getImplicitCast(findNode.methodInvocation('b.create')), isNull);
+  }
+
   test_covarianceChecks_genericMethods() async {
     var source = addSource(r'''
 class C<T> {
@@ -2909,7 +2931,7 @@
 }
 
 /// Test cases for [StrongModeStaticTypeAnalyzer2Test]
-abstract class StrongModeStaticTypeAnalyzer2TestCases
+mixin StrongModeStaticTypeAnalyzer2TestCases
     implements StaticTypeAnalyzer2TestShared {
   void expectStaticInvokeType(String search, String type) {
     var invocation = findIdentifier(search).parent as MethodInvocation;
@@ -2927,17 +2949,6 @@
     expectInitializerType('foo', 'int');
   }
 
-  test_dynamicObjectMethod_toString() async {
-    String code = r'''
-main() {
-  dynamic a = null;
-  var foo = a.toString();
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'String');
-  }
-
   test_futureOr_promotion1() async {
     // Test that promotion from FutureOr<T> to T works for concrete types
     String code = r'''
@@ -3612,22 +3623,6 @@
     verify([source]);
   }
 
-  test_genericMethod_partiallyAppliedErrorWithBound() async {
-    await resolveTestUnit(r'''
-void f<X extends List, Y>() => null;
-
-void test() {
-  f<int>();
-}
-''', noErrors: false);
-    assertErrors(testSource, [
-      // Make sure to catch both the missing parameter:
-      StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
-      // And the incorrect parameter:
-      StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
-    ]);
-  }
-
   test_genericMethod_propagatedType_promotion() async {
     // Regression test for:
     // https://github.com/dart-lang/sdk/issues/25340
@@ -4435,7 +4430,7 @@
     expectInitializerType('foo', 'int');
   }
 
-  Future<Null> _objectMethodOnFunctions_helper2(String code) async {
+  Future<void> _objectMethodOnFunctions_helper2(String code) async {
     await resolveTestUnit(code);
     expectIdentifierType('t0', "String");
     expectIdentifierType('t1', "() → String");
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 3b976b4..ac07574 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -5,7 +5,6 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'all_the_rest_test.dart' as all_the_rest;
-import 'bazel_test.dart' as bazel_test;
 import 'checked_mode_compile_time_error_code_driver_test.dart'
     as checked_mode_compile_time_error_code_driver_test;
 import 'checked_mode_compile_time_error_code_test.dart'
@@ -19,7 +18,6 @@
 import 'engine_test.dart' as engine_test;
 import 'error_suppression_driver_test.dart' as error_suppression_driver_test;
 import 'error_suppression_test.dart' as error_suppression_test;
-import 'gn_test.dart' as gn_test;
 import 'hint_code_driver_test.dart' as hint_code_driver_test;
 import 'hint_code_test.dart' as hint_code_test;
 import 'inheritance_manager_test.dart' as inheritance_manager_test;
@@ -31,8 +29,6 @@
 import 'non_error_resolver_test.dart' as non_error_resolver_test;
 import 'non_hint_code_driver_test.dart' as non_hint_code_driver_test;
 import 'non_hint_code_test.dart' as non_hint_code_test;
-import 'package_build_test.dart' as package_build_test;
-import 'package_test.dart' as package_test;
 import 'parser_fasta_test.dart' as parser_fasta_test;
 import 'parser_test.dart' as parser_test;
 import 'resolver_driver_test.dart' as resolver_driver_test;
@@ -59,7 +55,6 @@
 main() {
   defineReflectiveSuite(() {
     all_the_rest.main();
-    bazel_test.main();
     checked_mode_compile_time_error_code_driver_test.main();
     checked_mode_compile_time_error_code_test.main();
     compile_time_error_code_driver_test.main();
@@ -70,7 +65,6 @@
     engine_test.main();
     error_suppression_driver_test.main();
     error_suppression_test.main();
-    gn_test.main();
     hint_code_driver_test.main();
     hint_code_test.main();
     inheritance_manager_test.main();
@@ -82,8 +76,6 @@
     non_error_resolver_test.main();
     non_hint_code_driver_test.main();
     non_hint_code_test.main();
-    package_build_test.main();
-    package_test.main();
     parser_fasta_test.main();
     parser_test.main();
     resolver_driver_test.main();
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 8a6e9d4..528bd33 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -107,23 +107,6 @@
   void tearDown() {}
 
   /**
-   * Assert that the given object is an instance of the expected class.
-   *
-   * @param expectedClass the class that the object is expected to be an instance of
-   * @param object the object being tested
-   * @return the object that was being tested
-   * @throws Exception if the object is not an instance of the expected class
-   */
-  static Object assertInstanceOf(
-      Predicate<Object> predicate, Type expectedClass, Object object) {
-    if (!predicate(object)) {
-      fail(
-          "Expected instance of $expectedClass, found ${object == null ? "null" : object.runtimeType}");
-    }
-    return object;
-  }
-
-  /**
    * @return the [AstNode] with requested type at offset of the "prefix".
    */
   static AstNode findNode(
@@ -133,7 +116,7 @@
       throw new ArgumentError("Not found '$prefix'.");
     }
     AstNode node = new NodeLocator(offset).searchWithin(root);
-    return node.getAncestor(predicate);
+    return node.thisOrAncestorMatching(predicate);
   }
 
   /**
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 67110dd..190bc9b 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -1,25 +1,26 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 // Tests related to the [TypeSystem] class.
 
-import 'package:analyzer/analyzer.dart'
-    show ErrorReporter, ParameterKind, StrongModeCode;
 import 'package:analyzer/dart/ast/standard_ast_factory.dart' show astFactory;
 import 'package:analyzer/dart/ast/token.dart' show Keyword;
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/dart/ast/token.dart' show KeywordToken;
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart'
     show NonExistingSource, UriKind;
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:path/path.dart' show toUri;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -42,7 +43,7 @@
  */
 abstract class BoundTestBase {
   TypeProvider typeProvider;
-  TypeSystem typeSystem;
+  Dart2TypeSystem typeSystem;
   FunctionType simpleFunctionType;
 
   DartType get bottomType => typeProvider.bottomType;
@@ -56,8 +57,6 @@
   InterfaceType get numType => typeProvider.numType;
   InterfaceType get objectType => typeProvider.objectType;
   InterfaceType get stringType => typeProvider.stringType;
-  StrongTypeSystemImpl get strongTypeSystem =>
-      typeSystem as StrongTypeSystemImpl;
 
   DartType get voidType => VoidTypeImpl.instance;
 
@@ -72,7 +71,7 @@
 
   void _checkGreatestLowerBound(
       DartType type1, DartType type2, DartType expectedResult) {
-    DartType glb = strongTypeSystem.getGreatestLowerBound(type1, type2);
+    DartType glb = typeSystem.getGreatestLowerBound(type1, type2);
     expect(glb, expectedResult);
     // Check that the result is a lower bound.
     expect(typeSystem.isSubtypeOf(glb, type1), true);
@@ -83,7 +82,7 @@
     // for function types we just check if they are mutual subtypes.
     // https://github.com/dart-lang/sdk/issues/26126
     // TODO(leafp): Fix this.
-    glb = strongTypeSystem.getGreatestLowerBound(type2, type1);
+    glb = typeSystem.getGreatestLowerBound(type2, type1);
     if (glb is FunctionTypeImpl) {
       expect(typeSystem.isSubtypeOf(glb, expectedResult), true);
       expect(typeSystem.isSubtypeOf(expectedResult, glb), true);
@@ -173,7 +172,7 @@
     typeProvider = AnalysisContextFactory.contextWithCore(
             resourceProvider: new MemoryResourceProvider())
         .typeProvider;
-    typeSystem = new StrongTypeSystemImpl(typeProvider);
+    typeSystem = new Dart2TypeSystem(typeProvider);
     T = _newTypeParameter('T');
   }
 
@@ -844,7 +843,7 @@
 
   void setUp() {
     typeProvider = new TestTypeProvider();
-    typeSystem = new StrongTypeSystemImpl(typeProvider);
+    typeSystem = new Dart2TypeSystem(typeProvider);
   }
 
   void test_isAssignableTo_bottom_isBottom() {
@@ -1114,7 +1113,7 @@
 @reflectiveTest
 class StrongGenericFunctionInferenceTest {
   TypeProvider typeProvider;
-  StrongTypeSystemImpl typeSystem;
+  Dart2TypeSystem typeSystem;
 
   DartType get bottomType => typeProvider.bottomType;
   InterfaceType get doubleType => typeProvider.doubleType;
@@ -1131,7 +1130,7 @@
 
   void setUp() {
     typeProvider = new TestTypeProvider();
-    typeSystem = new StrongTypeSystemImpl(typeProvider);
+    typeSystem = new Dart2TypeSystem(typeProvider);
   }
 
   void test_boundedByAnotherTypeParameter() {
@@ -1436,7 +1435,7 @@
 class StrongGreatestLowerBoundTest extends BoundTestBase {
   void setUp() {
     super.setUp();
-    typeSystem = new StrongTypeSystemImpl(typeProvider);
+    typeSystem = new Dart2TypeSystem(typeProvider);
   }
 
   void test_bottom_function() {
@@ -1760,7 +1759,7 @@
 class StrongLeastUpperBoundTest extends LeastUpperBoundTestBase {
   void setUp() {
     super.setUp();
-    typeSystem = new StrongTypeSystemImpl(typeProvider);
+    typeSystem = new Dart2TypeSystem(typeProvider);
   }
 
   void test_functionsFuzzyArrows() {
@@ -1889,7 +1888,7 @@
     typeProvider = AnalysisContextFactory.contextWithCore(
             resourceProvider: new MemoryResourceProvider())
         .typeProvider;
-    typeSystem = new StrongTypeSystemImpl(typeProvider);
+    typeSystem = new Dart2TypeSystem(typeProvider);
   }
 
   void test_bottom_isBottom() {
diff --git a/pkg/analyzer/test/parse_compilation_unit_test.dart b/pkg/analyzer/test/parse_compilation_unit_test.dart
index a916d00..74a0179 100644
--- a/pkg/analyzer/test/parse_compilation_unit_test.dart
+++ b/pkg/analyzer/test/parse_compilation_unit_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// ignore: deprecated_member_use
 import 'package:analyzer/analyzer.dart';
 import 'package:test/test.dart';
 
diff --git a/pkg/analyzer/test/source/sdk_ext_test.dart b/pkg/analyzer/test/source/sdk_ext_test.dart
index b09c36b..4f542d1 100644
--- a/pkg/analyzer/test/source/sdk_ext_test.dart
+++ b/pkg/analyzer/test/source/sdk_ext_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/source/sdk_ext.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -15,9 +15,7 @@
 }
 
 @reflectiveTest
-class SdkExtUriResolverTest {
-  MemoryResourceProvider resourceProvider;
-
+class SdkExtUriResolverTest with ResourceProviderMixin {
   void setUp() {
     String joinAndEscape(List<String> components) {
       return resourceProvider.pathContext
@@ -25,10 +23,9 @@
           .replaceAll(r'\', r'\\');
     }
 
-    resourceProvider = new MemoryResourceProvider();
-    resourceProvider.newFolder(resourceProvider.convertPath('/empty'));
-    resourceProvider.newFolder(resourceProvider.convertPath('/tmp'));
-    resourceProvider.newFile(resourceProvider.convertPath('/tmp/_sdkext'), '''
+    newFolder('/empty');
+    newFolder('/tmp');
+    newFile('/tmp/_sdkext', content: '''
 {
   "dart:fox": "slippy.dart",
   "dart:bear": "grizzly.dart",
@@ -41,47 +38,37 @@
   test_create_badJSON() {
     var resolver = new SdkExtUriResolver(null);
     resolver.addSdkExt(r'''{{{,{{}}},}}''', null);
-    expect(resolver.length, equals(0));
+    expect(resolver.length, 0);
   }
 
   test_create_noSdkExtPackageMap() {
     var resolver = new SdkExtUriResolver({
-      'fox': <Folder>[
-        resourceProvider.getFolder(resourceProvider.convertPath('/empty'))
-      ]
+      'fox': <Folder>[getFolder('/empty')]
     });
-    expect(resolver.length, equals(0));
+    expect(resolver.length, 0);
   }
 
   test_create_nullPackageMap() {
     var resolver = new SdkExtUriResolver(null);
-    expect(resolver.length, equals(0));
+    expect(resolver.length, 0);
   }
 
   test_create_sdkExtPackageMap() {
     var resolver = new SdkExtUriResolver({
-      'fox': <Folder>[
-        resourceProvider.newFolder(resourceProvider.convertPath('/tmp'))
-      ]
+      'fox': <Folder>[newFolder('/tmp')]
     });
     // We have four mappings.
-    expect(resolver.length, equals(4));
+    expect(resolver.length, 4);
     // Check that they map to the correct paths.
-    expect(resolver['dart:fox'],
-        equals(resourceProvider.convertPath('/tmp/slippy.dart')));
-    expect(resolver['dart:bear'],
-        equals(resourceProvider.convertPath('/tmp/grizzly.dart')));
-    expect(resolver['dart:relative'],
-        equals(resourceProvider.convertPath('/relative.dart')));
-    expect(resolver['dart:deep'],
-        equals(resourceProvider.convertPath('/tmp/deep/directory/file.dart')));
+    expect(resolver['dart:fox'], convertPath('/tmp/slippy.dart'));
+    expect(resolver['dart:bear'], convertPath('/tmp/grizzly.dart'));
+    expect(resolver['dart:relative'], convertPath('/relative.dart'));
+    expect(resolver['dart:deep'], convertPath('/tmp/deep/directory/file.dart'));
   }
 
   test_restoreAbsolute() {
     var resolver = new SdkExtUriResolver({
-      'fox': <Folder>[
-        resourceProvider.newFolder(resourceProvider.convertPath('/tmp'))
-      ]
+      'fox': <Folder>[newFolder('/tmp')]
     });
     var source = resolver.resolveAbsolute(Uri.parse('dart:fox'));
     expect(source, isNotNull);
@@ -89,8 +76,8 @@
     var restoreUri = resolver.restoreAbsolute(source);
     expect(restoreUri, isNotNull);
     // Verify that it is 'dart:fox'.
-    expect(restoreUri.toString(), equals('dart:fox'));
-    expect(restoreUri.scheme, equals('dart'));
-    expect(restoreUri.path, equals('fox'));
+    expect(restoreUri.toString(), 'dart:fox');
+    expect(restoreUri.scheme, 'dart');
+    expect(restoreUri.path, 'fox');
   }
 }
diff --git a/pkg/analyzer/test/src/abstract_single_unit.dart b/pkg/analyzer/test/src/abstract_single_unit.dart
index f8fbb79..164b2f5 100644
--- a/pkg/analyzer/test/src/abstract_single_unit.dart
+++ b/pkg/analyzer/test/src/abstract_single_unit.dart
@@ -51,7 +51,7 @@
   AstNode findNodeAtOffset(int offset, [Predicate<AstNode> predicate]) {
     AstNode result = new NodeLocator(offset).searchWithin(testUnit);
     if (result != null && predicate != null) {
-      result = result.getAncestor(predicate);
+      result = result.thisOrAncestorMatching(predicate);
     }
     return result;
   }
diff --git a/pkg/analyzer/test/src/command_line/arguments_test.dart b/pkg/analyzer/test/src/command_line/arguments_test.dart
index c612c12..3662f70 100644
--- a/pkg/analyzer/test/src/command_line/arguments_test.dart
+++ b/pkg/analyzer/test/src/command_line/arguments_test.dart
@@ -2,12 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/command_line/arguments.dart';
 import 'package:analyzer/src/context/builder.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:args/args.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -19,27 +19,25 @@
 }
 
 @reflectiveTest
-class ArgumentsTest {
+class ArgumentsTest with ResourceProviderMixin {
   void test_createContextBuilderOptions_all() {
     String dartSdkSummaryPath = 'a';
     String defaultAnalysisOptionsFilePath = 'b';
     String defaultPackageFilePath = 'c';
     String defaultPackagesDirectoryPath = 'd';
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = [
       '--dart-sdk-summary=$dartSdkSummaryPath',
       '-Dfoo=1',
       '-Dbar=2',
-      '--no-declaration-casts',
       '--no-implicit-casts',
       '--no-implicit-dynamic',
       '--options=$defaultAnalysisOptionsFilePath',
       '--packages=$defaultPackageFilePath',
       '--package-root=$defaultPackagesDirectoryPath',
     ];
-    ArgResults result = parse(provider, parser, args);
+    ArgResults result = parse(resourceProvider, parser, args);
     ContextBuilderOptions options = createContextBuilderOptions(result);
     expect(options, isNotNull);
     expect(options.dartSdkSummaryPath, dartSdkSummaryPath);
@@ -54,17 +52,15 @@
     AnalysisOptionsImpl defaultOptions = options.defaultOptions;
     expect(defaultOptions, isNotNull);
     expect(defaultOptions.strongMode, true);
-    expect(defaultOptions.declarationCasts, false);
     expect(defaultOptions.implicitCasts, false);
     expect(defaultOptions.implicitDynamic, false);
   }
 
   void test_createContextBuilderOptions_none() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = [];
-    ArgResults result = parse(provider, parser, args);
+    ArgResults result = parse(resourceProvider, parser, args);
     ContextBuilderOptions options = createContextBuilderOptions(result);
     expect(options, isNotNull);
     expect(options.dartSdkSummaryPath, isNull);
@@ -74,79 +70,61 @@
     expect(options.defaultPackagesDirectoryPath, isNull);
     AnalysisOptionsImpl defaultOptions = options.defaultOptions;
     expect(defaultOptions, isNotNull);
-    expect(defaultOptions.strongMode, defaultOptions.previewDart2);
-    expect(defaultOptions.declarationCasts, true);
+    expect(defaultOptions.strongMode, true);
     expect(defaultOptions.implicitCasts, true);
     expect(defaultOptions.implicitDynamic, true);
   }
 
   void test_createDartSdkManager_noPath_noSummaries() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = [];
-    ArgResults result = parse(provider, parser, args);
-    DartSdkManager manager = createDartSdkManager(provider, false, result);
+    ArgResults result = parse(resourceProvider, parser, args);
+    DartSdkManager manager =
+        createDartSdkManager(resourceProvider, false, result);
     expect(manager, isNotNull);
     expect(manager.defaultSdkDirectory,
-        FolderBasedDartSdk.defaultSdkDirectory(provider));
+        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
     expect(manager.canUseSummaries, false);
   }
 
   void test_createDartSdkManager_noPath_summaries() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = [];
-    ArgResults result = parse(provider, parser, args);
-    DartSdkManager manager = createDartSdkManager(provider, true, result);
+    ArgResults result = parse(resourceProvider, parser, args);
+    DartSdkManager manager =
+        createDartSdkManager(resourceProvider, true, result);
     expect(manager, isNotNull);
     expect(manager.defaultSdkDirectory,
-        FolderBasedDartSdk.defaultSdkDirectory(provider));
+        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
     expect(manager.canUseSummaries, true);
   }
 
   void test_createDartSdkManager_path_noSummaries() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = ['--dart-sdk=x'];
-    ArgResults result = parse(provider, parser, args);
-    DartSdkManager manager = createDartSdkManager(provider, false, result);
+    ArgResults result = parse(resourceProvider, parser, args);
+    DartSdkManager manager =
+        createDartSdkManager(resourceProvider, false, result);
     expect(manager, isNotNull);
     expect(manager.defaultSdkDirectory, 'x');
     expect(manager.canUseSummaries, false);
   }
 
   void test_createDartSdkManager_path_summaries() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = ['--dart-sdk=y'];
-    ArgResults result = parse(provider, parser, args);
-    DartSdkManager manager = createDartSdkManager(provider, true, result);
+    ArgResults result = parse(resourceProvider, parser, args);
+    DartSdkManager manager =
+        createDartSdkManager(resourceProvider, true, result);
     expect(manager, isNotNull);
     expect(manager.defaultSdkDirectory, 'y');
     expect(manager.canUseSummaries, true);
   }
 
-  void test_declarationCast_noImplicitCast() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
-    ArgParser parser = new ArgParser();
-    defineAnalysisArguments(parser);
-    List<String> args = [
-      '--declaration-casts',
-      '--no-implicit-casts',
-    ];
-    ArgResults result = parse(provider, parser, args);
-    ContextBuilderOptions options = createContextBuilderOptions(result);
-    expect(options, isNotNull);
-    AnalysisOptionsImpl defaultOptions = options.defaultOptions;
-    expect(defaultOptions, isNotNull);
-    expect(defaultOptions.declarationCasts, true);
-    expect(defaultOptions.implicitCasts, false);
-  }
-
   void test_defineAnalysisArguments() {
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
@@ -179,62 +157,40 @@
     expect(result, orderedEquals(['--a', '--c=0', '-e=2', '-f', 'bar']));
   }
 
-  void test_noAssignmentCast() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
+  void test_implicitCast() {
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = [
-      '--no-declaration-casts',
-    ];
-    ArgResults result = parse(provider, parser, args);
-    ContextBuilderOptions options = createContextBuilderOptions(result);
-    expect(options, isNotNull);
-    AnalysisOptionsImpl defaultOptions = options.defaultOptions;
-    expect(defaultOptions, isNotNull);
-    expect(defaultOptions.declarationCasts, false);
-    expect(defaultOptions.implicitCasts, true);
-  }
-
-  void test_noAssignmentCast_implicitCast() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
-    ArgParser parser = new ArgParser();
-    defineAnalysisArguments(parser);
-    List<String> args = [
-      '--no-declaration-casts',
       '--implicit-casts',
     ];
-    ArgResults result = parse(provider, parser, args);
+    ArgResults result = parse(resourceProvider, parser, args);
     ContextBuilderOptions options = createContextBuilderOptions(result);
     expect(options, isNotNull);
     AnalysisOptionsImpl defaultOptions = options.defaultOptions;
     expect(defaultOptions, isNotNull);
-    expect(defaultOptions.declarationCasts, false);
     expect(defaultOptions.implicitCasts, true);
   }
 
   void test_noImplicitCast() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = [
       '--no-implicit-casts',
     ];
-    ArgResults result = parse(provider, parser, args);
+    ArgResults result = parse(resourceProvider, parser, args);
     ContextBuilderOptions options = createContextBuilderOptions(result);
     expect(options, isNotNull);
     AnalysisOptionsImpl defaultOptions = options.defaultOptions;
     expect(defaultOptions, isNotNull);
-    expect(defaultOptions.declarationCasts, false);
     expect(defaultOptions.implicitCasts, false);
   }
 
   void test_parse_noReplacement_noIgnored() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     ArgParser parser = new ArgParser();
     parser.addFlag('xx');
     parser.addOption('yy');
     List<String> args = ['--xx', '--yy=abc', 'foo', 'bar'];
-    ArgResults result = parse(provider, parser, args);
+    ArgResults result = parse(resourceProvider, parser, args);
     expect(result, isNotNull);
     expect(result['xx'], true);
     expect(result['yy'], 'abc');
@@ -242,17 +198,15 @@
   }
 
   void test_preprocessArgs_noReplacement() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
     List<String> original = ['--xx' '--yy' 'baz'];
-    List<String> result = preprocessArgs(provider, original);
+    List<String> result = preprocessArgs(resourceProvider, original);
     expect(result, orderedEquals(original));
     expect(identical(original, result), isFalse);
   }
 
   void test_preprocessArgs_replacement_exists() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
-    String filePath = provider.convertPath('/args.txt');
-    provider.newFile(filePath, '''
+    String filePath = convertPath('/args.txt');
+    newFile(filePath, content: '''
 -a
 --xx
 
@@ -260,16 +214,15 @@
 bar
 ''');
     List<String> result =
-        preprocessArgs(provider, ['--preserved', '@$filePath']);
+        preprocessArgs(resourceProvider, ['--preserved', '@$filePath']);
     expect(result, orderedEquals(['--preserved', '-a', '--xx', 'foo', 'bar']));
   }
 
   void test_preprocessArgs_replacement_nonexistent() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
-    String filePath = provider.convertPath('/args.txt');
+    String filePath = convertPath('/args.txt');
     List<String> args = ['ignored', '@$filePath'];
     try {
-      preprocessArgs(provider, args);
+      preprocessArgs(resourceProvider, args);
       fail('Expect exception');
     } on Exception catch (e) {
       expect(e.toString(), contains('Failed to read file'));
@@ -278,10 +231,9 @@
   }
 
   void test_preprocessArgs_replacement_notLast() {
-    MemoryResourceProvider provider = new MemoryResourceProvider();
-    String filePath = provider.convertPath('/args.txt');
+    String filePath = convertPath('/args.txt');
     List<String> args = ['a', '@$filePath', 'b'];
-    List<String> result = preprocessArgs(provider, args);
+    List<String> result = preprocessArgs(resourceProvider, args);
     expect(result, orderedEquals(args));
   }
 }
diff --git a/pkg/analyzer/test/src/context/abstract_context.dart b/pkg/analyzer/test/src/context/abstract_context.dart
index eb77d7e..131646e 100644
--- a/pkg/analyzer/test/src/context/abstract_context.dart
+++ b/pkg/analyzer/test/src/context/abstract_context.dart
@@ -6,7 +6,6 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
@@ -15,12 +14,12 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/task/api/model.dart';
 import 'package:analyzer/src/task/driver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:plugin/manager.dart';
 import 'package:plugin/plugin.dart';
 import 'package:test/test.dart';
 
-import 'mock_sdk.dart';
-
 /**
  * Finds an [Element] with the given [name].
  */
@@ -43,12 +42,7 @@
  */
 typedef void _ElementVisitorFunction(Element element);
 
-class AbstractContextTest {
-  static final MockSdk SHARED_MOCK_SDK = new MockSdk();
-  static final MockSdk SHARED_STRONG_MOCK_SDK = new MockSdk();
-
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class AbstractContextTest with ResourceProviderMixin {
   DartSdk sdk;
   SourceFactory sourceFactory;
   AnalysisContextImpl context;
@@ -125,8 +119,7 @@
   DartSdk createDartSdk() => new MockSdk(resourceProvider: resourceProvider);
 
   Source newSource(String path, [String content = '']) {
-    File file =
-        resourceProvider.newFile(resourceProvider.convertPath(path), content);
+    File file = newFile(path, content: content);
     return file.createSource();
   }
 
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 45d21f0..3594512 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -1,15 +1,13 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/command_line/arguments.dart';
 import 'package:analyzer/src/context/builder.dart';
 import 'package:analyzer/src/context/context_root.dart';
 import 'package:analyzer/src/context/source.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/bazel.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -17,6 +15,9 @@
 import 'package:analyzer/src/lint/registry.dart';
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer/src/workspace/bazel.dart';
 import 'package:args/args.dart';
 import 'package:package_config/packages.dart';
 import 'package:package_config/src/packages_impl.dart';
@@ -26,7 +27,6 @@
 
 import '../../embedder_tests.dart';
 import '../../generated/test_support.dart';
-import 'mock_sdk.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -36,17 +36,7 @@
 }
 
 @reflectiveTest
-class ContextBuilderTest extends EngineTestCase {
-  /**
-   * The resource provider to be used by tests.
-   */
-  MemoryResourceProvider resourceProvider;
-
-  /**
-   * The path context used to manipulate file paths.
-   */
-  path.Context pathContext;
-
+class ContextBuilderTest extends EngineTestCase with ResourceProviderMixin {
   /**
    * The SDK manager used by the tests;
    */
@@ -79,15 +69,15 @@
   _MockLintRule _mockPublicMemberApiDocs;
 
   Uri convertedDirectoryUri(String directoryPath) {
-    return new Uri.directory(resourceProvider.convertPath(directoryPath),
-        windows: pathContext.style == path.windows.style);
+    return new Uri.directory(convertPath(directoryPath),
+        windows: resourceProvider.pathContext.style == path.windows.style);
   }
 
   void createDefaultSdk(Folder sdkDir) {
-    defaultSdkPath = pathContext.join(sdkDir.path, 'default', 'sdk');
-    String librariesFilePath = pathContext.join(defaultSdkPath, 'lib',
-        '_internal', 'sdk_library_metadata', 'lib', 'libraries.dart');
-    resourceProvider.newFile(librariesFilePath, r'''
+    defaultSdkPath = join(sdkDir.path, 'default', 'sdk');
+    String librariesFilePath = join(defaultSdkPath, 'lib', '_internal',
+        'sdk_library_metadata', 'lib', 'libraries.dart');
+    newFile(librariesFilePath, content: r'''
 const Map<String, LibraryInfo> libraries = const {
   "async": const LibraryInfo("async/async.dart"),
   "core": const LibraryInfo("core/core.dart"),
@@ -98,20 +88,17 @@
         options: builderOptions);
   }
 
-  void createFile(String path, String content) {
-    resourceProvider.newFile(path, content);
-  }
-
   @override
   void setUp() {
-    resourceProvider = new MemoryResourceProvider();
-    pathContext = resourceProvider.pathContext;
     new MockSdk(resourceProvider: resourceProvider);
-    sdkManager =
-        new DartSdkManager(resourceProvider.convertPath('/sdk'), false);
+    sdkManager = new DartSdkManager(convertPath('/sdk'), false);
     contentCache = new ContentCache();
-    builder = new ContextBuilder(resourceProvider, sdkManager, contentCache,
-        options: builderOptions);
+    builder = new ContextBuilder(
+      resourceProvider,
+      sdkManager,
+      contentCache,
+      options: builderOptions,
+    );
   }
 
   @failingTest
@@ -131,11 +118,9 @@
     expected.lint = true;
     expected.lintRules = Registry.ruleRegistry.defaultRules;
 
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
-''');
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath);
 
     AnalysisOptions options = builder.getAnalysisOptions(path);
     _expectEqualOptions(options, expected);
@@ -155,10 +140,9 @@
       Registry.ruleRegistry['mock_lint_rule'],
     ];
 
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 linter:
   rules:
     - mock_lint_rule
@@ -181,10 +165,9 @@
       Registry.ruleRegistry['mock_lint_rule'],
     ];
 
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 linter:
   rules:
     - mock_lint_rule
@@ -207,10 +190,9 @@
       Registry.ruleRegistry['mock_lint_rule'],
     ];
 
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 linter:
   rules:
     - mock_lint_rule
@@ -231,10 +213,9 @@
     expected.lint = false;
     expected.lintRules = <LintRule>[];
 
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 ''');
 
     AnalysisOptions options = builder.getAnalysisOptions(path);
@@ -251,15 +232,15 @@
 //        options: createContextBuilderOptions(argResults));
 //
 //    AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
-//    expected.previewDart2 = true;
+//    expected.option = true;
 //
 //    String path = resourceProvider.convertPath('/some/directory/path');
 //    String filePath =
-//        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+//        join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
 //    resourceProvider.newFile(filePath, '''
 //analyzer:
 //  language:
-//    enablePreviewDart2: true
+//    option: true
 //''');
 //
 //    AnalysisOptions options = builder.getAnalysisOptions(path);
@@ -276,11 +257,11 @@
 
   void test_convertPackagesToMap_packages() {
     String fooName = 'foo';
-    String fooPath = resourceProvider.convertPath('/pkg/foo');
-    Uri fooUri = pathContext.toUri(fooPath);
+    String fooPath = convertPath('/pkg/foo');
+    Uri fooUri = resourceProvider.pathContext.toUri(fooPath);
     String barName = 'bar';
-    String barPath = resourceProvider.convertPath('/pkg/bar');
-    Uri barUri = pathContext.toUri(barPath);
+    String barPath = convertPath('/pkg/bar');
+    Uri barUri = resourceProvider.pathContext.toUri(barPath);
 
     MapPackages packages = new MapPackages({fooName: fooUri, barName: barUri});
     Map<String, List<Folder>> result = builder.convertPackagesToMap(packages);
@@ -311,16 +292,16 @@
 
   void test_createPackageMap_fromPackageDirectory_explicit() {
     // Use a package directory that is outside the project directory.
-    String rootPath = resourceProvider.convertPath('/root');
-    String projectPath = pathContext.join(rootPath, 'project');
-    String packageDirPath = pathContext.join(rootPath, 'packages');
+    String rootPath = convertPath('/root');
+    String projectPath = join(rootPath, 'project');
+    String packageDirPath = join(rootPath, 'packages');
     String fooName = 'foo';
-    String fooPath = pathContext.join(packageDirPath, fooName);
+    String fooPath = join(packageDirPath, fooName);
     String barName = 'bar';
-    String barPath = pathContext.join(packageDirPath, barName);
-    resourceProvider.newFolder(projectPath);
-    resourceProvider.newFolder(fooPath);
-    resourceProvider.newFolder(barPath);
+    String barPath = join(packageDirPath, barName);
+    newFolder(projectPath);
+    newFolder(fooPath);
+    newFolder(barPath);
 
     builderOptions.defaultPackagesDirectoryPath = packageDirPath;
 
@@ -334,14 +315,14 @@
 
   void test_createPackageMap_fromPackageDirectory_inRoot() {
     // Use a package directory that is inside the project directory.
-    String projectPath = resourceProvider.convertPath('/root/project');
-    String packageDirPath = pathContext.join(projectPath, 'packages');
+    String projectPath = convertPath('/root/project');
+    String packageDirPath = join(projectPath, 'packages');
     String fooName = 'foo';
-    String fooPath = pathContext.join(packageDirPath, fooName);
+    String fooPath = join(packageDirPath, fooName);
     String barName = 'bar';
-    String barPath = pathContext.join(packageDirPath, barName);
-    resourceProvider.newFolder(fooPath);
-    resourceProvider.newFolder(barPath);
+    String barPath = join(packageDirPath, barName);
+    newFolder(fooPath);
+    newFolder(barPath);
 
     Packages packages = builder.createPackageMap(projectPath);
     expect(packages, isNotNull);
@@ -353,13 +334,13 @@
 
   void test_createPackageMap_fromPackageFile_explicit() {
     // Use a package file that is outside the project directory's hierarchy.
-    String rootPath = resourceProvider.convertPath('/root');
-    String projectPath = pathContext.join(rootPath, 'project');
-    String packageFilePath = pathContext.join(rootPath, 'child', '.packages');
-    resourceProvider.newFolder(projectPath);
+    String rootPath = convertPath('/root');
+    String projectPath = join(rootPath, 'project');
+    String packageFilePath = join(rootPath, 'child', '.packages');
+    newFolder(projectPath);
     Uri fooUri = convertedDirectoryUri('/pkg/foo');
     Uri barUri = convertedDirectoryUri('/pkg/bar');
-    createFile(packageFilePath, '''
+    newFile(packageFilePath, content: '''
 foo:$fooUri
 bar:$barUri
 ''');
@@ -375,13 +356,13 @@
 
   void test_createPackageMap_fromPackageFile_inParentOfRoot() {
     // Use a package file that is inside the parent of the project directory.
-    String rootPath = resourceProvider.convertPath('/root');
-    String projectPath = pathContext.join(rootPath, 'project');
-    String packageFilePath = pathContext.join(rootPath, '.packages');
-    resourceProvider.newFolder(projectPath);
+    String rootPath = convertPath('/root');
+    String projectPath = join(rootPath, 'project');
+    String packageFilePath = join(rootPath, '.packages');
+    newFolder(projectPath);
     Uri fooUri = convertedDirectoryUri('/pkg/foo');
     Uri barUri = convertedDirectoryUri('/pkg/bar');
-    createFile(packageFilePath, '''
+    newFile(packageFilePath, content: '''
 foo:$fooUri
 bar:$barUri
 ''');
@@ -396,13 +377,13 @@
 
   void test_createPackageMap_fromPackageFile_inRoot() {
     // Use a package file that is inside the project directory.
-    String rootPath = resourceProvider.convertPath('/root');
-    String projectPath = pathContext.join(rootPath, 'project');
-    String packageFilePath = pathContext.join(projectPath, '.packages');
-    resourceProvider.newFolder(projectPath);
+    String rootPath = convertPath('/root');
+    String projectPath = join(rootPath, 'project');
+    String packageFilePath = join(projectPath, '.packages');
+    newFolder(projectPath);
     Uri fooUri = convertedDirectoryUri('/pkg/foo');
     Uri barUri = convertedDirectoryUri('/pkg/bar');
-    createFile(packageFilePath, '''
+    newFile(packageFilePath, content: '''
 foo:$fooUri
 bar:$barUri
 ''');
@@ -416,26 +397,24 @@
   }
 
   void test_createPackageMap_none() {
-    String rootPath = resourceProvider.convertPath('/root');
-    resourceProvider.newFolder(rootPath);
+    String rootPath = convertPath('/root');
+    newFolder(rootPath);
     Packages packages = builder.createPackageMap(rootPath);
     expect(packages, same(Packages.noPackages));
   }
 
   void test_createPackageMap_rootDoesNotExist() {
-    String rootPath = resourceProvider.convertPath('/root');
+    String rootPath = convertPath('/root');
     Packages packages = builder.createPackageMap(rootPath);
     expect(packages, same(Packages.noPackages));
   }
 
   void test_createSourceFactory_bazelWorkspace_fileProvider() {
-    String _p(String path) => resourceProvider.convertPath(path);
-
-    String projectPath = _p('/workspace/my/module');
-    resourceProvider.newFile(_p('/workspace/WORKSPACE'), '');
-    resourceProvider.newFolder(_p('/workspace/bazel-bin'));
-    resourceProvider.newFolder(_p('/workspace/bazel-genfiles'));
-    resourceProvider.newFolder(projectPath);
+    String projectPath = convertPath('/workspace/my/module');
+    newFile('/workspace/WORKSPACE');
+    newFolder('/workspace/bazel-bin');
+    newFolder('/workspace/bazel-genfiles');
+    newFolder(projectPath);
 
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     SourceFactoryImpl factory =
@@ -447,14 +426,12 @@
   }
 
   void test_createSourceFactory_bazelWorkspace_withPackagesFile() {
-    String _p(String path) => resourceProvider.convertPath(path);
-
-    String projectPath = _p('/workspace/my/module');
-    resourceProvider.newFile(_p('/workspace/WORKSPACE'), '');
-    resourceProvider.newFolder(_p('/workspace/bazel-bin'));
-    resourceProvider.newFolder(_p('/workspace/bazel-genfiles'));
-    resourceProvider.newFolder(projectPath);
-    resourceProvider.newFile(_p(path.join(projectPath, '.packages')), '');
+    String projectPath = convertPath('/workspace/my/module');
+    newFile('/workspace/WORKSPACE');
+    newFolder('/workspace/bazel-bin');
+    newFolder('/workspace/bazel-genfiles');
+    newFolder(projectPath);
+    newFile(join(projectPath, '.packages'));
 
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     SourceFactoryImpl factory =
@@ -466,28 +443,28 @@
   }
 
   void test_createSourceFactory_noProvider_packages_embedder_extensions() {
-    String rootPath = resourceProvider.convertPath('/root');
-    Folder rootFolder = resourceProvider.getFolder(rootPath);
+    String rootPath = convertPath('/root');
+    Folder rootFolder = getFolder(rootPath);
     createDefaultSdk(rootFolder);
-    String projectPath = pathContext.join(rootPath, 'project');
-    String packageFilePath = pathContext.join(projectPath, '.packages');
-    String packageA = pathContext.join(rootPath, 'pkgs', 'a');
-    String embedderPath = pathContext.join(packageA, '_embedder.yaml');
-    String packageB = pathContext.join(rootPath, 'pkgs', 'b');
-    String extensionPath = pathContext.join(packageB, '_sdkext');
-    createFile(packageFilePath, '''
-a:${pathContext.toUri(packageA)}
-b:${pathContext.toUri(packageB)}
+    String projectPath = join(rootPath, 'project');
+    String packageFilePath = join(projectPath, '.packages');
+    String packageA = join(rootPath, 'pkgs', 'a');
+    String embedderPath = join(packageA, '_embedder.yaml');
+    String packageB = join(rootPath, 'pkgs', 'b');
+    String extensionPath = join(packageB, '_sdkext');
+    newFile(packageFilePath, content: '''
+a:${resourceProvider.pathContext.toUri(packageA)}
+b:${resourceProvider.pathContext.toUri(packageB)}
 ''');
-    String asyncPath = pathContext.join(packageA, 'sdk', 'async.dart');
-    String corePath = pathContext.join(packageA, 'sdk', 'core.dart');
-    createFile(embedderPath, '''
+    String asyncPath = join(packageA, 'sdk', 'async.dart');
+    String corePath = join(packageA, 'sdk', 'core.dart');
+    newFile(embedderPath, content: '''
 embedded_libs:
   "dart:async": ${_relativeUri(asyncPath, from: packageA)}
   "dart:core": ${_relativeUri(corePath, from: packageA)}
 ''');
-    String fooPath = pathContext.join(packageB, 'ext', 'foo.dart');
-    createFile(extensionPath, '''{
+    String fooPath = join(packageB, 'ext', 'foo.dart');
+    newFile(extensionPath, content: '''{
 "dart:foo": "${_relativeUri(fooPath, from: packageB)}"
 }''');
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
@@ -504,25 +481,25 @@
 
     Source packageSource = factory.forUri('package:b/b.dart');
     expect(packageSource, isNotNull);
-    expect(packageSource.fullName, pathContext.join(packageB, 'b.dart'));
+    expect(packageSource.fullName, join(packageB, 'b.dart'));
   }
 
   void test_createSourceFactory_noProvider_packages_embedder_noExtensions() {
-    String rootPath = resourceProvider.convertPath('/root');
-    Folder rootFolder = resourceProvider.getFolder(rootPath);
+    String rootPath = convertPath('/root');
+    Folder rootFolder = getFolder(rootPath);
     createDefaultSdk(rootFolder);
-    String projectPath = pathContext.join(rootPath, 'project');
-    String packageFilePath = pathContext.join(projectPath, '.packages');
-    String packageA = pathContext.join(rootPath, 'pkgs', 'a');
-    String embedderPath = pathContext.join(packageA, '_embedder.yaml');
-    String packageB = pathContext.join(rootPath, 'pkgs', 'b');
-    createFile(packageFilePath, '''
-a:${pathContext.toUri(packageA)}
-b:${pathContext.toUri(packageB)}
+    String projectPath = join(rootPath, 'project');
+    String packageFilePath = join(projectPath, '.packages');
+    String packageA = join(rootPath, 'pkgs', 'a');
+    String embedderPath = join(packageA, '_embedder.yaml');
+    String packageB = join(rootPath, 'pkgs', 'b');
+    newFile(packageFilePath, content: '''
+a:${resourceProvider.pathContext.toUri(packageA)}
+b:${resourceProvider.pathContext.toUri(packageB)}
 ''');
-    String asyncPath = pathContext.join(packageA, 'sdk', 'async.dart');
-    String corePath = pathContext.join(packageA, 'sdk', 'core.dart');
-    createFile(embedderPath, '''
+    String asyncPath = join(packageA, 'sdk', 'async.dart');
+    String corePath = join(packageA, 'sdk', 'core.dart');
+    newFile(embedderPath, content: '''
 embedded_libs:
   "dart:async": ${_relativeUri(asyncPath, from: packageA)}
   "dart:core": ${_relativeUri(corePath, from: packageA)}
@@ -537,7 +514,7 @@
 
     Source packageSource = factory.forUri('package:b/b.dart');
     expect(packageSource, isNotNull);
-    expect(packageSource.fullName, pathContext.join(packageB, 'b.dart'));
+    expect(packageSource.fullName, join(packageB, 'b.dart'));
   }
 
   @failingTest
@@ -546,16 +523,16 @@
   }
 
   void test_createSourceFactory_noProvider_packages_noEmbedder_noExtensions() {
-    String rootPath = resourceProvider.convertPath('/root');
-    Folder rootFolder = resourceProvider.getFolder(rootPath);
+    String rootPath = convertPath('/root');
+    Folder rootFolder = getFolder(rootPath);
     createDefaultSdk(rootFolder);
-    String projectPath = pathContext.join(rootPath, 'project');
-    String packageFilePath = pathContext.join(projectPath, '.packages');
-    String packageA = pathContext.join(rootPath, 'pkgs', 'a');
-    String packageB = pathContext.join(rootPath, 'pkgs', 'b');
-    createFile(packageFilePath, '''
-a:${pathContext.toUri(packageA)}
-b:${pathContext.toUri(packageB)}
+    String projectPath = join(rootPath, 'project');
+    String packageFilePath = join(projectPath, '.packages');
+    String packageA = join(rootPath, 'pkgs', 'a');
+    String packageB = join(rootPath, 'pkgs', 'b');
+    newFile(packageFilePath, content: '''
+a:${resourceProvider.pathContext.toUri(packageA)}
+b:${resourceProvider.pathContext.toUri(packageB)}
 ''');
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
 
@@ -563,12 +540,12 @@
 
     Source dartSource = factory.forUri('dart:core');
     expect(dartSource, isNotNull);
-    expect(dartSource.fullName,
-        pathContext.join(defaultSdkPath, 'lib', 'core', 'core.dart'));
+    expect(
+        dartSource.fullName, join(defaultSdkPath, 'lib', 'core', 'core.dart'));
 
     Source packageSource = factory.forUri('package:a/a.dart');
     expect(packageSource, isNotNull);
-    expect(packageSource.fullName, pathContext.join(packageA, 'a.dart'));
+    expect(packageSource.fullName, join(packageA, 'a.dart'));
   }
 
   void test_declareVariables_emptyMap() {
@@ -633,10 +610,8 @@
     DartSdk sdk = builder.findSdk(null, new AnalysisOptionsImpl());
     expect(sdk, isNotNull);
     Source htmlSource = sdk.mapDartUri('dart:html');
-    expect(
-        htmlSource.fullName,
-        resourceProvider
-            .convertPath('/sdk/lib/html/dart2js/html_dart2js.dart'));
+    expect(htmlSource.fullName,
+        convertPath('/sdk/lib/html/dart2js/html_dart2js.dart'));
     expect(htmlSource.exists(), isTrue);
   }
 
@@ -647,25 +622,19 @@
     AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
     expected.lint = true;
     expected.lintRules = <Linter>[_mockLintRule];
-    createFile(resourceProvider.convertPath('/root/WORKSPACE'), '');
-    createFile(
-        resourceProvider
-            .convertPath('/root/dart/analysis_options/lib/default.yaml'),
-        '''
+    newFile('/root/WORKSPACE');
+    newFile('/root/dart/analysis_options/lib/default.yaml', content: '''
 linter:
   rules:
     - mock_lint_rule
 ''');
-    createFile(
-        resourceProvider
-            .convertPath('/root/dart/analysis_options/lib/flutter.yaml'),
-        '''
+    newFile('/root/dart/analysis_options/lib/flutter.yaml', content: '''
 linter:
   rules:
     - mock_lint_rule2
 ''');
-    AnalysisOptions options = builder
-        .getAnalysisOptions(resourceProvider.convertPath('/root/some/path'));
+    AnalysisOptions options =
+        builder.getAnalysisOptions(convertPath('/root/some/path'));
     _expectEqualOptions(options, expected);
   }
 
@@ -676,18 +645,15 @@
     AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
     expected.lint = true;
     expected.lintRules = <Linter>[_mockLintRule];
-    String packagesFilePath =
-        resourceProvider.convertPath('/some/directory/path/.packages');
-    createFile(packagesFilePath, 'flutter:/pkg/flutter/lib/');
-    String optionsFilePath = resourceProvider
-        .convertPath('/pkg/flutter/lib/analysis_options_user.yaml');
-    createFile(optionsFilePath, '''
+    String packagesFilePath = convertPath('/some/directory/path/.packages');
+    newFile(packagesFilePath, content: 'flutter:/pkg/flutter/lib/');
+    newFile('/pkg/flutter/lib/analysis_options_user.yaml', content: '''
 linter:
   rules:
     - mock_lint_rule
 ''');
-    String projPath = resourceProvider.convertPath('/some/directory/path');
-    AnalysisOptions options = builder.getAnalysisOptions(projPath);
+    String projectPath = convertPath('/some/directory/path');
+    AnalysisOptions options = builder.getAnalysisOptions(projectPath);
     _expectEqualOptions(options, expected);
   }
 
@@ -697,10 +663,9 @@
     builderOptions.defaultOptions = defaultOptions;
     AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
     expected.enableLazyAssignmentOperators = true;
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 linter:
   rules:
     - empty_constructor_bodies
@@ -716,10 +681,9 @@
     builderOptions.defaultOptions = defaultOptions;
     AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
     expected.implicitDynamic = false;
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 analyzer:
   strong-mode:
     implicit-dynamic: false
@@ -730,13 +694,12 @@
   }
 
   void test_getAnalysisOptions_gnWorkspace() {
-    String _p(String path) => resourceProvider.convertPath(path);
+    String _p(String path) => convertPath(path);
     String projectPath = _p('/workspace/some/path');
-    resourceProvider.newFolder(_p('/workspace/.jiri_root'));
-    resourceProvider.newFile(
-        _p('/workspace/out/debug/gen/dart.sources/foo_pkg'),
-        _p('/workspace/foo_pkg/lib'));
-    resourceProvider.newFolder(projectPath);
+    newFolder('/workspace/.jiri_root');
+    newFile('/workspace/out/debug/gen/dart.sources/foo_pkg',
+        content: _p('/workspace/foo_pkg/lib'));
+    newFolder(projectPath);
     ArgParser argParser = new ArgParser();
     defineAnalysisArguments(argParser);
     ArgResults argResults = argParser.parse([]);
@@ -759,25 +722,23 @@
       _mockLintRule2,
       _mockLintRule3
     ];
-    resourceProvider.newFile(
-        resourceProvider.convertPath('/mypkgs/somepkg/lib/here.yaml'), '''
+    newFile('/mypkgs/somepkg/lib/here.yaml', content: '''
 linter:
   rules:
     - mock_lint_rule3
 ''');
-    String path = resourceProvider.convertPath('/some/directory/path');
-    resourceProvider.newFile(pathContext.join(path, '.packages'), '''
+    String path = convertPath('/some/directory/path');
+    newFile(join(path, '.packages'), content: '''
 somepkg:../../../mypkgs/somepkg/lib
 ''');
-    resourceProvider.newFile(pathContext.join(path, 'bar.yaml'), '''
+    newFile(join(path, 'bar.yaml'), content: '''
 include: package:somepkg/here.yaml
 linter:
   rules:
     - mock_lint_rule2
 ''');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 include: bar.yaml
 linter:
   rules:
@@ -789,20 +750,18 @@
   }
 
   void test_getAnalysisOptions_invalid() {
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, ';');
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: ';');
 
     AnalysisOptions options = builder.getAnalysisOptions(path);
     expect(options, isNotNull);
   }
 
   void test_getAnalysisOptions_noDefault_noOverrides() {
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 linter:
   rules:
     - empty_constructor_bodies
@@ -815,10 +774,9 @@
   void test_getAnalysisOptions_noDefault_overrides() {
     AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
     expected.implicitDynamic = false;
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 analyzer:
   strong-mode:
     implicit-dynamic: false
@@ -829,24 +787,41 @@
   }
 
   void test_getAnalysisOptions_optionsPath() {
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '''
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath, content: '''
 linter:
   rules:
     - empty_constructor_bodies
 ''');
 
-    ContextRoot root = new ContextRoot(path, [], pathContext: pathContext);
+    ContextRoot root =
+        new ContextRoot(path, [], pathContext: resourceProvider.pathContext);
     builder.getAnalysisOptions(path, contextRoot: root);
     expect(root.optionsFilePath, equals(filePath));
   }
 
+  void test_getAnalysisOptions_sdkVersionConstraint() {
+    var projectPath = convertPath('/test');
+    newFile(join(projectPath, AnalysisEngine.PUBSPEC_YAML_FILE), content: '''
+environment:
+  sdk: ^2.1.0
+''');
+
+    var options = builder.getAnalysisOptions(projectPath);
+    expect(options.sdkVersionConstraint.toString(), '^2.1.0');
+  }
+
+  void test_getAnalysisOptions_sdkVersionConstraint_any_noOptionsFile() {
+    var projectPath = convertPath('/test');
+    var options = builder.getAnalysisOptions(projectPath);
+    expect(options.sdkVersionConstraint, isNull);
+  }
+
   void test_getOptionsFile_explicit() {
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath = resourceProvider.convertPath('/options/analysis.yaml');
-    resourceProvider.newFile(filePath, '');
+    String path = convertPath('/some/directory/path');
+    String filePath = convertPath('/options/analysis.yaml');
+    newFile(filePath);
 
     builderOptions.defaultAnalysisOptionsFilePath = filePath;
     File result = builder.getOptionsFile(path);
@@ -855,11 +830,11 @@
   }
 
   void test_getOptionsFile_inParentOfRoot_new() {
-    String parentPath = resourceProvider.convertPath('/some/directory');
-    String path = pathContext.join(parentPath, 'path');
+    String parentPath = convertPath('/some/directory');
+    String path = join(parentPath, 'path');
     String filePath =
-        pathContext.join(parentPath, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '');
+        join(parentPath, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath);
 
     File result = builder.getOptionsFile(path);
     expect(result, isNotNull);
@@ -867,11 +842,10 @@
   }
 
   void test_getOptionsFile_inParentOfRoot_old() {
-    String parentPath = resourceProvider.convertPath('/some/directory');
-    String path = pathContext.join(parentPath, 'path');
-    String filePath =
-        pathContext.join(parentPath, AnalysisEngine.ANALYSIS_OPTIONS_FILE);
-    resourceProvider.newFile(filePath, '');
+    String parentPath = convertPath('/some/directory');
+    String path = join(parentPath, 'path');
+    String filePath = join(parentPath, AnalysisEngine.ANALYSIS_OPTIONS_FILE);
+    newFile(filePath);
 
     File result = builder.getOptionsFile(path);
     expect(result, isNotNull);
@@ -879,10 +853,9 @@
   }
 
   void test_getOptionsFile_inRoot_new() {
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
-    resourceProvider.newFile(filePath, '');
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+    newFile(filePath);
 
     File result = builder.getOptionsFile(path);
     expect(result, isNotNull);
@@ -890,10 +863,9 @@
   }
 
   void test_getOptionsFile_inRoot_old() {
-    String path = resourceProvider.convertPath('/some/directory/path');
-    String filePath =
-        pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_FILE);
-    resourceProvider.newFile(filePath, '');
+    String path = convertPath('/some/directory/path');
+    String filePath = join(path, AnalysisEngine.ANALYSIS_OPTIONS_FILE);
+    newFile(filePath);
 
     File result = builder.getOptionsFile(path);
     expect(result, isNotNull);
@@ -931,7 +903,6 @@
     expect(actual.preserveComments, expected.preserveComments);
     expect(actual.strongMode, expected.strongMode);
     expect(actual.strongModeHints, expected.strongModeHints);
-    expect(actual.declarationCasts, expected.declarationCasts);
     expect(actual.implicitCasts, expected.implicitCasts);
     expect(actual.implicitDynamic, expected.implicitDynamic);
     expect(actual.trackCacheDependencies, expected.trackCacheDependencies);
@@ -939,6 +910,7 @@
   }
 
   Uri _relativeUri(String path, {String from}) {
+    var pathContext = resourceProvider.pathContext;
     String relativePath = pathContext.relative(path, from: from);
     return pathContext.toUri(relativePath);
   }
diff --git a/pkg/analyzer/test/src/context/cache_test.dart b/pkg/analyzer/test/src/context/cache_test.dart
index fbd0736..2b42c7d9 100644
--- a/pkg/analyzer/test/src/context/cache_test.dart
+++ b/pkg/analyzer/test/src/context/cache_test.dart
@@ -4,7 +4,6 @@
 
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
@@ -14,6 +13,7 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/task/api/model.dart';
 import 'package:analyzer/src/task/model.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -1162,13 +1162,12 @@
 }
 
 @reflectiveTest
-class PackageCachePartitionTest extends CachePartitionTest {
-  MemoryResourceProvider resourceProvider;
+class PackageCachePartitionTest extends CachePartitionTest
+    with ResourceProviderMixin {
   Folder rootFolder;
 
   CachePartition createPartition() {
-    resourceProvider = new MemoryResourceProvider();
-    rootFolder = resourceProvider.newFolder('/package/root');
+    rootFolder = newFolder('/package/root');
     return new PackageCachePartition(null, rootFolder);
   }
 
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index b33ce36..df8a221 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -26,6 +26,7 @@
 import 'package:analyzer/src/task/api/model.dart';
 import 'package:analyzer/src/task/dart.dart';
 import 'package:analyzer/src/task/html.dart';
+import 'package:analyzer/src/test_utilities/element_type_matchers.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:html/dom.dart' show Document;
 import 'package:test/test.dart';
@@ -1671,8 +1672,7 @@
     expect(library, isNotNull);
     Namespace namespace = context.getPublicNamespace(library);
     expect(namespace, isNotNull);
-    EngineTestCase.assertInstanceOf(
-        (obj) => obj is ClassElement, ClassElement, namespace.get("A"));
+    expect(namespace.get("A"), isClassElement);
   }
 
   void test_getResolvedCompilationUnit_library() {
@@ -2686,7 +2686,7 @@
   void test_validateCacheConsistency_deletedFile() {
     String pathA = '/a.dart';
     String pathB = '/b.dart';
-    var fileA = newFile(pathA, content: "");
+    var fileA = newFile(pathA);
     var fileB = newFile(pathB, content: "import 'a.dart';");
     Source sourceA = fileA.createSource();
     Source sourceB = fileB.createSource();
diff --git a/pkg/analyzer/test/src/context/mock_sdk.dart b/pkg/analyzer/test/src/context/mock_sdk.dart
deleted file mode 100644
index ba87ba5..0000000
--- a/pkg/analyzer/test/src/context/mock_sdk.dart
+++ /dev/null
@@ -1,686 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/file_system/file_system.dart' as resource;
-import 'package:analyzer/file_system/memory_file_system.dart' as resource;
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
-import 'package:analyzer/src/summary/summary_file_builder.dart';
-
-const String librariesContent = r'''
-const Map<String, LibraryInfo> libraries = const {
-  "async": const LibraryInfo("async/async.dart"),
-  "collection": const LibraryInfo("collection/collection.dart"),
-  "convert": const LibraryInfo("convert/convert.dart"),
-  "core": const LibraryInfo("core/core.dart"),
-  "html": const LibraryInfo(
-    "html/dartium/html_dartium.dart",
-    dart2jsPath: "html/dart2js/html_dart2js.dart"),
-  "math": const LibraryInfo("math/math.dart"),
-  "_foreign_helper": const LibraryInfo("_internal/js_runtime/lib/foreign_helper.dart"),
-};
-''';
-
-const String sdkRoot = '/sdk';
-
-const _MockSdkLibrary _LIB_ASYNC =
-    const _MockSdkLibrary('dart:async', '$sdkRoot/lib/async/async.dart', '''
-library dart.async;
-
-import 'dart:math';
-
-part 'stream.dart';
-
-class Future<T> {
-  factory Future(computation()) => null;
-  factory Future.delayed(Duration duration, [T computation()]) => null;
-  factory Future.microtask(FutureOr<T> computation()) => null;
-  factory Future.value([FutureOr<T> result]) => null;
-
-  static Future<List<T>> wait<T>(
-      Iterable<Future<T>> futures) => null;
-  Future<R> then<R>(FutureOr<R> onValue(T value)) => null;
-
-  Future<T> whenComplete(action());
-}
-
-class FutureOr<T> {}
-
-abstract class Completer<T> {
-  factory Completer() => null;
-  factory Completer.sync() => null;
-  Future<T> get future;
-  void complete([value]);
-  void completeError(Object error, [StackTrace stackTrace]);
-  bool get isCompleted;
-}
-
-abstract class Timer {
-  static void run(void callback()) {}
-}
-
-class _StreamIterator<T> implements StreamIterator<T> {}
-class _AsyncStarStreamController {}
-Function _asyncThenWrapperHelper(continuation) {}
-Function _asyncErrorWrapperHelper(continuation) {}
-Future _awaitHelper(
-    object, Function thenCallback, Function errorCallback, var awaiter) {}
-''', const <String, String>{
-  '$sdkRoot/lib/async/stream.dart': r'''
-part of dart.async;
-abstract class Stream<T> {
-  Future<T> get first;
-  StreamSubscription<T> listen(void onData(T event),
-                               { Function onError,
-                                 void onDone(),
-                                 bool cancelOnError});
-  Stream();
-  factory Stream.fromIterable(Iterable<T> data) => null;
-}
-
-abstract class StreamIterator<T> {}
-
-abstract class StreamSubscription<T> {
-  Future cancel();
-  void onData(void handleData(T data));
-  void onError(Function handleError);
-  void onDone(void handleDone());
-  void pause([Future resumeSignal]);
-  void resume();
-  bool get isPaused;
-  Future<E> asFuture<E>([E futureValue]);
-}
-
-abstract class StreamTransformer<S, T> {}
-'''
-});
-
-const _MockSdkLibrary _LIB_ASYNC2 =
-    const _MockSdkLibrary('dart:async2', '$sdkRoot/lib/async2/async2.dart', '''
-library dart.async2;
-
-class Future {}
-''');
-
-const _MockSdkLibrary _LIB_COLLECTION = const _MockSdkLibrary(
-    'dart:collection', '$sdkRoot/lib/collection/collection.dart', '''
-library dart.collection;
-
-abstract class HashMap<K, V> implements Map<K, V> {}
-''');
-
-const _MockSdkLibrary _LIB_CONVERT = const _MockSdkLibrary(
-    'dart:convert', '$sdkRoot/lib/convert/convert.dart', '''
-library dart.convert;
-
-import 'dart:async';
-
-abstract class Converter<S, T> implements StreamTransformer {}
-class JsonDecoder extends Converter<String, Object> {}
-''');
-
-const _MockSdkLibrary _LIB_CORE =
-    const _MockSdkLibrary('dart:core', '$sdkRoot/lib/core/core.dart', '''
-library dart.core;
-
-import 'dart:async';
-import 'dart:_internal';
-
-export 'dart:async' show Future, Stream;
-
-class Object {
-  const Object();
-  bool operator ==(other) => identical(this, other);
-  String toString() => 'a string';
-  int get hashCode => 0;
-  Type get runtimeType => null;
-  dynamic noSuchMethod(Invocation invocation) => null;
-}
-
-class Function {}
-class StackTrace {}
-
-class Symbol {
-  const factory Symbol(String name) = _SymbolImpl;
-}
-
-class _SymbolImpl {
-  const _SymbolImpl(String name);
-}
-
-class Type {}
-
-abstract class Comparable<T> {
-  int compareTo(T other);
-}
-
-abstract class Pattern {}
-abstract class String implements Comparable<String>, Pattern {
-  external factory String.fromCharCodes(Iterable<int> charCodes,
-                                        [int start = 0, int end]);
-  String operator +(String other) => null;
-  bool operator ==(Object other);
-  bool get isEmpty => false;
-  bool get isNotEmpty => false;
-  int get length => 0;
-  int codeUnitAt(int index);
-  String substring(int len) => null;
-  String toLowerCase();
-  String toUpperCase();
-  List<int> get codeUnits;
-}
-abstract class RegExp implements Pattern {
-  external factory RegExp(String source);
-}
-
-class bool extends Object {
-  external const factory bool.fromEnvironment(String name,
-                                              {bool defaultValue: false});
-}
-
-abstract class Invocation {}
-
-abstract class num implements Comparable<num> {
-  bool operator ==(Object other);
-  bool operator <(num other);
-  bool operator <=(num other);
-  bool operator >(num other);
-  bool operator >=(num other);
-  num operator +(num other);
-  num operator -(num other);
-  num operator *(num other);
-  double operator /(num other);
-  int operator ^(int other);
-  int operator |(int other);
-  int operator <<(int other);
-  int operator >>(int other);
-  int operator ~/(num other);
-  num operator %(num other);
-  int operator ~();
-  num operator -();
-  int toInt();
-  double toDouble();
-  num abs();
-  int round();
-}
-abstract class int extends num {
-  external const factory int.fromEnvironment(String name, {int defaultValue});
-
-  bool get isNegative;
-  bool get isEven => false;
-
-  int operator &(int other);
-  int operator |(int other);
-  int operator ^(int other);
-  int operator ~();
-  int operator <<(int shiftAmount);
-  int operator >>(int shiftAmount);
-
-  int operator -();
-
-  external static int parse(String source,
-                            { int radix,
-                              int onError(String source) });
-
-  String toString();
-}
-
-abstract class double extends num {
-  static const double NAN = 0.0 / 0.0;
-  static const double INFINITY = 1.0 / 0.0;
-  static const double NEGATIVE_INFINITY = -INFINITY;
-  static const double MIN_POSITIVE = 5e-324;
-  static const double MAX_FINITE = 1.7976931348623157e+308;
-
-  double remainder(num other);
-  double operator +(num other);
-  double operator -(num other);
-  double operator *(num other);
-  double operator %(num other);
-  double operator /(num other);
-  int operator ~/(num other);
-  double operator -();
-  double abs();
-  double get sign;
-  int round();
-  int floor();
-  int ceil();
-  int truncate();
-  double roundToDouble();
-  double floorToDouble();
-  double ceilToDouble();
-  double truncateToDouble();
-  external static double parse(String source,
-                               [double onError(String source)]);
-}
-
-class DateTime extends Object {}
-
-class Null extends Object {
-  factory Null._uninstantiable() => null;
-}
-
-class Deprecated extends Object {
-  final String expires;
-  const Deprecated(this.expires);
-}
-const Object deprecated = const Deprecated("next release");
-
-class Iterator<E> {
-  bool moveNext();
-  E get current;
-}
-
-abstract class Iterable<E> {
-  Iterator<E> get iterator;
-  bool get isEmpty;
-  E get first;
-  int get length;
-
-  Iterable<R> map<R>(R f(E e));
-
-  R fold<R>(R initialValue,
-      R combine(R previousValue, E element)) => null;
-
-  Iterable<T> expand<T>(Iterable<T> f(E element));
-
-  Iterable<E> where(bool test(E element));
-
-  void forEach(void f(E element));
-
-  List<E> toList();
-}
-
-class List<E> implements Iterable<E> {
-  List([int length]);
-  factory List.from(Iterable elements, {bool growable: true}) => null;
-  void add(E value) {}
-  void addAll(Iterable<E> iterable) {}
-  E operator [](int index) => null;
-  void operator []=(int index, E value) {}
-  Iterator<E> get iterator => null;
-  void clear() {}
-
-  bool get isEmpty => false;
-  E get first => null;
-  E get last => null;
-
-}
-
-class Map<K, V> extends Object {
-  Iterable<K> get keys => null;
-  int get length;
-  Iterable<V> get values;
-  V operator [](K key) => null;
-  void operator []=(K key, V value) {}
-  Map<RK, RV> cast<RK, RV>();
-  bool containsKey(Object key);
-}
-
-class Duration implements Comparable<Duration> {}
-
-class Exception {
-  factory Exception([var message]) => null;
-}
-
-external bool identical(Object a, Object b);
-
-void print(Object object) {}
-
-class _Proxy { const _Proxy(); }
-const Object proxy = const _Proxy();
-
-class _Override { const _Override(); }
-const Object override = const _Override();
-
-class _CompileTimeError {
-  final String _errorMsg;
-  _CompileTimeError(this._errorMsg);
-}
-
-class AbstractClassInstantiationError {
-  AbstractClassInstantiationError(String className);
-}
-
-class FallThroughError {
-  FallThroughError();
-  FallThroughError._create(String url, int line);
-}
-
-abstract class _SyncIterable implements Iterable {}
-class _InvocationMirror {
-  _InvocationMirror._withoutType(
-      String _functionName, List<Type> _typeArguments,
-      List _positionalArguments, Map<Symbol, dynamic>_namedArguments,
-      bool _isSuperInvocation);
-}
-''');
-
-const _MockSdkLibrary _LIB_FOREIGN_HELPER = const _MockSdkLibrary(
-    'dart:_foreign_helper',
-    '$sdkRoot/lib/_foreign_helper/_foreign_helper.dart', '''
-library dart._foreign_helper;
-
-JS(String typeDescription, String codeTemplate,
-  [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11])
-{}
-''');
-
-const _MockSdkLibrary _LIB_HTML_DART2JS = const _MockSdkLibrary(
-    'dart:html', '$sdkRoot/lib/html/dart2js/html_dart2js.dart', '''
-library dart.html;
-class HtmlElement {}
-''');
-
-const _MockSdkLibrary _LIB_HTML_DARTIUM = const _MockSdkLibrary(
-    'dart:html', '$sdkRoot/lib/html/dartium/html_dartium.dart', '''
-library dart.dom.html;
-
-final HtmlDocument document;
-
-abstract class Element {}
-
-abstract class HtmlDocument {
-  Element query(String relativeSelectors) => null;
-}
-
-abstract class HtmlElement extends Element {}
-
-abstract class AnchorElement extends HtmlElement {}
-abstract class BodyElement extends HtmlElement {}
-abstract class ButtonElement extends HtmlElement {}
-abstract class DivElement extends HtmlElement {}
-abstract class InputElement extends HtmlElement {}
-abstract class SelectElement extends HtmlElement {}
-
-
-abstract class CanvasElement extends HtmlElement {
-  Object getContext(String contextId, [Map attributes]);
-  CanvasRenderingContext2D get context2D;
-}
-
-abstract class CanvasRenderingContext2D {}
-
-Element query(String relativeSelectors) => null;
-''');
-
-const _MockSdkLibrary _LIB_INTERCEPTORS = const _MockSdkLibrary(
-    'dart:_interceptors',
-    '$sdkRoot/lib/_internal/js_runtime/lib/interceptors.dart', '''
-library dart._interceptors;
-''');
-
-const _MockSdkLibrary _LIB_INTERNAL = const _MockSdkLibrary(
-    'dart:_internal', '$sdkRoot/lib/_internal/internal.dart', '''
-library dart._internal;
-class Symbol {}
-class ExternalName {
-  final String name;
-  const ExternalName(this.name);
-}
-''');
-
-const _MockSdkLibrary _LIB_MATH =
-    const _MockSdkLibrary('dart:math', '$sdkRoot/lib/math/math.dart', '''
-library dart.math;
-
-const double E = 2.718281828459045;
-const double PI = 3.1415926535897932;
-const double LN10 =  2.302585092994046;
-
-T min<T extends num>(T a, T b) => null;
-T max<T extends num>(T a, T b) => null;
-
-external double cos(num radians);
-external double sin(num radians);
-external double sqrt(num radians);
-class Random {
-  bool nextBool() => true;
-  double nextDouble() => 2.0;
-  int nextInt() => 1;
-}
-''');
-
-const List<SdkLibrary> _LIBRARIES = const [
-  _LIB_CORE,
-  _LIB_ASYNC,
-  _LIB_ASYNC2,
-  _LIB_COLLECTION,
-  _LIB_CONVERT,
-  _LIB_FOREIGN_HELPER,
-  _LIB_MATH,
-  _LIB_HTML_DART2JS,
-  _LIB_HTML_DARTIUM,
-  _LIB_INTERCEPTORS,
-  _LIB_INTERNAL,
-];
-
-class MockSdk implements DartSdk {
-  static const Map<String, String> _URI_MAP = const {
-    "dart:core": "$sdkRoot/lib/core/core.dart",
-    "dart:html": "$sdkRoot/lib/html/dartium/html_dartium.dart",
-    "dart:async": "$sdkRoot/lib/async/async.dart",
-    "dart:async2": "$sdkRoot/lib/async2/async2.dart",
-    "dart:async/stream.dart": "$sdkRoot/lib/async/stream.dart",
-    "dart:collection": "$sdkRoot/lib/collection/collection.dart",
-    "dart:convert": "$sdkRoot/lib/convert/convert.dart",
-    "dart:_foreign_helper": "$sdkRoot/lib/_foreign_helper/_foreign_helper.dart",
-    "dart:_interceptors":
-        "$sdkRoot/lib/_internal/js_runtime/lib/interceptors.dart",
-    "dart:_internal": "$sdkRoot/lib/_internal/internal.dart",
-    "dart:math": "$sdkRoot/lib/math/math.dart"
-  };
-
-  final resource.MemoryResourceProvider provider;
-
-  final Map<String, String> uriMap = {};
-
-  /**
-   * The [AnalysisContextImpl] which is used for all of the sources.
-   */
-  AnalysisContextImpl _analysisContext;
-
-  @override
-  final List<SdkLibrary> sdkLibraries = [];
-
-  /**
-   * The cached linked bundle of the SDK.
-   */
-  PackageBundle _bundle;
-
-  MockSdk(
-      {bool generateSummaryFiles: false,
-      resource.MemoryResourceProvider resourceProvider})
-      : provider = resourceProvider ?? new resource.MemoryResourceProvider() {
-    _URI_MAP.forEach((uri, path) {
-      uriMap[uri] = provider.convertPath(path);
-    });
-
-    for (_MockSdkLibrary library in _LIBRARIES) {
-      var convertedLibrary = library._toProvider(provider);
-      sdkLibraries.add(convertedLibrary);
-    }
-
-    for (_MockSdkLibrary library in sdkLibraries) {
-      provider.newFile(library.path, library.content);
-      library.parts.forEach((String path, String content) {
-        provider.newFile(path, content);
-      });
-    }
-    provider.newFile(
-        provider.convertPath(
-            '$sdkRoot/lib/_internal/sdk_library_metadata/lib/libraries.dart'),
-        librariesContent);
-    if (generateSummaryFiles) {
-      List<int> bytes = _computeLinkedBundleBytes();
-      provider.newFileWithBytes(
-          provider.convertPath('/lib/_internal/strong.sum'), bytes);
-    }
-  }
-
-  @override
-  AnalysisContextImpl get context {
-    if (_analysisContext == null) {
-      _analysisContext = new _SdkAnalysisContext(this);
-      SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
-      _analysisContext.sourceFactory = factory;
-    }
-    return _analysisContext;
-  }
-
-  @override
-  String get sdkVersion => throw new UnimplementedError();
-
-  @override
-  List<String> get uris =>
-      sdkLibraries.map((SdkLibrary library) => library.shortName).toList();
-
-  @override
-  Source fromFileUri(Uri uri) {
-    String filePath = provider.pathContext.fromUri(uri);
-    if (!filePath.startsWith(provider.convertPath('$sdkRoot/lib/'))) {
-      return null;
-    }
-    for (SdkLibrary library in sdkLibraries) {
-      String libraryPath = library.path;
-      if (filePath == libraryPath) {
-        try {
-          resource.File file = provider.getResource(filePath);
-          Uri dartUri = Uri.parse(library.shortName);
-          return file.createSource(dartUri);
-        } catch (exception) {
-          return null;
-        }
-      }
-      String libraryRootPath = provider.pathContext.dirname(libraryPath) +
-          provider.pathContext.separator;
-      if (filePath.startsWith(libraryRootPath)) {
-        String pathInLibrary = filePath.substring(libraryRootPath.length);
-        String uriStr = '${library.shortName}/$pathInLibrary';
-        try {
-          resource.File file = provider.getResource(filePath);
-          Uri dartUri = Uri.parse(uriStr);
-          return file.createSource(dartUri);
-        } catch (exception) {
-          return null;
-        }
-      }
-    }
-    return null;
-  }
-
-  @override
-  PackageBundle getLinkedBundle() {
-    if (_bundle == null) {
-      resource.File summaryFile =
-          provider.getFile(provider.convertPath('/lib/_internal/strong.sum'));
-      List<int> bytes;
-      if (summaryFile.exists) {
-        bytes = summaryFile.readAsBytesSync();
-      } else {
-        bytes = _computeLinkedBundleBytes();
-      }
-      _bundle = new PackageBundle.fromBuffer(bytes);
-    }
-    return _bundle;
-  }
-
-  @override
-  SdkLibrary getSdkLibrary(String dartUri) {
-    for (SdkLibrary library in _LIBRARIES) {
-      if (library.shortName == dartUri) {
-        return library;
-      }
-    }
-    return null;
-  }
-
-  @override
-  Source mapDartUri(String dartUri) {
-    String path = uriMap[dartUri];
-    if (path != null) {
-      resource.File file = provider.getResource(path);
-      Uri uri = new Uri(scheme: 'dart', path: dartUri.substring(5));
-      return file.createSource(uri);
-    }
-    // If we reach here then we tried to use a dartUri that's not in the
-    // table above.
-    return null;
-  }
-
-  /**
-   * Compute the bytes of the linked bundle associated with this SDK.
-   */
-  List<int> _computeLinkedBundleBytes() {
-    List<Source> librarySources = sdkLibraries
-        .map((SdkLibrary library) => mapDartUri(library.shortName))
-        .toList();
-    return new SummaryBuilder(librarySources, context).build();
-  }
-}
-
-class _MockSdkLibrary implements SdkLibrary {
-  final String shortName;
-  final String path;
-  final String content;
-  final Map<String, String> parts;
-
-  const _MockSdkLibrary(this.shortName, this.path, this.content,
-      [this.parts = const <String, String>{}]);
-
-  @override
-  String get category => throw new UnimplementedError();
-
-  @override
-  bool get isDart2JsLibrary => throw new UnimplementedError();
-
-  @override
-  bool get isDocumented => throw new UnimplementedError();
-
-  @override
-  bool get isImplementation => throw new UnimplementedError();
-
-  @override
-  bool get isInternal => shortName.startsWith('dart:_');
-
-  @override
-  bool get isShared => throw new UnimplementedError();
-
-  @override
-  bool get isVmLibrary => throw new UnimplementedError();
-
-  _MockSdkLibrary _toProvider(resource.MemoryResourceProvider provider) {
-    return new _MockSdkLibrary(
-      shortName,
-      provider.convertPath(path),
-      content,
-      parts.map((path, content) {
-        var convertedPath = provider.convertPath(path);
-        return new MapEntry(convertedPath, content);
-      }),
-    );
-  }
-}
-
-/**
- * An [AnalysisContextImpl] that only contains sources for a Dart SDK.
- */
-class _SdkAnalysisContext extends AnalysisContextImpl {
-  final DartSdk sdk;
-
-  _SdkAnalysisContext(this.sdk);
-
-  @override
-  AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
-    if (factory == null) {
-      return super.createCacheFromSourceFactory(factory);
-    }
-    return new AnalysisCache(
-        <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
-  }
-}
diff --git a/pkg/analyzer/test/src/context/source_test.dart b/pkg/analyzer/test/src/context/source_test.dart
index 18cc9b8..45a5ffc 100644
--- a/pkg/analyzer/test/src/context/source_test.dart
+++ b/pkg/analyzer/test/src/context/source_test.dart
@@ -20,8 +20,8 @@
 @reflectiveTest
 class SourceFactoryImplTest extends AbstractContextTest {
   void test_restoreUri() {
-    String libPath = resourceProvider.convertPath('/pkgs/somepkg/lib');
-    Uri libUri = resourceProvider.getFolder(libPath).toUri();
+    String libPath = convertPath('/pkgs/somepkg/lib');
+    Uri libUri = getFolder(libPath).toUri();
     Map<String, Uri> packageUriMap = <String, Uri>{'foo': libUri};
     SourceFactoryImpl sourceFactory = new SourceFactoryImpl(
       <UriResolver>[new ResourceUriResolver(resourceProvider)],
diff --git a/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart b/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart
index 0afd0b0..b2870e7 100644
--- a/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart
@@ -1,15 +1,14 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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/src/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:meta/meta.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../context/mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AnalysisContextCollectionTest);
@@ -17,7 +16,7 @@
 }
 
 @reflectiveTest
-class AnalysisContextCollectionTest extends Object with ResourceProviderMixin {
+class AnalysisContextCollectionTest with ResourceProviderMixin {
   void setUp() {
     new MockSdk(resourceProvider: resourceProvider);
   }
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index e9f6eaa..a834e3d 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.dart
@@ -2,12 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/status.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
@@ -16,12 +18,10 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 
-import '../../context/mock_sdk.dart';
-
 /**
  * Finds an [Element] with the given [name].
  */
@@ -46,8 +46,7 @@
  */
 typedef void _ElementVisitorFunction(Element element);
 
-class BaseAnalysisDriverTest {
-  final MemoryResourceProvider provider = new MemoryResourceProvider();
+class BaseAnalysisDriverTest with ResourceProviderMixin {
   DartSdk sdk;
   final ByteStore byteStore = new MemoryByteStore();
   final FileContentOverlay contentOverlay = new FileContentOverlay();
@@ -60,7 +59,7 @@
   AnalysisDriverScheduler scheduler;
   AnalysisDriver driver;
   final List<AnalysisStatus> allStatuses = <AnalysisStatus>[];
-  final List<AnalysisResult> allResults = <AnalysisResult>[];
+  final List<ResolvedUnitResult> allResults = <ResolvedUnitResult>[];
   final List<ExceptionResult> allExceptions = <ExceptionResult>[];
 
   String testProject;
@@ -71,7 +70,7 @@
 
   void addTestFile(String content, {bool priority: false}) {
     testCode = content;
-    provider.newFile(testFile, content);
+    newFile(testFile, content: content);
     driver.addFile(testFile);
     if (priority) {
       driver.priorityFiles = [testFile];
@@ -82,25 +81,26 @@
       {Map<String, List<Folder>> packageMap,
       SummaryDataStore externalSummaries}) {
     packageMap ??= <String, List<Folder>>{
-      'test': [provider.getFolder(testProject)],
-      'aaa': [provider.getFolder(_p('/aaa/lib'))],
-      'bbb': [provider.getFolder(_p('/bbb/lib'))],
+      'test': [getFolder(testProject)],
+      'aaa': [getFolder('/aaa/lib')],
+      'bbb': [getFolder('/bbb/lib')],
     };
     return new AnalysisDriver(
         scheduler,
         logger,
-        provider,
+        resourceProvider,
         byteStore,
         contentOverlay,
         null,
         new SourceFactory([
           new DartUriResolver(sdk),
           generatedUriResolver,
-          new PackageMapUriResolver(provider, packageMap),
-          new ResourceUriResolver(provider)
-        ], null, provider),
+          new PackageMapUriResolver(resourceProvider, packageMap),
+          new ResourceUriResolver(resourceProvider)
+        ], null, resourceProvider),
         createAnalysisOptions(),
         disableChangesAndCacheAllResults: disableChangesAndCacheAllResults,
+        enableIndex: true,
         externalSummaries: externalSummaries);
   }
 
@@ -137,9 +137,9 @@
   }
 
   void setUp() {
-    sdk = new MockSdk(resourceProvider: provider);
-    testProject = _p('/test/lib');
-    testFile = _p('/test/lib/test.dart');
+    sdk = new MockSdk(resourceProvider: resourceProvider);
+    testProject = convertPath('/test/lib');
+    testFile = convertPath('/test/lib/test.dart');
     logger = new PerformanceLog(logBuffer);
     scheduler = new AnalysisDriverScheduler(logger);
     driver = createAnalysisDriver();
@@ -150,8 +150,6 @@
   }
 
   void tearDown() {}
-
-  String _p(String path) => provider.convertPath(path);
 }
 
 /**
@@ -174,6 +172,9 @@
   Uri Function(Source) restoreAbsoluteFunction;
 
   @override
+  void clearCache() {}
+
+  @override
   noSuchMethod(Invocation invocation) {
     throw new StateError('Unexpected invocation of ${invocation.memberName}');
   }
diff --git a/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart b/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
index 86c3094..c98351b 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_builder_test.dart
@@ -7,16 +7,14 @@
 import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/analysis/context_root.dart';
 import 'package:analyzer/dart/analysis/declared_variables.dart';
-import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/context_builder.dart';
 import 'package:analyzer/src/dart/analysis/context_root.dart';
 import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../context/mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ContextBuilderImplTest);
@@ -24,7 +22,7 @@
 }
 
 @reflectiveTest
-class ContextBuilderImplTest extends Object with ResourceProviderMixin {
+class ContextBuilderImplTest with ResourceProviderMixin {
   ContextBuilderImpl contextBuilder;
   ContextRoot contextRoot;
 
@@ -38,11 +36,9 @@
   }
 
   void setUp() {
-    resourceProvider.newFolder(resourceProvider.pathContext.dirname(
-        resourceProvider.pathContext.dirname(io.Platform.resolvedExecutable)));
+    newFile(io.Platform.resolvedExecutable); // create folders
+    var folder = newFolder('/home/test');
     contextBuilder = new ContextBuilderImpl(resourceProvider: resourceProvider);
-    String path = resourceProvider.convertPath('/temp/root');
-    Folder folder = resourceProvider.newFolder(path);
     contextRoot = new ContextRootImpl(resourceProvider, folder);
   }
 
diff --git a/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart b/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart
index 388be9b..300320e 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -16,7 +16,7 @@
 }
 
 @reflectiveTest
-class ContextLocatorImplTest extends Object with ResourceProviderMixin {
+class ContextLocatorImplTest with ResourceProviderMixin {
   ContextLocatorImpl contextLocator;
 
   ContextRoot findRoot(List<ContextRoot> roots, Resource rootFolder) {
@@ -440,6 +440,31 @@
     expect(outerRoot.packagesFile, outerPackagesFile);
   }
 
+  @failingTest
+  void test_locateRoots_options_withExclude() {
+    // https://github.com/dart-lang/sdk/issues/35519
+    Folder rootFolder = newFolder('/test/outer');
+    newFolder('/test/outer/test/data');
+    File dataFile = newFile('/test/outer/test/data/test.dart');
+    File optionsFile = newOptionsFile('/test/outer', content: '''
+analyzer:
+  exclude:
+    - test/data/**
+''');
+    File packagesFile = newPackagesFile('/test/outer');
+
+    List<ContextRoot> roots =
+        contextLocator.locateRoots(includedPaths: [rootFolder.path]);
+    expect(roots, hasLength(1));
+
+    ContextRoot root = findRoot(roots, rootFolder);
+    expect(root.includedPaths, unorderedEquals([rootFolder.path]));
+    expect(root.excludedPaths, isEmpty);
+    expect(root.isAnalyzed(dataFile.path), isFalse);
+    expect(root.optionsFile, optionsFile);
+    expect(root.packagesFile, packagesFile);
+  }
+
   void test_locateRoots_single_dir_directOptions_directPackages() {
     Folder rootFolder = newFolder('/test/root');
     File optionsFile = newOptionsFile('/test/root');
diff --git a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
index 9b6324d..6edc6d2 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/dart/analysis/context_root.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -15,50 +15,48 @@
 }
 
 @reflectiveTest
-class ContextRootTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
+class ContextRootTest with ResourceProviderMixin {
   String rootPath;
   Folder rootFolder;
   ContextRootImpl contextRoot;
 
   void setUp() {
-    rootPath = provider.convertPath('/test/root');
-    rootFolder = provider.newFolder(rootPath);
-    contextRoot = new ContextRootImpl(provider, rootFolder);
+    rootPath = convertPath('/test/root');
+    rootFolder = newFolder(rootPath);
+    contextRoot = new ContextRootImpl(resourceProvider, rootFolder);
     contextRoot.included.add(rootFolder);
   }
 
   test_analyzedFiles() {
-    String optionsPath =
-        provider.convertPath('/test/root/analysis_options.yaml');
-    String readmePath = provider.convertPath('/test/root/README.md');
-    String aPath = provider.convertPath('/test/root/lib/a.dart');
-    String bPath = provider.convertPath('/test/root/lib/src/b.dart');
-    String excludePath = provider.convertPath('/test/root/exclude');
-    String cPath = provider.convertPath('/test/root/exclude/c.dart');
+    String optionsPath = convertPath('/test/root/analysis_options.yaml');
+    String readmePath = convertPath('/test/root/README.md');
+    String aPath = convertPath('/test/root/lib/a.dart');
+    String bPath = convertPath('/test/root/lib/src/b.dart');
+    String excludePath = convertPath('/test/root/exclude');
+    String cPath = convertPath('/test/root/exclude/c.dart');
 
-    provider.newFile(optionsPath, '');
-    provider.newFile(readmePath, '');
-    provider.newFile(aPath, '');
-    provider.newFile(bPath, '');
-    provider.newFile(cPath, '');
-    contextRoot.excluded.add(provider.newFolder(excludePath));
+    newFile(optionsPath);
+    newFile(readmePath);
+    newFile(aPath);
+    newFile(bPath);
+    newFile(cPath);
+    contextRoot.excluded.add(newFolder(excludePath));
 
     expect(contextRoot.analyzedFiles(),
         unorderedEquals([optionsPath, readmePath, aPath, bPath]));
   }
 
   test_isAnalyzed_explicitlyExcluded() {
-    String excludePath = provider.convertPath('/test/root/exclude');
-    String filePath = provider.convertPath('/test/root/exclude/root.dart');
-    contextRoot.excluded.add(provider.newFolder(excludePath));
+    String excludePath = convertPath('/test/root/exclude');
+    String filePath = convertPath('/test/root/exclude/root.dart');
+    contextRoot.excluded.add(newFolder(excludePath));
     expect(contextRoot.isAnalyzed(filePath), isFalse);
   }
 
   test_isAnalyzed_explicitlyExcluded_same() {
-    String aPath = provider.convertPath('/test/root/lib/a.dart');
-    String bPath = provider.convertPath('/test/root/lib/b.dart');
-    File aFile = provider.getFile(aPath);
+    String aPath = convertPath('/test/root/lib/a.dart');
+    String bPath = convertPath('/test/root/lib/b.dart');
+    File aFile = getFile(aPath);
 
     contextRoot.excluded.add(aFile);
 
@@ -67,26 +65,26 @@
   }
 
   test_isAnalyzed_implicitlyExcluded_dot_analysisOptions() {
-    String filePath = provider.convertPath('/test/root/lib/.analysis_options');
+    String filePath = convertPath('/test/root/lib/.analysis_options');
     expect(contextRoot.isAnalyzed(filePath), isFalse);
   }
 
   test_isAnalyzed_implicitlyExcluded_dot_packages() {
-    String filePath = provider.convertPath('/test/root/lib/.packages');
+    String filePath = convertPath('/test/root/lib/.packages');
     expect(contextRoot.isAnalyzed(filePath), isFalse);
   }
 
   test_isAnalyzed_included() {
-    String filePath = provider.convertPath('/test/root/lib/root.dart');
+    String filePath = convertPath('/test/root/lib/root.dart');
     expect(contextRoot.isAnalyzed(filePath), isTrue);
   }
 
   test_isAnalyzed_included_same() {
-    String aPath = provider.convertPath('/test/root/lib/a.dart');
-    String bPath = provider.convertPath('/test/root/lib/b.dart');
-    File aFile = provider.getFile(aPath);
+    String aPath = convertPath('/test/root/lib/a.dart');
+    String bPath = convertPath('/test/root/lib/b.dart');
+    File aFile = getFile(aPath);
 
-    contextRoot = new ContextRootImpl(provider, rootFolder);
+    contextRoot = new ContextRootImpl(resourceProvider, rootFolder);
     contextRoot.included.add(aFile);
 
     expect(contextRoot.isAnalyzed(aPath), isTrue);
@@ -94,8 +92,8 @@
   }
 
   test_isAnalyzed_packagesDirectory_analyzed() {
-    String folderPath = provider.convertPath('/test/root/lib/packages');
-    provider.newFolder(folderPath);
+    String folderPath = convertPath('/test/root/lib/packages');
+    newFolder(folderPath);
     expect(contextRoot.isAnalyzed(folderPath), isTrue);
   }
 }
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/base.dart b/pkg/analyzer/test/src/dart/analysis/dependency/base.dart
new file mode 100644
index 0000000..b217244
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/base.dart
@@ -0,0 +1,160 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/analysis/dependency/library_builder.dart';
+import 'package:analyzer/src/dart/analysis/dependency/node.dart';
+import 'package:meta/meta.dart';
+import 'package:test/test.dart';
+
+import '../../resolution/driver_resolution.dart';
+
+class BaseDependencyTest extends DriverResolutionTest {
+//  DependencyTracker tracker;
+  String a;
+  String b;
+  String c;
+  Uri aUri;
+  Uri bUri;
+  Uri cUri;
+
+  bool hasDartCore = false;
+
+  void assertNodes(List<Node> actualNodes, List<ExpectedNode> expectedNodes,
+      {Node expectedEnclosingClass}) {
+    expect(actualNodes, hasLength(expectedNodes.length));
+    for (var expectedNode in expectedNodes) {
+      var topNode = _getNode(
+        actualNodes,
+        uri: expectedNode.uri,
+        name: expectedNode.name,
+        kind: expectedNode.kind,
+      );
+      expect(topNode.enclosingClass, expectedEnclosingClass);
+
+      if (expectedNode.classMembers != null) {
+        assertNodes(topNode.classMembers, expectedNode.classMembers,
+            expectedEnclosingClass: topNode);
+      } else {
+        expect(topNode.classMembers, isNull);
+      }
+
+      if (expectedNode.classTypeParameters != null) {
+        assertNodes(
+          topNode.classTypeParameters,
+          expectedNode.classTypeParameters,
+          expectedEnclosingClass: topNode,
+        );
+      } else {
+        expect(topNode.classTypeParameters, isNull);
+      }
+    }
+  }
+
+  Future<Library> buildTestLibrary(String path, String content) async {
+//    if (!hasDartCore) {
+//      hasDartCore = true;
+//      await _addLibraryByUri('dart:core');
+//      await _addLibraryByUri('dart:async');
+//      await _addLibraryByUri('dart:math');
+//      await _addLibraryByUri('dart:_internal');
+//    }
+
+    newFile(path, content: content);
+    driver.changeFile(path);
+
+    var units = await _resolveLibrary(path);
+    var uri = units.first.declaredElement.source.uri;
+
+    return buildLibrary(uri, units);
+
+//    tracker.addLibrary(uri, units);
+//
+//    var library = tracker.libraries[uri];
+//    expect(library, isNotNull);
+//
+//    return library;
+  }
+
+  Node getNode(Library library,
+      {@required String name,
+      NodeKind kind,
+      String memberOf,
+      String typeParameterOf}) {
+    var uri = library.uri;
+    var nodes = library.declaredNodes;
+    if (memberOf != null) {
+      var class_ = _getNode(nodes, uri: uri, name: memberOf);
+      expect(
+        class_.kind,
+        anyOf(NodeKind.CLASS, NodeKind.ENUM, NodeKind.MIXIN),
+      );
+      nodes = class_.classMembers;
+    } else if (typeParameterOf != null) {
+      var class_ = _getNode(nodes, uri: uri, name: typeParameterOf);
+      expect(class_.kind, anyOf(NodeKind.CLASS, NodeKind.MIXIN));
+      nodes = class_.classTypeParameters;
+    }
+    return _getNode(nodes, uri: uri, name: name, kind: kind);
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+//    var logger = PerformanceLog(null);
+//    tracker = DependencyTracker(logger);
+    a = convertPath('/test/lib/a.dart');
+    b = convertPath('/test/lib/b.dart');
+    c = convertPath('/test/lib/c.dart');
+    aUri = Uri.parse('package:test/a.dart');
+    bUri = Uri.parse('package:test/b.dart');
+    cUri = Uri.parse('package:test/c.dart');
+  }
+
+//  Future _addLibraryByUri(String uri) async {
+//    var path = driver.sourceFactory.forUri(uri).fullName;
+//    var unitResult = await driver.getUnitElement(path);
+//
+//    var signature = ApiSignature();
+//    signature.addString(unitResult.signature);
+//    var signatureBytes = signature.toByteList();
+//
+//    tracker.addLibraryElement(unitResult.element.library, signatureBytes);
+//  }
+
+  Node _getNode(List<Node> nodes,
+      {@required Uri uri, @required String name, NodeKind kind}) {
+    var nameObj = LibraryQualifiedName(uri, name);
+    for (var node in nodes) {
+      if (node.name == nameObj) {
+        if (kind != null && node.kind != kind) {
+          fail('Expected $kind "$name", found ${node.kind}');
+        }
+        return node;
+      }
+    }
+    fail('Expected to find $uri::$name in:\n    ${nodes.join('\n    ')}');
+  }
+
+  Future<List<CompilationUnit>> _resolveLibrary(String libraryPath) async {
+    var resolvedLibrary = await driver.getResolvedLibrary(libraryPath);
+    return resolvedLibrary.units.map((ru) => ru.unit).toList();
+  }
+}
+
+class ExpectedNode {
+  final Uri uri;
+  final String name;
+  final NodeKind kind;
+  final List<ExpectedNode> classMembers;
+  final List<ExpectedNode> classTypeParameters;
+
+  ExpectedNode(
+    this.uri,
+    this.name,
+    this.kind, {
+    this.classMembers,
+    this.classTypeParameters,
+  });
+}
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/declared_nodes_test.dart b/pkg/analyzer/test/src/dart/analysis/dependency/declared_nodes_test.dart
new file mode 100644
index 0000000..5fbbf4b
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/declared_nodes_test.dart
@@ -0,0 +1,1795 @@
+// 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/src/dart/analysis/dependency/library_builder.dart'
+    hide buildLibrary;
+import 'package:analyzer/src/dart/analysis/dependency/node.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'base.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DeclaredNodesTest);
+  });
+}
+
+@reflectiveTest
+class DeclaredNodesTest extends BaseDependencyTest {
+  test_api_tokens_include_enclosingClass() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  void foo() {}
+}
+
+class B {
+  void foo() {}
+}
+''');
+    _assertDifferentApiTokenSignature(
+      getNode(library, name: 'foo', memberOf: 'A'),
+      getNode(library, name: 'foo', memberOf: 'B'),
+    );
+  }
+
+  test_api_tokens_include_enclosingEnum() async {
+    var library = await buildTestLibrary(a, r'''
+enum A {
+  foo
+}
+
+enum B {
+  foo
+}
+''');
+    _assertDifferentApiTokenSignature(
+      getNode(library, name: 'foo', memberOf: 'A'),
+      getNode(library, name: 'foo', memberOf: 'B'),
+    );
+    _assertDifferentApiTokenSignature(
+      getNode(library, name: 'index', memberOf: 'A'),
+      getNode(library, name: 'index', memberOf: 'B'),
+    );
+    _assertDifferentApiTokenSignature(
+      getNode(library, name: 'values', memberOf: 'A'),
+      getNode(library, name: 'values', memberOf: 'B'),
+    );
+  }
+
+  test_api_tokens_include_enclosingLibrary_class() async {
+    var aLib = await buildTestLibrary(a, 'class C {}');
+    var bLib = await buildTestLibrary(b, 'class C {}');
+    _assertDifferentApiTokenSignature(
+      getNode(aLib, name: 'C'),
+      getNode(bLib, name: 'C'),
+    );
+  }
+
+  test_api_tokens_include_enclosingLibrary_enum() async {
+    var aLib = await buildTestLibrary(a, 'enum Foo {a, b, c}');
+    var bLib = await buildTestLibrary(b, 'enum Foo {a, b, c}');
+    _assertDifferentApiTokenSignature(
+      getNode(aLib, name: 'Foo'),
+      getNode(bLib, name: 'Foo'),
+    );
+  }
+
+  test_api_tokens_include_enclosingLibrary_function() async {
+    var aLib = await buildTestLibrary(a, 'void foo() {}');
+    var bLib = await buildTestLibrary(b, 'void foo() {}');
+    _assertDifferentApiTokenSignature(
+      getNode(aLib, name: 'foo'),
+      getNode(bLib, name: 'foo'),
+    );
+  }
+
+  test_api_tokens_include_functionOrMethod() async {
+    var library = await buildTestLibrary(a, r'''
+void foo() {}
+
+class C {
+  void foo() {}
+}
+''');
+    var fooFunction = getNode(library, name: 'foo');
+    var fooMethod = getNode(library, name: 'foo', memberOf: 'C');
+    expect(
+      fooFunction.api.tokenSignatureHex,
+      isNot(fooMethod.api.tokenSignatureHex),
+    );
+  }
+
+  test_class_constructor() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C();
+  C.named();
+}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'C',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+          ExpectedNode(aUri, 'named', NodeKind.CONSTRUCTOR),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_constructor_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.CONSTRUCTOR,
+      'class X {  X.foo();  }',
+      'class X {  @deprecated X.foo();  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_constructor_api_tokens_notSame_parameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.CONSTRUCTOR,
+      'class X {  X.foo();  }',
+      'class X {  X.foo(int a);  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_constructor_api_tokens_notSame_parameter_name_edit_named() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.CONSTRUCTOR,
+      'class X {  X.foo({int a});  }',
+      'class X {  X.foo({int b});  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_constructor_api_tokens_notSame_parameter_type() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.CONSTRUCTOR,
+      'class X {  X.foo(int a);  }',
+      'class X {  X.foo(double a);  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_constructor_api_tokens_same_body() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.CONSTRUCTOR,
+      'class X {  X.foo() { print(1); }  }',
+      'class X {  X.foo() { print(2); }  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_constructor_api_tokens_same_body_add() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.CONSTRUCTOR,
+      'class X {  X.foo();  }',
+      'class X {  X.foo() {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_constructor_api_tokens_same_parameter_name_edit_required() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.CONSTRUCTOR,
+      'class X {  X.foo(int a);  }',
+      'class X {  X.foo(int b);  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_constructor_default() async {
+    var library = await buildTestLibrary(a, r'''
+class C {}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'C',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_field() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  int a = 1;
+  int b = 2, c = 3;
+}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'C',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+          ExpectedNode(aUri, 'a', NodeKind.GETTER),
+          ExpectedNode(aUri, 'b', NodeKind.GETTER),
+          ExpectedNode(aUri, 'c', NodeKind.GETTER),
+          ExpectedNode(aUri, 'a=', NodeKind.SETTER),
+          ExpectedNode(aUri, 'b=', NodeKind.SETTER),
+          ExpectedNode(aUri, 'c=', NodeKind.SETTER),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_field_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  int foo = 0;  }',
+      'class X {  @deprecated int foo = 0;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_api_tokens_notSame_const() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  int foo = 0;  }',
+      'class X {  const int foo = 0;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_api_tokens_same_final() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  int foo = 0;  }',
+      'class X {  final int foo = 0;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_api_tokens_typed_notSame_type() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  int foo = 0;  }',
+      'class X {  num foo = 1;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_api_tokens_typed_same_initializer() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  int foo = 0;  }',
+      'class X {  int foo = 1;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_api_tokens_untyped_notSame_initializer() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  var foo = 0;  }',
+      'class X {  var foo = 1.0;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_const() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  const foo = 1;
+  const bar = 2;
+}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'X',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+          ExpectedNode(aUri, 'foo', NodeKind.GETTER),
+          ExpectedNode(aUri, 'bar', NodeKind.GETTER),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_field_const_api_tokens_typed_notSame_initializer() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  const int foo = 0;  }',
+      'class X {  const int foo = 1;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_final() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  final foo = 1;
+  final bar = 2;
+}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'X',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+          ExpectedNode(aUri, 'foo', NodeKind.GETTER),
+          ExpectedNode(aUri, 'bar', NodeKind.GETTER),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_field_final_api_tokens_typed_notSame_initializer_constClass() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  final int foo = 0;  const X();  }',
+      'class X {  final int foo = 1;  const X();  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_final_api_tokens_typed_same_initializer() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  final int foo = 0;  }',
+      'class X {  final int foo = 1;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_field_final_api_tokens_untyped_notSame_initializer() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  final foo = 0;  }',
+      'class X {  final foo = 1.0;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_getter() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  int get foo => 0;
+  int get bar => 0;
+}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'C',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+          ExpectedNode(aUri, 'foo', NodeKind.GETTER),
+          ExpectedNode(aUri, 'bar', NodeKind.GETTER),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_getter_api_tokens_notSame_returnType() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'class X {  int get foo => null;  }',
+      'class X {  double get foo => null;  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void foo() {}
+  void bar() {}
+}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'C',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+          ExpectedNode(aUri, 'foo', NodeKind.METHOD),
+          ExpectedNode(aUri, 'bar', NodeKind.METHOD),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_method_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo() {}  }',
+      'class X {  @deprecated void foo() {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_notSame_parameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo() {}  }',
+      'class X {  void foo(int a) {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_notSame_parameter_name_edit_named() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo({int a}) {}  }',
+      'class X {  void foo({int b}) {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_notSame_parameter_type() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo(int a) {}  }',
+      'class X {  void foo(double a) {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_notSame_returnType() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  int foo() {}  }',
+      'class X {  double foo() {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_notSame_typeParameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo() {}  }',
+      'class X {  void foo<T>() {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_notSame_typeParameter_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo<T>() {}  }',
+      'class X {  void foo<T extends num>() {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_same_async_add() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  foo() {}  }',
+      'class X {  foo() async {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_same_body() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo() { print(1); }  }',
+      'class X {  void foo() { print(2); }  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_method_api_tokens_same_parameter_name_edit_required() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.METHOD,
+      'class X {  void foo(int a) {}  }',
+      'class X {  void foo(int b) {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_setter() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  set foo(_) {}
+  set bar(_) {}
+}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'C',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+          ExpectedNode(aUri, 'foo', NodeKind.SETTER),
+          ExpectedNode(aUri, 'bar', NodeKind.SETTER),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_setter_api_tokens_notSame_returnType() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.SETTER,
+      'class X {  set foo(int a) {}  }',
+      'class X {  set foo(double a) {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_setter_api_tokens_same_parameter_name() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.SETTER,
+      'class X {  set foo(int a) {}  }',
+      'class X {  set foo(int b) {}  }',
+      memberOf: 'X',
+    );
+  }
+
+  test_class_typeParameter() async {
+    var library = await buildTestLibrary(a, r'''
+class A<T> {}
+class B<T, U> {}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'A',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+        ],
+        classTypeParameters: [
+          ExpectedNode(aUri, 'T', NodeKind.TYPE_PARAMETER),
+        ],
+      ),
+      ExpectedNode(
+        aUri,
+        'B',
+        NodeKind.CLASS,
+        classMembers: [
+          ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+        ],
+        classTypeParameters: [
+          ExpectedNode(aUri, 'T', NodeKind.TYPE_PARAMETER),
+          ExpectedNode(aUri, 'U', NodeKind.TYPE_PARAMETER),
+        ],
+      ),
+    ]);
+  }
+
+  test_class_typeParameter_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'T',
+      NodeKind.TYPE_PARAMETER,
+      'class X<T> {}',
+      'class X<@deprecate T> {}',
+      typeParameterOf: 'X',
+    );
+  }
+
+  test_class_typeParameter_api_tokens_notSame_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'T',
+      NodeKind.TYPE_PARAMETER,
+      'class X<T> {}',
+      'class X<T extends num> {}',
+      typeParameterOf: 'X',
+    );
+  }
+
+  test_class_typeParameter_api_tokens_notSame_bound_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'T',
+      NodeKind.TYPE_PARAMETER,
+      'class X<T extends num> {}',
+      'class X<T extends int> {}',
+      typeParameterOf: 'X',
+    );
+  }
+
+  test_library_export() async {
+    var library = await buildTestLibrary(a, r'''
+export 'dart:math';
+export 'package:aaa/aaa.dart';
+export 'package:bbb/bbb.dart' show b1, b2 hide b3;
+''');
+    _assertExports(library, [
+      Export(Uri.parse('dart:math'), []),
+      Export(Uri.parse('package:aaa/aaa.dart'), []),
+      Export(Uri.parse('package:bbb/bbb.dart'), [
+        Combinator(true, ['b1', 'b2']),
+        Combinator(false, ['b3']),
+      ]),
+    ]);
+  }
+
+  test_library_import() async {
+    var library = await buildTestLibrary(a, r'''
+import 'dart:math';
+import 'package:aaa/aaa.dart';
+import 'package:bbb/bbb.dart' as b;
+import 'package:ccc/ccc.dart' show c1, c2 hide c3;
+''');
+    _assertImports(library, [
+      Import(Uri.parse('dart:math'), null, []),
+      Import(Uri.parse('package:aaa/aaa.dart'), null, []),
+      Import(Uri.parse('package:bbb/bbb.dart'), 'b', []),
+      Import(Uri.parse('package:ccc/ccc.dart'), null, [
+        Combinator(true, ['c1', 'c2']),
+        Combinator(false, ['c3']),
+      ]),
+      Import(Uri.parse('dart:core'), null, []),
+    ]);
+  }
+
+  test_library_import_core_explicit() async {
+    var library = await buildTestLibrary(a, r'''
+import 'dart:core' hide List;
+''');
+    _assertImports(library, [
+      Import(Uri.parse('dart:core'), null, [
+        Combinator(false, ['List']),
+      ]),
+    ]);
+  }
+
+  test_library_import_core_implicit() async {
+    var library = await buildTestLibrary(a, '');
+    _assertImports(library, [
+      Import(Uri.parse('dart:core'), null, []),
+    ]);
+  }
+
+  test_unit_class() async {
+    var library = await buildTestLibrary(a, r'''
+class Foo {}
+class Bar {}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'Foo', NodeKind.CLASS, classMembers: [
+        ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+      ]),
+      ExpectedNode(aUri, 'Bar', NodeKind.CLASS, classMembers: [
+        ExpectedNode(aUri, '', NodeKind.CONSTRUCTOR),
+      ]),
+    ]);
+  }
+
+  test_unit_class_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X {}',
+      '@deprecated class X {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_extends_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X {}',
+      'class X extends A {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_extends_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X extends A {}',
+      'class X extends B {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_extends_replace() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X extends A {}',
+      'class X implements A {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_extends_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X extends A {}',
+      'class X extends A<int> {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_implements_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X {}',
+      'class X implements A {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_implements_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X implements A {}',
+      'class X implements B {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_implements_remove() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X implements A {}',
+      'class X {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_implements_remove2() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X implements A, B {}',
+      'class X implements B {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_implements_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X implements A {}',
+      'class X implements A<int> {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_typeParameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X {}',
+      'class X<T> {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_typeParameter_add2() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X<T> {}',
+      'class X<T, U> {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_typeParameter_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X<T> {}',
+      'class X<T extends num> {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_with_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X extends A {}',
+      'class X extends A with B {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_with_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X extends A with B {}',
+      'class X extends A with C {}',
+    );
+  }
+
+  test_unit_class_api_tokens_notSame_with_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS,
+      'class X extends A with B {}',
+      'class X extends A with B<int> {}',
+    );
+  }
+
+  test_unit_class_api_tokens_same_body() async {
+    await _assertApiTokenSignatureSame(
+      'X',
+      NodeKind.CLASS,
+      'class X {  }',
+      'class X { void foo() {} }',
+    );
+  }
+
+  test_unit_classTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+class X = Object with M;
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'X', NodeKind.CLASS_TYPE_ALIAS),
+    ]);
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_implements_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M;',
+      'class X = A with M implements I;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_implements_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M implements I;',
+      'class X = A with M implements J;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_implements_remove() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M implements I;',
+      'class X = A with M;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_implements_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M implements I;',
+      'class X = A with M implements I<int>;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_super() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M;',
+      'class X = B with M;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_super_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M;',
+      'class X = A<int> with M;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_typeParameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M;',
+      'class X<T> = A with M;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_typeParameter_add2() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X<T> = A with M;',
+      'class X<T, U> = A with M;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_typeParameter_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X<T> = A with M;',
+      'class X<T extends num> = A with M;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_with_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M;',
+      'class X = A with M, N;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_with_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M;',
+      'class X = A with N;',
+    );
+  }
+
+  test_unit_classTypeAlias_api_tokens_notSame_with_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.CLASS_TYPE_ALIAS,
+      'class X = A with M;',
+      'class X = A with M<int>;',
+    );
+  }
+
+  test_unit_enumDeclaration() async {
+    var library = await buildTestLibrary(a, r'''
+enum Foo {a, b, c}
+enum Bar {d, e, f}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(
+        aUri,
+        'Foo',
+        NodeKind.ENUM,
+        classMembers: [
+          ExpectedNode(aUri, 'a', NodeKind.GETTER),
+          ExpectedNode(aUri, 'b', NodeKind.GETTER),
+          ExpectedNode(aUri, 'c', NodeKind.GETTER),
+          ExpectedNode(aUri, 'index', NodeKind.GETTER),
+          ExpectedNode(aUri, 'values', NodeKind.GETTER),
+        ],
+      ),
+      ExpectedNode(
+        aUri,
+        'Bar',
+        NodeKind.ENUM,
+        classMembers: [
+          ExpectedNode(aUri, 'd', NodeKind.GETTER),
+          ExpectedNode(aUri, 'e', NodeKind.GETTER),
+          ExpectedNode(aUri, 'f', NodeKind.GETTER),
+          ExpectedNode(aUri, 'index', NodeKind.GETTER),
+          ExpectedNode(aUri, 'values', NodeKind.GETTER),
+        ],
+      ),
+    ]);
+  }
+
+  test_unit_function() async {
+    var library = await buildTestLibrary(a, r'''
+void foo() {}
+void bar() {}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'foo', NodeKind.FUNCTION),
+      ExpectedNode(aUri, 'bar', NodeKind.FUNCTION),
+    ]);
+  }
+
+  test_unit_function_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo() {}',
+      '@deprecated void foo() {}',
+    );
+  }
+
+  test_unit_function_api_tokens_notSame_parameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo() {}',
+      'void foo(int a) {}',
+    );
+  }
+
+  test_unit_function_api_tokens_notSame_parameter_name_edit_named() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo({int a}) {}',
+      'void foo({int b}) {}',
+    );
+  }
+
+  test_unit_function_api_tokens_notSame_parameter_type() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo(int a) {}',
+      'void foo(double a) {}',
+    );
+  }
+
+  test_unit_function_api_tokens_notSame_returnType() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'int foo() {}',
+      'num foo() {}',
+    );
+  }
+
+  test_unit_function_api_tokens_notSame_typeParameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo() {}',
+      'void foo<T>() {}',
+    );
+  }
+
+  test_unit_function_api_tokens_notSame_typeParameter_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo<T>() {}',
+      'void foo<T extends num>() {}',
+    );
+  }
+
+  test_unit_function_api_tokens_same_async_add() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'foo() {}',
+      'foo() async {}',
+    );
+  }
+
+  test_unit_function_api_tokens_same_body() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo() { print(1); }',
+      'void foo() { print(2); }',
+    );
+  }
+
+  test_unit_function_api_tokens_same_parameter_name_edit_required() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'void foo(int a) {}',
+      'void foo(int b) {}',
+    );
+  }
+
+  test_unit_function_api_tokens_same_syncStar_add() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.FUNCTION,
+      'foo() {}',
+      'foo() sync* {}',
+    );
+  }
+
+  test_unit_functionTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+typedef void Foo();
+typedef void Bar();
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'Foo', NodeKind.FUNCTION_TYPE_ALIAS),
+      ExpectedNode(aUri, 'Bar', NodeKind.FUNCTION_TYPE_ALIAS),
+    ]);
+  }
+
+  test_unit_functionTypeAlias_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef void Foo();',
+      '@deprecated typedef void Foo();',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_notSame_parameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef void Foo();',
+      'typedef void Foo(int a);',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_notSame_parameter_name_edit_named() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef void Foo({int a});',
+      'typedef void Foo({int b});',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_notSame_parameter_type() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef void Foo(int a);',
+      'typedef void Foo(double a);',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_notSame_returnType() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef int Foo();',
+      'typedef num Foo();',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_notSame_typeParameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef void Foo();',
+      'typedef void Foo<T>();',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_notSame_typeParameter_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef void Foo<T>();',
+      'typedef void Foo<T extends num>();',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_same_comment() async {
+    await _assertApiTokenSignatureSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef int Foo();',
+      '/* text */ typedef int Foo();',
+    );
+  }
+
+  test_unit_functionTypeAlias_api_tokens_same_parameter_name_edit_required() async {
+    await _assertApiTokenSignatureSame(
+      'Foo',
+      NodeKind.FUNCTION_TYPE_ALIAS,
+      'typedef void Foo(int a);',
+      'typedef void Foo(int b);',
+    );
+  }
+
+  test_unit_genericTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+typedef Foo = void Function();
+typedef Bar = void Function();
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'Foo', NodeKind.GENERIC_TYPE_ALIAS),
+      ExpectedNode(aUri, 'Bar', NodeKind.GENERIC_TYPE_ALIAS),
+    ]);
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function();',
+      '@deprecated typedef Foo = void Function();',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_parameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function();',
+      'typedef Foo = void Function(int);',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_parameter_kind() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function(int a);',
+      'typedef Foo = void Function([int a]);',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_parameter_name_add_positional() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function([int]);',
+      'typedef Foo = void Function([int a]);',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_parameter_name_edit_named() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function({int a});',
+      'typedef Foo = void Function({int b});',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_parameter_name_edit_positional() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function([int]);',
+      'typedef Foo = void Function([int a]);',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_returnType() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = int Function();',
+      'typedef Foo = double Function();',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_typeParameter2_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function();',
+      'typedef Foo = void Function<T>();',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_typeParameter2_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function<T>();',
+      'typedef Foo = void Function<T extends num>();',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_typeParameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function();',
+      'typedef Foo<T> = void Function();',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_notSame_typeParameter_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo<T> = void Function();',
+      'typedef Foo<T extends num> = void Function();',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_same_parameter_name_add_required() async {
+    await _assertApiTokenSignatureSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function(int);',
+      'typedef Foo = void Function(int a);',
+    );
+  }
+
+  test_unit_genericTypeAlias_api_tokens_same_parameter_name_edit_required() async {
+    await _assertApiTokenSignatureSame(
+      'Foo',
+      NodeKind.GENERIC_TYPE_ALIAS,
+      'typedef Foo = void Function(int a);',
+      'typedef Foo = void Function(int b);',
+    );
+  }
+
+  test_unit_getter() async {
+    var library = await buildTestLibrary(a, r'''
+int get foo => 0;
+int get bar => 0;
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'foo', NodeKind.GETTER),
+      ExpectedNode(aUri, 'bar', NodeKind.GETTER),
+    ]);
+  }
+
+  test_unit_getter_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'int get foo => 0;',
+      '@deprecated int get foo => 0;',
+    );
+  }
+
+  test_unit_getter_api_tokens_notSame_returnType() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'int get foo => 0;',
+      'num get foo => 0;',
+    );
+  }
+
+  test_unit_getter_api_tokens_same_body() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.GETTER,
+      'int get foo => 0;',
+      'int get foo => 1;',
+    );
+  }
+
+  test_unit_mixin() async {
+    var library = await buildTestLibrary(a, r'''
+mixin Foo {}
+mixin Bar {}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'Foo', NodeKind.MIXIN, classMembers: const []),
+      ExpectedNode(aUri, 'Bar', NodeKind.MIXIN, classMembers: const []),
+    ]);
+  }
+
+  test_unit_mixin_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X {}',
+      '@deprecated mixin X {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_implements_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X {}',
+      'mixin X implements A {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_implements_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X implements A {}',
+      'mixin X implements B {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_implements_remove() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X implements A {}',
+      'mixin X {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_implements_remove2() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X implements A, B {}',
+      'mixin X implements B {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_implements_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X implements A {}',
+      'mixin X implements A<int> {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_on_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X {}',
+      'mixin X on A {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_on_add2() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X on A {}',
+      'mixin X on A, B {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_on_edit() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X on A {}',
+      'mixin X on B {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_on_replace() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X on A {}',
+      'mixin X implements A {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_on_typeArgument() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X on A {}',
+      'mixin X on A<int> {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_typeParameter_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X {}',
+      'mixin X<T> {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_typeParameter_add2() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X<T> {}',
+      'mixin X<T, U> {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_notSame_typeParameter_bound_add() async {
+    await _assertApiTokenSignatureNotSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X<T> {}',
+      'mixin X<T extends num> {}',
+    );
+  }
+
+  test_unit_mixin_api_tokens_same_body() async {
+    await _assertApiTokenSignatureSame(
+      'X',
+      NodeKind.MIXIN,
+      'mixin X {  }',
+      'mixin X { void foo() {} }',
+    );
+  }
+
+  test_unit_setter() async {
+    var library = await buildTestLibrary(a, r'''
+void set foo(_) {}
+void set bar(_) {}
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'foo=', NodeKind.SETTER),
+      ExpectedNode(aUri, 'bar=', NodeKind.SETTER),
+    ]);
+  }
+
+  test_unit_setter_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo=',
+      NodeKind.SETTER,
+      'set foo(int a) {}',
+      '@deprecated set foo(int a) {}',
+    );
+  }
+
+  test_unit_setter_api_tokens_notSame_parameter_type() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo=',
+      NodeKind.SETTER,
+      'set foo(int a) {}',
+      'set foo(num a) {}',
+    );
+  }
+
+  test_unit_setter_api_tokens_same_body() async {
+    await _assertApiTokenSignatureSame(
+      'foo=',
+      NodeKind.SETTER,
+      'set foo(int a) { print(0); }',
+      'set foo(int a) { print(1); }',
+    );
+  }
+
+  test_unit_variable() async {
+    var library = await buildTestLibrary(a, r'''
+int a = 1;
+int b = 2, c = 3;
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'a', NodeKind.GETTER),
+      ExpectedNode(aUri, 'b', NodeKind.GETTER),
+      ExpectedNode(aUri, 'c', NodeKind.GETTER),
+      ExpectedNode(aUri, 'a=', NodeKind.SETTER),
+      ExpectedNode(aUri, 'b=', NodeKind.SETTER),
+      ExpectedNode(aUri, 'c=', NodeKind.SETTER),
+    ]);
+  }
+
+  test_unit_variable_api_tokens_notSame_annotation() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'int foo = 0;',
+      '@deprecated int foo = 0;',
+    );
+  }
+
+  test_unit_variable_api_tokens_notSame_const() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'int foo = 0;',
+      'const int foo = 0;',
+    );
+  }
+
+  test_unit_variable_api_tokens_same_final() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.GETTER,
+      'int foo = 0;',
+      'final int foo = 0;',
+    );
+  }
+
+  test_unit_variable_api_tokens_typed_notSame_type() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'int foo = 0;',
+      'num foo = 1;',
+    );
+  }
+
+  test_unit_variable_api_tokens_typed_same_initializer() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.GETTER,
+      'int foo = 0;',
+      'int foo = 1;',
+    );
+  }
+
+  test_unit_variable_api_tokens_untyped_notSame_initializer() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'var foo = 0;',
+      'var foo = 1.0;',
+    );
+  }
+
+  test_unit_variable_const() async {
+    var library = await buildTestLibrary(a, r'''
+const foo = 1;
+const bar = 2;
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'foo', NodeKind.GETTER),
+      ExpectedNode(aUri, 'bar', NodeKind.GETTER),
+    ]);
+  }
+
+  test_unit_variable_const_api_tokens_typed_notSame_initializer() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'const int foo = 0;',
+      'const int foo = 1;',
+    );
+  }
+
+  test_unit_variable_final() async {
+    var library = await buildTestLibrary(a, r'''
+final foo = 1;
+final bar = 2;
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'foo', NodeKind.GETTER),
+      ExpectedNode(aUri, 'bar', NodeKind.GETTER),
+    ]);
+  }
+
+  test_unit_variable_final_api_tokens_typed_same_initializer() async {
+    await _assertApiTokenSignatureSame(
+      'foo',
+      NodeKind.GETTER,
+      'final int foo = 0;',
+      'final int foo = 1;',
+    );
+  }
+
+  test_unit_variable_final_api_tokens_untyped_notSame_initializer() async {
+    await _assertApiTokenSignatureNotSame(
+      'foo',
+      NodeKind.GETTER,
+      'final foo = 0;',
+      'final foo = 1.0;',
+    );
+  }
+
+  test_unit_variable_final_withoutValue() async {
+    var library = await buildTestLibrary(a, r'''
+final foo;
+final bar;
+''');
+    assertNodes(library.declaredNodes, [
+      ExpectedNode(aUri, 'foo', NodeKind.GETTER),
+      ExpectedNode(aUri, 'bar', NodeKind.GETTER),
+    ]);
+  }
+
+  Future<void> _assertApiTokenSignatureNotSame(
+      String name, NodeKind kind, String codeBefore, String codeAfter,
+      {String memberOf, String typeParameterOf}) async {
+    Node getNodeLocal(Library library) {
+      return getNode(
+        library,
+        name: name,
+        kind: kind,
+        memberOf: memberOf,
+        typeParameterOf: typeParameterOf,
+      );
+    }
+
+    var libraryBefore = await buildTestLibrary(a, codeBefore);
+    var nodeBefore = getNodeLocal(libraryBefore);
+
+    var libraryAfter = await buildTestLibrary(a, codeAfter);
+    var nodeAfter = getNodeLocal(libraryAfter);
+
+    expect(
+      nodeAfter.api.tokenSignatureHex,
+      isNot(nodeBefore.api.tokenSignatureHex),
+    );
+  }
+
+  Future<void> _assertApiTokenSignatureSame(
+      String name, NodeKind kind, String codeBefore, String codeAfter,
+      {String memberOf, String typeParameterOf}) async {
+    Node getNodeLocal(Library library) {
+      return getNode(
+        library,
+        name: name,
+        kind: kind,
+        memberOf: memberOf,
+        typeParameterOf: typeParameterOf,
+      );
+    }
+
+    var libraryBefore = await buildTestLibrary(a, codeBefore);
+    var nodeBefore = getNodeLocal(libraryBefore);
+
+    var libraryAfter = await buildTestLibrary(a, codeAfter);
+    var nodeAfter = getNodeLocal(libraryAfter);
+
+    expect(
+      nodeAfter.api.tokenSignatureHex,
+      nodeBefore.api.tokenSignatureHex,
+    );
+  }
+
+  static _assertDifferentApiTokenSignature(Node a, Node b) {
+    expect(
+      a.api.tokenSignatureHex,
+      isNot(b.api.tokenSignatureHex),
+    );
+  }
+
+  static void _assertExports(Library library, List<Export> expectedExports) {
+    var actualExports = library.exports;
+    expect(actualExports, hasLength(expectedExports.length));
+    for (var i = 0; i < actualExports.length; ++i) {
+      var actual = actualExports[i];
+      var expected = expectedExports[i];
+      if (actual.uri != expected.uri ||
+          !_equalCombinators(actual.combinators, expected.combinators)) {
+        fail('Expected: $expected\nActual: $actual');
+      }
+    }
+  }
+
+  static void _assertImports(Library library, List<Import> expectedImports) {
+    var actualImports = library.imports;
+    expect(actualImports, hasLength(expectedImports.length));
+    for (var i = 0; i < actualImports.length; ++i) {
+      var actual = actualImports[i];
+      var expected = expectedImports[i];
+      if (actual.uri != expected.uri ||
+          actual.prefix != expected.prefix ||
+          !_equalCombinators(actual.combinators, expected.combinators)) {
+        fail('Expected: $expected\nActual: $actual');
+      }
+    }
+  }
+
+  static bool _equalCombinators(List<Combinator> actualCombinators,
+      List<Combinator> expectedCombinators) {
+    if (actualCombinators.length != expectedCombinators.length) {
+      return false;
+    }
+
+    for (var i = 0; i < actualCombinators.length; i++) {
+      var actualCombinator = actualCombinators[i];
+      var expectedCombinator = expectedCombinators[i];
+      if (actualCombinator.isShow != expectedCombinator.isShow) {
+        return false;
+      }
+
+      var actualNames = actualCombinator.names;
+      var expectedNames = expectedCombinator.names;
+      if (actualNames.length != expectedNames.length) {
+        return false;
+      }
+      for (var j = 0; j < actualNames.length; j++) {
+        if (actualNames[j] != expectedNames[j]) {
+          return false;
+        }
+      }
+    }
+
+    return true;
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/reference_collector_test.dart b/pkg/analyzer/test/src/dart/analysis/dependency/reference_collector_test.dart
new file mode 100644
index 0000000..aacbb42
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/reference_collector_test.dart
@@ -0,0 +1,2346 @@
+// 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/src/dart/analysis/dependency/library_builder.dart'
+    hide buildLibrary;
+import 'package:analyzer/src/dart/analysis/dependency/node.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'base.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ApiReferenceCollectorTest);
+    defineReflectiveTests(ExpressionReferenceCollectorTest);
+    defineReflectiveTests(ExpressionReferenceCollectorTest_SetLiterals);
+    defineReflectiveTests(ImplReferenceCollectorTest);
+    defineReflectiveTests(ShadowReferenceCollectorTest);
+    defineReflectiveTests(StatementReferenceCollectorTest);
+    defineReflectiveTests(TypeReferenceCollectorTest);
+  });
+}
+
+final dartCoreUri = Uri.parse('dart:core');
+
+@reflectiveTest
+class ApiReferenceCollectorTest extends _Base {
+  test_class_constructor_named_body() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C.test() {
+    x;
+  }
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR, memberOf: 'C');
+  }
+
+  test_class_constructor_named_parameter_defaultValue_named() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C.test({A a = x}) {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_constructor_named_parameter_defaultValue_positional() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C.test([A a = x]) {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_constructor_named_parameter_field_named() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  A f1;
+  B f2;
+  C.test({A this.f1: x, this.f2: y});
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_constructor_named_parameter_field_required() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  A f1;
+  B f2;
+  C.test(A this.f1, this.f2);
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_constructor_named_parameter_required() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C.test(A a, B b) {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A', 'B']);
+  }
+
+  test_class_constructor_unnamed_body() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C() {
+    x;
+  }
+}
+''');
+    _assertApi(library, '', NodeKind.CONSTRUCTOR, memberOf: 'C');
+  }
+
+  test_class_constructor_unnamed_parameter_required() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C(A a, B b) {}
+}
+''');
+    _assertApi(library, '', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A', 'B']);
+  }
+
+  test_class_field_hasType() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  int test = x;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'C', unprefixed: ['int']);
+    _assertApi(library, 'test=', NodeKind.SETTER,
+        memberOf: 'C', unprefixed: ['int']);
+  }
+
+  test_class_field_hasType_const() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  static const int test = x;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'C', unprefixed: ['int', 'x']);
+  }
+
+  test_class_field_hasType_final() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  final int test = x;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'C', unprefixed: ['int']);
+  }
+
+  test_class_field_hasType_noInitializer() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  int test;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'C', unprefixed: ['int']);
+    _assertApi(library, 'test=', NodeKind.SETTER,
+        memberOf: 'C', unprefixed: ['int']);
+  }
+
+  test_class_field_noType() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  var test = x;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'C', unprefixed: ['x']);
+    _assertApi(library, 'test=', NodeKind.SETTER,
+        memberOf: 'C', unprefixed: ['x']);
+  }
+
+  test_class_field_noType_const() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  static const test = x;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'C', unprefixed: ['x']);
+  }
+
+  test_class_field_noType_final() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  final test = x;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'C', unprefixed: ['x']);
+  }
+
+  test_class_field_noType_noInitializer() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  var test;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, memberOf: 'C');
+    _assertApi(library, 'test=', NodeKind.SETTER, memberOf: 'C');
+  }
+
+  test_class_method_body() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void test() {
+    x;
+  }
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD, memberOf: 'C');
+  }
+
+  test_class_method_parameter_defaultValue_named() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void test({A a = x}) {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_method_parameter_defaultValue_positional() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void test([A a = x]) {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_method_parameter_required() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void test(A a, B b) {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['A', 'B']);
+  }
+
+  test_class_method_returnType() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  A test() {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_method_typeParameter() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void test<T, U extends A, V extends U>(T t, U u, V v) {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['A']);
+  }
+
+  test_class_typeParameter() async {
+    var library = await buildTestLibrary(a, r'''
+class X<T extends A<B, C>> {}
+''');
+    _assertApi(library, 'T', NodeKind.TYPE_PARAMETER,
+        typeParameterOf: 'X', unprefixed: ['A', 'B', 'C']);
+  }
+
+  test_unit_class() async {
+    var library = await buildTestLibrary(a, r'''
+class Test<T extends A, U extends T>
+  extends B<T> with C, D<E, U>
+  implements F<T>, G {
+  void test() {
+    x
+  }
+}
+''');
+    _assertApi(library, 'Test', NodeKind.CLASS,
+        unprefixed: ['A', 'B', 'C', 'D', 'E', 'F', 'G']);
+  }
+
+  test_unit_classTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+class Test = A with M1, M2 implements I1, I2;
+''');
+    _assertApi(library, 'Test', NodeKind.CLASS_TYPE_ALIAS,
+        unprefixed: ['A', 'I1', 'I2', 'M1', 'M2']);
+  }
+
+  test_unit_classTypeAlias_generic() async {
+    var library = await buildTestLibrary(a, r'''
+class Test<T extends A, U extends T> = B<T> with C<U, D> implements E<T, F>;
+''');
+    _assertApi(library, 'Test', NodeKind.CLASS_TYPE_ALIAS,
+        unprefixed: ['A', 'B', 'C', 'D', 'E', 'F']);
+  }
+
+  test_unit_function_body() async {
+    var library = await buildTestLibrary(a, r'''
+void test() {
+  x;
+}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_unit_function_parameter_defaultValue_named() async {
+    var library = await buildTestLibrary(a, r'''
+void test({a = x}) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_unit_function_parameter_defaultValue_positional() async {
+    var library = await buildTestLibrary(a, r'''
+void test([a = x]) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_unit_function_parameter_named() async {
+    var library = await buildTestLibrary(a, r'''
+void test({A a, B b}) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B']);
+  }
+
+  test_unit_function_parameter_positional() async {
+    var library = await buildTestLibrary(a, r'''
+void test([A a, B b]) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B']);
+  }
+
+  test_unit_function_parameter_required() async {
+    var library = await buildTestLibrary(a, r'''
+void test(A a, B b) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B']);
+  }
+
+  test_unit_function_parameter_required_function() async {
+    var library = await buildTestLibrary(a, r'''
+void test(A Function(B) a) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B']);
+  }
+
+  test_unit_function_parameter_required_functionTyped() async {
+    var library = await buildTestLibrary(a, r'''
+void test(A a(B b, C c)) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B', 'C']);
+  }
+
+  test_unit_function_returnType_absent() async {
+    var library = await buildTestLibrary(a, r'''
+test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_unit_function_returnType_interface() async {
+    var library = await buildTestLibrary(a, r'''
+A test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A']);
+  }
+
+  test_unit_function_typeParameter() async {
+    var library = await buildTestLibrary(a, r'''
+void test<T, U extends A, V extends U>(T t, U u, V v) {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A']);
+  }
+
+  test_unit_functionTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+typedef A<B, U> Test<T extends C, U extends T>(D d, T t, U u);
+''');
+    _assertApi(library, 'Test', NodeKind.FUNCTION_TYPE_ALIAS,
+        unprefixed: ['A', 'B', 'C', 'D']);
+  }
+
+  test_unit_functionTypeAlias_reverseOrderTypeParameters() async {
+    var library = await buildTestLibrary(a, r'''
+typedef void Test<U extends T, T extends A>();
+''');
+    _assertApi(library, 'Test', NodeKind.FUNCTION_TYPE_ALIAS,
+        unprefixed: ['A']);
+  }
+
+  test_unit_genericTypeAlias_function() async {
+    var library = await buildTestLibrary(a, r'''
+typedef Test<T extends A, U extends T> =
+  B<T, C, V> Function<V extends D, W extends E<F, T, V>>(E, T, U, V, V, W);
+''');
+    _assertApi(library, 'Test', NodeKind.GENERIC_TYPE_ALIAS,
+        unprefixed: ['A', 'B', 'C', 'D', 'E', 'F']);
+  }
+
+  test_unit_genericTypeAlias_function_reverseOrderTypeParameters() async {
+    var library = await buildTestLibrary(a, r'''
+typedef Test<U extends T, T extends A> = Function<W extends V, V extends B>();
+''');
+    _assertApi(library, 'Test', NodeKind.GENERIC_TYPE_ALIAS,
+        unprefixed: ['A', 'B']);
+  }
+
+  test_unit_mixin() async {
+    var library = await buildTestLibrary(a, r'''
+mixin Test<T extends A, U extends T>
+  on B<T>, C, D<E, U>
+  implements F<T>, G {
+  void test() {
+    x
+  }
+}
+''');
+    _assertApi(library, 'Test', NodeKind.MIXIN,
+        unprefixed: ['A', 'B', 'C', 'D', 'E', 'F', 'G']);
+  }
+
+  test_unit_variable_hasType() async {
+    var library = await buildTestLibrary(a, r'''
+int test = x;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, unprefixed: ['int']);
+    _assertApi(library, 'test=', NodeKind.SETTER, unprefixed: ['int']);
+  }
+
+  test_unit_variable_hasType_const() async {
+    var library = await buildTestLibrary(a, r'''
+const int test = x;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, unprefixed: ['int', 'x']);
+  }
+
+  test_unit_variable_hasType_final() async {
+    var library = await buildTestLibrary(a, r'''
+final int test = x;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, unprefixed: ['int']);
+  }
+
+  test_unit_variable_hasType_noInitializer() async {
+    var library = await buildTestLibrary(a, r'''
+int test;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, unprefixed: ['int']);
+    _assertApi(library, 'test=', NodeKind.SETTER, unprefixed: ['int']);
+  }
+
+  test_unit_variable_noType() async {
+    var library = await buildTestLibrary(a, r'''
+var test = x;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, unprefixed: ['x']);
+    _assertApi(library, 'test=', NodeKind.SETTER, unprefixed: ['x']);
+  }
+
+  test_unit_variable_noType_const() async {
+    var library = await buildTestLibrary(a, r'''
+const test = x;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, unprefixed: ['x']);
+  }
+
+  test_unit_variable_noType_final() async {
+    var library = await buildTestLibrary(a, r'''
+final test = x;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER, unprefixed: ['x']);
+  }
+
+  test_unit_variable_noType_noInitializer() async {
+    var library = await buildTestLibrary(a, r'''
+var test;
+''');
+    _assertApi(library, 'test', NodeKind.GETTER);
+    _assertApi(library, 'test=', NodeKind.SETTER);
+  }
+}
+
+@reflectiveTest
+class ExpressionReferenceCollectorTest extends _Base {
+  test_adjacentStrings() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  'foo' '$x' 'bar';
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_asExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x as Y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['Y', 'x']);
+  }
+
+  test_assignmentExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x = y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x=', 'y']);
+  }
+
+  test_assignmentExpression_compound() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  operator+(_) {}
+}
+
+class B extends A {}
+
+B x, y;
+
+test() {
+  x += y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'x=', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'B', '+')]);
+  }
+
+  test_assignmentExpression_nullAware() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x ??= y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'x=', 'y']);
+  }
+
+  test_awaitExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() async {
+  await x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_binaryExpression() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  operator+(_) {}
+}
+
+class B extends A {}
+
+B x, y;
+
+test() {
+  x + y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'B', '+')]);
+  }
+
+  test_binaryExpression_int() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  int operator+(_) {}
+}
+
+A x;
+
+test() {
+  x + 1 + 2;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: [
+      'x'
+    ], expectedMembers: [
+      _ExpectedClassMember(aUri, 'A', '+'),
+      _ExpectedClassMember(dartCoreUri, 'int', '+'),
+    ]);
+  }
+
+  test_binaryExpression_sort() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  operator*(_) {}
+}
+
+class B {
+  operator+(_) {}
+}
+
+A a;
+B b;
+
+test() {
+  (b + 1) + a * 2;
+}
+''');
+    _assertImpl(
+      library,
+      'test',
+      NodeKind.FUNCTION,
+      unprefixed: ['a', 'b'],
+      expectedMembers: [
+        _ExpectedClassMember(aUri, 'A', '*'),
+        _ExpectedClassMember(aUri, 'B', '+'),
+      ],
+    );
+  }
+
+  test_binaryExpression_super() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+class B extends A {
+  test() {
+    super + x;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'B', unprefixed: ['x'], superPrefixed: ['+']);
+  }
+
+  test_binaryExpression_super2() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+class B extends A {
+  test() {
+    super == x;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'B', unprefixed: ['x'], superPrefixed: ['==']);
+  }
+
+  test_binaryExpression_unique() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  A operator+(_) => null;
+}
+
+A x;
+
+test() {
+  x + 1 + 2 + 3;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '+')]);
+  }
+
+  test_binaryExpression_unresolvedOperator() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x, y;
+
+test() {
+  x + y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '+')]);
+  }
+
+  test_binaryExpression_unresolvedTarget() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x + y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_booleanLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  true;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_cascadeExpression() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  x
+    ..foo(y)
+    ..bar = z;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: [
+      'x',
+      'y',
+      'z'
+    ], expectedMembers: [
+      _ExpectedClassMember(aUri, 'A', 'bar='),
+      _ExpectedClassMember(aUri, 'A', 'foo'),
+    ]);
+  }
+
+  test_conditionalExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x ? y : z;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y', 'z']);
+  }
+
+  test_doubleLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  1.2;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_functionExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  <T extends A, U extends T>(B b, C c, T t, U u) {
+    T;
+    U;
+    x;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'B', 'C', 'x']);
+  }
+
+  test_functionExpressionInvocation() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  (x)<T>(y, z);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['T', 'x', 'y', 'z']);
+  }
+
+  test_indexExpression_get() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  x[y];
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '[]')]);
+  }
+
+  test_indexExpression_getSet() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  x[y] += x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: [
+      'x',
+      'y'
+    ], expectedMembers: [
+      _ExpectedClassMember(aUri, 'A', '[]'),
+      _ExpectedClassMember(aUri, 'A', '[]=')
+    ]);
+  }
+
+  test_indexExpression_set() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  x[y] = x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '[]=')]);
+  }
+
+  test_indexExpression_super_get() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  test() {
+    super[x];
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['x'], superPrefixed: ['[]']);
+  }
+
+  test_indexExpression_super_getSet() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  test() {
+    super[x] += y;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['x', 'y'], superPrefixed: ['[]', '[]=']);
+  }
+
+  test_indexExpression_super_set() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  test() {
+    super[x] = y;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['x', 'y'], superPrefixed: ['[]=']);
+  }
+
+  test_indexExpression_unresolvedTarget() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x[y];
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_instanceCreationExpression_explicitNew_named() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+test() {
+  new A<T>.named(x, b: y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'T', 'x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'named')]);
+  }
+
+  test_instanceCreationExpression_explicitNew_unnamed() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+test() {
+  new A<T>(x, b: y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'T', 'x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '')]);
+  }
+
+  test_instanceCreationExpression_explicitNew_unresolvedClass() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  new A<T>.named(x);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'T', 'x']);
+  }
+
+  test_instanceCreationExpression_implicitNew_named() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+test() {
+  A<T>.named(x, b: y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'T', 'x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'named')]);
+  }
+
+  test_instanceCreationExpression_implicitNew_unnamed() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+test() {
+  A<T>(x, b: y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'T', 'x', 'y'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '')]);
+  }
+
+  test_instanceCreationExpression_implicitNew_unresolvedClass_named() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  A<T>.named(x, b: y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'T', 'x', 'y']);
+  }
+
+  test_integerLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  0;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_isExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x is Y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['Y', 'x']);
+  }
+
+  test_listLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  <A>[x, y];
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'x', 'y']);
+  }
+
+  test_mapLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  <A, B>{x: y, v: w};
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'B', 'v', 'w', 'x', 'y']);
+  }
+
+  test_methodInvocation_instance_withoutTarget_function() async {
+    var library = await buildTestLibrary(a, r'''
+void foo(a, {b}) {}
+
+test() {
+  foo(x, b: y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['foo', 'x', 'y']);
+  }
+
+  test_methodInvocation_instance_withoutTarget_method() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void foo(a, {b}) {}
+
+  test() {
+    foo(x, b: y);
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['foo', 'x', 'y']);
+  }
+
+  test_methodInvocation_instance_withTarget() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  x.foo<T>(y, b: z);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['T', 'x', 'y', 'z'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'foo')]);
+  }
+
+  test_methodInvocation_instance_withTarget_super() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  void foo(a, b) {}
+}
+
+class B extends A {
+  test() {
+    super.foo(x, y);
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'B', unprefixed: ['x', 'y'], superPrefixed: ['foo']);
+  }
+
+  test_methodInvocation_static_withTarget() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+test() {
+  A.foo<T>(x);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'T', 'x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'foo')]);
+  }
+
+  test_nullLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  null;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_parenthesizedExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  ((x));
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_postfixExpression() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+class B extend A {}
+
+B x, y;
+
+test() {
+  x++;
+  y--;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: [
+      'x',
+      'y'
+    ], expectedMembers: [
+      _ExpectedClassMember(aUri, 'B', '+'),
+      _ExpectedClassMember(aUri, 'B', '-')
+    ]);
+  }
+
+  test_postfixExpression_unresolvedTarget() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x++;
+  y--;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_prefixedIdentifier_importPrefix() async {
+    newFile(b, content: 'var b = 0;');
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as pb;
+
+test() {
+  pb.b;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, prefixed: {
+      'pb': ['b']
+    });
+  }
+
+  test_prefixedIdentifier_importPrefix_unresolvedIdentifier() async {
+    newFile(b, content: '');
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as pb;
+
+test() {
+  pb.b;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, prefixed: {
+      'pb': ['b']
+    });
+  }
+
+  test_prefixedIdentifier_interfaceProperty() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  int get y => 0;
+}
+
+class B extends A {}
+
+B x;
+test() {
+  x.y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'B', 'y')]);
+  }
+
+  test_prefixedIdentifier_static() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+class B extends A {}
+
+test() {
+  B.x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['B'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'B', 'x')]);
+  }
+
+  test_prefixedIdentifier_unresolvedPrefix() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x.y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_prefixExpression() async {
+    var library = await buildTestLibrary(a, r'''
+class A {
+  operator-() {}
+}
+
+class B extend A {}
+
+B x;
+
+test() {
+  -x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'B', 'unary-')]);
+  }
+
+  test_prefixExpression_unresolvedOperator() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  -x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'unary-')]);
+  }
+
+  test_prefixExpression_unresolvedTarget() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  -x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_propertyAccess_get() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  (x).foo;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'foo')]);
+  }
+
+  test_propertyAccess_getSet() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  (x).foo += 1;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: [
+      'x'
+    ], expectedMembers: [
+      _ExpectedClassMember(aUri, 'A', 'foo'),
+      _ExpectedClassMember(aUri, 'A', 'foo='),
+    ]);
+  }
+
+  test_propertyAccess_set() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+A x;
+
+test() {
+  (x).foo = 1;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'foo=')]);
+  }
+
+  test_propertyAccess_super_get() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  test() {
+    super.foo;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', superPrefixed: ['foo']);
+  }
+
+  test_propertyAccess_super_getSet() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  test() {
+    super.foo += 1;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', superPrefixed: ['foo', 'foo=']);
+  }
+
+  test_propertyAccess_super_set() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  test() {
+    super.foo = 1;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', superPrefixed: ['foo=']);
+  }
+
+  test_rethrowExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  try {
+  } on A {
+    rethrow;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['A']);
+  }
+
+  test_simpleIdentifier() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_simpleIdentifier_sort() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  d; c; a; b; e;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['a', 'b', 'c', 'd', 'e']);
+  }
+
+  test_simpleIdentifier_synthetic() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x +;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_simpleIdentifier_unique() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  x; x; y; x; y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_simpleStringLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  '';
+  """""";
+  r"""""";
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_stringInterpolation() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  '$x ${y}';
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_symbolLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  #foo.bar;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_thisExpression() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  test() {
+    this;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD, memberOf: 'C');
+  }
+
+  test_throwExpression() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  throw x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+}
+
+@reflectiveTest
+class ExpressionReferenceCollectorTest_SetLiterals extends _Base {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.set_literals];
+
+  test_setLiteral() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  <A>{x, y, z};
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'x', 'y', 'z']);
+  }
+}
+
+@reflectiveTest
+class ImplReferenceCollectorTest extends _Base {
+  test_class_constructor() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  var f;
+  C.test(A a, {b: x, this.f: y}) {
+    z;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['x', 'y', 'z']);
+  }
+
+  test_class_constructor_factoryRedirect_named() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+class X {
+  factory X.test() = A.named;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X',
+        unprefixed: ['A'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'named')]);
+  }
+
+  test_class_constructor_factoryRedirect_named_prefixed() async {
+    newFile(b, content: 'class A {}');
+
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as p;
+
+class X {
+  factory X.test() = p.A.named;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X',
+        prefixed: {
+          'p': ['A']
+        },
+        expectedMembers: [
+          _ExpectedClassMember(bUri, 'A', 'named')
+        ]);
+  }
+
+  test_class_constructor_factoryRedirect_named_unresolvedTarget() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  factory X.test() = A.named;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X', unprefixed: ['A']);
+  }
+
+  test_class_constructor_factoryRedirect_unnamed() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+class X {
+  factory X.test() = A;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X',
+        unprefixed: ['A'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '')]);
+  }
+
+  test_class_constructor_factoryRedirect_unnamed_prefixed() async {
+    newFile(b, content: 'class A {}');
+
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as p;
+
+class X {
+  factory X.test() = p.A;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X',
+        prefixed: {
+          'p': ['A']
+        },
+        expectedMembers: [
+          _ExpectedClassMember(bUri, 'A', '')
+        ]);
+  }
+
+  test_class_constructor_factoryRedirect_unnamed_unresolvedTarget() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  factory X.test() = A;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X', unprefixed: ['A']);
+  }
+
+  test_class_constructor_initializer_assert() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  C.test(a) : assert(a > x, y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['x', 'y']);
+  }
+
+  test_class_constructor_initializer_field() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  var f;
+  
+  C.test() : f = x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['x']);
+  }
+
+  test_class_constructor_initializer_super_named() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+class C extends A {
+  C.test() : super.named(x);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C',
+        unprefixed: ['A', 'x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', 'named')]);
+  }
+
+  test_class_constructor_initializer_super_named_unresolvedSuper() async {
+    var library = await buildTestLibrary(a, r'''
+class C extends A {
+  C.test() : super.named(x);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A', 'x']);
+  }
+
+  test_class_constructor_initializer_super_unnamed() async {
+    var library = await buildTestLibrary(a, r'''
+class A {}
+
+class C extends A {
+  C.test() : super(x);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C',
+        unprefixed: ['A', 'x'],
+        expectedMembers: [_ExpectedClassMember(aUri, 'A', '')]);
+  }
+
+  test_class_constructor_initializer_super_unnamed_unresolvedSuper() async {
+    var library = await buildTestLibrary(a, r'''
+class C extends A {
+  C.test() : super(x);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['A', 'x']);
+  }
+
+  test_class_constructor_initializer_this_named() async {
+    var library = await buildTestLibrary(a, r'''
+class C extends A {
+  C.test() : this.named(x);
+  
+  C.named(a);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['x']);
+  }
+
+  test_class_constructor_initializer_this_unnamed() async {
+    var library = await buildTestLibrary(a, r'''
+class C extends A {
+  C.test() : this(x);
+  
+  C(a);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'C', unprefixed: ['x']);
+  }
+
+  test_class_method() async {
+    var library = await buildTestLibrary(a, r'''
+class C {
+  void test(A a, {b: x}) {
+    y;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'C', unprefixed: ['x', 'y']);
+  }
+
+  test_class_typeParameter() async {
+    var library = await buildTestLibrary(a, r'''
+class C<T extends A> {}
+''');
+    _assertImpl(library, 'T', NodeKind.TYPE_PARAMETER, typeParameterOf: 'C');
+  }
+
+  test_classTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+class Test = A with B implements C;
+''');
+    _assertImpl(library, 'Test', NodeKind.CLASS_TYPE_ALIAS);
+  }
+
+  test_functionTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+typedef A Test<T extends B>(C c, T t);
+''');
+    _assertImpl(library, 'Test', NodeKind.FUNCTION_TYPE_ALIAS);
+  }
+
+  test_unit_class() async {
+    var library = await buildTestLibrary(a, r'''
+class Test<T extends A, U extends T> extends B with C, implements D {
+  void test() {
+    x;
+  }
+}
+''');
+    _assertImpl(library, 'Test', NodeKind.CLASS);
+  }
+
+  test_unit_classTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+class Test<T extends V, U extends T> = A<T> with B<U, W>;
+''');
+    _assertImpl(library, 'Test', NodeKind.CLASS_TYPE_ALIAS);
+  }
+
+  test_unit_function() async {
+    var library = await buildTestLibrary(a, r'''
+void test(A a, {b: x}) {
+  y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_unit_mixin() async {
+    var library = await buildTestLibrary(a, r'''
+mixin Test<T extends A, U extends T> on B<T>, C<D, U> {
+  void test() {
+    x;
+  }
+}
+''');
+    _assertImpl(library, 'Test', NodeKind.MIXIN);
+  }
+
+  test_unit_variable() async {
+    var library = await buildTestLibrary(a, r'''
+int test = x;
+''');
+    _assertImpl(library, 'test', NodeKind.GETTER, unprefixed: ['x']);
+    _assertImpl(library, 'test=', NodeKind.SETTER); // empty
+  }
+
+  test_unit_variable_noInitializer() async {
+    var library = await buildTestLibrary(a, r'''
+int test;
+''');
+    _assertImpl(library, 'test', NodeKind.GETTER);
+    _assertImpl(library, 'test=', NodeKind.SETTER); // empty
+  }
+}
+
+@reflectiveTest
+class ShadowReferenceCollectorTest extends _Base {
+  test_importPrefix_with_classMember_getter_field() async {
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as p;
+
+class X {
+  p.A<B> test() {}
+
+  int p;
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'X', unprefixed: ['B', 'p']);
+  }
+
+  test_importPrefix_with_classMember_method() async {
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as p;
+
+class X {
+  p.A<B> test() {}
+
+  p() {}
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'X', unprefixed: ['B', 'p']);
+  }
+
+  test_importPrefix_with_function() async {
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as p;
+
+p() {} // this is a compilation error
+
+class X extends p.A<B> {}
+''');
+    _assertApi(library, 'X', NodeKind.CLASS, unprefixed: [
+      'B'
+    ], prefixed: {
+      'p': ['A']
+    });
+  }
+
+  test_syntacticScope_class_constructor() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  X.test(A a, X b) {
+    X;
+  }
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X', unprefixed: ['A']);
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR, memberOf: 'X');
+  }
+
+  test_syntacticScope_class_constructor_parameters() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  X.test(a, b, c) {
+    a; b; c;
+    d;
+  }
+}
+''');
+    _assertApi(library, 'test', NodeKind.CONSTRUCTOR, memberOf: 'X');
+    _assertImpl(library, 'test', NodeKind.CONSTRUCTOR,
+        memberOf: 'X', unprefixed: ['d']);
+  }
+
+  test_syntacticScope_class_field() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  var test = x + X + test;
+}
+''');
+    _assertApi(library, 'test', NodeKind.GETTER,
+        memberOf: 'X', unprefixed: ['x']);
+    _assertImpl(library, 'test', NodeKind.GETTER,
+        memberOf: 'X', unprefixed: ['x']);
+  }
+
+  test_syntacticScope_class_method() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  test(A a, X b, test c) {
+    X;
+    test;
+    B;
+  }
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD,
+        memberOf: 'X', unprefixed: ['A']);
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'X', unprefixed: ['B']);
+  }
+
+  test_syntacticScope_class_method_parameters() async {
+    var library = await buildTestLibrary(a, r'''
+class X {
+  test(a, b, c) {
+    a; b; c;
+    d;
+  }
+}
+''');
+    _assertApi(library, 'test', NodeKind.METHOD, memberOf: 'X');
+    _assertImpl(library, 'test', NodeKind.METHOD,
+        memberOf: 'X', unprefixed: ['d']);
+  }
+
+  test_syntacticScope_class_typeParameter_ofClass() async {
+    var library = await buildTestLibrary(a, r'''
+class X<T extends A<B, X, T>> {}
+''');
+    _assertApi(library, 'T', NodeKind.TYPE_PARAMETER,
+        typeParameterOf: 'X', unprefixed: ['A', 'B']);
+  }
+
+  test_syntacticScope_unit_class() async {
+    var library = await buildTestLibrary(a, r'''
+class X extends A<B, X> {}
+''');
+    _assertApi(library, 'X', NodeKind.CLASS, unprefixed: ['A', 'B']);
+  }
+
+  test_syntacticScope_unit_function() async {
+    var library = await buildTestLibrary(a, r'''
+test(A a, test b) {
+  test;
+  B;
+}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A']);
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['B']);
+  }
+
+  test_syntacticScope_unit_function_parameters() async {
+    var library = await buildTestLibrary(a, r'''
+test(a, b, {c}) {
+  a; b; c;
+  d;
+}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION);
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['d']);
+  }
+
+  test_syntacticScope_unit_functionTypeAlias() async {
+    var library = await buildTestLibrary(a, r'''
+typedef X(A a, X b);
+''');
+    _assertApi(library, 'X', NodeKind.FUNCTION_TYPE_ALIAS, unprefixed: ['A']);
+  }
+
+  test_syntacticScope_unit_mixin() async {
+    var library = await buildTestLibrary(a, r'''
+mixin X on A<B, X> {}
+''');
+    _assertApi(library, 'X', NodeKind.MIXIN, unprefixed: ['A', 'B']);
+  }
+}
+
+@reflectiveTest
+class StatementReferenceCollectorTest extends _Base {
+  test_assertStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  assert(x, y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_block_localScope() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  var x = 0;
+  {
+    var y = 0;
+    {
+      x;
+      y;
+    }
+    x;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_breakStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  while (true) {
+    break;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_continueStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  while (true) {
+    continue;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_doStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  do {
+    x;
+  } while (y);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_emptyStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  while (true);
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_forEachStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  for (A a in x) {
+    a;
+    y;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'x', 'y']);
+  }
+
+  test_forEachStatement_body_singleStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  for (var a in x) a;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_forEachStatement_iterableAsLoopVariable() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  for (A x in x) {
+    y;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'x', 'y']);
+  }
+
+  test_forEachStatement_loopIdentifier() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  for (x in y) {
+    z;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y', 'z']);
+  }
+
+  test_forStatement_initialization() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  for (x; y; z) {
+    z2;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y', 'z', 'z2']);
+  }
+
+  test_forStatement_variables() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  for (A a = x, b = y, c = a; z; a, b, z2) {
+    z3;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'x', 'y', 'z', 'z2', 'z3']);
+  }
+
+  test_functionDeclarationStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  A foo(B b) {
+    x;
+    C;
+    b;
+    foo();
+  }
+  foo();
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'B', 'C', 'x']);
+  }
+
+  test_ifStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  if (x) {
+    y;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_ifStatement_else() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  if (x) {
+    y;
+  } else {
+    z;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y', 'z']);
+  }
+
+  test_labeledStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  label: x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_returnStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  return x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+
+  test_switchStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  switch (x) {
+    case y:
+      var local1 = 1;
+      z;
+      local1;
+      break;
+    default:
+      var local2 = 2;
+      z2;
+      local2;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['x', 'y', 'z', 'z2']);
+  }
+
+  test_switchStatement_localScopePerCase() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  switch (0) {
+    case 0:
+      var v1 = 1;
+      var v2 = 2;
+      v1;
+      v2;
+    default:
+      v1;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['v1']);
+  }
+
+  test_tryStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  try {
+    var local1 = 1;
+    x;
+    local1;
+  } finally {
+    var local2 = 2;
+    y;
+    local2;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_tryStatement_catch() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  try {
+    var local1 = 1;
+    x;
+    local1;
+  } on A {
+    var local2 = 2;
+    y;
+    local2;
+  } on B catch (ex1) {
+    var local3 = 3;
+    z;
+    ex1;
+    local3;
+  } catch (ex2, st2) {
+    ex2;
+    st2;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'B', 'x', 'y', 'z']);
+  }
+
+  test_variableDeclarationStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  var a = x, b = y;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_whileStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() {
+  while (x) {
+    y;
+  }
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x', 'y']);
+  }
+
+  test_yieldStatement() async {
+    var library = await buildTestLibrary(a, r'''
+test() sync* {
+  yield x;
+}
+''');
+    _assertImpl(library, 'test', NodeKind.FUNCTION, unprefixed: ['x']);
+  }
+}
+
+@reflectiveTest
+class TypeReferenceCollectorTest extends _Base {
+  test_dynamic() async {
+    var library = await buildTestLibrary(a, r'''
+dynamic test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION);
+  }
+
+  test_function() async {
+    var library = await buildTestLibrary(a, r'''
+A Function(B) test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B']);
+  }
+
+  test_function_generic() async {
+    var library = await buildTestLibrary(a, r'''
+A Function<T, U extends B>(T t, C c, D<T> d, E e) test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'B', 'C', 'D', 'E']);
+  }
+
+  test_function_nested_generic() async {
+    var library = await buildTestLibrary(a, r'''
+A Function<T>(B Function<U>(U, C, T) f, D) test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'B', 'C', 'D']);
+  }
+
+  test_function_parameter_named() async {
+    var library = await buildTestLibrary(a, r'''
+A Function({B, C}) test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B', 'C']);
+  }
+
+  test_function_parameter_positional() async {
+    var library = await buildTestLibrary(a, r'''
+A Function([B, C]) test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B', 'C']);
+  }
+
+  test_function_shadow_typeParameters() async {
+    var library = await buildTestLibrary(a, r'''
+A Function<T extends U, U>(B) test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A', 'B']);
+  }
+
+  test_interface_generic() async {
+    var library = await buildTestLibrary(a, r'''
+A<B, C<D>> test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION,
+        unprefixed: ['A', 'B', 'C', 'D']);
+  }
+
+  test_interface_prefixed() async {
+    var library = await buildTestLibrary(a, r'''
+import 'b.dart' as pb;
+import 'c.dart' as pc;
+A<pb.B2, pc.C2, pb.B1, pc.C1, pc.C3> test() {}
+''');
+    _assertApi(
+      library,
+      'test',
+      NodeKind.FUNCTION,
+      unprefixed: ['A'],
+      prefixed: {
+        'pb': ['B1', 'B2'],
+        'pc': ['C1', 'C2', 'C3']
+      },
+    );
+  }
+
+  test_interface_simple() async {
+    var library = await buildTestLibrary(a, r'''
+A test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION, unprefixed: ['A']);
+  }
+
+  test_void() async {
+    var library = await buildTestLibrary(a, r'''
+void test() {}
+''');
+    _assertApi(library, 'test', NodeKind.FUNCTION);
+  }
+}
+
+class _Base extends BaseDependencyTest {
+  void _assertApi(Library library, String name, NodeKind kind,
+      {String memberOf,
+      String typeParameterOf,
+      List<String> unprefixed: const [],
+      Map<String, List<String>> prefixed: const {},
+      List<String> superPrefixed: const [],
+      List<_ExpectedClassMember> expectedMembers: const []}) {
+    var node = getNode(
+      library,
+      name: name,
+      kind: kind,
+      memberOf: memberOf,
+      typeParameterOf: typeParameterOf,
+    );
+    _assertDependencies(
+      node.api,
+      unprefixed: unprefixed,
+      prefixed: prefixed,
+      superPrefixed: superPrefixed,
+      expectedMembers: expectedMembers,
+    );
+  }
+
+  void _assertDependencies(Dependencies dependencies,
+      {List<String> unprefixed: const [],
+      Map<String, List<String>> prefixed: const {},
+      List<String> superPrefixed: const [],
+      List<_ExpectedClassMember> expectedMembers: const []}) {
+    expect(dependencies.unprefixedReferencedNames, unprefixed);
+    expect(dependencies.importPrefixes, prefixed.keys);
+    expect(dependencies.importPrefixedReferencedNames, prefixed.values);
+    expect(dependencies.superReferencedNames, superPrefixed);
+
+    var actualMembers = dependencies.classMemberReferences;
+    if (actualMembers.length != expectedMembers.length) {
+      fail('Expected: $expectedMembers\nActual: $actualMembers');
+    }
+    expect(actualMembers, hasLength(expectedMembers.length));
+    for (var i = 0; i < actualMembers.length; i++) {
+      var actualMember = actualMembers[i];
+      var expectedMember = expectedMembers[i];
+      if (actualMember.target.libraryUri != expectedMember.targetUri ||
+          actualMember.target.name != expectedMember.targetName ||
+          actualMember.name != expectedMember.name) {
+        fail('Expected: $expectedMember\nActual: $actualMember');
+      }
+    }
+  }
+
+  void _assertImpl(Library library, String name, NodeKind kind,
+      {String memberOf,
+      String typeParameterOf,
+      List<String> unprefixed: const [],
+      Map<String, List<String>> prefixed: const {},
+      List<String> superPrefixed: const [],
+      List<_ExpectedClassMember> expectedMembers: const []}) {
+    var node = getNode(
+      library,
+      name: name,
+      kind: kind,
+      memberOf: memberOf,
+      typeParameterOf: typeParameterOf,
+    );
+    _assertDependencies(
+      node.impl,
+      unprefixed: unprefixed,
+      prefixed: prefixed,
+      superPrefixed: superPrefixed,
+      expectedMembers: expectedMembers,
+    );
+  }
+}
+
+class _ExpectedClassMember {
+  final Uri targetUri;
+  final String targetName;
+  final String name;
+
+  _ExpectedClassMember(
+    this.targetUri,
+    this.targetName,
+    this.name,
+  );
+
+  @override
+  String toString() {
+    return '($targetUri, $targetName, $name)';
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart b/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
new file mode 100644
index 0000000..0abdb5c
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'declared_nodes_test.dart' as declared_nodes_test;
+import 'reference_collector_test.dart' as reference_collector_test;
+
+main() {
+  defineReflectiveSuite(() {
+    declared_nodes_test.main();
+    reference_collector_test.main();
+  }, name: 'dependency');
+}
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
index 7841c96..b5c6ad8 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -1,17 +1,19 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:test/test.dart';
@@ -25,6 +27,7 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AnalysisDriverResolutionTest);
+    defineReflectiveTests(DriverResolutionWithExperimentsTest);
   });
 }
 
@@ -41,7 +44,7 @@
  */
 @reflectiveTest
 class AnalysisDriverResolutionTest extends BaseAnalysisDriverTest {
-  AnalysisResult result;
+  ResolvedUnitResult result;
   FindNode findNode;
   FindElement findElement;
 
@@ -376,7 +379,7 @@
   }
 
   test_annotation_onDirective_part() async {
-    provider.newFile(_p('/test/lib/a.dart'), r'''
+    newFile('/test/lib/a.dart', content: r'''
 part of 'test.dart';
 ''');
     addTestFile(r'''
@@ -399,8 +402,7 @@
   }
 
   test_annotation_onDirective_partOf() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 part 'test.dart';
 ''');
     addTestFile(r'''
@@ -409,7 +411,6 @@
 
 const a = 1;
 ''');
-    driver.addFile(a);
     await resolveTestFile();
 
     var directive = findNode.partOf('a.dart');
@@ -522,8 +523,7 @@
   }
 
   test_annotation_prefixed_classField() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class A {
   static const a = 1;
 }
@@ -563,8 +563,7 @@
   }
 
   test_annotation_prefixed_constructor() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class A {
   const A(int a, {int b});
 }
@@ -605,8 +604,7 @@
   }
 
   test_annotation_prefixed_constructor_named() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class A {
   const A.named(int a, {int b});
 }
@@ -649,8 +647,7 @@
   }
 
   test_annotation_prefixed_topLevelVariable() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 const topAnnotation = 1;
 ''');
     addTestFile(r'''
@@ -1538,8 +1535,7 @@
 
   @failingTest
   test_deferredImport_loadLibrary_invocation() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, '');
+    newFile('/test/lib/a.dart');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 main() {
@@ -1564,8 +1560,7 @@
 
   @failingTest
   test_deferredImport_loadLibrary_invocation_argument() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, '');
+    newFile('/test/lib/a.dart');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 var b = 1;
@@ -1599,8 +1594,7 @@
   }
 
   test_deferredImport_loadLibrary_tearOff() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, '');
+    newFile('/test/lib/a.dart');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 main() {
@@ -1623,8 +1617,7 @@
   }
 
   test_deferredImport_variable() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, 'var v = 0;');
+    newFile('/test/lib/a.dart', content: 'var v = 0;');
     addTestFile(r'''
 import 'a.dart' deferred as a;
 main() async {
@@ -1664,8 +1657,7 @@
   }
 
   test_directive_export() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class MyClass {}
 int myVar;
 int get myGetter => 0;
@@ -1713,8 +1705,7 @@
   }
 
   test_directive_import_hide() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class MyClass {}
 int myVar;
 int get myGetter => 0;
@@ -1762,8 +1753,7 @@
   }
 
   test_directive_import_show() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class MyClass {}
 int myVar;
 int get myGetter => 0;
@@ -2325,8 +2315,7 @@
   }
 
   test_instanceCreation_prefixed() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class C<T> {
   C(T p);
   C.named(T p);
@@ -3567,7 +3556,6 @@
     assertType(aRef, 'int');
   }
 
-  @failingTest
   test_invalid_methodInvocation_simpleIdentifier() async {
     addTestFile(r'''
 int foo = 0;
@@ -3720,8 +3708,7 @@
 
   @failingTest
   test_invalid_nonTypeAsType_topLevelFunction_prefixed() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 int T() => 0;
 ''');
     addTestFile(r'''
@@ -3789,8 +3776,7 @@
 
   @failingTest
   test_invalid_nonTypeAsType_topLevelVariable_prefixed() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 int T;
 ''');
     addTestFile(r'''
@@ -5388,8 +5374,8 @@
     expect(target.staticType.toString(), '(int) → double');
 
     SimpleIdentifier methodName = invocation.methodName;
-    expect(methodName.staticElement, same(parameter));
-    expect(methodName.staticType, parameter.type);
+    expect(methodName.staticElement, isNull);
+    expect(methodName.staticType, dynamicType);
   }
 
   test_methodInvocation_instanceMethod_forwardingStub() async {
@@ -5899,7 +5885,7 @@
 
   @failingTest
   test_optionalConst_prefixed() async {
-    provider.newFile(_p('/test/lib/a.dart'), r'''
+    newFile('/test/lib/a.dart', content: r'''
 class C {
   const C();
   const C.named();
@@ -6426,8 +6412,7 @@
   }
 
   test_prefixedIdentifier_importPrefix_className() async {
-    var libPath = _p('/test/lib/lib.dart');
-    provider.newFile(libPath, '''
+    newFile('/test/lib/lib.dart', content: '''
 class MyClass {}
 typedef void MyFunctionTypeAlias();
 int myTopVariable;
@@ -8019,12 +8004,9 @@
   }
 
   test_typeAnnotation_prefixed() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, "export 'a.dart';");
-    provider.newFile(c, "export 'a.dart';");
+    newFile('/test/lib/a.dart', content: 'class A {}');
+    newFile('/test/lib/b.dart', content: "export 'a.dart';");
+    newFile('/test/lib/c.dart', content: "export 'a.dart';");
     addTestFile(r'''
 import 'b.dart' as b;
 import 'c.dart' as c;
@@ -8737,69 +8719,6 @@
     expect(identifier.staticType, isDynamicType);
   }
 
-  test_unresolved_static_call() async {
-    addTestFile('''
-class C {
-  static f() => C.g();
-}
-''');
-    await resolveTestFile();
-    expect(result.errors, isNotEmpty);
-
-    var g = findNode.simple('g()');
-    assertElementNull(g);
-    assertTypeDynamic(g);
-    var invocation = g.parent as MethodInvocation;
-    assertTypeDynamic(invocation);
-    expect(invocation.staticInvokeType, isDynamicType);
-  }
-
-  test_unresolved_static_call_arguments() async {
-    addTestFile('''
-int x;
-class C {
-  static f() => C.g(x);
-}
-''');
-    await resolveTestFile();
-    expect(result.errors, isNotEmpty);
-
-    var x = findNode.simple('x)');
-    assertElement(x, findElement.topGet('x'));
-    assertType(x, 'int');
-  }
-
-  test_unresolved_static_call_same_name_as_type_param() async {
-    addTestFile('''
-class C<T> {
-  static f() => C.T();
-}
-''');
-    await resolveTestFile();
-    expect(result.errors, isNotEmpty);
-
-    var t = findNode.simple('T()');
-    assertElementNull(t);
-    assertTypeDynamic(t);
-    var invocation = t.parent as MethodInvocation;
-    assertTypeDynamic(invocation);
-    expect(invocation.staticInvokeType, isDynamicType);
-  }
-
-  test_unresolved_static_call_type_arguments() async {
-    addTestFile('''
-class C {
-  static f() => C.g<int>();
-}
-''');
-    await resolveTestFile();
-    expect(result.errors, isNotEmpty);
-
-    var intRef = findNode.simple('int>');
-    assertElement(intRef, intType.element);
-    assertType(intRef, 'int');
-  }
-
   /// Assert that the [argument] is associated with the [expected]. If the
   /// [argument] is a [NamedExpression], the name must be resolved to the
   /// parameter.
@@ -8910,7 +8829,7 @@
     expect(identifier.staticType, type);
   }
 
-  List<Statement> _getMainStatements(AnalysisResult result) {
+  List<Statement> _getMainStatements(ResolvedUnitResult result) {
     for (var declaration in result.unit.declarations) {
       if (declaration is FunctionDeclaration &&
           declaration.name.name == 'main') {
@@ -8922,7 +8841,7 @@
   }
 
   TopLevelVariableElement _getTopLevelVariable(
-      AnalysisResult result, String name) {
+      ResolvedUnitResult result, String name) {
     for (var variable in result.unit.declaredElement.topLevelVariables) {
       if (variable.name == name) {
         return variable;
@@ -8931,8 +8850,49 @@
     fail('Not found $name');
   }
 
-  /**
-   * Return the [provider] specific path for the given Posix [path].
-   */
-  String _p(String path) => provider.convertPath(path);
+//  String _p(String path) => convertPath(path);
+}
+
+/**
+ * Resolution tests that are run with all of the experiments enabled.
+ */
+@reflectiveTest
+class DriverResolutionWithExperimentsTest extends BaseAnalysisDriverTest {
+  AnalysisOptionsImpl createAnalysisOptions() => super.createAnalysisOptions()
+    ..enabledExperiments = _computeActiveExperimentNames();
+
+  test_binaryExpression_gtGtGt() async {
+    addTestFile('''
+class A {
+  A operator >>>(int amount) => this;
+}
+f(A a) {
+  a >>> 3;
+}
+''');
+    var result = await driver.getResult(testFile);
+    CompilationUnit unit = result.unit;
+    MethodDeclaration declaration =
+        (unit.declarations[0] as ClassDeclaration).members[0];
+    ExecutableElement operatorElement = declaration.declaredElement;
+    expect(operatorElement.name, '>>>');
+    ExpressionStatement statement =
+        ((unit.declarations[1] as FunctionDeclaration).functionExpression.body
+                as BlockFunctionBody)
+            .block
+            .statements[0];
+    BinaryExpression binary = statement.expression;
+    expect(binary.operator.type, TokenType.GT_GT_GT);
+    expect(binary.staticElement, operatorElement);
+  }
+
+  List<String> _computeActiveExperimentNames() {
+    var result = <String>[];
+    for (var feature in ExperimentStatus.knownFeatures.values) {
+      if (!feature.isExpired) {
+        result.add(feature.enableString);
+      }
+    }
+    return result;
+  }
 }
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 0345738..12505a4 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -1,16 +1,15 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 
-import 'package:analyzer/dart/analysis/results.dart' as results;
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
@@ -27,11 +26,12 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../../utils.dart';
-import '../../context/mock_sdk.dart';
 import 'base.dart';
 
 main() {
@@ -57,8 +57,7 @@
 }
 
 @reflectiveTest
-class AnalysisDriverSchedulerTest {
-  final MemoryResourceProvider provider = new MemoryResourceProvider();
+class AnalysisDriverSchedulerTest with ResourceProviderMixin {
   DartSdk sdk;
   final ByteStore byteStore = new MemoryByteStore();
   final FileContentOverlay contentOverlay = new FileContentOverlay();
@@ -68,28 +67,28 @@
 
   AnalysisDriverScheduler scheduler;
 
-  List<AnalysisResult> allResults = [];
+  List<ResolvedUnitResult> allResults = [];
 
   AnalysisDriver newDriver() {
-    sdk = new MockSdk(resourceProvider: provider);
+    sdk = new MockSdk(resourceProvider: resourceProvider);
     AnalysisDriver driver = new AnalysisDriver(
         scheduler,
         logger,
-        provider,
+        resourceProvider,
         byteStore,
         contentOverlay,
         null,
-        new SourceFactory(
-            [new DartUriResolver(sdk), new ResourceUriResolver(provider)],
-            null,
-            provider),
+        new SourceFactory([
+          new DartUriResolver(sdk),
+          new ResourceUriResolver(resourceProvider)
+        ], null, resourceProvider),
         new AnalysisOptionsImpl());
     driver.results.forEach(allResults.add);
     return driver;
   }
 
   void setUp() {
-    sdk = new MockSdk(resourceProvider: provider);
+    sdk = new MockSdk(resourceProvider: resourceProvider);
     logger = new PerformanceLog(logBuffer);
     scheduler = new AnalysisDriverScheduler(logger);
     scheduler.start();
@@ -99,14 +98,14 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    String c = _p('/c.dart');
-    String d = _p('/d.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, "import 'a.dart';");
-    provider.newFile(c, 'class C {}');
-    provider.newFile(d, "import 'c.dart';");
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    String c = convertPath('/c.dart');
+    String d = convertPath('/d.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: "import 'a.dart';");
+    newFile(c, content: 'class C {}');
+    newFile(d, content: "import 'c.dart';");
     driver1.addFile(a);
     driver1.addFile(b);
     driver2.addFile(c);
@@ -115,8 +114,8 @@
     await scheduler.waitForIdle();
     allResults.clear();
 
-    provider.updateFile(a, 'class A2 {}');
-    provider.updateFile(c, 'class C2 {}');
+    modifyFile(a, 'class A2 {}');
+    modifyFile(c, 'class C2 {}');
     driver1.changeFile(a);
     driver1.changeFile(c);
     driver2.changeFile(a);
@@ -132,12 +131,12 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    String c = _p('/c.dart');
-    provider.newFile(a, "import 'c.dart';");
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, "import 'b.dart';");
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    String c = convertPath('/c.dart');
+    newFile(a, content: "import 'c.dart';");
+    newFile(b, content: 'class B {}');
+    newFile(c, content: "import 'b.dart';");
     driver1.addFile(a);
     driver1.addFile(b);
     driver2.addFile(c);
@@ -145,7 +144,7 @@
     await scheduler.waitForIdle();
     allResults.clear();
 
-    provider.updateFile(b, 'class B2 {}');
+    modifyFile(b, 'class B2 {}');
     driver1.changeFile(b);
     driver2.changeFile(b);
 
@@ -159,14 +158,14 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    String c = _p('/c.dart');
-    String d = _p('/d.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, "export 'a.dart';");
-    provider.newFile(c, "import 'b.dart';");
-    provider.newFile(d, "import 'b.dart'; class D extends X {}");
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    String c = convertPath('/c.dart');
+    String d = convertPath('/d.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: "export 'a.dart';");
+    newFile(c, content: "import 'b.dart';");
+    newFile(d, content: "import 'b.dart'; class D extends X {}");
     driver1.addFile(a);
     driver1.addFile(b);
     driver2.addFile(c);
@@ -175,7 +174,7 @@
     await scheduler.waitForIdle();
     allResults.clear();
 
-    provider.updateFile(a, 'class A2 {}');
+    modifyFile(a, 'class A2 {}');
     driver1.changeFile(a);
     driver2.changeFile(a);
 
@@ -189,19 +188,19 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    String c = _p('/c.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, 'class C {}');
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    String c = convertPath('/c.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
+    newFile(c, content: 'class C {}');
     driver1.addFile(a);
     driver2.addFile(b);
     driver2.addFile(c);
     driver1.priorityFiles = [a];
     driver2.priorityFiles = [a];
 
-    AnalysisResult result = await driver2.getResult(b);
+    ResolvedUnitResult result = await driver2.getResult(b);
     expect(result.path, b);
 
     await scheduler.status.firstWhere((status) => status.isIdle);
@@ -216,10 +215,10 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
     driver1.addFile(a);
     driver2.addFile(b);
     driver1.priorityFiles = [a];
@@ -236,10 +235,10 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
     driver1.addFile(a);
     driver2.addFile(b);
     driver1.priorityFiles = [b];
@@ -256,12 +255,12 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    String c = _p('/c.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, 'class C {}');
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    String c = convertPath('/c.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
+    newFile(c, content: 'class C {}');
     driver1.addFile(a);
     driver1.addFile(b);
     driver2.addFile(c);
@@ -280,12 +279,12 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    String c = _p('/c.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, 'class C {}');
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    String c = convertPath('/c.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
+    newFile(c, content: 'class C {}');
     driver1.addFile(a);
     driver2.addFile(b);
     driver2.addFile(c);
@@ -312,10 +311,10 @@
     AnalysisDriver driver1 = newDriver();
     AnalysisDriver driver2 = newDriver();
 
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
     driver1.addFile(a);
     driver2.addFile(b);
 
@@ -339,21 +338,18 @@
     await driver1.getFilesReferencingName('X');
     expect(allStatuses, isEmpty);
   }
-
-  String _p(String path) => provider.convertPath(path);
 }
 
 @reflectiveTest
 class AnalysisDriverTest extends BaseAnalysisDriverTest {
   void configurePreviewDart2() {
     driver.configure(
-        analysisOptions: new AnalysisOptionsImpl.from(driver.analysisOptions)
-          ..previewDart2 = true);
+        analysisOptions: new AnalysisOptionsImpl.from(driver.analysisOptions));
   }
 
   test_addedFiles() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
 
     driver.addFile(a);
     expect(driver.addedFiles, contains(a));
@@ -372,11 +368,11 @@
   }
 
   test_addFile_shouldRefresh() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
 
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, r'''
+    newFile(a, content: 'class A {}');
+    newFile(b, content: r'''
 import 'a.dart';
 ''');
 
@@ -394,7 +390,7 @@
     assertNumberOfErrorsInB(1);
 
     // Update 'b' to use 'a', no more hints.
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 main() {
   print(A);
@@ -407,7 +403,7 @@
     // Change 'b' content so that it has a hint.
     // Remove 'b' and add it again.
     // The file 'b' must be refreshed, and the hint must be reported.
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 ''');
     driver.removeFile(b);
@@ -417,10 +413,10 @@
   }
 
   test_addFile_thenRemove() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
     driver.addFile(a);
     driver.addFile(b);
 
@@ -435,24 +431,24 @@
   }
 
   test_analyze_resolveDirectives() async {
-    var lib = _p('/test/lib.dart');
-    var part1 = _p('/test/part1.dart');
-    var part2 = _p('/test/part2.dart');
-    provider.newFile(lib, '''
+    var lib = convertPath('/test/lib.dart');
+    var part1 = convertPath('/test/part1.dart');
+    var part2 = convertPath('/test/part2.dart');
+    newFile(lib, content: '''
 library lib;
 part 'part1.dart';
 part 'part2.dart';
 ''');
-    provider.newFile(part1, '''
+    newFile(part1, content: '''
 part of lib;
 ''');
-    provider.newFile(part2, '''
+    newFile(part2, content: '''
 part of 'lib.dart';
 ''');
 
-    AnalysisResult libResult = await driver.getResult(lib);
-    AnalysisResult partResult1 = await driver.getResult(part1);
-    AnalysisResult partResult2 = await driver.getResult(part2);
+    ResolvedUnitResult libResult = await driver.getResult(lib);
+    ResolvedUnitResult partResult1 = await driver.getResult(part1);
+    ResolvedUnitResult partResult2 = await driver.getResult(part2);
 
     CompilationUnit libUnit = libResult.unit;
     CompilationUnit partUnit1 = partResult1.unit;
@@ -486,189 +482,87 @@
   }
 
   test_analyze_resolveDirectives_error_missingLibraryDirective() async {
-    var lib = _p('/test/lib.dart');
-    var part = _p('/test/part.dart');
-    provider.newFile(lib, '''
+    var lib = convertPath('/test/lib.dart');
+    var part = convertPath('/test/part.dart');
+    newFile(lib, content: '''
 part 'part.dart';
 ''');
-    provider.newFile(part, '''
+    newFile(part, content: '''
 part of lib;
 ''');
 
     driver.addFile(lib);
 
-    AnalysisResult libResult = await driver.getResult(lib);
+    ResolvedUnitResult libResult = await driver.getResult(lib);
     List<AnalysisError> errors = libResult.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, ResolverErrorCode.PART_OF_UNNAMED_LIBRARY);
   }
 
   test_analyze_resolveDirectives_error_partOfDifferentLibrary_byName() async {
-    var lib = _p('/test/lib.dart');
-    var part = _p('/test/part.dart');
-    provider.newFile(lib, '''
+    var lib = convertPath('/test/lib.dart');
+    var part = convertPath('/test/part.dart');
+    newFile(lib, content: '''
 library lib;
 part 'part.dart';
 ''');
-    provider.newFile(part, '''
+    newFile(part, content: '''
 part of someOtherLib;
 ''');
 
     driver.addFile(lib);
 
-    AnalysisResult libResult = await driver.getResult(lib);
+    ResolvedUnitResult libResult = await driver.getResult(lib);
     List<AnalysisError> errors = libResult.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, StaticWarningCode.PART_OF_DIFFERENT_LIBRARY);
   }
 
   test_analyze_resolveDirectives_error_partOfDifferentLibrary_byUri() async {
-    var lib = _p('/test/lib.dart');
-    var part = _p('/test/part.dart');
-    provider.newFile(lib, '''
+    var lib = convertPath('/test/lib.dart');
+    var part = convertPath('/test/part.dart');
+    newFile(lib, content: '''
 library lib;
 part 'part.dart';
 ''');
-    provider.newFile(part, '''
+    newFile(part, content: '''
 part of 'other_lib.dart';
 ''');
 
     driver.addFile(lib);
 
-    AnalysisResult libResult = await driver.getResult(lib);
+    ResolvedUnitResult libResult = await driver.getResult(lib);
     List<AnalysisError> errors = libResult.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, StaticWarningCode.PART_OF_DIFFERENT_LIBRARY);
   }
 
   test_analyze_resolveDirectives_error_partOfNonPart() async {
-    var lib = _p('/test/lib.dart');
-    var part = _p('/test/part.dart');
-    provider.newFile(lib, '''
+    var lib = convertPath('/test/lib.dart');
+    var part = convertPath('/test/part.dart');
+    newFile(lib, content: '''
 library lib;
 part 'part.dart';
 ''');
-    provider.newFile(part, '''
+    newFile(part, content: '''
 // no part of directive
 ''');
 
     driver.addFile(lib);
 
-    AnalysisResult libResult = await driver.getResult(lib);
+    ResolvedUnitResult libResult = await driver.getResult(lib);
     List<AnalysisError> errors = libResult.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, CompileTimeErrorCode.PART_OF_NON_PART);
   }
 
-  test_asyncChangesDuringAnalysis_getErrors() async {
-    var path = _p('/test/lib/test.dart');
-    provider.newFile(path, 'class A {}');
-    driver.addFile(path);
-
-    // Compute and cache errors.
-    await driver.getErrors(path);
-    await waitForIdleWithoutExceptions();
-
-    // Simulate a change that happens during reading the cached errors.
-    bool asyncWorkExecuted = false;
-    driver.test.workToWaitAfterComputingResult = (path) async {
-      await new Future.value(); // the rest will be executed asynchronously
-      provider.updateFile(path, 'class B');
-      driver.changeFile(path);
-      asyncWorkExecuted = true;
-    };
-
-    ErrorsResult result = await driver.getErrors(testFile);
-    expect(asyncWorkExecuted, isTrue);
-    expect(result.errors, isNotEmpty);
-  }
-
-  test_asyncChangesDuringAnalysis_getResult() async {
-    var path = _p('/test/lib/test.dart');
-    provider.newFile(path, 'class A {}');
-    driver.addFile(path);
-
-    // Schedule the result to be computed.
-    Future<AnalysisResult> future1 = driver.getResult(testFile);
-
-    // Simulate a change that happens during computing the result.
-    // We also request a new result, which must include the change.
-    Future<AnalysisResult> future2;
-    bool asyncWorkExecuted = false;
-    driver.test.workToWaitAfterComputingResult = (path) async {
-      provider.updateFile(path, 'class B {}');
-      driver.changeFile(path);
-      future2 = driver.getResult(testFile);
-      asyncWorkExecuted = true;
-    };
-
-    // Both futures complete, with the same result.
-    // The result must be with the new changes.
-    //
-    // It would not be wrong to have "class A {}" in result1, and "class B {}"
-    // in result2, but we test here the actual implementation behaviour.
-    AnalysisResult result1 = await future1;
-    AnalysisResult result2 = await future2;
-    expect(asyncWorkExecuted, isTrue);
-    expect(result2, same(result1));
-    expect(result1.path, testFile);
-    expect(result1.unit, isNotNull);
-    expect((result1.unit.declarations[0] as ClassDeclaration).name.name, 'B');
-  }
-
-  test_asyncChangesDuringAnalysis_resultsStream() async {
-    var path = _p('/test/lib/test.dart');
-    provider.newFile(path, 'class A {}');
-    driver.addFile(path);
-
-    // Simulate a change that happens during computing the result.
-    bool asyncWorkExecuted = false;
-    driver.test.workToWaitAfterComputingResult = (p) async {
-      if (p == path && !asyncWorkExecuted) {
-        provider.updateFile(path, 'class B');
-        driver.changeFile(path);
-        asyncWorkExecuted = true;
-      }
-    };
-
-    await waitForIdleWithoutExceptions();
-    expect(asyncWorkExecuted, isTrue);
-
-    // The last result must have an error.
-    expect(allResults.last.errors, isNotEmpty);
-  }
-
-  test_asyncChangesDuringAnalysis_resultsStream_priority() async {
-    var path = _p('/test/lib/test.dart');
-    provider.newFile(path, 'class A {}');
-    driver.addFile(path);
-    driver.priorityFiles = [path];
-
-    // Simulate a change that happens during computing the result.
-    bool asyncWorkExecuted = false;
-    driver.test.workToWaitAfterComputingResult = (p) async {
-      if (p == path && !asyncWorkExecuted) {
-        provider.updateFile(path, 'class B {}');
-        driver.changeFile(path);
-        asyncWorkExecuted = true;
-      }
-    };
-
-    await waitForIdleWithoutExceptions();
-    expect(asyncWorkExecuted, isTrue);
-
-    // The last unit must have "class B {}".
-    var lastUnit = allResults.last.unit;
-    expect((lastUnit.declarations[0] as ClassDeclaration).name.name, 'B');
-  }
-
   test_cachedPriorityResults() async {
-    var a = _p('/test/bin/a.dart');
-    provider.newFile(a, 'var a = 1;');
+    var a = convertPath('/test/bin/a.dart');
+    newFile(a, content: 'var a = 1;');
 
     driver.priorityFiles = [a];
 
-    AnalysisResult result1 = await driver.getResult(a);
+    ResolvedUnitResult result1 = await driver.getResult(a);
     expect(driver.test.priorityResults, containsPair(a, result1));
 
     await waitForIdleWithoutExceptions();
@@ -676,14 +570,14 @@
 
     // Get the (cached) result, not reported to the stream.
     {
-      AnalysisResult result2 = await driver.getResult(a);
+      ResolvedUnitResult result2 = await driver.getResult(a);
       expect(result2, same(result1));
       expect(allResults, isEmpty);
     }
 
     // Get the (cached) result, reported to the stream.
     {
-      AnalysisResult result2 =
+      ResolvedUnitResult result2 =
           await driver.getResult(a, sendCachedToStream: true);
       expect(result2, same(result1));
 
@@ -693,28 +587,28 @@
   }
 
   test_cachedPriorityResults_flush_onAnyFileChange() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    provider.newFile(a, 'var a = 1;');
-    provider.newFile(a, 'var b = 2;');
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    newFile(a, content: 'var a = 1;');
+    newFile(a, content: 'var b = 2;');
 
     driver.priorityFiles = [a];
 
-    AnalysisResult result1 = await driver.getResult(a);
+    ResolvedUnitResult result1 = await driver.getResult(a);
     expect(driver.test.priorityResults, containsPair(a, result1));
 
     // Change a file.
     // The cache is flushed.
     driver.changeFile(a);
     expect(driver.test.priorityResults, isEmpty);
-    AnalysisResult result2 = await driver.getResult(a);
+    ResolvedUnitResult result2 = await driver.getResult(a);
     expect(driver.test.priorityResults, containsPair(a, result2));
 
     // Add a file.
     // The cache is flushed.
     driver.addFile(b);
     expect(driver.test.priorityResults, isEmpty);
-    AnalysisResult result3 = await driver.getResult(a);
+    ResolvedUnitResult result3 = await driver.getResult(a);
     expect(driver.test.priorityResults, containsPair(a, result3));
 
     // Remove a file.
@@ -724,14 +618,14 @@
   }
 
   test_cachedPriorityResults_flush_onPrioritySetChange() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    provider.newFile(a, 'var a = 1;');
-    provider.newFile(b, 'var b = 2;');
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    newFile(a, content: 'var a = 1;');
+    newFile(b, content: 'var b = 2;');
 
     driver.priorityFiles = [a];
 
-    AnalysisResult result1 = await driver.getResult(a);
+    ResolvedUnitResult result1 = await driver.getResult(a);
     expect(driver.test.priorityResults, hasLength(1));
     expect(driver.test.priorityResults, containsPair(a, result1));
 
@@ -742,7 +636,7 @@
     expect(driver.test.priorityResults, containsPair(a, result1));
 
     // Get the result for "b".
-    AnalysisResult result2 = await driver.getResult(b);
+    ResolvedUnitResult result2 = await driver.getResult(b);
     expect(driver.test.priorityResults, hasLength(2));
     expect(driver.test.priorityResults, containsPair(a, result1));
     expect(driver.test.priorityResults, containsPair(b, result2));
@@ -755,25 +649,25 @@
   }
 
   test_cachedPriorityResults_notPriority() async {
-    var a = _p('/test/bin/a.dart');
-    provider.newFile(a, 'var a = 1;');
+    var a = convertPath('/test/bin/a.dart');
+    newFile(a, content: 'var a = 1;');
 
-    AnalysisResult result1 = await driver.getResult(a);
+    ResolvedUnitResult result1 = await driver.getResult(a);
     expect(driver.test.priorityResults, isEmpty);
 
     // The file is not priority, so its result is not cached.
-    AnalysisResult result2 = await driver.getResult(a);
+    ResolvedUnitResult result2 = await driver.getResult(a);
     expect(result2, isNot(same(result1)));
   }
 
   test_changeFile_implicitlyAnalyzed() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: r'''
 import 'b.dart';
 var A = B;
 ''');
-    provider.newFile(b, 'var B = 1;');
+    newFile(b, content: 'var B = 1;');
 
     driver.priorityFiles = [a];
     driver.addFile(a);
@@ -782,13 +676,13 @@
     await waitForIdleWithoutExceptions();
     expect(allResults, hasLength(1));
     {
-      AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
+      ResolvedUnitResult ar = allResults.firstWhere((r) => r.path == a);
       expect(_getTopLevelVarType(ar.unit, 'A'), 'int');
     }
     allResults.clear();
 
     // Change "b" and notify.
-    provider.updateFile(b, 'var B = 1.2;');
+    modifyFile(b, 'var B = 1.2;');
     driver.changeFile(b);
 
     // "b" is not an added file, so it is not scheduled for analysis.
@@ -799,7 +693,7 @@
     await waitForIdleWithoutExceptions();
     expect(allResults, hasLength(1));
     {
-      AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
+      ResolvedUnitResult ar = allResults.firstWhere((r) => r.path == a);
       expect(_getTopLevelVarType(ar.unit, 'A'), 'double');
     }
   }
@@ -812,10 +706,10 @@
   }
 
   test_changeFile_notUsed() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/other/b.dart');
-    provider.newFile(a, '');
-    provider.newFile(b, 'class B1 {}');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/other/b.dart');
+    newFile(a);
+    newFile(b, content: 'class B1 {}');
 
     driver.addFile(a);
 
@@ -824,7 +718,7 @@
 
     // Change "b" and notify.
     // Nothing depends on "b", so nothing is analyzed.
-    provider.updateFile(b, 'class B2 {}');
+    modifyFile(b, 'class B2 {}');
     driver.changeFile(b);
     await waitForIdleWithoutExceptions();
     expect(allResults, isEmpty);
@@ -834,14 +728,14 @@
   }
 
   test_changeFile_selfConsistent() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: r'''
 import 'b.dart';
 var A1 = 1;
 var A2 = B1;
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 var B1 = A1;
 ''');
@@ -854,18 +748,18 @@
     // We have results for both "a" and "b".
     expect(allResults, hasLength(2));
     {
-      AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
+      ResolvedUnitResult ar = allResults.firstWhere((r) => r.path == a);
       expect(_getTopLevelVarType(ar.unit, 'A1'), 'int');
       expect(_getTopLevelVarType(ar.unit, 'A2'), 'int');
     }
     {
-      AnalysisResult br = allResults.firstWhere((r) => r.path == b);
+      ResolvedUnitResult br = allResults.firstWhere((r) => r.path == b);
       expect(_getTopLevelVarType(br.unit, 'B1'), 'int');
     }
 
     // Clear the results and update "a".
     allResults.clear();
-    provider.updateFile(a, r'''
+    modifyFile(a, r'''
 import 'b.dart';
 var A1 = 1.2;
 var A2 = B1;
@@ -877,12 +771,12 @@
     await waitForIdleWithoutExceptions();
     expect(allResults, hasLength(2));
     {
-      AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
+      ResolvedUnitResult ar = allResults.firstWhere((r) => r.path == a);
       expect(_getTopLevelVarType(ar.unit, 'A1'), 'double');
       expect(_getTopLevelVarType(ar.unit, 'A2'), 'double');
     }
     {
-      AnalysisResult br = allResults.firstWhere((r) => r.path == b);
+      ResolvedUnitResult br = allResults.firstWhere((r) => r.path == b);
       expect(_getTopLevelVarType(br.unit, 'B1'), 'double');
     }
   }
@@ -894,14 +788,14 @@
     {
       await waitForIdleWithoutExceptions();
       expect(allResults, hasLength(1));
-      AnalysisResult result = allResults[0];
+      ResolvedUnitResult result = allResults[0];
       expect(result.path, testFile);
       expect(_getTopLevelVarType(result.unit, 'V'), 'int');
     }
 
     // Update the file, but don't notify the driver.
     allResults.clear();
-    provider.updateFile(testFile, 'var V = 1.2;');
+    modifyFile(testFile, 'var V = 1.2;');
 
     // No new results.
     await pumpEventQueue();
@@ -917,7 +811,7 @@
     {
       await waitForIdleWithoutExceptions();
       expect(allResults, hasLength(1));
-      AnalysisResult result = allResults[0];
+      ResolvedUnitResult result = allResults[0];
       expect(result.path, testFile);
       expect(_getTopLevelVarType(result.unit, 'V'), 'double');
     }
@@ -1013,15 +907,15 @@
   test_const_implicitCreation() async {
     configurePreviewDart2();
 
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    newFile(a, content: r'''
 class C {
   const C();
   static const C WARNING = C();
 }
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 
 class D {
@@ -1032,16 +926,16 @@
 const c = C.WARNING;
 const d = D.WARNING;
 ''');
-    AnalysisResult result = await driver.getResult(b);
+    ResolvedUnitResult result = await driver.getResult(b);
     expect(result.errors, isEmpty);
   }
 
   test_const_implicitCreation_rewrite() async {
     configurePreviewDart2();
 
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    newFile(a, content: r'''
 class A {
   const A();
 }
@@ -1056,14 +950,14 @@
   const C();
 }
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 
 main() {
   const C();
 }
 ''');
-    AnalysisResult result = await driver.getResult(b);
+    ResolvedUnitResult result = await driver.getResult(b);
     expect(result.errors, isEmpty);
   }
 
@@ -1090,15 +984,15 @@
   }
 
   test_currentSession() async {
-    var a = _p('/a.dart');
+    var a = convertPath('/a.dart');
 
-    provider.newFile(a, 'var V = 1;');
+    newFile(a, content: 'var V = 1;');
     await driver.getResult(a);
 
     var session1 = driver.currentSession;
     expect(session1, isNotNull);
 
-    provider.updateFile(a, 'var V = 2;');
+    modifyFile(a, 'var V = 2;');
     driver.changeFile(a);
     await driver.getResult(a);
 
@@ -1110,19 +1004,19 @@
   }
 
   test_discoverAvailableFiles_packages() async {
-    var t = _p('/test/lib/test.dart');
-    var a1 = _p('/aaa/lib/a1.dart');
-    var a2 = _p('/aaa/lib/src/a2.dart');
-    var a3 = _p('/aaa/lib/a3.txt');
-    var b = _p('/bbb/lib/b.dart');
-    var c = _p('/ccc/lib/c.dart');
+    var t = convertPath('/test/lib/test.dart');
+    var a1 = convertPath('/aaa/lib/a1.dart');
+    var a2 = convertPath('/aaa/lib/src/a2.dart');
+    var a3 = convertPath('/aaa/lib/a3.txt');
+    var b = convertPath('/bbb/lib/b.dart');
+    var c = convertPath('/ccc/lib/c.dart');
 
-    provider.newFile(t, 'class T {}');
-    provider.newFile(a1, 'class A1 {}');
-    provider.newFile(a2, 'class A2 {}');
-    provider.newFile(a3, 'text');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, 'class C {}');
+    newFile(t, content: 'class T {}');
+    newFile(a1, content: 'class A1 {}');
+    newFile(a2, content: 'class A2 {}');
+    newFile(a3, content: 'text');
+    newFile(b, content: 'class B {}');
+    newFile(c, content: 'class C {}');
 
     driver.addFile(t);
     // Don't add a1.dart, a2.dart, or b.dart - they should be discovered.
@@ -1161,7 +1055,7 @@
 export 'foo.dart';
 ''');
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     List<AnalysisError> errors = result.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, CompileTimeErrorCode.URI_DOES_NOT_EXIST);
@@ -1172,7 +1066,7 @@
 import 'foo.dart';
 ''');
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     List<AnalysisError> errors = result.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, CompileTimeErrorCode.URI_DOES_NOT_EXIST);
@@ -1186,7 +1080,7 @@
 }
 ''', priority: true);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     List<AnalysisError> errors = result.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, CompileTimeErrorCode.URI_DOES_NOT_EXIST);
@@ -1198,19 +1092,19 @@
 part 'foo.dart';
 ''');
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     List<AnalysisError> errors = result.errors;
     expect(errors, hasLength(1));
     expect(errors[0].errorCode, CompileTimeErrorCode.URI_DOES_NOT_EXIST);
   }
 
   test_externalSummaries() async {
-    var a = _p('/a.dart');
-    var b = _p('/b.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/a.dart');
+    var b = convertPath('/b.dart');
+    newFile(a, content: r'''
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 var a = new A();
 ''');
@@ -1220,37 +1114,37 @@
         await createAnalysisDriver().test.getSummaryStore(a);
 
     // There are at least a.dart and dart:core libraries.
-    String aUri = provider.pathContext.toUri(a).toString();
+    String aUri = toUri(a).toString();
     expect(summaryStore.unlinkedMap.keys, contains(aUri));
     expect(summaryStore.linkedMap.keys, contains(aUri));
     expect(summaryStore.unlinkedMap.keys, contains('dart:core'));
     expect(summaryStore.linkedMap.keys, contains('dart:core'));
 
     // Remove a.dart from the file system.
-    provider.deleteFile(a);
+    deleteFile(a);
 
     // We don't need a.dart file when we analyze with the summary store.
     // Still no analysis errors.
     AnalysisDriver driver =
         createAnalysisDriver(externalSummaries: summaryStore);
-    AnalysisResult result = await driver.getResult(b);
+    ResolvedUnitResult result = await driver.getResult(b);
     expect(result.errors, isEmpty);
   }
 
   test_externalSummaries_partReuse() async {
-    var a = _p('/a.dart');
-    var b = _p('/b.dart');
-    var c = _p('/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/a.dart');
+    var b = convertPath('/b.dart');
+    var c = convertPath('/c.dart');
+    newFile(a, content: r'''
 library a;
 part 'b.dart';
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 part of a;
 class _B {}
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 library a;
 import 'a.dart';
 part 'b.dart';
@@ -1262,8 +1156,8 @@
     SummaryDataStore summaryStore =
         await createAnalysisDriver().test.getSummaryStore(a);
 
-    String aUri = provider.pathContext.toUri(a).toString();
-    String bUri = provider.pathContext.toUri(b).toString();
+    String aUri = toUri(a).toString();
+    String bUri = toUri(b).toString();
     // There are unlinked units for a.dart and b.dart files.
     expect(summaryStore.hasUnlinkedUnit(aUri), isTrue);
     expect(summaryStore.hasUnlinkedUnit(bUri), isTrue);
@@ -1273,28 +1167,28 @@
 
     // Remove a.dart from the file system.
     // Keep b.dart, because we (re)use it as a part.
-    provider.deleteFile(a);
+    deleteFile(a);
 
     // We don't need a.dart file when we analyze with the summary store.
     // We can instantiate the class A the library a.dart.
     // We can instantiate the class _A the part b.dart.
     AnalysisDriver driver =
         createAnalysisDriver(externalSummaries: summaryStore);
-    AnalysisResult result = await driver.getResult(c);
+    ResolvedUnitResult result = await driver.getResult(c);
     expect(result.errors, isEmpty);
   }
 
   test_generatedFile() async {
     Uri uri = Uri.parse('package:aaa/foo.dart');
-    String templatePath = _p('/aaa/lib/foo.dart');
-    String generatedPath = _p('/generated/aaa/lib/foo.dart');
+    String templatePath = convertPath('/aaa/lib/foo.dart');
+    String generatedPath = convertPath('/generated/aaa/lib/foo.dart');
 
-    provider.newFile(templatePath, r'''
+    newFile(templatePath, content: r'''
 a() {}
 b() {}
 ''');
 
-    provider.newFile(generatedPath, r'''
+    newFile(generatedPath, content: r'''
 aaa() {}
 bbb() {}
 ''');
@@ -1338,13 +1232,13 @@
   }
 
   test_getCachedResult() async {
-    var a = _p('/test/bin/a.dart');
-    provider.newFile(a, 'var a = 1;');
+    var a = convertPath('/test/bin/a.dart');
+    newFile(a, content: 'var a = 1;');
 
     expect(driver.getCachedResult(a), isNull);
 
     driver.priorityFiles = [a];
-    AnalysisResult result = await driver.getResult(a);
+    ResolvedUnitResult result = await driver.getResult(a);
 
     expect(driver.getCachedResult(a), same(result));
   }
@@ -1367,15 +1261,15 @@
   }
 
   test_getFilesDefiningClassMemberName_class() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    var c = _p('/test/bin/c.dart');
-    var d = _p('/test/bin/d.dart');
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    var c = convertPath('/test/bin/c.dart');
+    var d = convertPath('/test/bin/d.dart');
 
-    provider.newFile(a, 'class A { m1() {} }');
-    provider.newFile(b, 'class B { m2() {} }');
-    provider.newFile(c, 'class C { m2() {} }');
-    provider.newFile(d, 'class D { m3() {} }');
+    newFile(a, content: 'class A { m1() {} }');
+    newFile(b, content: 'class B { m2() {} }');
+    newFile(c, content: 'class C { m2() {} }');
+    newFile(d, content: 'class D { m3() {} }');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -1393,15 +1287,15 @@
   }
 
   test_getFilesDefiningClassMemberName_mixin() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    var c = _p('/test/bin/c.dart');
-    var d = _p('/test/bin/d.dart');
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    var c = convertPath('/test/bin/c.dart');
+    var d = convertPath('/test/bin/d.dart');
 
-    provider.newFile(a, 'mixin A { m1() {} }');
-    provider.newFile(b, 'mixin B { m2() {} }');
-    provider.newFile(c, 'mixin C { m2() {} }');
-    provider.newFile(d, 'mixin D { m3() {} }');
+    newFile(a, content: 'mixin A { m1() {} }');
+    newFile(b, content: 'mixin B { m2() {} }');
+    newFile(c, content: 'mixin C { m2() {} }');
+    newFile(d, content: 'mixin D { m3() {} }');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -1419,17 +1313,17 @@
   }
 
   test_getFilesReferencingName() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    var c = _p('/test/bin/c.dart');
-    var d = _p('/test/bin/d.dart');
-    var e = _p('/test/bin/e.dart');
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    var c = convertPath('/test/bin/c.dart');
+    var d = convertPath('/test/bin/d.dart');
+    var e = convertPath('/test/bin/e.dart');
 
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, "import 'a.dart'; A a;");
-    provider.newFile(c, "import 'a.dart'; var a = new A();");
-    provider.newFile(d, "class A{} A a;");
-    provider.newFile(e, "import 'a.dart'; main() {}");
+    newFile(a, content: 'class A {}');
+    newFile(b, content: "import 'a.dart'; A a;");
+    newFile(c, content: "import 'a.dart'; var a = new A();");
+    newFile(d, content: "class A{} A a;");
+    newFile(e, content: "import 'a.dart'; main() {}");
 
     driver.addFile(a);
     driver.addFile(b);
@@ -1450,15 +1344,15 @@
   }
 
   test_getFilesReferencingName_discover() async {
-    var t = _p('/test/lib/test.dart');
-    var a = _p('/aaa/lib/a.dart');
-    var b = _p('/bbb/lib/b.dart');
-    var c = _p('/ccc/lib/c.dart');
+    var t = convertPath('/test/lib/test.dart');
+    var a = convertPath('/aaa/lib/a.dart');
+    var b = convertPath('/bbb/lib/b.dart');
+    var c = convertPath('/ccc/lib/c.dart');
 
-    provider.newFile(t, 'int t;');
-    provider.newFile(a, 'int a;');
-    provider.newFile(b, 'int b;');
-    provider.newFile(c, 'int c;');
+    newFile(t, content: 'int t;');
+    newFile(a, content: 'int a;');
+    newFile(b, content: 'int b;');
+    newFile(c, content: 'int c;');
 
     driver.addFile(t);
 
@@ -1470,8 +1364,8 @@
   }
 
   test_getFileSync_library() async {
-    var path = _p('/test/lib/a.dart');
-    provider.newFile(path, '');
+    var path = convertPath('/test/lib/a.dart');
+    newFile(path);
     var file = driver.getFileSync(path);
     expect(file.path, path);
     expect(file.uri.toString(), 'package:test/a.dart');
@@ -1486,8 +1380,8 @@
   }
 
   test_getFileSync_part() async {
-    var path = _p('/test/lib/a.dart');
-    provider.newFile(path, 'part of lib;');
+    var path = convertPath('/test/lib/a.dart');
+    newFile(path, content: 'part of lib;');
     var file = driver.getFileSync(path);
     expect(file.path, path);
     expect(file.uri.toString(), 'package:test/a.dart');
@@ -1518,29 +1412,86 @@
     } on ArgumentError {}
   }
 
-  test_getLibraryByUri_external_resynthesize() async {
-    provider.newFile(testFile, r'''
-class Test {}
+  test_getLibraryByUri() async {
+    var a = '/test/lib/a.dart';
+    var b = '/test/lib/b.dart';
+
+    String aUriStr = 'package:test/a.dart';
+    String bUriStr = 'package:test/b.dart';
+
+    newFile(a, content: r'''
+part 'b.dart';
+
+class A {}
+''');
+
+    newFile(b, content: r'''
+part of 'a.dart';
+
+class B {}
+''');
+
+    var library = await driver.getLibraryByUri(aUriStr);
+    expect(library.getType('A'), isNotNull);
+    expect(library.getType('B'), isNotNull);
+
+    // It is an error to ask for a library when we know that it is a part.
+    expect(() async {
+      await driver.getLibraryByUri(bUriStr);
+    }, throwsArgumentError);
+  }
+
+  test_getLibraryByUri_external() async {
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+
+    String aUriStr = 'package:test/a.dart';
+    String bUriStr = 'package:test/b.dart';
+
+    newFile(a, content: r'''
+part 'b.dart';
+
+class A {}
+''');
+
+    newFile(b, content: r'''
+part of 'a.dart';
+
+class B {}
 ''');
 
     // Prepare the store with package:test/test.dart URI.
-    SummaryDataStore summaryStore =
-        await createAnalysisDriver().test.getSummaryStore(testFile);
+    var store = await createAnalysisDriver().test.getSummaryStore(a);
 
     // package:test/test.dart is in the store.
-    String uri = 'package:test/test.dart';
-    expect(summaryStore.unlinkedMap.keys, contains(uri));
-    expect(summaryStore.linkedMap.keys, contains(uri));
+    expect(store.unlinkedMap.keys, contains(aUriStr));
+    expect(store.unlinkedMap.keys, contains(bUriStr));
+    expect(store.linkedMap.keys, contains(aUriStr));
+    expect(store.linkedMap.keys, isNot(contains(bUriStr)));
 
-    // Remove the file from the file system.
-    provider.deleteFile(testFile);
+    // Remove the files from the file system.
+    deleteFile(a);
+    deleteFile(b);
 
-    // We can resynthesize the library from the store without reading the file.
-    AnalysisDriver driver =
-        createAnalysisDriver(externalSummaries: summaryStore);
-    expect(driver.test.numOfCreatedLibraryContexts, 0);
-    LibraryElement library = await driver.getLibraryByUri(uri);
-    expect(library.getType('Test'), isNotNull);
+    // We can resynthesize the library from the store.
+    var driver = createAnalysisDriver(externalSummaries: store);
+
+    // Ask by URI, so we get the "external" FileState.
+    var aUri = Uri.parse(aUriStr);
+    var aFile = driver.fsState.getFileForUri(aUri);
+    expect(aFile.uri, aUri);
+    expect(aFile.path, isNull);
+
+    // We still can resynthesize the library.
+    // The URI is known to be external, so we don't talk to the file.
+    var library = await driver.getLibraryByUri(aUriStr);
+    expect(library.getType('A'), isNotNull);
+    expect(library.getType('B'), isNotNull);
+
+    // It is an error to ask for a library when we know that it is a part.
+    expect(() async {
+      await driver.getLibraryByUri(bUriStr);
+    }, throwsArgumentError);
   }
 
   test_getLibraryByUri_sdk_analyze() async {
@@ -1551,11 +1502,9 @@
   }
 
   test_getLibraryByUri_sdk_resynthesize() async {
-    SummaryDataStore sdkStore;
-    {
-      String corePath = sdk.mapDartUri('dart:core').fullName;
-      sdkStore = await createAnalysisDriver().test.getSummaryStore(corePath);
-    }
+    String corePath = sdk.mapDartUri('dart:core').fullName;
+    String asyncPath = sdk.mapDartUri('dart:async').fullName;
+    var sdkStore = await createAnalysisDriver().test.getSummaryStore(corePath);
 
     // There are dart:core and dart:async in the store.
     expect(sdkStore.unlinkedMap.keys, contains('dart:core'));
@@ -1563,25 +1512,109 @@
     expect(sdkStore.linkedMap.keys, contains('dart:core'));
     expect(sdkStore.linkedMap.keys, contains('dart:async'));
 
-    // We don't create new library context (so, don't parse, summarize and
-    // link) for dart:core. The library is resynthesized from the provided
-    // external store.
+    // Remove dart:core and dart:async.
+    // So, the new driver below cannot parse and summarize them.
+    deleteFile(corePath);
+    deleteFile(asyncPath);
+
+    // We still get get dart:core library element.
     AnalysisDriver driver = createAnalysisDriver(externalSummaries: sdkStore);
     LibraryElement coreLibrary = await driver.getLibraryByUri('dart:core');
-    expect(driver.test.numOfCreatedLibraryContexts, 0);
     expect(coreLibrary, isNotNull);
     expect(coreLibrary.getType('Object'), isNotNull);
   }
 
-  test_getResolvedLibrary_external() async {
-    var a1 = _p('/aaa/lib/a1.dart');
-    var a2 = _p('/aaa/lib/a2.dart');
+  test_getParsedLibrary_external() async {
+    var a1 = convertPath('/aaa/lib/a1.dart');
+    var a2 = convertPath('/aaa/lib/a2.dart');
 
     var a1UriStr = 'package:aaa/a1.dart';
     var a2UriStr = 'package:aaa/a2.dart';
 
-    provider.newFile(a1, "part 'a2.dart';  class A {}");
-    provider.newFile(a2, "part of 'a1.dart';");
+    newFile(a1, content: "part 'a2.dart';  class A {}");
+    newFile(a2, content: "part of 'a1.dart';");
+
+    // Build the store with the library.
+    var store = await createAnalysisDriver().test.getSummaryStore(a1);
+    expect(store.unlinkedMap.keys, contains(a1UriStr));
+    expect(store.unlinkedMap.keys, contains(a2UriStr));
+    expect(store.linkedMap.keys, contains(a1UriStr));
+
+    var driver = createAnalysisDriver(externalSummaries: store);
+    var libraryElement = await driver.getLibraryByUri(a1UriStr);
+    var classA = libraryElement.library.getType('A');
+
+    var parsedLibrary = driver.getParsedLibrary(a1);
+    expect(parsedLibrary, isNotNull);
+    expect(parsedLibrary.state, ResultState.NOT_A_FILE);
+    expect(() {
+      parsedLibrary.getElementDeclaration(classA);
+    }, throwsStateError);
+
+    // It is an error to ask for a library when we know that it is a part.
+    expect(() {
+      driver.getParsedLibrary(a2);
+    }, throwsArgumentError);
+  }
+
+  test_getParsedLibraryByUri_external() async {
+    var a1 = convertPath('/aaa/lib/a1.dart');
+    var a2 = convertPath('/aaa/lib/a2.dart');
+
+    var a1UriStr = 'package:aaa/a1.dart';
+    var a2UriStr = 'package:aaa/a2.dart';
+
+    var a1Uri = Uri.parse(a1UriStr);
+    var a2Uri = Uri.parse(a2UriStr);
+
+    newFile(a1, content: "part 'a2.dart';  class A {}");
+    newFile(a2, content: "part of 'a1.dart';");
+
+    // Build the store with the library.
+    var store = await createAnalysisDriver().test.getSummaryStore(a1);
+    expect(store.unlinkedMap.keys, contains(a1UriStr));
+    expect(store.unlinkedMap.keys, contains(a2UriStr));
+    expect(store.linkedMap.keys, contains(a1UriStr));
+
+    var driver = createAnalysisDriver(externalSummaries: store);
+    var libraryElement = await driver.getLibraryByUri(a1UriStr);
+    var classA = libraryElement.library.getType('A');
+
+    {
+      var parsedLibrary = driver.getParsedLibraryByUri(a1Uri);
+      expect(parsedLibrary, isNotNull);
+      expect(parsedLibrary.state, ResultState.NOT_A_FILE);
+      expect(() {
+        parsedLibrary.getElementDeclaration(classA);
+      }, throwsStateError);
+    }
+
+    // We can also get the result from the session.
+    {
+      var session = driver.currentSession;
+      var parsedLibrary = session.getParsedLibraryByElement(libraryElement);
+      expect(parsedLibrary, isNotNull);
+      expect(parsedLibrary.state, ResultState.NOT_A_FILE);
+      expect(() {
+        parsedLibrary.getElementDeclaration(classA);
+      }, throwsStateError);
+    }
+
+    // It is an error to ask for a library when we know that it is a part.
+    expect(() {
+      driver.getParsedLibraryByUri(a2Uri);
+    }, throwsArgumentError);
+  }
+
+  test_getResolvedLibrary_external() async {
+    var a1 = convertPath('/aaa/lib/a1.dart');
+    var a2 = convertPath('/aaa/lib/a2.dart');
+
+    var a1UriStr = 'package:aaa/a1.dart';
+    var a2UriStr = 'package:aaa/a2.dart';
+
+    newFile(a1, content: "part 'a2.dart';  class A {}");
+    newFile(a2, content: "part of 'a1.dart';");
 
     // Build the store with the library.
     var store = await createAnalysisDriver().test.getSummaryStore(a1);
@@ -1595,7 +1628,7 @@
 
     var resolvedLibrary = await driver.getResolvedLibrary(a1);
     expect(resolvedLibrary, isNotNull);
-    expect(resolvedLibrary.state, results.ResultState.NOT_A_FILE);
+    expect(resolvedLibrary.state, ResultState.NOT_A_FILE);
     expect(() {
       resolvedLibrary.getElementDeclaration(classA);
     }, throwsStateError);
@@ -1607,8 +1640,8 @@
   }
 
   test_getResolvedLibraryByUri_external() async {
-    var a1 = _p('/aaa/lib/a1.dart');
-    var a2 = _p('/aaa/lib/a2.dart');
+    var a1 = convertPath('/aaa/lib/a1.dart');
+    var a2 = convertPath('/aaa/lib/a2.dart');
 
     var a1UriStr = 'package:aaa/a1.dart';
     var a2UriStr = 'package:aaa/a2.dart';
@@ -1616,8 +1649,8 @@
     var a1Uri = Uri.parse(a1UriStr);
     var a2Uri = Uri.parse(a2UriStr);
 
-    provider.newFile(a1, "part 'a2.dart';  class A {}");
-    provider.newFile(a2, "part of 'a1.dart';");
+    newFile(a1, content: "part 'a2.dart';  class A {}");
+    newFile(a2, content: "part of 'a1.dart';");
 
     // Build the store with the library.
     var store = await createAnalysisDriver().test.getSummaryStore(a1);
@@ -1632,7 +1665,7 @@
     {
       var resolvedLibrary = await driver.getResolvedLibraryByUri(a1Uri);
       expect(resolvedLibrary, isNotNull);
-      expect(resolvedLibrary.state, results.ResultState.NOT_A_FILE);
+      expect(resolvedLibrary.state, ResultState.NOT_A_FILE);
       expect(() {
         resolvedLibrary.getElementDeclaration(classA);
       }, throwsStateError);
@@ -1644,7 +1677,7 @@
       var resolvedLibrary =
           await session.getResolvedLibraryByElement(libraryElement);
       expect(resolvedLibrary, isNotNull);
-      expect(resolvedLibrary.state, results.ResultState.NOT_A_FILE);
+      expect(resolvedLibrary.state, ResultState.NOT_A_FILE);
       expect(() {
         resolvedLibrary.getElementDeclaration(classA);
       }, throwsStateError);
@@ -1660,10 +1693,10 @@
     String content = 'int f() => 42;';
     addTestFile(content, priority: true);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(result.path, testFile);
     expect(result.uri.toString(), 'package:test/test.dart');
-    expect(result.exists, isTrue);
+    expect(result.state, ResultState.VALID);
     expect(result.content, content);
     expect(result.unit, isNotNull);
     expect(result.errors, hasLength(0));
@@ -1678,10 +1711,10 @@
   }
 
   test_getResult_constants_defaultParameterValue_localFunction() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    provider.newFile(a, 'const C = 42;');
-    provider.newFile(b, r'''
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    newFile(a, content: 'const C = 42;');
+    newFile(b, content: r'''
 import 'a.dart';
 main() {
   foo({int p: C}) {}
@@ -1692,17 +1725,17 @@
     driver.addFile(b);
     await waitForIdleWithoutExceptions();
 
-    AnalysisResult result = await driver.getResult(b);
+    ResolvedUnitResult result = await driver.getResult(b);
     expect(result.errors, isEmpty);
   }
 
   test_getResult_doesNotExist() async {
-    var a = _p('/test/lib/a.dart');
+    var a = convertPath('/test/lib/a.dart');
 
-    AnalysisResult result = await driver.getResult(a);
+    ResolvedUnitResult result = await driver.getResult(a);
     expect(result.path, a);
     expect(result.uri.toString(), 'package:test/a.dart');
-    expect(result.exists, isFalse);
+    expect(result.state, ResultState.NOT_A_FILE);
     expect(result.content, '');
   }
 
@@ -1710,7 +1743,7 @@
     String content = 'main() { int vv; }';
     addTestFile(content, priority: true);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(result.path, testFile);
     expect(result.errors, hasLength(1));
     {
@@ -1723,23 +1756,6 @@
     }
   }
 
-  test_getResult_fileContentOverlay_throughAnalysisContext() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-
-    provider.newFile(a, 'import "b.dart";');
-    provider.newFile(b, 'var v = 1;');
-    contentOverlay[b] = 'var v = 2;';
-
-    var result = await driver.getResult(a);
-
-    // The content that was set into the overlay for "b" should be visible
-    // through the AnalysisContext that was used to analyze "a".
-    CompilationUnitElement unitA = result.unit.declaredElement;
-    Source sourceB = unitA.library.imports[0].importedLibrary.source;
-    expect(unitA.context.getContents(sourceB).data, 'var v = 2;');
-  }
-
   test_getResult_functionTypeFormalParameter_withTypeParameter() async {
     // This was code crashing because of incomplete implementation.
     // Consider (re)moving after fixing dartbug.com/28515
@@ -1750,7 +1766,7 @@
 class B {}
 ''');
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(result.path, testFile);
   }
 
@@ -1767,10 +1783,10 @@
   }
 
   test_getResult_importLibrary_thenRemoveIt() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: r'''
 import 'a.dart';
 class B extends A {}
 ''');
@@ -1781,17 +1797,17 @@
 
     // No errors in b.dart
     {
-      AnalysisResult result = await driver.getResult(b);
+      ResolvedUnitResult result = await driver.getResult(b);
       expect(result.errors, isEmpty);
     }
 
     // Remove a.dart and reanalyze.
-    provider.deleteFile(a);
+    deleteFile(a);
     driver.removeFile(a);
 
     // The unresolved URI error must be reported.
     {
-      AnalysisResult result = await driver.getResult(b);
+      ResolvedUnitResult result = await driver.getResult(b);
       expect(
           result.errors,
           contains(predicate((AnalysisError e) =>
@@ -1799,12 +1815,12 @@
     }
 
     // Restore a.dart and reanalyze.
-    provider.newFile(a, 'class A {}');
+    newFile(a, content: 'class A {}');
     driver.addFile(a);
 
     // No errors in b.dart again.
     {
-      AnalysisResult result = await driver.getResult(b);
+      ResolvedUnitResult result = await driver.getResult(b);
       expect(result.errors, isEmpty);
     }
   }
@@ -1817,7 +1833,7 @@
 ''', priority: true);
     await waitForIdleWithoutExceptions();
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(_getClassFieldType(result.unit, 'C', 'f'), 'int');
   }
 
@@ -1832,7 +1848,7 @@
 ''', priority: true);
     await waitForIdleWithoutExceptions();
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(_getClassMethodReturnType(result.unit, 'A', 'm'), 'int');
     expect(_getClassMethodReturnType(result.unit, 'B', 'm'), 'int');
   }
@@ -1845,7 +1861,7 @@
 class C {}
 ''', priority: true);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     ClassDeclaration c = result.unit.declarations[1] as ClassDeclaration;
     Annotation a = c.metadata[0];
     expect(a.name.name, 'fff');
@@ -1872,7 +1888,7 @@
 ''';
     addTestFile(content);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(result.path, testFile);
   }
 
@@ -1884,7 +1900,7 @@
 ''';
     addTestFile(content, priority: true);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(result.path, testFile);
     // Has only exports for valid URIs.
     List<ExportElement> imports = resolutionMap
@@ -1904,7 +1920,7 @@
 ''';
     addTestFile(content, priority: true);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     expect(result.path, testFile);
     // Has only imports for valid URIs.
     List<ImportElement> imports = resolutionMap
@@ -1932,23 +1948,23 @@
   }
 
   test_getResult_mix_fileAndPackageUris() async {
-    var a = _p('/test/bin/a.dart');
-    var b = _p('/test/bin/b.dart');
-    var c = _p('/test/lib/c.dart');
-    var d = _p('/test/test/d.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/bin/a.dart');
+    var b = convertPath('/test/bin/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    var d = convertPath('/test/test/d.dart');
+    newFile(a, content: r'''
 import 'package:test/c.dart';
 int x = y;
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import '../lib/c.dart';
 int x = y;
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 import '../test/d.dart';
 var y = z;
 ''');
-    provider.newFile(d, r'''
+    newFile(d, content: r'''
 String z = "string";
 ''');
 
@@ -1962,7 +1978,7 @@
     // package:my_pkg/c.dart's import is erroneous, causing y's reference to z
     // to be unresolved (and therefore have type dynamic).
     {
-      AnalysisResult result = await driver.getResult(a);
+      ResolvedUnitResult result = await driver.getResult(a);
       expect(result.errors, isEmpty);
     }
 
@@ -1972,7 +1988,7 @@
     // successfully imports file:///my_pkg/test/d.dart, causing y to have an
     // inferred type of String.
     {
-      AnalysisResult result = await driver.getResult(b);
+      ResolvedUnitResult result = await driver.getResult(b);
       List<AnalysisError> errors = result.errors;
       expect(errors, hasLength(1));
       expect(errors[0].errorCode, StaticTypeWarningCode.INVALID_ASSIGNMENT);
@@ -2011,10 +2027,10 @@
   }
 
   test_getResult_notDartFile() async {
-    var path = _p('/test/lib/test.txt');
-    provider.newFile(path, 'class A {}');
+    var path = convertPath('/test/lib/test.txt');
+    newFile(path, content: 'class A {}');
 
-    AnalysisResult result = await driver.getResult(path);
+    ResolvedUnitResult result = await driver.getResult(path);
     expect(result, isNotNull);
     expect(result.unit.declaredElement.types.map((e) => e.name), ['A']);
   }
@@ -2030,15 +2046,15 @@
   }
 
   test_getResult_sameFile_twoUris() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/test/c.dart');
-    provider.newFile(a, 'class A<T> {}');
-    provider.newFile(b, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/test/c.dart');
+    newFile(a, content: 'class A<T> {}');
+    newFile(b, content: r'''
 import 'a.dart';
 var VB = new A<int>();
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 import '../lib/a.dart';
 var VC = new A<double>();
 ''');
@@ -2048,29 +2064,31 @@
     await waitForIdleWithoutExceptions();
 
     {
-      AnalysisResult result = await driver.getResult(b);
+      ResolvedUnitResult result = await driver.getResult(b);
       expect(_getImportSource(result.unit, 0).uri.toString(),
           'package:test/a.dart');
       expect(_getTopLevelVarType(result.unit, 'VB'), 'A<int>');
     }
 
     {
-      AnalysisResult result = await driver.getResult(c);
-      expect(_getImportSource(result.unit, 0).uri,
-          provider.pathContext.toUri(_p('/test/lib/a.dart')));
+      ResolvedUnitResult result = await driver.getResult(c);
+      expect(
+        _getImportSource(result.unit, 0).uri,
+        toUri(convertPath('/test/lib/a.dart')),
+      );
       expect(_getTopLevelVarType(result.unit, 'VC'), 'A<double>');
     }
   }
 
   test_getResult_selfConsistent() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: r'''
 import 'b.dart';
 var A1 = 1;
 var A2 = B1;
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 var B1 = A1;
 ''');
@@ -2080,7 +2098,7 @@
     await waitForIdleWithoutExceptions();
 
     {
-      AnalysisResult result = await driver.getResult(a);
+      ResolvedUnitResult result = await driver.getResult(a);
       expect(_getTopLevelVarType(result.unit, 'A1'), 'int');
       expect(_getTopLevelVarType(result.unit, 'A2'), 'int');
     }
@@ -2092,7 +2110,7 @@
     // That's because we check for "a" API signature consistency, and because
     // it has changed, we invalidated the dependency cache, relinked libraries
     // and recomputed types.
-    provider.updateFile(a, r'''
+    modifyFile(a, r'''
 import 'b.dart';
 var A1 = 1.2;
 var A2 = B1;
@@ -2100,7 +2118,7 @@
     driver.changeFile(a);
 
     {
-      AnalysisResult result = await driver.getResult(a);
+      ResolvedUnitResult result = await driver.getResult(a);
       expect(_getTopLevelVarType(result.unit, 'A1'), 'double');
       expect(_getTopLevelVarType(result.unit, 'A2'), 'double');
     }
@@ -2109,10 +2127,10 @@
   test_getResult_thenRemove() async {
     addTestFile('main() {}', priority: true);
 
-    Future<AnalysisResult> resultFuture = driver.getResult(testFile);
+    Future<ResolvedUnitResult> resultFuture = driver.getResult(testFile);
     driver.removeFile(testFile);
 
-    AnalysisResult result = await resultFuture;
+    ResolvedUnitResult result = await resultFuture;
     expect(result, isNotNull);
     expect(result.path, testFile);
     expect(result.unit, isNotNull);
@@ -2122,20 +2140,20 @@
     String content = 'main() {}';
     addTestFile(content, priority: true);
 
-    Future<AnalysisResult> future1 = driver.getResult(testFile);
-    Future<AnalysisResult> future2 = driver.getResult(testFile);
+    Future<ResolvedUnitResult> future1 = driver.getResult(testFile);
+    Future<ResolvedUnitResult> future2 = driver.getResult(testFile);
 
     // Both futures complete, with the same result.
-    AnalysisResult result1 = await future1;
-    AnalysisResult result2 = await future2;
+    ResolvedUnitResult result1 = await future1;
+    ResolvedUnitResult result2 = await future2;
     expect(result2, same(result1));
     expect(result1.path, testFile);
     expect(result1.unit, isNotNull);
   }
 
   test_getSourceKind_library() async {
-    var path = _p('/test/lib/test.dart');
-    provider.newFile(path, 'class A {}');
+    var path = convertPath('/test/lib/test.dart');
+    newFile(path, content: 'class A {}');
     expect(await driver.getSourceKind(path), SourceKind.LIBRARY);
   }
 
@@ -2147,27 +2165,27 @@
   }
 
   test_getSourceKind_notDartFile() async {
-    var path = _p('/test/lib/test.txt');
-    provider.newFile(path, 'class A {}');
+    var path = convertPath('/test/lib/test.txt');
+    newFile(path, content: 'class A {}');
     expect(await driver.getSourceKind(path), isNull);
   }
 
   test_getSourceKind_part() async {
-    var path = _p('/test/lib/test.dart');
-    provider.newFile(path, 'part of lib; class A {}');
+    var path = convertPath('/test/lib/test.dart');
+    newFile(path, content: 'part of lib; class A {}');
     expect(await driver.getSourceKind(path), SourceKind.PART);
   }
 
   test_getTopLevelNameDeclarations() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    var d = _p('/test/lib/d.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    var d = convertPath('/test/lib/d.dart');
 
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'export "a.dart"; class B {}');
-    provider.newFile(c, 'import "d.dart"; class C {}');
-    provider.newFile(d, 'class D {}');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'export "a.dart"; class B {}');
+    newFile(c, content: 'import "d.dart"; class C {}');
+    newFile(d, content: 'class D {}');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -2191,17 +2209,17 @@
   }
 
   test_getTopLevelNameDeclarations_discover() async {
-    var t = _p('/test/lib/test.dart');
-    var a1 = _p('/aaa/lib/a1.dart');
-    var a2 = _p('/aaa/lib/src/a2.dart');
-    var b = _p('/bbb/lib/b.dart');
-    var c = _p('/ccc/lib/c.dart');
+    var t = convertPath('/test/lib/test.dart');
+    var a1 = convertPath('/aaa/lib/a1.dart');
+    var a2 = convertPath('/aaa/lib/src/a2.dart');
+    var b = convertPath('/bbb/lib/b.dart');
+    var c = convertPath('/ccc/lib/c.dart');
 
-    provider.newFile(t, 'class T {}');
-    provider.newFile(a1, 'class A1 {}');
-    provider.newFile(a2, 'class A2 {}');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, 'class C {}');
+    newFile(t, content: 'class T {}');
+    newFile(a1, content: 'class A1 {}');
+    newFile(a2, content: 'class A2 {}');
+    newFile(b, content: 'class B {}');
+    newFile(c, content: 'class C {}');
 
     driver.addFile(t);
     // Don't add a1.dart, a2.dart, or b.dart - they should be discovered.
@@ -2224,18 +2242,18 @@
   }
 
   test_getTopLevelNameDeclarations_parts() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
 
-    provider.newFile(a, r'''
+    newFile(a, content: r'''
 library lib;
 part 'b.dart';
 part 'c.dart';
 class A {}
 ''');
-    provider.newFile(b, 'part of lib; class B {}');
-    provider.newFile(c, 'part of lib; class C {}');
+    newFile(b, content: 'part of lib; class B {}');
+    newFile(c, content: 'part of lib; class C {}');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -2271,6 +2289,18 @@
         unorderedEquals(['foo', 'main']));
   }
 
+  test_getUnitElement_doesNotExist_afterResynthesized() async {
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+
+    newFile(a, content: r'''
+import 'package:test/b.dart';
+''');
+
+    await driver.getResolvedLibrary(a);
+    await driver.getUnitElement(b);
+  }
+
   test_getUnitElement_notAbsolutePath() async {
     try {
       await driver.getUnitElement('not_absolute.dart');
@@ -2279,17 +2309,17 @@
   }
 
   test_getUnitElement_notDart() async {
-    var path = _p('/test.txt');
-    provider.newFile(path, 'class A {}');
+    var path = convertPath('/test.txt');
+    newFile(path, content: 'class A {}');
     UnitElementResult unitResult = await driver.getUnitElement(path);
     expect(unitResult, isNotNull);
     expect(unitResult.element.types.map((e) => e.name), ['A']);
   }
 
   test_getUnitElementSignature() async {
-    var a = _p('/test/lib/a.dart');
+    var a = convertPath('/test/lib/a.dart');
 
-    provider.newFile(a, 'foo() {}');
+    newFile(a, content: 'foo() {}');
 
     String signature = await driver.getUnitElementSignature(a);
     expect(signature, isNotNull);
@@ -2298,7 +2328,7 @@
     expect(unitResult.path, a);
     expect(unitResult.signature, signature);
 
-    provider.updateFile(a, 'bar() {}');
+    modifyFile(a, 'bar() {}');
     driver.changeFile(a);
 
     String signature2 = await driver.getUnitElementSignature(a);
@@ -2307,11 +2337,19 @@
   }
 
   test_hasFilesToAnalyze() async {
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+
     // No files yet, nothing to analyze.
     expect(driver.hasFilesToAnalyze, isFalse);
 
     // Add a new file, it should be analyzed.
-    addTestFile('main() {}', priority: false);
+    newFile(a, content: r'''
+import 'b.dart';
+main() {}
+''');
+    driver.addFile(a);
     expect(driver.hasFilesToAnalyze, isTrue);
 
     // Wait for idle, nothing to do.
@@ -2319,36 +2357,42 @@
     expect(driver.hasFilesToAnalyze, isFalse);
 
     // Ask to analyze the file, so there is a file to analyze.
-    Future<AnalysisResult> future = driver.getResult(testFile);
+    Future<ResolvedUnitResult> future = driver.getResult(a);
     expect(driver.hasFilesToAnalyze, isTrue);
 
     // Once analysis is done, there is nothing to analyze.
     await future;
     expect(driver.hasFilesToAnalyze, isFalse);
 
-    // Change a file, even if not added, it still might affect analysis.
-    driver.changeFile(_p('/not/added.dart'));
+    // Change a file that is not added, but referenced, so known.
+    driver.changeFile(b);
     expect(driver.hasFilesToAnalyze, isTrue);
     await waitForIdleWithoutExceptions();
     expect(driver.hasFilesToAnalyze, isFalse);
 
+    // Change a file that is not known - neither added, nor referenced.
+    driver.changeFile(c);
+    expect(driver.hasFilesToAnalyze, isFalse);
+    await waitForIdleWithoutExceptions();
+    expect(driver.hasFilesToAnalyze, isFalse);
+
     // Request of referenced names is not analysis of a file.
     driver.getFilesReferencingName('X');
     expect(driver.hasFilesToAnalyze, isFalse);
   }
 
   test_hermetic_modifyLibraryFile_resolvePart() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
 
-    provider.newFile(a, r'''
+    newFile(a, content: r'''
 library a;
 part 'b.dart';
 class C {
   int foo;
 }
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 part of a;
 var c = new C();
 ''');
@@ -2360,7 +2404,7 @@
 
     // Modify the library, but don't notify the driver.
     // The driver should use the previous library content and elements.
-    provider.newFile(a, r'''
+    newFile(a, content: r'''
 library a;
 part 'b.dart';
 class C {
@@ -2377,8 +2421,8 @@
   }
 
   test_hermetic_overlayOnly_part() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
     contentOverlay[a] = r'''
 library a;
 part 'b.dart';
@@ -2390,14 +2434,14 @@
     driver.addFile(a);
     driver.addFile(b);
 
-    AnalysisResult result = await driver.getResult(a);
+    ResolvedUnitResult result = await driver.getResult(a);
     expect(result.errors, isEmpty);
     expect(_getTopLevelVarType(result.unit, 'b'), 'B');
   }
 
   test_instantiateToBounds_invalid() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    newFile(a, content: r'''
 class A<T extends B> {}
 class B<T extends A<B>> {}
 ''');
@@ -2407,30 +2451,31 @@
   }
 
   test_isLibraryByUri() async {
-    var a1 = _p('/aaa/lib/a1.dart');
-    var a2 = _p('/aaa/lib/a2.dart');
-    var b1 = _p('/bbb/lib/b1.dart');
-    var b2 = _p('/bbb/lib/b2.dart');
+    var a1 = '/aaa/lib/a1.dart';
+    var a2 = '/aaa/lib/a2.dart';
+    var b1 = '/bbb/lib/b1.dart';
+    var b2 = '/bbb/lib/b2.dart';
 
     String a1UriStr = 'package:aaa/a1.dart';
     String a2UriStr = 'package:aaa/a2.dart';
     String b1UriStr = 'package:bbb/b1.dart';
     String b2UriStr = 'package:bbb/b2.dart';
 
-    provider.newFile(a1, "part 'a2.dart';");
-    provider.newFile(a2, "part of 'a1.dart';");
-    provider.newFile(b1, "part 'b2.dart';");
-    provider.newFile(b2, "part of 'b1.dart';");
+    newFile(a1, content: "part 'a2.dart';");
+    newFile(a2, content: "part of 'a1.dart';");
+    newFile(b1, content: "part 'b2.dart';");
+    newFile(b2, content: "part of 'b1.dart';");
 
     // Build the store with the library.
-    var store = await createAnalysisDriver().test.getSummaryStore(a1);
+    var store =
+        await createAnalysisDriver().test.getSummaryStore(convertPath(a1));
     expect(store.unlinkedMap.keys, contains(a1UriStr));
     expect(store.unlinkedMap.keys, contains(a2UriStr));
     expect(store.linkedMap.keys, contains(a1UriStr));
 
     // Remove the stored files from the file system.
-    provider.deleteFile(a1);
-    provider.deleteFile(a2);
+    deleteFile(a1);
+    deleteFile(a2);
 
     // We can ask isLibraryByUri() for both external and local units.
     AnalysisDriver driver = createAnalysisDriver(externalSummaries: store);
@@ -2451,8 +2496,8 @@
   }
 
   test_issue34619() async {
-    var a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    newFile(a, content: r'''
 class C {
   final Set<String> f = new Set<String>();
 
@@ -2465,7 +2510,7 @@
     await waitForIdleWithoutExceptions();
 
     // Update the file in a
-    provider.updateFile(a, r'''
+    modifyFile(a, r'''
 class C {
   final Set<String> f = a + b + c;
 
@@ -2478,15 +2523,15 @@
   }
 
   test_knownFiles() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
 
-    provider.newFile(a, r'''
+    newFile(a, content: r'''
 import 'b.dart';
 ''');
-    provider.newFile(b, '');
-    provider.newFile(c, '');
+    newFile(b);
+    newFile(c);
 
     driver.addFile(a);
     driver.addFile(c);
@@ -2506,10 +2551,10 @@
   }
 
   test_knownFiles_beforeAnalysis() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
 
-    provider.newFile(a, '');
+    newFile(a);
 
     // 'a.dart' is added, but not processed yet.
     // So, the set of known files is empty yet.
@@ -2526,7 +2571,7 @@
 
   test_missingDartLibrary_async() async {
     var asyncPath = sdk.mapDartUri('dart:async').fullName;
-    provider.getFile(asyncPath).delete();
+    getFile(asyncPath).delete();
     addTestFile('class C {}');
 
     ErrorsResult result = await driver.getErrors(testFile);
@@ -2538,7 +2583,7 @@
 
   test_missingDartLibrary_core() async {
     var corePath = sdk.mapDartUri('dart:core').fullName;
-    provider.getFile(corePath).delete();
+    getFile(corePath).delete();
     addTestFile('class C {}');
 
     ErrorsResult result = await driver.getErrors(testFile);
@@ -2556,27 +2601,27 @@
   }
 
   test_parseFile_notDart() async {
-    var p = _p('/test/bin/a.txt');
-    provider.newFile(p, 'class A {}');
+    var p = convertPath('/test/bin/a.txt');
+    newFile(p, content: 'class A {}');
 
-    ParseResult parseResult = await driver.parseFile(p);
+    ParsedUnitResult parseResult = await driver.parseFile(p);
     expect(parseResult, isNotNull);
     expect(driver.knownFiles, contains(p));
   }
 
   test_parseFile_shouldRefresh() async {
-    var p = _p('/test/bin/a.dart');
+    var p = convertPath('/test/bin/a.dart');
 
-    provider.newFile(p, 'class A {}');
+    newFile(p, content: 'class A {}');
     driver.addFile(p);
 
     // Get the result, so force the file reading.
     await driver.getResult(p);
 
     // Update the file.
-    provider.newFile(p, 'class A2 {}');
+    newFile(p, content: 'class A2 {}');
 
-    ParseResult parseResult = await driver.parseFile(p);
+    ParsedUnitResult parseResult = await driver.parseFile(p);
     var clazz = parseResult.unit.declarations[0] as ClassDeclaration;
     expect(clazz.name.name, 'A2');
   }
@@ -2589,44 +2634,44 @@
   }
 
   test_parseFileSync_notDart() {
-    var p = _p('/test/bin/a.txt');
-    provider.newFile(p, 'class A {}');
+    var p = convertPath('/test/bin/a.txt');
+    newFile(p, content: 'class A {}');
 
-    ParseResult parseResult = driver.parseFileSync(p);
+    ParsedUnitResult parseResult = driver.parseFileSync(p);
     expect(parseResult, isNotNull);
     expect(driver.knownFiles, contains(p));
   }
 
   test_parseFileSync_shouldRefresh() async {
-    var p = _p('/test/bin/a.dart');
+    var p = convertPath('/test/bin/a.dart');
 
-    provider.newFile(p, 'class A {}');
+    newFile(p, content: 'class A {}');
     driver.addFile(p);
 
     // Get the result, so force the file reading.
     await driver.getResult(p);
 
     // Update the file.
-    provider.newFile(p, 'class A2 {}');
+    newFile(p, content: 'class A2 {}');
 
-    ParseResult parseResult = driver.parseFileSync(p);
+    ParsedUnitResult parseResult = driver.parseFileSync(p);
     var clazz = parseResult.unit.declarations[0] as ClassDeclaration;
     expect(clazz.name.name, 'A2');
   }
 
   test_part_getErrors_afterLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2651,18 +2696,18 @@
   }
 
   test_part_getErrors_beforeLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2681,18 +2726,18 @@
   }
 
   test_part_getResult_afterLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2705,14 +2750,14 @@
 
     // Process a.dart so that we know that it's a library for c.dart later.
     {
-      AnalysisResult result = await driver.getResult(a);
+      ResolvedUnitResult result = await driver.getResult(a);
       expect(result.errors, isEmpty);
       expect(_getTopLevelVarType(result.unit, 'c'), 'C');
     }
 
     // Now c.dart can be resolved without errors in the context of a.dart
     {
-      AnalysisResult result = await driver.getResult(c);
+      ResolvedUnitResult result = await driver.getResult(c);
       expect(result.errors, isEmpty);
       expect(_getTopLevelVarType(result.unit, 'a'), 'A');
       expect(_getTopLevelVarType(result.unit, 'b'), 'B');
@@ -2720,18 +2765,18 @@
   }
 
   test_part_getResult_beforeLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2744,15 +2789,15 @@
 
     // b.dart will be analyzed after a.dart is analyzed.
     // So, A and B references are resolved.
-    AnalysisResult result = await driver.getResult(c);
+    ResolvedUnitResult result = await driver.getResult(c);
     expect(result.errors, isEmpty);
     expect(_getTopLevelVarType(result.unit, 'a'), 'A');
     expect(_getTopLevelVarType(result.unit, 'b'), 'B');
   }
 
   test_part_getResult_noLibrary() async {
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(c, r'''
+    var c = convertPath('/test/lib/c.dart');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2763,24 +2808,24 @@
 
     // There is no library which c.dart is a part of, so it has unresolved
     // A and B references.
-    AnalysisResult result = await driver.getResult(c);
+    ResolvedUnitResult result = await driver.getResult(c);
     expect(result.errors, isNotEmpty);
     expect(result.unit, isNotNull);
   }
 
   test_part_getUnitElement_afterLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2808,18 +2853,18 @@
   }
 
   test_part_getUnitElement_beforeLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2844,8 +2889,8 @@
   }
 
   test_part_getUnitElement_noLibrary() async {
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(c, r'''
+    var c = convertPath('/test/lib/c.dart');
+    newFile(c, content: r'''
 part of a;
 var a = new A();
 var b = new B();
@@ -2868,18 +2913,18 @@
   }
 
   test_part_getUnitElementSignature() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2902,18 +2947,18 @@
   }
 
   test_part_results_afterLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2930,38 +2975,38 @@
 
       // c.dart was added after a.dart, so it is analyzed after a.dart,
       // so we know that a.dart is the library of c.dart, so no errors.
-      AnalysisResult result = allResults.lastWhere((r) => r.path == c);
+      ResolvedUnitResult result = allResults.lastWhere((r) => r.path == c);
       expect(result.errors, isEmpty);
       expect(result.unit, isNull);
     }
 
     // Update a.dart so that c.dart is not a part.
     {
-      provider.updateFile(a, '// does not use c.dart anymore');
+      modifyFile(a, '// does not use c.dart anymore');
       driver.changeFile(a);
       await waitForIdleWithoutExceptions();
 
       // Now c.dart does not have a library context, so A and B cannot be
       // resolved, so there are errors.
-      AnalysisResult result = allResults.lastWhere((r) => r.path == c);
+      ResolvedUnitResult result = allResults.lastWhere((r) => r.path == c);
       expect(result.errors, isNotEmpty);
       expect(result.unit, isNull);
     }
   }
 
   test_part_results_beforeLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2979,14 +3024,14 @@
     // a.dart, but we cannot find the library for it, so we delay analysis
     // until all other files are analyzed, including a.dart, after which we
     // analyze the delayed parts.
-    AnalysisResult result = allResults.lastWhere((r) => r.path == c);
+    ResolvedUnitResult result = allResults.lastWhere((r) => r.path == c);
     expect(result.errors, isEmpty);
     expect(result.unit, isNull);
   }
 
   test_part_results_noLibrary() async {
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(c, r'''
+    var c = convertPath('/test/lib/c.dart');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -2999,24 +3044,24 @@
 
     // There is no library which c.dart is a part of, so it has unresolved
     // A and B references.
-    AnalysisResult result = allResults.lastWhere((r) => r.path == c);
+    ResolvedUnitResult result = allResults.lastWhere((r) => r.path == c);
     expect(result.errors, isNotEmpty);
     expect(result.unit, isNull);
   }
 
   test_part_results_priority_beforeLibrary() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: r'''
 library a;
 import 'b.dart';
 part 'c.dart';
 class A {}
 var c = new C();
 ''');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, r'''
+    newFile(b, content: 'class B {}');
+    newFile(c, content: r'''
 part of a;
 class C {}
 var a = new A();
@@ -3035,19 +3080,19 @@
     // a.dart, but we cannot find the library for it, so we delay analysis
     // until all other files are analyzed, including a.dart, after which we
     // analyze the delayed parts.
-    AnalysisResult result = allResults.lastWhere((r) => r.path == c);
+    ResolvedUnitResult result = allResults.lastWhere((r) => r.path == c);
     expect(result.errors, isEmpty);
     expect(result.unit, isNotNull);
   }
 
   test_removeFile_changeFile_implicitlyAnalyzed() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: r'''
 import 'b.dart';
 var A = B;
 ''');
-    provider.newFile(b, 'var B = 1;');
+    newFile(b, content: 'var B = 1;');
 
     driver.priorityFiles = [a, b];
     driver.addFile(a);
@@ -3057,17 +3102,17 @@
     await waitForIdleWithoutExceptions();
     expect(allResults, hasLength(2));
     {
-      AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
+      ResolvedUnitResult ar = allResults.firstWhere((r) => r.path == a);
       expect(_getTopLevelVarType(ar.unit, 'A'), 'int');
     }
     {
-      AnalysisResult br = allResults.firstWhere((r) => r.path == b);
+      ResolvedUnitResult br = allResults.firstWhere((r) => r.path == b);
       expect(_getTopLevelVarType(br.unit, 'B'), 'int');
     }
     allResults.clear();
 
     // Remove "b" and send the change notification.
-    provider.updateFile(b, 'var B = 1.2;');
+    modifyFile(b, 'var B = 1.2;');
     driver.removeFile(b);
     driver.changeFile(b);
 
@@ -3077,7 +3122,7 @@
     await waitForIdleWithoutExceptions();
     expect(allResults, hasLength(1));
     {
-      AnalysisResult ar = allResults.firstWhere((r) => r.path == a);
+      ResolvedUnitResult ar = allResults.firstWhere((r) => r.path == a);
       expect(_getTopLevelVarType(ar.unit, 'A'), 'double');
     }
   }
@@ -3102,11 +3147,11 @@
   }
 
   test_removeFile_invalidate_importers() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
 
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, "import 'a.dart';  var a = new A();");
+    newFile(a, content: 'class A {}');
+    newFile(b, content: "import 'a.dart';  var a = new A();");
 
     driver.addFile(a);
     driver.addFile(b);
@@ -3117,7 +3162,7 @@
     allResults.clear();
 
     // Remove a.dart, now b.dart should be reanalyzed and has an error.
-    provider.deleteFile(a);
+    deleteFile(a);
     driver.removeFile(a);
     await waitForIdleWithoutExceptions();
     expect(allResults.singleWhere((r) => r.path == b).errors, hasLength(2));
@@ -3131,27 +3176,76 @@
     } on ArgumentError {}
   }
 
+  test_resetUriResolution() async {
+    var a = convertPath('/aaa/lib/a.dart');
+    var b = convertPath('/bbb/lib/b.dart');
+
+    newFile(a, content: '');
+    newFile(b, content: r'''
+import 'package:aaa/a.dart'; // ignore: unused_import
+A a;
+''');
+
+    // Subscribe for errors.
+    driver.addFile(b);
+
+    // `package:aaa/a.dart` does not define class `A`.
+    // So, there is an error in `b.dart`.
+    await waitForIdleWithoutExceptions();
+    expect(allResults, hasLength(1));
+    expect(allResults[0].path, b);
+    expect(allResults[0].errors, hasLength(1));
+
+    // Create generated file for `package:aaa/a.dart`.
+    var aUri = Uri.parse('package:aaa/a.dart');
+    var aGeneratedPath = convertPath('/generated/aaa/lib/a2.dart');
+    var aGeneratedFile = newFile(aGeneratedPath, content: 'class A {}');
+
+    // Configure UriResolver to provide this generated file.
+    generatedUriResolver.resolveAbsoluteFunction =
+        (uri, actualUri) => aGeneratedFile.createSource(actualUri);
+    generatedUriResolver.restoreAbsoluteFunction = (source) {
+      String path = source.fullName;
+      if (path == a || path == aGeneratedPath) {
+        return aUri;
+      } else {
+        return null;
+      }
+    };
+
+    // Reset URI resolution, and analyze.
+    allResults.clear();
+    driver.resetUriResolution();
+
+    // `package:aaa/a.dart` is resolved differently now, so the new list of
+    // errors for `b.dart` (the empty list) is reported.
+    await waitForIdleWithoutExceptions();
+    expect(allResults, hasLength(1));
+    expect(allResults[0].path, b);
+    expect(allResults[0].errors, isEmpty);
+  }
+
   test_results_order() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    var d = _p('/test/lib/d.dart');
-    var e = _p('/test/lib/e.dart');
-    var f = _p('/test/lib/f.dart');
-    provider.newFile(a, r'''
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    var d = convertPath('/test/lib/d.dart');
+    var e = convertPath('/test/lib/e.dart');
+    var f = convertPath('/test/lib/f.dart');
+    newFile(a, content: r'''
 import 'd.dart';
 ''');
-    provider.newFile(b, '');
-    provider.newFile(c, r'''
+    newFile(b);
+    newFile(c, content: r'''
 import 'd.dart';
 ''');
-    provider.newFile(d, r'''
+    newFile(d, content: r'''
 import 'b.dart';
 ''');
-    provider.newFile(e, r'''
+    newFile(e, content: r'''
 export 'b.dart';
 ''');
-    provider.newFile(f, r'''
+    newFile(f, content: r'''
 import 'e.dart';
 class F extends X {}
 ''');
@@ -3171,7 +3265,7 @@
     allResults.clear();
 
     // Update a.dart with changing its API signature.
-    provider.updateFile(b, 'class A {}');
+    modifyFile(b, 'class A {}');
     driver.changeFile(b);
     await waitForIdleWithoutExceptions();
 
@@ -3188,16 +3282,16 @@
   }
 
   test_results_order_allChangedFirst_thenImports() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    var d = _p('/test/lib/d.dart');
-    var e = _p('/test/lib/e.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, '');
-    provider.newFile(d, "import 'a.dart';");
-    provider.newFile(e, "import 'b.dart';");
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    var d = convertPath('/test/lib/d.dart');
+    var e = convertPath('/test/lib/e.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
+    newFile(c);
+    newFile(d, content: "import 'a.dart';");
+    newFile(e, content: "import 'b.dart';");
 
     driver.addFile(a);
     driver.addFile(b);
@@ -3211,8 +3305,8 @@
     // Change b.dart and then a.dart files.
     // So, a.dart and b.dart should be analyzed first.
     // Then d.dart and e.dart because they import a.dart and b.dart files.
-    provider.updateFile(a, 'class A2 {}');
-    provider.updateFile(b, 'class B2 {}');
+    modifyFile(a, 'class A2 {}');
+    modifyFile(b, 'class B2 {}');
     driver.changeFile(b);
     driver.changeFile(a);
     await waitForIdleWithoutExceptions();
@@ -3235,7 +3329,7 @@
     await waitForIdleWithoutExceptions();
 
     expect(allResults, hasLength(1));
-    AnalysisResult result = allResults.single;
+    ResolvedUnitResult result = allResults.single;
     expect(result.path, testFile);
     expect(result.uri.toString(), 'package:test/test.dart');
     expect(result.content, content);
@@ -3248,12 +3342,12 @@
   }
 
   test_results_priorityFirst() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    var c = _p('/test/lib/c.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, 'class C {}');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    var c = convertPath('/test/lib/c.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
+    newFile(c, content: 'class C {}');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -3262,7 +3356,7 @@
     await waitForIdleWithoutExceptions();
 
     expect(allResults, hasLength(3));
-    AnalysisResult result = allResults[0];
+    ResolvedUnitResult result = allResults[0];
     expect(result.path, b);
     expect(result.unit, isNotNull);
     expect(result.errors, hasLength(0));
@@ -3274,7 +3368,7 @@
     await waitForIdleWithoutExceptions();
 
     expect(allResults, hasLength(1));
-    AnalysisResult result = allResults.single;
+    ResolvedUnitResult result = allResults.single;
     expect(result.path, testFile);
     expect(result.uri.toString(), 'package:test/test.dart');
     expect(result.content, isNull);
@@ -3283,10 +3377,10 @@
   }
 
   test_results_skipNotAffected() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -3296,7 +3390,7 @@
     allResults.clear();
 
     // Update a.dart and notify.
-    provider.updateFile(a, 'class A2 {}');
+    modifyFile(a, 'class A2 {}');
     driver.changeFile(a);
 
     // Only result for a.dart should be produced, b.dart is not affected.
@@ -3451,11 +3545,6 @@
         .type
         .toString();
   }
-
-  /**
-   * Return the [provider] specific path for the given Posix [path].
-   */
-  String _p(String path) => provider.convertPath(path);
 }
 
 @reflectiveTest
@@ -3463,31 +3552,31 @@
   bool get disableChangesAndCacheAllResults => true;
 
   test_addFile() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
     driver.addFile(a);
     driver.addFile(b);
   }
 
   test_changeFile() async {
-    var path = _p('/test.dart');
+    var path = convertPath('/test.dart');
     expect(() {
       driver.changeFile(path);
     }, throwsStateError);
   }
 
   test_getResult_libraryUnits() async {
-    var lib = _p('/lib.dart');
-    var part1 = _p('/part1.dart');
-    var part2 = _p('/part2.dart');
+    var lib = convertPath('/lib.dart');
+    var part1 = convertPath('/part1.dart');
+    var part2 = convertPath('/part2.dart');
 
-    provider.newFile(lib, r'''
+    newFile(lib, content: r'''
 library test;
 part 'part1.dart';
 part 'part2.dart';
 ''');
-    provider.newFile(part1, 'part of test; class A {}');
-    provider.newFile(part2, 'part of test; class B {}');
+    newFile(part1, content: 'part of test; class A {}');
+    newFile(part2, content: 'part of test; class B {}');
 
     driver.addFile(lib);
     driver.addFile(part1);
@@ -3496,9 +3585,9 @@
     // No analyzed libraries initially.
     expect(driver.test.numOfAnalyzedLibraries, 0);
 
-    AnalysisResult libResult = await driver.getResult(lib);
-    AnalysisResult partResult1 = await driver.getResult(part1);
-    AnalysisResult partResult2 = await driver.getResult(part2);
+    ResolvedUnitResult libResult = await driver.getResult(lib);
+    ResolvedUnitResult partResult1 = await driver.getResult(part1);
+    ResolvedUnitResult partResult2 = await driver.getResult(part2);
 
     // Just one library was analyzed, results for parts are cached.
     expect(driver.test.numOfAnalyzedLibraries, 1);
@@ -3520,11 +3609,11 @@
   }
 
   test_getResult_singleFile() async {
-    var path = _p('/test.dart');
-    provider.newFile(path, 'main() {}');
+    var path = convertPath('/test.dart');
+    newFile(path, content: 'main() {}');
     driver.addFile(path);
 
-    AnalysisResult result1 = await driver.getResult(path);
+    ResolvedUnitResult result1 = await driver.getResult(path);
     expect(driver.test.numOfAnalyzedLibraries, 1);
     var unit1 = result1.unit;
     var unitElement1 = unit1.declaredElement;
@@ -3532,7 +3621,7 @@
     expect(unit1, isNotNull);
     expect(unitElement1, isNotNull);
 
-    AnalysisResult result2 = await driver.getResult(path);
+    ResolvedUnitResult result2 = await driver.getResult(path);
     expect(driver.test.numOfAnalyzedLibraries, 1);
     expect(result2.path, path);
     expect(result2.unit, same(unit1));
@@ -3540,13 +3629,11 @@
   }
 
   test_removeFile() async {
-    var path = _p('/test.dart');
+    var path = convertPath('/test.dart');
     expect(() {
       driver.removeFile(path);
     }, throwsStateError);
   }
-
-  String _p(String path) => provider.convertPath(path);
 }
 
 class _SourceMock implements Source {
diff --git a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
new file mode 100644
index 0000000..aa83160
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
@@ -0,0 +1,226 @@
+// 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/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/analysis/experiments_impl.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ExperimentsTest);
+  });
+}
+
+@reflectiveTest
+class ExperimentsTest {
+  var knownFeatures = <String, ExperimentalFeature>{};
+
+  ExperimentStatus fromStrings(List<String> flags) {
+    return overrideKnownFeatures(
+        knownFeatures, () => ExperimentStatus.fromStrings(flags));
+  }
+
+  List<bool> getFlags(ExperimentStatus status) {
+    return getExperimentalFlags_forTesting(status);
+  }
+
+  List<ConflictingFlagLists> getValidateCombinationResult(
+      List<String> flags1, List<String> flags2) {
+    return overrideKnownFeatures(
+        knownFeatures, () => validateFlagCombination(flags1, flags2).toList());
+  }
+
+  List<ValidationResult> getValidationResult(List<String> flags) {
+    return overrideKnownFeatures(
+        knownFeatures, () => validateFlags(flags).toList());
+  }
+
+  test_fromStrings_conflicting_flags_disable_then_enable() {
+    // Enable takes precedence because it's last
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    expect(getFlags(fromStrings(['no-a', 'a'])), [true]);
+  }
+
+  test_fromStrings_conflicting_flags_enable_then_disable() {
+    // Disable takes precedence because it's last
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    expect(getFlags(fromStrings(['a', 'no-a'])), [false]);
+  }
+
+  test_fromStrings_default_values() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['b'] = ExperimentalFeature(1, 'b', true, false, 'b');
+    expect(getFlags(fromStrings([])), [false, true]);
+  }
+
+  test_fromStrings_disable_disabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    expect(getFlags(fromStrings(['no-a'])), [false]);
+  }
+
+  test_fromStrings_disable_enabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, false, 'a');
+    expect(getFlags(fromStrings(['no-a'])), [false]);
+  }
+
+  test_fromStrings_enable_disabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    expect(getFlags(fromStrings(['a'])), [true]);
+  }
+
+  test_fromStrings_enable_enabled_feature() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, false, 'a');
+    expect(getFlags(fromStrings(['a'])), [true]);
+  }
+
+  test_fromStrings_illegal_use_of_expired_flag_disable() {
+    // Expired flags are ignored even if they would fail validation.
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', true, true, 'a');
+    expect(getFlags(fromStrings(['no-a'])), []);
+  }
+
+  test_fromStrings_illegal_use_of_expired_flag_enable() {
+    // Expired flags are ignored even if they would fail validation.
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', false, true, 'a');
+    expect(getFlags(fromStrings(['a'])), []);
+  }
+
+  test_fromStrings_unnecessary_use_of_expired_flag_disable() {
+    // Expired flags are ignored.
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', false, true, 'a');
+    expect(getFlags(fromStrings(['no-a'])), []);
+  }
+
+  test_fromStrings_unnecessary_use_of_expired_flag_enable() {
+    // Expired flags are ignored.
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', true, true, 'a');
+    expect(getFlags(fromStrings(['a'])), []);
+  }
+
+  test_fromStrings_unrecognized_flag() {
+    // Unrecognized flags are ignored.
+    expect(getFlags(fromStrings(['a'])), []);
+  }
+
+  test_validateFlagCombination_disable_then_enable() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['b'] = ExperimentalFeature(1, 'b', false, false, 'b');
+    knownFeatures['c'] = ExperimentalFeature(2, 'c', false, false, 'c');
+    var validationResult =
+        getValidateCombinationResult(['a', 'no-c'], ['no-b', 'c']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0];
+    expect(error.feature, knownFeatures['c']);
+    expect(error.firstValue, false);
+  }
+
+  test_validateFlagCombination_enable_then_disable() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['b'] = ExperimentalFeature(1, 'b', false, false, 'b');
+    knownFeatures['c'] = ExperimentalFeature(2, 'c', false, false, 'c');
+    var validationResult =
+        getValidateCombinationResult(['a', 'c'], ['no-b', 'no-c']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0];
+    expect(error.feature, knownFeatures['c']);
+    expect(error.firstValue, true);
+  }
+
+  test_validateFlagCombination_ok() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['b'] = ExperimentalFeature(1, 'b', false, false, 'b');
+    knownFeatures['c'] = ExperimentalFeature(2, 'c', false, false, 'c');
+    expect(getValidateCombinationResult(['a', 'c'], ['no-b', 'c']), isEmpty);
+  }
+
+  test_validateFlags_conflicting_flags_disable_then_enable() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    var validationResult = getValidationResult(['no-a', 'a']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0] as ConflictingFlags;
+    expect(error.stringIndex, 1);
+    expect(error.flag, 'a');
+    expect(error.isError, true);
+    expect(error.feature, knownFeatures['a']);
+    expect(error.previousStringIndex, 0);
+    expect(error.requestedValue, true);
+  }
+
+  test_validateFlags_conflicting_flags_enable_then_disable() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    var validationResult = getValidationResult(['a', 'no-a']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0] as ConflictingFlags;
+    expect(error.stringIndex, 1);
+    expect(error.flag, 'no-a');
+    expect(error.isError, true);
+    expect(error.feature, knownFeatures['a']);
+    expect(error.previousStringIndex, 0);
+    expect(error.requestedValue, false);
+  }
+
+  test_validateFlags_ignore_redundant_disable_flags() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, false, 'a');
+    expect(getValidationResult(['no-a', 'no-a']), isEmpty);
+  }
+
+  test_validateFlags_ignore_redundant_enable_flags() {
+    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    expect(getValidationResult(['a', 'a']), isEmpty);
+  }
+
+  test_validateFlags_illegal_use_of_expired_flag_disable() {
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', true, true, 'a');
+    var validationResult = getValidationResult(['no-a']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0] as IllegalUseOfExpiredFlag;
+    expect(error.stringIndex, 0);
+    expect(error.flag, 'no-a');
+    expect(error.isError, true);
+    expect(error.feature, knownFeatures['a']);
+  }
+
+  test_validateFlags_illegal_use_of_expired_flag_enable() {
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', false, true, 'a');
+    var validationResult = getValidationResult(['a']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0] as IllegalUseOfExpiredFlag;
+    expect(error.stringIndex, 0);
+    expect(error.flag, 'a');
+    expect(error.isError, true);
+    expect(error.feature, knownFeatures['a']);
+  }
+
+  test_validateFlags_unnecessary_use_of_expired_flag_disable() {
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', false, true, 'a');
+    var validationResult = getValidationResult(['no-a']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0] as UnnecessaryUseOfExpiredFlag;
+    expect(error.stringIndex, 0);
+    expect(error.flag, 'no-a');
+    expect(error.isError, false);
+    expect(error.feature, knownFeatures['a']);
+  }
+
+  test_validateFlags_unnecessary_use_of_expired_flag_enable() {
+    knownFeatures['a'] = ExperimentalFeature(null, 'a', true, true, 'a');
+    var validationResult = getValidationResult(['a']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0] as UnnecessaryUseOfExpiredFlag;
+    expect(error.stringIndex, 0);
+    expect(error.flag, 'a');
+    expect(error.isError, false);
+    expect(error.feature, knownFeatures['a']);
+  }
+
+  test_validateFlags_unrecognized_flag() {
+    var validationResult = getValidationResult(['a']);
+    expect(validationResult, hasLength(1));
+    var error = validationResult[0] as UnrecognizedFlag;
+    expect(error.stringIndex, 0);
+    expect(error.flag, 'a');
+    expect(error.isError, true);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index aeb0e75..119f2b3 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -6,9 +6,9 @@
 import 'dart:typed_data';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/library_graph.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/top_level_declaration.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
@@ -16,13 +16,13 @@
     show AnalysisOptions, AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:convert/convert.dart';
 import 'package:crypto/crypto.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../context/mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(FileSystemStateTest);
@@ -30,8 +30,7 @@
 }
 
 @reflectiveTest
-class FileSystemStateTest {
-  final MemoryResourceProvider provider = new MemoryResourceProvider();
+class FileSystemStateTest with ResourceProviderMixin {
   MockSdk sdk;
 
   final ByteStore byteStore = new MemoryByteStore();
@@ -47,22 +46,22 @@
 
   void setUp() {
     logger = new PerformanceLog(logBuffer);
-    sdk = new MockSdk(resourceProvider: provider);
+    sdk = new MockSdk(resourceProvider: resourceProvider);
     sourceFactory = new SourceFactory([
       new DartUriResolver(sdk),
       generatedUriResolver,
-      new PackageMapUriResolver(provider, <String, List<Folder>>{
-        'aaa': [provider.getFolder(_p('/aaa/lib'))],
-        'bbb': [provider.getFolder(_p('/bbb/lib'))],
+      new PackageMapUriResolver(resourceProvider, <String, List<Folder>>{
+        'aaa': [getFolder('/aaa/lib')],
+        'bbb': [getFolder('/bbb/lib')],
       }),
-      new ResourceUriResolver(provider)
-    ], null, provider);
+      new ResourceUriResolver(resourceProvider)
+    ], null, resourceProvider);
     AnalysisOptions analysisOptions = new AnalysisOptionsImpl();
     fileSystemState = new FileSystemState(
         logger,
         byteStore,
         contentOverlay,
-        provider,
+        resourceProvider,
         sourceFactory,
         analysisOptions,
         new Uint32List(0),
@@ -70,8 +69,8 @@
   }
 
   test_definedClassMemberNames() {
-    String path = _p('/aaa/lib/a.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/aaa/lib/a.dart');
+    newFile(path, content: r'''
 class A {
   int a, b;
   A();
@@ -90,8 +89,8 @@
   }
 
   test_definedTopLevelNames() {
-    String path = _p('/aaa/lib/a.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/aaa/lib/a.dart');
+    newFile(path, content: r'''
 class A {}
 class B = Object with A;
 typedef C();
@@ -106,18 +105,18 @@
   }
 
   test_exportedTopLevelDeclarations_cycle() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    String c = _p('/aaa/lib/c.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    String c = convertPath('/aaa/lib/c.dart');
+    newFile(a, content: r'''
 export 'b.dart';
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'c.dart';
 class B {}
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 export 'a.dart';
 class C {}
 ''');
@@ -130,24 +129,24 @@
   }
 
   test_exportedTopLevelDeclarations_cycle_anotherOutsideCycle() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    String c = _p('/aaa/lib/c.dart');
-    String d = _p('/aaa/lib/d.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    String c = convertPath('/aaa/lib/c.dart');
+    String d = convertPath('/aaa/lib/d.dart');
+    newFile(a, content: r'''
 export 'b.dart';
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'c.dart';
 class B {}
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 export 'b.dart';
 export 'd.dart';
 class C {}
 ''');
-    provider.newFile(d, r'''
+    newFile(d, content: r'''
 class D {}
 ''');
     _assertExportedTopLevelDeclarations(a, ['A', 'B', 'C', 'D']);
@@ -159,28 +158,28 @@
   }
 
   test_exportedTopLevelDeclarations_cycle_onSequence() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    String c = _p('/aaa/lib/c.dart');
-    String d = _p('/aaa/lib/d.dart');
-    String e = _p('/aaa/lib/e.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    String c = convertPath('/aaa/lib/c.dart');
+    String d = convertPath('/aaa/lib/d.dart');
+    String e = convertPath('/aaa/lib/e.dart');
+    newFile(a, content: r'''
 export 'b.dart';
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'c.dart';
 class B {}
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 export 'd.dart';
 class C {}
 ''');
-    provider.newFile(d, r'''
+    newFile(d, content: r'''
 export 'e.dart';
 class D {}
 ''');
-    provider.newFile(e, r'''
+    newFile(e, content: r'''
 export 'c.dart';
 class E {}
 ''');
@@ -197,12 +196,12 @@
   }
 
   test_exportedTopLevelDeclarations_export() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    newFile(a, content: r'''
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'a.dart';
 class B {}
 ''');
@@ -211,20 +210,20 @@
   }
 
   test_exportedTopLevelDeclarations_export2_show() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    String c = _p('/aaa/lib/c.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    String c = convertPath('/aaa/lib/c.dart');
+    newFile(a, content: r'''
 class A1 {}
 class A2 {}
 class A3 {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'a.dart' show A1, A2;
 class B1 {}
 class B2 {}
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 export 'b.dart' show A2, A3, B1;
 class C {}
 ''');
@@ -233,12 +232,12 @@
   }
 
   test_exportedTopLevelDeclarations_export_flushOnChange() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    newFile(a, content: r'''
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'a.dart';
 class B {}
 ''');
@@ -247,20 +246,20 @@
     _assertExportedTopLevelDeclarations(b, ['A', 'B']);
 
     // Update a.dart, so a.dart and b.dart exported declarations are flushed.
-    provider.newFile(a, 'class A {} class A2 {}');
+    newFile(a, content: 'class A {} class A2 {}');
     fileSystemState.getFileForPath(a).refresh();
     _assertExportedTopLevelDeclarations(b, ['A', 'A2', 'B']);
   }
 
   test_exportedTopLevelDeclarations_export_hide() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    newFile(a, content: r'''
 class A1 {}
 class A2 {}
 class A3 {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'a.dart' hide A2;
 class B {}
 ''');
@@ -268,12 +267,12 @@
   }
 
   test_exportedTopLevelDeclarations_export_preferLocal() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    newFile(a, content: r'''
 class V {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'a.dart';
 int V;
 ''');
@@ -285,13 +284,13 @@
   }
 
   test_exportedTopLevelDeclarations_export_show() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    newFile(a, content: r'''
 class A1 {}
 class A2 {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'a.dart' show A2;
 class B {}
 ''');
@@ -299,21 +298,21 @@
   }
 
   test_exportedTopLevelDeclarations_export_show2() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    String c = _p('/aaa/lib/c.dart');
-    String d = _p('/aaa/lib/d.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    String c = convertPath('/aaa/lib/c.dart');
+    String d = convertPath('/aaa/lib/d.dart');
+    newFile(a, content: r'''
 export 'b.dart' show Foo;
 export 'c.dart' show Bar;
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 export 'd.dart';
 ''');
-    provider.newFile(c, r'''
+    newFile(c, content: r'''
 export 'd.dart';
 ''');
-    provider.newFile(d, r'''
+    newFile(d, content: r'''
 class Foo {}
 class Bar {}
 ''');
@@ -321,12 +320,12 @@
   }
 
   test_exportedTopLevelDeclarations_import() {
-    String a = _p('/aaa/lib/a.dart');
-    String b = _p('/aaa/lib/b.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String b = convertPath('/aaa/lib/b.dart');
+    newFile(a, content: r'''
 class A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 import 'a.dart';
 class B {}
 ''');
@@ -334,14 +333,14 @@
   }
 
   test_exportedTopLevelDeclarations_parts() {
-    String a = _p('/aaa/lib/a.dart');
-    String a2 = _p('/aaa/lib/a2.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/aaa/lib/a.dart');
+    String a2 = convertPath('/aaa/lib/a2.dart');
+    newFile(a, content: r'''
 library lib;
 part 'a2.dart';
 class A1 {}
 ''');
-    provider.newFile(a2, r'''
+    newFile(a2, content: r'''
 part of lib;
 class A2 {}
 ''');
@@ -349,7 +348,7 @@
   }
 
   test_getFileForPath_doesNotExist() {
-    String path = _p('/aaa/lib/a.dart');
+    String path = convertPath('/aaa/lib/a.dart');
     FileState file = fileSystemState.getFileForPath(path);
     expect(file.path, path);
     expect(file.uri, Uri.parse('package:aaa/a.dart'));
@@ -367,8 +366,8 @@
   }
 
   test_getFileForPath_emptyUri() {
-    String path = _p('/test.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/test.dart');
+    newFile(path, content: r'''
 import '';
 export '';
 part '';
@@ -381,8 +380,8 @@
   }
 
   test_getFileForPath_hasLibraryDirective_hasPartOfDirective() {
-    String a = _p('/test/lib/a.dart');
-    provider.newFile(a, r'''
+    String a = convertPath('/test/lib/a.dart');
+    newFile(a, content: r'''
 library L;
 part of L;
 ''');
@@ -391,10 +390,10 @@
   }
 
   test_getFileForPath_invalidUri() {
-    String a = _p('/aaa/lib/a.dart');
-    String a1 = _p('/aaa/lib/a1.dart');
-    String a2 = _p('/aaa/lib/a2.dart');
-    String a3 = _p('/aaa/lib/a3.dart');
+    String a = convertPath('/aaa/lib/a.dart');
+    String a1 = convertPath('/aaa/lib/a1.dart');
+    String a2 = convertPath('/aaa/lib/a2.dart');
+    String a3 = convertPath('/aaa/lib/a3.dart');
     String content_a1 = r'''
 import 'package:aaa/a1.dart';
 import ':[invalid uri]';
@@ -405,7 +404,7 @@
 part 'a3.dart';
 part ':[invalid uri]';
 ''';
-    provider.newFile(a, content_a1);
+    newFile(a, content: content_a1);
 
     FileState file = fileSystemState.getFileForPath(a);
 
@@ -429,12 +428,12 @@
   }
 
   test_getFileForPath_library() {
-    String a1 = _p('/aaa/lib/a1.dart');
-    String a2 = _p('/aaa/lib/a2.dart');
-    String a3 = _p('/aaa/lib/a3.dart');
-    String a4 = _p('/aaa/lib/a4.dart');
-    String b1 = _p('/bbb/lib/b1.dart');
-    String b2 = _p('/bbb/lib/b2.dart');
+    String a1 = convertPath('/aaa/lib/a1.dart');
+    String a2 = convertPath('/aaa/lib/a2.dart');
+    String a3 = convertPath('/aaa/lib/a3.dart');
+    String a4 = convertPath('/aaa/lib/a4.dart');
+    String b1 = convertPath('/bbb/lib/b1.dart');
+    String b2 = convertPath('/bbb/lib/b2.dart');
     String content_a1 = r'''
 import 'package:aaa/a2.dart';
 import 'package:bbb/b1.dart';
@@ -444,7 +443,7 @@
 
 class A1 {}
 ''';
-    provider.newFile(a1, content_a1);
+    newFile(a1, content: content_a1);
 
     FileState file = fileSystemState.getFileForPath(a1);
     expect(file.path, a1);
@@ -485,12 +484,12 @@
   }
 
   test_getFileForPath_onlyDartFiles() {
-    String not_dart = _p('/test/lib/not_dart.txt');
-    String a = _p('/test/lib/a.dart');
-    String b = _p('/test/lib/b.dart');
-    String c = _p('/test/lib/c.dart');
-    String d = _p('/test/lib/d.dart');
-    provider.newFile(a, r'''
+    String not_dart = convertPath('/test/lib/not_dart.txt');
+    String a = convertPath('/test/lib/a.dart');
+    String b = convertPath('/test/lib/b.dart');
+    String c = convertPath('/test/lib/c.dart');
+    String d = convertPath('/test/lib/d.dart');
+    newFile(a, content: r'''
 library lib;
 import 'dart:math';
 import 'b.dart';
@@ -511,13 +510,13 @@
   }
 
   test_getFileForPath_part() {
-    String a1 = _p('/aaa/lib/a1.dart');
-    String a2 = _p('/aaa/lib/a2.dart');
-    provider.newFile(a1, r'''
+    String a1 = convertPath('/aaa/lib/a1.dart');
+    String a2 = convertPath('/aaa/lib/a2.dart');
+    newFile(a1, content: r'''
 library a1;
 part 'a2.dart';
 ''');
-    provider.newFile(a2, r'''
+    newFile(a2, content: r'''
 part of a1;
 class A2 {}
 ''');
@@ -552,7 +551,7 @@
     // Now update the library, and refresh its file.
     // The 'a2.dart' is not referenced anymore.
     // So the part file does not have the library anymore.
-    provider.newFile(a1, r'''
+    newFile(a1, content: r'''
 library a1;
 part 'not-a2.dart';
 ''');
@@ -561,7 +560,7 @@
   }
 
   test_getFileForPath_samePath() {
-    String path = _p('/aaa/lib/a.dart');
+    String path = convertPath('/aaa/lib/a.dart');
     FileState file1 = fileSystemState.getFileForPath(path);
     FileState file2 = fileSystemState.getFileForPath(path);
     expect(file2, same(file1));
@@ -577,9 +576,9 @@
   }
 
   test_getFileForUri_packageVsFileUri() {
-    String path = _p('/aaa/lib/a.dart');
+    String path = convertPath('/aaa/lib/a.dart');
     var packageUri = Uri.parse('package:aaa/a.dart');
-    var fileUri = provider.pathContext.toUri(path);
+    var fileUri = toUri(path);
 
     // The files with `package:` and `file:` URIs are different.
     FileState filePackageUri = fileSystemState.getFileForUri(packageUri);
@@ -598,14 +597,14 @@
   }
 
   test_getFilesSubtypingName() {
-    String a = _p('/a.dart');
-    String b = _p('/b.dart');
+    String a = convertPath('/a.dart');
+    String b = convertPath('/b.dart');
 
-    provider.newFile(a, r'''
+    newFile(a, content: r'''
 class A {}
 class B extends A {}
 ''');
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 class A {}
 class D implements A {}
 ''');
@@ -619,7 +618,7 @@
     );
 
     // Change b.dart so that it does not subtype A.
-    provider.newFile(b, r'''
+    newFile(b, content: r'''
 class C {}
 class D implements C {}
 ''');
@@ -636,8 +635,8 @@
 
   test_hasUri() {
     Uri uri = Uri.parse('package:aaa/foo.dart');
-    String templatePath = _p('/aaa/lib/foo.dart');
-    String generatedPath = _p('/generated/aaa/lib/foo.dart');
+    String templatePath = convertPath('/aaa/lib/foo.dart');
+    String generatedPath = convertPath('/generated/aaa/lib/foo.dart');
 
     Source generatedSource = new _SourceMock(generatedPath, uri);
 
@@ -648,9 +647,87 @@
     expect(fileSystemState.hasUri(generatedPath), isTrue);
   }
 
+  test_libraryCycle() {
+    String pa = convertPath('/aaa/lib/a.dart');
+    String pb = convertPath('/aaa/lib/b.dart');
+    String pc = convertPath('/aaa/lib/c.dart');
+    String pd = convertPath('/aaa/lib/d.dart');
+
+    FileState fa = fileSystemState.getFileForPath(pa);
+    FileState fb = fileSystemState.getFileForPath(pb);
+    FileState fc = fileSystemState.getFileForPath(pc);
+    FileState fd = fileSystemState.getFileForPath(pd);
+
+    // Compute library cycles for all files.
+    fa.libraryCycle;
+    fb.libraryCycle;
+    fc.libraryCycle;
+    fd.libraryCycle;
+    _assertFilesWithoutLibraryCycle([]);
+
+    // No imports, so just a single file.
+    newFile(pa);
+    _assertLibraryCycle(fa, [fa], []);
+
+    // Import b.dart into a.dart, two files now.
+    newFile(pa, content: "import 'b.dart';");
+    fa.refresh();
+    _assertFilesWithoutLibraryCycle([fa]);
+    _assertLibraryCycle(fa, [fa], [fb.libraryCycle]);
+
+    // Update b.dart so that it imports c.dart now.
+    newFile(pb, content: "import 'c.dart';");
+    fb.refresh();
+    _assertFilesWithoutLibraryCycle([fa, fb]);
+    _assertLibraryCycle(fa, [fa], [fb.libraryCycle]);
+    _assertLibraryCycle(fb, [fb], [fc.libraryCycle]);
+    _assertFilesWithoutLibraryCycle([]);
+
+    // Update b.dart so that it exports d.dart instead.
+    newFile(pb, content: "export 'd.dart';");
+    fb.refresh();
+    _assertFilesWithoutLibraryCycle([fa, fb]);
+    _assertLibraryCycle(fa, [fa], [fb.libraryCycle]);
+    _assertLibraryCycle(fb, [fb], [fd.libraryCycle]);
+    _assertFilesWithoutLibraryCycle([]);
+
+    // Update a.dart so that it does not import b.dart anymore.
+    newFile(pa);
+    fa.refresh();
+    _assertFilesWithoutLibraryCycle([fa]);
+    _assertLibraryCycle(fa, [fa], []);
+  }
+
+  test_libraryCycle_cycle() {
+    String pa = convertPath('/aaa/lib/a.dart');
+    String pb = convertPath('/aaa/lib/b.dart');
+
+    newFile(pa, content: "import 'b.dart';");
+    newFile(pb, content: "import 'a.dart';");
+
+    FileState fa = fileSystemState.getFileForPath(pa);
+    FileState fb = fileSystemState.getFileForPath(pb);
+
+    // Compute library cycles for all files.
+    fa.libraryCycle;
+    fb.libraryCycle;
+    _assertFilesWithoutLibraryCycle([]);
+
+    // It's a cycle.
+    _assertLibraryCycle(fa, [fa, fb], []);
+    _assertLibraryCycle(fb, [fa, fb], []);
+
+    // Update a.dart so that it does not import b.dart anymore.
+    newFile(pa);
+    fa.refresh();
+    _assertFilesWithoutLibraryCycle([fa, fb]);
+    _assertLibraryCycle(fa, [fa], []);
+    _assertLibraryCycle(fb, [fb], [fa.libraryCycle]);
+  }
+
   test_referencedNames() {
-    String path = _p('/aaa/lib/a.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/aaa/lib/a.dart');
+    newFile(path, content: r'''
 A foo(B p) {
   foo(null);
   C c = new C(p);
@@ -662,8 +739,8 @@
   }
 
   test_refresh_differentApiSignature() {
-    String path = _p('/aaa/lib/a.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/aaa/lib/a.dart');
+    newFile(path, content: r'''
 class A {}
 ''');
     FileState file = fileSystemState.getFileForPath(path);
@@ -671,7 +748,7 @@
     List<int> signature = file.apiSignature;
 
     // Update the resource and refresh the file state.
-    provider.newFile(path, r'''
+    newFile(path, content: r'''
 class B {}
 ''');
     bool apiSignatureChanged = file.refresh();
@@ -682,8 +759,8 @@
   }
 
   test_refresh_sameApiSignature() {
-    String path = _p('/aaa/lib/a.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/aaa/lib/a.dart');
+    newFile(path, content: r'''
 class C {
   foo() {
     print(111);
@@ -694,7 +771,7 @@
     List<int> signature = file.apiSignature;
 
     // Update the resource and refresh the file state.
-    provider.newFile(path, r'''
+    newFile(path, content: r'''
 class C {
   foo() {
     print(222);
@@ -708,8 +785,8 @@
   }
 
   test_store_zeroLengthUnlinked() {
-    String path = _p('/test.dart');
-    provider.newFile(path, 'class A {}');
+    String path = convertPath('/test.dart');
+    newFile(path, content: 'class A {}');
 
     // Get the file, prepare unlinked.
     FileState file = fileSystemState.getFileForPath(path);
@@ -724,8 +801,8 @@
   }
 
   test_subtypedNames() {
-    String path = _p('/test.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/test.dart');
+    newFile(path, content: r'''
 class X extends A {}
 class Y extends A with B {}
 class Z implements C, D {}
@@ -735,8 +812,8 @@
   }
 
   test_topLevelDeclarations() {
-    String path = _p('/aaa/lib/a.dart');
-    provider.newFile(path, r'''
+    String path = convertPath('/aaa/lib/a.dart');
+    newFile(path, content: r'''
 class C {}
 typedef F();
 enum E {E1, E2}
@@ -775,95 +852,16 @@
     assertHas('V4', TopLevelDeclarationKind.variable);
   }
 
-  test_transitiveFiles() {
-    String pa = _p('/aaa/lib/a.dart');
-    String pb = _p('/aaa/lib/b.dart');
-    String pc = _p('/aaa/lib/c.dart');
-    String pd = _p('/aaa/lib/d.dart');
-
-    FileState fa = fileSystemState.getFileForPath(pa);
-    FileState fb = fileSystemState.getFileForPath(pb);
-    FileState fc = fileSystemState.getFileForPath(pc);
-    FileState fd = fileSystemState.getFileForPath(pd);
-
-    // Compute transitive closures for all files.
-    fa.transitiveFiles;
-    fb.transitiveFiles;
-    fc.transitiveFiles;
-    fd.transitiveFiles;
-    expect(
-        _excludeSdk(fileSystemState.test.filesWithoutTransitiveFiles), isEmpty);
-
-    // No imports, so just a single file.
-    provider.newFile(pa, "");
-    _assertTransitiveFiles(fa, [fa]);
-
-    // Import b.dart into a.dart, two files now.
-    provider.newFile(pa, "import 'b.dart';");
-    fa.refresh();
-    _assertFilesWithoutTransitiveFiles([fa]);
-    _assertTransitiveFiles(fa, [fa, fb]);
-
-    // Update b.dart so that it imports c.dart now.
-    provider.newFile(pb, "import 'c.dart';");
-    fb.refresh();
-    _assertFilesWithoutTransitiveFiles([fa, fb]);
-    _assertTransitiveFiles(fa, [fa, fb, fc]);
-    _assertTransitiveFiles(fb, [fb, fc]);
-    _assertFilesWithoutTransitiveFiles([]);
-
-    // Update b.dart so that it exports d.dart instead.
-    provider.newFile(pb, "export 'd.dart';");
-    fb.refresh();
-    _assertFilesWithoutTransitiveFiles([fa, fb]);
-    _assertTransitiveFiles(fa, [fa, fb, fd]);
-    _assertTransitiveFiles(fb, [fb, fd]);
-    _assertFilesWithoutTransitiveFiles([]);
-
-    // Update a.dart so that it does not import b.dart anymore.
-    provider.newFile(pa, "");
-    fa.refresh();
-    _assertFilesWithoutTransitiveFiles([fa]);
-    _assertTransitiveFiles(fa, [fa]);
-  }
-
-  test_transitiveFiles_cycle() {
-    String pa = _p('/aaa/lib/a.dart');
-    String pb = _p('/aaa/lib/b.dart');
-
-    provider.newFile(pa, "import 'b.dart';");
-    provider.newFile(pb, "import 'a.dart';");
-
-    FileState fa = fileSystemState.getFileForPath(pa);
-    FileState fb = fileSystemState.getFileForPath(pb);
-
-    // Compute transitive closures for all files.
-    fa.transitiveFiles;
-    fb.transitiveFiles;
-    _assertFilesWithoutTransitiveFiles([]);
-
-    // It's a cycle.
-    _assertTransitiveFiles(fa, [fa, fb]);
-    _assertTransitiveFiles(fb, [fa, fb]);
-
-    // Update a.dart so that it does not import b.dart anymore.
-    provider.newFile(pa, "");
-    fa.refresh();
-    _assertFilesWithoutTransitiveFiles([fa, fb]);
-    _assertTransitiveFiles(fa, [fa]);
-    _assertTransitiveFiles(fb, [fa, fb]);
-  }
-
   test_transitiveSignature() {
-    String pa = _p('/aaa/lib/a.dart');
-    String pb = _p('/aaa/lib/b.dart');
-    String pc = _p('/aaa/lib/c.dart');
-    String pd = _p('/aaa/lib/d.dart');
+    String pa = convertPath('/aaa/lib/a.dart');
+    String pb = convertPath('/aaa/lib/b.dart');
+    String pc = convertPath('/aaa/lib/c.dart');
+    String pd = convertPath('/aaa/lib/d.dart');
 
-    provider.newFile(pa, "class A {}");
-    provider.newFile(pb, "import 'a.dart';");
-    provider.newFile(pc, "import 'b.dart';");
-    provider.newFile(pd, "class D {}");
+    newFile(pa, content: "class A {}");
+    newFile(pb, content: "import 'a.dart';");
+    newFile(pc, content: "import 'b.dart';");
+    newFile(pd, content: "class D {}");
 
     FileState fa = fileSystemState.getFileForPath(pa);
     FileState fb = fileSystemState.getFileForPath(pb);
@@ -871,25 +869,24 @@
     FileState fd = fileSystemState.getFileForPath(pd);
 
     // Compute transitive closures for all files.
+    // This implicitly computes library cycles.
     expect(fa.transitiveSignature, isNotNull);
     expect(fb.transitiveSignature, isNotNull);
     expect(fc.transitiveSignature, isNotNull);
     expect(fd.transitiveSignature, isNotNull);
-    expect(
-        _excludeSdk(fileSystemState.test.filesWithoutTransitiveFiles), isEmpty);
+    _assertFilesWithoutLibraryCycle([]);
 
     // Make an update to a.dart that does not change its API signature.
-    // All transitive signatures are still valid.
-    provider.newFile(pa, "class A {} // the same API signature");
+    // All library cycles are still valid.
+    newFile(pa, content: "class A {} // the same API signature");
     fa.refresh();
-    expect(
-        _excludeSdk(fileSystemState.test.filesWithoutTransitiveFiles), isEmpty);
+    _assertFilesWithoutLibraryCycle([]);
 
-    // Change a.dart API signature, also flush signatures of b.dart and c.dart,
-    // but d.dart is still OK.
-    provider.newFile(pa, "class A2 {}");
+    // Change a.dart API signature.
+    // This flushes signatures of b.dart and c.dart, but d.dart is still OK.
+    newFile(pa, content: "class A2 {}");
     fa.refresh();
-    _assertFilesWithoutTransitiveSignatures([fa, fb, fc]);
+    _assertFilesWithoutLibraryCycle([fa, fb, fc]);
   }
 
   void _assertExportedTopLevelDeclarations(String path, List<String> expected) {
@@ -899,13 +896,8 @@
     expect(declarations.keys, unorderedEquals(expected));
   }
 
-  void _assertFilesWithoutTransitiveFiles(List<FileState> expected) {
-    var actual = fileSystemState.test.filesWithoutTransitiveFiles;
-    expect(_excludeSdk(actual), unorderedEquals(expected));
-  }
-
-  void _assertFilesWithoutTransitiveSignatures(List<FileState> expected) {
-    var actual = fileSystemState.test.filesWithoutTransitiveSignature;
+  void _assertFilesWithoutLibraryCycle(List<FileState> expected) {
+    var actual = fileSystemState.test.filesWithoutLibraryCycle;
     expect(_excludeSdk(actual), unorderedEquals(expected));
   }
 
@@ -921,22 +913,30 @@
     expect(file.source, isNull);
   }
 
-  void _assertTransitiveFiles(FileState file, List<FileState> expected) {
-    expect(_excludeSdk(file.transitiveFiles), unorderedEquals(expected));
+  void _assertLibraryCycle(
+    FileState file,
+    List<FileState> expectedLibraries,
+    List<LibraryCycle> expectedDirectDependencies,
+  ) {
+    expect(file.libraryCycle.libraries, unorderedEquals(expectedLibraries));
+    expect(
+      _excludeSdk(file.libraryCycle.directDependencies),
+      unorderedEquals(expectedDirectDependencies),
+    );
   }
 
   List<T> _excludeSdk<T>(Iterable<T> files) {
     return files.where((Object file) {
-      if (file is FileState) {
+      if (file is LibraryCycle) {
+        return !file.libraries.any((file) => file.uri.isScheme('dart'));
+      } else if (file is FileState) {
         return file.uri?.scheme != 'dart';
       } else {
-        return !(file as String).startsWith(_p('/sdk'));
+        return !(file as String).startsWith(convertPath('/sdk'));
       }
     }).toList();
   }
 
-  String _p(String path) => provider.convertPath(path);
-
   static String _md5(String content) {
     return hex.encode(md5.convert(utf8.encode(content)).bytes);
   }
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
index e3106d1..a4217fe 100644
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
@@ -1,13 +1,13 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 import 'dart:convert';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/index.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
@@ -134,7 +134,7 @@
   }
 
   test_isExtendedBy_ClassDeclaration_isQualified() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 ''');
     await _indexTestUnit('''
@@ -167,7 +167,7 @@
   }
 
   test_isExtendedBy_ClassTypeAlias_isQualified() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 ''');
     await _indexTestUnit('''
@@ -193,7 +193,7 @@
   }
 
   test_isImplementedBy_ClassDeclaration_isQualified() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 ''');
     await _indexTestUnit('''
@@ -256,7 +256,7 @@
   }
 
   test_isInvokedBy_FunctionElement() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 library lib;
 foo() {}
 ''');
@@ -393,7 +393,7 @@
   }
 
   test_isMixedInBy_ClassDeclaration_isQualified() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 ''');
     await _indexTestUnit('''
@@ -465,7 +465,7 @@
   }
 
   test_isReferencedBy_ClassElement_invocation_isQualified() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 ''');
     await _indexTestUnit('''
@@ -504,7 +504,7 @@
   }
 
   test_isReferencedBy_CompilationUnitElement_export() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 library lib;
 ''');
     await _indexTestUnit('''
@@ -515,7 +515,7 @@
   }
 
   test_isReferencedBy_CompilationUnitElement_import() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 library lib;
 ''');
     await _indexTestUnit('''
@@ -526,7 +526,7 @@
   }
 
   test_isReferencedBy_CompilationUnitElement_part() async {
-    provider.newFile(_p('$testProject/my_unit.dart'), 'part of my_lib;');
+    newFile('$testProject/my_unit.dart', content: 'part of my_lib;');
     await _indexTestUnit('''
 library my_lib;
 part 'my_unit.dart';
@@ -536,8 +536,8 @@
   }
 
   test_isReferencedBy_CompilationUnitElement_part_inPart() async {
-    provider.newFile(_p('$testProject/a.dart'), 'part of lib;');
-    provider.newFile(_p('$testProject/b.dart'), '''
+    newFile('$testProject/a.dart', content: 'part of lib;');
+    newFile('$testProject/b.dart', content: '''
 library lib;
 part 'a.dart';
 ''');
@@ -803,7 +803,7 @@
   }
 
   test_isReferencedBy_FunctionElement_with_LibraryElement() async {
-    provider.newFile(_p('$testProject/foo.dart'), r'''
+    newFile('$testProject/foo.dart', content: r'''
 bar() {}
 ''');
     await _indexTestUnit('''
@@ -863,8 +863,8 @@
   }
 
   test_isReferencedBy_MultiplyDefinedElement() async {
-    provider.newFile(_p('$testProject/a1.dart'), 'class A {}');
-    provider.newFile(_p('$testProject/a2.dart'), 'class A {}');
+    newFile('$testProject/a1.dart', content: 'class A {}');
+    newFile('$testProject/a2.dart', content: 'class A {}');
     await _indexTestUnit('''
 import 'a1.dart';
 import 'a2.dart';
@@ -911,7 +911,7 @@
   }
 
   test_isReferencedBy_TopLevelVariableElement() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 library lib;
 var V;
 ''');
@@ -935,7 +935,7 @@
   }
 
   test_isReferencedBy_TopLevelVariableElement_synthetic_hasGetterSetter() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 int get V => 0;
 void set V(_) {}
 ''');
@@ -947,7 +947,7 @@
   }
 
   test_isReferencedBy_TopLevelVariableElement_synthetic_hasSetter() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 void set V(_) {}
 ''');
     await _indexTestUnit('''
@@ -982,7 +982,7 @@
 
   test_subtypes_classDeclaration() async {
     String libP = 'package:test/lib.dart;package:test/lib.dart';
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 class B {}
 class C {}
@@ -1032,7 +1032,7 @@
 
   test_subtypes_classTypeAlias() async {
     String libP = 'package:test/lib.dart;package:test/lib.dart';
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 class B {}
 class C {}
@@ -1070,7 +1070,7 @@
 
   test_subtypes_mixinDeclaration() async {
     String libP = 'package:test/lib.dart;package:test/lib.dart';
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 class A {}
 class B {}
 class C {}
@@ -1336,10 +1336,10 @@
     return _getStringId(str);
   }
 
-  Future<Null> _indexTestUnit(String code) async {
+  Future<void> _indexTestUnit(String code) async {
     addTestFile(code);
 
-    AnalysisResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     testUnit = result.unit;
     testUnitElement = testUnit.declaredElement;
     testLibraryElement = testUnitElement.library;
@@ -1348,8 +1348,6 @@
     List<int> indexBytes = indexBuilder.toBuffer();
     index = new AnalysisDriverUnitIndex.fromBuffer(indexBytes);
   }
-
-  String _p(String path) => provider.convertPath(path);
 }
 
 class _ElementIndexAssert {
diff --git a/pkg/analyzer/test/src/dart/analysis/protected_file_byte_store_test.dart b/pkg/analyzer/test/src/dart/analysis/protected_file_byte_store_test.dart
deleted file mode 100644
index 05bcad5..0000000
--- a/pkg/analyzer/test/src/dart/analysis/protected_file_byte_store_test.dart
+++ /dev/null
@@ -1,269 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:io' as io;
-
-import 'package:analyzer/src/dart/analysis/protected_file_byte_store.dart';
-import 'package:path/path.dart' as pathos;
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(ProtectedKeysTest);
-    defineReflectiveTests(ProtectedFileByteStoreTest);
-  });
-}
-
-List<int> _b(int length) {
-  return new List<int>.filled(length, 0);
-}
-
-@reflectiveTest
-class ProtectedFileByteStoreTest {
-  static const PADDING = 4;
-
-  io.Directory cacheDirectory;
-  String cachePath;
-  ProtectedFileByteStore store;
-
-  int time = 0;
-
-  String get protectedKeysText {
-    String path =
-        pathos.join(cachePath, ProtectedFileByteStore.PROTECTED_FILE_NAME);
-    return new io.File(path).readAsStringSync();
-  }
-
-  void setUp() {
-    io.Directory systemTemp = io.Directory.systemTemp;
-    cacheDirectory = systemTemp.createTempSync('ProtectedFileByteStoreTest');
-    cachePath = cacheDirectory.absolute.path;
-    _createStore();
-  }
-
-  void tearDown() {
-    try {
-      cacheDirectory.deleteSync(recursive: true);
-    } on io.FileSystemException {}
-  }
-
-  test_flush() async {
-    store.put('a', _b(1));
-    store.put('b', _b(2));
-    store.put('c', _b(3));
-    store.put('d', _b(4));
-
-    store.updateProtectedKeys(add: ['b', 'd']);
-
-    // Add a delay to give the store time to write to disk.
-    await new Future.delayed(const Duration(milliseconds: 200));
-
-    // Flush, only protected 'b' and 'd' survive.
-    store.flush();
-    store.flush();
-    _assertCacheContent({'b': 2, 'd': 4}, ['a', 'c']);
-
-    // Remove 'b' and flush.
-    // Only 'd' survives.
-    store.updateProtectedKeys(remove: ['b']);
-    store.flush();
-    _assertCacheContent({'d': 4}, ['b']);
-  }
-
-  test_put() async {
-    store.put('a', _b(65));
-    store.put('b', _b(63));
-    store.put('c', _b(1));
-
-    // We can access all results.
-    expect(store.get('a'), hasLength(65));
-    expect(store.get('b'), hasLength(63));
-    expect(store.get('c'), hasLength(1));
-
-    // Add a delay to give the store time to write to disk.
-    await new Future.delayed(const Duration(milliseconds: 200));
-
-    _assertCacheContent({'a': 65, 'b': 63, 'c': 1}, []);
-  }
-
-  test_put_reservedKey() {
-    expect(() {
-      store.put(ProtectedFileByteStore.PROTECTED_FILE_NAME, <int>[]);
-    }, throwsArgumentError);
-  }
-
-  test_updateProtectedKeys_add() {
-    store.updateProtectedKeys(add: ['a', 'b']);
-    _assertKeys({'a': 0, 'b': 0});
-
-    time++;
-    store.updateProtectedKeys(add: ['c']);
-    _assertKeys({'a': 0, 'b': 0, 'c': 1});
-  }
-
-  test_updateProtectedKeys_add_hasSame() {
-    store.updateProtectedKeys(add: ['a', 'b', 'c']);
-    _assertKeys({'a': 0, 'b': 0, 'c': 0});
-
-    time++;
-    store.updateProtectedKeys(add: ['b', 'd']);
-    _assertKeys({'a': 0, 'b': 1, 'c': 0, 'd': 1});
-  }
-
-  test_updateProtectedKeys_add_removeTooOld() {
-    store.updateProtectedKeys(add: ['a', 'b']);
-    _assertKeys({'a': 0, 'b': 0});
-
-    // Move time to 10 ms, both 'a' and 'b' are still alive.
-    time = 10;
-    store.updateProtectedKeys(add: ['c']);
-    _assertKeys({'a': 0, 'b': 0, 'c': 10});
-
-    // Move time to 11 ms, now 'a' and 'b' are too old and removed.
-    time = 11;
-    store.updateProtectedKeys(add: ['d']);
-    _assertKeys({'c': 10, 'd': 11});
-  }
-
-  test_updateProtectedKeys_add_removeTooOld_nullDuration() {
-    _createStore(protectionDuration: null);
-
-    store.updateProtectedKeys(add: ['a', 'b']);
-    _assertKeys({'a': 0, 'b': 0});
-
-    // Move time far into the future, both 'a' and 'b' are still alive.
-    time = 1 << 30;
-    store.updateProtectedKeys(add: ['c']);
-    _assertKeys({'a': 0, 'b': 0, 'c': time});
-  }
-
-  test_updateProtectedKeys_addRemove() {
-    store.updateProtectedKeys(add: ['a', 'b', 'c']);
-    _assertKeys({'a': 0, 'b': 0, 'c': 0});
-
-    time++;
-    store.updateProtectedKeys(add: ['d'], remove: ['b']);
-    _assertKeys({'a': 0, 'c': 0, 'd': 1});
-  }
-
-  test_updateProtectedKeys_addRemove_same() {
-    store.updateProtectedKeys(add: ['a', 'b', 'c']);
-    _assertKeys({'a': 0, 'b': 0, 'c': 0});
-
-    time++;
-    store.updateProtectedKeys(add: ['b'], remove: ['b']);
-    _assertKeys({'a': 0, 'c': 0});
-  }
-
-  test_updateProtectedKeys_remove() {
-    store.updateProtectedKeys(add: ['a', 'b', 'c']);
-    _assertKeys({'a': 0, 'b': 0, 'c': 0});
-
-    time++;
-    store.updateProtectedKeys(remove: ['b']);
-    _assertKeys({'a': 0, 'c': 0});
-  }
-
-  void _assertCacheContent(Map<String, int> includes, List<String> excludes) {
-    Map<String, int> keyToLength = {};
-    for (var file in cacheDirectory.listSync()) {
-      String key = pathos.basename(file.path);
-      if (file is io.File) {
-        keyToLength[key] = file.lengthSync();
-      }
-    }
-    includes.forEach((expectedKey, expectedLength) {
-      expect(keyToLength, contains(expectedKey));
-      expect(keyToLength, containsPair(expectedKey, expectedLength + PADDING));
-    });
-    for (var excludedKey in excludes) {
-      expect(keyToLength.keys, isNot(contains(excludedKey)));
-    }
-  }
-
-  void _assertKeys(Map<String, int> expected) {
-    var path =
-        pathos.join(cachePath, ProtectedFileByteStore.PROTECTED_FILE_NAME);
-    var text = new io.File(path).readAsStringSync();
-    var keys = new ProtectedKeys.decode(text);
-    expect(keys.map.keys, expected.keys);
-    expected.forEach((key, start) {
-      expect(keys.map, containsPair(key, start));
-    });
-  }
-
-  void _createStore(
-      {Duration protectionDuration: const Duration(milliseconds: 10)}) {
-    store = new ProtectedFileByteStore(cachePath,
-        protectionDuration: protectionDuration,
-        cacheSizeBytes: 256,
-        getCurrentTime: _getTime);
-  }
-
-  int _getTime() => time;
-}
-
-@reflectiveTest
-class ProtectedKeysTest {
-  test_decode() {
-    var keys = new ProtectedKeys({'/a/b/c': 10, '/a/d/e': 123});
-
-    String text = keys.encode();
-    expect(text, r'''
-/a/b/c
-10
-/a/d/e
-123''');
-
-    keys = _decode(text);
-    expect(keys.map['/a/b/c'], 10);
-    expect(keys.map['/a/d/e'], 123);
-  }
-
-  test_decode_empty() {
-    var keys = _decode('');
-    expect(keys.map, isEmpty);
-  }
-
-  test_decode_error_notEvenNumberOfLines() {
-    var keys = _decode('a');
-    expect(keys.map, isEmpty);
-  }
-
-  test_decode_error_startIsEmpty() {
-    var keys = _decode('a\n');
-    expect(keys.map, isEmpty);
-  }
-
-  test_decode_error_startIsNotInt() {
-    var keys = _decode('a\n1.23');
-    expect(keys.map, isEmpty);
-  }
-
-  test_decode_error_startIsNotNumber() {
-    var keys = _decode('a\nb');
-    expect(keys.map, isEmpty);
-  }
-
-  test_removeOlderThan() {
-    var keys = new ProtectedKeys({'a': 1, 'b': 2, 'c': 3});
-    _assertKeys(keys, {'a': 1, 'b': 2, 'c': 3});
-
-    keys.removeOlderThan(5, 7);
-    _assertKeys(keys, {'b': 2, 'c': 3});
-  }
-
-  void _assertKeys(ProtectedKeys keys, Map<String, int> expected) {
-    expect(keys.map.keys, expected.keys);
-    expected.forEach((key, start) {
-      expect(keys.map, containsPair(key, start));
-    });
-  }
-
-  ProtectedKeys _decode(String text) {
-    return new ProtectedKeys.decode(text);
-  }
-}
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index ad2bc6e..8be9b97 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -1,14 +1,14 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 import 'dart:collection';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart' hide Declaration;
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/search.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/member.dart';
@@ -149,15 +149,15 @@
   }
 
   test_declarations_discover() async {
-    var t = _p('/test/lib/t.dart');
-    var a = _p('/aaa/lib/a.dart');
-    var b = _p('/bbb/lib/b.dart');
-    var c = _p('/ccc/lib/c.dart');
+    var t = convertPath('/test/lib/t.dart');
+    var a = convertPath('/aaa/lib/a.dart');
+    var b = convertPath('/bbb/lib/b.dart');
+    var c = convertPath('/ccc/lib/c.dart');
 
-    provider.newFile(t, 'class T {}');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
-    provider.newFile(c, 'class C {}');
+    newFile(t, content: 'class T {}');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
+    newFile(c, content: 'class C {}');
 
     driver.addFile(t);
 
@@ -170,11 +170,11 @@
   }
 
   test_declarations_duplicateFile() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
 
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -243,10 +243,10 @@
   }
 
   test_declarations_onlyForFile() async {
-    var a = _p('/test/lib/a.dart');
-    var b = _p('/test/lib/b.dart');
-    provider.newFile(a, 'class A {}');
-    provider.newFile(b, 'class B {}');
+    var a = convertPath('/test/lib/a.dart');
+    var b = convertPath('/test/lib/b.dart');
+    newFile(a, content: 'class A {}');
+    newFile(b, content: 'class B {}');
 
     driver.addFile(a);
     driver.addFile(b);
@@ -423,15 +423,15 @@
   }
 
   test_references_discover() async {
-    var t = _p('/test/lib/t.dart');
-    var a = _p('/aaa/lib/a.dart');
-    var b = _p('/bbb/lib/b.dart');
-    var c = _p('/ccc/lib/c.dart');
+    var t = convertPath('/test/lib/t.dart');
+    var a = convertPath('/aaa/lib/a.dart');
+    var b = convertPath('/bbb/lib/b.dart');
+    var c = convertPath('/ccc/lib/c.dart');
 
-    provider.newFile(t, 'List t;');
-    provider.newFile(a, 'List a;');
-    provider.newFile(b, 'List b;');
-    provider.newFile(c, 'List c;');
+    newFile(t, content: 'List t;');
+    newFile(a, content: 'List a;');
+    newFile(b, content: 'List b;');
+    newFile(c, content: 'List c;');
 
     driver.addFile(t);
 
@@ -456,13 +456,13 @@
   }
 
   test_references_discover_onlyOwned() async {
-    var t = _p('/test/lib/t.dart');
-    var a = _p('/aaa/lib/a.dart');
-    var b = _p('/bbb/lib/b.dart');
+    var t = convertPath('/test/lib/t.dart');
+    var a = convertPath('/aaa/lib/a.dart');
+    var b = convertPath('/bbb/lib/b.dart');
 
-    provider.newFile(t, 'List t;');
-    provider.newFile(a, 'List a;');
-    provider.newFile(b, 'List b;');
+    newFile(t, content: 'List t;');
+    newFile(a, content: 'List a;');
+    newFile(b, content: 'List b;');
 
     driver.addFile(t);
     driver.addFile(a);
@@ -492,11 +492,11 @@
   }
 
   test_references_discover_onlyOwned_samePath() async {
-    var p = _p('/test/lib/t.dart');
-    provider.newFile(p, 'int t;');
+    var p = convertPath('/test/lib/t.dart');
+    newFile(p, content: 'int t;');
 
     var driver1 = createAnalysisDriver(packageMap: {
-      'test': [provider.newFolder(_p('/test/lib'))]
+      'test': [newFolder('/test/lib')]
     });
     var driver2 = createAnalysisDriver(packageMap: {});
 
@@ -512,17 +512,17 @@
   }
 
   test_references_discover_onlyOwned_sameUri() async {
-    var a = _p('/aaa/lib/t.dart');
-    var b = _p('/bbb/lib/t.dart');
+    var a = convertPath('/aaa/lib/t.dart');
+    var b = convertPath('/bbb/lib/t.dart');
 
-    provider.newFile(a, 'int t;');
-    provider.newFile(b, 'double t;');
+    newFile(a, content: 'int t;');
+    newFile(b, content: 'double t;');
 
     var driver1 = createAnalysisDriver(packageMap: {
-      'ttt': [provider.newFolder(_p('/aaa/lib'))]
+      'ttt': [newFolder('/aaa/lib')]
     });
     var driver2 = createAnalysisDriver(packageMap: {
-      'ttt': [provider.newFolder(_p('/bbb/lib'))]
+      'ttt': [newFolder('/bbb/lib')]
     });
 
     // driver1 owns `/aaa/lib/t.dart` with `package:ttt/t.dart`.
@@ -620,7 +620,7 @@
     ClassElement randomElement;
     {
       String randomPath = sdk.mapDartUri('dart:math').fullName;
-      AnalysisResult result = await driver.getResult(randomPath);
+      ResolvedUnitResult result = await driver.getResult(randomPath);
       randomElement = result.unit.declaredElement.getType('Random');
     }
 
@@ -680,7 +680,7 @@
   }
 
   test_searchReferences_ClassElement_definedOutside() async {
-    provider.newFile(_p('$testProject/lib.dart'), r'''
+    newFile('$testProject/lib.dart', content: r'''
 class A {};
 ''');
     await _resolveTestUnit('''
@@ -713,7 +713,7 @@
   }
 
   test_searchReferences_CompilationUnitElement() async {
-    provider.newFile(_p('$testProject/foo.dart'), '');
+    newFile('$testProject/foo.dart');
     await _resolveTestUnit('''
 import 'foo.dart'; // import
 export 'foo.dart'; // export
@@ -750,14 +750,14 @@
   }
 
   test_searchReferences_ConstructorElement_default_otherFile() async {
-    String other = _p('$testProject/other.dart');
+    String other = convertPath('$testProject/other.dart');
     String otherCode = '''
 import 'test.dart';
 main() {
   new A(); // in other
 }
 ''';
-    provider.newFile(other, otherCode);
+    newFile(other, content: otherCode);
     driver.addFile(other);
 
     await _resolveTestUnit('''
@@ -962,7 +962,7 @@
   }
 
   test_searchReferences_ImportElement_noPrefix_inPackage() async {
-    testFile = _p('/aaa/lib/a.dart');
+    testFile = convertPath('/aaa/lib/a.dart');
     await _resolveTestUnit('''
 import 'dart:math' show max, PI, Random hide min;
 export 'dart:math' show max, PI, Random hide min;
@@ -1063,8 +1063,8 @@
   test_searchReferences_LibraryElement() async {
     var codeA = 'part of lib; // A';
     var codeB = 'part of lib; // B';
-    provider.newFile(_p('$testProject/unitA.dart'), codeA);
-    provider.newFile(_p('$testProject/unitB.dart'), codeB);
+    newFile('$testProject/unitA.dart', content: codeA);
+    newFile('$testProject/unitB.dart', content: codeB);
     await _resolveTestUnit('''
 library lib;
 part 'unitA.dart';
@@ -1083,14 +1083,14 @@
   }
 
   test_searchReferences_LibraryElement_inPackage() async {
-    testFile = _p('/aaa/lib/a.dart');
-    var partPathA = _p('/aaa/lib/unitA.dart');
-    var partPathB = _p('/aaa/lib/unitB.dart');
+    testFile = convertPath('/aaa/lib/a.dart');
+    var partPathA = convertPath('/aaa/lib/unitA.dart');
+    var partPathB = convertPath('/aaa/lib/unitB.dart');
 
     var codeA = 'part of lib; // A';
     var codeB = 'part of lib; // B';
-    provider.newFile(partPathA, codeA);
-    provider.newFile(partPathB, codeB);
+    newFile(partPathA, content: codeA);
+    newFile(partPathB, content: codeB);
     await _resolveTestUnit('''
 library lib;
 part 'unitA.dart';
@@ -1152,7 +1152,7 @@
   }
 
   test_searchReferences_LocalVariableElement_inPackage() async {
-    testFile = _p('/aaa/lib/a.dart');
+    testFile = convertPath('/aaa/lib/a.dart');
 
     await _resolveTestUnit('''
 main() {
@@ -1370,7 +1370,7 @@
 part of my_lib;
 ppp.Future c;
 ''';
-    provider.newFile(_p('$testProject/my_part.dart'), partCode);
+    newFile('$testProject/my_part.dart', content: partCode);
     await _resolveTestUnit('''
 library my_lib;
 import 'dart:async' as ppp;
@@ -1393,14 +1393,14 @@
   }
 
   test_searchReferences_PrefixElement_inPackage() async {
-    testFile = _p('/aaa/lib/a.dart');
-    var partPath = _p('/aaa/lib/my_part.dart');
+    testFile = convertPath('/aaa/lib/a.dart');
+    var partPath = convertPath('/aaa/lib/my_part.dart');
 
     String partCode = r'''
 part of my_lib;
 ppp.Future c;
 ''';
-    provider.newFile(partPath, partCode);
+    newFile(partPath, content: partCode);
     await _resolveTestUnit('''
 library my_lib;
 import 'dart:async' as ppp;
@@ -1423,14 +1423,14 @@
   }
 
   test_searchReferences_private_declaredInDefiningUnit() async {
-    String p1 = _p('$testProject/part1.dart');
-    String p2 = _p('$testProject/part2.dart');
-    String p3 = _p('$testProject/part3.dart');
+    String p1 = convertPath('$testProject/part1.dart');
+    String p2 = convertPath('$testProject/part2.dart');
+    String p3 = convertPath('$testProject/part3.dart');
     String code1 = 'part of lib; _C v1;';
     String code2 = 'part of lib; _C v2;';
-    provider.newFile(p1, code1);
-    provider.newFile(p2, code2);
-    provider.newFile(p3, 'part of lib; int v3;');
+    newFile(p1, content: code1);
+    newFile(p2, content: code2);
+    newFile(p3, content: 'part of lib; int v3;');
 
     driver.addFile(p1);
     driver.addFile(p2);
@@ -1459,9 +1459,9 @@
   }
 
   test_searchReferences_private_declaredInPart() async {
-    String p = _p('$testProject/lib.dart');
-    String p1 = _p('$testProject/part1.dart');
-    String p2 = _p('$testProject/part2.dart');
+    String p = convertPath('$testProject/lib.dart');
+    String p1 = convertPath('$testProject/part1.dart');
+    String p2 = convertPath('$testProject/part2.dart');
 
     var code = '''
 library lib;
@@ -1476,15 +1476,15 @@
 ''';
     String code2 = 'part of lib; _C v2;';
 
-    provider.newFile(p, code);
-    provider.newFile(p1, code1);
-    provider.newFile(p2, code2);
+    newFile(p, content: code);
+    newFile(p1, content: code1);
+    newFile(p2, content: code2);
 
     driver.addFile(p);
     driver.addFile(p1);
     driver.addFile(p2);
 
-    AnalysisResult result = await driver.getResult(p);
+    ResolvedUnitResult result = await driver.getResult(p);
     testUnit = result.unit;
     testUnitElement = testUnit.declaredElement;
     testLibraryElement = testUnitElement.library;
@@ -1505,15 +1505,15 @@
   }
 
   test_searchReferences_private_inPackage() async {
-    testFile = _p('/aaa/lib/a.dart');
-    var p1 = _p('/aaa/lib/part1.dart');
-    var p2 = _p('/aaa/lib/part2.dart');
+    testFile = convertPath('/aaa/lib/a.dart');
+    var p1 = convertPath('/aaa/lib/part1.dart');
+    var p2 = convertPath('/aaa/lib/part2.dart');
 
     String code1 = 'part of lib; _C v1;';
     String code2 = 'part of lib; _C v2;';
 
-    provider.newFile(p1, code1);
-    provider.newFile(p2, code2);
+    newFile(p1, content: code1);
+    newFile(p2, content: code2);
 
     await _resolveTestUnit('''
 library lib;
@@ -1581,7 +1581,7 @@
   }
 
   test_searchReferences_TopLevelVariableElement() async {
-    provider.newFile(_p('$testProject/lib.dart'), '''
+    newFile('$testProject/lib.dart', content: '''
 library lib;
 var V;
 ''');
@@ -1768,15 +1768,15 @@
   }
 
   test_subtypes_discover() async {
-    var pathT = _p('/test/lib/t.dart');
-    var pathA = _p('/aaa/lib/a.dart');
-    var pathB = _p('/bbb/lib/b.dart');
+    var pathT = convertPath('/test/lib/t.dart');
+    var pathA = convertPath('/aaa/lib/a.dart');
+    var pathB = convertPath('/bbb/lib/b.dart');
 
     var tUri = 'package:test/t.dart';
     var aUri = 'package:aaa/a.dart';
     var bUri = 'package:bbb/b.dart';
 
-    provider.newFile(pathT, r'''
+    newFile(pathT, content: r'''
 import 'package:aaa/a.dart';
 
 class T1 extends A {
@@ -1788,7 +1788,7 @@
 }
 ''');
 
-    provider.newFile(pathB, r'''
+    newFile(pathB, content: r'''
 import 'package:aaa/a.dart';
 
 class B extends A {
@@ -1796,7 +1796,7 @@
 }
 ''');
 
-    provider.newFile(pathA, r'''
+    newFile(pathA, content: r'''
 class A {
   void method1() {}
   void method2() {}
@@ -1830,15 +1830,15 @@
   }
 
   test_subTypes_discover() async {
-    var t = _p('/test/lib/t.dart');
-    var a = _p('/aaa/lib/a.dart');
-    var b = _p('/bbb/lib/b.dart');
-    var c = _p('/ccc/lib/c.dart');
+    var t = convertPath('/test/lib/t.dart');
+    var a = convertPath('/aaa/lib/a.dart');
+    var b = convertPath('/bbb/lib/b.dart');
+    var c = convertPath('/ccc/lib/c.dart');
 
-    provider.newFile(t, 'class T implements List {}');
-    provider.newFile(a, 'class A implements List {}');
-    provider.newFile(b, 'class B implements List {}');
-    provider.newFile(c, 'class C implements List {}');
+    newFile(t, content: 'class T implements List {}');
+    newFile(a, content: 'class A implements List {}');
+    newFile(b, content: 'class B implements List {}');
+    newFile(c, content: 'class C implements List {}');
 
     driver.addFile(t);
 
@@ -1863,13 +1863,13 @@
   }
 
   test_subtypes_files() async {
-    String pathB = _p('$testProject/b.dart');
-    String pathC = _p('$testProject/c.dart');
-    provider.newFile(pathB, r'''
+    String pathB = convertPath('$testProject/b.dart');
+    String pathC = convertPath('$testProject/c.dart');
+    newFile(pathB, content: r'''
 import 'test.dart';
 class B extends A {}
 ''');
-    provider.newFile(pathC, r'''
+    newFile(pathC, content: r'''
 import 'test.dart';
 class C extends A {}
 class D {}
@@ -2016,24 +2016,22 @@
     return ElementLocator.locate(node);
   }
 
-  String _p(String path) => provider.convertPath(path);
-
-  Future<Null> _resolveTestUnit(String code, {bool addToDriver: true}) async {
+  Future<void> _resolveTestUnit(String code, {bool addToDriver: true}) async {
     if (addToDriver) {
       addTestFile(code);
     } else {
       testCode = code;
-      provider.newFile(testFile, testCode);
+      newFile(testFile, content: testCode);
     }
     if (testUnit == null) {
-      AnalysisResult result = await driver.getResult(testFile);
+      ResolvedUnitResult result = await driver.getResult(testFile);
       testUnit = result.unit;
       testUnitElement = testUnit.declaredElement;
       testLibraryElement = testUnitElement.library;
     }
   }
 
-  Future<Null> _verifyNameReferences(
+  Future<void> _verifyNameReferences(
       String name, List<ExpectedResult> expectedMatches) async {
     var searchedFiles = new SearchedFiles();
     List<SearchResult> results =
diff --git a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
index 81e7cbb..f815fbc 100644
--- a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
@@ -2,12 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'base.dart';
+import '../resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,163 +17,408 @@
 }
 
 @reflectiveTest
-class AnalysisSessionHelperTest extends BaseAnalysisDriverTest {
-  AnalysisSessionHelper sessionHelper;
+class AnalysisSessionHelperTest extends DriverResolutionTest {
+  AnalysisSessionHelper helper;
 
   @override
   void setUp() {
     super.setUp();
-    sessionHelper = new AnalysisSessionHelper(driver.currentSession);
+    helper = new AnalysisSessionHelper(driver.currentSession);
   }
 
   test_getClass_defined() async {
-    var path = _p('/c.dart');
-    var file = provider.newFile(path, r'''
+    var file = newFile('/test/lib/c.dart', content: r'''
 class C {}
 int v = 0;
 ''');
     String uri = file.toUri().toString();
 
-    var element = await sessionHelper.getClass(uri, 'C');
+    var element = await helper.getClass(uri, 'C');
     expect(element, isNotNull);
     expect(element.displayName, 'C');
   }
 
   test_getClass_defined_notClass() async {
-    var path = _p('/c.dart');
-    var file = provider.newFile(path, r'''
+    var file = newFile('/test/lib/c.dart', content: r'''
 int v = 0;
 ''');
     String uri = file.toUri().toString();
 
-    var element = await sessionHelper.getClass(uri, 'v');
+    var element = await helper.getClass(uri, 'v');
     expect(element, isNull);
   }
 
   test_getClass_exported() async {
-    var a = _p('/a.dart');
-    var b = _p('/b.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class A {}
 ''');
-    var bFile = provider.newFile(b, r'''
+    var bFile = newFile('/test/lib/b.dart', content: r'''
 export 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
 
-    var element = await sessionHelper.getClass(bUri, 'A');
+    var element = await helper.getClass(bUri, 'A');
     expect(element, isNotNull);
     expect(element.displayName, 'A');
   }
 
   test_getClass_imported() async {
-    var a = _p('/a.dart');
-    var b = _p('/b.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 class A {}
 ''');
-    var bFile = provider.newFile(b, r'''
+    var bFile = newFile('/test/lib/b.dart', content: r'''
 import 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
 
-    var element = await sessionHelper.getClass(bUri, 'A');
+    var element = await helper.getClass(bUri, 'A');
     expect(element, isNull);
   }
 
+  test_getElementDeclaration_class() async {
+    newFile('/test/lib/test.dart', content: r'''
+class A {}
+''');
+    await resolveTestFile();
+
+    var element = findNode.classDeclaration('A').declaredElement;
+    var result = await helper.getElementDeclaration(element);
+    ClassDeclaration node = result.node;
+    expect(node.name.name, 'A');
+  }
+
+  test_getElementDeclaration_class_duplicate() async {
+    newFile('/test/lib/test.dart', content: r'''
+class A {} // 1
+class A {} // 2
+''');
+    await resolveTestFile();
+
+    {
+      var element = findNode.classDeclaration('A {} // 1').declaredElement;
+      var result = await helper.getElementDeclaration(element);
+      ClassDeclaration node = result.node;
+      expect(node.name.name, 'A');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('A {} // 1'),
+      );
+    }
+
+    {
+      var element = findNode.classDeclaration('A {} // 2').declaredElement;
+      var result = await helper.getElementDeclaration(element);
+      ClassDeclaration node = result.node;
+      expect(node.name.name, 'A');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('A {} // 2'),
+      );
+    }
+  }
+
+  test_getElementDeclaration_class_inPart() async {
+    newFile('/test/lib/a.dart', content: r'''
+part of 'test.dart';
+class A {}
+''');
+    newFile('/test/lib/test.dart', content: r'''
+part 'a.dart';
+''');
+    await resolveTestFile();
+
+    var library = this.result.unit.declaredElement.library;
+    var element = library.getType('A');
+    var result = await helper.getElementDeclaration(element);
+    ClassDeclaration node = result.node;
+    expect(node.name.name, 'A');
+  }
+
+  test_getElementDeclaration_constructor() async {
+    newFile('/test/lib/test.dart', content: r'''
+class A {
+  A();
+  A.named();
+}
+''');
+    await resolveTestFile();
+
+    {
+      var unnamed = findNode.constructor('A();').declaredElement;
+      var result = await helper.getElementDeclaration(unnamed);
+      ConstructorDeclaration node = result.node;
+      expect(node.name, isNull);
+    }
+
+    {
+      var named = findNode.constructor('A.named();').declaredElement;
+      var result = await helper.getElementDeclaration(named);
+      ConstructorDeclaration node = result.node;
+      expect(node.name.name, 'named');
+    }
+  }
+
+  test_getElementDeclaration_constructor_duplicate_named() async {
+    newFile('/test/lib/test.dart', content: r'''
+class A {
+  A.named(); // 1
+  A.named(); // 2
+}
+''');
+    await resolveTestFile();
+
+    {
+      var element = findNode.constructor('A.named(); // 1').declaredElement;
+      var result = await helper.getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name.name, 'named');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('named(); // 1'),
+      );
+    }
+
+    {
+      var element = findNode.constructor('A.named(); // 2').declaredElement;
+      var result = await helper.getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name.name, 'named');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('named(); // 2'),
+      );
+    }
+  }
+
+  test_getElementDeclaration_constructor_duplicate_unnamed() async {
+    newFile('/test/lib/test.dart', content: r'''
+class A {
+  A(); // 1
+  A(); // 2
+}
+''');
+    await resolveTestFile();
+
+    {
+      var element = findNode.constructor('A(); // 1').declaredElement;
+      var result = await helper.getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name, isNull);
+      expect(
+        node.returnType.offset,
+        this.result.content.indexOf('A(); // 1'),
+      );
+    }
+
+    {
+      var element = findNode.constructor('A(); // 2').declaredElement;
+      var result = await helper.getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name, isNull);
+      expect(
+        node.returnType.offset,
+        this.result.content.indexOf('A(); // 2'),
+      );
+    }
+  }
+
+  test_getElementDeclaration_constructor_synthetic() async {
+    newFile('/test/lib/test.dart', content: r'''
+class A {}
+''');
+    await resolveTestFile();
+
+    var element = findElement.class_('A').unnamedConstructor;
+    expect(element.isSynthetic, isTrue);
+
+    var result = await helper.getElementDeclaration(element);
+    expect(result, isNull);
+  }
+
+  test_getElementDeclaration_field() async {
+    newFile('/test/lib/test.dart', content: r'''
+class C {
+  int foo;
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.field('foo');
+    var result = await helper.getElementDeclaration(element);
+    VariableDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_getElementDeclaration_functionDeclaration_local() async {
+    newFile('/test/lib/test.dart', content: r'''
+main() {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.localFunction('foo');
+    var result = await helper.getElementDeclaration(element);
+    FunctionDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_getElementDeclaration_functionDeclaration_top() async {
+    newFile('/test/lib/test.dart', content: r'''
+void foo() {}
+''');
+    await resolveTestFile();
+
+    var element = findElement.topFunction('foo');
+    var result = await helper.getElementDeclaration(element);
+    FunctionDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_getElementDeclaration_localVariable() async {
+    newFile('/test/lib/test.dart', content: r'''
+main() {
+  int foo;
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.localVar('foo');
+    var result = await helper.getElementDeclaration(element);
+    VariableDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_getElementDeclaration_method() async {
+    newFile('/test/lib/test.dart', content: r'''
+class C {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.method('foo');
+    var result = await helper.getElementDeclaration(element);
+    MethodDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_getElementDeclaration_topLevelVariable() async {
+    newFile('/test/lib/test.dart', content: r'''
+int foo;
+''');
+    await resolveTestFile();
+
+    var element = findElement.topVar('foo');
+    var result = await helper.getElementDeclaration(element);
+    VariableDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_getElementDeclaration_topLevelVariable_synthetic() async {
+    newFile('/test/lib/test.dart', content: r'''
+int get foo => 0;
+''');
+    await resolveTestFile();
+
+    var element = findElement.topVar('foo');
+    var result = await helper.getElementDeclaration(element);
+    expect(result, isNull);
+  }
+
+  test_getResolvedUnitByElement() async {
+    newFile('/test/lib/test.dart', content: r'''
+class A {}
+class B {}
+''');
+    await resolveTestFile();
+
+    var element = findNode.classDeclaration('A').declaredElement;
+    var resolvedUnit = await helper.getResolvedUnitByElement(element);
+    expect(resolvedUnit.unit.declarations, hasLength(2));
+  }
+
   test_getTopLevelPropertyAccessor_defined_getter() async {
-    var path = _p('/test.dart');
-    var file = provider.newFile(path, r'''
+    var file = newFile('/test/lib/test.dart', content: r'''
 int get a => 0;
 ''');
     String uri = file.toUri().toString();
 
-    var element = await sessionHelper.getTopLevelPropertyAccessor(uri, 'a');
+    var element = await helper.getTopLevelPropertyAccessor(uri, 'a');
     expect(element, isNotNull);
     expect(element.kind, ElementKind.GETTER);
     expect(element.displayName, 'a');
   }
 
   test_getTopLevelPropertyAccessor_defined_setter() async {
-    var path = _p('/test.dart');
-    var file = provider.newFile(path, r'''
+    var file = newFile('/test/lib/test.dart', content: r'''
 set a(_) {}
 ''');
     String uri = file.toUri().toString();
 
-    var element = await sessionHelper.getTopLevelPropertyAccessor(uri, 'a=');
+    var element = await helper.getTopLevelPropertyAccessor(uri, 'a=');
     expect(element, isNotNull);
     expect(element.kind, ElementKind.SETTER);
     expect(element.displayName, 'a');
   }
 
   test_getTopLevelPropertyAccessor_defined_variable() async {
-    var path = _p('/test.dart');
-    var file = provider.newFile(path, r'''
+    var file = newFile('/test/lib/test.dart', content: r'''
 int a;
 ''');
     String uri = file.toUri().toString();
 
-    var element = await sessionHelper.getTopLevelPropertyAccessor(uri, 'a');
+    var element = await helper.getTopLevelPropertyAccessor(uri, 'a');
     expect(element, isNotNull);
     expect(element.kind, ElementKind.GETTER);
     expect(element.displayName, 'a');
   }
 
   test_getTopLevelPropertyAccessor_exported() async {
-    var a = _p('/a.dart');
-    var b = _p('/b.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 int a;
 ''');
-    var bFile = provider.newFile(b, r'''
+    var bFile = newFile('/test/lib/b.dart', content: r'''
 export 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
 
-    var element = await sessionHelper.getTopLevelPropertyAccessor(bUri, 'a');
+    var element = await helper.getTopLevelPropertyAccessor(bUri, 'a');
     expect(element, isNotNull);
     expect(element.kind, ElementKind.GETTER);
     expect(element.displayName, 'a');
   }
 
   test_getTopLevelPropertyAccessor_imported() async {
-    var a = _p('/a.dart');
-    var b = _p('/b.dart');
-    provider.newFile(a, r'''
+    newFile('/test/lib/a.dart', content: r'''
 int a;
 ''');
-    var bFile = provider.newFile(b, r'''
+    var bFile = newFile('/test/lib/b.dart', content: r'''
 import 'a.dart';
 ''');
     String bUri = bFile.toUri().toString();
 
-    var element = await sessionHelper.getTopLevelPropertyAccessor(bUri, 'a');
+    var element = await helper.getTopLevelPropertyAccessor(bUri, 'a');
     expect(element, isNull);
   }
 
   test_getTopLevelPropertyAccessor_notDefined() async {
-    var path = _p('/test.dart');
-    var file = provider.newFile(path, r'''
+    var file = newFile('/test/lib/test.dart', content: r'''
 int a;
 ''');
     String uri = file.toUri().toString();
 
-    var element = await sessionHelper.getTopLevelPropertyAccessor(uri, 'b');
+    var element = await helper.getTopLevelPropertyAccessor(uri, 'b');
     expect(element, isNull);
   }
 
   test_getTopLevelPropertyAccessor_notPropertyAccessor() async {
-    var path = _p('/test.dart');
-    var file = provider.newFile(path, r'''
+    var file = newFile('/test/lib/test.dart', content: r'''
 int a() {}
 ''');
     String uri = file.toUri().toString();
 
-    var element = await sessionHelper.getTopLevelPropertyAccessor(uri, 'a');
+    var element = await helper.getTopLevelPropertyAccessor(uri, 'a');
     expect(element, isNull);
   }
-
-  /// Return the [provider] specific path for the given Posix [path].
-  String _p(String path) => provider.convertPath(path);
 }
diff --git a/pkg/analyzer/test/src/dart/analysis/session_test.dart b/pkg/analyzer/test/src/dart/analysis/session_test.dart
index a5b9b87..555c2ec 100644
--- a/pkg/analyzer/test/src/dart/analysis/session_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/session_test.dart
@@ -8,12 +8,11 @@
 import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../context/mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(AnalysisSessionImplTest);
@@ -74,32 +73,207 @@
     expect(library.getType('C'), isNull);
   }
 
-  test_getParsedAstSync() async {
+  test_getParsedLibrary() async {
     newFile(testPath, content: r'''
 class A {}
 class B {}
 ''');
 
-    var unitResult = session.getParsedAstSync(testPath);
-    expect(unitResult.session, session);
-    expect(unitResult.path, testPath);
-    expect(unitResult.uri, Uri.parse('package:test/test.dart'));
-    expect(unitResult.unit.declarations, hasLength(2));
+    var parsedLibrary = session.getParsedLibrary(testPath);
+    expect(parsedLibrary.session, session);
+    expect(parsedLibrary.path, testPath);
+    expect(parsedLibrary.uri, Uri.parse('package:test/test.dart'));
+
+    expect(parsedLibrary.units, hasLength(1));
+    {
+      var parsedUnit = parsedLibrary.units[0];
+      expect(parsedUnit.session, session);
+      expect(parsedUnit.path, testPath);
+      expect(parsedUnit.uri, Uri.parse('package:test/test.dart'));
+      expect(parsedUnit.unit.declarations, hasLength(2));
+    }
   }
 
-  test_getResolvedAst() async {
+  test_getParsedLibrary_getElementDeclaration_class() async {
     newFile(testPath, content: r'''
 class A {}
 class B {}
 ''');
 
-    var unitResult = await session.getResolvedAst(testPath);
+    var library = await session.getLibraryByUri('package:test/test.dart');
+    var parsedLibrary = session.getParsedLibrary(testPath);
+
+    var element = library.getType('A');
+    var declaration = parsedLibrary.getElementDeclaration(element);
+    ClassDeclaration node = declaration.node;
+    expect(node.name.name, 'A');
+    expect(node.offset, 0);
+    expect(node.length, 10);
+  }
+
+  test_getParsedLibrary_getElementDeclaration_notThisLibrary() async {
+    newFile(testPath, content: '');
+
+    var parsedLibrary = await session.getParsedLibrary(testPath);
+
+    var typeProvider = await session.typeProvider;
+    var intClass = typeProvider.intType.element;
+
+    expect(() {
+      parsedLibrary.getElementDeclaration(intClass);
+    }, throwsArgumentError);
+  }
+
+  test_getParsedLibrary_getElementDeclaration_synthetic() async {
+    newFile(testPath, content: r'''
+int foo = 0;
+''');
+
+    var parsedLibrary = session.getParsedLibrary(testPath);
+
+    var unitElement = (await session.getUnitElement(testPath)).element;
+    var fooElement = unitElement.topLevelVariables[0];
+    expect(fooElement.name, 'foo');
+
+    // We can get the variable element declaration.
+    var fooDeclaration = parsedLibrary.getElementDeclaration(fooElement);
+    VariableDeclaration fooNode = fooDeclaration.node;
+    expect(fooNode.name.name, 'foo');
+    expect(fooNode.offset, 4);
+    expect(fooNode.length, 7);
+    expect(fooNode.name.staticElement, isNull);
+
+    // Synthetic elements don't have nodes.
+    expect(parsedLibrary.getElementDeclaration(fooElement.getter), isNull);
+    expect(parsedLibrary.getElementDeclaration(fooElement.setter), isNull);
+  }
+
+  test_getParsedLibrary_invalidPartUri() async {
+    newFile(testPath, content: r'''
+part 'a.dart';
+part ':[invalid uri].dart';
+part 'c.dart';
+''');
+
+    var parsedLibrary = session.getParsedLibrary(testPath);
+
+    expect(parsedLibrary.units, hasLength(3));
+    expect(
+      parsedLibrary.units[0].path,
+      convertPath('/home/test/lib/test.dart'),
+    );
+    expect(
+      parsedLibrary.units[1].path,
+      convertPath('/home/test/lib/a.dart'),
+    );
+    expect(
+      parsedLibrary.units[2].path,
+      convertPath('/home/test/lib/c.dart'),
+    );
+  }
+
+  test_getParsedLibrary_notLibrary() async {
+    newFile(testPath, content: 'part of "a.dart";');
+
+    expect(() {
+      session.getParsedLibrary(testPath);
+    }, throwsArgumentError);
+  }
+
+  test_getParsedLibrary_parts() async {
+    var a = convertPath('/home/test/lib/a.dart');
+    var b = convertPath('/home/test/lib/b.dart');
+    var c = convertPath('/home/test/lib/c.dart');
+
+    var aContent = r'''
+part 'b.dart';
+part 'c.dart';
+
+class A {}
+''';
+
+    var bContent = r'''
+part of 'a.dart';
+
+class B1 {}
+class B2 {}
+''';
+
+    var cContent = r'''
+part of 'a.dart';
+
+class C1 {}
+class C2 {}
+class C3 {}
+''';
+
+    newFile(a, content: aContent);
+    newFile(b, content: bContent);
+    newFile(c, content: cContent);
+
+    var parsedLibrary = session.getParsedLibrary(a);
+    expect(parsedLibrary.path, a);
+    expect(parsedLibrary.uri, Uri.parse('package:test/a.dart'));
+    expect(parsedLibrary.units, hasLength(3));
+
+    {
+      var aUnit = parsedLibrary.units[0];
+      expect(aUnit.path, a);
+      expect(aUnit.uri, Uri.parse('package:test/a.dart'));
+      expect(aUnit.unit.declarations, hasLength(1));
+    }
+
+    {
+      var bUnit = parsedLibrary.units[1];
+      expect(bUnit.path, b);
+      expect(bUnit.uri, Uri.parse('package:test/b.dart'));
+      expect(bUnit.unit.declarations, hasLength(2));
+    }
+
+    {
+      var cUnit = parsedLibrary.units[2];
+      expect(cUnit.path, c);
+      expect(cUnit.uri, Uri.parse('package:test/c.dart'));
+      expect(cUnit.unit.declarations, hasLength(3));
+    }
+  }
+
+  test_getParsedLibraryByElement() async {
+    newFile(testPath, content: '');
+
+    var element = await session.getLibraryByUri('package:test/test.dart');
+
+    var parsedLibrary = session.getParsedLibraryByElement(element);
+    expect(parsedLibrary.session, session);
+    expect(parsedLibrary.path, testPath);
+    expect(parsedLibrary.uri, Uri.parse('package:test/test.dart'));
+    expect(parsedLibrary.units, hasLength(1));
+  }
+
+  test_getParsedLibraryByElement_differentSession() async {
+    newFile(testPath, content: '');
+
+    var element = await session.getLibraryByUri('package:test/test.dart');
+
+    var aaaSession =
+        contextCollection.contextFor(aaaContextPath).currentSession;
+
+    expect(() {
+      aaaSession.getParsedLibraryByElement(element);
+    }, throwsArgumentError);
+  }
+
+  test_getParsedUnit() async {
+    newFile(testPath, content: r'''
+class A {}
+class B {}
+''');
+
+    var unitResult = session.getParsedUnit(testPath);
     expect(unitResult.session, session);
     expect(unitResult.path, testPath);
     expect(unitResult.uri, Uri.parse('package:test/test.dart'));
     expect(unitResult.unit.declarations, hasLength(2));
-    expect(unitResult.typeProvider, isNotNull);
-    expect(unitResult.libraryElement, isNotNull);
   }
 
   test_getResolvedLibrary() async {
@@ -251,6 +425,34 @@
     expect(resolvedLibrary.units[0].unit.declaredElement, isNotNull);
   }
 
+  test_getResolvedLibraryByElement_differentSession() async {
+    newFile(testPath, content: '');
+
+    var element = await session.getLibraryByUri('package:test/test.dart');
+
+    var aaaSession =
+        contextCollection.contextFor(aaaContextPath).currentSession;
+
+    expect(() async {
+      await aaaSession.getResolvedLibraryByElement(element);
+    }, throwsArgumentError);
+  }
+
+  test_getResolvedUnit() async {
+    newFile(testPath, content: r'''
+class A {}
+class B {}
+''');
+
+    var unitResult = await session.getResolvedUnit(testPath);
+    expect(unitResult.session, session);
+    expect(unitResult.path, testPath);
+    expect(unitResult.uri, Uri.parse('package:test/test.dart'));
+    expect(unitResult.unit.declarations, hasLength(2));
+    expect(unitResult.typeProvider, isNotNull);
+    expect(unitResult.libraryElement, isNotNull);
+  }
+
   test_getSourceKind() async {
     newFile(testPath, content: 'class C {}');
 
diff --git a/pkg/analyzer/test/src/dart/analysis/test_all.dart b/pkg/analyzer/test/src/dart/analysis/test_all.dart
index a8e0105..77d968e 100644
--- a/pkg/analyzer/test/src/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/test_all.dart
@@ -12,14 +12,15 @@
 import 'context_root_test.dart' as context_root;
 import 'crc32_test.dart' as crc32_test;
 import 'defined_names_test.dart' as defined_names;
+import 'dependency/test_all.dart' as dependency_test;
 import 'driver_resolution_test.dart' as driver_resolution;
 import 'driver_test.dart' as driver;
+import 'experiments_test.dart' as experiments_test;
 import 'file_byte_store_test.dart' as file_byte_store_test;
 import 'file_state_test.dart' as file_state;
 import 'fletcher16_test.dart' as fletcher16_test;
 import 'index_test.dart' as index;
 import 'mutex_test.dart' as mutex;
-import 'protected_file_byte_store_test.dart' as protected_file_byte_store_test;
 import 'referenced_names_test.dart' as referenced_names;
 import 'search_test.dart' as search;
 import 'session_helper_test.dart' as session_helper;
@@ -36,14 +37,15 @@
     context_root.main();
     crc32_test.main();
     defined_names.main();
+    dependency_test.main();
     driver.main();
     driver_resolution.main();
+    experiments_test.main();
     file_byte_store_test.main();
     file_state.main();
     fletcher16_test.main();
     index.main();
     mutex.main();
-    protected_file_byte_store_test.main();
     referenced_names.main();
     search.main();
     session.main();
diff --git a/pkg/analyzer/test/src/dart/analysis/uri_converter_test.dart b/pkg/analyzer/test/src/dart/analysis/uri_converter_test.dart
index f400cee..c7e291e 100644
--- a/pkg/analyzer/test/src/dart/analysis/uri_converter_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/uri_converter_test.dart
@@ -3,18 +3,16 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/context/context_root.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/uri_converter.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../context/mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(DriverBasedUriConverterTest);
@@ -22,12 +20,10 @@
 }
 
 @reflectiveTest
-class DriverBasedUriConverterTest extends Object with ResourceProviderMixin {
+class DriverBasedUriConverterTest with ResourceProviderMixin {
   DriverBasedUriConverter uriConverter;
 
   void setUp() {
-    resourceProvider = new MemoryResourceProvider();
-
     Folder barFolder = newFolder('/packages/bar/lib');
     Folder fooFolder = newFolder('/packages/foo/lib');
 
diff --git a/pkg/analyzer/test/src/dart/ast/ast_test.dart b/pkg/analyzer/test/src/dart/ast/ast_test.dart
index 1bbecda..f0a6265 100644
--- a/pkg/analyzer/test/src/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/ast_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,7 +6,6 @@
 
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -472,102 +471,24 @@
 
   bool get enableNewAnalysisDriver => true;
 
-  void assertCanBeConst(String snippet, bool expectedResult) {
-    int index = testSource.indexOf(snippet);
-    expect(index >= 0, isTrue);
-    NodeLocator visitor = new NodeLocator(index);
-    AstNodeImpl node = visitor.searchWithin(testUnit);
-    node = node.getAncestor((node) => node is InstanceCreationExpressionImpl);
-    expect(node, isNotNull);
-    expect((node as InstanceCreationExpressionImpl).canBeConst(),
-        expectedResult ? isTrue : isFalse);
-  }
-
   void assertIsConst(String snippet, bool expectedResult) {
     int index = testSource.indexOf(snippet);
     expect(index >= 0, isTrue);
     NodeLocator visitor = new NodeLocator(index);
     AstNodeImpl node = visitor.searchWithin(testUnit);
-    node = node.getAncestor((node) => node is InstanceCreationExpressionImpl);
+    node = node.thisOrAncestorOfType<InstanceCreationExpressionImpl>();
     expect(node, isNotNull);
     expect((node as InstanceCreationExpressionImpl).isConst,
         expectedResult ? isTrue : isFalse);
   }
 
-  void enablePreviewDart2() {
-    resetWith(options: new AnalysisOptionsImpl()..previewDart2 = true);
-  }
-
   Future<void> resolve(String source) async {
     testSource = source;
     testUnit = await resolveSource2('/test.dart', source);
   }
 
-  void test_canBeConst_false_argument_invocation() async {
-    enablePreviewDart2();
-    await resolve('''
-class A {}
-class B {
-  const B(A a);
-}
-A f() => A();
-B g() => B(f());
-''');
-    assertCanBeConst("B(f", false);
-  }
-
-  void test_canBeConst_false_argument_invocationInList() async {
-    enablePreviewDart2();
-    await resolve('''
-class A {}
-class B {
-  const B(a);
-}
-A f() => A();
-B g() => B([f()]);
-''');
-    assertCanBeConst("B([", false);
-  }
-
-  void test_canBeConst_false_argument_nonConstConstructor() async {
-    enablePreviewDart2();
-    await resolve('''
-class A {}
-class B {
-  const B(A a);
-}
-B f() => B(A());
-''');
-    assertCanBeConst("B(A(", false);
-  }
-
-  void test_canBeConst_false_nonConstConstructor() async {
-    enablePreviewDart2();
-    await resolve('''
-class A {}
-A f() => A();
-''');
-    assertCanBeConst("A(", false);
-  }
-
-  @failingTest
-  void test_canBeConst_true_argument_constConstructor() async {
-    enablePreviewDart2();
-    await resolve('''
-class A {
-  const A();
-}
-class B {
-  const B(A a);
-}
-B f() => B(A());
-''');
-    assertCanBeConst("B(A(", true);
-  }
-
   void
       test_isConst_notInContext_constructor_const_constParam_identifier() async {
-    enablePreviewDart2();
     await resolve('''
 var v = C(C.a);
 class C {
@@ -580,7 +501,6 @@
   }
 
   void test_isConst_notInContext_constructor_const_constParam_named() async {
-    enablePreviewDart2();
     await resolve('''
 var v = C(c: C());
 class C {
@@ -592,7 +512,6 @@
 
   void
       test_isConst_notInContext_constructor_const_constParam_named_parens() async {
-    enablePreviewDart2();
     await resolve('''
 var v = C(c: (C()));
 class C {
@@ -603,7 +522,6 @@
   }
 
   void test_isConst_notInContext_constructor_const_constParam_parens() async {
-    enablePreviewDart2();
     await resolve('''
 var v = C( (C.c()) );
 class C {
@@ -615,7 +533,6 @@
   }
 
   void test_isConst_notInContext_constructor_const_generic_named() async {
-    enablePreviewDart2();
     await resolve('''
 f() => <Object>[C<int>.n()];
 class C<E> {
@@ -627,7 +544,6 @@
 
   void
       test_isConst_notInContext_constructor_const_generic_named_prefixed() async {
-    enablePreviewDart2();
     addNamedSource('/c.dart', '''
 class C<E> {
   const C.n();
@@ -641,7 +557,6 @@
   }
 
   void test_isConst_notInContext_constructor_const_generic_unnamed() async {
-    enablePreviewDart2();
     await resolve('''
 f() => <Object>[C<int>()];
 class C<E> {
@@ -653,7 +568,6 @@
 
   void
       test_isConst_notInContext_constructor_const_generic_unnamed_prefixed() async {
-    enablePreviewDart2();
     addNamedSource('/c.dart', '''
 class C<E> {
   const C();
@@ -668,7 +582,6 @@
 
   void
       test_isConst_notInContext_constructor_const_nonConstParam_constructor() async {
-    enablePreviewDart2();
     await resolve('''
 f() {
   return A(B());
@@ -687,7 +600,6 @@
 
   void
       test_isConst_notInContext_constructor_const_nonConstParam_variable() async {
-    enablePreviewDart2();
     await resolve('''
 f(int i) => <Object>[C(i)];
 class C {
@@ -699,7 +611,6 @@
   }
 
   void test_isConst_notInContext_constructor_const_nonGeneric_named() async {
-    enablePreviewDart2();
     await resolve('''
 f() => <Object>[C.n()];
 class C<E> {
@@ -711,7 +622,6 @@
 
   void
       test_isConst_notInContext_constructor_const_nonGeneric_named_prefixed() async {
-    enablePreviewDart2();
     addNamedSource('/c.dart', '''
 class C {
   const C.n();
@@ -725,7 +635,6 @@
   }
 
   void test_isConst_notInContext_constructor_const_nonGeneric_unnamed() async {
-    enablePreviewDart2();
     await resolve('''
 f() => <Object>[C()];
 class C {
@@ -737,7 +646,6 @@
 
   void
       test_isConst_notInContext_constructor_const_nonGeneric_unnamed_prefixed() async {
-    enablePreviewDart2();
     addNamedSource('/c.dart', '''
 class C {
   const C();
@@ -751,7 +659,6 @@
   }
 
   void test_isConst_notInContext_constructor_nonConst() async {
-    enablePreviewDart2();
     await resolve('''
 f() => <Object>[C()];
 class C {
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index de28384..f19f1bd 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -11,11 +11,10 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/java_core.dart';
-import 'package:analyzer/src/generated/java_engine.dart' show Predicate;
-import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/token_factory.dart';
+import 'package:analyzer/src/test_utilities/ast_type_matchers.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -72,21 +71,18 @@
   }
 
   void test_binary_bitAnd() {
-    Object value = _getConstantValue("74 & 42");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, 74 & 42);
+    int value = _getConstantValue("74 & 42");
+    expect(value, 74 & 42);
   }
 
   void test_binary_bitOr() {
-    Object value = _getConstantValue("74 | 42");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, 74 | 42);
+    int value = _getConstantValue("74 | 42");
+    expect(value, 74 | 42);
   }
 
   void test_binary_bitXor() {
-    Object value = _getConstantValue("74 ^ 42");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, 74 ^ 42);
+    int value = _getConstantValue("74 ^ 42");
+    expect(value, 74 ^ 42);
   }
 
   void test_binary_divide_double() {
@@ -135,9 +131,8 @@
   }
 
   void test_binary_leftShift() {
-    Object value = _getConstantValue("16 << 2");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, 64);
+    int value = _getConstantValue("16 << 2");
+    expect(value, 64);
   }
 
   void test_binary_lessThan() {
@@ -241,9 +236,8 @@
   }
 
   void test_binary_rightShift() {
-    Object value = _getConstantValue("64 >> 2");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, 16);
+    int value = _getConstantValue("64 >> 2");
+    expect(value, 16);
   }
 
   void test_binary_times_double() {
@@ -257,15 +251,13 @@
   }
 
   void test_binary_truncatingDivide_double() {
-    Object value = _getConstantValue("3.2 ~/ 2.3");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, 1);
+    int value = _getConstantValue("3.2 ~/ 2.3");
+    expect(value, 1);
   }
 
   void test_binary_truncatingDivide_integer() {
-    Object value = _getConstantValue("10 ~/ 3");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, 3);
+    int value = _getConstantValue("10 ~/ 3");
+    expect(value, 3);
   }
 
   void test_literal_boolean_false() {
@@ -279,23 +271,19 @@
   }
 
   void test_literal_list() {
-    Object value = _getConstantValue("['a', 'b', 'c']");
-    EngineTestCase.assertInstanceOf((obj) => obj is List, List, value);
-    List list = value as List;
-    expect(list.length, 3);
-    expect(list[0], "a");
-    expect(list[1], "b");
-    expect(list[2], "c");
+    List value = _getConstantValue("['a', 'b', 'c']");
+    expect(value.length, 3);
+    expect(value[0], "a");
+    expect(value[1], "b");
+    expect(value[2], "c");
   }
 
   void test_literal_map() {
-    Object value = _getConstantValue("{'a' : 'm', 'b' : 'n', 'c' : 'o'}");
-    EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, value);
-    Map map = value as Map;
-    expect(map.length, 3);
-    expect(map["a"], "m");
-    expect(map["b"], "n");
-    expect(map["c"], "o");
+    Map value = _getConstantValue("{'a' : 'm', 'b' : 'n', 'c' : 'o'}");
+    expect(value.length, 3);
+    expect(value["a"], "m");
+    expect(value["b"], "n");
+    expect(value["c"], "o");
   }
 
   void test_literal_null() {
@@ -339,9 +327,8 @@
   }
 
   void test_unary_bitNot() {
-    Object value = _getConstantValue("~42");
-    EngineTestCase.assertInstanceOf((obj) => obj is int, int, value);
-    expect(value as int, ~42);
+    int value = _getConstantValue("~42");
+    expect(value, ~42);
   }
 
   void test_unary_logicalNot() {
@@ -411,8 +398,8 @@
 class NodeLocatorTest extends ParserTestCase {
   void test_range() {
     CompilationUnit unit = parseCompilationUnit("library myLib;");
-    _assertLocate(
-        unit, 4, 10, (node) => node is LibraryDirective, LibraryDirective);
+    var node = _assertLocate(unit, 4, 10);
+    expect(node, isLibraryDirective);
   }
 
   void test_searchWithin_null() {
@@ -422,8 +409,8 @@
 
   void test_searchWithin_offset() {
     CompilationUnit unit = parseCompilationUnit("library myLib;");
-    _assertLocate(
-        unit, 10, 10, (node) => node is SimpleIdentifier, SimpleIdentifier);
+    var node = _assertLocate(unit, 10, 10);
+    expect(node, isSimpleIdentifier);
   }
 
   void test_searchWithin_offsetAfterNode() {
@@ -444,8 +431,11 @@
     expect(node, isNull);
   }
 
-  void _assertLocate(CompilationUnit unit, int start, int end,
-      Predicate<Object> predicate, Type expectedClass) {
+  AstNode _assertLocate(
+    CompilationUnit unit,
+    int start,
+    int end,
+  ) {
     NodeLocator locator = new NodeLocator(start, end);
     AstNode node = locator.searchWithin(unit);
     expect(node, isNotNull);
@@ -453,7 +443,7 @@
     expect(node.offset <= start, isTrue, reason: "Node starts after range");
     expect(node.offset + node.length > end, isTrue,
         reason: "Node ends before range");
-    EngineTestCase.assertInstanceOf(predicate, expectedClass, node);
+    return node;
   }
 }
 
@@ -580,14 +570,14 @@
   void test_visitConstructorDeclaration() {
     String className = "A";
     String constructorName = "c";
-    ConstructorDeclaration fromNode = AstTestFactory.constructorDeclaration(
+    ConstructorDeclarationImpl fromNode = AstTestFactory.constructorDeclaration(
         AstTestFactory.identifier3(className),
         constructorName,
         AstTestFactory.formalParameterList(),
         null);
     ConstructorElement element = ElementFactory.constructorElement2(
         ElementFactory.classElement2(className), constructorName);
-    fromNode.element = element;
+    fromNode.declaredElement = element;
     ConstructorDeclaration toNode = AstTestFactory.constructorDeclaration(
         AstTestFactory.identifier3(className),
         constructorName,
@@ -628,12 +618,12 @@
   }
 
   void test_visitFunctionExpression() {
-    FunctionExpression fromNode = AstTestFactory.functionExpression2(
+    FunctionExpressionImpl fromNode = AstTestFactory.functionExpression2(
         AstTestFactory.formalParameterList(),
         AstTestFactory.emptyFunctionBody());
     MethodElement element = ElementFactory.methodElement(
         "m", ElementFactory.classElement2("C").type);
-    fromNode.element = element;
+    fromNode.declaredElement = element;
     DartType staticType = ElementFactory.classElement2("C").type;
     fromNode.staticType = staticType;
     FunctionExpression toNode = AstTestFactory.functionExpression2(
@@ -805,7 +795,7 @@
   void test_visitPartDirective() {
     PartDirective fromNode = AstTestFactory.partDirective2("part.dart");
     LibraryElement element = new LibraryElementImpl.forNode(
-        null, AstTestFactory.libraryIdentifier2(["lib"]));
+        null, null, AstTestFactory.libraryIdentifier2(["lib"]));
     fromNode.element = element;
     PartDirective toNode = AstTestFactory.partDirective2("part.dart");
     ResolutionCopier.copyResolutionData(fromNode, toNode);
@@ -816,7 +806,7 @@
     PartOfDirective fromNode = AstTestFactory.partOfDirective(
         AstTestFactory.libraryIdentifier2(["lib"]));
     LibraryElement element = new LibraryElementImpl.forNode(
-        null, AstTestFactory.libraryIdentifier2(["lib"]));
+        null, null, AstTestFactory.libraryIdentifier2(["lib"]));
     fromNode.element = element;
     PartOfDirective toNode = AstTestFactory.partOfDirective(
         AstTestFactory.libraryIdentifier2(["lib"]));
@@ -2404,6 +2394,19 @@
             ])));
   }
 
+  void test_visitGenericFunctionType_withQuestion() {
+    _assertSource(
+        "int Function<T>(T)?",
+        AstTestFactory.genericFunctionType(
+            AstTestFactory.typeName4("int"),
+            AstTestFactory.typeParameterList(['T']),
+            AstTestFactory.formalParameterList([
+              AstTestFactory.simpleFormalParameter4(
+                  AstTestFactory.typeName4("T"), null)
+            ]),
+            question: true));
+  }
+
   void test_visitGenericTypeAlias() {
     _assertSource(
         "typedef X<S> = S Function<T>(T)",
@@ -3260,11 +3263,20 @@
     _assertSource("C", AstTestFactory.typeName4("C"));
   }
 
+  void test_visitTypeName_noArgs_withQuestion() {
+    _assertSource("C?", AstTestFactory.typeName4("C", null, true));
+  }
+
   void test_visitTypeName_singleArg() {
     _assertSource(
         "C<D>", AstTestFactory.typeName4("C", [AstTestFactory.typeName4("D")]));
   }
 
+  void test_visitTypeName_singleArg_withQuestion() {
+    _assertSource("C<D>?",
+        AstTestFactory.typeName4("C", [AstTestFactory.typeName4("D")], true));
+  }
+
   void test_visitTypeParameter_withExtends() {
     _assertSource("E extends C",
         AstTestFactory.typeParameter2("E", AstTestFactory.typeName4("C")));
@@ -4790,6 +4802,19 @@
             ])));
   }
 
+  void test_visitGenericFunctionType_withQuestion() {
+    _assertSource(
+        "int Function<T>(T)?",
+        AstTestFactory.genericFunctionType(
+            AstTestFactory.typeName4("int"),
+            AstTestFactory.typeParameterList(['T']),
+            AstTestFactory.formalParameterList([
+              AstTestFactory.simpleFormalParameter4(
+                  AstTestFactory.typeName4("T"), null)
+            ]),
+            question: true));
+  }
+
   void test_visitGenericTypeAlias() {
     _assertSource(
         "typedef X<S> = S Function<T>(T)",
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index 0a08cae..b144d20 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,9 +6,12 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/constant.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
@@ -24,12 +27,208 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ConstantVisitorTest);
+    defineReflectiveTests(ConstantVisitorTest_Driver);
+    defineReflectiveTests(ConstantVisitorWithConstantUpdate2018Test);
   });
 }
 
 @reflectiveTest
-class ConstantVisitorTest extends ResolverTestCase {
-  test_visitBinaryExpression_questionQuestion_notNull_notNull() async {
+class ConstantVisitorTest extends ConstantVisitorTestSupport {
+  test_visitAsExpression_instanceOfSameClass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a as A;
+class A {
+  const A();
+}
+''');
+    DartObjectImpl resultA = _evaluateConstant(compilationUnit, 'a',
+        experiments: [EnableString.constant_update_2018]);
+    DartObjectImpl resultB = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(resultB, resultA);
+  }
+
+  test_visitAsExpression_instanceOfSubclass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const B();
+const b = a as A;
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+''');
+    DartObjectImpl resultA = _evaluateConstant(compilationUnit, 'a',
+        experiments: [EnableString.constant_update_2018]);
+    DartObjectImpl resultB = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(resultB, resultA);
+  }
+
+  test_visitAsExpression_instanceOfSuperclass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a as B;
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION],
+        experiments: [EnableString.constant_update_2018]);
+    expect(result, isNull);
+  }
+
+  test_visitAsExpression_instanceOfUnrelatedClass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a as B;
+class A {
+  const A();
+}
+class B {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION],
+        experiments: [EnableString.constant_update_2018]);
+    expect(result, isNull);
+  }
+
+  test_visitAsExpression_null() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = null;
+const b = a as A;
+class A {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.nullType);
+  }
+
+  test_visitBinaryExpression_and_bool_known_known() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = false & true;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_and_bool_known_unknown() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const b = bool.fromEnvironment('y');
+const c = false & b;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_and_bool_unknown_known() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = bool.fromEnvironment('x');
+const c = a & true;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_and_bool_unknown_unknown() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = bool.fromEnvironment('x');
+const b = bool.fromEnvironment('y');
+const c = a & b;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_and_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 3 & 5;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+  }
+
+  test_visitBinaryExpression_and_mixed() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 3 & false;
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitBinaryExpression_or_bool_known_known() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = false | true;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_or_bool_known_unknown() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const b = bool.fromEnvironment('y');
+const c = false | b;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_or_bool_unknown_known() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = bool.fromEnvironment('x');
+const c = a | true;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_or_bool_unknown_unknown() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = bool.fromEnvironment('x');
+const b = bool.fromEnvironment('y');
+const c = a | b;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_or_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 3 | 5;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+  }
+
+  test_visitBinaryExpression_or_mixed() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 3 | false;
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitBinaryExpression_questionQuestion_eager_notNull_notNull() async {
     Expression left = AstTestFactory.string2('a');
     Expression right = AstTestFactory.string2('b');
     Expression expression = AstTestFactory.binaryExpression(
@@ -45,7 +244,7 @@
     errorListener.assertNoErrors();
   }
 
-  test_visitBinaryExpression_questionQuestion_null_notNull() async {
+  test_visitBinaryExpression_questionQuestion_eager_null_notNull() async {
     Expression left = AstTestFactory.nullLiteral();
     Expression right = AstTestFactory.string2('b');
     Expression expression = AstTestFactory.binaryExpression(
@@ -61,7 +260,7 @@
     errorListener.assertNoErrors();
   }
 
-  test_visitBinaryExpression_questionQuestion_null_null() async {
+  test_visitBinaryExpression_questionQuestion_eager_null_null() async {
     Expression left = AstTestFactory.nullLiteral();
     Expression right = AstTestFactory.nullLiteral();
     Expression expression = AstTestFactory.binaryExpression(
@@ -76,7 +275,115 @@
     errorListener.assertNoErrors();
   }
 
-  test_visitConditionalExpression_false() async {
+  test_visitBinaryExpression_questionQuestion_lazy_notNull_invalid() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 'a' ?? new C();
+class C {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.stringType);
+    expect(result.toStringValue(), 'a');
+  }
+
+  test_visitBinaryExpression_questionQuestion_lazy_notNull_notNull() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 'a' ?? 'b';
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.stringType);
+    expect(result.toStringValue(), 'a');
+  }
+
+  test_visitBinaryExpression_questionQuestion_lazy_null_invalid() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = null ?? new C();
+class C {}
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitBinaryExpression_questionQuestion_lazy_null_notNull() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = null ?? 'b';
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.stringType);
+    expect(result.toStringValue(), 'b');
+  }
+
+  test_visitBinaryExpression_questionQuestion_lazy_null_null() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = null ?? null;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.isNull, isTrue);
+  }
+
+  test_visitBinaryExpression_xor_bool_known_known() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = false ^ true;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_xor_bool_known_unknown() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const b = bool.fromEnvironment('y');
+const c = false ^ b;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_xor_bool_unknown_known() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = bool.fromEnvironment('x');
+const c = a ^ true;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_xor_bool_unknown_unknown() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = bool.fromEnvironment('x');
+const b = bool.fromEnvironment('y');
+const c = a ^ b;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+  }
+
+  test_visitBinaryExpression_xor_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 3 ^ 5;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+  }
+
+  test_visitBinaryExpression_xor_mixed() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 3 ^ false;
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitConditionalExpression_eager_false_int_int() async {
     Expression thenExpression = AstTestFactory.integer(1);
     Expression elseExpression = AstTestFactory.integer(0);
     ConditionalExpression expression = AstTestFactory.conditionalExpression(
@@ -88,7 +395,7 @@
     errorListener.assertNoErrors();
   }
 
-  test_visitConditionalExpression_nonBooleanCondition() async {
+  test_visitConditionalExpression_eager_invalid_int_int() async {
     Expression thenExpression = AstTestFactory.integer(1);
     Expression elseExpression = AstTestFactory.integer(0);
     NullLiteral conditionExpression = AstTestFactory.nullLiteral();
@@ -103,7 +410,19 @@
         .assertErrorsWithCodes([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL]);
   }
 
-  test_visitConditionalExpression_nonConstantElse() async {
+  test_visitConditionalExpression_eager_true_int_int() async {
+    Expression thenExpression = AstTestFactory.integer(1);
+    Expression elseExpression = AstTestFactory.integer(0);
+    ConditionalExpression expression = AstTestFactory.conditionalExpression(
+        AstTestFactory.booleanLiteral(true), thenExpression, elseExpression);
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    ErrorReporter errorReporter =
+        new ErrorReporter(errorListener, _dummySource());
+    _assertValue(1, _evaluate(expression, errorReporter));
+    errorListener.assertNoErrors();
+  }
+
+  test_visitConditionalExpression_eager_true_int_invalid() async {
     Expression thenExpression = AstTestFactory.integer(1);
     Expression elseExpression = AstTestFactory.identifier3("x");
     ConditionalExpression expression = AstTestFactory.conditionalExpression(
@@ -117,7 +436,7 @@
         .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
-  test_visitConditionalExpression_nonConstantThen() async {
+  test_visitConditionalExpression_eager_true_invalid_int() async {
     Expression thenExpression = AstTestFactory.identifier3("x");
     Expression elseExpression = AstTestFactory.integer(0);
     ConditionalExpression expression = AstTestFactory.conditionalExpression(
@@ -131,16 +450,272 @@
         .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
-  test_visitConditionalExpression_true() async {
-    Expression thenExpression = AstTestFactory.integer(1);
-    Expression elseExpression = AstTestFactory.integer(0);
-    ConditionalExpression expression = AstTestFactory.conditionalExpression(
-        AstTestFactory.booleanLiteral(true), thenExpression, elseExpression);
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    ErrorReporter errorReporter =
-        new ErrorReporter(errorListener, _dummySource());
-    _assertValue(1, _evaluate(expression, errorReporter));
-    errorListener.assertNoErrors();
+  test_visitConditionalExpression_lazy_false_int_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = false ? 1 : 0;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
+  test_visitConditionalExpression_lazy_false_int_invalid() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = false ? 1 : new C();
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitConditionalExpression_lazy_false_invalid_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = false ? new C() : 0;
+class C {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
+  test_visitConditionalExpression_lazy_invalid_int_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 3 ? 1 : 0;
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitConditionalExpression_lazy_true_int_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = true ? 1 : 0;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 1);
+  }
+
+  test_visitConditionalExpression_lazy_true_int_invalid() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = true ? 1 : new C();
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 1);
+  }
+
+  test_visitConditionalExpression_lazy_true_invalid_int() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = true ? new C() : 0;
+class C {}
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitIntegerLiteral() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const double d = 3;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'd');
+    expect(result.type, typeProvider.doubleType);
+    expect(result.toDoubleValue(), 3.0);
+  }
+
+  test_visitIsExpression_is_instanceOfSameClass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a is A;
+class A {
+  const A();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_is_instanceOfSubclass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const B();
+const b = a is A;
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_is_instanceOfSuperclass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a is B;
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), false);
+  }
+
+  test_visitIsExpression_is_instanceOfUnrelatedClass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a is B;
+class A {
+  const A();
+}
+class B {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), false);
+  }
+
+  test_visitIsExpression_is_null() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = null;
+const b = a is A;
+class A {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), false);
+  }
+
+  test_visitIsExpression_is_null_dynamic() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = null;
+const b = a is dynamic;
+class A {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_is_null_null() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = null;
+const b = a is Null;
+class A {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_is_null_object() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = null;
+const b = a is Object;
+class A {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_isNot_instanceOfSameClass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a is! A;
+class A {
+  const A();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), false);
+  }
+
+  test_visitIsExpression_isNot_instanceOfSubclass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const B();
+const b = a is! A;
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), false);
+  }
+
+  test_visitIsExpression_isNot_instanceOfSuperclass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a is! B;
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_isNot_instanceOfUnrelatedClass() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = const A();
+const b = a is! B;
+class A {
+  const A();
+}
+class B {
+  const B();
+}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
+  }
+
+  test_visitIsExpression_isNot_null() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const a = null;
+const b = a is! A;
+class A {}
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'b',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.boolType);
+    expect(result.toBoolValue(), true);
   }
 
   test_visitSimpleIdentifier_className() async {
@@ -148,7 +723,7 @@
 const a = C;
 class C {}
 ''');
-    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a', null);
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a');
     expect(result.type, typeProvider.typeType);
     expect(result.toTypeValue().name, 'C');
   }
@@ -157,7 +732,7 @@
     CompilationUnit compilationUnit = await resolveSource('''
 const a = dynamic;
 ''');
-    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a', null);
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'a');
     expect(result.type, typeProvider.typeType);
     expect(result.toTypeValue(), typeProvider.dynamicType);
   }
@@ -170,7 +745,10 @@
     DartObjectImpl six =
         new DartObjectImpl(typeProvider.intType, new IntState(6));
     environment["b"] = six;
-    _assertValue(6, _evaluateConstant(compilationUnit, "a", environment));
+    _assertValue(
+        6,
+        _evaluateConstant(compilationUnit, "a",
+            lexicalEnvironment: environment));
   }
 
   test_visitSimpleIdentifier_notInEnvironment() async {
@@ -181,14 +759,17 @@
     DartObjectImpl six =
         new DartObjectImpl(typeProvider.intType, new IntState(6));
     environment["c"] = six;
-    _assertValue(3, _evaluateConstant(compilationUnit, "a", environment));
+    _assertValue(
+        3,
+        _evaluateConstant(compilationUnit, "a",
+            lexicalEnvironment: environment));
   }
 
   test_visitSimpleIdentifier_withoutEnvironment() async {
     CompilationUnit compilationUnit = await resolveSource(r'''
 const a = b;
 const b = 3;''');
-    _assertValue(3, _evaluateConstant(compilationUnit, "a", null));
+    _assertValue(3, _evaluateConstant(compilationUnit, "a"));
   }
 
   void _assertValue(int expectedValue, DartObjectImpl result) {
@@ -206,24 +787,134 @@
     TestTypeProvider typeProvider = new TestTypeProvider();
     return expression.accept(new ConstantVisitor(
         new ConstantEvaluationEngine(typeProvider, new DeclaredVariables(),
-            typeSystem: new StrongTypeSystemImpl(typeProvider)),
+            typeSystem: new Dart2TypeSystem(typeProvider)),
         errorReporter));
   }
+}
 
+@reflectiveTest
+class ConstantVisitorTest_Driver extends ConstantVisitorTest {
+  bool get enableNewAnalysisDriver => true;
+}
+
+class ConstantVisitorTestSupport extends ResolverTestCase {
   DartObjectImpl _evaluateConstant(CompilationUnit compilationUnit, String name,
-      Map<String, DartObjectImpl> lexicalEnvironment) {
+      {List<ErrorCode> errorCodes,
+      List<String> experiments,
+      Map<String, DartObjectImpl> lexicalEnvironment}) {
     Source source =
         resolutionMap.elementDeclaredByCompilationUnit(compilationUnit).source;
     Expression expression =
         findTopLevelConstantExpression(compilationUnit, name);
+
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    if (experiments != null) {
+      options..enabledExperiments = experiments;
+    }
+
     GatheringErrorListener errorListener = new GatheringErrorListener();
     ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
+
     DartObjectImpl result = expression.accept(new ConstantVisitor(
         new ConstantEvaluationEngine(typeProvider, new DeclaredVariables(),
+            experimentStatus:
+                ExperimentStatus.fromStrings(options.enabledExperiments),
             typeSystem: typeSystem),
         errorReporter,
         lexicalEnvironment: lexicalEnvironment));
-    errorListener.assertNoErrors();
+    if (errorCodes == null) {
+      errorListener.assertNoErrors();
+    } else {
+      errorListener.assertErrorsWithCodes(errorCodes);
+    }
     return result;
   }
 }
+
+@reflectiveTest
+class ConstantVisitorWithConstantUpdate2018Test
+    extends ConstantVisitorTestSupport {
+  @override
+  List<String> get enabledExperiments => [EnableString.constant_update_2018];
+
+  bool get enableNewAnalysisDriver => true;
+
+  test_visitBinaryExpression_gtGtGt_negative_fewerBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFFFFFFFF >>> 8;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0xFFFFFF);
+  }
+
+  test_visitBinaryExpression_gtGtGt_negative_moreBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFFFFFFFF >>> 33;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
+  test_visitBinaryExpression_gtGtGt_negative_negativeBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFFFFFFFF >>> -2;
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitBinaryExpression_gtGtGt_negative_zeroBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFFFFFFFF >>> 0;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0xFFFFFFFF);
+  }
+
+//  @soloTest
+  test_visitBinaryExpression_gtGtGt_positive_fewerBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFF >>> 3;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0x1F);
+  }
+
+  test_visitBinaryExpression_gtGtGt_positive_moreBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFF >>> 9;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
+  test_visitBinaryExpression_gtGtGt_positive_negativeBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFF >>> -2;
+''');
+    _evaluateConstant(compilationUnit, 'c',
+        errorCodes: [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION],
+        experiments: [EnableString.constant_update_2018]);
+  }
+
+  test_visitBinaryExpression_gtGtGt_positive_zeroBits() async {
+    CompilationUnit compilationUnit = await resolveSource('''
+const c = 0xFF >>> 0;
+''');
+    DartObjectImpl result = _evaluateConstant(compilationUnit, 'c',
+        experiments: [EnableString.constant_update_2018]);
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0xFF);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/constant/utilities_test.dart b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
index 05e7d25..0fa3898 100644
--- a/pkg/analyzer/test/src/dart/constant/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
@@ -6,6 +6,7 @@
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/constant.dart';
@@ -191,7 +192,7 @@
 
   ConstructorElement _setupConstructorDeclaration(String name, bool isConst) {
     Keyword constKeyword = isConst ? Keyword.CONST : null;
-    ConstructorDeclaration constructorDeclaration =
+    ConstructorDeclarationImpl constructorDeclaration =
         AstTestFactory.constructorDeclaration2(
             constKeyword,
             null,
@@ -203,7 +204,7 @@
     ClassElement classElement = ElementFactory.classElement2(name);
     ConstructorElement element =
         ElementFactory.constructorElement(classElement, name, isConst);
-    constructorDeclaration.element = element;
+    constructorDeclaration.declaredElement = element;
     _node = constructorDeclaration;
     return element;
   }
@@ -234,7 +235,7 @@
     classElement.fields = <FieldElement>[fieldElement];
     classDeclaration.name.staticElement = classElement;
     if (hasConstConstructor) {
-      ConstructorDeclaration constructorDeclaration =
+      ConstructorDeclarationImpl constructorDeclaration =
           AstTestFactory.constructorDeclaration2(
               Keyword.CONST,
               null,
@@ -246,7 +247,7 @@
       classDeclaration.members.add(constructorDeclaration);
       ConstructorElement constructorElement =
           ElementFactory.constructorElement(classElement, '', true);
-      constructorDeclaration.element = constructorElement;
+      constructorDeclaration.declaredElement = constructorElement;
       classElement.constructors = <ConstructorElement>[constructorElement];
     } else {
       classElement.constructors = const <ConstructorElement>[];
diff --git a/pkg/analyzer/test/src/dart/constant/value_test.dart b/pkg/analyzer/test/src/dart/constant/value_test.dart
index 1883704..b6c7046 100644
--- a/pkg/analyzer/test/src/dart/constant/value_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/value_test.dart
@@ -94,27 +94,27 @@
   }
 
   void test_bitAnd_knownInt_knownInt() {
-    _assertBitAnd(_intValue(2), _intValue(6), _intValue(3));
+    _assertEagerAnd(_intValue(2), _intValue(6), _intValue(3));
   }
 
   void test_bitAnd_knownInt_knownString() {
-    _assertBitAnd(null, _intValue(6), _stringValue("3"));
+    _assertEagerAnd(null, _intValue(6), _stringValue("3"));
   }
 
   void test_bitAnd_knownInt_unknownInt() {
-    _assertBitAnd(_intValue(null), _intValue(6), _intValue(null));
+    _assertEagerAnd(_intValue(null), _intValue(6), _intValue(null));
   }
 
   void test_bitAnd_knownString_knownInt() {
-    _assertBitAnd(null, _stringValue("6"), _intValue(3));
+    _assertEagerAnd(null, _stringValue("6"), _intValue(3));
   }
 
   void test_bitAnd_unknownInt_knownInt() {
-    _assertBitAnd(_intValue(null), _intValue(null), _intValue(3));
+    _assertEagerAnd(_intValue(null), _intValue(null), _intValue(3));
   }
 
   void test_bitAnd_unknownInt_unknownInt() {
-    _assertBitAnd(_intValue(null), _intValue(null), _intValue(null));
+    _assertEagerAnd(_intValue(null), _intValue(null), _intValue(null));
   }
 
   void test_bitNot_knownInt() {
@@ -130,51 +130,51 @@
   }
 
   void test_bitOr_knownInt_knownInt() {
-    _assertBitOr(_intValue(7), _intValue(6), _intValue(3));
+    _assertEagerOr(_intValue(7), _intValue(6), _intValue(3));
   }
 
   void test_bitOr_knownInt_knownString() {
-    _assertBitOr(null, _intValue(6), _stringValue("3"));
+    _assertEagerOr(null, _intValue(6), _stringValue("3"));
   }
 
   void test_bitOr_knownInt_unknownInt() {
-    _assertBitOr(_intValue(null), _intValue(6), _intValue(null));
+    _assertEagerOr(_intValue(null), _intValue(6), _intValue(null));
   }
 
   void test_bitOr_knownString_knownInt() {
-    _assertBitOr(null, _stringValue("6"), _intValue(3));
+    _assertEagerOr(null, _stringValue("6"), _intValue(3));
   }
 
   void test_bitOr_unknownInt_knownInt() {
-    _assertBitOr(_intValue(null), _intValue(null), _intValue(3));
+    _assertEagerOr(_intValue(null), _intValue(null), _intValue(3));
   }
 
   void test_bitOr_unknownInt_unknownInt() {
-    _assertBitOr(_intValue(null), _intValue(null), _intValue(null));
+    _assertEagerOr(_intValue(null), _intValue(null), _intValue(null));
   }
 
   void test_bitXor_knownInt_knownInt() {
-    _assertBitXor(_intValue(5), _intValue(6), _intValue(3));
+    _assertEagerXor(_intValue(5), _intValue(6), _intValue(3));
   }
 
   void test_bitXor_knownInt_knownString() {
-    _assertBitXor(null, _intValue(6), _stringValue("3"));
+    _assertEagerXor(null, _intValue(6), _stringValue("3"));
   }
 
   void test_bitXor_knownInt_unknownInt() {
-    _assertBitXor(_intValue(null), _intValue(6), _intValue(null));
+    _assertEagerXor(_intValue(null), _intValue(6), _intValue(null));
   }
 
   void test_bitXor_knownString_knownInt() {
-    _assertBitXor(null, _stringValue("6"), _intValue(3));
+    _assertEagerXor(null, _stringValue("6"), _intValue(3));
   }
 
   void test_bitXor_unknownInt_knownInt() {
-    _assertBitXor(_intValue(null), _intValue(null), _intValue(3));
+    _assertEagerXor(_intValue(null), _intValue(null), _intValue(3));
   }
 
   void test_bitXor_unknownInt_unknownInt() {
-    _assertBitXor(_intValue(null), _intValue(null), _intValue(null));
+    _assertEagerXor(_intValue(null), _intValue(null), _intValue(null));
   }
 
   void test_concatenate_knownInt_knownString() {
@@ -400,24 +400,34 @@
   }
 
   void test_getValue_map_empty() {
-    Object result = _mapValue().toMapValue();
-    EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, result);
-    Map map = result as Map;
-    expect(map, hasLength(0));
+    Map result = _mapValue().toMapValue();
+    expect(result, hasLength(0));
   }
 
   void test_getValue_map_valid() {
-    Object result =
+    Map result =
         _mapValue([_stringValue("key"), _stringValue("value")]).toMapValue();
-    EngineTestCase.assertInstanceOf((obj) => obj is Map, Map, result);
-    Map map = result as Map;
-    expect(map, hasLength(1));
+    expect(result, hasLength(1));
   }
 
   void test_getValue_null() {
     expect(_nullValue().isNull, isTrue);
   }
 
+  void test_getValue_set_empty() {
+    Object result = _setValue().toSetValue();
+    _assertInstanceOfObjectArray(result);
+    Set<Object> set = result as Set<Object>;
+    expect(set, hasLength(0));
+  }
+
+  void test_getValue_set_valid() {
+    Object result = _setValue(new Set.from([_intValue(23)])).toSetValue();
+    _assertInstanceOfObjectArray(result);
+    Set<Object> set = result as Set<Object>;
+    expect(set, hasLength(1));
+  }
+
   void test_getValue_string_known() {
     String value = "twenty-three";
     expect(_stringValue(value).toStringValue(), value);
@@ -958,65 +968,63 @@
   }
 
   void test_logicalAnd_false_false() {
-    _assertLogicalAnd(_boolValue(false), _boolValue(false), _boolValue(false));
+    _assertLazyAnd(_boolValue(false), _boolValue(false), _boolValue(false));
   }
 
   void test_logicalAnd_false_null() {
-    _assertLogicalAnd(_boolValue(false), _boolValue(false), _nullValue());
+    _assertLazyAnd(_boolValue(false), _boolValue(false), _nullValue());
   }
 
   void test_logicalAnd_false_string() {
-    _assertLogicalAnd(
-        _boolValue(false), _boolValue(false), _stringValue("false"));
+    _assertLazyAnd(_boolValue(false), _boolValue(false), _stringValue("false"));
   }
 
   void test_logicalAnd_false_true() {
-    _assertLogicalAnd(_boolValue(false), _boolValue(false), _boolValue(true));
+    _assertLazyAnd(_boolValue(false), _boolValue(false), _boolValue(true));
   }
 
   void test_logicalAnd_null_false() {
     expect(() {
-      _assertLogicalAnd(_boolValue(false), _nullValue(), _boolValue(false));
+      _assertLazyAnd(_boolValue(false), _nullValue(), _boolValue(false));
     }, throwsEvaluationException);
   }
 
   void test_logicalAnd_null_true() {
     expect(() {
-      _assertLogicalAnd(_boolValue(false), _nullValue(), _boolValue(true));
+      _assertLazyAnd(_boolValue(false), _nullValue(), _boolValue(true));
     }, throwsEvaluationException);
   }
 
   void test_logicalAnd_string_false() {
     expect(() {
-      _assertLogicalAnd(
+      _assertLazyAnd(
           _boolValue(false), _stringValue("true"), _boolValue(false));
     }, throwsEvaluationException);
   }
 
   void test_logicalAnd_string_true() {
     expect(() {
-      _assertLogicalAnd(
+      _assertLazyAnd(
           _boolValue(false), _stringValue("false"), _boolValue(true));
     }, throwsEvaluationException);
   }
 
   void test_logicalAnd_true_false() {
-    _assertLogicalAnd(_boolValue(false), _boolValue(true), _boolValue(false));
+    _assertLazyAnd(_boolValue(false), _boolValue(true), _boolValue(false));
   }
 
   void test_logicalAnd_true_null() {
-    _assertLogicalAnd(null, _boolValue(true), _nullValue());
+    _assertLazyAnd(null, _boolValue(true), _nullValue());
   }
 
   void test_logicalAnd_true_string() {
     expect(() {
-      _assertLogicalAnd(
-          _boolValue(false), _boolValue(true), _stringValue("true"));
+      _assertLazyAnd(_boolValue(false), _boolValue(true), _stringValue("true"));
     }, throwsEvaluationException);
   }
 
   void test_logicalAnd_true_true() {
-    _assertLogicalAnd(_boolValue(true), _boolValue(true), _boolValue(true));
+    _assertLazyAnd(_boolValue(true), _boolValue(true), _boolValue(true));
   }
 
   void test_logicalNot_false() {
@@ -1042,64 +1050,62 @@
   }
 
   void test_logicalOr_false_false() {
-    _assertLogicalOr(_boolValue(false), _boolValue(false), _boolValue(false));
+    _assertLazyOr(_boolValue(false), _boolValue(false), _boolValue(false));
   }
 
   void test_logicalOr_false_null() {
-    _assertLogicalOr(null, _boolValue(false), _nullValue());
+    _assertLazyOr(null, _boolValue(false), _nullValue());
   }
 
   void test_logicalOr_false_string() {
     expect(() {
-      _assertLogicalOr(
+      _assertLazyOr(
           _boolValue(false), _boolValue(false), _stringValue("false"));
     }, throwsEvaluationException);
   }
 
   void test_logicalOr_false_true() {
-    _assertLogicalOr(_boolValue(true), _boolValue(false), _boolValue(true));
+    _assertLazyOr(_boolValue(true), _boolValue(false), _boolValue(true));
   }
 
   void test_logicalOr_null_false() {
     expect(() {
-      _assertLogicalOr(_boolValue(false), _nullValue(), _boolValue(false));
+      _assertLazyOr(_boolValue(false), _nullValue(), _boolValue(false));
     }, throwsEvaluationException);
   }
 
   void test_logicalOr_null_true() {
     expect(() {
-      _assertLogicalOr(_boolValue(true), _nullValue(), _boolValue(true));
+      _assertLazyOr(_boolValue(true), _nullValue(), _boolValue(true));
     }, throwsEvaluationException);
   }
 
   void test_logicalOr_string_false() {
     expect(() {
-      _assertLogicalOr(
-          _boolValue(false), _stringValue("true"), _boolValue(false));
+      _assertLazyOr(_boolValue(false), _stringValue("true"), _boolValue(false));
     }, throwsEvaluationException);
   }
 
   void test_logicalOr_string_true() {
     expect(() {
-      _assertLogicalOr(
-          _boolValue(true), _stringValue("false"), _boolValue(true));
+      _assertLazyOr(_boolValue(true), _stringValue("false"), _boolValue(true));
     }, throwsEvaluationException);
   }
 
   void test_logicalOr_true_false() {
-    _assertLogicalOr(_boolValue(true), _boolValue(true), _boolValue(false));
+    _assertLazyOr(_boolValue(true), _boolValue(true), _boolValue(false));
   }
 
   void test_logicalOr_true_null() {
-    _assertLogicalOr(_boolValue(true), _boolValue(true), _nullValue());
+    _assertLazyOr(_boolValue(true), _boolValue(true), _nullValue());
   }
 
   void test_logicalOr_true_string() {
-    _assertLogicalOr(_boolValue(true), _boolValue(true), _stringValue("true"));
+    _assertLazyOr(_boolValue(true), _boolValue(true), _stringValue("true"));
   }
 
   void test_logicalOr_true_true() {
-    _assertLogicalOr(_boolValue(true), _boolValue(true), _boolValue(true));
+    _assertLazyOr(_boolValue(true), _boolValue(true), _boolValue(true));
   }
 
   void test_minus_knownDouble_knownDouble() {
@@ -1480,24 +1486,6 @@
   }
 
   /**
-   * Assert that the result of bit-anding the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
-  void _assertBitAnd(
-      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.bitAnd(_typeProvider, right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.bitAnd(_typeProvider, right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
    * Assert that the bit-not of the [operand] is the [expected] value, or that
    * the operation throws an exception if the expected value is `null`.
    */
@@ -1514,42 +1502,6 @@
   }
 
   /**
-   * Assert that the result of bit-oring the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
-  void _assertBitOr(
-      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.bitOr(_typeProvider, right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.bitOr(_typeProvider, right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
-   * Assert that the result of bit-xoring the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
-  void _assertBitXor(
-      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.bitXor(_typeProvider, right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.bitXor(_typeProvider, right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
    * Assert that the result of concatenating the [left] and [right] operands is
    * the [expected] value, or that the operation throws an exception if the
    * expected value is `null`.
@@ -1586,6 +1538,60 @@
   }
 
   /**
+   * Assert that the result of bit-anding the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertEagerAnd(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      expect(() {
+        left.eagerAnd(_typeProvider, right, false);
+      }, throwsEvaluationException);
+    } else {
+      DartObjectImpl result = left.eagerAnd(_typeProvider, right, false);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of bit-oring the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertEagerOr(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      expect(() {
+        left.eagerOr(_typeProvider, right, false);
+      }, throwsEvaluationException);
+    } else {
+      DartObjectImpl result = left.eagerOr(_typeProvider, right, false);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of bit-xoring the [left] and [right] operands is the
+   * [expected] value, or that the operation throws an exception if the expected
+   * value is `null`.
+   */
+  void _assertEagerXor(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      expect(() {
+        left.eagerXor(_typeProvider, right, false);
+      }, throwsEvaluationException);
+    } else {
+      DartObjectImpl result = left.eagerXor(_typeProvider, right, false);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
    * Assert that the result of comparing the [left] and [right] operands for
    * equality is the [expected] value, or that the operation throws an exception
    * if the expected value is `null`.
@@ -1673,6 +1679,42 @@
   }
 
   /**
+   * Assert that the result of logical-anding the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertLazyAnd(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      expect(() {
+        left.lazyAnd(_typeProvider, () => right);
+      }, throwsEvaluationException);
+    } else {
+      DartObjectImpl result = left.lazyAnd(_typeProvider, () => right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
+   * Assert that the result of logical-oring the [left] and [right] operands is
+   * the [expected] value, or that the operation throws an exception if the
+   * expected value is `null`.
+   */
+  void _assertLazyOr(
+      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
+    if (expected == null) {
+      expect(() {
+        left.lazyOr(_typeProvider, () => right);
+      }, throwsEvaluationException);
+    } else {
+      DartObjectImpl result = left.lazyOr(_typeProvider, () => right);
+      expect(result, isNotNull);
+      expect(result, expected);
+    }
+  }
+
+  /**
    * Assert that the result of comparing the [left] and [right] operands is the
    * [expected] value, or that the operation throws an exception if the expected
    * value is `null`.
@@ -1709,24 +1751,6 @@
   }
 
   /**
-   * Assert that the result of logical-anding the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
-  void _assertLogicalAnd(
-      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.logicalAnd(_typeProvider, () => right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.logicalAnd(_typeProvider, () => right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
    * Assert that the logical-not of the [operand] is the [expected] value, or
    * that the operation throws an exception if the expected value is `null`.
    */
@@ -1743,24 +1767,6 @@
   }
 
   /**
-   * Assert that the result of logical-oring the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
-  void _assertLogicalOr(
-      DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
-    if (expected == null) {
-      expect(() {
-        left.logicalOr(_typeProvider, () => right);
-      }, throwsEvaluationException);
-    } else {
-      DartObjectImpl result = left.logicalOr(_typeProvider, () => right);
-      expect(result, isNotNull);
-      expect(result, expected);
-    }
-  }
-
-  /**
    * Assert that the result of subtracting the [left] and [right] operands is
    * the [expected] value, or that the operation throws an exception if the
    * expected value is `null`.
@@ -1975,6 +1981,11 @@
     return new DartObjectImpl(_typeProvider.nullType, NumState.UNKNOWN_VALUE);
   }
 
+  DartObjectImpl _setValue([Set<DartObjectImpl> elements]) {
+    return new DartObjectImpl(_typeProvider.setType,
+        new SetState(elements ?? new Set<DartObjectImpl>()));
+  }
+
   DartObjectImpl _stringValue(String value) {
     if (value == null) {
       return new DartObjectImpl(
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 3a0bc36..dbebb31 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -47,6 +47,7 @@
 
 @reflectiveTest
 class ClassElementImplTest extends EngineTestCase {
+  @deprecated
   void test_computeNode_ClassDeclaration() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -100,6 +101,7 @@
     }
   }
 
+  @deprecated
   void test_computeNode_ClassTypeAlias() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -130,8 +132,8 @@
         new TestElementResynthesizer(context, {location: classA});
     ClassElementHandle classAHandle =
         new ClassElementHandle(resynthesizer, location);
-    ClassElementImpl classB =
-        ElementFactory.classElement("B", new InterfaceTypeImpl(classAHandle));
+    ClassElementImpl classB = new ClassElementImpl('B', 0)
+      ..supertype = new InterfaceTypeImpl(classAHandle);
     classB.mixinApplication = true;
 
     expect(classB.constructors, hasLength(1));
@@ -1194,6 +1196,7 @@
 
 @reflectiveTest
 class FieldElementImplTest extends EngineTestCase {
+  @deprecated
   void test_computeNode() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -3692,8 +3695,8 @@
 class LibraryElementImplTest extends EngineTestCase {
   void test_creation() {
     expect(
-        new LibraryElementImpl.forNode(
-            createAnalysisContext(), AstTestFactory.libraryIdentifier2(["l"])),
+        new LibraryElementImpl.forNode(createAnalysisContext(), null,
+            AstTestFactory.libraryIdentifier2(["l"])),
         isNotNull);
   }
 
@@ -3780,7 +3783,7 @@
   void test_setImports() {
     AnalysisContext context = createAnalysisContext();
     LibraryElementImpl library = new LibraryElementImpl.forNode(
-        context, AstTestFactory.libraryIdentifier2(["l1"]));
+        context, null, AstTestFactory.libraryIdentifier2(["l1"]));
     List<ImportElementImpl> expectedImports = [
       ElementFactory.importFor(ElementFactory.library(context, "l2"), null),
       ElementFactory.importFor(ElementFactory.library(context, "l3"), null)
@@ -3799,6 +3802,7 @@
 
 @reflectiveTest
 class MethodElementImplTest extends EngineTestCase {
+  @deprecated
   void test_computeNode() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -3829,6 +3833,7 @@
     }
   }
 
+  @deprecated
   void test_computeNode_withoutFunctionBody() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.analyzeFunctionBodies = false;
@@ -3908,6 +3913,7 @@
 
 @reflectiveTest
 class ParameterElementImplTest extends EngineTestCase {
+  @deprecated
   void test_computeNode_DefaultFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -3927,6 +3933,7 @@
     }
   }
 
+  @deprecated
   void test_computeNode_FieldFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -3951,6 +3958,7 @@
     }
   }
 
+  @deprecated
   void test_computeNode_FunctionTypedFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -3970,6 +3978,7 @@
     }
   }
 
+  @deprecated
   void test_computeNode_SimpleFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
@@ -4027,7 +4036,7 @@
   Map<ElementLocation, Element> locationMap;
 
   TestElementResynthesizer(AnalysisContext context, this.locationMap)
-      : super(context);
+      : super(context, null);
 
   @override
   Element getElement(ElementLocation location) {
diff --git a/pkg/analyzer/test/src/dart/element/function_type_test.dart b/pkg/analyzer/test/src/dart/element/function_type_test.dart
index 16b9189..975952b 100644
--- a/pkg/analyzer/test/src/dart/element/function_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/function_type_test.dart
@@ -1,13 +1,13 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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/analyzer.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart b/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
index 4dddf19..60497d0 100644
--- a/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
+++ b/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
@@ -115,7 +115,7 @@
     );
   }
 
-  void test_getMember_() async {
+  test_getMember() async {
     addTestFile('''
 abstract class I1 {
   void f(int i);
@@ -136,7 +136,196 @@
     assertElementTypeString(memberType, '(Object) → void');
   }
 
-  test_preferLatest_mixin() async {
+  test_getMember_concrete() async {
+    addTestFile('''
+class A {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('A', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+  }
+
+  test_getMember_concrete_abstract() async {
+    addTestFile('''
+abstract class A {
+  void foo();
+}
+''');
+    await resolveTestFile();
+
+    expect(_getConcrete('A', 'foo'), isNull);
+  }
+
+  test_getMember_concrete_fromMixedClass() async {
+    addTestFile('''
+class A {
+  void foo() {}
+}
+
+class X with A {}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('X', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+  }
+
+  test_getMember_concrete_fromMixedClass2() async {
+    addTestFile('''
+class A {
+  void foo() {}
+}
+
+class B = Object with A;
+
+class X with B {}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('X', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+  }
+
+  test_getMember_concrete_fromMixedClass_skipObject() async {
+    addTestFile('''
+class A {
+  String toString() => 'A';
+}
+
+class B {}
+
+class X extends A with B {}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('X', 'toString'),
+      same(findElement.method('toString', of: 'A')),
+    );
+  }
+
+  test_getMember_concrete_fromMixin() async {
+    addTestFile('''
+mixin M {
+  void foo() {}
+}
+
+class X with M {}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('X', 'foo'),
+      same(findElement.method('foo', of: 'M')),
+    );
+  }
+
+  test_getMember_concrete_fromSuper() async {
+    addTestFile('''
+class A {
+  void foo() {}
+}
+
+class B extends A {}
+
+abstract class C extends B {}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('B', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+
+    expect(
+      _getConcrete('C', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+  }
+
+  test_getMember_concrete_missing() async {
+    addTestFile('''
+abstract class A {}
+''');
+    await resolveTestFile();
+
+    expect(_getConcrete('A', 'foo'), isNull);
+  }
+
+  test_getMember_concrete_noSuchMethod() async {
+    addTestFile('''
+class A {
+  void foo() {}
+}
+
+class B implements A {
+  noSuchMethod(_) {}
+}
+
+abstract class C extends B {}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('B', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+
+    expect(
+      _getConcrete('C', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+  }
+
+  test_getMember_concrete_noSuchMethod_mixin() async {
+    addTestFile('''
+class A {
+  void foo();
+
+  noSuchMethod(_) {}
+}
+
+abstract class B extends Object with A {}
+''');
+    await resolveTestFile();
+
+    // noSuchMethod forwarders are not mixed-in.
+    // https://github.com/dart-lang/sdk/issues/33553#issuecomment-424638320
+    expect(_getConcrete('B', 'foo'), isNull);
+  }
+
+  test_getMember_concrete_noSuchMethod_moreSpecificSignature() async {
+    addTestFile('''
+class A {
+  void foo() {}
+}
+
+class B implements A {
+  noSuchMethod(_) {}
+}
+
+class C extends B {
+  void foo([a]);
+}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getConcrete('C', 'foo'),
+      same(findElement.method('foo', of: 'C')),
+    );
+  }
+
+  test_getMember_preferLatest_mixin() async {
     addTestFile('''
 class A {
   void foo() {}
@@ -165,7 +354,7 @@
     expect(member.element, findElement.method('foo', of: 'M2'));
   }
 
-  test_preferLatest_superclass() async {
+  test_getMember_preferLatest_superclass() async {
     addTestFile('''
 class A {
   void foo() {}
@@ -190,7 +379,7 @@
     expect(member.element, findElement.method('foo', of: 'B'));
   }
 
-  test_preferLatest_this() async {
+  test_getMember_preferLatest_this() async {
     addTestFile('''
 class A {
   void foo() {}
@@ -213,8 +402,103 @@
     expect(member.element, findElement.method('foo', of: 'X'));
   }
 
+  test_getMember_super_abstract() async {
+    addTestFile('''
+abstract class A {
+  void foo();
+}
+
+class B extends A {
+  noSuchMethod(_) {}
+}
+''');
+    await resolveTestFile();
+
+    expect(_getSuper('B', 'foo'), isNull);
+  }
+
+  test_getMember_super_fromMixin() async {
+    addTestFile('''
+mixin M {
+  void foo() {}
+}
+
+class X extends Object with M {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getSuper('X', 'foo'),
+      same(findElement.method('foo', of: 'M')),
+    );
+  }
+
+  test_getMember_super_fromSuper() async {
+    addTestFile('''
+class A {
+  void foo() {}
+}
+
+class B extends A {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getSuper('B', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+  }
+
+  test_getMember_super_missing() async {
+    addTestFile('''
+class A {}
+
+class B extends A {}
+''');
+    await resolveTestFile();
+
+    expect(_getSuper('B', 'foo'), isNull);
+  }
+
+  test_getMember_super_noSuchMember() async {
+    addTestFile('''
+class A {
+  void foo();
+  noSuchMethod(_) {}
+}
+
+class B extends A {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    expect(
+      _getSuper('B', 'foo'),
+      same(findElement.method('foo', of: 'A')),
+    );
+  }
+
+  ExecutableElement _getConcrete(String className, String name) {
+    var type = findElement.class_(className).type;
+    return manager
+        .getMember(type, new Name(null, name), concrete: true)
+        ?.element;
+  }
+
   ExecutableElement _getInherited(String className, String name) {
     var type = findElement.class_(className).type;
     return manager.getInherited(type, new Name(null, name)).element;
   }
+
+  ExecutableElement _getSuper(String className, String name) {
+    var type = findElement.class_(className).type;
+    return manager
+        .getMember(type, new Name(null, name), forSuper: true)
+        ?.element;
+  }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
index c07703f..a2abdd1 100644
--- a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
@@ -22,7 +22,7 @@
 class AssignmentDriverResolutionTest extends DriverResolutionTest
     with AssignmentResolutionMixin {}
 
-abstract class AssignmentResolutionMixin implements ResolutionTest {
+mixin AssignmentResolutionMixin implements ResolutionTest {
   test_compound_indexExpression() async {
     addTestFile(r'''
 main() {
@@ -65,7 +65,7 @@
     assertType(assignment, 'num'); // num + int = num
 
     SimpleIdentifier left = assignment.leftHandSide;
-    assertElement(left, findElement.localVar('x'));
+    assertElement(left, findElement.localVar('v'));
     assertType(left, 'num');
 
     Expression right = assignment.rightHandSide;
@@ -247,7 +247,7 @@
     assertType(creation, 'B');
 
     var fRef = left.propertyName;
-    assertElement(fRef, findElement.setter('f', className: 'A'));
+    assertElement(fRef, findElement.setter('f', of: 'A'));
     assertType(fRef, 'int');
 
     var right = assignment.rightHandSide;
diff --git a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
index aea7e0f..6a6388a 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
@@ -19,7 +19,7 @@
 class ClassAliasDriverResolutionTest extends DriverResolutionTest
     with ClassAliasResolutionMixin {}
 
-abstract class ClassAliasResolutionMixin implements ResolutionTest {
+mixin ClassAliasResolutionMixin implements ResolutionTest {
   test_defaultConstructor() async {
     addTestFile(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/dart/resolution/class_test.dart b/pkg/analyzer/test/src/dart/resolution/class_test.dart
index f825033..efcec88 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_test.dart
@@ -21,7 +21,7 @@
 class ClassDriverResolutionTest extends DriverResolutionTest
     with ClassResolutionMixin {}
 
-abstract class ClassResolutionMixin implements ResolutionTest {
+mixin ClassResolutionMixin implements ResolutionTest {
   test_abstractSuperMemberReference_getter() async {
     addTestFile(r'''
 abstract class A {
@@ -55,28 +55,7 @@
     assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
     assertElement(
       findNode.simple('foo; // ref'),
-      findElement.getter('foo', className: 'Foo'),
-    );
-  }
-
-  test_abstractSuperMemberReference_method_invocation() async {
-    addTestFile(r'''
-abstract class A {
-  foo();
-}
-abstract class B extends A {
-  bar() {
-    super.foo(); // ref
-  }
-
-  foo() {} // does not matter
-}
-''');
-    await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
-    assertElement(
-      findNode.simple('foo(); // ref'),
-      findElement.method('foo', of: 'A'),
+      findElement.getter('foo', of: 'Foo'),
     );
   }
 
@@ -96,31 +75,6 @@
     assertElement(findNode.simple('foo; // ref'), findElement.method('foo'));
   }
 
-  test_abstractSuperMemberReference_OK_mixinHasConcrete2_method() async {
-    addTestFile('''
-class A {
-}
-
-class M {
-  void foo() {}
-}
-
-class B = A with M;
-
-class C extends B {
-  void bar() {
-    super.foo(); // ref
-  }
-}
-''');
-    await resolveTestFile();
-    assertNoTestErrors();
-    assertElement(
-      findNode.simple('foo(); // ref'),
-      findElement.method('foo', of: 'M'),
-    );
-  }
-
   test_abstractSuperMemberReference_OK_superHasConcrete_mixinHasAbstract_method() async {
     addTestFile('''
 class A {
@@ -163,31 +117,7 @@
     assertNoTestErrors();
     assertElement(
       findNode.simple('foo; // ref'),
-      findElement.getter('foo', className: 'A'),
-    );
-  }
-
-  test_abstractSuperMemberReference_OK_superSuperHasConcrete_method() async {
-    addTestFile('''
-abstract class A {
-  void foo() {}
-}
-
-abstract class B extends A {
-  void foo();
-}
-
-class C extends B {
-  void bar() {
-    super.foo(); // ref
-  }
-}
-''');
-    await resolveTestFile();
-    assertNoTestErrors();
-    assertElement(
-      findNode.simple('foo(); // ref'),
-      findElement.method('foo', of: 'A'),
+      findElement.getter('foo', of: 'A'),
     );
   }
 
@@ -211,7 +141,7 @@
     assertNoTestErrors();
     assertElement(
       findNode.simple('foo = 0;'),
-      findElement.setter('foo', className: 'A'),
+      findElement.setter('foo', of: 'A'),
     );
   }
 
@@ -1371,6 +1301,32 @@
     assertNoTestErrors();
   }
 
+  test_error_mismatchedGetterAndSetterTypes_OK_setterParameter_0() async {
+    addTestFile(r'''
+class C {
+  int get foo => 0;
+  set foo() {}
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
+    ]);
+  }
+
+  test_error_mismatchedGetterAndSetterTypes_OK_setterParameter_2() async {
+    addTestFile(r'''
+class C {
+  int get foo => 0;
+  set foo(String p1, String p2) {}
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
+    ]);
+  }
+
   test_error_mismatchedGetterAndSetterTypes_superGetter() async {
     addTestFile(r'''
 class A {
@@ -1483,6 +1439,22 @@
     ]);
   }
 
+  test_issue32815() async {
+    addTestFile(r'''
+class A<T> extends B<T> {}
+class B<T> extends A<T> {}
+class C<T> extends B<T> implements I<T> {}
+
+abstract class I<T> {}
+
+main() {
+  Iterable<I<int>> x = [new C()];
+}
+''');
+    await resolveTestFile();
+    assertHasTestErrors();
+  }
+
   test_recursiveInterfaceInheritance_extends() async {
     addTestFile(r'''
 class A extends B {}
@@ -1539,8 +1511,6 @@
     assertTestErrors([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
-      StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
-      StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
     ]);
   }
 
@@ -1596,7 +1566,6 @@
     await resolveTestFile();
     assertTestErrors([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_EXTENDS,
-      StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
     ]);
   }
 
@@ -1670,7 +1639,10 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
+      StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
+    ]);
   }
 
   test_undefinedSuperOperator_indexGetter() async {
diff --git a/pkg/analyzer/test/src/dart/resolution/comment_test.dart b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
new file mode 100644
index 0000000..5371eac
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
@@ -0,0 +1,261 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+import 'resolution.dart';
+import 'task_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CommentDriverResolutionTest);
+    defineReflectiveTests(CommentTaskResolutionTest);
+  });
+}
+
+@reflectiveTest
+class CommentDriverResolutionTest extends DriverResolutionTest
+    with ClassAliasResolutionMixin {}
+
+mixin ClassAliasResolutionMixin implements ResolutionTest {
+  test_error_unqualifiedReferenceToNonLocalStaticMember() async {
+    addTestFile(r'''
+class A {
+  static void foo() {}
+}
+
+/// [foo]
+class B extends A {}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('foo]'),
+      findElement.method('foo', of: 'A'),
+    );
+  }
+
+  test_new() async {
+    addTestFile(r'''
+class A {
+  A();
+  A.named();
+}
+
+/// [new A] or [new A.named]
+main() {}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('A]'),
+      findElement.unnamedConstructor('A'),
+    );
+    assertElement(
+      findNode.simple('A.named]'),
+      findElement.class_('A'),
+    );
+    assertElement(
+      findNode.simple('named]'),
+      findElement.constructor('named', of: 'A'),
+    );
+  }
+
+  test_identifier_beforeConstructor() async {
+    addTestFile(r'''
+class A {
+  /// [p]
+  A(int p);
+}''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('p]'),
+      findElement.parameter('p'),
+    );
+  }
+
+  test_identifier_beforeEnum() async {
+    addTestFile(r'''
+/// This is the [Samurai] kind.
+enum Samurai {
+  /// Use [int].
+  WITH_SWORD,
+  /// Like [WITH_SWORD], but only without one.
+  WITHOUT_SWORD
+}''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('Samurai]'),
+      findElement.enum_('Samurai'),
+    );
+    assertElement(
+      findNode.simple('int]'),
+      intElement,
+    );
+    assertElement(
+      findNode.simple('WITH_SWORD]'),
+      findElement.getter('WITH_SWORD'),
+    );
+  }
+
+  test_identifier_beforeFunction_blockBody() async {
+    addTestFile(r'''
+/// [p]
+foo(int p) {}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('p]'),
+      findElement.parameter('p'),
+    );
+  }
+
+  test_identifier_parameter_functionTyped() async {
+    addTestFile(r'''
+/// [bar]
+foo(int bar()) {}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('bar]'),
+      findElement.parameter('bar'),
+    );
+  }
+
+  test_identifier_beforeFunction_expressionBody() async {
+    addTestFile(r'''
+/// [p]
+foo(int p) => null;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('p]'),
+      findElement.parameter('p'),
+    );
+  }
+
+  test_identifier_beforeFunctionTypeAlias() async {
+    addTestFile(r'''
+/// [p]
+typedef Foo(int p);
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('p]'),
+      findElement.parameter('p'),
+    );
+  }
+
+  test_identifier_beforeGenericTypeAlias() async {
+    addTestFile(r'''
+/// Can resolve [T], [S], and [p].
+typedef Foo<T> = Function<S>(int p);
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('T]'),
+      findElement.typeParameter('T'),
+    );
+    assertElement(findNode.simple('S]'), findElement.typeParameter('S'));
+    assertElement(
+      findNode.simple('p]'),
+      findElement.parameter('p'),
+    );
+  }
+
+  test_identifier_beforeGetter() async {
+    addTestFile(r'''
+/// [int]
+get g => null;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(findNode.simple('int]'), intElement);
+  }
+
+  test_identifier_beforeMethod() async {
+    addTestFile(r'''
+abstract class A {
+  /// [p1]
+  ma(int p1);
+  
+  /// [p2]
+  mb(int p2);
+  
+  /// [p3] and [p4]
+  mc(int p3, p4());
+  
+  /// [p5]
+  md(int p5, {int p6});
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(findNode.simple('p1]'), findElement.parameter('p1'));
+    assertElement(findNode.simple('p2]'), findElement.parameter('p2'));
+    assertElement(findNode.simple('p3]'), findElement.parameter('p3'));
+    assertElement(findNode.simple('p4]'), findElement.parameter('p4'));
+    assertElement(findNode.simple('p5]'), findElement.parameter('p5'));
+  }
+
+  test_identifier_beforeClass() async {
+    addTestFile(r'''
+/// [foo]
+class A {
+  foo() {}
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('foo]'),
+      findElement.method('foo'),
+    );
+  }
+
+  test_identifier_setter() async {
+    addTestFile(r'''
+class A {
+  /// [x] in A
+  mA() {}
+  set x(value) {}
+}
+
+class B extends A {
+  /// [x] in B
+  mB() {}
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var x = findElement.setter('x', of: 'A');
+    assertElement(findNode.simple('x] in A'), x);
+    assertElement(findNode.simple('x] in B'), x);
+  }
+}
+
+@reflectiveTest
+class CommentTaskResolutionTest extends TaskResolutionTest
+    with ClassAliasResolutionMixin {}
diff --git a/pkg/analyzer/test/src/dart/resolution/constant_test.dart b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
index 53a5c74..4ba17ed 100644
--- a/pkg/analyzer/test/src/dart/resolution/constant_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -20,7 +21,67 @@
 @reflectiveTest
 class ConstantDriverTest extends DriverResolutionTest with ConstantMixin {}
 
-abstract class ConstantMixin implements ResolutionTest {
+mixin ConstantMixin implements ResolutionTest {
+  test_annotation_constructor_named() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {
+  final int f;
+  const A.named(this.f);
+}
+''');
+
+    newFile('/test/lib/b.dart', content: r'''
+import 'a.dart';
+
+@A.named(42)
+class B {}
+''');
+
+    addTestFile(r'''
+import 'b.dart';
+
+B b;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var classB = findNode.typeName('B b;').name.staticElement;
+    var annotation = classB.metadata.single;
+    var value = annotation.computeConstantValue();
+    expect(value, isNotNull);
+    expect(value.getField('f').toIntValue(), 42);
+  }
+
+  test_annotation_constructor_unnamed() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {
+  final int f;
+  const A(this.f);
+}
+''');
+
+    newFile('/test/lib/b.dart', content: r'''
+import 'a.dart';
+
+@A(42)
+class B {}
+''');
+
+    addTestFile(r'''
+import 'b.dart';
+
+B b;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var classB = findNode.typeName('B b;').name.staticElement;
+    var annotation = classB.metadata.single;
+    var value = annotation.computeConstantValue();
+    expect(value, isNotNull);
+    expect(value.getField('f').toIntValue(), 42);
+  }
+
   test_constantValue_defaultParameter_noDefaultValue() async {
     newFile('/test/lib/a.dart', content: r'''
 class A {
@@ -70,6 +131,25 @@
     var value = node.elementAnnotation.constantValue;
     expect(value.getField('(super)').getField('f').toIntValue(), 42);
   }
+
+  test_constNotInitialized() async {
+    addTestFile(r'''
+class B {
+  const B(_);
+}
+
+class C extends B {
+  static const a;
+  const C() : super(a);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
+      CompileTimeErrorCode.CONST_NOT_INITIALIZED,
+      CompileTimeErrorCode.CONST_NOT_INITIALIZED,
+    ]);
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
new file mode 100644
index 0000000..c9d840d
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
@@ -0,0 +1,1533 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/definite_assignment.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DefiniteAssignmentTrackerTest);
+  });
+}
+
+@reflectiveTest
+class DefiniteAssignmentTrackerTest extends DriverResolutionTest {
+  DefiniteAssignmentTracker tracker;
+
+  /// Assert that only local variables with the given names are marked as read
+  /// before being written.  All the other local variables are implicitly
+  /// considered definitely assigned.
+  void assertReadBeforeWritten(
+      [String name1, String name2, String name3, String name4]) {
+    var expected = [name1, name2, name3, name4]
+        .where((i) => i != null)
+        .map((name) => findElement.localVar(name))
+        .toList();
+    expect(tracker.readBeforeWritten, unorderedEquals(expected));
+  }
+
+  test_assert() async {
+    await trackCode(r'''
+main() {
+  int v;
+  assert((v = 0) >= 0, v);
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_assignment_leftExpression() async {
+    await trackCode(r'''
+main() {
+  List<int> v;
+  v[0] = (v = [1, 2])[1];
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_assignment_leftLocal_compound() async {
+    await trackCode(r'''
+main() {
+  int v;
+  v += 1;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_assignment_leftLocal_compound_assignInRight() async {
+    await trackCode(r'''
+main() {
+  int v;
+  v += (v = v);
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_assignment_leftLocal_pure_eq() async {
+    await trackCode(r'''
+main() {
+  int v;
+  v = 0;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_assignment_leftLocal_pure_eq_self() async {
+    await trackCode(r'''
+main() {
+  int v;
+  v = v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_assignment_leftLocal_pure_questionEq() async {
+    await trackCode(r'''
+main() {
+  int v;
+  v ??= 0;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_assignment_leftLocal_pure_questionEq_self() async {
+    await trackCode(r'''
+main() {
+  int v;
+  v ??= v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_binaryExpression_ifNull_left() async {
+    await trackCode(r'''
+main() {
+  int v;
+  (v = 0) ?? 0;
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_binaryExpression_ifNull_right() async {
+    await trackCode(r'''
+main(int a) {
+  int v;
+  a ?? (v = 0);
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_binaryExpression_logicalAnd_left() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  ((v = 0) >= 0) && c;
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_binaryExpression_logicalAnd_right() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  c && ((v = 0) >= 0);
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_binaryExpression_logicalOr_left() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  ((v = 0) >= 0) || c;
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_binaryExpression_logicalOr_right() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  c || ((v = 0) >= 0);
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_binaryExpression_plus_left() async {
+    await trackCode(r'''
+main() {
+  int v;
+  (v = 0) + 1;
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_binaryExpression_plus_right() async {
+    await trackCode(r'''
+main() {
+  int v;
+  1 + (v = 0);
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_conditionalExpression_both() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  c ? (v = 0) : (v = 0);
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_conditionalExpression_condition() async {
+    await trackCode(r'''
+main() {
+  int v;
+  (v = 0) >= 0 ? 1 : 2;
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_conditionalExpression_else() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  c ? (v = 0) : 2;
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_conditionalExpression_then() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  c ? (v = 0) : 2;
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_doWhile_break_afterAssignment() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  do {
+    v = 0;
+    v;
+    if (c) break;
+  } while (c);
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_doWhile_break_beforeAssignment() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  do {
+    if (c) break;
+    v = 0;
+  } while (c);
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_doWhile_breakOuterFromInner() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2, v3;
+  L1: do {
+    do {
+      v1 = 0;
+      if (c) break L1;
+      v2 = 0;
+      v3 = 0;
+    } while (c);
+    v2;
+  } while (c);
+  v1;
+  v3;
+}
+''');
+    assertReadBeforeWritten('v3');
+  }
+
+  test_doWhile_condition() async {
+    await trackCode(r'''
+main() {
+  int v1, v2;
+  do {
+    v1; // assigned in the condition, but not yet
+  } while ((v1 = 0) + (v2 = 0) >= 0);
+  v2;
+}
+''');
+    assertReadBeforeWritten('v1');
+  }
+
+  test_doWhile_condition_break() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  do {
+    if (c) break;
+  } while ((v = 0) >= 0);
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_doWhile_condition_break_continue() async {
+    await trackCode(r'''
+main(bool c1, bool c2) {
+  int v1, v2, v3, v4, v5, v6;
+  do {
+    v1 = 0; // visible outside, visible to the condition
+    if (c1) break;
+    v2 = 0; // not visible outside, visible to the condition
+    v3 = 0; // not visible outside, visible to the condition
+    if (c2) continue;
+    v4 = 0; // not visible
+    v5 = 0; // not visible
+  } while ((v6 = v1 + v2 + v4) == 0); // has break => v6 is not visible outside
+  v1;
+  v3;
+  v5;
+  v6;
+}
+''');
+    assertReadBeforeWritten('v3', 'v4', 'v5', 'v6');
+  }
+
+  test_doWhile_condition_continue() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2, v3, v4;
+  do {
+    v1 = 0; // visible outside, visible to the condition
+    if (c) continue;
+    v2 = 0; // not visible
+    v3 = 0; // not visible
+  } while ((v4 = v1 + v2) == 0); // no break => v4 visible outside
+  v1;
+  v3;
+  v4;
+}
+''');
+    assertReadBeforeWritten('v2', 'v3');
+  }
+
+  test_doWhile_continue_beforeAssignment() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  do {
+    if (c) continue;
+    v = 0;
+  } while (c);
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_for_body() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  for (; c;) {
+    v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_for_break() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  for (; c;) {
+    v1 = 0;
+    if (c) break;
+    v2 = 0;
+  }
+  v1;
+  v2;
+}
+''');
+    assertReadBeforeWritten('v1', 'v2');
+  }
+
+  test_for_break_updaters() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  for (; c; v1 + v2) {
+    v1 = 0;
+    if (c) break;
+    v2 = 0;
+  }
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_for_condition() async {
+    await trackCode(r'''
+main() {
+  int v;
+  for (; (v = 0) >= 0;) {
+    v;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_for_continue() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  for (; c;) {
+    v1 = 0;
+    if (c) continue;
+    v2 = 0;
+  }
+  v1;
+  v2;
+}
+''');
+    assertReadBeforeWritten('v1', 'v2');
+  }
+
+  test_for_continue_updaters() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  for (; c; v1 + v2) {
+    v1 = 0;
+    if (c) continue;
+    v2 = 0;
+  }
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_for_initializer_expression() async {
+    await trackCode(r'''
+main() {
+  int v;
+  for (v = 0;;) {
+    v;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_for_initializer_variable() async {
+    await trackCode(r'''
+main() {
+  int v;
+  for (var t = (v = 0);;) {
+    v;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_for_updaters() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2, v3, v4;
+  for (; c; v1 = 0, v2 = 0, v3 = 0, v4) {
+    v1;
+  }
+  v2;
+}
+''');
+    assertReadBeforeWritten('v1', 'v2', 'v4');
+  }
+
+  test_for_updaters_afterBody() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  for (; c; v) {
+    v = 0;
+  }
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_forEach() async {
+    await trackCode(r'''
+main() {
+  int v1, v2;
+  for (var _ in (v1 = [0, 1, 2])) {
+    v2 = 0;
+  }
+  v1;
+  v2;
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_forEach_break() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  for (var _ in [0, 1, 2]) {
+    v1 = 0;
+    if (c) break;
+    v2 = 0;
+  }
+  v1;
+  v2;
+}
+''');
+    assertReadBeforeWritten('v1', 'v2');
+  }
+
+  test_forEach_continue() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  for (var _ in [0, 1, 2]) {
+    v1 = 0;
+    if (c) continue;
+    v2 = 0;
+  }
+  v1;
+  v2;
+}
+''');
+    assertReadBeforeWritten('v1', 'v2');
+  }
+
+  test_functionExpression_closure_read() async {
+    await trackCode(r'''
+main() {
+  int v1, v2;
+  
+  v1 = 0;
+  
+  [0, 1, 2].forEach((t) {
+    v1;
+    v2;
+  });
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_functionExpression_closure_write() async {
+    await trackCode(r'''
+main() {
+  int v;
+  
+  [0, 1, 2].forEach((t) {
+    v = t;
+  });
+
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_functionExpression_localFunction_local() async {
+    await trackCode(r'''
+main() {
+  int v;
+
+  v = 0;
+
+  void f() {
+    int v; // 1
+    v;
+  }
+}
+''');
+    var localV = findNode.simple('v; // 1').staticElement;
+    expect(tracker.readBeforeWritten, unorderedEquals([localV]));
+  }
+
+  test_functionExpression_localFunction_local2() async {
+    await trackCode(r'''
+main() {
+  int v1;
+
+  v1 = 0;
+
+  void f() {
+    int v2, v3;
+    v2 = 0;
+    v1;
+    v2;
+    v3;
+  }
+}
+''');
+    assertReadBeforeWritten('v3');
+  }
+
+  test_functionExpression_localFunction_read() async {
+    await trackCode(r'''
+main() {
+  int v1, v2, v3;
+
+  v1 = 0;
+
+  void f() {
+    v1;
+    v2;
+  }
+
+  v2 = 0;
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_functionExpression_localFunction_write() async {
+    await trackCode(r'''
+main() {
+  int v;
+
+  void f() {
+    v = 0;
+  }
+
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_if_condition() async {
+    await trackCode(r'''
+main() {
+  int v;
+  if ((v = 0) >= 0) {
+    v;
+  } else {
+    v;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_if_then() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  if (c) {
+    v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_if_thenElse_all() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  if (c) {
+    v = 0;
+    v;
+  } else {
+    v = 0;
+    v;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_if_thenElse_else() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  if (c) {
+    // not assigned
+  } else {
+    v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_if_thenElse_then() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  if (c) {
+    v = 0;
+  } else {
+    // not assigned
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_if_thenElse_then_exit_alwaysThrows() async {
+    addMetaPackage();
+    await trackCode(r'''
+import 'package:meta/meta.dart';
+
+main(bool c) {
+  int v;
+  if (c) {
+    v = 0;
+  } else {
+    foo();
+  }
+  v;
+}
+
+@alwaysThrows
+void foo() {}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_if_thenElse_then_exit_return() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  if (c) {
+    v = 0;
+  } else {
+    return;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_if_thenElse_then_exit_throw() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  if (c) {
+    v = 0;
+  } else {
+    throw 42;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_switch_case1_default() async {
+    await trackCode(r'''
+main(int e) {
+  int v;
+  switch (e) {
+    case 1:
+      v = 0;
+      break;
+    case 2:
+      // not assigned
+      break;
+    default:
+      v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_switch_case2_default() async {
+    await trackCode(r'''
+main(int e) {
+  int v1, v2;
+  switch (e) {
+    case 1:
+      v1 = 0;
+      v2 = 0;
+      v1;
+      break;
+    default:
+      v1 = 0;
+      v1;
+  }
+  v1;
+  v2;
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_switch_case_default_break() async {
+    await trackCode(r'''
+main(int e, bool c) {
+  int v1, v2;
+  switch (e) {
+    case 1:
+      v1 = 0;
+      if (c) break;
+      v2 = 0;
+      break;
+    default:
+      v1 = 0;
+      if (c) break;
+      v2 = 0;
+  }
+  v1;
+  v2;
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_switch_case_default_continue() async {
+    await trackCode(r'''
+main(int e) {
+  int v;
+  switch (e) {
+    L: case 1:
+      v = 0;
+      break;
+    case 2:
+      continue L;
+    default:
+      v = 0;
+  }
+  v;
+}
+''');
+    // We don't analyze to which `case` we go from `continue L`,
+    // but we don't have to. If all cases assign, then the variable is
+    // not in the `breakSet`. And if there is a case when it is not assigned,
+    // we the variable will be left in the `breakSet`.
+    assertReadBeforeWritten();
+  }
+
+  test_switch_case_noDefault() async {
+    await trackCode(r'''
+main(int e) {
+  int v;
+  switch (e) {
+    case 1:
+      v = 0;
+      break;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_switch_condition() async {
+    await trackCode(r'''
+main() {
+  int v;
+  switch (v = 0) {}
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_tryCatch_all() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    f();
+    v = 0;
+  } catch (_) {
+    v = 0;
+  }
+  v;
+}
+
+void f() {}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_tryCatch_catch() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    // not assigned
+  } catch (_) {
+    v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_tryCatch_try() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    v = 0;
+  } catch (_) {
+    // not assigned
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_tryCatchFinally_catch() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    // not assigned
+  } catch (_) {
+    v = 0;
+  } finally {
+    // not assigned
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_tryCatchFinally_finally() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    // not assigned
+  } catch (_) {
+    // not assigned
+  } finally {
+    v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_tryCatchFinally_try() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    v = 0;
+  } catch (_) {
+    // not assigned
+  } finally {
+    // not assigned
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten('v');
+  }
+
+  test_tryFinally_finally() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    // not assigned
+  } finally {
+    v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_tryFinally_try() async {
+    await trackCode(r'''
+main() {
+  int v;
+  try {
+    v = 0;
+  } finally {
+    // not assigned
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_while_condition() async {
+    await trackCode(r'''
+main() {
+  int v;
+  while ((v = 0) >= 0) {
+    v;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_while_condition_notTrue() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  while (c) {
+    v1 = 0;
+    v2 = 0;
+    v1;
+  }
+  v2;
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_while_true_break_afterAssignment() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  while (true) {
+    v1 = 0;
+    v1;
+    if (c) break;
+    v1;
+    v2 = 0;
+    v2;
+  }
+  v1;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_while_true_break_beforeAssignment() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  while (true) {
+    if (c) break;
+    v1 = 0;
+    v2 = 0;
+    v2;
+  }
+  v1;
+}
+''');
+    assertReadBeforeWritten('v1');
+  }
+
+  test_while_true_break_if() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  while (true) {
+    if (c) {
+      v = 0;
+      break;
+    } else {
+      v = 0;
+      break;
+    }
+    v;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_while_true_break_if2() async {
+    await trackCode(r'''
+main(bool c) {
+  var v;
+  while (true) {
+    if (c) {
+      break;
+    } else {
+      v = 0;
+    }
+    v;
+  }
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_while_true_break_if3() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2;
+  while (true) {
+    if (c) {
+      v1 = 0;
+      v2 = 0;
+      if (c) break;
+    } else {
+      if (c) break;
+      v1 = 0;
+      v2 = 0;
+    }
+    v1;
+  }
+  v2;
+}
+''');
+    assertReadBeforeWritten('v2');
+  }
+
+  test_while_true_breakOuterFromInner() async {
+    await trackCode(r'''
+main(bool c) {
+  int v1, v2, v3;
+  L1: while (true) {
+    L2: while (true) {
+      v1 = 0;
+      if (c) break L1;
+      v2 = 0;
+      v3 = 0;
+      if (c) break L2;
+    }
+    v2;
+  }
+  v1;
+  v3;
+}
+''');
+    assertReadBeforeWritten('v3');
+  }
+
+  test_while_true_continue() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  while (true) {
+    if (c) continue;
+    v = 0;
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  test_while_true_noBreak() async {
+    await trackCode(r'''
+main(bool c) {
+  int v;
+  while (true) {
+    // No assignment, but not break.
+    // So, we don't exit the loop.
+    // So, all variables are assigned.
+  }
+  v;
+}
+''');
+    assertReadBeforeWritten();
+  }
+
+  /// Resolve the given [code] and track assignments in the unit.
+  Future<void> trackCode(String code) async {
+    addTestFile(code);
+    await resolveTestFile();
+
+    tracker = DefiniteAssignmentTracker();
+
+    var visitor = _AstVisitor(tracker);
+    result.unit.accept(visitor);
+  }
+}
+
+/// [AstVisitor] that drives the [tracker] in the way we expect the resolver
+/// will do in production.
+class _AstVisitor extends RecursiveAstVisitor<void> {
+  final DefiniteAssignmentTracker tracker;
+
+  _AstVisitor(this.tracker);
+
+  @override
+  void visitAssertStatement(AssertStatement node) {
+    tracker.beginAssertStatement();
+    super.visitAssertStatement(node);
+    tracker.endAssertStatement();
+  }
+
+  @override
+  void visitAssignmentExpression(AssignmentExpression node) {
+    var left = node.leftHandSide;
+    var right = node.rightHandSide;
+
+    LocalVariableElement localElement;
+    if (left is SimpleIdentifier) {
+      var element = left.staticElement;
+      if (element is LocalVariableElement) {
+        localElement = element;
+      }
+    }
+
+    if (localElement != null) {
+      var isPure = node.operator.type == TokenType.EQ;
+      if (!isPure) {
+        tracker.read(localElement);
+      }
+      right.accept(this);
+      tracker.write(localElement);
+    } else {
+      left.accept(this);
+      right.accept(this);
+    }
+  }
+
+  @override
+  void visitBinaryExpression(BinaryExpression node) {
+    var left = node.leftOperand;
+    var right = node.rightOperand;
+
+    var operator = node.operator.type;
+    var isLogical = operator == TokenType.AMPERSAND_AMPERSAND ||
+        operator == TokenType.BAR_BAR ||
+        operator == TokenType.QUESTION_QUESTION;
+
+    left.accept(this);
+
+    if (isLogical) {
+      tracker.beginBinaryExpressionLogicalRight();
+    }
+
+    right.accept(this);
+
+    if (isLogical) {
+      tracker.endBinaryExpressionLogicalRight();
+    }
+  }
+
+  @override
+  void visitBreakStatement(BreakStatement node) {
+    var target = _getLabelTarget(node, node.label?.staticElement);
+    tracker.handleBreak(target);
+    super.visitBreakStatement(node);
+  }
+
+  @override
+  void visitConditionalExpression(ConditionalExpression node) {
+    var condition = node.condition;
+    var thenExpression = node.thenExpression;
+    var elseExpression = node.elseExpression;
+
+    condition.accept(this);
+
+    tracker.beginConditionalExpressionThen();
+    thenExpression.accept(this);
+
+    tracker.beginConditionalExpressionElse();
+    elseExpression.accept(this);
+
+    tracker.endConditionalExpression();
+  }
+
+  @override
+  void visitContinueStatement(ContinueStatement node) {
+    var target = _getLabelTarget(node, node.label?.staticElement);
+    tracker.handleContinue(target);
+    super.visitContinueStatement(node);
+  }
+
+  @override
+  void visitDoStatement(DoStatement node) {
+    var body = node.body;
+    var condition = node.condition;
+
+    tracker.beginDoWhileStatement(node);
+    body.accept(this);
+
+    tracker.beginDoWhileStatementCondition();
+    condition.accept(this);
+
+    tracker.endDoWhileStatement();
+  }
+
+  @override
+  void visitForEachStatement(ForEachStatement node) {
+    var iterable = node.iterable;
+    var body = node.body;
+
+    tracker.beginForEachStatement(node);
+    iterable.accept(this);
+
+    tracker.beginForEachStatementBody();
+    body.accept(this);
+
+    tracker.endForEachStatement();
+  }
+
+  @override
+  void visitForStatement(ForStatement node) {
+    var variables = node.variables;
+    var initialization = node.initialization;
+
+    var condition = node.condition;
+    var updaters = node.updaters;
+    var body = node.body;
+
+    tracker.beginForStatement(node);
+
+    variables?.accept(this);
+    initialization?.accept(this);
+    condition?.accept(this);
+
+    tracker.beginForStatementBody();
+    body?.accept(this);
+
+    tracker.beginForStatementUpdaters();
+    updaters?.accept(this);
+
+    tracker.endForStatement();
+  }
+
+  @override
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    super.visitFunctionDeclaration(node);
+    if (node.parent is CompilationUnit) {
+      expect(tracker.isRootBranch, isTrue);
+    }
+  }
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    tracker.beginFunctionExpression();
+    super.visitFunctionExpression(node);
+    tracker.endFunctionExpression();
+  }
+
+  @override
+  void visitIfStatement(IfStatement node) {
+    var condition = node.condition;
+    var thenStatement = node.thenStatement;
+    var elseStatement = node.elseStatement;
+
+    condition.accept(this);
+
+    tracker.beginIfStatementThen();
+    thenStatement.accept(this);
+
+    if (elseStatement != null) {
+      tracker.beginIfStatementElse();
+      elseStatement.accept(this);
+    }
+
+    tracker.endIfStatement(elseStatement != null);
+  }
+
+  @override
+  void visitMethodInvocation(MethodInvocation node) {
+    super.visitMethodInvocation(node);
+    var element = node.methodName.staticElement;
+    if (element != null && element.hasAlwaysThrows) {
+      tracker.handleExit();
+    }
+  }
+
+  @override
+  void visitReturnStatement(ReturnStatement node) {
+    super.visitReturnStatement(node);
+    tracker.handleExit();
+  }
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    var element = node.staticElement;
+    if (element is LocalVariableElement) {
+      if (node.inGetterContext()) {
+        tracker.read(element);
+      }
+    }
+
+    super.visitSimpleIdentifier(node);
+  }
+
+  @override
+  void visitSwitchStatement(SwitchStatement node) {
+    tracker.beginSwitchStatement(node);
+
+    node.expression.accept(this);
+    tracker.endSwitchStatementExpression();
+
+    var members = node.members;
+    var membersLength = members.length;
+    var hasDefault = false;
+    for (var i = 0; i < membersLength; i++) {
+      var member = members[i];
+      tracker.beginSwitchStatementMember();
+      member.accept(this);
+      // Implicit `break` at the end of `default`.
+      if (member is SwitchDefault) {
+        hasDefault = true;
+        tracker.handleBreak(node);
+      }
+    }
+
+    tracker.endSwitchStatement(hasDefault);
+  }
+
+  @override
+  void visitThrowExpression(ThrowExpression node) {
+    super.visitThrowExpression(node);
+    tracker.handleExit();
+  }
+
+  @override
+  void visitTryStatement(TryStatement node) {
+    var body = node.body;
+    var catchClauses = node.catchClauses;
+
+    tracker.beginTryStatement();
+
+    body.accept(this);
+    tracker.endTryStatementBody();
+
+    var catchLength = catchClauses.length;
+    for (var i = 0; i < catchLength; ++i) {
+      var catchClause = catchClauses[i];
+      tracker.beginTryStatementCatchClause();
+      catchClause.accept(this);
+      tracker.endTryStatementCatchClause();
+    }
+
+    tracker.endTryStatementCatchClauses();
+
+    node.finallyBlock?.accept(this);
+  }
+
+  @override
+  void visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+    var variables = node.variables.variables;
+    for (var i = 0; i < variables.length; ++i) {
+      var variable = variables[i];
+      tracker.add(variable.declaredElement,
+          assigned: variable.initializer != null);
+    }
+
+    super.visitVariableDeclarationStatement(node);
+  }
+
+  @override
+  void visitWhileStatement(WhileStatement node) {
+    var condition = node.condition;
+    var body = node.body;
+
+    tracker.beginWhileStatement(node);
+    condition.accept(this);
+
+    var conditionIsLiteralTrue = condition is BooleanLiteral && condition.value;
+    tracker.beginWhileStatementBody(conditionIsLiteralTrue);
+    body.accept(this);
+
+    tracker.endWhileStatement();
+  }
+
+  /// This code has OK performance for tests, but think if there is something
+  /// better when using in production.
+  AstNode _getLabelTarget(AstNode node, LabelElement element) {
+    for (; node != null; node = node.parent) {
+      if (node is DoStatement ||
+          node is ForEachStatement ||
+          node is ForStatement ||
+          node is SwitchStatement ||
+          node is WhileStatement) {
+        if (element == null) {
+          return node;
+        }
+        var parent = node.parent;
+        if (parent is LabeledStatement) {
+          for (var nodeLabel in parent.labels) {
+            if (identical(nodeLabel.label.staticElement, element)) {
+              return node;
+            }
+          }
+        }
+      }
+      if (element != null && node is SwitchStatement) {
+        for (var member in node.members) {
+          for (var nodeLabel in member.labels) {
+            if (identical(nodeLabel.label.staticElement, element)) {
+              return node;
+            }
+          }
+        }
+      }
+    }
+    return null;
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
index fb034da..081ef0e 100644
--- a/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -13,14 +13,13 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 
-import '../../context/mock_sdk.dart';
 import 'resolution.dart';
 
 /// [AnalysisDriver] based implementation of [ResolutionTest].
-class DriverResolutionTest extends Object
-    with ResourceProviderMixin, ResolutionTest {
+class DriverResolutionTest with ResourceProviderMixin, ResolutionTest {
   final ByteStore byteStore = new MemoryByteStore();
 
   final StringBuffer logBuffer = new StringBuffer();
@@ -30,9 +29,20 @@
   AnalysisDriverScheduler scheduler;
   AnalysisDriver driver;
 
+  /// Override this to change the analysis options for a given set of tests.
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl();
+
+  void addMetaPackage() {
+    newFile('/.pub-cache/meta/lib/meta.dart', content: r'''
+library meta;
+
+const alwaysThrows = const Object();
+''');
+  }
+
   @override
   Future<TestAnalysisResult> resolveFile(String path) async {
-    AnalysisResult result = await driver.getResult(path);
+    var result = await driver.getResult(path);
     return new TestAnalysisResult(
       path,
       result.content,
@@ -50,6 +60,7 @@
       'test': [getFolder('/test/lib')],
       'aaa': [getFolder('/aaa/lib')],
       'bbb': [getFolder('/bbb/lib')],
+      'meta': [getFolder('/.pub-cache/meta/lib')],
     };
 
     driver = new AnalysisDriver(
@@ -64,7 +75,7 @@
           new PackageMapUriResolver(resourceProvider, packageMap),
           new ResourceUriResolver(resourceProvider)
         ], null, resourceProvider),
-        new AnalysisOptionsImpl());
+        analysisOptions);
 
     scheduler.start();
   }
diff --git a/pkg/analyzer/test/src/dart/resolution/enum_test.dart b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
index 930ab7c..ff350fb 100644
--- a/pkg/analyzer/test/src/dart/resolution/enum_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
@@ -21,7 +21,7 @@
 class EnumDriverResolutionTest extends DriverResolutionTest
     with EnumResolutionMixin {}
 
-abstract class EnumResolutionMixin implements ResolutionTest {
+mixin EnumResolutionMixin implements ResolutionTest {
   test_error_conflictingStaticAndInstance_index() async {
     addTestFile(r'''
 enum E {
diff --git a/pkg/analyzer/test/src/dart/resolution/find_element.dart b/pkg/analyzer/test/src/dart/resolution/find_element.dart
index 4eadf43..d0ac7bf 100644
--- a/pkg/analyzer/test/src/dart/resolution/find_element.dart
+++ b/pkg/analyzer/test/src/dart/resolution/find_element.dart
@@ -9,6 +9,7 @@
 
 import 'function_ast_visitor.dart';
 
+/// Helper for finding elements declared in the resolved [unit].
 class FindElement {
   final CompilationUnit unit;
 
@@ -22,18 +23,18 @@
         return class_;
       }
     }
-    fail('Not found class: $name');
+    fail('Not found: $name');
   }
 
-  ConstructorElement constructor(String name, {String className}) {
+  ConstructorElement constructor(String name, {String of}) {
     assert(name != '');
     ConstructorElement result;
     for (var class_ in unitElement.types) {
-      if (className == null || class_.name == className) {
+      if (of == null || class_.name == of) {
         for (var constructor in class_.constructors) {
           if (constructor.name == name) {
             if (result != null) {
-              throw new StateError('Not constructor name: $name');
+              fail('Not unique: $name');
             }
             result = constructor;
           }
@@ -43,7 +44,7 @@
     if (result != null) {
       return result;
     }
-    fail('Not found constructor: $name');
+    fail('Not found: $name');
   }
 
   ClassElement enum_(String name) {
@@ -52,49 +53,67 @@
         return enum_;
       }
     }
-    fail('Not found enum: $name');
+    fail('Not found: $name');
   }
 
   ExportElement export(String targetUri) {
-    ExportElement exportElement;
+    ExportElement result;
+
     for (var export in unitElement.library.exports) {
       var exportedUri = export.exportedLibrary.source.uri.toString();
       if (exportedUri == targetUri) {
-        if (exportElement != null) {
-          throw new StateError('Not unique $targetUri export.');
+        if (result != null) {
+          fail('Not unique: $targetUri');
         }
-        exportElement = export;
+        result = export;
       }
     }
-    if (exportElement != null) {
-      return exportElement;
+
+    if (result != null) {
+      return result;
     }
-    fail('Not found export: $targetUri');
+    fail('Not found: $targetUri');
   }
 
-  FieldElement field(String name) {
+  FieldElement field(String name, {String of}) {
+    FieldElement result;
+
+    void findIn(List<FieldElement> fields) {
+      for (var field in fields) {
+        if (field.name == name) {
+          if (result != null) {
+            fail('Not unique: $name');
+          }
+          result = field;
+        }
+      }
+    }
+
     for (var enum_ in unitElement.enums) {
-      for (var field in enum_.fields) {
-        if (field.name == name) {
-          return field;
-        }
+      if (of != null && enum_.name != of) {
+        continue;
       }
+      findIn(enum_.fields);
     }
-    for (var mixin in unitElement.mixins) {
-      for (var field in mixin.fields) {
-        if (field.name == name) {
-          return field;
-        }
-      }
-    }
+
     for (var class_ in unitElement.types) {
-      for (var field in class_.fields) {
-        if (field.name == name) {
-          return field;
-        }
+      if (of != null && class_.name != of) {
+        continue;
       }
+      findIn(class_.fields);
     }
-    fail('Not found field: $name');
+
+    for (var mixin in unitElement.mixins) {
+      if (of != null && mixin.name != of) {
+        continue;
+      }
+      findIn(mixin.fields);
+    }
+
+    if (result != null) {
+      return result;
+    }
+    fail('Not found: $name');
   }
 
   FunctionElement function(String name) {
@@ -103,7 +122,7 @@
         return function;
       }
     }
-    fail('Not found top-level function: $name');
+    fail('Not found: $name');
   }
 
   GenericTypeAliasElement genericTypeAlias(String name) {
@@ -112,59 +131,111 @@
         return element;
       }
     }
-    fail('Not found generic type alias: $name');
+    fail('Not found: $name');
   }
 
-  PropertyAccessorElement getter(String name, {String className}) {
-    for (var class_ in unitElement.types) {
-      if (className != null && class_.name != className) {
-        continue;
-      }
-      for (var accessor in class_.accessors) {
+  PropertyAccessorElement getter(String name, {String of}) {
+    PropertyAccessorElement result;
+
+    void findIn(List<PropertyAccessorElement> accessors) {
+      for (var accessor in accessors) {
         if (accessor.isGetter && accessor.displayName == name) {
-          return accessor;
+          if (result != null) {
+            fail('Not unique: $name');
+          }
+          result = accessor;
         }
       }
     }
-    fail('Not found class accessor: $name');
+
+    for (var enum_ in unitElement.enums) {
+      if (of != null && enum_.name != of) {
+        continue;
+      }
+      findIn(enum_.accessors);
+    }
+
+    for (var class_ in unitElement.types) {
+      if (of != null && class_.name != of) {
+        continue;
+      }
+      findIn(class_.accessors);
+    }
+
+    for (var mixin in unitElement.mixins) {
+      if (of != null && mixin.name != of) {
+        continue;
+      }
+      findIn(mixin.accessors);
+    }
+
+    if (result != null) {
+      return result;
+    }
+    fail('Not found: $name');
   }
 
   ImportElement import(String targetUri) {
     ImportElement importElement;
+
     for (var import in unitElement.library.imports) {
       var importedUri = import.importedLibrary.source.uri.toString();
       if (importedUri == targetUri) {
         if (importElement != null) {
-          throw new StateError('Not unique $targetUri import.');
+          fail('Not unique: $targetUri');
         }
         importElement = import;
       }
     }
+
     if (importElement != null) {
       return importElement;
     }
-    fail('Not found import: $targetUri');
+    fail('Not found: $targetUri');
   }
 
   InterfaceType interfaceType(String name) {
     return class_(name).type;
   }
 
-  LocalVariableElement localVar(String name) {
-    LocalVariableElement result;
+  FunctionElement localFunction(String name) {
+    FunctionElement result;
+
     unit.accept(new FunctionAstVisitor(
-      variableDeclaration: (node) {
-        var element = node.declaredElement;
-        if (element is LocalVariableElement) {
+      functionDeclarationStatement: (node) {
+        var element = node.functionDeclaration.declaredElement;
+        if (element is FunctionElement) {
           if (result != null) {
-            throw new StateError('Local variable name $name is not unique.');
+            fail('Not unique: $name');
           }
           result = element;
         }
       },
     ));
+
     if (result == null) {
-      fail('Not found local variable: $name');
+      fail('Not found: $name');
+    }
+    return result;
+  }
+
+  LocalVariableElement localVar(String name) {
+    LocalVariableElement result;
+
+    unit.accept(new FunctionAstVisitor(
+      variableDeclaration: (node) {
+        var element = node.declaredElement;
+        if (element is LocalVariableElement && element.name == name) {
+          if (result != null) {
+            fail('Not unique: $name');
+          }
+          result = element;
+        }
+      },
+    ));
+
+    if (result == null) {
+      fail('Not found: $name');
     }
     return result;
   }
@@ -176,7 +247,7 @@
       for (var method in methods) {
         if (method.name == name) {
           if (result != null) {
-            throw new StateError('Method name $name is not unique.');
+            fail('Not unique: $name');
           }
           result = method;
         }
@@ -200,7 +271,7 @@
     if (result != null) {
       return result;
     }
-    fail('Not found class method: $name');
+    fail('Not found: $name');
   }
 
   ClassElement mixin(String name) {
@@ -209,73 +280,92 @@
         return mixin;
       }
     }
-    fail('Not found mixin: $name');
+    fail('Not found: $name');
   }
 
   ParameterElement parameter(String name) {
-    ParameterElement parameterElement;
-    void considerParameter(ParameterElement parameter) {
-      if (parameter.name == name) {
-        if (parameterElement != null) {
-          throw new StateError('Parameter name $name is not unique.');
+    ParameterElement result;
+
+    void findIn(List<ParameterElement> parameters) {
+      for (var parameter in parameters) {
+        if (parameter.name == name) {
+          if (result != null) {
+            fail('Not unique: $name');
+          }
+          result = parameter;
         }
-        parameterElement = parameter;
       }
     }
 
     for (var accessor in unitElement.accessors) {
-      accessor.parameters.forEach(considerParameter);
+      findIn(accessor.parameters);
     }
+
     for (var function in unitElement.functions) {
-      function.parameters.forEach(considerParameter);
+      findIn(function.parameters);
     }
+
     for (var function in unitElement.functionTypeAliases) {
-      function.parameters.forEach(considerParameter);
+      findIn(function.parameters);
     }
+
     for (var class_ in unitElement.types) {
       for (var constructor in class_.constructors) {
-        constructor.parameters.forEach(considerParameter);
+        findIn(constructor.parameters);
       }
       for (var method in class_.methods) {
-        method.parameters.forEach(considerParameter);
+        findIn(method.parameters);
       }
     }
-    if (parameterElement != null) {
-      return parameterElement;
+
+    if (result != null) {
+      return result;
     }
-    fail('No parameter found with name $name');
+    fail('Not found: $name');
   }
 
   PrefixElement prefix(String name) {
     for (var import_ in unitElement.library.imports) {
       var prefix = import_.prefix;
-      if (prefix != null && prefix.name == name) {
+      if (prefix?.name == name) {
         return prefix;
       }
     }
-    fail('Prefix not found: $name');
+    fail('Not found: $name');
   }
 
-  PropertyAccessorElement setter(String name, {String className}) {
+  PropertyAccessorElement setter(String name, {String of}) {
     PropertyAccessorElement result;
-    for (var class_ in unitElement.types) {
-      if (className != null && class_.name != className) {
-        continue;
-      }
-      for (var accessor in class_.accessors) {
+
+    void findIn(List<PropertyAccessorElement> accessors) {
+      for (var accessor in accessors) {
         if (accessor.isSetter && accessor.displayName == name) {
-          if (result == null) {
-            result = accessor;
-          } else {
-            throw new StateError('Class setter $name is not unique.');
+          if (result != null) {
+            fail('Not unique: $name');
           }
+          result = accessor;
         }
       }
     }
-    if (result == null) {
-      fail('Not found class setter: $name');
+
+    for (var class_ in unitElement.types) {
+      if (of != null && class_.name != of) {
+        continue;
+      }
+      findIn(class_.accessors);
     }
-    return result;
+
+    for (var mixin in unitElement.mixins) {
+      if (of != null && mixin.name != of) {
+        continue;
+      }
+      findIn(mixin.accessors);
+    }
+
+    if (result != null) {
+      return result;
+    }
+    fail('Not found: $name');
   }
 
   FunctionElement topFunction(String name) {
@@ -284,7 +374,7 @@
         return function;
       }
     }
-    fail('Not found top-level function: $name');
+    fail('Not found: $name');
   }
 
   PropertyAccessorElement topGet(String name) {
@@ -301,31 +391,42 @@
         return variable;
       }
     }
-    fail('Not found top-level variable: $name');
+    fail('Not found: $name');
   }
 
   TypeParameterElement typeParameter(String name) {
     TypeParameterElement result;
 
-    void consider(TypeParameterElement candidate) {
-      if (candidate.name == name) {
-        if (result != null) {
-          throw new StateError('Type parameter $name is not unique.');
+    void findIn(List<TypeParameterElement> typeParameters) {
+      for (var typeParameter in typeParameters) {
+        if (typeParameter.name == name) {
+          if (result != null) {
+            fail('Not unique: $name');
+          }
+          result = typeParameter;
         }
-        result = candidate;
       }
     }
 
     for (var type in unitElement.functionTypeAliases) {
-      type.typeParameters.forEach(consider);
+      findIn(type.typeParameters);
+      if (type is GenericTypeAliasElement) {
+        findIn(type.function.typeParameters);
+      }
     }
-    for (var type in unitElement.types) {
-      type.typeParameters.forEach(consider);
+
+    for (var class_ in unitElement.types) {
+      findIn(class_.typeParameters);
     }
+
+    for (var mixin in unitElement.mixins) {
+      findIn(mixin.typeParameters);
+    }
+
     if (result != null) {
       return result;
     }
-    fail('Not found type parameter: $name');
+    fail('Not found: $name');
   }
 
   ConstructorElement unnamedConstructor(String name) {
diff --git a/pkg/analyzer/test/src/dart/resolution/find_node.dart b/pkg/analyzer/test/src/dart/resolution/find_node.dart
index 67271af..08de2f9 100644
--- a/pkg/analyzer/test/src/dart/resolution/find_node.dart
+++ b/pkg/analyzer/test/src/dart/resolution/find_node.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -28,6 +28,10 @@
     return _node(search, (n) => n is CascadeExpression);
   }
 
+  ClassDeclaration classDeclaration(String search) {
+    return _node(search, (n) => n is ClassDeclaration);
+  }
+
   CommentReference commentReference(String search) {
     return _node(search, (n) => n is CommentReference);
   }
@@ -158,7 +162,7 @@
     var node = new NodeLocator2(index).searchWithin(unit);
     expect(node, isNotNull);
 
-    var result = node.getAncestor(predicate);
+    var result = node.thisOrAncestorMatching(predicate);
     expect(result, isNotNull);
     return result;
   }
diff --git a/pkg/analyzer/test/src/dart/resolution/for_in_test.dart b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
index fdbdd76..7ec1a40 100644
--- a/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
@@ -20,7 +20,7 @@
 class ForInDriverResolutionTest extends DriverResolutionTest
     with ForInResolutionMixin {}
 
-abstract class ForInResolutionMixin implements ResolutionTest {
+mixin ForInResolutionMixin implements ResolutionTest {
   test_importPrefix_asIterable() async {
     // TODO(scheglov) Remove this test (already tested as import prefix).
     // TODO(scheglov) Move other for-in tests here.
diff --git a/pkg/analyzer/test/src/dart/resolution/function_ast_visitor.dart b/pkg/analyzer/test/src/dart/resolution/function_ast_visitor.dart
index 82ae780..f3c951b 100644
--- a/pkg/analyzer/test/src/dart/resolution/function_ast_visitor.dart
+++ b/pkg/analyzer/test/src/dart/resolution/function_ast_visitor.dart
@@ -7,10 +7,23 @@
 
 /// [RecursiveAstVisitor] that delegates visit methods to functions.
 class FunctionAstVisitor extends RecursiveAstVisitor<void> {
+  final void Function(FunctionDeclarationStatement)
+      functionDeclarationStatement;
   final void Function(SimpleIdentifier) simpleIdentifier;
   final void Function(VariableDeclaration) variableDeclaration;
 
-  FunctionAstVisitor({this.simpleIdentifier, this.variableDeclaration});
+  FunctionAstVisitor(
+      {this.functionDeclarationStatement,
+      this.simpleIdentifier,
+      this.variableDeclaration});
+
+  @override
+  void visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+    if (functionDeclarationStatement != null) {
+      functionDeclarationStatement(node);
+    }
+    super.visitFunctionDeclarationStatement(node);
+  }
 
   @override
   void visitSimpleIdentifier(SimpleIdentifier node) {
diff --git a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
index 7f24421a..2e64644 100644
--- a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/error/codes.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -20,7 +21,111 @@
 class GenericTypeAliasDriverResolutionTest extends DriverResolutionTest
     with GenericTypeAliasResolutionMixin {}
 
-abstract class GenericTypeAliasResolutionMixin implements ResolutionTest {
+mixin GenericTypeAliasResolutionMixin implements ResolutionTest {
+  test_genericFunctionTypeCannotBeTypeArgument_def_class() async {
+    addTestFile(r'''
+class C<T> {}
+
+typedef G = Function<S>();
+
+C<G> x;
+''');
+    await resolveTestFile();
+    assertTestErrors(
+      [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
+    );
+  }
+
+  test_genericFunctionTypeCannotBeTypeArgument_literal_class() async {
+    addTestFile(r'''
+class C<T> {}
+
+C<Function<S>()> x;
+''');
+    await resolveTestFile();
+    assertTestErrors(
+      [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
+    );
+  }
+
+  test_genericFunctionTypeCannotBeTypeArgument_literal_function() async {
+    addTestFile(r'''
+T f<T>(T) => null;
+
+main() {
+  f<Function<S>()>(null);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors(
+      [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
+    );
+  }
+
+  test_genericFunctionTypeCannotBeTypeArgument_literal_functionType() async {
+    addTestFile(r'''
+T Function<T>(T) f;
+
+main() {
+  f<Function<S>()>(null);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors(
+      [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
+    );
+  }
+
+  test_genericFunctionTypeCannotBeTypeArgument_literal_method() async {
+    addTestFile(r'''
+class C {
+  T f<T>(T) => null;
+}
+
+main() {
+  new C().f<Function<S>()>(null);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors(
+      [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
+    );
+  }
+
+  test_genericFunctionTypeCannotBeTypeArgument_literal_typedef() async {
+    addTestFile(r'''
+typedef T F<T>(T t);
+
+F<Function<S>()> x;
+''');
+    await resolveTestFile();
+    assertTestErrors(
+      [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
+    );
+  }
+
+  test_genericFunctionTypeCannotBeTypeArgument_OK_def_class() async {
+    addTestFile(r'''
+class C<T> {}
+
+typedef G = Function();
+
+C<G> x;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_genericFunctionTypeCannotBeTypeArgument_OK_literal_class() async {
+    addTestFile(r'''
+class C<T> {}
+
+C<Function()> x;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
   test_typeParameters() async {
     addTestFile(r'''
 class A {}
diff --git a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
index a269e79..b13db90 100644
--- a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
@@ -21,7 +21,7 @@
 class ImportPrefixDriverResolutionTest extends DriverResolutionTest
     with ImportPrefixResolutionMixin {}
 
-abstract class ImportPrefixResolutionMixin implements ResolutionTest {
+mixin ImportPrefixResolutionMixin implements ResolutionTest {
   test_asExpression_expressionStatement() async {
     addTestFile(r'''
 import 'dart:async' as p;
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
index 9594336..302d84b 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
@@ -20,7 +20,7 @@
 class InstanceCreationDriverResolutionTest extends DriverResolutionTest
     with InstanceCreationResolutionMixin {}
 
-abstract class InstanceCreationResolutionMixin implements ResolutionTest {
+mixin InstanceCreationResolutionMixin implements ResolutionTest {
   test_error_wrongNumberOfTypeArgumentsConstructor_explicitNew() async {
     addTestFile(r'''
 class Foo<X> {
@@ -47,6 +47,24 @@
 //    );
   }
 
+  test_error_newWithInvalidTypeParameters_implicitNew_inference_top() async {
+    addTestFile(r'''
+final foo = Map<int>();
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS,
+    ]);
+
+    var creation = findNode.instanceCreation('Map<int>');
+    assertInstanceCreation(
+      creation,
+      mapElement,
+      'Map<dynamic, dynamic>',
+      expectedConstructorMember: true,
+    );
+  }
+
   test_error_wrongNumberOfTypeArgumentsConstructor_explicitNew_prefix() async {
     newFile('/test/lib/a.dart', content: '''
 class Foo<X> {
@@ -137,4 +155,10 @@
 
 @reflectiveTest
 class InstanceCreationTaskResolutionTest extends TaskResolutionTest
-    with InstanceCreationResolutionMixin {}
+    with InstanceCreationResolutionMixin {
+  @FailingTest(reason: 'Does not report the error.')
+  test_error_newWithInvalidTypeParameters_implicitNew_inference_top() {
+    return super
+        .test_error_newWithInvalidTypeParameters_implicitNew_inference_top();
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
index 1218643..ad4b765 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
@@ -19,7 +19,7 @@
 class InstanceMemberInferenceClassDriverResolutionTest
     extends DriverResolutionTest with InstanceMemberInferenceClassMixin {}
 
-abstract class InstanceMemberInferenceClassMixin implements ResolutionTest {
+mixin InstanceMemberInferenceClassMixin implements ResolutionTest {
   test_invalid_inheritanceCycle() async {
     addTestFile('''
 class A extends C {}
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
index 387e166..36db4b0 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
@@ -19,7 +19,7 @@
 class InstanceMemberInferenceMixinDriverResolutionTest
     extends DriverResolutionTest with InstanceMemberInferenceMixinMixin {}
 
-abstract class InstanceMemberInferenceMixinMixin implements ResolutionTest {
+mixin InstanceMemberInferenceMixinMixin implements ResolutionTest {
   test_invalid_inheritanceCycle() async {
     addTestFile('''
 mixin A on C {}
diff --git a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
new file mode 100644
index 0000000..a10b0e1
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
@@ -0,0 +1,1776 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MethodInvocationResolutionTest);
+  });
+}
+
+@reflectiveTest
+class MethodInvocationResolutionTest extends DriverResolutionTest {
+  test_error_abstractSuperMemberReference() async {
+    addTestFile(r'''
+abstract class A {
+  void foo(int _);
+}
+abstract class B extends A {
+  void bar() {
+    super.foo(0);
+  }
+
+  void foo(int _) {} // does not matter
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo', of: 'A'),
+      '(int) → void',
+    );
+    assertSuperExpression(invocation.target);
+  }
+
+  test_error_abstractSuperMemberReference_mixinHasNoSuchMethod() async {
+    addTestFile('''
+class A {
+  int foo();
+  noSuchMethod(im) => 42;
+}
+
+class B extends Object with A {
+  foo() => super.foo(); // ref
+  noSuchMethod(im) => 87;
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+
+    var invocation = findNode.methodInvocation('foo(); // ref');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo', of: 'A'),
+      '() → int',
+    );
+    assertSuperExpression(invocation.target);
+  }
+
+  test_error_abstractSuperMemberReference_OK_mixinHasConcrete() async {
+    addTestFile('''
+class A {}
+
+class M {
+  void foo(int _) {}
+}
+
+class B = A with M;
+
+class C extends B {
+  void bar() {
+    super.foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo', of: 'M'),
+      '(int) → void',
+    );
+    assertSuperExpression(invocation.target);
+  }
+
+  test_error_abstractSuperMemberReference_OK_superHasNoSuchMethod() async {
+    addTestFile(r'''
+class A {
+  int foo();
+  noSuchMethod(im) => 42;
+}
+
+class B extends A {
+  int foo() => super.foo(); // ref
+  noSuchMethod(im) => 87;
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('super.foo(); // ref');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo', of: 'A'),
+      '() → int',
+    );
+    assertSuperExpression(invocation.target);
+  }
+
+  test_error_abstractSuperMemberReference_OK_superSuperHasConcrete() async {
+    addTestFile('''
+abstract class A {
+  void foo(int _) {}
+}
+
+abstract class B extends A {
+  void foo(int _);
+}
+
+class C extends B {
+  void bar() {
+    super.foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo', of: 'A'),
+      '(int) → void',
+    );
+    assertSuperExpression(invocation.target);
+  }
+
+  test_error_ambiguousImport_topFunction() async {
+    newFile('/test/lib/a.dart', content: r'''
+void foo(int _) {}
+''');
+    newFile('/test/lib/b.dart', content: r'''
+void foo(int _) {}
+''');
+
+    addTestFile(r'''
+import 'a.dart';
+import 'b.dart';
+
+main() {
+  foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.AMBIGUOUS_IMPORT,
+    ]);
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertInvokeType(invocation, '(int) → void');
+    assertType(invocation, 'void');
+  }
+
+  test_error_ambiguousImport_topFunction_prefixed() async {
+    newFile('/test/lib/a.dart', content: r'''
+void foo(int _) {}
+''');
+    newFile('/test/lib/b.dart', content: r'''
+void foo(int _) {}
+''');
+
+    addTestFile(r'''
+import 'a.dart' as p;
+import 'b.dart' as p;
+
+main() {
+  p.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.AMBIGUOUS_IMPORT,
+    ]);
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertInvokeType(invocation, '(int) → void');
+    assertType(invocation, 'void');
+  }
+
+  test_error_instanceAccessToStaticMember_method() async {
+    addTestFile(r'''
+class A {
+  static void foo(int _) {}
+}
+
+main(A a) {
+  a.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
+    ]);
+    _assertInvalidInvocation(
+      'a.foo(0)',
+      findElement.method('foo'),
+      expectedNameType: '(int) → void',
+    );
+  }
+
+  test_error_invocationOfNonFunction_interface_hasCall_field() async {
+    addTestFile(r'''
+class C {
+  void Function() call;
+}
+
+main(C c) {
+  c();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
+    ]);
+    _assertInvalidInvocation(
+      'c()',
+      findElement.parameter('c'),
+    );
+  }
+
+  test_error_invocationOfNonFunction_localVariable() async {
+    addTestFile(r'''
+main() {
+  Object foo;
+  foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
+    ]);
+    _assertInvalidInvocation(
+      'foo()',
+      findElement.localVar('foo'),
+      expectedNameType: 'Object',
+    );
+  }
+
+  test_error_invocationOfNonFunction_OK_dynamic_localVariable() async {
+    addTestFile(r'''
+main() {
+  var foo;
+  foo();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertInvalidInvocation('foo();', findElement.localVar('foo'));
+  }
+
+  test_error_invocationOfNonFunction_OK_dynamicGetter_instance() async {
+    addTestFile(r'''
+class C {
+  var foo;
+}
+
+main(C c) {
+  c.foo();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertInvalidInvocation(
+      'c.foo();',
+      findElement.getter('foo'),
+      expectedMethodNameType: '() → dynamic',
+    );
+  }
+
+  test_error_invocationOfNonFunction_OK_dynamicGetter_superClass() async {
+    addTestFile(r'''
+class A {
+  var foo;
+}
+
+class B extends A {
+  main() {
+    foo();
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertInvalidInvocation(
+      'foo();',
+      findElement.getter('foo'),
+      expectedMethodNameType: '() → dynamic',
+    );
+  }
+
+  test_error_invocationOfNonFunction_OK_dynamicGetter_thisClass() async {
+    addTestFile(r'''
+class C {
+  var foo;
+
+  main() {
+    foo();
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertInvalidInvocation(
+      'foo();',
+      findElement.getter('foo'),
+      expectedMethodNameType: '() → dynamic',
+    );
+  }
+
+  test_error_invocationOfNonFunction_OK_Function() async {
+    addTestFile(r'''
+f(Function foo) {
+  foo(1, 2);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertInvalidInvocation('foo(1, 2);', findElement.parameter('foo'));
+  }
+
+  test_error_invocationOfNonFunction_OK_functionTypeTypeParameter() async {
+    addTestFile(r'''
+typedef MyFunction = double Function(int _);
+
+class C<T extends MyFunction> {
+  T foo;
+  
+  main() {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    assertMethodInvocation(
+      findNode.methodInvocation('foo(0)'),
+      findElement.getter('foo'),
+      '(int) → double',
+      expectedMethodNameType: '() → T',
+    );
+  }
+
+  test_error_invocationOfNonFunction_static_hasTarget() async {
+    addTestFile(r'''
+class C {
+  static int foo;
+}
+
+main() {
+  C.foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
+    ]);
+    _assertInvalidInvocation(
+      'foo()',
+      findElement.getter('foo'),
+      expectedMethodNameType: '() → int',
+    );
+  }
+
+  test_error_invocationOfNonFunction_static_noTarget() async {
+    addTestFile(r'''
+class C {
+  static int foo;
+  
+  main() {
+    foo();
+  }
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
+    ]);
+    _assertInvalidInvocation(
+      'foo()',
+      findElement.getter('foo'),
+      expectedMethodNameType: '() → int',
+    );
+  }
+
+  test_error_invocationOfNonFunction_super_getter() async {
+    addTestFile(r'''
+class A {
+  int get foo => 0;
+}
+
+class B extends A {
+  main() {
+    super.foo();
+  }
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
+    ]);
+    _assertInvalidInvocation(
+      'foo()',
+      findElement.getter('foo'),
+      expectedMethodNameType: '() → int',
+    );
+  }
+
+  test_error_prefixIdentifierNotFollowedByDot() async {
+    newFile('/test/lib/a.dart', content: r'''
+void foo() {}
+''');
+
+    addTestFile(r'''
+import 'a.dart' as prefix;
+
+main() {
+  prefix?.foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+    ]);
+
+    var import = _importFinder('package:test/a.dart');
+
+    var invocation = findNode.methodInvocation('foo();');
+    assertMethodInvocation(
+      invocation,
+      import.topFunction('foo'),
+      '() → void',
+    );
+    assertImportPrefix(invocation.target, import.prefix);
+  }
+
+  test_error_prefixIdentifierNotFollowedByDot_deferred() async {
+    addTestFile(r'''
+import 'dart:math' deferred as math;
+
+main() {
+  math?.loadLibrary();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+    ]);
+
+    var import = _importFinder('dart:math');
+
+    var invocation = findNode.methodInvocation('loadLibrary()');
+    assertMethodInvocation(
+      invocation,
+      import.importedLibrary.loadLibraryFunction,
+      '() → Future<dynamic>',
+    );
+    assertImportPrefix(invocation.target, import.prefix);
+  }
+
+  test_error_prefixIdentifierNotFollowedByDot_invoke() async {
+    addTestFile(r'''
+import 'dart:math' as foo;
+
+main() {
+  foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+    ]);
+    _assertInvalidInvocation(
+      'foo()',
+      findElement.import('dart:math').prefix,
+      dynamicNameType: true,
+    );
+  }
+
+  test_error_undefinedFunction() async {
+    addTestFile(r'''
+main() {
+  foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_FUNCTION,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0)');
+  }
+
+  test_error_undefinedFunction_hasTarget_importPrefix() async {
+    addTestFile(r'''
+import 'dart:math' as math;
+
+main() {
+  math.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_FUNCTION,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+  }
+
+  test_error_undefinedIdentifier_target() async {
+    addTestFile(r'''
+main() {
+  bar.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+  }
+
+  test_error_undefinedMethod_hasTarget_class() async {
+    addTestFile(r'''
+class C {}
+main() {
+  C.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+  }
+
+  test_error_undefinedMethod_hasTarget_class_arguments() async {
+    addTestFile(r'''
+class C {}
+
+int x;
+main() {
+  C.foo(x);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+
+    _assertUnresolvedMethodInvocation('foo(x);');
+    assertTopGetRef('x)', 'x');
+  }
+
+  test_error_undefinedMethod_hasTarget_class_inSuperclass() async {
+    addTestFile(r'''
+class S {
+  static void foo(int _) {}
+}
+
+class C extends S {}
+
+main() {
+  C.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+  }
+
+  test_error_undefinedMethod_hasTarget_class_typeArguments() async {
+    addTestFile(r'''
+class C {}
+
+main() {
+  C.foo<int>();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+
+    _assertUnresolvedMethodInvocation('foo<int>();');
+    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+  }
+
+  test_error_undefinedMethod_hasTarget_class_typeParameter() async {
+    addTestFile(r'''
+class C<T> {
+  static main() => C.T();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('C.T();');
+  }
+
+  test_error_undefinedMethod_hasTarget_instance() async {
+    addTestFile(r'''
+main() {
+  42.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+  }
+
+  test_error_undefinedMethod_hasTarget_localVariable_function() async {
+    addTestFile(r'''
+main() {
+  var v = () {};
+  v.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+  }
+
+  test_error_undefinedMethod_noTarget() async {
+    addTestFile(r'''
+class C {
+  main() {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+  }
+
+  test_error_undefinedMethod_object_call() async {
+    addTestFile(r'''
+main(Object o) {
+  o.call();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+  }
+
+  test_error_undefinedMethod_OK_null() async {
+    addTestFile(r'''
+main() {
+  null.foo();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertUnresolvedMethodInvocation('foo();');
+  }
+
+  test_error_undefinedMethod_private() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {
+  void _foo(int _) {}
+}
+''');
+    addTestFile(r'''
+import 'a.dart';
+
+class B extends A {
+  main() {
+    _foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('_foo(0);');
+  }
+
+  test_error_undefinedMethod_typeLiteral_cascadeTarget() async {
+    addTestFile(r'''
+class C {
+  static void foo() {}
+}
+
+main() {
+  C..foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+  }
+
+  test_error_undefinedMethod_typeLiteral_conditional() async {
+    // When applied to a type literal, the conditional access operator '?.'
+    // cannot be used to access instance methods of Type.
+    addTestFile(r'''
+class A {}
+main() {
+  A?.toString();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+    ]);
+  }
+
+  test_error_undefinedSuperMethod() async {
+    addTestFile(r'''
+class A {}
+
+class B extends A {
+  void foo(int _) {
+    super.foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(0);');
+    assertSuperExpression(findNode.super_('super.foo'));
+  }
+
+  test_error_unqualifiedReferenceToNonLocalStaticMember_method() async {
+    addTestFile(r'''
+class A {
+  static void foo() {}
+}
+
+class B extends A {
+  main() {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
+    ]);
+
+    _assertInvalidInvocation(
+      'foo(0)',
+      findElement.method('foo'),
+      expectedNameType: '(int) → void',
+    );
+  }
+
+  /// The primary purpose of this test is to ensure that we are only getting a
+  /// single error generated when the only problem is that an imported file
+  /// does not exist.
+  test_error_uriDoesNotExist_prefixed() async {
+    addTestFile(r'''
+import 'missing.dart' as p;
+
+main() {
+  p.foo(1);
+  p.bar(2);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(1);');
+    _assertUnresolvedMethodInvocation('bar(2);');
+  }
+
+  /// The primary purpose of this test is to ensure that we are only getting a
+  /// single error generated when the only problem is that an imported file
+  /// does not exist.
+  test_error_uriDoesNotExist_show() async {
+    addTestFile(r'''
+import 'missing.dart' show foo, bar;
+
+main() {
+  foo(1);
+  bar(2);
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+    ]);
+    _assertUnresolvedMethodInvocation('foo(1);');
+    _assertUnresolvedMethodInvocation('bar(2);');
+  }
+
+  test_error_useOfVoidResult_name_getter() async {
+    addTestFile(r'''
+class C<T>{
+  T foo;
+}
+
+main(C<void> c) {
+  c.foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.USE_OF_VOID_RESULT,
+    ]);
+    _assertInvalidInvocation(
+      'c.foo()',
+      findElement.getter('foo'),
+      expectedNameType: 'void',
+      expectedMethodNameType: '() → void',
+    );
+  }
+
+  test_error_useOfVoidResult_name_localVariable() async {
+    addTestFile(r'''
+main() {
+  void foo;
+  foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.USE_OF_VOID_RESULT,
+    ]);
+    _assertInvalidInvocation(
+      'foo()',
+      findElement.localVar('foo'),
+      expectedNameType: 'void',
+    );
+  }
+
+  test_error_useOfVoidResult_name_topFunction() async {
+    addTestFile(r'''
+void foo() {}
+
+main() {
+  foo()();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.USE_OF_VOID_RESULT,
+    ]);
+    assertMethodInvocation(
+      findNode.methodInvocation('foo()()'),
+      findElement.topFunction('foo'),
+      '() → void',
+    );
+  }
+
+  test_error_useOfVoidResult_name_topVariable() async {
+    addTestFile(r'''
+void foo;
+
+main() {
+  foo();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.USE_OF_VOID_RESULT,
+    ]);
+    _assertInvalidInvocation(
+      'foo()',
+      findElement.topGet('foo'),
+      expectedNameType: 'void',
+      expectedMethodNameType: '() → void',
+    );
+  }
+
+  test_error_useOfVoidResult_receiver() async {
+    addTestFile(r'''
+main() {
+  void foo;
+  foo.toString();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.USE_OF_VOID_RESULT,
+    ]);
+    // TODO(scheglov) Resolve fully, or don't resolve at all.
+    assertMethodInvocation(
+      findNode.methodInvocation('toString()'),
+      null,
+      '() → String',
+    );
+  }
+
+  test_error_useOfVoidResult_receiver_cascade() async {
+    addTestFile(r'''
+main() {
+  void foo;
+  foo..toString();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.USE_OF_VOID_RESULT,
+    ]);
+    // TODO(scheglov) Resolve fully, or don't resolve at all.
+    assertMethodInvocation(
+      findNode.methodInvocation('toString()'),
+      null,
+      '() → String',
+    );
+  }
+
+  test_error_useOfVoidResult_receiver_withNull() async {
+    addTestFile(r'''
+main() {
+  void foo;
+  foo?.toString();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticWarningCode.USE_OF_VOID_RESULT,
+    ]);
+    // TODO(scheglov) Resolve fully, or don't resolve at all.
+    assertMethodInvocation(
+      findNode.methodInvocation('toString()'),
+      null,
+      '() → String',
+    );
+  }
+
+  test_error_wrongNumberOfTypeArgumentsMethod_01() async {
+    addTestFile(r'''
+void foo() {}
+
+main() {
+  foo<int>();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
+    ]);
+    assertMethodInvocation(
+      findNode.methodInvocation('foo<int>()'),
+      findElement.topFunction('foo'),
+      '() → void',
+    );
+    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+  }
+
+  test_error_wrongNumberOfTypeArgumentsMethod_21() async {
+    addTestFile(r'''
+Map<T, U> foo<T extends num, U>() => null;
+
+main() {
+  foo<int>();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
+    ]);
+    assertMethodInvocation(
+      findNode.methodInvocation('foo<int>()'),
+      findElement.topFunction('foo'),
+      '() → Map<num, dynamic>',
+    );
+    assertTypeName(findNode.typeName('int>'), intElement, 'int');
+  }
+
+  test_hasReceiver_class_staticGetter() async {
+    addTestFile(r'''
+class C {
+  static double Function(int) get foo => null;
+}
+
+main() {
+  C.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.getter('foo'),
+      '(int) → double',
+      expectedMethodNameType: '() → (int) → double',
+    );
+    assertClassRef(invocation.target, findElement.class_('C'));
+  }
+
+  test_hasReceiver_class_staticMethod() async {
+    addTestFile(r'''
+class C {
+  static void foo(int _) {}
+}
+
+main() {
+  C.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo'),
+      '(int) → void',
+    );
+    assertClassRef(invocation.target, findElement.class_('C'));
+  }
+
+  test_hasReceiver_deferredImportPrefix_loadLibrary() async {
+    addTestFile(r'''
+import 'dart:math' deferred as math;
+
+main() {
+  math.loadLibrary();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var import = _importFinder('dart:math');
+
+    var invocation = findNode.methodInvocation('loadLibrary()');
+    assertMethodInvocation(
+      invocation,
+      import.importedLibrary.loadLibraryFunction,
+      '() → Future<dynamic>',
+    );
+    assertImportPrefix(invocation.target, import.prefix);
+  }
+
+  test_hasReceiver_functionTyped_call() async {
+    addTestFile(r'''
+void foo(int _) {}
+
+main() {
+  foo.call(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('call(0)');
+    assertMethodInvocation(
+      invocation,
+      null,
+      '(int) → void',
+    );
+    assertElement(invocation.target, findElement.topFunction('foo'));
+    assertType(invocation.target, '(int) → void');
+  }
+
+  test_hasReceiver_importPrefix_topFunction() async {
+    newFile('/test/lib/a.dart', content: r'''
+T foo<T extends num>(T a, T b) => a;
+''');
+
+    addTestFile(r'''
+import 'a.dart' as prefix;
+
+main() {
+  prefix.foo(1, 2);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var import = _importFinder('package:test/a.dart');
+
+    var invocation = findNode.methodInvocation('foo(1, 2)');
+    assertMethodInvocation(
+      invocation,
+      import.topFunction('foo'),
+      '(int, int) → int',
+    );
+    assertImportPrefix(invocation.target, import.prefix);
+  }
+
+  test_hasReceiver_importPrefix_topGetter() async {
+    newFile('/test/lib/a.dart', content: r'''
+T Function<T>(T a, T b) get foo => null;
+''');
+
+    addTestFile(r'''
+import 'a.dart' as prefix;
+
+main() {
+  prefix.foo(1, 2);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var import = _importFinder('package:test/a.dart');
+
+    var invocation = findNode.methodInvocation('foo(1, 2)');
+    assertMethodInvocation(
+      invocation,
+      import.topGetter('foo'),
+      '(int, int) → int',
+      expectedMethodNameType: '() → <T>(T, T) → T',
+    );
+    assertImportPrefix(invocation.target, import.prefix);
+  }
+
+  test_hasReceiver_instance_Function_call_localVariable() async {
+    addTestFile(r'''
+void main() {
+  Function foo;
+
+  foo.call(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertInvalidInvocation('call(0)', null);
+  }
+
+  test_hasReceiver_instance_Function_call_topVariable() async {
+    addTestFile(r'''
+Function foo;
+
+void main() {
+  foo.call(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertInvalidInvocation('call(0)', null);
+  }
+
+  test_hasReceiver_instance_getter() async {
+    addTestFile(r'''
+class C {
+  double Function(int) get foo => null;
+}
+
+main(C c) {
+  c.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.getter('foo'),
+      '(int) → double',
+      expectedMethodNameType: '() → (int) → double',
+    );
+  }
+
+  test_hasReceiver_instance_method() async {
+    addTestFile(r'''
+class C {
+  void foo(int _) {}
+}
+
+main(C c) {
+  c.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo'),
+      '(int) → void',
+      expectedMethodNameType: '(int) → void',
+    );
+  }
+
+  test_hasReceiver_instance_method_generic() async {
+    addTestFile(r'''
+class C {
+  T foo<T>(T a) {
+    return a;
+  }
+}
+
+main(C c) {
+  c.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo'),
+      '(int) → int',
+      expectedMethodNameType: '(int) → int',
+    );
+  }
+
+  test_hasReceiver_instance_method_issue30552() async {
+    addTestFile(r'''
+abstract class I1 {
+  void foo(int i);
+}
+
+abstract class I2 {
+  void foo(Object o);
+}
+
+abstract class C implements I1, I2 {}
+
+class D extends C {
+  void foo(Object o) {}
+}
+
+void main(C c) {
+  c.foo('hi');
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation("foo('hi')");
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo', of: 'I2'),
+      '(Object) → void',
+    );
+  }
+
+  test_hasReceiver_instance_typeParameter() async {
+    addTestFile(r'''
+class A {
+  void foo(int _) {}
+}
+
+class C<T extends A> {
+  T a;
+  
+  main() {
+    a.foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo'),
+      '(int) → void',
+    );
+  }
+
+  test_hasReceiver_prefixed_class_staticGetter() async {
+    newFile('/test/lib/a.dart', content: r'''
+class C {
+  static double Function(int) get foo => null;
+}
+''');
+
+    addTestFile(r'''
+import 'a.dart' as prefix;
+
+main() {
+  prefix.C.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var import = _importFinder('package:test/a.dart');
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      import.class_('C').getGetter('foo'),
+      '(int) → double',
+      expectedMethodNameType: '() → (int) → double',
+    );
+
+    PrefixedIdentifier target = invocation.target;
+    assertImportPrefix(target.prefix, import.prefix);
+    assertClassRef(target.identifier, import.class_('C'));
+  }
+
+  test_hasReceiver_prefixed_class_staticMethod() async {
+    newFile('/test/lib/a.dart', content: r'''
+class C {
+  static void foo(int _) => null;
+}
+''');
+
+    addTestFile(r'''
+import 'a.dart' as prefix;
+
+main() {
+  prefix.C.foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var import = _importFinder('package:test/a.dart');
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      import.class_('C').getMethod('foo'),
+      '(int) → void',
+    );
+
+    PrefixedIdentifier target = invocation.target;
+    assertImportPrefix(target.prefix, import.prefix);
+    assertClassRef(target.identifier, import.class_('C'));
+  }
+
+  test_hasReceiver_super_getter() async {
+    addTestFile(r'''
+class A {
+  double Function(int) get foo => null;
+}
+
+class B extends A {
+  void bar() {
+    super.foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.getter('foo', of: 'A'),
+      '(int) → double',
+      expectedMethodNameType: '() → (int) → double',
+    );
+    assertSuperExpression(invocation.target);
+  }
+
+  test_hasReceiver_super_method() async {
+    addTestFile(r'''
+class A {
+  void foo(int _) {}
+}
+
+class B extends A {
+  void foo(int _) {
+    super.foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo', of: 'A'),
+      '(int) → void',
+    );
+    assertSuperExpression(invocation.target);
+  }
+
+  test_namedArgument() async {
+    addTestFile(r'''
+void foo({int a, bool b}) {}
+
+main() {
+  foo(b: false, a: 0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(b:');
+    assertMethodInvocation(
+      invocation,
+      findElement.topFunction('foo'),
+      '({a: int, b: bool}) → void',
+    );
+    assertNamedParameterRef('b: false', 'b');
+    assertNamedParameterRef('a: 0', 'a');
+  }
+
+  test_noReceiver_getter_superClass() async {
+    addTestFile(r'''
+class A {
+  double Function(int) get foo => null;
+}
+
+class B extends A {
+  void bar() {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.getter('foo'),
+      '(int) → double',
+      expectedMethodNameType: '() → (int) → double',
+    );
+  }
+
+  test_noReceiver_getter_thisClass() async {
+    addTestFile(r'''
+class C {
+  double Function(int) get foo => null;
+
+  void bar() {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.getter('foo'),
+      '(int) → double',
+      expectedMethodNameType: '() → (int) → double',
+    );
+  }
+
+  test_noReceiver_importPrefix() async {
+    addTestFile(r'''
+import 'dart:math' as math;
+
+main() {
+  math();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
+    ]);
+    assertElement(findNode.simple('math()'), findElement.prefix('math'));
+  }
+
+  test_noReceiver_localFunction() async {
+    addTestFile(r'''
+main() {
+  void foo(int _) {}
+
+  foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.localFunction('foo'),
+      '(int) → void',
+    );
+  }
+
+  test_noReceiver_localVariable() async {
+    addTestFile(r'''
+main() {
+  void Function(int) foo;
+
+  foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.localVar('foo'),
+      '(int) → void',
+    );
+  }
+
+  test_noReceiver_localVariable_call() async {
+    addTestFile(r'''
+class C {
+  void call(int _) {}
+}
+
+main(C c) {
+  c(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('c(0);');
+    assertMethodInvocation(
+      invocation,
+      findElement.parameter('c'),
+      '(int) → void',
+    );
+  }
+
+  test_noReceiver_localVariable_promoted() async {
+    addTestFile(r'''
+main() {
+  var foo;
+  if (foo is void Function(int)) {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.localVar('foo'),
+      '(int) → void',
+    );
+  }
+
+  test_noReceiver_method_superClass() async {
+    addTestFile(r'''
+class A {
+  void foo(int _) {}
+}
+
+class B extends A {
+  void bar() {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo'),
+      '(int) → void',
+    );
+  }
+
+  test_noReceiver_method_thisClass() async {
+    addTestFile(r'''
+class C {
+  void foo(int _) {}
+
+  void bar() {
+    foo(0);
+  }
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.method('foo'),
+      '(int) → void',
+    );
+  }
+
+  test_noReceiver_topFunction() async {
+    addTestFile(r'''
+void foo(int _) {}
+
+main() {
+  foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.topFunction('foo'),
+      '(int) → void',
+      expectedMethodNameType: '(int) → void',
+    );
+  }
+
+  test_noReceiver_topGetter() async {
+    addTestFile(r'''
+double Function(int) get foo => null;
+
+main() {
+  foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.topGet('foo'),
+      '(int) → double',
+      expectedMethodNameType: '() → (int) → double',
+    );
+  }
+
+  test_noReceiver_topVariable() async {
+    addTestFile(r'''
+void Function(int) foo;
+
+main() {
+  foo(0);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('foo(0)');
+    assertMethodInvocation(
+      invocation,
+      findElement.topGet('foo'),
+      '(int) → void',
+      expectedMethodNameType: '() → (int) → void',
+    );
+  }
+
+  test_objectMethodOnDynamic() async {
+    addTestFile(r'''
+main() {
+  var v;
+  v.toString(42);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    _assertUnresolvedMethodInvocation('toString(42);');
+  }
+
+  test_objectMethodOnFunction() async {
+    addTestFile(r'''
+void f() {}
+
+main() {
+  f.toString();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var invocation = findNode.methodInvocation('toString();');
+    assertMethodInvocation(
+      invocation,
+      typeProvider.objectType.getMethod('toString'),
+      '() → String',
+    );
+  }
+
+  void _assertInvalidInvocation(String search, Element expectedElement,
+      {String expectedMethodNameType,
+      String expectedNameType,
+      bool dynamicNameType: false}) {
+    var invocation = findNode.methodInvocation(search);
+    if (dynamicNameType) {
+      assertTypeDynamic(invocation.methodName);
+    }
+    // TODO(scheglov) I think `invokeType` should be `null`.
+    assertMethodInvocation(
+      invocation,
+      expectedElement,
+      'dynamic',
+      expectedMethodNameType: expectedMethodNameType,
+      expectedNameType: expectedNameType,
+      expectedType: 'dynamic',
+    );
+  }
+
+  void _assertUnresolvedMethodInvocation(String search) {
+    // TODO(scheglov) clean up
+    _assertInvalidInvocation(search, null);
+//    var invocation = findNode.methodInvocation(search);
+//    assertTypeDynamic(invocation.methodName);
+//    // TODO(scheglov) I think `invokeType` should be `null`.
+//    assertMethodInvocation(
+//      invocation,
+//      null,
+//      'dynamic',
+//      expectedType: 'dynamic',
+//    );
+  }
+
+  _ImportElementFinder _importFinder(String targetUri) {
+    var import = findElement.import(targetUri);
+    return _ImportElementFinder(import);
+  }
+}
+
+class _ImportElementFinder {
+  final ImportElement import;
+
+  _ImportElementFinder(this.import);
+
+  CompilationUnitElement get definingUnit {
+    return importedLibrary.definingCompilationUnit;
+  }
+
+  LibraryElement get importedLibrary => import.importedLibrary;
+
+  PrefixElement get prefix => import.prefix;
+
+  ClassElement class_(String name) {
+    for (var class_ in definingUnit.types) {
+      if (class_.name == name) {
+        return class_;
+      }
+    }
+    fail('Not found class: $name');
+  }
+
+  FunctionElement topFunction(String name) {
+    for (var function in definingUnit.functions) {
+      if (function.name == name) {
+        return function;
+      }
+    }
+    fail('Not found top-level function: $name');
+  }
+
+  PropertyAccessorElement topGetter(String name) {
+    for (var accessor in definingUnit.accessors) {
+      if (accessor.name == name && accessor.isGetter) {
+        return accessor;
+      }
+    }
+    fail('Not found top-level getter: $name');
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
index 40ae57a..65cb6d7 100644
--- a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
@@ -23,7 +23,7 @@
 class MixinDriverResolutionTest extends DriverResolutionTest
     with MixinResolutionMixin {}
 
-abstract class MixinResolutionMixin implements ResolutionTest {
+mixin MixinResolutionMixin implements ResolutionTest {
   test_accessor_getter() async {
     addTestFile(r'''
 mixin M {
@@ -1004,6 +1004,54 @@
     ]);
   }
 
+  test_error_mixinApplicationNoConcreteSuperInvokedMember_OK_hasNSM() async {
+    addTestFile(r'''
+abstract class A {
+  void foo();
+}
+
+mixin M on A {
+  void bar() {
+    super.foo();
+  }
+}
+
+class C implements A {
+  noSuchMethod(_) {}
+}
+
+class X extends C with M {}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_error_mixinApplicationNoConcreteSuperInvokedMember_OK_hasNSM2() async {
+    addTestFile(r'''
+abstract class A {
+  void foo();
+}
+
+mixin M on A {
+  void bar() {
+    super.foo();
+  }
+}
+
+/// Class `B` has noSuchMethod forwarder for `foo`.
+class B implements A {
+  noSuchMethod(_) {}
+}
+
+/// Class `C` is abstract, but it inherits noSuchMethod forwarders from `B`.
+abstract class C extends B {}
+
+class X extends C with M {}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
   test_error_mixinApplicationNoConcreteSuperInvokedMember_OK_inPreviousMixin() async {
     addTestFile(r'''
 abstract class A {
@@ -1134,6 +1182,30 @@
     ]);
   }
 
+  test_error_mixinApplicationNotImplementedInterface_noMemberErrors() async {
+    addTestFile(r'''
+class A {
+  void foo() {}
+}
+
+mixin M on A {
+  void bar() {
+    super.foo();
+  }
+}
+
+class C {
+  noSuchMethod(_) {}
+}
+
+class X = C with M;
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE,
+    ]);
+  }
+
   test_error_mixinApplicationNotImplementedInterface_OK_0() async {
     addTestFile(r'''
 mixin M {}
@@ -1268,6 +1340,24 @@
     assertInstanceCreation(creation, m, 'M', constructorName: 'named');
   }
 
+  test_error_mixinInstantiate_undefined() async {
+    addTestFile(r'''
+mixin M {}
+
+main() {
+  new M.named();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.MIXIN_INSTANTIATE,
+    ]);
+
+    var creation = findNode.instanceCreation('M.named();');
+    var m = findElement.mixin('M');
+    assertElement(creation.constructorName.type.name, m);
+  }
+
   test_error_onClause_deferredClass() async {
     addTestFile(r'''
 import 'dart:math' deferred as math;
diff --git a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
new file mode 100644
index 0000000..1d4d442
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
@@ -0,0 +1,47 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonNullableTest);
+  });
+}
+
+@reflectiveTest
+class NonNullableTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
+
+  test_interfaceType() async {
+    addTestFile(r'''
+int v = 0;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var typeName = findNode.typeName('int v');
+    expect(typeName.name.name, 'int');
+    expect(typeName.question, isNull);
+  }
+
+  test_interfaceType_nullable() async {
+    addTestFile(r'''
+int? v = 0;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var typeName = findNode.typeName('int? v');
+    expect(typeName.name.name, 'int');
+    expect(typeName.question, isNotNull);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
index 6b9d107..df32638 100644
--- a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
@@ -22,7 +22,7 @@
 class OptionalConstDriverResolutionTest extends DriverResolutionTest
     with OptionalConstMixin {}
 
-abstract class OptionalConstMixin implements ResolutionTest {
+mixin OptionalConstMixin implements ResolutionTest {
   Map<String, LibraryElement> libraries = {};
 
   LibraryElement get libraryA => libraries['package:test/a.dart'];
diff --git a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
new file mode 100644
index 0000000..c127e27
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
@@ -0,0 +1,105 @@
+// 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/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(PropertyAccessResolutionTest);
+  });
+}
+
+@reflectiveTest
+class PropertyAccessResolutionTest extends DriverResolutionTest {
+  test_get_error_abstractSuperMemberReference_mixinHasNoSuchMethod() async {
+    addTestFile('''
+class A {
+  int get foo;
+  noSuchMethod(im) => 1;
+}
+
+class B extends Object with A {
+  get foo => super.foo; // ref
+  noSuchMethod(im) => 2;
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+
+    var access = findNode.propertyAccess('foo; // ref');
+    assertPropertyAccess(access, findElement.getter('foo', of: 'A'), 'int');
+    assertSuperExpression(access.target);
+  }
+
+  test_get_error_abstractSuperMemberReference_OK_superHasNoSuchMethod() async {
+    addTestFile(r'''
+class A {
+  int get foo;
+  noSuchMethod(im) => 1;
+}
+
+class B extends A {
+  get foo => super.foo; // ref
+  noSuchMethod(im) => 2;
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var access = findNode.propertyAccess('super.foo; // ref');
+    assertPropertyAccess(access, findElement.getter('foo', of: 'A'), 'int');
+    assertSuperExpression(access.target);
+  }
+
+  test_set_error_abstractSuperMemberReference_mixinHasNoSuchMethod() async {
+    addTestFile('''
+class A {
+  set foo(int a);
+  noSuchMethod(im) {}
+}
+
+class B extends Object with A {
+  set foo(v) => super.foo = v; // ref
+  noSuchMethod(im) {}
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+
+    var access = findNode.propertyAccess('foo = v; // ref');
+    assertPropertyAccess(
+      access,
+      findElement.setter('foo', of: 'A'),
+      'int',
+    );
+    assertSuperExpression(access.target);
+  }
+
+  test_set_error_abstractSuperMemberReference_OK_superHasNoSuchMethod() async {
+    addTestFile(r'''
+class A {
+  set foo(int a);
+  noSuchMethod(im) => 1;
+}
+
+class B extends A {
+  set foo(v) => super.foo = v; // ref
+  noSuchMethod(im) => 2;
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    var access = findNode.propertyAccess('foo = v; // ref');
+    assertPropertyAccess(
+      access,
+      findElement.setter('foo', of: 'A'),
+      'int',
+    );
+    assertSuperExpression(access.target);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/resolution.dart b/pkg/analyzer/test/src/dart/resolution/resolution.dart
index f6fdc6f..7e7c6b3 100644
--- a/pkg/analyzer/test/src/dart/resolution/resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/resolution.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/handle.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -29,7 +30,7 @@
 final isVoidType = new TypeMatcher<VoidTypeImpl>();
 
 /// Base for resolution tests.
-abstract class ResolutionTest implements ResourceProviderMixin {
+mixin ResolutionTest implements ResourceProviderMixin {
   TestAnalysisResult result;
   FindNode findNode;
   FindElement findElement;
@@ -61,6 +62,16 @@
     newFile('/test/lib/test.dart', content: content);
   }
 
+  /// Assert that the given [identifier] is a reference to a class, in the
+  /// form that is not a separate expression, e.g. in a static method
+  /// invocation like `C.staticMethod()`, or a type annotation `C c = null`.
+  void assertClassRef(
+      SimpleIdentifier identifier, ClassElement expectedElement) {
+    assertElement(identifier, expectedElement);
+    // TODO(scheglov) Enforce this.
+//    assertTypeNull(identifier);
+  }
+
   void assertConstructorElement(
       ConstructorElement expected, ConstructorElement actual) {
     if (expected is ConstructorMember && actual is ConstructorMember) {
@@ -168,6 +179,11 @@
     assertType(ref, type);
   }
 
+  void assertImportPrefix(SimpleIdentifier identifier, PrefixElement element) {
+    assertElement(identifier, element);
+    assertTypeNull(identifier);
+  }
+
   void assertInstanceCreation(InstanceCreationExpression creation,
       ClassElement expectedClassElement, String expectedType,
       {String constructorName,
@@ -232,10 +248,68 @@
     expect(actual.baseElement, same(expectedBase));
   }
 
+  void assertMethodInvocation(MethodInvocation invocation,
+      Element expectedElement, String expectedInvokeType,
+      {String expectedMethodNameType,
+      String expectedNameType,
+      String expectedType}) {
+    MethodInvocationImpl invocationImpl = invocation;
+
+    // TODO(scheglov) Check for Member.
+    var element = invocation.methodName.staticElement;
+    if (element is Member) {
+      element = (element as Member).baseElement;
+      expect(element, same(expectedElement));
+    } else {
+      assertElement(invocation.methodName, expectedElement);
+    }
+
+    // TODO(scheglov) Should we enforce this?
+//    if (expectedNameType == null) {
+//      if (expectedElement is ExecutableElement) {
+//        expectedNameType = expectedElement.type.displayName;
+//      } else if (expectedElement is VariableElement) {
+//        expectedNameType = expectedElement.type.displayName;
+//      }
+//    }
+//    assertType(invocation.methodName, expectedNameType);
+
+    assertInvokeType(invocation, expectedInvokeType);
+
+    expectedType ??= _extractReturnType(expectedInvokeType);
+    assertType(invocation, expectedType);
+
+    expectedMethodNameType ??= expectedInvokeType;
+    assertElementTypeString(
+        invocationImpl.methodNameType, expectedMethodNameType);
+  }
+
+  void assertNamedParameterRef(String search, String name) {
+    var ref = findNode.simple(search);
+    assertElement(ref, findElement.parameter(name));
+    assertTypeNull(ref);
+  }
+
   void assertNoTestErrors() {
     assertTestErrors(const <ErrorCode>[]);
   }
 
+  void assertPropertyAccess(
+    PropertyAccess access,
+    Element expectedElement,
+    String expectedType,
+  ) {
+    assertElement(access.propertyName, expectedElement);
+    assertType(access, expectedType);
+  }
+
+  void assertSuperExpression(SuperExpression superExpression) {
+    // TODO(scheglov) I think `super` does not have type itself.
+    // It is just a signal to look for implemented method in the supertype.
+    // With mixins there isn't a type anyway.
+//    assertTypeNull(superExpression);
+  }
+
   void assertTestErrors(List<ErrorCode> expected) {
     assertErrors(result.errors, expected);
   }
@@ -332,6 +406,12 @@
     }
     return element;
   }
+
+  static String _extractReturnType(String invokeType) {
+    int arrowIndex = invokeType.indexOf('→');
+    expect(arrowIndex, isNonNegative);
+    return invokeType.substring(arrowIndex + 1).trim();
+  }
 }
 
 class TestAnalysisResult {
diff --git a/pkg/analyzer/test/src/dart/resolution/task_resolution.dart b/pkg/analyzer/test/src/dart/resolution/task_resolution.dart
index 7e02ab4..7c84ed2 100644
--- a/pkg/analyzer/test/src/dart/resolution/task_resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/task_resolution.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -9,15 +9,14 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 
 import '../../../generated/analysis_context_factory.dart';
-import '../../context/mock_sdk.dart';
 import 'resolution.dart';
 
 /// Task model based implementation of [ResolutionTest].
-class TaskResolutionTest extends Object
-    with ResourceProviderMixin, ResolutionTest {
+class TaskResolutionTest with ResourceProviderMixin, ResolutionTest {
   DartSdk sdk;
 
   SourceFactory sourceFactory;
diff --git a/pkg/analyzer/test/src/dart/resolution/test_all.dart b/pkg/analyzer/test/src/dart/resolution/test_all.dart
index f0c2ee6..4848102 100644
--- a/pkg/analyzer/test/src/dart/resolution/test_all.dart
+++ b/pkg/analyzer/test/src/dart/resolution/test_all.dart
@@ -6,7 +6,8 @@
 
 import 'assignment_test.dart' as assignment_test;
 import 'class_test.dart' as class_test;
-import 'optional_const_test.dart' as optional_const_test;
+import 'comment_test.dart' as comment_test;
+import 'constant_test.dart' as constant_test;
 import 'enum_test.dart' as enum_test;
 import 'for_in_test.dart' as for_in_test;
 import 'generic_type_alias_test.dart' as generic_type_alias_test;
@@ -16,13 +17,19 @@
     as instance_member_inference_class_test;
 import 'instance_member_inference_mixin_test.dart'
     as instance_member_inference_mixin_test;
+import 'method_invocation_test.dart' as method_invocation_test;
 import 'mixin_test.dart' as mixin_test;
+import 'non_nullable_test.dart' as non_nullable_test;
+import 'optional_const_test.dart' as optional_const_test;
+import 'property_access_test.dart' as property_access_test;
 import 'top_type_inference_test.dart' as top_type_inference_test;
 
 main() {
   defineReflectiveSuite(() {
     assignment_test.main();
     class_test.main();
+    comment_test.main();
+    constant_test.main();
     enum_test.main();
     for_in_test.main();
     generic_type_alias_test.main();
@@ -30,8 +37,11 @@
     instance_creation_test.main();
     instance_member_inference_class_test.main();
     instance_member_inference_mixin_test.main();
+    method_invocation_test.main();
     mixin_test.main();
+    non_nullable_test.main();
     optional_const_test.main();
+    property_access_test.main();
     top_type_inference_test.main();
   }, name: 'resolution');
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
index 3b6eb93..3c3defe 100644
--- a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
@@ -24,7 +24,7 @@
 class TopTypeInferenceTaskResolutionTest extends TaskResolutionTest
     with TopTypeInstanceMixin {}
 
-abstract class TopTypeInstanceMixin implements ResolutionTest {
+mixin TopTypeInstanceMixin implements ResolutionTest {
   test_referenceInstanceVariable_withDeclaredType() async {
     addTestFile(r'''
 class A {
diff --git a/pkg/analyzer/test/src/dart/sdk/patch_test.dart b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
index 6ffbf04..dd57aa6 100644
--- a/pkg/analyzer/test/src/dart/sdk/patch_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
@@ -5,11 +5,11 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/dart/sdk/patch.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -20,8 +20,7 @@
 }
 
 @reflectiveTest
-class SdkPatcherTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
+class SdkPatcherTest with ResourceProviderMixin {
   Folder sdkFolder;
   FolderBasedDartSdk sdk;
 
@@ -29,7 +28,7 @@
   RecordingErrorListener listener = new RecordingErrorListener();
 
   void setUp() {
-    sdkFolder = provider.getFolder(_p('/sdk'));
+    sdkFolder = getFolder('/sdk');
   }
 
   test_class_constructor_append_fail_notPrivate_named() {
@@ -717,12 +716,12 @@
 };''');
       _createSdk();
       var patchPaths = {
-        'dart:test': [_p('/sdk/lib/does_not_exist.dart')]
+        'dart:test': [convertPath('/sdk/lib/does_not_exist.dart')]
       };
-      File file = provider.newFile(_p('/sdk/lib/test/test.dart'), '');
+      File file = newFile('/sdk/lib/test/test.dart');
       Source source = file.createSource(Uri.parse('dart:test'));
       CompilationUnit unit = SdkPatcher.parse(source, listener);
-      patcher.patch(provider, patchPaths, listener, source, unit);
+      patcher.patch(resourceProvider, patchPaths, listener, source, unit);
     }, throwsArgumentError);
   }
 
@@ -733,16 +732,16 @@
     'internal/internal.dart'),
 };''');
     var patchPaths = {
-      'dart:_internal': [_p('/sdk/lib/internal/internal_patch.dart')]
+      'dart:_internal': [convertPath('/sdk/lib/internal/internal_patch.dart')]
     };
-    File file = provider.newFile(_p('/sdk/lib/internal/internal.dart'), r'''
+    File file = newFile('/sdk/lib/internal/internal.dart', content: r'''
 library dart._internal;
 class A {}
 class B {
   B();
 }
 ''');
-    provider.newFile(_p('/sdk/lib/internal/internal_patch.dart'), r'''
+    newFile(convertPath('/sdk/lib/internal/internal_patch.dart'), content: r'''
 @patch
 class B {
   int newField;
@@ -757,7 +756,7 @@
 
     Source source = file.createSource(Uri.parse('dart:_internal'));
     CompilationUnit unit = SdkPatcher.parse(source, listener);
-    patcher.patch(provider, patchPaths, listener, source, unit);
+    patcher.patch(resourceProvider, patchPaths, listener, source, unit);
     _assertUnitCode(
         unit,
         'library dart._internal; class A {} '
@@ -782,12 +781,12 @@
     patches: {VM_PLATFORM: ['test/test_patch.dart']}),
 };''');
     var patchPaths = {
-      'dart:test': [_p('/sdk/lib/test/test_patch.dart')]
+      'dart:test': [convertPath('/sdk/lib/test/test_patch.dart')]
     };
-    File fileLib = provider.newFile(_p('/sdk/lib/test/test.dart'), baseLibCode);
+    File fileLib = newFile('/sdk/lib/test/test.dart', content: baseLibCode);
     File filePart =
-        provider.newFile(_p('/sdk/lib/test/test_part.dart'), basePartCode);
-    provider.newFile(_p('/sdk/lib/test/test_patch.dart'), r'''
+        newFile('/sdk/lib/test/test_part.dart', content: basePartCode);
+    newFile('/sdk/lib/test/test_patch.dart', content: r'''
 import 'foo.dart';
 
 @patch
@@ -809,7 +808,7 @@
       Uri uri = Uri.parse('dart:test');
       Source source = fileLib.createSource(uri);
       CompilationUnit unit = SdkPatcher.parse(source, listener);
-      patcher.patch(provider, patchPaths, listener, source, unit);
+      patcher.patch(resourceProvider, patchPaths, listener, source, unit);
       _assertUnitCode(
           unit,
           "library test; part 'test_part.dart'; import 'foo.dart'; "
@@ -820,7 +819,7 @@
       Uri uri = Uri.parse('dart:test/test_part.dart');
       Source source = filePart.createSource(uri);
       CompilationUnit unit = SdkPatcher.parse(source, listener);
-      patcher.patch(provider, patchPaths, listener, source, unit);
+      patcher.patch(resourceProvider, patchPaths, listener, source, unit);
       _assertUnitCode(unit, "part of test; class B {int _b() => 1;}");
     }
   }
@@ -1053,7 +1052,7 @@
   }
 
   void _createSdk() {
-    sdk = new FolderBasedDartSdk(provider, sdkFolder);
+    sdk = new FolderBasedDartSdk(resourceProvider, sdkFolder);
     sdk.analysisOptions = new AnalysisOptionsImpl();
   }
 
@@ -1064,24 +1063,24 @@
     'test/test.dart'),
 };''');
     var patchPaths = {
-      'dart:test': [_p('/sdk/lib/test/test_patch.dart')]
+      'dart:test': [convertPath('/sdk/lib/test/test_patch.dart')]
     };
-    File file = provider.newFile(_p('/sdk/lib/test/test.dart'), baseCode);
-    provider.newFile(_p('/sdk/lib/test/test_patch.dart'), patchCode);
+    File file = newFile('/sdk/lib/test/test.dart', content: baseCode);
+    newFile('/sdk/lib/test/test_patch.dart', content: patchCode);
 
     _createSdk();
 
     Source source = file.createSource(Uri.parse('dart:test'));
     CompilationUnit unit = SdkPatcher.parse(source, listener);
-    patcher.patch(provider, patchPaths, listener, source, unit);
+    patcher.patch(resourceProvider, patchPaths, listener, source, unit);
     return unit;
   }
 
-  String _p(String path) => provider.convertPath(path);
-
   void _setSdkLibraries(String code) {
-    provider.newFile(
-        _p('/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart'), code);
+    newFile(
+      '/sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart',
+      content: code,
+    );
   }
 
   static void _assertPrevNextToken(Token prev, Token next) {
diff --git a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
index cfc0540..b795f9d 100644
--- a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
@@ -110,7 +110,7 @@
 }
 
 @reflectiveTest
-class FolderBasedDartSdkTest extends Object with ResourceProviderMixin {
+class FolderBasedDartSdkTest with ResourceProviderMixin {
   void test_addExtensions() {
     FolderBasedDartSdk sdk = _createDartSdk();
     String uri = 'dart:my.internal';
@@ -315,7 +315,7 @@
 }
 
 @reflectiveTest
-class SdkExtensionFinderTest extends Object with ResourceProviderMixin {
+class SdkExtensionFinderTest with ResourceProviderMixin {
   void setUp() {
     newFile('/tmp/_sdkext', content: r'''
 {
diff --git a/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
new file mode 100644
index 0000000..bd6d96e
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
@@ -0,0 +1,47 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ArgumentTypeNotAssignableTest);
+    defineReflectiveTests(ArgumentTypeNotAssignableTest_Driver);
+  });
+}
+
+@reflectiveTest
+class ArgumentTypeNotAssignableTest extends ResolverTestCase {
+  test_functionType() async {
+    assertErrorsInCode(r'''
+m() {
+  var a = new A();
+  a.n(() => 0);
+}
+class A {
+  n(void f(int i)) {}
+}
+''', [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_interfaceType() async {
+    assertErrorsInCode(r'''
+m() {
+  var i = '';
+  n(i);
+}
+n(int i) {}
+''', [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+}
+
+@reflectiveTest
+class ArgumentTypeNotAssignableTest_Driver
+    extends ArgumentTypeNotAssignableTest {
+  @override
+  bool get enableNewAnalysisDriver => true;
+}
diff --git a/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart b/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
new file mode 100644
index 0000000..61f3441
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
@@ -0,0 +1,111 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CanBeNullAfterNullAwareTest);
+    defineReflectiveTests(CanBeNullAfterNullAwareTest_Driver);
+  });
+}
+
+@reflectiveTest
+class CanBeNullAfterNullAwareTest extends ResolverTestCase {
+  test_afterCascade() async {
+    assertErrorsInCode(r'''
+m(x) {
+  x..a?.b.c;
+}
+''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+  }
+
+  test_beforeCascade() async {
+    assertErrorsInCode(r'''
+m(x) {
+  x?.a..m();
+}
+''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+  }
+
+  test_cascadeWithParenthesis() async {
+    assertErrorsInCode(r'''
+m(x) {
+  (x?.a)..m();
+}
+''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+  }
+
+  test_definedForNull() async {
+    assertNoErrorsInCode(r'''
+m(x) {
+  x?.a.hashCode;
+  x?.a.runtimeType;
+  x?.a.toString();
+  x?.b().hashCode;
+  x?.b().runtimeType;
+  x?.b().toString();
+}
+''');
+  }
+
+  test_guarded_methodInvocation() async {
+    assertNoErrorsInCode(r'''
+m(x) {
+  x?.a()?.b();
+}
+''');
+  }
+
+  test_guarded_propertyAccess() async {
+    assertNoErrorsInCode(r'''
+m(x) {
+  x?.a?.b;
+}
+''');
+  }
+
+  test_methodInvocation() async {
+    assertErrorsInCode(r'''
+m(x) {
+  x?.a.b();
+}
+''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+  }
+
+  test_multipleInvocations() async {
+    assertErrorsInCode(r'''
+m(x) {
+  x?.a
+    ..m()
+    ..m();
+}
+''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+  }
+
+  test_parenthesized() async {
+    assertErrorsInCode(r'''
+m(x) {
+  (x?.a).b;
+}
+''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+  }
+
+  test_propertyAccess() async {
+    assertErrorsInCode(r'''
+m(x) {
+  x?.a.b;
+}
+''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+  }
+}
+
+@reflectiveTest
+class CanBeNullAfterNullAwareTest_Driver extends CanBeNullAfterNullAwareTest {
+  @override
+  bool get enableNewAnalysisDriver => true;
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
new file mode 100644
index 0000000..2102064
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
@@ -0,0 +1,146 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+import '../dart/resolution/resolution.dart';
+import '../dart/resolution/task_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstConstructorWithMixinWithFieldTest_DriverTest);
+    defineReflectiveTests(ConstConstructorWithMixinWithFieldTest_TaskTest);
+  });
+}
+
+@reflectiveTest
+mixin ConstConstructorWithMixinWithFieldMixin implements ResolutionTest {
+  test_class_instance() async {
+    addTestFile(r'''
+class A {
+  var a;
+}
+
+class B extends Object with A {
+  const B();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
+      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
+    ]);
+  }
+
+  test_class_instance_final() async {
+    addTestFile(r'''
+class A {
+  final a = 0;
+}
+
+class B extends Object with A {
+  const B();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
+    ]);
+  }
+
+  test_class_noFields() async {
+    addTestFile(r'''
+class M {}
+
+class X extends Object with M {
+  const X();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_class_static() async {
+    addTestFile(r'''
+class M {
+  static final a = 0;
+}
+
+class X extends Object with M {
+  const X();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_mixin_instance() async {
+    addTestFile(r'''
+mixin M {
+  var a;
+}
+
+class X extends Object with M {
+  const X();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
+      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
+    ]);
+  }
+
+  test_mixin_instance_final() async {
+    addTestFile(r'''
+mixin M {
+  final a = 0;
+}
+
+class X extends Object with M {
+  const X();
+}
+''');
+    await resolveTestFile();
+    assertTestErrors([
+      CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
+    ]);
+  }
+
+  test_mixin_noFields() async {
+    addTestFile(r'''
+mixin M {}
+
+class X extends Object with M {
+  const X();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_mixin_static() async {
+    addTestFile(r'''
+mixin M {
+  static final a = 0;
+}
+
+class X extends Object with M {
+  const X();
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+}
+
+@reflectiveTest
+class ConstConstructorWithMixinWithFieldTest_DriverTest
+    extends DriverResolutionTest with ConstConstructorWithMixinWithFieldMixin {}
+
+@reflectiveTest
+class ConstConstructorWithMixinWithFieldTest_TaskTest extends TaskResolutionTest
+    with ConstConstructorWithMixinWithFieldMixin {}
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
new file mode 100644
index 0000000..7519905
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
@@ -0,0 +1,369 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DeprecatedMemberUseTest);
+    defineReflectiveTests(DeprecatedMemberUseTest_Driver);
+  });
+}
+
+@reflectiveTest
+class DeprecatedMemberUseTest extends ResolverTestCase {
+  test__methodInvocation_contructor() async {
+    assertErrorsInCode(r'''
+class A {
+  @Deprecated('0.9')
+  m() {}
+  n() {m();}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_call() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  call() {}
+  m() {
+    A a = new A();
+    a();
+  }
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_compoundAssignment() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  A operator+(A a) { return a; }
+}
+f(A a) {
+  A b;
+  a += b;
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_export() async {
+    addNamedSource("/deprecated_library.dart", r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+    assertErrorsInCode('''
+export 'deprecated_library.dart';
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_field() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  int x = 1;
+}
+f(A a) {
+  return a.x;
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_getter() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  get m => 1;
+}
+f(A a) {
+  return a.m;
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_import() async {
+    addNamedSource("/deprecated_library.dart", r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+    assertErrorsInCode(r'''
+import 'deprecated_library.dart';
+f(A a) {}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_inDeprecatedClass() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+f() {}
+
+@deprecated
+class C {
+  m() {
+    f();
+  }
+}
+''');
+  }
+
+  test_inDeprecatedField() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+class C {}
+
+class X {
+  @deprecated
+  C f;
+}
+''');
+  }
+
+  test_inDeprecatedFunction() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+f() {}
+
+@deprecated
+g() {
+  f();
+}
+''');
+  }
+
+  test_inDeprecatedLibrary() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+library lib;
+
+@deprecated
+f() {}
+
+class C {
+  m() {
+    f();
+  }
+}
+''');
+  }
+
+  test_inDeprecatedMethod() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+f() {}
+
+class C {
+  @deprecated
+  m() {
+    f();
+  }
+}
+''');
+  }
+
+  test_inDeprecatedMethod_inDeprecatedClass() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+f() {}
+
+@deprecated
+class C {
+  @deprecated
+  m() {
+    f();
+  }
+}
+''');
+  }
+
+  test_inDeprecatedMixin() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+f() {}
+
+@deprecated
+mixin M {
+  m() {
+    f();
+  }
+}
+''');
+  }
+
+  test_inDeprecatedTopLevelVariable() async {
+    assertNoErrorsInCode(r'''
+@deprecated
+class C {}
+
+@deprecated
+C v;
+''');
+  }
+
+  test_indexExpression() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  operator[](int i) {}
+}
+f(A a) {
+  return a[1];
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_instanceCreation_defaultConstructor() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  A(int i) {}
+}
+f() {
+  A a = new A(1);
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_instanceCreation_namedConstructor() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  A.named(int i) {}
+}
+f() {
+  A a = new A.named(1);
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_methodInvocation_constant() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  m() {}
+  n() {m();}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_operator() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  operator+(A a) {}
+}
+f(A a) {
+  A b;
+  return a + b;
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_parameter_named() async {
+    assertErrorsInCode(r'''
+class A {
+  m({@deprecated int x}) {}
+  n() {m(x: 1);}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_parameter_named_inDefiningFunction() async {
+    assertNoErrorsInCode(r'''
+f({@deprecated int x}) => x;
+''');
+  }
+
+  test_parameter_named_inDefiningLocalFunction() async {
+    assertNoErrorsInCode(r'''
+class C {
+  m() {
+    f({@deprecated int x}) {
+      return x;
+    }
+    return f();
+  }
+}
+''');
+  }
+
+  test_parameter_named_inDefiningMethod() async {
+    assertNoErrorsInCode(r'''
+class C {
+  m({@deprecated int x}) {
+    return x;
+  }
+}
+''');
+  }
+
+  test_parameter_named_inNestedLocalFunction() async {
+    assertNoErrorsInCode(r'''
+class C {
+  m({@deprecated int x}) {
+    f() {
+      return x;
+    }
+    return f();
+  }
+}
+''');
+  }
+
+  test_parameter_positional() async {
+    assertErrorsInCode(r'''
+class A {
+  m([@deprecated int x]) {}
+  n() {m(1);}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_setter() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  set s(v) {}
+}
+f(A a) {
+  return a.s = 1;
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_superConstructor_defaultConstructor() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  A() {}
+}
+class B extends A {
+  B() : super() {}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+
+  test_superConstructor_namedConstructor() async {
+    assertErrorsInCode(r'''
+class A {
+  @deprecated
+  A.named() {}
+}
+class B extends A {
+  B() : super.named() {}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE]);
+  }
+}
+
+@reflectiveTest
+class DeprecatedMemberUseTest_Driver extends DeprecatedMemberUseTest {
+  @override
+  bool get enableNewAnalysisDriver => true;
+}
diff --git a/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart b/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
new file mode 100644
index 0000000..539cdf1
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
@@ -0,0 +1,75 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DivisionOptimizationTest);
+    defineReflectiveTests(DivisionOptimizationTest_Driver);
+  });
+}
+
+@reflectiveTest
+class DivisionOptimizationTest extends ResolverTestCase {
+  test_divisionOptimization() async {
+    assertNoErrorsInCode(r'''
+f(int x, int y) {
+  var v = x / y.toInt();
+}
+''');
+  }
+
+  test_double() async {
+    assertErrorsInCode(r'''
+f(double x, double y) {
+  var v = (x / y).toInt();
+}
+''', [HintCode.DIVISION_OPTIMIZATION]);
+  }
+
+  test_dynamic() async {
+    assertNoErrorsInCode(r'''
+f(x, y) {
+  var v = (x / y).toInt();
+}
+''');
+  }
+
+  test_int() async {
+    assertErrorsInCode(r'''
+f(int x, int y) {
+  var v = (x / y).toInt();
+}
+''', [HintCode.DIVISION_OPTIMIZATION]);
+  }
+
+  test_nonNumeric() async {
+    assertNoErrorsInCode(r'''
+class A {
+  num operator /(x) { return x; }
+}
+f(A x, A y) {
+  var v = (x / y).toInt();
+}
+''');
+  }
+
+  test_wrappedInParentheses() async {
+    assertErrorsInCode(r'''
+f(int x, int y) {
+  var v = (((x / y))).toInt();
+}
+''', [HintCode.DIVISION_OPTIMIZATION]);
+  }
+}
+
+@reflectiveTest
+class DivisionOptimizationTest_Driver extends DivisionOptimizationTest {
+  @override
+  bool get enableNewAnalysisDriver => true;
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_required_param_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_required_param_test.dart
new file mode 100644
index 0000000..70c22e5
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_required_param_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/hint_code_test.dart' show metaLibraryStub;
+import '../../generated/resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidRequiredParamTest);
+    defineReflectiveTests(InvalidRequiredParamTest_Driver);
+  });
+}
+
+@reflectiveTest
+class InvalidRequiredParamTest extends ResolverTestCase {
+  @override
+  void reset() {
+    super.resetWith(packages: [
+      ['meta', metaLibraryStub]
+    ]);
+  }
+
+  test_namedParameter_withDefault() async {
+    assertErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+m({@required a = 1}) => null;
+''', [HintCode.INVALID_REQUIRED_PARAM]);
+  }
+
+  test_positionalParameter_withDefault() async {
+    assertErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+m([@required a = 1]) => null;
+''', [HintCode.INVALID_REQUIRED_PARAM]);
+  }
+
+  test_ppositionalParameter_noDefault() async {
+    assertErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+m([@required a]) => null;
+''', [HintCode.INVALID_REQUIRED_PARAM]);
+  }
+
+  test_requiredParameter() async {
+    assertErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+m(@required a) => null;
+''', [HintCode.INVALID_REQUIRED_PARAM]);
+  }
+
+  test_valid() async {
+    assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+m1() => null;
+m2(a) => null;
+m3([a]) => null;
+m4({a}) => null;
+m5({@required a}) => null;
+m6({a, @required b}) => null;
+''');
+  }
+}
+
+@reflectiveTest
+class InvalidRequiredParamTest_Driver extends InvalidRequiredParamTest {
+  @override
+  bool get enableNewAnalysisDriver => true;
+}
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
new file mode 100644
index 0000000..a0b3585
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'argument_type_not_assignable_test.dart' as argument_type_not_assignable;
+import 'can_be_null_after_null_aware_test.dart' as can_be_null_after_null_aware;
+import 'deprecated_member_use_test.dart' as deprecated_member_use;
+import 'division_optimization_test.dart' as division_optimization;
+import 'invalid_required_param_test.dart' as invalid_required_param;
+
+main() {
+  defineReflectiveSuite(() {
+    argument_type_not_assignable.main();
+    can_be_null_after_null_aware.main();
+    deprecated_member_use.main();
+    division_optimization.main();
+    invalid_required_param.main();
+  }, name: 'diagnostics');
+}
diff --git a/pkg/analyzer/test/src/fasta/ast_builder_test.dart b/pkg/analyzer/test/src/fasta/ast_builder_test.dart
index 9f0485d..7dc9c97 100644
--- a/pkg/analyzer/test/src/fasta/ast_builder_test.dart
+++ b/pkg/analyzer/test/src/fasta/ast_builder_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart b/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
index 17b4d06..0958f78 100644
--- a/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
@@ -1,8 +1,8 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -341,14 +341,6 @@
 ''');
   }
 
-  void test_multipleOn() {
-    testRecovery('''
-mixin A on B on C {}
-''', [ParserErrorCode.MULTIPLE_ON_CLAUSES], '''
-mixin A on B, C {}
-''');
-  }
-
   void test_multipleImplements() {
     testRecovery('''
 mixin A implements B implements C, D {}
@@ -357,6 +349,14 @@
 ''');
   }
 
+  void test_multipleOn() {
+    testRecovery('''
+mixin A on B on C {}
+''', [ParserErrorCode.MULTIPLE_ON_CLAUSES], '''
+mixin A on B, C {}
+''');
+  }
+
   @failingTest
   void test_typing_implements() {
     testRecovery('''
diff --git a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
index 002ca1a..deb16fa 100644
--- a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/invalid_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/invalid_code_test.dart
index b53afa1..95b1703 100644
--- a/pkg/analyzer/test/src/fasta/recovery/invalid_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/invalid_code_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
index cf48c96..ebcd8d0 100644
--- a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -118,24 +118,6 @@
 ''');
   }
 
-  @failingTest
-  void test_initializerList_missingComma() {
-    // https://github.com/dart-lang/sdk/issues/33241
-    testRecovery('''
-class Test {
-  Test()
-    : assert(true)
-      assert(true);
-}
-''', [ParserErrorCode.EXPECTED_TOKEN], '''
-class Test {
-  Test()
-    : assert(true),
-      assert(true);
-}
-''');
-  }
-
   void test_asExpression_missingRight() {
     testRecovery('''
 convert(x) => x as ;
@@ -196,6 +178,14 @@
 ''');
   }
 
+  void test_comma_missing() {
+    testRecovery('''
+f(int a int b) { }
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+f(int a, int b) { }
+''');
+  }
+
   void test_conditionalExpression_else() {
     testRecovery('''
 f() => x ? y : 
@@ -212,14 +202,6 @@
 ''');
   }
 
-  void test_comma_missing() {
-    testRecovery('''
-f(int a int b) { }
-''', [ParserErrorCode.EXPECTED_TOKEN], '''
-f(int a, int b) { }
-''');
-  }
-
   void test_equalEqual() {
     testBinaryExpression('==');
   }
@@ -260,6 +242,24 @@
     testUserDefinableOperatorWithSuper('^');
   }
 
+  @failingTest
+  void test_initializerList_missingComma() {
+    // https://github.com/dart-lang/sdk/issues/33241
+    testRecovery('''
+class Test {
+  Test()
+    : assert(true)
+      assert(true);
+}
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+class Test {
+  Test()
+    : assert(true),
+      assert(true);
+}
+''');
+  }
+
   void test_isExpression_missingLeft() {
     testRecovery('''
 f() {
diff --git a/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart b/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
index 50e04a7..5b9b63a 100644
--- a/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -22,6 +22,66 @@
  */
 @reflectiveTest
 class AngleBracketsTest extends AbstractRecoveryTest {
+  @failingTest
+  void test_typeArguments_inner_last() {
+    testRecovery('''
+List<List<int>
+''', [ScannerErrorCode.EXPECTED_TOKEN], '''
+List<List<int>> _s_;
+''');
+  }
+
+  void test_typeArguments_inner_last2() {
+    testRecovery('''
+List<List<int> f;
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+List<List<int>> f;
+''');
+  }
+
+  @failingTest
+  void test_typeArguments_inner_notLast() {
+    testRecovery('''
+Map<List<int, List<String>>
+''', [ScannerErrorCode.EXPECTED_TOKEN], '''
+Map<List<int>, List<String>> _s_;
+''');
+  }
+
+  void test_typeArguments_inner_notLast2() {
+    // TODO(danrubel): Investigate better recovery.
+    testRecovery('''
+Map<List<int, List<String>> f;
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+Map<List<int, List<String>>> f;
+''');
+  }
+
+  void test_typeArguments_missing_comma() {
+    testRecovery('''
+List<int double> f;
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+List<int, double> f;
+''');
+  }
+
+  @failingTest
+  void test_typeArguments_outer_last() {
+    testRecovery('''
+List<int
+''', [ScannerErrorCode.EXPECTED_TOKEN], '''
+List<int> _s_;
+''');
+  }
+
+  void test_typeArguments_outer_last2() {
+    testRecovery('''
+List<int f;
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+List<int> f;
+''');
+  }
+
   void test_typeParameters_extraGt() {
     testRecovery('''
 f<T>>() => null;
@@ -76,66 +136,6 @@
 ''');
   }
 
-  @failingTest
-  void test_typeArguments_inner_last() {
-    testRecovery('''
-List<List<int>
-''', [ScannerErrorCode.EXPECTED_TOKEN], '''
-List<List<int>> _s_;
-''');
-  }
-
-  void test_typeArguments_inner_last2() {
-    testRecovery('''
-List<List<int> f;
-''', [ParserErrorCode.EXPECTED_TOKEN], '''
-List<List<int>> f;
-''');
-  }
-
-  @failingTest
-  void test_typeArguments_inner_notLast() {
-    testRecovery('''
-Map<List<int, List<String>>
-''', [ScannerErrorCode.EXPECTED_TOKEN], '''
-Map<List<int>, List<String>> _s_;
-''');
-  }
-
-  void test_typeArguments_inner_notLast2() {
-    // TODO(danrubel): Investigate better recovery.
-    testRecovery('''
-Map<List<int, List<String>> f;
-''', [ParserErrorCode.EXPECTED_TOKEN], '''
-Map<List<int, List<String>>> f;
-''');
-  }
-
-  @failingTest
-  void test_typeArguments_outer_last() {
-    testRecovery('''
-List<int
-''', [ScannerErrorCode.EXPECTED_TOKEN], '''
-List<int> _s_;
-''');
-  }
-
-  void test_typeArguments_outer_last2() {
-    testRecovery('''
-List<int f;
-''', [ParserErrorCode.EXPECTED_TOKEN], '''
-List<int> f;
-''');
-  }
-
-  void test_typeArguments_missing_comma() {
-    testRecovery('''
-List<int double> f;
-''', [ParserErrorCode.EXPECTED_TOKEN], '''
-List<int, double> f;
-''');
-  }
-
   void test_typeParameters_last() {
     testRecovery('''
 f<T() => null;
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/annotation_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/annotation_test.dart
index 06105e3..74d995d 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/annotation_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/annotation_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -41,7 +41,13 @@
       [
         new TestDescriptor(
             'ampersand', '@', [ParserErrorCode.MISSING_IDENTIFIER], '@_s_',
-            failing: ['typedef', 'functionNonVoid', 'getter', 'setter']),
+            failing: [
+              'typedef',
+              'functionNonVoid',
+              'getter',
+              'mixin',
+              'setter'
+            ]),
         new TestDescriptor(
             'leftParen', '@a(', [ScannerErrorCode.EXPECTED_TOKEN], '@a()',
             allFailing: true),
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/assert_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/assert_statement_test.dart
index decfa5e..511b2cc 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/assert_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/assert_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/break_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/break_statement_test.dart
index 477bc1c..c84fd5d 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/break_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/break_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/class_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/class_declaration_test.dart
index e932751..934bad6 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/class_declaration_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/class_declaration_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -36,7 +36,7 @@
               ],
               'class A extend _s_ {}',
               expectedErrorsInValidCode: [ParserErrorCode.EXPECTED_INSTEAD],
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'extends',
               'class A extends',
@@ -45,7 +45,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'class A extends _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'on',
               'class A on',
@@ -56,7 +56,7 @@
               ],
               'class A on _s_ {}',
               expectedErrorsInValidCode: [ParserErrorCode.EXPECTED_INSTEAD],
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor('extendsBody', 'class A extends {}',
               [ParserErrorCode.EXPECTED_TYPE_NAME], 'class A extends _s_ {}'),
           new TestDescriptor(
@@ -78,7 +78,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'class A extends B with _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'extendsNameWithBody',
               'class A extends B with {}',
@@ -92,7 +92,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'class A extends B implements _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'extendsNameImplementsBody',
               'class A extends B implements {}',
@@ -106,7 +106,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'class A extends B with C implements _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'extendsNameWithNameImplementsBody',
               'class A extends B with C implements {}',
@@ -120,7 +120,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'class A implements _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'implementsBody',
               'class A implements {}',
@@ -134,7 +134,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'class A implements B, _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'implementsNameCommaBody',
               'class A implements B, {}',
@@ -149,7 +149,7 @@
                 ParserErrorCode.EXPECTED_TOKEN
               ],
               'class A = _s_ with _s_;',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'equalsName',
               'class A = B',
@@ -164,7 +164,7 @@
                 ParserErrorCode.EXPECTED_TOKEN
               ],
               'class A = B with _s_;',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'equalsNameName',
               'class A = B C',
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_declaration_test.dart
similarity index 89%
rename from pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_test.dart
rename to pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_declaration_test.dart
index 3f834fd..443f166 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/constructor_declaration_test.dart
@@ -1,4 +1,8 @@
-import 'package:analyzer/analyzer.dart';
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 
@@ -93,13 +97,13 @@
             'super_qdot',
             'C() : super?.',
             [
-              ParserErrorCode.INVALID_OPERATOR_FOR_SUPER,
+              ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER,
               ParserErrorCode.EXPECTED_TOKEN,
               ParserErrorCode.MISSING_FUNCTION_BODY,
             ],
             'C() : super?._s_() {}',
             expectedErrorsInValidCode: [
-              ParserErrorCode.INVALID_OPERATOR_FOR_SUPER
+              ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
             ],
             failing: ['methodNonVoid', 'getter', 'setter'],
           ),
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/continue_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/continue_statement_test.dart
index 89a70ae..1b49362 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/continue_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/continue_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/do_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/do_statement_test.dart
index 45a68bc..74b4feb 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/do_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/do_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/enum_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/enum_declaration_test.dart
index 167587a..ad5f65e 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/enum_declaration_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/enum_declaration_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -50,6 +50,7 @@
                 'typedef',
                 'functionNonVoid',
                 'getter',
+                'mixin',
                 'setter'
               ]),
           new TestDescriptor(
@@ -66,6 +67,7 @@
                 'typedef',
                 'functionNonVoid',
                 'getter',
+                'mixin',
                 'setter'
               ]),
           new TestDescriptor('value', 'enum E {a',
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/export_directive_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/export_directive_test.dart
index fda0f64..4e3ccff 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/export_directive_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/export_directive_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart
index badf5ff..d7db9ab 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/field_declaration_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/forEach_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/forEach_statement_test.dart
index 799cf53..247cc34 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/forEach_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/forEach_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/for_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/for_statement_test.dart
index 4106cdf..8d22fdf 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/for_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/for_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/if_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/if_statement_test.dart
index ca24085..aa09fb2 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/if_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/if_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/import_directive_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/import_directive_test.dart
index 4c1c8e1..5472bd1 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/import_directive_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/import_directive_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/index_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/index_expression_test.dart
similarity index 91%
rename from pkg/analyzer/test/src/fasta/recovery/partial_code/index_statement_test.dart
rename to pkg/analyzer/test/src/fasta/recovery/partial_code/index_expression_test.dart
index 1391a1e..a55d362 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/index_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/index_expression_test.dart
@@ -1,3 +1,7 @@
+// 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/src/dart/error/syntactic_errors.dart';
 
 import 'partial_code_support.dart';
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/instance_creation_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/instance_creation_test.dart
index 826aa32..e62cc14 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/instance_creation_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/instance_creation_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/library_directive_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/library_directive_test.dart
index ba1d480..256fbd3 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/library_directive_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/library_directive_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/local_variable_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/local_variable_test.dart
index ad6cb54..848d86d 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/local_variable_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/local_variable_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/method_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/method_declaration_test.dart
index 1391383..080d5d4 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/method_declaration_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/method_declaration_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/mixin_declaration_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/mixin_declaration_test.dart
index 33fe03f..02a221b 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/mixin_declaration_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/mixin_declaration_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -34,7 +34,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'mixin A on _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'extend',
               'mixin A extend',
@@ -45,7 +45,7 @@
               ],
               'mixin A extend _s_ {}',
               expectedErrorsInValidCode: [ParserErrorCode.EXPECTED_INSTEAD],
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'extends',
               'mixin A extends',
@@ -56,7 +56,7 @@
               ],
               'mixin A extends _s_ {}',
               expectedErrorsInValidCode: [ParserErrorCode.EXPECTED_INSTEAD],
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor('onBody', 'mixin A on {}',
               [ParserErrorCode.EXPECTED_TYPE_NAME], 'mixin A on _s_ {}'),
           new TestDescriptor(
@@ -67,7 +67,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'mixin A on B, _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor('onNameCommaBody', 'mixin A on B, {}',
               [ParserErrorCode.EXPECTED_TYPE_NAME], 'mixin A on B, _s_ {}'),
           new TestDescriptor(
@@ -84,9 +84,9 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'mixin A on B implements _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
-              'onNameImplements',
+              'onNameImplementsBody',
               'mixin A on B implements {}',
               [ParserErrorCode.EXPECTED_TYPE_NAME],
               'mixin A on B implements _s_ {}'),
@@ -98,7 +98,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'mixin A implements _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'implementsBody',
               'mixin A implements {}',
@@ -112,7 +112,7 @@
                 ParserErrorCode.MISSING_CLASS_BODY
               ],
               'mixin A implements B, _s_ {}',
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
           new TestDescriptor(
               'implementsNameCommaBody',
               'mixin A implements B, {}',
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/part_directive_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/part_directive_test.dart
index 814cf9b..970336d 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/part_directive_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/part_directive_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/part_of_directive_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/part_of_directive_test.dart
index 17da7bc..246de37 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/part_of_directive_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/part_of_directive_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -34,7 +34,8 @@
                 ParserErrorCode.EXPECTED_STRING_LITERAL,
                 ParserErrorCode.EXPECTED_TOKEN
               ],
-              'part of "";'),
+              'part of "";',
+              failing: ['mixin']),
         ],
         nonIdentifierSuffixes);
     buildTests(
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
index 62a722f..8634b8f 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart
@@ -1,8 +1,8 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:test/test.dart';
@@ -46,6 +46,8 @@
    */
   static final List<TestSuffix> declarationSuffixes = <TestSuffix>[
     new TestSuffix('class', 'class A {}'),
+    new TestSuffix('enum', 'enum E { v }'),
+    new TestSuffix('mixin', 'mixin M {}'),
     new TestSuffix('typedef', 'typedef A = B Function(C, D);'),
     new TestSuffix('functionVoid', 'void f() {}'),
     new TestSuffix('functionNonVoid', 'int f() {}'),
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/return_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/return_statement_test.dart
index 4ba4a81..a56d5b1 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/return_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/return_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/switch_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/switch_statement_test.dart
index ea94764..f8a05c4 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/switch_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/switch_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
index 316e1bb..768c05b 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -8,8 +8,7 @@
 import 'assert_statement_test.dart' as assert_statement;
 import 'break_statement_test.dart' as break_statement;
 import 'class_declaration_test.dart' as class_declaration;
-import 'constructor_test.dart' as constructor;
-import 'mixin_declaration_test.dart' as mixin_declaration;
+import 'constructor_declaration_test.dart' as constructor_declaration;
 import 'continue_statement_test.dart' as continue_statement;
 import 'do_statement_test.dart' as do_statement;
 import 'enum_declaration_test.dart' as enum_declaration;
@@ -19,11 +18,12 @@
 import 'for_statement_test.dart' as for_statement;
 import 'if_statement_test.dart' as if_statement;
 import 'import_directive_test.dart' as import_directive;
-import 'index_statement_test.dart' as index_statement;
+import 'index_expression_test.dart' as index_expression;
 import 'instance_creation_test.dart' as instance_creation;
 import 'library_directive_test.dart' as library_directive;
 import 'local_variable_test.dart' as local_variable;
 import 'method_declaration_test.dart' as method_declaration;
+import 'mixin_declaration_test.dart' as mixin_declaration;
 import 'parameter_test.dart' as parameter;
 import 'part_directive_test.dart' as part_directive;
 import 'part_of_directive_test.dart' as part_of_directive;
@@ -41,7 +41,7 @@
     assert_statement.main();
     break_statement.main();
     class_declaration.main();
-    constructor.main();
+    constructor_declaration.main();
     continue_statement.main();
     do_statement.main();
     enum_declaration.main();
@@ -51,7 +51,7 @@
     forEach_statement.main();
     if_statement.main();
     import_directive.main();
-    index_statement.main();
+    index_expression.main();
     instance_creation.main();
     library_directive.main();
     local_variable.main();
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart
index e4cfd56..06a3ef6 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/top_level_variable_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -43,7 +43,7 @@
               CompileTimeErrorCode.CONST_NOT_INITIALIZED
             ],
             "const a;",
-            failing: ['functionNonVoid', 'getter', 'setter'],
+            failing: ['functionNonVoid', 'getter', 'setter', 'mixin'],
             expectedErrorsInValidCode: [
               CompileTimeErrorCode.CONST_NOT_INITIALIZED
             ],
@@ -145,7 +145,7 @@
               StaticWarningCode.FINAL_NOT_INITIALIZED
             ],
             "final a;",
-            failing: ['functionNonVoid', 'getter', 'setter'],
+            failing: ['functionNonVoid', 'getter', 'setter', 'mixin'],
             expectedErrorsInValidCode: [
               StaticWarningCode.FINAL_NOT_INITIALIZED
             ],
@@ -193,7 +193,7 @@
             'var a',
             [ParserErrorCode.EXPECTED_TOKEN],
             "var a;",
-            failing: ['functionNonVoid', 'getter', 'setter'],
+            failing: ['functionNonVoid', 'getter', 'mixin', 'setter'],
           ),
           new TestDescriptor(
             'varNameEquals',
@@ -209,7 +209,9 @@
               'functionVoid',
               'functionNonVoid',
               'const',
+              'enum',
               'getter',
+              'mixin',
               'setter'
             ],
           ),
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/try_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/try_statement_test.dart
index f94d71e..ca80f4c 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/try_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/try_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/typedef_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/typedef_test.dart
index 95f261e..f961ba7 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/typedef_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/typedef_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -33,7 +33,7 @@
                 ParserErrorCode.EXPECTED_TOKEN
               ],
               "typedef T();",
-              failing: ['functionNonVoid', 'getter', 'setter']),
+              failing: ['functionNonVoid', 'getter', 'mixin', 'setter']),
           new TestDescriptor(
               'keywordEquals',
               'typedef =',
@@ -56,7 +56,7 @@
               expectedErrorsInValidCode: [
                 ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE
               ],
-              failing: ['functionVoid', 'functionNonVoid', 'getter']),
+              failing: ['functionVoid', 'functionNonVoid', 'getter', 'mixin']),
         ],
         PartialCodeTest.declarationSuffixes);
   }
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/while_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/while_statement_test.dart
index 07640a5..7a01697 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/while_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/while_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/partial_code/yield_statement_test.dart b/pkg/analyzer/test/src/fasta/recovery/partial_code/yield_statement_test.dart
index bc15d07..f97da43 100644
--- a/pkg/analyzer/test/src/fasta/recovery/partial_code/yield_statement_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/partial_code/yield_statement_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart b/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
index 60b559c..f42bcdd 100644
--- a/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/recovery/test_all.dart b/pkg/analyzer/test/src/fasta/recovery/test_all.dart
index 4a668cc..2c37da8 100644
--- a/pkg/analyzer/test/src/fasta/recovery/test_all.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/test_all.dart b/pkg/analyzer/test/src/fasta/test_all.dart
index b9f73b5..91b1a9c 100644
--- a/pkg/analyzer/test/src/fasta/test_all.dart
+++ b/pkg/analyzer/test/src/fasta/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/fasta/token_utils_test.dart b/pkg/analyzer/test/src/fasta/token_utils_test.dart
index 03f057d..40e05d0 100644
--- a/pkg/analyzer/test/src/fasta/token_utils_test.dart
+++ b/pkg/analyzer/test/src/fasta/token_utils_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
diff --git a/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart
index ee9f466..ad910f0 100644
--- a/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart
+++ b/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart
@@ -3,7 +3,8 @@
 // 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';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
+import 'package:pub_semver/pub_semver.dart';
 
 import '../../generated/resolver_test_case.dart';
 import '../../generated/test_support.dart';
@@ -15,10 +16,10 @@
 
   verifyVersion(String version, String source,
       {List<ErrorCode> errorCodes}) async {
-    newFile('/pubspec.yaml', content: '''
-environment:
-  sdk: ^$version
-''');
+    driver.configure(
+        analysisOptions: AnalysisOptionsImpl()
+          ..sdkVersionConstraint = VersionConstraint.parse(version));
+
     TestAnalysisResult result = await computeTestAnalysisResult(source);
     GatheringErrorListener listener = new GatheringErrorListener();
     listener.addAll(result.errors);
@@ -28,11 +29,4 @@
       listener.assertErrorsWithCodes(errorCodes);
     }
   }
-
-  File newFile(String path, {String content = ''}) {
-    // Copied from ResourceProviderMixin because ResolverTestCase does not apply
-    // that mixin on this branch.
-    String convertedPath = resourceProvider.convertPath(path);
-    return resourceProvider.newFile(convertedPath, content);
-  }
 }
diff --git a/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart b/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart
index 38bf64b..a9f42b6 100644
--- a/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart
+++ b/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart
@@ -69,7 +69,7 @@
 
   test_lessThan_explicitImportOfCore() async {
     await verifyVersion('2.0.0', '''
-import 'dart:core';
+import 'dart:core' show Future, int;
 
 Future<int> zero() async => 0;
 ''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
@@ -102,4 +102,28 @@
 Future<int> zero() async => 0;
 ''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
   }
+
+  test_lessThan_onlyReferencedInExport_hide() async {
+    await verifyVersion('2.0.0', '''
+export 'dart:async' hide Future;
+''');
+  }
+
+  test_lessThan_onlyReferencedInExport_show() async {
+    await verifyVersion('2.0.0', '''
+export 'dart:async' show Future;
+''');
+  }
+
+  test_lessThan_onlyReferencedInImport_hide() async {
+    await verifyVersion('2.0.0', '''
+import 'dart:core' hide Future;
+''');
+  }
+
+  test_lessThan_onlyReferencedInImport_show() async {
+    await verifyVersion('2.0.0', '''
+import 'dart:core' show Future;
+''');
+  }
 }
diff --git a/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
new file mode 100644
index 0000000..49e4be9
--- /dev/null
+++ b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.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 'dart:async';
+
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/lint/linter.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../../generated/resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(LinterContextImplTest);
+  });
+}
+
+@reflectiveTest
+class LinterContextImplTest extends ResolverTestCase {
+  String testSource;
+  CompilationUnitImpl testUnit;
+  LinterContextImpl context;
+
+  bool get enableNewAnalysisDriver => true;
+
+  void assertCanBeConst(String snippet, bool expectedResult) {
+    int index = testSource.indexOf(snippet);
+    expect(index >= 0, isTrue);
+    NodeLocator visitor = new NodeLocator(index);
+    AstNodeImpl node = visitor.searchWithin(testUnit);
+    node = node.thisOrAncestorOfType<InstanceCreationExpressionImpl>();
+    expect(node, isNotNull);
+    expect(context.canBeConst(node as InstanceCreationExpressionImpl),
+        expectedResult ? isTrue : isFalse);
+  }
+
+  Future<void> resolve(String sourceText) async {
+    testSource = sourceText;
+    Source source = addNamedSource('/test.dart', sourceText);
+    ResolvedUnitResult analysisResult = await driver.getResult(source.fullName);
+    testUnit = analysisResult.unit;
+    LinterContextUnit contextUnit = new LinterContextUnit(sourceText, testUnit);
+    context = new LinterContextImpl(
+        [contextUnit],
+        contextUnit,
+        analysisResult.session.declaredVariables,
+        analysisResult.typeProvider,
+        analysisResult.typeSystem);
+  }
+
+  void test_canBeConst_false_argument_invocation() async {
+    await resolve('''
+class A {}
+class B {
+  const B(A a);
+}
+A f() => A();
+B g() => B(f());
+''');
+    assertCanBeConst("B(f", false);
+  }
+
+  void test_canBeConst_false_argument_invocationInList() async {
+    await resolve('''
+class A {}
+class B {
+  const B(a);
+}
+A f() => A();
+B g() => B([f()]);
+''');
+    assertCanBeConst("B([", false);
+  }
+
+  void test_canBeConst_false_argument_nonConstConstructor() async {
+    await resolve('''
+class A {}
+class B {
+  const B(A a);
+}
+B f() => B(A());
+''');
+    assertCanBeConst("B(A(", false);
+  }
+
+  void test_canBeConst_false_nonConstConstructor() async {
+    await resolve('''
+class A {}
+A f() => A();
+''');
+    assertCanBeConst("A(", false);
+  }
+
+  void test_canBeConst_true_constConstructorArg() async {
+    await resolve('''
+class A {
+  const A();
+}
+class B {
+  const B(A a);
+}
+B f() => B(A());
+''');
+    assertCanBeConst("B(A(", true);
+  }
+
+  void test_canBeConst_true_constListArg() async {
+    await resolve('''
+class A {
+  const A(List<int> l);
+}
+A f() => A([1, 2, 3]);
+''');
+    assertCanBeConst("A([", true);
+  }
+}
diff --git a/pkg/analyzer/test/src/lint/linter/test_all.dart b/pkg/analyzer/test/src/lint/linter/test_all.dart
new file mode 100644
index 0000000..101588b
--- /dev/null
+++ b/pkg/analyzer/test/src/lint/linter/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'linter_context_impl_test.dart' as linter_context_impl;
+
+main() {
+  defineReflectiveSuite(() {
+    linter_context_impl.main();
+  }, name: 'linter');
+}
diff --git a/pkg/analyzer/test/src/lint/test_all.dart b/pkg/analyzer/test/src/lint/test_all.dart
index 60555a3..47596f2 100644
--- a/pkg/analyzer/test/src/lint/test_all.dart
+++ b/pkg/analyzer/test/src/lint/test_all.dart
@@ -1,20 +1,21 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'config_test.dart' as config_test;
-import 'io_test.dart' as io_test;
-import 'project_test.dart' as project_test;
-import 'pub_test.dart' as pub_test;
+import 'config_test.dart' as config;
+import 'io_test.dart' as io;
+import 'linter/test_all.dart' as linter;
+import 'project_test.dart' as project;
+import 'pub_test.dart' as pub;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
-    config_test.main();
-    io_test.main();
-    project_test.main();
-    pub_test.main();
+    config.main();
+    io.main();
+    linter.main();
+    project.main();
+    pub.main();
   }, name: 'lint');
 }
diff --git a/pkg/analyzer/test/src/options/options_rule_validator_test.dart b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
new file mode 100644
index 0000000..5150828
--- /dev/null
+++ b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
@@ -0,0 +1,85 @@
+// 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/error/listener.dart';
+import 'package:analyzer/src/lint/linter.dart';
+import 'package:analyzer/src/lint/options_rule_validator.dart';
+import 'package:analyzer/src/string_source.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'package:yaml/yaml.dart';
+
+import '../../generated/test_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OptionsRuleValidatorTest);
+  });
+}
+
+class DeprecatedLint extends LintRule {
+  DeprecatedLint()
+      : super(
+            name: 'deprecated_lint',
+            group: Group.style,
+            maturity: Maturity.deprecated);
+}
+
+@reflectiveTest
+class OptionsRuleValidatorTest extends Object with ResourceProviderMixin {
+  LinterRuleOptionsValidator validator = new LinterRuleOptionsValidator(
+      provider: () => [new DeprecatedLint(), new StableLint()]);
+
+/**
+ * Assert that when the validator is used on the given [content] the
+ * [expectedErrorCodes] are produced.
+ */
+  void assertErrors(String content, List<ErrorCode> expectedErrorCodes) {
+    GatheringErrorListener listener = new GatheringErrorListener();
+    ErrorReporter reporter = new ErrorReporter(
+        listener, new StringSource(content, 'analysis_options.yaml'));
+    validator.validate(reporter, loadYamlNode(content));
+    listener.assertErrorsWithCodes(expectedErrorCodes);
+  }
+
+  test_deprecated_rule() {
+    assertErrors('''
+linter:
+  rules:
+    - deprecated_lint
+      ''', [DEPRECATED_LINT_HINT]);
+  }
+
+  test_duplicated_rule() {
+    assertErrors('''
+linter:
+  rules:
+    - stable_lint
+    - stable_lint
+      ''', [DUPLICATE_RULE_HINT]);
+  }
+
+  test_stable_rule() {
+    assertErrors('''
+linter:
+  rules:
+    - stable_lint
+      ''', []);
+  }
+
+  test_undefined_rule() {
+    assertErrors('''
+linter:
+  rules:
+    - this_rule_does_not_exist
+      ''', [UNDEFINED_LINT_WARNING]);
+  }
+}
+
+class StableLint extends LintRule {
+  StableLint()
+      : super(
+            name: 'stable_lint', group: Group.style, maturity: Maturity.stable);
+}
diff --git a/pkg/analyzer/test/src/options/test_all.dart b/pkg/analyzer/test/src/options/test_all.dart
new file mode 100644
index 0000000..e38e167
--- /dev/null
+++ b/pkg/analyzer/test/src/options/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'options_rule_validator_test.dart' as options_rule_validator;
+
+main() {
+  defineReflectiveSuite(() {
+    options_rule_validator.main();
+  }, name: 'options');
+}
diff --git a/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart b/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart
index f841d78..ef1cc99 100644
--- a/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart
+++ b/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -20,7 +20,7 @@
 }
 
 @reflectiveTest
-class PubspecValidatorTest extends Object with ResourceProviderMixin {
+class PubspecValidatorTest with ResourceProviderMixin {
   PubspecValidator validator;
 
   /**
diff --git a/pkg/analyzer/test/src/source/source_resource_test.dart b/pkg/analyzer/test/src/source/source_resource_test.dart
index abf46f6..863117b 100644
--- a/pkg/analyzer/test/src/source/source_resource_test.dart
+++ b/pkg/analyzer/test/src/source/source_resource_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -10,12 +10,11 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/source/source_resource.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../context/mock_sdk.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(FileSourceTest);
@@ -23,7 +22,7 @@
 }
 
 @reflectiveTest
-class FileSourceTest extends Object with ResourceProviderMixin {
+class FileSourceTest with ResourceProviderMixin {
   void test_equals_false_differentFiles() {
     File file1 = getFile("/does/not/exist1.dart");
     File file2 = getFile("/does/not/exist2.dart");
diff --git a/pkg/analyzer/test/src/summary/expr_builder_test.dart b/pkg/analyzer/test/src/summary/expr_builder_test.dart
index c17d7f8..cf2ecd6 100644
--- a/pkg/analyzer/test/src/summary/expr_builder_test.dart
+++ b/pkg/analyzer/test/src/summary/expr_builder_test.dart
@@ -1,13 +1,20 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/scanner/reader.dart';
+import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/parser.dart';
+import 'package:analyzer/src/string_source.dart';
 import 'package:analyzer/src/summary/expr_builder.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
+import 'package:analyzer/src/summary/summarize_const_expr.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -17,6 +24,7 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ExprBuilderTest);
+    defineReflectiveTests(TokensToStringTest);
   });
 }
 
@@ -24,10 +32,128 @@
 class ExprBuilderTest extends ResynthesizeTestStrategyTwoPhase
     with ExprBuilderTestCases, ExprBuilderTestHelpers {}
 
+@reflectiveTest
+class TokensToStringTest {
+  void test_empty_list_no_space() {
+    // This is an interesting test case because "[]" is scanned as a single
+    // token, but the parser splits it into two.
+    _check('[]');
+  }
+
+  void test_empty_list_with_space() {
+    _check('[ ]');
+  }
+
+  void test_gt_gt_gt_in_type() {
+    // This is an interesting test case because ">>>" is scanned as a single
+    // token, but the parser splits it into three.
+    _check('A<B<C>>>[]');
+  }
+
+  void test_gt_gt_gt_in_type_split_both() {
+    _check('A<B<C> > >[]');
+  }
+
+  void test_gt_gt_gt_in_type_split_left() {
+    _check('A<B<C> >>[]');
+  }
+
+  void test_gt_gt_gt_in_type_split_right() {
+    _check('A<B<C>> >[]');
+  }
+
+  void test_gt_gt_in_type() {
+    // This is an interesting test case because ">>" is scanned as a single
+    // token, but the parser splits it into two.
+    _check('<A<B>>[]');
+  }
+
+  void test_gt_gt_in_type_split() {
+    _check('A<B> >[]');
+  }
+
+  void test_identifier() {
+    _check('foo');
+  }
+
+  void test_interpolation_expr_at_end_of_string() {
+    _check(r'"foo${bar}"');
+  }
+
+  void test_interpolation_expr_at_start_of_string() {
+    _check(r'"${foo}bar"');
+  }
+
+  void test_interpolation_expr_inside_string() {
+    _check(r'"foo${bar}baz"');
+  }
+
+  void test_interpolation_var_at_end_of_string() {
+    _check(r'"foo$bar"');
+  }
+
+  void test_interpolation_var_at_start_of_string() {
+    _check(r'"$foo bar"');
+  }
+
+  void test_interpolation_var_inside_string() {
+    _check(r'"foo$bar baz"');
+  }
+
+  void test_simple_string() {
+    _check('"foo"');
+  }
+
+  void _check(String originalString) {
+    var expression = _parseExpression(originalString);
+    var originalTokens =
+        _extractTokenList(expression.beginToken, expression.endToken);
+    var newString = tokensToString(expression.beginToken, expression.endToken);
+    var errorListener = AnalysisErrorListener.NULL_LISTENER;
+    var reader = new CharSequenceReader(newString);
+    var stringSource = new StringSource(newString, null);
+    var scanner = new Scanner(stringSource, reader, errorListener);
+    var startToken = scanner.tokenize();
+    var newTokens = _extractTokenList(startToken);
+    expect(newTokens, originalTokens);
+  }
+
+  List<String> _extractTokenList(Token startToken, [Token endToken]) {
+    var result = <String>[];
+    while (!startToken.isEof) {
+      if (!startToken.isSynthetic) result.add(startToken.lexeme);
+      if (identical(startToken, endToken)) break;
+      startToken = startToken.next;
+    }
+    return result;
+  }
+
+  Expression _parseExpression(String expressionString) {
+    // Note: to normalize the token string it's not sufficient to tokenize it
+    // and then pass the tokens to `tokensToString`; we also need to parse it
+    // because parsing modifies the token stream (splitting up `[]`, `>>`, and
+    // `>>>` tokens when circumstances warrant).
+    //
+    // We wrap the expression in "f() async => ...;" to ensure that the await
+    // keyword is properly parsed.
+    var sourceText = 'f() async => $expressionString;';
+    var errorListener = AnalysisErrorListener.NULL_LISTENER;
+    var reader = new CharSequenceReader(sourceText);
+    var stringSource = new StringSource(sourceText, null);
+    var scanner = new Scanner(stringSource, reader, errorListener);
+    var startToken = scanner.tokenize();
+    var parser = new Parser(stringSource, errorListener);
+    var compilationUnit = parser.parseCompilationUnit(startToken);
+    var f = compilationUnit.declarations[0] as FunctionDeclaration;
+    var body = f.functionExpression.body as ExpressionFunctionBody;
+    return body.expression;
+  }
+}
+
 /// Mixin containing test cases exercising the [ExprBuilder].  Intended to be
 /// applied to a class implementing [ResynthesizeTestStrategy], along with the
 /// mixin [ExprBuilderTestHelpers].
-abstract class ExprBuilderTestCases implements ExprBuilderTestHelpers {
+mixin ExprBuilderTestCases implements ExprBuilderTestHelpers {
   void test_add() {
     checkSimpleExpression('0 + 1');
   }
@@ -360,7 +486,7 @@
 
   @failingTest
   void test_pushLocalFunctionReference_nested() {
-    prepareAnalysisContext(new AnalysisOptionsImpl()..previewDart2 = false);
+    prepareAnalysisContext(new AnalysisOptionsImpl());
     var expr =
         checkSimpleExpression('(x) => (y) => x + y') as FunctionExpression;
     var outerFunctionElement = expr.declaredElement;
@@ -383,7 +509,7 @@
 
   @failingTest
   void test_pushLocalFunctionReference_paramReference() {
-    prepareAnalysisContext(new AnalysisOptionsImpl()..previewDart2 = false);
+    prepareAnalysisContext(new AnalysisOptionsImpl());
     var expr = checkSimpleExpression('(x, y) => x + y') as FunctionExpression;
     var localFunctionElement = expr.declaredElement;
     var xElement = localFunctionElement.parameters[0];
@@ -478,9 +604,9 @@
   }
 }
 
-/// Mixin containing helper methods for testing the [ExprBuilder].  Intended to
+/// Mixin containing helper methods for testing the [ExprBuilder]. Intended to
 /// be applied to a class implementing [ResynthesizeTestStrategy].
-abstract class ExprBuilderTestHelpers implements ResynthesizeTestStrategy {
+mixin ExprBuilderTestHelpers implements ResynthesizeTestStrategy {
   Expression buildConstructorInitializer(String sourceText,
       {String className: 'C',
       String initializerName: 'x',
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index 4a6136f..e406c24 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -26,7 +26,7 @@
 /// These test cases may be mixed into any class derived from
 /// [SummaryLinkerTestStrategy], allowing the linker to be unit-tested in a
 /// variety of ways.
-abstract class LinkerUnitTestCases implements SummaryLinkerTestStrategy {
+mixin LinkerUnitTestCases implements SummaryLinkerTestStrategy {
   Matcher get isUndefined => const TypeMatcher<UndefinedElementForLink>();
 
   LibraryElementForLink getLibrary(String uri) {
@@ -165,14 +165,9 @@
   }
 
   void test_covariance() {
-    // Note: due to dartbug.com/27393, the keyword "checked" is identified by
-    // its presence in a library called "meta".  If that bug is fixed, this test
-    // may need to be changed.
     createLinker('''
-library meta;
-const checked = null;
 class A<T> {
-  void f(@checked T t) {}
+  void f(covariant T t) {}
 }
 class B<T> extends A<T> {
   void f(T t) {}
diff --git a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
index 0709a95..1061dba 100644
--- a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
+++ b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
@@ -368,7 +368,7 @@
 
   _TestResynthesizerResultProvider(
       InternalAnalysisContext context, SummaryDataStore dataStore)
-      : super(context, dataStore);
+      : super(context, null, dataStore);
 
   @override
   bool hasResultsForSource(Source source) {
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index adbbdba..9267132 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -25,12 +25,12 @@
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_support.dart';
 import '../abstract_single_unit.dart';
-import '../context/abstract_context.dart';
 import 'element_text.dart';
 import 'test_strategies.dart';
 
@@ -100,7 +100,7 @@
     }
   }
 
-  DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK;
+  DartSdk createDartSdk() => new MockSdk(resourceProvider: resourceProvider);
 
   /**
    * Create the analysis options that should be used for this test.
@@ -117,7 +117,7 @@
 /// Mixin containing test cases exercising summary resynthesis.  Intended to be
 /// applied to a class implementing [ResynthesizeTestStrategy], along with the
 /// mixin [ResynthesizeTestHelpers].
-abstract class ResynthesizeTestCases implements ResynthesizeTestHelpers {
+mixin ResynthesizeTestCases implements ResynthesizeTestHelpers {
   test_class_abstract() async {
     var library = await checkLibrary('abstract class C {}');
     checkElementText(library, r'''
@@ -2152,7 +2152,9 @@
     checkElementText(library, r'''
 class C {
 }
-const dynamic V = #invalidConst;
+const dynamic V = const
+        C/*location: test.dart;C*/.
+        named/*location: null*/();
 ''');
   }
 
@@ -2162,7 +2164,9 @@
 const V = const C.named();
 ''', allowErrors: true);
     checkElementText(library, r'''
-const dynamic V = #invalidConst;
+const dynamic V = const
+        C/*location: null*/.
+        named/*location: null*/();
 ''');
   }
 
@@ -2178,7 +2182,10 @@
 ''', allowErrors: true);
     checkElementText(library, r'''
 import 'a.dart' as p;
-const dynamic V = #invalidConst;
+const dynamic V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/.
+        named/*location: null*/();
 ''');
   }
 
@@ -2191,7 +2198,10 @@
 ''', allowErrors: true);
     checkElementText(library, r'''
 import 'a.dart' as p;
-const dynamic V = #invalidConst;
+const dynamic V = const
+        p/*location: test.dart;p*/.
+        C/*location: null*/.
+        named/*location: null*/();
 ''');
   }
 
@@ -2201,7 +2211,10 @@
 const V = const p.C.named();
 ''', allowErrors: true);
     checkElementText(library, r'''
-const dynamic V = #invalidConst;
+const dynamic V = const
+        p/*location: null*/.
+        C/*location: null*/.
+        named/*location: null*/();
 ''');
   }
 
@@ -2214,7 +2227,9 @@
     checkElementText(library, r'''
 class C<T> {
 }
-const dynamic V = #invalidConst;
+const dynamic V = const
+        C/*location: test.dart;C*/.
+        named/*location: null*/();
 ''');
   }
 
@@ -2274,7 +2289,8 @@
 const V = const C();
 ''', allowErrors: true);
     checkElementText(library, r'''
-const dynamic V = #invalidConst;
+const dynamic V = const
+        C/*location: null*/();
 ''');
   }
 
@@ -2287,7 +2303,9 @@
 ''', allowErrors: true);
     checkElementText(library, r'''
 import 'a.dart' as p;
-const dynamic V = #invalidConst;
+const dynamic V = const
+        p/*location: test.dart;p*/.
+        C/*location: null*/();
 ''');
   }
 
@@ -2297,7 +2315,9 @@
 const V = const p.C();
 ''', allowErrors: true);
     checkElementText(library, r'''
-const dynamic V = #invalidConst;
+const dynamic V = const
+        p/*location: null*/.
+        C/*location: null*/();
 ''');
   }
 
@@ -2863,7 +2883,8 @@
 const V = foo;
 ''', allowErrors: true);
     checkElementText(library, r'''
-const dynamic V = #invalidConst;
+const dynamic V =
+        foo/*location: null*/;
 ''');
   }
 
@@ -2876,7 +2897,9 @@
     checkElementText(library, r'''
 class C {
 }
-const dynamic V = #invalidConst;
+const dynamic V =
+        C/*location: test.dart;C*/.
+        foo/*location: null*/;
 ''');
   }
 
@@ -2891,7 +2914,10 @@
 ''', allowErrors: true);
     checkElementText(library, r'''
 import 'foo.dart' as p;
-const dynamic V = #invalidConst;
+const dynamic V =
+        p/*location: test.dart;p*/.
+        C/*location: foo.dart;C*/.
+        foo/*location: null*/;
 ''');
   }
 
@@ -3029,7 +3055,7 @@
 const vSuper = super;
 ''');
     checkElementText(library, r'''
-const dynamic vSuper = #invalidConst;
+const dynamic vSuper = super;
 ''');
   }
 
@@ -3039,7 +3065,7 @@
 const vThis = this;
 ''');
     checkElementText(library, r'''
-const dynamic vThis = #invalidConst;
+const dynamic vThis = this;
 ''');
   }
 
@@ -5145,7 +5171,8 @@
 import '';
 ''');
     checkElementText(library, r'''
-@#invalidConst
+@
+        foo/*location: null*/
 import '<unresolved>';
 ''');
   }
@@ -5894,7 +5921,10 @@
 ''');
     checkElementText(library, r'''
 import 'a.dart' as a;
-@#invalidConst
+@
+        a/*location: test.dart;a*/.
+        C/*location: a.dart;C*/.
+        named/*location: a.dart;C;named*/
 class D {
 }
 ''');
@@ -5914,7 +5944,9 @@
 ''');
     checkElementText(library, r'''
 import 'a.dart';
-@#invalidConst
+@
+        C/*location: a.dart;C*/.
+        named/*location: a.dart;C;named*/
 class D {
 }
 ''');
@@ -5948,7 +5980,8 @@
     checkElementText(library, r'''
 import 'a.dart';
 import 'b.dart';
-dynamic foo([dynamic p = #invalidConst]) {}
+dynamic foo([dynamic p =
+        V/*location: null*/]) {}
 ''');
   }
 
@@ -5967,7 +6000,8 @@
 ''');
     checkElementText(library, r'''
 import 'c.dart';
-dynamic foo([dynamic p = #invalidConst]) {}
+dynamic foo([dynamic p =
+        V/*location: null*/]) {}
 ''');
   }
 
@@ -5981,7 +6015,8 @@
 ''');
     checkElementText(library, r'''
 dynamic V;
-dynamic foo([dynamic p = #invalidConst]) {}
+dynamic foo([dynamic p =
+        V/*location: null*/]) {}
 dynamic V() {}
 ''');
   }
@@ -6662,7 +6697,8 @@
     shouldCompareLibraryElements = false;
     var library = await checkLibrary('f(_) {} @f(42) class C {}');
     checkElementText(library, r'''
-@#invalidConst
+@
+        __unresolved__/*location: null*/
 class C {
 }
 dynamic f(dynamic _) {}
@@ -7220,54 +7256,6 @@
         withOffsets: true);
   }
 
-  test_parameter_checked() async {
-    // Note: due to dartbug.com/27393, the keyword "checked" is identified by
-    // its presence in a library called "meta".  If that bug is fixed, this test
-    // my need to be changed.
-    var library = await checkLibrary(r'''
-library meta;
-const checked = null;
-class A<T> {
-  void f(@checked T t) {}
-}
-''');
-    checkElementText(library, r'''
-library meta;
-class A<T> {
-  void f(@
-        checked/*location: test.dart;checked?*/ covariant T t) {}
-}
-const dynamic checked = null;
-''');
-  }
-
-  test_parameter_checked_inherited() async {
-    // Note: due to dartbug.com/27393, the keyword "checked" is identified by
-    // its presence in a library called "meta".  If that bug is fixed, this test
-    // my need to be changed.
-    var library = await checkLibrary(r'''
-library meta;
-const checked = null;
-class A<T> {
-  void f(@checked T t) {}
-}
-class B<T> extends A<T> {
-  void f(T t) {}
-}
-''');
-    checkElementText(library, r'''
-library meta;
-class A<T> {
-  void f(@
-        checked/*location: test.dart;checked?*/ covariant T t) {}
-}
-class B<T> extends A<T> {
-  void f(covariant T t) {}
-}
-const dynamic checked = null;
-''');
-  }
-
   test_parameter_covariant() async {
     var library = await checkLibrary('class C { void m(covariant C c) {} }');
     checkElementText(library, r'''
@@ -8323,7 +8311,8 @@
 class A {
   const A(dynamic _);
 }
-@#invalidConst
+@
+        A/*location: test.dart;A*/(this)
 class C {
 }
 ''');
@@ -8334,7 +8323,9 @@
     var library =
         await checkLibrary('@foo.bar() class C {}', allowErrors: true);
     checkElementText(library, r'''
-@#invalidConst
+@
+        foo/*location: null*/.
+        bar/*location: null*/()
 class C {
 }
 ''');
@@ -8345,7 +8336,9 @@
     var library =
         await checkLibrary('@String.foo() class C {}', allowErrors: true);
     checkElementText(library, r'''
-@#invalidConst
+@
+        String/*location: dart:core;String*/.
+        foo/*location: null*/()
 class C {
 }
 ''');
@@ -8355,7 +8348,9 @@
     shouldCompareLibraryElements = false;
     var library = await checkLibrary('@foo.bar class C {}', allowErrors: true);
     checkElementText(library, r'''
-@#invalidConst
+@
+        foo/*location: null*/.
+        bar/*location: null*/
 class C {
 }
 ''');
@@ -8368,7 +8363,9 @@
         allowErrors: true);
     checkElementText(library, r'''
 import 'dart:async' as foo;
-@#invalidConst
+@
+        foo/*location: test.dart;foo*/.
+        bar/*location: null*/
 class C {
 }
 ''');
@@ -8379,7 +8376,10 @@
     var library =
         await checkLibrary('@foo.bar.baz() class C {}', allowErrors: true);
     checkElementText(library, r'''
-@#invalidConst
+@
+        foo/*location: null*/.
+        bar/*location: null*/.
+        baz/*location: null*/()
 class C {
 }
 ''');
@@ -8392,7 +8392,10 @@
         allowErrors: true);
     checkElementText(library, r'''
 import 'dart:async' as foo;
-@#invalidConst
+@
+        foo/*location: test.dart;foo*/.
+        bar/*location: null*/.
+        baz/*location: null*/()
 class C {
 }
 ''');
@@ -8405,7 +8408,10 @@
         allowErrors: true);
     checkElementText(library, r'''
 import 'dart:async' as foo;
-@#invalidConst
+@
+        foo/*location: test.dart;foo*/.
+        Future/*location: dart:async;Future*/.
+        bar/*location: null*/()
 class C {
 }
 ''');
@@ -8416,7 +8422,9 @@
     var library =
         await checkLibrary('@foo.bar() class C {}', allowErrors: true);
     checkElementText(library, r'''
-@#invalidConst
+@
+        foo/*location: null*/.
+        bar/*location: null*/()
 class C {
 }
 ''');
@@ -8429,7 +8437,9 @@
         allowErrors: true);
     checkElementText(library, r'''
 import 'dart:async' as foo;
-@#invalidConst
+@
+        foo/*location: test.dart;foo*/.
+        bar/*location: null*/()
 class C {
 }
 ''');
@@ -8439,7 +8449,8 @@
     shouldCompareLibraryElements = false;
     var library = await checkLibrary('@foo class C {}', allowErrors: true);
     checkElementText(library, r'''
-@#invalidConst
+@
+        foo/*location: null*/
 class C {
 }
 ''');
@@ -8449,7 +8460,8 @@
     shouldCompareLibraryElements = false;
     var library = await checkLibrary('@foo() class C {}', allowErrors: true);
     checkElementText(library, r'''
-@#invalidConst
+@
+        foo/*location: null*/()
 class C {
 }
 ''');
@@ -8746,7 +8758,7 @@
 
 /// Mixin containing helper methods for testing summary resynthesis.  Intended
 /// to be applied to a class implementing [ResynthesizeTestStrategy].
-abstract class ResynthesizeTestHelpers implements ResynthesizeTestStrategy {
+mixin ResynthesizeTestHelpers implements ResynthesizeTestStrategy {
   /**
    * Names of variables which have initializers that are not valid constants,
    * so they are not resynthesized.
@@ -10012,7 +10024,7 @@
 
   TestSummaryResynthesizer(AnalysisContext context, this.unlinkedSummaries,
       this.linkedSummaries, this.allowMissingFiles)
-      : super(context, context.sourceFactory, true) {
+      : super(context, null, context.sourceFactory, true) {
     // Clear after resynthesizing TypeProvider in super().
     unlinkedSummariesRequested.clear();
     linkedSummariesRequested.clear();
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 3f1e604..5554649 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -1,19 +1,21 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/string_source.dart';
 import 'package:analyzer/src/summary/base.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/public_namespace_computer.dart'
     as public_namespace;
+import 'package:analyzer/src/summary/summarize_const_expr.dart';
 import 'package:test/test.dart';
 
 import 'test_strategies.dart';
@@ -79,7 +81,7 @@
 /// These test cases may be mixed into any class derived from
 /// [SummaryBlackBoxTestStrategy], allowing summary generation to be unit-tested
 /// in a variety of ways.
-abstract class SummaryTestCases implements SummaryBlackBoxTestStrategy {
+mixin SummaryTestCases implements SummaryBlackBoxTestStrategy {
   /**
    * Get access to the linked defining compilation unit.
    */
@@ -88,7 +90,7 @@
   /**
    * TODO(scheglov) rename "Const" to "Expr" everywhere
    */
-  void assertUnlinkedConst(UnlinkedExpr constExpr,
+  void assertUnlinkedConst(UnlinkedExpr constExpr, String sourceRepresentation,
       {bool isValidConst: true,
       List<UnlinkedExprOperation> operators: const <UnlinkedExprOperation>[],
       List<UnlinkedExprAssignOperator> assignmentOperators:
@@ -98,12 +100,15 @@
       List<String> strings: const <String>[],
       List<_EntityRefValidator> referenceValidators:
           const <_EntityRefValidator>[],
-      bool forTypeInferenceOnly: false}) {
+      bool forTypeInferenceOnly: false,
+      bool enableSetLiterals: IsEnabledByDefault.set_literals}) {
     if (forTypeInferenceOnly && !containsNonConstExprs) {
       expect(constExpr, isNull);
       return;
     }
     expect(constExpr, isNotNull);
+    expect(constExpr.sourceRepresentation,
+        _normalizeTokenString(sourceRepresentation, enableSetLiterals));
     expect(constExpr.isValidConst, isValidConst);
     expect(constExpr.operations, operators);
     expect(constExpr.ints, ints);
@@ -116,13 +121,36 @@
     }
   }
 
+  String _normalizeTokenString(String tokenString, bool enableSetLiterals) {
+    // Note: to normalize the token string it's not sufficient to tokenize it
+    // and then pass the tokens to `tokensToString`; we also need to parse it
+    // because parsing modifies the token stream (splitting up `[]`, `>>`, and
+    // `>>>` tokens when circumstances warrant).
+    //
+    // We wrap the expression in "f() async => ...;" to ensure that the await
+    // keyword is properly parsed.
+    var sourceText = 'f() async => $tokenString;';
+    var errorListener = AnalysisErrorListener.NULL_LISTENER;
+    var reader = new CharSequenceReader(sourceText);
+    var stringSource = new StringSource(sourceText, null);
+    var scanner = new Scanner(stringSource, reader, errorListener);
+    var startToken = scanner.tokenize();
+    var parser = new Parser(stringSource, errorListener)
+      ..enableSetLiterals = enableSetLiterals;
+    var compilationUnit = parser.parseCompilationUnit(startToken);
+    var f = compilationUnit.declarations[0] as FunctionDeclaration;
+    var body = f.functionExpression.body as ExpressionFunctionBody;
+    var expression = body.expression;
+    return tokensToString(expression.beginToken, expression.endToken);
+  }
+
   /**
    * Check that [annotations] contains a single entry which is a reference to
    * a top level variable called `a` in the current library.
    */
   void checkAnnotationA(List<UnlinkedExpr> annotations) {
     expect(annotations, hasLength(1));
-    assertUnlinkedConst(annotations[0], operators: [
+    assertUnlinkedConst(annotations[0], 'a', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'a',
@@ -796,8 +824,11 @@
    * with the given [variableName].
    */
   UnlinkedVariable serializeVariableText(String text,
-      {String variableName: 'v', bool allowErrors: false}) {
-    serializeLibraryText(text, allowErrors: allowErrors);
+      {String variableName: 'v',
+      bool allowErrors: false,
+      bool enableSetLiterals: IsEnabledByDefault.set_literals}) {
+    serializeLibraryText(text,
+        allowErrors: allowErrors, enableSetLiterals: enableSetLiterals);
     return findVariable(variableName, failIfAbsent: true);
   }
 
@@ -1665,7 +1696,7 @@
 
   test_constExpr_binary_add() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 + 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 + 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.add
@@ -1678,16 +1709,17 @@
   test_constExpr_binary_and() {
     UnlinkedVariable variable =
         serializeVariableText('const v = true && false;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushTrue,
-      UnlinkedExprOperation.pushFalse,
-      UnlinkedExprOperation.and
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'true && false',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushFalse,
+          UnlinkedExprOperation.and
+        ]);
   }
 
   test_constExpr_binary_bitAnd() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 & 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 & 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.bitAnd
@@ -1699,7 +1731,7 @@
 
   test_constExpr_binary_bitOr() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 | 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 | 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.bitOr
@@ -1711,7 +1743,7 @@
 
   test_constExpr_binary_bitShiftLeft() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 << 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 << 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.bitShiftLeft
@@ -1723,7 +1755,7 @@
 
   test_constExpr_binary_bitShiftRight() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 >> 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 >> 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.bitShiftRight
@@ -1735,7 +1767,7 @@
 
   test_constExpr_binary_bitXor() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 ^ 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 ^ 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.bitXor
@@ -1747,7 +1779,7 @@
 
   test_constExpr_binary_divide() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 / 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 / 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.divide
@@ -1759,7 +1791,7 @@
 
   test_constExpr_binary_equal() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 == 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 == 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.equal
@@ -1771,7 +1803,7 @@
 
   test_constExpr_binary_equal_not() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 != 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 != 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.notEqual
@@ -1783,7 +1815,7 @@
 
   test_constExpr_binary_floorDivide() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 ~/ 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 ~/ 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.floorDivide
@@ -1795,7 +1827,7 @@
 
   test_constExpr_binary_greater() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 > 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 > 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.greater
@@ -1807,7 +1839,7 @@
 
   test_constExpr_binary_greaterEqual() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 >= 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 >= 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.greaterEqual
@@ -1819,7 +1851,7 @@
 
   test_constExpr_binary_less() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 < 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 < 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.less
@@ -1831,7 +1863,7 @@
 
   test_constExpr_binary_lessEqual() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 <= 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 <= 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.lessEqual
@@ -1843,7 +1875,7 @@
 
   test_constExpr_binary_modulo() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 % 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 % 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.modulo
@@ -1855,7 +1887,7 @@
 
   test_constExpr_binary_multiply() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 * 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 * 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.multiply
@@ -1868,16 +1900,17 @@
   test_constExpr_binary_or() {
     UnlinkedVariable variable =
         serializeVariableText('const v = false || true;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushFalse,
-      UnlinkedExprOperation.pushTrue,
-      UnlinkedExprOperation.or
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'false || true',
+        operators: [
+          UnlinkedExprOperation.pushFalse,
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.or
+        ]);
   }
 
   test_constExpr_binary_qq() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 ?? 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 ?? 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.ifNull
@@ -1889,7 +1922,7 @@
 
   test_constExpr_binary_subtract() {
     UnlinkedVariable variable = serializeVariableText('const v = 1 - 2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 - 2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.subtract
@@ -1912,7 +1945,8 @@
 }
 ''';
     UnlinkedClass cls = serializeClassText(text, allowErrors: true);
-    assertUnlinkedConst(cls.executables[0].constantInitializers[0].expression,
+    assertUnlinkedConst(
+        cls.executables[0].constantInitializers[0].expression, 'T',
         operators: [
           UnlinkedExprOperation.pushReference
         ],
@@ -1929,15 +1963,17 @@
   test_constExpr_conditional() {
     UnlinkedVariable variable =
         serializeVariableText('const v = true ? 1 : 2;', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushTrue,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.conditional
-    ], ints: [
-      1,
-      2
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'true ? 1 : 2',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.conditional
+        ],
+        ints: [
+          1,
+          2
+        ]);
   }
 
   test_constExpr_constructorParam_shadows_classMember() {
@@ -1948,7 +1984,8 @@
   const C(a) : b = a;
 }
 ''');
-    assertUnlinkedConst(cls.executables[0].constantInitializers[0].expression,
+    assertUnlinkedConst(
+        cls.executables[0].constantInitializers[0].expression, 'a',
         operators: [UnlinkedExprOperation.pushParameter], strings: ['a']);
   }
 
@@ -1959,7 +1996,8 @@
   const C(T) : x = T;
 }
 ''');
-    assertUnlinkedConst(cls.executables[0].constantInitializers[0].expression,
+    assertUnlinkedConst(
+        cls.executables[0].constantInitializers[0].expression, 'T',
         operators: [UnlinkedExprOperation.pushParameter], strings: ['T']);
   }
 
@@ -1968,7 +2006,8 @@
 import 'dart:async';
 var v = (f) async => await f;
 ''');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.localFunctions[0].bodyExpr, 'await f',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushParameter,
@@ -1987,7 +2026,7 @@
 const v = foo(5, () => 42);
 foo(a, b) {}
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'foo(5, () => 42)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -2016,7 +2055,8 @@
 const v = foo(5, () => 42, () => 43);
 foo(a, b, c) {}
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'foo(5, () => 42, () => 43)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -2051,11 +2091,13 @@
 }
 ''').executables[0];
     expect(executable.localFunctions, hasLength(2));
-    assertUnlinkedConst(executable.constantInitializers[0].expression,
+    assertUnlinkedConst(
+        executable.constantInitializers[0].expression, '(() => 42)',
         isValidConst: false,
         operators: [UnlinkedExprOperation.pushLocalFunctionReference],
         ints: [0, 0]);
-    assertUnlinkedConst(executable.constantInitializers[1].expression,
+    assertUnlinkedConst(
+        executable.constantInitializers[1].expression, '(() => 43)',
         isValidConst: false,
         operators: [UnlinkedExprOperation.pushLocalFunctionReference],
         ints: [0, 1]);
@@ -2068,24 +2110,28 @@
 }
 const v = const C<int, String>.named();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) {
-        checkTypeRef(r, null, 'named',
-            expectedKind: ReferenceKind.constructor,
-            prefixExpectations: [
-              new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
-                  numTypeParameters: 2)
-            ],
-            numTypeArguments: 2);
-        checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
-        checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
-      }
-    ]);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const C<int, String>.named()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) {
+            checkTypeRef(r, null, 'named',
+                expectedKind: ReferenceKind.constructor,
+                prefixExpectations: [
+                  new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                      numTypeParameters: 2)
+                ],
+                numTypeArguments: 2);
+            checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
+            checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
+          }
+        ]);
   }
 
   test_constExpr_invokeConstructor_generic_named_imported() {
@@ -2098,24 +2144,28 @@
 import 'a.dart';
 const v = const C<int, String>.named();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) {
-        checkTypeRef(r, null, 'named',
-            expectedKind: ReferenceKind.constructor,
-            prefixExpectations: [
-              new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
-                  absoluteUri: absUri('/a.dart'), numTypeParameters: 2)
-            ],
-            numTypeArguments: 2);
-        checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
-        checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
-      }
-    ]);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const C<int, String>.named()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) {
+            checkTypeRef(r, null, 'named',
+                expectedKind: ReferenceKind.constructor,
+                prefixExpectations: [
+                  new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                      absoluteUri: absUri('/a.dart'), numTypeParameters: 2)
+                ],
+                numTypeArguments: 2);
+            checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
+            checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
+          }
+        ]);
   }
 
   test_constExpr_invokeConstructor_generic_named_imported_withPrefix() {
@@ -2128,25 +2178,29 @@
 import 'a.dart' as p;
 const v = const p.C<int, String>.named();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) {
-        checkTypeRef(r, null, 'named',
-            expectedKind: ReferenceKind.constructor,
-            prefixExpectations: [
-              new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
-                  absoluteUri: absUri('/a.dart'), numTypeParameters: 2),
-              new _PrefixExpectation(ReferenceKind.prefix, 'p')
-            ],
-            numTypeArguments: 2);
-        checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
-        checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
-      }
-    ]);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const p.C<int, String>.named()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) {
+            checkTypeRef(r, null, 'named',
+                expectedKind: ReferenceKind.constructor,
+                prefixExpectations: [
+                  new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                      absoluteUri: absUri('/a.dart'), numTypeParameters: 2),
+                  new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                ],
+                numTypeArguments: 2);
+            checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
+            checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
+          }
+        ]);
   }
 
   test_constExpr_invokeConstructor_generic_unnamed() {
@@ -2156,21 +2210,24 @@
 }
 const v = const C<int, String>();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) {
-        checkTypeRef(r, null, 'C',
-            expectedKind: ReferenceKind.classOrEnum,
-            numTypeParameters: 2,
-            numTypeArguments: 2);
-        checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
-        checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
-      }
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const C<int, String>()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) {
+            checkTypeRef(r, null, 'C',
+                expectedKind: ReferenceKind.classOrEnum,
+                numTypeParameters: 2,
+                numTypeArguments: 2);
+            checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
+            checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
+          }
+        ]);
   }
 
   test_constExpr_invokeConstructor_generic_unnamed_imported() {
@@ -2183,21 +2240,24 @@
 import 'a.dart';
 const v = const C<int, String>();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) {
-        checkTypeRef(r, absUri('/a.dart'), 'C',
-            expectedKind: ReferenceKind.classOrEnum,
-            numTypeParameters: 2,
-            numTypeArguments: 2);
-        checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
-        checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
-      }
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const C<int, String>()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) {
+            checkTypeRef(r, absUri('/a.dart'), 'C',
+                expectedKind: ReferenceKind.classOrEnum,
+                numTypeParameters: 2,
+                numTypeArguments: 2);
+            checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
+            checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
+          }
+        ]);
   }
 
   test_constExpr_invokeConstructor_generic_unnamed_imported_withPrefix() {
@@ -2210,24 +2270,28 @@
 import 'a.dart' as p;
 const v = const p.C<int, String>();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) {
-        checkTypeRef(r, absUri('/a.dart'), 'C',
-            expectedKind: ReferenceKind.classOrEnum,
-            numTypeParameters: 2,
-            numTypeArguments: 2,
-            prefixExpectations: [
-              new _PrefixExpectation(ReferenceKind.prefix, 'p')
-            ]);
-        checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
-        checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
-      }
-    ]);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const p.C<int, String>()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) {
+            checkTypeRef(r, absUri('/a.dart'), 'C',
+                expectedKind: ReferenceKind.classOrEnum,
+                numTypeParameters: 2,
+                numTypeArguments: 2,
+                prefixExpectations: [
+                  new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                ]);
+            checkTypeRef(r.typeArguments[0], 'dart:core', 'int');
+            checkTypeRef(r.typeArguments[1], 'dart:core', 'String');
+          }
+        ]);
   }
 
   test_constExpr_invokeConstructor_named() {
@@ -2237,18 +2301,21 @@
 }
 const v = const C.named();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'named',
-              expectedKind: ReferenceKind.constructor,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const C.named()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'named',
+                  expectedKind: ReferenceKind.constructor,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_named_imported() {
@@ -2261,19 +2328,22 @@
 import 'a.dart';
 const v = const C.named();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'named',
-              expectedKind: ReferenceKind.constructor,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
-                    absoluteUri: absUri('/a.dart'))
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const C.named()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'named',
+                  expectedKind: ReferenceKind.constructor,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                        absoluteUri: absUri('/a.dart'))
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_named_imported_withPrefix() {
@@ -2286,20 +2356,23 @@
 import 'a.dart' as p;
 const v = const p.C.named();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'named',
-              expectedKind: ReferenceKind.constructor,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
-                    absoluteUri: absUri('/a.dart')),
-                new _PrefixExpectation(ReferenceKind.prefix, 'p')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const p.C.named()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'named',
+                  expectedKind: ReferenceKind.constructor,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                        absoluteUri: absUri('/a.dart')),
+                    new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_unnamed() {
@@ -2313,34 +2386,40 @@
     // Ints: ^pointer 3 4
     // Doubles: ^pointer
     // Strings: ^pointer 'e' 'g' 'f' ''
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushDouble,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      11,
-      22,
-      55,
-      66,
-      3,
-      4,
-    ], doubles: [
-      3.3
-    ], strings: [
-      '444',
-      '777',
-      'e',
-      'g',
-      'f'
-    ], referenceValidators: [
-      (EntityRef r) =>
-          checkTypeRef(r, null, 'C', expectedKind: ReferenceKind.classOrEnum)
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr,
+        "const C(11, 22, 3.3, '444', e: 55, g: '777', f: 66)",
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushDouble,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          11,
+          22,
+          55,
+          66,
+          3,
+          4,
+        ],
+        doubles: [
+          3.3
+        ],
+        strings: [
+          '444',
+          '777',
+          'e',
+          'g',
+          'f'
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'C',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
   }
 
   test_constExpr_invokeConstructor_unnamed_imported() {
@@ -2353,7 +2432,7 @@
 import 'a.dart';
 const v = const C();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const C()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -2374,18 +2453,21 @@
 import 'a.dart' as p;
 const v = const p.C();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'C',
-              expectedKind: ReferenceKind.classOrEnum,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.prefix, 'p')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const p.C()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'C',
+                  expectedKind: ReferenceKind.classOrEnum,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_unresolved_named() {
@@ -2393,36 +2475,42 @@
 class C {}
 const v = const C.foo();
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'foo',
-              expectedKind: ReferenceKind.unresolved,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const C.foo()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'foo',
+                  expectedKind: ReferenceKind.unresolved,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.classOrEnum, 'C')
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_unresolved_named2() {
     UnlinkedVariable variable = serializeVariableText('''
 const v = const C.foo();
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'foo',
-              expectedKind: ReferenceKind.unresolved,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.unresolved, 'C')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const C.foo()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'foo',
+                  expectedKind: ReferenceKind.unresolved,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.unresolved, 'C')
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_unresolved_named_prefixed() {
@@ -2434,20 +2522,23 @@
 import 'a.dart' as p;
 const v = const p.C.foo();
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'foo',
-              expectedKind: ReferenceKind.unresolved,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
-                    absoluteUri: absUri('/a.dart')),
-                new _PrefixExpectation(ReferenceKind.prefix, 'p')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const p.C.foo()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'foo',
+                  expectedKind: ReferenceKind.unresolved,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                        absoluteUri: absUri('/a.dart')),
+                    new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_unresolved_named_prefixed2() {
@@ -2456,54 +2547,63 @@
 import 'a.dart' as p;
 const v = const p.C.foo();
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'foo',
-              expectedKind: ReferenceKind.unresolved,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.unresolved, 'C'),
-                new _PrefixExpectation(ReferenceKind.prefix, 'p')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const p.C.foo()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'foo',
+                  expectedKind: ReferenceKind.unresolved,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.unresolved, 'C'),
+                    new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                  ])
+        ]);
   }
 
   test_constExpr_invokeConstructor_unresolved_unnamed() {
     UnlinkedVariable variable = serializeVariableText('''
 const v = const Foo();
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.invokeConstructor,
-    ], ints: [
-      0,
-      0
-    ], referenceValidators: [
-      (EntityRef r) =>
-          checkTypeRef(r, null, 'Foo', expectedKind: ReferenceKind.unresolved)
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const Foo()',
+        operators: [
+          UnlinkedExprOperation.invokeConstructor,
+        ],
+        ints: [
+          0,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'Foo',
+              expectedKind: ReferenceKind.unresolved)
+        ]);
   }
 
   test_constExpr_invokeMethodRef_identical() {
     UnlinkedVariable variable =
         serializeVariableText('const v = identical(42, null);');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushNull,
-      UnlinkedExprOperation.invokeMethodRef
-    ], ints: [
-      42,
-      0,
-      2,
-      0
-    ], referenceValidators: [
-      (EntityRef r) {
-        checkTypeRef(r, 'dart:core', 'identical',
-            expectedKind: ReferenceKind.topLevelFunction);
-      }
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'identical(42, null)',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushNull,
+          UnlinkedExprOperation.invokeMethodRef
+        ],
+        ints: [
+          42,
+          0,
+          2,
+          0
+        ],
+        referenceValidators: [
+          (EntityRef r) {
+            checkTypeRef(r, 'dart:core', 'identical',
+                expectedKind: ReferenceKind.topLevelFunction);
+          }
+        ]);
   }
 
   test_constExpr_length_classConstField() {
@@ -2513,7 +2613,7 @@
 }
 const int v = C.length;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.length', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'length',
@@ -2534,17 +2634,19 @@
 import 'a.dart' as p;
 const int v = p.C.length;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushReference
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'length',
-              expectedKind: ReferenceKind.propertyAccessor,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
-                    absoluteUri: absUri('/a.dart')),
-                new _PrefixExpectation(ReferenceKind.prefix, 'p')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.C.length',
+        operators: [
+          UnlinkedExprOperation.pushReference
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'length',
+                  expectedKind: ReferenceKind.propertyAccessor,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.classOrEnum, 'C',
+                        absoluteUri: absUri('/a.dart')),
+                    new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                  ])
+        ]);
   }
 
   test_constExpr_length_identifierTarget() {
@@ -2552,7 +2654,7 @@
 const String a = 'aaa';
 const int v = a.length;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'a.length', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'length',
@@ -2572,17 +2674,19 @@
 }
 const int v = C.F.length;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushReference
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'length',
-              expectedKind: ReferenceKind.unresolved,
-              unresolvedHasName: true,
-              prefixExpectations: [
-                new _PrefixExpectation(ReferenceKind.propertyAccessor, 'F'),
-                new _PrefixExpectation(ReferenceKind.classOrEnum, 'C'),
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.F.length',
+        operators: [
+          UnlinkedExprOperation.pushReference
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'length',
+                  expectedKind: ReferenceKind.unresolved,
+                  unresolvedHasName: true,
+                  prefixExpectations: [
+                    new _PrefixExpectation(ReferenceKind.propertyAccessor, 'F'),
+                    new _PrefixExpectation(ReferenceKind.classOrEnum, 'C'),
+                  ])
+        ]);
   }
 
   test_constExpr_length_identifierTarget_imported() {
@@ -2593,7 +2697,7 @@
 import 'a.dart';
 const int v = a.length;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'a.length', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'length',
@@ -2615,107 +2719,123 @@
 import 'a.dart' as p;
 const int v = p.a.length;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushReference
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, null, 'length',
-              expectedKind: ReferenceKind.unresolved,
-              unresolvedHasName: true,
-              prefixExpectations: [
-                new _PrefixExpectation(
-                    ReferenceKind.topLevelPropertyAccessor, 'a',
-                    absoluteUri: absUri('/a.dart')),
-                new _PrefixExpectation(ReferenceKind.prefix, 'p')
-              ])
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.a.length',
+        operators: [
+          UnlinkedExprOperation.pushReference
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'length',
+                  expectedKind: ReferenceKind.unresolved,
+                  unresolvedHasName: true,
+                  prefixExpectations: [
+                    new _PrefixExpectation(
+                        ReferenceKind.topLevelPropertyAccessor, 'a',
+                        absoluteUri: absUri('/a.dart')),
+                    new _PrefixExpectation(ReferenceKind.prefix, 'p')
+                  ])
+        ]);
   }
 
   test_constExpr_length_parenthesizedBinaryTarget() {
     UnlinkedVariable variable =
         serializeVariableText('const v = ("abc" + "edf").length;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.add,
-      UnlinkedExprOperation.extractProperty
-    ], strings: [
-      'abc',
-      'edf',
-      'length'
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '("abc" + "edf").length',
+        operators: [
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.add,
+          UnlinkedExprOperation.extractProperty
+        ],
+        strings: [
+          'abc',
+          'edf',
+          'length'
+        ]);
   }
 
   test_constExpr_length_parenthesizedStringTarget() {
     UnlinkedVariable variable =
         serializeVariableText('const v = ("abc").length;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.extractProperty
-    ], strings: [
-      'abc',
-      'length'
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '("abc").length',
+        operators: [
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.extractProperty
+        ],
+        strings: [
+          'abc',
+          'length'
+        ]);
   }
 
   test_constExpr_length_stringLiteralTarget() {
     UnlinkedVariable variable =
         serializeVariableText('const v = "abc".length;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.extractProperty
-    ], strings: [
-      'abc',
-      'length'
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '"abc".length',
+        operators: [
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.extractProperty
+        ],
+        strings: [
+          'abc',
+          'length'
+        ]);
   }
 
   test_constExpr_makeSymbol() {
     UnlinkedVariable variable = serializeVariableText('const v = #a.bb.ccc;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '#a.bb.ccc',
         operators: [UnlinkedExprOperation.makeSymbol], strings: ['a.bb.ccc']);
   }
 
   test_constExpr_makeTypedList() {
     UnlinkedVariable variable =
         serializeVariableText('const v = const <int>[11, 22, 33];');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.makeTypedList
-    ], ints: [
-      11,
-      22,
-      33,
-      3
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
-          expectedKind: ReferenceKind.classOrEnum)
-    ]);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const <int>[11, 22, 33]',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeTypedList
+        ],
+        ints: [
+          11,
+          22,
+          33,
+          3
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
   }
 
   test_constExpr_makeTypedList_dynamic() {
     UnlinkedVariable variable =
         serializeVariableText('const v = const <dynamic>[11, 22, 33];');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.makeTypedList
-    ], ints: [
-      11,
-      22,
-      33,
-      3
-    ], referenceValidators: [
-      (EntityRef r) => checkDynamicTypeRef(r)
-    ]);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const <dynamic>[11, 22, 33]',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeTypedList
+        ],
+        ints: [
+          11,
+          22,
+          33,
+          3
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkDynamicTypeRef(r)
+        ]);
   }
 
   test_constExpr_makeTypedList_functionType() {
     UnlinkedVariable variable =
         serializeVariableText('final v = <void Function(int)>[];');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '<void Function(int)>[]',
         operators: [UnlinkedExprOperation.makeTypedList],
         ints: [
           0 // Size of the list
@@ -2744,6 +2864,7 @@
     UnlinkedVariable variable = serializeVariableText(
         'final v = <void Function<T>(Function<Q>(T, Q))>[];');
     assertUnlinkedConst(variable.initializer.bodyExpr,
+        '<void Function<T>(Function<Q>(T, Q))>[]',
         operators: [UnlinkedExprOperation.makeTypedList],
         ints: [
           0 // Size of the list
@@ -2785,114 +2906,257 @@
   test_constExpr_makeTypedMap() {
     UnlinkedVariable variable = serializeVariableText(
         'const v = const <int, String>{11: "aaa", 22: "bbb", 33: "ccc"};');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.makeTypedMap
-    ], ints: [
-      11,
-      22,
-      33,
-      3
-    ], strings: [
-      'aaa',
-      'bbb',
-      'ccc'
-    ], referenceValidators: [
-      (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
-          expectedKind: ReferenceKind.classOrEnum),
-      (EntityRef r) => checkTypeRef(r, 'dart:core', 'String',
-          expectedKind: ReferenceKind.classOrEnum)
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr,
+        'const <int, String>{11: "aaa", 22: "bbb", 33: "ccc"}',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeTypedMap
+        ],
+        ints: [
+          11,
+          22,
+          33,
+          3
+        ],
+        strings: [
+          'aaa',
+          'bbb',
+          'ccc'
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'String',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
   }
 
   test_constExpr_makeTypedMap_dynamic() {
     UnlinkedVariable variable = serializeVariableText(
         'const v = const <dynamic, dynamic>{11: "aaa", 22: "bbb", 33: "ccc"};');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.makeTypedMap
-    ], ints: [
-      11,
-      22,
-      33,
-      3
-    ], strings: [
-      'aaa',
-      'bbb',
-      'ccc'
-    ], referenceValidators: [
-      (EntityRef r) => checkDynamicTypeRef(r),
-      (EntityRef r) => checkDynamicTypeRef(r)
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr,
+        'const <dynamic, dynamic>{11: "aaa", 22: "bbb", 33: "ccc"}',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeTypedMap
+        ],
+        ints: [
+          11,
+          22,
+          33,
+          3
+        ],
+        strings: [
+          'aaa',
+          'bbb',
+          'ccc'
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkDynamicTypeRef(r),
+          (EntityRef r) => checkDynamicTypeRef(r)
+        ]);
+  }
+
+  test_constExpr_makeTypedSet() {
+    UnlinkedVariable variable = serializeVariableText(
+        'const v = const <int>{11, 22, 33};',
+        enableSetLiterals: true);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const <int>{11, 22, 33}',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeTypedSet
+        ],
+        ints: [11, 22, 33, 3],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ],
+        enableSetLiterals: true);
+  }
+
+  test_constExpr_makeTypedSet_dynamic() {
+    UnlinkedVariable variable = serializeVariableText(
+        'const v = const <dynamic>{11, 22, 33};',
+        enableSetLiterals: true);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'const <dynamic>{11, 22, 33}',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeTypedSet
+        ],
+        ints: [11, 22, 33, 3],
+        referenceValidators: [(EntityRef r) => checkDynamicTypeRef(r)],
+        enableSetLiterals: true);
+  }
+
+  test_constExpr_makeTypedSet_functionType() {
+    UnlinkedVariable variable = serializeVariableText(
+        'final v = <void Function(int)>{};',
+        enableSetLiterals: true);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '<void Function(int)>{}',
+        operators: [UnlinkedExprOperation.makeTypedSet],
+        ints: [
+          0 // Size of the list
+        ],
+        referenceValidators: [
+          (EntityRef reference) {
+            expect(reference, new TypeMatcher<EntityRef>());
+            expect(reference.entityKind, EntityRefKind.genericFunctionType);
+            expect(reference.syntheticParams, hasLength(1));
+            {
+              final param = reference.syntheticParams[0];
+              expect(param.name, ''); // no name for generic type parameters
+              checkTypeRef(param.type, 'dart:core', 'int',
+                  expectedKind: ReferenceKind.classOrEnum);
+            }
+            expect(reference.paramReference, 0);
+            expect(reference.typeParameters, hasLength(0));
+            // TODO(mfairhurst) check this references void
+            expect(reference.syntheticReturnType, isNotNull);
+          }
+        ],
+        forTypeInferenceOnly: true);
+  }
+
+  test_constExpr_makeTypedSet_functionType_withTypeParameters() {
+    UnlinkedVariable variable = serializeVariableText(
+        'final v = <void Function<T>(Function<Q>(T, Q))>{};',
+        enableSetLiterals: true);
+    assertUnlinkedConst(variable.initializer.bodyExpr,
+        '<void Function<T>(Function<Q>(T, Q))>{}',
+        operators: [UnlinkedExprOperation.makeTypedSet],
+        ints: [
+          0 // Size of the list
+        ],
+        referenceValidators: [
+          (EntityRef reference) {
+            expect(reference, new TypeMatcher<EntityRef>());
+            expect(reference.entityKind, EntityRefKind.genericFunctionType);
+            expect(reference.syntheticParams, hasLength(1));
+            {
+              final param = reference.syntheticParams[0];
+              expect(param.type, new TypeMatcher<EntityRef>());
+              expect(param.type.entityKind, EntityRefKind.genericFunctionType);
+              expect(param.type.syntheticParams, hasLength(2));
+              {
+                final subparam = param.type.syntheticParams[0];
+                expect(
+                    subparam.name, ''); // no name for generic type parameters
+                expect(subparam.type, new TypeMatcher<EntityRef>());
+                expect(subparam.type.paramReference, 2);
+              }
+              {
+                final subparam = param.type.syntheticParams[1];
+                expect(
+                    subparam.name, ''); // no name for generic type parameters
+                expect(subparam.type, new TypeMatcher<EntityRef>());
+                expect(subparam.type.paramReference, 1);
+              }
+            }
+            expect(reference.paramReference, 0);
+            expect(reference.typeParameters, hasLength(1));
+            // TODO(mfairhurst) check this references void
+            expect(reference.syntheticReturnType, isNotNull);
+          }
+        ],
+        forTypeInferenceOnly: true);
   }
 
   test_constExpr_makeUntypedList() {
     UnlinkedVariable variable =
         serializeVariableText('const v = const [11, 22, 33];');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.makeUntypedList
-    ], ints: [
-      11,
-      22,
-      33,
-      3
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const [11, 22, 33]',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          11,
+          22,
+          33,
+          3
+        ]);
   }
 
   test_constExpr_makeUntypedMap() {
     UnlinkedVariable variable = serializeVariableText(
         'const v = const {11: "aaa", 22: "bbb", 33: "ccc"};');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.makeUntypedMap
-    ], ints: [
-      11,
-      22,
-      33,
-      3
-    ], strings: [
-      'aaa',
-      'bbb',
-      'ccc'
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr,
+        'const {11: "aaa", 22: "bbb", 33: "ccc"}',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeUntypedMap
+        ],
+        ints: [
+          11,
+          22,
+          33,
+          3
+        ],
+        strings: [
+          'aaa',
+          'bbb',
+          'ccc'
+        ]);
+  }
+
+  test_constExpr_makeUntypedSet() {
+    UnlinkedVariable variable = serializeVariableText(
+        'const v = const {11, 22, 33};',
+        enableSetLiterals: true);
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'const {11, 22, 33}',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeUntypedSet
+        ],
+        ints: [11, 22, 33, 3],
+        enableSetLiterals: true);
   }
 
   test_constExpr_parenthesized() {
     UnlinkedVariable variable = serializeVariableText('const v = (1 + 2) * 3;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.add,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.multiply,
-    ], ints: [
-      1,
-      2,
-      3
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(1 + 2) * 3',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.add,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.multiply,
+        ],
+        ints: [
+          1,
+          2,
+          3
+        ]);
   }
 
   test_constExpr_prefix_complement() {
     UnlinkedVariable variable = serializeVariableText('const v = ~2;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '~2', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.complement
     ], ints: [
@@ -2902,7 +3166,7 @@
 
   test_constExpr_prefix_negate() {
     UnlinkedVariable variable = serializeVariableText('const v = -(2);');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '-(2)', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.negate
     ], ints: [
@@ -2912,40 +3176,42 @@
 
   test_constExpr_prefix_not() {
     UnlinkedVariable variable = serializeVariableText('const v = !true;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '!true',
         operators: [UnlinkedExprOperation.pushTrue, UnlinkedExprOperation.not]);
   }
 
   test_constExpr_pushDouble() {
     UnlinkedVariable variable = serializeVariableText('const v = 123.4567;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '123.4567',
         operators: [UnlinkedExprOperation.pushDouble], doubles: [123.4567]);
   }
 
   test_constExpr_pushFalse() {
     UnlinkedVariable variable = serializeVariableText('const v = false;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'false',
         operators: [UnlinkedExprOperation.pushFalse]);
   }
 
   test_constExpr_pushInt() {
     UnlinkedVariable variable = serializeVariableText('const v = 1;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1',
         operators: [UnlinkedExprOperation.pushInt], ints: [1]);
   }
 
   test_constExpr_pushInt_max() {
     UnlinkedVariable variable = serializeVariableText('const v = 0xFFFFFFFF;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-    ], ints: [
-      0xFFFFFFFF
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '0xFFFFFFFF',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+        ],
+        ints: [
+          0xFFFFFFFF
+        ]);
   }
 
   test_constExpr_pushInt_negative() {
     UnlinkedVariable variable = serializeVariableText('const v = -5;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, '-5', operators: [
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.negate
     ], ints: [
@@ -2956,43 +3222,47 @@
   test_constExpr_pushLongInt_maxNegative() {
     UnlinkedVariable variable =
         serializeVariableText('const v = 0xFFFFFFFFFFFFFFFF;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.negate
-    ], ints: [
-      1
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '0xFFFFFFFFFFFFFFFF',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.negate
+        ],
+        ints: [
+          1
+        ]);
   }
 
   test_constExpr_pushLongInt_maxPositive() {
     UnlinkedVariable variable =
         serializeVariableText('const v = 0x7FFFFFFFFFFFFFFF;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '0x7FFFFFFFFFFFFFFF',
         operators: [UnlinkedExprOperation.pushLongInt],
         ints: [2, 0x7FFFFFFF, 0xFFFFFFFF]);
   }
 
   test_constExpr_pushLongInt_min2() {
     UnlinkedVariable variable = serializeVariableText('const v = 0x100000000;');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushLongInt
-    ], ints: [
-      2,
-      1,
-      0,
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '0x100000000',
+        operators: [
+          UnlinkedExprOperation.pushLongInt
+        ],
+        ints: [
+          2,
+          1,
+          0,
+        ]);
   }
 
   test_constExpr_pushLongInt_tooLong() {
     UnlinkedVariable variable =
         serializeVariableText('const v = 0x10000000000000000;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '0x10000000000000000',
         operators: [UnlinkedExprOperation.pushInt], ints: [0]);
   }
 
   test_constExpr_pushNull() {
     UnlinkedVariable variable = serializeVariableText('const v = null;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'null',
         operators: [UnlinkedExprOperation.pushNull]);
   }
 
@@ -3001,7 +3271,7 @@
 class C {}
 const v = C;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) =>
@@ -3014,7 +3284,7 @@
 enum C {V1, V2, V3}
 const v = C;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) =>
@@ -3027,7 +3297,7 @@
 enum C {V1, V2, V3}
 const v = C.V1;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.V1', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'V1',
@@ -3046,7 +3316,7 @@
 import 'a.dart';
 const v = C.V1;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.V1', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'V1',
@@ -3063,7 +3333,7 @@
 enum C {V1, V2, V3}
 const v = C.values;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.values', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'values',
@@ -3082,7 +3352,7 @@
 import 'a.dart';
 const v = C.values;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.values', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'values',
@@ -3101,7 +3371,7 @@
 }
 const v = C.F;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.F', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'F',
@@ -3122,7 +3392,7 @@
 import 'a.dart';
 const v = C.F;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.F', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'F',
@@ -3144,7 +3414,7 @@
 import 'a.dart' as p;
 const v = p.C.F;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.C.F', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'F',
@@ -3164,7 +3434,7 @@
   static const b = null;
 }
 ''').fields[0];
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'b', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'b',
@@ -3182,7 +3452,7 @@
 }
 const v = C.x;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.x', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'x',
@@ -3203,7 +3473,7 @@
 import 'a.dart';
 const v = C.x;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.x', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'x',
@@ -3225,7 +3495,7 @@
 import 'a.dart' as p;
 const v = p.C.x;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.C.x', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'x',
@@ -3245,7 +3515,7 @@
 }
 const v = C.m;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.m', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'm',
@@ -3266,7 +3536,7 @@
 import 'a.dart';
 const v = C.m;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.m', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'm',
@@ -3288,7 +3558,7 @@
 import 'a.dart' as p;
 const v = p.C.m;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.C.m', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'm',
@@ -3308,7 +3578,7 @@
   static m() {}
 }
 ''').fields[0];
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'm', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'm',
@@ -3324,7 +3594,7 @@
 f() {}
 const v = f;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'f', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'f',
@@ -3340,7 +3610,7 @@
 import 'a.dart';
 const v = f;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'f', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'f',
@@ -3356,7 +3626,7 @@
 import 'a.dart' as p;
 const v = p.f;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.f', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'f',
@@ -3372,7 +3642,7 @@
 int get x => null;
 const v = x;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'x', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'x',
@@ -3386,7 +3656,7 @@
 import 'a.dart';
 const v = x;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'x', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'x',
@@ -3400,7 +3670,7 @@
 import 'a.dart' as p;
 const v = p.x;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.x', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'x',
@@ -3414,7 +3684,7 @@
 const int a = 1;
 const v = a;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'a', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'a',
@@ -3428,7 +3698,7 @@
 import 'a.dart';
 const v = a;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'a', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'a',
@@ -3442,7 +3712,7 @@
 import 'a.dart' as p;
 const v = p.a;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.a', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) {
@@ -3461,7 +3731,7 @@
 ''';
     UnlinkedVariable variable =
         serializeClassText(text, allowErrors: true).fields[0];
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'T', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) {
@@ -3474,7 +3744,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 const v = foo;
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'foo', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) =>
@@ -3487,7 +3757,7 @@
 class C {}
 const v = C.foo;
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'C.foo', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'foo',
@@ -3506,7 +3776,7 @@
 import 'a.dart' as p;
 const v = p.C.foo;
 ''', allowErrors: true);
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.C.foo', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'foo',
@@ -3522,59 +3792,66 @@
   test_constExpr_pushString_adjacent() {
     UnlinkedVariable variable =
         serializeVariableText('const v = "aaa" "b" "ccc";');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '"aaa" "b" "ccc"',
         operators: [UnlinkedExprOperation.pushString], strings: ['aaabccc']);
   }
 
   test_constExpr_pushString_adjacent_interpolation() {
     UnlinkedVariable variable =
         serializeVariableText(r'const v = "aaa" "bb ${42} bbb" "cccc";');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.concatenate,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.concatenate,
-    ], ints: [
-      42,
-      3,
-      3,
-    ], strings: [
-      'aaa',
-      'bb ',
-      ' bbb',
-      'cccc'
-    ]);
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, r'"aaa" "bb ${42} bbb" "cccc"',
+        operators: [
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.concatenate,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.concatenate,
+        ],
+        ints: [
+          42,
+          3,
+          3,
+        ],
+        strings: [
+          'aaa',
+          'bb ',
+          ' bbb',
+          'cccc'
+        ]);
   }
 
   test_constExpr_pushString_interpolation() {
     UnlinkedVariable variable =
         serializeVariableText(r'const v = "aaa ${42} bbb";');
-    assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.pushInt,
-      UnlinkedExprOperation.pushString,
-      UnlinkedExprOperation.concatenate
-    ], ints: [
-      42,
-      3
-    ], strings: [
-      'aaa ',
-      ' bbb'
-    ]);
+    assertUnlinkedConst(variable.initializer.bodyExpr, r'"aaa ${42} bbb"',
+        operators: [
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.concatenate
+        ],
+        ints: [
+          42,
+          3
+        ],
+        strings: [
+          'aaa ',
+          ' bbb'
+        ]);
   }
 
   test_constExpr_pushString_simple() {
     UnlinkedVariable variable = serializeVariableText('const v = "abc";');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '"abc"',
         operators: [UnlinkedExprOperation.pushString], strings: ['abc']);
   }
 
   test_constExpr_pushTrue() {
     UnlinkedVariable variable = serializeVariableText('const v = true;');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'true',
         operators: [UnlinkedExprOperation.pushTrue]);
   }
 
@@ -3668,7 +3945,7 @@
     expect(initializer.name, '');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(1));
-    assertUnlinkedConst(initializer.arguments[0], operators: [
+    assertUnlinkedConst(initializer.arguments[0], 'x >= 42', operators: [
       UnlinkedExprOperation.pushParameter,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.greaterEqual
@@ -3694,7 +3971,7 @@
     expect(initializer.name, '');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(2));
-    assertUnlinkedConst(initializer.arguments[0], operators: [
+    assertUnlinkedConst(initializer.arguments[0], 'x >= 42', operators: [
       UnlinkedExprOperation.pushParameter,
       UnlinkedExprOperation.pushInt,
       UnlinkedExprOperation.greaterEqual
@@ -3703,7 +3980,7 @@
     ], strings: [
       'x',
     ]);
-    assertUnlinkedConst(initializer.arguments[1], operators: [
+    assertUnlinkedConst(initializer.arguments[1], "'foo'", operators: [
       UnlinkedExprOperation.pushString,
     ], strings: [
       'foo'
@@ -3723,7 +4000,7 @@
         executable.constantInitializers[0];
     expect(initializer.kind, UnlinkedConstructorInitializerKind.field);
     expect(initializer.name, 'x');
-    assertUnlinkedConst(initializer.expression,
+    assertUnlinkedConst(initializer.expression, '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
     expect(initializer.arguments, isEmpty);
   }
@@ -3741,7 +4018,7 @@
         executable.constantInitializers[0];
     expect(initializer.kind, UnlinkedConstructorInitializerKind.field);
     expect(initializer.name, 'x');
-    assertUnlinkedConst(initializer.expression,
+    assertUnlinkedConst(initializer.expression, 'p',
         operators: [UnlinkedExprOperation.pushParameter], strings: ['p']);
     expect(initializer.arguments, isEmpty);
   }
@@ -3775,7 +4052,7 @@
     expect(initializer.name, 'aaa');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(1));
-    assertUnlinkedConst(initializer.arguments[0],
+    assertUnlinkedConst(initializer.arguments[0], '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
   }
 
@@ -3797,11 +4074,11 @@
     expect(initializer.name, '');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(3));
-    assertUnlinkedConst(initializer.arguments[0],
+    assertUnlinkedConst(initializer.arguments[0], '1',
         operators: [UnlinkedExprOperation.pushInt], ints: [1]);
-    assertUnlinkedConst(initializer.arguments[1],
+    assertUnlinkedConst(initializer.arguments[1], '2',
         operators: [UnlinkedExprOperation.pushInt], ints: [2]);
-    assertUnlinkedConst(initializer.arguments[2],
+    assertUnlinkedConst(initializer.arguments[2], '3',
         operators: [UnlinkedExprOperation.pushInt], ints: [3]);
     expect(initializer.argumentNames, ['b', 'c']);
   }
@@ -3824,7 +4101,7 @@
     expect(initializer.name, '');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(1));
-    assertUnlinkedConst(initializer.arguments[0],
+    assertUnlinkedConst(initializer.arguments[0], '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
   }
 
@@ -3843,9 +4120,9 @@
     expect(initializer.name, 'named');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(2));
-    assertUnlinkedConst(initializer.arguments[0],
+    assertUnlinkedConst(initializer.arguments[0], '1',
         operators: [UnlinkedExprOperation.pushInt], ints: [1]);
-    assertUnlinkedConst(initializer.arguments[1],
+    assertUnlinkedConst(initializer.arguments[1], "'bbb'",
         operators: [UnlinkedExprOperation.pushString], strings: ['bbb']);
   }
 
@@ -3864,11 +4141,11 @@
     expect(initializer.name, 'named');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(3));
-    assertUnlinkedConst(initializer.arguments[0],
+    assertUnlinkedConst(initializer.arguments[0], '1',
         operators: [UnlinkedExprOperation.pushInt], ints: [1]);
-    assertUnlinkedConst(initializer.arguments[1],
+    assertUnlinkedConst(initializer.arguments[1], '2',
         operators: [UnlinkedExprOperation.pushInt], ints: [2]);
-    assertUnlinkedConst(initializer.arguments[2],
+    assertUnlinkedConst(initializer.arguments[2], '3',
         operators: [UnlinkedExprOperation.pushInt], ints: [3]);
     expect(initializer.argumentNames, ['b', 'c']);
   }
@@ -3888,9 +4165,9 @@
     expect(initializer.name, '');
     expect(initializer.expression, isNull);
     expect(initializer.arguments, hasLength(2));
-    assertUnlinkedConst(initializer.arguments[0],
+    assertUnlinkedConst(initializer.arguments[0], '1',
         operators: [UnlinkedExprOperation.pushInt], ints: [1]);
-    assertUnlinkedConst(initializer.arguments[1],
+    assertUnlinkedConst(initializer.arguments[1], "'bbb'",
         operators: [UnlinkedExprOperation.pushString], strings: ['bbb']);
   }
 
@@ -3975,7 +4252,7 @@
     expect(param.isFunctionTyped, isTrue);
     expect(param.kind, UnlinkedParamKind.positional);
     expect(param.defaultValueCode, 'foo');
-    assertUnlinkedConst(param.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(param.initializer.bodyExpr, 'foo', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'foo',
@@ -4020,7 +4297,7 @@
     expect(parameter.initializer, isNotNull);
     expect(parameter.defaultValueCode, '42');
     _assertCodeRange(parameter.codeRange, 13, 10);
-    assertUnlinkedConst(parameter.initializer.bodyExpr,
+    assertUnlinkedConst(parameter.initializer.bodyExpr, '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
   }
 
@@ -4052,7 +4329,7 @@
     expect(parameter.initializer, isNotNull);
     expect(parameter.defaultValueCode, '42');
     _assertCodeRange(parameter.codeRange, 13, 11);
-    assertUnlinkedConst(parameter.initializer.bodyExpr,
+    assertUnlinkedConst(parameter.initializer.bodyExpr, '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
   }
 
@@ -4084,7 +4361,7 @@
     UnlinkedParam param = executable.parameters[0];
     expect(param.kind, UnlinkedParamKind.positional);
     expect(param.defaultValueCode, '42');
-    assertUnlinkedConst(param.initializer.bodyExpr,
+    assertUnlinkedConst(param.initializer.bodyExpr, '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
   }
 
@@ -5625,7 +5902,7 @@
     expect(param.kind, UnlinkedParamKind.positional);
     expect(param.initializer, isNotNull);
     expect(param.defaultValueCode, 'foo');
-    assertUnlinkedConst(param.initializer.bodyExpr, operators: [
+    assertUnlinkedConst(param.initializer.bodyExpr, 'foo', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'foo',
@@ -5658,7 +5935,7 @@
     expect(param.initializer, isNotNull);
     expect(param.defaultValueCode, '42');
     _assertCodeRange(param.codeRange, 3, 5);
-    assertUnlinkedConst(param.initializer.bodyExpr,
+    assertUnlinkedConst(param.initializer.bodyExpr, '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
   }
 
@@ -5677,7 +5954,7 @@
     expect(param.initializer, isNotNull);
     expect(param.defaultValueCode, '42');
     _assertCodeRange(param.codeRange, 3, 6);
-    assertUnlinkedConst(param.initializer.bodyExpr,
+    assertUnlinkedConst(param.initializer.bodyExpr, '42',
         operators: [UnlinkedExprOperation.pushInt], ints: [42]);
   }
 
@@ -6261,7 +6538,7 @@
 A a = new A();
 final v = (a.b.c.f[1] = 5);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(a.b.c.f[1] = 5)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6299,7 +6576,7 @@
 A a = new A();
 final v = (a.b[1].c[2].f[3] = 5);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(a.b[1].c[2].f[3] = 5)',
         isValidConst: false,
         operators: [
           // 5
@@ -6341,7 +6618,7 @@
 List<int> a = <int>[0, 1, 2];
 final v = (a[1] = 5);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(a[1] = 5)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6369,7 +6646,7 @@
 }
 final v = (new C().f = 5);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(new C().f = 5)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6397,7 +6674,7 @@
 }
 final v = (C.f = 1);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(C.f = 1)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6432,7 +6709,7 @@
 A a = new A();
 final v = (a.b.c.f = 1);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(a.b.c.f = 1)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6481,7 +6758,7 @@
 int a = 0;
 final v = (a = 1);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(a = 1)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6507,7 +6784,7 @@
 import 'a.dart';
 final v = (a = 1);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(a = 1)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6533,7 +6810,7 @@
 import 'a.dart' as p;
 final v = (p.a = 1);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '(p.a = 1)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6562,7 +6839,7 @@
 final C c = new C();
 final v = c.items..[1] = 2;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'c.items..[1] = 2',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushReference,
@@ -6589,7 +6866,8 @@
 }
 final v = new C()..f1 = 1..f2 += 2;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'new C()..f1 = 1..f2 += 2',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.invokeConstructor,
@@ -6620,6 +6898,7 @@
   ..fa2 = 3;
 ''');
     assertUnlinkedConst(variable.initializer.bodyExpr,
+        'new A()..fa1 = 1..b = (new B()..fb = 2)..fa2 = 3',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.invokeConstructor,
@@ -6645,7 +6924,7 @@
 final A a = new A();
 final v = a..m(5).abs()..m(6);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'a..m(5).abs()..m(6)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushReference,
@@ -6666,7 +6945,7 @@
 }
 final v = new C().items[5];
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'new C().items[5]',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.invokeConstructor,
@@ -6690,7 +6969,7 @@
 }
 final v = new C().f;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'new C().f',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.invokeConstructor,
@@ -6710,7 +6989,7 @@
 final v = foo(5, () => 42);
 foo(a, b) {}
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'foo(5, () => 42)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6730,7 +7009,8 @@
 final v = foo(5, () => 42, () => 43);
 foo(a, b, c) {}
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'foo(5, () => 42, () => 43)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -6750,7 +7030,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = () { return 42; };
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '() { return 42; }',
         isValidConst: false,
         operators: [UnlinkedExprOperation.pushLocalFunctionReference],
         ints: [0, 0],
@@ -6761,7 +7041,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = () => 42;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '() => 42',
         isValidConst: false,
         operators: [UnlinkedExprOperation.pushLocalFunctionReference],
         ints: [0, 0],
@@ -6772,7 +7052,8 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = ((a, b) {return 42;})(1, 2);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '((a, b) {return 42;})(1, 2)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushLocalFunctionReference,
@@ -6789,7 +7070,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = ((a, b) => 42)(1, 2);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '((a, b) => 42)(1, 2)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushLocalFunctionReference,
@@ -6804,7 +7085,7 @@
 
   test_expr_inClosure() {
     UnlinkedVariable variable = serializeVariableText('var v = () => 1;');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr, '1',
         operators: [UnlinkedExprOperation.pushInt],
         ints: [1],
         forTypeInferenceOnly: true);
@@ -6821,7 +7102,7 @@
     UnlinkedVariable variable =
         serializeVariableText('var v = (x) => (y) => x;');
     assertUnlinkedConst(
-        variable.initializer.localFunctions[0].localFunctions[0].bodyExpr,
+        variable.initializer.localFunctions[0].localFunctions[0].bodyExpr, 'x',
         operators: [UnlinkedExprOperation.pushParameter],
         strings: ['x'],
         forTypeInferenceOnly: true);
@@ -6829,7 +7110,7 @@
 
   test_expr_inClosure_refersToParam() {
     UnlinkedVariable variable = serializeVariableText('var v = (x) => x;');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr, 'x',
         operators: [UnlinkedExprOperation.pushParameter],
         strings: ['x'],
         forTypeInferenceOnly: true);
@@ -6837,7 +7118,8 @@
 
   test_expr_inClosure_refersToParam_methodCall() {
     UnlinkedVariable variable = serializeVariableText('var v = (x) => x.f();');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.localFunctions[0].bodyExpr, 'x.f()',
         operators: [
           UnlinkedExprOperation.pushParameter,
           UnlinkedExprOperation.invokeMethod
@@ -6850,7 +7132,8 @@
   test_expr_inClosure_refersToParam_methodCall_prefixed() {
     UnlinkedVariable variable =
         serializeVariableText('var v = (x) => x.y.f();');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.localFunctions[0].bodyExpr, 'x.y.f()',
         operators: [
           UnlinkedExprOperation.pushParameter,
           UnlinkedExprOperation.extractProperty,
@@ -6864,7 +7147,8 @@
   test_expr_inClosure_refersToParam_outOfScope() {
     UnlinkedVariable variable =
         serializeVariableText('var x; var v = (b) => (b ? (x) => x : x);');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.localFunctions[0].bodyExpr, '(b ? (x) => x : x)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushParameter,
@@ -6883,7 +7167,7 @@
 
   test_expr_inClosure_refersToParam_prefixedIdentifier() {
     UnlinkedVariable variable = serializeVariableText('var v = (x) => x.y;');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr, 'x.y',
         operators: [
           UnlinkedExprOperation.pushParameter,
           UnlinkedExprOperation.extractProperty
@@ -6895,7 +7179,8 @@
   test_expr_inClosure_refersToParam_prefixedIdentifier_assign() {
     UnlinkedVariable variable =
         serializeVariableText('var v = (x) => x.y = null;');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.localFunctions[0].bodyExpr, 'x.y = null',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushNull,
@@ -6909,7 +7194,8 @@
 
   test_expr_inClosure_refersToParam_prefixedPrefixedIdentifier() {
     UnlinkedVariable variable = serializeVariableText('var v = (x) => x.y.z;');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.localFunctions[0].bodyExpr, 'x.y.z',
         operators: [
           UnlinkedExprOperation.pushParameter,
           UnlinkedExprOperation.extractProperty,
@@ -6922,7 +7208,8 @@
   test_expr_inClosure_refersToParam_prefixedPrefixedIdentifier_assign() {
     UnlinkedVariable variable =
         serializeVariableText('var v = (x) => x.y.z = null;');
-    assertUnlinkedConst(variable.initializer.localFunctions[0].bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.localFunctions[0].bodyExpr, 'x.y.z = null',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushNull,
@@ -6942,7 +7229,7 @@
 }
 ''').fields[0];
     if (containsNonConstExprs) {
-      assertUnlinkedConst(variable.initializer.bodyExpr,
+      assertUnlinkedConst(variable.initializer.bodyExpr, 'T.k',
           isValidConst: false, operators: []);
     } else {
       expect(variable.initializer.bodyExpr, isNull);
@@ -6956,7 +7243,8 @@
 }
 final v = new C().m(1, b: 2, c: 3);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'new C().m(1, b: 2, c: 3)',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.invokeConstructor,
@@ -6981,7 +7269,8 @@
 }
 final v = new C().f<int, String>();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, 'new C().f<int, String>()',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.invokeConstructor,
@@ -7011,7 +7300,7 @@
 A a = new A();
 final v = a.b.c.m(10, 20);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'a.b.c.m(10, 20)',
         operators: [
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushInt,
@@ -7042,7 +7331,7 @@
 import 'a.dart' as p;
 final v = p.C.m();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'p.C.m()',
         operators: [
           UnlinkedExprOperation.invokeMethodRef,
         ],
@@ -7066,7 +7355,7 @@
 final u = null;
 final v = f(u);
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'f(u)',
         operators: [
           UnlinkedExprOperation.pushReference,
           UnlinkedExprOperation.invokeMethodRef
@@ -7086,7 +7375,7 @@
 f<T, U>() => null;
 final v = f<int, String>();
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'f<int, String>()',
         operators: [UnlinkedExprOperation.invokeMethodRef],
         ints: [0, 0, 2],
         referenceValidators: [
@@ -7102,7 +7391,7 @@
   test_expr_makeTypedList() {
     UnlinkedVariable variable =
         serializeVariableText('var v = <int>[11, 22, 33];');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '<int>[11, 22, 33]',
         operators: [UnlinkedExprOperation.makeTypedList],
         ints: [0],
         referenceValidators: [
@@ -7116,6 +7405,7 @@
     UnlinkedVariable variable = serializeVariableText(
         'var v = <int, String>{11: "aaa", 22: "bbb", 33: "ccc"};');
     assertUnlinkedConst(variable.initializer.bodyExpr,
+        '<int, String>{11: "aaa", 22: "bbb", 33: "ccc"}',
         operators: [UnlinkedExprOperation.makeTypedMap],
         ints: [0],
         referenceValidators: [
@@ -7127,9 +7417,24 @@
         forTypeInferenceOnly: true);
   }
 
+  test_expr_makeTypedSet() {
+    UnlinkedVariable variable = serializeVariableText(
+        'var v = <int>{11, 22, 33};',
+        enableSetLiterals: true);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '<int>{11, 22, 33}',
+        operators: [UnlinkedExprOperation.makeTypedSet],
+        ints: [0],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ],
+        forTypeInferenceOnly: true,
+        enableSetLiterals: true);
+  }
+
   test_expr_makeUntypedList() {
     UnlinkedVariable variable = serializeVariableText('var v = [11, 22, 33];');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[11, 22, 33]',
         operators: [
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushInt,
@@ -7143,7 +7448,8 @@
   test_expr_makeUntypedMap() {
     UnlinkedVariable variable =
         serializeVariableText('var v = {11: "aaa", 22: "bbb", 33: "ccc"};');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '{11: "aaa", 22: "bbb", 33: "ccc"}',
         operators: [
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
@@ -7158,11 +7464,26 @@
         forTypeInferenceOnly: true);
   }
 
+  test_expr_makeUntypedSet() {
+    UnlinkedVariable variable =
+        serializeVariableText('var v = {11, 22, 33};', enableSetLiterals: true);
+    assertUnlinkedConst(variable.initializer.bodyExpr, '{11, 22, 33}',
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeUntypedSet
+        ],
+        ints: [11, 22, 33, 3],
+        forTypeInferenceOnly: true,
+        enableSetLiterals: true);
+  }
+
   test_expr_super() {
     UnlinkedVariable variable = serializeVariableText('''
 final v = super;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'super',
         operators: [
           UnlinkedExprOperation.pushSuper,
         ],
@@ -7173,7 +7494,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = this;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'this',
         operators: [
           UnlinkedExprOperation.pushThis,
         ],
@@ -7184,7 +7505,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = throw 1 + 2;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, 'throw 1 + 2',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -7200,7 +7521,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = 42 as num;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '42 as num',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -7218,7 +7539,7 @@
     UnlinkedVariable variable = serializeVariableText('''
 final v = 42 is num;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '42 is num',
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -7253,7 +7574,7 @@
         serializeClassText('class C { static const int i = 0; }').fields[0];
     expect(variable.isConst, isTrue);
     expect(variable.inheritsCovariantSlot, 0);
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, '0',
         operators: [UnlinkedExprOperation.pushInt], ints: [0]);
   }
 
@@ -7278,7 +7599,7 @@
 }''').fields[0];
     expect(variable.isFinal, isTrue);
     if (containsNonConstExprs) {
-      assertUnlinkedConst(variable.initializer.bodyExpr, operators: [
+      assertUnlinkedConst(variable.initializer.bodyExpr, '1 + m()', operators: [
         UnlinkedExprOperation.pushInt,
         UnlinkedExprOperation.invokeMethodRef,
         UnlinkedExprOperation.add,
@@ -7306,7 +7627,7 @@
 }''').fields[0];
     expect(variable.isFinal, isTrue);
     if (containsNonConstExprs) {
-      assertUnlinkedConst(variable.initializer.bodyExpr,
+      assertUnlinkedConst(variable.initializer.bodyExpr, '<T>[]',
           operators: [UnlinkedExprOperation.makeTypedList],
           ints: [0],
           referenceValidators: [(EntityRef r) => checkParamTypeRef(r, 1)]);
@@ -8415,7 +8736,7 @@
     UnlinkedClass cls = serializeClassText(
         'class A { const A.named(); } @A.named() class C {}');
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'A.named()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8434,7 +8755,7 @@
     UnlinkedClass cls = serializeClassText(
         'import "foo.dart" as foo; @foo.A.named() class C {}');
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'foo.A.named()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8459,7 +8780,7 @@
         'import "foo.dart" as foo; @foo.A.named() class C {}',
         allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'foo.A.named()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8480,7 +8801,7 @@
         'import "foo.dart" as foo; @foo.A.named() class C {}',
         allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'foo.A.named()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8503,7 +8824,7 @@
     UnlinkedClass cls =
         serializeClassText('@A.named() class C {}', allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'A.named()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8521,7 +8842,7 @@
     UnlinkedClass cls = serializeClassText('class A {} @A.named() class C {}',
         allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'A.named()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8539,7 +8860,7 @@
     UnlinkedClass cls =
         serializeClassText('class A { const A(); } @A() class C {}');
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'A()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8555,7 +8876,7 @@
     UnlinkedClass cls =
         serializeClassText('import "foo.dart" as foo; @foo.A() class C {}');
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'foo.A()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8572,7 +8893,7 @@
         'import "foo.dart" as foo; @foo.A() class C {}',
         allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'foo.A()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8587,7 +8908,7 @@
     UnlinkedClass cls =
         serializeClassText('@A() class C {}', allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'A()', operators: [
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
       0,
@@ -8602,7 +8923,7 @@
     UnlinkedClass cls =
         serializeClassText('class A { const A(x); } @A(null) class C {}');
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'A(null)', operators: [
       UnlinkedExprOperation.pushNull,
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
@@ -8734,7 +9055,7 @@
 class C {}
 ''').annotations;
     expect(annotations, hasLength(1));
-    assertUnlinkedConst(annotations[0], operators: [
+    assertUnlinkedConst(annotations[0], 'A(super)', operators: [
       UnlinkedExprOperation.pushSuper,
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
@@ -8756,7 +9077,7 @@
 class C {}
 ''').annotations;
     expect(annotations, hasLength(1));
-    assertUnlinkedConst(annotations[0], operators: [
+    assertUnlinkedConst(annotations[0], 'A(this)', operators: [
       UnlinkedExprOperation.pushThis,
       UnlinkedExprOperation.invokeConstructor,
     ], ints: [
@@ -8803,13 +9124,13 @@
         serializeClassText('const a = null, b = null; @a @b class C {}');
     List<UnlinkedExpr> annotations = cls.annotations;
     expect(annotations, hasLength(2));
-    assertUnlinkedConst(annotations[0], operators: [
+    assertUnlinkedConst(annotations[0], 'a', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'a',
           expectedKind: ReferenceKind.topLevelPropertyAccessor)
     ]);
-    assertUnlinkedConst(annotations[1], operators: [
+    assertUnlinkedConst(annotations[1], 'b', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'b',
@@ -8828,7 +9149,7 @@
     UnlinkedClass cls =
         serializeClassText('import "a.dart" as a; @a.b class C {}');
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'a.b', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, absUri('/a.dart'), 'b',
@@ -8843,7 +9164,7 @@
         'import "a.dart" as a; @a.b class C {}',
         allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'a.b', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) => checkTypeRef(r, null, 'b',
@@ -8898,7 +9219,7 @@
   test_metadata_variable_unresolved() {
     UnlinkedClass cls = serializeClassText('@a class C {}', allowErrors: true);
     expect(cls.annotations, hasLength(1));
-    assertUnlinkedConst(cls.annotations[0], operators: [
+    assertUnlinkedConst(cls.annotations[0], 'a', operators: [
       UnlinkedExprOperation.pushReference
     ], referenceValidators: [
       (EntityRef r) =>
@@ -9640,6 +9961,16 @@
     checkDynamicTypeRef(serializeTypeText('dynamic'));
   }
 
+  test_type_inference_based_on_type_parameter() {
+    var class_ = serializeClassText('''
+class C<T> {
+  var field = T;
+}
+''');
+    var field = class_.fields[0];
+    checkLinkedTypeSlot(field.inferredTypeSlot, 'dart:core', 'Type');
+  }
+
   test_type_invalid_typeParameter_asPrefix() {
     UnlinkedClass c = serializeClassText('''
 class C<T> {
@@ -10387,7 +10718,7 @@
 int a = 0;
 final v = $expr;
     ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, expr,
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.pushInt,
@@ -10437,7 +10768,7 @@
 int a = 0;
 final v = $expr;
 ''');
-    assertUnlinkedConst(variable.initializer.bodyExpr,
+    assertUnlinkedConst(variable.initializer.bodyExpr, expr,
         isValidConst: false,
         operators: [
           UnlinkedExprOperation.assignToRef,
diff --git a/pkg/analyzer/test/src/summary/test_strategies.dart b/pkg/analyzer/test/src/summary/test_strategies.dart
index 03c020d..5cab182 100644
--- a/pkg/analyzer/test/src/summary/test_strategies.dart
+++ b/pkg/analyzer/test/src/summary/test_strategies.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -23,10 +24,10 @@
 import 'package:analyzer/src/summary/summarize_elements.dart';
 import 'package:analyzer/src/task/api/dart.dart';
 import 'package:analyzer/src/task/api/general.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:path/path.dart' show posix;
 import 'package:test/test.dart';
 
-import '../context/mock_sdk.dart';
 import 'resynthesize_common.dart';
 
 /// Convert the given Posix style file [path] to the corresponding absolute URI.
@@ -35,13 +36,15 @@
   return posix.toUri(absolutePath).toString();
 }
 
-CompilationUnit _parseText(String text) {
+CompilationUnit _parseText(String text,
+    {bool enableSetLiterals: IsEnabledByDefault.set_literals}) {
   CharSequenceReader reader = new CharSequenceReader(text);
   Scanner scanner =
       new Scanner(null, reader, AnalysisErrorListener.NULL_LISTENER);
   Token token = scanner.tokenize();
-  Parser parser = new Parser(
-      NonExistingSource.unknown, AnalysisErrorListener.NULL_LISTENER);
+  Parser parser =
+      new Parser(NonExistingSource.unknown, AnalysisErrorListener.NULL_LISTENER)
+        ..enableSetLiterals = enableSetLiterals;
   CompilationUnit unit = parser.parseCompilationUnit(token);
   unit.lineInfo = new LineInfo(scanner.lineStarts);
   return unit;
@@ -257,7 +260,9 @@
     try {
       Map<String, UnlinkedUnit> uriToUnlinkedUnit = <String, UnlinkedUnit>{};
       Map<String, LinkedLibrary> uriToLinkedLibrary = <String, LinkedLibrary>{};
-      PackageBundle bundle = new MockSdk().getLinkedBundle();
+      var resourceProvider = new MemoryResourceProvider();
+      PackageBundle bundle =
+          new MockSdk(resourceProvider: resourceProvider).getLinkedBundle();
       for (int i = 0; i < bundle.unlinkedUnitUris.length; i++) {
         String uri = bundle.unlinkedUnitUris[i];
         uriToUnlinkedUnit[uri] = bundle.unlinkedUnits[i];
@@ -327,7 +332,9 @@
 
   /// Serialize the given library [text], then deserialize it and store its
   /// summary in [lib].
-  void serializeLibraryText(String text, {bool allowErrors: false});
+  void serializeLibraryText(String text,
+      {bool allowErrors: false,
+      bool enableSetLiterals: IsEnabledByDefault.set_literals});
 }
 
 /// Implementation of [SummaryBlackBoxTestStrategy] that drives summary
@@ -339,8 +346,11 @@
   bool get skipFullyLinkedData => true;
 
   @override
-  void serializeLibraryText(String text, {bool allowErrors: false}) {
-    super.serializeLibraryText(text, allowErrors: allowErrors);
+  void serializeLibraryText(String text,
+      {bool allowErrors: false,
+      bool enableSetLiterals: IsEnabledByDefault.set_literals}) {
+    super.serializeLibraryText(text,
+        allowErrors: allowErrors, enableSetLiterals: enableSetLiterals);
 
     UnlinkedUnit getPart(String absoluteUri) {
       return _linkerInputs.getUnit(absoluteUri);
@@ -531,15 +541,20 @@
     return assembler.assemble();
   }
 
-  UnlinkedUnitBuilder createUnlinkedSummary(Uri uri, String text) =>
-      serializeAstUnlinked(_parseText(text));
+  UnlinkedUnitBuilder createUnlinkedSummary(Uri uri, String text,
+          {bool enableSetLiterals: IsEnabledByDefault.set_literals}) =>
+      serializeAstUnlinked(
+          _parseText(text, enableSetLiterals: enableSetLiterals));
 
   _LinkerInputs _createLinkerInputs(String text,
-      {String path: '/test.dart', String uri}) {
+      {String path: '/test.dart',
+      String uri,
+      bool enableSetLiterals: IsEnabledByDefault.set_literals}) {
     uri ??= absUri(path);
     Uri testDartUri = Uri.parse(uri);
-    UnlinkedUnitBuilder unlinkedDefiningUnit =
-        createUnlinkedSummary(testDartUri, text);
+    UnlinkedUnitBuilder unlinkedDefiningUnit = createUnlinkedSummary(
+        testDartUri, text,
+        enableSetLiterals: enableSetLiterals);
     _filesToLink.uriToUnit[testDartUri.toString()] = unlinkedDefiningUnit;
     _LinkerInputs linkerInputs = new _LinkerInputs(
         _allowMissingFiles,
@@ -580,9 +595,12 @@
   bool get containsNonConstExprs => true;
 
   @override
-  void serializeLibraryText(String text, {bool allowErrors: false}) {
+  void serializeLibraryText(String text,
+      {bool allowErrors: false,
+      bool enableSetLiterals: IsEnabledByDefault.set_literals}) {
     Map<String, UnlinkedUnitBuilder> uriToUnit = this._filesToLink.uriToUnit;
-    _linkerInputs = _createLinkerInputs(text);
+    _linkerInputs =
+        _createLinkerInputs(text, enableSetLiterals: enableSetLiterals);
     linked = link(
         _linkerInputs.linkedLibraries,
         _linkerInputs.getDependency,
diff --git a/pkg/analyzer/test/src/summary/top_level_inference_test.dart b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
index bf6a1bc..9151786 100644
--- a/pkg/analyzer/test/src/summary/top_level_inference_test.dart
+++ b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
@@ -1,11 +1,11 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../dart/analysis/base.dart';
@@ -354,7 +354,7 @@
     await checkFile(content);
   }
 
-  Future<Null> _assertErrorOnlyLeft(List<String> operators) async {
+  Future<void> _assertErrorOnlyLeft(List<String> operators) async {
     String code = 'var a = 1;\n';
     for (var i = 0; i < operators.length; i++) {
       String operator = operators[i];
@@ -366,10 +366,6 @@
 
 @reflectiveTest
 class TopLevelInferenceTest extends BaseAnalysisDriverTest {
-  void addFile(String path, String code) {
-    provider.newFile(_p(path), code);
-  }
-
   test_initializer_additive() async {
     var library = await _encodeDecodeLibrary(r'''
 var vPlusIntInt = 1 + 2;
@@ -682,11 +678,11 @@
   }
 
   test_initializer_extractProperty_inOtherLibraryCycle() async {
-    addFile('/a.dart', r'''
+    newFile('/a.dart', content: r'''
 import 'b.dart';
 var x = new C().f;
 ''');
-    addFile('/b.dart', r'''
+    newFile('/b.dart', content: r'''
 class C {
   var f = 0;
 }
@@ -2532,8 +2528,7 @@
   }
 
   test_method_OK_single_private_linkThroughOtherLibraryOfCycle() async {
-    String path = _p('/other.dart');
-    provider.newFile(path, r'''
+    newFile('/other.dart', content: r'''
 import 'test.dart';
 class B extends A2 {}
 ''');
@@ -2628,11 +2623,9 @@
   }
 
   Future<LibraryElement> _encodeDecodeLibrary(String text) async {
-    String path = _p('/test.dart');
-    provider.newFile(path, text);
+    String path = convertPath('/test.dart');
+    newFile(path, content: text);
     UnitElementResult result = await driver.getUnitElement(path);
     return result.element.library;
   }
-
-  String _p(String path) => provider.convertPath(path);
 }
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index a2a0da0..22b79c4 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -3158,9 +3158,7 @@
 
   void _performParseTask(String content) {
     if (content == null) {
-      source = resourceProvider
-          .getFile(resourceProvider.convertPath('/test.dart'))
-          .createSource();
+      source = getFile('/test.dart').createSource();
     } else {
       source = newSource('/test.dart', content);
     }
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index befc23b..645c950 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -1,14 +1,17 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:mirrors';
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/source/error_processor.dart';
 import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
+import 'package:analyzer/src/analysis_options/error/option_codes.dart';
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -193,6 +196,7 @@
         removeCode(StrongModeCode.INVALID_CAST_LITERAL);
         removeCode(StrongModeCode.INVALID_CAST_LITERAL_LIST);
         removeCode(StrongModeCode.INVALID_CAST_LITERAL_MAP);
+        removeCode(StrongModeCode.INVALID_CAST_LITERAL_SET);
         removeCode(StrongModeCode.INVALID_CAST_FUNCTION_EXPR);
         removeCode(StrongModeCode.INVALID_CAST_NEW_EXPR);
         removeCode(StrongModeCode.INVALID_CAST_METHOD);
@@ -486,6 +490,22 @@
       new OptionsFileValidator(new TestSource());
   final AnalysisOptionsProvider optionsProvider = new AnalysisOptionsProvider();
 
+  test_analyzer_enableExperiment_badValue() {
+    validate('''
+analyzer:
+  enable-experiment:
+    - not-an-experiment
+    ''', [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITHOUT_VALUES]);
+  }
+
+  test_analyzer_enableExperiment_notAList() {
+    validate('''
+analyzer:
+  enable-experiment:
+    experiment: true
+    ''', [AnalysisOptionsWarningCode.INVALID_SECTION_FORMAT]);
+  }
+
   test_analyzer_error_code_supported() {
     validate('''
 analyzer:
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 5e74843..981b10e 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -523,20 +523,18 @@
   }
 
   test_covariantOverride() async {
-    _addMetaLibrary();
     await checkFile(r'''
-import 'meta.dart';
 class C {
   num f(num x) => x;
 }
 class D extends C {
-  int f(@checked int x) => x;
+  int f(covariant int x) => x;
 }
 class E extends D {
   int f(Object x) => /*info:DOWN_CAST_IMPLICIT*/x;
 }
 class F extends E {
-  int f(@checked int x) => x;
+  int f(covariant int x) => x;
 }
 class G extends E implements D {}
 
@@ -544,32 +542,30 @@
   /*error:INVALID_OVERRIDE*/int f(int x) => x;
 }
 class E_error extends D {
-  /*error:INVALID_OVERRIDE*/int f(@checked double x) => 0;
+  /*error:INVALID_OVERRIDE*/int f(covariant double x) => 0;
 }
 class F_error extends E {
-  /*error:INVALID_OVERRIDE*/int f(@checked double x) => 0;
+  /*error:INVALID_OVERRIDE*/int f(covariant double x) => 0;
 }
 class G_error extends E implements D {
-  /*error:INVALID_OVERRIDE*/int f(@checked double x) => 0;
+  /*error:INVALID_OVERRIDE*/int f(covariant double x) => 0;
 }
     ''');
   }
 
   @failingTest
   test_covariantOverride_fields() async {
-    _addMetaLibrary();
     await checkFile(r'''
-import 'meta.dart';
 class A {
   get foo => '';
   set foo(_) {}
 }
 
 class B extends A {
-  @checked num foo;
+  covariant num foo;
 }
 class C extends A {
-  @checked @virtual num foo;
+  covariant @virtual num foo;
 }
 class D extends C {
   @virtual int foo;
@@ -581,9 +577,7 @@
   }
 
   test_covariantOverride_leastUpperBound() async {
-    _addMetaLibrary();
     await checkFile(r'''
-import "meta.dart";
 abstract class Top {}
 abstract class Left implements Top {}
 abstract class Right implements Top {}
@@ -600,17 +594,15 @@
 }
 abstract class TakesBottom implements TakesLeft, TakesRight {
   // LUB(Left, Right) == Top, so this is an implicit cast from Top to Bottom.
-  m(@checked Bottom x);
+  m(covariant Bottom x);
 }
     ''');
   }
 
   test_covariantOverride_markerIsInherited() async {
-    _addMetaLibrary();
     await checkFile(r'''
-import 'meta.dart';
 class C {
-  num f(@checked num x) => x;
+  num f(covariant num x) => x;
 }
 class D extends C {
   int f(int x) => x;
@@ -2134,73 +2126,49 @@
     addFile(
         'num n; int i; void main() { i = /*info:DOWN_CAST_IMPLICIT*/n;}//yy');
     await check();
+
     addFile(
         'num n; int i; void main() { i = /*error:INVALID_ASSIGNMENT*/n;}//ny');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile(
-        'num n; int i; void main() { i = /*info:DOWN_CAST_IMPLICIT*/n;}//yn');
-    await check(implicitCasts: true, declarationCasts: false);
-    addFile(
-        'num n; int i; void main() { i = /*error:INVALID_ASSIGNMENT*/n;}//nn');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_compoundAssignment() async {
     addFile('''f(num n, int i) {
                /*info:DOWN_CAST_IMPLICIT_ASSIGN*/i += n;}//yy''');
     await check();
+
     addFile('''f(num n, int i) {
                i += /*error:INVALID_ASSIGNMENT*/n;}//ny''');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile('''f(num n, int i) {
-               /*info:DOWN_CAST_IMPLICIT_ASSIGN*/i += n;}//yn''');
-    await check(implicitCasts: true, declarationCasts: false);
-    addFile('''f(num n, int i) {
-               i += /*error:INVALID_ASSIGNMENT*/n;}//nn''');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_constructorInitializer() async {
     addFile(
         'class A { int i; A(num n) : i = /*info:DOWN_CAST_IMPLICIT*/n;}//yy');
     await check();
+
     addFile(
         'class A { int i; A(num n) : i = /*error:FIELD_INITIALIZER_NOT_ASSIGNABLE*/n;}//ny');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile(
-        'class A { int i; A(num n) : i = /*info:DOWN_CAST_IMPLICIT*/n;}//yn');
-    await check(implicitCasts: true, declarationCasts: false);
-    addFile(
-        'class A { int i; A(num n) : i = /*error:FIELD_INITIALIZER_NOT_ASSIGNABLE*/n;}//nn');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_defaultValue() async {
     addFile('''const num n = 0;
                f({int i = /*info:DOWN_CAST_IMPLICIT*/n}) => i;//yy''');
     await check();
+
     addFile('''const num n = 0;
                f({int i = /*error:INVALID_ASSIGNMENT*/n}) => i;//ny''');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile('''const num n = 0;
-               f({int i = /*info:DOWN_CAST_IMPLICIT*/n}) => i;//yn''');
-    await check(implicitCasts: true, declarationCasts: false);
-    addFile('''const num n = 0;
-               f({int i = /*error:INVALID_ASSIGNMENT*/n}) => i;//nn''');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_fieldInitializer() async {
     addFile('class A { static num n; int i = /*info:ASSIGNMENT_CAST*/n;}//yy');
     await check();
-    addFile('class A { static num n; int i = /*info:ASSIGNMENT_CAST*/n;}//ny');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile(
-        'class A { static num n; int i = /*error:INVALID_ASSIGNMENT*/n;}//yn');
-    await check(implicitCasts: true, declarationCasts: false);
+
     addFile(
         'class A { static num n; int i = /*error:INVALID_ASSIGNMENT*/n;}//nn');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_functionCall() async {
@@ -2208,18 +2176,11 @@
                f(int i) => i;
                var i = f(/*info:DOWN_CAST_IMPLICIT*/n);//yy''');
     await check();
-    addFile('''num n;
-               f(int i) => i;
-               var i = f(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/n);//ny''');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile('''num n;
-               f(int i) => i;
-               var i = f(/*info:DOWN_CAST_IMPLICIT*/n);//yn''');
-    await check(implicitCasts: true, declarationCasts: false);
+
     addFile('''num n;
              f(int i) => i;
              var i = f(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/n);//nn''');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_genericMethods() async {
@@ -2232,12 +2193,9 @@
   test_implicitCasts_initializer() async {
     addFile('num n; int i = /*info:ASSIGNMENT_CAST*/n;//yy');
     await check();
-    addFile('num n; int i = /*info:ASSIGNMENT_CAST*/n;//ny');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile('num n; int i = /*error:INVALID_ASSIGNMENT*/n;//yn');
-    await check(implicitCasts: true, declarationCasts: false);
+
     addFile('num n; int i = /*error:INVALID_ASSIGNMENT*/n;//nn');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_numericOps() async {
@@ -2257,29 +2215,19 @@
              int i;
              var r = i & /*info:DOWN_CAST_IMPLICIT*/n;//yy''');
     await check();
-    addFile('''num n;
-             int i;
-             var r = i & /*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/n;//ny''');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile('''num n;
-             int i;
-             var r = i & /*info:DOWN_CAST_IMPLICIT*/n;//yn''');
-    await check(implicitCasts: true, declarationCasts: false);
+
     addFile('''num n;
              int i;
              var r = i & /*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/n;//nn''');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_return() async {
     addFile('int f(num n) => /*info:DOWN_CAST_IMPLICIT*/n;//yy');
     await check();
-    addFile('int f(num n) => /*error:RETURN_OF_INVALID_TYPE*/n;//ny');
-    await check(implicitCasts: false, declarationCasts: true);
-    addFile('int f(num n) => /*info:DOWN_CAST_IMPLICIT*/n;//yn');
-    await check(implicitCasts: true, declarationCasts: false);
+
     addFile('int f(num n) => /*error:RETURN_OF_INVALID_TYPE*/n;//nn');
-    await check(implicitCasts: false, declarationCasts: false);
+    await check(implicitCasts: false);
   }
 
   test_implicitCasts_return_async() async {
@@ -3445,11 +3393,9 @@
 
   test_overrideNarrowsType_legalWithChecked() async {
     // Regression test for https://github.com/dart-lang/sdk/issues/25232
-    _addMetaLibrary();
     await checkFile(r'''
-import 'meta.dart';
 abstract class A { void test(A arg) { } }
-abstract class B extends A { void test(@checked B arg) { } }
+abstract class B extends A { void test(covariant B arg) { } }
 abstract class X implements A { }
 class C extends B with X { }
 class D extends B implements A { }
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index ccef7a7..2991634 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -20,7 +20,7 @@
   });
 }
 
-abstract class InferredTypeMixin {
+mixin InferredTypeMixin {
   /// Extra top-level errors if needed due to being analyze multiple times.
   bool get hasExtraTaskModelPass => true;
 
@@ -39,9 +39,7 @@
    * unit.
    */
   Future<CompilationUnit> checkFile(String content,
-      {bool declarationCasts: true,
-      bool implicitCasts: true,
-      bool implicitDynamic: true});
+      {bool implicitCasts: true, bool implicitDynamic: true});
 
   /**
    * Add the file, process it (resolve, validate, etc) and return the resolved
@@ -1506,7 +1504,7 @@
 Iterable<Map<int, int>> bar() sync* {
   yield /*info:INFERRED_TYPE_LITERAL*/{};
   yield /*error:YIELD_OF_INVALID_TYPE*/new List();
-  yield* /*error:YIELD_OF_INVALID_TYPE*/{};
+  yield* {};
   yield* /*info:INFERRED_TYPE_ALLOCATION*/new List();
 }
 ''');
@@ -4484,22 +4482,8 @@
 
   @failingTest
   @override
-  test_unsafeBlockClosureInference_functionCall_explicitDynamicParam_viaExpr2() async {
-    await super
-        .test_unsafeBlockClosureInference_functionCall_explicitDynamicParam_viaExpr2();
-  }
-
-  @failingTest
-  @override
   test_unsafeBlockClosureInference_functionCall_explicitTypeParam_viaExpr1() {
     return super
         .test_unsafeBlockClosureInference_functionCall_explicitTypeParam_viaExpr1();
   }
-
-  @failingTest
-  @override
-  test_unsafeBlockClosureInference_functionCall_explicitTypeParam_viaExpr2() async {
-    await super
-        .test_unsafeBlockClosureInference_functionCall_explicitTypeParam_viaExpr2();
-  }
 }
diff --git a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
index d9e4081..c9c3fcf 100644
--- a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
+++ b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
@@ -25,11 +25,11 @@
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:source_span/source_span.dart';
 import 'package:test/test.dart';
 
-import '../../context/mock_sdk.dart';
-
 SourceSpanWithContext _createSpanHelper(
     LineInfo lineInfo, int start, Source source, String content,
     {int end}) {
@@ -237,8 +237,7 @@
   fail('Checker errors do not match expected errors:\n\n$message');
 }
 
-class AbstractStrongTest {
-  MemoryResourceProvider _resourceProvider = new MemoryResourceProvider();
+class AbstractStrongTest with ResourceProviderMixin {
   bool _checkCalled = false;
 
   AnalysisContext _context = null;
@@ -266,7 +265,7 @@
   /// For a single file, you may also use [checkFile].
   void addFile(String content, {String name: '/main.dart'}) {
     name = name.replaceFirst('^package:', '/packages/');
-    _resourceProvider.newFile(_resourceProvider.convertPath(name), content);
+    newFile(name, content: content);
   }
 
   /// Run the checker on a program, staring from '/main.dart', and verifies that
@@ -277,27 +276,23 @@
   ///
   /// Returns the main resolved library. This can be used for further checks.
   Future<CompilationUnit> check(
-      {bool declarationCasts: true,
-      bool implicitCasts: true,
-      bool implicitDynamic: true}) async {
+      {bool implicitCasts: true, bool implicitDynamic: true}) async {
     _checkCalled = true;
 
-    File mainFile =
-        _resourceProvider.getFile(_resourceProvider.convertPath('/main.dart'));
+    File mainFile = getFile('/main.dart');
     expect(mainFile.exists, true, reason: '`/main.dart` is missing');
 
     AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl();
     analysisOptions.strongModeHints = true;
-    analysisOptions.declarationCasts = declarationCasts;
     analysisOptions.implicitCasts = implicitCasts;
     analysisOptions.implicitDynamic = implicitDynamic;
 
-    var mockSdk = new MockSdk(resourceProvider: _resourceProvider);
+    var mockSdk = new MockSdk(resourceProvider: resourceProvider);
     mockSdk.context.analysisOptions = analysisOptions;
 
     SourceFactory sourceFactory;
     {
-      var uriResolver = new _TestUriResolver(_resourceProvider);
+      var uriResolver = new _TestUriResolver(resourceProvider);
       sourceFactory =
           new SourceFactory([new DartUriResolver(mockSdk), uriResolver]);
     }
@@ -311,7 +306,7 @@
       _driver = new AnalysisDriver(
           scheduler,
           log,
-          _resourceProvider,
+          resourceProvider,
           new MemoryByteStore(),
           fileContentOverlay,
           null,
@@ -367,14 +362,12 @@
   ///
   /// Also returns the resolved compilation unit.
   Future<CompilationUnit> checkFile(String content,
-      {bool declarationCasts: true,
-      bool implicitCasts: true,
-      bool implicitDynamic: true}) async {
+      {bool implicitCasts: true, bool implicitDynamic: true}) async {
     addFile(content);
     return await check(
-        declarationCasts: declarationCasts,
-        implicitCasts: implicitCasts,
-        implicitDynamic: implicitDynamic);
+      implicitCasts: implicitCasts,
+      implicitDynamic: implicitDynamic,
+    );
   }
 
   void setUp() {
diff --git a/pkg/analyzer/test/src/task/yaml_test.dart b/pkg/analyzer/test/src/task/yaml_test.dart
index d952887..4342087 100644
--- a/pkg/analyzer/test/src/task/yaml_test.dart
+++ b/pkg/analyzer/test/src/task/yaml_test.dart
@@ -58,9 +58,9 @@
   }
 
   void _performParseTask(String content) {
-    var path = resourceProvider.convertPath('/test.yaml');
+    var path = '/test.yaml';
     if (content == null) {
-      source = resourceProvider.getFile(path).createSource();
+      source = getFile(path).createSource();
     } else {
       source = newSource(path, content);
     }
diff --git a/pkg/analyzer/test/src/test_all.dart b/pkg/analyzer/test/src/test_all.dart
index 369c7b9..011e198 100644
--- a/pkg/analyzer/test/src/test_all.dart
+++ b/pkg/analyzer/test/src/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,8 +7,10 @@
 import 'command_line/test_all.dart' as command_line;
 import 'context/test_all.dart' as context;
 import 'dart/test_all.dart' as dart;
+import 'diagnostics/test_all.dart' as diagnostics;
 import 'fasta/test_all.dart' as fasta;
 import 'lint/test_all.dart' as lint;
+import 'options/test_all.dart' as options;
 import 'pubspec/test_all.dart' as pubspec;
 import 'source/test_all.dart' as source;
 import 'summary/test_all.dart' as summary;
@@ -21,8 +23,10 @@
     command_line.main();
     context.main();
     dart.main();
+    diagnostics.main();
     fasta.main();
     lint.main();
+    options.main();
     pubspec.main();
     source.main();
     summary.main();
diff --git a/pkg/analyzer/test/src/workspace/basic_test.dart b/pkg/analyzer/test/src/workspace/basic_test.dart
new file mode 100644
index 0000000..1abdbc9
--- /dev/null
+++ b/pkg/analyzer/test/src/workspace/basic_test.dart
@@ -0,0 +1,90 @@
+// 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/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer/src/workspace/basic.dart';
+import 'package:package_config/packages.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+class MockContextBuilder implements ContextBuilder {
+  Map<String, Packages> packagesMapMap = <String, Packages>{};
+  Map<Packages, Map<String, List<Folder>>> packagesToMapMap =
+      <Packages, Map<String, List<Folder>>>{};
+
+  Map<String, List<Folder>> convertPackagesToMap(Packages packages) =>
+      packagesToMapMap[packages];
+
+  Packages createPackageMap(String rootDirectoryPath) =>
+      packagesMapMap[rootDirectoryPath];
+
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+class MockPackages implements Packages {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+main() {
+  defineReflectiveSuite(() {
+    // TODO(srawlins): Write a BasicWorkspaceTest akin to
+    // PackageBuildWorkspaceTest.
+    defineReflectiveTests(BasicWorkspacePackageTest);
+  });
+}
+
+@reflectiveTest
+class BasicWorkspacePackageTest with ResourceProviderMixin {
+  BasicWorkspace workspace;
+
+  setUp() {
+    final contextBuilder = new MockContextBuilder();
+    final packages = new MockPackages();
+    final packageMap = <String, List<Folder>>{'project': []};
+    contextBuilder.packagesMapMap[convertPath('/workspace')] = packages;
+    contextBuilder.packagesToMapMap[packages] = packageMap;
+
+    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    workspace = BasicWorkspace.find(
+        resourceProvider, convertPath('/workspace'), contextBuilder);
+  }
+
+  void test_findPackageFor_unrelatedFile() {
+    newFile('/workspace/project/lib/file.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace2/project/lib/file.dart'));
+    expect(package, isNull);
+  }
+
+  void test_findPackageFor_includedFile() {
+    newFile('/workspace/project/lib/file.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace/project/lib/file.dart'));
+    expect(package, isNotNull);
+    expect(package.root, convertPath('/workspace'));
+    expect(package.workspace, equals(workspace));
+  }
+
+  void test_contains_differentWorkspace() {
+    newFile('/workspace2/project/lib/file.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
+    expect(package.contains('/workspace2/project/lib/file.dart'), isFalse);
+  }
+
+  void test_contains_sameWorkspace() {
+    newFile('/workspace/project/lib/file2.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
+    expect(package.contains('/workspace/project/lib/file2.dart'), isTrue);
+    expect(package.contains('/workspace/project/bin/bin.dart'), isTrue);
+    expect(package.contains('/workspace/project/test/test.dart'), isTrue);
+  }
+}
diff --git a/pkg/analyzer/test/generated/bazel_test.dart b/pkg/analyzer/test/src/workspace/bazel_test.dart
similarity index 88%
rename from pkg/analyzer/test/generated/bazel_test.dart
rename to pkg/analyzer/test/src/workspace/bazel_test.dart
index e339b74..799eff6 100644
--- a/pkg/analyzer/test/generated/bazel_test.dart
+++ b/pkg/analyzer/test/src/workspace/bazel_test.dart
@@ -1,10 +1,10 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/generated/bazel.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer/src/workspace/bazel.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -13,11 +13,12 @@
     defineReflectiveTests(BazelFileUriResolverTest);
     defineReflectiveTests(BazelPackageUriResolverTest);
     defineReflectiveTests(BazelWorkspaceTest);
+    defineReflectiveTests(BazelWorkspacePackageTest);
   });
 }
 
 @reflectiveTest
-class BazelFileUriResolverTest extends Object with ResourceProviderMixin {
+class BazelFileUriResolverTest with ResourceProviderMixin {
   BazelWorkspace workspace;
   BazelFileUriResolver resolver;
 
@@ -97,7 +98,7 @@
 }
 
 @reflectiveTest
-class BazelPackageUriResolverTest extends Object with ResourceProviderMixin {
+class BazelPackageUriResolverTest with ResourceProviderMixin {
   BazelWorkspace workspace;
   BazelPackageUriResolver resolver;
 
@@ -482,12 +483,12 @@
 }
 
 @reflectiveTest
-class BazelWorkspaceTest extends Object with ResourceProviderMixin {
+class BazelWorkspaceTest with ResourceProviderMixin {
   void test_find_fail_notAbsolute() {
     expect(
         () =>
             BazelWorkspace.find(resourceProvider, convertPath('not_absolute')),
-        throwsArgumentError);
+        throwsA(const TypeMatcher<ArgumentError>()));
   }
 
   void test_find_hasReadonlyFolder() {
@@ -670,6 +671,81 @@
   }
 }
 
+@reflectiveTest
+class BazelWorkspacePackageTest with ResourceProviderMixin {
+  BazelWorkspace workspace;
+
+  void setUp() {
+    newFile('/ws/WORKSPACE');
+    newFolder('/ws/bazel-genfiles');
+    workspace =
+        BazelWorkspace.find(resourceProvider, convertPath('/ws/some/code'));
+  }
+
+  void test_findPackageFor_missingBuildFile() {
+    final targetFile = newFile('/ws/some/code/lib/code.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    expect(package, isNull);
+  }
+
+  void test_findPackageFor_buildFileExists() {
+    newFile('/ws/some/code/BUILD');
+    final targetFile = newFile('/ws/some/code/lib/code.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    expect(package, isNotNull);
+    expect(package.root, convertPath('/ws/some/code'));
+    expect(package.workspace, equals(workspace));
+  }
+
+  void test_contains_differentWorkspace() {
+    newFile('/ws/some/code/BUILD');
+    final targetFile = newFile('/ws/some/code/lib/code.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    expect(package.contains('/ws2/some/file.dart'), isFalse);
+  }
+
+  void test_contains_differentPackageInWorkspace() {
+    newFile('/ws/some/code/BUILD');
+    final targetFile = newFile('/ws/some/code/lib/code.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    // A file that is _not_ in this package is not required to have a BUILD.gn
+    // file above it, for simplicity and reduced I/O.
+    expect(package.contains('/ws/some/other/code/file.dart'), isFalse);
+  }
+
+  void test_contains_samePackage() {
+    newFile('/ws/some/code/BUILD');
+    final targetFile = newFile('/ws/some/code/lib/code.dart');
+    final targetFile2 = newFile('/ws/some/code/lib/code2.dart');
+    final targetFile3 = newFile('/ws/some/code/lib/src/code3.dart');
+    final targetBinFile = newFile('/ws/some/code/bin/code.dart');
+    final targetTestFile = newFile('/ws/some/code/test/code_test.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    expect(package.contains(targetFile2.path), isTrue);
+    expect(package.contains(targetFile3.path), isTrue);
+    expect(package.contains(targetBinFile.path), isTrue);
+    expect(package.contains(targetTestFile.path), isTrue);
+  }
+
+  void test_contains_subPackage() {
+    newFile('/ws/some/code/BUILD');
+    newFile('/ws/some/code/lib/code.dart');
+    newFile('/ws/some/code/testing/BUILD');
+    newFile('/ws/some/code/testing/lib/testing.dart');
+
+    var package =
+        workspace.findPackageFor(convertPath('/ws/some/code/lib/code.dart'));
+    expect(
+        package.contains(convertPath('/ws/some/code/testing/lib/testing.dart')),
+        isFalse);
+  }
+}
+
 class _MockSource implements Source {
   @override
   final String fullName;
diff --git a/pkg/analyzer/test/generated/gn_test.dart b/pkg/analyzer/test/src/workspace/gn_test.dart
similarity index 68%
rename from pkg/analyzer/test/generated/gn_test.dart
rename to pkg/analyzer/test/src/workspace/gn_test.dart
index 46ff4ea..bc75f28 100644
--- a/pkg/analyzer/test/generated/gn_test.dart
+++ b/pkg/analyzer/test/src/workspace/gn_test.dart
@@ -1,20 +1,21 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/generated/gn.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer/src/workspace/gn.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(GnWorkspaceTest);
+    defineReflectiveTests(GnWorkspacePackageTest);
   });
 }
 
 @reflectiveTest
-class GnWorkspaceTest extends Object with ResourceProviderMixin {
+class GnWorkspaceTest with ResourceProviderMixin {
   void test_find_noJiriRoot() {
     newFolder('/workspace');
     GnWorkspace workspace =
@@ -33,7 +34,7 @@
   void test_find_notAbsolute() {
     expect(
         () => GnWorkspace.find(resourceProvider, convertPath('not_absolute')),
-        throwsArgumentError);
+        throwsA(const TypeMatcher<ArgumentError>()));
   }
 
   void test_find_withRoot() {
@@ -172,3 +173,85 @@
     expect(workspace.packageMap['rettulf'][0].path, packageTwoLocation);
   }
 }
+
+@reflectiveTest
+class GnWorkspacePackageTest with ResourceProviderMixin {
+  GnWorkspace _buildStandardGnWorkspace() {
+    newFolder('/ws/.jiri_root');
+    String buildDir = convertPath('out/debug-x87_128');
+    newFile('/ws/.config',
+        content: 'FOO=foo\n' + 'FUCHSIA_BUILD_DIR="$buildDir"\n' + 'BAR=bar\n');
+    newFile('/ws/out/debug-x87_128/dartlang/gen/some/code/foo.packages');
+    return GnWorkspace.find(resourceProvider, convertPath('/ws/some/code'));
+  }
+
+  void test_findPackageFor_missingBuildFile() {
+    GnWorkspace workspace = _buildStandardGnWorkspace();
+    newFile('/ws/some/code/lib/code.dart');
+
+    var package =
+        workspace.findPackageFor(convertPath('/ws/some/code/lib/code.dart'));
+    expect(package, isNull);
+  }
+
+  void test_findPackageFor_buildFileExists() {
+    GnWorkspace workspace = _buildStandardGnWorkspace();
+    newFile('/ws/some/code/BUILD.gn');
+    var targetFile = newFile('/ws/some/code/lib/code.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    expect(package, isNotNull);
+    expect(package.root, convertPath('/ws/some/code'));
+    expect(package.workspace, equals(workspace));
+  }
+
+  void test_contains_differentWorkspace() {
+    GnWorkspace workspace = _buildStandardGnWorkspace();
+    newFile('/ws/some/code/BUILD.gn');
+    var targetFile = newFile('/ws/some/code/lib/code.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    expect(package.contains('/ws2/some/file.dart'), isFalse);
+  }
+
+  void test_contains_differentPackageInWorkspace() {
+    GnWorkspace workspace = _buildStandardGnWorkspace();
+    newFile('/ws/some/code/BUILD.gn');
+    var targetFile = newFile('/ws/some/code/lib/code.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    // A file that is _not_ in this package is not required to have a BUILD.gn
+    // file above it, for simplicity and reduced I/O.
+    expect(package.contains('/ws/some/other/code/file.dart'), isFalse);
+  }
+
+  void test_contains_samePackage() {
+    GnWorkspace workspace = _buildStandardGnWorkspace();
+    newFile('/ws/some/code/BUILD.gn');
+    var targetFile = newFile('/ws/some/code/lib/code.dart');
+    var targetFile2 = newFile('/ws/some/code/lib/code2.dart');
+    var targetFile3 = newFile('/ws/some/code/lib/src/code3.dart');
+    var targetBinFile = newFile('/ws/some/code/bin/code.dart');
+    var targetTestFile = newFile('/ws/some/code/test/code_test.dart');
+
+    var package = workspace.findPackageFor(targetFile.path);
+    expect(package.contains(targetFile2.path), isTrue);
+    expect(package.contains(targetFile3.path), isTrue);
+    expect(package.contains(targetBinFile.path), isTrue);
+    expect(package.contains(targetTestFile.path), isTrue);
+  }
+
+  void test_contains_subPackage() {
+    GnWorkspace workspace = _buildStandardGnWorkspace();
+    newFile('/ws/some/code/BUILD.gn');
+    newFile('/ws/some/code/lib/code.dart');
+    newFile('/ws/some/code/testing/BUILD.gn');
+    newFile('/ws/some/code/testing/lib/testing.dart');
+
+    var package =
+        workspace.findPackageFor(convertPath('/ws/some/code/lib/code.dart'));
+    expect(
+        package.contains(convertPath('/ws/some/code/testing/lib/testing.dart')),
+        isFalse);
+  }
+}
diff --git a/pkg/analyzer/test/generated/package_build_test.dart b/pkg/analyzer/test/src/workspace/package_build_test.dart
similarity index 85%
rename from pkg/analyzer/test/generated/package_build_test.dart
rename to pkg/analyzer/test/src/workspace/package_build_test.dart
index 81b7d35..173fc46 100644
--- a/pkg/analyzer/test/generated/package_build_test.dart
+++ b/pkg/analyzer/test/src/workspace/package_build_test.dart
@@ -1,13 +1,14 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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/package_build.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer/src/workspace/package_build.dart';
 import 'package:package_config/packages.dart';
+import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -16,6 +17,7 @@
     defineReflectiveTests(PackageBuildFileUriResolverTest);
     defineReflectiveTests(PackageBuildPackageUriResolverTest);
     defineReflectiveTests(PackageBuildWorkspaceTest);
+    defineReflectiveTests(PackageBuildWorkspacePackageTest);
   });
 }
 
@@ -46,8 +48,7 @@
 }
 
 @reflectiveTest
-class PackageBuildFileUriResolverTest extends Object
-    with ResourceProviderMixin {
+class PackageBuildFileUriResolverTest with ResourceProviderMixin {
   PackageBuildWorkspace workspace;
   PackageBuildFileUriResolver resolver;
 
@@ -116,16 +117,14 @@
         uri);
   }
 
-  Source _resolvePath(String absolutePosixPath) {
-    String absolutePath = resourceProvider.convertPath(absolutePosixPath);
-    Uri uri = resourceProvider.pathContext.toUri(absolutePath);
+  Source _resolvePath(String path) {
+    Uri uri = toUri(path);
     return resolver.resolveAbsolute(uri);
   }
 }
 
 @reflectiveTest
-class PackageBuildPackageUriResolverTest extends Object
-    with ResourceProviderMixin {
+class PackageBuildPackageUriResolverTest with ResourceProviderMixin {
   PackageBuildWorkspace workspace;
   PackageBuildPackageUriResolver resolver;
   MockUriResolver packageUriResolver;
@@ -230,7 +229,7 @@
 }
 
 @reflectiveTest
-class PackageBuildWorkspaceTest extends Object with ResourceProviderMixin {
+class PackageBuildWorkspaceTest with ResourceProviderMixin {
   void test_builtFile_currentProject() {
     newFolder('/workspace/.dart_tool/build');
     newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
@@ -273,7 +272,7 @@
     expect(
         () => PackageBuildWorkspace.find(resourceProvider,
             convertPath('not_absolute'), new MockContextBuilder()),
-        throwsArgumentError);
+        throwsA(const TypeMatcher<ArgumentError>()));
   }
 
   void test_find_hasDartToolAndPubspec() {
@@ -484,3 +483,65 @@
         resourceProvider, convertPath(root), contextBuilder);
   }
 }
+
+@reflectiveTest
+class PackageBuildWorkspacePackageTest with ResourceProviderMixin {
+  PackageBuildWorkspace _createPackageBuildWorkspace() {
+    final contextBuilder = new MockContextBuilder();
+    final packages = new MockPackages();
+    final packageMap = <String, List<Folder>>{'project': []};
+    contextBuilder.packagesMapMap[convertPath('/workspace')] = packages;
+    contextBuilder.packagesToMapMap[packages] = packageMap;
+
+    newFolder('/workspace/.dart_tool/build');
+    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    return PackageBuildWorkspace.find(
+        resourceProvider, convertPath('/workspace'), contextBuilder);
+  }
+
+  void test_findPackageFor_unrelatedFile() {
+    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
+    newFile('/workspace/project/lib/file.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace2/project/lib/file.dart'));
+    expect(package, isNull);
+  }
+
+  void test_findPackageFor_includedFile() {
+    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
+    newFile('/workspace/project/lib/file.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace/project/lib/file.dart'));
+    expect(package, isNotNull);
+    expect(package.root, convertPath('/workspace'));
+    expect(package.workspace, equals(workspace));
+  }
+
+  void test_contains_differentWorkspace() {
+    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
+    newFile('/workspace2/project/lib/file.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
+    expect(package.contains('/workspace2/project/lib/file.dart'), isFalse);
+  }
+
+  void test_contains_sameWorkspace() {
+    PackageBuildWorkspace workspace = _createPackageBuildWorkspace();
+    newFile('/workspace/project/lib/file2.dart');
+
+    var package = workspace
+        .findPackageFor(convertPath('/workspace/project/lib/code.dart'));
+    var file2Path =
+        path.separator + path.join('workspace', 'project', 'lib', 'file2.dart');
+    expect(package.contains(file2Path), isTrue);
+    var binPath =
+        path.separator + path.join('workspace', 'project', 'bin', 'bin.dart');
+    expect(package.contains(binPath), isTrue);
+    var testPath =
+        path.separator + path.join('workspace', 'project', 'test', 'test.dart');
+    expect(package.contains(testPath), isTrue);
+  }
+}
diff --git a/pkg/analyzer/test/src/workspace/test_all.dart b/pkg/analyzer/test/src/workspace/test_all.dart
new file mode 100644
index 0000000..351175b
--- /dev/null
+++ b/pkg/analyzer/test/src/workspace/test_all.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'bazel_test.dart' as bazel_test;
+import 'gn_test.dart' as gn_test;
+import 'package_build_test.dart' as package_build_test;
+
+main() {
+  defineReflectiveSuite(() {
+    bazel_test.main();
+    gn_test.main();
+    package_build_test.main();
+  }, name: 'workspace');
+}
diff --git a/pkg/analyzer/tool/messages/generate.dart b/pkg/analyzer/tool/messages/generate.dart
index dc7e1cb..b0e7c53 100644
--- a/pkg/analyzer/tool/messages/generate.dart
+++ b/pkg/analyzer/tool/messages/generate.dart
@@ -18,6 +18,7 @@
 import 'package:analyzer/src/codegen/tools.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:front_end/src/testing/package_root.dart' as pkgRoot;
+import 'package:front_end/src/fasta/scanner.dart';
 import 'package:path/path.dart';
 import 'package:yaml/yaml.dart' show loadYaml;
 
@@ -33,9 +34,12 @@
   String syntacticErrorsSource = new File(join(analyzerPkgPath,
           joinAll(posix.split('lib/src/dart/error/syntactic_errors.dart'))))
       .readAsStringSync();
+  String parserSource = new File(join(frontEndPkgPath,
+          joinAll(posix.split('lib/src/fasta/parser/parser.dart'))))
+      .readAsStringSync();
 
   final codeGenerator = new _SyntacticErrorGenerator(
-      messagesYaml, errorConverterSource, syntacticErrorsSource);
+      messagesYaml, errorConverterSource, syntacticErrorsSource, parserSource);
 
   await GeneratedContent.generateAll(analyzerPkgPath, <GeneratedContent>[
     new GeneratedFile('lib/src/dart/error/syntactic_errors.g.dart',
@@ -68,7 +72,6 @@
 List<String> nameForEntry(Map entry) {
   final analyzerCode = entry['analyzerCode'];
   if (analyzerCode is String) {
-    // TODO(danrubel): Revise to handle others such as ScannerErrorCode.
     if (!analyzerCode.startsWith('ParserErrorCode.')) {
       throw invalidAnalyzerCode;
     }
@@ -85,7 +88,9 @@
   final Map messagesYaml;
   final String errorConverterSource;
   final String syntacticErrorsSource;
+  final String parserSource;
   final translatedEntries = <Map>[];
+  final translatedFastaErrorCodes = new Set<String>();
   final out = new StringBuffer('''
 //
 // THIS FILE IS GENERATED. DO NOT EDIT.
@@ -96,8 +101,9 @@
 part of 'syntactic_errors.dart';
 
 ''');
-  _SyntacticErrorGenerator(
-      this.messagesYaml, this.errorConverterSource, this.syntacticErrorsSource);
+
+  _SyntacticErrorGenerator(this.messagesYaml, this.errorConverterSource,
+      this.syntacticErrorsSource, this.parserSource);
 
   void checkForManualChanges() {
     // Check for ParserErrorCodes that could be removed from
@@ -200,6 +206,7 @@
     messagesYaml.forEach((name, entry) {
       if (entry is Map) {
         if (entry['index'] is int && entry['analyzerCode'] is String) {
+          translatedFastaErrorCodes.add(name);
           translatedEntries.add(entry);
         }
       }
@@ -262,5 +269,47 @@
         print('  ${analyzerToFasta.length} total');
       }
     }
+
+    // List error codes in the parser that have not been translated.
+    final untranslatedFastaErrorCodes = new Set<String>();
+    Token token = scanString(parserSource).tokens;
+    while (!token.isEof) {
+      if (token.isIdentifier) {
+        String fastaErrorCode;
+        String lexeme = token.lexeme;
+        if (lexeme.length > 7) {
+          if (lexeme.startsWith('message')) {
+            fastaErrorCode = lexeme.substring(7);
+          } else if (lexeme.length > 8) {
+            if (lexeme.startsWith('template')) {
+              fastaErrorCode = lexeme.substring(8);
+            }
+          }
+        }
+        if (fastaErrorCode != null &&
+            !translatedFastaErrorCodes.contains(fastaErrorCode)) {
+          untranslatedFastaErrorCodes.add(fastaErrorCode);
+        }
+      }
+      token = token.next;
+    }
+    if (untranslatedFastaErrorCodes.isNotEmpty) {
+      print('');
+      print('The following error codes in the parser are not auto generated:');
+      final sorted = untranslatedFastaErrorCodes.toList()..sort();
+      for (String fastaErrorCode in sorted) {
+        String analyzerCode = '';
+        String template = '';
+        var entry = messagesYaml[fastaErrorCode];
+        if (entry is Map) {
+          if (entry['index'] is! int && entry['analyzerCode'] is String) {
+            analyzerCode = entry['analyzerCode'];
+            template = entry['template'];
+          }
+        }
+        print('  ${fastaErrorCode.padRight(30)} --> $analyzerCode'
+            '\n      $template');
+      }
+    }
   }
 }
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index 23b6c43..d99b76a 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -21,6 +21,7 @@
 import 'dart:io';
 
 import 'package:analyzer/src/codegen/tools.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:front_end/src/fasta/scanner/string_scanner.dart';
 import 'package:front_end/src/scanner/token.dart' show Token;
 import 'package:front_end/src/testing/package_root.dart' as package_root;
@@ -85,6 +86,7 @@
     var startingToken = scanner.tokenize();
     var listener = new MiniAstBuilder();
     var parser = new MiniAstParser(listener);
+    parser.enableSetLiterals = IsEnabledByDefault.set_literals;
     parser.parseUnit(startingToken);
     extractIdl(listener.compilationUnit);
     checkIdl();
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index 2559cb9..031b497 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -478,8 +478,9 @@
   }
 
   @override
-  void handleType(Token beginToken) {
+  void handleType(Token beginToken, Token questionMark) {
     debugEvent("Type");
+    reportErrorIfNullableType(questionMark);
     List<TypeName> typeArguments = popTypedList();
     String name = pop();
     push(new TypeName(name, typeArguments));
diff --git a/pkg/analyzer/tool/task_dependency_graph/generate.dart b/pkg/analyzer/tool/task_dependency_graph/generate.dart
index 739ac6c..3a9aa7b 100644
--- a/pkg/analyzer/tool/task_dependency_graph/generate.dart
+++ b/pkg/analyzer/tool/task_dependency_graph/generate.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -19,13 +19,18 @@
 import 'dart:io' hide File;
 import 'dart:io' as io;
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/codegen/tools.dart';
 import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/constant.dart';
@@ -35,9 +40,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
-import 'package:analyzer/src/codegen/tools.dart';
 import 'package:front_end/src/testing/package_root.dart' as package_root;
 import 'package:path/path.dart' as path;
 import 'package:path/path.dart';
diff --git a/pkg/analyzer_cli/bin/analyzer.dart b/pkg/analyzer_cli/bin/analyzer.dart
index 8e2bbd2..45b7bc3 100644
--- a/pkg/analyzer_cli/bin/analyzer.dart
+++ b/pkg/analyzer_cli/bin/analyzer.dart
@@ -1,11 +1,12 @@
 #!/usr/bin/env dart
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer_cli/starter.dart';
 import 'dart:isolate';
 
+import 'package:analyzer_cli/starter.dart';
+
 /// The entry point for the command-line analyzer.
 ///
 /// [sendPort] may be passed in when started in an isolate. If provided, it is
diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
index 1974fc4..617bdf9 100644
--- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
@@ -1,12 +1,11 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer_cli.src.analyzer_impl;
-
 import 'dart:async';
 import 'dart:io';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/exception/exception.dart';
@@ -121,7 +120,7 @@
   }
 
   /// Fills [errorInfos] using [files].
-  Future<Null> prepareErrors() async {
+  Future<void> prepareErrors() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     PerformanceTag previous = _prepareErrorsTag.makeCurrent();
diff --git a/pkg/analyzer_cli/lib/src/ansi.dart b/pkg/analyzer_cli/lib/src/ansi.dart
index 1b9a539..1f94f9e 100644
--- a/pkg/analyzer_cli/lib/src/ansi.dart
+++ b/pkg/analyzer_cli/lib/src/ansi.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/lib/src/batch_mode.dart b/pkg/analyzer_cli/lib/src/batch_mode.dart
index 5bd75b0..f96a48c 100644
--- a/pkg/analyzer_cli/lib/src/batch_mode.dart
+++ b/pkg/analyzer_cli/lib/src/batch_mode.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index 206341a..2c64108 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -1,18 +1,20 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer_cli.src.build_mode;
-
 import 'dart:async';
 import 'dart:io' as io;
 import 'dart:isolate';
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/cache.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
+import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
@@ -35,9 +37,6 @@
 import 'package:bazel_worker/bazel_worker.dart';
 import 'package:collection/collection.dart';
 import 'package:convert/convert.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
-import 'package:analyzer/src/dart/analysis/cache.dart';
 
 /**
  * Persistent Bazel worker.
@@ -58,14 +57,6 @@
         resourceProvider, logger, 256 * 1024 * 1024);
   }
 
-  factory AnalyzerWorkerLoop.std(ResourceProvider resourceProvider,
-      {io.Stdin stdinStream, io.Stdout stdoutStream, String dartSdkPath}) {
-    AsyncWorkerConnection connection = new StdAsyncWorkerConnection(
-        inputStream: stdinStream, outputStream: stdoutStream);
-    return new AnalyzerWorkerLoop(resourceProvider, connection,
-        dartSdkPath: dartSdkPath);
-  }
-
   factory AnalyzerWorkerLoop.sendPort(
       ResourceProvider resourceProvider, SendPort sendPort,
       {String dartSdkPath}) {
@@ -75,10 +66,18 @@
         dartSdkPath: dartSdkPath);
   }
 
+  factory AnalyzerWorkerLoop.std(ResourceProvider resourceProvider,
+      {io.Stdin stdinStream, io.Stdout stdoutStream, String dartSdkPath}) {
+    AsyncWorkerConnection connection = new StdAsyncWorkerConnection(
+        inputStream: stdinStream, outputStream: stdoutStream);
+    return new AnalyzerWorkerLoop(resourceProvider, connection,
+        dartSdkPath: dartSdkPath);
+  }
+
   /**
    * Performs analysis with given [options].
    */
-  Future<Null> analyze(
+  Future<void> analyze(
       CommandLineOptions options, Map<String, WorkerInput> inputs) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -148,7 +147,7 @@
    * Run the worker loop.
    */
   @override
-  Future<Null> run() async {
+  Future<void> run() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     errorSink = errorBuffer;
@@ -174,7 +173,7 @@
 /**
  * Analyzer used when the "--build-mode" option is supplied.
  */
-class BuildMode extends Object with HasContextMixin {
+class BuildMode with HasContextMixin {
   final ResourceProvider resourceProvider;
   final CommandLineOptions options;
   final AnalysisStats stats;
@@ -192,7 +191,6 @@
   AnalysisDriver analysisDriver;
 
   PackageBundleAssembler assembler;
-  final Set<Source> processedSources = new Set<Source>();
   final Map<String, UnlinkedUnit> uriToUnit = <String, UnlinkedUnit>{};
 
   BuildMode(this.resourceProvider, this.options, this.stats, this.contextCache,
@@ -474,7 +472,7 @@
    *
    * Otherwise compute it and store into the [uriToUnit] and [assembler].
    */
-  Future<Null> _prepareUnlinkedUnit(String absoluteUri) async {
+  Future<void> _prepareUnlinkedUnit(String absoluteUri) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     // Maybe an input package contains the source.
@@ -499,7 +497,7 @@
    * Print errors for all explicit sources.  If [outputPath] is supplied, output
    * is sent to a new file at that path.
    */
-  Future<Null> _printErrors({String outputPath}) async {
+  Future<void> _printErrors({String outputPath}) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     await logger.runAsync('Compute and print analysis errors', () async {
diff --git a/pkg/analyzer_cli/lib/src/context_cache.dart b/pkg/analyzer_cli/lib/src/context_cache.dart
index 0e875ce..808a4f9 100644
--- a/pkg/analyzer_cli/lib/src/context_cache.dart
+++ b/pkg/analyzer_cli/lib/src/context_cache.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
@@ -18,7 +18,7 @@
 
   /// A mapping from normalized paths (currently, directories) to cache entries
   /// which include builder, analysis_options paths, and [AnalysisOptionImpl]s.
-  Map<String, ContextCacheEntry> _byDirectory = {};
+  final Map<String, ContextCacheEntry> _byDirectory = {};
 
   ContextCache(this.resourceProvider, this.clOptions, this.verbosePrint);
 
@@ -87,15 +87,16 @@
   /// automatically.
   AnalysisOptionsImpl _getAnalysisOptions() {
     AnalysisOptionsImpl contextOptions = builder.getAnalysisOptions(
-        requestedSourceDirectory,
-        verbosePrint: clOptions.verbose ? verbosePrint : null);
+            requestedSourceDirectory,
+            verbosePrint: clOptions.verbose ? verbosePrint : null)
+        as AnalysisOptionsImpl;
 
     contextOptions.trackCacheDependencies = false;
     contextOptions.disableCacheFlushing = clOptions.disableCacheFlushing;
+    contextOptions.enabledExperiments = clOptions.enabledExperiments;
     contextOptions.hint = !clOptions.disableHints;
     contextOptions.generateImplicitErrors = clOptions.showPackageWarnings;
     contextOptions.generateSdkErrors = clOptions.showSdkWarnings;
-    contextOptions.previewDart2 = clOptions.previewDart2;
     contextOptions.useFastaParser = clOptions.useFastaParser;
     return contextOptions;
   }
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index 63ed79f..8b2b808 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,7 +7,6 @@
 import 'dart:isolate';
 
 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/file_system/physical_file_system.dart';
 import 'package:analyzer/src/context/builder.dart';
@@ -93,11 +92,11 @@
   _analytics = replacementAnalytics;
 }
 
-class Driver extends Object with HasContextMixin implements CommandLineStarter {
+class Driver with HasContextMixin implements CommandLineStarter {
   static final PerformanceTag _analyzeAllTag =
       new PerformanceTag("Driver._analyzeAll");
 
-  static ByteStore analysisDriverMemoryByteStore = new MemoryByteStore();
+  static final ByteStore analysisDriverMemoryByteStore = new MemoryByteStore();
 
   ContextCache contextCache;
 
@@ -125,8 +124,8 @@
   /**
    * The resource provider used to access the file system.
    */
-  file_system.ResourceProvider resourceProvider =
-      PhysicalResourceProvider.INSTANCE;
+  @override
+  final ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
 
   /// Collected analysis statistics.
   final AnalysisStats stats = new AnalysisStats();
@@ -166,9 +165,7 @@
   }
 
   @override
-  Future<Null> start(List<String> args, {SendPort sendPort}) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  Future<void> start(List<String> args, {SendPort sendPort}) async {
     if (analysisDriver != null) {
       throw new StateError("start() can only be called once");
     }
@@ -357,7 +354,7 @@
         var shortName = resourceProvider.pathContext.basename(path);
         if (shortName == AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE ||
             shortName == AnalysisEngine.ANALYSIS_OPTIONS_FILE) {
-          file_system.File file = resourceProvider.getFile(path);
+          File file = resourceProvider.getFile(path);
           String content = file.readAsStringSync();
           LineInfo lineInfo = new LineInfo.fromContent(content);
           List<AnalysisError> errors =
@@ -373,7 +370,7 @@
           }
         } else if (shortName == AnalysisEngine.PUBSPEC_YAML_FILE) {
           try {
-            file_system.File file = resourceProvider.getFile(path);
+            File file = resourceProvider.getFile(path);
             String content = file.readAsStringSync();
             YamlNode node = loadYamlNode(content);
             if (node is YamlMap) {
@@ -472,14 +469,14 @@
   /// In this situation, [analysisOptions] is ignored and can be `null`.
   SourceFactory _chooseUriResolutionPolicy(
       CommandLineOptions options,
-      Map<file_system.Folder, YamlMap> embedderMap,
+      Map<Folder, YamlMap> embedderMap,
       _PackageInfo packageInfo,
       SummaryDataStore summaryDataStore,
       bool includeSdkResolver,
       AnalysisOptions analysisOptions) {
     // Create a custom package resolver if one has been specified.
     if (packageResolverProvider != null) {
-      file_system.Folder folder = resourceProvider.getResource('.');
+      Folder folder = resourceProvider.getFolder('.');
       UriResolver resolver = packageResolverProvider(folder);
       if (resolver != null) {
         // TODO(brianwilkerson) This doesn't handle sdk extensions.
@@ -610,7 +607,7 @@
     _PackageInfo packageInfo = _findPackages(options);
 
     // Process embedders.
-    Map<file_system.Folder, YamlMap> embedderMap =
+    Map<Folder, YamlMap> embedderMap =
         new EmbedderYamlLocator(packageInfo.packageMap).embedderYamls;
 
     // Scan for SDK extenders.
@@ -679,7 +676,7 @@
     }
 
     Packages packages;
-    Map<String, List<file_system.Folder>> packageMap;
+    Map<String, List<Folder>> packageMap;
 
     if (options.packageConfigPath != null) {
       String packageConfigPath = options.packageConfigPath;
@@ -698,7 +695,7 @@
       packageMap = _PackageRootPackageMapBuilder.buildPackageMap(
           options.packageRootPath);
     } else {
-      file_system.Resource cwd = resourceProvider.getResource(path.current);
+      Resource cwd = resourceProvider.getResource(path.current);
       // Look for .packages.
       packages = _discoverPackagespec(new Uri.directory(cwd.path));
       packageMap = _getPackageMap(packages);
@@ -707,13 +704,12 @@
     return new _PackageInfo(packages, packageMap);
   }
 
-  Map<String, List<file_system.Folder>> _getPackageMap(Packages packages) {
+  Map<String, List<Folder>> _getPackageMap(Packages packages) {
     if (packages == null) {
       return null;
     }
 
-    Map<String, List<file_system.Folder>> folderMap =
-        new Map<String, List<file_system.Folder>>();
+    Map<String, List<Folder>> folderMap = new Map<String, List<Folder>>();
     var pathContext = resourceProvider.pathContext;
     packages.asMap().forEach((String packagePath, Uri uri) {
       String path = fileUriToNormalizedPath(pathContext, uri);
@@ -722,11 +718,11 @@
     return folderMap;
   }
 
-  bool _hasSdkExt(Iterable<List<file_system.Folder>> folders) {
+  bool _hasSdkExt(Iterable<List<Folder>> folders) {
     if (folders != null) {
       //TODO: ideally share this traversal with SdkExtUriResolver
-      for (Iterable<file_system.Folder> libDirs in folders) {
-        if (libDirs.any((file_system.Folder libDir) =>
+      for (Iterable<Folder> libDirs in folders) {
+        if (libDirs.any((Folder libDir) =>
             libDir.getChild(SdkExtUriResolver.SDK_EXT_NAME).exists)) {
           return true;
         }
@@ -800,48 +796,23 @@
   /// Return whether the [newOptions] are equal to the [previous].
   static bool _equalCommandLineOptions(
       CommandLineOptions previous, CommandLineOptions newOptions) {
-    if (previous == null || newOptions == null) {
-      return false;
-    }
-    if (newOptions.packageRootPath != previous.packageRootPath) {
-      return false;
-    }
-    if (newOptions.packageConfigPath != previous.packageConfigPath) {
-      return false;
-    }
-    if (!_equalMaps(newOptions.definedVariables, previous.definedVariables)) {
-      return false;
-    }
-    if (newOptions.log != previous.log) {
-      return false;
-    }
-    if (newOptions.disableHints != previous.disableHints) {
-      return false;
-    }
-    if (newOptions.showPackageWarnings != previous.showPackageWarnings) {
-      return false;
-    }
-    if (newOptions.showPackageWarningsPrefix !=
-        previous.showPackageWarningsPrefix) {
-      return false;
-    }
-    if (newOptions.showSdkWarnings != previous.showSdkWarnings) {
-      return false;
-    }
-    if (newOptions.lints != previous.lints) {
-      return false;
-    }
-    if (newOptions.strongMode != previous.strongMode) {
-      return false;
-    }
-    if (!_equalLists(
-        newOptions.buildSummaryInputs, previous.buildSummaryInputs)) {
-      return false;
-    }
-    if (newOptions.disableCacheFlushing != previous.disableCacheFlushing) {
-      return false;
-    }
-    return true;
+    return previous != null &&
+        newOptions != null &&
+        newOptions.packageRootPath == previous.packageRootPath &&
+        newOptions.packageConfigPath == previous.packageConfigPath &&
+        _equalMaps(newOptions.definedVariables, previous.definedVariables) &&
+        newOptions.log == previous.log &&
+        newOptions.disableHints == previous.disableHints &&
+        newOptions.showPackageWarnings == previous.showPackageWarnings &&
+        newOptions.showPackageWarningsPrefix ==
+            previous.showPackageWarningsPrefix &&
+        newOptions.showSdkWarnings == previous.showSdkWarnings &&
+        newOptions.lints == previous.lints &&
+        newOptions.strongMode == previous.strongMode &&
+        _equalLists(
+            newOptions.buildSummaryInputs, previous.buildSummaryInputs) &&
+        newOptions.disableCacheFlushing == previous.disableCacheFlushing &&
+        _equalLists(newOptions.enabledExperiments, previous.enabledExperiments);
   }
 
   /// Perform a deep comparison of two string lists.
@@ -872,14 +843,14 @@
 }
 
 class _DriverError implements Exception {
-  String msg;
+  final String msg;
 
   _DriverError(this.msg);
 }
 
 class _PackageInfo {
-  Packages packages;
-  Map<String, List<file_system.Folder>> packageMap;
+  final Packages packages;
+  final Map<String, List<Folder>> packageMap;
 
   _PackageInfo(this.packages, this.packageMap);
 }
@@ -890,15 +861,14 @@
 /// [_PackageRootPackageMapBuilder] creates a simple mapping from package name
 /// to full path on disk (resolving any symbolic links).
 class _PackageRootPackageMapBuilder {
-  static Map<String, List<file_system.Folder>> buildPackageMap(
-      String packageRootPath) {
+  static Map<String, List<Folder>> buildPackageMap(String packageRootPath) {
     var packageRoot = new io.Directory(packageRootPath);
     if (!packageRoot.existsSync()) {
       throw new _DriverError(
           'Package root directory ($packageRootPath) does not exist.');
     }
     var packages = packageRoot.listSync(followLinks: false);
-    var result = new Map<String, List<file_system.Folder>>();
+    var result = new Map<String, List<Folder>>();
     for (var package in packages) {
       var packageName = path.basename(package.path);
       var realPath = package.resolveSymbolicLinksSync();
diff --git a/pkg/analyzer_cli/lib/src/error_formatter.dart b/pkg/analyzer_cli/lib/src/error_formatter.dart
index 0c84618..72ea9ed 100644
--- a/pkg/analyzer_cli/lib/src/error_formatter.dart
+++ b/pkg/analyzer_cli/lib/src/error_formatter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -211,7 +211,7 @@
   AnsiLogger ansi;
 
   // This is a Set in order to de-dup CLI errors.
-  Set<CLIError> batchedErrors = new Set();
+  final Set<CLIError> batchedErrors = new Set();
 
   HumanErrorFormatter(
       StringSink out, CommandLineOptions options, AnalysisStats stats,
@@ -262,7 +262,7 @@
   void formatError(
       Map<AnalysisError, LineInfo> errorToLine, AnalysisError error) {
     Source source = error.source;
-    CharacterLocation location = errorToLine[error].getLocation(error.offset);
+    var location = errorToLine[error].getLocation(error.offset);
 
     ErrorSeverity severity = _severityProcessor(error);
 
@@ -323,7 +323,7 @@
   void formatError(
       Map<AnalysisError, LineInfo> errorToLine, AnalysisError error) {
     Source source = error.source;
-    CharacterLocation location = errorToLine[error].getLocation(error.offset);
+    var location = errorToLine[error].getLocation(error.offset);
     int length = error.length;
 
     ErrorSeverity severity = _severityProcessor(error);
diff --git a/pkg/analyzer_cli/lib/src/error_severity.dart b/pkg/analyzer_cli/lib/src/error_severity.dart
index 71a2d7a..e43d77c 100644
--- a/pkg/analyzer_cli/lib/src/error_severity.dart
+++ b/pkg/analyzer_cli/lib/src/error_severity.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/lib/src/has_context_mixin.dart b/pkg/analyzer_cli/lib/src/has_context_mixin.dart
index 8b51af6..1159f56 100644
--- a/pkg/analyzer_cli/lib/src/has_context_mixin.dart
+++ b/pkg/analyzer_cli/lib/src/has_context_mixin.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// 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.
 
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index 640fd1a..81712bc 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,6 +7,7 @@
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/command_line/arguments.dart';
 import 'package:analyzer/src/context/builder.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/util/sdk.dart';
 import 'package:analyzer_cli/src/ansi.dart' as ansi;
 import 'package:analyzer_cli/src/driver.dart';
@@ -35,9 +36,6 @@
 
 /// Analyzer commandline configuration options.
 class CommandLineOptions {
-  /// Whether declaration casts are enabled (in strong mode)
-  final bool declarationCasts;
-
   /// The path to output analysis results when in build mode.
   final String buildAnalysisOutput;
 
@@ -76,11 +74,8 @@
   /// The path to the dart SDK.
   String dartSdkPath;
 
-  /// The path to the folder with the 'vm_platform.dill' file.
-  String dartSdkPlatformBinariesPath;
-
   /// The path to the dart SDK summary file.
-  String dartSdkSummaryPath;
+  final String dartSdkSummaryPath;
 
   /// Whether to disable cache flushing.  This option can improve analysis
   /// speed at the expense of memory usage.  It may also be useful for working
@@ -93,6 +88,9 @@
   /// Whether to display version information
   final bool displayVersion;
 
+  /// A list of the names of the experiments that are to be enabled.
+  final List<String> enabledExperiments;
+
   /// Whether to ignore unrecognized flags
   final bool ignoreUnrecognizedFlags;
 
@@ -138,16 +136,10 @@
   /// This flag is deprecated and hard-coded to `true`.
   final bool strongMode = true;
 
-  /// Whether implicit casts are enabled (in strong mode)
-  final bool implicitCasts;
-
-  /// Whether implicit dynamic is enabled (mainly for strong mode users)
-  final bool implicitDynamic;
-
   /// Whether to treat lints as fatal
+  // TODO(devoncarew): Deprecate and remove this flag.
   final bool lintsAreFatal;
 
-  // TODO(devoncarew): Deprecate and remove this flag.
   /// Emit output in a verbose mode.
   final bool verbose;
 
@@ -176,12 +168,11 @@
         contextBuilderOptions = createContextBuilderOptions(args),
         dartSdkPath = cast(args['dart-sdk']),
         dartSdkSummaryPath = cast(args['dart-sdk-summary']),
-        declarationCasts = args.wasParsed(declarationCastsFlag)
-            ? cast(args[declarationCastsFlag])
-            : cast(args[implicitCastsFlag]),
         disableCacheFlushing = cast(args['disable-cache-flushing']),
         disableHints = cast(args['no-hints']),
         displayVersion = cast(args['version']),
+        enabledExperiments =
+            cast(args['enable-experiment'] ?? const <String>[]),
         ignoreUnrecognizedFlags = cast(args['ignore-unrecognized-flags']),
         lints = cast(args[lintsFlag]),
         log = cast(args['log']),
@@ -198,8 +189,6 @@
         infosAreFatal = cast(args['fatal-infos']) || cast(args['fatal-hints']),
         warningsAreFatal = cast(args['fatal-warnings']),
         lintsAreFatal = cast(args['fatal-lints']),
-        implicitCasts = cast(args[implicitCastsFlag]),
-        implicitDynamic = !cast<bool>(args['no-implicit-dynamic']),
         trainSnapshot = cast(args['train-snapshot']),
         verbose = cast(args['verbose']),
         color = cast(args['color']);
@@ -219,11 +208,6 @@
   String get packageRootPath =>
       contextBuilderOptions.defaultPackagesDirectoryPath;
 
-  /// Whether to enable the Dart 2.0 Preview.
-  ///
-  /// This flag is deprecated and hard-coded to `true`.
-  bool get previewDart2 => true;
-
   /// The source files to analyze
   List<String> get sourceFiles => _sourceFiles;
 
@@ -261,9 +245,6 @@
         printAndFail('Invalid Dart SDK path: $sdkPath');
         return null; // Only reachable in testing.
       }
-
-      options.dartSdkPlatformBinariesPath =
-          computePlatformBinariesPath(sdkPath);
     }
 
     // Check package config.
@@ -338,6 +319,11 @@
           help: 'Print the analyzer version.',
           defaultsTo: false,
           negatable: false)
+      ..addMultiOption('enable-experiment',
+          help:
+              'Enable one or more experimental features. If multiple features '
+              'are being added, they should be comma separated.',
+          splitCommas: true)
       ..addFlag('no-hints',
           help: 'Do not show hint results.',
           defaultsTo: false,
@@ -592,6 +578,23 @@
             'Note: the --strong flag is deprecated and will be removed in an '
             'future release.\n');
       }
+      if (results.wasParsed('enable-experiment')) {
+        List<String> names =
+            (results['enable-experiment'] as List).cast<String>().toList();
+        bool errorFound = false;
+        for (var validationResult in validateFlags(names)) {
+          if (validationResult.isError) {
+            errorFound = true;
+          }
+          var kind = validationResult.isError ? 'ERROR' : 'WARNING';
+          errorSink.writeln('$kind: ${validationResult.message}');
+        }
+        if (errorFound) {
+          _showUsage(parser, null);
+          exitHandler(15);
+          return null; // Only reachable in testing.
+        }
+      }
 
       return new CommandLineOptions._fromArgs(results);
     } on FormatException catch (e) {
diff --git a/pkg/analyzer_cli/lib/src/perf_report.dart b/pkg/analyzer_cli/lib/src/perf_report.dart
index e9227a9..0463ddd 100644
--- a/pkg/analyzer_cli/lib/src/perf_report.dart
+++ b/pkg/analyzer_cli/lib/src/perf_report.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -13,7 +13,7 @@
 
 const _JSON = const JsonEncoder.withIndent("  ");
 
-String _osType = () {
+final String _osType = () {
   if (Platform.isLinux) {
     return "linux";
   } else if (Platform.isMacOS) {
diff --git a/pkg/analyzer_cli/lib/starter.dart b/pkg/analyzer_cli/lib/starter.dart
index 4caa91f..09db5bf 100644
--- a/pkg/analyzer_cli/lib/starter.dart
+++ b/pkg/analyzer_cli/lib/starter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -40,5 +40,5 @@
    * If [sendPort] is provided it is used for bazel worker communication
    * instead of stdin/stdout.
    */
-  Future<Null> start(List<String> arguments, {SendPort sendPort});
+  Future<void> start(List<String> arguments, {SendPort sendPort});
 }
diff --git a/pkg/analyzer_cli/test/all.dart b/pkg/analyzer_cli/test/all.dart
index b5015f7..a16799b 100644
--- a/pkg/analyzer_cli/test/all.dart
+++ b/pkg/analyzer_cli/test/all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,7 +6,6 @@
 import 'build_mode_test.dart' as build_mode_test;
 import 'driver_test.dart' as driver_test;
 import 'embedder_test.dart' as embedder_test;
-import 'error_test.dart' as error_test;
 import 'errors_reported_once_test.dart' as errors_reported_once_test;
 import 'errors_upgrade_fails_cli_test.dart' as errors_upgrade_fails_cli_test;
 import 'options_test.dart' as options_test;
@@ -21,7 +20,6 @@
   build_mode_test.main();
   driver_test.main();
   embedder_test.main();
-  error_test.main();
   errors_reported_once_test.main();
   errors_upgrade_fails_cli_test.main();
   options_test.main();
diff --git a/pkg/analyzer_cli/test/analysis_options_test.dart b/pkg/analyzer_cli/test/analysis_options_test.dart
index b04f1a4..e8bd10a 100644
--- a/pkg/analyzer_cli/test/analysis_options_test.dart
+++ b/pkg/analyzer_cli/test/analysis_options_test.dart
@@ -1,3 +1,7 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 import 'dart:async';
 import 'dart:io';
 
@@ -71,7 +75,7 @@
 
   String get stdout => _stdout.toString();
 
-  Future<Null> run2(List<String> args) async {
+  Future<void> run2(List<String> args) async {
     await new Driver(isTesting: true).start(args);
     if (stderr.isNotEmpty) {
       fail("Unexpected output to stderr:\n$stderr");
diff --git a/pkg/analyzer_cli/test/build_mode_test.dart b/pkg/analyzer_cli/test/build_mode_test.dart
index 90655ef..25e884f 100644
--- a/pkg/analyzer_cli/test/build_mode_test.dart
+++ b/pkg/analyzer_cli/test/build_mode_test.dart
@@ -1,9 +1,7 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer_cli.test.built_mode;
-
 import 'dart:async';
 
 import 'package:analyzer/file_system/memory_file_system.dart';
@@ -32,7 +30,7 @@
       : super(new MemoryResourceProvider(), connection);
 
   @override
-  Future<Null> analyze(CommandLineOptions options, inputs) async {
+  Future<void> analyze(CommandLineOptions options, inputs) async {
     if (_analyze != null) {
       _analyze(options);
     }
diff --git a/pkg/analyzer_cli/test/data/embedder_client/embedder_yaml_user.dart b/pkg/analyzer_cli/test/data/embedder_client/embedder_yaml_user.dart
index 2d88a2a..8643286 100644
--- a/pkg/analyzer_cli/test/data/embedder_client/embedder_yaml_user.dart
+++ b/pkg/analyzer_cli/test/data/embedder_client/embedder_yaml_user.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/linter_project/test_file.dart b/pkg/analyzer_cli/test/data/linter_project/test_file.dart
index c1726a8..36319de 100644
--- a/pkg/analyzer_cli/test/data/linter_project/test_file.dart
+++ b/pkg/analyzer_cli/test/data/linter_project/test_file.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/no_lints_project/test_file.dart b/pkg/analyzer_cli/test/data/no_lints_project/test_file.dart
index 93088d6..c601c04 100644
--- a/pkg/analyzer_cli/test/data/no_lints_project/test_file.dart
+++ b/pkg/analyzer_cli/test/data/no_lints_project/test_file.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/no_packages_file/sdk_ext_user.dart b/pkg/analyzer_cli/test/data/no_packages_file/sdk_ext_user.dart
index b346f7f..1a5f662 100644
--- a/pkg/analyzer_cli/test/data/no_packages_file/sdk_ext_user.dart
+++ b/pkg/analyzer_cli/test/data/no_packages_file/sdk_ext_user.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/options_include_directive_tests_project/lib/test_file.dart b/pkg/analyzer_cli/test/data/options_include_directive_tests_project/lib/test_file.dart
index f4f9491..05bc617 100644
--- a/pkg/analyzer_cli/test/data/options_include_directive_tests_project/lib/test_file.dart
+++ b/pkg/analyzer_cli/test/data/options_include_directive_tests_project/lib/test_file.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/options_tests_project/test_file.dart b/pkg/analyzer_cli/test/data/options_tests_project/test_file.dart
index 21308e4..1160fe1 100644
--- a/pkg/analyzer_cli/test/data/options_tests_project/test_file.dart
+++ b/pkg/analyzer_cli/test/data/options_tests_project/test_file.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/async.dart b/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/async.dart
index 78eb5c2..7c38a26 100644
--- a/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/async.dart
+++ b/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/async.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/core.dart b/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/core.dart
index cf2d05a..de47fc2 100644
--- a/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/core.dart
+++ b/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/core.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/grizzly.dart b/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/grizzly.dart
index d575643..abc1a2f 100644
--- a/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/grizzly.dart
+++ b/pkg/analyzer_cli/test/data/package_with_embedder_yaml/lib/grizzly.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/package_with_sdk_extension/lib/foo.dart b/pkg/analyzer_cli/test/data/package_with_sdk_extension/lib/foo.dart
index c56eef9..71e91c8 100644
--- a/pkg/analyzer_cli/test/data/package_with_sdk_extension/lib/foo.dart
+++ b/pkg/analyzer_cli/test/data/package_with_sdk_extension/lib/foo.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/packages_file/sdk_ext_user.dart b/pkg/analyzer_cli/test/data/packages_file/sdk_ext_user.dart
index b346f7f..1a5f662 100644
--- a/pkg/analyzer_cli/test/data/packages_file/sdk_ext_user.dart
+++ b/pkg/analyzer_cli/test/data/packages_file/sdk_ext_user.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/strong_example.dart b/pkg/analyzer_cli/test/data/strong_example.dart
index 2f332cd..514de94 100644
--- a/pkg/analyzer_cli/test/data/strong_example.dart
+++ b/pkg/analyzer_cli/test/data/strong_example.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/super_mixin_example.dart b/pkg/analyzer_cli/test/data/super_mixin_example.dart
index 8983592..8c8a7ec 100644
--- a/pkg/analyzer_cli/test/data/super_mixin_example.dart
+++ b/pkg/analyzer_cli/test/data/super_mixin_example.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/data/test_file.dart b/pkg/analyzer_cli/test/data/test_file.dart
index 1ac3540..334dfb5 100644
--- a/pkg/analyzer_cli/test/data/test_file.dart
+++ b/pkg/analyzer_cli/test/data/test_file.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index cb85943..aa44888 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -36,35 +36,6 @@
   }, name: 'Driver');
 }
 
-/**
- * Call a test that we think will fail.
- *
- * Ensure that we return any thrown exception correctly (avoiding the
- * package:test zone error handler).
- */
-callFailingTest(NoArgFunction expectedFailingTestFn) {
-  final Completer completer = new Completer();
-
-  try {
-    runZoned(
-      () async => await expectedFailingTestFn(),
-      onError: (error) {
-        completer.completeError(error);
-      },
-    ).then((result) {
-      completer.complete(result);
-    }).catchError((error) {
-      completer.completeError(error);
-    });
-  } catch (error) {
-    completer.completeError(error);
-  }
-
-  return completer.future;
-}
-
-typedef dynamic NoArgFunction();
-
 class BaseTest {
   static const emptyOptionsFile = 'data/empty_options.yaml';
 
@@ -85,7 +56,7 @@
   /// [args] and an [options] file path. The value of [options] defaults to an
   /// empty options file to avoid unwanted configuration from an otherwise
   /// discovered options file.
-  Future<Null> drive(
+  Future<void> drive(
     String source, {
     String options: emptyOptionsFile,
     List<String> args: const <String>[],
@@ -94,7 +65,7 @@
   }
 
   /// Like [drive], but takes an array of sources.
-  Future<Null> driveMany(
+  Future<void> driveMany(
     List<String> sources, {
     String options: emptyOptionsFile,
     List<String> args: const <String>[],
@@ -240,7 +211,7 @@
 var b = a;
 ''');
 
-      Future<Null> buildUnlinked(String uri, String path, String output) async {
+      Future<void> buildUnlinked(String uri, String path, String output) async {
         await _doDrive(path, uri: uri, additionalArgs: [
           '--build-summary-only',
           '--build-summary-only-unlinked',
@@ -514,7 +485,7 @@
     });
   }
 
-  Future<Null> _doDrive(String path,
+  Future<void> _doDrive(String path,
       {String uri,
       List<String> additionalArgs: const [],
       String dartSdkSummaryPath}) async {
@@ -777,17 +748,17 @@
   YamlMap _parseOptions(String src) =>
       new AnalysisOptionsProvider().getOptionsFromString(src);
 
-  Future<Null> _runLinter_defaultLints() async {
+  Future<void> _runLinter_defaultLints() async {
     await drive('data/linter_project/test_file.dart',
         options: 'data/linter_project/$optionsFileName', args: ['--lints']);
   }
 
-  Future<Null> _runLinter_lintsInOptions() async {
+  Future<void> _runLinter_lintsInOptions() async {
     await drive('data/linter_project/test_file.dart',
         options: 'data/linter_project/$optionsFileName', args: ['--lints']);
   }
 
-  Future<Null> _runLinter_noLintsFlag() async {
+  Future<void> _runLinter_noLintsFlag() async {
     await drive('data/no_lints_project/test_file.dart',
         options: 'data/no_lints_project/$optionsFileName');
   }
@@ -946,21 +917,17 @@
     expect(outSink.toString(), contains("1 error and 1 warning found."));
   }
 
-  Future<Null> _driveBasic() async {
+  Future<void> _driveBasic() async {
     await drive('data/options_tests_project/test_file.dart',
         options: 'data/options_tests_project/$optionsFileName');
   }
 
   void _expectUndefinedClassErrorsWithoutExclusions() {
-    bool isStrong = usePreviewDart2 || new AnalysisOptionsImpl().previewDart2;
-    final String issueType = isStrong ? 'error' : 'warning';
     expect(bulletToDash(outSink),
-        contains("$issueType - Undefined class 'IncludedUndefinedClass'"));
-    expect(
-        bulletToDash(outSink),
-        isNot(
-            contains("$issueType - Undefined class 'ExcludedUndefinedClass'")));
-    expect(outSink.toString(), contains("1 $issueType found."));
+        contains("error - Undefined class 'IncludedUndefinedClass'"));
+    expect(bulletToDash(outSink),
+        isNot(contains("error - Undefined class 'ExcludedUndefinedClass'")));
+    expect(outSink.toString(), contains("1 error found."));
   }
 }
 
diff --git a/pkg/analyzer_cli/test/embedder_test.dart b/pkg/analyzer_cli/test/embedder_test.dart
index a5d5f04..e32e6f2 100644
--- a/pkg/analyzer_cli/test/embedder_test.dart
+++ b/pkg/analyzer_cli/test/embedder_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/error_test.dart b/pkg/analyzer_cli/test/error_test.dart
deleted file mode 100644
index c8d1d0f..0000000
--- a/pkg/analyzer_cli/test/error_test.dart
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library analyzer_cli.test.error;
-
-import 'package:test/test.dart';
-
-import 'utils.dart';
-
-const badDeclaration = 'var int foo;';
-const badDeclarationMessage = 'Error in test.dart: '
-    'Variables can\'t be declared using both \'var\' and a type name.\n';
-
-void main() {
-  group('error', () {
-    test("a valid Dart file doesn't throw any errors", () {
-      expect(errorsForFile('void main() => print("Hello, world!");'), isNull);
-    });
-
-    test("an empty Dart file doesn't throw any errors", () {
-      expect(errorsForFile(''), isNull);
-    });
-
-    test("an error on the first line", () {
-      expect(errorsForFile('$badDeclaration\n'), equals(badDeclarationMessage));
-    });
-
-    test("an error on the last line", () {
-      expect(errorsForFile('\n$badDeclaration'), equals(badDeclarationMessage));
-    });
-
-    test("an error in the middle", () {
-      expect(
-          errorsForFile('\n$badDeclaration\n'), equals(badDeclarationMessage));
-    });
-
-    var veryLongString = new List.filled(107, ' ').join('');
-
-    test("an error at the end of a very long line", () {
-      expect(errorsForFile('$veryLongString     $badDeclaration'),
-          equals(badDeclarationMessage));
-    });
-
-    test("an error at the beginning of a very long line", () {
-      expect(errorsForFile('$badDeclaration     $veryLongString'),
-          equals(badDeclarationMessage));
-    });
-
-    test("an error in the middle of a very long line", () {
-      expect(errorsForFile('$veryLongString $badDeclaration$veryLongString'),
-          equals(badDeclarationMessage));
-    });
-  });
-}
diff --git a/pkg/analyzer_cli/test/errors_reported_once_test.dart b/pkg/analyzer_cli/test/errors_reported_once_test.dart
index 01905ab..7127abf 100644
--- a/pkg/analyzer_cli/test/errors_reported_once_test.dart
+++ b/pkg/analyzer_cli/test/errors_reported_once_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/errors_upgrade_fails_cli_test.dart b/pkg/analyzer_cli/test/errors_upgrade_fails_cli_test.dart
index fa281ec..851a83e 100644
--- a/pkg/analyzer_cli/test/errors_upgrade_fails_cli_test.dart
+++ b/pkg/analyzer_cli/test/errors_upgrade_fails_cli_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/test/mocks.dart b/pkg/analyzer_cli/test/mocks.dart
index 985464c..49f7251 100644
--- a/pkg/analyzer_cli/test/mocks.dart
+++ b/pkg/analyzer_cli/test/mocks.dart
@@ -1,8 +1,8 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
diff --git a/pkg/analyzer_cli/test/options_test.dart b/pkg/analyzer_cli/test/options_test.dart
index b0c8a8c..55621d3 100644
--- a/pkg/analyzer_cli/test/options_test.dart
+++ b/pkg/analyzer_cli/test/options_test.dart
@@ -1,11 +1,12 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer_cli.test.options;
-
 import 'dart:io';
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/analysis/experiments_impl.dart'
+    show overrideKnownFeatures;
 import 'package:analyzer_cli/src/driver.dart';
 import 'package:analyzer_cli/src/options.dart';
 import 'package:telemetry/telemetry.dart' as telemetry;
@@ -58,6 +59,7 @@
         expect(options.dartSdkPath, isNotNull);
         expect(options.disableCacheFlushing, isFalse);
         expect(options.disableHints, isFalse);
+        expect(options.enabledExperiments, isEmpty);
         expect(options.lints, isFalse);
         expect(options.displayVersion, isFalse);
         expect(options.infosAreFatal, isFalse);
@@ -72,7 +74,6 @@
         expect(options.warningsAreFatal, isFalse);
         expect(options.strongMode, isTrue);
         expect(options.lintsAreFatal, isFalse);
-        expect(options.previewDart2, isTrue);
         expect(options.trainSnapshot, isFalse);
       });
 
@@ -95,6 +96,64 @@
         expect(options.disableCacheFlushing, isTrue);
       });
 
+      group('enable experiment', () {
+        var knownFeatures = {
+          'a': ExperimentalFeature(0, 'a', false, false, 'a'),
+          'b': ExperimentalFeature(1, 'b', false, false, 'b'),
+          'c': ExperimentalFeature(2, 'c', false, false, 'c'),
+        };
+
+        test('no values', () {
+          CommandLineOptions options = overrideKnownFeatures(
+              knownFeatures, () => CommandLineOptions.parse(['foo.dart']));
+          expect(options.enabledExperiments, isEmpty);
+        });
+
+        test('single value', () {
+          CommandLineOptions options = overrideKnownFeatures(
+              knownFeatures,
+              () => CommandLineOptions.parse(
+                  ['--enable-experiment', 'a', 'foo.dart']));
+          expect(options.enabledExperiments, ['a']);
+        });
+
+        group('multiple values', () {
+          test('single flag', () {
+            CommandLineOptions options = overrideKnownFeatures(
+                knownFeatures,
+                () => CommandLineOptions.parse(
+                    ['--enable-experiment', 'a,b', 'foo.dart']));
+            expect(options.enabledExperiments, ['a', 'b']);
+          });
+
+          test('mixed single and multiple flags', () {
+            CommandLineOptions options = overrideKnownFeatures(
+                knownFeatures,
+                () => CommandLineOptions.parse([
+                      '--enable-experiment',
+                      'a,b',
+                      '--enable-experiment',
+                      'c',
+                      'foo.dart'
+                    ]));
+            expect(options.enabledExperiments, ['a', 'b', 'c']);
+          });
+
+          test('multiple flags', () {
+            CommandLineOptions options = overrideKnownFeatures(
+                knownFeatures,
+                () => CommandLineOptions.parse([
+                      '--enable-experiment',
+                      'a',
+                      '--enable-experiment',
+                      'b',
+                      'foo.dart'
+                    ]));
+            expect(options.enabledExperiments, ['a', 'b']);
+          });
+        });
+      });
+
       test('hintsAreFatal', () {
         CommandLineOptions options = CommandLineOptions.parse(
             ['--dart-sdk', '.', '--fatal-hints', 'foo.dart']);
@@ -231,12 +290,6 @@
         expect(options.useFastaParser, isTrue);
       });
 
-      test('--preview-dart-2', () {
-        CommandLineOptions options =
-            CommandLineOptions.parse(['--preview-dart-2', 'foo.dart']);
-        expect(options.previewDart2, isTrue);
-      });
-
       test('--train-snapshot', () {
         CommandLineOptions options =
             CommandLineOptions.parse(['--train-snapshot', 'foo.dart']);
diff --git a/pkg/analyzer_cli/test/package_prefix_test.dart b/pkg/analyzer_cli/test/package_prefix_test.dart
index a85fc16..61ae3b4 100644
--- a/pkg/analyzer_cli/test/package_prefix_test.dart
+++ b/pkg/analyzer_cli/test/package_prefix_test.dart
@@ -1,3 +1,7 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 import 'dart:async';
 import 'dart:io' show exitCode;
 
@@ -60,7 +64,7 @@
 
   String get stdout => _stdout.toString();
 
-  Future<Null> run2(List<String> args) async {
+  Future<void> run2(List<String> args) async {
     await new Driver(isTesting: true).start(args);
     if (stderr.isNotEmpty) {
       fail("Unexpected output to stderr:\n$stderr");
diff --git a/pkg/analyzer_cli/test/perf_report_test.dart b/pkg/analyzer_cli/test/perf_report_test.dart
index 71ba735..2fe369f 100644
--- a/pkg/analyzer_cli/test/perf_report_test.dart
+++ b/pkg/analyzer_cli/test/perf_report_test.dart
@@ -1,9 +1,7 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer_cli.test.perf_report;
-
 import 'dart:convert' show json;
 
 import 'package:analyzer_cli/src/error_formatter.dart' show AnalysisStats;
diff --git a/pkg/analyzer_cli/test/reporter_test.dart b/pkg/analyzer_cli/test/reporter_test.dart
index a86c03d..26d37ac 100644
--- a/pkg/analyzer_cli/test/reporter_test.dart
+++ b/pkg/analyzer_cli/test/reporter_test.dart
@@ -1,8 +1,8 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer_cli/src/ansi.dart' as ansi;
diff --git a/pkg/analyzer_cli/test/sdk_ext_test.dart b/pkg/analyzer_cli/test/sdk_ext_test.dart
index 0559b3a..6ed310f 100644
--- a/pkg/analyzer_cli/test/sdk_ext_test.dart
+++ b/pkg/analyzer_cli/test/sdk_ext_test.dart
@@ -1,10 +1,8 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 /// Test that sdk extensions are properly detected in various scenarios.
-library analyzer_cli.test.sdk_ext;
-
 import 'dart:io';
 
 import 'package:analyzer/src/dart/sdk/sdk.dart';
diff --git a/pkg/analyzer_cli/test/strong_mode_test.dart b/pkg/analyzer_cli/test/strong_mode_test.dart
index 85a4928..1dd5b43 100644
--- a/pkg/analyzer_cli/test/strong_mode_test.dart
+++ b/pkg/analyzer_cli/test/strong_mode_test.dart
@@ -1,9 +1,7 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer_cli.test.strong_mode;
-
 import 'dart:io';
 
 import 'package:analyzer_cli/src/driver.dart' show outSink;
diff --git a/pkg/analyzer_cli/test/utils.dart b/pkg/analyzer_cli/test/utils.dart
index fd431a2..b12c19e 100644
--- a/pkg/analyzer_cli/test/utils.dart
+++ b/pkg/analyzer_cli/test/utils.dart
@@ -1,14 +1,11 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library analyzer_cli.test.utils;
-
 import 'dart:async';
 import 'dart:io';
 import 'dart:mirrors';
 
-import 'package:analyzer/analyzer.dart';
 import 'package:path/path.dart' as pathos;
 
 /// Gets the test directory in a way that works with package:test
@@ -16,33 +13,9 @@
 final String testDirectory = pathos.dirname(
     pathos.fromUri((reflectClass(_TestUtils).owner as LibraryMirror).uri));
 
-/// Returns the string representation of the [AnalyzerErrorGroup] thrown when
-/// parsing [contents] as a Dart file. If [contents] doesn't throw any errors,
-/// this will return null.
-///
-/// This replaces the filename in the error string with its basename, since the
-/// full path will vary from machine to machine. It also replaces the exception
-/// message with "..." to decouple these tests from the specific exception
-/// messages.
-String errorsForFile(String contents) {
-  return withTempDir((temp) {
-    var path = pathos.join(temp, 'test.dart');
-    new File(path).writeAsStringSync(contents);
-    try {
-      parseDartFile(path);
-    } on AnalyzerErrorGroup catch (e) {
-      return e.toString().replaceAllMapped(
-          new RegExp(r"^(Error on line \d+ of )((?:[A-Z]+:)?[^:]+): .*$",
-              multiLine: true),
-          (match) => match[1] + pathos.basename(match[2]) + ': ...');
-    }
-    return null;
-  });
-}
-
 /// Recursively copy the specified [src] directory (or file)
 /// to the specified destination path.
-Future<Null> recursiveCopy(FileSystemEntity src, String dstPath) async {
+Future<void> recursiveCopy(FileSystemEntity src, String dstPath) async {
   if (src is Directory) {
     await (new Directory(dstPath)).create(recursive: true);
     for (FileSystemEntity entity in src.listSync()) {
@@ -58,19 +31,6 @@
 /// completes, the temporary directory and all its contents will be deleted.
 ///
 /// Returns the return value of [fn].
-T withTempDir<T>(T fn(String path)) {
-  var tempDir = Directory.systemTemp.createTempSync('analyzer_').path;
-  try {
-    return fn(tempDir);
-  } finally {
-    new Directory(tempDir).deleteSync(recursive: true);
-  }
-}
-
-/// Creates a temporary directory and passes its path to [fn]. Once [fn]
-/// completes, the temporary directory and all its contents will be deleted.
-///
-/// Returns the return value of [fn].
 Future<dynamic> withTempDirAsync(Future<dynamic> fn(String path)) async {
   var tempDir = (await Directory.systemTemp.createTemp('analyzer_')).path;
   try {
diff --git a/pkg/analyzer_cli/tool/perf.dart b/pkg/analyzer_cli/tool/perf.dart
index 3e622c8..7d9bd7e 100644
--- a/pkg/analyzer_cli/tool/perf.dart
+++ b/pkg/analyzer_cli/tool/perf.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer_cli/tool/perf_test.dart b/pkg/analyzer_cli/tool/perf_test.dart
index 3302a51..b137ec4 100644
--- a/pkg/analyzer_cli/tool/perf_test.dart
+++ b/pkg/analyzer_cli/tool/perf_test.dart
@@ -1,11 +1,9 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 /// The only purpose of this file is to enable analyzer tests on `perf.dart`,
 /// the code here just has a dummy import to the rest of the code.
-library analyzer_cli.tool.perf_test;
-
 import 'perf.dart' as m;
 
 main() => print('done ${m.scanTotalChars}');
diff --git a/pkg/analyzer_fe_comparison/lib/src/kernel.dart b/pkg/analyzer_fe_comparison/lib/src/kernel.dart
index bb87e0b..bb7e328 100644
--- a/pkg/analyzer_fe_comparison/lib/src/kernel.dart
+++ b/pkg/analyzer_fe_comparison/lib/src/kernel.dart
@@ -64,7 +64,7 @@
 
 CompilerOptions _makeCompilerOptions(Uri packagesFileUri, Uri platformUri,
     DiagnosticMessageHandler onDiagnostic) {
-  var targetFlags = TargetFlags(syncAsync: true);
+  var targetFlags = TargetFlags();
   var target = NoneTarget(targetFlags);
   var fileSystem = StandardFileSystem.instance;
 
diff --git a/pkg/analyzer_fe_comparison/pubspec.yaml b/pkg/analyzer_fe_comparison/pubspec.yaml
index 94e9893..fb579c8 100644
--- a/pkg/analyzer_fe_comparison/pubspec.yaml
+++ b/pkg/analyzer_fe_comparison/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer_fe_comparison
-version: 1.0.0
+publish_to: none
 author: Dart Team <misc@dartlang.org>
 description: Tool for comparing the behavior of the analyzer and the front end.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_fe_comparison
diff --git a/pkg/analyzer_plugin/doc/tutorial/debugging.md b/pkg/analyzer_plugin/doc/tutorial/debugging.md
new file mode 100644
index 0000000..d5905e5
--- /dev/null
+++ b/pkg/analyzer_plugin/doc/tutorial/debugging.md
@@ -0,0 +1,63 @@
+# Debugging Plugins
+
+Unfortunately, debugging a plugin is not well supported at this point. The
+server is typically run as a sub-process by a client. Some clients provide a way
+to add command-line arguments when invoking the server, others don't. To make
+matters worse, each plugin is run in a separate isolate.
+
+Nevertheless, there are a few ways to get some information about what's going on
+in a plugin. Those are outlined below. If you know of other useful techniques,
+or if you have a request for better support, please let us know.
+
+## Check the Status Pages
+
+The analysis server has the ability to host a set of web pages that describe the
+current state of the server. One of the pieces of information available through
+those pages is a list of the plugins that are currently being run.
+
+The server does not host these pages unless it has been requested to do so. You
+can request it by passing a command-line argument to the server when it is being
+started. The argument should be similar to `--port=10000` (any valid port number
+will work). You can then point your browser to `http://localhost:10000/status`.
+
+If you're using IntelliJ as your client, there is a gear icon on the Dart
+Analysis view's header that can be used to open the status pages.
+
+The plugin information can be displayed by clicking on "Plugins" in the list on
+the left.
+
+## Check the Instrumentation Log
+
+The analysis server has the ability to log debugging data to a file. For
+historic reasons this file is referred to as the _instrumentation log_. The data
+primarily consists of a record of the communications between the server and both
+the client that started it and any plugins that the server is running.
+
+The server does not write to this file unless it has been requested to do so.
+You can request it by passing a command-line argument to the server when it is
+being started. The argument should be similar to
+`--instrumentation-log-file=/path/to/file.txt`.
+
+## Println Debugging
+
+You cannot use the `print` function to get debugging information because server
+is run by the client in a child process, and hence doesn't have the ability to
+write to the console.
+
+The closest approximation is for the plugin to send notifications to the server
+that will be written to the instrumentation log file. Currently, the best choice
+for this is the `plugin.error` notification. Just be sure that `isFatal` has a
+value of `false`.
+
+## Using Observatory
+
+If the client you're using allows you to pass command-line flags to the VM, then
+you can also run the analysis server under the Observatory. Pass in both
+`--observe` and `--pause-isolates-on-start`, then point your browser to
+`http://localhost:8181`. To learn more, see the
+[observatory][observatory] documentation.
+
+If you're using IntelliJ as your client, open the "Registry..." dialog and edit
+the entry named "dart.server.vm.options".
+
+[observatory]: https://dart-lang.github.io/observatory/
\ No newline at end of file
diff --git a/pkg/analyzer_plugin/doc/tutorial/tutorial.md b/pkg/analyzer_plugin/doc/tutorial/tutorial.md
index 4031afa..8d9fafb 100644
--- a/pkg/analyzer_plugin/doc/tutorial/tutorial.md
+++ b/pkg/analyzer_plugin/doc/tutorial/tutorial.md
@@ -43,9 +43,13 @@
 [Providing Folding Information][folding] -
 How to provide support for code folding.
 
+[Debugging Plugins][debugging] -
+How to debug a plugin.
+
 [assists]: assists.md
 [completion]: completion.md
 [creatingEdits]: creating_edits.md
+[debugging]: debugging.md
 [fixes]: fixes.md
 [folding]: folding.md
 [gettingStarted]: getting_started.md
diff --git a/pkg/analyzer_plugin/lib/plugin/assist_mixin.dart b/pkg/analyzer_plugin/lib/plugin/assist_mixin.dart
index 9eb8286..d17d4cd 100644
--- a/pkg/analyzer_plugin/lib/plugin/assist_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/assist_mixin.dart
@@ -17,10 +17,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for handling assist requests.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class AssistsMixin implements ServerPlugin {
+mixin AssistsMixin implements ServerPlugin {
   /**
    * Return a list containing the assist contributors that should be used to
    * create assists for the file with the given [path].
@@ -67,7 +67,7 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     String path = parameters.file;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     return new DartAssistRequestImpl(
         resourceProvider, parameters.offset, parameters.length, result);
   }
diff --git a/pkg/analyzer_plugin/lib/plugin/completion_mixin.dart b/pkg/analyzer_plugin/lib/plugin/completion_mixin.dart
index 72de7ce..a8aa3b8 100644
--- a/pkg/analyzer_plugin/lib/plugin/completion_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/completion_mixin.dart
@@ -17,10 +17,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for handling code completion requests.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class CompletionMixin implements ServerPlugin {
+mixin CompletionMixin implements ServerPlugin {
   /**
    * Return a list containing the completion contributors that should be used to
    * create completion suggestions for the file with the given [path].
@@ -68,7 +68,7 @@
       CompletionGetSuggestionsParams parameters) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    ResolveResult result = await getResolveResult(parameters.file);
+    ResolvedUnitResult result = await getResolvedUnitResult(parameters.file);
     return new DartCompletionRequestImpl(
         resourceProvider, parameters.offset, result);
   }
diff --git a/pkg/analyzer_plugin/lib/plugin/fix_mixin.dart b/pkg/analyzer_plugin/lib/plugin/fix_mixin.dart
index 917dc3e..a4a113d 100644
--- a/pkg/analyzer_plugin/lib/plugin/fix_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/fix_mixin.dart
@@ -20,23 +20,23 @@
  * mixing in [FixesMixin]. This implements the creation of the fixes request
  * based on the assumption that the driver being created is an [AnalysisDriver].
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin] that also uses
- * [FixesMixin] as a mix-in.
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin] that also uses [FixesMixin] as a
+ * mix-in.
  */
-abstract class DartFixesMixin implements FixesMixin {
+mixin DartFixesMixin implements FixesMixin {
   @override
   Future<FixesRequest> getFixesRequest(EditGetFixesParams parameters) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     String path = parameters.file;
     int offset = parameters.offset;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     return new DartFixesRequestImpl(
         resourceProvider, offset, _getErrors(offset, result), result);
   }
 
-  List<AnalysisError> _getErrors(int offset, ResolveResult result) {
+  List<AnalysisError> _getErrors(int offset, ResolvedUnitResult result) {
     LineInfo lineInfo = result.lineInfo;
     int offsetLine = lineInfo.getLocation(offset).lineNumber;
     return result.errors.where((AnalysisError error) {
@@ -50,10 +50,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for handling fix requests.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class FixesMixin implements ServerPlugin {
+mixin FixesMixin implements ServerPlugin {
   /**
    * Return a list containing the fix contributors that should be used to create
    * fixes for the file with the given [path].
diff --git a/pkg/analyzer_plugin/lib/plugin/folding_mixin.dart b/pkg/analyzer_plugin/lib/plugin/folding_mixin.dart
index 3c8d88c..1ca0f81 100644
--- a/pkg/analyzer_plugin/lib/plugin/folding_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/folding_mixin.dart
@@ -18,16 +18,16 @@
  * request based on the assumption that the driver being created is an
  * [AnalysisDriver].
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin] that also uses
- * [FoldingMixin] as a mix-in.
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin] that also uses [FoldingMixin] as a
+ * mix-in.
  */
-abstract class DartFoldingMixin implements FoldingMixin {
+mixin DartFoldingMixin implements FoldingMixin {
   @override
   Future<FoldingRequest> getFoldingRequest(String path) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     return new DartFoldingRequestImpl(resourceProvider, result);
   }
 }
@@ -36,10 +36,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for producing folding notifications.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class FoldingMixin implements ServerPlugin {
+mixin FoldingMixin implements ServerPlugin {
   /**
    * Return a list containing the folding contributors that should be used
    * to create folding regions for the file with the given [path].
diff --git a/pkg/analyzer_plugin/lib/plugin/highlights_mixin.dart b/pkg/analyzer_plugin/lib/plugin/highlights_mixin.dart
index a401db8..20748c9 100644
--- a/pkg/analyzer_plugin/lib/plugin/highlights_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/highlights_mixin.dart
@@ -18,16 +18,16 @@
  * highlighting request based on the assumption that the driver being created is
  * an [AnalysisDriver].
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin] that also uses
- * [HighlightsMixin] as a mix-in.
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin] that also uses [HighlightsMixin]
+ * as a mix-in.
  */
-abstract class DartHighlightsMixin implements HighlightsMixin {
+mixin DartHighlightsMixin implements HighlightsMixin {
   @override
   Future<HighlightsRequest> getHighlightsRequest(String path) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     return new DartHighlightsRequestImpl(resourceProvider, result);
   }
 }
@@ -36,10 +36,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for producing highlighting notifications.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class HighlightsMixin implements ServerPlugin {
+mixin HighlightsMixin implements ServerPlugin {
   /**
    * Return a list containing the highlighting contributors that should be used
    * to create highlighting information for the file with the given [path].
diff --git a/pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart b/pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart
index 999ba57..be89c6c 100644
--- a/pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/kythe_mixin.dart
@@ -19,18 +19,18 @@
  * request based on the assumption that the driver being created is an
  * [AnalysisDriver].
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin] that also uses
- * [KytheMixin] as a mix-in.
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin] that also uses [KytheMixin] as a
+ * mix-in.
  */
-abstract class DartEntryMixin implements EntryMixin {
+mixin DartEntryMixin implements EntryMixin {
   @override
   Future<EntryRequest> getEntryRequest(
       KytheGetKytheEntriesParams parameters) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     String path = parameters.file;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     return new DartEntryRequestImpl(resourceProvider, result);
   }
 }
@@ -39,10 +39,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for handling kythe.getEntries requests.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class EntryMixin implements ServerPlugin {
+mixin EntryMixin implements ServerPlugin {
   /**
    * Return a list containing the entry contributors that should be used to
    * create entries for the file with the given [path]
diff --git a/pkg/analyzer_plugin/lib/plugin/navigation_mixin.dart b/pkg/analyzer_plugin/lib/plugin/navigation_mixin.dart
index e1e6e28..96bfdc5 100644
--- a/pkg/analyzer_plugin/lib/plugin/navigation_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/navigation_mixin.dart
@@ -19,18 +19,18 @@
  * request based on the assumption that the driver being created is an
  * [AnalysisDriver].
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin] that also uses
- * [NavigationMixin] as a mix-in.
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin] that also uses [NavigationMixin]
+ * as a mix-in.
  */
-abstract class DartNavigationMixin implements NavigationMixin {
+mixin DartNavigationMixin implements NavigationMixin {
   @override
   Future<NavigationRequest> getNavigationRequest(
       AnalysisGetNavigationParams parameters) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     String path = parameters.file;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     int offset = parameters.offset;
     int length = parameters.length;
     if (offset < 0 && length < 0) {
@@ -46,10 +46,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for handling navigation requests.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class NavigationMixin implements ServerPlugin {
+mixin NavigationMixin implements ServerPlugin {
   /**
    * Return a list containing the navigation contributors that should be used to
    * create navigation information for the file with the given [path]
diff --git a/pkg/analyzer_plugin/lib/plugin/occurrences_mixin.dart b/pkg/analyzer_plugin/lib/plugin/occurrences_mixin.dart
index 5766d9b..8547779 100644
--- a/pkg/analyzer_plugin/lib/plugin/occurrences_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/occurrences_mixin.dart
@@ -18,16 +18,16 @@
  * request based on the assumption that the driver being created is an
  * [AnalysisDriver].
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin] that also uses
- * [OccurrencesMixin] as a mix-in.
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin] that also uses [OccurrencesMixin]
+ * as a mix-in.
  */
-abstract class DartOccurrencesMixin implements OccurrencesMixin {
+mixin DartOccurrencesMixin implements OccurrencesMixin {
   @override
   Future<OccurrencesRequest> getOccurrencesRequest(String path) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     return new DartOccurrencesRequestImpl(resourceProvider, result);
   }
 }
@@ -36,10 +36,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for producing occurrences notifications.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class OccurrencesMixin implements ServerPlugin {
+mixin OccurrencesMixin implements ServerPlugin {
   /**
    * Return a list containing the occurrences contributors that should be used
    * to create occurrences information for the file with the given [path].
diff --git a/pkg/analyzer_plugin/lib/plugin/outline_mixin.dart b/pkg/analyzer_plugin/lib/plugin/outline_mixin.dart
index 96bbdc4..4207a25 100644
--- a/pkg/analyzer_plugin/lib/plugin/outline_mixin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/outline_mixin.dart
@@ -18,16 +18,16 @@
  * request based on the assumption that the driver being created is an
  * [AnalysisDriver].
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin] that also uses
- * [OutlineMixin] as a mix-in.
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin] that also uses [OutlineMixin] as a
+ * mix-in.
  */
-abstract class DartOutlineMixin implements OutlineMixin {
+mixin DartOutlineMixin implements OutlineMixin {
   @override
   Future<OutlineRequest> getOutlineRequest(String path) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    ResolveResult result = await getResolveResult(path);
+    ResolvedUnitResult result = await getResolvedUnitResult(path);
     return new DartOutlineRequestImpl(resourceProvider, result);
   }
 }
@@ -36,10 +36,10 @@
  * A mixin that can be used when creating a subclass of [ServerPlugin] to
  * provide most of the implementation for producing outline notifications.
  *
- * Clients may not extend or implement this class, but are allowed to use it as
- * a mix-in when creating a subclass of [ServerPlugin].
+ * Clients may not implement this mixin, but are allowed to use it as a mix-in
+ * when creating a subclass of [ServerPlugin].
  */
-abstract class OutlineMixin implements ServerPlugin {
+mixin OutlineMixin implements ServerPlugin {
   /**
    * Return a list containing the outline contributors that should be used to
    * create outline information for the file with the given [path].
diff --git a/pkg/analyzer_plugin/lib/plugin/plugin.dart b/pkg/analyzer_plugin/lib/plugin/plugin.dart
index 5fb6296..44ad8e9 100644
--- a/pkg/analyzer_plugin/lib/plugin/plugin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/plugin.dart
@@ -208,7 +208,7 @@
    * Throw a [RequestFailure] is the file cannot be analyzed or if the driver
    * associated with the file is not an [AnalysisDriver].
    */
-  Future<ResolveResult> getResolveResult(String path) async {
+  Future<ResolvedUnitResult> getResolvedUnitResult(String path) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     AnalysisDriverGeneric driver = driverForPath(path);
@@ -217,7 +217,8 @@
       throw new RequestFailure(
           RequestErrorFactory.pluginError('Failed to analyze $path', null));
     }
-    ResolveResult result = await (driver as AnalysisDriver).getResult(path);
+    ResolvedUnitResult result =
+        await (driver as AnalysisDriver).getResult(path);
     ResultState state = result.state;
     if (state != ResultState.VALID) {
       // Return an error from the request.
@@ -228,6 +229,16 @@
   }
 
   /**
+   * Return the result of analyzing the file with the given [path].
+   *
+   * Throw a [RequestFailure] is the file cannot be analyzed or if the driver
+   * associated with the file is not an [AnalysisDriver].
+   */
+  @deprecated
+  Future<ResolveResult> getResolveResult(String path) =>
+      getResolvedUnitResult(path);
+
+  /**
    * Handle an 'analysis.getNavigation' request.
    *
    * Throw a [RequestFailure] if the request could not be handled.
diff --git a/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart b/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
index 8d7b094..aa65532 100644
--- a/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
+++ b/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
@@ -121,7 +121,7 @@
   void listen(void onRequest(Request request),
       {Function onError, void onDone()}) {
     void onData(data) {
-      Map<String, Object> requestMap = data;
+      Map<String, Object> requestMap = data as Map<String, Object>;
       Request request = new Request.fromJson(requestMap);
       if (request != null) {
         onRequest(request);
diff --git a/pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart b/pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart
index dcbe5eb..95b0893 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart
@@ -36,7 +36,7 @@
   final int length;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
index 2b61d17..298c22c 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
@@ -66,6 +66,10 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     FileEditBuilderImpl builder = await createFileEditBuilder(path);
+    if (builder == null) {
+      return;
+    }
+
     buildFileEdit(builder);
     if (builder.hasEdits) {
       _change.addFileEdit(builder.fileEdit);
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 7618568..d1ab672 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
@@ -21,6 +21,7 @@
 import 'package:analyzer_plugin/src/utilities/string_utilities.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 import 'package:charcode/ascii.dart';
 
@@ -30,21 +31,24 @@
 class DartChangeBuilderImpl extends ChangeBuilderImpl
     implements DartChangeBuilder {
   /**
-   * The analysis session in which the files being edited were analyzed.
+   * The analysis session in which the files are analyzed and edited.
    */
-  final AnalysisSession session;
+  final ChangeWorkspace workspace;
 
   /**
    * Initialize a newly created change builder.
    */
-  DartChangeBuilderImpl(this.session);
+  DartChangeBuilderImpl(AnalysisSession session)
+      : this.forWorkspace(_SingleSessionWorkspace(session));
+
+  DartChangeBuilderImpl.forWorkspace(this.workspace);
 
   @override
   Future<void> addFileEdit(
       String path, void buildFileEdit(DartFileEditBuilder builder),
       {ImportPrefixGenerator importPrefixGenerator}) {
     return super.addFileEdit(path, (builder) {
-      DartFileEditBuilderImpl dartBuilder = builder;
+      DartFileEditBuilderImpl dartBuilder = builder as DartFileEditBuilderImpl;
       dartBuilder.importPrefixGenerator = importPrefixGenerator;
       buildFileEdit(dartBuilder);
     });
@@ -54,13 +58,19 @@
   Future<DartFileEditBuilderImpl> createFileEditBuilder(String path) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
-    ResolveResult result = await session.getResolvedAst(path);
+
+    if (!workspace.containsFile(path)) {
+      return null;
+    }
+
+    var session = workspace.getSession(path);
+    ResolvedUnitResult result = await session.getResolvedUnit(path);
     ResultState state = result?.state ?? ResultState.INVALID_FILE_TYPE;
     if (state == ResultState.INVALID_FILE_TYPE) {
       throw new AnalysisException('Cannot analyze "$path"');
     }
     int timeStamp = state == ResultState.VALID ? 0 : -1;
-    return new DartFileEditBuilderImpl(this, path, timeStamp, result.unit);
+    return DartFileEditBuilderImpl(this, path, timeStamp, session, result.unit);
   }
 }
 
@@ -402,7 +412,7 @@
       }
     }
 
-    ExecutableElement element = signature.element;
+    ExecutableElement element = signature.element as ExecutableElement;
     String prefix = getIndent(1);
     String prefix2 = getIndent(2);
     ElementKind elementKind = element.kind;
@@ -472,10 +482,11 @@
 
       // TO-DO
       write(prefix2);
-      writeln('// TODO: implement $memberName');
+      write('// TODO: implement $memberName');
 
       if (isSetter) {
         if (invokeSuper) {
+          writeln();
           write(prefix2);
           selectAll(() {
             write('super.');
@@ -485,9 +496,13 @@
             write(';');
           });
           writeln();
+        } else {
+          selectHere();
+          writeln();
         }
       } else if (returnType.isVoid) {
         if (invokeSuper) {
+          writeln();
           write(prefix2);
           selectAll(() {
             write('super.');
@@ -502,8 +517,12 @@
             write(');');
           });
           writeln();
+        } else {
+          selectHere();
+          writeln();
         }
       } else {
+        writeln();
         write(prefix2);
         if (invokeSuper) {
           selectAll(() {
@@ -1087,6 +1106,11 @@
 class DartFileEditBuilderImpl extends FileEditBuilderImpl
     implements DartFileEditBuilder {
   /**
+   * The session that analyzed this file.
+   */
+  final AnalysisSession session;
+
+  /**
    * The compilation unit to which the code will be added.
    */
   final CompilationUnit unit;
@@ -1113,7 +1137,7 @@
    * the given [path] and [timeStamp], and the given fully resolved [unit].
    */
   DartFileEditBuilderImpl(DartChangeBuilderImpl changeBuilder, String path,
-      int timeStamp, this.unit)
+      int timeStamp, this.session, this.unit)
       : libraryElement = unit.declaredElement.library,
         super(changeBuilder, path, timeStamp);
 
@@ -1395,7 +1419,6 @@
    */
   String _getLibraryUriText(Uri what) {
     if (what.scheme == 'file') {
-      var session = (changeBuilder as DartChangeBuilderImpl).session;
       var pathContext = session.resourceProvider.pathContext;
       String whatPath = pathContext.fromUri(what);
       String libraryPath = libraryElement.source.fullName;
@@ -1530,3 +1553,24 @@
         other.prefix == prefix;
   }
 }
+
+/// Workspace that wraps a single [AnalysisSession].
+class _SingleSessionWorkspace extends ChangeWorkspace {
+  final AnalysisSession session;
+
+  _SingleSessionWorkspace(this.session);
+
+  @override
+  bool containsFile(String path) {
+    var analysisContext = session.analysisContext;
+    return analysisContext.contextRoot.isAnalyzed(path);
+  }
+
+  @override
+  AnalysisSession getSession(String path) {
+    if (containsFile(path)) {
+      return session;
+    }
+    throw StateError('Not in a context root: $path');
+  }
+}
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/completion_core.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/completion_core.dart
index 209e451..7bf30d5 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/completion_core.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/completion_core.dart
@@ -84,7 +84,7 @@
   final int offset;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * A flag indicating whether completion has been aborted.
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 03fcb97..69a0aae 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/completion_target.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/completion_target.dart
@@ -154,7 +154,7 @@
       if (containingNode is Comment) {
         // Comments are handled specially: we descend into any CommentReference
         // child node that contains the cursor offset.
-        Comment comment = containingNode;
+        Comment comment = containingNode as Comment;
         for (CommentReference commentReference in comment.references) {
           if (commentReference.offset <= offset &&
               offset <= commentReference.end) {
@@ -276,7 +276,7 @@
         token.type.isKeyword || token.type == TokenType.IDENTIFIER;
 
     Token token = droppedToken ??
-        (entity is AstNode ? (entity as AstNode).beginToken : entity);
+        (entity is AstNode ? (entity as AstNode).beginToken : entity as Token);
     if (token != null && requestOffset < token.offset) {
       token = containingNode.findPrevious(token);
     }
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/element_suggestion_builder.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/element_suggestion_builder.dart
index 546f664..8b93677 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/element_suggestion_builder.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/element_suggestion_builder.dart
@@ -13,7 +13,7 @@
 /**
  * Common mixin for sharing behavior.
  */
-abstract class ElementSuggestionBuilder {
+mixin ElementSuggestionBuilder {
   // Copied from analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
   /**
    * A collection of completion suggestions.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
index a77fe18..e005b30 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
@@ -129,21 +129,26 @@
       return optype;
     }
 
-    target.containingNode
-        .accept(new _OpTypeAstVisitor(optype, target.entity, offset));
-    var methodDeclaration =
-        target.containingNode.getAncestor((node) => node is MethodDeclaration);
-    optype.inMethodBody = methodDeclaration != null;
-    optype.inStaticMethodBody =
-        methodDeclaration is MethodDeclaration && methodDeclaration.isStatic;
+    var targetNode = target.containingNode;
+    targetNode.accept(new _OpTypeAstVisitor(optype, target.entity, offset));
 
-    var functionDeclaration = target.containingNode
-        .getAncestor((node) => node is FunctionDeclaration);
-    optype.inFunctionBody = functionDeclaration != null;
+    var functionBody = targetNode.thisOrAncestorOfType<FunctionBody>();
+    if (functionBody != null) {
+      var parent = functionBody.parent;
 
-    var constructorDeclaration = target.containingNode
-        .getAncestor((node) => node is ConstructorDeclaration);
-    optype.inConstructorBody = constructorDeclaration != null;
+      if (parent is ConstructorDeclaration) {
+        optype.inConstructorBody = true;
+      }
+
+      if (parent is FunctionExpression) {
+        optype.inFunctionBody = true;
+      }
+
+      if (parent is MethodDeclaration) {
+        optype.inMethodBody = true;
+        optype.inStaticMethodBody = parent.isStatic;
+      }
+    }
 
     // If a value should be suggested, suggest also constructors.
     if (optype.includeReturnValueSuggestions) {
@@ -482,6 +487,14 @@
   }
 
   @override
+  visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+    if (identical(entity, node.expression)) {
+      optype.includeReturnValueSuggestions = true;
+      optype.includeTypeNameSuggestions = true;
+    }
+  }
+
+  @override
   visitConstructorName(ConstructorName node) {
     // some PrefixedIdentifier nodes are transformed into
     // ConstructorName nodes during the resolution process.
@@ -548,7 +561,7 @@
     // Given f[], the parser drops the [] from the expression statement
     // but the [] token is the CompletionTarget entity
     if (entity is Token) {
-      Token token = entity;
+      Token token = entity as Token;
       if (token.lexeme == '[]' && offset == token.offset + 1) {
         optype.includeReturnValueSuggestions = true;
         optype.includeTypeNameSuggestions = true;
@@ -976,7 +989,7 @@
   @override
   void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     if (entity is Token) {
-      Token token = entity;
+      Token token = entity as Token;
       if (token.isSynthetic || token.lexeme == ';') {
         optype.includeVarNameSuggestions = true;
       }
diff --git a/pkg/analyzer_plugin/lib/src/utilities/fixes/fixes.dart b/pkg/analyzer_plugin/lib/src/utilities/fixes/fixes.dart
index 54d9b45..8973624 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/fixes/fixes.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/fixes/fixes.dart
@@ -23,7 +23,7 @@
   final List<AnalysisError> errorsToFix;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/folding/folding.dart b/pkg/analyzer_plugin/lib/src/utilities/folding/folding.dart
index 1e7eb67f..2d5578c 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/folding/folding.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/folding/folding.dart
@@ -17,7 +17,7 @@
   final ResourceProvider resourceProvider;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/highlights/highlights.dart b/pkg/analyzer_plugin/lib/src/utilities/highlights/highlights.dart
index bb24bcb..8412dac 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/highlights/highlights.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/highlights/highlights.dart
@@ -17,7 +17,7 @@
   final ResourceProvider resourceProvider;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart b/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
index 72256df..eb4163a 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/kythe/entries.dart
@@ -15,7 +15,7 @@
   final ResourceProvider resourceProvider;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/navigation/navigation.dart b/pkg/analyzer_plugin/lib/src/utilities/navigation/navigation.dart
index f8b4b11..31e004b 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/navigation/navigation.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/navigation/navigation.dart
@@ -23,7 +23,7 @@
   final int offset;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/occurrences/occurrences.dart b/pkg/analyzer_plugin/lib/src/utilities/occurrences/occurrences.dart
index 42b95c2..2538191 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/occurrences/occurrences.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/occurrences/occurrences.dart
@@ -16,7 +16,7 @@
   final ResourceProvider resourceProvider;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart b/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart
index f87c5fc..47fba67 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart
@@ -16,7 +16,7 @@
   final ResourceProvider resourceProvider;
 
   @override
-  final ResolveResult result;
+  final ResolvedUnitResult result;
 
   /**
    * Initialize a newly create request with the given data.
diff --git a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
index ec525ca..ba1ec8f 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
@@ -35,6 +35,8 @@
 
   void declaredFunctionTypeAlias(FunctionTypeAlias declaration);
 
+  void declaredGenericTypeAlias(GenericTypeAlias declaration);
+
   void declaredLabel(Label label, bool isCaseLabel);
 
   void declaredLocalVar(SimpleIdentifier name, TypeAnnotation type);
@@ -113,6 +115,8 @@
         declaredClassTypeAlias(declaration);
       } else if (declaration is FunctionTypeAlias) {
         declaredFunctionTypeAlias(declaration);
+      } else if (declaration is GenericTypeAlias) {
+        declaredGenericTypeAlias(declaration);
       }
     });
   }
diff --git a/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart b/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
index 5fd4f25..c4fe0c2 100644
--- a/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
+++ b/pkg/analyzer_plugin/lib/utilities/analyzer_converter.dart
@@ -36,7 +36,8 @@
     int startLine = -1;
     int startColumn = -1;
     if (lineInfo != null) {
-      analyzer.CharacterLocation lineLocation = lineInfo.getLocation(offset);
+      analyzer.CharacterLocation lineLocation =
+          lineInfo.getLocation(offset) as analyzer.CharacterLocation;
       if (lineLocation != null) {
         startLine = lineLocation.lineNumber;
         startColumn = lineLocation.columnNumber;
@@ -126,6 +127,8 @@
       return plugin.ElementKind.FUNCTION;
     } else if (kind == analyzer.ElementKind.FUNCTION_TYPE_ALIAS) {
       return plugin.ElementKind.FUNCTION_TYPE_ALIAS;
+    } else if (kind == analyzer.ElementKind.GENERIC_FUNCTION_TYPE) {
+      return plugin.ElementKind.FUNCTION_TYPE_ALIAS;
     } else if (kind == analyzer.ElementKind.GETTER) {
       return plugin.ElementKind.GETTER;
     } else if (kind == analyzer.ElementKind.LABEL) {
@@ -340,7 +343,7 @@
       analyzer.LineInfo lineInfo = unitElement.lineInfo;
       if (lineInfo != null) {
         analyzer.CharacterLocation offsetLocation =
-            lineInfo.getLocation(range.offset);
+            lineInfo.getLocation(range.offset) as analyzer.CharacterLocation;
         startLine = offsetLocation.lineNumber;
         startColumn = offsetLocation.columnNumber;
       }
diff --git a/pkg/analyzer_plugin/lib/utilities/assist/assist.dart b/pkg/analyzer_plugin/lib/utilities/assist/assist.dart
index 72c3e0d..7e02aea 100644
--- a/pkg/analyzer_plugin/lib/utilities/assist/assist.dart
+++ b/pkg/analyzer_plugin/lib/utilities/assist/assist.dart
@@ -145,5 +145,5 @@
   /**
    * The analysis result for the file in which the assists are being requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
index 90b4794..25932c0 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
@@ -26,6 +26,8 @@
 abstract class DartChangeBuilder implements ChangeBuilder {
   /**
    * Initialize a newly created change builder.
+   *
+   * TODO(scheglov) Replace this constructor with using workspace.
    */
   factory DartChangeBuilder(AnalysisSession session) = DartChangeBuilderImpl;
 
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_workspace.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_workspace.dart
new file mode 100644
index 0000000..a0f4469
--- /dev/null
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_workspace.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/session.dart';
+
+/// Information about the workspace in which change builders operate.
+abstract class ChangeWorkspace {
+  /// Return `true` if the file with the given [path] is in a context root.
+  bool containsFile(String path);
+
+  /// Return the session that should analyze the given [path], or throw
+  /// [StateError] if the [path] does not belong to a context root.
+  AnalysisSession getSession(String path);
+}
diff --git a/pkg/analyzer_plugin/lib/utilities/completion/completion_core.dart b/pkg/analyzer_plugin/lib/utilities/completion/completion_core.dart
index c037112..6a354cd 100644
--- a/pkg/analyzer_plugin/lib/utilities/completion/completion_core.dart
+++ b/pkg/analyzer_plugin/lib/utilities/completion/completion_core.dart
@@ -160,5 +160,5 @@
    * The analysis result for the file in which the completion is being
    * requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
diff --git a/pkg/analyzer_plugin/lib/utilities/completion/inherited_reference_contributor.dart b/pkg/analyzer_plugin/lib/utilities/completion/inherited_reference_contributor.dart
index c3af0db..e3567fc 100644
--- a/pkg/analyzer_plugin/lib/utilities/completion/inherited_reference_contributor.dart
+++ b/pkg/analyzer_plugin/lib/utilities/completion/inherited_reference_contributor.dart
@@ -21,7 +21,7 @@
  * Plugin developers should extend this function and primarily
  * overload `computeSuggestions` (if needed).
  */
-class InheritedReferenceContributor extends Object
+class InheritedReferenceContributor
     with ElementSuggestionBuilder
     implements CompletionContributor {
   @override
diff --git a/pkg/analyzer_plugin/lib/utilities/completion/type_member_contributor.dart b/pkg/analyzer_plugin/lib/utilities/completion/type_member_contributor.dart
index 28ab1f9..dd4a046 100644
--- a/pkg/analyzer_plugin/lib/utilities/completion/type_member_contributor.dart
+++ b/pkg/analyzer_plugin/lib/utilities/completion/type_member_contributor.dart
@@ -151,7 +151,7 @@
       // Determine the name of the containing method because
       // the most likely completion is a super expression with same name
       MethodDeclaration containingMethod =
-          expression.getAncestor((p) => p is MethodDeclaration);
+          expression.thisOrAncestorOfType<MethodDeclaration>();
       if (containingMethod != null) {
         SimpleIdentifier id = containingMethod.name;
         if (id != null) {
@@ -241,6 +241,17 @@
   }
 
   @override
+  void declaredGenericTypeAlias(GenericTypeAlias declaration) {
+    if (declaration.name.name == targetName) {
+      TypeAnnotation typeName = declaration.functionType.returnType;
+      if (typeName != null) {
+        typeFound = typeName.type;
+      }
+      finished();
+    }
+  }
+
+  @override
   void declaredLabel(Label label, bool isCaseLabel) {
     if (label.label.name == targetName) {
       // no type
diff --git a/pkg/analyzer_plugin/lib/utilities/fixes/fixes.dart b/pkg/analyzer_plugin/lib/utilities/fixes/fixes.dart
index 3b0ab66..377fe37 100644
--- a/pkg/analyzer_plugin/lib/utilities/fixes/fixes.dart
+++ b/pkg/analyzer_plugin/lib/utilities/fixes/fixes.dart
@@ -20,7 +20,7 @@
   /**
    * The analysis result for the file in which the fixes are being requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
 
 /**
@@ -147,11 +147,6 @@
   final String appliedTogetherMessage;
 
   /**
-   * The change can be made with other fixes of this [FixKind].
-   */
-  bool canBeAppliedTogether() => appliedTogetherMessage != null;
-
-  /**
    * Initialize a newly created kind of fix to have the given [name],
    * [priority], [message], and optionally [canBeAppliedTogether] and
    * [appliedTogetherMessage].
@@ -160,11 +155,16 @@
       {this.appliedTogetherMessage: null});
 
   @override
-  String toString() => name;
+  int get hashCode => name.hashCode;
 
   @override
   bool operator ==(o) => o is FixKind && o.name == name;
 
+  /**
+   * The change can be made with other fixes of this [FixKind].
+   */
+  bool canBeAppliedTogether() => appliedTogetherMessage != null;
+
   @override
-  int get hashCode => name.hashCode;
+  String toString() => name;
 }
diff --git a/pkg/analyzer_plugin/lib/utilities/folding/folding.dart b/pkg/analyzer_plugin/lib/utilities/folding/folding.dart
index 7eab6ad..6408d2f 100644
--- a/pkg/analyzer_plugin/lib/utilities/folding/folding.dart
+++ b/pkg/analyzer_plugin/lib/utilities/folding/folding.dart
@@ -23,7 +23,7 @@
    * The analysis result for the file for which the folding regions are being
    * requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
 
 /**
diff --git a/pkg/analyzer_plugin/lib/utilities/highlights/highlights.dart b/pkg/analyzer_plugin/lib/utilities/highlights/highlights.dart
index 59acbe4..f24b280 100644
--- a/pkg/analyzer_plugin/lib/utilities/highlights/highlights.dart
+++ b/pkg/analyzer_plugin/lib/utilities/highlights/highlights.dart
@@ -22,7 +22,7 @@
    * The analysis result for the file for which the highlight regions are being
    * requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
 
 /**
diff --git a/pkg/analyzer_plugin/lib/utilities/kythe/entries.dart b/pkg/analyzer_plugin/lib/utilities/kythe/entries.dart
index b89cab9..11b42d1 100644
--- a/pkg/analyzer_plugin/lib/utilities/kythe/entries.dart
+++ b/pkg/analyzer_plugin/lib/utilities/kythe/entries.dart
@@ -20,7 +20,7 @@
   /**
    * The analysis result for the file in which the entries are being requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
 
 /**
diff --git a/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart b/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart
index d3233bc..3bc3471 100644
--- a/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart
+++ b/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart
@@ -23,7 +23,7 @@
    * The analysis result for the file in which the navigation regions are being
    * requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
 
 /**
diff --git a/pkg/analyzer_plugin/lib/utilities/occurrences/occurrences.dart b/pkg/analyzer_plugin/lib/utilities/occurrences/occurrences.dart
index 820f38e..1fe0c1b 100644
--- a/pkg/analyzer_plugin/lib/utilities/occurrences/occurrences.dart
+++ b/pkg/analyzer_plugin/lib/utilities/occurrences/occurrences.dart
@@ -22,7 +22,7 @@
    * The analysis result for the file for which the occurrences information is
    * being requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
 
 /**
diff --git a/pkg/analyzer_plugin/lib/utilities/outline/outline.dart b/pkg/analyzer_plugin/lib/utilities/outline/outline.dart
index f675976..21983f6 100644
--- a/pkg/analyzer_plugin/lib/utilities/outline/outline.dart
+++ b/pkg/analyzer_plugin/lib/utilities/outline/outline.dart
@@ -21,7 +21,7 @@
   /**
    * The analysis result for the file for which the outline is being requested.
    */
-  ResolveResult get result;
+  ResolvedUnitResult get result;
 }
 
 /**
diff --git a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
index 4a58401..e27ac4c 100644
--- a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
+++ b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
@@ -548,10 +548,10 @@
         return;
       }
       outOfTestExpect(message, isMap);
-      Map messageAsMap = message;
+      Map messageAsMap = message as Map;
       if (messageAsMap.containsKey('id')) {
         outOfTestExpect(messageAsMap['id'], isString);
-        String id = message['id'];
+        String id = message['id'] as String;
         Completer completer = _pendingCommands[id];
         if (completer == null) {
           fail('Unexpected response from server: id=$id');
diff --git a/pkg/analyzer_plugin/test/plugin/assist_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/assist_mixin_test.dart
index 51e9802..f3d65c5 100644
--- a/pkg/analyzer_plugin/test/plugin/assist_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/assist_mixin_test.dart
@@ -5,14 +5,12 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/assist_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/assist/assist.dart';
 import 'package:analyzer_plugin/utilities/assist/assist.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -23,9 +21,7 @@
 }
 
 @reflectiveTest
-class AssistsMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class AssistsMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -34,11 +30,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -90,7 +84,7 @@
   @override
   Future<AssistRequest> getAssistRequest(
       EditGetAssistsParams parameters) async {
-    AnalysisResult result = new MockAnalysisResult();
+    var result = new MockResolvedUnitResult();
     return new DartAssistRequestImpl(
         resourceProvider, parameters.offset, parameters.length, result);
   }
diff --git a/pkg/analyzer_plugin/test/plugin/completion_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/completion_mixin_test.dart
index 0dcc99e..0c51a0a 100644
--- a/pkg/analyzer_plugin/test/plugin/completion_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/completion_mixin_test.dart
@@ -5,14 +5,12 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/completion_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/completion/completion_core.dart';
 import 'package:analyzer_plugin/utilities/completion/completion_core.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -23,9 +21,7 @@
 }
 
 @reflectiveTest
-class CompletionMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class CompletionMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -34,11 +30,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, 'int foo = bar;');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1, content: 'int foo = bar;');
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -98,7 +92,7 @@
   @override
   Future<CompletionRequest> getCompletionRequest(
       CompletionGetSuggestionsParams parameters) async {
-    AnalysisResult result = new MockAnalysisResult();
+    var result = new MockResolvedUnitResult();
     return new DartCompletionRequestImpl(
         resourceProvider, parameters.offset, result);
   }
diff --git a/pkg/analyzer_plugin/test/plugin/fix_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/fix_mixin_test.dart
index 1d785dd..decd70d 100644
--- a/pkg/analyzer_plugin/test/plugin/fix_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/fix_mixin_test.dart
@@ -6,17 +6,15 @@
 
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/fix_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     hide AnalysisError;
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/fixes/fixes.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -27,9 +25,7 @@
 }
 
 @reflectiveTest
-class FixesMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class FixesMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -38,11 +34,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -98,7 +92,7 @@
     int offset = parameters.offset;
     AnalysisError error = new AnalysisError(
         new MockSource(), 0, 0, CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT);
-    AnalysisResult result = new MockAnalysisResult(
+    var result = new MockResolvedUnitResult(
         lineInfo: new LineInfo([0, 20]), errors: [error]);
     return new DartFixesRequestImpl(resourceProvider, offset, [error], result);
   }
diff --git a/pkg/analyzer_plugin/test/plugin/folding_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/folding_mixin_test.dart
index 5123b40..0b429bc 100644
--- a/pkg/analyzer_plugin/test/plugin/folding_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/folding_mixin_test.dart
@@ -5,15 +5,13 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/folding_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/folding/folding.dart';
 import 'package:analyzer_plugin/utilities/folding/folding.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -24,9 +22,7 @@
 }
 
 @reflectiveTest
-class FoldingMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class FoldingMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -35,11 +31,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -93,7 +87,7 @@
 
   @override
   Future<FoldingRequest> getFoldingRequest(String path) async {
-    AnalysisResult result = new MockAnalysisResult(path: path);
+    var result = new MockResolvedUnitResult(path: path);
     return new DartFoldingRequestImpl(resourceProvider, result);
   }
 }
diff --git a/pkg/analyzer_plugin/test/plugin/highlights_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/highlights_mixin_test.dart
index c0b4543..ced8227 100644
--- a/pkg/analyzer_plugin/test/plugin/highlights_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/highlights_mixin_test.dart
@@ -5,15 +5,13 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/highlights_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/highlights/highlights.dart';
 import 'package:analyzer_plugin/utilities/highlights/highlights.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -24,9 +22,7 @@
 }
 
 @reflectiveTest
-class HighlightsMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class HighlightsMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -35,11 +31,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -93,7 +87,7 @@
 
   @override
   Future<HighlightsRequest> getHighlightsRequest(String path) async {
-    AnalysisResult result = new MockAnalysisResult(path: path);
+    var result = new MockResolvedUnitResult(path: path);
     return new DartHighlightsRequestImpl(resourceProvider, result);
   }
 }
diff --git a/pkg/analyzer_plugin/test/plugin/kythe_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/kythe_mixin_test.dart
index 0ce5e0a..63f0f63 100644
--- a/pkg/analyzer_plugin/test/plugin/kythe_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/kythe_mixin_test.dart
@@ -5,14 +5,12 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/kythe_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/kythe/entries.dart';
 import 'package:analyzer_plugin/utilities/kythe/entries.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -23,9 +21,7 @@
 }
 
 @reflectiveTest
-class KytheMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class KytheMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -34,11 +30,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -94,7 +88,7 @@
   @override
   Future<EntryRequest> getEntryRequest(
       KytheGetKytheEntriesParams parameters) async {
-    AnalysisResult result = new MockAnalysisResult();
+    var result = new MockResolvedUnitResult();
     return new DartEntryRequestImpl(resourceProvider, result);
   }
 }
diff --git a/pkg/analyzer_plugin/test/plugin/mocks.dart b/pkg/analyzer_plugin/test/plugin/mocks.dart
index 3e7d651..79bb3bb 100644
--- a/pkg/analyzer_plugin/test/plugin/mocks.dart
+++ b/pkg/analyzer_plugin/test/plugin/mocks.dart
@@ -5,6 +5,7 @@
 import 'dart:async';
 import 'dart:collection';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
@@ -56,22 +57,6 @@
   Future<Null> performWork() => new Future.value(null);
 }
 
-class MockAnalysisResult implements AnalysisResult {
-  @override
-  final List<AnalysisError> errors;
-
-  @override
-  final LineInfo lineInfo;
-
-  @override
-  final String path;
-
-  MockAnalysisResult({this.errors, this.lineInfo, this.path});
-
-  @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-}
-
 class MockChannel implements PluginCommunicationChannel {
   bool _closed = false;
 
@@ -143,6 +128,22 @@
   }
 }
 
+class MockResolvedUnitResult implements ResolvedUnitResult {
+  @override
+  final List<AnalysisError> errors;
+
+  @override
+  final LineInfo lineInfo;
+
+  @override
+  final String path;
+
+  MockResolvedUnitResult({this.errors, this.lineInfo, this.path});
+
+  @override
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
 class MockResourceProvider implements ResourceProvider {
   @override
   noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
diff --git a/pkg/analyzer_plugin/test/plugin/navigation_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/navigation_mixin_test.dart
index 7996888..f4f2ffa 100644
--- a/pkg/analyzer_plugin/test/plugin/navigation_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/navigation_mixin_test.dart
@@ -5,15 +5,13 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/navigation_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
 import 'package:analyzer_plugin/utilities/navigation/navigation.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -24,9 +22,7 @@
 }
 
 @reflectiveTest
-class NavigationMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class NavigationMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -35,11 +31,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -109,7 +103,7 @@
   @override
   Future<NavigationRequest> getNavigationRequest(
       AnalysisGetNavigationParams parameters) async {
-    AnalysisResult result = new MockAnalysisResult(path: parameters.file);
+    var result = new MockResolvedUnitResult(path: parameters.file);
     return new DartNavigationRequestImpl(
         resourceProvider, parameters.offset, parameters.length, result);
   }
diff --git a/pkg/analyzer_plugin/test/plugin/occurrences_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/occurrences_mixin_test.dart
index 6555427..cf2b96f 100644
--- a/pkg/analyzer_plugin/test/plugin/occurrences_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/occurrences_mixin_test.dart
@@ -5,15 +5,13 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/occurrences_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/occurrences/occurrences.dart';
 import 'package:analyzer_plugin/utilities/occurrences/occurrences.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -24,9 +22,7 @@
 }
 
 @reflectiveTest
-class OccurrencesMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class OccurrencesMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -35,11 +31,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -120,7 +114,7 @@
 
   @override
   Future<OccurrencesRequest> getOccurrencesRequest(String path) async {
-    AnalysisResult result = new MockAnalysisResult(path: path);
+    var result = new MockResolvedUnitResult(path: path);
     return new DartOccurrencesRequestImpl(resourceProvider, result);
   }
 }
diff --git a/pkg/analyzer_plugin/test/plugin/outline_mixin_test.dart b/pkg/analyzer_plugin/test/plugin/outline_mixin_test.dart
index 2ac58ad..cd15cfa 100644
--- a/pkg/analyzer_plugin/test/plugin/outline_mixin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/outline_mixin_test.dart
@@ -5,15 +5,13 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/plugin/outline_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
 import 'package:analyzer_plugin/src/utilities/outline/outline.dart';
 import 'package:analyzer_plugin/utilities/outline/outline.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -24,9 +22,7 @@
 }
 
 @reflectiveTest
-class OutlineMixinTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class OutlineMixinTest with ResourceProviderMixin {
   String packagePath1;
   String filePath1;
   ContextRoot contextRoot1;
@@ -35,11 +31,9 @@
   _TestServerPlugin plugin;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
     channel = new MockChannel();
@@ -94,7 +88,7 @@
 
   @override
   Future<OutlineRequest> getOutlineRequest(String path) async {
-    AnalysisResult result = new MockAnalysisResult(path: path);
+    var result = new MockResolvedUnitResult(path: path);
     return new DartOutlineRequestImpl(resourceProvider, result);
   }
 }
diff --git a/pkg/analyzer_plugin/test/plugin/plugin_test.dart b/pkg/analyzer_plugin/test/plugin/plugin_test.dart
index 0356e77..118f33e 100644
--- a/pkg/analyzer_plugin/test/plugin/plugin_test.dart
+++ b/pkg/analyzer_plugin/test/plugin/plugin_test.dart
@@ -5,12 +5,11 @@
 import 'dart:async';
 
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
-import 'package:path/src/context.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -21,9 +20,7 @@
 }
 
 @reflectiveTest
-class ServerPluginTest {
-  MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-
+class ServerPluginTest with ResourceProviderMixin {
   MockChannel channel;
   _TestServerPlugin plugin;
 
@@ -36,16 +33,14 @@
   ContextRoot contextRoot2;
 
   void setUp() {
-    Context pathContext = resourceProvider.pathContext;
-
-    packagePath1 = resourceProvider.convertPath('/package1');
-    filePath1 = pathContext.join(packagePath1, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath1, '');
+    packagePath1 = convertPath('/package1');
+    filePath1 = join(packagePath1, 'lib', 'test.dart');
+    newFile(filePath1);
     contextRoot1 = new ContextRoot(packagePath1, <String>[]);
 
-    packagePath2 = resourceProvider.convertPath('/package2');
-    filePath2 = pathContext.join(packagePath2, 'lib', 'test.dart');
-    resourceProvider.newFile(filePath2, '');
+    packagePath2 = convertPath('/package2');
+    filePath2 = join(packagePath2, 'lib', 'test.dart');
+    newFile(filePath2);
     contextRoot2 = new ContextRoot(packagePath2, <String>[]);
 
     channel = new MockChannel();
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
index 0f8e505..1ed1d1d 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
@@ -4,14 +4,12 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/context/source.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
@@ -33,7 +31,7 @@
   });
 }
 
-abstract class BuilderTestMixin {
+mixin BuilderTestMixin implements AbstractContextTest {
   SourceEdit getEdit(DartChangeBuilder builder) {
     SourceChange sourceChange = builder.sourceChange;
     expect(sourceChange, isNotNull);
@@ -55,14 +53,19 @@
     expect(fileEdit, isNotNull);
     return fileEdit.edits;
   }
+
+  /// Return a newly created Dart change builder.
+  DartChangeBuilderImpl newBuilder() =>
+      new DartChangeBuilder(session) as DartChangeBuilderImpl;
 }
 
 @reflectiveTest
-class DartChangeBuilderImplTest extends AbstractContextTest {
+class DartChangeBuilderImplTest extends AbstractContextTest
+    with BuilderTestMixin {
   test_createFileEditBuilder() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'library test;');
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     DartFileEditBuilderImpl fileEditBuilder =
         await builder.createFileEditBuilder(path);
     expect(fileEditBuilder, const TypeMatcher<DartFileEditBuilder>());
@@ -387,11 +390,11 @@
   }
 
   test_writeClassDeclaration_interfaces() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class A {}');
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -404,10 +407,10 @@
   }
 
   test_writeClassDeclaration_isAbstract() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, '');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -419,10 +422,10 @@
   }
 
   test_writeClassDeclaration_memberWriter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, '');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder).writeClassDeclaration('C',
@@ -436,11 +439,11 @@
   }
 
   test_writeClassDeclaration_mixins_noSuperclass() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class A {}');
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -453,12 +456,12 @@
   }
 
   test_writeClassDeclaration_mixins_superclass() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class A {} class B {}');
     DartType typeA = await _getType(path, 'A');
     DartType typeB = await _getType(path, 'B');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -471,10 +474,10 @@
   }
 
   test_writeClassDeclaration_nameGroupName() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, '');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -493,11 +496,11 @@
   }
 
   test_writeClassDeclaration_superclass() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class B {}');
     DartType typeB = await _getType(path, 'B');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder).writeClassDeclaration('C',
@@ -516,10 +519,10 @@
   }
 
   test_writeConstructorDeclaration_bodyWriter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class C {}');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(9, (DartEditBuilder builder) {
         builder.writeConstructorDeclaration('A', bodyWriter: () {
@@ -532,7 +535,7 @@
   }
 
   test_writeConstructorDeclaration_fieldNames() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, r'''
 class C {
   final int a;
@@ -540,7 +543,7 @@
 }
 ''');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(42, (DartEditBuilder builder) {
         builder.writeConstructorDeclaration('A', fieldNames: ['a', 'bb']);
@@ -551,10 +554,10 @@
   }
 
   test_writeConstructorDeclaration_initializerWriter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class C {}');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(9, (DartEditBuilder builder) {
         builder.writeConstructorDeclaration('A', initializerWriter: () {
@@ -567,10 +570,10 @@
   }
 
   test_writeConstructorDeclaration_parameterWriter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class C {}');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(9, (DartEditBuilder builder) {
         builder.writeConstructorDeclaration('A', parameterWriter: () {
@@ -583,11 +586,11 @@
   }
 
   test_writeFieldDeclaration_initializerWriter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeFieldDeclaration('f',
@@ -601,11 +604,11 @@
   }
 
   test_writeFieldDeclaration_isConst() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeFieldDeclaration('f', isConst: true);
@@ -616,11 +619,11 @@
   }
 
   test_writeFieldDeclaration_isConst_isFinal() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -632,12 +635,12 @@
   }
 
   test_writeFieldDeclaration_isConst_type() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -649,11 +652,11 @@
   }
 
   test_writeFieldDeclaration_isFinal() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeFieldDeclaration('f', isFinal: true);
@@ -664,12 +667,12 @@
   }
 
   test_writeFieldDeclaration_isFinal_type() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -681,11 +684,11 @@
   }
 
   test_writeFieldDeclaration_isStatic() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeFieldDeclaration('f', isStatic: true);
@@ -696,11 +699,11 @@
   }
 
   test_writeFieldDeclaration_nameGroupName() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -721,12 +724,12 @@
   }
 
   test_writeFieldDeclaration_type_typeGroupName() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {} class B {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -747,11 +750,11 @@
   }
 
   test_writeFunctionDeclaration_noReturnType_noParams_body() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder).writeFunctionDeclaration('fib',
@@ -765,11 +768,11 @@
   }
 
   test_writeFunctionDeclaration_noReturnType_noParams_noBody() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -788,11 +791,11 @@
   }
 
   test_writeFunctionDeclaration_noReturnType_params_noBody() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder).writeFunctionDeclaration('fib',
@@ -806,13 +809,13 @@
   }
 
   test_writeFunctionDeclaration_returnType_noParams_noBody() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder).writeFunctionDeclaration('fib',
@@ -831,11 +834,11 @@
   }
 
   test_writeGetterDeclaration_bodyWriter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeGetterDeclaration('g',
@@ -849,11 +852,11 @@
   }
 
   test_writeGetterDeclaration_isStatic() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -865,11 +868,11 @@
   }
 
   test_writeGetterDeclaration_nameGroupName() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -890,12 +893,12 @@
   }
 
   test_writeGetterDeclaration_returnType() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {} class B {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeGetterDeclaration('g',
@@ -916,7 +919,7 @@
   }
 
   test_writeLocalVariableDeclaration_noType_initializer() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 void f() {
 
@@ -924,7 +927,7 @@
     addSource(path, content);
     await driver.getResult(path);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(11, (EditBuilder builder) {
         (builder as DartEditBuilder).writeLocalVariableDeclaration('foo',
@@ -938,7 +941,7 @@
   }
 
   test_writeLocalVariableDeclaration_noType_noInitializer() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 void f() {
 
@@ -946,7 +949,7 @@
     addSource(path, content);
     await driver.getResult(path);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(11, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -965,7 +968,7 @@
   }
 
   test_writeLocalVariableDeclaration_noType_noInitializer_const() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 void f() {
 
@@ -973,7 +976,7 @@
     addSource(path, content);
     await driver.getResult(path);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(11, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -985,7 +988,7 @@
   }
 
   test_writeLocalVariableDeclaration_noType_noInitializer_final() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 void f() {
 
@@ -993,7 +996,7 @@
     addSource(path, content);
     await driver.getResult(path);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(11, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1005,7 +1008,7 @@
   }
 
   test_writeLocalVariableDeclaration_type_initializer() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 void f() {
 
@@ -1014,9 +1017,9 @@
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
 
-    ClassDeclaration A = unit.declarations[1];
+    ClassDeclaration A = unit.declarations[1] as ClassDeclaration;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(11, (EditBuilder builder) {
         (builder as DartEditBuilder).writeLocalVariableDeclaration('foo',
@@ -1030,7 +1033,7 @@
   }
 
   test_writeLocalVariableDeclaration_type_noInitializer() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 void f() {
 
@@ -1039,9 +1042,9 @@
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
 
-    ClassDeclaration A = unit.declarations[1];
+    ClassDeclaration A = unit.declarations[1] as ClassDeclaration;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(11, (EditBuilder builder) {
         (builder as DartEditBuilder).writeLocalVariableDeclaration('foo',
@@ -1060,7 +1063,7 @@
   }
 
   test_writeLocalVariableDeclaration_type_noInitializer_final() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 void f() {
 
@@ -1069,9 +1072,9 @@
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
 
-    ClassDeclaration A = unit.declarations[1];
+    ClassDeclaration A = unit.declarations[1] as ClassDeclaration;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(11, (EditBuilder builder) {
         (builder as DartEditBuilder).writeLocalVariableDeclaration('foo',
@@ -1090,11 +1093,11 @@
   }
 
   test_writeMixinDeclaration_interfaces() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class A {}');
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1107,12 +1110,12 @@
   }
 
   test_writeMixinDeclaration_interfacesAndSuperclassConstraints() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class A {} class B {}');
     DartType typeA = await _getType(path, 'A');
     DartType typeB = await _getType(path, 'B');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder).writeMixinDeclaration('M',
@@ -1125,10 +1128,10 @@
   }
 
   test_writeMixinDeclaration_memberWriter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, '');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder).writeMixinDeclaration('M',
@@ -1142,10 +1145,10 @@
   }
 
   test_writeMixinDeclaration_nameGroupName() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, '');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1164,11 +1167,11 @@
   }
 
   test_writeMixinDeclaration_superclassConstraints() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'class A {}');
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(0, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1529,6 +1532,27 @@
     );
   }
 
+  test_writeOverride_method_returnVoid_abstract() async {
+    await _assertWriteOverride(
+      content: '''
+abstract class A {
+  void test();
+}
+class B extends A {
+}
+''',
+      nameToOverride: 'test',
+      expected: '''
+  @override
+  void test() {
+    // TODO: implement test
+  }
+''',
+      displayText: 'test() { … }',
+      selection: new SourceRange(109, 0),
+    );
+  }
+
   test_writeOverride_method_voidAsTypeArgument_abstract() async {
     await _assertWriteOverride(
       content: '''
@@ -1590,6 +1614,7 @@
   }
 ''',
       displayText: 'value(int value) { … }',
+      selection: new SourceRange(133, 0),
     );
   }
 
@@ -1616,11 +1641,11 @@
   }
 
   test_writeParameter() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeParameter('a');
@@ -1631,12 +1656,12 @@
   }
 
   test_writeParameter_type() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeParameter('a', type: typeA);
@@ -1647,7 +1672,7 @@
   }
 
   test_writeParameterMatchingArgument() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = r'''
 f() {}
 g() {
@@ -1657,13 +1682,14 @@
 ''';
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration g = unit.declarations[1];
-    BlockFunctionBody body = g.functionExpression.body;
-    ExpressionStatement statement = body.block.statements[0];
-    MethodInvocation invocation = statement.expression;
+    FunctionDeclaration g = unit.declarations[1] as FunctionDeclaration;
+    BlockFunctionBody body = g.functionExpression.body as BlockFunctionBody;
+    ExpressionStatement statement =
+        body.block.statements[0] as ExpressionStatement;
+    MethodInvocation invocation = statement.expression as MethodInvocation;
     Expression argument = invocation.argumentList.arguments[0];
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(2, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1675,17 +1701,17 @@
   }
 
   test_writeParameters_named() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'f(int a, {bool b = false, String c}) {}';
     addSource(path, content);
 
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration f = unit.declarations[0];
+    FunctionDeclaration f = unit.declarations[0] as FunctionDeclaration;
     FormalParameterList parameters = f.functionExpression.parameters;
     Iterable<ParameterElement> elements = parameters.parameters
         .map(resolutionMap.elementDeclaredByFormalParameter);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeParameters(elements);
@@ -1697,16 +1723,16 @@
   }
 
   test_writeParameters_positional() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'f(int a, [bool b = false, String c]) {}';
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration f = unit.declarations[0];
+    FunctionDeclaration f = unit.declarations[0] as FunctionDeclaration;
     FormalParameterList parameters = f.functionExpression.parameters;
     Iterable<ParameterElement> elements = parameters.parameters
         .map(resolutionMap.elementDeclaredByFormalParameter);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeParameters(elements);
@@ -1718,16 +1744,16 @@
   }
 
   test_writeParameters_required() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'f(int i, String s) {}';
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration f = unit.declarations[0];
+    FunctionDeclaration f = unit.declarations[0] as FunctionDeclaration;
     FormalParameterList parameters = f.functionExpression.parameters;
     Iterable<ParameterElement> elements = parameters.parameters
         .map(resolutionMap.elementDeclaredByFormalParameter);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeParameters(elements);
@@ -1738,19 +1764,20 @@
   }
 
   test_writeParametersMatchingArguments_named() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 f(int i, String s) {
   g(s, index: i);
 }''';
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration f = unit.declarations[0];
-    BlockFunctionBody body = f.functionExpression.body;
-    ExpressionStatement statement = body.block.statements[0];
-    MethodInvocation invocation = statement.expression;
+    FunctionDeclaration f = unit.declarations[0] as FunctionDeclaration;
+    BlockFunctionBody body = f.functionExpression.body as BlockFunctionBody;
+    ExpressionStatement statement =
+        body.block.statements[0] as ExpressionStatement;
+    MethodInvocation invocation = statement.expression as MethodInvocation;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1762,19 +1789,20 @@
   }
 
   test_writeParametersMatchingArguments_required() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '''
 f(int i, String s) {
   g(s, i);
 }''';
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration f = unit.declarations[0];
-    BlockFunctionBody body = f.functionExpression.body;
-    ExpressionStatement statement = body.block.statements[0];
-    MethodInvocation invocation = statement.expression;
+    FunctionDeclaration f = unit.declarations[0] as FunctionDeclaration;
+    BlockFunctionBody body = f.functionExpression.body as BlockFunctionBody;
+    ExpressionStatement statement =
+        body.block.statements[0] as ExpressionStatement;
+    MethodInvocation invocation = statement.expression as MethodInvocation;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1786,14 +1814,14 @@
   }
 
   test_writeReference_method() async {
-    String aPath = provider.convertPath('/a.dart');
+    String aPath = convertPath('/a.dart');
     addSource(aPath, r'''
 class A {
   void foo() {}
 }
 ''');
 
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = r'''
 import 'a.dart';
 ''';
@@ -1802,7 +1830,7 @@
     var aElement = await _getClassElement(aPath, 'A');
     var fooElement = aElement.methods[0];
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
         builder.writeReference(fooElement);
@@ -1813,10 +1841,10 @@
   }
 
   test_writeReference_topLevel_hasImport_noPrefix() async {
-    String aPath = provider.convertPath('/a.dart');
+    String aPath = convertPath('/home/test/lib/a.dart');
     addSource(aPath, 'const a = 42;');
 
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = r'''
 import 'a.dart';
 ''';
@@ -1824,7 +1852,7 @@
 
     var aElement = await _getTopLevelAccessorElement(aPath, 'a');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
         builder.writeReference(aElement);
@@ -1835,10 +1863,10 @@
   }
 
   test_writeReference_topLevel_hasImport_prefix() async {
-    String aPath = provider.convertPath('/a.dart');
+    String aPath = convertPath('/home/test/lib/a.dart');
     addSource(aPath, 'const a = 42;');
 
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = r'''
 import 'a.dart' as p;
 ''';
@@ -1846,7 +1874,7 @@
 
     var aElement = await _getTopLevelAccessorElement(aPath, 'a');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
         builder.writeReference(aElement);
@@ -1857,16 +1885,16 @@
   }
 
   test_writeReference_topLevel_noImport() async {
-    String aPath = provider.convertPath('/a.dart');
+    String aPath = convertPath('/home/test/bin/a.dart');
     addSource(aPath, 'const a = 42;');
 
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/bin/test.dart');
     String content = '';
     addSource(path, content);
 
     var aElement = await _getTopLevelAccessorElement(aPath, 'a');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
         builder.writeReference(aElement);
@@ -1879,12 +1907,12 @@
   }
 
   test_writeType_dynamic() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(resolutionMap
@@ -1925,13 +1953,13 @@
   }
 
   test_writeType_genericType() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {} class B<E> {}';
     addSource(path, content);
     InterfaceType typeA = await _getType(path, 'A');
     InterfaceType typeB = await _getType(path, 'B');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(typeB.instantiate([typeA]));
@@ -1942,12 +1970,12 @@
   }
 
   test_writeType_groupName() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {} class B extends A {} class C extends B {}';
     addSource(path, content);
     DartType typeC = await _getType(path, 'C');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(typeC, groupName: 'type');
@@ -1964,12 +1992,12 @@
   }
 
   test_writeType_groupName_addSupertypeProposals() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {} class B extends A {} class C extends B {}';
     addSource(path, content);
     DartType typeC = await _getType(path, 'C');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder)
@@ -1997,14 +2025,14 @@
   }
 
   test_writeType_groupName_invalidType() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A<T> {}';
     addSource(path, content);
 
     InterfaceType typeA = await _getType(path, 'A');
     DartType typeT = typeA.typeParameters.single.type;
 
-    var builder = new DartChangeBuilder(session);
+    var builder = newBuilder();
     await builder.addFileEdit(path, (builder) {
       builder.addInsertion(content.length, (builder) {
         // "T" cannot be written, because we are outside of "A".
@@ -2024,11 +2052,11 @@
   }
 
   test_writeType_null() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(null);
@@ -2039,8 +2067,8 @@
   }
 
   test_writeType_prefixGenerator() async {
-    String aPath = provider.convertPath('/a.dart');
-    String bPath = provider.convertPath('/b.dart');
+    String aPath = convertPath('/home/test/lib/a.dart');
+    String bPath = convertPath('/home/test/lib/b.dart');
 
     addSource(aPath, r'''
 class A1 {}
@@ -2050,7 +2078,7 @@
 class B {}
 ''');
 
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = '';
     addSource(path, content);
 
@@ -2063,7 +2091,7 @@
       return '_prefix${nextPrefixIndex++}';
     }
 
-    var builder = new DartChangeBuilder(session);
+    var builder = newBuilder();
     await builder.addFileEdit(path, (builder) {
       builder.addInsertion(content.length - 1, (builder) {
         builder.writeType(a1.type);
@@ -2080,8 +2108,8 @@
     expect(edits, hasLength(2));
     expect(
         edits[0].replacement,
-        equalsIgnoringWhitespace(
-            "import 'a.dart' as _prefix0; import 'b.dart' as _prefix1;"));
+        equalsIgnoringWhitespace("import 'package:test/a.dart' as _prefix0; "
+            "import 'package:test/b.dart' as _prefix1;"));
     expect(
         edits[1].replacement,
         equalsIgnoringWhitespace(
@@ -2089,12 +2117,12 @@
   }
 
   test_writeType_required_dynamic() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
     CompilationUnit unit = (await driver.getResult(path))?.unit;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(
@@ -2111,12 +2139,12 @@
   }
 
   test_writeType_required_notNull() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(typeA, required: true);
@@ -2127,11 +2155,11 @@
   }
 
   test_writeType_required_null() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(null, required: true);
@@ -2142,12 +2170,12 @@
   }
 
   test_writeType_simpleType() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilder).writeType(typeA);
@@ -2167,11 +2195,11 @@
   }
 
   test_writeTypes_empty() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl).writeTypes([]);
@@ -2182,13 +2210,13 @@
   }
 
   test_writeTypes_noPrefix() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {} class B {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
     DartType typeB = await _getType(path, 'B');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl).writeTypes([typeA, typeB]);
@@ -2199,11 +2227,11 @@
   }
 
   test_writeTypes_null() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {}';
     addSource(path, content);
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl).writeTypes(null);
@@ -2214,13 +2242,13 @@
   }
 
   test_writeTypes_prefix() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = 'class A {} class B {}';
     addSource(path, content);
     DartType typeA = await _getType(path, 'A');
     DartType typeB = await _getType(path, 'B');
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 1, (EditBuilder builder) {
         (builder as DartEditBuilderImpl)
@@ -2233,9 +2261,9 @@
 
   Future<void> _assertImportLibrary(
       String initialCode, List<String> newUris, String expectedCode) async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, initialCode);
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (DartFileEditBuilder builder) {
       for (String newUri in newUris) {
         builder.importLibrary(Uri.parse(newUri));
@@ -2266,7 +2294,7 @@
     String displayText,
     SourceRange selection,
   }) async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, content);
 
     TypeSystem typeSystem = await session.typeSystem;
@@ -2279,10 +2307,10 @@
     StringBuffer displayBuffer =
         displayText != null ? new StringBuffer() : null;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       builder.addInsertion(content.length - 2, (EditBuilder builder) {
-        ExecutableElement element = inherited.element;
+        ExecutableElement element = inherited.element as ExecutableElement;
         (builder as DartEditBuilder).writeOverride(
           inherited,
           displayTextBuffer: displayBuffer,
@@ -2299,13 +2327,13 @@
   }
 
   Future<void> _assertWriteType(String typeCode, {String declarations}) async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     String content = (declarations ?? '') + '$typeCode v;';
     addSource(path, content);
 
     var f = await _getTopLevelAccessorElement(path, 'v');
 
-    var builder = new DartChangeBuilder(session);
+    var builder = newBuilder();
     await builder.addFileEdit(path, (builder) {
       builder.addInsertion(content.length - 1, (builder) {
         builder.writeType(f.returnType);
@@ -2336,22 +2364,21 @@
 class DartFileEditBuilderImplTest extends AbstractContextTest
     with BuilderTestMixin {
   TypeProvider get typeProvider {
-    AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
-    context.sourceFactory = new SourceFactoryImpl([new DartUriResolver(sdk)]);
-    return new TestTypeProvider(context);
+    return new TestTypeProvider(null, driver);
   }
 
   test_convertFunctionFromSyncToAsync_closure() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, '''var f = () {}''');
 
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    TopLevelVariableDeclaration variable = unit.declarations[0];
+    TopLevelVariableDeclaration variable =
+        unit.declarations[0] as TopLevelVariableDeclaration;
     FunctionBody body =
         (variable.variables.variables[0].initializer as FunctionExpression)
             .body;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       (builder as DartFileEditBuilder)
           .convertFunctionFromSyncToAsync(body, typeProvider);
@@ -2362,30 +2389,28 @@
   }
 
   test_convertFunctionFromSyncToAsync_topLevelFunction() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'String f() {}');
 
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration function = unit.declarations[0];
+    FunctionDeclaration function = unit.declarations[0] as FunctionDeclaration;
     FunctionBody body = function.functionExpression.body;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       (builder as DartFileEditBuilder)
           .convertFunctionFromSyncToAsync(body, typeProvider);
     });
     List<SourceEdit> edits = getEdits(builder);
-    expect(edits, hasLength(3));
+    expect(edits, hasLength(2));
     expect(edits[0].replacement, equalsIgnoringWhitespace('async'));
-    expect(
-        edits[1].replacement, equalsIgnoringWhitespace("import 'dart:async';"));
-    expect(edits[2].replacement, equalsIgnoringWhitespace('Future<String>'));
+    expect(edits[1].replacement, equalsIgnoringWhitespace('Future<String>'));
   }
 
   test_createEditBuilder() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'library test;');
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       int offset = 4;
       int length = 5;
@@ -2400,37 +2425,35 @@
   }
 
   test_replaceTypeWithFuture() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, 'String f() {}');
 
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    FunctionDeclaration function = unit.declarations[0];
+    FunctionDeclaration function = unit.declarations[0] as FunctionDeclaration;
     TypeAnnotation type = function.returnType;
 
-    DartChangeBuilderImpl builder = new DartChangeBuilder(session);
+    DartChangeBuilderImpl builder = newBuilder();
     await builder.addFileEdit(path, (FileEditBuilder builder) {
       (builder as DartFileEditBuilder)
           .replaceTypeWithFuture(type, typeProvider);
     });
     List<SourceEdit> edits = getEdits(builder);
-    expect(edits, hasLength(2));
-    expect(
-        edits[0].replacement, equalsIgnoringWhitespace("import 'dart:async';"));
-    expect(edits[1].replacement, equalsIgnoringWhitespace('Future<String>'));
+    expect(edits, hasLength(1));
+    expect(edits[0].replacement, equalsIgnoringWhitespace('Future<String>'));
   }
 }
 
 @reflectiveTest
 class DartLinkedEditBuilderImplTest extends AbstractContextTest {
   test_addSuperTypesAsSuggestions() async {
-    String path = provider.convertPath('/test.dart');
+    String path = convertPath('/home/test/lib/test.dart');
     addSource(path, '''
 class A {}
 class B extends A {}
 class C extends B {}
 ''');
     CompilationUnit unit = (await driver.getResult(path))?.unit;
-    ClassDeclaration classC = unit.declarations[2];
+    ClassDeclaration classC = unit.declarations[2] as ClassDeclaration;
     DartLinkedEditBuilderImpl builder = new DartLinkedEditBuilderImpl(null);
     builder.addSuperTypesAsSuggestions(classC.declaredElement.type);
     List<LinkedEditSuggestion> suggestions = builder.suggestions;
diff --git a/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart b/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
index 45c0388..241ec1f 100644
--- a/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
@@ -4,8 +4,8 @@
 
 import 'dart:async';
 
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/generated/parser.dart' as analyzer;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
@@ -36,8 +36,8 @@
     expect(nextOffset, equals(-1), reason: 'too many ^');
     content = content.substring(0, completionOffset) +
         content.substring(completionOffset + 1);
-    testSource = addSource(provider.convertPath('/test.dart'), content);
-    AnalysisResult result = await driver.getResult(testSource.fullName);
+    testSource = addSource('/test.dart', content);
+    ResolvedUnitResult result = await driver.getResult(testSource.fullName);
     target = new CompletionTarget.forOffset(result.unit, completionOffset);
   }
 
@@ -56,7 +56,7 @@
 
     // Assert with parsed unit
     assertCommon();
-    AnalysisResult result = await driver.getResult(testSource.fullName);
+    ResolvedUnitResult result = await driver.getResult(testSource.fullName);
     target = new CompletionTarget.forOffset(result.unit, completionOffset);
     // Assert more with resolved unit
     assertCommon();
diff --git a/pkg/analyzer_plugin/test/src/utilities/completion/optype_test.dart b/pkg/analyzer_plugin/test/src/utilities/completion/optype_test.dart
index f85cb6f..f4c2eb8 100644
--- a/pkg/analyzer_plugin/test/src/utilities/completion/optype_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/completion/optype_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:async';
 
-import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
 import 'package:analyzer_plugin/src/utilities/completion/optype.dart';
@@ -107,11 +107,7 @@
 
   test_AssertInitializer() async {
     addTestSource('class C { C() : assert(^); }');
-    await assertOpType(
-        constructors: true,
-        returnValue: true,
-        typeNames: true,
-        constructorBody: true);
+    await assertOpType(constructors: true, returnValue: true, typeNames: true);
   }
 
   test_AssignmentExpression_RHS() async {
@@ -427,25 +423,13 @@
         methodBody: true);
   }
 
-  test_Block_keyword() async {
-    addTestSource('class C { static C get instance => null; } main() {C.in^}');
-    await assertOpType(
-        constructors: true,
-        prefixed: true,
-        returnValue: true,
-        typeNames: true,
-        voidReturn: true,
-        functionBody: true);
-  }
-
-  test_Block_static() async {
-    addTestSource('class A {static foo() {^}}');
+  test_Block_in_constructor() async {
+    addTestSource('class A {A() {^}}');
     await assertOpType(
         constructors: true,
         returnValue: true,
         typeNames: true,
-        staticMethodBody: true,
-        methodBody: true,
+        constructorBody: true,
         voidReturn: true);
   }
 
@@ -469,13 +453,25 @@
         voidReturn: true);
   }
 
-  test_Block_in_constructor() async {
-    addTestSource('class A {A() {^}}');
+  test_Block_keyword() async {
+    addTestSource('class C { static C get instance => null; } main() {C.in^}');
+    await assertOpType(
+        constructors: true,
+        prefixed: true,
+        returnValue: true,
+        typeNames: true,
+        voidReturn: true,
+        functionBody: true);
+  }
+
+  test_Block_static() async {
+    addTestSource('class A {static foo() {^}}');
     await assertOpType(
         constructors: true,
         returnValue: true,
         typeNames: true,
-        constructorBody: true,
+        staticMethodBody: true,
+        methodBody: true,
         voidReturn: true);
   }
 
@@ -557,7 +553,6 @@
         returnValue: true,
         typeNames: true,
         voidReturn: true,
-        methodBody: true,
         kind: CompletionSuggestionKind.IDENTIFIER);
   }
 
@@ -611,14 +606,40 @@
         methodBody: true);
   }
 
+  test_ConstructorFieldInitializer_name() async {
+    addTestSource(r'''
+class C {
+  final int foo;
+  
+  C() : ^
+}
+''');
+    await assertOpType();
+  }
+
+  test_ConstructorFieldInitializer_value() async {
+    addTestSource(r'''
+class C {
+  final int foo;
+  
+  C() : foo = ^
+}
+''');
+    await assertOpType(
+      constructors: true,
+      returnValue: true,
+      typeNames: true,
+    );
+  }
+
   test_DefaultFormalParameter_named_expression() async {
     // DefaultFormalParameter FormalParameterList MethodDeclaration
     addTestSource('class A {a(blat: ^) { }}');
     await assertOpType(
-        constructors: true,
-        returnValue: true,
-        typeNames: true,
-        methodBody: true);
+      constructors: true,
+      returnValue: true,
+      typeNames: true,
+    );
   }
 
   test_DoStatement() async {
@@ -698,33 +719,33 @@
     // FormalParameterList MethodDeclaration
     addTestSource('class A {a(b.^ f) { }}');
     await assertOpType(
-        constructors: true,
-        returnValue: true,
-        typeNames: true,
-        prefixed: true,
-        methodBody: true);
+      constructors: true,
+      returnValue: true,
+      typeNames: true,
+      prefixed: true,
+    );
   }
 
   test_FormalParameter_partialType2() async {
     // FormalParameterList MethodDeclaration
     addTestSource('class A {a(b.z^ f) { }}');
     await assertOpType(
-        constructors: true,
-        returnValue: true,
-        typeNames: true,
-        prefixed: true,
-        methodBody: true);
+      constructors: true,
+      returnValue: true,
+      typeNames: true,
+      prefixed: true,
+    );
   }
 
   test_FormalParameter_partialType3() async {
     // FormalParameterList MethodDeclaration
     addTestSource('class A {a(b.^) { }}');
     await assertOpType(
-        constructors: true,
-        returnValue: true,
-        typeNames: true,
-        prefixed: true,
-        methodBody: true);
+      constructors: true,
+      returnValue: true,
+      typeNames: true,
+      prefixed: true,
+    );
   }
 
   test_ForStatement_condition() async {
@@ -1604,7 +1625,7 @@
   test_FormalParameterList() async {
     // FormalParameterList MethodDeclaration
     addTestSource('class A {a(^) { }}');
-    await assertOpType(typeNames: true, methodBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_ForStatement_initializer() async {
@@ -1680,7 +1701,7 @@
     addTestSource('''
       /// some dartdoc ^
       zoo(z) { } String name;''');
-    await assertOpType(functionBody: true);
+    await assertOpType();
   }
 
   test_FunctionDeclaration_inLineDocComment2() async {
@@ -1688,7 +1709,7 @@
     addTestSource('''
       /// some ^dartdoc
       zoo(z) { } String name;''');
-    await assertOpType(functionBody: true);
+    await assertOpType();
   }
 
   test_FunctionDeclaration_inStarComment() async {
@@ -1706,13 +1727,13 @@
   test_FunctionDeclaration_inStarDocComment() async {
     // Comment  FunctionDeclaration  CompilationUnit
     addTestSource('/** ^ */ zoo(z) { } String name; ');
-    await assertOpType(functionBody: true);
+    await assertOpType();
   }
 
   test_FunctionDeclaration_inStarDocComment2() async {
     // Comment  FunctionDeclaration  CompilationUnit
     addTestSource('/**  *^/ zoo(z) { } String name;');
-    await assertOpType(functionBody: true);
+    await assertOpType();
   }
 
   test_FunctionDeclaration_returnType() async {
@@ -1743,7 +1764,7 @@
     addTestSource('''
       /// some dartdoc
       ^ zoo(z) { } String name;''');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_FunctionDeclaration_returnType_afterLineDocComment2() async {
@@ -1751,7 +1772,7 @@
     addTestSource('''
 /// some dartdoc
 ^ zoo(z) { } String name;''');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_FunctionDeclaration_returnType_afterStarComment() async {
@@ -1769,19 +1790,19 @@
   test_FunctionDeclaration_returnType_afterStarDocComment() async {
     // FunctionDeclaration  CompilationUnit
     addTestSource('/** */ ^ zoo(z) { } String name;');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_FunctionDeclaration_returnType_afterStarDocComment2() async {
     // FunctionDeclaration  CompilationUnit
     addTestSource('/** */^ zoo(z) { } String name;');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_FunctionExpression() async {
     // BlockFunctionBody  FunctionExpression  FunctionDeclaration
     addTestSource('main()^ { int b = 2; b++; b. }');
-    await assertOpType(functionBody: true);
+    await assertOpType();
   }
 
   test_FunctionExpressionInvocation() async {
@@ -1898,7 +1919,7 @@
       class C2 {
         /// some dartdoc ^
         zoo(z) { } String name; }''');
-    await assertOpType(methodBody: true);
+    await assertOpType();
   }
 
   test_MethodDeclaration_inLineDocComment2() async {
@@ -1907,7 +1928,7 @@
       class C2 {
         /// some ^dartdoc
         zoo(z) { } String name; }''');
-    await assertOpType(methodBody: true);
+    await assertOpType();
   }
 
   test_MethodDeclaration_inStarComment() async {
@@ -1925,13 +1946,13 @@
   test_MethodDeclaration_inStarDocComment() async {
     // Comment  MethodDeclaration  ClassDeclaration  CompilationUnit
     addTestSource('class C2 {/** ^ */ zoo(z) { } String name; }');
-    await assertOpType(methodBody: true);
+    await assertOpType();
   }
 
   test_MethodDeclaration_inStarDocComment2() async {
     // Comment  MethodDeclaration  ClassDeclaration  CompilationUnit
     addTestSource('class C2 {/**  *^/ zoo(z) { } String name; }');
-    await assertOpType(methodBody: true);
+    await assertOpType();
   }
 
   test_MethodDeclaration_returnType() async {
@@ -1965,7 +1986,7 @@
       class C2 {
         /// some dartdoc
         ^ zoo(z) { } String name; }''');
-    await assertOpType(typeNames: true, methodBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_MethodDeclaration_returnType_afterLineDocComment2() async {
@@ -1974,7 +1995,7 @@
 class C2 {
   /// some dartdoc
 ^ zoo(z) { } String name; }''');
-    await assertOpType(typeNames: true, methodBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_MethodDeclaration_returnType_afterStarComment() async {
@@ -1992,13 +2013,13 @@
   test_MethodDeclaration_returnType_afterStarDocComment() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
     addTestSource('class C2 {/** */ ^ zoo(z) { } String name; }');
-    await assertOpType(typeNames: true, methodBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_MethodDeclaration_returnType_afterStarDocComment2() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
     addTestSource('class C2 {/** */^ zoo(z) { } String name; }');
-    await assertOpType(typeNames: true, methodBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_NamedExpression() async {
@@ -2043,49 +2064,49 @@
   test_SimpleFormalParameter_name1() async {
     // SimpleIdentifier  SimpleFormalParameter  FormalParameterList
     addTestSource('m(String na^) {}');
-    await assertOpType(typeNames: false, functionBody: true);
+    await assertOpType(typeNames: false);
   }
 
   test_SimpleFormalParameter_name2() async {
     // SimpleIdentifier  SimpleFormalParameter  FormalParameterList
     addTestSource('m(int first, String na^) {}');
-    await assertOpType(typeNames: false, functionBody: true);
+    await assertOpType(typeNames: false);
   }
 
   test_SimpleFormalParameter_type_optionalNamed() async {
     // SimpleIdentifier  DefaultFormalParameter  FormalParameterList
     addTestSource('m({Str^}) {}');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_SimpleFormalParameter_type_optionalPositional() async {
     // SimpleIdentifier  DefaultFormalParameter  FormalParameterList
     addTestSource('m([Str^]) {}');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_SimpleFormalParameter_type_withName() async {
     // SimpleIdentifier  SimpleFormalParameter  FormalParameterList
     addTestSource('m(Str^ name) {}');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_SimpleFormalParameter_type_withoutName1() async {
     // SimpleIdentifier  SimpleFormalParameter  FormalParameterList
     addTestSource('m(Str^) {}');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_SimpleFormalParameter_type_withoutName2() async {
     // FormalParameterList
     addTestSource('m(^) {}');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_SimpleFormalParameter_type_withoutName3() async {
     // SimpleIdentifier  SimpleFormalParameter  FormalParameterList
     addTestSource('m(int first, Str^) {}');
-    await assertOpType(typeNames: true, functionBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_SwitchCase_before() async {
@@ -2112,7 +2133,7 @@
       class A implements I {
         A(this.^) {}
       }''');
-    await assertOpType(prefixed: true, constructorBody: true);
+    await assertOpType(prefixed: true);
   }
 
   test_ThisExpression_constructor_param2() async {
@@ -2121,7 +2142,7 @@
       class A implements I {
         A(this.f^) {}
       }''');
-    await assertOpType(prefixed: true, constructorBody: true);
+    await assertOpType(prefixed: true);
   }
 
   test_ThisExpression_constructor_param3() async {
@@ -2130,7 +2151,7 @@
       class A implements I {
         A(this.^f) {}
       }''');
-    await assertOpType(prefixed: true, constructorBody: true);
+    await assertOpType(prefixed: true);
   }
 
   test_ThisExpression_constructor_param4() async {
@@ -2139,7 +2160,7 @@
       class A implements I {
         A(Str^ this.foo) {}
       }''');
-    await assertOpType(typeNames: true, constructorBody: true);
+    await assertOpType(typeNames: true);
   }
 
   test_TopLevelVariableDeclaration_typed_name() async {
@@ -2221,7 +2242,7 @@
 
 /// Common test methods to Dart1/Dart2 versions of OpType tests.
 class OpTypeTestCommon extends AbstractContextTest {
-  String testpath;
+  String testPath;
   int completionOffset;
   OpType visitor;
 
@@ -2232,7 +2253,7 @@
     expect(nextOffset, equals(-1), reason: 'too many ^');
     content = content.substring(0, completionOffset) +
         content.substring(completionOffset + 1);
-    super.addSource(testpath, content);
+    super.addSource(testPath, content);
   }
 
   Future<void> assertOpType(
@@ -2251,10 +2272,10 @@
       bool voidReturn: false,
       CompletionSuggestionKind kind:
           CompletionSuggestionKind.INVOCATION}) async {
-    AnalysisResult analysisResult = await driver.getResult(testpath);
+    ResolvedUnitResult resolvedUnit = await driver.getResult(testPath);
 
     CompletionTarget completionTarget =
-        new CompletionTarget.forOffset(analysisResult.unit, completionOffset);
+        new CompletionTarget.forOffset(resolvedUnit.unit, completionOffset);
     visitor = new OpType.forCompletion(completionTarget, completionOffset);
 
     expect(visitor.includeCaseLabelSuggestions, caseLabel, reason: 'caseLabel');
@@ -2283,6 +2304,6 @@
   @override
   void setUp() {
     super.setUp();
-    testpath = provider.convertPath('/completionTest.dart');
+    testPath = convertPath('/completionTest.dart');
   }
 }
diff --git a/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart b/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
index 3811ea4..fd96c31 100644
--- a/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
@@ -42,9 +42,9 @@
 ''');
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(2));
-    FunctionDeclaration f = declarations[1];
+    FunctionDeclaration f = declarations[1] as FunctionDeclaration;
     expect(f, isNotNull);
-    BlockFunctionBody body = f.functionExpression.body;
+    BlockFunctionBody body = f.functionExpression.body as BlockFunctionBody;
     Statement statement = body.block.statements[0];
     expect(statement, const TypeMatcher<ForEachStatement>());
     statement.accept(new TestVisitor(statement.offset));
@@ -70,6 +70,9 @@
   void declaredFunctionTypeAlias(FunctionTypeAlias declaration) {}
 
   @override
+  void declaredGenericTypeAlias(GenericTypeAlias declaration) {}
+
+  @override
   void declaredLabel(Label label, bool isCaseLabel) {}
 
   @override
diff --git a/pkg/analyzer_plugin/test/support/abstract_context.dart b/pkg/analyzer_plugin/test/support/abstract_context.dart
index 8c7cdaf..f06e837 100644
--- a/pkg/analyzer_plugin/test/support/abstract_context.dart
+++ b/pkg/analyzer_plugin/test/support/abstract_context.dart
@@ -10,20 +10,14 @@
 import 'package:analyzer/dart/element/visitor.dart';
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/engine.dart' as engine;
-import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/testing/element_search.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
-
-import 'mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 
 /**
  * Finds an [Element] with the given [name].
@@ -47,24 +41,18 @@
  */
 typedef void _ElementVisitorFunction(Element element);
 
-class AbstractContextTest {
-  MemoryResourceProvider provider;
-  DartSdk sdk;
-  Map<String, List<Folder>> packageMap;
-  UriResolver resourceResolver;
-
-  StringBuffer _logBuffer = new StringBuffer();
-  FileContentOverlay _fileContentOverlay = new FileContentOverlay();
+class AbstractContextTest with ResourceProviderMixin {
   AnalysisDriver _driver;
 
   AnalysisDriver get driver => _driver;
 
-  /**
-   * Return the analysis session associated with the driver.
-   */
   AnalysisSession get session => driver.currentSession;
 
-  Source addMetaPackageSource() => addPackageSource('meta', 'meta.dart', r'''
+  /// The file system specific `/home/test/pubspec.yaml` path.
+  String get testPubspecPath => convertPath('/home/test/pubspec.yaml');
+
+  void addMetaPackage() {
+    addPackageFile('meta', 'meta.dart', r'''
 library meta;
 
 const Required required = const Required();
@@ -74,21 +62,23 @@
   const Required([this.reason]);
 }
 ''');
+  }
 
-  Source addPackageSource(String packageName, String filePath, String content) {
-    packageMap[packageName] = [(newFolder('/pubcache/$packageName'))];
-    File file = newFile('/pubcache/$packageName/$filePath', content);
-    return file.createSource();
+  /// Add a new file with the given [pathInLib] to the package with the
+  /// given [packageName].  Then ensure that the test package depends on the
+  /// [packageName].
+  File addPackageFile(String packageName, String pathInLib, String content) {
+    var packagePath = '/.pub-cache/$packageName';
+    _addTestPackageDependency(packageName, packagePath);
+    return newFile('$packagePath/lib/$pathInLib', content: content);
   }
 
   Source addSource(String path, String content, [Uri uri]) {
-    if (path.startsWith('/')) {
-      path = provider.convertPath(path);
-    }
-    driver.addFile(path);
-    driver.changeFile(path);
-    _fileContentOverlay[path] = content;
-    return provider.getFile(path).createSource();
+    File file = newFile(path, content: content);
+    Source source = file.createSource(uri);
+    driver.addFile(file.path);
+    driver.changeFile(file.path);
+    return source;
   }
 
   Element findElementInUnit(CompilationUnit unit, String name,
@@ -98,55 +88,55 @@
         .single;
   }
 
-  File newFile(String path, [String content]) =>
-      provider.newFile(provider.convertPath(path), content ?? '');
-
-  Folder newFolder(String path) =>
-      provider.newFolder(provider.convertPath(path));
-
-  void processRequiredPlugins() {
-    AnalysisEngine.instance.processRequiredPlugins();
-  }
-
   Future<CompilationUnit> resolveLibraryUnit(Source source) async {
     return (await driver.getResult(source.fullName))?.unit;
   }
 
   void setUp() {
-    processRequiredPlugins();
-    setupResourceProvider();
-    sdk = new MockSdk(resourceProvider: provider);
-    resourceResolver = new ResourceUriResolver(provider);
-    packageMap = new Map<String, List<Folder>>();
-    PackageMapUriResolver packageResolver =
-        new PackageMapUriResolver(provider, packageMap);
-    SourceFactory sourceFactory = new SourceFactory(
-        [new DartUriResolver(sdk), packageResolver, resourceResolver]);
-    PerformanceLog log = new PerformanceLog(_logBuffer);
-    AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    _driver = new AnalysisDriver(
-        scheduler,
-        log,
-        provider,
-        new MemoryByteStore(),
-        _fileContentOverlay,
-        null,
-        sourceFactory,
-        options);
-    scheduler.start();
-    AnalysisEngine.instance.logger = PrintLogger.instance;
-  }
+    new MockSdk(resourceProvider: resourceProvider);
 
-  void setupResourceProvider() {
-    provider = new MemoryResourceProvider();
+    newFolder('/home/test');
+    newFile('/home/test/.packages', content: r'''
+test:file:///home/test/lib
+''');
+
+    _createDriver();
   }
 
   void tearDown() {
-    provider = null;
     AnalysisEngine.instance.clearCaches();
     AnalysisEngine.instance.logger = null;
   }
+
+  void _addTestPackageDependency(String name, String rootPath) {
+    var packagesFile = getFile('/home/test/.packages');
+    var packagesContent = packagesFile.readAsStringSync();
+
+    // Ignore if there is already the same package dependency.
+    if (packagesContent.contains('$name:file://')) {
+      return;
+    }
+
+    packagesContent += '$name:${toUri('$rootPath/lib')}\n';
+
+    packagesFile.writeAsStringSync(packagesContent);
+
+    _createDriver();
+  }
+
+  void _createDriver() {
+    var collection = AnalysisContextCollectionImpl(
+      includedPaths: [convertPath('/home')],
+      enableIndex: true,
+      resourceProvider: resourceProvider,
+      sdkPath: convertPath('/sdk'),
+    );
+
+    var testPath = convertPath('/home/test');
+    var context = collection.contextFor(testPath) as DriverBasedAnalysisContext;
+
+    _driver = context.driver;
+  }
 }
 
 /**
diff --git a/pkg/analyzer_plugin/test/support/abstract_single_unit.dart b/pkg/analyzer_plugin/test/support/abstract_single_unit.dart
index 7a3b6bc..0b14065 100644
--- a/pkg/analyzer_plugin/test/support/abstract_single_unit.dart
+++ b/pkg/analyzer_plugin/test/support/abstract_single_unit.dart
@@ -49,7 +49,7 @@
   AstNode findNodeAtOffset(int offset, [Predicate<AstNode> predicate]) {
     AstNode result = new NodeLocator(offset).searchWithin(testUnit);
     if (result != null && predicate != null) {
-      result = result.getAncestor(predicate);
+      result = result.thisOrAncestorMatching(predicate);
     }
     return result;
   }
@@ -117,6 +117,6 @@
   @override
   void setUp() {
     super.setUp();
-    testFile = provider.convertPath('/test.dart');
+    testFile = convertPath('/test.dart');
   }
 }
diff --git a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
index 3d17d82..775e9a6 100644
--- a/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/analyzer_converter_test.dart
@@ -63,10 +63,8 @@
   @override
   void setUp() {
     super.setUp();
-    source = provider
-        .newFile(provider.convertPath('/foo/bar.dart'), '')
-        .createSource();
-    testFile = provider.convertPath('/test.dart');
+    source = newFile('/foo/bar.dart').createSource();
+    testFile = convertPath('/test.dart');
   }
 
   test_convertAnalysisError_lineInfo_noSeverity() {
@@ -187,7 +185,8 @@
 class B<K, V> {}''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
     {
-      analyzer.ClassElement engineElement = findElementInUnit(unit, '_A');
+      analyzer.ClassElement engineElement =
+          findElementInUnit(unit, '_A') as analyzer.ClassElement;
       // create notification Element
       plugin.Element element = converter.convertElement(engineElement);
       expect(element.kind, plugin.ElementKind.CLASS);
@@ -209,7 +208,8 @@
               plugin.Element.FLAG_PRIVATE);
     }
     {
-      analyzer.ClassElement engineElement = findElementInUnit(unit, 'B');
+      analyzer.ClassElement engineElement =
+          findElementInUnit(unit, 'B') as analyzer.ClassElement;
       // create notification Element
       plugin.Element element = converter.convertElement(engineElement);
       expect(element.kind, plugin.ElementKind.CLASS);
@@ -226,7 +226,7 @@
 }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
     analyzer.ConstructorElement engineElement =
-        findElementInUnit(unit, 'myConstructor');
+        findElementInUnit(unit, 'myConstructor') as analyzer.ConstructorElement;
     // create notification Element
     plugin.Element element = converter.convertElement(engineElement);
     expect(element.kind, plugin.ElementKind.CONSTRUCTOR);
@@ -264,7 +264,8 @@
 enum E2 { three, four }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
     {
-      analyzer.ClassElement engineElement = findElementInUnit(unit, '_E1');
+      analyzer.ClassElement engineElement =
+          findElementInUnit(unit, '_E1') as analyzer.ClassElement;
       expect(engineElement.hasDeprecated, isTrue);
       // create notification Element
       plugin.Element element = converter.convertElement(engineElement);
@@ -286,7 +287,8 @@
               plugin.Element.FLAG_PRIVATE);
     }
     {
-      analyzer.ClassElement engineElement = findElementInUnit(unit, 'E2');
+      analyzer.ClassElement engineElement =
+          findElementInUnit(unit, 'E2') as analyzer.ClassElement;
       // create notification Element
       plugin.Element element = converter.convertElement(engineElement);
       expect(element.kind, plugin.ElementKind.ENUM);
@@ -303,7 +305,8 @@
 enum E2 { three, four }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
     {
-      analyzer.FieldElement engineElement = findElementInUnit(unit, 'one');
+      analyzer.FieldElement engineElement =
+          findElementInUnit(unit, 'one') as analyzer.FieldElement;
       // create notification Element
       plugin.Element element = converter.convertElement(engineElement);
       expect(element.kind, plugin.ElementKind.ENUM_CONSTANT);
@@ -327,7 +330,8 @@
           plugin.Element.FLAG_CONST | plugin.Element.FLAG_STATIC);
     }
     {
-      analyzer.FieldElement engineElement = findElementInUnit(unit, 'three');
+      analyzer.FieldElement engineElement =
+          findElementInUnit(unit, 'three') as analyzer.FieldElement;
       // create notification Element
       plugin.Element element = converter.convertElement(engineElement);
       expect(element.kind, plugin.ElementKind.ENUM_CONSTANT);
@@ -393,7 +397,8 @@
   static const myField = 42;
 }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
-    analyzer.FieldElement engineElement = findElementInUnit(unit, 'myField');
+    analyzer.FieldElement engineElement =
+        findElementInUnit(unit, 'myField') as analyzer.FieldElement;
     // create notification Element
     plugin.Element element = converter.convertElement(engineElement);
     expect(element.kind, plugin.ElementKind.FIELD);
@@ -418,7 +423,7 @@
 ''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
     analyzer.FunctionTypeAliasElement engineElement =
-        findElementInUnit(unit, 'F');
+        findElementInUnit(unit, 'F') as analyzer.FunctionTypeAliasElement;
     // create notification Element
     plugin.Element element = converter.convertElement(engineElement);
     expect(element.kind, plugin.ElementKind.FUNCTION_TYPE_ALIAS);
@@ -437,6 +442,31 @@
     expect(element.flags, 0);
   }
 
+  test_convertElement_genericTypeAlias_function() async {
+    analyzer.Source source = addSource(testFile, '''
+typedef F<T> = int Function(String x);
+''');
+    analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
+    analyzer.FunctionTypeAliasElement engineElement =
+        findElementInUnit(unit, 'F') as analyzer.FunctionTypeAliasElement;
+    // create notification Element
+    plugin.Element element = converter.convertElement(engineElement);
+    expect(element.kind, plugin.ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(element.name, 'F');
+    expect(element.typeParameters, '<T>');
+    {
+      plugin.Location location = element.location;
+      expect(location.file, testFile);
+      expect(location.offset, 8);
+      expect(location.length, 'F'.length);
+      expect(location.startLine, 1);
+      expect(location.startColumn, 9);
+    }
+    expect(element.parameters, '(String x)');
+    expect(element.returnType, 'int');
+    expect(element.flags, 0);
+  }
+
   test_convertElement_getter() async {
     analyzer.Source source = addSource(testFile, '''
 class A {
@@ -444,7 +474,8 @@
 }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
     analyzer.PropertyAccessorElement engineElement =
-        findElementInUnit(unit, 'myGetter', analyzer.ElementKind.GETTER);
+        findElementInUnit(unit, 'myGetter', analyzer.ElementKind.GETTER)
+            as analyzer.PropertyAccessorElement;
     // create notification Element
     plugin.Element element = converter.convertElement(engineElement);
     expect(element.kind, plugin.ElementKind.GETTER);
@@ -470,7 +501,8 @@
   }
 }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
-    analyzer.MethodElement engineElement = findElementInUnit(unit, 'myMethod');
+    analyzer.MethodElement engineElement =
+        findElementInUnit(unit, 'myMethod') as analyzer.MethodElement;
     // create notification Element
     plugin.Element element = converter.convertElement(engineElement);
     expect(element.kind, plugin.ElementKind.METHOD);
@@ -495,7 +527,8 @@
 }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
     analyzer.PropertyAccessorElement engineElement =
-        findElementInUnit(unit, 'mySetter', analyzer.ElementKind.SETTER);
+        findElementInUnit(unit, 'mySetter', analyzer.ElementKind.SETTER)
+            as analyzer.PropertyAccessorElement;
     // create notification Element
     plugin.Element element = converter.convertElement(engineElement);
     expect(element.kind, plugin.ElementKind.SETTER);
@@ -572,7 +605,8 @@
   }
 }''');
     analyzer.CompilationUnit unit = await resolveLibraryUnit(source);
-    analyzer.LabelElement engineElement = findElementInUnit(unit, 'myLabel');
+    analyzer.LabelElement engineElement =
+        findElementInUnit(unit, 'myLabel') as analyzer.LabelElement;
     // create notification Element
     plugin.Element element = converter.convertElement(engineElement);
     expect(element.kind, plugin.ElementKind.LABEL);
diff --git a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
index b8a4aef..665a350 100644
--- a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
+++ b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
@@ -5,9 +5,7 @@
 import 'dart:async';
 
 import 'package:analyzer/dart/analysis/results.dart';
-import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/src/utilities/completion/completion_core.dart';
 import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
@@ -16,7 +14,6 @@
 import 'package:test/test.dart';
 
 import '../../support/abstract_context.dart';
-import 'flutter_util.dart';
 
 int suggestionComparator(CompletionSuggestion s1, CompletionSuggestion s2) {
   String c1 = s1.completion.toLowerCase();
@@ -446,18 +443,15 @@
     return cs;
   }
 
-  /**
-   * Return a [Future] that completes with the containing library information
-   * after it is accessible via [context.getLibrariesContaining].
-   */
   Future<void> computeLibrariesContaining() {
     return driver.getResult(testFile).then((result) => null);
   }
 
   Future computeSuggestions() async {
-    ResolveResult result = await driver.getResult(testFile);
+    ResolvedUnitResult result = await driver.getResult(testFile);
     testSource = result.unit.declaredElement.source;
-    request = new DartCompletionRequestImpl(provider, completionOffset, result);
+    request = new DartCompletionRequestImpl(
+        resourceProvider, completionOffset, result);
 
     CompletionTarget target =
         new CompletionTarget.forOffset(request.result.unit, request.offset);
@@ -472,30 +466,6 @@
     expect(suggestions, isNotNull, reason: 'expected suggestions');
   }
 
-  /**
-   * Configures the [SourceFactory] to have the `flutter` package in
-   * `/packages/flutter/lib` folder.
-   */
-  void configureFlutterPkg(Map<String, String> pathToCode) {
-    pathToCode.forEach((path, code) {
-      provider.newFile('$flutterPkgLibPath/$path', code);
-    });
-    // configure SourceFactory
-    Folder myPkgFolder = provider.getResource(flutterPkgLibPath);
-    UriResolver pkgResolver = new PackageMapUriResolver(provider, {
-      'flutter': [myPkgFolder]
-    });
-    SourceFactory sourceFactory = new SourceFactory(
-        [new DartUriResolver(sdk), pkgResolver, resourceResolver]);
-    driver.configure(sourceFactory: sourceFactory);
-    // force 'flutter' resolution
-    addSource(
-        '/tmp/other.dart',
-        pathToCode.keys
-            .map((path) => "import 'package:flutter/$path';")
-            .join('\n'));
-  }
-
   CompletionContributor createContributor();
 
   void failedCompletion(String message,
@@ -561,7 +531,7 @@
   @override
   void setUp() {
     super.setUp();
-    testFile = provider.convertPath('/completionTest.dart');
+    testFile = convertPath('/home/test/lib/test.dart');
     contributor = createContributor();
   }
 }
diff --git a/pkg/analyzer_plugin/test/utilities/completion/completion_target_test.dart b/pkg/analyzer_plugin/test/utilities/completion/completion_target_test.dart
index 8e1674e..9b44141 100644
--- a/pkg/analyzer_plugin/test/utilities/completion/completion_target_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/completion/completion_target_test.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/ast/token.dart';
@@ -26,6 +25,17 @@
 
 @reflectiveTest
 class CompletionTargetTest {
+  /// Parse a dangling expression (no parent node). The angular plugin, for
+  /// instance, does this.
+  Expression parseDanglingDart(String code) {
+    final reader = new CharSequenceReader(code);
+    final scanner = new Scanner(null, reader, null);
+    final source = new StringSource(code, 'test.dart');
+    final listener = new _ErrorCollector();
+
+    return new Parser(source, listener).parseExpression(scanner.tokenize());
+  }
+
   test_danglingExpressionCompletionIsValid() {
     // Test that users can parse dangling expressions of dart and autocomplete
     // them without crash/with the correct offset information.
@@ -39,17 +49,6 @@
     expect(replacementRange.length, 'identifier'.length);
   }
 
-  /// Parse a dangling expression (no parent node). The angular plugin, for
-  /// instance, does this.
-  Expression parseDanglingDart(String code) {
-    final reader = new CharSequenceReader(code);
-    final scanner = new Scanner(null, reader, null);
-    final source = new StringSource(code, 'test.dart');
-    final listener = new _ErrorCollector();
-
-    return new Parser(source, listener).parseExpression(scanner.tokenize());
-  }
-
   Expression wrapForCompliance(Expression expression) {
     // TODO(mfairhurst) This should be performed for clients or the need should
     // be dropped. It's a fairly valid invariant that all autocompletion target
@@ -69,10 +68,6 @@
 
   _ErrorCollector();
 
-  /// The group of errors collected.
-  AnalyzerErrorGroup get group =>
-      new AnalyzerErrorGroup.fromAnalysisErrors(_errors);
-
   /// Whether any errors where collected.
   bool get hasErrors => !_errors.isEmpty;
 
diff --git a/pkg/analyzer_plugin/test/utilities/completion/inherited_reference_contributor_test.dart b/pkg/analyzer_plugin/test/utilities/completion/inherited_reference_contributor_test.dart
index 9ac962d..b7496ec 100644
--- a/pkg/analyzer_plugin/test/utilities/completion/inherited_reference_contributor_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/completion/inherited_reference_contributor_test.dart
@@ -28,8 +28,8 @@
 
   /// Sanity check.  Permutations tested in local_ref_contributor.
   test_ArgDefaults_inherited_method_with_required_named() async {
-    addMetaPackageSource();
-    resolveSource('/testB.dart', '''
+    addMetaPackage();
+    resolveSource('/home/test/lib/b.dart', '''
 import 'package:meta/meta.dart';
 
 lib libB;
@@ -37,7 +37,7 @@
    bool foo(int bar, {bool boo, @required int baz}) => false;
 }''');
     addTestSource('''
-import "testB.dart";
+import 'b.dart';
 class B extends A {
   b() => f^
 }
@@ -50,13 +50,13 @@
 
   test_AwaitExpression_inherited() async {
     // SimpleIdentifier  AwaitExpression  ExpressionStatement
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A {
   Future y() async {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import 'b.dart';
 class B extends A {
   Future a() async {return 0;}
   foo() async {await ^}
@@ -71,19 +71,19 @@
     assertNotSuggested('B');
     assertNotSuggested('A');
     assertNotSuggested('Object');
-    assertSuggestMethod('y', 'A', 'dynamic');
+    assertSuggestMethod('y', 'A', 'Future<dynamic>');
   }
 
   test_Block_inherited_imported() async {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
       lib B;
       class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
       class E extends F { var e1; e2() { } }
       class I { int i1; i2() { } }
       class M { var m1; int m2() { } }''');
     addTestSource('''
-      import "testB.dart";
+      import 'b.dart';
       class A extends E implements I with M {a() {^}}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
@@ -126,7 +126,7 @@
   }
 
   test_inherited() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -135,7 +135,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import 'b.dart';
 class A1 {
   int x;
   int y() {return 0;}
@@ -178,13 +178,13 @@
   }
 
   test_method_parameters_mixed_required_and_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m(x, {int y}) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -221,13 +221,13 @@
   }
 
   test_method_parameters_mixed_required_and_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m(x, [int y]) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -264,13 +264,13 @@
   }
 
   test_method_parameters_named() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m({x, int y}) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -307,13 +307,13 @@
   }
 
   test_method_parameters_none() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m() {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -344,13 +344,13 @@
   }
 
   test_method_parameters_positional() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m([x, int y]) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -387,13 +387,13 @@
   }
 
   test_method_parameters_required() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   void m(x, int y) {}
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -410,7 +410,7 @@
   }
 
   test_mixin_ordering() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class B {}
 class M1 {
   void m() {}
@@ -420,7 +420,7 @@
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class C extends B with M1, M2 {
   void f() {
     ^
@@ -432,13 +432,13 @@
   }
 
   test_no_parameters_field() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   int x;
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -449,13 +449,13 @@
   }
 
   test_no_parameters_getter() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   int get x => null;
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -466,13 +466,13 @@
   }
 
   test_no_parameters_setter() async {
-    resolveSource('/libA.dart', '''
+    resolveSource('/home/test/lib/a.dart', '''
 class A {
   set x(int value) {};
 }
 ''');
     addTestSource('''
-import 'libA.dart';
+import 'a.dart';
 class B extends A {
   main() {^}
 }
@@ -483,7 +483,7 @@
   }
 
   test_outside_class() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -492,7 +492,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import 'b.dart';
 class A1 {
   int x;
   int y() {return 0;}
@@ -524,7 +524,7 @@
   }
 
   test_static_field() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -533,7 +533,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import 'b.dart';
 class A1 {
   int x;
   int y() {return 0;}
@@ -565,7 +565,7 @@
   }
 
   test_static_method() async {
-    resolveSource('/testB.dart', '''
+    resolveSource('/home/test/lib/b.dart', '''
 lib libB;
 class A2 {
   int x;
@@ -574,7 +574,7 @@
   int y2() {return 0;}
 }''');
     addTestSource('''
-import "testB.dart";
+import 'b.dart';
 class A1 {
   int x;
   int y() {return 0;}
diff --git a/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart b/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart
index 8b3178c..5611381 100644
--- a/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/completion/type_member_contributor_test.dart
@@ -82,7 +82,7 @@
   }
 
   test_ArgDefaults_method_with_optional_positional() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -97,7 +97,7 @@
   }
 
   test_ArgDefaults_method_with_required_named() async {
-    addMetaPackageSource();
+    addMetaPackage();
     addTestSource('''
 import 'package:meta/meta.dart';
 
@@ -114,12 +114,12 @@
 
   test_ArgumentList() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart';
+        import 'a.dart';;
         class B { }
         String bar() => true;
         void main() {expect(^)}''');
@@ -139,13 +139,13 @@
 
   test_ArgumentList_imported_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         expect(arg) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         class B { }
         String bar() => true;
         void main() {expect(^)}''');
@@ -165,14 +165,14 @@
 
   test_ArgumentList_InstanceCreationExpression_functionalArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';;
         class B { }
         String bar() => true;
         void main() {new A(^)}''');
@@ -193,7 +193,7 @@
 
   test_ArgumentList_InstanceCreationExpression_typedefArg() async {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         typedef Funct();
         class A { A(Funct f) { } }
@@ -201,7 +201,7 @@
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';;
         class B { }
         String bar() => true;
         void main() {new A(^)}''');
@@ -222,12 +222,12 @@
 
   test_ArgumentList_local_function() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         expect(arg) { }
         class B { }
         String bar() => true;
@@ -248,12 +248,12 @@
 
   test_ArgumentList_local_method() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         class B {
           expect(arg) { }
           void foo() {expect(^)}}
@@ -274,14 +274,14 @@
 
   test_ArgumentList_MethodInvocation_functionalArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';;
         class B { }
         String bar(f()) => true;
         void main() {bar(^);}''');
@@ -302,14 +302,14 @@
 
   test_ArgumentList_MethodInvocation_methodArg() async {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         class A { A(f()) { } }
         bool hasLength(int expected) { }
         void baz() { }''');
     addTestSource('''
         import 'dart:async';
-        import 'libA.dart';
+        import 'a.dart';;
         class B { String bar(f()) => true; }
         void main() {new B().bar(^);}''');
     await computeSuggestions();
@@ -329,11 +329,11 @@
   test_ArgumentList_namedParam() async {
     // SimpleIdentifier  NamedExpression  ArgumentList  MethodInvocation
     // ExpressionStatement
-    addSource('/libA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library A;
         bool hasLength(int expected) { }''');
     addTestSource('''
-        import 'libA.dart'
+        import 'a.dart';
         String bar() => true;
         void main() {expect(foo: ^)}''');
     await computeSuggestions();
@@ -984,14 +984,14 @@
 
   test_Block_inherited_imported() async {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
         class E extends F { var e1; e2() { } }
         class I { int i1; i2() { } }
         class M { var m1; int m2() { } }''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class A extends E implements I with M {a() {^}}''');
     await computeSuggestions();
 
@@ -1086,10 +1086,10 @@
   }
 
   test_Block_unimported() async {
-    addPackageSource('myBar', 'bar.dart', 'class Foo2 { Foo2() { } }');
+    addPackageFile('myBar', 'bar.dart', 'class Foo2 { Foo2() { } }');
     addSource(
         '/proj/testAB.dart', 'import "package:myBar/bar.dart"; class Foo { }');
-    testFile = provider.convertPath('/proj/completionTest.dart');
+    testFile = convertPath('/proj/completionTest.dart');
     addTestSource('class C {foo(){F^}}');
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
@@ -1102,10 +1102,10 @@
 
   test_CascadeExpression_method1() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class A {var b; X _c;}
         class X{}
         // looks like a cascade to the parser
@@ -1126,10 +1126,10 @@
 
   test_CascadeExpression_selector1() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class A {var b; X _c;}
         class X{}
         // looks like a cascade to the parser
@@ -1150,10 +1150,10 @@
 
   test_CascadeExpression_selector2() async {
     // SimpleIdentifier  PropertyAccess  CascadeExpression  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class A {var b; X _c;}
         class X{}
         main() {A a; a..^z}''');
@@ -1172,10 +1172,10 @@
 
   test_CascadeExpression_selector2_withTrailingReturn() async {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class A {var b; X _c;}
         class X{}
         main() {A a; a..^ return}''');
@@ -1261,10 +1261,10 @@
 
   test_ClassDeclaration_body() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import 'b.dart'; as x;
         @deprecated class A {^}
         class _B {}
         A T;''');
@@ -1280,10 +1280,10 @@
 
   test_ClassDeclaration_body_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import 'b.dart'; as x;
         class A {final ^}
         class _B {}
         A T;''');
@@ -1299,10 +1299,10 @@
 
   test_ClassDeclaration_body_final_field() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import 'b.dart'; as x;
         class A {final ^ A(){}}
         class _B {}
         A T;''');
@@ -1318,10 +1318,10 @@
 
   test_ClassDeclaration_body_final_field2() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as Soo;
+        import 'b.dart'; as Soo;
         class A {final S^ A();}
         class _B {}
         A Sew;''');
@@ -1337,10 +1337,10 @@
 
   test_ClassDeclaration_body_final_final() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import 'b.dart'; as x;
         class A {final ^ final foo;}
         class _B {}
         A T;''');
@@ -1356,10 +1356,10 @@
 
   test_ClassDeclaration_body_final_var() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         class B { }''');
     addTestSource('''
-        import "testB.dart" as x;
+        import 'b.dart'; as x;
         class A {final ^ var foo;}
         class _B {}
         A T;''');
@@ -1423,12 +1423,12 @@
 
   test_ConditionalExpression_elseExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1442,12 +1442,12 @@
 
   test_ConditionalExpression_elseExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1467,12 +1467,12 @@
 
   test_ConditionalExpression_partial_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1486,12 +1486,12 @@
 
   test_ConditionalExpression_partial_thenExpression_empty() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1511,12 +1511,12 @@
 
   test_ConditionalExpression_thenExpression() async {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -1531,13 +1531,13 @@
   test_ConstructorName_importedClass() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         var m;
         main() {new X.^}''');
     await computeSuggestions();
@@ -1555,13 +1555,13 @@
   test_ConstructorName_importedFactory() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         var m;
         main() {new X.^}''');
     await computeSuggestions();
@@ -1715,12 +1715,12 @@
 
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         _B F1() { }
         class A {int x;}
         class _B { }''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         typedef int F2(int blat);
         class Clz = Object with Object;
         class C {foo(){^} void bar() {}}''');
@@ -1741,11 +1741,11 @@
 
   test_ExpressionStatement_name() async {
     // ExpressionStatement  Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         B T1;
         class B{}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {a() {C ^}}''');
     await computeSuggestions();
     assertNoSuggestions();
@@ -1754,9 +1754,9 @@
   test_FieldDeclaration_name_typed() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {A ^}''');
     await computeSuggestions();
     assertNoSuggestions();
@@ -1765,9 +1765,9 @@
   test_FieldDeclaration_name_var() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
-    addSource('/testA.dart', 'class A { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class C {var ^}''');
     await computeSuggestions();
     assertNoSuggestions();
@@ -1917,13 +1917,13 @@
 
   test_FunctionDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -1946,13 +1946,13 @@
 
   test_FunctionDeclaration_returnType_afterComment2() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -1975,13 +1975,13 @@
 
   test_FunctionDeclaration_returnType_afterComment3() async {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2144,12 +2144,12 @@
 
   test_IndexExpression() async {
     // ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -2169,12 +2169,12 @@
 
   test_IndexExpression2() async {
     // SimpleIdentifier IndexExpression ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         class B {int x;}
@@ -2188,12 +2188,12 @@
 
   test_InstanceCreationExpression_imported() async {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         class A {A(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         import "dart:async";
         int T2;
         F2() { }
@@ -2229,13 +2229,13 @@
 
   test_InterpolationExpression() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2258,13 +2258,13 @@
 
   test_InterpolationExpression_block() async {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2324,12 +2324,12 @@
 
   test_IsExpression() async {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class Y {Y.c(); Y._d(); z() {}}
         main() {var x; if (x is ^) { }}''');
     await computeSuggestions();
@@ -2396,14 +2396,14 @@
   }
 
   test_keyword2() async {
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int newT1;
         int T1;
         nowIsIt() { }
         class X {factory X.c(); factory X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         String newer() {}
         var m;
         main() {new^ X.c();}''');
@@ -2456,9 +2456,9 @@
   }
 
   test_libraryPrefix_with_exports() async {
-    addSource('/libA.dart', 'library libA; class A { }');
-    addSource('/libB.dart', 'library libB; export "libA.dart"; class B { }');
-    addTestSource('import "libB.dart" as foo; main() {foo.^} class C { }');
+    addSource('/home/test/lib/a.dart', 'class A { }');
+    addSource('/home/test/lib/b.dart', 'export "a.dart"; class B { }');
+    addTestSource('import "b.dart" as foo; main() {foo.^} class C { }');
     await computeSuggestions();
     // Suggested by LibraryMemberContributor
     assertNotSuggested('B');
@@ -2515,13 +2515,13 @@
 
   test_MapLiteralEntry() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2542,13 +2542,13 @@
 
   test_MapLiteralEntry1() async {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2562,13 +2562,13 @@
 
   test_MapLiteralEntry2() async {
     // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2771,13 +2771,13 @@
 
   test_MethodDeclaration_returnType() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2799,13 +2799,13 @@
 
   test_MethodDeclaration_returnType_afterComment() async {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2827,13 +2827,13 @@
 
   test_MethodDeclaration_returnType_afterComment2() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -2855,13 +2855,13 @@
 
   test_MethodDeclaration_returnType_afterComment3() async {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         int T1;
         F1() { }
         typedef D1();
         class C1 {C1(this.x) { } int x;}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         int T2;
         F2() { }
         typedef D2();
@@ -3052,14 +3052,14 @@
 
   test_partFile_TypeName() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         library libA;
-        import "testB.dart";
+        import 'b.dart';
         part "$testFile";
         class A { }
         var m;''');
@@ -3084,18 +3084,18 @@
 
   test_partFile_TypeName2() async {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         int T1;
         F1() { }
         class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         part of libA;
         class B { }''');
     addTestSource('''
         library libA;
-        import "testB.dart";
-        part "testA.dart";
+        import 'b.dart';
+        part "a.dart";
         class A { A({String boo: 'hoo'}) { } }
         main() {new ^}
         var m;''');
@@ -3116,7 +3116,7 @@
 
   test_PrefixedIdentifier_class_const() async {
     // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class I {
           static const scI = 'boo';
@@ -3130,7 +3130,7 @@
           m(X x) {} I _n(X x) {}}
         class X{}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class A extends B {
           static const String scA = 'foo';
           w() { }}
@@ -3162,7 +3162,7 @@
 
   test_PrefixedIdentifier_class_imported() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class I {X get f => new A();get _g => new A();}
         class A implements I {
@@ -3173,7 +3173,7 @@
           m(X x) {} I _n(X x) {}}
         class X{}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         main() {A a; a.^}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
@@ -3238,13 +3238,13 @@
 
   test_PrefixedIdentifier_library() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "testB.dart" as b;
+        import 'b.dart'; as b;
         var T2;
         class A { }
         main() {b.^}''');
@@ -3264,13 +3264,13 @@
 
   test_PrefixedIdentifier_library_typesOnly() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "testB.dart" as b;
+        import 'b.dart'; as b;
         var T2;
         class A { }
         foo(b.^ f) {}''');
@@ -3290,13 +3290,13 @@
 
   test_PrefixedIdentifier_library_typesOnly2() async {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         var T1;
         class X { }
         class Y { }''');
     addTestSource('''
-        import "testB.dart" as b;
+        import 'b.dart'; as b;
         var T2;
         class A { }
         foo(b.^) {}''');
@@ -3316,13 +3316,13 @@
 
   test_PrefixedIdentifier_parameter() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         class _W {M y; var _z;}
         class X extends _W {}
         class M{}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         foo(X x) {x.^}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
@@ -3334,11 +3334,11 @@
 
   test_PrefixedIdentifier_prefix() async {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class A {static int bar = 10;}
         _B() {}''');
     addTestSource('''
-        import "testA.dart";
+        import "a.dart";
         class X {foo(){A^.bar}}''');
     await computeSuggestions();
     expect(replacementOffset, completionOffset - 1);
@@ -3903,12 +3903,12 @@
 
   test_TypeArgumentList() async {
     // SimpleIdentifier  BinaryExpression  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class C1 {int x;}
         F1() => 0;
         typedef String T1(int blat);''');
     addTestSource('''
-        import "testA.dart";'
+        import "a.dart";'
         class C2 {int x;}
         F2() => 0;
         typedef int T2(int blat);
@@ -3928,12 +3928,12 @@
 
   test_TypeArgumentList2() async {
     // TypeName  TypeArgumentList  TypeName
-    addSource('/testA.dart', '''
+    addSource('/home/test/lib/a.dart', '''
         class C1 {int x;}
         F1() => 0;
         typedef String T1(int blat);''');
     addTestSource('''
-        import "testA.dart";'
+        import "a.dart";'
         class C2 {int x;}
         F2() => 0;
         typedef int T2(int blat);
@@ -3949,13 +3949,13 @@
   test_VariableDeclaration_name() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class Y {Y.c(); Y._d(); z() {}}
         main() {var ^}''');
     await computeSuggestions();
@@ -3974,13 +3974,13 @@
   test_VariableDeclarationStatement_RHS() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         class Y {Y.c(); Y._d(); z() {}}
         class C {bar(){var f; {var x;} var e = ^}}''');
     await computeSuggestions();
@@ -3998,14 +3998,14 @@
   test_VariableDeclarationStatement_RHS_missing_semicolon() async {
     // VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource('/home/test/lib/b.dart', '''
         lib B;
         foo1() { }
         void bar1() { }
         class _B { }
         class X {X.c(); X._d(); z() {}}''');
     addTestSource('''
-        import "testB.dart";
+        import 'b.dart';
         foo2() { }
         void bar2() { }
         class Y {Y.c(); Y._d(); z() {}}
diff --git a/pkg/analyzer_plugin/test/utilities/navigation_test.dart b/pkg/analyzer_plugin/test/utilities/navigation_test.dart
index fdafcd3..80ec0db 100644
--- a/pkg/analyzer_plugin/test/utilities/navigation_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/navigation_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/results.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
 import 'package:analyzer_plugin/utilities/generator.dart';
 import 'package:analyzer_plugin/utilities/navigation/navigation.dart';
@@ -17,15 +17,13 @@
 }
 
 @reflectiveTest
-class NavigationGeneratorTest {
-  MemoryResourceProvider provider = new MemoryResourceProvider();
-
-  ResolveResult resolveResult = new MockAnalysisResult(path: 'a.dart');
+class NavigationGeneratorTest with ResourceProviderMixin {
+  ResolvedUnitResult resolvedUnit = new MockResolvedUnitResult(path: 'a.dart');
 
   test_none() {
     NavigationGenerator generator = new NavigationGenerator([]);
     NavigationRequest request =
-        new DartNavigationRequestImpl(provider, 0, 100, resolveResult);
+        new DartNavigationRequestImpl(resourceProvider, 0, 100, resolvedUnit);
     GeneratorResult result = generator.generateNavigationNotification(request);
     expect(result.notifications, hasLength(1));
   }
@@ -34,7 +32,7 @@
     TestContributor contributor = new TestContributor();
     NavigationGenerator generator = new NavigationGenerator([contributor]);
     NavigationRequest request =
-        new DartNavigationRequestImpl(provider, 0, 100, resolveResult);
+        new DartNavigationRequestImpl(resourceProvider, 0, 100, resolvedUnit);
     GeneratorResult result = generator.generateNavigationNotification(request);
     expect(result.notifications, hasLength(1));
     expect(contributor.count, 1);
@@ -53,7 +51,7 @@
     NavigationGenerator generator = new NavigationGenerator(
         [contributor1, contributor2, contributor3, contributor4]);
     NavigationRequest request =
-        new DartNavigationRequestImpl(provider, 0, 100, resolveResult);
+        new DartNavigationRequestImpl(resourceProvider, 0, 100, resolvedUnit);
     GeneratorResult result = generator.generateNavigationNotification(request);
     expect(result.notifications, hasLength(3));
     expect(
diff --git a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
index af79bc1..105ae6f 100644
--- a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
@@ -29,7 +29,8 @@
 
   test_endEnd() async {
     await resolveTestUnit('main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     FunctionBody mainBody = mainFunction.functionExpression.body;
     expect(range.endEnd(mainName, mainBody), new SourceRange(4, 5));
@@ -37,14 +38,16 @@
 
   test_endLength() async {
     await resolveTestUnit('main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     expect(range.endLength(mainName, 3), new SourceRange(4, 3));
   }
 
   test_endStart() async {
     await resolveTestUnit('main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     FunctionBody mainBody = mainFunction.functionExpression.body;
     expect(range.endStart(mainName, mainBody), new SourceRange(4, 3));
@@ -58,14 +61,16 @@
 
   test_node() async {
     await resolveTestUnit('main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     expect(range.node(mainName), new SourceRange(0, 4));
   }
 
   test_nodes() async {
     await resolveTestUnit(' main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     FunctionBody mainBody = mainFunction.functionExpression.body;
     expect(range.nodes([mainName, mainBody]), new SourceRange(1, 9));
@@ -82,7 +87,8 @@
 
   test_startEnd_nodeNode() async {
     await resolveTestUnit(' main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     FunctionBody mainBody = mainFunction.functionExpression.body;
     expect(range.startEnd(mainName, mainBody), new SourceRange(1, 9));
@@ -90,7 +96,8 @@
 
   test_startLength_node() async {
     await resolveTestUnit(' main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     expect(range.startLength(mainName, 10), new SourceRange(1, 10));
   }
@@ -101,7 +108,8 @@
 
   test_startStart_nodeNode() async {
     await resolveTestUnit('main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     FunctionBody mainBody = mainFunction.functionExpression.body;
     expect(range.startStart(mainName, mainBody), new SourceRange(0, 7));
@@ -109,7 +117,8 @@
 
   test_token() async {
     await resolveTestUnit(' main() {}');
-    FunctionDeclaration mainFunction = testUnit.declarations[0];
+    FunctionDeclaration mainFunction =
+        testUnit.declarations[0] as FunctionDeclaration;
     SimpleIdentifier mainName = mainFunction.name;
     expect(range.token(mainName.beginToken), new SourceRange(1, 4));
   }
diff --git a/pkg/compiler/lib/src/backend_strategy.dart b/pkg/compiler/lib/src/backend_strategy.dart
index 5711ff3..c5cfe60 100644
--- a/pkg/compiler/lib/src/backend_strategy.dart
+++ b/pkg/compiler/lib/src/backend_strategy.dart
@@ -9,12 +9,12 @@
 import 'deferred_load.dart' show OutputUnitData;
 import 'enqueue.dart';
 import 'elements/entities.dart';
+import 'inferrer/types.dart';
 import 'io/source_information.dart';
 import 'js_backend/inferred_data.dart';
 import 'js_backend/js_backend.dart';
 import 'js_backend/native_data.dart';
 import 'ssa/ssa.dart';
-import 'types/types.dart';
 import 'universe/codegen_world_builder.dart';
 import 'universe/world_builder.dart';
 import 'world.dart';
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 391cdd9..1ead006 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -13,6 +13,8 @@
   static const String disableDiagnosticColors = '--disable-diagnostic-colors';
   static const String disableNativeLiveTypeAnalysis =
       '--disable-native-live-type-analysis';
+  static const String useTrivialAbstractValueDomain =
+      '--use-trivial-abstract-value-domain';
   static const String disableTypeInference = '--disable-type-inference';
   static const String disableRtiOptimization = '--disable-rti-optimization';
   static const String dumpInfo = '--dump-info';
@@ -34,6 +36,9 @@
   // Experimentally try to force part-file functions to be seen as IIFEs.
   static const String experimentStartupFunctions = '--experiment-code-2';
 
+  // Experimentally rely on JavaScript ToBoolean conversions.
+  static const String experimentToBoolean = '--experiment-code-3';
+
   // Add instrumentation to log every method call.
   static const String experimentCallInstrumentation =
       '--experiment-call-instrumentation';
@@ -78,6 +83,10 @@
 
   static const String serverMode = '--server-mode';
 
+  static const String newDeferredSplit = '--new-deferred-split';
+  static const String reportInvalidInferredDeferredTypes =
+      '--report-invalid-deferred-types';
+
   /// Flag for a combination of flags for 'production' mode.
   static const String benchmarkingProduction = '--benchmarking-production';
 
@@ -106,19 +115,6 @@
   // https://gist.github.com/eernstg/4353d7b4f669745bed3a5423e04a453c.
   static const String genericMethodSyntax = '--generic-method-syntax';
 
-  // Deprecated. This flag is no longer in use for dart2js, but we are keeping
-  // it around for a while longer until all other tools deprecate the same flag.
-  //
-  // It was used to start `async` functions synchronously, but now dart2js
-  // switched on this behavior by default.
-  // TODO(sigmund): delete once this is on by default on all of our tools.
-  static const String syncAsync = '--sync-async';
-
-  // Starts `async` functions asynchronously.
-  //
-  // This is the old Dart 1.0 behavior. Only used during the migration.
-  static const String noSyncAsync = '--no-sync-async';
-
   // Initializing-formal access is enabled by default and cannot be disabled.
   // For backward compatibility the option is still accepted, but it is ignored.
   static const String initializingFormalAccess = '--initializing-formal-access';
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 4922314..188f52e 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -11,10 +11,10 @@
 import 'constants/values.dart';
 import 'elements/entities.dart';
 import 'elements/types.dart';
+import 'inferrer/abstract_value_domain.dart';
 import 'js_backend/constant_system_javascript.dart';
 import 'js_backend/native_data.dart' show NativeBasicData;
 import 'kernel/dart2js_target.dart';
-import 'types/abstract_value_domain.dart';
 import 'universe/selector.dart' show Selector;
 
 /// The common elements and types in Dart.
@@ -215,7 +215,6 @@
   bool isDefaultNoSuchMethodImplementation(FunctionEntity element);
 
   // From dart:async
-  FunctionEntity get asyncHelperStart;
   FunctionEntity get asyncHelperStartSync;
   FunctionEntity get asyncHelperAwait;
   FunctionEntity get asyncHelperReturn;
@@ -249,8 +248,6 @@
 
   FunctionEntity get asyncAwaitCompleterFactory;
 
-  FunctionEntity get syncCompleterFactory;
-
   FunctionEntity get asyncStarStreamControllerFactory;
 
   ClassEntity get jsInterceptorClass;
@@ -473,8 +470,6 @@
 
   ClassEntity get expectNoInlineClass;
 
-  ClassEntity get expectTrustTypeAnnotationsClass;
-
   ClassEntity get expectAssumeDynamicClass;
 
   /// Returns `true` if [member] is a "foreign helper", that is, a member whose
@@ -1029,8 +1024,6 @@
   FunctionEntity _findAsyncHelperFunction(String name) =>
       _findLibraryMember(asyncLibrary, name);
 
-  FunctionEntity get asyncHelperStart =>
-      _findAsyncHelperFunction("_asyncStart");
   FunctionEntity get asyncHelperStartSync =>
       _findAsyncHelperFunction("_asyncStartSync");
   FunctionEntity get asyncHelperAwait =>
@@ -1083,10 +1076,6 @@
       _asyncAwaitCompleterFactory ??=
           _findAsyncHelperFunction('_makeAsyncAwaitCompleter');
 
-  FunctionEntity _syncCompleterFactory;
-  FunctionEntity get syncCompleterFactory =>
-      _syncCompleterFactory ??= _findAsyncHelperFunction('_makeSyncCompleter');
-
   FunctionEntity _asyncStarStreamControllerFactory;
   FunctionEntity get asyncStarStreamControllerFactory =>
       _asyncStarStreamControllerFactory ??=
@@ -1239,7 +1228,9 @@
     }
     return selector.applies(_jsStringSplit) &&
         (receiver == null ||
-            abstractValueDomain.canHit(receiver, jsStringSplit, selector));
+            abstractValueDomain
+                .isTargetingMember(receiver, jsStringSplit, selector.memberName)
+                .isPotentiallyTrue);
   }
 
   FunctionEntity _jsStringSplit;
@@ -1664,7 +1655,6 @@
 
   bool _expectAnnotationChecked = false;
   ClassEntity _expectNoInlineClass;
-  ClassEntity _expectTrustTypeAnnotationsClass;
   ClassEntity _expectAssumeDynamicClass;
 
   void _ensureExpectAnnotations() {
@@ -1673,15 +1663,10 @@
       LibraryEntity library = _env.lookupLibrary(PACKAGE_EXPECT);
       if (library != null) {
         _expectNoInlineClass = _env.lookupClass(library, 'NoInline');
-        _expectTrustTypeAnnotationsClass =
-            _env.lookupClass(library, 'TrustTypeAnnotations');
         _expectAssumeDynamicClass = _env.lookupClass(library, 'AssumeDynamic');
-        if (_expectNoInlineClass == null ||
-            _expectTrustTypeAnnotationsClass == null ||
-            _expectAssumeDynamicClass == null) {
+        if (_expectNoInlineClass == null || _expectAssumeDynamicClass == null) {
           // This is not the package you're looking for.
           _expectNoInlineClass = null;
-          _expectTrustTypeAnnotationsClass = null;
           _expectAssumeDynamicClass = null;
         }
       }
@@ -1693,11 +1678,6 @@
     return _expectNoInlineClass;
   }
 
-  ClassEntity get expectTrustTypeAnnotationsClass {
-    _ensureExpectAnnotations();
-    return _expectTrustTypeAnnotationsClass;
-  }
-
   ClassEntity get expectAssumeDynamicClass {
     _ensureExpectAnnotations();
     return _expectAssumeDynamicClass;
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 85cc18e..96ac042 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -26,7 +26,11 @@
 import 'enqueue.dart' show Enqueuer, EnqueueTask, ResolutionEnqueuer;
 import 'environment.dart';
 import 'frontend_strategy.dart';
+import 'inferrer/abstract_value_domain.dart' show AbstractValueStrategy;
+import 'inferrer/trivial.dart' show TrivialAbstractValueStrategy;
 import 'inferrer/typemasks/masks.dart' show TypeMaskStrategy;
+import 'inferrer/types.dart'
+    show GlobalTypeInferenceResults, GlobalTypeInferenceTask;
 import 'io/source_information.dart' show SourceInformation;
 import 'js_backend/backend.dart' show JavaScriptBackend;
 import 'js_backend/inferred_data.dart';
@@ -38,9 +42,6 @@
 import 'serialization/task.dart';
 import 'serialization/strategies.dart';
 import 'ssa/nodes.dart' show HInstruction;
-import 'types/abstract_value_domain.dart' show AbstractValueStrategy;
-import 'types/types.dart'
-    show GlobalTypeInferenceResults, GlobalTypeInferenceTask;
 import 'universe/selector.dart' show Selector;
 import 'universe/codegen_world_builder.dart';
 import 'universe/resolution_world_builder.dart';
@@ -67,10 +68,9 @@
   /// Options provided from command-line arguments.
   final CompilerOptions options;
 
-  /**
-   * If true, stop compilation after type inference is complete. Used for
-   * debugging and testing purposes only.
-   */
+  // These internal flags are used to stop compilation after a specific phase.
+  // Used only for debugging and testing purposes only.
+  bool stopAfterClosedWorld = false;
   bool stopAfterTypeInference = false;
 
   /// Output provider from user of Compiler API.
@@ -106,7 +106,7 @@
   JavaScriptBackend backend;
   CodegenWorldBuilder _codegenWorldBuilder;
 
-  AbstractValueStrategy abstractValueStrategy = const TypeMaskStrategy();
+  AbstractValueStrategy abstractValueStrategy;
 
   GenericTask selfTask;
 
@@ -145,6 +145,10 @@
       : this.options = options {
     options.deriveOptions();
     options.validate();
+
+    abstractValueStrategy = options.useTrivialAbstractValueDomain
+        ? const TrivialAbstractValueStrategy()
+        : const TypeMaskStrategy();
     CompilerTask kernelFrontEndTask;
     selfTask = new GenericTask('self', measurer);
     _outputProvider = new _CompilerOutput(this, outputProvider);
@@ -251,6 +255,7 @@
       generateJavaScriptCode(results);
     } else {
       KernelResult result = await kernelLoader.load(uri);
+      reporter.log("Kernel load complete");
       if (result == null) return;
       if (compilationFailed && !options.generateCodeWithCompileTimeErrors) {
         return;
@@ -390,6 +395,7 @@
     selfTask.measureSubtask("compileFromKernel", () {
       JClosedWorld closedWorld = selfTask.measureSubtask("computeClosedWorld",
           () => computeClosedWorld(rootLibraryUri, libraries));
+      if (stopAfterClosedWorld) return;
       if (closedWorld != null) {
         GlobalTypeInferenceResults globalInferenceResults =
             performGlobalTypeInference(closedWorld);
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index dfab97f..74818db 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -218,7 +218,6 @@
 
   void setTrustTypeAnnotations(String argument) {
     trustTypeAnnotations = true;
-    passThrough(argument);
   }
 
   void setCheckedMode(String argument) {
@@ -343,8 +342,6 @@
     new OptionHandler(Flags.allowMockCompilation, ignoreOption),
     new OptionHandler(Flags.fastStartup, passThrough),
     new OptionHandler(Flags.genericMethodSyntax, ignoreOption),
-    new OptionHandler(Flags.syncAsync, ignoreOption),
-    new OptionHandler(Flags.noSyncAsync, passThrough),
     new OptionHandler(Flags.initializingFormalAccess, ignoreOption),
     new OptionHandler(Flags.minify, passThrough),
     new OptionHandler(Flags.preserveUris, ignoreOption),
@@ -374,9 +371,12 @@
     new OptionHandler(Flags.disableInlining, passThrough),
     new OptionHandler(Flags.disableProgramSplit, passThrough),
     new OptionHandler(Flags.disableTypeInference, passThrough),
+    new OptionHandler(Flags.useTrivialAbstractValueDomain, passThrough),
     new OptionHandler(Flags.disableRtiOptimization, passThrough),
     new OptionHandler(Flags.terse, passThrough),
     new OptionHandler('--deferred-map=.+', passThrough),
+    new OptionHandler(Flags.newDeferredSplit, passThrough),
+    new OptionHandler(Flags.reportInvalidInferredDeferredTypes, passThrough),
     new OptionHandler(Flags.dumpInfo, passThrough),
     new OptionHandler('--disallow-unsafe-eval', ignoreOption),
     new OptionHandler(Option.showPackageWarnings, passThrough),
@@ -413,6 +413,7 @@
 
     new OptionHandler(Flags.experimentLocalNames, passThrough),
     new OptionHandler(Flags.experimentStartupFunctions, passThrough),
+    new OptionHandler(Flags.experimentToBoolean, passThrough),
     new OptionHandler(Flags.experimentCallInstrumentation, passThrough),
 
     // The following three options must come last.
@@ -736,7 +737,7 @@
 
   --packages=<path>
     Path to the package resolution configuration file, which supplies a mapping
-    of package names to paths.  This option cannot be used with --package-root.
+    of package names to paths.
 
   --suppress-warnings
     Do not display any warnings.
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 8aafc91..d2fd134 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -130,6 +130,9 @@
   final Compiler compiler;
 
   bool get disableProgramSplit => compiler.options.disableProgramSplit;
+  bool get newDeferredSplit => compiler.options.newDeferredSplit;
+  bool get reportInvalidInferredDeferredTypes =>
+      compiler.options.reportInvalidInferredDeferredTypes;
 
   DeferredLoadTask(this.compiler) : super(compiler.measurer) {
     _mainOutputUnit = new OutputUnit(true, 'main', new Set<ImportEntity>());
@@ -193,7 +196,7 @@
     void addLiveInstanceMember(MemberEntity member) {
       if (!compiler.resolutionWorldBuilder.isMemberUsed(member)) return;
       if (!member.isInstanceMember) return;
-      dependencies.members.add(member);
+      dependencies.addMember(member);
       _collectDirectMemberDependencies(member, dependencies);
     }
 
@@ -202,7 +205,7 @@
     elementEnvironment.forEachSupertype(cls, (InterfaceType type) {
       _collectTypeDependencies(type, dependencies);
     });
-    dependencies.classes.add(cls);
+    dependencies.addClass(cls);
   }
 
   /// Finds all elements and constants that [element] depends directly on.
@@ -216,7 +219,7 @@
           elementEnvironment.getFunctionType(element), dependencies);
     }
     if (element.isStatic || element.isTopLevel || element.isConstructor) {
-      dependencies.members.add(element);
+      dependencies.addMember(element);
       _collectDirectMemberDependencies(element, dependencies);
     }
     if (element is ConstructorEntity && element.isGenerativeConstructor) {
@@ -243,21 +246,26 @@
 
   /// Recursively collects all the dependencies of [type].
   void _collectTypeDependencies(DartType type, Dependencies dependencies) {
-    // TODO(het): we would like to separate out types that are only needed for
-    // rti from types that are needed for their members.
     if (type is FunctionType) {
       _collectFunctionTypeDependencies(type, dependencies);
     } else if (type is TypedefType) {
-      type.typeArguments
-          .forEach((t) => _collectTypeDependencies(t, dependencies));
+      _collectTypeArgumentDependencies(type.typeArguments, dependencies);
       _collectTypeDependencies(type.unaliased, dependencies);
     } else if (type is InterfaceType) {
-      type.typeArguments
-          .forEach((t) => _collectTypeDependencies(t, dependencies));
-      dependencies.classes.add(type.element);
+      _collectTypeArgumentDependencies(type.typeArguments, dependencies);
+      // TODO(sigmund): when we are able to split classes from types in our
+      // runtime-type representation, this should track type.element as a type
+      // dependency instead.
+      dependencies.addClass(type.element);
     }
   }
 
+  void _collectTypeArgumentDependencies(
+      Iterable<DartType> typeArguments, Dependencies dependencies) {
+    if (typeArguments == null) return;
+    typeArguments.forEach((t) => _collectTypeDependencies(t, dependencies));
+  }
+
   void _collectFunctionTypeDependencies(
       FunctionType type, Dependencies dependencies) {
     for (FunctionTypeVariable typeVariable in type.typeVariables) {
@@ -285,7 +293,7 @@
         new WorldImpactVisitorImpl(visitStaticUse: (StaticUse staticUse) {
           Entity usedEntity = staticUse.element;
           if (usedEntity is MemberEntity) {
-            dependencies.members.add(usedEntity);
+            dependencies.addMember(usedEntity, staticUse.deferredImport);
           } else {
             assert(usedEntity is KLocalFunction,
                 failedAt(usedEntity, "Unexpected static use $staticUse."));
@@ -298,19 +306,23 @@
           switch (staticUse.kind) {
             case StaticUseKind.CONSTRUCTOR_INVOKE:
             case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
-              _collectTypeDependencies(staticUse.type, dependencies);
+              // The receiver type of generative constructors is a dependency of
+              // the constructor (handled by `addMember` above) and not a
+              // dependency at the call site.
+              // Factory methods, on the other hand, are like static methods so
+              // the target type is not relevant.
+              // TODO(johnniwinther): Use rti need data to skip unneeded type
+              // arguments.
+              _collectTypeArgumentDependencies(
+                  staticUse.type.typeArguments, dependencies);
               break;
             case StaticUseKind.INVOKE:
             case StaticUseKind.CLOSURE_CALL:
             case StaticUseKind.DIRECT_INVOKE:
               // TODO(johnniwinther): Use rti need data to skip unneeded type
               // arguments.
-              List<DartType> typeArguments = staticUse.typeArguments;
-              if (typeArguments != null) {
-                for (DartType typeArgument in typeArguments) {
-                  _collectTypeDependencies(typeArgument, dependencies);
-                }
-              }
+              _collectTypeArgumentDependencies(
+                  staticUse.typeArguments, dependencies);
               break;
             default:
           }
@@ -320,7 +332,8 @@
             case TypeUseKind.TYPE_LITERAL:
               if (type.isInterfaceType) {
                 InterfaceType interface = type;
-                dependencies.classes.add(interface.element);
+                dependencies.addClass(
+                    interface.element, typeUse.deferredImport);
               }
               break;
             case TypeUseKind.INSTANTIATION:
@@ -352,12 +365,8 @@
         }, visitDynamicUse: (DynamicUse dynamicUse) {
           // TODO(johnniwinther): Use rti need data to skip unneeded type
           // arguments.
-          List<DartType> typeArguments = dynamicUse.typeArguments;
-          if (typeArguments != null) {
-            for (DartType typeArgument in typeArguments) {
-              _collectTypeDependencies(typeArgument, dependencies);
-            }
-          }
+          _collectTypeArgumentDependencies(
+              dynamicUse.typeArguments, dependencies);
         }),
         DeferredLoadTask.IMPACT_USE);
   }
@@ -428,7 +437,8 @@
       Dependencies dependencies = new Dependencies();
       _collectAllElementsAndConstantsResolvedFromClass(element, dependencies);
       LibraryEntity library = element.library;
-      _processDependencies(library, dependencies, oldSet, newSet, queue);
+      _processDependencies(
+          library, dependencies, oldSet, newSet, queue, element);
     } else {
       queue.addClass(element, newSet);
     }
@@ -455,7 +465,8 @@
       _collectAllElementsAndConstantsResolvedFromMember(element, dependencies);
 
       LibraryEntity library = element.library;
-      _processDependencies(library, dependencies, oldSet, newSet, queue);
+      _processDependencies(
+          library, dependencies, oldSet, newSet, queue, element);
     } else {
       queue.addMember(element, newSet);
     }
@@ -487,60 +498,111 @@
   /// same nodes we have already seen.
   _shouldAddDeferredDependency(ImportSet newSet) => newSet.length <= 1;
 
+  void _fixDependencyInfo(DependencyInfo info, List<ImportEntity> imports,
+      String prefix, String name, Spannable context) {
+    var isDeferred = _isExplicitlyDeferred(imports);
+    if (isDeferred) {
+      if (!newDeferredSplit) {
+        info.isDeferred = true;
+        info.imports = imports;
+      }
+      if (reportInvalidInferredDeferredTypes) {
+        reporter.reportErrorMessage(context, MessageKind.GENERIC, {
+          'text': "$prefix '$name' is deferred but appears to be inferred as"
+              " a return type or a type parameter (dartbug.com/35311)."
+        });
+      }
+    }
+  }
+
+  // The following 3 methods are used to check whether the new deferred split
+  // algorithm and the old one match. Because of a soundness bug in the old
+  // algorithm the new algorithm can pull in a lot of code to the main output
+  // unit. This logic detects it and will make it easier for us to migrate code
+  // off it incrementally.
+  // Note: we only expect discrepancies on class-dependency-info due to how
+  // inferred types expose deferred types in type-variables and return types
+  // (Issue #35311). We added the other two methods to test our transition, but
+  // we don't expect to detect any mismatches there.
+  //
+  // TODO(sigmund): delete once the new implementation is on by default.
+  void _fixClassDependencyInfo(DependencyInfo info, ClassEntity cls,
+      LibraryEntity library, Spannable context) {
+    if (info.isDeferred) return;
+    if (newDeferredSplit && !reportInvalidInferredDeferredTypes) return;
+    var imports = classImportsTo(cls, library);
+    _fixDependencyInfo(info, imports, "Class", cls.name, context);
+  }
+
+  void _fixMemberDependencyInfo(DependencyInfo info, MemberEntity member,
+      LibraryEntity library, Spannable context) {
+    if (info.isDeferred || compiler.options.newDeferredSplit) return;
+    var imports = memberImportsTo(member, library);
+    _fixDependencyInfo(info, imports, "Member", member.name, context);
+  }
+
+  void _fixConstantDependencyInfo(DependencyInfo info, ConstantValue constant,
+      LibraryEntity library, Spannable context) {
+    if (info.isDeferred || compiler.options.newDeferredSplit) return;
+    if (constant is TypeConstantValue) {
+      var type = constant.representedType;
+      if (type is InterfaceType) {
+        var imports = classImportsTo(type.element, library);
+        _fixDependencyInfo(
+            info, imports, "Class (in constant) ", type.element.name, context);
+      } else if (type is TypedefType) {
+        var imports = typedefImportsTo(type.element, library);
+        _fixDependencyInfo(
+            info, imports, "Typedef ", type.element.name, context);
+      }
+    }
+  }
+
   void _processDependencies(LibraryEntity library, Dependencies dependencies,
-      ImportSet oldSet, ImportSet newSet, WorkQueue queue) {
-    for (ClassEntity cls in dependencies.classes) {
-      Iterable<ImportEntity> imports = classImportsTo(cls, library);
-      if (_isExplicitlyDeferred(imports)) {
+      ImportSet oldSet, ImportSet newSet, WorkQueue queue, Spannable context) {
+    dependencies.classes.forEach((ClassEntity cls, DependencyInfo info) {
+      _fixClassDependencyInfo(info, cls, library, context);
+      if (info.isDeferred) {
         if (_shouldAddDeferredDependency(newSet)) {
-          for (ImportEntity deferredImport in imports) {
+          for (ImportEntity deferredImport in info.imports) {
             queue.addClass(cls, importSets.singleton(deferredImport));
           }
         }
       } else {
         _updateClassRecursive(cls, oldSet, newSet, queue);
       }
-    }
+    });
 
-    for (MemberEntity member in dependencies.members) {
-      Iterable<ImportEntity> imports = memberImportsTo(member, library);
-      if (_isExplicitlyDeferred(imports)) {
+    dependencies.members.forEach((MemberEntity member, DependencyInfo info) {
+      _fixMemberDependencyInfo(info, member, library, context);
+      if (info.isDeferred) {
         if (_shouldAddDeferredDependency(newSet)) {
-          for (ImportEntity deferredImport in imports) {
+          for (ImportEntity deferredImport in info.imports) {
             queue.addMember(member, importSets.singleton(deferredImport));
           }
         }
       } else {
         _updateMemberRecursive(member, oldSet, newSet, queue);
       }
-    }
+    });
 
     for (Local localFunction in dependencies.localFunctions) {
       _updateLocalFunction(localFunction, oldSet, newSet);
     }
 
-    for (ConstantValue dependency in dependencies.constants) {
-      if (dependency is TypeConstantValue) {
-        var type = dependency.representedType;
-        var imports = const <ImportEntity>[];
-        if (type is InterfaceType) {
-          imports = classImportsTo(type.element, library);
-        } else if (type is TypedefType) {
-          imports = typedefImportsTo(type.element, library);
-        }
-        if (_isExplicitlyDeferred(imports)) {
-          if (_shouldAddDeferredDependency(newSet)) {
-            for (ImportEntity deferredImport in imports) {
-              queue.addConstant(
-                  dependency, importSets.singleton(deferredImport));
-            }
+    dependencies.constants
+        .forEach((ConstantValue constant, DependencyInfo info) {
+      _fixConstantDependencyInfo(info, constant, library, context);
+      if (info.isDeferred) {
+        if (_shouldAddDeferredDependency(newSet)) {
+          for (ImportEntity deferredImport in info.imports) {
+            queue.addConstant(constant, importSets.singleton(deferredImport));
           }
-          continue;
         }
+      } else {
+        _updateConstantRecursive(constant, oldSet, newSet, queue);
       }
-
-      _updateConstantRecursive(dependency, oldSet, newSet, queue);
-    }
+    });
   }
 
   /// Adds extra dependencies coming from mirror usage.
@@ -1488,8 +1550,36 @@
 }
 
 class Dependencies {
-  final Set<ClassEntity> classes = new Set<ClassEntity>();
-  final Set<MemberEntity> members = new Set<MemberEntity>();
+  final Map<ClassEntity, DependencyInfo> classes = {};
+  final Map<MemberEntity, DependencyInfo> members = {};
   final Set<Local> localFunctions = new Set<Local>();
-  final Set<ConstantValue> constants = new Set<ConstantValue>();
+  final Map<ConstantValue, DependencyInfo> constants = {};
+
+  void addClass(ClassEntity cls, [ImportEntity import]) {
+    (classes[cls] ??= new DependencyInfo()).registerImport(import);
+  }
+
+  void addMember(MemberEntity m, [ImportEntity import]) {
+    (members[m] ??= new DependencyInfo()).registerImport(import);
+  }
+
+  void addConstant(ConstantValue c, [ImportEntity import]) {
+    (constants[c] ??= new DependencyInfo()).registerImport(import);
+  }
+}
+
+class DependencyInfo {
+  bool isDeferred = true;
+  List<ImportEntity> imports;
+
+  registerImport(ImportEntity import) {
+    if (!isDeferred) return;
+    // A null import represents a direct non-deferred dependency.
+    if (import != null) {
+      (imports ??= []).add(import);
+    } else {
+      imports = null;
+      isDeferred = false;
+    }
+  }
 }
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index afa2952..e2722a0 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -18,11 +18,11 @@
 import 'constants/values.dart' show ConstantValue, InterceptorConstantValue;
 import 'deferred_load.dart' show OutputUnit;
 import 'elements/entities.dart';
+import 'inferrer/abstract_value_domain.dart';
+import 'inferrer/types.dart'
+    show GlobalTypeInferenceMemberResult, GlobalTypeInferenceResults;
 import 'js/js.dart' as jsAst;
 import 'js_backend/js_backend.dart' show JavaScriptBackend;
-import 'types/abstract_value_domain.dart';
-import 'types/types.dart'
-    show GlobalTypeInferenceMemberResult, GlobalTypeInferenceResults;
 import 'universe/codegen_world_builder.dart';
 import 'universe/world_impact.dart'
     show ImpactUseCase, WorldImpact, WorldImpactVisitorImpl;
@@ -116,7 +116,9 @@
     AbstractValue inferredType = _resultOfMember(field).type;
     // If a field has an empty inferred type it is never used.
     if (inferredType == null ||
-        closedWorld.abstractValueDomain.isEmpty(inferredType)) {
+        closedWorld.abstractValueDomain
+            .isEmpty(inferredType)
+            .isDefinitelyTrue) {
       return null;
     }
 
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index e040474..bc4d20e 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -68,9 +68,6 @@
   /// Is `true` if this type is a `FutureOr` type.
   bool get isFutureOr => false;
 
-  /// Is `true` if this type is a malformed type.
-  bool get isMalformed => false;
-
   /// Whether this type contains a type variable.
   bool get containsTypeVariables => false;
 
@@ -357,22 +354,6 @@
   }
 }
 
-/// Provides a thin model of method type variables for compabitility with the
-/// old compiler behavior in Dart 1: They are treated as if their value were
-/// `dynamic` when used in a type annotation, and as a malformed type when
-/// used in an `as` or `is` expression.
-class Dart1MethodTypeVariableType extends TypeVariableType {
-  Dart1MethodTypeVariableType(TypeVariableEntity element) : super(element);
-
-  @override
-  bool get treatAsDynamic => true;
-
-  @override
-  bool get isMalformed => true;
-
-  bool _containsFreeTypeVariables(List<FunctionTypeVariable> bindings) => false;
-}
-
 class TypeVariableType extends DartType {
   final TypeVariableEntity element;
 
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 69c7ca5..499f749 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -15,8 +15,8 @@
 import 'options.dart';
 import 'elements/entities.dart';
 import 'elements/types.dart';
+import 'inferrer/types.dart';
 import 'js_backend/enqueuer.dart';
-import 'types/types.dart';
 import 'universe/member_usage.dart';
 import 'universe/resolution_world_builder.dart';
 import 'universe/world_builder.dart';
diff --git a/pkg/compiler/lib/src/frontend_strategy.dart b/pkg/compiler/lib/src/frontend_strategy.dart
index 1508076..23a1cee 100644
--- a/pkg/compiler/lib/src/frontend_strategy.dart
+++ b/pkg/compiler/lib/src/frontend_strategy.dart
@@ -12,6 +12,7 @@
 import 'elements/entities.dart';
 import 'elements/types.dart';
 import 'enqueue.dart';
+import 'js_backend/annotations.dart';
 import 'js_backend/allocator_analysis.dart' show KAllocatorAnalysis;
 import 'js_backend/backend_usage.dart';
 import 'js_backend/interceptor_data.dart';
@@ -72,6 +73,7 @@
       KAllocatorAnalysis allocatorAnalysis,
       NativeResolutionEnqueuer nativeResolutionEnqueuer,
       NoSuchMethodRegistry noSuchMethodRegistry,
+      AnnotationsDataBuilder annotationsDataBuilder,
       SelectorConstraintsStrategy selectorConstraintsStrategy,
       ClassHierarchyBuilder classHierarchyBuilder,
       ClassQueries classQueries);
@@ -81,6 +83,7 @@
   WorkItemBuilder createResolutionWorkItemBuilder(
       NativeBasicData nativeBasicData,
       NativeDataBuilder nativeDataBuilder,
+      AnnotationsDataBuilder annotationsDataBuilder,
       ImpactTransformer impactTransformer,
       Map<Entity, WorldImpact> impactCache);
 
diff --git a/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
new file mode 100644
index 0000000..784e018
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
@@ -0,0 +1,517 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.abstract_value_domain;
+
+import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
+import '../elements/entities.dart';
+import '../elements/names.dart';
+import '../serialization/serialization.dart';
+import '../universe/selector.dart';
+import '../universe/world_builder.dart';
+import '../world.dart';
+
+/// Enum-like values used for reporting known and unknown truth values.
+class AbstractBool {
+  final bool _value;
+
+  const AbstractBool._(this._value);
+
+  bool get isDefinitelyTrue => _value == true;
+
+  bool get isPotentiallyTrue => _value != false;
+
+  bool get isDefinitelyFalse => _value == false;
+
+  bool get isPotentiallyFalse => _value != true;
+
+  /// A value of `Abstract.True` is used when the property is known _always_ to
+  /// be true.
+  static const AbstractBool True = const AbstractBool._(true);
+
+  /// A value of `Abstract.False` is used when the property is known _never_ to
+  /// be true.
+  static const AbstractBool False = const AbstractBool._(false);
+
+  /// A value of `Abstract.Maybe` is used when the property might or might not
+  /// be true.
+  static const AbstractBool Maybe = const AbstractBool._(null);
+
+  static AbstractBool trueOrMaybe(bool value) => value ? True : Maybe;
+
+  static AbstractBool trueOrFalse(bool value) => value ? True : False;
+
+  static AbstractBool maybeOrFalse(bool value) => value ? Maybe : False;
+}
+
+/// Strategy for the abstraction of runtime values used by the global type
+/// inference.
+abstract class AbstractValueStrategy {
+  /// Creates the abstract value domain for [closedWorld].
+  AbstractValueDomain createDomain(JClosedWorld closedWorld);
+
+  /// Creates the [SelectorConstraintsStrategy] used by the backend enqueuer.
+  SelectorConstraintsStrategy createSelectorStrategy();
+}
+
+/// A value in an abstraction of runtime values.
+abstract class AbstractValue {}
+
+/// A system that implements an abstraction over runtime values.
+abstract class AbstractValueDomain {
+  /// The [AbstractValue] that represents an unknown runtime value.
+  AbstractValue get dynamicType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `Type` at
+  /// runtime.
+  AbstractValue get typeType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `Function` at
+  /// runtime.
+  AbstractValue get functionType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `bool` at
+  /// runtime.
+  AbstractValue get boolType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `int` at
+  /// runtime.
+  AbstractValue get intType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `double` at
+  /// runtime.
+  AbstractValue get doubleType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `num` at
+  /// runtime.
+  AbstractValue get numType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `String` at
+  /// runtime.
+  AbstractValue get stringType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `List` at
+  /// runtime.
+  AbstractValue get listType;
+
+  /// The [AbstractValue] that represents a non-null subtype of `Map` at
+  /// runtime.
+  AbstractValue get mapType;
+
+  /// The [AbstractValue] that represents a non-null value at runtime.
+  AbstractValue get nonNullType;
+
+  /// The [AbstractValue] that represents the `null` at runtime.
+  AbstractValue get nullType;
+
+  /// The [AbstractValue] that represents a non-null growable JavaScript array
+  /// at runtime.
+  AbstractValue get growableListType;
+
+  /// The [AbstractValue] that represents a non-null fixed size JavaScript array
+  /// at runtime.
+  AbstractValue get fixedListType;
+
+  /// The [AbstractValue] that represents a non-null 31-bit unsigned integer at
+  /// runtime.
+  AbstractValue get uint31Type;
+
+  /// The [AbstractValue] that represents a non-null 32-bit unsigned integer at
+  /// runtime.
+  AbstractValue get uint32Type;
+
+  /// The [AbstractValue] that represents a non-null unsigned integer at
+  /// runtime.
+  AbstractValue get positiveIntType;
+
+  /// The [AbstractValue] that represents a non-null constant list literal at
+  /// runtime.
+  AbstractValue get constListType;
+
+  /// The [AbstractValue] that represents a non-null constant map literal at
+  /// runtime.
+  AbstractValue get constMapType;
+
+  /// The [AbstractValue] that represents the empty set of runtime values.
+  AbstractValue get emptyType;
+
+  /// The [AbstractValue] that represents a non-null instance at runtime of the
+  /// `Iterable` class used for the `sync*` implementation.
+  AbstractValue get syncStarIterableType;
+
+  /// The [AbstractValue] that represents a non-null instance at runtime of the
+  /// `Future` class used for the `async` implementation.
+  AbstractValue get asyncFutureType;
+
+  /// The [AbstractValue] that represents a non-null instance at runtime of the
+  /// `Stream` class used for the `async*` implementation.
+  AbstractValue get asyncStarStreamType;
+
+  /// Creates an [AbstractValue] for a non-null exact instance of [cls].
+  AbstractValue createNonNullExact(ClassEntity cls);
+
+  /// Creates an [AbstractValue] for a potentially null exact instance of [cls].
+  AbstractValue createNullableExact(ClassEntity cls);
+
+  /// Creates an [AbstractValue] for a non-null instance that extends [cls].
+  AbstractValue createNonNullSubclass(ClassEntity cls);
+
+  /// Creates an [AbstractValue] for a non-null instance that implements [cls].
+  AbstractValue createNonNullSubtype(ClassEntity cls);
+
+  /// Creates an [AbstractValue] for a potentially null instance that implements
+  /// [cls].
+  AbstractValue createNullableSubtype(ClassEntity cls);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a native typed
+  /// array or `null` at runtime.
+  AbstractBool isTypedArray(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] could be a native
+  /// typed array at runtime.
+  AbstractBool couldBeTypedArray(covariant AbstractValue value);
+
+  /// Returns the version of the abstract [value] that excludes `null`.
+  AbstractValue excludeNull(covariant AbstractValue value);
+
+  /// Returns the version of the abstract [value] that includes `null`.
+  AbstractValue includeNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] contains
+  /// instances of [cls] at runtime.
+  AbstractBool containsType(covariant AbstractValue value, ClassEntity cls);
+
+  /// Returns an [AbstractBool] that describes whether [value] only contains
+  /// subtypes of [cls] or `null` at runtime.
+  AbstractBool containsOnlyType(covariant AbstractValue value, ClassEntity cls);
+
+  /// Returns an [AbstractBool] that describes whether [value] is an instance of
+  /// [cls] or `null` at runtime.
+  // TODO(johnniwinther): Merge this with [isInstanceOf].
+  AbstractBool isInstanceOfOrNull(
+      covariant AbstractValue value, ClassEntity cls);
+
+  /// Returns an [AbstractBool] that describes whether [value] is known to be an
+  /// instance of [cls] at runtime.
+  AbstractBool isInstanceOf(AbstractValue value, ClassEntity cls);
+
+  /// Returns an [AbstractBool] that describes whether [value] is empty set of
+  /// runtime values.
+  AbstractBool isEmpty(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-null
+  /// exact class at runtime.
+  AbstractBool isExact(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is an exact class
+  /// or `null` at runtime.
+  AbstractBool isExactOrNull(covariant AbstractValue value);
+
+  /// Returns the [ClassEntity] if this [value] is a non-null instance of an
+  /// exact class at runtime, and `null` otherwise.
+  ClassEntity getExactClass(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is `null` at
+  /// runtime.
+  AbstractBool isNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// bool, number, string, array or `null` at runtime.
+  AbstractBool isPrimitive(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// number at runtime.
+  AbstractBool isPrimitiveNumber(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// bool at runtime.
+  AbstractBool isPrimitiveBoolean(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// array at runtime.
+  AbstractBool isPrimitiveArray(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// string, array, native HTML list or `null` at runtime.
+  AbstractBool isIndexablePrimitive(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a fixed-size
+  /// or constant JavaScript array or `null` at runtime.
+  AbstractBool isFixedArray(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a growable
+  /// JavaScript array or `null` at runtime.
+  AbstractBool isExtendableArray(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a mutable
+  /// JavaScript array or `null` at runtime.
+  AbstractBool isMutableArray(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a mutable
+  /// JavaScript array, native HTML list or `null` at runtime.
+  AbstractBool isMutableIndexable(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// array or `null` at runtime.
+  AbstractBool isArray(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// string at runtime.
+  AbstractBool isPrimitiveString(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is an interceptor
+  /// at runtime.
+  AbstractBool isInterceptor(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-null
+  /// integer value at runtime.
+  AbstractBool isInteger(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-null 32
+  /// bit unsigned integer value at runtime.
+  AbstractBool isUInt32(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-null 31
+  /// bit unsigned integer value at runtime.
+  AbstractBool isUInt31(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-null
+  /// unsigned integer value at runtime.
+  AbstractBool isPositiveInteger(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is an unsigned
+  /// integer value or `null` at runtime.
+  AbstractBool isPositiveIntegerOrNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is an integer
+  /// value or `null` at runtime.
+  AbstractBool isIntegerOrNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-null
+  /// JavaScript number at runtime.
+  AbstractBool isNumber(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// number or `null` at runtime.
+  AbstractBool isNumberOrNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-integer
+  /// number at runtime.
+  AbstractBool isDouble(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a non-integer
+  /// number or `null` at runtime.
+  AbstractBool isDoubleOrNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// bool at runtime.
+  AbstractBool isBoolean(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// bool or `null` at runtime.
+  AbstractBool isBooleanOrNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// string at runtime.
+  AbstractBool isString(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] is a JavaScript
+  /// string or `null` at runtime.
+  AbstractBool isStringOrNull(covariant AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes whether [value] a JavaScript
+  /// primitive, possible `null`.
+  AbstractBool isPrimitiveOrNull(covariant AbstractValue value);
+
+  /// Returns [AbstractValue] for the runtime values contained in either [a] or
+  /// [b].
+  AbstractValue union(covariant AbstractValue a, covariant AbstractValue b);
+
+  /// Returns [AbstractValue] for the runtime values contained in at least one
+  /// of [values].
+  AbstractValue unionOfMany(Iterable<AbstractValue> values);
+
+  /// Returns [AbstractValue] for the runtime values that [a] and [b] have in
+  /// common.
+  AbstractValue intersection(
+      covariant AbstractValue a, covariant AbstractValue b);
+
+  /// Returns an [AbstractBool] that describes whether [a] and [b] have no
+  /// runtime values in common.
+  AbstractBool areDisjoint(
+      covariant AbstractValue a, covariant AbstractValue b);
+
+  /// Returns an [AbstractBool] that describes whether [a] contains all non-null
+  /// runtime values.
+  AbstractBool containsAll(covariant AbstractValue a);
+
+  /// Computes the [AbstractValue] corresponding to the constant [value].
+  AbstractValue computeAbstractValueForConstant(ConstantValue value);
+
+  /// Returns `true` if [value] represents a container value at runtime.
+  bool isContainer(covariant AbstractValue value);
+
+  /// Creates a container value specialization of [originalValue] with the
+  /// inferred [element] runtime value and inferred runtime [length].
+  ///
+  /// The [allocationNode] is used to identify this particular map allocation.
+  /// The [allocationElement] is used only for debugging.
+  AbstractValue createContainerValue(
+      AbstractValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      AbstractValue elementType,
+      int length);
+
+  /// Returns the element type of [value] if it represents a container value
+  /// at runtime. Returns [dynamicType] otherwise.
+  AbstractValue getContainerElementType(AbstractValue value);
+
+  /// Return the known length of [value] if it represents a container value
+  /// at runtime. Returns `null` if the length is unknown or if [value] doesn't
+  /// represent a container value at runtime.
+  int getContainerLength(AbstractValue value);
+
+  /// Returns `true` if [value] represents a map value at runtime.
+  bool isMap(covariant AbstractValue value);
+
+  /// Creates a map value specialization of [originalValue] with the inferred
+  /// [key] and [value] runtime values.
+  ///
+  /// The [allocationNode] is used to identify this particular map allocation.
+  /// The [allocationElement] is used only for debugging.
+  AbstractValue createMapValue(
+      AbstractValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      AbstractValue key,
+      AbstractValue value);
+
+  /// Returns the key type of [value] if it represents a map value at runtime.
+  /// Returns [dynamicType] otherwise.
+  AbstractValue getMapKeyType(AbstractValue value);
+
+  /// Returns the value type of [value] if it represents a map value at runtime.
+  /// Returns [dynamicType] otherwise.
+  AbstractValue getMapValueType(AbstractValue value);
+
+  /// Returns `true` if [value] represents a dictionary value, that is, a map
+  /// with strings as keys, at runtime.
+  bool isDictionary(covariant AbstractValue value);
+
+  /// Creates a dictionary value specialization of [originalValue] with the
+  /// inferred [key] and [value] runtime values.
+  ///
+  /// The [allocationNode] is used to identify this particular map allocation.
+  /// The [allocationElement] is used only for debugging.
+  AbstractValue createDictionaryValue(
+      AbstractValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      AbstractValue key,
+      AbstractValue value,
+      Map<String, AbstractValue> mappings);
+
+  /// Returns `true` if [value] is a dictionary value which contains [key] as
+  /// a key.
+  bool containsDictionaryKey(AbstractValue value, String key);
+
+  /// Returns the value type for [key] in [value] if it represents a dictionary
+  /// value at runtime. Returns [dynamicType] otherwise.
+  AbstractValue getDictionaryValueForKey(AbstractValue value, String key);
+
+  /// Returns `true` if [specialization] is a specialization of
+  /// [generalization].
+  ///
+  /// Specializations are created through [createPrimitiveValue],
+  /// [createMapValue], [createDictionaryValue] and [createContainerValue].
+  bool isSpecializationOf(
+      AbstractValue specialization, AbstractValue generalization);
+
+  /// Returns the value of which [value] is a specialization. Return `null` if
+  /// [value] is not a specialization.
+  ///
+  /// Specializations are created through [createPrimitiveValue],
+  /// [createMapValue], [createDictionaryValue] and [createContainerValue].
+  AbstractValue getGeneralization(AbstractValue value);
+
+  /// Return the object identifying the allocation of [value] if it is an
+  /// allocation based specialization. Otherwise returns `null`.
+  ///
+  /// Allocation based specializations are created through [createMapValue],
+  /// [createDictionaryValue] and [createContainerValue]
+  Object getAllocationNode(AbstractValue value);
+
+  /// Return the allocation element of [value] if it is an allocation based
+  /// specialization. Otherwise returns `null`.
+  ///
+  /// Allocation based specializations are created through [createMapValue],
+  /// [createDictionaryValue] and [createContainerValue]
+  MemberEntity getAllocationElement(AbstractValue value);
+
+  /// Returns `true` if [value] a known primitive JavaScript value at runtime.
+  bool isPrimitiveValue(covariant AbstractValue value);
+
+  /// Creates a primitive value specialization of [originalValue] with the
+  /// inferred primitive constant [value].
+  AbstractValue createPrimitiveValue(
+      AbstractValue originalValue, PrimitiveConstantValue value);
+
+  /// Returns the primitive JavaScript value of [value] if it represents a
+  /// primitive JavaScript value at runtime, value at runtime. Returns `null`
+  /// otherwise.
+  PrimitiveConstantValue getPrimitiveValue(covariant AbstractValue value);
+
+  /// Compute the type of all potential receivers of the set of live [members].
+  AbstractValue computeReceiver(Iterable<MemberEntity> members);
+
+  /// Returns an [AbstractBool] that describes whether [member] is a potential
+  /// target when being invoked on a [receiver]. [name] is used to ensure
+  /// library privacy is taken into account.
+  AbstractBool isTargetingMember(
+      AbstractValue receiver, MemberEntity member, Name name);
+
+  /// Returns an [AbstractBool] that describes whether [selector] invoked on a
+  /// [receiver] can hit a [noSuchMethod].
+  AbstractBool needsNoSuchMethodHandling(
+      AbstractValue receiver, Selector selector);
+
+  /// Returns an [AbstractBool] that describes if the set of runtime values of
+  /// [subset] are known to all be in the set of runtime values of [superset].
+  AbstractBool contains(AbstractValue superset, AbstractValue subset);
+
+  /// Returns an [AbstractBool] that describes if the set of runtime values of
+  /// [subset] are known to all be in the set of runtime values of [superset].
+  AbstractBool isIn(AbstractValue subset, AbstractValue superset);
+
+  /// Returns the [MemberEntity] that is known to always be hit at runtime
+  /// [receiver].
+  ///
+  /// Returns `null` if 0 or more than 1 member can be hit at runtime.
+  MemberEntity locateSingleMember(AbstractValue receiver, Selector selector);
+
+  /// Returns an [AbstractBool] that describes if [value] is known to be an
+  /// indexable JavaScript value at runtime.
+  AbstractBool isJsIndexable(covariant AbstractValue value);
+
+  /// RReturns an [AbstractBool] that describes if [value] is known to be an
+  /// indexable or iterable JavaScript value at runtime.
+  ///
+  /// JavaScript arrays are both indexable and iterable whereas JavaScript
+  /// strings are indexable but not iterable.
+  AbstractBool isJsIndexableAndIterable(AbstractValue value);
+
+  /// Returns an [AbstractBool] that describes if [value] is known to be a
+  /// JavaScript indexable of fixed length.
+  AbstractBool isFixedLengthJsIndexable(AbstractValue value);
+
+  /// Returns compact a textual representation for [value] used for debugging.
+  String getCompactText(AbstractValue value);
+
+  /// Deserializes an [AbstractValue] for this domain from [source].
+  AbstractValue readAbstractValueFromDataSource(DataSource source);
+
+  /// Serializes this [value] for this domain to [sink].
+  void writeAbstractValueToDataSink(DataSink sink, AbstractValue value);
+}
diff --git a/pkg/compiler/lib/src/inferrer/builder_kernel.dart b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
index aea3904..204cdce 100644
--- a/pkg/compiler/lib/src/inferrer/builder_kernel.dart
+++ b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
@@ -12,14 +12,16 @@
 import '../elements/entities.dart';
 import '../elements/jumps.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
+import '../ir/static_type_provider.dart';
+import '../ir/util.dart';
 import '../js_backend/backend.dart';
 import '../js_model/element_map.dart';
 import '../js_model/locals.dart' show JumpVisitor;
 import '../js_model/js_world.dart';
 import '../native/behavior.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
 import 'inferrer_engine.dart';
@@ -27,10 +29,6 @@
 import 'type_graph_nodes.dart';
 import 'type_system.dart';
 
-/// Whether the static type of property gets and method invocations is used
-/// to narrow the inferred type in strong mode.
-bool useStaticResultTypes = false;
-
 /// [KernelTypeGraphBuilder] constructs a type-inference graph for a particular
 /// element.
 ///
@@ -105,13 +103,22 @@
   final Set<Local> _capturedVariables = new Set<Local>();
   final Map<Local, FieldEntity> _capturedAndBoxed;
 
+  final StaticTypeProvider _staticTypeProvider;
+
   /// Whether we currently taken the boolean result of is-checks or null-checks
   /// into account in the local state.
   bool _accumulateIsChecks = false;
 
-  KernelTypeGraphBuilder(this._options, this._closedWorld, this._inferrer,
-      this._analyzedMember, this._analyzedNode, this._localsMap,
-      [this._stateInternal, Map<Local, FieldEntity> capturedAndBoxed])
+  KernelTypeGraphBuilder(
+      this._options,
+      this._closedWorld,
+      this._inferrer,
+      this._analyzedMember,
+      this._analyzedNode,
+      this._localsMap,
+      this._staticTypeProvider,
+      [this._stateInternal,
+      Map<Local, FieldEntity> capturedAndBoxed])
       : this._types = _inferrer.types,
         this._memberData = _inferrer.dataOfMember(_analyzedMember),
         // TODO(johnniwinther): Should side effects also be tracked for field
@@ -126,7 +133,7 @@
             : <Local, FieldEntity>{} {
     if (_state != null) return;
 
-    _state = new LocalState.initial(_analyzedNode,
+    _state = new LocalState.initial(
         inGenerativeConstructor: _inGenerativeConstructor);
   }
 
@@ -134,6 +141,10 @@
 
   ClosureData get _closureDataLookup => _closedWorld.closureDataLookup;
 
+  DartType _getStaticType(ir.Expression node) {
+    return _elementMap.getDartType(_staticTypeProvider.getStaticType(node));
+  }
+
   int _loopLevel = 0;
 
   bool get inLoop => _loopLevel > 0;
@@ -479,7 +490,7 @@
     handleCondition(node.condition);
     LocalState afterConditionWhenTrue = _stateAfterWhenTrue;
     LocalState afterConditionWhenFalse = _stateAfterWhenFalse;
-    _state = new LocalState.childPath(afterConditionWhenFalse, node.message);
+    _state = new LocalState.childPath(afterConditionWhenFalse);
     visit(node.message);
     LocalState stateAfterMessage = _state;
     stateAfterMessage.seenReturnOrThrow = true;
@@ -545,7 +556,7 @@
         changed = false;
         for (ir.SwitchCase switchCase in node.cases) {
           LocalState stateBeforeCase = _state;
-          _state = new LocalState.childPath(stateBeforeCase, switchCase);
+          _state = new LocalState.childPath(stateBeforeCase);
           visit(switchCase);
           LocalState stateAfterCase = _state;
           changed =
@@ -565,7 +576,7 @@
         if (switchCase.isDefault) {
           hasDefaultCase = true;
         }
-        _state = new LocalState.childPath(stateBeforeCase, switchCase);
+        _state = new LocalState.childPath(stateBeforeCase);
         visit(switchCase);
         statesToMerge.add(_state);
       }
@@ -785,8 +796,12 @@
 
       TypeInformation type =
           handleStaticInvoke(node, selector, mask, info.callMethod, arguments);
-      if (useStaticResultTypes) {
-        type = _types.narrowType(type, _elementMap.getStaticType(node));
+      FunctionType functionType =
+          _elementMap.elementEnvironment.getFunctionType(info.callMethod);
+      if (functionType.returnType.containsFreeTypeVariables) {
+        // The return type varies with the call site so we narrow the static
+        // return type.
+        type = _types.narrowType(type, _getStaticType(node));
       }
       return type;
     }
@@ -810,8 +825,29 @@
     }
     TypeInformation type = handleDynamicInvoke(
         CallType.access, node, selector, mask, receiverType, arguments);
-    if (useStaticResultTypes) {
-      type = _types.narrowType(type, _elementMap.getStaticType(node));
+    ir.Member interfaceTarget = node.interfaceTarget;
+    if (interfaceTarget != null) {
+      if (interfaceTarget is ir.Procedure &&
+          (interfaceTarget.kind == ir.ProcedureKind.Method ||
+              interfaceTarget.kind == ir.ProcedureKind.Operator)) {
+        // Pull the type from kernel (instead of from the J-model) because the
+        // interface target might be abstract and therefore not part of the
+        // J-model.
+        ir.DartType returnType = interfaceTarget.function.returnType;
+        // The return type varies with the call site so we narrow the static
+        // return type.
+        if (containsFreeVariables(returnType)) {
+          type = _types.narrowType(type, _getStaticType(node));
+        }
+      } else {
+        // The return type is thrown away when using [TypeMask]s; narrow to the
+        // static return type.
+        type = _types.narrowType(type, _getStaticType(node));
+      }
+    } else {
+      // We don't have a known target but the static type hold some information
+      // if it is a function type.
+      type = _types.narrowType(type, _getStaticType(node));
     }
     return type;
   }
@@ -1041,7 +1077,7 @@
       // Setup (and clear in case of multiple iterations of the loop)
       // the lists of breaks and continues seen in the loop.
       _setupBreaksAndContinues(target);
-      _state = new LocalState.childPath(stateBefore, node);
+      _state = new LocalState.childPath(stateBefore);
       logic();
       changed = stateBefore.mergeAll(_inferrer, _getLoopBackEdges(target));
     } while (changed);
@@ -1211,18 +1247,16 @@
     } else if (member.isConstructor) {
       return handleConstructorInvoke(
           node, node.arguments, selector, mask, member, arguments);
-    } else if (member.isFunction) {
+    } else {
+      assert(member.isFunction, "Unexpected static invocation target: $member");
       TypeInformation type =
           handleStaticInvoke(node, selector, mask, member, arguments);
-      if (useStaticResultTypes) {
-        type = _types.narrowType(type, _elementMap.getStaticType(node));
-      }
-      return type;
-    } else {
-      TypeInformation type =
-          handleClosureCall(node, selector, mask, member, arguments);
-      if (useStaticResultTypes) {
-        type = _types.narrowType(type, _elementMap.getStaticType(node));
+      FunctionType functionType =
+          _elementMap.elementEnvironment.getFunctionType(member);
+      if (functionType.returnType.containsFreeTypeVariables) {
+        // The return type varies with the call site so we narrow the static
+        // return type.
+        type = _types.narrowType(type, _getStaticType(node));
       }
       return type;
     }
@@ -1238,12 +1272,8 @@
   TypeInformation visitStaticGet(ir.StaticGet node) {
     MemberEntity member = _elementMap.getMember(node.target);
     AbstractValue mask = _memberData.typeOfSend(node);
-    TypeInformation type = handleStaticInvoke(
+    return handleStaticInvoke(
         node, new Selector.getter(member.memberName), mask, member, null);
-    if (useStaticResultTypes) {
-      type = _types.narrowType(type, _elementMap.getStaticType(node));
-    }
-    return type;
   }
 
   @override
@@ -1259,37 +1289,41 @@
     return rhsType;
   }
 
-  @override
-  TypeInformation visitPropertyGet(ir.PropertyGet node) {
-    TypeInformation receiverType = visit(node.receiver);
+  TypeInformation handlePropertyGet(
+      ir.TreeNode node, TypeInformation receiverType, ir.Member interfaceTarget,
+      {bool isThis}) {
     Selector selector = _elementMap.getSelector(node);
     AbstractValue mask = _memberData.typeOfSend(node);
-    // TODO(johnniwinther): Use `node.interfaceTarget` to narrow the receiver
-    // type for --trust-type-annotations/strong-mode.
-    if (node.receiver is ir.ThisExpression) {
+    if (isThis) {
       _checkIfExposesThis(
           selector, _types.newTypedSelector(receiverType, mask));
     }
     TypeInformation type = handleDynamicGet(node, selector, mask, receiverType);
-    if (useStaticResultTypes) {
-      type = _types.narrowType(type, _elementMap.getStaticType(node));
+    if (interfaceTarget != null) {
+      // Pull the type from kernel (instead of from the J-model) because the
+      // interface target might be abstract and therefore not part of the
+      // J-model.
+      ir.DartType resultType = interfaceTarget.getterType;
+      // The result type varies with the call site so we narrow the static
+      // result type.
+      if (containsFreeVariables(resultType)) {
+        type = _types.narrowType(type, _getStaticType(node));
+      }
     }
     return type;
   }
 
   @override
+  TypeInformation visitPropertyGet(ir.PropertyGet node) {
+    TypeInformation receiverType = visit(node.receiver);
+    return handlePropertyGet(node, receiverType, node.interfaceTarget,
+        isThis: node.receiver is ir.ThisExpression);
+  }
+
+  @override
   TypeInformation visitDirectPropertyGet(ir.DirectPropertyGet node) {
     TypeInformation receiverType = thisType;
-    MemberEntity member = _elementMap.getMember(node.target);
-    AbstractValue mask = _memberData.typeOfSend(node);
-    // TODO(johnniwinther): Use `node.target` to narrow the receiver type.
-    Selector selector = new Selector.getter(member.memberName);
-    _checkIfExposesThis(selector, _types.newTypedSelector(receiverType, mask));
-    TypeInformation type = handleDynamicGet(node, selector, mask, receiverType);
-    if (useStaticResultTypes) {
-      type = _types.narrowType(type, _elementMap.getStaticType(node));
-    }
-    return type;
+    return handlePropertyGet(node, receiverType, node.target, isThis: true);
   }
 
   @override
@@ -1346,10 +1380,8 @@
     if (operand is ir.VariableGet) {
       Local local = _localsMap.getLocalVariable(operand.variable);
       DartType type = _elementMap.getDartType(node.type);
-      LocalState stateAfterCheckWhenTrue =
-          new LocalState.childPath(_state, node);
-      LocalState stateAfterCheckWhenFalse =
-          new LocalState.childPath(_state, node);
+      LocalState stateAfterCheckWhenTrue = new LocalState.childPath(_state);
+      LocalState stateAfterCheckWhenFalse = new LocalState.childPath(_state);
       stateAfterCheckWhenTrue.narrowLocal(
           _inferrer, _capturedAndBoxed, local, type, node);
       _setStateAfter(_state, stateAfterCheckWhenTrue, stateAfterCheckWhenFalse);
@@ -1362,10 +1394,8 @@
     if (receiver is ir.VariableGet) {
       Local local = _localsMap.getLocalVariable(receiver.variable);
       DartType localType = _localsMap.getLocalType(_elementMap, local);
-      LocalState stateAfterCheckWhenTrue =
-          new LocalState.childPath(_state, node);
-      LocalState stateAfterCheckWhenFalse =
-          new LocalState.childPath(_state, node);
+      LocalState stateAfterCheckWhenTrue = new LocalState.childPath(_state);
+      LocalState stateAfterCheckWhenFalse = new LocalState.childPath(_state);
       stateAfterCheckWhenTrue.updateLocal(_inferrer, _capturedAndBoxed, local,
           _types.nullType, node, localType);
       stateAfterCheckWhenFalse.narrowLocal(_inferrer, _capturedAndBoxed, local,
@@ -1380,11 +1410,10 @@
     handleCondition(node.condition);
     LocalState stateAfterConditionWhenTrue = _stateAfterWhenTrue;
     LocalState stateAfterConditionWhenFalse = _stateAfterWhenFalse;
-    _state = new LocalState.childPath(stateAfterConditionWhenTrue, node.then);
+    _state = new LocalState.childPath(stateAfterConditionWhenTrue);
     visit(node.then);
     LocalState stateAfterThen = _state;
-    _state =
-        new LocalState.childPath(stateAfterConditionWhenFalse, node.otherwise);
+    _state = new LocalState.childPath(stateAfterConditionWhenFalse);
     visit(node.otherwise);
     LocalState stateAfterElse = _state;
     _state =
@@ -1413,17 +1442,17 @@
   TypeInformation visitLogicalExpression(ir.LogicalExpression node) {
     if (node.operator == '&&') {
       LocalState stateBefore = _state;
-      _state = new LocalState.childPath(stateBefore, node.left);
+      _state = new LocalState.childPath(stateBefore);
       handleCondition(node.left);
       LocalState stateAfterLeftWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterLeftWhenFalse = _stateAfterWhenFalse;
-      _state = new LocalState.childPath(stateAfterLeftWhenTrue, node.right);
+      _state = new LocalState.childPath(stateAfterLeftWhenTrue);
       handleCondition(node.right);
       LocalState stateAfterRightWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterRightWhenFalse = _stateAfterWhenFalse;
       LocalState stateAfterWhenTrue = stateAfterRightWhenTrue;
-      LocalState stateAfterWhenFalse =
-          new LocalState.childPath(stateBefore, node).mergeDiamondFlow(
+      LocalState stateAfterWhenFalse = new LocalState.childPath(stateBefore)
+          .mergeDiamondFlow(
               _inferrer, stateAfterLeftWhenFalse, stateAfterRightWhenFalse);
       LocalState after = stateBefore.mergeDiamondFlow(
           _inferrer, stateAfterWhenTrue, stateAfterWhenFalse);
@@ -1431,16 +1460,16 @@
       return _types.boolType;
     } else if (node.operator == '||') {
       LocalState stateBefore = _state;
-      _state = new LocalState.childPath(stateBefore, node.left);
+      _state = new LocalState.childPath(stateBefore);
       handleCondition(node.left);
       LocalState stateAfterLeftWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterLeftWhenFalse = _stateAfterWhenFalse;
-      _state = new LocalState.childPath(stateAfterLeftWhenFalse, node.right);
+      _state = new LocalState.childPath(stateAfterLeftWhenFalse);
       handleCondition(node.right);
       LocalState stateAfterRightWhenTrue = _stateAfterWhenTrue;
       LocalState stateAfterRightWhenFalse = _stateAfterWhenFalse;
-      LocalState stateAfterWhenTrue =
-          new LocalState.childPath(stateBefore, node).mergeDiamondFlow(
+      LocalState stateAfterWhenTrue = new LocalState.childPath(stateBefore)
+          .mergeDiamondFlow(
               _inferrer, stateAfterLeftWhenTrue, stateAfterRightWhenTrue);
       LocalState stateAfterWhenFalse = stateAfterRightWhenFalse;
       LocalState stateAfter = stateBefore.mergeDiamondFlow(
@@ -1459,10 +1488,10 @@
     handleCondition(node.condition);
     LocalState stateAfterWhenTrue = _stateAfterWhenTrue;
     LocalState stateAfterWhenFalse = _stateAfterWhenFalse;
-    _state = new LocalState.childPath(stateAfterWhenTrue, node.then);
+    _state = new LocalState.childPath(stateAfterWhenTrue);
     TypeInformation firstType = visit(node.then);
     LocalState stateAfterThen = _state;
-    _state = new LocalState.childPath(stateAfterWhenFalse, node.otherwise);
+    _state = new LocalState.childPath(stateAfterWhenFalse);
     TypeInformation secondType = visit(node.otherwise);
     LocalState stateAfterElse = _state;
     _state =
@@ -1514,7 +1543,7 @@
     // We don't put the closure in the work queue of the
     // inferrer, because it will share information with its enclosing
     // method, like for example the types of local variables.
-    LocalState closureState = new LocalState.closure(_state, node);
+    LocalState closureState = new LocalState.closure(_state);
     KernelTypeGraphBuilder visitor = new KernelTypeGraphBuilder(
         _options,
         _closedWorld,
@@ -1522,6 +1551,7 @@
         info.callMethod,
         functionNode,
         _localsMap,
+        _staticTypeProvider,
         closureState,
         _capturedAndBoxed);
     visitor.run();
@@ -1544,7 +1574,7 @@
   visitWhileStatement(ir.WhileStatement node) {
     return handleLoop(node, _localsMap.getJumpTargetForWhile(node), () {
       handleCondition(node.condition);
-      _state = new LocalState.childPath(_stateAfterWhenTrue, node.body);
+      _state = new LocalState.childPath(_stateAfterWhenTrue);
       visit(node.body);
     });
   }
@@ -1569,7 +1599,7 @@
     }
     return handleLoop(node, _localsMap.getJumpTargetForFor(node), () {
       handleCondition(node.condition);
-      _state = new LocalState.childPath(_stateAfterWhenTrue, node.body);
+      _state = new LocalState.childPath(_stateAfterWhenTrue);
       visit(node.body);
       for (ir.Expression update in node.updates) {
         visit(update);
@@ -1587,7 +1617,7 @@
     _state = stateBefore.mergeFlow(_inferrer, stateAfterBody);
     for (ir.Catch catchBlock in node.catches) {
       LocalState stateBeforeCatch = _state;
-      _state = new LocalState.childPath(stateBeforeCatch, catchBlock);
+      _state = new LocalState.childPath(stateBeforeCatch);
       visit(catchBlock);
       LocalState stateAfterCatch = _state;
       _state = stateBeforeCatch.mergeFlow(_inferrer, stateAfterCatch);
@@ -1666,18 +1696,28 @@
 
     MemberEntity member =
         _elementMap.getSuperMember(_analyzedMember, node.name);
+    assert(member != null, "No member found for super property get: $node");
     AbstractValue mask = _memberData.typeOfSend(node);
     Selector selector = new Selector.getter(_elementMap.getName(node.name));
-    if (member == null) {
-      return handleSuperNoSuchMethod(node, selector, mask, null);
-    } else {
-      TypeInformation type =
-          handleStaticInvoke(node, selector, mask, member, null);
-      if (useStaticResultTypes) {
-        type = _types.narrowType(type, _elementMap.getStaticType(node));
+    TypeInformation type =
+        handleStaticInvoke(node, selector, mask, member, null);
+    if (member.isGetter) {
+      FunctionType functionType =
+          _elementMap.elementEnvironment.getFunctionType(member);
+      if (functionType.returnType.containsFreeTypeVariables) {
+        // The result type varies with the call site so we narrow the static
+        // result type.
+        type = _types.narrowType(type, _getStaticType(node));
       }
-      return type;
+    } else if (member.isField) {
+      DartType fieldType = _elementMap.elementEnvironment.getFieldType(member);
+      if (fieldType.containsFreeTypeVariables) {
+        // The result type varies with the call site so we narrow the static
+        // result type.
+        type = _types.narrowType(type, _getStaticType(node));
+      }
     }
+    return type;
   }
 
   @override
@@ -1689,15 +1729,12 @@
     TypeInformation rhsType = visit(node.value);
     MemberEntity member =
         _elementMap.getSuperMember(_analyzedMember, node.name, setter: true);
+    assert(member != null, "No member found for super property set: $node");
     AbstractValue mask = _memberData.typeOfSend(node);
     Selector selector = new Selector.setter(_elementMap.getName(node.name));
     ArgumentsTypes arguments = new ArgumentsTypes([rhsType], null);
-    if (member == null) {
-      return handleSuperNoSuchMethod(node, selector, mask, arguments);
-    } else {
-      handleStaticInvoke(node, selector, mask, member, arguments);
-      return rhsType;
-    }
+    handleStaticInvoke(node, selector, mask, member, arguments);
+    return rhsType;
   }
 
   @override
@@ -1712,25 +1749,24 @@
     Selector selector = _elementMap.getSelector(node);
     AbstractValue mask = _memberData.typeOfSend(node);
     if (member == null) {
+      // TODO(johnniwinther): This shouldn't be necessary.
       return handleSuperNoSuchMethod(node, selector, mask, arguments);
-    } else if (member.isFunction) {
+    } else {
+      assert(member.isFunction, "Unexpected super invocation target: $member");
       if (isIncompatibleInvoke(member, arguments)) {
         return handleSuperNoSuchMethod(node, selector, mask, arguments);
       } else {
         TypeInformation type =
             handleStaticInvoke(node, selector, mask, member, arguments);
-        if (useStaticResultTypes) {
-          type = _types.narrowType(type, _elementMap.getStaticType(node));
+        FunctionType functionType =
+            _elementMap.elementEnvironment.getFunctionType(member);
+        if (functionType.returnType.containsFreeTypeVariables) {
+          // The return type varies with the call site so we narrow the static
+          // return type.
+          type = _types.narrowType(type, _getStaticType(node));
         }
         return type;
       }
-    } else {
-      TypeInformation type =
-          handleClosureCall(node, selector, mask, member, arguments);
-      if (useStaticResultTypes) {
-        type = _types.narrowType(type, _elementMap.getStaticType(node));
-      }
-      return type;
     }
   }
 
@@ -1778,27 +1814,26 @@
   bool seenBreakOrContinue = false;
   LocalsHandler _tryBlock;
 
-  LocalState.initial(ir.TreeNode node, {bool inGenerativeConstructor})
+  LocalState.initial({bool inGenerativeConstructor})
       : this.internal(
-            new LocalsHandler(node),
+            new LocalsHandler(),
             inGenerativeConstructor ? new FieldInitializationScope() : null,
             null,
             seenReturnOrThrow: false,
             seenBreakOrContinue: false);
 
-  LocalState.childPath(LocalState other, ir.TreeNode node)
-      : this.internal(new LocalsHandler.from(other._locals, node, isTry: false),
+  LocalState.childPath(LocalState other)
+      : this.internal(new LocalsHandler.from(other._locals),
             new FieldInitializationScope.from(other._fields), other._tryBlock,
             seenReturnOrThrow: false, seenBreakOrContinue: false);
 
-  LocalState.closure(LocalState other, ir.TreeNode node)
-      : this.internal(new LocalsHandler.from(other._locals, node, isTry: false),
+  LocalState.closure(LocalState other)
+      : this.internal(new LocalsHandler.from(other._locals),
             new FieldInitializationScope.from(other._fields), null,
             seenReturnOrThrow: false, seenBreakOrContinue: false);
 
   factory LocalState.tryBlock(LocalState other, ir.TreeNode node) {
-    LocalsHandler locals =
-        new LocalsHandler.from(other._locals, node, isTry: true);
+    LocalsHandler locals = new LocalsHandler.tryBlock(other._locals, node);
     FieldInitializationScope fieldScope =
         new FieldInitializationScope.from(other._fields);
     LocalsHandler tryBlock = locals;
diff --git a/pkg/compiler/lib/src/inferrer/closure_tracer.dart b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
index ce86148..e7ecf72 100644
--- a/pkg/compiler/lib/src/inferrer/closure_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
@@ -7,8 +7,8 @@
 import '../common/names.dart' show Names;
 import '../elements/entities.dart';
 import '../js_backend/backend.dart' show JavaScriptBackend;
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart' show Selector;
+import 'abstract_value_domain.dart';
 import 'debug.dart' as debug;
 import 'inferrer_engine.dart';
 import 'node_tracer.dart';
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index 896f862..e029d4f 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -22,12 +22,11 @@
 import '../native/behavior.dart';
 import '../options.dart';
 import '../serialization/serialization.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/call_structure.dart';
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
 import '../world.dart';
+import 'abstract_value_domain.dart';
 import 'builder_kernel.dart';
 import 'closure_tracer.dart';
 import 'debug.dart' as debug;
@@ -38,6 +37,7 @@
 import 'type_graph_inferrer.dart';
 import 'type_graph_nodes.dart';
 import 'type_system.dart';
+import 'types.dart';
 
 /// An inferencing engine that computes a call graph of [TypeInformation] nodes
 /// by visiting the AST of the application, and then does the inferencing on the
@@ -242,10 +242,6 @@
   bool canFunctionParametersBeUsedForGlobalOptimizations(
       FunctionEntity function);
 
-  /// Returns `true` if parameter and returns types should be trusted for
-  /// [member].
-  bool trustTypeAnnotations(MemberEntity member);
-
   /// Returns `true` if inference of parameter types is disabled for [member].
   bool assumeDynamic(MemberEntity member);
 }
@@ -782,7 +778,8 @@
         this,
         member,
         body,
-        closedWorld.globalLocalsMap.getLocalsMap(member));
+        closedWorld.globalLocalsMap.getLocalsMap(member),
+        closedWorld.elementMap.getStaticTypeProvider(member));
     return visitor.run();
   }
 
@@ -832,7 +829,7 @@
         MemberEntity member = info.calledElement;
         inferredDataBuilder.addFunctionCalledInLoop(member);
       } else if (info.mask != null &&
-          !abstractValueDomain.containsAll(info.mask)) {
+          abstractValueDomain.containsAll(info.mask).isDefinitelyFalse) {
         // For instance methods, we only register a selector called in a
         // loop if it is a typed selector, to avoid marking too many
         // methods as being called from within a loop. This cuts down
@@ -1246,12 +1243,6 @@
   }
 
   @override
-  bool trustTypeAnnotations(MemberEntity member) {
-    return closedWorld.annotationsData.trustTypeAnnotationsMembers
-        .contains(member);
-  }
-
-  @override
   bool assumeDynamic(MemberEntity member) {
     return closedWorld.annotationsData.assumeDynamicMembers.contains(member);
   }
@@ -1278,7 +1269,8 @@
   bool checkLoopPhiNode(ir.Node node) => true;
 
   @override
-  bool checkPhiNode(ir.Node node) => true;
+  bool checkPhiNode(ir.Node node) =>
+      node == null || node is ir.TryCatch || node is ir.TryFinally;
 
   @override
   void forEachParameter(FunctionEntity function, void f(Local parameter)) {
diff --git a/pkg/compiler/lib/src/inferrer/locals_handler.dart b/pkg/compiler/lib/src/inferrer/locals_handler.dart
index 7b58f76..cfe7f1c 100644
--- a/pkg/compiler/lib/src/inferrer/locals_handler.dart
+++ b/pkg/compiler/lib/src/inferrer/locals_handler.dart
@@ -8,6 +8,7 @@
 import 'package:kernel/ast.dart' as ir;
 import '../elements/entities.dart';
 import '../elements/types.dart';
+import '../ir/util.dart';
 import '../util/util.dart';
 import 'inferrer_engine.dart';
 import 'type_graph_nodes.dart';
@@ -20,41 +21,69 @@
  * once the control flow block has been visited.
  */
 class VariableScope {
+  /// The number of parent scopes of this scope.
+  ///
+  /// This is used for computing common parents efficiently.
+  final int _level;
+
   Map<Local, TypeInformation> variables;
 
   /// The parent of this scope. Null for the root scope.
   final VariableScope parent;
 
   /// The [ir.Node] that created this scope.
-  final ir.Node block;
+  final ir.Node tryBlock;
 
-  /// `true` if this scope is for a try block.
-  final bool isTry;
+  final VariableScope copyOf;
 
-  VariableScope(this.block, {VariableScope parent, this.isTry})
+  VariableScope({this.parent})
       : this.variables = null,
-        this.parent = parent {
-    assert(isTry == (block is ir.TryCatch || block is ir.TryFinally),
-        "Unexpected block $block for isTry=$isTry");
+        this.copyOf = null,
+        this.tryBlock = null,
+        _level = (parent?._level ?? -1) + 1;
+
+  VariableScope.tryBlock(this.tryBlock, {this.parent})
+      : this.variables = null,
+        this.copyOf = null,
+        _level = (parent?._level ?? -1) + 1 {
+    assert(tryBlock is ir.TryCatch || tryBlock is ir.TryFinally,
+        "Unexpected block $tryBlock for VariableScope.tryBlock");
   }
 
   VariableScope.deepCopyOf(VariableScope other)
       : variables = other.variables == null
             ? null
             : new Map<Local, TypeInformation>.from(other.variables),
-        block = other.block,
-        isTry = other.isTry,
+        tryBlock = other.tryBlock,
+        copyOf = other.copyOf ?? other,
+        _level = other._level,
         parent = other.parent == null
             ? null
             : new VariableScope.deepCopyOf(other.parent);
 
-  VariableScope.topLevelCopyOf(VariableScope other)
-      : variables = other.variables == null
-            ? null
-            : new Map<Local, TypeInformation>.from(other.variables),
-        block = other.block,
-        isTry = other.isTry,
-        parent = other.parent;
+  /// `true` if this scope is for a try block.
+  bool get isTry => tryBlock != null;
+
+  /// Returns the [VariableScope] that defines the identity of this scope.
+  ///
+  /// If this scope is a copy of another scope, the identity is the identity
+  /// of the other scope, otherwise the identity is the scope itself.
+  VariableScope get identity => copyOf ?? this;
+
+  /// Returns the common parent between this and [other] based on [identity].
+  VariableScope commonParent(VariableScope other) {
+    if (identity == other.identity) {
+      return identity;
+    } else if (_level > other._level) {
+      return parent.commonParent(other);
+    } else if (_level < other._level) {
+      return commonParent(other.parent);
+    } else if (_level > 0) {
+      return parent.commonParent(other.parent);
+    } else {
+      return null;
+    }
+  }
 
   TypeInformation operator [](Local variable) {
     TypeInformation result;
@@ -72,15 +101,18 @@
     variables[variable] = mask;
   }
 
-  void forEachOwnLocal(void f(Local variable, TypeInformation type)) {
-    if (variables == null) return;
-    variables.forEach(f);
+  /// Calls [f] for all variables in this and parent scopes until and including
+  /// [scope]. [f] is called at most once for each variable.
+  void forEachLocalUntilScope(
+      VariableScope scope, void f(Local variable, TypeInformation type)) {
+    _forEachLocalUntilScope(scope, f, new Setlet<Local>(), this);
   }
 
-  void forEachLocalUntilNode(
-      ir.Node node, void f(Local variable, TypeInformation type),
-      [Setlet<Local> seenLocals]) {
-    if (seenLocals == null) seenLocals = new Setlet<Local>();
+  void _forEachLocalUntilScope(
+      VariableScope scope,
+      void f(Local variable, TypeInformation type),
+      Setlet<Local> seenLocals,
+      VariableScope origin) {
     if (variables != null) {
       variables.forEach((variable, type) {
         if (seenLocals.contains(variable)) return;
@@ -88,12 +120,22 @@
         f(variable, type);
       });
     }
-    if (node != null && block == node) return;
-    if (parent != null) parent.forEachLocalUntilNode(node, f, seenLocals);
+    if (scope?.identity == identity) {
+      return;
+    }
+    if (parent != null) {
+      parent._forEachLocalUntilScope(scope, f, seenLocals, origin);
+    } else {
+      assert(
+          scope == null,
+          "Scope not found: \n"
+          "origin=${origin.toStructuredText('')}\n"
+          "scope=${scope.toStructuredText('')}");
+    }
   }
 
   void forEachLocal(void f(Local variable, TypeInformation type)) {
-    forEachLocalUntilNode(null, f);
+    forEachLocalUntilScope(null, f);
   }
 
   bool updates(Local variable) {
@@ -109,12 +151,13 @@
 
   void _toStructuredText(StringBuffer sb, String indent) {
     sb.write('VariableScope($hashCode) [');
-    String blockText = block.toString().replaceAll('\n', ' ');
-    if (blockText.length > 20) {
-      blockText = blockText.substring(0, 17) + '...';
+    sb.write('\n${indent}  level:$_level');
+    if (copyOf != null) {
+      sb.write('\n${indent}  copyOf:VariableScope(${copyOf.hashCode})');
     }
-    sb.write('\n${indent}  block: '
-        '(${block.runtimeType}:${block.hashCode})${blockText}');
+    if (tryBlock != null) {
+      sb.write('\n${indent}  tryBlock: ${nodeToDebugString(tryBlock)}');
+    }
     if (variables != null) {
       sb.write('\n${indent}  variables:');
       variables.forEach((Local local, TypeInformation type) {
@@ -280,11 +323,13 @@
 class LocalsHandler {
   final VariableScope _locals;
 
-  LocalsHandler(ir.Node block)
-      : _locals = new VariableScope(block, isTry: false);
+  LocalsHandler() : _locals = new VariableScope();
 
-  LocalsHandler.from(LocalsHandler other, ir.Node block, {bool isTry: false})
-      : _locals = new VariableScope(block, isTry: isTry, parent: other._locals);
+  LocalsHandler.from(LocalsHandler other)
+      : _locals = new VariableScope(parent: other._locals);
+
+  LocalsHandler.tryBlock(LocalsHandler other, ir.TreeNode block)
+      : _locals = new VariableScope.tryBlock(block, parent: other._locals);
 
   LocalsHandler.deepCopyOf(LocalsHandler other)
       : _locals = new VariableScope.deepCopyOf(other._locals);
@@ -304,7 +349,7 @@
       TypeInformation existing = tryBlock._locals.parent[local];
       if (existing != null) {
         TypeInformation phiType = inferrer.types.allocatePhi(
-            tryBlock._locals.block, local, existing,
+            tryBlock._locals.tryBlock, local, existing,
             isTry: tryBlock._locals.isTry);
         TypeInformation inputType =
             inferrer.types.addPhiInput(local, phiType, type);
@@ -326,7 +371,18 @@
   /// from both are merged with a phi type.
   LocalsHandler mergeFlow(InferrerEngine inferrer, LocalsHandler other,
       {bool inPlace: false}) {
-    other._locals.forEachLocalUntilNode(_locals.block,
+    VariableScope common = _locals.commonParent(other._locals);
+    assert(
+        common != null,
+        "No common parent for\n"
+        "1:${_locals.toStructuredText('  ')}\n"
+        "2:${other._locals.toStructuredText('  ')}");
+    assert(
+        common == _locals || _locals.variables == null,
+        "Non-empty common parent for\n"
+        "1:${common.toStructuredText('  ')}\n"
+        "2:${_locals.toStructuredText('  ')}");
+    other._locals.forEachLocalUntilScope(common,
         (Local local, TypeInformation type) {
       TypeInformation myType = _locals[local];
       if (myType == null) return; // Variable is only defined in [other].
@@ -355,10 +411,27 @@
       }
     }
 
-    thenBranch._locals.forEachLocalUntilNode(_locals.block, (Local local, _) {
+    VariableScope common = _locals.commonParent(thenBranch._locals);
+    assert(
+        common != null,
+        "No common parent for\n"
+        "1:${_locals.toStructuredText('  ')}\n"
+        "2:${thenBranch._locals.toStructuredText('  ')}");
+    assert(
+        _locals.commonParent(elseBranch._locals) == common,
+        "Diff common parent for\n"
+        "1:${common.toStructuredText('  ')}\n2:"
+        "${_locals.commonParent(elseBranch._locals)?.toStructuredText('  ')}");
+    assert(
+        common == _locals || _locals.variables == null,
+        "Non-empty common parent for\n"
+        "common:${common.toStructuredText('  ')}\n"
+        "1:${_locals.toStructuredText('  ')}\n"
+        "2:${thenBranch._locals.toStructuredText('  ')}");
+    thenBranch._locals.forEachLocalUntilScope(common, (Local local, _) {
       mergeLocal(local);
     });
-    elseBranch._locals.forEachLocalUntilNode(_locals.block, (Local local, _) {
+    elseBranch._locals.forEachLocalUntilScope(common, (Local local, _) {
       // Discard locals we already processed when iterating over
       // [thenBranch]'s locals.
       if (!thenBranch._locals.updates(local)) mergeLocal(local);
@@ -399,16 +472,44 @@
   LocalsHandler mergeAfterBreaks(
       InferrerEngine inferrer, Iterable<LocalsHandler> handlers,
       {bool keepOwnLocals: true}) {
-    ir.Node level = _locals.block;
+    ir.Node tryBlock = _locals.tryBlock;
     // Use a separate locals handler to perform the merge in, so that Phi
     // creation does not invalidate previous type knowledge while we might
     // still look it up.
-    LocalsHandler merged =
-        new LocalsHandler.from(this, level, isTry: _locals.isTry);
+    VariableScope merged = tryBlock != null
+        ? new VariableScope.tryBlock(tryBlock, parent: _locals)
+        : new VariableScope(parent: _locals);
     Set<Local> seenLocals = new Setlet<Local>();
     // Merge all other handlers.
     for (LocalsHandler handler in handlers) {
-      merged._mergeHandler(inferrer, handler, seenLocals);
+      VariableScope common = _locals.commonParent(handler._locals);
+      assert(
+          common != null,
+          "No common parent for\n"
+          "1:${_locals.toStructuredText('  ')}\n"
+          "2:${handler._locals.toStructuredText('  ')}");
+      assert(
+          common == _locals || _locals.variables == null,
+          "Non-empty common parent for\n"
+          "common:${common.toStructuredText('  ')}\n"
+          "1:${_locals.toStructuredText('  ')}\n"
+          "2:${handler._locals.toStructuredText('  ')}");
+      handler._locals.forEachLocalUntilScope(common, (local, otherType) {
+        TypeInformation myType = merged[local];
+        if (myType == null) return;
+        TypeInformation newType;
+        if (!seenLocals.contains(local)) {
+          newType = inferrer.types.allocatePhi(
+              merged.tryBlock, local, otherType,
+              isTry: merged.isTry);
+          seenLocals.add(local);
+        } else {
+          newType = inferrer.types.addPhiInput(local, myType, otherType);
+        }
+        if (newType != myType) {
+          merged[local] = newType;
+        }
+      });
     }
     // If we want to keep own locals, we merge [seenLocals] from [this] into
     // [merged] to update the Phi nodes with original values.
@@ -416,56 +517,47 @@
       for (Local variable in seenLocals) {
         TypeInformation originalType = _locals[variable];
         if (originalType != null) {
-          merged._locals[variable] = inferrer.types
-              .addPhiInput(variable, merged._locals[variable], originalType);
+          merged[variable] = inferrer.types
+              .addPhiInput(variable, merged[variable], originalType);
         }
       }
     }
     // Clean up Phi nodes with single input and store back result into
     // actual locals handler.
-    merged._locals.forEachLocalUntilNode(_locals.block,
+    merged.forEachLocalUntilScope(merged,
         (Local variable, TypeInformation type) {
-      _locals[variable] = inferrer.types.simplifyPhi(level, variable, type);
+      _locals[variable] = inferrer.types.simplifyPhi(tryBlock, variable, type);
     });
     return this;
   }
 
-  /**
-   * Merge [other] into this handler. Returns whether a local in this
-   * has changed. If [seen] is not null, we allocate new Phi nodes
-   * unless the local is already present in the set [seen]. This effectively
-   * overwrites the current type knowledge in this handler.
-   */
-  bool _mergeHandler(InferrerEngine inferrer, LocalsHandler other,
-      [Set<Local> seen]) {
-    bool changed = false;
-    other._locals.forEachLocalUntilNode(_locals.block, (local, otherType) {
-      TypeInformation myType = _locals[local];
-      if (myType == null) return;
-      TypeInformation newType;
-      if (seen != null && !seen.contains(local)) {
-        newType = inferrer.types
-            .allocatePhi(_locals.block, local, otherType, isTry: _locals.isTry);
-        seen.add(local);
-      } else {
-        newType = inferrer.types.addPhiInput(local, myType, otherType);
-      }
-      if (newType != myType) {
-        changed = true;
-        _locals[local] = newType;
-      }
-    });
-    return changed;
-  }
-
-  /**
-   * Merge all [LocalsHandler] in [handlers] into this handler.
-   * Returns whether a local in this handler has changed.
-   */
+  /// Merge all [LocalsHandler] in [handlers] into this handler.
+  /// Returns whether a local in this handler has changed.
   bool mergeAll(InferrerEngine inferrer, Iterable<LocalsHandler> handlers) {
     bool changed = false;
-    handlers.forEach((other) {
-      changed = _mergeHandler(inferrer, other) || changed;
+    handlers.forEach((LocalsHandler other) {
+      VariableScope common = _locals.commonParent(other._locals);
+      assert(
+          common != null,
+          "No common parent for\n"
+          "1:${_locals.toStructuredText('  ')}\n"
+          "2:${other._locals.toStructuredText('  ')}");
+      assert(
+          common == _locals || _locals.variables == null,
+          "Non-empty common parent for\n"
+          "common:${common.toStructuredText('  ')}\n"
+          "1:${_locals.toStructuredText('  ')}\n"
+          "2:${other._locals.toStructuredText('  ')}");
+      other._locals.forEachLocalUntilScope(common, (local, otherType) {
+        TypeInformation myType = _locals[local];
+        if (myType == null) return;
+        TypeInformation newType =
+            inferrer.types.addPhiInput(local, myType, otherType);
+        if (newType != myType) {
+          changed = true;
+          _locals[local] = newType;
+        }
+      });
     });
     return changed;
   }
diff --git a/pkg/compiler/lib/src/inferrer/node_tracer.dart b/pkg/compiler/lib/src/inferrer/node_tracer.dart
index b09dfcc..e88535a 100644
--- a/pkg/compiler/lib/src/inferrer/node_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/node_tracer.dart
@@ -6,8 +6,8 @@
 
 import '../common/names.dart' show Identifiers;
 import '../elements/entities.dart';
-import '../types/abstract_value_domain.dart';
 import '../util/util.dart' show Setlet;
+import 'abstract_value_domain.dart';
 import 'debug.dart' as debug;
 import 'inferrer_engine.dart';
 import 'type_graph_nodes.dart';
diff --git a/pkg/compiler/lib/src/inferrer/trivial.dart b/pkg/compiler/lib/src/inferrer/trivial.dart
new file mode 100644
index 0000000..63d0b8e
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/trivial.dart
@@ -0,0 +1,449 @@
+// 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 '../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
+import '../elements/entities.dart';
+import '../elements/names.dart';
+import '../serialization/serialization.dart';
+import '../universe/selector.dart';
+import '../universe/world_builder.dart';
+import '../universe/use.dart';
+import '../world.dart';
+import 'abstract_value_domain.dart';
+
+class TrivialAbstractValue implements AbstractValue {
+  const TrivialAbstractValue();
+
+  String toString() => '?';
+}
+
+class TrivialAbstractValueDomain implements AbstractValueDomain {
+  const TrivialAbstractValueDomain();
+
+  @override
+  AbstractValue get dynamicType => const TrivialAbstractValue();
+
+  @override
+  void writeAbstractValueToDataSink(DataSink sink, AbstractValue value) {}
+
+  @override
+  AbstractValue readAbstractValueFromDataSource(DataSource source) =>
+      const TrivialAbstractValue();
+
+  @override
+  String getCompactText(AbstractValue value) => '?';
+
+  @override
+  AbstractBool isFixedLengthJsIndexable(AbstractValue value) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool isJsIndexableAndIterable(AbstractValue value) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool isJsIndexable(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  MemberEntity locateSingleMember(AbstractValue receiver, Selector selector) =>
+      null;
+
+  @override
+  AbstractBool isIn(AbstractValue subset, AbstractValue superset) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool contains(AbstractValue superset, AbstractValue subset) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool needsNoSuchMethodHandling(
+          AbstractValue receiver, Selector selector) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool isTargetingMember(
+          AbstractValue receiver, MemberEntity member, Name name) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractValue computeReceiver(Iterable<MemberEntity> members) =>
+      const TrivialAbstractValue();
+
+  @override
+  PrimitiveConstantValue getPrimitiveValue(AbstractValue value) => null;
+
+  @override
+  AbstractValue createPrimitiveValue(
+          AbstractValue originalValue, PrimitiveConstantValue value) =>
+      const TrivialAbstractValue();
+
+  @override
+  bool isPrimitiveValue(AbstractValue value) => false;
+
+  @override
+  MemberEntity getAllocationElement(AbstractValue value) => null;
+
+  @override
+  Object getAllocationNode(AbstractValue value) => null;
+
+  @override
+  AbstractValue getGeneralization(AbstractValue value) =>
+      const TrivialAbstractValue();
+
+  @override
+  bool isSpecializationOf(
+          AbstractValue specialization, AbstractValue generalization) =>
+      false;
+
+  @override
+  AbstractValue getDictionaryValueForKey(AbstractValue value, String key) {
+    throw new UnsupportedError(
+        "TrivialAbstractValueDomain.getDictionaryValueForKey");
+  }
+
+  @override
+  bool containsDictionaryKey(AbstractValue value, String key) {
+    throw new UnsupportedError(
+        "TrivialAbstractValueDomain.containsDictionaryKey");
+  }
+
+  @override
+  AbstractValue createDictionaryValue(
+          AbstractValue originalValue,
+          Object allocationNode,
+          MemberEntity allocationElement,
+          AbstractValue key,
+          AbstractValue value,
+          Map<String, AbstractValue> mappings) =>
+      const TrivialAbstractValue();
+
+  @override
+  bool isDictionary(AbstractValue value) => false;
+
+  @override
+  AbstractValue getMapValueType(AbstractValue value) {
+    throw new UnsupportedError("TrivialAbstractValueDomain.getMapValueType");
+  }
+
+  @override
+  AbstractValue getMapKeyType(AbstractValue value) {
+    throw new UnsupportedError("TrivialAbstractValueDomain.getMapKeyType");
+  }
+
+  @override
+  AbstractValue createMapValue(
+          AbstractValue originalValue,
+          Object allocationNode,
+          MemberEntity allocationElement,
+          AbstractValue key,
+          AbstractValue value) =>
+      const TrivialAbstractValue();
+
+  @override
+  bool isMap(AbstractValue value) => false;
+
+  @override
+  int getContainerLength(AbstractValue value) => null;
+
+  @override
+  AbstractValue getContainerElementType(AbstractValue value) {
+    throw new UnsupportedError(
+        "TrivialAbstractValueDomain.getContainerElementType");
+  }
+
+  @override
+  AbstractValue createContainerValue(
+          AbstractValue originalValue,
+          Object allocationNode,
+          MemberEntity allocationElement,
+          AbstractValue elementType,
+          int length) =>
+      const TrivialAbstractValue();
+
+  @override
+  bool isContainer(AbstractValue value) => false;
+
+  @override
+  AbstractValue computeAbstractValueForConstant(ConstantValue value) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractBool containsAll(AbstractValue a) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool areDisjoint(AbstractValue a, AbstractValue b) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractValue intersection(AbstractValue a, AbstractValue b) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue unionOfMany(Iterable<AbstractValue> values) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue union(AbstractValue a, AbstractValue b) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractBool isPrimitiveOrNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isStringOrNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isString(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isBooleanOrNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isBoolean(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isDoubleOrNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isDouble(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isNumberOrNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isNumber(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isIntegerOrNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isPositiveIntegerOrNull(AbstractValue value) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool isPositiveInteger(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isUInt31(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isUInt32(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isInteger(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isInterceptor(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isPrimitiveString(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isArray(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isMutableIndexable(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isMutableArray(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isExtendableArray(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isFixedArray(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isIndexablePrimitive(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isPrimitiveArray(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isPrimitiveBoolean(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isPrimitiveNumber(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isPrimitive(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  ClassEntity getExactClass(AbstractValue value) => null;
+
+  @override
+  AbstractBool isExactOrNull(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isExact(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isEmpty(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isInstanceOf(AbstractValue value, ClassEntity cls) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool isInstanceOfOrNull(AbstractValue value, ClassEntity cls) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool containsOnlyType(AbstractValue value, ClassEntity cls) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractBool containsType(AbstractValue value, ClassEntity cls) =>
+      AbstractBool.Maybe;
+
+  @override
+  AbstractValue includeNull(AbstractValue value) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue excludeNull(AbstractValue value) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractBool couldBeTypedArray(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractBool isTypedArray(AbstractValue value) => AbstractBool.Maybe;
+
+  @override
+  AbstractValue createNullableSubtype(ClassEntity cls) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue createNonNullSubtype(ClassEntity cls) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue createNonNullSubclass(ClassEntity cls) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue createNullableExact(ClassEntity cls) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue createNonNullExact(ClassEntity cls) =>
+      const TrivialAbstractValue();
+
+  @override
+  AbstractValue get asyncStarStreamType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get asyncFutureType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get syncStarIterableType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get emptyType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get constMapType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get constListType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get positiveIntType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get uint32Type => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get uint31Type => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get fixedListType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get growableListType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get nullType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get nonNullType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get mapType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get listType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get stringType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get numType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get doubleType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get intType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get boolType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get functionType => const TrivialAbstractValue();
+
+  @override
+  AbstractValue get typeType => const TrivialAbstractValue();
+}
+
+class TrivialAbstractValueStrategy implements AbstractValueStrategy {
+  const TrivialAbstractValueStrategy();
+
+  @override
+  AbstractValueDomain createDomain(JClosedWorld closedWorld) {
+    return const TrivialAbstractValueDomain();
+  }
+
+  @override
+  SelectorConstraintsStrategy createSelectorStrategy() {
+    return const TrivialSelectorStrategy();
+  }
+}
+
+class TrivialSelectorStrategy implements SelectorConstraintsStrategy {
+  const TrivialSelectorStrategy();
+
+  @override
+  UniverseSelectorConstraints createSelectorConstraints(
+      Selector selector, Object initialConstraint) {
+    return const TrivialUniverseSelectorConstraints();
+  }
+
+  @override
+  bool appliedUnnamed(DynamicUse dynamicUse, MemberEntity member,
+      covariant JClosedWorld world) {
+    return dynamicUse.selector.appliesUnnamed(member);
+  }
+}
+
+class TrivialUniverseSelectorConstraints
+    implements UniverseSelectorConstraints {
+  const TrivialUniverseSelectorConstraints();
+
+  @override
+  bool addReceiverConstraint(Object constraint) => false;
+
+  @override
+  bool needsNoSuchMethodHandling(Selector selector, World world) => true;
+
+  @override
+  bool canHit(MemberEntity element, Name name, World world) => true;
+
+  String toString() => 'TrivialUniverseSelectorConstraints:$hashCode';
+}
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
index 549c287..9eadce5 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
@@ -6,7 +6,7 @@
 import '../../compiler_new.dart';
 import '../elements/entities.dart';
 import '../elements/entity_utils.dart' as utils;
-import '../types/abstract_value_domain.dart';
+import 'abstract_value_domain.dart';
 import 'inferrer_engine.dart';
 import 'type_graph_nodes.dart';
 import 'debug.dart';
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index b51384d..67f830a 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -12,11 +12,11 @@
 import '../elements/entities.dart';
 import '../js_backend/inferred_data.dart';
 import '../js_model/elements.dart' show JClosureCallMethod;
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../world.dart';
+import 'abstract_value_domain.dart';
 import 'inferrer_engine.dart';
 import 'type_graph_nodes.dart';
+import 'types.dart';
 
 /**
  * A work queue for the inferrer. It filters out nodes that are tagged as
@@ -114,7 +114,8 @@
 
       bool throwsAlways =
           // Always throws if the return type was inferred to be non-null empty.
-          returnType != null && abstractValueDomain.isEmpty(returnType);
+          returnType != null &&
+              abstractValueDomain.isEmpty(returnType).isDefinitelyTrue;
 
       bool isCalledOnce =
           typeInformation.isCalledOnce(); //isMemberCalledOnce(member);
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 6b4d33d..f614109 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -12,10 +12,10 @@
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart' show Selector;
 import '../util/util.dart' show ImmutableEmptySet, Setlet;
 import '../world.dart' show JClosedWorld;
+import 'abstract_value_domain.dart';
 import 'debug.dart' as debug;
 import 'locals_handler.dart' show ArgumentsTypes;
 import 'inferrer_engine.dart';
@@ -478,8 +478,7 @@
   AbstractValue potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
     if (inferrer.options.assignmentCheckPolicy.isTrusted ||
-        inferrer.options.assignmentCheckPolicy.isEmitted ||
-        inferrer.trustTypeAnnotations(_member)) {
+        inferrer.options.assignmentCheckPolicy.isEmitted) {
       return _potentiallyNarrowType(mask, inferrer);
     }
     return mask;
@@ -792,8 +791,7 @@
 
   AbstractValue potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
-    if (inferrer.options.parameterCheckPolicy.isTrusted ||
-        inferrer.trustTypeAnnotations(_method)) {
+    if (inferrer.options.parameterCheckPolicy.isTrusted) {
       // In checked or strong mode we don't trust the types of the arguments
       // passed to a parameter. The means that the checking of a parameter is
       // based on the actual arguments.
@@ -1084,7 +1082,7 @@
       Selector selector, AbstractValue mask, InferrerEngine inferrer) {
     JClosedWorld closedWorld = inferrer.closedWorld;
     if (mask == null) return null;
-    if (!inferrer.abstractValueDomain.isIntegerOrNull(mask)) {
+    if (inferrer.abstractValueDomain.isIntegerOrNull(mask).isPotentiallyFalse) {
       return null;
     }
     if (!selector.isCall && !selector.isOperator) return null;
@@ -1265,7 +1263,8 @@
         }
       }));
     }
-    if (isConditional && abstractValueDomain.canBeNull(receiver.type)) {
+    if (isConditional &&
+        abstractValueDomain.isNull(receiver.type).isPotentiallyTrue) {
       // Conditional call sites (e.g. `a?.b`) may be null if the receiver is
       // null.
       result = abstractValueDomain.includeNull(result);
@@ -1487,8 +1486,10 @@
     AbstractValue intersection =
         abstractValueDomain.intersection(input, typeAnnotation);
     if (debug.ANOMALY_WARN) {
-      if (!abstractValueDomain.contains(input, intersection) ||
-          !abstractValueDomain.contains(typeAnnotation, intersection)) {
+      if (abstractValueDomain.contains(input, intersection).isDefinitelyFalse ||
+          abstractValueDomain
+              .contains(typeAnnotation, intersection)
+              .isDefinitelyFalse) {
         print("ANOMALY WARNING: narrowed $input to $intersection via "
             "$typeAnnotation");
       }
@@ -1732,8 +1733,8 @@
       for (String key in typeInfoMap.keys) {
         TypeInformation value = typeInfoMap[key];
         if (!abstractValueDomain.containsDictionaryKey(type, key) &&
-            !abstractValueDomain.containsAll(value.type) &&
-            !abstractValueDomain.canBeNull(value.type)) {
+            abstractValueDomain.containsAll(value.type).isDefinitelyFalse &&
+            abstractValueDomain.isNull(value.type).isDefinitelyFalse) {
           return toTypeMask(inferrer);
         }
         if (abstractValueDomain.getDictionaryValueForKey(type, key) !=
diff --git a/pkg/compiler/lib/src/inferrer/type_system.dart b/pkg/compiler/lib/src/inferrer/type_system.dart
index e2c5335..cff86a1 100644
--- a/pkg/compiler/lib/src/inferrer/type_system.dart
+++ b/pkg/compiler/lib/src/inferrer/type_system.dart
@@ -6,9 +6,9 @@
 import '../common.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart';
 import '../world.dart';
+import 'abstract_value_domain.dart';
 import 'type_graph_nodes.dart';
 
 /// Strategy for creating type information from members and parameters and type
@@ -310,7 +310,9 @@
   TypeInformation refineReceiver(
       Selector selector, AbstractValue mask, TypeInformation receiver,
       {bool isConditional}) {
-    if (_abstractValueDomain.isExact(receiver.type)) return receiver;
+    if (_abstractValueDomain.isExact(receiver.type).isDefinitelyTrue) {
+      return receiver;
+    }
     AbstractValue otherType = _closedWorld.computeReceiverType(selector, mask);
     // Conditional sends (a?.b) can still narrow the possible types of `a`,
     // however, we still need to consider that `a` may be null.
@@ -321,8 +323,8 @@
     }
     // If this is refining to nullable subtype of `Object` just return
     // the receiver. We know the narrowing is useless.
-    if (_abstractValueDomain.canBeNull(otherType) &&
-        _abstractValueDomain.containsAll(otherType)) {
+    if (_abstractValueDomain.isNull(otherType).isPotentiallyTrue &&
+        _abstractValueDomain.containsAll(otherType).isPotentiallyTrue) {
       return receiver;
     }
     TypeInformation newType =
@@ -365,7 +367,7 @@
     if (isNullable) {
       otherType = _abstractValueDomain.includeNull(otherType);
     }
-    if (_abstractValueDomain.isExact(type.type)) {
+    if (_abstractValueDomain.isExact(type.type).isDefinitelyTrue) {
       return type;
     } else {
       TypeInformation newType =
@@ -379,7 +381,7 @@
    * Returns the non-nullable type of [type].
    */
   TypeInformation narrowNotNull(TypeInformation type) {
-    if (_abstractValueDomain.isExact(type.type)) {
+    if (_abstractValueDomain.isExact(type.type).isDefinitelyTrue) {
       return type;
     }
     TypeInformation newType = new NarrowTypeInformation(_abstractValueDomain,
@@ -472,7 +474,9 @@
     ClassEntity typedDataClass = _closedWorld.commonElements.typedDataClass;
     bool isTypedArray = typedDataClass != null &&
         _closedWorld.classHierarchy.isInstantiated(typedDataClass) &&
-        _abstractValueDomain.isInstanceOfOrNull(type.type, typedDataClass);
+        _abstractValueDomain
+            .isInstanceOfOrNull(type.type, typedDataClass)
+            .isDefinitelyTrue;
     bool isConst = (type.type == _abstractValueDomain.constListType);
     bool isFixed = (type.type == _abstractValueDomain.fixedListType) ||
         isConst ||
@@ -648,7 +652,9 @@
       // work the result will be `dynamic`.
       // TODO(sigmund): change to `mask == dynamicType` so we can continue to
       // track the non-nullable bit.
-      if (_abstractValueDomain.containsAll(mask)) return dynamicType;
+      if (_abstractValueDomain.containsAll(mask).isPotentiallyTrue) {
+        return dynamicType;
+      }
       list.add(mask);
     }
 
@@ -657,7 +663,9 @@
       newType =
           newType == null ? mask : _abstractValueDomain.union(newType, mask);
       // Likewise - stop early if we already reach dynamic.
-      if (_abstractValueDomain.containsAll(newType)) return dynamicType;
+      if (_abstractValueDomain.containsAll(newType).isPotentiallyTrue) {
+        return dynamicType;
+      }
     }
 
     return newType ?? _abstractValueDomain.emptyType;
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
index c74600a..2dfe38a 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
@@ -524,28 +524,27 @@
    * invoked on this type mask. [selector] is used to ensure library
    * privacy is taken into account.
    */
-  bool canHit(
-      MemberEntity element, Selector selector, JClosedWorld closedWorld) {
+  bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
     CommonElements commonElements = closedWorld.commonElements;
-    assert(element.name == selector.name);
+    assert(element.name == name.text);
     if (isEmpty) return false;
     if (isNull) {
       return closedWorld.hasElementIn(
-          commonElements.jsNullClass, selector, element);
+          commonElements.jsNullClass, name, element);
     }
 
     ClassEntity other = element.enclosingClass;
     if (other == commonElements.jsNullClass) {
       return isNullable;
     } else if (isExact) {
-      return closedWorld.hasElementIn(base, selector, element);
+      return closedWorld.hasElementIn(base, name, element);
     } else if (isSubclass) {
-      return closedWorld.hasElementIn(base, selector, element) ||
+      return closedWorld.hasElementIn(base, name, element) ||
           closedWorld.classHierarchy.isSubclassOf(other, base) ||
           closedWorld.hasAnySubclassThatMixes(base, other);
     } else {
       assert(isSubtype);
-      bool result = closedWorld.hasElementIn(base, selector, element) ||
+      bool result = closedWorld.hasElementIn(base, name, element) ||
           closedWorld.classHierarchy.isSubtypeOf(other, base) ||
           closedWorld.hasAnySubclassThatImplements(other, base) ||
           closedWorld.hasAnySubclassOfMixinUseThatImplements(other, base);
@@ -554,7 +553,7 @@
       // can be hit from any of the mixin applications.
       Iterable<ClassEntity> mixinUses = closedWorld.mixinUsesOf(base);
       return mixinUses.any((mixinApplication) =>
-          closedWorld.hasElementIn(mixinApplication, selector, element) ||
+          closedWorld.hasElementIn(mixinApplication, name, element) ||
           closedWorld.classHierarchy.isSubclassOf(other, mixinApplication) ||
           closedWorld.hasAnySubclassThatMixes(mixinApplication, other));
     }
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
index 82b6bd0..781a51e 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
@@ -98,9 +98,8 @@
     return forwardTo.needsNoSuchMethodHandling(selector, closedWorld);
   }
 
-  bool canHit(
-      MemberEntity element, Selector selector, JClosedWorld closedWorld) {
-    return forwardTo.canHit(element, selector, closedWorld);
+  bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
+    return forwardTo.canHit(element, name, closedWorld);
   }
 
   MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
index cdc8167..17794f1 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
@@ -10,8 +10,8 @@
 import '../../common_elements.dart' show CommonElements;
 import '../../constants/values.dart';
 import '../../elements/entities.dart';
+import '../../elements/names.dart';
 import '../../serialization/serialization.dart';
-import '../../types/abstract_value_domain.dart';
 import '../../universe/class_hierarchy.dart';
 import '../../universe/selector.dart' show Selector;
 import '../../universe/use.dart' show DynamicUse;
@@ -19,6 +19,7 @@
     show UniverseSelectorConstraints, SelectorConstraintsStrategy;
 import '../../util/util.dart';
 import '../../world.dart' show JClosedWorld;
+import '../abstract_value_domain.dart';
 import '../type_graph_inferrer.dart' show TypeGraphInferrer;
 import 'constants.dart';
 
@@ -195,33 +196,33 @@
           commonElements.jsInterceptorClass, _closedWorld);
 
   @override
-  bool isTypedArray(TypeMask mask) {
+  AbstractBool isTypedArray(TypeMask mask) {
     // Just checking for `TypedData` is not sufficient, as it is an abstract
     // class any user-defined class can implement. So we also check for the
     // interface `JavaScriptIndexingBehavior`.
     ClassEntity typedDataClass = _closedWorld.commonElements.typedDataClass;
-    return typedDataClass != null &&
+    return AbstractBool.trueOrMaybe(typedDataClass != null &&
         _closedWorld.classHierarchy.isInstantiated(typedDataClass) &&
         mask.satisfies(typedDataClass, _closedWorld) &&
         mask.satisfies(_closedWorld.commonElements.jsIndexingBehaviorInterface,
-            _closedWorld);
+            _closedWorld));
   }
 
   @override
-  bool couldBeTypedArray(TypeMask mask) {
+  AbstractBool couldBeTypedArray(TypeMask mask) {
     bool intersects(TypeMask type1, TypeMask type2) =>
         !type1.intersection(type2, _closedWorld).isEmpty;
     // TODO(herhut): Maybe cache the TypeMask for typedDataClass and
     //               jsIndexingBehaviourInterface.
     ClassEntity typedDataClass = _closedWorld.commonElements.typedDataClass;
-    return typedDataClass != null &&
+    return AbstractBool.maybeOrFalse(typedDataClass != null &&
         _closedWorld.classHierarchy.isInstantiated(typedDataClass) &&
         intersects(mask, new TypeMask.subtype(typedDataClass, _closedWorld)) &&
         intersects(
             mask,
             new TypeMask.subtype(
                 _closedWorld.commonElements.jsIndexingBehaviorInterface,
-                _closedWorld));
+                _closedWorld)));
   }
 
   @override
@@ -256,19 +257,30 @@
   TypeMask includeNull(TypeMask mask) => mask.nullable();
 
   @override
-  bool containsType(TypeMask typeMask, ClassEntity cls) {
+  AbstractBool containsType(TypeMask typeMask, ClassEntity cls) {
+    return AbstractBool.trueOrMaybe(_containsType(typeMask, cls));
+  }
+
+  bool _containsType(TypeMask typeMask, ClassEntity cls) {
     return _closedWorld.classHierarchy.isInstantiated(cls) &&
         typeMask.contains(cls, _closedWorld);
   }
 
   @override
-  bool containsOnlyType(TypeMask typeMask, ClassEntity cls) {
+  AbstractBool containsOnlyType(TypeMask typeMask, ClassEntity cls) {
+    return AbstractBool.trueOrMaybe(_containsOnlyType(typeMask, cls));
+  }
+
+  bool _containsOnlyType(TypeMask typeMask, ClassEntity cls) {
     return _closedWorld.classHierarchy.isInstantiated(cls) &&
         typeMask.containsOnly(cls);
   }
 
   @override
-  bool isInstanceOfOrNull(TypeMask typeMask, ClassEntity cls) {
+  AbstractBool isInstanceOfOrNull(TypeMask typeMask, ClassEntity cls) =>
+      AbstractBool.trueOrMaybe(_isInstanceOfOrNull(typeMask, cls));
+
+  bool _isInstanceOfOrNull(TypeMask typeMask, ClassEntity cls) {
     return _closedWorld.isImplemented(cls) &&
         typeMask.satisfies(cls, _closedWorld);
   }
@@ -289,13 +301,16 @@
   }
 
   @override
-  bool isEmpty(TypeMask value) => value.isEmpty;
+  AbstractBool isEmpty(TypeMask value) =>
+      AbstractBool.trueOrMaybe(value.isEmpty);
 
   @override
-  bool isExact(TypeMask value) => value.isExact && !value.isNullable;
+  AbstractBool isExact(TypeMask value) =>
+      AbstractBool.trueOrMaybe(value.isExact && !value.isNullable);
 
   @override
-  bool isExactOrNull(TypeMask value) => value.isExact || isNull(value);
+  AbstractBool isExactOrNull(TypeMask value) =>
+      AbstractBool.trueOrMaybe(value.isExact || _isNull(value));
 
   @override
   ClassEntity getExactClass(TypeMask mask) {
@@ -321,167 +336,204 @@
   }
 
   @override
-  bool canBeNull(TypeMask value) => value.isNullable;
+  AbstractBool isNull(TypeMask value) {
+    if (value.isNull) {
+      return AbstractBool.True;
+    } else if (value.isNullable) {
+      return AbstractBool.Maybe;
+    } else {
+      return AbstractBool.False;
+    }
+  }
+
+  bool _isNull(TypeMask value) => value.isNull;
 
   @override
-  bool isNull(TypeMask value) => value.isNull;
-
-  @override
-  bool canBePrimitive(TypeMask value) {
-    return canBePrimitiveNumber(value) ||
-        canBePrimitiveArray(value) ||
-        canBePrimitiveBoolean(value) ||
-        canBePrimitiveString(value) ||
-        isNull(value);
+  AbstractBool isPrimitive(TypeMask value) {
+    return AbstractBool.maybeOrFalse(_canBePrimitiveNumber(value) ||
+        _canBePrimitiveArray(value) ||
+        _canBePrimitiveBoolean(value) ||
+        _canBePrimitiveString(value) ||
+        _isNull(value));
   }
 
   @override
-  bool canBePrimitiveNumber(TypeMask value) {
+  AbstractBool isPrimitiveNumber(TypeMask value) =>
+      AbstractBool.maybeOrFalse(_canBePrimitiveNumber(value));
+
+  bool _canBePrimitiveNumber(TypeMask value) {
     // TODO(sra): It should be possible to test only jsDoubleClass and
     // jsUInt31Class, since all others are superclasses of these two.
-    return containsType(value, commonElements.jsNumberClass) ||
-        containsType(value, commonElements.jsIntClass) ||
-        containsType(value, commonElements.jsPositiveIntClass) ||
-        containsType(value, commonElements.jsUInt32Class) ||
-        containsType(value, commonElements.jsUInt31Class) ||
-        containsType(value, commonElements.jsDoubleClass);
+    return _containsType(value, commonElements.jsNumberClass) ||
+        _containsType(value, commonElements.jsIntClass) ||
+        _containsType(value, commonElements.jsPositiveIntClass) ||
+        _containsType(value, commonElements.jsUInt32Class) ||
+        _containsType(value, commonElements.jsUInt31Class) ||
+        _containsType(value, commonElements.jsDoubleClass);
   }
 
   @override
-  bool canBePrimitiveBoolean(TypeMask value) {
-    return containsType(value, commonElements.jsBoolClass);
+  AbstractBool isPrimitiveBoolean(TypeMask value) =>
+      AbstractBool.maybeOrFalse(_canBePrimitiveBoolean(value));
+
+  bool _canBePrimitiveBoolean(TypeMask value) {
+    return _containsType(value, commonElements.jsBoolClass);
   }
 
   @override
-  bool canBePrimitiveArray(TypeMask value) {
-    return containsType(value, commonElements.jsArrayClass) ||
-        containsType(value, commonElements.jsFixedArrayClass) ||
-        containsType(value, commonElements.jsExtendableArrayClass) ||
-        containsType(value, commonElements.jsUnmodifiableArrayClass);
+  AbstractBool isPrimitiveArray(TypeMask value) =>
+      AbstractBool.maybeOrFalse(_canBePrimitiveArray(value));
+
+  bool _canBePrimitiveArray(TypeMask value) {
+    return _containsType(value, commonElements.jsArrayClass) ||
+        _containsType(value, commonElements.jsFixedArrayClass) ||
+        _containsType(value, commonElements.jsExtendableArrayClass) ||
+        _containsType(value, commonElements.jsUnmodifiableArrayClass);
   }
 
   @override
-  bool isIndexablePrimitive(TypeMask value) {
+  AbstractBool isIndexablePrimitive(TypeMask value) =>
+      AbstractBool.trueOrMaybe(_isIndexablePrimitive(value));
+
+  bool _isIndexablePrimitive(TypeMask value) {
     return value.containsOnlyString(_closedWorld) ||
-        isInstanceOfOrNull(value, commonElements.jsIndexableClass);
+        _isInstanceOfOrNull(value, commonElements.jsIndexableClass);
   }
 
   @override
-  bool isFixedArray(TypeMask value) {
+  AbstractBool isFixedArray(TypeMask value) {
     // TODO(sra): Recognize the union of these types as well.
-    return containsOnlyType(value, commonElements.jsFixedArrayClass) ||
-        containsOnlyType(value, commonElements.jsUnmodifiableArrayClass);
+    return AbstractBool.trueOrMaybe(
+        _containsOnlyType(value, commonElements.jsFixedArrayClass) ||
+            _containsOnlyType(value, commonElements.jsUnmodifiableArrayClass));
   }
 
   @override
-  bool isExtendableArray(TypeMask value) {
-    return containsOnlyType(value, commonElements.jsExtendableArrayClass);
+  AbstractBool isExtendableArray(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        _containsOnlyType(value, commonElements.jsExtendableArrayClass));
   }
 
   @override
-  bool isMutableArray(TypeMask value) {
-    return isInstanceOfOrNull(value, commonElements.jsMutableArrayClass);
+  AbstractBool isMutableArray(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        _isInstanceOfOrNull(value, commonElements.jsMutableArrayClass));
   }
 
   @override
-  bool isMutableIndexable(TypeMask value) {
-    return isInstanceOfOrNull(value, commonElements.jsMutableIndexableClass);
+  AbstractBool isMutableIndexable(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        _isInstanceOfOrNull(value, commonElements.jsMutableIndexableClass));
   }
 
   @override
-  bool isArray(TypeMask value) {
-    return isInstanceOfOrNull(value, commonElements.jsArrayClass);
+  AbstractBool isArray(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        _isInstanceOfOrNull(value, commonElements.jsArrayClass));
   }
 
   @override
-  bool canBePrimitiveString(TypeMask value) {
-    return containsType(value, commonElements.jsStringClass);
+  AbstractBool isPrimitiveString(TypeMask value) =>
+      AbstractBool.maybeOrFalse(_canBePrimitiveString(value));
+
+  bool _canBePrimitiveString(TypeMask value) {
+    return _containsType(value, commonElements.jsStringClass);
   }
 
   @override
-  bool isInteger(TypeMask value) {
-    return value.containsOnlyInt(_closedWorld) && !value.isNullable;
+  AbstractBool isInteger(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        value.containsOnlyInt(_closedWorld) && !value.isNullable);
   }
 
   @override
-  bool isUInt32(TypeMask value) {
-    return !value.isNullable &&
-        isInstanceOfOrNull(value, commonElements.jsUInt32Class);
+  AbstractBool isUInt32(TypeMask value) {
+    return AbstractBool.trueOrMaybe(!value.isNullable &&
+        _isInstanceOfOrNull(value, commonElements.jsUInt32Class));
   }
 
   @override
-  bool isUInt31(TypeMask value) {
-    return !value.isNullable &&
-        isInstanceOfOrNull(value, commonElements.jsUInt31Class);
+  AbstractBool isUInt31(TypeMask value) {
+    return AbstractBool.trueOrMaybe(!value.isNullable &&
+        _isInstanceOfOrNull(value, commonElements.jsUInt31Class));
   }
 
   @override
-  bool isPositiveInteger(TypeMask value) {
-    return !value.isNullable &&
-        isInstanceOfOrNull(value, commonElements.jsPositiveIntClass);
+  AbstractBool isPositiveInteger(TypeMask value) {
+    return AbstractBool.trueOrMaybe(!value.isNullable &&
+        _isInstanceOfOrNull(value, commonElements.jsPositiveIntClass));
   }
 
   @override
-  bool isPositiveIntegerOrNull(TypeMask value) {
-    return isInstanceOfOrNull(value, commonElements.jsPositiveIntClass);
+  AbstractBool isPositiveIntegerOrNull(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        _isInstanceOfOrNull(value, commonElements.jsPositiveIntClass));
   }
 
   @override
-  bool isIntegerOrNull(TypeMask value) {
-    return value.containsOnlyInt(_closedWorld);
+  AbstractBool isIntegerOrNull(TypeMask value) {
+    return AbstractBool.trueOrMaybe(value.containsOnlyInt(_closedWorld));
   }
 
   @override
-  bool isNumber(TypeMask value) {
-    return value.containsOnlyNum(_closedWorld) && !value.isNullable;
+  AbstractBool isNumber(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        value.containsOnlyNum(_closedWorld) && !value.isNullable);
   }
 
   @override
-  bool isNumberOrNull(TypeMask value) {
+  AbstractBool isNumberOrNull(TypeMask value) =>
+      AbstractBool.trueOrMaybe(_isNumberOrNull(value));
+
+  bool _isNumberOrNull(TypeMask value) {
     return value.containsOnlyNum(_closedWorld);
   }
 
   @override
-  bool isDouble(TypeMask value) {
-    return value.containsOnlyDouble(_closedWorld) && !value.isNullable;
+  AbstractBool isDouble(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        value.containsOnlyDouble(_closedWorld) && !value.isNullable);
   }
 
   @override
-  bool isDoubleOrNull(TypeMask value) {
-    return value.containsOnlyDouble(_closedWorld);
+  AbstractBool isDoubleOrNull(TypeMask value) {
+    return AbstractBool.trueOrMaybe(value.containsOnlyDouble(_closedWorld));
   }
 
   @override
-  bool isBoolean(TypeMask value) {
-    return value.containsOnlyBool(_closedWorld) && !value.isNullable;
+  AbstractBool isBoolean(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        value.containsOnlyBool(_closedWorld) && !value.isNullable);
   }
 
   @override
-  bool isBooleanOrNull(TypeMask value) {
+  AbstractBool isBooleanOrNull(TypeMask value) =>
+      AbstractBool.trueOrMaybe(_isBooleanOrNull(value));
+
+  bool _isBooleanOrNull(TypeMask value) {
     return value.containsOnlyBool(_closedWorld);
   }
 
   @override
-  bool isString(TypeMask value) {
-    return value.containsOnlyString(_closedWorld) && !value.isNullable;
+  AbstractBool isString(TypeMask value) {
+    return AbstractBool.trueOrMaybe(
+        value.containsOnlyString(_closedWorld) && !value.isNullable);
   }
 
   @override
-  bool isStringOrNull(TypeMask value) {
-    return value.containsOnlyString(_closedWorld);
+  AbstractBool isStringOrNull(TypeMask value) {
+    return AbstractBool.trueOrMaybe(value.containsOnlyString(_closedWorld));
   }
 
   @override
-  bool isPrimitive(TypeMask value) {
-    return (isPrimitiveOrNull(value) && !value.isNullable) || isNull(value);
-  }
+  AbstractBool isPrimitiveOrNull(TypeMask value) =>
+      AbstractBool.trueOrMaybe(_isPrimitiveOrNull(value));
 
-  @override
-  bool isPrimitiveOrNull(TypeMask value) {
-    return isIndexablePrimitive(value) ||
-        isNumberOrNull(value) ||
-        isBooleanOrNull(value) ||
-        isNull(value);
+  bool _isPrimitiveOrNull(TypeMask value) {
+    return _isIndexablePrimitive(value) ||
+        _isNumberOrNull(value) ||
+        _isBooleanOrNull(value) ||
+        _isNull(value);
   }
 
   @override
@@ -492,10 +544,12 @@
       a.intersection(b, _closedWorld);
 
   @override
-  bool areDisjoint(TypeMask a, TypeMask b) => a.isDisjoint(b, _closedWorld);
+  AbstractBool areDisjoint(TypeMask a, TypeMask b) =>
+      AbstractBool.trueOrMaybe(a.isDisjoint(b, _closedWorld));
 
   @override
-  bool containsAll(TypeMask a) => a.containsAll(_closedWorld);
+  AbstractBool containsAll(TypeMask a) =>
+      AbstractBool.maybeOrFalse(a.containsAll(_closedWorld));
 
   @override
   AbstractValue computeAbstractValueForConstant(ConstantValue value) {
@@ -574,25 +628,29 @@
   }
 
   @override
-  bool canHit(
-      covariant TypeMask receiver, MemberEntity member, Selector selector) {
-    return receiver.canHit(member, selector, _closedWorld);
+  AbstractBool isTargetingMember(
+      covariant TypeMask receiver, MemberEntity member, Name name) {
+    return AbstractBool.maybeOrFalse(
+        receiver.canHit(member, name, _closedWorld));
   }
 
   @override
-  bool needsNoSuchMethodHandling(
+  AbstractBool needsNoSuchMethodHandling(
       covariant TypeMask receiver, Selector selector) {
-    return receiver.needsNoSuchMethodHandling(selector, _closedWorld);
+    return AbstractBool.trueOrFalse(
+        receiver.needsNoSuchMethodHandling(selector, _closedWorld));
   }
 
   @override
-  bool contains(covariant TypeMask superset, covariant TypeMask subset) {
-    return superset.containsMask(subset, _closedWorld);
+  AbstractBool contains(
+      covariant TypeMask superset, covariant TypeMask subset) {
+    return AbstractBool.maybeOrFalse(
+        superset.containsMask(subset, _closedWorld));
   }
 
   @override
-  bool isIn(covariant TypeMask subset, covariant TypeMask superset) {
-    return subset.isInMask(superset, _closedWorld);
+  AbstractBool isIn(covariant TypeMask subset, covariant TypeMask superset) {
+    return AbstractBool.trueOrMaybe(subset.isInMask(superset, _closedWorld));
   }
 
   @override
@@ -602,41 +660,42 @@
   }
 
   @override
-  bool isJsIndexable(TypeMask mask) {
-    return mask.satisfies(
-        _closedWorld.commonElements.jsIndexableClass, _closedWorld);
+  AbstractBool isJsIndexable(TypeMask mask) {
+    return AbstractBool.trueOrMaybe(mask.satisfies(
+        _closedWorld.commonElements.jsIndexableClass, _closedWorld));
   }
 
   @override
-  bool isJsIndexableAndIterable(covariant TypeMask mask) {
-    return mask != null &&
+  AbstractBool isJsIndexableAndIterable(covariant TypeMask mask) {
+    return AbstractBool.trueOrMaybe(mask != null &&
         mask.satisfies(
             _closedWorld.commonElements.jsIndexableClass, _closedWorld) &&
         // String is indexable but not iterable.
         !mask.satisfies(
-            _closedWorld.commonElements.jsStringClass, _closedWorld);
+            _closedWorld.commonElements.jsStringClass, _closedWorld));
   }
 
   @override
-  bool isFixedLengthJsIndexable(covariant TypeMask mask) {
+  AbstractBool isFixedLengthJsIndexable(covariant TypeMask mask) {
     if (mask.isContainer && (mask as ContainerTypeMask).length != null) {
       // A container on which we have inferred the length.
-      return true;
+      return AbstractBool.True;
     }
     // TODO(sra): Recognize any combination of fixed length indexables.
     if (mask.containsOnly(_closedWorld.commonElements.jsFixedArrayClass) ||
         mask.containsOnly(
             _closedWorld.commonElements.jsUnmodifiableArrayClass) ||
         mask.containsOnlyString(_closedWorld) ||
-        _closedWorld.abstractValueDomain.isTypedArray(mask)) {
-      return true;
+        _closedWorld.abstractValueDomain.isTypedArray(mask).isDefinitelyTrue) {
+      return AbstractBool.True;
     }
-    return false;
+    return AbstractBool.Maybe;
   }
 
   @override
-  bool canBeInterceptor(TypeMask value) {
-    return !interceptorType.isDisjoint(value, _closedWorld);
+  AbstractBool isInterceptor(TypeMask value) {
+    return AbstractBool.maybeOrFalse(
+        !interceptorType.isDisjoint(value, _closedWorld));
   }
 
   @override
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
index a08d320..eb06347 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
@@ -12,11 +12,11 @@
   Set<TypeMask> _masks;
 
   @override
-  bool applies(MemberEntity element, Selector selector, JClosedWorld world) {
+  bool canHit(MemberEntity element, Name name, JClosedWorld world) {
     if (isAll) return true;
     if (_masks == null) return false;
     for (TypeMask mask in _masks) {
-      if (mask.canHit(element, selector, world)) return true;
+      if (mask.canHit(element, name, world)) return true;
     }
     return false;
   }
@@ -77,8 +77,10 @@
   const TypeMaskSelectorStrategy();
 
   @override
-  UniverseSelectorConstraints createSelectorConstraints(Selector selector) {
-    return new IncreasingTypeMaskSet();
+  UniverseSelectorConstraints createSelectorConstraints(
+      Selector selector, Object initialConstraint) {
+    return new IncreasingTypeMaskSet()
+      ..addReceiverConstraint(initialConstraint);
   }
 
   @override
@@ -87,7 +89,7 @@
     Selector selector = dynamicUse.selector;
     TypeMask mask = dynamicUse.receiverConstraint;
     return selector.appliesUnnamed(member) &&
-        (mask == null || mask.canHit(member, selector, world));
+        (mask == null || mask.canHit(member, selector.memberName, world));
   }
 }
 
@@ -413,13 +415,9 @@
    */
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld);
 
-  /**
-   * Returns whether [element] is a potential target when being
-   * invoked on this type mask. [selector] is used to ensure library
-   * privacy is taken into account.
-   */
-  bool canHit(
-      MemberEntity element, Selector selector, JClosedWorld closedWorld);
+  /// Returns whether [element] is a potential target when being invoked on this
+  /// type mask. [name] is used to ensure library privacy is taken into account.
+  bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld);
 
   /// Returns whether this [TypeMask] applied to [selector] can hit a
   /// [noSuchMethod].
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
index c409d07..0d252f0 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
@@ -357,9 +357,8 @@
         .any((e) => e.needsNoSuchMethodHandling(selector, closedWorld));
   }
 
-  bool canHit(
-      MemberEntity element, Selector selector, JClosedWorld closedWorld) {
-    return disjointMasks.any((e) => e.canHit(element, selector, closedWorld));
+  bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
+    return disjointMasks.any((e) => e.canHit(element, name, closedWorld));
   }
 
   MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/inferrer/types.dart
similarity index 100%
rename from pkg/compiler/lib/src/types/types.dart
rename to pkg/compiler/lib/src/inferrer/types.dart
diff --git a/pkg/compiler/lib/src/ir/cached_static_type.dart b/pkg/compiler/lib/src/ir/cached_static_type.dart
index f1de29e..19ff07f 100644
--- a/pkg/compiler/lib/src/ir/cached_static_type.dart
+++ b/pkg/compiler/lib/src/ir/cached_static_type.dart
@@ -8,15 +8,23 @@
 import 'package:kernel/type_algebra.dart' as ir;
 import 'package:kernel/type_environment.dart' as ir;
 import 'static_type_base.dart';
+import 'static_type_provider.dart';
 
 /// Class that provides the static type of expression using the visitor pattern
 /// and a precomputed cache for complex expression type.
-class CachedStaticType extends StaticTypeBase {
+class CachedStaticType extends StaticTypeBase implements StaticTypeProvider {
   final Map<ir.Expression, ir.DartType> _cache;
 
   CachedStaticType(ir.TypeEnvironment typeEnvironment, this._cache)
       : super(typeEnvironment);
 
+  @override
+  ir.DartType getStaticType(ir.Expression node) {
+    ir.DartType type = node.accept(this);
+    assert(type != null, "No static type found for ${node.runtimeType}.");
+    return type;
+  }
+
   ir.DartType _getStaticType(ir.Expression node) {
     ir.DartType type = _cache[node];
     assert(type != null, "No static type cached for ${node.runtimeType}.");
@@ -24,6 +32,9 @@
   }
 
   @override
+  ir.DartType visitVariableGet(ir.VariableGet node) => _getStaticType(node);
+
+  @override
   ir.DartType visitPropertyGet(ir.PropertyGet node) => _getStaticType(node);
 
   @override
diff --git a/pkg/compiler/lib/src/ir/scope.dart b/pkg/compiler/lib/src/ir/scope.dart
index ab11fdb..1b547d2 100644
--- a/pkg/compiler/lib/src/ir/scope.dart
+++ b/pkg/compiler/lib/src/ir/scope.dart
@@ -50,6 +50,7 @@
 
 abstract class VariableScopeModel {
   VariableScope getScopeFor(ir.TreeNode node);
+  Iterable<ir.VariableDeclaration> get assignedVariables;
   bool isEffectivelyFinal(ir.VariableDeclaration node);
 }
 
@@ -72,13 +73,22 @@
   }
 
   @override
+  Iterable<ir.VariableDeclaration> get assignedVariables =>
+      _assignedVariables ?? <ir.VariableDeclaration>[];
+
+  @override
   bool isEffectivelyFinal(ir.VariableDeclaration node) {
     return _assignedVariables == null || !_assignedVariables.contains(node);
   }
 }
 
+/// Variable information for a scope.
 abstract class VariableScope {
-  Iterable<ir.VariableDeclaration> get variables;
+  /// Returns the set of [ir.VariableDeclaration]s that have been assigned to in
+  /// this scope.
+  Iterable<ir.VariableDeclaration> get assignedVariables;
+
+  /// Returns `true` if this scope has a [ir.ContinueSwitchStatement].
   bool get hasContinueSwitch;
 }
 
@@ -97,13 +107,13 @@
     _assignedVariables.add(variable);
   }
 
-  Iterable<ir.VariableDeclaration> get variables sync* {
+  Iterable<ir.VariableDeclaration> get assignedVariables sync* {
     if (_assignedVariables != null) {
       yield* _assignedVariables;
     }
     if (_subScopes != null) {
       for (VariableScope subScope in _subScopes) {
-        yield* subScope.variables;
+        yield* subScope.assignedVariables;
       }
     }
   }
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart
index 78e4277..47129b6 100644
--- a/pkg/compiler/lib/src/ir/static_type.dart
+++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -9,6 +9,7 @@
 import 'package:kernel/type_environment.dart' as ir;
 import 'scope.dart';
 import 'static_type_base.dart';
+import '../util/util.dart';
 
 /// Enum values for how the target of a static type should be interpreted.
 enum ClassRelation {
@@ -31,17 +32,73 @@
 /// for each expression once, this class performs the traversal explicitly and
 /// adds 'handleX' hooks for subclasses to handle individual expressions using
 /// the readily compute static types of subexpressions.
-// TODO(johnniwinther): Add improved type promotion to handle negative
-// reasoning.
 abstract class StaticTypeVisitor extends StaticTypeBase {
   Map<ir.Expression, ir.DartType> _cache = {};
+  Map<ir.Expression, TypeMap> typeMapsForTesting;
 
   StaticTypeVisitor(ir.TypeEnvironment typeEnvironment)
       : super(typeEnvironment);
 
-  Map<ir.Expression, ir.DartType> get staticTypeCacheForTesting => _cache;
+  Map<ir.Expression, ir.DartType> get cachedStaticTypes => _cache;
 
-  VariableScopeModel get variableScopeModel => null;
+  /// If `true`, the effect of executing assert statements is taken into account
+  /// when computing the static type.
+  bool get useAsserts;
+
+  /// If `true`, the static type of an effectively final variable is inferred
+  /// from the static type of its initializer.
+  bool get inferEffectivelyFinalVariableTypes;
+
+  VariableScopeModel get variableScopeModel;
+
+  bool completes(ir.DartType type) => type != const ir.BottomType();
+
+  Set<ir.VariableDeclaration> _currentVariables;
+  Set<ir.VariableDeclaration> _invalidatedVariables =
+      new Set<ir.VariableDeclaration>();
+
+  TypeMap _typeMapBase = const TypeMap();
+  TypeMap _typeMapWhenTrue;
+  TypeMap _typeMapWhenFalse;
+
+  /// Returns the local variable type promotions for when the boolean value of
+  /// the most recent node is not taken into account.
+  TypeMap get typeMap {
+    if (_typeMapBase == null) {
+      _typeMapBase = _typeMapWhenTrue.join(_typeMapWhenFalse);
+      _typeMapWhenTrue = _typeMapWhenFalse = null;
+    }
+    return _typeMapBase;
+  }
+
+  /// Sets the local variable type promotions for when the boolean value of
+  /// the most recent node is not taken into account.
+  void set typeMap(TypeMap value) {
+    _typeMapBase = value;
+    _typeMapWhenTrue = _typeMapWhenFalse = null;
+  }
+
+  /// Returns the local variable type promotions for when the boolean value of
+  /// the most recent node is `true`.
+  TypeMap get typeMapWhenTrue => _typeMapWhenTrue ?? _typeMapBase;
+
+  /// Sets the local variable type promotions for when the boolean value of
+  /// the most recent node is `true`.
+  void set typeMapWhenTrue(TypeMap value) {
+    _typeMapWhenTrue = value;
+    _typeMapBase = null;
+  }
+
+  /// Returns the local variable type promotions for when the boolean value of
+  /// the most recent node is `false`.
+  TypeMap get typeMapWhenFalse => _typeMapWhenFalse ?? _typeMapBase;
+
+  /// Sets the local variable type promotions for when the boolean value of
+  /// the most recent node is `false`.
+  void set typeMapWhenFalse(TypeMap value) {
+    _typeMapWhenFalse = value;
+    _typeMapBase = null;
+  }
 
   @override
   ir.DartType defaultNode(ir.Node node) =>
@@ -422,11 +479,70 @@
     ir.DartType returnType =
         _computeMethodInvocationType(node, receiverType, argumentTypes);
     receiverType = _narrowInstanceReceiver(node.interfaceTarget, receiverType);
+    if (node.name.name == '==') {
+      ir.Expression left = node.receiver;
+      ir.Expression right = node.arguments.positional[0];
+      TypeMap afterInvocation = typeMap;
+      if (left is ir.VariableGet &&
+          right is ir.NullLiteral &&
+          !_invalidatedVariables.contains(left.variable)) {
+        // If `left == null` is true, we promote the type of the variable to
+        // `Null` by registering that is known _not_ to be of its declared type.
+        typeMapWhenTrue = afterInvocation
+            .promote(left.variable, left.variable.type, isTrue: false);
+        typeMapWhenFalse = afterInvocation
+            .promote(left.variable, left.variable.type, isTrue: true);
+      }
+      if (right is ir.VariableGet &&
+          left is ir.NullLiteral &&
+          !_invalidatedVariables.contains(right.variable)) {
+        // If `null == right` is true, we promote the type of the variable to
+        // `Null` by registering that is known _not_ to be of its declared type.
+        typeMapWhenTrue = afterInvocation
+            .promote(right.variable, right.variable.type, isTrue: false);
+        typeMapWhenFalse = afterInvocation
+            .promote(right.variable, right.variable.type, isTrue: true);
+      }
+    }
     _cache[node] = returnType;
     handleMethodInvocation(node, receiverType, argumentTypes, returnType);
     return returnType;
   }
 
+  void handleVariableGet(ir.VariableGet node, ir.DartType type) {}
+
+  @override
+  ir.DartType visitVariableGet(ir.VariableGet node) {
+    if (typeMapsForTesting != null) {
+      typeMapsForTesting[node] = typeMap;
+    }
+    ir.DartType promotedType = typeMap.typeOf(node, typeEnvironment);
+    assert(
+        node.promotedType == null ||
+            promotedType == typeEnvironment.nullType ||
+            typeEnvironment.isSubtypeOf(promotedType, node.promotedType),
+        "Unexpected promotion of ${node.variable} in ${node.parent}. "
+        "Expected ${node.promotedType}, found $promotedType");
+    _cache[node] = promotedType;
+    handleVariableGet(node, promotedType);
+    return promotedType;
+  }
+
+  void handleVariableSet(ir.VariableSet node, ir.DartType resultType) {}
+
+  @override
+  ir.DartType visitVariableSet(ir.VariableSet node) {
+    ir.DartType resultType = super.visitVariableSet(node);
+    handleVariableSet(node, resultType);
+    if (!_currentVariables.contains(node.variable)) {
+      _invalidatedVariables.add(node.variable);
+      typeMap = typeMap.remove([node.variable]);
+    } else {
+      typeMap = typeMap.reduce(node, resultType, typeEnvironment);
+    }
+    return resultType;
+  }
+
   void handleStaticGet(ir.StaticGet node, ir.DartType resultType) {}
 
   @override
@@ -537,22 +653,71 @@
 
   @override
   ir.DartType visitLogicalExpression(ir.LogicalExpression node) {
-    visitNode(node.left);
-    visitNode(node.right);
+    if (node.operator == '&&') {
+      visitNode(node.left);
+      TypeMap afterLeftWhenTrue = typeMapWhenTrue;
+      TypeMap afterLeftWhenFalse = typeMapWhenFalse;
+      typeMap = afterLeftWhenTrue;
+      visitNode(node.right);
+      TypeMap afterRightWhenTrue = typeMapWhenTrue;
+      TypeMap afterRightWhenFalse = typeMapWhenFalse;
+      typeMapWhenTrue = afterRightWhenTrue;
+      typeMapWhenFalse = afterLeftWhenFalse.join(afterRightWhenFalse);
+    } else {
+      visitNode(node.left);
+      TypeMap afterLeftWhenTrue = typeMapWhenTrue;
+      TypeMap afterLeftWhenFalse = typeMapWhenFalse;
+      typeMap = afterLeftWhenFalse;
+      visitNode(node.right);
+      TypeMap afterRightWhenTrue = typeMapWhenTrue;
+      TypeMap afterRightWhenFalse = typeMapWhenFalse;
+      typeMapWhenTrue = afterLeftWhenTrue.join(afterRightWhenTrue);
+      typeMapWhenFalse = afterRightWhenFalse;
+    }
     return super.visitLogicalExpression(node);
   }
 
   @override
   ir.DartType visitNot(ir.Not node) {
     visitNode(node.operand);
+    TypeMap afterOperandWhenTrue = typeMapWhenTrue;
+    TypeMap afterOperandWhenFalse = typeMapWhenFalse;
+    typeMapWhenTrue = afterOperandWhenFalse;
+    typeMapWhenFalse = afterOperandWhenTrue;
     return super.visitNot(node);
   }
 
+  ir.DartType _handleConditional(
+      ir.Expression condition, ir.TreeNode then, ir.TreeNode otherwise) {
+    visitNode(condition);
+    TypeMap afterConditionWhenTrue = typeMapWhenTrue;
+    TypeMap afterConditionWhenFalse = typeMapWhenFalse;
+    typeMap = afterConditionWhenTrue;
+    ir.DartType thenType = visitNode(then);
+    TypeMap afterThen = typeMap;
+    typeMap = afterConditionWhenFalse;
+    ir.DartType otherwiseType = visitNode(otherwise);
+    TypeMap afterOtherwise = typeMap;
+    if (completes(thenType) && completes(otherwiseType)) {
+      typeMap = afterThen.join(afterOtherwise);
+      return null;
+    } else if (completes(thenType)) {
+      typeMap = afterThen;
+      return null;
+    } else if (completes(otherwiseType)) {
+      typeMap = afterOtherwise;
+      return null;
+    } else {
+      typeMap = afterThen.join(afterOtherwise);
+      return const ir.BottomType();
+    }
+  }
+
   @override
   ir.DartType visitConditionalExpression(ir.ConditionalExpression node) {
-    visitNode(node.condition);
-    visitNode(node.then);
-    visitNode(node.otherwise);
+    // TODO(johnniwinther): Should we return `const ir.BottomType()` if both
+    // branches are failing?
+    _handleConditional(node.condition, node.then, node.otherwise);
     return super.visitConditionalExpression(node);
   }
 
@@ -560,7 +725,16 @@
 
   @override
   ir.DartType visitIsExpression(ir.IsExpression node) {
-    visitNode(node.operand);
+    ir.Expression operand = node.operand;
+    visitNode(operand);
+    if (operand is ir.VariableGet &&
+        !_invalidatedVariables.contains(operand.variable)) {
+      TypeMap afterOperand = typeMap;
+      typeMapWhenTrue =
+          afterOperand.promote(operand.variable, node.type, isTrue: true);
+      typeMapWhenFalse =
+          afterOperand.promote(operand.variable, node.type, isTrue: false);
+    }
     handleIsExpression(node);
     return super.visitIsExpression(node);
   }
@@ -591,19 +765,27 @@
   }
 
   @override
-  Null visitBlock(ir.Block node) => visitNodes(node.statements);
+  ir.DartType visitBlock(ir.Block node) {
+    ir.DartType type;
+    for (ir.Statement statement in node.statements) {
+      if (!completes(visitNode(statement))) {
+        type = const ir.BottomType();
+      }
+    }
+    return type;
+  }
 
   ir.DartType visitExpressionStatement(ir.ExpressionStatement node) {
     visitNode(node.expression);
     return null;
   }
 
-  void handleAsExpression(ir.AsExpression node) {}
+  void handleAsExpression(ir.AsExpression node, ir.DartType operandType) {}
 
   @override
   ir.DartType visitAsExpression(ir.AsExpression node) {
-    visitNode(node.operand);
-    handleAsExpression(node);
+    ir.DartType operandType = visitNode(node.operand);
+    handleAsExpression(node, operandType);
     return super.visitAsExpression(node);
   }
 
@@ -692,10 +874,15 @@
 
   @override
   ir.DartType visitFunctionExpression(ir.FunctionExpression node) {
+    ir.DartType returnType = super.visitFunctionExpression(node);
+    Set<ir.VariableDeclaration> _oldVariables = _currentVariables;
+    _currentVariables = new Set<ir.VariableDeclaration>();
     visitSignature(node.function);
     visitNode(node.function.body);
     handleFunctionExpression(node);
-    return super.visitFunctionExpression(node);
+    _invalidatedVariables.removeAll(_currentVariables);
+    _currentVariables = _oldVariables;
+    return returnType;
   }
 
   void handleThrow(ir.Throw node) {}
@@ -714,7 +901,9 @@
   }
 
   @override
-  Null visitContinueSwitchStatement(ir.ContinueSwitchStatement node) {}
+  ir.DartType visitContinueSwitchStatement(ir.ContinueSwitchStatement node) {
+    return const ir.BottomType();
+  }
 
   @override
   Null visitLabeledStatement(ir.LabeledStatement node) {
@@ -722,7 +911,9 @@
   }
 
   @override
-  Null visitBreakStatement(ir.BreakStatement node) {}
+  ir.DartType visitBreakStatement(ir.BreakStatement node) {
+    return const ir.BottomType();
+  }
 
   @override
   Null visitYieldStatement(ir.YieldStatement node) {
@@ -775,31 +966,45 @@
   @override
   Null visitForStatement(ir.ForStatement node) {
     visitNodes(node.variables);
+    TypeMap beforeLoop = typeMap =
+        typeMap.remove(variableScopeModel.getScopeFor(node).assignedVariables);
     visitNode(node.condition);
-    visitNodes(node.updates);
+    typeMap = typeMapWhenTrue;
     visitNode(node.body);
+    visitNodes(node.updates);
+    typeMap = beforeLoop;
   }
 
   void handleForInStatement(ir.ForInStatement node, ir.DartType iterableType) {}
 
   @override
   Null visitForInStatement(ir.ForInStatement node) {
-    visitNode(node.variable);
     ir.DartType iterableType = visitNode(node.iterable);
+    TypeMap beforeLoop = typeMap =
+        typeMap.remove(variableScopeModel.getScopeFor(node).assignedVariables);
+    visitNode(node.variable);
     visitNode(node.body);
     handleForInStatement(node, iterableType);
+    typeMap = beforeLoop;
   }
 
   @override
   Null visitDoStatement(ir.DoStatement node) {
+    TypeMap beforeLoop = typeMap =
+        typeMap.remove(variableScopeModel.getScopeFor(node).assignedVariables);
     visitNode(node.body);
     visitNode(node.condition);
+    typeMap = beforeLoop;
   }
 
   @override
   Null visitWhileStatement(ir.WhileStatement node) {
+    TypeMap beforeLoop = typeMap =
+        typeMap.remove(variableScopeModel.getScopeFor(node).assignedVariables);
     visitNode(node.condition);
+    typeMap = typeMapWhenTrue;
     visitNode(node.body);
+    typeMap = beforeLoop;
   }
 
   void handleSwitchStatement(ir.SwitchStatement node) {}
@@ -807,20 +1012,28 @@
   @override
   Null visitSwitchStatement(ir.SwitchStatement node) {
     visitNode(node.expression);
-    visitNodes(node.cases);
+    TypeMap afterExpression = typeMap;
+    VariableScope scope = variableScopeModel.getScopeFor(node);
+    TypeMap afterStatement = afterExpression.remove(scope.assignedVariables);
+    TypeMap beforeCase =
+        scope.hasContinueSwitch ? afterStatement : afterExpression;
+    for (ir.SwitchCase switchCase in node.cases) {
+      typeMap = beforeCase;
+      visitNode(switchCase);
+    }
     handleSwitchStatement(node);
+    typeMap = afterStatement;
   }
 
   @override
-  Null visitReturnStatement(ir.ReturnStatement node) {
+  ir.DartType visitReturnStatement(ir.ReturnStatement node) {
     visitNode(node.expression);
+    return const ir.BottomType();
   }
 
   @override
-  Null visitIfStatement(ir.IfStatement node) {
-    visitNode(node.condition);
-    visitNode(node.then);
-    visitNode(node.otherwise);
+  ir.DartType visitIfStatement(ir.IfStatement node) {
+    return _handleConditional(node.condition, node.then, node.otherwise);
   }
 
   @override
@@ -863,23 +1076,36 @@
 
   @override
   Null visitAssertStatement(ir.AssertStatement node) {
+    TypeMap beforeCondition = typeMap;
     visitNode(node.condition);
+    TypeMap afterConditionWhenTrue = typeMapWhenTrue;
+    TypeMap afterConditionWhenFalse = typeMapWhenFalse;
+    typeMap = afterConditionWhenFalse;
     visitNode(node.message);
     handleAssertStatement(node);
+    typeMap = useAsserts ? afterConditionWhenTrue : beforeCondition;
   }
 
   void handleFunctionDeclaration(ir.FunctionDeclaration node) {}
 
   @override
   Null visitFunctionDeclaration(ir.FunctionDeclaration node) {
+    TypeMap beforeClosure =
+        typeMap = typeMap.remove(variableScopeModel.assignedVariables);
+    Set<ir.VariableDeclaration> _oldVariables = _currentVariables;
+    _currentVariables = new Set<ir.VariableDeclaration>();
     visitSignature(node.function);
     visitNode(node.function.body);
     handleFunctionDeclaration(node);
+    _invalidatedVariables.removeAll(_currentVariables);
+    _currentVariables = _oldVariables;
+    typeMap = beforeClosure;
   }
 
   void handleParameter(ir.VariableDeclaration node) {}
 
   void visitParameter(ir.VariableDeclaration node) {
+    _currentVariables.add(node);
     visitNode(node.initializer);
     handleParameter(node);
   }
@@ -898,9 +1124,12 @@
   Null visitProcedure(ir.Procedure node) {
     typeEnvironment.thisType =
         node.enclosingClass != null ? node.enclosingClass.thisType : null;
+    _currentVariables = new Set<ir.VariableDeclaration>();
     visitSignature(node.function);
     visitNode(node.function.body);
     handleProcedure(node);
+    _invalidatedVariables.removeAll(_currentVariables);
+    _currentVariables = null;
     typeEnvironment.thisType = null;
   }
 
@@ -909,10 +1138,13 @@
   @override
   Null visitConstructor(ir.Constructor node) {
     typeEnvironment.thisType = node.enclosingClass.thisType;
+    _currentVariables = new Set<ir.VariableDeclaration>();
     visitSignature(node.function);
     visitNodes(node.initializers);
     visitNode(node.function.body);
     handleConstructor(node);
+    _invalidatedVariables.removeAll(_currentVariables);
+    _currentVariables = null;
     typeEnvironment.thisType = null;
   }
 
@@ -931,10 +1163,11 @@
 
   @override
   Null visitVariableDeclaration(ir.VariableDeclaration node) {
+    _currentVariables.add(node);
     ir.DartType type = visitNode(node.initializer);
     if (node.initializer != null &&
-        variableScopeModel != null &&
-        variableScopeModel.isEffectivelyFinal(node)) {
+        variableScopeModel.isEffectivelyFinal(node) &&
+        inferEffectivelyFinalVariableTypes) {
       node.type = type;
     }
     handleVariableDeclaration(node);
@@ -947,3 +1180,484 @@
 
   ArgumentTypes(this.positional, this.named);
 }
+
+/// Type information collected for a single path for a local variable.
+///
+/// This is used to implement guarded type promotion.
+///
+/// The terminology and implementation is based on this paper:
+///
+///   http://www.cs.williams.edu/FTfJP2011/6-Winther.pdf
+///
+class TypeHolder {
+  /// The declared type of the local variable.
+  final ir.DartType declaredType;
+
+  /// The types that the local variable is known to be an instance of.
+  final Set<ir.DartType> trueTypes;
+
+  /// The types that the local variable is known _not_ to be an instance of.
+  final Set<ir.DartType> falseTypes;
+
+  int _hashCode;
+
+  TypeHolder(this.declaredType, this.trueTypes, this.falseTypes);
+
+  /// Computes a single type that soundly represents the promoted type of the
+  /// local variable on this single path.
+  ir.DartType typeOf(ir.TypeEnvironment typeEnvironment) {
+    ir.DartType candidate = declaredType;
+    if (falseTypes != null) {
+      // TODO(johnniwinther): Special-case the `== null` representation to
+      // make it faster.
+      for (ir.DartType type in falseTypes) {
+        if (typeEnvironment.isSubtypeOf(declaredType, type)) {
+          return typeEnvironment.nullType;
+        }
+      }
+    }
+    if (trueTypes != null) {
+      for (ir.DartType type in trueTypes) {
+        if (type == typeEnvironment.nullType) {
+          return type;
+        }
+        if (typeEnvironment.isSubtypeOf(type, candidate)) {
+          candidate = type;
+        } else if (!typeEnvironment.isSubtypeOf(candidate, type)) {
+          // We cannot promote. No single type is most specific.
+          // TODO(johnniwinther): Compute implied types? For instance when the
+          // declared type is `Iterable<String>` and tested type is
+          // `List<dynamic>` we could promote to the implied type `List<String>`.
+          return null;
+        }
+      }
+    }
+    return candidate;
+  }
+
+  int get hashCode {
+    if (_hashCode == null) {
+      _hashCode = Hashing.setHash(falseTypes,
+          Hashing.setHash(trueTypes, Hashing.objectHash(declaredType)));
+    }
+    return _hashCode;
+  }
+
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    return other is TypeHolder &&
+        declaredType == other.declaredType &&
+        equalSets(trueTypes, other.trueTypes) &&
+        equalSets(falseTypes, other.falseTypes);
+  }
+
+  void _getText(
+      StringBuffer sb, String Function(Iterable<ir.DartType>) typesToText) {
+    sb.write('{');
+    String comma = '';
+    if (trueTypes != null) {
+      sb.write('true:');
+      sb.write(typesToText(trueTypes));
+      comma = ',';
+    }
+    if (falseTypes != null) {
+      sb.write(comma);
+      sb.write('false:');
+      sb.write(typesToText(falseTypes));
+    }
+    sb.write('}');
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('TypeHolder(');
+    sb.write('declared=$declaredType');
+    if (trueTypes != null) {
+      sb.write(',true=$trueTypes');
+    }
+    if (falseTypes != null) {
+      sb.write(',false=$falseTypes');
+    }
+    sb.write(')');
+    return sb.toString();
+  }
+}
+
+/// Type information for a single local variable on all possible paths.
+///
+/// This is used to implement guarded type promotion.
+///
+/// The terminology and implementation is based on this paper:
+///
+///   http://www.cs.williams.edu/FTfJP2011/6-Winther.pdf
+///
+class TargetInfo {
+  /// The declared type of the local variable.
+  final ir.DartType declaredType;
+
+  /// Collected type information for disjoint paths.
+  final Iterable<TypeHolder> typeHolders;
+
+  /// Types relevant for promotion of the local variable.
+  final Iterable<ir.DartType> typesOfInterest;
+
+  TargetInfo(this.declaredType, this.typeHolders, this.typesOfInterest);
+
+  /// Returns the [TargetInfo] that describes the added type knowledge for the
+  /// local variable. If [isTrue] is `true`, the local variable is known to
+  /// be an instance of [type]. If [isTrue] is `false`, the local variable is
+  /// known _not_ to be an instance of [type].
+  TargetInfo promote(ir.DartType type, {bool isTrue}) {
+    Set<TypeHolder> newTypeHolders = new Set<TypeHolder>();
+
+    bool addTypeHolder(TypeHolder typeHolder) {
+      bool changed = false;
+
+      Set<ir.DartType> addAsCopy(Set<ir.DartType> set, ir.DartType type) {
+        Set<ir.DartType> result;
+        if (set == null) {
+          result = new Set<ir.DartType>();
+        } else if (set.contains(type)) {
+          return set;
+        } else {
+          result = Set<ir.DartType>.from(set);
+        }
+        changed = true;
+        return result..add(type);
+      }
+
+      Set<ir.DartType> trueTypes = typeHolder?.trueTypes;
+      Set<ir.DartType> falseTypes = typeHolder?.falseTypes;
+      if (isTrue) {
+        trueTypes = addAsCopy(trueTypes, type);
+      } else {
+        falseTypes = addAsCopy(falseTypes, type);
+      }
+      // TODO(johnniwinther): Check validity; if the true types are
+      // contradicting, for instance if the local is known to be and instance
+      // of types `int` and `String` simultaneously, then we could flag code
+      // as dead code.
+      newTypeHolders.add(TypeHolder(declaredType, trueTypes, falseTypes));
+      return changed;
+    }
+
+    bool changed = false;
+    if (typeHolders.isEmpty) {
+      changed |= addTypeHolder(null);
+    } else {
+      for (TypeHolder typeHolder in typeHolders) {
+        changed |= addTypeHolder(typeHolder);
+      }
+    }
+    Iterable<ir.DartType> newTypesOfInterest;
+    if (typesOfInterest.contains(type)) {
+      newTypesOfInterest = typesOfInterest;
+    } else {
+      newTypesOfInterest = new Set<ir.DartType>.from(typesOfInterest)
+        ..add(type);
+      changed = true;
+    }
+    return changed
+        ? new TargetInfo(declaredType, newTypeHolders, newTypesOfInterest)
+        : this;
+  }
+
+  /// Returns the [TargetInfo] that describes that the local is either of [this]
+  /// or the [other] type.
+  ///
+  /// Returns `null` if the join is empty.
+  TargetInfo join(TargetInfo other) {
+    if (other == null) return null;
+    if (identical(this, other)) return this;
+
+    Set<TypeHolder> newTypeHolders = new Set<TypeHolder>();
+    Set<ir.DartType> newTypesOfInterest = new Set<ir.DartType>();
+
+    /// Adds the [typeHolders] to [newTypeHolders] for types in
+    /// [otherTypesOfInterest] while removing the information
+    /// invalidated by [otherTrueTypes] and [otherFalseTypes].
+    void addTypeHolders(
+        Iterable<TypeHolder> typeHolders,
+        Set<ir.DartType> otherTrueTypes,
+        Set<ir.DartType> otherFalseTypes,
+        Iterable<ir.DartType> otherTypesOfInterest) {
+      for (TypeHolder typeHolder in typeHolders) {
+        Set<ir.DartType> newTrueTypes;
+        if (typeHolder.trueTypes != null) {
+          newTrueTypes = new Set<ir.DartType>.from(typeHolder.trueTypes);
+
+          /// Only types in [otherTypesOfInterest] has information from all
+          /// paths.
+          newTrueTypes.retainAll(otherTypesOfInterest);
+
+          /// Remove types that are known to be false on other paths; these
+          /// would amount to knowing that a variable is or is not of some
+          /// type.
+          newTrueTypes.removeAll(otherFalseTypes);
+          if (newTrueTypes.isEmpty) {
+            newTrueTypes = null;
+          } else {
+            newTypesOfInterest.addAll(newTrueTypes);
+          }
+        }
+        Set<ir.DartType> newFalseTypes;
+        if (typeHolder.falseTypes != null) {
+          newFalseTypes = new Set<ir.DartType>.from(typeHolder.falseTypes);
+
+          /// Only types in [otherTypesOfInterest] has information from all
+          /// paths.
+          newFalseTypes.retainAll(otherTypesOfInterest);
+
+          /// Remove types that are known to be true on other paths; these
+          /// would amount to knowing that a variable is or is not of some
+          /// type.
+          newFalseTypes.removeAll(otherTrueTypes);
+          if (newFalseTypes.isEmpty) {
+            newFalseTypes = null;
+          } else {
+            newTypesOfInterest.addAll(newFalseTypes);
+          }
+        }
+        if (newTrueTypes != null || newFalseTypes != null) {
+          // Only include type holders with information.
+          newTypeHolders
+              .add(new TypeHolder(declaredType, newTrueTypes, newFalseTypes));
+        }
+      }
+    }
+
+    Set<ir.DartType> thisTrueTypes = new Set<ir.DartType>();
+    Set<ir.DartType> thisFalseTypes = new Set<ir.DartType>();
+    for (TypeHolder typeHolder in typeHolders) {
+      if (typeHolder.trueTypes != null) {
+        thisTrueTypes.addAll(typeHolder.trueTypes);
+      }
+      if (typeHolder.falseTypes != null) {
+        thisFalseTypes.addAll(typeHolder.falseTypes);
+      }
+    }
+
+    Set<ir.DartType> otherTrueTypes = new Set<ir.DartType>();
+    Set<ir.DartType> otherFalseTypes = new Set<ir.DartType>();
+    for (TypeHolder typeHolder in other.typeHolders) {
+      if (typeHolder.trueTypes != null) {
+        otherTrueTypes.addAll(typeHolder.trueTypes);
+      }
+      if (typeHolder.falseTypes != null) {
+        otherFalseTypes.addAll(typeHolder.falseTypes);
+      }
+    }
+
+    addTypeHolders(this.typeHolders, otherTrueTypes, otherFalseTypes,
+        other.typesOfInterest);
+    addTypeHolders(
+        other.typeHolders, thisTrueTypes, thisFalseTypes, this.typesOfInterest);
+
+    if (newTypeHolders.isEmpty) {
+      assert(newTypesOfInterest.isEmpty);
+      return null;
+    }
+
+    return new TargetInfo(declaredType, newTypeHolders, newTypesOfInterest);
+  }
+
+  /// Computes a single type that soundly represents the promoted type of the
+  /// local variable on all possible paths.
+  ir.DartType typeOf(ir.TypeEnvironment typeEnvironment) {
+    ir.DartType candidate = null;
+    for (TypeHolder typeHolder in typeHolders) {
+      ir.DartType type = typeHolder.typeOf(typeEnvironment);
+      if (type == null) {
+        // We cannot promote. No single type is most specific.
+        return null;
+      }
+      if (candidate == null) {
+        candidate = type;
+      } else {
+        if (type == typeEnvironment.nullType) {
+          // Keep the current candidate.
+        } else if (candidate == typeEnvironment.nullType) {
+          candidate = type;
+        } else if (typeEnvironment.isSubtypeOf(candidate, type)) {
+          candidate = type;
+        } else if (!typeEnvironment.isSubtypeOf(type, candidate)) {
+          // We cannot promote. No promoted type of one path is a supertype of
+          // the promoted type from all other paths.
+          // TODO(johnniwinther): Compute a greatest lower bound, instead?
+          return null;
+        }
+      }
+    }
+    return candidate;
+  }
+
+  void _getText(
+      StringBuffer sb, String Function(Iterable<ir.DartType>) typesToText) {
+    sb.write('[');
+    String comma = '';
+    for (TypeHolder typeHolder in typeHolders) {
+      sb.write(comma);
+      typeHolder._getText(sb, typesToText);
+      comma = ',';
+    }
+    sb.write('|');
+    sb.write(typesToText(typesOfInterest));
+    sb.write(']');
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('TargetInfo(');
+    sb.write('declaredType=$declaredType,');
+    sb.write('typeHolders=$typeHolders,');
+    sb.write('declarationsOfInterest=$typesOfInterest');
+    sb.write(')');
+    return sb.toString();
+  }
+}
+
+/// Map from local variables to type information used for guarded type
+/// promotion.
+///
+/// The terminology and implementation is based on this paper:
+///
+///   http://www.cs.williams.edu/FTfJP2011/6-Winther.pdf
+///
+class TypeMap {
+  final Map<ir.VariableDeclaration, TargetInfo> _targetInfoMap;
+
+  const TypeMap([this._targetInfoMap = const {}]);
+
+  /// Returns the [TypeMap] that describes the added type knowledge for the
+  /// local [variable]. If [isTrue] is `true`, the local [variable] is known to
+  /// be an instance of [type]. If [isTrue] is `false`, the local [variable] is
+  /// known _not_ to be an instance of [type].
+  TypeMap promote(ir.VariableDeclaration variable, ir.DartType type,
+      {bool isTrue}) {
+    Map<ir.VariableDeclaration, TargetInfo> newInfoMap =
+        new Map<ir.VariableDeclaration, TargetInfo>.from(_targetInfoMap);
+    TargetInfo targetInfo = newInfoMap[variable];
+    bool changed = false;
+    if (targetInfo != null) {
+      TargetInfo result = targetInfo.promote(type, isTrue: isTrue);
+      changed = !identical(targetInfo, result);
+      targetInfo = result;
+    } else {
+      changed = true;
+      Set<ir.DartType> trueTypes =
+          isTrue ? (new Set<ir.DartType>()..add(type)) : null;
+      Set<ir.DartType> falseTypes =
+          isTrue ? null : (new Set<ir.DartType>()..add(type));
+      TypeHolder typeHolder =
+          new TypeHolder(variable.type, trueTypes, falseTypes);
+      targetInfo = new TargetInfo(
+          variable.type, <TypeHolder>[typeHolder], <ir.DartType>[type]);
+    }
+    newInfoMap[variable] = targetInfo;
+    return changed ? new TypeMap(newInfoMap) : this;
+  }
+
+  /// Returns the [TypeMap] that describes that the locals are either of [this]
+  /// or the [other] types.
+  TypeMap join(TypeMap other) {
+    if (identical(this, other)) return this;
+
+    Map<ir.VariableDeclaration, TargetInfo> newInfoMap = {};
+    bool changed = false;
+    _targetInfoMap.forEach((ir.VariableDeclaration variable, TargetInfo info) {
+      TargetInfo result = info.join(other._targetInfoMap[variable]);
+      changed |= !identical(info, result);
+      if (result != null) {
+        // Add only non-empty information.
+        newInfoMap[variable] = result;
+      }
+    });
+    return changed ? new TypeMap(newInfoMap) : this;
+  }
+
+  /// Returns the [TypeMap] in which all type information for any of the
+  /// [variables] has been removed.
+  TypeMap remove(Iterable<ir.VariableDeclaration> variables) {
+    bool changed = false;
+    Map<ir.VariableDeclaration, TargetInfo> newInfoMap = {};
+    _targetInfoMap.forEach((ir.VariableDeclaration variable, TargetInfo info) {
+      if (!variables.contains(variable)) {
+        newInfoMap[variable] = info;
+      } else {
+        changed = true;
+      }
+    });
+    return changed ? new TypeMap(newInfoMap) : this;
+  }
+
+  /// Returns the [TypeMap] where type information for `node.variable` is
+  /// reduced to the promotions upheld by an assignment to `node.variable` of
+  /// the static [type].
+  TypeMap reduce(ir.VariableSet node, ir.DartType type,
+      ir.TypeEnvironment typeEnvironment) {
+    Map<ir.VariableDeclaration, TargetInfo> newInfoMap = {};
+    bool changed = false;
+    _targetInfoMap.forEach((ir.VariableDeclaration variable, TargetInfo info) {
+      if (variable != node.variable) {
+        newInfoMap[variable] = info;
+      } else if (type != null) {
+        changed = true;
+        Set<ir.DartType> newTypesOfInterest = new Set<ir.DartType>();
+        for (ir.DartType typeOfInterest in info.typesOfInterest) {
+          if (typeEnvironment.isSubtypeOf(type, typeOfInterest)) {
+            newTypesOfInterest.add(typeOfInterest);
+          }
+        }
+        if (newTypesOfInterest.isNotEmpty) {
+          TypeHolder typeHolderIfNonNull =
+              new TypeHolder(info.declaredType, newTypesOfInterest, null);
+          TypeHolder typeHolderIfNull = new TypeHolder(info.declaredType, null,
+              new Set<ir.DartType>()..add(info.declaredType));
+          newInfoMap[variable] = new TargetInfo(
+              info.declaredType,
+              <TypeHolder>[typeHolderIfNonNull, typeHolderIfNull],
+              newTypesOfInterest);
+        }
+      } else {
+        changed = true;
+      }
+    });
+    return changed ? new TypeMap(newInfoMap) : this;
+  }
+
+  /// Computes a single type that soundly represents the promoted type of
+  /// `node.variable` on all possible paths.
+  ir.DartType typeOf(ir.VariableGet node, ir.TypeEnvironment typeEnvironment) {
+    TargetInfo info = _targetInfoMap[node.variable];
+    ir.DartType type;
+    if (info != null) {
+      type = info.typeOf(typeEnvironment);
+    }
+    return type ?? node.promotedType ?? node.variable.type;
+  }
+
+  String getText(String Function(Iterable<ir.DartType>) typesToText) {
+    StringBuffer sb = new StringBuffer();
+    sb.write('{');
+    String comma = '';
+    _targetInfoMap.forEach((ir.VariableDeclaration variable, TargetInfo info) {
+      sb.write('${comma}${variable.name}:');
+      info._getText(sb, typesToText);
+      comma = ',';
+    });
+    sb.write('}');
+    return sb.toString();
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('TypeMap(');
+    String comma = '';
+    _targetInfoMap.forEach((ir.VariableDeclaration variable, TargetInfo info) {
+      sb.write('${comma}$variable->$info');
+      comma = ',';
+    });
+    sb.write(')');
+    return sb.toString();
+  }
+}
diff --git a/pkg/compiler/lib/src/ir/static_type_base.dart b/pkg/compiler/lib/src/ir/static_type_base.dart
index 9c4144b..508c4d0 100644
--- a/pkg/compiler/lib/src/ir/static_type_base.dart
+++ b/pkg/compiler/lib/src/ir/static_type_base.dart
@@ -97,10 +97,6 @@
   }
 
   @override
-  ir.DartType visitVariableGet(ir.VariableGet node) =>
-      node.promotedType ?? node.variable.type;
-
-  @override
   ir.DartType visitVariableSet(ir.VariableSet node) {
     return visitNode(node.value);
   }
diff --git a/pkg/compiler/lib/src/ir/static_type_provider.dart b/pkg/compiler/lib/src/ir/static_type_provider.dart
new file mode 100644
index 0000000..2901f34
--- /dev/null
+++ b/pkg/compiler/lib/src/ir/static_type_provider.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/class_hierarchy.dart' as ir;
+import 'package:kernel/core_types.dart' as ir;
+import 'package:kernel/type_algebra.dart' as ir;
+import 'package:kernel/type_environment.dart' as ir;
+
+/// Interface for accessing static types on expressions.
+abstract class StaticTypeProvider {
+  ir.DartType getStaticType(ir.Expression node);
+}
diff --git a/pkg/compiler/lib/src/ir/util.dart b/pkg/compiler/lib/src/ir/util.dart
index 8a4a0c4..f286702 100644
--- a/pkg/compiler/lib/src/ir/util.dart
+++ b/pkg/compiler/lib/src/ir/util.dart
@@ -10,6 +10,16 @@
 import '../common.dart';
 import '../elements/entities.dart';
 
+/// Returns a textual representation of [node] that include the runtime type and
+/// hash code of the node and a one line prefix of the node toString text.
+String nodeToDebugString(ir.Node node, [int textLength = 40]) {
+  String blockText = node.toString().replaceAll('\n', ' ');
+  if (blockText.length > textLength) {
+    blockText = blockText.substring(0, textLength - 3) + '...';
+  }
+  return '(${node.runtimeType}:${node.hashCode})${blockText}';
+}
+
 /// Comparator for the canonical order or named arguments.
 // TODO(johnniwinther): Remove this when named parameters are sorted in dill.
 int namedOrdering(ir.VariableDeclaration a, ir.VariableDeclaration b) {
@@ -101,3 +111,99 @@
   }
   return null;
 }
+
+/// Check whether [node] is immediately guarded by a
+/// [ir.CheckLibraryIsLoaded], and hence the node is a deferred access.
+ir.LibraryDependency getDeferredImport(ir.TreeNode node) {
+  // Note: this code relies on the CFE generating the code as we expect it here.
+  // If one day we optimize away redundant CheckLibraryIsLoaded instructions,
+  // we'd need to derive this information directly from the CFE (See #35005),
+  ir.TreeNode parent = node.parent;
+
+  // TODO(sigmund): remove when CFE generates the correct tree (#35320). For
+  // instance, it currently generates
+  //
+  //   let _ = check(prefix) in (prefix::field.property)
+  //
+  // instead of:
+  //
+  //   (let _ = check(prefix) in prefix::field).property
+  if (node is ir.StaticGet) {
+    while (parent is ir.PropertyGet || parent is ir.MethodInvocation) {
+      parent = parent.parent;
+    }
+  }
+
+  if (parent is ir.Let) {
+    var initializer = parent.variable.initializer;
+    if (initializer is ir.CheckLibraryIsLoaded) {
+      return initializer.import;
+    }
+  }
+  return null;
+}
+
+class _FreeVariableVisitor implements ir.DartTypeVisitor<bool> {
+  const _FreeVariableVisitor();
+
+  bool visit(ir.DartType type) {
+    if (type != null) return type.accept(this);
+    return false;
+  }
+
+  bool visitList(List<ir.DartType> types) {
+    for (ir.DartType type in types) {
+      if (visit(type)) return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitTypedefType(ir.TypedefType node) {
+    return visitList(node.typeArguments);
+  }
+
+  @override
+  bool visitTypeParameterType(ir.TypeParameterType node) {
+    return true;
+  }
+
+  @override
+  bool visitFunctionType(ir.FunctionType node) {
+    if (visit(node.returnType)) return true;
+    if (visitList(node.positionalParameters)) return true;
+    for (ir.NamedType namedType in node.namedParameters) {
+      if (visit(namedType.type)) return true;
+    }
+    return false;
+  }
+
+  @override
+  bool visitInterfaceType(ir.InterfaceType node) {
+    return visitList(node.typeArguments);
+  }
+
+  @override
+  bool visitBottomType(ir.BottomType node) => false;
+
+  @override
+  bool visitVoidType(ir.VoidType node) => false;
+
+  @override
+  bool visitDynamicType(ir.DynamicType node) => false;
+
+  @override
+  bool visitInvalidType(ir.InvalidType node) => false;
+
+  @override
+  bool defaultDartType(ir.DartType node) {
+    throw new UnsupportedError("FreeVariableVisitor.defaultTypeNode");
+  }
+}
+
+/// Returns `true` if [type] contains a type variable.
+///
+/// All type variables (class type variables, generic method type variables,
+/// and function type variables) are considered.
+bool containsFreeVariables(ir.DartType type) =>
+    type.accept(const _FreeVariableVisitor());
diff --git a/pkg/compiler/lib/src/js_backend/allocator_analysis.dart b/pkg/compiler/lib/src/js_backend/allocator_analysis.dart
index 6e15c77..9312d15 100644
--- a/pkg/compiler/lib/src/js_backend/allocator_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/allocator_analysis.dart
@@ -31,12 +31,12 @@
 //     this.x = this.z = null;
 //
 class KAllocatorAnalysis implements AllocatorAnalysis {
+  final CompilerOptions _options;
   final KernelToElementMap _elementMap;
 
-  final Map<KField, ConstantValue> _fixedInitializers =
-      <KField, ConstantValue>{};
+  final Map<KField, ConstantValue> _fixedInitializers = {};
 
-  KAllocatorAnalysis(KernelFrontEndStrategy kernelStrategy)
+  KAllocatorAnalysis(this._options, KernelFrontEndStrategy kernelStrategy)
       : _elementMap = kernelStrategy.elementMap;
 
   // Register class during resolution. Use simple syntactic analysis to find
@@ -44,12 +44,29 @@
   void registerInstantiatedClass(KClass class_) {
     ir.Class classNode = _elementMap.getClassNode(class_);
 
-    Set<ir.Field> nulls = new Set<ir.Field>();
+    Map<ir.Field, ConstantValue> inits = {};
     for (ir.Field field in classNode.fields) {
       if (!field.isInstanceMember) continue;
       ir.Expression initializer = field.initializer;
+      // TODO(sra): Should really be using constant evaluator to determine
+      // value.
       if (initializer == null || initializer is ir.NullLiteral) {
-        nulls.add(field);
+        inits[field] = const NullConstantValue();
+      } else if (initializer is ir.IntLiteral) {
+        if (_options.useStartupEmitter) {
+          BigInt intValue = BigInt.from(initializer.value).toUnsigned(64);
+          inits[field] = IntConstantValue(intValue);
+        }
+      } else if (initializer is ir.BoolLiteral) {
+        if (_options.useStartupEmitter) {
+          inits[field] = BoolConstantValue(initializer.value);
+        }
+      } else if (initializer is ir.StringLiteral) {
+        if (_options.useStartupEmitter) {
+          if (initializer.value.length <= 20) {
+            inits[field] = StringConstantValue(initializer.value);
+          }
+        }
       }
     }
 
@@ -58,15 +75,14 @@
         if (initializer is ir.FieldInitializer) {
           // TODO(sra): Check explicit initializer value to see if consistent
           // over all constructors.
-          nulls.remove(initializer.field);
+          inits.remove(initializer.field);
         }
       }
     }
 
-    for (var fieldNode in nulls) {
-      _fixedInitializers[_elementMap.getField(fieldNode)] =
-          const NullConstantValue();
-    }
+    inits.forEach((ir.Field fieldNode, ConstantValue value) {
+      _fixedInitializers[_elementMap.getField(fieldNode)] = value;
+    });
   }
 }
 
@@ -77,8 +93,7 @@
 
   // --csp and --fast-startup have different constraints to the generated code.
   final CompilerOptions _options;
-  final Map<JField, ConstantValue> _fixedInitializers =
-      <JField, ConstantValue>{};
+  final Map<JField, ConstantValue> _fixedInitializers = {};
 
   JAllocatorAnalysis._(this._options);
 
@@ -90,8 +105,7 @@
     int fieldCount = source.readInt();
     for (int i = 0; i < fieldCount; i++) {
       JField field = source.readMember();
-      // TODO(sra): Deserialize constant, when non-null is supported.
-      ConstantValue value = const NullConstantValue();
+      ConstantValue value = source.readConstant();
       analysis._fixedInitializers[field] = value;
     }
     source.end(tag);
@@ -104,8 +118,7 @@
     sink.writeInt(_fixedInitializers.length);
     _fixedInitializers.forEach((JField field, ConstantValue value) {
       sink.writeMember(field);
-      // TODO(sra): Serialize constant, when non-null is supported.
-      assert(value.isNull);
+      sink.writeConstant(value);
     });
     sink.end(tag);
   }
@@ -115,8 +128,9 @@
     var result = new JAllocatorAnalysis._(options);
 
     kAnalysis._fixedInitializers.forEach((KField kField, ConstantValue value) {
-      // TODO(sra): Translate constant, but Null does not need translating.
-      if (value.isNull) {
+      // TODO(sra): Translate constant, but Null and these primitives do not
+      // need translating.
+      if (value.isNull || value.isInt || value.isBool || value.isString) {
         JField jField = map.toBackendMember(kField);
         if (jField != null) {
           result._fixedInitializers[jField] = value;
diff --git a/pkg/compiler/lib/src/js_backend/annotations.dart b/pkg/compiler/lib/src/js_backend/annotations.dart
index bd195e7..15db202 100644
--- a/pkg/compiler/lib/src/js_backend/annotations.dart
+++ b/pkg/compiler/lib/src/js_backend/annotations.dart
@@ -12,14 +12,6 @@
 import '../kernel/dart2js_target.dart';
 import '../serialization/serialization.dart';
 
-/// Returns `true` if parameter and returns types should be trusted for
-/// [element].
-bool _trustTypeAnnotations(KElementEnvironment elementEnvironment,
-    KCommonElements commonElements, MemberEntity element) {
-  return _hasAnnotation(elementEnvironment, element,
-      commonElements.expectTrustTypeAnnotationsClass);
-}
-
 /// Returns `true` if inference of parameter types is disabled for [element].
 bool _assumeDynamic(KElementEnvironment elementEnvironment,
     KCommonElements commonElements, MemberEntity element) {
@@ -42,141 +34,154 @@
   return false;
 }
 
-/// Process backend specific annotations.
-// TODO(johnniwinther): Merge this with [AnnotationProcessor].
-AnnotationsData processAnnotations(
+enum PragmaAnnotation {
+  noInline,
+  tryInline,
+  disableFinal,
+  noThrows,
+  noSideEffects,
+  trustTypeAnnotations,
+  assumeDynamic,
+}
+
+Set<PragmaAnnotation> processMemberAnnotations(
     DiagnosticReporter reporter,
     KCommonElements commonElements,
     KElementEnvironment elementEnvironment,
-    Iterable<MemberEntity> processedMembers) {
-  AnnotationsDataBuilder annotationsDataBuilder = new AnnotationsDataBuilder();
+    AnnotationsDataBuilder annotationsDataBuilder,
+    MemberEntity element) {
+  Set<PragmaAnnotation> values = new Set<PragmaAnnotation>();
+  bool hasNoInline = false;
+  bool hasTryInline = false;
+  bool disableFinal = false;
 
-  void processMemberAnnotations(MemberEntity element) {
-    bool hasNoInline = false;
-    bool hasTryInline = false;
+  if (_assumeDynamic(elementEnvironment, commonElements, element)) {
+    values.add(PragmaAnnotation.assumeDynamic);
+    annotationsDataBuilder.registerAssumeDynamic(element);
+  }
 
-    if (_trustTypeAnnotations(elementEnvironment, commonElements, element)) {
-      annotationsDataBuilder.registerTrustTypeAnnotations(element);
-    }
+  // TODO(sra): Check for inappropriate annotations on fields.
+  if (element.isField) {
+    return values;
+  }
 
-    if (_assumeDynamic(elementEnvironment, commonElements, element)) {
-      annotationsDataBuilder.registerAssumeDynamic(element);
-    }
+  FunctionEntity method = element;
+  LibraryEntity library = element.library;
+  bool platformAnnotationsAllowed = library.canonicalUri.scheme == 'dart' ||
+      maybeEnableNative(library.canonicalUri);
 
-    // TODO(sra): Check for inappropriate annotations on fields.
-    if (element.isField) return;
+  bool hasNoThrows = false;
+  bool hasNoSideEffects = false;
 
-    FunctionEntity method = element;
-    LibraryEntity library = element.library;
-    bool platformAnnotationsAllowed = library.canonicalUri.scheme == 'dart' ||
-        maybeEnableNative(library.canonicalUri);
+  for (ConstantValue constantValue
+      in elementEnvironment.getMemberMetadata(method)) {
+    if (!constantValue.isConstructedObject) continue;
+    ConstructedConstantValue value = constantValue;
+    ClassEntity cls = value.type.element;
+    assert(cls != null); // Unresolved classes null.
 
-    bool hasNoThrows = false;
-    bool hasNoSideEffects = false;
-
-    for (ConstantValue constantValue
-        in elementEnvironment.getMemberMetadata(method)) {
-      if (!constantValue.isConstructedObject) continue;
-      ConstructedConstantValue value = constantValue;
-      ClassEntity cls = value.type.element;
-      assert(cls != null); // Unresolved classes null.
-
-      if (platformAnnotationsAllowed) {
-        if (cls == commonElements.forceInlineClass) {
-          hasTryInline = true;
-        } else if (cls == commonElements.noInlineClass) {
-          hasNoInline = true;
-        } else if (cls == commonElements.noThrowsClass) {
-          hasNoThrows = true;
-          bool isValid = true;
-          if (method.isTopLevel) {
-            isValid = true;
-          } else if (method.isStatic) {
-            isValid = true;
-          } else if (method is ConstructorEntity &&
-              method.isFactoryConstructor) {
-            isValid = true;
-          }
-          if (!isValid) {
-            reporter.internalError(
-                method,
-                "@NoThrows() is currently limited to top-level"
-                " or static functions and factory constructors.");
-          }
-          annotationsDataBuilder.registerCannotThrow(method);
-        } else if (cls == commonElements.noSideEffectsClass) {
-          hasNoSideEffects = true;
-          annotationsDataBuilder.registerSideEffectsFree(method);
-        }
-      }
-
-      if (cls == commonElements.expectNoInlineClass) {
-        hasNoInline = true;
-      } else if (cls == commonElements.metaNoInlineClass) {
-        hasNoInline = true;
-      } else if (cls == commonElements.metaTryInlineClass) {
+    if (platformAnnotationsAllowed) {
+      if (cls == commonElements.forceInlineClass) {
         hasTryInline = true;
-      } else if (cls == commonElements.pragmaClass) {
-        // Recognize:
-        //
-        //     @pragma('dart2js:noInline')
-        //     @pragma('dart2js:tryInline')
-        //
-        ConstantValue nameValue =
-            value.fields[commonElements.pragmaClassNameField];
-        if (nameValue == null || !nameValue.isString) continue;
-        String name = (nameValue as StringConstantValue).stringValue;
-        if (!name.startsWith('dart2js:')) continue;
-
-        ConstantValue optionsValue =
-            value.fields[commonElements.pragmaClassOptionsField];
-        if (name == 'dart2js:noInline') {
-          if (!optionsValue.isNull) {
-            reporter.reportErrorMessage(element, MessageKind.GENERIC,
-                {'text': "@pragma('$name') annotation does not take options"});
-          }
-          hasNoInline = true;
-        } else if (name == 'dart2js:tryInline') {
-          if (!optionsValue.isNull) {
-            reporter.reportErrorMessage(element, MessageKind.GENERIC,
-                {'text': "@pragma('$name') annotation does not take options"});
-          }
-          hasTryInline = true;
-        } else if (!platformAnnotationsAllowed) {
-          reporter.reportErrorMessage(element, MessageKind.GENERIC,
-              {'text': "Unknown dart2js pragma @pragma('$name')"});
-        } else {
-          // Handle platform-only `@pragma` annotations.
+      } else if (cls == commonElements.noInlineClass) {
+        hasNoInline = true;
+      } else if (cls == commonElements.noThrowsClass) {
+        hasNoThrows = true;
+        bool isValid = true;
+        if (method.isTopLevel) {
+          isValid = true;
+        } else if (method.isStatic) {
+          isValid = true;
+        } else if (method is ConstructorEntity && method.isFactoryConstructor) {
+          isValid = true;
         }
+        if (!isValid) {
+          reporter.internalError(
+              method,
+              "@NoThrows() is currently limited to top-level"
+              " or static functions and factory constructors.");
+        }
+        annotationsDataBuilder.registerCannotThrow(method);
+      } else if (cls == commonElements.noSideEffectsClass) {
+        hasNoSideEffects = true;
+        annotationsDataBuilder.registerSideEffectsFree(method);
       }
     }
 
-    if (hasTryInline && hasNoInline) {
-      reporter.reportErrorMessage(element, MessageKind.GENERIC,
-          {'text': '@tryInline must not be used with @noInline.'});
-      hasTryInline = false;
-    }
-    if (hasNoInline) {
-      annotationsDataBuilder.markAsNonInlinable(method);
-    }
-    if (hasTryInline) {
-      annotationsDataBuilder.markAsTryInline(method);
-    }
-    if (hasNoThrows && !hasNoInline) {
-      reporter.internalError(
-          method, "@NoThrows() should always be combined with @noInline.");
-    }
-    if (hasNoSideEffects && !hasNoInline) {
-      reporter.internalError(
-          method, "@NoSideEffects() should always be combined with @noInline.");
+    if (cls == commonElements.expectNoInlineClass) {
+      hasNoInline = true;
+    } else if (cls == commonElements.metaNoInlineClass) {
+      hasNoInline = true;
+    } else if (cls == commonElements.metaTryInlineClass) {
+      hasTryInline = true;
+    } else if (cls == commonElements.pragmaClass) {
+      // Recognize:
+      //
+      //     @pragma('dart2js:noInline')
+      //     @pragma('dart2js:tryInline')
+      //
+      ConstantValue nameValue =
+          value.fields[commonElements.pragmaClassNameField];
+      if (nameValue == null || !nameValue.isString) continue;
+      String name = (nameValue as StringConstantValue).stringValue;
+      if (!name.startsWith('dart2js:')) continue;
+
+      ConstantValue optionsValue =
+          value.fields[commonElements.pragmaClassOptionsField];
+      if (name == 'dart2js:noInline') {
+        if (!optionsValue.isNull) {
+          reporter.reportErrorMessage(element, MessageKind.GENERIC,
+              {'text': "@pragma('$name') annotation does not take options"});
+        }
+        hasNoInline = true;
+      } else if (name == 'dart2js:tryInline') {
+        if (!optionsValue.isNull) {
+          reporter.reportErrorMessage(element, MessageKind.GENERIC,
+              {'text': "@pragma('$name') annotation does not take options"});
+        }
+        hasTryInline = true;
+      } else if (!platformAnnotationsAllowed) {
+        reporter.reportErrorMessage(element, MessageKind.GENERIC,
+            {'text': "Unknown dart2js pragma @pragma('$name')"});
+      } else {
+        // Handle platform-only `@pragma` annotations.
+        if (name == 'dart2js:disableFinal') {
+          if (!optionsValue.isNull) {
+            reporter.reportErrorMessage(element, MessageKind.GENERIC,
+                {'text': "@pragma('$name') annotation does not take options"});
+          }
+          disableFinal = true;
+        }
+      }
     }
   }
 
-  for (MemberEntity entity in processedMembers) {
-    processMemberAnnotations(entity);
+  if (hasTryInline && hasNoInline) {
+    reporter.reportErrorMessage(element, MessageKind.GENERIC,
+        {'text': '@tryInline must not be used with @noInline.'});
+    hasTryInline = false;
   }
-
-  return annotationsDataBuilder;
+  if (hasNoInline) {
+    values.add(PragmaAnnotation.noInline);
+    annotationsDataBuilder.markAsNonInlinable(method);
+  }
+  if (hasTryInline) {
+    values.add(PragmaAnnotation.tryInline);
+    annotationsDataBuilder.markAsTryInline(method);
+  }
+  if (disableFinal) {
+    values.add(PragmaAnnotation.disableFinal);
+    annotationsDataBuilder.markAsDisableFinal(method);
+  }
+  if (hasNoThrows && !hasNoInline) {
+    reporter.internalError(
+        method, "@NoThrows() should always be combined with @noInline.");
+  }
+  if (hasNoSideEffects && !hasNoInline) {
+    reporter.internalError(
+        method, "@NoSideEffects() should always be combined with @noInline.");
+  }
+  return values;
 }
 
 abstract class AnnotationsData {
@@ -187,21 +192,23 @@
   /// Serializes this [AnnotationsData] to [sink].
   void writeToDataSink(DataSink sink);
 
-  /// Functions with a `@NoInline()` or `@noInline` annotation.
+  /// Functions with a `@NoInline()`, `@noInline`, or
+  /// `@pragma('dart2js:noInline')` annotation.
   Iterable<FunctionEntity> get nonInlinableFunctions;
 
-  /// Functions with a `@ForceInline()` or `@tryInline` annotation.
+  /// Functions with a `@ForceInline()`, `@tryInline`, or
+  /// `@pragma('dart2js:tryInline')` annotation.
   Iterable<FunctionEntity> get tryInlineFunctions;
 
+  /// Functions with a `@pragma('dart2js:disable-final')` annotation.
+  Iterable<FunctionEntity> get disableFinalFunctions;
+
   /// Functions with a `@NoThrows()` annotation.
   Iterable<FunctionEntity> get cannotThrowFunctions;
 
   /// Functions with a `@NoSideEffects()` annotation.
   Iterable<FunctionEntity> get sideEffectFreeFunctions;
 
-  /// Members with a `@TrustTypeAnnotations()` annotation.
-  Iterable<MemberEntity> get trustTypeAnnotationsMembers;
-
   /// Members with a `@AssumeDynamic()` annotation.
   Iterable<MemberEntity> get assumeDynamicMembers;
 }
@@ -213,34 +220,46 @@
 
   final Iterable<FunctionEntity> nonInlinableFunctions;
   final Iterable<FunctionEntity> tryInlineFunctions;
+  final Iterable<FunctionEntity> disableFinalFunctions;
   final Iterable<FunctionEntity> cannotThrowFunctions;
   final Iterable<FunctionEntity> sideEffectFreeFunctions;
-  final Iterable<MemberEntity> trustTypeAnnotationsMembers;
   final Iterable<MemberEntity> assumeDynamicMembers;
 
   AnnotationsDataImpl(
       this.nonInlinableFunctions,
       this.tryInlineFunctions,
+      this.disableFinalFunctions,
       this.cannotThrowFunctions,
       this.sideEffectFreeFunctions,
-      this.trustTypeAnnotationsMembers,
       this.assumeDynamicMembers);
 
   factory AnnotationsDataImpl.readFromDataSource(DataSource source) {
     source.begin(tag);
-    Iterable<FunctionEntity> nonInlinableFunctions = source.readMembers();
-    Iterable<FunctionEntity> tryInlineFunctions = source.readMembers();
-    Iterable<FunctionEntity> cannotThrowFunctions = source.readMembers();
-    Iterable<FunctionEntity> sideEffectFreeFunctions = source.readMembers();
-    Iterable<MemberEntity> trustTypeAnnotationsMembers = source.readMembers();
-    Iterable<MemberEntity> assumeDynamicMembers = source.readMembers();
+    Iterable<FunctionEntity> nonInlinableFunctions =
+        source.readMembers<FunctionEntity>(emptyAsNull: true) ??
+            const <FunctionEntity>[];
+    Iterable<FunctionEntity> tryInlineFunctions =
+        source.readMembers<FunctionEntity>(emptyAsNull: true) ??
+            const <FunctionEntity>[];
+    Iterable<FunctionEntity> disableFinalFunctions =
+        source.readMembers<FunctionEntity>(emptyAsNull: true) ??
+            const <FunctionEntity>[];
+    Iterable<FunctionEntity> cannotThrowFunctions =
+        source.readMembers<FunctionEntity>(emptyAsNull: true) ??
+            const <FunctionEntity>[];
+    Iterable<FunctionEntity> sideEffectFreeFunctions =
+        source.readMembers<FunctionEntity>(emptyAsNull: true) ??
+            const <FunctionEntity>[];
+    Iterable<MemberEntity> assumeDynamicMembers =
+        source.readMembers<MemberEntity>(emptyAsNull: true) ??
+            const <MemberEntity>[];
     source.end(tag);
     return new AnnotationsDataImpl(
         nonInlinableFunctions,
         tryInlineFunctions,
+        disableFinalFunctions,
         cannotThrowFunctions,
         sideEffectFreeFunctions,
-        trustTypeAnnotationsMembers,
         assumeDynamicMembers);
   }
 
@@ -248,54 +267,67 @@
     sink.begin(tag);
     sink.writeMembers(nonInlinableFunctions);
     sink.writeMembers(tryInlineFunctions);
+    sink.writeMembers(disableFinalFunctions);
     sink.writeMembers(cannotThrowFunctions);
     sink.writeMembers(sideEffectFreeFunctions);
-    sink.writeMembers(trustTypeAnnotationsMembers);
     sink.writeMembers(assumeDynamicMembers);
     sink.end(tag);
   }
 }
 
 class AnnotationsDataBuilder implements AnnotationsData {
-  List<FunctionEntity> _nonInlinableFunctions = <FunctionEntity>[];
-  List<FunctionEntity> _tryInlinableFunctions = <FunctionEntity>[];
-  List<FunctionEntity> _cannotThrowFunctions = <FunctionEntity>[];
-  List<FunctionEntity> _sideEffectFreeFunctions = <FunctionEntity>[];
-  List<MemberEntity> _trustTypeAnnotationsMembers = <MemberEntity>[];
-  List<MemberEntity> _assumeDynamicMembers = <MemberEntity>[];
+  List<FunctionEntity> _nonInlinableFunctions;
+  List<FunctionEntity> _tryInlinableFunctions;
+  List<FunctionEntity> _disableFinalFunctions;
+  List<FunctionEntity> _cannotThrowFunctions;
+  List<FunctionEntity> _sideEffectFreeFunctions;
+  List<MemberEntity> _trustTypeAnnotationsMembers;
+  List<MemberEntity> _assumeDynamicMembers;
 
   void markAsNonInlinable(FunctionEntity function) {
+    _nonInlinableFunctions ??= <FunctionEntity>[];
     _nonInlinableFunctions.add(function);
   }
 
   void markAsTryInline(FunctionEntity function) {
+    _tryInlinableFunctions ??= <FunctionEntity>[];
     _tryInlinableFunctions.add(function);
   }
 
+  void markAsDisableFinal(FunctionEntity function) {
+    _disableFinalFunctions ??= <FunctionEntity>[];
+    _disableFinalFunctions.add(function);
+  }
+
   void registerCannotThrow(FunctionEntity function) {
+    _cannotThrowFunctions ??= <FunctionEntity>[];
     _cannotThrowFunctions.add(function);
   }
 
   void registerSideEffectsFree(FunctionEntity function) {
+    _sideEffectFreeFunctions ??= <FunctionEntity>[];
     _sideEffectFreeFunctions.add(function);
   }
 
-  void registerTrustTypeAnnotations(MemberEntity member) {
-    _trustTypeAnnotationsMembers.add(member);
-  }
-
   void registerAssumeDynamic(MemberEntity member) {
+    _assumeDynamicMembers ??= <MemberEntity>[];
     _assumeDynamicMembers.add(member);
   }
 
-  Iterable<FunctionEntity> get nonInlinableFunctions => _nonInlinableFunctions;
-  Iterable<FunctionEntity> get tryInlineFunctions => _tryInlinableFunctions;
-  Iterable<FunctionEntity> get cannotThrowFunctions => _cannotThrowFunctions;
+  Iterable<FunctionEntity> get nonInlinableFunctions =>
+      _nonInlinableFunctions ?? const <FunctionEntity>[];
+  Iterable<FunctionEntity> get tryInlineFunctions =>
+      _tryInlinableFunctions ?? const <FunctionEntity>[];
+  Iterable<FunctionEntity> get disableFinalFunctions =>
+      _disableFinalFunctions ?? const <FunctionEntity>[];
+  Iterable<FunctionEntity> get cannotThrowFunctions =>
+      _cannotThrowFunctions ?? const <FunctionEntity>[];
   Iterable<FunctionEntity> get sideEffectFreeFunctions =>
-      _sideEffectFreeFunctions;
+      _sideEffectFreeFunctions ?? const <FunctionEntity>[];
   Iterable<MemberEntity> get trustTypeAnnotationsMembers =>
-      _trustTypeAnnotationsMembers;
-  Iterable<MemberEntity> get assumeDynamicMembers => _assumeDynamicMembers;
+      _trustTypeAnnotationsMembers ?? const <MemberEntity>[];
+  Iterable<MemberEntity> get assumeDynamicMembers =>
+      _assumeDynamicMembers ?? const <MemberEntity>[];
 
   void writeToDataSink(DataSink sink) {
     throw new UnsupportedError('AnnotationsDataBuilder.writeToDataSink');
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 360666b..81ea82f 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -18,6 +18,7 @@
 import '../elements/types.dart';
 import '../enqueue.dart' show Enqueuer, EnqueueTask, ResolutionEnqueuer;
 import '../frontend_strategy.dart';
+import '../inferrer/types.dart';
 import '../io/source_information.dart'
     show SourceInformation, SourceInformationStrategy;
 import '../js/js.dart' as jsAst;
@@ -30,7 +31,6 @@
 import '../native/enqueue.dart';
 import '../ssa/ssa.dart' show SsaFunctionCompiler;
 import '../tracer.dart';
-import '../types/types.dart';
 import '../universe/call_structure.dart' show CallStructure;
 import '../universe/class_hierarchy.dart'
     show ClassHierarchyBuilder, ClassQueries;
@@ -540,8 +540,7 @@
     NativeBasicData nativeBasicData = compiler.frontendStrategy.nativeBasicData;
     RuntimeTypesNeedBuilder rtiNeedBuilder =
         compiler.frontendStrategy.createRuntimeTypesNeedBuilder();
-    BackendImpacts impacts =
-        new BackendImpacts(compiler.options, commonElements);
+    BackendImpacts impacts = new BackendImpacts(commonElements);
     _nativeResolutionEnqueuer = new NativeResolutionEnqueuer(
         compiler.options,
         elementEnvironment,
@@ -556,7 +555,7 @@
         nativeBasicData,
         _backendUsageBuilder);
     _allocatorResolutionAnalysis =
-        new KAllocatorAnalysis(compiler.frontendStrategy);
+        new KAllocatorAnalysis(compiler.options, compiler.frontendStrategy);
     ClassQueries classQueries = compiler.frontendStrategy.createClassQueries();
     ClassHierarchyBuilder classHierarchyBuilder =
         new ClassHierarchyBuilder(commonElements, classQueries);
@@ -574,6 +573,8 @@
     InterceptorDataBuilder interceptorDataBuilder =
         new InterceptorDataBuilderImpl(
             nativeBasicData, elementEnvironment, commonElements);
+    AnnotationsDataBuilder annotationsDataBuilder =
+        new AnnotationsDataBuilder();
     return new ResolutionEnqueuer(
         task,
         compiler.options,
@@ -600,12 +601,14 @@
             _allocatorResolutionAnalysis,
             _nativeResolutionEnqueuer,
             noSuchMethodRegistry,
+            annotationsDataBuilder,
             const StrongModeWorldStrategy(),
             classHierarchyBuilder,
             classQueries),
         compiler.frontendStrategy.createResolutionWorkItemBuilder(
             nativeBasicData,
             _nativeDataBuilder,
+            annotationsDataBuilder,
             impactTransformer,
             compiler.impactCache));
   }
@@ -618,8 +621,7 @@
       GlobalTypeInferenceResults globalInferenceResults) {
     ElementEnvironment elementEnvironment = closedWorld.elementEnvironment;
     CommonElements commonElements = closedWorld.commonElements;
-    BackendImpacts impacts =
-        new BackendImpacts(compiler.options, commonElements);
+    BackendImpacts impacts = new BackendImpacts(commonElements);
     _customElementsCodegenAnalysis = new CustomElementsCodegenAnalysis(
         constantSystem,
         commonElements,
@@ -770,8 +772,7 @@
     emitter.createEmitter(namer, closedWorld, codegenWorldBuilder, sorter);
     // TODO(johnniwinther): Share the impact object created in
     // createCodegenEnqueuer.
-    BackendImpacts impacts =
-        new BackendImpacts(compiler.options, closedWorld.commonElements);
+    BackendImpacts impacts = new BackendImpacts(closedWorld.commonElements);
     if (compiler.options.disableRtiOptimization) {
       _rtiSubstitutions = new TrivialRuntimeTypesSubstitutions(closedWorld);
       _rtiChecksBuilder =
@@ -891,14 +892,8 @@
       jsAst.Expression code,
       DartType elementType,
       jsAst.Name name) {
-    bool startAsyncSynchronously = compiler.options.startAsyncSynchronously;
-
-    var startFunction = startAsyncSynchronously
-        ? commonElements.asyncHelperStartSync
-        : commonElements.asyncHelperStart;
-    var completerFactory = startAsyncSynchronously
-        ? commonElements.asyncAwaitCompleterFactory
-        : commonElements.syncCompleterFactory;
+    var startFunction = commonElements.asyncHelperStartSync;
+    var completerFactory = commonElements.asyncAwaitCompleterFactory;
 
     List<jsAst.Expression> itemTypeExpression = _fetchItemType(elementType);
 
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index 704ac1a..f553d9f 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -8,7 +8,6 @@
 import '../common_elements.dart' show CommonElements, ElementEnvironment;
 import '../elements/types.dart' show InterfaceType;
 import '../elements/entities.dart';
-import '../options.dart' show CompilerOptions;
 import '../universe/selector.dart';
 import '../universe/world_impact.dart'
     show WorldImpact, WorldImpactBuilder, WorldImpactBuilderImpl;
@@ -89,10 +88,9 @@
 
 /// The JavaScript backend dependencies for various features.
 class BackendImpacts {
-  final CompilerOptions _options;
   final CommonElements _commonElements;
 
-  BackendImpacts(this._options, this._commonElements);
+  BackendImpacts(this._commonElements);
 
   BackendImpact _getRuntimeTypeArgument;
 
@@ -128,21 +126,14 @@
 
   BackendImpact _asyncBody;
 
-  BackendImpact get asyncBody => _asyncBody ??= () {
-        var staticUses = [
-          _commonElements.asyncHelperAwait,
-          _commonElements.asyncHelperReturn,
-          _commonElements.asyncHelperRethrow,
-          _commonElements.streamIteratorConstructor,
-          _commonElements.wrapBody
-        ];
-        if (_options.startAsyncSynchronously) {
-          staticUses.add(_commonElements.asyncHelperStartSync);
-        } else {
-          staticUses.add(_commonElements.asyncHelperStart);
-        }
-        return new BackendImpact(staticUses: staticUses);
-      }();
+  BackendImpact get asyncBody => _asyncBody ??= new BackendImpact(staticUses: [
+        _commonElements.asyncHelperAwait,
+        _commonElements.asyncHelperReturn,
+        _commonElements.asyncHelperRethrow,
+        _commonElements.streamIteratorConstructor,
+        _commonElements.wrapBody,
+        _commonElements.asyncHelperStartSync
+      ]);
 
   BackendImpact _syncStarBody;
 
@@ -462,14 +453,6 @@
     return _typeCheck ??= new BackendImpact(otherImpacts: [boolValues]);
   }
 
-  BackendImpact _malformedTypeCheck;
-
-  BackendImpact get malformedTypeCheck {
-    return _malformedTypeCheck ??= new BackendImpact(staticUses: [
-      _commonElements.throwTypeError,
-    ]);
-  }
-
   BackendImpact _genericTypeCheck;
 
   BackendImpact get genericTypeCheck {
diff --git a/pkg/compiler/lib/src/js_backend/frequency_namer.dart b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
index 540ab3a..781d1ef 100644
--- a/pkg/compiler/lib/src/js_backend/frequency_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
@@ -21,6 +21,8 @@
   final String getterPrefix = 'g';
   final String setterPrefix = 's';
   final String callPrefix = ''; // this will create function names $<n>
+  String get operatorIsPrefix => r'$i';
+  String get operatorAsPrefix => r'$a';
   String get callCatchAllName => r'$C';
   String get requiredParameterField => r'$R';
   String get defaultValuesField => r'$D';
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index 73b9075..9a04642 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -317,9 +317,6 @@
     type = _elementEnvironment.getUnaliasedType(type);
     registerImpact(_impacts.typeCheck);
 
-    if (type.isMalformed) {
-      registerImpact(_impacts.malformedTypeCheck);
-    }
     if (!type.treatAsRaw || type.containsTypeVariables || type.isFunctionType) {
       registerImpact(_impacts.genericTypeCheck);
       if (type.isTypeVariable) {
diff --git a/pkg/compiler/lib/src/js_backend/inferred_data.dart b/pkg/compiler/lib/src/js_backend/inferred_data.dart
index 73bb493..d68b500 100644
--- a/pkg/compiler/lib/src/js_backend/inferred_data.dart
+++ b/pkg/compiler/lib/src/js_backend/inferred_data.dart
@@ -6,8 +6,8 @@
 
 import '../common.dart';
 import '../elements/entities.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../serialization/serialization.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
 import '../world.dart';
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
index 833c7c7..06c66ae 100644
--- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart
+++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
@@ -9,9 +9,9 @@
     show CommonElements, KCommonElements, KElementEnvironment;
 import '../elements/entities.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../js/js.dart' as jsAst;
 import '../serialization/serialization.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart';
 import '../world.dart' show JClosedWorld;
 import 'namer.dart';
@@ -182,7 +182,9 @@
     return elements.any((element) {
       return selector.applies(element) &&
           (mask == null ||
-              closedWorld.abstractValueDomain.canHit(mask, element, selector));
+              closedWorld.abstractValueDomain
+                  .isTargetingMember(mask, element, selector.memberName)
+                  .isPotentiallyTrue);
     });
   }
 
diff --git a/pkg/compiler/lib/src/js_backend/minify_namer.dart b/pkg/compiler/lib/src/js_backend/minify_namer.dart
index 69cbda8..3739932 100644
--- a/pkg/compiler/lib/src/js_backend/minify_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/minify_namer.dart
@@ -27,6 +27,8 @@
   final String getterPrefix = 'g';
   final String setterPrefix = 's';
   final String callPrefix = ''; // this will create function names $<n>
+  String get operatorIsPrefix => r'$i';
+  String get operatorAsPrefix => r'$a';
   String get callCatchAllName => r'$C';
   String get requiredParameterField => r'$R';
   String get defaultValuesField => r'$D';
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index dde4b63..0fe5bd1 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -522,22 +522,27 @@
   final Map<Entity, jsAst.Name> userGlobalsSecondName = {};
   final Map<String, jsAst.Name> internalGlobals = {};
 
+  _registerName(
+      Map<String, String> map, jsAst.Name jsName, String originalName) {
+    // Non-finalized names are not present in the output program
+    if (jsName is TokenName && !jsName.isFinalized) return;
+    map[jsName.name] = originalName;
+    var getterName = userGetters[jsName];
+    if (getterName != null) map[getterName.name] = originalName;
+    var setterName = userSetters[jsName];
+    if (setterName != null) map[setterName.name] = originalName;
+  }
+
   Map<String, String> createMinifiedGlobalNameMap() {
     var map = <String, String>{};
     userGlobals.forEach((entity, jsName) {
-      // Non-finalized names are not present in the output program
-      if (jsName is TokenName && !jsName.isFinalized) return;
-      map[jsName.name] = entity.name;
+      _registerName(map, jsName, entity.name);
     });
     userGlobalsSecondName.forEach((entity, jsName) {
-      // Non-finalized names are not present in the output program
-      if (jsName is TokenName && !jsName.isFinalized) return;
-      map[jsName.name] = entity.name;
+      _registerName(map, jsName, entity.name);
     });
     internalGlobals.forEach((name, jsName) {
-      // Non-finalized names are not present in the output program
-      if (jsName is TokenName && !jsName.isFinalized) return;
-      map[jsName.name] = name;
+      _registerName(map, jsName, name);
     });
     return map;
   }
@@ -550,27 +555,22 @@
   final Map<String, String> userInstanceMembersOriginalName = HashMap();
   final Map<MemberEntity, jsAst.Name> internalInstanceMembers = HashMap();
   final Map<String, jsAst.Name> userInstanceOperators = HashMap();
+  final Map<jsAst.Name, jsAst.Name> userGetters = HashMap();
+  final Map<jsAst.Name, jsAst.Name> userSetters = HashMap();
 
   Map<String, String> createMinifiedInstanceNameMap() {
     var map = <String, String>{};
     internalInstanceMembers.forEach((entity, jsName) {
-      // Non-finalized names are not present in the output program
-      if (jsName is TokenName && !jsName.isFinalized) return;
-      map[jsName.name] = entity.name;
+      _registerName(map, jsName, entity.name);
     });
     userInstanceMembers.forEach((name, jsName) {
-      // Non-finalized names are not present in the output program
-      if (jsName is TokenName && !jsName.isFinalized) return;
-      var originalName = userInstanceMembersOriginalName[name];
-      map[jsName.name] = originalName ?? name;
+      _registerName(map, jsName, userInstanceMembersOriginalName[name] ?? name);
     });
 
     // TODO(sigmund): reverse the operator names back to the original Dart
     // names.
     userInstanceOperators.forEach((name, jsName) {
-      // Non-finalized names are not present in the output program
-      if (jsName is TokenName && !jsName.isFinalized) return;
-      map[jsName.name] = name;
+      _registerName(map, jsName, name);
     });
     return map;
   }
@@ -1067,14 +1067,16 @@
   jsAst.Name deriveSetterName(jsAst.Name disambiguatedName) {
     // We dynamically create setters from the field-name. The setter name must
     // therefore be derived from the instance field-name.
-    return new SetterName(_literalSetterPrefix, disambiguatedName);
+    return userSetters[disambiguatedName] ??=
+        new SetterName(_literalSetterPrefix, disambiguatedName);
   }
 
   /// Annotated name for the setter of any member with [disambiguatedName].
   jsAst.Name deriveGetterName(jsAst.Name disambiguatedName) {
     // We dynamically create getters from the field-name. The getter name must
     // therefore be derived from the instance field-name.
-    return new GetterName(_literalGetterPrefix, disambiguatedName);
+    return userGetters[disambiguatedName] ??=
+        new GetterName(_literalGetterPrefix, disambiguatedName);
   }
 
   /// Annotated name for the getter of [element].
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index e997b3e..3dc3075 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -6,8 +6,8 @@
 import '../common_elements.dart' show CommonElements;
 import '../common/names.dart' show Identifiers, Selectors;
 import '../elements/entities.dart';
+import '../inferrer/types.dart';
 import '../serialization/serialization.dart';
-import '../types/types.dart';
 
 /// [NoSuchMethodRegistry] and [NoSuchMethodData] categorizes `noSuchMethod`
 /// implementations.
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 45be0ee..937a205 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -1684,21 +1684,24 @@
 
     Set<ClassEntity> classesDirectlyNeedingRuntimeType = new Set<ClassEntity>();
 
-    ClassEntity impliedClass(DartType type) {
+    Iterable<ClassEntity> impliedClasses(DartType type) {
       if (type is InterfaceType) {
-        return type.element;
+        return [type.element];
       } else if (type is DynamicType) {
-        return commonElements.objectClass;
+        return [commonElements.objectClass];
       } else if (type is FunctionType) {
         // TODO(johnniwinther): Include only potential function type subtypes.
-        return commonElements.functionClass;
+        return [commonElements.functionClass];
       } else if (type is VoidType) {
         // No classes implied.
       } else if (type is FunctionTypeVariable) {
-        return impliedClass(type.bound);
+        return impliedClasses(type.bound);
+      } else if (type is FutureOrType) {
+        return [commonElements.futureClass]
+          ..addAll(impliedClasses(type.typeArgument));
       } else if (type is TypeVariableType) {
         // TODO(johnniwinther): Can we do better?
-        return impliedClass(
+        return impliedClasses(
             _elementEnvironment.getTypeVariableBound(type.element));
       }
       throw new UnsupportedError('Unexpected type $type');
@@ -1720,43 +1723,47 @@
       switch (runtimeTypeUse.kind) {
         case RuntimeTypeUseKind.string:
           if (!options.laxRuntimeTypeToString) {
-            addClass(impliedClass(runtimeTypeUse.receiverType));
+            impliedClasses(runtimeTypeUse.receiverType).forEach(addClass);
           }
 
           break;
         case RuntimeTypeUseKind.equals:
-          ClassEntity receiverClass = impliedClass(runtimeTypeUse.receiverType);
-          ClassEntity argumentClass = impliedClass(runtimeTypeUse.argumentType);
+          Iterable<ClassEntity> receiverClasses =
+              impliedClasses(runtimeTypeUse.receiverType);
+          Iterable<ClassEntity> argumentClasses =
+              impliedClasses(runtimeTypeUse.argumentType);
 
-          // TODO(johnniwinther): Special case use of `this.runtimeType`.
-          SubclassResult result = closedWorld.classHierarchy.commonSubclasses(
-              receiverClass,
-              ClassQuery.SUBTYPE,
-              argumentClass,
-              ClassQuery.SUBTYPE);
-          switch (result.kind) {
-            case SubclassResultKind.EMPTY:
-              break;
-            case SubclassResultKind.EXACT1:
-            case SubclassResultKind.SUBCLASS1:
-            case SubclassResultKind.SUBTYPE1:
-              addClass(receiverClass);
-              break;
-            case SubclassResultKind.EXACT2:
-            case SubclassResultKind.SUBCLASS2:
-            case SubclassResultKind.SUBTYPE2:
-              addClass(argumentClass);
-              break;
-            case SubclassResultKind.SET:
-              for (ClassEntity cls in result.classes) {
-                addClass(cls);
-                if (neededOnAll) break;
+          for (ClassEntity receiverClass in receiverClasses) {
+            for (ClassEntity argumentClass in argumentClasses) {
+              // TODO(johnniwinther): Special case use of `this.runtimeType`.
+              SubclassResult result = closedWorld.classHierarchy
+                  .commonSubclasses(receiverClass, ClassQuery.SUBTYPE,
+                      argumentClass, ClassQuery.SUBTYPE);
+              switch (result.kind) {
+                case SubclassResultKind.EMPTY:
+                  break;
+                case SubclassResultKind.EXACT1:
+                case SubclassResultKind.SUBCLASS1:
+                case SubclassResultKind.SUBTYPE1:
+                  addClass(receiverClass);
+                  break;
+                case SubclassResultKind.EXACT2:
+                case SubclassResultKind.SUBCLASS2:
+                case SubclassResultKind.SUBTYPE2:
+                  addClass(argumentClass);
+                  break;
+                case SubclassResultKind.SET:
+                  for (ClassEntity cls in result.classes) {
+                    addClass(cls);
+                    if (neededOnAll) break;
+                  }
+                  break;
               }
-              break;
+            }
           }
           break;
         case RuntimeTypeUseKind.unknown:
-          addClass(impliedClass(runtimeTypeUse.receiverType));
+          impliedClasses(runtimeTypeUse.receiverType).forEach(addClass);
           break;
       }
       if (neededOnAll) break;
diff --git a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
index e088e03..73a5d1c 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -4,7 +4,7 @@
 
 library dart2js.js_emitter.class_stub_generator;
 
-import '../common/names.dart' show Identifiers;
+import '../common/names.dart' show Identifiers, Selectors;
 import '../common_elements.dart' show CommonElements;
 import '../elements/entities.dart';
 import '../js/js.dart' as jsAst;
@@ -125,7 +125,8 @@
     for (Selector selector in selectors.keys) {
       if (generatedSelectors.contains(selector)) continue;
       if (!selector.appliesUnnamed(member)) continue;
-      if (selectors[selector].applies(member, selector, _closedWorld)) {
+      if (selectors[selector]
+          .canHit(member, selector.memberName, _closedWorld)) {
         generatedSelectors.add(selector);
 
         jsAst.Name invocationName = _namer.invocationName(selector);
@@ -165,6 +166,16 @@
     void addNoSuchMethodHandlers(
         String ignore, Map<Selector, SelectorConstraints> selectors) {
       for (Selector selector in selectors.keys) {
+        if (selector == Selectors.runtimeType_ ||
+            selector == Selectors.equals ||
+            selector == Selectors.toString_ ||
+            selector == Selectors.hashCode_ ||
+            selector == Selectors.noSuchMethod_) {
+          // Skip Object methods since these need no noSuchMethod handling
+          // regardless of the precision of the selector constraints.
+          continue;
+        }
+
         SelectorConstraints maskSet = selectors[selector];
         if (maskSet.needsNoSuchMethodHandling(selector, _closedWorld)) {
           jsAst.Name jsName = _namer.invocationMirrorInternalName(selector);
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
index 61df0af..be7634c 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
@@ -133,7 +133,8 @@
       bool needsFieldsForConstructor = !emitStatics && !classIsNative;
       if (needsFieldsForConstructor || needsAccessor) {
         List<jsAst.Literal> fieldNameParts = <jsAst.Literal>[];
-        if (field.nullInitializerInAllocator) {
+        if (field.initializerInAllocator != null) {
+          assert(field.initializerInAllocator.isNull);
           fieldNameParts.add(js.stringPart('0'));
         }
         if (!needsAccessor) {
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index ab6fbae..933f41c 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -390,17 +390,11 @@
 
   final bool needsCheckedSetter;
 
-  final bool nullInitializerInAllocator; // TODO(sra): Generalize.
+  final ConstantValue initializerInAllocator;
 
   // TODO(floitsch): support renamed fields.
-  Field(
-      this.element,
-      this.name,
-      this.accessorName,
-      this.getterFlags,
-      this.setterFlags,
-      this.needsCheckedSetter,
-      this.nullInitializerInAllocator);
+  Field(this.element, this.name, this.accessorName, this.getterFlags,
+      this.setterFlags, this.needsCheckedSetter, this.initializerInAllocator);
 
   bool get needsGetter => getterFlags != 0;
   bool get needsUncheckedSetter => setterFlags != 0;
diff --git a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
index 7076c68..ac44280 100644
--- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
@@ -378,7 +378,8 @@
     for (Selector selector in liveSelectors.keys) {
       if (renamedCallSelectors.contains(selector)) continue;
       if (!selector.appliesUnnamed(member)) continue;
-      if (!liveSelectors[selector].applies(member, selector, _closedWorld)) {
+      if (!liveSelectors[selector]
+          .canHit(member, selector.memberName, _closedWorld)) {
         continue;
       }
 
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart b/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
index c5f8d9a..e1b0d46 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/field_visitor.dart
@@ -146,7 +146,7 @@
     assert(field.isField);
     if (fieldAccessNeverThrows(field)) return false;
     return field.enclosingClass != null &&
-        _codegenWorldBuilder.hasInvokedGetter(field, _closedWorld);
+        _codegenWorldBuilder.hasInvokedGetter(field);
   }
 
   bool fieldNeedsSetter(FieldEntity field) {
@@ -154,7 +154,7 @@
     if (fieldAccessNeverThrows(field)) return false;
     if (!field.isAssignable) return false;
     return field.enclosingClass != null &&
-        _codegenWorldBuilder.hasInvokedSetter(field, _closedWorld);
+        _codegenWorldBuilder.hasInvokedSetter(field);
   }
 
   static bool fieldAccessNeverThrows(FieldEntity field) {
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 d4f6901..023faf2 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
@@ -884,7 +884,7 @@
         isClosureCallMethod = true;
       } else {
         // Careful with operators.
-        canTearOff = _worldBuilder.hasInvokedGetter(element, _closedWorld);
+        canTearOff = _worldBuilder.hasInvokedGetter(element);
         assert(canTearOff ||
             !_worldBuilder.methodsNeedingSuperGetter.contains(element));
         tearOffName = _namer.getterForElement(element);
@@ -1067,15 +1067,13 @@
         }
       }
 
-      // TODO(sra): Generalize for constants other than null.
-      bool nullInitializerInAllocator = false;
+      ConstantValue initializerInAllocator = null;
       if (_allocatorAnalysis.isInitializedInAllocator(field)) {
-        assert(_allocatorAnalysis.initializerValue(field).isNull);
-        nullInitializerInAllocator = true;
+        initializerInAllocator = _allocatorAnalysis.initializerValue(field);
       }
 
       fields.add(new Field(field, name, accessorName, getterFlags, setterFlags,
-          needsCheckedSetter, nullInitializerInAllocator));
+          needsCheckedSetter, initializerInAllocator));
     }
 
     FieldVisitor visitor = new FieldVisitor(_options, _elementEnvironment,
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
index 50f9afa..5ef3622 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
@@ -451,6 +451,7 @@
 
 // Ensure holders are in fast mode, now we have finished adding things.
 convertAllToFastObject(holders);
+convertToFastObject(#staticState);
 
 // Invokes main (making sure that it records the 'current-script' value).
 #invokeMain;
@@ -934,26 +935,31 @@
     const int maxChainLength = 30;
     js.Expression assignment = null;
     int chainLength = 0;
-    bool previousIsNull = false;
+    ConstantValue previousConstant = null;
     void flushAssignment() {
       if (assignment != null) {
         statements.add(js.js.statement('#;', assignment));
         assignment = null;
         chainLength = 0;
-        previousIsNull = false;
+        previousConstant = null;
       }
     }
 
     for (Field field in cls.fields) {
-      if (field.nullInitializerInAllocator) {
-        if (previousIsNull && chainLength < maxChainLength) {
+      ConstantValue constant = field.initializerInAllocator;
+      if (constant != null) {
+        if (constant == previousConstant && chainLength < maxChainLength) {
           assignment = js.js('#.# = #', [thisRef, field.name, assignment]);
         } else {
           flushAssignment();
-          assignment = js.js('#.# = null', [thisRef, field.name]);
+          assignment = js.js('#.# = #', [
+            thisRef,
+            field.name,
+            constantEmitter.generate(constant),
+          ]);
         }
         ++chainLength;
-        previousIsNull = true;
+        previousConstant = constant;
       } else {
         flushAssignment();
         js.Parameter parameter = new js.Parameter('t${parameters.length}');
@@ -1260,19 +1266,24 @@
     for (Library library in fragment.libraries) {
       for (Class cls in library.classes) {
         if (cls.isSoftDeferred != softDeferred) continue;
+        bool firstAlias = true;
         for (InstanceMethod method in cls.methods) {
           if (method.aliasName != null) {
-            assignments.add(js.js.statement('#.prototype.# = #.prototype.#', [
-              classReference(cls),
-              js.quoteName(method.aliasName),
-              classReference(cls),
-              js.quoteName(method.name)
-            ]));
+            if (firstAlias) {
+              firstAlias = false;
+              assignments.add(js.js.statement(
+                  assignments.isEmpty
+                      ? 'var _ = #.prototype;'
+                      : '_ = #.prototype',
+                  classReference(cls)));
+            }
+            assignments.add(js.js.statement('_.# = _.#',
+                [js.quoteName(method.aliasName), js.quoteName(method.name)]));
           }
         }
       }
     }
-    return new js.Block(assignments);
+    return wrapPhase('aliases', assignments);
   }
 
   /// Encodes the optional default values so that the runtime Function.apply
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index 5201c75..d091e73 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -57,6 +57,7 @@
 class ModelEmitter {
   final Compiler compiler;
   final Namer namer;
+  final CodeEmitterTask task;
   ConstantEmitter constantEmitter;
   final NativeEmitter nativeEmitter;
   final bool shouldGenerateSourceMap;
@@ -80,7 +81,7 @@
   static const String typeNameProperty = r"builtin$cls";
 
   ModelEmitter(this.compiler, this.namer, this.nativeEmitter, this._closedWorld,
-      Sorter sorter, CodeEmitterTask task, this.shouldGenerateSourceMap)
+      Sorter sorter, this.task, this.shouldGenerateSourceMap)
       : _constantOrdering = new ConstantOrdering(sorter) {
     this.constantEmitter = new ConstantEmitter(
         compiler.options,
@@ -271,8 +272,10 @@
     LocationCollector locationCollector;
     List<CodeOutputListener> codeOutputListeners;
     if (shouldGenerateSourceMap) {
-      locationCollector = new LocationCollector();
-      codeOutputListeners = <CodeOutputListener>[locationCollector];
+      task.measureSubtask('source-maps', () {
+        locationCollector = new LocationCollector();
+        codeOutputListeners = <CodeOutputListener>[locationCollector];
+      });
     }
 
     CodeOutput mainOutput = new StreamCodeOutput(
@@ -292,22 +295,26 @@
         monitor: compiler.dumpInfoTask));
 
     if (shouldGenerateSourceMap) {
-      mainOutput.add(SourceMapBuilder.generateSourceMapTag(
-          compiler.options.sourceMapUri, compiler.options.outputUri));
+      task.measureSubtask('source-maps', () {
+        mainOutput.add(SourceMapBuilder.generateSourceMapTag(
+            compiler.options.sourceMapUri, compiler.options.outputUri));
+      });
     }
 
     mainOutput.close();
 
     if (shouldGenerateSourceMap) {
-      SourceMapBuilder.outputSourceMap(
-          mainOutput,
-          locationCollector,
-          namer.createMinifiedGlobalNameMap(),
-          namer.createMinifiedInstanceNameMap(),
-          '',
-          compiler.options.sourceMapUri,
-          compiler.options.outputUri,
-          compiler.outputProvider);
+      task.measureSubtask('source-maps', () {
+        SourceMapBuilder.outputSourceMap(
+            mainOutput,
+            locationCollector,
+            namer.createMinifiedGlobalNameMap(),
+            namer.createMinifiedInstanceNameMap(),
+            '',
+            compiler.options.sourceMapUri,
+            compiler.options.outputUri,
+            compiler.outputProvider);
+      });
     }
   }
 
@@ -323,8 +330,10 @@
 
     LocationCollector locationCollector;
     if (shouldGenerateSourceMap) {
-      locationCollector = new LocationCollector();
-      outputListeners.add(locationCollector);
+      task.measureSubtask('source-maps', () {
+        locationCollector = new LocationCollector();
+        outputListeners.add(locationCollector);
+      });
     }
 
     String hunkPrefix = fragment.outputFileName;
@@ -365,31 +374,33 @@
         '${deferredInitializersGlobal}.current');
 
     if (shouldGenerateSourceMap) {
-      Uri mapUri, partUri;
-      Uri sourceMapUri = compiler.options.sourceMapUri;
-      Uri outputUri = compiler.options.outputUri;
-      String partName = "$hunkPrefix.$partExtension";
-      String hunkFileName = "$hunkPrefix.$deferredExtension";
+      task.measureSubtask('source-maps', () {
+        Uri mapUri, partUri;
+        Uri sourceMapUri = compiler.options.sourceMapUri;
+        Uri outputUri = compiler.options.outputUri;
+        String partName = "$hunkPrefix.$partExtension";
+        String hunkFileName = "$hunkPrefix.$deferredExtension";
 
-      if (sourceMapUri != null) {
-        String mapFileName = hunkFileName + ".map";
-        List<String> mapSegments = sourceMapUri.pathSegments.toList();
-        mapSegments[mapSegments.length - 1] = mapFileName;
-        mapUri =
-            compiler.options.sourceMapUri.replace(pathSegments: mapSegments);
-      }
+        if (sourceMapUri != null) {
+          String mapFileName = hunkFileName + ".map";
+          List<String> mapSegments = sourceMapUri.pathSegments.toList();
+          mapSegments[mapSegments.length - 1] = mapFileName;
+          mapUri =
+              compiler.options.sourceMapUri.replace(pathSegments: mapSegments);
+        }
 
-      if (outputUri != null) {
-        List<String> partSegments = outputUri.pathSegments.toList();
-        partSegments[partSegments.length - 1] = hunkFileName;
-        partUri =
-            compiler.options.outputUri.replace(pathSegments: partSegments);
-      }
+        if (outputUri != null) {
+          List<String> partSegments = outputUri.pathSegments.toList();
+          partSegments[partSegments.length - 1] = hunkFileName;
+          partUri =
+              compiler.options.outputUri.replace(pathSegments: partSegments);
+        }
 
-      output.add(SourceMapBuilder.generateSourceMapTag(mapUri, partUri));
-      output.close();
-      SourceMapBuilder.outputSourceMap(output, locationCollector, {}, {},
-          partName, mapUri, partUri, compiler.outputProvider);
+        output.add(SourceMapBuilder.generateSourceMapTag(mapUri, partUri));
+        output.close();
+        SourceMapBuilder.outputSourceMap(output, locationCollector, {}, {},
+            partName, mapUri, partUri, compiler.outputProvider);
+      });
     } else {
       output.close();
     }
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart
index 8adaed2..1afc338 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -1020,6 +1020,11 @@
 
   ClosureMemberData(this.definition, this.memberThisType);
 
+  Map<ir.Expression, ir.DartType> get staticTypes {
+    // The cached types are stored in the data for enclosing member.
+    throw new UnsupportedError("ClosureMemberData.staticTypes");
+  }
+
   @override
   InterfaceType getMemberThisType(JsToElementMap elementMap) {
     return memberThisType;
diff --git a/pkg/compiler/lib/src/js_model/element_map.dart b/pkg/compiler/lib/src/js_model/element_map.dart
index a342420..b9461da 100644
--- a/pkg/compiler/lib/src/js_model/element_map.dart
+++ b/pkg/compiler/lib/src/js_model/element_map.dart
@@ -11,7 +11,9 @@
 import '../elements/jumps.dart';
 import '../elements/names.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../ir/closure.dart';
+import '../ir/static_type_provider.dart';
 import '../ir/util.dart';
 import '../js/js.dart' as js;
 import '../js_backend/namer.dart';
@@ -21,7 +23,6 @@
 import '../native/behavior.dart';
 import '../serialization/serialization.dart';
 import '../ssa/type_builder.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/call_structure.dart';
 import '../universe/selector.dart';
 import '../world.dart';
@@ -165,6 +166,9 @@
   /// modified in another get their values updated correctly.
   Map<Local, JRecordField> makeRecordContainer(
       KernelScopeInfo info, MemberEntity member, KernelToLocalsMap localsMap);
+
+  /// Returns a provider for static types for [member].
+  StaticTypeProvider getStaticTypeProvider(MemberEntity member);
 }
 
 /// Interface for type inference results for kernel IR nodes.
diff --git a/pkg/compiler/lib/src/js_model/element_map_impl.dart b/pkg/compiler/lib/src/js_model/element_map_impl.dart
index 07c24f3..68618f8 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -27,11 +27,13 @@
 import '../elements/names.dart';
 import '../elements/types.dart';
 import '../environment.dart';
+import '../ir/cached_static_type.dart';
 import '../ir/closure.dart';
 import '../ir/debug.dart';
 import '../ir/element_map.dart';
 import '../ir/types.dart';
 import '../ir/visitors.dart';
+import '../ir/static_type_provider.dart';
 import '../ir/util.dart';
 import '../js/js.dart' as js;
 import '../js_backend/constant_system_javascript.dart';
@@ -1061,6 +1063,47 @@
     return _typeEnvironment;
   }
 
+  StaticTypeProvider getStaticTypeProvider(MemberEntity member) {
+    MemberDefinition memberDefinition = members.getData(member).definition;
+    Map<ir.Expression, ir.DartType> cachedStaticTypes;
+    ir.InterfaceType thisType;
+    switch (memberDefinition.kind) {
+      case MemberKind.regular:
+      case MemberKind.constructor:
+      case MemberKind.constructorBody:
+        ir.Member node = memberDefinition.node;
+        thisType = node.enclosingClass?.thisType;
+        cachedStaticTypes = members.getData(member).staticTypes;
+        break;
+      case MemberKind.closureCall:
+        ir.TreeNode node = memberDefinition.node;
+        while (node != null) {
+          if (node is ir.Member) {
+            ir.Member member = node;
+            thisType = member.enclosingClass?.thisType;
+            cachedStaticTypes = members.getData(getMember(member)).staticTypes;
+            break;
+          }
+          node = node.parent;
+        }
+        break;
+      case MemberKind.closureField:
+      case MemberKind.signature:
+      case MemberKind.generatorBody:
+        cachedStaticTypes = const {};
+        break;
+    }
+
+    assert(cachedStaticTypes != null, "No static types cached for $member.");
+    return new CachedStaticType(
+        // We need a copy of the type environment since the `thisType` field
+        // is holds state, making the environment contextually bound.
+        new ir.TypeEnvironment(
+            typeEnvironment.coreTypes, typeEnvironment.hierarchy)
+          ..thisType = thisType,
+        cachedStaticTypes);
+  }
+
   DartType getStaticType(ir.Expression node) {
     ir.TreeNode enclosingClass = node;
     while (enclosingClass != null && enclosingClass is! ir.Class) {
@@ -1110,6 +1153,9 @@
     if (node is ir.PropertyGet) {
       return getGetterSelector(node.name);
     }
+    if (node is ir.DirectPropertyGet) {
+      return getGetterSelector(node.target.name);
+    }
     if (node is ir.SuperPropertyGet) {
       return getGetterSelector(node.name);
     }
@@ -1665,8 +1711,11 @@
       JConstructorBody constructorBody = createConstructorBody(constructor);
       members.register<IndexedFunction, FunctionData>(
           constructorBody,
-          new ConstructorBodyDataImpl(node, node.function,
-              new SpecialMemberDefinition(node, MemberKind.constructorBody)));
+          new ConstructorBodyDataImpl(
+              node,
+              node.function,
+              new SpecialMemberDefinition(node, MemberKind.constructorBody),
+              data.staticTypes));
       IndexedClass cls = constructor.enclosingClass;
       JClassEnvImpl classEnv = classes.getEnv(cls);
       // TODO(johnniwinther): Avoid this by only including live members in the
diff --git a/pkg/compiler/lib/src/js_model/env.dart b/pkg/compiler/lib/src/js_model/env.dart
index a941fbb..a22112b 100644
--- a/pkg/compiler/lib/src/js_model/env.dart
+++ b/pkg/compiler/lib/src/js_model/env.dart
@@ -509,6 +509,8 @@
 
   ClassTypeVariableAccess get classTypeVariableAccess;
 
+  Map<ir.Expression, ir.DartType> get staticTypes;
+
   JMemberData();
 
   /// Deserializes a [JMemberData] object from [source].
@@ -544,7 +546,9 @@
 
   final MemberDefinition definition;
 
-  JMemberDataImpl(this.node, this.definition);
+  final Map<ir.Expression, ir.DartType> staticTypes;
+
+  JMemberDataImpl(this.node, this.definition, this.staticTypes);
 
   InterfaceType getMemberThisType(JsToElementMap elementMap) {
     MemberEntity member = elementMap.getMember(node);
@@ -603,9 +607,9 @@
   final ir.FunctionNode functionNode;
   FunctionType _type;
 
-  FunctionDataImpl(
-      ir.Member node, this.functionNode, MemberDefinition definition)
-      : super(node, definition);
+  FunctionDataImpl(ir.Member node, this.functionNode,
+      MemberDefinition definition, Map<ir.Expression, ir.DartType> staticTypes)
+      : super(node, definition, staticTypes);
 
   factory FunctionDataImpl.readFromDataSource(DataSource source) {
     source.begin(tag);
@@ -621,8 +625,10 @@
     }
     MemberDefinition definition =
         new MemberDefinition.readFromDataSource(source);
+    Map<ir.Expression, ir.DartType> staticTypes =
+        source.readTreeNodeMap(() => source.readDartTypeNode());
     source.end(tag);
-    return new FunctionDataImpl(node, functionNode, definition);
+    return new FunctionDataImpl(node, functionNode, definition, staticTypes);
   }
 
   void writeToDataSink(DataSink sink) {
@@ -630,6 +636,7 @@
     sink.begin(tag);
     sink.writeMemberNode(node);
     definition.writeToDataSink(sink);
+    sink.writeTreeNodeMap(staticTypes, sink.writeDartTypeNode);
     sink.end(tag);
   }
 
@@ -705,6 +712,9 @@
     sink.end(tag);
   }
 
+  @override
+  Map<ir.Expression, ir.DartType> get staticTypes => const {};
+
   FunctionType getFunctionType(covariant JsKernelToElementMap elementMap) {
     throw new UnsupportedError("SignatureFunctionData.getFunctionType");
   }
@@ -779,6 +789,9 @@
     definition.writeToDataSink(sink);
     sink.end(tag);
   }
+
+  @override
+  Map<ir.Expression, ir.DartType> get staticTypes => const {};
 }
 
 abstract class JConstructorData extends FunctionData {
@@ -795,9 +808,9 @@
   ConstantConstructor _constantConstructor;
   JConstructorBody constructorBody;
 
-  JConstructorDataImpl(
-      ir.Member node, ir.FunctionNode functionNode, MemberDefinition definition)
-      : super(node, functionNode, definition);
+  JConstructorDataImpl(ir.Member node, ir.FunctionNode functionNode,
+      MemberDefinition definition, Map<ir.Expression, ir.DartType> staticTypes)
+      : super(node, functionNode, definition, staticTypes);
 
   factory JConstructorDataImpl.readFromDataSource(DataSource source) {
     source.begin(tag);
@@ -813,8 +826,11 @@
     }
     MemberDefinition definition =
         new MemberDefinition.readFromDataSource(source);
+    Map<ir.Expression, ir.DartType> staticTypes =
+        source.readTreeNodeMap(() => source.readDartTypeNode());
     source.end(tag);
-    return new JConstructorDataImpl(node, functionNode, definition);
+    return new JConstructorDataImpl(
+        node, functionNode, definition, staticTypes);
   }
 
   void writeToDataSink(DataSink sink) {
@@ -823,6 +839,7 @@
     sink.writeMemberNode(node);
     definition.writeToDataSink(sink);
     assert(constructorBody == null);
+    sink.writeTreeNodeMap(staticTypes, sink.writeDartTypeNode);
     sink.end(tag);
   }
 
@@ -852,9 +869,9 @@
   /// a debugging data stream.
   static const String tag = 'constructor-body-data';
 
-  ConstructorBodyDataImpl(
-      ir.Member node, ir.FunctionNode functionNode, MemberDefinition definition)
-      : super(node, functionNode, definition);
+  ConstructorBodyDataImpl(ir.Member node, ir.FunctionNode functionNode,
+      MemberDefinition definition, Map<ir.Expression, ir.DartType> staticTypes)
+      : super(node, functionNode, definition, staticTypes);
 
   factory ConstructorBodyDataImpl.readFromDataSource(DataSource source) {
     source.begin(tag);
@@ -870,8 +887,11 @@
     }
     MemberDefinition definition =
         new MemberDefinition.readFromDataSource(source);
+    Map<ir.Expression, ir.DartType> staticTypes =
+        source.readTreeNodeMap(() => source.readDartTypeNode());
     source.end(tag);
-    return new ConstructorBodyDataImpl(node, functionNode, definition);
+    return new ConstructorBodyDataImpl(
+        node, functionNode, definition, staticTypes);
   }
 
   void writeToDataSink(DataSink sink) {
@@ -879,6 +899,7 @@
     sink.begin(tag);
     sink.writeMemberNode(node);
     definition.writeToDataSink(sink);
+    sink.writeTreeNodeMap(staticTypes, sink.writeDartTypeNode);
     sink.end(tag);
   }
 
@@ -914,16 +935,19 @@
   ConstantValue _constantValue;
   ConstantExpression _constantExpression;
 
-  JFieldDataImpl(ir.Field node, MemberDefinition definition)
-      : super(node, definition);
+  JFieldDataImpl(ir.Field node, MemberDefinition definition,
+      Map<ir.Expression, ir.DartType> staticTypes)
+      : super(node, definition, staticTypes);
 
   factory JFieldDataImpl.readFromDataSource(DataSource source) {
     source.begin(tag);
     ir.Member node = source.readMemberNode();
     MemberDefinition definition =
         new MemberDefinition.readFromDataSource(source);
+    Map<ir.Expression, ir.DartType> staticTypes =
+        source.readTreeNodeMap(() => source.readDartTypeNode());
     source.end(tag);
-    return new JFieldDataImpl(node, definition);
+    return new JFieldDataImpl(node, definition, staticTypes);
   }
 
   void writeToDataSink(DataSink sink) {
@@ -931,6 +955,7 @@
     sink.begin(tag);
     sink.writeMemberNode(node);
     definition.writeToDataSink(sink);
+    sink.writeTreeNodeMap(staticTypes, sink.writeDartTypeNode);
     sink.end(tag);
   }
 
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 6bc3f84..22b6f9d8 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -17,7 +17,9 @@
 import '../io/kernel_source_information.dart'
     show KernelSourceInformationStrategy;
 import '../io/source_information.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../inferrer/type_graph_inferrer.dart';
+import '../inferrer/types.dart';
 import '../js/js_source_mapping.dart';
 import '../js_backend/backend.dart';
 import '../js_backend/inferred_data.dart';
@@ -29,8 +31,6 @@
 import '../ssa/nodes.dart';
 import '../ssa/ssa.dart';
 import '../ssa/types.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/codegen_world_builder.dart';
 import '../universe/selector.dart';
 import '../universe/world_builder.dart';
@@ -259,7 +259,7 @@
   bool isJsIndexableIterator(
       ir.ForInStatement node, AbstractValueDomain abstractValueDomain) {
     AbstractValue mask = typeOfIterator(node);
-    return abstractValueDomain.isJsIndexableAndIterable(mask);
+    return abstractValueDomain.isJsIndexableAndIterable(mask).isDefinitelyTrue;
   }
 
   AbstractValue inferredIndexType(ir.ForInStatement node) {
diff --git a/pkg/compiler/lib/src/js_model/js_world.dart b/pkg/compiler/lib/src/js_model/js_world.dart
index 59b621d..39e86a0 100644
--- a/pkg/compiler/lib/src/js_model/js_world.dart
+++ b/pkg/compiler/lib/src/js_model/js_world.dart
@@ -14,8 +14,10 @@
 import '../diagnostics/diagnostic_listener.dart';
 import '../elements/entities.dart';
 import '../elements/entity_utils.dart' as utils;
+import '../elements/names.dart';
 import '../elements/types.dart';
 import '../environment.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../js_emitter/sorter.dart';
 import '../js_backend/annotations.dart';
 import '../js_backend/allocator_analysis.dart';
@@ -29,7 +31,6 @@
 import '../ordered_typeset.dart';
 import '../options.dart';
 import '../serialization/serialization.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/class_hierarchy.dart';
 import '../universe/class_set.dart';
 import '../universe/function_set.dart' show FunctionSet;
@@ -429,8 +430,9 @@
     return selector.name == Identifiers.call &&
         (receiver == null ||
             // TODO(johnniwinther): Should this have been `intersects` instead?
-            abstractValueDomain.contains(
-                receiver, abstractValueDomain.functionType));
+            abstractValueDomain
+                .contains(receiver, abstractValueDomain.functionType)
+                .isPotentiallyTrue);
   }
 
   AbstractValue computeReceiverType(Selector selector, AbstractValue receiver) {
@@ -454,11 +456,6 @@
         .any((each) => each.isGetter);
   }
 
-  FieldEntity locateSingleField(Selector selector, AbstractValue receiver) {
-    MemberEntity result = locateSingleMember(selector, receiver);
-    return (result != null && result.isField) ? result : null;
-  }
-
   MemberEntity locateSingleMember(Selector selector, AbstractValue receiver) {
     if (includesClosureCall(selector, receiver)) {
       return null;
@@ -497,15 +494,13 @@
   }
 
   @override
-  bool hasElementIn(ClassEntity cls, Selector selector, Entity element) {
+  bool hasElementIn(ClassEntity cls, Name name, Entity element) {
     while (cls != null) {
-      MemberEntity member = elementEnvironment.lookupLocalClassMember(
-          cls, selector.name,
-          setter: selector.isSetter);
+      MemberEntity member = elementEnvironment
+          .lookupLocalClassMember(cls, name.text, setter: name.isSetter);
       if (member != null &&
           !member.isAbstract &&
-          (!selector.memberName.isPrivate ||
-              member.library == selector.library)) {
+          (!name.isPrivate || member.library == name.library)) {
         return member == element;
       }
       cls = elementEnvironment.getSuperClass(cls);
@@ -528,7 +523,7 @@
       return _hasConcreteMatch(
           elementEnvironment.getSuperClass(enclosingClass), selector);
     }
-    return selector.appliesUntyped(element);
+    return selector.appliesUnnamed(element);
   }
 
   bool _isNamedMixinApplication(ClassEntity cls) {
diff --git a/pkg/compiler/lib/src/js_model/js_world_builder.dart b/pkg/compiler/lib/src/js_model/js_world_builder.dart
index 5bb5018..552d014 100644
--- a/pkg/compiler/lib/src/js_model/js_world_builder.dart
+++ b/pkg/compiler/lib/src/js_model/js_world_builder.dart
@@ -11,6 +11,7 @@
 import '../elements/entities.dart';
 import '../elements/names.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../ir/closure.dart';
 import '../js_backend/annotations.dart';
 import '../js_backend/allocator_analysis.dart';
@@ -22,7 +23,6 @@
 import '../kernel/kelements.dart';
 import '../native/behavior.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/class_hierarchy.dart';
 import '../universe/class_set.dart';
 import '../universe/feature.dart';
@@ -198,12 +198,12 @@
         map.toBackendFunctionSet(
             closedWorld.annotationsData.tryInlineFunctions),
         map.toBackendFunctionSet(
+            closedWorld.annotationsData.disableFinalFunctions),
+        map.toBackendFunctionSet(
             closedWorld.annotationsData.cannotThrowFunctions),
         map.toBackendFunctionSet(
             closedWorld.annotationsData.sideEffectFreeFunctions),
         map.toBackendMemberSet(
-            closedWorld.annotationsData.trustTypeAnnotationsMembers),
-        map.toBackendMemberSet(
             closedWorld.annotationsData.assumeDynamicMembers));
 
     OutputUnitData outputUnitData =
diff --git a/pkg/compiler/lib/src/kernel/deferred_load.dart b/pkg/compiler/lib/src/kernel/deferred_load.dart
index 0abcdb3..ecdbd9f 100644
--- a/pkg/compiler/lib/src/kernel/deferred_load.dart
+++ b/pkg/compiler/lib/src/kernel/deferred_load.dart
@@ -11,6 +11,7 @@
 import '../constants/values.dart';
 import '../deferred_load.dart';
 import '../elements/entities.dart';
+import '../ir/util.dart';
 import 'element_map.dart';
 
 class KernelDeferredLoadTask extends DeferredLoadTask {
@@ -25,6 +26,7 @@
     return measureSubtask('find-imports', () {
       List<ImportEntity> imports = [];
       ir.Library source = _elementMap.getLibraryNode(library);
+      if (!source.dependencies.any((d) => d.isDeferred)) return const [];
       for (ir.LibraryDependency dependency in source.dependencies) {
         if (dependency.isExport) continue;
         if (!_isVisible(dependency.combinators, nodeName)) continue;
@@ -55,7 +57,11 @@
   Iterable<ImportEntity> memberImportsTo(
       Entity element, LibraryEntity library) {
     ir.Member node = _elementMap.getMemberNode(element);
-    return _findImportsTo(node, node.name.name, node.enclosingLibrary, library);
+    return _findImportsTo(
+        node is ir.Constructor ? node.enclosingClass : node,
+        node is ir.Constructor ? node.enclosingClass.name : node.name.name,
+        node.enclosingLibrary,
+        library);
   }
 
   @override
@@ -138,7 +144,8 @@
     ConstantValue constant =
         elementMap.getConstantValue(node, requireConstant: required);
     if (constant != null) {
-      dependencies.constants.add(constant);
+      dependencies.addConstant(
+          constant, elementMap.getImport(getDeferredImport(node)));
     }
   }
 
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index ec2f758..6c0a91c 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -30,11 +30,13 @@
 import '../frontend_strategy.dart';
 import '../ir/debug.dart';
 import '../ir/element_map.dart';
+import '../ir/static_type.dart';
 import '../ir/scope.dart';
 import '../ir/types.dart';
 import '../ir/visitors.dart';
 import '../ir/util.dart';
 import '../js/js.dart' as js;
+import '../js_backend/annotations.dart';
 import '../js_backend/backend.dart' show JavaScriptBackend;
 import '../js_backend/constant_system_javascript.dart';
 import '../js_backend/namer.dart';
@@ -108,7 +110,7 @@
   BehaviorBuilder _nativeBehaviorBuilder;
   FrontendStrategy _frontendStrategy;
 
-  Map<KMember, Map<ir.TreeNode, ir.DartType>> staticTypeCacheForTesting;
+  Map<KMember, Map<ir.Expression, TypeMap>> typeMapsForTesting;
 
   KernelToElementMapImpl(this.reporter, Environment environment,
       this._frontendStrategy, this.options) {
@@ -707,6 +709,7 @@
   }
 
   ImportEntity getImport(ir.LibraryDependency node) {
+    if (node == null) return null;
     ir.Library library = node.parent;
     KLibraryData data = libraries.getData(getLibraryInternal(library));
     return data.imports[node];
@@ -1337,15 +1340,19 @@
           commonElements, nativeBasicData, reporter, options);
 
   ResolutionImpact computeWorldImpact(
-      KMember member, VariableScopeModel variableScopeModel) {
-    ir.Member node = members.getData(member).node;
+      KMember member,
+      VariableScopeModel variableScopeModel,
+      Set<PragmaAnnotation> annotations) {
+    KMemberData memberData = members.getData(member);
+    ir.Member node = memberData.node;
     KernelImpactBuilder builder = new KernelImpactBuilder(
-        this, member, reporter, options, variableScopeModel);
-    node.accept(builder);
+        this, member, reporter, options, variableScopeModel, annotations);
     if (retainDataForTesting) {
-      staticTypeCacheForTesting ??= {};
-      staticTypeCacheForTesting[member] = builder.staticTypeCacheForTesting;
+      typeMapsForTesting ??= {};
+      typeMapsForTesting[member] = builder.typeMapsForTesting = {};
     }
+    node.accept(builder);
+    memberData.staticTypes = builder.cachedStaticTypes;
     return builder.impactBuilder;
   }
 
@@ -1354,6 +1361,17 @@
     return ScopeModel.computeScopeModel(node);
   }
 
+  Map<ir.Expression, ir.DartType> getCachedStaticTypes(KMember member) {
+    Map<ir.Expression, ir.DartType> staticTypes =
+        members.getData(member).staticTypes;
+    assert(staticTypes != null, "No static types cached for $member.");
+    return staticTypes;
+  }
+
+  Map<ir.Expression, TypeMap> getTypeMapsForTesting(KMember member) {
+    return typeMapsForTesting[member];
+  }
+
   /// Returns the kernel [ir.Procedure] node for the [method].
   ir.Procedure _lookupProcedure(KFunction method) {
     return members.getData(method).node;
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart
index 95845cb..f313e3a 100644
--- a/pkg/compiler/lib/src/kernel/env.dart
+++ b/pkg/compiler/lib/src/kernel/env.dart
@@ -652,6 +652,8 @@
 abstract class KMemberData {
   ir.Member get node;
 
+  Map<ir.Expression, ir.DartType> staticTypes;
+
   Iterable<ConstantValue> getMetadata(IrToElementMap elementMap);
 
   InterfaceType getMemberThisType(JsToElementMap elementMap);
@@ -667,6 +669,8 @@
 
   Iterable<ConstantValue> _metadata;
 
+  Map<ir.Expression, ir.DartType> staticTypes;
+
   KMemberDataImpl(this.node);
 
   Iterable<ConstantValue> getMetadata(
@@ -761,7 +765,7 @@
   @override
   FunctionData convert() {
     return new FunctionDataImpl(
-        node, functionNode, new RegularMemberDefinition(node));
+        node, functionNode, new RegularMemberDefinition(node), staticTypes);
   }
 
   @override
@@ -808,7 +812,8 @@
     } else {
       definition = new RegularMemberDefinition(node);
     }
-    return new JConstructorDataImpl(node, functionNode, definition);
+    return new JConstructorDataImpl(
+        node, functionNode, definition, staticTypes);
   }
 
   @override
@@ -896,7 +901,8 @@
 
   @override
   JFieldData convert() {
-    return new JFieldDataImpl(node, new RegularMemberDefinition(node));
+    return new JFieldDataImpl(
+        node, new RegularMemberDefinition(node), staticTypes);
   }
 }
 
diff --git a/pkg/compiler/lib/src/kernel/kernel_impact.dart b/pkg/compiler/lib/src/kernel/kernel_impact.dart
index f6bcf24..a93e7e7 100644
--- a/pkg/compiler/lib/src/kernel/kernel_impact.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_impact.dart
@@ -17,6 +17,7 @@
 import '../ir/scope.dart';
 import '../ir/static_type.dart';
 import '../ir/util.dart';
+import '../js_backend/annotations.dart';
 import '../js_backend/native_data.dart';
 import '../options.dart';
 import '../resolution/registry.dart' show ResolutionWorldImpactBuilder;
@@ -35,9 +36,10 @@
   final CompilerOptions _options;
   final MemberEntity currentMember;
   final VariableScopeModel variableScopeModel;
+  final Set<PragmaAnnotation> _annotations;
 
   KernelImpactBuilder(this.elementMap, this.currentMember, this.reporter,
-      this._options, this.variableScopeModel)
+      this._options, this.variableScopeModel, this._annotations)
       : this.impactBuilder =
             new ResolutionWorldImpactBuilder('${currentMember}'),
         super(elementMap.typeEnvironment);
@@ -46,6 +48,11 @@
 
   NativeBasicData get _nativeBasicData => elementMap.nativeBasicData;
 
+  bool get useAsserts => _options.enableUserAssertions;
+
+  bool get inferEffectivelyFinalVariableTypes =>
+      !_annotations.contains(PragmaAnnotation.disableFinal);
+
   /// Add a checked-mode type use of [type] if it is not `dynamic`.
   DartType checkType(ir.DartType irType, TypeUseKind kind) {
     DartType type = elementMap.getDartType(irType);
@@ -137,9 +144,7 @@
 
       case ir.AsyncMarker.Async:
         impactBuilder.registerFeature(Feature.ASYNC);
-        var completerFactory = _options.startAsyncSynchronously
-            ? commonElements.asyncAwaitCompleterFactory
-            : commonElements.syncCompleterFactory;
+        var completerFactory = commonElements.asyncAwaitCompleterFactory;
         impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
             completerFactory,
             const CallStructure.unnamed(0, 1),
@@ -250,10 +255,12 @@
     InterfaceType type = elementMap.createInterfaceType(
         target.enclosingClass, node.arguments.types);
     CallStructure callStructure = elementMap.getCallStructure(node.arguments);
+    ImportEntity deferredImport = elementMap.getImport(getDeferredImport(node));
     impactBuilder.registerStaticUse(isConst
-        ? new StaticUse.constConstructorInvoke(constructor, callStructure, type)
+        ? new StaticUse.constConstructorInvoke(
+            constructor, callStructure, type, deferredImport)
         : new StaticUse.typedConstructorInvoke(
-            constructor, callStructure, type));
+            constructor, callStructure, type, deferredImport));
     if (type.typeArguments.any((DartType type) => !type.isDynamic)) {
       impactBuilder.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);
     }
@@ -319,8 +326,13 @@
         _handleExtractTypeArguments(node, target, typeArguments);
         return;
       }
+      ImportEntity deferredImport =
+          elementMap.getImport(getDeferredImport(node));
       impactBuilder.registerStaticUse(new StaticUse.staticInvoke(
-          target, elementMap.getCallStructure(node.arguments), typeArguments));
+          target,
+          elementMap.getCallStructure(node.arguments),
+          typeArguments,
+          deferredImport));
     }
     switch (elementMap.getForeignKind(node)) {
       case ForeignKind.JS:
@@ -380,17 +392,20 @@
     ir.Member target = node.target;
     if (target is ir.Procedure && target.kind == ir.ProcedureKind.Method) {
       FunctionEntity method = elementMap.getMethod(target);
-      impactBuilder.registerStaticUse(new StaticUse.staticTearOff(method));
+      impactBuilder.registerStaticUse(new StaticUse.staticTearOff(
+          method, elementMap.getImport(getDeferredImport(node))));
     } else {
       MemberEntity member = elementMap.getMember(target);
-      impactBuilder.registerStaticUse(new StaticUse.staticGet(member));
+      impactBuilder.registerStaticUse(new StaticUse.staticGet(
+          member, elementMap.getImport(getDeferredImport(node))));
     }
   }
 
   @override
   void handleStaticSet(ir.StaticSet node, ir.DartType valueType) {
     MemberEntity member = elementMap.getMember(node.target);
-    impactBuilder.registerStaticUse(new StaticUse.staticSet(member));
+    impactBuilder.registerStaticUse(new StaticUse.staticSet(
+        member, elementMap.getImport(getDeferredImport(node))));
   }
 
   void handleSuperInvocation(ir.Name name, ir.Node arguments) {
@@ -527,24 +542,24 @@
           ? ClassRelation.thisExpression
           : ClassRelation.subtype;
       DartType receiverDartType = elementMap.getDartType(receiverType);
-
+      Object constraint;
+      if (receiverDartType is InterfaceType) {
+        constraint = new StrongModeConstraint(commonElements, _nativeBasicData,
+            receiverDartType.element, relation);
+      }
       ir.Member interfaceTarget = node.interfaceTarget;
       if (interfaceTarget == null) {
         // TODO(johnniwinther): Avoid treating a known function call as a
         // dynamic call when CFE provides a way to distinguish the two.
         impactBuilder.registerDynamicUse(
-            new ConstrainedDynamicUse(selector, null, typeArguments));
-        if (operatorFromString(node.name.name) == null) {
+            new ConstrainedDynamicUse(selector, constraint, typeArguments));
+        if (operatorFromString(node.name.name) == null &&
+            receiverDartType.isDynamic) {
+          // We might implicitly call a getter that returns a function.
           impactBuilder.registerDynamicUse(new ConstrainedDynamicUse(
               selector.toCallSelector(), null, typeArguments));
         }
       } else {
-        Object constraint;
-        if (receiverDartType is InterfaceType) {
-          constraint = new StrongModeConstraint(commonElements,
-              _nativeBasicData, receiverDartType.element, relation);
-        }
-
         if (interfaceTarget is ir.Field ||
             interfaceTarget is ir.Procedure &&
                 interfaceTarget.kind == ir.ProcedureKind.Getter) {
@@ -680,7 +695,11 @@
   }
 
   @override
-  void handleAsExpression(ir.AsExpression node) {
+  void handleAsExpression(ir.AsExpression node, ir.DartType operandType) {
+    if (elementMap.typeEnvironment.isSubtypeOf(operandType, node.type)) {
+      // Skip unneeded casts.
+      return;
+    }
     DartType type = elementMap.getDartType(node.type);
     if (node.isTypeError) {
       impactBuilder.registerTypeUse(new TypeUse.implicitCast(type));
@@ -723,8 +742,9 @@
 
   @override
   void handleTypeLiteral(ir.TypeLiteral node) {
-    impactBuilder.registerTypeUse(
-        new TypeUse.typeLiteral(elementMap.getDartType(node.type)));
+    ImportEntity deferredImport = elementMap.getImport(getDeferredImport(node));
+    impactBuilder.registerTypeUse(new TypeUse.typeLiteral(
+        elementMap.getDartType(node.type), deferredImport));
     if (node.type is ir.FunctionType) {
       ir.FunctionType functionType = node.type;
       assert(functionType.typedef != null);
diff --git a/pkg/compiler/lib/src/kernel/kernel_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
index 31c810f..32d2c7a 100644
--- a/pkg/compiler/lib/src/kernel/kernel_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
@@ -19,6 +19,7 @@
 import '../frontend_strategy.dart';
 import '../ir/closure.dart' show ClosureScopeModel;
 import '../ir/scope.dart' show ScopeModel;
+import '../js_backend/annotations.dart';
 import '../js_backend/allocator_analysis.dart' show KAllocatorAnalysis;
 import '../js_backend/backend_usage.dart';
 import '../js_backend/interceptor_data.dart';
@@ -114,6 +115,7 @@
       KAllocatorAnalysis allocatorAnalysis,
       NativeResolutionEnqueuer nativeResolutionEnqueuer,
       NoSuchMethodRegistry noSuchMethodRegistry,
+      AnnotationsDataBuilder annotationsDataBuilder,
       SelectorConstraintsStrategy selectorConstraintsStrategy,
       ClassHierarchyBuilder classHierarchyBuilder,
       ClassQueries classQueries) {
@@ -131,6 +133,7 @@
         allocatorAnalysis,
         nativeResolutionEnqueuer,
         noSuchMethodRegistry,
+        annotationsDataBuilder,
         selectorConstraintsStrategy,
         classHierarchyBuilder,
         classQueries);
@@ -140,10 +143,18 @@
   WorkItemBuilder createResolutionWorkItemBuilder(
       NativeBasicData nativeBasicData,
       NativeDataBuilder nativeDataBuilder,
+      AnnotationsDataBuilder annotationsDataBuilder,
       ImpactTransformer impactTransformer,
       Map<Entity, WorldImpact> impactCache) {
-    return new KernelWorkItemBuilder(_compilerTask, elementMap, nativeBasicData,
-        nativeDataBuilder, impactTransformer, closureModels, impactCache);
+    return new KernelWorkItemBuilder(
+        _compilerTask,
+        elementMap,
+        nativeBasicData,
+        nativeDataBuilder,
+        annotationsDataBuilder,
+        impactTransformer,
+        closureModels,
+        impactCache);
   }
 
   ClassQueries createClassQueries() {
@@ -161,6 +172,7 @@
   final KernelToElementMapImpl _elementMap;
   final ImpactTransformer _impactTransformer;
   final NativeMemberResolver _nativeMemberResolver;
+  final AnnotationsDataBuilder _annotationsDataBuilder;
   final Map<MemberEntity, ClosureScopeModel> closureModels;
   final Map<Entity, WorldImpact> impactCache;
 
@@ -169,6 +181,7 @@
       this._elementMap,
       NativeBasicData nativeBasicData,
       NativeDataBuilder nativeDataBuilder,
+      this._annotationsDataBuilder,
       this._impactTransformer,
       this.closureModels,
       this.impactCache)
@@ -177,8 +190,15 @@
 
   @override
   WorkItem createWorkItem(MemberEntity entity) {
-    return new KernelWorkItem(_compilerTask, _elementMap, _impactTransformer,
-        _nativeMemberResolver, entity, closureModels, impactCache);
+    return new KernelWorkItem(
+        _compilerTask,
+        _elementMap,
+        _impactTransformer,
+        _nativeMemberResolver,
+        _annotationsDataBuilder,
+        entity,
+        closureModels,
+        impactCache);
   }
 }
 
@@ -187,6 +207,7 @@
   final KernelToElementMapImpl _elementMap;
   final ImpactTransformer _impactTransformer;
   final NativeMemberResolver _nativeMemberResolver;
+  final AnnotationsDataBuilder _annotationsDataBuilder;
   final MemberEntity element;
   final Map<MemberEntity, ClosureScopeModel> closureModels;
   final Map<Entity, WorldImpact> impactCache;
@@ -196,6 +217,7 @@
       this._elementMap,
       this._impactTransformer,
       this._nativeMemberResolver,
+      this._annotationsDataBuilder,
       this.element,
       this.closureModels,
       this.impactCache);
@@ -204,6 +226,12 @@
   WorldImpact run() {
     return _compilerTask.measure(() {
       _nativeMemberResolver.resolveNativeMember(element);
+      Set<PragmaAnnotation> annotations = processMemberAnnotations(
+          _elementMap.reporter,
+          _elementMap.commonElements,
+          _elementMap.elementEnvironment,
+          _annotationsDataBuilder,
+          element);
       ScopeModel scopeModel = _compilerTask.measureSubtask('closures', () {
         ScopeModel scopeModel = _elementMap.computeScopeModel(element);
         if (scopeModel?.closureScopeModel != null) {
@@ -213,7 +241,7 @@
       });
       return _compilerTask.measureSubtask('worldImpact', () {
         ResolutionImpact impact = _elementMap.computeWorldImpact(
-            element, scopeModel?.variableScopeModel);
+            element, scopeModel?.variableScopeModel, annotations);
         WorldImpact worldImpact =
             _impactTransformer.transformResolutionImpact(impact);
         if (impactCache != null) {
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index ed6fcc8..41c32cc 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -95,6 +95,25 @@
   /// libraries are subdivided.
   Uri deferredMapUri;
 
+  /// Whether to apply the new deferred split fixes. The fixes improve on
+  /// performance and fix a soundness issue with inferred types. The latter will
+  /// move more code to the main output unit, because of that we are not
+  /// enabling the feature by default right away.
+  ///
+  /// When [reportInvalidInferredDeferredTypes] shows no errors, we expect this
+  /// flag to produce the same or better results than the current unsound
+  /// implementation.
+  bool newDeferredSplit = false;
+
+  /// Show errors when a deferred type is inferred as a return type of a closure
+  /// or in a type parameter. Those cases cause the compiler today to behave
+  /// unsoundly by putting the code in a deferred output unit. In the future
+  /// when [newDeferredSplit] is on by default, those cases will be treated
+  /// soundly and will cause more code to be moved to the main output unit.
+  ///
+  /// This flag is presented to help developers find and fix the affected code.
+  bool reportInvalidInferredDeferredTypes = false;
+
   /// Whether to disable inlining during the backend optimizations.
   // TODO(sigmund): negate, so all flags are positive
   bool disableInlining = false;
@@ -124,6 +143,9 @@
   /// Whether to disable global type inference.
   bool disableTypeInference = false;
 
+  /// Whether to use the trivial abstract value domain.
+  bool useTrivialAbstractValueDomain = false;
+
   /// Whether to disable optimization for need runtime type information.
   bool disableRtiOptimization = false;
 
@@ -245,6 +267,9 @@
   /// Experimental part file function generation.
   bool experimentStartupFunctions = false;
 
+  /// Experimental reliance on JavaScript ToBoolean conversions.
+  bool experimentToBoolean = false;
+
   /// Experimental instrumentation to investigate code bloat.
   ///
   /// If [true], the compiler will emit code that logs whenever a method is
@@ -259,16 +284,12 @@
   /// This is an experimental feature.
   String experimentalAllocationsPath;
 
+  /// If specified, a bundle of optimizations to enable (or disable).
+  int optimizationLevel = null;
+
   // -------------------------------------------------
   // Options for deprecated features
   // -------------------------------------------------
-  // TODO(sigmund): delete these as we delete the underlying features
-
-  /// Whether to start `async` functions synchronously.
-  bool startAsyncSynchronously = false;
-
-  /// If specified, a bundle of optimizations to enable (or disable).
-  int optimizationLevel = null;
 
   /// Create an options object by parsing flags from [options].
   static CompilerOptions parse(List<String> options,
@@ -282,6 +303,9 @@
           _extractStringOption(options, '--build-id=', _UNDETERMINED_BUILD_ID)
       ..compileForServer = _hasOption(options, Flags.serverMode)
       ..deferredMapUri = _extractUriOption(options, '--deferred-map=')
+      ..newDeferredSplit = _hasOption(options, Flags.newDeferredSplit)
+      ..reportInvalidInferredDeferredTypes =
+          _hasOption(options, Flags.reportInvalidInferredDeferredTypes)
       ..fatalWarnings = _hasOption(options, Flags.fatalWarnings)
       ..terseDiagnostics = _hasOption(options, Flags.terse)
       ..suppressWarnings = _hasOption(options, Flags.suppressWarnings)
@@ -291,6 +315,8 @@
       ..disableInlining = _hasOption(options, Flags.disableInlining)
       ..disableProgramSplit = _hasOption(options, Flags.disableProgramSplit)
       ..disableTypeInference = _hasOption(options, Flags.disableTypeInference)
+      ..useTrivialAbstractValueDomain =
+          _hasOption(options, Flags.useTrivialAbstractValueDomain)
       ..disableRtiOptimization =
           _hasOption(options, Flags.disableRtiOptimization)
       ..dumpInfo = _hasOption(options, Flags.dumpInfo)
@@ -308,6 +334,7 @@
       ..experimentLocalNames = _hasOption(options, Flags.experimentLocalNames)
       ..experimentStartupFunctions =
           _hasOption(options, Flags.experimentStartupFunctions)
+      ..experimentToBoolean = _hasOption(options, Flags.experimentToBoolean)
       ..experimentCallInstrumentation =
           _hasOption(options, Flags.experimentCallInstrumentation)
       ..generateCodeWithCompileTimeErrors =
@@ -332,7 +359,6 @@
       ..useMultiSourceInfo = _hasOption(options, Flags.useMultiSourceInfo)
       ..useNewSourceInfo = _hasOption(options, Flags.useNewSourceInfo)
       ..useStartupEmitter = _hasOption(options, Flags.fastStartup)
-      ..startAsyncSynchronously = !_hasOption(options, Flags.noSyncAsync)
       ..verbose = _hasOption(options, Flags.verbose)
       ..showInternalProgress = _hasOption(options, Flags.progress)
       ..readDataUri = _extractUriOption(options, '${Flags.readData}=')
diff --git a/pkg/compiler/lib/src/serialization/abstract_sink.dart b/pkg/compiler/lib/src/serialization/abstract_sink.dart
index 1cb80e6..07116be 100644
--- a/pkg/compiler/lib/src/serialization/abstract_sink.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_sink.dart
@@ -17,6 +17,9 @@
   /// Visitor used for serializing [DartType]s.
   DartTypeWriter _dartTypeWriter;
 
+  /// Visitor used for serializing [ir.DartType]s.
+  DartTypeNodeWriter _dartTypeNodeWriter;
+
   /// Stack of tags used when [useDataKinds] is `true` to help debugging section
   /// inconsistencies between serialization and deserialization.
   List<String> _tags;
@@ -33,6 +36,7 @@
 
   AbstractDataSink({this.useDataKinds: false}) {
     _dartTypeWriter = new DartTypeWriter(this);
+    _dartTypeNodeWriter = new DartTypeNodeWriter(this);
     _stringIndex = new IndexedSink<String>(this);
     _uriIndex = new IndexedSink<Uri>(this);
     _memberNodeIndex = new IndexedSink<ir.Member>(this);
@@ -91,6 +95,25 @@
   }
 
   @override
+  void writeDartTypeNode(ir.DartType value, {bool allowNull: false}) {
+    _writeDataKind(DataKind.dartTypeNode);
+    _writeDartTypeNode(value, [], allowNull: allowNull);
+  }
+
+  void _writeDartTypeNode(
+      ir.DartType value, List<ir.TypeParameter> functionTypeVariables,
+      {bool allowNull: false}) {
+    if (value == null) {
+      if (!allowNull) {
+        throw new UnsupportedError("Missing ir.DartType node is not allowed.");
+      }
+      writeEnum(DartTypeNodeKind.none);
+    } else {
+      value.accept1(_dartTypeNodeWriter, functionTypeVariables);
+    }
+  }
+
+  @override
   void writeMemberNode(ir.Member value) {
     _writeDataKind(DataKind.memberNode);
     _writeMemberNode(value);
@@ -219,7 +242,8 @@
       _writeMemberNode(member);
       _MemberData memberData = _memberData[member] ??= new _MemberData(member);
       int index = memberData.getIndexByTreeNode(value);
-      assert(index != null, "No index found for ${value.runtimeType}.");
+      assert(
+          index != null, "No TreeNode index found for ${value.runtimeType}.");
       _writeIntInternal(index);
     }
   }
diff --git a/pkg/compiler/lib/src/serialization/abstract_source.dart b/pkg/compiler/lib/src/serialization/abstract_source.dart
index 9022b28..28da0ca 100644
--- a/pkg/compiler/lib/src/serialization/abstract_source.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_source.dart
@@ -112,6 +112,16 @@
     return types;
   }
 
+  List<ir.DartType> _readDartTypeNodes(
+      List<ir.TypeParameter> functionTypeVariables) {
+    int count = readInt();
+    List<ir.DartType> types = new List<ir.DartType>(count);
+    for (int index = 0; index < count; index++) {
+      types[index] = _readDartTypeNode(functionTypeVariables);
+    }
+    return types;
+  }
+
   @override
   SourceSpan readSourceSpan() {
     _checkDataKind(DataKind.sourceSpan);
@@ -190,6 +200,87 @@
     throw new UnsupportedError("Unexpected DartTypeKind $kind");
   }
 
+  @override
+  ir.DartType readDartTypeNode({bool allowNull: false}) {
+    _checkDataKind(DataKind.dartTypeNode);
+    ir.DartType type = _readDartTypeNode([]);
+    assert(type != null || allowNull);
+    return type;
+  }
+
+  ir.DartType _readDartTypeNode(List<ir.TypeParameter> functionTypeVariables) {
+    DartTypeNodeKind kind = readEnum(DartTypeNodeKind.values);
+    switch (kind) {
+      case DartTypeNodeKind.none:
+        return null;
+      case DartTypeNodeKind.voidType:
+        return const ir.VoidType();
+      case DartTypeNodeKind.invalidType:
+        return const ir.InvalidType();
+      case DartTypeNodeKind.bottomType:
+        return const ir.BottomType();
+      case DartTypeNodeKind.typeParameterType:
+        ir.TypeParameter typeParameter = readTypeParameterNode();
+        ir.DartType promotedBound = _readDartTypeNode(functionTypeVariables);
+        return new ir.TypeParameterType(typeParameter, promotedBound);
+      case DartTypeNodeKind.functionTypeVariable:
+        int index = readInt();
+        assert(0 <= index && index < functionTypeVariables.length);
+        ir.DartType promotedBound = _readDartTypeNode(functionTypeVariables);
+        return new ir.TypeParameterType(
+            functionTypeVariables[index], promotedBound);
+      case DartTypeNodeKind.functionType:
+        begin(functionTypeNodeTag);
+        int typeParameterCount = readInt();
+        List<ir.TypeParameter> typeParameters =
+            new List<ir.TypeParameter>.generate(
+                typeParameterCount, (int index) => new ir.TypeParameter());
+        functionTypeVariables =
+            new List<ir.TypeParameter>.from(functionTypeVariables)
+              ..addAll(typeParameters);
+        for (int index = 0; index < typeParameterCount; index++) {
+          typeParameters[index].name = readString();
+          typeParameters[index].bound =
+              _readDartTypeNode(functionTypeVariables);
+          typeParameters[index].defaultType =
+              _readDartTypeNode(functionTypeVariables);
+        }
+        ir.DartType returnType = _readDartTypeNode(functionTypeVariables);
+        int requiredParameterCount = readInt();
+        List<ir.DartType> positionalParameters =
+            _readDartTypeNodes(functionTypeVariables);
+        int namedParameterCount = readInt();
+        List<ir.NamedType> namedParameters =
+            new List<ir.NamedType>(namedParameterCount);
+        for (int index = 0; index < namedParameterCount; index++) {
+          String name = readString();
+          ir.DartType type = _readDartTypeNode(functionTypeVariables);
+          namedParameters[index] = new ir.NamedType(name, type);
+        }
+        ir.TypedefType typedefType = _readDartTypeNode(functionTypeVariables);
+        end(functionTypeNodeTag);
+        return new ir.FunctionType(positionalParameters, returnType,
+            namedParameters: namedParameters,
+            typeParameters: typeParameters,
+            requiredParameterCount: requiredParameterCount,
+            typedefType: typedefType);
+
+      case DartTypeNodeKind.interfaceType:
+        ir.Class cls = readClassNode();
+        List<ir.DartType> typeArguments =
+            _readDartTypeNodes(functionTypeVariables);
+        return new ir.InterfaceType(cls, typeArguments);
+      case DartTypeNodeKind.typedef:
+        ir.Typedef typedef = readTypedefNode();
+        List<ir.DartType> typeArguments =
+            _readDartTypeNodes(functionTypeVariables);
+        return new ir.TypedefType(typedef, typeArguments);
+      case DartTypeNodeKind.dynamicType:
+        return const ir.DynamicType();
+    }
+    throw new UnsupportedError("Unexpected DartTypeKind $kind");
+  }
+
   _MemberData _readMemberData() {
     return _memberNodeIndex.read(_readMemberDataInternal);
   }
diff --git a/pkg/compiler/lib/src/serialization/helpers.dart b/pkg/compiler/lib/src/serialization/helpers.dart
index d6ad16b..589c6eef 100644
--- a/pkg/compiler/lib/src/serialization/helpers.dart
+++ b/pkg/compiler/lib/src/serialization/helpers.dart
@@ -21,6 +21,7 @@
   treeNode,
   typeParameterNode,
   dartType,
+  dartTypeNode,
   sourceSpan,
   constant,
   import,
@@ -181,6 +182,119 @@
   }
 }
 
+/// Enum used for identifying [ir.DartType] subclasses in serialization.
+enum DartTypeNodeKind {
+  none,
+  voidType,
+  typeParameterType,
+  functionType,
+  functionTypeVariable,
+  interfaceType,
+  typedef,
+  dynamicType,
+  bottomType,
+  invalidType,
+}
+
+const String functionTypeNodeTag = 'function-type-node';
+
+class DartTypeNodeWriter
+    extends ir.DartTypeVisitor1<void, List<ir.TypeParameter>> {
+  final AbstractDataSink _sink;
+
+  DartTypeNodeWriter(this._sink);
+
+  void visitTypes(
+      List<ir.DartType> types, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeInt(types.length);
+    for (ir.DartType type in types) {
+      _sink._writeDartTypeNode(type, functionTypeVariables);
+    }
+  }
+
+  void defaultDartType(
+      ir.DartType node, List<ir.TypeParameter> functionTypeVariables) {
+    throw new UnsupportedError(
+        "Unexpected ir.DartType $node (${node.runtimeType}).");
+  }
+
+  void visitInvalidType(
+      ir.InvalidType node, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeEnum(DartTypeNodeKind.invalidType);
+  }
+
+  void visitDynamicType(
+      ir.DynamicType node, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeEnum(DartTypeNodeKind.dynamicType);
+  }
+
+  void visitVoidType(
+      ir.VoidType node, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeEnum(DartTypeNodeKind.voidType);
+  }
+
+  void visitBottomType(
+      ir.BottomType node, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeEnum(DartTypeNodeKind.bottomType);
+  }
+
+  void visitInterfaceType(
+      ir.InterfaceType node, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeEnum(DartTypeNodeKind.interfaceType);
+    _sink.writeClassNode(node.classNode);
+    visitTypes(node.typeArguments, functionTypeVariables);
+  }
+
+  void visitFunctionType(
+      ir.FunctionType node, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeEnum(DartTypeNodeKind.functionType);
+    _sink.begin(functionTypeNodeTag);
+    functionTypeVariables =
+        new List<ir.TypeParameter>.from(functionTypeVariables)
+          ..addAll(node.typeParameters);
+    _sink.writeInt(node.typeParameters.length);
+    for (ir.TypeParameter parameter in node.typeParameters) {
+      _sink.writeString(parameter.name);
+      _sink._writeDartTypeNode(parameter.bound, functionTypeVariables);
+      _sink._writeDartTypeNode(parameter.defaultType, functionTypeVariables);
+    }
+    _sink._writeDartTypeNode(node.returnType, functionTypeVariables);
+    _sink.writeInt(node.requiredParameterCount);
+    visitTypes(node.positionalParameters, functionTypeVariables);
+    _sink.writeInt(node.namedParameters.length);
+    for (ir.NamedType parameter in node.namedParameters) {
+      _sink.writeString(parameter.name);
+      _sink._writeDartTypeNode(parameter.type, functionTypeVariables);
+    }
+    _sink._writeDartTypeNode(node.typedefType, functionTypeVariables,
+        allowNull: true);
+    _sink.end(functionTypeNodeTag);
+  }
+
+  void visitTypeParameterType(
+      ir.TypeParameterType node, List<ir.TypeParameter> functionTypeVariables) {
+    int index = functionTypeVariables.indexOf(node.parameter);
+    if (index != -1) {
+      _sink.writeEnum(DartTypeNodeKind.functionTypeVariable);
+      _sink.writeInt(index);
+      _sink._writeDartTypeNode(node.promotedBound, functionTypeVariables,
+          allowNull: true);
+    } else {
+      _sink.writeEnum(DartTypeNodeKind.typeParameterType);
+      _sink.writeTypeParameterNode(node.parameter);
+      _sink._writeDartTypeNode(node.promotedBound, functionTypeVariables,
+          allowNull: true);
+    }
+  }
+
+  void visitTypedefType(
+      ir.TypedefType node, List<ir.TypeParameter> functionTypeVariables) {
+    _sink.writeEnum(DartTypeNodeKind.typedef);
+    _sink.writeTypedefNode(node.typedefNode);
+    visitTypes(node.typeArguments, functionTypeVariables);
+  }
+}
+
 /// Data sink helper that canonicalizes [E] values using indices.
 class IndexedSink<E> {
   final AbstractDataSink _sink;
diff --git a/pkg/compiler/lib/src/serialization/member_data.dart b/pkg/compiler/lib/src/serialization/member_data.dart
index 69bb187..b4aeee12 100644
--- a/pkg/compiler/lib/src/serialization/member_data.dart
+++ b/pkg/compiler/lib/src/serialization/member_data.dart
@@ -21,7 +21,9 @@
         _libraryMap[library.importUri] = new _LibraryData(library);
       }
     }
-    return _libraryMap[canonicalUri];
+    _LibraryData data = _libraryMap[canonicalUri];
+    assert(data != null, "No library found for $canonicalUri.");
+    return data;
   }
 }
 
diff --git a/pkg/compiler/lib/src/serialization/node_indexer.dart b/pkg/compiler/lib/src/serialization/node_indexer.dart
index 719390e..7087849 100644
--- a/pkg/compiler/lib/src/serialization/node_indexer.dart
+++ b/pkg/compiler/lib/src/serialization/node_indexer.dart
@@ -157,4 +157,34 @@
     registerNode(node);
     super.visitContinueSwitchStatement(node);
   }
+
+  @override
+  void visitConstructorInvocation(ir.ConstructorInvocation node) {
+    registerNode(node);
+    super.visitConstructorInvocation(node);
+  }
+
+  @override
+  void visitVariableGet(ir.VariableGet node) {
+    registerNode(node);
+    super.visitVariableGet(node);
+  }
+
+  @override
+  void visitInstantiation(ir.Instantiation node) {
+    registerNode(node);
+    super.visitInstantiation(node);
+  }
+
+  @override
+  void visitSuperMethodInvocation(ir.SuperMethodInvocation node) {
+    registerNode(node);
+    super.visitSuperMethodInvocation(node);
+  }
+
+  @override
+  void visitSuperPropertyGet(ir.SuperPropertyGet node) {
+    registerNode(node);
+    super.visitSuperPropertyGet(node);
+  }
 }
diff --git a/pkg/compiler/lib/src/serialization/serialization.dart b/pkg/compiler/lib/src/serialization/serialization.dart
index 3c2c52d..2d2fd9b 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -186,6 +186,10 @@
   /// [DataSource.readDartTypes].
   void writeDartTypes(Iterable<DartType> values, {bool allowNull: false});
 
+  /// Writes the kernel type node [value] to this data sink. If [allowNull] is
+  /// `true`, [value] is allowed to be `null`.
+  void writeDartTypeNode(ir.DartType value, {bool allowNull: false});
+
   /// Writes the source span [value] to this data sink.
   void writeSourceSpan(SourceSpan value);
 
@@ -488,6 +492,10 @@
   /// [DataSink.writeDartTypes].
   List<DartType> readDartTypes({bool emptyAsNull: false});
 
+  /// Reads a kernel type node from this data source. If [allowNull], the
+  /// returned type is allowed to be `null`.
+  ir.DartType readDartTypeNode({bool allowNull: false});
+
   /// Reads a source span from this data source.
   SourceSpan readSourceSpan();
 
diff --git a/pkg/compiler/lib/src/serialization/strategies.dart b/pkg/compiler/lib/src/serialization/strategies.dart
index 3b59676..0c159f9 100644
--- a/pkg/compiler/lib/src/serialization/strategies.dart
+++ b/pkg/compiler/lib/src/serialization/strategies.dart
@@ -12,11 +12,11 @@
 
 import '../diagnostics/diagnostic_listener.dart';
 import '../environment.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../js_model/js_world.dart';
 import '../options.dart';
 import '../source_file_provider.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../util/sink_adapter.dart';
 import 'serialization.dart';
 import 'task.dart';
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index 761d99e..3aac9f3 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -11,11 +11,11 @@
 import '../compiler.dart';
 import '../diagnostics/diagnostic_listener.dart';
 import '../environment.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../js_backend/inferred_data.dart';
 import '../js_model/js_world.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../util/sink_adapter.dart';
 import 'serialization.dart';
 
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index d9a0664..1c14b38 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -21,8 +21,11 @@
 import '../elements/jumps.dart';
 import '../elements/names.dart';
 import '../elements/types.dart';
-import '../ir/util.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../io/source_information.dart';
+import '../ir/static_type_provider.dart';
+import '../ir/util.dart';
 import '../js/js.dart' as js;
 import '../js_backend/allocator_analysis.dart' show JAllocatorAnalysis;
 import '../js_backend/backend.dart' show FunctionInlineCache, JavaScriptBackend;
@@ -35,8 +38,6 @@
 import '../kernel/invocation_mirror_constants.dart';
 import '../native/behavior.dart';
 import '../native/js.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/call_structure.dart';
 import '../universe/codegen_world_builder.dart';
 import '../universe/feature.dart';
@@ -64,9 +65,16 @@
   final KernelToLocalsMap localsMap;
   final KernelToTypeInferenceMap typeInferenceMap;
   final SourceInformationBuilder sourceInformationBuilder;
+  final StaticTypeProvider staticTypeProvider;
 
-  StackFrame(this.parent, this.member, this.asyncMarker, this.localsMap,
-      this.typeInferenceMap, this.sourceInformationBuilder);
+  StackFrame(
+      this.parent,
+      this.member,
+      this.asyncMarker,
+      this.localsMap,
+      this.typeInferenceMap,
+      this.sourceInformationBuilder,
+      this.staticTypeProvider);
 }
 
 class KernelSsaGraphBuilder extends ir.Visitor
@@ -160,6 +168,13 @@
   SourceInformationBuilder get _sourceInformationBuilder =>
       _currentFrame.sourceInformationBuilder;
 
+  DartType _getStaticType(ir.Expression node) {
+    // TODO(johnniwinther): Substitute the type by the this type and type
+    // arguments of the current frame.
+    return _elementMap
+        .getDartType(_currentFrame.staticTypeProvider.getStaticType(node));
+  }
+
   static MemberEntity _effectiveTargetElementFor(MemberEntity member) {
     if (member is JGeneratorBody) return member.function;
     return member;
@@ -181,7 +196,8 @@
         _currentFrame != null
             ? _currentFrame.sourceInformationBuilder
                 .forContext(member, callSourceInformation)
-            : _sourceInformationStrategy.createBuilderForContext(member));
+            : _sourceInformationStrategy.createBuilderForContext(member),
+        _elementMap.getStaticTypeProvider(member));
   }
 
   void _leaveFrame() {
@@ -482,9 +498,9 @@
           functionNode: node.function, checks: TargetChecks.none);
     }
 
-    // [fieldValues] accumulates the field initializer values, which may be
-    // overwritten by initializer-list initializers.
-    ConstructorData constructorData = new ConstructorData();
+    // [constructorData.fieldValues] accumulates the field initializer values,
+    // which may be overwritten by initializer-list initializers.
+    ConstructorData constructorData = ConstructorData();
     _buildInitializers(node, constructorData);
 
     List<HInstruction> constructorArguments = <HInstruction>[];
@@ -715,22 +731,28 @@
           failedAt(field, "Unexpected member definition $definition.");
       }
 
+      bool ignoreAllocatorAnalysis = false;
+      if (nativeData.isNativeOrExtendsNative(cls)) {
+        // @Native classes have 'fields' which are really getters/setter.  Do
+        // not try to initialize e.g. 'tagName'.
+        if (nativeData.isNativeClass(cls)) return;
+        // Fields that survive this test are fields of custom elements.
+        ignoreAllocatorAnalysis = true;
+      }
+
       if (node.initializer == null) {
-        // Unassigned fields of native classes are not initialized to
-        // prevent overwriting pre-initialized native properties.
-        if (!nativeData.isNativeOrExtendsNative(cls)) {
-          if (!_allocatorAnalysis.isInitializedInAllocator(field)) {
-            constructorData.fieldValues[field] =
-                graph.addConstantNull(closedWorld);
-          }
+        if (ignoreAllocatorAnalysis ||
+            !_allocatorAnalysis.isInitializedInAllocator(field)) {
+          constructorData.fieldValues[field] =
+              graph.addConstantNull(closedWorld);
         }
-      } else if (node.initializer is! ir.NullLiteral ||
-          !nativeData.isNativeClass(cls)) {
+      } else {
         // Compile the initializer in the context of the field so we know that
         // class type parameters are accessed as values.
         // TODO(sra): It would be sufficient to know the context was a field
         // initializer.
-        if (!_allocatorAnalysis.isInitializedInAllocator(field)) {
+        if (ignoreAllocatorAnalysis ||
+            !_allocatorAnalysis.isInitializedInAllocator(field)) {
           inlinedFrom(field,
               _sourceInformationBuilder.buildAssignment(node.initializer), () {
             node.initializer.accept(this);
@@ -878,10 +900,6 @@
     ir.Class callerClass = caller.enclosingClass;
     ir.Supertype supertype = callerClass.supertype;
 
-    if (callerClass.mixedInType != null) {
-      _collectFieldValues(callerClass.mixedInType.classNode, constructorData);
-    }
-
     // The class of the super-constructor may not be the supertype class. In
     // this case, we must go up the class hierarchy until we reach the class
     // containing the super-constructor.
@@ -1015,8 +1033,8 @@
       }
     }
     if (const bool.fromEnvironment('unreachable-throw')) {
-      var emptyParameters = parameters.values
-          .where((p) => abstractValueDomain.isEmpty(p.instructionType));
+      var emptyParameters = parameters.values.where((p) =>
+          abstractValueDomain.isEmpty(p.instructionType).isDefinitelyTrue);
       if (emptyParameters.length > 0) {
         addComment('${emptyParameters} inferred as [empty]');
         add(new HInvokeStatic(
@@ -1611,8 +1629,9 @@
 
       node.iterable.accept(this);
       array = pop();
-      isFixed =
-          abstractValueDomain.isFixedLengthJsIndexable(array.instructionType);
+      isFixed = abstractValueDomain
+          .isFixedLengthJsIndexable(array.instructionType)
+          .isDefinitelyTrue;
       localsHandler.updateLocal(
           indexVariable, graph.addConstantInt(0, closedWorld),
           sourceInformation: sourceInformation);
@@ -2054,9 +2073,25 @@
 
   @override
   void visitAsExpression(ir.AsExpression node) {
+    ir.Expression operand = node.operand;
+    operand.accept(this);
+
+    DartType operandType = _getStaticType(operand);
+    DartType type = _elementMap.getDartType(node.type);
+    if (_elementMap.types.isSubtype(operandType, type)) {
+      // Skip unneeded casts.
+      if (operand is! ir.PropertyGet) {
+        // TODO(johnniwinther): Support property get. Currently CFE inserts
+        // a seemingly unnecessary cast on tearoffs that contain type variables
+        // in contravariant positions. Since these casts are not marked we
+        // cannot easily detect when we actually need the cast. See test
+        // `language_2/instantiate_tearoff_after_contravariance_check_test`.
+        return;
+      }
+    }
+
     SourceInformation sourceInformation =
         _sourceInformationBuilder.buildAs(node);
-    node.operand.accept(this);
     HInstruction expressionInstruction = pop();
 
     if (node.type is ir.InvalidType) {
@@ -2064,7 +2099,6 @@
       return;
     }
 
-    DartType type = _elementMap.getDartType(node.type);
     if ((!node.isTypeError && !options.omitAsCasts) ||
         options.implicitDowncastCheckPolicy.isEmitted) {
       HInstruction converted = typeBuilder.buildTypeConversion(
@@ -2743,7 +2777,7 @@
 
     AbstractValue type =
         _typeInferenceMap.typeOfListLiteral(node, abstractValueDomain);
-    if (!abstractValueDomain.containsAll(type)) {
+    if (abstractValueDomain.containsAll(type).isDefinitelyFalse) {
       listInstruction.instructionType = type;
     }
     stack.add(listInstruction);
@@ -2795,8 +2829,8 @@
 
       // We lift this common call pattern into a helper function to save space
       // in the output.
-      if (typeInputs
-          .every((HInstruction input) => input.isNull(abstractValueDomain))) {
+      if (typeInputs.every((HInstruction input) =>
+          input.isNull(abstractValueDomain).isDefinitelyTrue)) {
         if (constructorArgs.isEmpty) {
           constructor = _commonElements.mapLiteralUntypedEmptyMaker;
         } else {
@@ -3385,9 +3419,9 @@
               "Unexpected arguments. "
               "Expected 1-2 argument, actual: $arguments."));
       HInstruction lengthInput = arguments.first;
-      if (!lengthInput.isNumber(abstractValueDomain)) {
+      if (lengthInput.isNumber(abstractValueDomain).isPotentiallyFalse) {
         HTypeConversion conversion = new HTypeConversion(
-            null,
+            commonElements.numType,
             HTypeConversion.ARGUMENT_TYPE_CHECK,
             abstractValueDomain.numType,
             lengthInput,
@@ -3408,14 +3442,15 @@
       // TODO(sra): Array allocation should be an instruction so that canThrow
       // can depend on a length type discovered in optimization.
       bool canThrow = true;
-      if (lengthInput.isUInt32(abstractValueDomain)) {
+      if (lengthInput.isUInt32(abstractValueDomain).isDefinitelyTrue) {
         canThrow = false;
       }
 
       var inferredType = _inferredTypeOfNewList(invocation);
-      resultType = abstractValueDomain.containsAll(inferredType)
-          ? abstractValueDomain.fixedListType
-          : inferredType;
+      resultType =
+          abstractValueDomain.containsAll(inferredType).isPotentiallyTrue
+              ? abstractValueDomain.fixedListType
+              : inferredType;
       HForeignCode foreign = new HForeignCode(
           code, resultType, <HInstruction>[lengthInput],
           nativeBehavior: behavior,
@@ -3436,9 +3471,10 @@
     } else if (isGrowableListConstructorCall) {
       push(buildLiteralList(<HInstruction>[]));
       var inferredType = _inferredTypeOfNewList(invocation);
-      resultType = abstractValueDomain.containsAll(inferredType)
-          ? abstractValueDomain.growableListType
-          : inferredType;
+      resultType =
+          abstractValueDomain.containsAll(inferredType).isPotentiallyTrue
+              ? abstractValueDomain.growableListType
+              : inferredType;
       stack.last.instructionType = resultType;
     } else if (isJSArrayTypedConstructor) {
       // TODO(sra): Instead of calling the identity-like factory constructor,
@@ -4086,11 +4122,14 @@
     if (trustedMask != null) {
       // We only allow the type argument to narrow `dynamic`, which probably
       // comes from an unspecified return type in the NativeBehavior.
-      if (abstractValueDomain.containsAll(code.instructionType)) {
+      if (abstractValueDomain
+          .containsAll(code.instructionType)
+          .isPotentiallyTrue) {
         // Overwrite the type with the narrower type.
         code.instructionType = trustedMask;
-      } else if (abstractValueDomain.contains(
-          trustedMask, code.instructionType)) {
+      } else if (abstractValueDomain
+          .contains(trustedMask, code.instructionType)
+          .isPotentiallyTrue) {
         // It is acceptable for the type parameter to be broader than the
         // specified type.
       } else {
@@ -4214,11 +4253,15 @@
 
     AbstractValue type = _typeInferenceMap.selectorTypeOf(selector, mask);
     if (selector.isGetter) {
-      push(new HInvokeDynamicGetter(selector, mask, null, inputs, isIntercepted,
-          type, sourceInformation));
+      push(new HInvokeDynamicGetter(selector, mask, element, inputs,
+          isIntercepted, type, sourceInformation));
     } else if (selector.isSetter) {
-      push(new HInvokeDynamicSetter(selector, mask, null, inputs, isIntercepted,
-          type, sourceInformation));
+      push(new HInvokeDynamicSetter(selector, mask, element, inputs,
+          isIntercepted, type, sourceInformation));
+    } else if (selector.isClosureCall) {
+      assert(!isIntercepted);
+      push(new HInvokeClosure(selector, inputs, type, typeArguments)
+        ..sourceInformation = sourceInformation);
     } else {
       push(new HInvokeDynamicMethod(
           selector, mask, inputs, type, typeArguments, sourceInformation,
@@ -4937,7 +4980,9 @@
       if (selector != null) {
         if (!selector.applies(function)) return false;
         if (mask != null &&
-            !abstractValueDomain.canHit(mask, function, selector)) {
+            abstractValueDomain
+                .isTargetingMember(mask, function, selector.memberName)
+                .isDefinitelyFalse) {
           return false;
         }
       }
@@ -4947,7 +4992,9 @@
       // Don't inline operator== methods if the parameter can be null.
       if (function.name == '==') {
         if (function.enclosingClass != commonElements.objectClass &&
-            providedArguments[1].canBeNull(abstractValueDomain)) {
+            providedArguments[1]
+                .isNull(abstractValueDomain)
+                .isPotentiallyTrue) {
           return false;
         }
       }
@@ -5096,7 +5143,8 @@
       // NoSuchMethodError message as if we had called it.
       if (function.isInstanceMember &&
           function is! ConstructorBodyEntity &&
-          (mask == null || abstractValueDomain.canBeNull(mask))) {
+          (mask == null ||
+              abstractValueDomain.isNull(mask).isPotentiallyTrue)) {
         add(new HFieldGet(
             null, providedArguments[0], abstractValueDomain.dynamicType,
             isAssignable: false)
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index c6f57d2..9a23841 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -17,6 +17,7 @@
 import '../elements/entities.dart';
 import '../elements/jumps.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../io/source_information.dart';
 import '../js/js.dart' as js;
 import '../js_backend/interceptor_data.dart';
@@ -30,7 +31,6 @@
 import '../native/behavior.dart';
 import '../native/enqueue.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/call_structure.dart' show CallStructure;
 import '../universe/selector.dart' show Selector;
 import '../universe/use.dart'
@@ -323,7 +323,9 @@
   }
 
   bool requiresUintConversion(HInstruction instruction) {
-    if (instruction.isUInt31(_abstractValueDomain)) return false;
+    if (instruction.isUInt31(_abstractValueDomain).isDefinitelyTrue) {
+      return false;
+    }
     if (bitWidth(instruction) <= 31) return false;
     // If the result of a bit-operation is only used by other bit
     // operations, we do not have to convert to an unsigned integer.
@@ -366,7 +368,7 @@
   }
 
   void preGenerateMethod(HGraph graph) {
-    new SsaInstructionSelection(_closedWorld, _interceptorData)
+    new SsaInstructionSelection(_options, _closedWorld, _interceptorData)
         .visitGraph(graph);
     new SsaTypeKnownRemover().visitGraph(graph);
     new SsaTrustedCheckRemover(_options).visitGraph(graph);
@@ -1546,11 +1548,11 @@
   visitShiftRight(HShiftRight node) => visitBitInvokeBinary(node, '>>>');
 
   visitTruncatingDivide(HTruncatingDivide node) {
-    assert(node.isUInt31(_abstractValueDomain));
+    assert(node.isUInt31(_abstractValueDomain).isDefinitelyTrue);
     // TODO(karlklose): Enable this assertion again when type propagation is
     // fixed. Issue 23555.
 //    assert(node.left.isUInt32(compiler));
-    assert(node.right.isPositiveInteger(_abstractValueDomain));
+    assert(node.right.isPositiveInteger(_abstractValueDomain).isDefinitelyTrue);
     use(node.left);
     js.Expression jsLeft = pop();
     use(node.right);
@@ -1720,10 +1722,12 @@
     js.Statement elsePart;
 
     HBasicBlock thenBlock = node.block.successors[0];
-    // If we believe we will generate S1 as empty, try to generate
+    // If we believe we will generate S1 as empty, instead of
     //
     //     if (e) S1; else S2;
-    // as
+    //
+    // try to generate
+    //
     //     if (!e) S2; else S1;
     //
     // It is better to generate `!e` rather than try and negate it later.
@@ -1746,24 +1750,39 @@
       elsePart = unwrapStatement(generateStatementsInNewBlock(elseGraph));
     }
 
+    js.Statement code = _assembleIfThenElse(test, thenPart, elsePart);
+    pushStatement(code.withSourceInformation(node.sourceInformation));
+  }
+
+  js.Statement _assembleIfThenElse(
+      js.Expression test, js.Statement thenPart, js.Statement elsePart) {
     // Peephole rewrites:
     //
-    //     if (e); else S;   -->   if(!e) S;
+    //     if (e); else S;   -->   if (!e) S;
     //
     //     if (e);   -->   e;
     //
     // TODO(sra): We might be able to do better with reshaping the CFG.
-    js.Statement code;
     if (thenPart is js.EmptyStatement) {
       if (elsePart is js.EmptyStatement) {
-        code = new js.ExpressionStatement(test);
-      } else {
-        code = new js.If.noElse(new js.Prefix('!', test), elsePart);
+        return js.ExpressionStatement(test);
       }
-    } else {
-      code = new js.If(test, thenPart, elsePart);
+      test = js.Prefix('!', test);
+      var temp = thenPart;
+      thenPart = elsePart;
+      elsePart = temp;
     }
-    pushStatement(code.withSourceInformation(node.sourceInformation));
+
+    if (_options.experimentToBoolean) {
+      if (elsePart is js.EmptyStatement &&
+          thenPart is js.ExpressionStatement &&
+          thenPart.expression is js.Call) {
+        return js.ExpressionStatement(
+            js.Binary('&&', test, thenPart.expression));
+      }
+    }
+
+    return js.If(test, thenPart, elsePart);
   }
 
   visitIf(HIf node) {
@@ -1979,8 +1998,8 @@
     }
   }
 
-  void registerSetter(HInvokeDynamic node) {
-    if (node.element != null) {
+  void registerSetter(HInvokeDynamic node, {bool needsCheck: false}) {
+    if (node.element is FieldEntity && !needsCheck) {
       // This is a dynamic update which we have found to have a single
       // target but for some reason haven't inlined. We are _still_ accessing
       // the target dynamically but we don't need to enqueue more than target
@@ -2017,7 +2036,7 @@
     push(js
         .propertyCall(pop(), name, visitArguments(node.inputs))
         .withSourceInformation(node.sourceInformation));
-    registerSetter(node);
+    registerSetter(node, needsCheck: node.needsCheck);
   }
 
   visitInvokeDynamicGetter(HInvokeDynamicGetter node) {
@@ -2336,15 +2355,15 @@
 
       HInstruction left = relational.left;
       HInstruction right = relational.right;
-      if (left.isStringOrNull(_abstractValueDomain) &&
-          right.isStringOrNull(_abstractValueDomain)) {
+      if (left.isStringOrNull(_abstractValueDomain).isDefinitelyTrue &&
+          right.isStringOrNull(_abstractValueDomain).isDefinitelyTrue) {
         return true;
       }
 
       // This optimization doesn't work for NaN, so we only do it if the
       // type is known to be an integer.
-      return left.isInteger(_abstractValueDomain) &&
-          right.isInteger(_abstractValueDomain);
+      return left.isInteger(_abstractValueDomain).isDefinitelyTrue &&
+          right.isInteger(_abstractValueDomain).isDefinitelyTrue;
     }
 
     bool handledBySpecialCase = false;
@@ -2480,13 +2499,15 @@
       js.Expression over;
       if (node.staticChecks != HBoundsCheck.ALWAYS_ABOVE_ZERO) {
         use(node.index);
-        if (node.index.isInteger(_abstractValueDomain)) {
+        if (node.index.isInteger(_abstractValueDomain).isDefinitelyTrue) {
           under = js.js("# < 0", pop());
         } else {
           js.Expression jsIndex = pop();
           under = js.js("# >>> 0 !== #", [jsIndex, jsIndex]);
         }
-      } else if (!node.index.isInteger(_abstractValueDomain)) {
+      } else if (node.index
+          .isInteger(_abstractValueDomain)
+          .isPotentiallyFalse) {
         checkInt(node.index, '!==');
         under = pop();
       }
@@ -2607,10 +2628,10 @@
 
   void visitStringify(HStringify node) {
     HInstruction input = node.inputs.first;
-    if (input.isString(_abstractValueDomain)) {
+    if (input.isString(_abstractValueDomain).isDefinitelyTrue) {
       use(input);
-    } else if (input.isInteger(_abstractValueDomain) ||
-        input.isBoolean(_abstractValueDomain)) {
+    } else if (input.isInteger(_abstractValueDomain).isDefinitelyTrue ||
+        input.isBoolean(_abstractValueDomain).isDefinitelyTrue) {
       // JavaScript's + operator with a string for the left operand will convert
       // the right operand to a string, and the conversion result is correct.
       use(input);
@@ -3000,9 +3021,9 @@
       } else if (type.isFunctionType) {
         checkType(input, interceptor, type, sourceInformation,
             negative: negative);
-      } else if ((input.canBePrimitive(_abstractValueDomain) &&
-              !input.canBePrimitiveArray(_abstractValueDomain)) ||
-          input.canBeNull(_abstractValueDomain)) {
+      } else if ((input.isPrimitive(_abstractValueDomain).isPotentiallyTrue &&
+              input.isPrimitiveArray(_abstractValueDomain).isDefinitelyFalse) ||
+          input.isNull(_abstractValueDomain).isPotentiallyTrue) {
         checkObject(input, relation, node.sourceInformation);
         js.Expression objectTest = pop();
         checkType(input, interceptor, type, sourceInformation,
@@ -3025,44 +3046,24 @@
   }
 
   js.Expression generateReceiverOrArgumentTypeTest(HTypeConversion node) {
+    DartType type = node.typeExpression;
     HInstruction input = node.checkedInput;
-    AbstractValue inputType = node.inputType ?? input.instructionType;
     AbstractValue checkedType = node.checkedType;
     // This path is no longer used for indexable primitive types.
-    assert(!_abstractValueDomain.isJsIndexable(checkedType));
+    assert(_abstractValueDomain.isJsIndexable(checkedType).isPotentiallyFalse);
     // Figure out if it is beneficial to use a null check.  V8 generally prefers
     // 'typeof' checks, but for integers we cannot compile this test into a
     // single typeof check so the null check is cheaper.
-    bool isIntCheck = _abstractValueDomain.isIntegerOrNull(checkedType);
-    bool turnIntoNumCheck =
-        isIntCheck && _abstractValueDomain.isIntegerOrNull(inputType);
-    bool turnIntoNullCheck = !turnIntoNumCheck &&
-        (_abstractValueDomain.includeNull(checkedType) == inputType) &&
-        isIntCheck;
-
-    if (turnIntoNullCheck) {
-      use(input);
-      return new js.Binary("==", pop(), new js.LiteralNull())
-          .withSourceInformation(input.sourceInformation);
-    } else if (isIntCheck && !turnIntoNumCheck) {
-      // input is !int
-      checkBigInt(input, '!==', input.sourceInformation);
-      return pop();
-    } else if (turnIntoNumCheck ||
-        _abstractValueDomain.isNumberOrNull(checkedType)) {
+    if (type == _commonElements.numType) {
       // input is !num
       checkNum(input, '!==', input.sourceInformation);
       return pop();
-    } else if (_abstractValueDomain.isBooleanOrNull(checkedType)) {
+    } else if (type == _commonElements.boolType) {
       // input is !bool
       checkBool(input, '!==', input.sourceInformation);
       return pop();
-    } else if (_abstractValueDomain.isStringOrNull(checkedType)) {
-      // input is !string
-      checkString(input, '!==', input.sourceInformation);
-      return pop();
     }
-    throw failedAt(input, 'Unexpected check: $checkedType.');
+    throw failedAt(input, 'Unexpected check: $type.');
   }
 
   void visitTypeConversion(HTypeConversion node) {
diff --git a/pkg/compiler/lib/src/ssa/codegen_helpers.dart b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
index 38e6d68..2fc43bb 100644
--- a/pkg/compiler/lib/src/ssa/codegen_helpers.dart
+++ b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
@@ -4,10 +4,10 @@
 
 import '../constants/values.dart';
 import '../elements/entities.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../js_backend/js_backend.dart';
 import '../js_backend/interceptor_data.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart' show Selector;
 import '../world.dart' show JClosedWorld;
 import 'nodes.dart';
@@ -19,9 +19,11 @@
 class SsaInstructionSelection extends HBaseVisitor {
   final JClosedWorld _closedWorld;
   final InterceptorData _interceptorData;
+  final CompilerOptions _options;
   HGraph graph;
 
-  SsaInstructionSelection(this._closedWorld, this._interceptorData);
+  SsaInstructionSelection(
+      this._options, this._closedWorld, this._interceptorData);
 
   AbstractValueDomain get _abstractValueDomain =>
       _closedWorld.abstractValueDomain;
@@ -88,8 +90,12 @@
   String simpleOp(HInstruction left, HInstruction right) {
     AbstractValue leftType = left.instructionType;
     AbstractValue rightType = right.instructionType;
-    if (!_abstractValueDomain.canBeNull(leftType)) return '===';
-    if (!_abstractValueDomain.canBeNull(rightType)) return '===';
+    if (_abstractValueDomain.isNull(leftType).isDefinitelyFalse) {
+      return '===';
+    }
+    if (_abstractValueDomain.isNull(rightType).isDefinitelyFalse) {
+      return '===';
+    }
 
     // Dart `null` is implemented by JavaScript `null` and `undefined` which are
     // not strict-equals, so we can't use `===`. We would like to use `==` but
@@ -98,30 +104,31 @@
       return '==';
     }
 
-    if (_abstractValueDomain.isNumberOrNull(leftType) &&
-        _abstractValueDomain.isNumberOrNull(rightType)) {
+    if (_abstractValueDomain.isNumberOrNull(leftType).isDefinitelyTrue &&
+        _abstractValueDomain.isNumberOrNull(rightType).isDefinitelyTrue) {
       return '==';
     }
-    if (_abstractValueDomain.isStringOrNull(leftType) &&
-        _abstractValueDomain.isStringOrNull(rightType)) {
+    if (_abstractValueDomain.isStringOrNull(leftType).isDefinitelyTrue &&
+        _abstractValueDomain.isStringOrNull(rightType).isDefinitelyTrue) {
       return '==';
     }
-    if (_abstractValueDomain.isBooleanOrNull(leftType) &&
-        _abstractValueDomain.isBooleanOrNull(rightType)) {
+    if (_abstractValueDomain.isBooleanOrNull(leftType).isDefinitelyTrue &&
+        _abstractValueDomain.isBooleanOrNull(rightType).isDefinitelyTrue) {
       return '==';
     }
 
-    // ToPrimitive conversions of an object occur when the other operand is a
-    // primitive (Number, String, Symbol and, indirectly, Boolean). We use
-    // 'intercepted' types as a proxy for all the primitive types.
-    bool intercepted(AbstractValue type) => _abstractValueDomain
-        .canBeInterceptor(_abstractValueDomain.excludeNull(type));
-
-    if (intercepted(leftType)) return null;
-    if (intercepted(rightType)) return null;
+    if (_intercepted(leftType)) return null;
+    if (_intercepted(rightType)) return null;
     return '==';
   }
 
+  // ToPrimitive conversions of an object occur when the other operand is a
+  // primitive (Number, String, Symbol and, indirectly, Boolean). We use
+  // 'intercepted' types as a proxy for all the primitive types.
+  bool _intercepted(AbstractValue type) => _abstractValueDomain
+      .isInterceptor(_abstractValueDomain.excludeNull(type))
+      .isPotentiallyTrue;
+
   HInstruction visitInvokeDynamic(HInvokeDynamic node) {
     if (node.isInterceptedCall) {
       tryReplaceInterceptorWithDummy(node, node.selector, node.mask);
@@ -137,7 +144,12 @@
     return node;
   }
 
-  void tryReplaceInterceptorWithDummy(
+  HInstruction visitOneShotInterceptor(HOneShotInterceptor node) {
+    // The receiver parameter should never be replaced with a dummy constant.
+    return node;
+  }
+
+  bool tryReplaceInterceptorWithDummy(
       HInvoke node, Selector selector, AbstractValue mask) {
     // Calls of the form
     //
@@ -161,7 +173,7 @@
 
     // TODO(15933): Make automatically generated property extraction closures
     // work with the dummy receiver optimization.
-    if (selector.isGetter) return;
+    if (selector.isGetter) return false;
 
     // This assignment of inputs is uniform for HInvokeDynamic and HInvokeSuper.
     HInstruction interceptor = node.inputs[0];
@@ -178,8 +190,10 @@
         receiverArgument.usedBy.remove(node);
         node.inputs[1] = dummy;
         dummy.usedBy.add(node);
+        return true;
       }
     }
+    return false;
   }
 
   HInstruction visitFieldSet(HFieldSet setter) {
@@ -271,7 +285,9 @@
     HInstruction bitop(String assignOp) {
       // HBitAnd, HBitOr etc. are more difficult because HBitAnd(a.x, y)
       // sometimes needs to be forced to unsigned: a.x = (a.x & y) >>> 0.
-      if (op.isUInt31(_abstractValueDomain)) return simpleBinary(assignOp);
+      if (op.isUInt31(_abstractValueDomain).isDefinitelyTrue) {
+        return simpleBinary(assignOp);
+      }
       return noMatchingRead();
     }
 
@@ -289,6 +305,40 @@
 
     return noMatchingRead();
   }
+
+  visitIf(HIf node) {
+    if (!_options.experimentToBoolean) return node;
+    HInstruction condition = node.inputs.single;
+    // if (x != null) --> if (x)
+    if (condition is HNot) {
+      HInstruction test = condition.inputs.single;
+      if (test is HIdentity) {
+        HInstruction operand1 = test.inputs[0];
+        HInstruction operand2 = test.inputs[1];
+        if (operand2.isNull(_abstractValueDomain).isDefinitelyTrue &&
+            !_intercepted(operand1.instructionType)) {
+          if (test.usedBy.length == 1 && condition.usedBy.length == 1) {
+            node.changeUse(condition, operand1);
+            condition.block.remove(condition);
+            test.block.remove(test);
+          }
+        }
+      }
+    }
+    // if (x == null) => if (!x)
+    if (condition is HIdentity && condition.usedBy.length == 1) {
+      HInstruction operand1 = condition.inputs[0];
+      HInstruction operand2 = condition.inputs[1];
+      if (operand2.isNull(_abstractValueDomain).isDefinitelyTrue &&
+          !_intercepted(operand1.instructionType)) {
+        var not = HNot(operand1, _abstractValueDomain.boolType);
+        node.block.addBefore(node, not);
+        node.changeUse(condition, not);
+        condition.block.remove(condition);
+      }
+    }
+    return node;
+  }
 }
 
 /**
diff --git a/pkg/compiler/lib/src/ssa/graph_builder.dart b/pkg/compiler/lib/src/ssa/graph_builder.dart
index 207326e..938d1dd 100644
--- a/pkg/compiler/lib/src/ssa/graph_builder.dart
+++ b/pkg/compiler/lib/src/ssa/graph_builder.dart
@@ -11,6 +11,8 @@
 import '../elements/entities.dart' show Entity, Local, MemberEntity;
 import '../elements/jumps.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../io/source_information.dart';
 import '../js_backend/backend.dart';
 import '../js_backend/backend_usage.dart';
@@ -22,8 +24,6 @@
 import '../js_backend/runtime_types.dart';
 import '../js_emitter/code_emitter_task.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../world.dart' show JClosedWorld;
 import 'jump_handler.dart';
 import 'locals_handler.dart';
diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
index c32428c..0ea8717 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -5,8 +5,8 @@
 import '../common_elements.dart' show CommonElements;
 import '../constants/values.dart';
 import '../elements/entities.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../js_backend/interceptor_data.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart' show Selector;
 import '../world.dart' show JClosedWorld;
 import 'nodes.dart';
@@ -92,11 +92,11 @@
 
   bool canUseSelfForInterceptor(HInstruction receiver,
       {Set<ClassEntity> interceptedClasses}) {
-    if (receiver.canBePrimitive(_abstractValueDomain)) {
+    if (receiver.isPrimitive(_abstractValueDomain).isPotentiallyTrue) {
       // Primitives always need interceptors.
       return false;
     }
-    if (receiver.canBeNull(_abstractValueDomain)) {
+    if (receiver.isNull(_abstractValueDomain).isPotentiallyTrue) {
       if (interceptedClasses == null ||
           interceptedClasses.contains(_commonElements.jsNullClass)) {
         // Need the JSNull interceptor.
@@ -106,7 +106,9 @@
 
     // All intercepted classes extend `Interceptor`, so if the receiver can't be
     // a class extending `Interceptor` then it can be called directly.
-    return !_abstractValueDomain.canBeInterceptor(receiver.instructionType);
+    return _abstractValueDomain
+        .isInterceptor(receiver.instructionType)
+        .isDefinitelyFalse;
   }
 
   HInstruction tryComputeConstantInterceptor(
@@ -129,21 +131,21 @@
 
   ClassEntity tryComputeConstantInterceptorFromType(
       AbstractValue type, Set<ClassEntity> interceptedClasses) {
-    if (_abstractValueDomain.canBeNull(type)) {
-      if (_abstractValueDomain.isNull(type)) {
+    if (_abstractValueDomain.isNull(type).isPotentiallyTrue) {
+      if (_abstractValueDomain.isNull(type).isDefinitelyTrue) {
         return _commonElements.jsNullClass;
       }
-    } else if (_abstractValueDomain.isIntegerOrNull(type)) {
+    } else if (_abstractValueDomain.isIntegerOrNull(type).isDefinitelyTrue) {
       return _commonElements.jsIntClass;
-    } else if (_abstractValueDomain.isDoubleOrNull(type)) {
+    } else if (_abstractValueDomain.isDoubleOrNull(type).isDefinitelyTrue) {
       return _commonElements.jsDoubleClass;
-    } else if (_abstractValueDomain.isBooleanOrNull(type)) {
+    } else if (_abstractValueDomain.isBooleanOrNull(type).isDefinitelyTrue) {
       return _commonElements.jsBoolClass;
-    } else if (_abstractValueDomain.isStringOrNull(type)) {
+    } else if (_abstractValueDomain.isStringOrNull(type).isDefinitelyTrue) {
       return _commonElements.jsStringClass;
-    } else if (_abstractValueDomain.isArray(type)) {
+    } else if (_abstractValueDomain.isArray(type).isDefinitelyTrue) {
       return _commonElements.jsArrayClass;
-    } else if (_abstractValueDomain.isNumberOrNull(type) &&
+    } else if (_abstractValueDomain.isNumberOrNull(type).isDefinitelyTrue &&
         !interceptedClasses.contains(_commonElements.jsIntClass) &&
         !interceptedClasses.contains(_commonElements.jsDoubleClass)) {
       // If the method being intercepted is not defined in [int] or [double] we
@@ -302,12 +304,18 @@
     // `NoSuchMethodError`s, and if the receiver was not null we would have a
     // constant interceptor `C`.  Then we can use `(receiver && C)` for the
     // interceptor.
-    if (receiver.canBeNull(_abstractValueDomain)) {
+    if (receiver.isNull(_abstractValueDomain).isPotentiallyTrue) {
       if (!interceptedClasses.contains(_commonElements.jsNullClass)) {
         // Can use `(receiver && C)` only if receiver is either null or truthy.
-        if (!(receiver.canBePrimitiveNumber(_abstractValueDomain) ||
-            receiver.canBePrimitiveBoolean(_abstractValueDomain) ||
-            receiver.canBePrimitiveString(_abstractValueDomain))) {
+        if (!(receiver
+                .isPrimitiveNumber(_abstractValueDomain)
+                .isPotentiallyTrue ||
+            receiver
+                .isPrimitiveBoolean(_abstractValueDomain)
+                .isPotentiallyTrue ||
+            receiver
+                .isPrimitiveString(_abstractValueDomain)
+                .isPotentiallyTrue)) {
           ClassEntity interceptorClass = tryComputeConstantInterceptorFromType(
               _abstractValueDomain.excludeNull(receiver.instructionType),
               interceptedClasses);
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index 2128638..847ad4e 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -7,9 +7,9 @@
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/names.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/call_structure.dart';
 import '../universe/selector.dart';
 import '../world.dart' show JClosedWorld;
@@ -125,11 +125,13 @@
       JClosedWorld closedWorld) {
     HInstruction receiver = instruction.inputs[1];
     HInstruction index = instruction.inputs[2];
-    if (!receiver.isMutableIndexable(closedWorld.abstractValueDomain)) {
+    if (receiver
+        .isMutableIndexable(closedWorld.abstractValueDomain)
+        .isPotentiallyFalse) {
       return null;
     }
     // TODO(johnniwinther): Merge this and the following if statement.
-    if (!index.isInteger(closedWorld.abstractValueDomain) &&
+    if (index.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse &&
         options.parameterCheckPolicy.isEmitted) {
       // We want the right checked mode error.
       return null;
@@ -159,9 +161,11 @@
     if (instruction.element != null) {
       ClassEntity cls = instruction.element.enclosingClass;
       if (cls == commonElements.typedArrayOfIntClass) {
-        return value.isInteger(closedWorld.abstractValueDomain);
+        return value
+            .isInteger(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue;
       } else if (cls == commonElements.typedArrayOfDoubleClass) {
-        return value.isNumber(closedWorld.abstractValueDomain);
+        return value.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue;
       }
     }
 
@@ -187,12 +191,15 @@
       CompilerOptions options,
       JCommonElements commonElements,
       JClosedWorld closedWorld) {
-    if (!instruction.inputs[1]
-        .isIndexablePrimitive(closedWorld.abstractValueDomain)) {
+    if (instruction.inputs[1]
+        .isIndexablePrimitive(closedWorld.abstractValueDomain)
+        .isPotentiallyFalse) {
       return null;
     }
     // TODO(johnniwinther): Merge this and the following if statement.
-    if (!instruction.inputs[2].isInteger(closedWorld.abstractValueDomain) &&
+    if (instruction.inputs[2]
+            .isInteger(closedWorld.abstractValueDomain)
+            .isPotentiallyFalse &&
         options.parameterCheckPolicy.isEmitted) {
       // We want the right checked mode error.
       return null;
@@ -221,7 +228,8 @@
     // All bitwise operations on primitive types either produce an
     // integer or throw an error.
     if (instruction.inputs[1]
-        .isPrimitiveOrNull(closedWorld.abstractValueDomain)) {
+        .isPrimitiveOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.uint32Type;
     }
     return super
@@ -236,7 +244,7 @@
       JCommonElements commonElements,
       JClosedWorld closedWorld) {
     HInstruction input = instruction.inputs[1];
-    if (input.isNumber(closedWorld.abstractValueDomain)) {
+    if (input.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return new HBitNot(
           input,
           instruction.selector,
@@ -260,13 +268,19 @@
       CompilerOptions options,
       JClosedWorld closedWorld) {
     HInstruction operand = instruction.inputs[1];
-    if (operand.isNumberOrNull(closedWorld.abstractValueDomain)) {
+    if (operand
+        .isNumberOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       // We have integer subclasses that represent ranges, so widen any int
       // subclass to full integer.
-      if (operand.isIntegerOrNull(closedWorld.abstractValueDomain)) {
+      if (operand
+          .isIntegerOrNull(closedWorld.abstractValueDomain)
+          .isDefinitelyTrue) {
         return closedWorld.abstractValueDomain.intType;
       }
-      if (operand.isDoubleOrNull(closedWorld.abstractValueDomain)) {
+      if (operand
+          .isDoubleOrNull(closedWorld.abstractValueDomain)
+          .isDefinitelyTrue) {
         return closedWorld.abstractValueDomain.doubleType;
       }
       return closedWorld.abstractValueDomain.numType;
@@ -283,7 +297,7 @@
       JCommonElements commonElements,
       JClosedWorld closedWorld) {
     HInstruction input = instruction.inputs[1];
-    if (input.isNumber(closedWorld.abstractValueDomain)) {
+    if (input.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return new HNegate(
           input,
           instruction.selector,
@@ -307,7 +321,9 @@
       CompilerOptions options,
       JClosedWorld closedWorld) {
     HInstruction input = instruction.inputs[1];
-    if (input.isNumberOrNull(closedWorld.abstractValueDomain)) {
+    if (input
+        .isNumberOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.excludeNull(input.instructionType);
     }
     return super
@@ -322,7 +338,7 @@
       JCommonElements commonElements,
       JClosedWorld closedWorld) {
     HInstruction input = instruction.inputs[1];
-    if (input.isNumber(closedWorld.abstractValueDomain)) {
+    if (input.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return new HAbs(
           input,
           instruction.selector,
@@ -343,13 +359,21 @@
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (left.isIntegerOrNull(closedWorld.abstractValueDomain) &&
-        right.isIntegerOrNull(closedWorld.abstractValueDomain)) {
+    if (left
+            .isIntegerOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue &&
+        right
+            .isIntegerOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.intType;
     }
-    if (left.isNumberOrNull(closedWorld.abstractValueDomain)) {
-      if (left.isDoubleOrNull(closedWorld.abstractValueDomain) ||
-          right.isDoubleOrNull(closedWorld.abstractValueDomain)) {
+    if (left.isNumberOrNull(closedWorld.abstractValueDomain).isDefinitelyTrue) {
+      if (left
+              .isDoubleOrNull(closedWorld.abstractValueDomain)
+              .isDefinitelyTrue ||
+          right
+              .isDoubleOrNull(closedWorld.abstractValueDomain)
+              .isDefinitelyTrue) {
         return closedWorld.abstractValueDomain.doubleType;
       }
       return closedWorld.abstractValueDomain.numType;
@@ -359,8 +383,12 @@
   }
 
   bool isBuiltin(HInvokeDynamic instruction, JClosedWorld closedWorld) {
-    return instruction.inputs[1].isNumber(closedWorld.abstractValueDomain) &&
-        instruction.inputs[2].isNumber(closedWorld.abstractValueDomain);
+    return instruction.inputs[1]
+            .isNumber(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue &&
+        instruction.inputs[2]
+            .isNumber(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue;
   }
 
   HInstruction tryConvertToBuiltin(
@@ -386,15 +414,19 @@
       HInstruction instruction, JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    return left.isPositiveIntegerOrNull(closedWorld.abstractValueDomain) &&
-        right.isPositiveIntegerOrNull(closedWorld.abstractValueDomain);
+    return left
+            .isPositiveIntegerOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue &&
+        right
+            .isPositiveIntegerOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue;
   }
 
   bool inputsAreUInt31(HInstruction instruction, JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    return left.isUInt31(closedWorld.abstractValueDomain) &&
-        right.isUInt31(closedWorld.abstractValueDomain);
+    return left.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+        right.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue;
   }
 
   HInstruction newBuiltinVariant(
@@ -452,7 +484,7 @@
       CompilerOptions options,
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
-    if (left.isNumberOrNull(closedWorld.abstractValueDomain)) {
+    if (left.isNumberOrNull(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.doubleType;
     }
     return super
@@ -680,11 +712,14 @@
   bool hasUint31Result(HInstruction instruction, JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (right.isPositiveInteger(closedWorld.abstractValueDomain)) {
-      if (left.isUInt31(closedWorld.abstractValueDomain) && isNotZero(right)) {
+    if (right
+        .isPositiveInteger(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
+      if (left.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+          isNotZero(right)) {
         return true;
       }
-      if (left.isUInt32(closedWorld.abstractValueDomain) &&
+      if (left.isUInt32(closedWorld.abstractValueDomain).isDefinitelyTrue &&
           isTwoOrGreater(right)) {
         return true;
       }
@@ -701,7 +736,9 @@
       JClosedWorld closedWorld) {
     HInstruction right = instruction.inputs[2];
     if (isBuiltin(instruction, closedWorld)) {
-      if (right.isPositiveInteger(closedWorld.abstractValueDomain) &&
+      if (right
+              .isPositiveInteger(closedWorld.abstractValueDomain)
+              .isDefinitelyTrue &&
           isNotZero(right)) {
         if (hasUint31Result(instruction, closedWorld)) {
           return newBuiltinVariant(instruction, results, options, closedWorld);
@@ -737,10 +774,10 @@
       GlobalTypeInferenceResults results,
       CompilerOptions options,
       JClosedWorld closedWorld) {
-    // All bitwise operations on primitive types either produce an
+    // All bitwise operations on number types either produce an unsigned 32-bit
     // integer or throw an error.
     HInstruction left = instruction.inputs[1];
-    if (left.isPrimitiveOrNull(closedWorld.abstractValueDomain)) {
+    if (left.isNumberOrNull(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.uint32Type;
     }
     return super
@@ -772,7 +809,9 @@
   bool isPositive(HInstruction instruction, JClosedWorld closedWorld) {
     // TODO: We should use the value range analysis. Currently, ranges
     // are discarded just after the analysis.
-    return instruction.isPositiveInteger(closedWorld.abstractValueDomain);
+    return instruction
+        .isPositiveInteger(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue;
   }
 }
 
@@ -792,7 +831,7 @@
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (left.isNumber(closedWorld.abstractValueDomain)) {
+    if (left.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       if (argumentLessThan32(right)) {
         return newBuiltinVariant(instruction, results, options, closedWorld);
       }
@@ -830,8 +869,9 @@
       CompilerOptions options,
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
-    if (left.isUInt32(closedWorld.abstractValueDomain))
+    if (left.isUInt32(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return left.instructionType;
+    }
     return super
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
@@ -845,7 +885,7 @@
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (left.isNumber(closedWorld.abstractValueDomain)) {
+    if (left.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       if (argumentLessThan32(right) && isPositive(left, closedWorld)) {
         return newBuiltinVariant(instruction, results, options, closedWorld);
       }
@@ -857,7 +897,7 @@
         instruction.selector = renameToOptimizedSelector(
             '_shrBothPositive', instruction.selector, commonElements);
       } else if (isPositive(left, closedWorld) &&
-          right.isNumber(closedWorld.abstractValueDomain)) {
+          right.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
         instruction.selector = renameToOptimizedSelector(
             '_shrReceiverPositive', instruction.selector, commonElements);
       } else if (isPositive(right, closedWorld)) {
@@ -899,8 +939,8 @@
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (left.isUInt31(closedWorld.abstractValueDomain) &&
-        right.isUInt31(closedWorld.abstractValueDomain)) {
+    if (left.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+        right.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.uint31Type;
     }
     return super
@@ -934,9 +974,11 @@
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (left.isPrimitiveOrNull(closedWorld.abstractValueDomain) &&
-        (left.isUInt31(closedWorld.abstractValueDomain) ||
-            right.isUInt31(closedWorld.abstractValueDomain))) {
+    if (left
+            .isPrimitiveOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue &&
+        (left.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue ||
+            right.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue)) {
       return closedWorld.abstractValueDomain.uint31Type;
     }
     return super
@@ -970,8 +1012,8 @@
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (left.isUInt31(closedWorld.abstractValueDomain) &&
-        right.isUInt31(closedWorld.abstractValueDomain)) {
+    if (left.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+        right.isUInt31(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.uint31Type;
     }
     return super
@@ -1000,7 +1042,8 @@
       CompilerOptions options,
       JClosedWorld closedWorld) {
     if (instruction.inputs[1]
-        .isPrimitiveOrNull(closedWorld.abstractValueDomain)) {
+        .isPrimitiveOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       return closedWorld.abstractValueDomain.boolType;
     }
     return super
@@ -1016,8 +1059,8 @@
       JClosedWorld closedWorld) {
     HInstruction left = instruction.inputs[1];
     HInstruction right = instruction.inputs[2];
-    if (left.isNumber(closedWorld.abstractValueDomain) &&
-        right.isNumber(closedWorld.abstractValueDomain)) {
+    if (left.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+        right.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return newBuiltinVariant(instruction, closedWorld);
     }
     return null;
@@ -1041,7 +1084,9 @@
     HInstruction right = instruction.inputs[2];
     AbstractValue instructionType = left.instructionType;
     if (right.isConstantNull() ||
-        left.isPrimitiveOrNull(closedWorld.abstractValueDomain)) {
+        left
+            .isPrimitiveOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue) {
       return newBuiltinVariant(instruction, closedWorld);
     }
     if (closedWorld.includesClosureCall(
@@ -1144,13 +1189,16 @@
     // TODO(sra): Implement a builtin HCodeUnitAt instruction and the same index
     // bounds checking optimizations as for HIndex.
     HInstruction receiver = instruction.getDartReceiver(closedWorld);
-    if (receiver.isStringOrNull(closedWorld.abstractValueDomain)) {
+    if (receiver
+        .isStringOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       // Even if there is no builtin equivalent instruction, we know
       // String.codeUnitAt does not have any side effect (other than throwing),
       // and that it can be GVN'ed.
       clearAllSideEffects(instruction);
       if (instruction.inputs.last
-          .isPositiveInteger(closedWorld.abstractValueDomain)) {
+          .isPositiveInteger(closedWorld.abstractValueDomain)
+          .isDefinitelyTrue) {
         instruction.selector = renameToOptimizedSelector(
             '_codeUnitAt', instruction.selector, commonElements);
       }
@@ -1172,15 +1220,27 @@
     HInstruction receiver = instruction.getDartReceiver(closedWorld);
     // `compareTo` has no side-effect (other than throwing) and can be GVN'ed
     // for some known types.
-    if (receiver.isStringOrNull(closedWorld.abstractValueDomain) ||
-        receiver.isNumberOrNull(closedWorld.abstractValueDomain)) {
+    if (receiver
+            .isStringOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue ||
+        receiver
+            .isNumberOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue) {
       // Replace `a.compareTo(a)` with `0`, but only if receiver and argument
       // are such that no exceptions can be thrown.
       HInstruction argument = instruction.inputs.last;
-      if ((receiver.isNumber(closedWorld.abstractValueDomain) &&
-              argument.isNumber(closedWorld.abstractValueDomain)) ||
-          (receiver.isString(closedWorld.abstractValueDomain) &&
-              argument.isString(closedWorld.abstractValueDomain))) {
+      if ((receiver
+                  .isNumber(closedWorld.abstractValueDomain)
+                  .isDefinitelyTrue &&
+              argument
+                  .isNumber(closedWorld.abstractValueDomain)
+                  .isDefinitelyTrue) ||
+          (receiver
+                  .isString(closedWorld.abstractValueDomain)
+                  .isDefinitelyTrue &&
+              argument
+                  .isString(closedWorld.abstractValueDomain)
+                  .isDefinitelyTrue)) {
         if (identical(receiver.nonCheck(), argument.nonCheck())) {
           return graph.addConstantInt(0, closedWorld);
         }
@@ -1202,7 +1262,9 @@
       JCommonElements commonElements,
       JClosedWorld closedWorld) {
     HInstruction receiver = instruction.getDartReceiver(closedWorld);
-    if (receiver.isStringOrNull(closedWorld.abstractValueDomain)) {
+    if (receiver
+        .isStringOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       // String.xxx does not have any side effect (other than throwing), and it
       // can be GVN'ed.
       clearAllSideEffects(instruction);
@@ -1231,8 +1293,12 @@
       JClosedWorld closedWorld) {
     HInstruction receiver = instruction.getDartReceiver(closedWorld);
     HInstruction pattern = instruction.inputs[2];
-    if (receiver.isStringOrNull(closedWorld.abstractValueDomain) &&
-        pattern.isStringOrNull(closedWorld.abstractValueDomain)) {
+    if (receiver
+            .isStringOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue &&
+        pattern
+            .isStringOrNull(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue) {
       // String.contains(String s) does not have any side effect (other than
       // throwing), and it can be GVN'ed.
       clearAllSideEffects(instruction);
@@ -1256,7 +1322,9 @@
       JCommonElements commonElements,
       JClosedWorld closedWorld) {
     HInstruction receiver = instruction.getDartReceiver(closedWorld);
-    if (receiver.isNumberOrNull(closedWorld.abstractValueDomain)) {
+    if (receiver
+        .isNumberOrNull(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       // Even if there is no builtin equivalent instruction, we know the
       // instruction does not have any side effect, and that it can be GVN'ed.
       clearAllSideEffects(instruction);
diff --git a/pkg/compiler/lib/src/ssa/kernel_string_builder.dart b/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
index 3b52451..e30817c 100644
--- a/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
@@ -33,7 +33,7 @@
     //      conversions.
     //   2. The value can be primitive, because the library stringifier has
     //      fast-path code for most primitives.
-    if (expression.canBePrimitive(builder.abstractValueDomain)) {
+    if (expression.isPrimitive(builder.abstractValueDomain).isPotentiallyTrue) {
       append(stringify(expression));
       return;
     }
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart
index 98e128f..ff3ec93 100644
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart
@@ -6,13 +6,13 @@
 import '../common.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../io/source_information.dart';
 import '../js_backend/native_data.dart';
 import '../js_backend/interceptor_data.dart';
 import '../js_model/closure.dart' show JRecordField, JClosureField;
 import '../js_model/locals.dart' show JLocal;
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../world.dart' show JClosedWorld;
 
 import 'graph_builder.dart';
diff --git a/pkg/compiler/lib/src/ssa/logging.dart b/pkg/compiler/lib/src/ssa/logging.dart
new file mode 100644
index 0000000..c213791
--- /dev/null
+++ b/pkg/compiler/lib/src/ssa/logging.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 'nodes.dart';
+import '../util/features.dart';
+
+/// Log used for unit testing optimizations.
+class OptimizationLog {
+  List<OptimizationLogEntry> entries = [];
+
+  void registerFieldGet(HInvokeDynamicGetter node, HFieldGet fieldGet) {
+    Features features = new Features();
+    features['name'] =
+        '${fieldGet.element.enclosingClass.name}.${fieldGet.element.name}';
+    entries.add(new OptimizationLogEntry('FieldGet', features));
+  }
+
+  void registerFieldSet(HInvokeDynamicSetter node, HFieldSet fieldSet) {
+    Features features = new Features();
+    features['name'] =
+        '${fieldSet.element.enclosingClass.name}.${fieldSet.element.name}';
+    entries.add(new OptimizationLogEntry('FieldSet', features));
+  }
+
+  String getText() {
+    return entries.join(',\n');
+  }
+}
+
+/// A registered optimization.
+class OptimizationLogEntry {
+  /// String that uniquely identifies the optimization kind.
+  final String tag;
+
+  /// Additional data for this optimization.
+  final Features features;
+
+  OptimizationLogEntry(this.tag, this.features);
+
+  String toString() => '$tag(${features.getText()})';
+}
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 222f33d..568ae0b 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -13,11 +13,11 @@
 import '../elements/entities.dart';
 import '../elements/jumps.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../io/source_information.dart';
 import '../js/js.dart' as js;
 import '../js_backend/js_backend.dart';
 import '../native/behavior.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/selector.dart' show Selector;
 import '../universe/side_effects.dart' show SideEffects;
 import '../util/util.dart';
@@ -1021,87 +1021,88 @@
   bool isValue(AbstractValueDomain domain) =>
       domain.isPrimitiveValue(instructionType);
 
-  bool canBeNull(AbstractValueDomain domain) =>
-      domain.canBeNull(instructionType);
+  AbstractBool isNull(AbstractValueDomain domain) =>
+      domain.isNull(instructionType);
 
-  bool isNull(AbstractValueDomain domain) => domain.isNull(instructionType);
-
-  bool isConflicting(AbstractValueDomain domain) =>
+  AbstractBool isConflicting(AbstractValueDomain domain) =>
       domain.isEmpty(instructionType);
 
-  bool canBePrimitive(AbstractValueDomain domain) =>
-      domain.canBePrimitive(instructionType);
-
-  bool canBePrimitiveNumber(AbstractValueDomain domain) =>
-      domain.canBePrimitiveNumber(instructionType);
-
-  bool canBePrimitiveBoolean(AbstractValueDomain domain) =>
-      domain.canBePrimitiveBoolean(instructionType);
-
-  bool canBePrimitiveArray(AbstractValueDomain domain) =>
-      domain.canBePrimitiveArray(instructionType);
-
-  bool isIndexablePrimitive(AbstractValueDomain domain) =>
-      domain.isIndexablePrimitive(instructionType);
-
-  bool isFixedArray(AbstractValueDomain domain) =>
-      domain.isFixedArray(instructionType);
-
-  bool isExtendableArray(AbstractValueDomain domain) =>
-      domain.isExtendableArray(instructionType);
-
-  bool isMutableArray(AbstractValueDomain domain) =>
-      domain.isMutableArray(instructionType);
-
-  bool isMutableIndexable(AbstractValueDomain domain) =>
-      domain.isMutableIndexable(instructionType);
-
-  bool isArray(AbstractValueDomain domain) => domain.isArray(instructionType);
-
-  bool canBePrimitiveString(AbstractValueDomain domain) =>
-      domain.canBePrimitiveString(instructionType);
-
-  bool isInteger(AbstractValueDomain domain) =>
-      domain.isInteger(instructionType);
-
-  bool isUInt32(AbstractValueDomain domain) => domain.isUInt32(instructionType);
-
-  bool isUInt31(AbstractValueDomain domain) => domain.isUInt31(instructionType);
-
-  bool isPositiveInteger(AbstractValueDomain domain) =>
-      domain.isPositiveInteger(instructionType);
-
-  bool isPositiveIntegerOrNull(AbstractValueDomain domain) =>
-      domain.isPositiveIntegerOrNull(instructionType);
-
-  bool isIntegerOrNull(AbstractValueDomain domain) =>
-      domain.isIntegerOrNull(instructionType);
-
-  bool isNumber(AbstractValueDomain domain) => domain.isNumber(instructionType);
-
-  bool isNumberOrNull(AbstractValueDomain domain) =>
-      domain.isNumberOrNull(instructionType);
-
-  bool isDouble(AbstractValueDomain domain) => domain.isDouble(instructionType);
-
-  bool isDoubleOrNull(AbstractValueDomain domain) =>
-      domain.isDoubleOrNull(instructionType);
-
-  bool isBoolean(AbstractValueDomain domain) =>
-      domain.isBoolean(instructionType);
-
-  bool isBooleanOrNull(AbstractValueDomain domain) =>
-      domain.isBooleanOrNull(instructionType);
-
-  bool isString(AbstractValueDomain domain) => domain.isString(instructionType);
-
-  bool isStringOrNull(AbstractValueDomain domain) =>
-      domain.isStringOrNull(instructionType);
-
-  bool isPrimitive(AbstractValueDomain domain) =>
+  AbstractBool isPrimitive(AbstractValueDomain domain) =>
       domain.isPrimitive(instructionType);
 
-  bool isPrimitiveOrNull(AbstractValueDomain domain) =>
+  AbstractBool isPrimitiveNumber(AbstractValueDomain domain) =>
+      domain.isPrimitiveNumber(instructionType);
+
+  AbstractBool isPrimitiveBoolean(AbstractValueDomain domain) =>
+      domain.isPrimitiveBoolean(instructionType);
+
+  AbstractBool isPrimitiveArray(AbstractValueDomain domain) =>
+      domain.isPrimitiveArray(instructionType);
+
+  AbstractBool isIndexablePrimitive(AbstractValueDomain domain) =>
+      domain.isIndexablePrimitive(instructionType);
+
+  AbstractBool isFixedArray(AbstractValueDomain domain) =>
+      domain.isFixedArray(instructionType);
+
+  AbstractBool isExtendableArray(AbstractValueDomain domain) =>
+      domain.isExtendableArray(instructionType);
+
+  AbstractBool isMutableArray(AbstractValueDomain domain) =>
+      domain.isMutableArray(instructionType);
+
+  AbstractBool isMutableIndexable(AbstractValueDomain domain) =>
+      domain.isMutableIndexable(instructionType);
+
+  AbstractBool isArray(AbstractValueDomain domain) =>
+      domain.isArray(instructionType);
+
+  AbstractBool isPrimitiveString(AbstractValueDomain domain) =>
+      domain.isPrimitiveString(instructionType);
+
+  AbstractBool isInteger(AbstractValueDomain domain) =>
+      domain.isInteger(instructionType);
+
+  AbstractBool isUInt32(AbstractValueDomain domain) =>
+      domain.isUInt32(instructionType);
+
+  AbstractBool isUInt31(AbstractValueDomain domain) =>
+      domain.isUInt31(instructionType);
+
+  AbstractBool isPositiveInteger(AbstractValueDomain domain) =>
+      domain.isPositiveInteger(instructionType);
+
+  AbstractBool isPositiveIntegerOrNull(AbstractValueDomain domain) =>
+      domain.isPositiveIntegerOrNull(instructionType);
+
+  AbstractBool isIntegerOrNull(AbstractValueDomain domain) =>
+      domain.isIntegerOrNull(instructionType);
+
+  AbstractBool isNumber(AbstractValueDomain domain) =>
+      domain.isNumber(instructionType);
+
+  AbstractBool isNumberOrNull(AbstractValueDomain domain) =>
+      domain.isNumberOrNull(instructionType);
+
+  AbstractBool isDouble(AbstractValueDomain domain) =>
+      domain.isDouble(instructionType);
+
+  AbstractBool isDoubleOrNull(AbstractValueDomain domain) =>
+      domain.isDoubleOrNull(instructionType);
+
+  AbstractBool isBoolean(AbstractValueDomain domain) =>
+      domain.isBoolean(instructionType);
+
+  AbstractBool isBooleanOrNull(AbstractValueDomain domain) =>
+      domain.isBooleanOrNull(instructionType);
+
+  AbstractBool isString(AbstractValueDomain domain) =>
+      domain.isString(instructionType);
+
+  AbstractBool isStringOrNull(AbstractValueDomain domain) =>
+      domain.isStringOrNull(instructionType);
+
+  AbstractBool isPrimitiveOrNull(AbstractValueDomain domain) =>
       domain.isPrimitiveOrNull(instructionType);
 
   /**
@@ -1279,7 +1280,7 @@
     if (type.isDynamic) return this;
     if (type.isVoid) return this;
     if (type == closedWorld.commonElements.objectType) return this;
-    if (type.isFunctionType || type.isMalformed || type.isFutureOr) {
+    if (type.isFunctionType || type.isFutureOr) {
       return new HTypeConversion(type, kind,
           closedWorld.abstractValueDomain.dynamicType, this, sourceInformation);
     }
@@ -1328,7 +1329,7 @@
   /// dominated block. (There can be many such edges on a single phi at the exit
   /// of a loop with many break statements).  If [excludePhiOutEdges] is `true`
   /// then these edge uses are not included.
-  static of(HInstruction source, HInstruction dominator,
+  static DominatedUses of(HInstruction source, HInstruction dominator,
       {bool excludeDominator: false, bool excludePhiOutEdges: false}) {
     return new DominatedUses._(source)
       .._compute(source, dominator, excludeDominator, excludePhiOutEdges);
@@ -1727,13 +1728,18 @@
   List<DartType> get typeArguments => const <DartType>[];
 
   // There might be an interceptor input, so `inputs.last` is the dart receiver.
-  bool canThrow(AbstractValueDomain domain) =>
-      isTearOff ? inputs.last.canBeNull(domain) : super.canThrow(domain);
+  bool canThrow(AbstractValueDomain domain) => isTearOff
+      ? inputs.last.isNull(domain).isPotentiallyTrue
+      : super.canThrow(domain);
 
   String toString() => 'invoke dynamic getter: selector=$selector, mask=$mask';
 }
 
 class HInvokeDynamicSetter extends HInvokeDynamicField {
+  /// If `true` a call to the setter is needed for checking the type even
+  /// though the target field is known.
+  bool needsCheck = false;
+
   HInvokeDynamicSetter(
       Selector selector,
       AbstractValue mask,
@@ -1750,7 +1756,8 @@
 
   List<DartType> get typeArguments => const <DartType>[];
 
-  String toString() => 'invoke dynamic setter: selector=$selector, mask=$mask';
+  String toString() =>
+      'invoke dynamic setter: selector=$selector, mask=$mask, element=$element';
 }
 
 class HInvokeStatic extends HInvoke {
@@ -1900,7 +1907,8 @@
     return false;
   }
 
-  bool canThrow(AbstractValueDomain domain) => receiver.canBeNull(domain);
+  bool canThrow(AbstractValueDomain domain) =>
+      receiver.isNull(domain).isPotentiallyTrue;
 
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
   bool onlyThrowsNSM() => true;
@@ -1911,7 +1919,7 @@
   int typeCode() => HInstruction.FIELD_GET_TYPECODE;
   bool typeEquals(other) => other is HFieldGet;
   bool dataEquals(HFieldGet other) => element == other.element;
-  String toString() => "FieldGet $element";
+  String toString() => "FieldGet(element=$element,type=$instructionType)";
 }
 
 class HFieldSet extends HFieldAccess {
@@ -1923,7 +1931,8 @@
     sideEffects.setChangesInstanceProperty();
   }
 
-  bool canThrow(AbstractValueDomain domain) => receiver.canBeNull(domain);
+  bool canThrow(AbstractValueDomain domain) =>
+      receiver.isNull(domain).isPotentiallyTrue;
 
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
   bool onlyThrowsNSM() => true;
@@ -1932,7 +1941,7 @@
   accept(HVisitor visitor) => visitor.visitFieldSet(this);
 
   bool isJsStatement() => true;
-  String toString() => "FieldSet $element";
+  String toString() => "FieldSet(element=$element,type=$instructionType)";
 }
 
 class HGetLength extends HInstruction {
@@ -1951,7 +1960,8 @@
 
   HInstruction get receiver => inputs.single;
 
-  bool canThrow(AbstractValueDomain domain) => receiver.canBeNull(domain);
+  bool canThrow(AbstractValueDomain domain) =>
+      receiver.isNull(domain).isPotentiallyTrue;
 
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
   bool onlyThrowsNSM() => true;
@@ -2004,7 +2014,8 @@
   bool get isPostOp => opKind == POST_OP;
   bool get isAssignOp => opKind == ASSIGN_OP;
 
-  bool canThrow(AbstractValueDomain domain) => receiver.canBeNull(domain);
+  bool canThrow(AbstractValueDomain domain) =>
+      receiver.isNull(domain).isPotentiallyTrue;
 
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
   bool onlyThrowsNSM() => true;
@@ -2107,7 +2118,7 @@
   bool isJsStatement() => isStatement;
   bool canThrow(AbstractValueDomain domain) {
     if (inputs.length > 0) {
-      return inputs.first.canBeNull(domain)
+      return inputs.first.isNull(domain).isPotentiallyTrue
           ? throwBehavior.canThrow
           : throwBehavior.onNonNull.canThrow;
     }
@@ -2119,7 +2130,7 @@
   bool isAllocation(AbstractValueDomain domain) =>
       nativeBehavior != null &&
       nativeBehavior.isAllocation &&
-      !canBeNull(domain);
+      isNull(domain).isDefinitelyFalse;
 
   int typeCode() => HInstruction.FOREIGN_CODE_TYPECODE;
   bool typeEquals(other) => other is HForeignCode;
@@ -2824,6 +2835,7 @@
 class HOneShotInterceptor extends HInvokeDynamic {
   List<DartType> typeArguments;
   Set<ClassEntity> interceptedClasses;
+
   HOneShotInterceptor(
       AbstractValueDomain domain,
       Selector selector,
@@ -2834,7 +2846,7 @@
       this.interceptedClasses)
       : super(selector, mask, null, inputs, true, type) {
     assert(inputs[0] is HConstant);
-    assert(inputs[0].isNull(domain));
+    assert(inputs[0].instructionType == domain.nullType);
     assert(selector.callStructure.typeArgumentCount == typeArguments.length);
   }
   bool isCallOnInterceptor(JClosedWorld closedWorld) => true;
@@ -2919,7 +2931,8 @@
 
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
   bool onlyThrowsNSM() => true;
-  bool canThrow(AbstractValueDomain domain) => receiver.canBeNull(domain);
+  bool canThrow(AbstractValueDomain domain) =>
+      receiver.isNull(domain).isPotentiallyTrue;
 
   int typeCode() => HInstruction.INDEX_TYPECODE;
   bool typeEquals(HInstruction other) => other is HIndex;
@@ -2952,7 +2965,8 @@
 
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
   bool onlyThrowsNSM() => true;
-  bool canThrow(AbstractValueDomain domain) => receiver.canBeNull(domain);
+  bool canThrow(AbstractValueDomain domain) =>
+      receiver.isNull(domain).isPotentiallyTrue;
 }
 
 class HIs extends HInstruction {
@@ -3120,6 +3134,7 @@
         super(<HInstruction>[input], type) {
     assert(!isReceiverTypeCheck || receiverTypeCheckSelector != null);
     assert(typeExpression == null || !typeExpression.isTypedef);
+    assert(!isControlFlow() || typeExpression != null);
     sourceElement = input.sourceElement;
     this.sourceInformation = sourceInformation;
   }
@@ -3194,36 +3209,39 @@
     AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
     DartType type = typeExpression;
     if (type != null) {
-      if (type.isMalformed) {
-        // Malformed types are treated as dynamic statically, but should
-        // throw a type error at runtime.
-        return false;
-      }
       if (type.isTypeVariable) {
         return false;
       }
       if (type.isFutureOr) {
         // `null` always passes type conversion.
-        if (checkedInput.isNull(abstractValueDomain)) return true;
+        if (checkedInput.isNull(abstractValueDomain).isDefinitelyTrue) {
+          return true;
+        }
         // TODO(johnniwinther): Optimize FutureOr type conversions.
         return false;
       }
       if (!type.treatAsRaw) {
         // `null` always passes type conversion.
-        if (checkedInput.isNull(abstractValueDomain)) return true;
+        if (checkedInput.isNull(abstractValueDomain).isDefinitelyTrue) {
+          return true;
+        }
         return false;
       }
       if (type.isFunctionType) {
         // `null` always passes type conversion.
-        if (checkedInput.isNull(abstractValueDomain)) return true;
+        if (checkedInput.isNull(abstractValueDomain).isDefinitelyTrue) {
+          return true;
+        }
         // TODO(johnniwinther): Optimize function type conversions.
         return false;
       }
     }
     // Type is refined from `dynamic`, so it might become non-redundant.
-    if (abstractValueDomain.containsAll(checkedType)) return false;
+    if (abstractValueDomain.containsAll(checkedType).isPotentiallyTrue) {
+      return false;
+    }
     AbstractValue inputType = checkedInput.instructionType;
-    return abstractValueDomain.isIn(inputType, checkedType);
+    return abstractValueDomain.isIn(inputType, checkedType).isDefinitelyTrue;
   }
 
   String toString() => 'HTypeConversion(type=$typeExpression, kind=$kind, '
@@ -3270,9 +3288,11 @@
 
   bool isRedundant(JClosedWorld closedWorld) {
     AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
-    if (abstractValueDomain.containsAll(knownType)) return false;
+    if (abstractValueDomain.containsAll(knownType).isPotentiallyTrue) {
+      return false;
+    }
     AbstractValue inputType = checkedInput.instructionType;
-    return abstractValueDomain.isIn(inputType, knownType);
+    return abstractValueDomain.isIn(inputType, knownType).isDefinitelyTrue;
   }
 }
 
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index e4b5eab..72a69eb 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import '../common.dart';
 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
 import '../common/names.dart' show Selectors;
 import '../common/tasks.dart' show CompilerTask;
@@ -11,6 +12,8 @@
 import '../common_elements.dart' show JCommonElements;
 import '../elements/entities.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../js/js.dart' as js;
 import '../js_backend/allocator_analysis.dart' show JAllocatorAnalysis;
 import '../js_backend/backend.dart';
@@ -18,14 +21,13 @@
 import '../js_backend/runtime_types.dart';
 import '../native/behavior.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/selector.dart' show Selector;
 import '../universe/side_effects.dart' show SideEffects;
 import '../universe/use.dart' show StaticUse;
 import '../util/util.dart';
 import '../world.dart' show JClosedWorld;
 import 'interceptor_simplifier.dart';
+import 'logging.dart';
 import 'nodes.dart';
 import 'types.dart';
 import 'types_propagation.dart';
@@ -42,6 +44,8 @@
 
   Map<HInstruction, Range> ranges = <HInstruction, Range>{};
 
+  Map<MemberEntity, OptimizationLog> loggersForTesting;
+
   SsaOptimizerTask(this._backend) : super(_backend.compiler.measurer);
 
   String get name => 'SSA optimizer';
@@ -65,12 +69,19 @@
     Set<HInstruction> boundsChecked = new Set<HInstruction>();
     SsaCodeMotion codeMotion;
     SsaLoadElimination loadElimination;
+
+    OptimizationLog log;
+    if (retainDataForTesting) {
+      loggersForTesting ??= {};
+      loggersForTesting[work.element] = log = new OptimizationLog();
+    }
+
     measure(() {
       List<OptimizationPhase> phases = <OptimizationPhase>[
         // Run trivial instruction simplification first to optimize
         // some patterns useful for type conversion.
         new SsaInstructionSimplifier(globalInferenceResults, _options,
-            _rtiSubstitutions, closedWorld, registry),
+            _rtiSubstitutions, closedWorld, registry, log),
         new SsaTypeConversionInserter(closedWorld),
         new SsaRedundantPhiEliminator(),
         new SsaDeadPhiEliminator(),
@@ -79,10 +90,10 @@
         // After type propagation, more instructions can be
         // simplified.
         new SsaInstructionSimplifier(globalInferenceResults, _options,
-            _rtiSubstitutions, closedWorld, registry),
+            _rtiSubstitutions, closedWorld, registry, log),
         new SsaCheckInserter(trustPrimitives, closedWorld, boundsChecked),
         new SsaInstructionSimplifier(globalInferenceResults, _options,
-            _rtiSubstitutions, closedWorld, registry),
+            _rtiSubstitutions, closedWorld, registry, log),
         new SsaCheckInserter(trustPrimitives, closedWorld, boundsChecked),
         new SsaTypePropagator(globalInferenceResults, _options,
             closedWorld.commonElements, closedWorld),
@@ -108,7 +119,7 @@
         // Previous optimizations may have generated new
         // opportunities for instruction simplification.
         new SsaInstructionSimplifier(globalInferenceResults, _options,
-            _rtiSubstitutions, closedWorld, registry),
+            _rtiSubstitutions, closedWorld, registry, log),
         new SsaCheckInserter(trustPrimitives, closedWorld, boundsChecked),
       ];
       phases.forEach(runPhase);
@@ -131,7 +142,7 @@
           new SsaCodeMotion(closedWorld.abstractValueDomain),
           new SsaValueRangeAnalyzer(closedWorld, this),
           new SsaInstructionSimplifier(globalInferenceResults, _options,
-              _rtiSubstitutions, closedWorld, registry),
+              _rtiSubstitutions, closedWorld, registry, log),
           new SsaCheckInserter(trustPrimitives, closedWorld, boundsChecked),
           new SsaSimplifyInterceptors(closedWorld, work.element.enclosingClass),
           new SsaDeadCodeEliminator(closedWorld, this),
@@ -143,7 +154,7 @@
           // Run the simplifier to remove unneeded type checks inserted by
           // type propagation.
           new SsaInstructionSimplifier(globalInferenceResults, _options,
-              _rtiSubstitutions, closedWorld, registry),
+              _rtiSubstitutions, closedWorld, registry, log),
         ];
       }
       phases.forEach(runPhase);
@@ -155,16 +166,17 @@
 /// cannot change.  The current implementation is conservative for the purpose
 /// of identifying gvn-able lengths and mis-identifies some unions of fixed
 /// length indexables (see TODO) as not fixed length.
-bool isFixedLength(mask, JClosedWorld closedWorld) {
-  if (mask.isContainer && mask.length != null) {
+bool isFixedLength(AbstractValue mask, JClosedWorld closedWorld) {
+  AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
+  if (abstractValueDomain.isContainer(mask) &&
+      abstractValueDomain.getContainerLength(mask) != null) {
     // A container on which we have inferred the length.
     return true;
   }
   // TODO(sra): Recognize any combination of fixed length indexables.
-  if (mask.containsOnly(closedWorld.commonElements.jsFixedArrayClass) ||
-      mask.containsOnly(closedWorld.commonElements.jsUnmodifiableArrayClass) ||
-      mask.containsOnlyString(closedWorld) ||
-      closedWorld.abstractValueDomain.isTypedArray(mask)) {
+  if (abstractValueDomain.isFixedArray(mask).isDefinitelyTrue ||
+      abstractValueDomain.isStringOrNull(mask).isDefinitelyTrue ||
+      abstractValueDomain.isTypedArray(mask).isDefinitelyTrue) {
     return true;
   }
   return false;
@@ -187,10 +199,11 @@
   final RuntimeTypesSubstitutions _rtiSubstitutions;
   final JClosedWorld _closedWorld;
   final CodegenRegistry _registry;
+  final OptimizationLog _log;
   HGraph _graph;
 
   SsaInstructionSimplifier(this._globalInferenceResults, this._options,
-      this._rtiSubstitutions, this._closedWorld, this._registry);
+      this._rtiSubstitutions, this._closedWorld, this._registry, this._log);
 
   JCommonElements get commonElements => _closedWorld.commonElements;
 
@@ -220,8 +233,12 @@
         // might be that an operation thought to return double, can be
         // simplified to an int. For example:
         // `2.5 * 10`.
-        if (!(replacement.isNumberOrNull(_abstractValueDomain) &&
-            instruction.isNumberOrNull(_abstractValueDomain))) {
+        if (!(replacement
+                .isNumberOrNull(_abstractValueDomain)
+                .isDefinitelyTrue &&
+            instruction
+                .isNumberOrNull(_abstractValueDomain)
+                .isDefinitelyTrue)) {
           // If we can replace [instruction] with [replacement], then
           // [replacement]'s type can be narrowed.
           AbstractValue newType = _abstractValueDomain.intersection(
@@ -278,9 +295,9 @@
 
     if (test is! HIdentity) return;
     HInstruction tested;
-    if (test.inputs[0].isNull(_abstractValueDomain)) {
+    if (test.inputs[0].isNull(_abstractValueDomain).isDefinitelyTrue) {
       tested = test.inputs[1];
-    } else if (test.inputs[1].isNull(_abstractValueDomain)) {
+    } else if (test.inputs[1].isNull(_abstractValueDomain).isDefinitelyTrue) {
       tested = test.inputs[0];
     } else {
       return;
@@ -298,7 +315,9 @@
     // This ofen comes from the dart code `x ?? false`.
     if (_sameOrRefinementOf(tested, whenNotNullValue) &&
         _isBoolConstant(whenNullValue, false) &&
-        whenNotNullValue.isBooleanOrNull(_abstractValueDomain) &&
+        whenNotNullValue
+            .isBooleanOrNull(_abstractValueDomain)
+            .isDefinitelyTrue &&
         _mostlyEmpty(whenNullBlock) &&
         _mostlyEmpty(whenNotNullBlock)) {
       HInstruction trueConstant = _graph.addConstantBool(true, _closedWorld);
@@ -318,7 +337,9 @@
     // This ofen comes from the dart code `x ?? true`.
     if (_sameOrRefinementOf(tested, whenNotNullValue) &&
         _isBoolConstant(whenNullValue, true) &&
-        whenNotNullValue.isBooleanOrNull(_abstractValueDomain) &&
+        whenNotNullValue
+            .isBooleanOrNull(_abstractValueDomain)
+            .isDefinitelyTrue &&
         _mostlyEmpty(whenNullBlock) &&
         _mostlyEmpty(whenNotNullBlock)) {
       HInstruction falseConstant = _graph.addConstantBool(false, _closedWorld);
@@ -372,7 +393,7 @@
 
   ConstantValue getConstantFromType(HInstruction node) {
     if (node.isValue(_abstractValueDomain) &&
-        !node.canBeNull(_abstractValueDomain)) {
+        node.isNull(_abstractValueDomain).isDefinitelyFalse) {
       ConstantValue value =
           _abstractValueDomain.getPrimitiveValue(node.instructionType);
       if (value.isBool) {
@@ -423,17 +444,23 @@
     List<HInstruction> inputs = node.inputs;
     assert(inputs.length == 1);
     HInstruction input = inputs[0];
-    if (input.isBoolean(_abstractValueDomain)) return input;
+    if (input.isBoolean(_abstractValueDomain).isDefinitelyTrue) {
+      return input;
+    }
 
     // If the code is unreachable, remove the HBoolify.  This can happen when
     // there is a throw expression in a short-circuit conditional.  Removing the
     // unreachable HBoolify makes it easier to reconstruct the short-circuit
     // operation.
-    if (_abstractValueDomain.isEmpty(input.instructionType)) return input;
+    if (_abstractValueDomain.isEmpty(input.instructionType).isDefinitelyTrue) {
+      return input;
+    }
 
     // All values that cannot be 'true' are boolified to false.
     AbstractValue mask = input.instructionType;
-    if (!_abstractValueDomain.containsType(mask, commonElements.jsBoolClass)) {
+    if (_abstractValueDomain
+        .containsType(mask, commonElements.jsBoolClass)
+        .isPotentiallyFalse) {
       return _graph.addConstantBool(false, _closedWorld);
     }
     return node;
@@ -470,7 +497,9 @@
 
   HInstruction tryOptimizeLengthInterceptedGetter(HInvokeDynamic node) {
     HInstruction actualReceiver = node.inputs[1];
-    if (actualReceiver.isIndexablePrimitive(_abstractValueDomain)) {
+    if (actualReceiver
+        .isIndexablePrimitive(_abstractValueDomain)
+        .isDefinitelyTrue) {
       if (actualReceiver.isConstantString()) {
         HConstant constantInput = actualReceiver;
         StringConstantValue constant = constantInput.constant;
@@ -485,11 +514,13 @@
       AbstractValue actualType = node.instructionType;
       AbstractValue resultType = _abstractValueDomain.positiveIntType;
       // If we already have computed a more specific type, keep that type.
-      if (_abstractValueDomain.isInstanceOfOrNull(
-          actualType, commonElements.jsUInt31Class)) {
+      if (_abstractValueDomain
+          .isInstanceOfOrNull(actualType, commonElements.jsUInt31Class)
+          .isDefinitelyTrue) {
         resultType = _abstractValueDomain.uint31Type;
-      } else if (_abstractValueDomain.isInstanceOfOrNull(
-          actualType, commonElements.jsUInt32Class)) {
+      } else if (_abstractValueDomain
+          .isInstanceOfOrNull(actualType, commonElements.jsUInt32Class)
+          .isDefinitelyTrue) {
         resultType = _abstractValueDomain.uint32Type;
       }
       HGetLength result =
@@ -530,12 +561,14 @@
     bool applies(MemberEntity element) {
       return selector.applies(element) &&
           (mask == null ||
-              _abstractValueDomain.canHit(mask, element, selector));
+              _abstractValueDomain
+                  .isTargetingMember(mask, element, selector.memberName)
+                  .isPotentiallyTrue);
     }
 
     if (selector.isCall || selector.isOperator) {
       FunctionEntity target;
-      if (input.isExtendableArray(_abstractValueDomain)) {
+      if (input.isExtendableArray(_abstractValueDomain).isDefinitelyTrue) {
         if (applies(commonElements.jsArrayRemoveLast)) {
           target = commonElements.jsArrayRemoveLast;
         } else if (applies(commonElements.jsArrayAdd)) {
@@ -546,7 +579,7 @@
             target = commonElements.jsArrayAdd;
           }
         }
-      } else if (input.isStringOrNull(_abstractValueDomain)) {
+      } else if (input.isStringOrNull(_abstractValueDomain).isDefinitelyTrue) {
         if (commonElements.appliesToJsStringSplit(
             selector, mask, _abstractValueDomain)) {
           return handleStringSplit(node);
@@ -555,12 +588,12 @@
           // make sure the receiver and the argument are not null.
           // TODO(sra): Do this via [node.specializer].
           HInstruction argument = node.inputs[2];
-          if (argument.isString(_abstractValueDomain) &&
-              !input.canBeNull(_abstractValueDomain)) {
+          if (argument.isString(_abstractValueDomain).isDefinitelyTrue &&
+              input.isNull(_abstractValueDomain).isDefinitelyFalse) {
             return new HStringConcat(input, argument, node.instructionType);
           }
         } else if (applies(commonElements.jsStringToString) &&
-            !input.canBeNull(_abstractValueDomain)) {
+            input.isNull(_abstractValueDomain).isDefinitelyFalse) {
           return input;
         }
       }
@@ -596,7 +629,9 @@
 
   HInstruction handleStringSplit(HInvokeDynamic node) {
     HInstruction argument = node.inputs[2];
-    if (!argument.isString(_abstractValueDomain)) return node;
+    if (!argument.isString(_abstractValueDomain).isDefinitelyTrue) {
+      return node;
+    }
 
     // Replace `s.split$1(pattern)` with
     //
@@ -787,7 +822,9 @@
 
   HInstruction visitBoundsCheck(HBoundsCheck node) {
     HInstruction index = node.index;
-    if (index.isInteger(_abstractValueDomain)) return node;
+    if (index.isInteger(_abstractValueDomain).isDefinitelyTrue) {
+      return node;
+    }
     if (index.isConstant()) {
       HConstant constantInstruction = index;
       assert(!constantInstruction.constant.isInt);
@@ -815,8 +852,8 @@
     HInstruction right = node.right;
     // We can only perform this rewriting on Integer, as it is not
     // valid for -0.0.
-    if (left.isInteger(_abstractValueDomain) &&
-        right.isInteger(_abstractValueDomain)) {
+    if (left.isInteger(_abstractValueDomain).isDefinitelyTrue &&
+        right.isInteger(_abstractValueDomain).isDefinitelyTrue) {
       if (left is HConstant && left.constant.isZero) return right;
       if (right is HConstant && right.constant.isZero) return left;
     }
@@ -826,8 +863,8 @@
   HInstruction visitMultiply(HMultiply node) {
     HInstruction left = node.left;
     HInstruction right = node.right;
-    if (left.isNumber(_abstractValueDomain) &&
-        right.isNumber(_abstractValueDomain)) {
+    if (left.isNumber(_abstractValueDomain).isDefinitelyTrue &&
+        right.isNumber(_abstractValueDomain).isDefinitelyTrue) {
       if (left is HConstant && left.constant.isOne) return right;
       if (right is HConstant && right.constant.isOne) return left;
     }
@@ -873,15 +910,17 @@
 
     // Intersection of int and double return conflicting, so
     // we don't optimize on numbers to preserve the runtime semantics.
-    if (!(left.isNumberOrNull(_abstractValueDomain) &&
-        right.isNumberOrNull(_abstractValueDomain))) {
-      if (_abstractValueDomain.areDisjoint(leftType, rightType)) {
+    if (!(left.isNumberOrNull(_abstractValueDomain).isDefinitelyTrue &&
+        right.isNumberOrNull(_abstractValueDomain).isDefinitelyTrue)) {
+      if (_abstractValueDomain
+          .areDisjoint(leftType, rightType)
+          .isDefinitelyTrue) {
         return makeFalse();
       }
     }
 
-    if (left.isNull(_abstractValueDomain) &&
-        right.isNull(_abstractValueDomain)) {
+    if (left.isNull(_abstractValueDomain).isDefinitelyTrue &&
+        right.isNull(_abstractValueDomain).isDefinitelyTrue) {
       return makeTrue();
     }
 
@@ -893,11 +932,13 @@
       }
     }
 
-    if (left.isConstantBoolean() && right.isBoolean(_abstractValueDomain)) {
+    if (left.isConstantBoolean() &&
+        right.isBoolean(_abstractValueDomain).isDefinitelyTrue) {
       return compareConstant(left, right);
     }
 
-    if (right.isConstantBoolean() && left.isBoolean(_abstractValueDomain)) {
+    if (right.isConstantBoolean() &&
+        left.isBoolean(_abstractValueDomain).isDefinitelyTrue) {
       return compareConstant(right, left);
     }
 
@@ -906,8 +947,12 @@
       // dart2js runtime has not always been consistent with the Dart
       // specification (section 16.0.1), which makes distinctions on NaNs and
       // -0.0 that are hard to implement efficiently.
-      if (left.isIntegerOrNull(_abstractValueDomain)) return makeTrue();
-      if (!left.canBePrimitiveNumber(_abstractValueDomain)) return makeTrue();
+      if (left.isIntegerOrNull(_abstractValueDomain).isDefinitelyTrue) {
+        return makeTrue();
+      }
+      if (left.isPrimitiveNumber(_abstractValueDomain).isDefinitelyFalse) {
+        return makeTrue();
+      }
     }
 
     return null;
@@ -939,7 +984,7 @@
     // This is mostly harmless (if a little confusing) but does cause a lot of
     // `x = false;` copies to be inserted when a loop body has many continue
     // statements or ends with a switch.
-    var uses =
+    DominatedUses uses =
         DominatedUses.of(condition, block.first, excludePhiOutEdges: true);
     if (uses.isEmpty) return;
     uses.replaceWith(_graph.addConstantBool(value, _closedWorld));
@@ -989,7 +1034,7 @@
     InterfaceType interfaceType = type;
     ClassEntity element = interfaceType.element;
     HInstruction expression = node.expression;
-    if (expression.isInteger(_abstractValueDomain)) {
+    if (expression.isInteger(_abstractValueDomain).isDefinitelyTrue) {
       if (element == commonElements.intClass ||
           element == commonElements.numClass ||
           commonElements.isNumberOrStringSupertype(element)) {
@@ -1001,7 +1046,7 @@
       } else {
         return _graph.addConstantBool(false, _closedWorld);
       }
-    } else if (expression.isDouble(_abstractValueDomain)) {
+    } else if (expression.isDouble(_abstractValueDomain).isDefinitelyTrue) {
       if (element == commonElements.doubleClass ||
           element == commonElements.numClass ||
           commonElements.isNumberOrStringSupertype(element)) {
@@ -1014,14 +1059,16 @@
       } else {
         return _graph.addConstantBool(false, _closedWorld);
       }
-    } else if (expression.isNumber(_abstractValueDomain)) {
+    } else if (expression.isNumber(_abstractValueDomain).isDefinitelyTrue) {
       if (element == commonElements.numClass) {
         return _graph.addConstantBool(true, _closedWorld);
       } else {
         // We cannot just return false, because the expression may be of
         // type int or double.
       }
-    } else if (expression.canBePrimitiveNumber(_abstractValueDomain) &&
+    } else if (expression
+            .isPrimitiveNumber(_abstractValueDomain)
+            .isPotentiallyTrue &&
         element == commonElements.intClass) {
       // We let the JS semantics decide for that check.
       return node;
@@ -1033,9 +1080,9 @@
       AbstractValue expressionMask = expression.instructionType;
       AbstractBool isInstanceOf =
           _abstractValueDomain.isInstanceOf(expressionMask, element);
-      if (isInstanceOf == AbstractBool.True) {
+      if (isInstanceOf.isDefinitelyTrue) {
         return _graph.addConstantBool(true, _closedWorld);
-      } else if (isInstanceOf == AbstractBool.False) {
+      } else if (isInstanceOf.isDefinitelyFalse) {
         return _graph.addConstantBool(false, _closedWorld);
       }
     }
@@ -1068,9 +1115,12 @@
   }
 
   FieldEntity findConcreteFieldForDynamicAccess(
-      HInstruction receiver, Selector selector) {
+      HInvokeDynamicField node, HInstruction receiver) {
     AbstractValue receiverType = receiver.instructionType;
-    return _closedWorld.locateSingleField(selector, receiverType);
+    MemberEntity member = node.element is FieldEntity
+        ? node.element
+        : _closedWorld.locateSingleMember(node.selector, receiverType);
+    return member is FieldEntity ? member : null;
   }
 
   HInstruction visitFieldGet(HFieldGet node) {
@@ -1095,23 +1145,30 @@
   }
 
   HInstruction visitGetLength(HGetLength node) {
-    dynamic receiver = node.receiver;
+    HInstruction receiver = node.receiver;
     if (_graph.allocatedFixedLists.contains(receiver)) {
       // TODO(ngeoffray): checking if the second input is an integer
       // should not be necessary but it currently makes it easier for
       // other optimizations to reason about a fixed length constructor
       // that we know takes an int.
-      if (receiver.inputs[0].isInteger(_abstractValueDomain)) {
+      if (receiver.inputs[0].isInteger(_abstractValueDomain).isDefinitelyTrue) {
         return receiver.inputs[0];
       }
-    } else if (receiver.isConstantList() || receiver.isConstantString()) {
-      return _graph.addConstantInt(receiver.constant.length, _closedWorld);
+    } else if (receiver.isConstantList()) {
+      HConstant constantReceiver = receiver;
+      ListConstantValue constant = constantReceiver.constant;
+      return _graph.addConstantInt(constant.length, _closedWorld);
+    } else if (receiver.isConstantString()) {
+      HConstant constantReceiver = receiver;
+      StringConstantValue constant = constantReceiver.constant;
+      return _graph.addConstantInt(constant.length, _closedWorld);
     } else {
-      dynamic type = receiver.instructionType;
-      if (type.isContainer && type.length != null) {
-        HInstruction constant =
-            _graph.addConstantInt(type.length, _closedWorld);
-        if (type.isNullable) {
+      AbstractValue type = receiver.instructionType;
+      if (_abstractValueDomain.isContainer(type) &&
+          _abstractValueDomain.getContainerLength(type) != null) {
+        HInstruction constant = _graph.addConstantInt(
+            _abstractValueDomain.getContainerLength(type), _closedWorld);
+        if (_abstractValueDomain.isNull(type).isPotentiallyTrue) {
           // If the container can be null, we update all uses of the length
           // access to use the constant instead, but keep the length access in
           // the graph, to ensure we still have a null check.
@@ -1155,27 +1212,30 @@
       if (folded != node) return folded;
     }
     HInstruction receiver = node.getDartReceiver(_closedWorld);
-    FieldEntity field =
-        findConcreteFieldForDynamicAccess(receiver, node.selector);
-    if (field != null) return directFieldGet(receiver, field);
+    FieldEntity field = node.element is FieldEntity
+        ? node.element
+        : findConcreteFieldForDynamicAccess(node, receiver);
+    if (field != null) {
+      HFieldGet result = _directFieldGet(receiver, field, node);
+      _log?.registerFieldGet(node, result);
+      return result;
+    }
 
-    if (node.element == null) {
-      MemberEntity element = _closedWorld.locateSingleMember(
-          node.selector, receiver.instructionType);
-      if (element != null && element.name == node.selector.name) {
-        node.element = element;
-        if (element.isFunction) {
-          // A property extraction getter, aka a tear-off.
-          node.sideEffects.clearAllDependencies();
-          node.sideEffects.clearAllSideEffects();
-          node.setUseGvn(); // We don't care about identity of tear-offs.
-        }
-      }
+    node.element ??= _closedWorld.locateSingleMember(
+        node.selector, receiver.instructionType);
+    if (node.element != null &&
+        node.element.name == node.selector.name &&
+        node.element.isFunction) {
+      // A property extraction getter, aka a tear-off.
+      node.sideEffects.clearAllDependencies();
+      node.sideEffects.clearAllSideEffects();
+      node.setUseGvn(); // We don't care about identity of tear-offs.
     }
     return node;
   }
 
-  HInstruction directFieldGet(HInstruction receiver, FieldEntity field) {
+  HInstruction _directFieldGet(
+      HInstruction receiver, FieldEntity field, HInstruction node) {
     bool isAssignable = !_closedWorld.fieldNeverChanges(field);
 
     AbstractValue type;
@@ -1183,10 +1243,14 @@
       type = AbstractValueFactory.fromNativeBehavior(
           _nativeData.getNativeFieldLoadBehavior(field), _closedWorld);
     } else {
+      // TODO(johnniwinther): Use the potentially more precise type of the
+      // node + find a test that shows its usefulness.
+      // type = _abstractValueDomain.intersection(
+      //     node.instructionType,
+      //     AbstractValueFactory.inferredTypeForMember(
+      //         field, _globalInferenceResults));
       type = AbstractValueFactory.inferredTypeForMember(
-          // ignore: UNNECESSARY_CAST
-          field as Entity,
-          _globalInferenceResults);
+          field, _globalInferenceResults);
     }
 
     return new HFieldGet(field, receiver, type, isAssignable: isAssignable);
@@ -1199,8 +1263,7 @@
     }
 
     HInstruction receiver = node.getDartReceiver(_closedWorld);
-    FieldEntity field =
-        findConcreteFieldForDynamicAccess(receiver, node.selector);
+    FieldEntity field = findConcreteFieldForDynamicAccess(node, receiver);
     if (field == null || !field.isAssignable) return node;
     // Use `node.inputs.last` in case the call follows the interceptor calling
     // convention, but is not a call on an interceptor.
@@ -1215,6 +1278,7 @@
         // inline this access.
         // TODO(sra): If the input is such that we don't need a type check, we
         // can skip the test an generate the HFieldSet.
+        node.needsCheck = true;
         return node;
       }
       HInstruction other = value.convertType(
@@ -1224,7 +1288,10 @@
         value = other;
       }
     }
-    return new HFieldSet(_abstractValueDomain, field, receiver, value);
+    HFieldSet result =
+        new HFieldSet(_abstractValueDomain, field, receiver, value);
+    _log?.registerFieldSet(node, result);
+    return result;
   }
 
   HInstruction visitInvokeClosure(HInvokeClosure node) {
@@ -1241,7 +1308,8 @@
           // TODO(sra): Handle adding optional arguments default values.
           assert(!node.isInterceptedCall);
           return new HInvokeStatic(target, node.inputs.skip(1).toList(),
-              node.instructionType, node.typeArguments);
+              node.instructionType, node.typeArguments)
+            ..sourceInformation = node.sourceInformation;
         }
       }
     }
@@ -1273,17 +1341,23 @@
     } else if (commonElements.isCheckInt(element)) {
       if (node.inputs.length == 1) {
         HInstruction argument = node.inputs[0];
-        if (argument.isInteger(_abstractValueDomain)) return argument;
+        if (argument.isInteger(_abstractValueDomain).isDefinitelyTrue) {
+          return argument;
+        }
       }
     } else if (commonElements.isCheckNum(element)) {
       if (node.inputs.length == 1) {
         HInstruction argument = node.inputs[0];
-        if (argument.isNumber(_abstractValueDomain)) return argument;
+        if (argument.isNumber(_abstractValueDomain).isDefinitelyTrue) {
+          return argument;
+        }
       }
     } else if (commonElements.isCheckString(element)) {
       if (node.inputs.length == 1) {
         HInstruction argument = node.inputs[0];
-        if (argument.isString(_abstractValueDomain)) return argument;
+        if (argument.isString(_abstractValueDomain).isDefinitelyTrue) {
+          return argument;
+        }
       }
     }
     return node;
@@ -1293,7 +1367,9 @@
     // If type information is not needed, use the raw Array.
     HInstruction source = node.inputs[0];
     if (source.usedBy.length != 1) return node;
-    if (!source.isArray(_abstractValueDomain)) return node;
+    if (source.isArray(_abstractValueDomain).isPotentiallyFalse) {
+      return node;
+    }
     for (HInstruction user in node.usedBy) {
       if (user is HGetLength) continue;
       if (user is HIndex) continue;
@@ -1371,7 +1447,9 @@
 
   HInstruction visitStringify(HStringify node) {
     HInstruction input = node.inputs[0];
-    if (input.isString(_abstractValueDomain)) return input;
+    if (input.isString(_abstractValueDomain).isDefinitelyTrue) {
+      return input;
+    }
 
     HInstruction asString(String string) =>
         _graph.addConstant(constantSystem.createString(string), _closedWorld);
@@ -1407,18 +1485,26 @@
       // it directly. Keep the stringifier for primitives (since they have fast
       // path code in the stringifier) and for classes requiring interceptors
       // (since SsaInstructionSimplifier runs after SsaSimplifyInterceptors).
-      if (input.canBePrimitive(_abstractValueDomain)) return null;
-      if (input.canBeNull(_abstractValueDomain)) return null;
+      if (input.isPrimitive(_abstractValueDomain).isPotentiallyTrue) {
+        return null;
+      }
+      if (input.isNull(_abstractValueDomain).isPotentiallyTrue) {
+        return null;
+      }
       Selector selector = Selectors.toString_;
       AbstractValue toStringType = AbstractValueFactory.inferredTypeForSelector(
           selector, input.instructionType, _globalInferenceResults);
-      if (!_abstractValueDomain.containsOnlyType(
-          toStringType, _closedWorld.commonElements.jsStringClass)) {
+      if (_abstractValueDomain
+          .containsOnlyType(
+              toStringType, _closedWorld.commonElements.jsStringClass)
+          .isPotentiallyFalse) {
         return null;
       }
       // All intercepted classes extend `Interceptor`, so if the receiver can't
       // be a class extending `Interceptor` then it can be called directly.
-      if (!_abstractValueDomain.canBeInterceptor(input.instructionType)) {
+      if (_abstractValueDomain
+          .isInterceptor(input.instructionType)
+          .isDefinitelyFalse) {
         var inputs = <HInstruction>[input, input]; // [interceptor, receiver].
         HInstruction result = new HInvokeDynamicMethod(
             selector,
@@ -1628,7 +1714,9 @@
       // be a class extending `Interceptor` then the substitution methods can be
       // called directly. (We don't care about Null since contexts reading class
       // type variables originate from instance methods.)
-      if (!_abstractValueDomain.canBeInterceptor(object.instructionType)) {
+      if (_abstractValueDomain
+          .isInterceptor(object.instructionType)
+          .isDefinitelyFalse) {
         return new HTypeInfoReadVariable.noInterceptor(
             variable, object, node.instructionType);
       }
@@ -1677,9 +1765,10 @@
         isAssignable: !isFixedLength(array.instructionType, closedWorld));
     indexNode.block.addBefore(indexNode, length);
 
-    AbstractValue type = indexArgument.isPositiveInteger(_abstractValueDomain)
-        ? indexArgument.instructionType
-        : closedWorld.abstractValueDomain.positiveIntType;
+    AbstractValue type =
+        indexArgument.isPositiveInteger(_abstractValueDomain).isDefinitelyTrue
+            ? indexArgument.instructionType
+            : closedWorld.abstractValueDomain.positiveIntType;
     HBoundsCheck check = new HBoundsCheck(indexArgument, length, array, type)
       ..sourceInformation = indexNode.sourceInformation;
     indexNode.block.addBefore(indexNode, check);
@@ -1690,7 +1779,7 @@
     // the index eg. if it is a constant.  The range information from the
     // BoundsCheck instruction is attached to the input directly by
     // visitBoundsCheck in the SsaValueRangeAnalyzer.
-    if (!indexArgument.isInteger(_abstractValueDomain)) {
+    if (indexArgument.isInteger(_abstractValueDomain).isPotentiallyFalse) {
       indexArgument.replaceAllUsersDominatedBy(indexNode, check);
     }
     boundsChecked.add(indexNode);
@@ -2117,7 +2206,7 @@
   }
 
   void visitSwitch(HSwitch node) {
-    if (node.expression.isInteger(_abstractValueDomain)) {
+    if (node.expression.isInteger(_abstractValueDomain).isDefinitelyTrue) {
       Range switchRange = ranges[node.expression];
       if (switchRange != null &&
           switchRange.lower is IntValue &&
@@ -2672,7 +2761,9 @@
       return;
     }
 
-    if (!_abstractValueDomain.canBeNull(input.instructionType)) return;
+    if (_abstractValueDomain.isNull(input.instructionType).isDefinitelyFalse) {
+      return;
+    }
 
     List<HBasicBlock> trueTargets = <HBasicBlock>[];
     List<HBasicBlock> falseTargets = <HBasicBlock>[];
@@ -3043,8 +3134,9 @@
     if (nonEscapingReceivers.contains(second)) return false;
     // Typed arrays of different types might have a shared buffer.
     if (couldBeTypedArray(first) && couldBeTypedArray(second)) return true;
-    return !_abstractValueDomain.areDisjoint(
-        first.instructionType, second.instructionType);
+    return _abstractValueDomain
+        .areDisjoint(first.instructionType, second.instructionType)
+        .isPotentiallyFalse;
   }
 
   bool isFinal(Object element) {
@@ -3059,7 +3151,8 @@
 
   bool couldBeTypedArray(HInstruction receiver) {
     return closedWorld.abstractValueDomain
-        .couldBeTypedArray(receiver.instructionType);
+        .couldBeTypedArray(receiver.instructionType)
+        .isPotentiallyTrue;
   }
 
   /// Returns whether [receiver] escapes the current function.
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index 7ed9f68..08cda42 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -8,10 +8,10 @@
 import '../common/tasks.dart' show CompilerTask, Measurer;
 import '../constants/values.dart';
 import '../elements/entities.dart' show FieldEntity, MemberEntity;
+import '../inferrer/types.dart';
 import '../io/source_information.dart';
 import '../js/js.dart' as js;
 import '../js_backend/backend.dart' show JavaScriptBackend, FunctionCompiler;
-import '../types/types.dart';
 import '../universe/call_structure.dart';
 import '../universe/use.dart';
 import '../world.dart' show JClosedWorld;
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index 61a56cd..a4b3de8 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -6,8 +6,8 @@
 
 import '../../compiler_new.dart' show OutputSink;
 import '../diagnostics/invariant.dart' show DEBUG_MODE;
+import '../inferrer/abstract_value_domain.dart';
 import '../js_backend/namer.dart' show Namer;
-import '../types/abstract_value_domain.dart';
 import '../tracer.dart';
 import '../world.dart' show JClosedWorld;
 import 'nodes.dart';
@@ -126,31 +126,43 @@
 
   String temporaryId(HInstruction instruction) {
     String prefix;
-    if (instruction.isNull(_abstractValueDomain)) {
+    if (instruction.isNull(_abstractValueDomain).isDefinitelyTrue) {
       prefix = 'u';
-    } else if (instruction.isConflicting(_abstractValueDomain)) {
+    } else if (instruction
+        .isConflicting(_abstractValueDomain)
+        .isDefinitelyTrue) {
       prefix = 'c';
-    } else if (instruction.isExtendableArray(_abstractValueDomain)) {
+    } else if (instruction
+        .isExtendableArray(_abstractValueDomain)
+        .isDefinitelyTrue) {
       prefix = 'e';
-    } else if (instruction.isFixedArray(_abstractValueDomain)) {
+    } else if (instruction
+        .isFixedArray(_abstractValueDomain)
+        .isDefinitelyTrue) {
       prefix = 'f';
-    } else if (instruction.isMutableArray(_abstractValueDomain)) {
+    } else if (instruction
+        .isMutableArray(_abstractValueDomain)
+        .isDefinitelyTrue) {
       prefix = 'm';
-    } else if (instruction.isArray(_abstractValueDomain)) {
+    } else if (instruction.isArray(_abstractValueDomain).isDefinitelyTrue) {
       prefix = 'a';
-    } else if (instruction.isString(_abstractValueDomain)) {
+    } else if (instruction.isString(_abstractValueDomain).isDefinitelyTrue) {
       prefix = 's';
-    } else if (instruction.isIndexablePrimitive(_abstractValueDomain)) {
+    } else if (instruction
+        .isIndexablePrimitive(_abstractValueDomain)
+        .isDefinitelyTrue) {
       prefix = 'r';
-    } else if (instruction.isBoolean(_abstractValueDomain)) {
+    } else if (instruction.isBoolean(_abstractValueDomain).isDefinitelyTrue) {
       prefix = 'b';
-    } else if (instruction.isInteger(_abstractValueDomain)) {
+    } else if (instruction.isInteger(_abstractValueDomain).isDefinitelyTrue) {
       prefix = 'i';
-    } else if (instruction.isDouble(_abstractValueDomain)) {
+    } else if (instruction.isDouble(_abstractValueDomain).isDefinitelyTrue) {
       prefix = 'd';
-    } else if (instruction.isNumber(_abstractValueDomain)) {
+    } else if (instruction.isNumber(_abstractValueDomain).isDefinitelyTrue) {
       prefix = 'n';
-    } else if (_abstractValueDomain.containsAll(instruction.instructionType)) {
+    } else if (_abstractValueDomain
+        .containsAll(instruction.instructionType)
+        .isPotentiallyTrue) {
       prefix = 'v';
     } else {
       prefix = 'U';
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart
index c882028..9ba2e51 100644
--- a/pkg/compiler/lib/src/ssa/type_builder.dart
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart
@@ -6,8 +6,8 @@
 import 'nodes.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../io/source_information.dart';
-import '../types/abstract_value_domain.dart';
 import '../universe/use.dart' show TypeUse;
 
 /// Enum that defines how a member has access to the current type variables.
diff --git a/pkg/compiler/lib/src/ssa/types.dart b/pkg/compiler/lib/src/ssa/types.dart
index 8519ee9..4fa5ee5 100644
--- a/pkg/compiler/lib/src/ssa/types.dart
+++ b/pkg/compiler/lib/src/ssa/types.dart
@@ -4,9 +4,9 @@
 
 import '../common_elements.dart' show CommonElements;
 import '../elements/entities.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../native/behavior.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/selector.dart' show Selector;
 import '../world.dart' show JClosedWorld;
 
@@ -64,7 +64,7 @@
 
     AbstractValue result =
         abstractValueDomain.unionOfMany(typesReturned.map(fromNativeType));
-    assert(!abstractValueDomain.isEmpty(result),
+    assert(abstractValueDomain.isEmpty(result).isPotentiallyFalse,
         "Unexpected empty return value for $nativeBehavior.");
     return result;
   }
diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart
index b034bbd..492e6ea 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -4,9 +4,10 @@
 
 import '../common_elements.dart' show CommonElements;
 import '../elements/entities.dart';
+import '../elements/types.dart';
+import '../inferrer/abstract_value_domain.dart';
+import '../inferrer/types.dart';
 import '../options.dart';
-import '../types/abstract_value_domain.dart';
-import '../types/types.dart';
 import '../universe/selector.dart' show Selector;
 import '../world.dart' show JClosedWorld;
 import 'nodes.dart';
@@ -129,11 +130,11 @@
   AbstractValue visitBinaryArithmetic(HBinaryArithmetic instruction) {
     HInstruction left = instruction.left;
     HInstruction right = instruction.right;
-    if (left.isInteger(abstractValueDomain) &&
-        right.isInteger(abstractValueDomain)) {
+    if (left.isInteger(abstractValueDomain).isDefinitelyTrue &&
+        right.isInteger(abstractValueDomain).isDefinitelyTrue) {
       return abstractValueDomain.intType;
     }
-    if (left.isDouble(abstractValueDomain)) {
+    if (left.isDouble(abstractValueDomain).isDefinitelyTrue) {
       return abstractValueDomain.doubleType;
     }
     return abstractValueDomain.numType;
@@ -142,8 +143,8 @@
   AbstractValue checkPositiveInteger(HBinaryArithmetic instruction) {
     HInstruction left = instruction.left;
     HInstruction right = instruction.right;
-    if (left.isPositiveInteger(abstractValueDomain) &&
-        right.isPositiveInteger(abstractValueDomain)) {
+    if (left.isPositiveInteger(abstractValueDomain).isDefinitelyTrue &&
+        right.isPositiveInteger(abstractValueDomain).isDefinitelyTrue) {
       return abstractValueDomain.positiveIntType;
     }
     return visitBinaryArithmetic(instruction);
@@ -176,7 +177,7 @@
     HInstruction operand = instruction.operand;
     // We have integer subclasses that represent ranges, so widen any int
     // subclass to full integer.
-    if (operand.isInteger(abstractValueDomain)) {
+    if (operand.isInteger(abstractValueDomain).isDefinitelyTrue) {
       return abstractValueDomain.intType;
     }
     return instruction.operand.instructionType;
@@ -209,28 +210,30 @@
       // We must make sure a type conversion for receiver or argument check
       // does not try to do an int check, because an int check is not enough.
       // We only do an int check if the input is integer or null.
-      if (abstractValueDomain.isNumberOrNull(checkedType) &&
-          !abstractValueDomain.isDoubleOrNull(checkedType) &&
-          input.isIntegerOrNull(abstractValueDomain)) {
+      if (abstractValueDomain.isNumberOrNull(checkedType).isDefinitelyTrue &&
+          abstractValueDomain.isDoubleOrNull(checkedType).isDefinitelyFalse &&
+          input.isIntegerOrNull(abstractValueDomain).isDefinitelyTrue) {
         instruction.checkedType = abstractValueDomain.intType;
-      } else if (abstractValueDomain.isIntegerOrNull(checkedType) &&
-          !input.isIntegerOrNull(abstractValueDomain)) {
+      } else if (abstractValueDomain
+              .isIntegerOrNull(checkedType)
+              .isDefinitelyTrue &&
+          input.isIntegerOrNull(abstractValueDomain).isPotentiallyFalse) {
         instruction.checkedType = abstractValueDomain.numType;
       }
     }
 
     AbstractValue outputType =
         abstractValueDomain.intersection(checkedType, inputType);
-    if (abstractValueDomain.isEmpty(outputType)) {
+    if (abstractValueDomain.isEmpty(outputType).isDefinitelyTrue) {
       // Intersection of double and integer conflicts (is empty), but JS numbers
       // can be both int and double at the same time.  For example, the input
       // can be a literal double '8.0' that is marked as an integer (because 'is
       // int' will return 'true').  What we really need to do is make the
       // overlap between int and double values explicit in the TypeMask system.
-      if (abstractValueDomain.isIntegerOrNull(inputType) &&
-          abstractValueDomain.isDoubleOrNull(checkedType)) {
-        if (abstractValueDomain.canBeNull(inputType) &&
-            abstractValueDomain.canBeNull(checkedType)) {
+      if (abstractValueDomain.isIntegerOrNull(inputType).isDefinitelyTrue &&
+          abstractValueDomain.isDoubleOrNull(checkedType).isDefinitelyTrue) {
+        if (abstractValueDomain.isNull(inputType).isPotentiallyTrue &&
+            abstractValueDomain.isNull(checkedType).isPotentiallyTrue) {
           outputType =
               abstractValueDomain.includeNull(abstractValueDomain.doubleType);
         } else {
@@ -268,12 +271,12 @@
   }
 
   void convertInput(HInvokeDynamic instruction, HInstruction input,
-      AbstractValue type, int kind) {
+      AbstractValue type, int kind, DartType typeExpression) {
     Selector selector = (kind == HTypeConversion.RECEIVER_TYPE_CHECK)
         ? instruction.selector
         : null;
     HTypeConversion converted = new HTypeConversion(
-        null, kind, type, input, instruction.sourceInformation,
+        typeExpression, kind, type, input, instruction.sourceInformation,
         receiverTypeCheckSelector: selector);
     instruction.block.addBefore(instruction, converted);
     input.replaceAllUsersDominatedBy(instruction, converted);
@@ -283,11 +286,11 @@
     // In some cases, we want the receiver to be an integer,
     // but that does not mean we will get a NoSuchMethodError
     // if it's not: the receiver could be a double.
-    if (abstractValueDomain.isIntegerOrNull(type)) {
+    if (abstractValueDomain.isIntegerOrNull(type).isDefinitelyTrue) {
       // If the instruction's type is integer or null, the codegen
       // will emit a null check, which is enough to know if it will
       // hit a noSuchMethod.
-      return instruction.isIntegerOrNull(abstractValueDomain);
+      return instruction.isIntegerOrNull(abstractValueDomain).isDefinitelyTrue;
     }
     return true;
   }
@@ -298,13 +301,16 @@
   bool checkReceiver(HInvokeDynamic instruction) {
     assert(instruction.isInterceptedCall);
     HInstruction receiver = instruction.inputs[1];
-    if (receiver.isNumber(abstractValueDomain)) return false;
-    if (receiver.isNumberOrNull(abstractValueDomain)) {
+    if (receiver.isNumber(abstractValueDomain).isDefinitelyTrue) {
+      return false;
+    }
+    if (receiver.isNumberOrNull(abstractValueDomain).isDefinitelyTrue) {
       convertInput(
           instruction,
           receiver,
           abstractValueDomain.excludeNull(receiver.instructionType),
-          HTypeConversion.RECEIVER_TYPE_CHECK);
+          HTypeConversion.RECEIVER_TYPE_CHECK,
+          commonElements.numType);
       return true;
     } else if (instruction.element == null) {
       if (closedWorld.includesClosureCall(
@@ -318,14 +324,18 @@
         ClassEntity cls = target.enclosingClass;
         AbstractValue type = abstractValueDomain.createNonNullSubclass(cls);
         // We currently only optimize on some primitive types.
-        if (!abstractValueDomain.isNumberOrNull(type) &&
-            !abstractValueDomain.isBooleanOrNull(type)) {
+        DartType typeExpression;
+        if (abstractValueDomain.isNumberOrNull(type).isDefinitelyTrue) {
+          typeExpression = commonElements.numType;
+        } else if (abstractValueDomain.isBooleanOrNull(type).isDefinitelyTrue) {
+          typeExpression = commonElements.boolType;
+        } else {
           return false;
         }
         if (!isCheckEnoughForNsmOrAe(receiver, type)) return false;
         instruction.element = target;
-        convertInput(
-            instruction, receiver, type, HTypeConversion.RECEIVER_TYPE_CHECK);
+        convertInput(instruction, receiver, type,
+            HTypeConversion.RECEIVER_TYPE_CHECK, typeExpression);
         return true;
       }
     }
@@ -340,17 +350,21 @@
     HInstruction right = instruction.inputs[2];
 
     Selector selector = instruction.selector;
-    if (selector.isOperator && left.isNumber(abstractValueDomain)) {
-      if (right.isNumber(abstractValueDomain)) return false;
-      AbstractValue type = right.isIntegerOrNull(abstractValueDomain)
-          ? abstractValueDomain.excludeNull(right.instructionType)
-          : abstractValueDomain.numType;
+    if (selector.isOperator &&
+        left.isNumber(abstractValueDomain).isDefinitelyTrue) {
+      if (right.isNumber(abstractValueDomain).isDefinitelyTrue) {
+        return false;
+      }
+      AbstractValue type =
+          right.isIntegerOrNull(abstractValueDomain).isDefinitelyTrue
+              ? abstractValueDomain.excludeNull(right.instructionType)
+              : abstractValueDomain.numType;
       // TODO(ngeoffray): Some number operations don't have a builtin
       // variant and will do the check in their method anyway. We
       // still add a check because it allows to GVN these operations,
       // but we should find a better way.
-      convertInput(
-          instruction, right, type, HTypeConversion.ARGUMENT_TYPE_CHECK);
+      convertInput(instruction, right, type,
+          HTypeConversion.ARGUMENT_TYPE_CHECK, commonElements.numType);
       return true;
     }
     return false;
diff --git a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
index 075ee0e..acdfd27 100644
--- a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
+++ b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
@@ -633,7 +633,9 @@
   void visitBasicBlock(HBasicBlock block) {
     void visit(HInstruction instruction) {
       Range range = instruction.accept(this);
-      if (instruction.isInteger(closedWorld.abstractValueDomain)) {
+      if (instruction
+          .isInteger(closedWorld.abstractValueDomain)
+          .isDefinitelyTrue) {
         assert(range != null);
         ranges[instruction] = range;
       }
@@ -644,10 +646,14 @@
   }
 
   Range visitInstruction(HInstruction instruction) {
-    if (instruction.isPositiveInteger(closedWorld.abstractValueDomain)) {
+    if (instruction
+        .isPositiveInteger(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       return info.newNormalizedRange(
           info.intZero, info.newPositiveValue(instruction));
-    } else if (instruction.isInteger(closedWorld.abstractValueDomain)) {
+    } else if (instruction
+        .isInteger(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       InstructionValue value = info.newInstructionValue(instruction);
       return info.newNormalizedRange(value, value);
     } else {
@@ -656,13 +662,14 @@
   }
 
   Range visitPhi(HPhi phi) {
-    if (!phi.isInteger(closedWorld.abstractValueDomain))
+    if (phi.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse)
       return info.newUnboundRange();
     // Some phases may replace instructions that change the inputs of
     // this phi. Only the [SsaTypesPropagation] phase will update the
     // phi type. Play it safe by assuming the [SsaTypesPropagation]
     // phase is not necessarily run before the [ValueRangeAnalyzer].
-    if (phi.inputs.any((i) => !i.isInteger(closedWorld.abstractValueDomain))) {
+    if (phi.inputs.any((i) =>
+        i.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse)) {
       return info.newUnboundRange();
     }
     if (phi.block.isLoopHeader()) {
@@ -680,8 +687,11 @@
   }
 
   Range visitConstant(HConstant hConstant) {
-    if (!hConstant.isInteger(closedWorld.abstractValueDomain))
+    if (hConstant
+        .isInteger(closedWorld.abstractValueDomain)
+        .isPotentiallyFalse) {
       return info.newUnboundRange();
+    }
     ConstantValue constant = hConstant.constant;
     NumConstantValue constantNum;
     if (constant is DeferredGlobalConstantValue) {
@@ -723,7 +733,9 @@
     Range lengthRange = ranges[check.length];
     if (indexRange == null) {
       indexRange = info.newUnboundRange();
-      assert(!check.index.isInteger(closedWorld.abstractValueDomain));
+      assert(check.index
+          .isInteger(closedWorld.abstractValueDomain)
+          .isPotentiallyFalse);
     }
     if (lengthRange == null) {
       // We might have lost the length range due to a type conversion that
@@ -731,7 +743,9 @@
       // get to this point anyway, so no need to try and refine ranges.
       return indexRange;
     }
-    assert(check.length.isInteger(closedWorld.abstractValueDomain));
+    assert(check.length
+        .isInteger(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue);
 
     // Check if the index is strictly below the upper bound of the length
     // range.
@@ -784,10 +798,12 @@
   Range visitRelational(HRelational relational) {
     HInstruction right = relational.right;
     HInstruction left = relational.left;
-    if (!left.isInteger(closedWorld.abstractValueDomain))
+    if (left.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse) {
       return info.newUnboundRange();
-    if (!right.isInteger(closedWorld.abstractValueDomain))
+    }
+    if (right.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse) {
       return info.newUnboundRange();
+    }
     BinaryOperation operation = relational.operation(constantSystem);
     Range rightRange = ranges[relational.right];
     Range leftRange = ranges[relational.left];
@@ -822,8 +838,8 @@
     if (divisor != null) {
       // For Integer values we can be precise in the upper bound, so special
       // case those.
-      if (left.isInteger(closedWorld.abstractValueDomain) &&
-          right.isInteger(closedWorld.abstractValueDomain)) {
+      if (left.isInteger(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+          right.isInteger(closedWorld.abstractValueDomain).isDefinitelyTrue) {
         if (divisor.isPositive) {
           return info.newNormalizedRange(
               info.intZero, divisor.upper - info.intOne);
@@ -831,8 +847,10 @@
           return info.newNormalizedRange(
               info.intZero, info.newNegateValue(divisor.lower) - info.intOne);
         }
-      } else if (left.isNumber(closedWorld.abstractValueDomain) &&
-          right.isNumber(closedWorld.abstractValueDomain)) {
+      } else if (left
+              .isNumber(closedWorld.abstractValueDomain)
+              .isDefinitelyTrue &&
+          right.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue) {
         if (divisor.isPositive) {
           return info.newNormalizedRange(info.intZero, divisor.upper);
         } else if (divisor.isNegative) {
@@ -850,18 +868,26 @@
     Range dividend = ranges[left];
     // If both operands are >=0, the result is >= 0 and bounded by the divisor.
     if ((dividend != null && dividend.isPositive) ||
-        left.isPositiveInteger(closedWorld.abstractValueDomain)) {
+        left
+            .isPositiveInteger(closedWorld.abstractValueDomain)
+            .isDefinitelyTrue) {
       Range divisor = ranges[right];
       if (divisor != null) {
         if (divisor.isPositive) {
           // For Integer values we can be precise in the upper bound.
-          if (left.isInteger(closedWorld.abstractValueDomain) &&
-              right.isInteger(closedWorld.abstractValueDomain)) {
+          if (left
+                  .isInteger(closedWorld.abstractValueDomain)
+                  .isDefinitelyTrue &&
+              right
+                  .isInteger(closedWorld.abstractValueDomain)
+                  .isDefinitelyTrue) {
             return info.newNormalizedRange(
                 info.intZero, divisor.upper - info.intOne);
           }
-          if (left.isNumber(closedWorld.abstractValueDomain) &&
-              right.isNumber(closedWorld.abstractValueDomain)) {
+          if (left.isNumber(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+              right
+                  .isNumber(closedWorld.abstractValueDomain)
+                  .isDefinitelyTrue) {
             return info.newNormalizedRange(info.intZero, divisor.upper);
           }
         }
@@ -877,7 +903,9 @@
   }
 
   Range handleBinaryOperation(HBinaryArithmetic instruction) {
-    if (!instruction.isInteger(closedWorld.abstractValueDomain)) {
+    if (instruction
+        .isInteger(closedWorld.abstractValueDomain)
+        .isPotentiallyFalse) {
       return info.newUnboundRange();
     }
     return instruction
@@ -894,13 +922,13 @@
   }
 
   Range visitBitAnd(HBitAnd node) {
-    if (!node.isInteger(closedWorld.abstractValueDomain)) {
+    if (node.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse) {
       return info.newUnboundRange();
     }
     HInstruction right = node.right;
     HInstruction left = node.left;
-    if (left.isInteger(closedWorld.abstractValueDomain) &&
-        right.isInteger(closedWorld.abstractValueDomain)) {
+    if (left.isInteger(closedWorld.abstractValueDomain).isDefinitelyTrue &&
+        right.isInteger(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return ranges[left] & ranges[right];
     }
 
@@ -914,9 +942,11 @@
       return info.newUnboundRange();
     }
 
-    if (left.isInteger(closedWorld.abstractValueDomain)) {
+    if (left.isInteger(closedWorld.abstractValueDomain).isDefinitelyTrue) {
       return tryComputeRange(left);
-    } else if (right.isInteger(closedWorld.abstractValueDomain)) {
+    } else if (right
+        .isInteger(closedWorld.abstractValueDomain)
+        .isDefinitelyTrue) {
       return tryComputeRange(right);
     }
     return info.newUnboundRange();
@@ -995,10 +1025,10 @@
     if (condition is HIdentity) return info.newUnboundRange();
     HInstruction right = condition.right;
     HInstruction left = condition.left;
-    if (!left.isInteger(closedWorld.abstractValueDomain)) {
+    if (left.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse) {
       return info.newUnboundRange();
     }
-    if (!right.isInteger(closedWorld.abstractValueDomain)) {
+    if (right.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse) {
       return info.newUnboundRange();
     }
 
@@ -1090,7 +1120,11 @@
   }
 
   Range visit(HInstruction instruction) {
-    if (!instruction.isInteger(closedWorld.abstractValueDomain)) return null;
+    if (instruction
+        .isInteger(closedWorld.abstractValueDomain)
+        .isPotentiallyFalse) {
+      return null;
+    }
     if (ranges[instruction] != null) return ranges[instruction];
     return instruction.accept(this);
   }
diff --git a/pkg/compiler/lib/src/types/abstract_value_domain.dart b/pkg/compiler/lib/src/types/abstract_value_domain.dart
deleted file mode 100644
index d6cd5d0..0000000
--- a/pkg/compiler/lib/src/types/abstract_value_domain.dart
+++ /dev/null
@@ -1,466 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart2js.abstract_value_domain;
-
-import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
-import '../elements/entities.dart';
-import '../serialization/serialization.dart';
-import '../universe/selector.dart';
-import '../universe/world_builder.dart';
-import '../world.dart';
-
-enum AbstractBool { True, False, Maybe }
-
-/// Strategy for the abstraction of runtime values used by the global type
-/// inference.
-abstract class AbstractValueStrategy {
-  /// Creates the abstract value domain for [closedWorld].
-  AbstractValueDomain createDomain(JClosedWorld closedWorld);
-
-  /// Creates the [SelectorConstraintsStrategy] used by the backend enqueuer.
-  SelectorConstraintsStrategy createSelectorStrategy();
-}
-
-/// A value in an abstraction of runtime values.
-abstract class AbstractValue {}
-
-/// A system that implements an abstraction over runtime values.
-abstract class AbstractValueDomain {
-  /// The [AbstractValue] that represents an unknown runtime value.
-  AbstractValue get dynamicType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `Type` at
-  /// runtime.
-  AbstractValue get typeType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `Function` at
-  /// runtime.
-  AbstractValue get functionType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `bool` at
-  /// runtime.
-  AbstractValue get boolType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `int` at
-  /// runtime.
-  AbstractValue get intType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `double` at
-  /// runtime.
-  AbstractValue get doubleType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `num` at
-  /// runtime.
-  AbstractValue get numType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `String` at
-  /// runtime.
-  AbstractValue get stringType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `List` at
-  /// runtime.
-  AbstractValue get listType;
-
-  /// The [AbstractValue] that represents a non-null subtype of `Map` at
-  /// runtime.
-  AbstractValue get mapType;
-
-  /// The [AbstractValue] that represents a non-null value at runtime.
-  AbstractValue get nonNullType;
-
-  /// The [AbstractValue] that represents the `null` at runtime.
-  AbstractValue get nullType;
-
-  /// The [AbstractValue] that represents a non-null growable JavaScript array
-  /// at runtime.
-  AbstractValue get growableListType;
-
-  /// The [AbstractValue] that represents a non-null fixed size JavaScript array
-  /// at runtime.
-  AbstractValue get fixedListType;
-
-  /// The [AbstractValue] that represents a non-null 31-bit unsigned integer at
-  /// runtime.
-  AbstractValue get uint31Type;
-
-  /// The [AbstractValue] that represents a non-null 32-bit unsigned integer at
-  /// runtime.
-  AbstractValue get uint32Type;
-
-  /// The [AbstractValue] that represents a non-null unsigned integer at
-  /// runtime.
-  AbstractValue get positiveIntType;
-
-  /// The [AbstractValue] that represents a non-null constant list literal at
-  /// runtime.
-  AbstractValue get constListType;
-
-  /// The [AbstractValue] that represents a non-null constant map literal at
-  /// runtime.
-  AbstractValue get constMapType;
-
-  /// The [AbstractValue] that represents the empty set of runtime values.
-  AbstractValue get emptyType;
-
-  /// The [AbstractValue] that represents a non-null instance at runtime of the
-  /// `Iterable` class used for the `sync*` implementation.
-  AbstractValue get syncStarIterableType;
-
-  /// The [AbstractValue] that represents a non-null instance at runtime of the
-  /// `Future` class used for the `async` implementation.
-  AbstractValue get asyncFutureType;
-
-  /// The [AbstractValue] that represents a non-null instance at runtime of the
-  /// `Stream` class used for the `async*` implementation.
-  AbstractValue get asyncStarStreamType;
-
-  /// Creates an [AbstractValue] for a non-null exact instance of [cls].
-  AbstractValue createNonNullExact(ClassEntity cls);
-
-  /// Creates an [AbstractValue] for a potentially null exact instance of [cls].
-  AbstractValue createNullableExact(ClassEntity cls);
-
-  /// Creates an [AbstractValue] for a non-null instance that extends [cls].
-  AbstractValue createNonNullSubclass(ClassEntity cls);
-
-  /// Creates an [AbstractValue] for a non-null instance that implements [cls].
-  AbstractValue createNonNullSubtype(ClassEntity cls);
-
-  /// Creates an [AbstractValue] for a potentially null instance that implements
-  /// [cls].
-  AbstractValue createNullableSubtype(ClassEntity cls);
-
-  /// Returns `true` if [value] is a native typed array or `null` at runtime.
-  bool isTypedArray(covariant AbstractValue value);
-
-  /// Returns `true` if [value] could be a native typed array at runtime.
-  bool couldBeTypedArray(covariant AbstractValue value);
-
-  /// Returns the version of the abstract [value] that excludes `null`.
-  AbstractValue excludeNull(covariant AbstractValue value);
-
-  /// Returns the version of the abstract [value] that includes `null`.
-  AbstractValue includeNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] contains instances of [cls] at runtime.
-  bool containsType(covariant AbstractValue value, ClassEntity cls);
-
-  /// Returns `true` if [value] only contains subtypes of [cls] or `null` at
-  /// runtime.
-  bool containsOnlyType(covariant AbstractValue value, ClassEntity cls);
-
-  /// Returns `true` if [value] is an instance of [cls] or `null` at runtime.
-  // TODO(johnniwinther): Merge this with [isInstanceOf].
-  bool isInstanceOfOrNull(covariant AbstractValue value, ClassEntity cls);
-
-  /// Returns an [AbstractBool] that describes how [value] is known to be an
-  /// instance of [cls] at runtime.
-  ///
-  /// If the returned value is `Abstract.True`, [value] is known _always_ to be
-  /// an instance of [cls]. If the returned value is `Abstract.False`, [value]
-  /// is known _never_ to be an instance of [cls]. If the returned value is
-  /// `Abstract.Maybe` [value] might or might not be an instance of [cls] at
-  /// runtime.
-  AbstractBool isInstanceOf(AbstractValue value, ClassEntity cls);
-
-  /// Returns `true` if [value] is empty set of runtime values.
-  bool isEmpty(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-null exact class at runtime.
-  bool isExact(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is an exact class or `null` at runtime.
-  bool isExactOrNull(covariant AbstractValue value);
-
-  /// Returns the [ClassEntity] if this [value] is a non-null instance of an
-  /// exact class at runtime, and `null` otherwise.
-  ClassEntity getExactClass(covariant AbstractValue value);
-
-  /// Returns `true` if [value] can be `null` at runtime.
-  bool canBeNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is `null` at runtime.
-  bool isNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] could be a JavaScript bool, number, string,
-  /// array or `null` at runtime.
-  bool canBePrimitive(covariant AbstractValue value);
-
-  /// Returns `true` if [value] could be a JavaScript number at runtime.
-  bool canBePrimitiveNumber(covariant AbstractValue value);
-
-  /// Returns `true` if [value] could be a JavaScript bool at runtime.
-  bool canBePrimitiveBoolean(covariant AbstractValue value);
-
-  /// Returns `true` if [value] could be a JavaScript array at runtime.
-  bool canBePrimitiveArray(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a JavaScript string, array, native HTML list
-  /// or `null` at runtime.
-  bool isIndexablePrimitive(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a fixed-size or constant JavaScript array or
-  /// `null` at
-  /// runtime.
-  bool isFixedArray(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a growable JavaScript array or `null` at
-  /// runtime.
-  bool isExtendableArray(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a mutable JavaScript array or `null` at
-  /// runtime.
-  bool isMutableArray(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a mutable JavaScript array, native HTML list
-  /// or `null` at runtime.
-  bool isMutableIndexable(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a JavaScript array or `null` at runtime.
-  bool isArray(covariant AbstractValue value);
-
-  /// Returns `true` if [value] could be a JavaScript string at runtime.
-  bool canBePrimitiveString(covariant AbstractValue value);
-
-  /// Return `true` if [value] could be an interceptor at runtime.
-  bool canBeInterceptor(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-null integer value at runtime.
-  bool isInteger(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-null 32 bit unsigned integer value at
-  /// runtime.
-  bool isUInt32(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-null 31 bit unsigned integer value at
-  /// runtime.
-  bool isUInt31(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-null unsigned integer value at runtime.
-  bool isPositiveInteger(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is an unsigned integer value or `null` at
-  /// runtime.
-  bool isPositiveIntegerOrNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is an integer value or `null` at runtime.
-  bool isIntegerOrNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-null JavaScript number at runtime.
-  bool isNumber(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a JavaScript number or `null` at runtime.
-  bool isNumberOrNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-integer number at runtime.
-  bool isDouble(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a non-integer number or `null` at runtime.
-  bool isDoubleOrNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a JavaScript bool at runtime.
-  bool isBoolean(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a JavaScript bool or `null` at runtime.
-  bool isBooleanOrNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a JavaScript string at runtime.
-  bool isString(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is a JavaScript string or `null` at runtime.
-  bool isStringOrNull(covariant AbstractValue value);
-
-  /// Returns `true` if [value] a non-null JavaScript primitive or `null`?
-  // TODO(johnniwinther): This should probably not return true on `null`,
-  // investigate.
-  bool isPrimitive(covariant AbstractValue value);
-
-  /// Returns `true` if [value] a JavaScript primitive, possible `null`.
-  bool isPrimitiveOrNull(covariant AbstractValue value);
-
-  /// Returns [AbstractValue] for the runtime values contained in either [a] or
-  /// [b].
-  AbstractValue union(covariant AbstractValue a, covariant AbstractValue b);
-
-  /// Returns [AbstractValue] for the runtime values contained in at least one
-  /// of [values].
-  AbstractValue unionOfMany(Iterable<AbstractValue> values);
-
-  /// Returns [AbstractValue] for the runtime values that [a] and [b] have in
-  /// common.
-  AbstractValue intersection(
-      covariant AbstractValue a, covariant AbstractValue b);
-
-  /// Returns `true` if [a] and [b] have no runtime values in common.
-  bool areDisjoint(covariant AbstractValue a, covariant AbstractValue b);
-
-  /// Returns `true` if [a] contains all non-null runtime values.
-  bool containsAll(covariant AbstractValue a);
-
-  /// Computes the [AbstractValue] corresponding to the constant [value].
-  AbstractValue computeAbstractValueForConstant(ConstantValue value);
-
-  /// Returns `true` if [value] represents a container value at runtime.
-  bool isContainer(covariant AbstractValue value);
-
-  /// Creates a container value specialization of [originalValue] with the
-  /// inferred [element] runtime value and inferred runtime [length].
-  ///
-  /// The [allocationNode] is used to identify this particular map allocation.
-  /// The [allocationElement] is used only for debugging.
-  AbstractValue createContainerValue(
-      AbstractValue originalValue,
-      Object allocationNode,
-      MemberEntity allocationElement,
-      AbstractValue elementType,
-      int length);
-
-  /// Returns the element type of [value] if it represents a container value
-  /// at runtime. Returns [dynamicType] otherwise.
-  AbstractValue getContainerElementType(AbstractValue value);
-
-  /// Return the known length of [value] if it represents a container value
-  /// at runtime. Returns `null` if the length is unknown or if [value] doesn't
-  /// represent a container value at runtime.
-  int getContainerLength(AbstractValue value);
-
-  /// Returns `true` if [value] represents a map value at runtime.
-  bool isMap(covariant AbstractValue value);
-
-  /// Creates a map value specialization of [originalValue] with the inferred
-  /// [key] and [value] runtime values.
-  ///
-  /// The [allocationNode] is used to identify this particular map allocation.
-  /// The [allocationElement] is used only for debugging.
-  AbstractValue createMapValue(
-      AbstractValue originalValue,
-      Object allocationNode,
-      MemberEntity allocationElement,
-      AbstractValue key,
-      AbstractValue value);
-
-  /// Returns the key type of [value] if it represents a map value at runtime.
-  /// Returns [dynamicType] otherwise.
-  AbstractValue getMapKeyType(AbstractValue value);
-
-  /// Returns the value type of [value] if it represents a map value at runtime.
-  /// Returns [dynamicType] otherwise.
-  AbstractValue getMapValueType(AbstractValue value);
-
-  /// Returns `true` if [value] represents a dictionary value, that is, a map
-  /// with strings as keys, at runtime.
-  bool isDictionary(covariant AbstractValue value);
-
-  /// Creates a dictionary value specialization of [originalValue] with the
-  /// inferred [key] and [value] runtime values.
-  ///
-  /// The [allocationNode] is used to identify this particular map allocation.
-  /// The [allocationElement] is used only for debugging.
-  AbstractValue createDictionaryValue(
-      AbstractValue originalValue,
-      Object allocationNode,
-      MemberEntity allocationElement,
-      AbstractValue key,
-      AbstractValue value,
-      Map<String, AbstractValue> mappings);
-
-  /// Returns `true` if [value] is a dictionary value which contains [key] as
-  /// a key.
-  bool containsDictionaryKey(AbstractValue value, String key);
-
-  /// Returns the value type for [key] in [value] if it represents a dictionary
-  /// value at runtime. Returns [dynamicType] otherwise.
-  AbstractValue getDictionaryValueForKey(AbstractValue value, String key);
-
-  /// Returns `true` if [specialization] is a specialization of
-  /// [generalization].
-  ///
-  /// Specializations are created through [createPrimitiveValue],
-  /// [createMapValue], [createDictionaryValue] and [createContainerValue].
-  bool isSpecializationOf(
-      AbstractValue specialization, AbstractValue generalization);
-
-  /// Returns the value of which [value] is a specialization. Return `null` if
-  /// [value] is not a specialization.
-  ///
-  /// Specializations are created through [createPrimitiveValue],
-  /// [createMapValue], [createDictionaryValue] and [createContainerValue].
-  AbstractValue getGeneralization(AbstractValue value);
-
-  /// Return the object identifying the allocation of [value] if it is an
-  /// allocation based specialization. Otherwise returns `null`.
-  ///
-  /// Allocation based specializations are created through [createMapValue],
-  /// [createDictionaryValue] and [createContainerValue]
-  Object getAllocationNode(AbstractValue value);
-
-  /// Return the allocation element of [value] if it is an allocation based
-  /// specialization. Otherwise returns `null`.
-  ///
-  /// Allocation based specializations are created through [createMapValue],
-  /// [createDictionaryValue] and [createContainerValue]
-  MemberEntity getAllocationElement(AbstractValue value);
-
-  /// Returns `true` if [value] a known primitive JavaScript value at runtime.
-  bool isPrimitiveValue(covariant AbstractValue value);
-
-  /// Creates a primitive value specialization of [originalValue] with the
-  /// inferred primitive constant [value].
-  AbstractValue createPrimitiveValue(
-      AbstractValue originalValue, PrimitiveConstantValue value);
-
-  /// Returns the primitive JavaScript value of [value] if it represents a
-  /// primitive JavaScript value at runtime, value at runtime. Returns `null`
-  /// otherwise.
-  PrimitiveConstantValue getPrimitiveValue(covariant AbstractValue value);
-
-  /// Compute the type of all potential receivers of the set of live [members].
-  AbstractValue computeReceiver(Iterable<MemberEntity> members);
-
-  /// Returns whether [member] is a potential target when being
-  /// invoked on a [receiver]. [selector] is used to ensure library privacy is
-  /// taken into account.
-  bool canHit(AbstractValue receiver, MemberEntity member, Selector selector);
-
-  /// Returns whether [selector] invoked on a [receiver] can hit a
-  /// [noSuchMethod].
-  bool needsNoSuchMethodHandling(AbstractValue receiver, Selector selector);
-
-  /// Returns `true` if the set of runtime values of [subset] are all in the set
-  /// of runtime values of [superset].
-  bool contains(AbstractValue superset, AbstractValue subset);
-
-  /// Returns `true` if the set of runtime values of [subset] are all in the set
-  /// of runtime values of [superset].
-  bool isIn(AbstractValue subset, AbstractValue superset);
-
-  /// Returns the [MemberEntity] that is known to always be hit at runtime
-  /// [receiver].
-  ///
-  /// Returns `null` if 0 or more than 1 member can be hit at runtime.
-  MemberEntity locateSingleMember(AbstractValue receiver, Selector selector);
-
-  /// Returns `true` if [value] is an indexable JavaScript value at runtime.
-  bool isJsIndexable(covariant AbstractValue value);
-
-  /// Returns `true` if [value] is an indexable and iterable JavaScript value at
-  /// runtime.
-  ///
-  /// JavaScript arrays are both indexable and iterable whereas JavaScript
-  /// strings are indexable but not iterable.
-  bool isJsIndexableAndIterable(AbstractValue value);
-
-  /// Returns `true` if [value] is an JavaScript indexable of fixed length.
-  bool isFixedLengthJsIndexable(AbstractValue value);
-
-  /// Returns compact a textual representation for [value] used for debugging.
-  String getCompactText(AbstractValue value);
-
-  /// Deserializes an [AbstractValue] for this domain from [source].
-  AbstractValue readAbstractValueFromDataSource(DataSource source);
-
-  /// Serializes this [value] for this domain to [sink].
-  void writeAbstractValueToDataSink(DataSink sink, AbstractValue value);
-}
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index 5a42501..395639e 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -71,9 +71,9 @@
   ConstantValue getConstantFieldInitializer(covariant FieldEntity field);
 
   /// Returns `true` if [member] is invoked as a setter.
-  bool hasInvokedSetter(MemberEntity member, JClosedWorld world);
+  bool hasInvokedSetter(MemberEntity member);
 
-  bool hasInvokedGetter(MemberEntity member, JClosedWorld world);
+  bool hasInvokedGetter(MemberEntity member);
 
   Map<Selector, SelectorConstraints> invocationsByName(String name);
 
@@ -260,7 +260,7 @@
     for (Selector selector in selectors.keys) {
       if (selector.appliesUnnamed(member)) {
         SelectorConstraints masks = selectors[selector];
-        if (masks.applies(member, selector, world)) {
+        if (masks.canHit(member, selector.memberName, world)) {
           return true;
         }
       }
@@ -268,17 +268,17 @@
     return false;
   }
 
-  bool hasInvocation(MemberEntity member, JClosedWorld world) {
-    return _hasMatchingSelector(_invokedNames[member.name], member, world);
+  bool hasInvocation(MemberEntity member) {
+    return _hasMatchingSelector(_invokedNames[member.name], member, _world);
   }
 
-  bool hasInvokedGetter(MemberEntity member, JClosedWorld world) {
-    return _hasMatchingSelector(_invokedGetters[member.name], member, world) ||
+  bool hasInvokedGetter(MemberEntity member) {
+    return _hasMatchingSelector(_invokedGetters[member.name], member, _world) ||
         member.isFunction && methodsNeedingSuperGetter.contains(member);
   }
 
-  bool hasInvokedSetter(MemberEntity member, JClosedWorld world) {
-    return _hasMatchingSelector(_invokedSetters[member.name], member, world);
+  bool hasInvokedSetter(MemberEntity member) {
+    return _hasMatchingSelector(_invokedSetters[member.name], member, _world);
   }
 
   bool registerDynamicUse(
@@ -289,8 +289,9 @@
     void _process(Map<String, Set<MemberUsage>> memberMap,
         EnumSet<MemberUse> action(MemberUsage usage)) {
       _processSet(memberMap, methodName, (MemberUsage usage) {
-        if (selectorConstraintsStrategy.appliedUnnamed(
-            dynamicUse, usage.entity, _world)) {
+        if (selector.appliesUnnamed(usage.entity) &&
+            selectorConstraintsStrategy.appliedUnnamed(
+                dynamicUse, usage.entity, _world)) {
           memberUsed(usage.entity, action(usage));
           return true;
         }
@@ -331,8 +332,12 @@
     Object constraint = dynamicUse.receiverConstraint;
     Map<Selector, SelectorConstraints> selectors =
         selectorMap[name] ??= new Maplet<Selector, SelectorConstraints>();
-    UniverseSelectorConstraints constraints = selectors[selector] ??=
-        selectorConstraintsStrategy.createSelectorConstraints(selector);
+    UniverseSelectorConstraints constraints = selectors[selector];
+    if (constraints == null) {
+      selectors[selector] = selectorConstraintsStrategy
+          .createSelectorConstraints(selector, constraint);
+      return true;
+    }
     return constraints.addReceiverConstraint(constraint);
   }
 
@@ -504,13 +509,13 @@
       MemberUsage usage = new MemberUsage(member, isNative: isNative);
       EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
       useSet.addAll(usage.appliedUse);
-      if (!usage.hasRead && hasInvokedGetter(member, _world)) {
+      if (!usage.hasRead && hasInvokedGetter(member)) {
         useSet.addAll(usage.read());
       }
-      if (!usage.hasWrite && hasInvokedSetter(member, _world)) {
+      if (!usage.hasWrite && hasInvokedSetter(member)) {
         useSet.addAll(usage.write());
       }
-      if (!usage.hasInvoke && hasInvocation(member, _world)) {
+      if (!usage.hasInvoke && hasInvocation(member)) {
         useSet.addAll(usage.invoke());
       }
 
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart
index 5f78a8e..e8edd4b 100644
--- a/pkg/compiler/lib/src/universe/function_set.dart
+++ b/pkg/compiler/lib/src/universe/function_set.dart
@@ -6,7 +6,7 @@
 
 import '../common/names.dart' show Identifiers, Selectors;
 import '../elements/entities.dart';
-import '../types/abstract_value_domain.dart';
+import '../inferrer/abstract_value_domain.dart';
 import '../util/util.dart' show Hashing, Setlet;
 import 'selector.dart' show Selector;
 
@@ -108,11 +108,15 @@
 
   bool applies(MemberEntity element, AbstractValueDomain domain) {
     if (!selector.appliesUnnamed(element)) return false;
-    return domain.canHit(receiver, element, selector);
+    return domain
+        .isTargetingMember(receiver, element, selector.memberName)
+        .isPotentiallyTrue;
   }
 
   bool needsNoSuchMethodHandling(AbstractValueDomain domain) {
-    return domain.needsNoSuchMethodHandling(receiver, selector);
+    return domain
+        .needsNoSuchMethodHandling(receiver, selector)
+        .isPotentiallyTrue;
   }
 
   bool operator ==(other) {
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index e396467..6119207 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -399,6 +399,7 @@
   final KAllocatorAnalysis _allocatorAnalysis;
   final NativeResolutionEnqueuer _nativeResolutionEnqueuer;
   final NoSuchMethodRegistry _noSuchMethodRegistry;
+  final AnnotationsDataBuilder _annotationsDataBuilder;
 
   final SelectorConstraintsStrategy _selectorConstraintsStrategy;
   final ClassHierarchyBuilder _classHierarchyBuilder;
@@ -435,6 +436,7 @@
       this._allocatorAnalysis,
       this._nativeResolutionEnqueuer,
       this._noSuchMethodRegistry,
+      this._annotationsDataBuilder,
       this._selectorConstraintsStrategy,
       this._classHierarchyBuilder,
       this._classQueries);
@@ -587,7 +589,7 @@
     for (Selector selector in selectors.keys) {
       if (selector.appliesUnnamed(member)) {
         SelectorConstraints masks = selectors[selector];
-        if (masks.applies(member, selector, this)) {
+        if (masks.canHit(member, selector.memberName, this)) {
           return true;
         }
       }
@@ -621,8 +623,9 @@
     void _process(Map<String, Set<MemberUsage>> memberMap,
         EnumSet<MemberUse> action(MemberUsage usage)) {
       _processSet(memberMap, methodName, (MemberUsage usage) {
-        if (_selectorConstraintsStrategy.appliedUnnamed(
-            dynamicUse, usage.entity, this)) {
+        if (selector.appliesUnnamed(usage.entity) &&
+            _selectorConstraintsStrategy.appliedUnnamed(
+                dynamicUse, usage.entity, this)) {
           memberUsed(usage.entity, action(usage));
           return true;
         }
@@ -659,10 +662,12 @@
     Object constraint = dynamicUse.receiverConstraint;
     Map<Selector, SelectorConstraints> selectors = selectorMap.putIfAbsent(
         name, () => new Maplet<Selector, SelectorConstraints>());
-    UniverseSelectorConstraints constraints =
-        selectors.putIfAbsent(selector, () {
-      return _selectorConstraintsStrategy.createSelectorConstraints(selector);
-    });
+    UniverseSelectorConstraints constraints = selectors[selector];
+    if (constraints == null) {
+      selectors[selector] = _selectorConstraintsStrategy
+          .createSelectorConstraints(selector, constraint);
+      return true;
+    }
     return constraints.addReceiverConstraint(constraint);
   }
 
@@ -989,6 +994,11 @@
         return _classHierarchyBuilder.isInheritedInThisClass(
             memberHoldingClass, type);
       case ClassRelation.subtype:
+        if (memberHoldingClass == _commonElements.nullClass ||
+            memberHoldingClass == _commonElements.jsNullClass) {
+          // Members of `Null` and `JSNull` are always potential targets.
+          return true;
+        }
         return _classHierarchyBuilder.isInheritedInSubtypeOf(
             memberHoldingClass, type);
     }
@@ -1019,9 +1029,6 @@
     BackendUsage backendUsage = _backendUsageBuilder.close();
     _closed = true;
 
-    AnnotationsData annotationsData = processAnnotations(
-        reporter, _commonElements, _elementEnvironment, _processedMembers);
-
     KClosedWorld closedWorld = new KClosedWorldImpl(_elementMap,
         options: _options,
         elementEnvironment: _elementEnvironment,
@@ -1042,7 +1049,7 @@
         mixinUses: _classHierarchyBuilder.mixinUses,
         typesImplementedBySubclasses: typesImplementedBySubclasses,
         classHierarchy: _classHierarchyBuilder.close(),
-        annotationsData: annotationsData);
+        annotationsData: _annotationsDataBuilder);
     if (retainDataForTesting) {
       _closedWorldCache = closedWorld;
     }
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index 42cac09..47f974e 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -250,11 +250,6 @@
 
   bool appliesUnnamed(MemberEntity element) {
     assert(name == element.name);
-    return appliesUntyped(element);
-  }
-
-  bool appliesUntyped(MemberEntity element) {
-    assert(name == element.name);
     if (memberName.isPrivate && memberName.library != element.library) {
       // TODO(johnniwinther): Maybe this should be
       // `memberName != element.memberName`.
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index a5e2b41..1336828 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -173,12 +173,22 @@
   final int hashCode;
   final InterfaceType type;
   final CallStructure callStructure;
+  final ImportEntity deferredImport;
 
   StaticUse.internal(Entity element, this.kind,
-      {this.type, this.callStructure, typeArgumentsHash: 0})
+      {this.type,
+      this.callStructure,
+      this.deferredImport,
+      typeArgumentsHash: 0})
       : this.element = element,
-        this.hashCode = Hashing.objectsHash(
-            element, kind, type, typeArgumentsHash, callStructure);
+        this.hashCode = Hashing.listHash([
+          element,
+          kind,
+          type,
+          typeArgumentsHash,
+          callStructure,
+          deferredImport
+        ]);
 
   /// Short textual representation use for testing.
   String get shortText {
@@ -232,30 +242,33 @@
   /// [callStructure].
   factory StaticUse.staticInvoke(
       FunctionEntity element, CallStructure callStructure,
-      [List<DartType> typeArguments]) {
+      [List<DartType> typeArguments, ImportEntity deferredImport]) {
     assert(
         element.isStatic || element.isTopLevel,
         failedAt(
             element,
             "Static invoke element $element must be a top-level "
             "or static method."));
-    return new GenericStaticUse(
-        element, StaticUseKind.INVOKE, callStructure, typeArguments);
+    return new GenericStaticUse(element, StaticUseKind.INVOKE, callStructure,
+        typeArguments, deferredImport);
   }
 
   /// Closurization of a static or top-level function [element].
-  factory StaticUse.staticTearOff(FunctionEntity element) {
+  factory StaticUse.staticTearOff(FunctionEntity element,
+      [ImportEntity deferredImport]) {
     assert(
         element.isStatic || element.isTopLevel,
         failedAt(
             element,
             "Static tear-off element $element must be a top-level "
             "or static method."));
-    return new StaticUse.internal(element, StaticUseKind.STATIC_TEAR_OFF);
+    return new StaticUse.internal(element, StaticUseKind.STATIC_TEAR_OFF,
+        deferredImport: deferredImport);
   }
 
   /// Read access of a static or top-level field or getter [element].
-  factory StaticUse.staticGet(MemberEntity element) {
+  factory StaticUse.staticGet(MemberEntity element,
+      [ImportEntity deferredImport]) {
     assert(
         element.isStatic || element.isTopLevel,
         failedAt(
@@ -266,11 +279,13 @@
         element.isField || element.isGetter,
         failedAt(element,
             "Static get element $element must be a field or a getter."));
-    return new StaticUse.internal(element, StaticUseKind.GET);
+    return new StaticUse.internal(element, StaticUseKind.GET,
+        deferredImport: deferredImport);
   }
 
   /// Write access of a static or top-level field or setter [element].
-  factory StaticUse.staticSet(MemberEntity element) {
+  factory StaticUse.staticSet(MemberEntity element,
+      [ImportEntity deferredImport]) {
     assert(
         element.isStatic || element.isTopLevel,
         failedAt(
@@ -281,7 +296,8 @@
         element.isField || element.isSetter,
         failedAt(element,
             "Static set element $element must be a field or a setter."));
-    return new StaticUse.internal(element, StaticUseKind.SET);
+    return new StaticUse.internal(element, StaticUseKind.SET,
+        deferredImport: deferredImport);
   }
 
   /// Invocation of the lazy initializer for a static or top-level field
@@ -432,8 +448,11 @@
 
   /// Constructor invocation of [element] with the given [callStructure] on
   /// [type].
-  factory StaticUse.typedConstructorInvoke(ConstructorEntity element,
-      CallStructure callStructure, InterfaceType type) {
+  factory StaticUse.typedConstructorInvoke(
+      ConstructorEntity element,
+      CallStructure callStructure,
+      InterfaceType type,
+      ImportEntity deferredImport) {
     assert(type != null,
         failedAt(element, "No type provided for constructor invocation."));
     assert(
@@ -443,13 +462,18 @@
             "Typed constructor invocation element $element "
             "must be a constructor."));
     return new StaticUse.internal(element, StaticUseKind.CONSTRUCTOR_INVOKE,
-        type: type, callStructure: callStructure);
+        type: type,
+        callStructure: callStructure,
+        deferredImport: deferredImport);
   }
 
   /// Constant constructor invocation of [element] with the given
   /// [callStructure] on [type].
-  factory StaticUse.constConstructorInvoke(ConstructorEntity element,
-      CallStructure callStructure, InterfaceType type) {
+  factory StaticUse.constConstructorInvoke(
+      ConstructorEntity element,
+      CallStructure callStructure,
+      InterfaceType type,
+      ImportEntity deferredImport) {
     assert(type != null,
         failedAt(element, "No type provided for constructor invocation."));
     assert(
@@ -460,7 +484,9 @@
             "must be a constructor."));
     return new StaticUse.internal(
         element, StaticUseKind.CONST_CONSTRUCTOR_INVOKE,
-        type: type, callStructure: callStructure);
+        type: type,
+        callStructure: callStructure,
+        deferredImport: deferredImport);
   }
 
   /// Constructor redirection to [element] on [type].
@@ -563,9 +589,11 @@
   final List<DartType> typeArguments;
 
   GenericStaticUse(Entity entity, StaticUseKind kind,
-      CallStructure callStructure, this.typeArguments)
+      CallStructure callStructure, this.typeArguments,
+      [ImportEntity deferredImport])
       : super.internal(entity, kind,
             callStructure: callStructure,
+            deferredImport: deferredImport,
             typeArgumentsHash: Hashing.listHash(typeArguments)) {
     assert(
         (callStructure?.typeArgumentCount ?? 0) == (typeArguments?.length ?? 0),
@@ -599,11 +627,12 @@
   final DartType type;
   final TypeUseKind kind;
   final int hashCode;
+  final ImportEntity deferredImport;
 
-  TypeUse.internal(DartType type, TypeUseKind kind)
+  TypeUse.internal(DartType type, TypeUseKind kind, [this.deferredImport])
       : this.type = type,
         this.kind = kind,
-        this.hashCode = Hashing.objectHash(type, Hashing.objectHash(kind));
+        this.hashCode = Hashing.objectsHash(type, kind, deferredImport);
 
   /// Short textual representation use for testing.
   String get shortText {
@@ -678,8 +707,8 @@
   }
 
   /// [type] used as a type literal, like `foo() => T;`.
-  factory TypeUse.typeLiteral(DartType type) {
-    return new TypeUse.internal(type, TypeUseKind.TYPE_LITERAL);
+  factory TypeUse.typeLiteral(DartType type, ImportEntity deferredImport) {
+    return new TypeUse.internal(type, TypeUseKind.TYPE_LITERAL, deferredImport);
   }
 
   /// [type] used in an instantiation, like `new T();`.
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index 9eb4560..e80c180 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -6,6 +6,7 @@
 
 import '../common_elements.dart';
 import '../elements/entities.dart';
+import '../elements/names.dart';
 import '../elements/types.dart';
 import '../ir/static_type.dart';
 import '../js_backend/native_data.dart' show NativeBasicData;
@@ -33,7 +34,7 @@
 /// the selector constraints for dynamic calls to 'foo' with two positional
 /// arguments could be 'receiver of exact instance `A` or `B`'.
 abstract class SelectorConstraints {
-  /// Returns `true` if [selector] applies to [element] under these constraints
+  /// Returns `true` if [name] applies to [element] under these constraints
   /// given the closed [world].
   ///
   /// Consider for instance in this world:
@@ -48,7 +49,7 @@
   ///
   /// Ideally the selector constraints for calls `foo` with two positional
   /// arguments apply to `A.foo` but `B.foo`.
-  bool applies(MemberEntity element, Selector selector, covariant World world);
+  bool canHit(MemberEntity element, Name name, covariant World world);
 
   /// Returns `true` if at least one of the receivers matching these constraints
   /// in the closed [world] have no implementation matching [selector].
@@ -76,7 +77,8 @@
 abstract class SelectorConstraintsStrategy {
   /// Create a [UniverseSelectorConstraints] to represent the global receiver
   /// constraints for dynamic call sites with [selector].
-  UniverseSelectorConstraints createSelectorConstraints(Selector selector);
+  UniverseSelectorConstraints createSelectorConstraints(
+      Selector selector, Object initialConstraint);
 
   /// Returns `true`  if [member] is a potential target of [dynamicUse].
   bool appliedUnnamed(DynamicUse dynamicUse, MemberEntity member, World world);
@@ -89,8 +91,10 @@
 class StrongModeWorldStrategy implements SelectorConstraintsStrategy {
   const StrongModeWorldStrategy();
 
-  StrongModeWorldConstraints createSelectorConstraints(Selector selector) {
-    return new StrongModeWorldConstraints();
+  StrongModeWorldConstraints createSelectorConstraints(
+      Selector selector, Object initialConstraint) {
+    return new StrongModeWorldConstraints()
+      ..addReceiverConstraint(initialConstraint);
   }
 
   @override
@@ -99,7 +103,8 @@
     Selector selector = dynamicUse.selector;
     StrongModeConstraint constraint = dynamicUse.receiverConstraint;
     return selector.appliesUnnamed(member) &&
-        (constraint == null || constraint.canHit(member, selector, world));
+        (constraint == null ||
+            constraint.canHit(member, selector.memberName, world));
   }
 }
 
@@ -108,11 +113,11 @@
   Set<StrongModeConstraint> _constraints;
 
   @override
-  bool applies(MemberEntity element, Selector selector, World world) {
+  bool canHit(MemberEntity element, Name name, World world) {
     if (isAll) return true;
     if (_constraints == null) return false;
     for (StrongModeConstraint constraint in _constraints) {
-      if (constraint.canHit(element, selector, world)) {
+      if (constraint.canHit(element, name, world)) {
         return true;
       }
     }
@@ -177,7 +182,7 @@
 
   bool needsNoSuchMethodHandling(Selector selector, World world) => true;
 
-  bool canHit(MemberEntity element, Selector selector, OpenWorld world) {
+  bool canHit(MemberEntity element, Name name, OpenWorld world) {
     return world.isInheritedIn(element, cls, relation);
   }
 
diff --git a/pkg/compiler/lib/src/util/features.dart b/pkg/compiler/lib/src/util/features.dart
new file mode 100644
index 0000000..57aeba2
--- /dev/null
+++ b/pkg/compiler/lib/src/util/features.dart
@@ -0,0 +1,150 @@
+// Copyright (c) 2019, 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.
+
+/// Set of features used in annotations.
+class Features {
+  Map<String, Object> _features = {};
+
+  void add(String key, {var value: ''}) {
+    _features[key] = value.toString();
+  }
+
+  void addElement(String key, [var value]) {
+    List<String> list = _features.putIfAbsent(key, () => <String>[]);
+    if (value != null) {
+      list.add(value.toString());
+    }
+  }
+
+  bool containsKey(String key) {
+    return _features.containsKey(key);
+  }
+
+  void operator []=(String key, String value) {
+    _features[key] = value;
+  }
+
+  String operator [](String key) => _features[key];
+
+  String remove(String key) => _features.remove(key);
+
+  void forEach(void Function(String, Object) f) {
+    _features.forEach(f);
+  }
+
+  /// Returns a string containing all features in a comma-separated list sorted
+  /// by feature names.
+  String getText() {
+    StringBuffer sb = new StringBuffer();
+    bool needsComma = false;
+    for (String name in _features.keys.toList()..sort()) {
+      dynamic value = _features[name];
+      if (value != null) {
+        if (needsComma) {
+          sb.write(',');
+        }
+        sb.write(name);
+        if (value is List<String>) {
+          value = '[${(value..sort()).join(',')}]';
+        }
+        if (value != '') {
+          sb.write('=');
+          sb.write(value);
+        }
+        needsComma = true;
+      }
+    }
+    return sb.toString();
+  }
+
+  /// Creates a [Features] object by parse the [text] encoding.
+  ///
+  /// Single features will be parsed as strings and list features (features
+  /// encoded in `[...]` will be parsed as lists of strings.
+  static Features fromText(String text) {
+    Features features = new Features();
+    int index = 0;
+    while (index < text.length) {
+      int eqPos = text.indexOf('=', index);
+      int commaPos = text.indexOf(',', index);
+      String name;
+      bool hasValue = false;
+      if (eqPos != -1 && commaPos != -1) {
+        if (eqPos < commaPos) {
+          name = text.substring(index, eqPos);
+          hasValue = true;
+          index = eqPos + 1;
+        } else {
+          name = text.substring(index, commaPos);
+          index = commaPos + 1;
+        }
+      } else if (eqPos != -1) {
+        name = text.substring(index, eqPos);
+        hasValue = true;
+        index = eqPos + 1;
+      } else if (commaPos != -1) {
+        name = text.substring(index, commaPos);
+        index = commaPos + 1;
+      } else {
+        name = text.substring(index);
+        index = text.length;
+      }
+      if (hasValue) {
+        const Map<String, String> delimiters = const {
+          '[': ']',
+          '{': '}',
+          '(': ')',
+          '<': '>'
+        };
+        List<String> endDelimiters = <String>[];
+        bool isList = index < text.length && text.startsWith('[', index);
+        if (isList) {
+          features.addElement(name);
+          endDelimiters.add(']');
+          index++;
+        }
+        int valueStart = index;
+        while (index < text.length) {
+          String char = text.substring(index, index + 1);
+          if (endDelimiters.isNotEmpty && endDelimiters.last == char) {
+            endDelimiters.removeLast();
+            index++;
+          } else {
+            String endDelimiter = delimiters[char];
+            if (endDelimiter != null) {
+              endDelimiters.add(endDelimiter);
+              index++;
+            } else if (char == ',') {
+              if (endDelimiters.isEmpty) {
+                break;
+              } else if (endDelimiters.length == 1 && isList) {
+                String value = text.substring(valueStart, index);
+                features.addElement(name, value);
+                index++;
+                valueStart = index;
+              } else {
+                index++;
+              }
+            } else {
+              index++;
+            }
+          }
+        }
+        if (isList) {
+          String value = text.substring(valueStart, index - 1);
+          if (value.isNotEmpty) {
+            features.addElement(name, value);
+          }
+        } else {
+          String value = text.substring(valueStart, index);
+          features.add(name, value: value);
+        }
+        index++;
+      } else {
+        features.add(name);
+      }
+    }
+    return features;
+  }
+}
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index df4cfa4..297efca 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -64,6 +64,17 @@
     return h;
   }
 
+  /// Mix the bits of the element hash codes of [iterable] with [existing].
+  static int setHash<E>(Iterable<E> iterable, [int existing = 0]) {
+    int h = existing;
+    if (iterable != null) {
+      for (E e in iterable) {
+        h += objectsHash(e);
+      }
+    }
+    return h & SMI_MASK;
+  }
+
   /// Mix the bits of the hash codes of the unordered key/value from [map] with
   /// [existing].
   static int unorderedMapHash(Map map, [int existing = 0]) {
@@ -97,6 +108,12 @@
   return true;
 }
 
+bool equalSets<E>(Set<E> a, Set<E> b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  return a.length == b.length && a.containsAll(b) && b.containsAll(a);
+}
+
 /**
  * File name prefix used to shorten the file name in stack traces printed by
  * [trace].
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 6a0fd25..0ed8695 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -16,7 +16,9 @@
 import 'deferred_load.dart';
 import 'diagnostics/diagnostic_listener.dart';
 import 'elements/entities.dart';
+import 'elements/names.dart';
 import 'elements/types.dart';
+import 'inferrer/abstract_value_domain.dart';
 import 'ir/static_type.dart';
 import 'js_backend/annotations.dart';
 import 'js_backend/allocator_analysis.dart'
@@ -28,7 +30,6 @@
 import 'js_backend/runtime_types.dart' show RuntimeTypesNeed;
 import 'js_model/locals.dart';
 import 'js_emitter/sorter.dart';
-import 'types/abstract_value_domain.dart';
 import 'universe/class_hierarchy.dart';
 import 'universe/selector.dart' show Selector;
 
@@ -166,10 +167,9 @@
   bool needsNoSuchMethod(ClassEntity cls, Selector selector, ClassQuery query);
 
   /// Returns whether [element] will be the one used at runtime when being
-  /// invoked on an instance of [cls]. [selector] is used to ensure library
+  /// invoked on an instance of [cls]. [name] is used to ensure library
   /// privacy is taken into account.
-  bool hasElementIn(
-      covariant ClassEntity cls, Selector selector, covariant Entity element);
+  bool hasElementIn(ClassEntity cls, Name name, MemberEntity element);
 
   /// Returns `true` if the field [element] is known to be effectively final.
   bool fieldNeverChanges(MemberEntity element);
@@ -201,11 +201,6 @@
   /// Returns the single [MemberEntity] that matches a call to [selector] on the
   /// [receiver]. If multiple targets exist, `null` is returned.
   MemberEntity locateSingleMember(Selector selector, AbstractValue receiver);
-
-  /// Returns the single field that matches a call to [selector] on the
-  /// [receiver]. If multiple targets exist or the single target is not a field,
-  /// `null` is returned.
-  FieldEntity locateSingleField(Selector selector, AbstractValue receiver);
 }
 
 abstract class OpenWorld implements World {
diff --git a/pkg/dart2js_tools/pubspec.yaml b/pkg/dart2js_tools/pubspec.yaml
index 889e6f4..87290a6 100644
--- a/pkg/dart2js_tools/pubspec.yaml
+++ b/pkg/dart2js_tools/pubspec.yaml
@@ -1,5 +1,5 @@
 name: dart2js_tools
-version: 0.0.1
+publish_to: none
 description: >
   Collection of tools used with dart2js including analyzing compilation
   information, deobfuscation of stack-traces and minified names.
diff --git a/pkg/dartfix/CHANGELOG.md b/pkg/dartfix/CHANGELOG.md
index 07a68b9..6fcede0 100644
--- a/pkg/dartfix/CHANGELOG.md
+++ b/pkg/dartfix/CHANGELOG.md
@@ -1,3 +1,10 @@
+# 0.1.3
+ * update SDK constraints
+
+# 0.1.2
+ * update SDK constraints
+ * add example.dart showing what can be "fixed"
+
 # 0.1.1
  * Remove reading dartfix version from pubspec
 
diff --git a/pkg/dartfix/example/example-fixed.dart b/pkg/dartfix/example/example-fixed.dart
new file mode 100644
index 0000000..4f4a314
--- /dev/null
+++ b/pkg/dartfix/example/example-fixed.dart
@@ -0,0 +1,18 @@
+// This file contains code that has been modified by running dartfix.
+// See example.dart for the original unmodified code.
+
+// Dart will automatically convert int literals to doubles.
+// Running dartfix converts this double literal to an int.
+const double myDouble = 4;
+
+// This class is used as a mixin but does not use the new mixin syntax.
+// Running dartfix converts this class to use the new syntax.
+mixin MyMixin {
+  final someValue = myDouble;
+}
+
+class MyClass with MyMixin {}
+
+main() {
+  print('myDouble = ${MyClass().someValue}');
+}
diff --git a/pkg/dartfix/example/example.dart b/pkg/dartfix/example/example.dart
new file mode 100644
index 0000000..53d5292
--- /dev/null
+++ b/pkg/dartfix/example/example.dart
@@ -0,0 +1,18 @@
+// This file contains code that is modified by running dartfix.
+// After running dartfix, the content of this file matches example-fixed.dart.
+
+// Dart will automatically convert int literals to doubles.
+// Running dartfix converts this double literal to an int.
+const double myDouble = 4.0;
+
+// This class is used as a mixin but does not use the new mixin syntax.
+// Running dartfix converts this class to use the new syntax.
+class MyMixin {
+  final someValue = myDouble;
+}
+
+class MyClass with MyMixin {}
+
+main() {
+  print('myDouble = ${MyClass().someValue}');
+}
diff --git a/pkg/dartfix/lib/src/driver.dart b/pkg/dartfix/lib/src/driver.dart
index e115930..1ccc556 100644
--- a/pkg/dartfix/lib/src/driver.dart
+++ b/pkg/dartfix/lib/src/driver.dart
@@ -29,17 +29,19 @@
   bool force;
   bool overwrite;
   List<String> targets;
+  EditDartfixResult result;
 
   Ansi get ansi => logger.ansi;
 
-  Future start(List<String> args) async {
+  Future start(List<String> args,
+      {Context testContext, Logger testLogger}) async {
     final Options options = Options.parse(args);
 
     force = options.force;
     overwrite = options.overwrite;
     targets = options.targets;
-    context = options.context;
-    logger = options.logger;
+    context = testContext ?? options.context;
+    logger = testLogger ?? options.logger;
     server = new Server(listener: new _Listener(logger));
     handler = new _Handler(this);
 
@@ -47,7 +49,6 @@
       context.exit(15);
     }
 
-    EditDartfixResult result;
     try {
       final progress = await setupAnalysis(options);
       result = await requestFixes(options, progress);
@@ -55,7 +56,7 @@
       await server.stop();
     }
     if (result != null) {
-      applyFixes(result);
+      applyFixes();
     }
   }
 
@@ -112,7 +113,7 @@
     return EditDartfixResult.fromJson(decoder, 'result', json);
   }
 
-  Future applyFixes(EditDartfixResult result) async {
+  Future applyFixes() async {
     showDescriptions('Recommended changes', result.suggestions);
     showDescriptions('Recommended changes that cannot be automatically applied',
         result.otherSuggestions);
diff --git a/pkg/dartfix/pubspec.yaml b/pkg/dartfix/pubspec.yaml
index b3d6515..dac0629 100644
--- a/pkg/dartfix/pubspec.yaml
+++ b/pkg/dartfix/pubspec.yaml
@@ -1,5 +1,5 @@
 name: dartfix
-version: 0.1.1
+version: 0.1.3
 author: Dart Team <misc@dartlang.org>
 description:
   A tool for migrating Dart source to newer versions of the Dart SDK,
@@ -8,9 +8,7 @@
 executables:
   dartfix: fix
 environment:
-  # pin to a narrow SDK range because there will be future versions of dartfix
-  # which are more appropriate for those future versions of the SDK
-  sdk: '>=2.1.0-dev.9.2 <2.3.0'
+  sdk: '>=2.1.0 <3.0.0'
 dependencies:
   # pin to an exact version of analysis_server_client because the edit.dartfix protocol
   # is experimental and will continue to evolve
diff --git a/pkg/dartfix/test/src/driver_test.dart b/pkg/dartfix/test/src/driver_test.dart
index 97cf270..1aa5493 100644
--- a/pkg/dartfix/test/src/driver_test.dart
+++ b/pkg/dartfix/test/src/driver_test.dart
@@ -9,7 +9,22 @@
 import 'package:pub_semver/pub_semver.dart';
 import 'package:test/test.dart';
 
+import 'test_context.dart';
+
+const _debug = true;
+const _updateExample = false;
+
 main() {
+  File exampleFile;
+  File exampleFixedFile;
+  Directory exampleDir;
+
+  setUp(() {
+    exampleFile = findFile('pkg/dartfix/example/example.dart');
+    exampleFixedFile = findFile('pkg/dartfix/example/example-fixed.dart');
+    exampleDir = exampleFile.parent;
+  });
+
   test('protocol version', () {
     // The edit.dartfix protocol is experimental and will continue to evolve
     // an so dartfix will only work with this specific version of the protocol.
@@ -26,6 +41,70 @@
     // analysis_server_client and dartfix packages must be published.
     expect(clientVersion, clientVersionInDartfixPubspec);
   });
+
+  test('fix example', () async {
+    final driver = new Driver();
+    final testContext = new TestContext();
+    final testLogger = new TestLogger();
+    String exampleSource = await exampleFile.readAsString();
+
+    await driver.start([exampleDir.path],
+        testContext: testContext, testLogger: testLogger);
+    if (_debug) {
+      print(testLogger.stderrBuffer.toString());
+      print(testLogger.stdoutBuffer.toString());
+      print('--- original example');
+      print(exampleSource);
+    }
+
+    final suggestions = driver.result.suggestions;
+    expect(suggestions, hasLength(2));
+    expectHasSuggestion(suggestions, 'Convert MyMixin to a mixin');
+    expectHasSuggestion(suggestions, 'Replace a double literal');
+
+    expect(driver.result.edits, hasLength(1));
+    for (SourceEdit edit in driver.result.edits[0].edits) {
+      exampleSource = edit.apply(exampleSource);
+    }
+    if (_debug) {
+      print('--- fixed example');
+      print(exampleSource);
+    }
+
+    exampleSource = replaceLeadingComment(exampleSource);
+    if (_updateExample) {
+      await exampleFixedFile.writeAsString(exampleSource);
+    } else {
+      final expectedSource = await exampleFixedFile.readAsString();
+      expect(exampleSource, expectedSource);
+    }
+  });
+
+  test('run example', () async {
+    if (_debug) print('--- launching original example');
+    final futureResult1 =
+        Process.run(Platform.resolvedExecutable, [exampleFile.path]);
+
+    if (_debug) print('--- launching fixed example');
+    final futureResult2 =
+        Process.run(Platform.resolvedExecutable, [exampleFixedFile.path]);
+
+    if (_debug) print('--- waiting for original example');
+    final result1 = await futureResult1;
+
+    if (_debug) print('--- waiting for fixed example');
+    final result2 = await futureResult2;
+
+    final stdout1 = result1.stdout;
+    final stdout2 = result2.stdout;
+    if (_debug) {
+      print('--- original example output');
+      print(stdout1);
+      print('--- fixed example output');
+      print(stdout2);
+    }
+    expect(stdout1, stdout2);
+  });
 }
 
 String get clientVersion =>
@@ -58,3 +137,24 @@
   }
   fail('Failed to find $key in ${pubspec.path}');
 }
+
+void expectHasSuggestion(
+    List<DartFixSuggestion> suggestions, String expectedText) {
+  for (DartFixSuggestion suggestion in suggestions) {
+    if (suggestion.description.contains(expectedText)) {
+      return;
+    }
+  }
+  fail('Failed to find suggestion containing: $expectedText');
+}
+
+String replaceLeadingComment(String source) {
+  final out = new StringBuffer('''
+// This file contains code that has been modified by running dartfix.
+// See example.dart for the original unmodified code.
+  '''
+      .trim());
+  final pattern = 'the content of this file matches example-fixed.dart.';
+  out.write(source.substring(source.indexOf(pattern) + pattern.length));
+  return out.toString();
+}
diff --git a/pkg/dev_compiler/bin/dartdevc.dart b/pkg/dev_compiler/bin/dartdevc.dart
index 10b1dd6..b366550 100755
--- a/pkg/dev_compiler/bin/dartdevc.dart
+++ b/pkg/dev_compiler/bin/dartdevc.dart
@@ -56,7 +56,7 @@
   }
 }
 
-/// Runs dartdevk in batch mode for test.dart.
+/// Runs DDC in Kernel batch mode for test.dart.
 Future runBatch(ParsedArguments batchArgs) async {
   var totalTests = 0;
   var failedTests = 0;
diff --git a/pkg/dev_compiler/bin/dartdevk.dart b/pkg/dev_compiler/bin/dartdevk.dart
deleted file mode 100755
index 018464ed..0000000
--- a/pkg/dev_compiler/bin/dartdevk.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dartdevc.dart' as dartdevc;
-
-/// Experimental command line entry point for Dart Development Compiler.
-/// Unlike `dartdevc` this version uses the shared front end and IR.
-main(List<String> args) => dartdevc.main(args.toList()..add('--kernel'));
diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
index 32f7d96..6edbe05 100644
--- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
@@ -5,13 +5,14 @@
 import 'dart:collection' show HashMap, HashSet;
 import 'dart:math' show min, max;
 
-import 'package:analyzer/analyzer.dart' hide ConstantEvaluator;
 import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/ast/token.dart' show StringToken;
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/handle.dart';
@@ -20,8 +21,8 @@
     show DartObject, DartObjectImpl;
 import 'package:analyzer/src/generated/resolver.dart'
     show TypeProvider, NamespaceBuilder;
-import 'package:analyzer/src/generated/type_system.dart'
-    show StrongTypeSystemImpl;
+import 'package:analyzer/src/generated/type_system.dart' show Dart2TypeSystem;
+import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/task/strong/ast_properties.dart';
 import 'package:path/path.dart' as path;
@@ -70,7 +71,7 @@
   final SummaryDataStore summaryData;
 
   final CompilerOptions options;
-  final StrongTypeSystemImpl rules;
+  final Dart2TypeSystem rules;
 
   /// Errors that were produced during compilation, if any.
   final List<AnalysisError> errors;
@@ -104,7 +105,7 @@
   Expression _cascadeTarget;
 
   /// The variable for the current catch clause
-  SimpleIdentifier _catchParameter;
+  SimpleIdentifier _rethrowParameter;
 
   /// In an async* function, this represents the stream controller parameter.
   JS.TemporaryId _asyncStarController;
@@ -197,7 +198,7 @@
 
   CodeGenerator(LinkedAnalysisDriver driver, this.types, this.summaryData,
       this.options, this._extensionTypes, this.errors)
-      : rules = StrongTypeSystemImpl(types),
+      : rules = Dart2TypeSystem(types),
         declaredVariables = driver.declaredVariables,
         _asyncStreamIterator =
             driver.getClass('dart:async', 'StreamIterator').type,
@@ -753,11 +754,16 @@
   }
 
   @override
-  visitIsExpression(IsExpression node) {
+  JS.Expression visitIsExpression(IsExpression node) {
+    return _emitIsExpression(
+        node.expression, node.type.type, node.notOperator != null);
+  }
+
+  JS.Expression _emitIsExpression(Expression operand, DartType type,
+      [bool negated = false]) {
     // Generate `is` as `dart.is` or `typeof` depending on the RHS type.
     JS.Expression result;
-    var type = node.type.type;
-    var lhs = _visitExpression(node.expression);
+    var lhs = _visitExpression(operand);
     var typeofName = jsTypeRep.typeFor(type).primitiveTypeOf;
     // Inline primitives other than int (which requires a Math.floor check).
     if (typeofName != null && type != types.intType) {
@@ -766,10 +772,7 @@
       result = js.call('#.is(#)', [_emitType(type), lhs]);
     }
 
-    if (node.notOperator != null) {
-      return js.call('!#', result);
-    }
-    return result;
+    return negated ? js.call('!#', result) : result;
   }
 
   /// No-op, typedefs are emitted as their corresponding function type.
@@ -1296,7 +1299,7 @@
     }
 
     var supertype = classElem.isMixin ? types.objectType : classElem.supertype;
-    var hasUnnamedSuper = _hasUnnamedConstructor(supertype.element);
+    var hasUnnamedSuper = _hasUnnamedInheritedConstructor(supertype.element);
 
     void emitMixinConstructors(JS.Expression className, [InterfaceType mixin]) {
       var supertype = classElem.supertype;
@@ -2381,24 +2384,23 @@
         [className, _constructorName(name), args ?? []]);
   }
 
+  bool _hasUnnamedInheritedConstructor(ClassElement e) {
+    if (e == null) return false;
+    return _hasUnnamedConstructor(e) || _hasUnnamedSuperConstructor(e);
+  }
+
   bool _hasUnnamedSuperConstructor(ClassElement e) {
-    var supertype = e.supertype;
-    // Object or mixin declaration.
-    if (supertype == null) return false;
-    if (_hasUnnamedConstructor(supertype.element)) return true;
     for (var mixin in e.mixins) {
       if (_hasUnnamedConstructor(mixin.element)) return true;
     }
-    return false;
+    return _hasUnnamedInheritedConstructor(e.supertype?.element);
   }
 
   bool _hasUnnamedConstructor(ClassElement e) {
     if (e.type.isObject) return false;
     var ctor = e.unnamedConstructor;
-    if (ctor == null) return false;
-    if (!ctor.isSynthetic) return true;
-    if (e.fields.any((f) => !f.isStatic && !f.isSynthetic)) return true;
-    return _hasUnnamedSuperConstructor(e);
+    if (ctor != null && !ctor.isSynthetic) return true;
+    return e.fields.any((f) => !f.isStatic && !f.isSynthetic);
   }
 
   /// Initialize fields. They follow the sequence:
@@ -2681,11 +2683,14 @@
   }
 
   bool _executesAtTopLevel(AstNode node) {
-    var ancestor = node.getAncestor((n) =>
-        n is FunctionBody ||
-        n is FieldDeclaration && n.staticKeyword == null ||
-        n is ConstructorDeclaration && n.constKeyword == null);
-    return ancestor == null;
+    for (var n = node.parent; n != null; n = n.parent) {
+      if (n is FunctionBody ||
+          n is FieldDeclaration && n.staticKeyword == null ||
+          n is ConstructorDeclaration && n.constKeyword == null) {
+        return false;
+      }
+    }
+    return true;
   }
 
   /// Whether the expression for [type] can be evaluated at this point in the JS
@@ -5386,7 +5391,7 @@
 
   @override
   JS.Expression visitRethrowExpression(RethrowExpression node) {
-    return runtimeCall('rethrow(#)', _visitExpression(_catchParameter));
+    return runtimeCall('rethrow(#)', _emitSimpleIdentifier(_rethrowParameter));
   }
 
   /// Visits a statement, and ensures the resulting AST handles block scope
@@ -5405,7 +5410,7 @@
   }
 
   @override
-  JS.If visitIfStatement(IfStatement node) {
+  JS.Statement visitIfStatement(IfStatement node) {
     return JS.If(_visitTest(node.condition), _visitScope(node.thenStatement),
         _visitScope(node.elseStatement));
   }
@@ -5536,82 +5541,84 @@
   JS.Catch _visitCatch(NodeList<CatchClause> clauses) {
     if (clauses == null || clauses.isEmpty) return null;
 
-    // TODO(jmesserly): need a better way to get a temporary variable.
-    // This could incorrectly shadow a user's name.
-    var savedCatch = _catchParameter;
+    var caughtError = _createTemporary('e', types.dynamicType);
+    var savedRethrow = _rethrowParameter;
+    _rethrowParameter = caughtError;
 
-    var isSingleCatch =
-        clauses.length == 1 && clauses.single.exceptionParameter != null;
-    if (isSingleCatch) {
-      // Special case for a single catch.
-      _catchParameter = clauses.single.exceptionParameter;
-    } else {
-      _catchParameter = _createTemporary('e', types.dynamicType);
-    }
+    // If we have more than one catch clause, always create a temporary so we
+    // don't shadow any names.
+    var exceptionParameter =
+        (clauses.length == 1 ? clauses[0].exceptionParameter : null) ??
+            _createTemporary('ex', types.dynamicType);
 
-    JS.Statement catchBody =
-        js.statement('throw #;', _emitSimpleIdentifier(_catchParameter));
+    var stackTraceParameter =
+        (clauses.length == 1 ? clauses[0].stackTraceParameter : null) ??
+            (clauses.any((c) => c.stackTraceParameter != null)
+                ? _createTemporary('st', types.dynamicType)
+                : null);
+
+    // Rethrow if the exception type didn't match.
+    JS.Statement catchBody = JS.Throw(_emitSimpleIdentifier(caughtError));
     for (var clause in clauses.reversed) {
-      catchBody = _catchClauseGuard(clause, catchBody);
+      catchBody = _catchClauseGuard(
+          clause, catchBody, exceptionParameter, stackTraceParameter);
     }
+    var catchStatements = [
+      js.statement('let # = #.getThrown(#)', [
+        _emitVariableDef(exceptionParameter),
+        runtimeModule,
+        _emitSimpleIdentifier(caughtError)
+      ]),
+    ];
+    if (stackTraceParameter != null) {
+      catchStatements.add(js.statement('let # = #.stackTrace(#)', [
+        _emitVariableDef(stackTraceParameter),
+        runtimeModule,
+        _emitSimpleIdentifier(caughtError)
+      ]));
+    }
+    catchStatements.add(catchBody);
 
-    var catchVarDecl = _emitSimpleIdentifier(_catchParameter) as JS.Identifier;
-    if (isSingleCatch) {
-      catchVarDecl..sourceInformation = _nodeStart(_catchParameter);
-    }
-    _catchParameter = savedCatch;
-    return JS.Catch(catchVarDecl, JS.Block([catchBody]));
+    var catchVarDecl = _emitSimpleIdentifier(caughtError) as JS.Identifier;
+    _rethrowParameter = savedRethrow;
+    return JS.Catch(catchVarDecl, JS.Block(catchStatements));
   }
 
-  JS.Statement _catchClauseGuard(CatchClause clause, JS.Statement otherwise) {
-    var then = visitCatchClause(clause);
-
-    // Discard following clauses, if any, as they are unreachable.
-    if (clause.exceptionType == null) return then;
-
-    // TODO(jmesserly): this is inconsistent with [visitIsExpression], which
-    // has special case for typeof.
-    var castType = _emitType(clause.exceptionType.type);
-
-    return JS.If(
-        js.call('#.is(#)', [castType, _emitSimpleIdentifier(_catchParameter)]),
-        then,
-        otherwise)
-      ..sourceInformation = _nodeStart(clause);
-  }
-
-  /// Visits the catch clause body. This skips the exception type guard, if any.
-  /// That is handled in [_visitCatch].
-  @override
-  JS.Statement visitCatchClause(CatchClause node) {
+  JS.Statement _catchClauseGuard(
+      CatchClause node,
+      JS.Statement otherwise,
+      SimpleIdentifier exceptionParameter,
+      SimpleIdentifier stackTraceParameter) {
     var body = <JS.Statement>[];
-
-    var savedCatch = _catchParameter;
     var vars = HashSet<String>();
+
+    void declareVariable(SimpleIdentifier variable, SimpleIdentifier value) {
+      if (variable == null) return;
+      vars.add(variable.name);
+      if (variable.name != value.name) {
+        body.add(js.statement('let # = #',
+            [visitSimpleIdentifier(variable), _emitSimpleIdentifier(value)]));
+      }
+    }
+
     if (node.catchKeyword != null) {
-      var name = node.exceptionParameter;
-      if (name == _catchParameter) {
-        vars.add(name.name);
-      } else if (name != null) {
-        vars.add(name.name);
-        body.add(js.statement('let # = #;',
-            [_emitVariableDef(name), _emitSimpleIdentifier(_catchParameter)]));
-        _catchParameter = name;
-      }
-      var stackVar = node.stackTraceParameter;
-      if (stackVar != null) {
-        vars.add(stackVar.name);
-        body.add(js.statement('let # = #.stackTrace(#);', [
-          _emitVariableDef(stackVar),
-          runtimeModule,
-          _emitSimpleIdentifier(name)
-        ]));
-      }
+      declareVariable(node.exceptionParameter, exceptionParameter);
+      declareVariable(node.stackTraceParameter, stackTraceParameter);
     }
 
     body.add(_visitStatement(node.body).toScopedBlock(vars));
-    _catchParameter = savedCatch;
-    return JS.Statement.from(body);
+    var then = JS.Statement.from(body);
+
+    // Discard following clauses, if any, as they are unreachable.
+    if (node.exceptionType == null ||
+        rules.isSubtypeOf(types.objectType, node.exceptionType.type)) {
+      return then;
+    }
+
+    var condition =
+        _emitIsExpression(exceptionParameter, node.exceptionType.type);
+    return JS.If(condition, then, otherwise)
+      ..sourceInformation = _nodeStart(node);
   }
 
   @override
@@ -5718,6 +5725,23 @@
         () => _emitConstList(elementType, _visitExpressionList(node.elements)));
   }
 
+  @override
+  JS.Expression visitSetLiteral(SetLiteral node) {
+    var type = node.staticType as InterfaceType;
+    if (!node.isConst) {
+      var setType = _emitType(type);
+      if (node.elements.isEmpty) {
+        return js.call('#.new()', [setType]);
+      }
+      return js
+          .call('#.from([#])', [setType, _visitExpressionList(node.elements)]);
+    }
+    return _cacheConst(() => runtimeCall('constSet(#, [#])', [
+          _emitType((node.staticType as InterfaceType).typeArguments[0]),
+          _visitExpressionList(node.elements)
+        ]));
+  }
+
   JS.Expression _emitConstList(
       DartType elementType, List<JS.Expression> elements) {
     // dart.constList helper internally depends on _interceptors.JSArray.
@@ -6261,6 +6285,10 @@
   @override
   visitAssertInitializer(node) => _unreachable(node);
 
+  /// Unused, see [_catchClauseGuard].
+  @override
+  visitCatchClause(CatchClause node) => _unreachable(node);
+
   /// Not visited, but maybe they should be?
   /// See <https://github.com/dart-lang/sdk/issues/29347>
   @override
diff --git a/pkg/dev_compiler/lib/src/analyzer/command.dart b/pkg/dev_compiler/lib/src/analyzer/command.dart
index 97188e1..2d32c8d 100644
--- a/pkg/dev_compiler/lib/src/analyzer/command.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/command.dart
@@ -128,11 +128,12 @@
     ArgResults argResults, AnalyzerOptions analyzerOptions,
     {CompilerAnalysisDriver compilerDriver}) {
   var compilerOpts = CompilerOptions.fromArguments(argResults);
+
   var summaryPaths = compilerOpts.summaryModules.keys.toList();
   if (compilerDriver == null ||
       !compilerDriver.isCompatibleWith(analyzerOptions, summaryPaths)) {
-    compilerDriver =
-        CompilerAnalysisDriver(analyzerOptions, summaryPaths: summaryPaths);
+    compilerDriver = CompilerAnalysisDriver(analyzerOptions,
+        summaryPaths: summaryPaths, experiments: compilerOpts.experiments);
   }
   var outPaths = argResults['out'] as List<String>;
   var moduleFormats = compilerOpts.moduleFormats;
diff --git a/pkg/dev_compiler/lib/src/analyzer/driver.dart b/pkg/dev_compiler/lib/src/analyzer/driver.dart
index 63d1223..aa5d565 100644
--- a/pkg/dev_compiler/lib/src/analyzer/driver.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/driver.dart
@@ -15,6 +15,7 @@
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/library_analyzer.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -72,7 +73,9 @@
   ExtensionTypeSet get extensionTypes => _extensionTypes;
 
   factory CompilerAnalysisDriver(AnalyzerOptions options,
-      {SummaryDataStore summaryData, List<String> summaryPaths = const []}) {
+      {SummaryDataStore summaryData,
+      List<String> summaryPaths = const [],
+      Map<String, bool> experiments = const {}}) {
     AnalysisEngine.instance.processRequiredPlugins();
 
     var resourceProvider = options.resourceProvider;
@@ -80,6 +83,10 @@
 
     var analysisOptions =
         contextBuilder.getAnalysisOptions(options.analysisRoot);
+
+    (analysisOptions as AnalysisOptionsImpl).enabledExperiments =
+        experiments.entries.where((e) => e.value).map((e) => e.key).toList();
+
     var dartSdk = contextBuilder.findSdk(null, analysisOptions);
 
     // Read the summaries.
@@ -248,8 +255,15 @@
     var resynthesizer = resultProvider.resynthesizer;
     _extensionTypes ??= ExtensionTypeSet(context.typeProvider, resynthesizer);
 
-    return LinkedAnalysisDriver(analysisOptions, resynthesizer, sourceFactory,
-        libraryUris, declaredVariables, summaryBytes, fsState);
+    return LinkedAnalysisDriver(
+        analysisOptions,
+        resynthesizer,
+        sourceFactory,
+        libraryUris,
+        declaredVariables,
+        summaryBytes,
+        fsState,
+        _resourceProvider);
   }
 
   FileSystemState _createFileSystemState(SourceFactory sourceFactory) {
@@ -289,6 +303,8 @@
 
   final FileSystemState _fsState;
 
+  final ResourceProvider _resourceProvider;
+
   LinkedAnalysisDriver(
       this.analysisOptions,
       this.resynthesizer,
@@ -296,7 +312,8 @@
       this.libraryUris,
       this.declaredVariables,
       this.summaryBytes,
-      this._fsState);
+      this._fsState,
+      this._resourceProvider);
 
   AnalysisContextImpl get context => resynthesizer.context;
 
@@ -324,8 +341,9 @@
         (uri) => _isLibraryUri('$uri'),
         context,
         resynthesizer,
+        InheritanceManager2(context.typeSystem),
         libraryFile,
-        _fsState.resourceProvider);
+        _resourceProvider);
     // TODO(jmesserly): ideally we'd use the existing public `analyze()` method,
     // but it's async. We can't use `async` here because it would break our
     // developer tools extension (see web/web_command.dart). We should be able
diff --git a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
index 62221b7..f9d836d 100644
--- a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
@@ -4,7 +4,6 @@
 
 import 'dart:collection';
 
-import 'package:analyzer/analyzer.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart'
diff --git a/pkg/dev_compiler/lib/src/analyzer/error_helpers.dart b/pkg/dev_compiler/lib/src/analyzer/error_helpers.dart
index 0e640ef..0943c39 100644
--- a/pkg/dev_compiler/lib/src/analyzer/error_helpers.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/error_helpers.dart
@@ -2,14 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart'
-    show
-        AnalysisError,
-        ErrorSeverity,
-        ErrorType,
-        StrongModeCode,
-        StaticTypeWarningCode;
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/source/error_processor.dart' show ErrorProcessor;
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:path/path.dart' as path;
 
diff --git a/pkg/dev_compiler/lib/src/analyzer/js_typerep.dart b/pkg/dev_compiler/lib/src/analyzer/js_typerep.dart
index 67a3b9b..120f7dc 100644
--- a/pkg/dev_compiler/lib/src/analyzer/js_typerep.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/js_typerep.dart
@@ -5,13 +5,12 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/element.dart' show ClassElement;
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
-import 'package:analyzer/src/generated/type_system.dart'
-    show StrongTypeSystemImpl;
+import 'package:analyzer/src/generated/type_system.dart' show Dart2TypeSystem;
 import '../compiler/js_typerep.dart';
 import 'driver.dart';
 
 class JSTypeRep extends SharedJSTypeRep<DartType> {
-  final StrongTypeSystemImpl rules;
+  final Dart2TypeSystem rules;
   final TypeProvider types;
 
   final ClassElement _jsBool;
diff --git a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
index 3b09257..f62c54c 100644
--- a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
@@ -5,11 +5,12 @@
 import 'dart:convert' show json;
 import 'dart:io' show File;
 
-import 'package:analyzer/analyzer.dart'
-    show AnalysisError, CompilationUnit, StaticWarningCode;
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart'
     show LibraryElement, UriReferencedElement;
+import 'package:analyzer/error/error.dart';
 
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:args/args.dart' show ArgParser, ArgResults;
 import 'package:path/path.dart' as path;
@@ -67,7 +68,6 @@
     }
     explicitSources.add(sourceUri);
   }
-
   var driver = compilerDriver.linkLibraries(explicitSources, analyzerOptions);
 
   for (var libraryUri in driver.libraryUris) {
diff --git a/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart b/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
index 8e3f0ab..5c5ff36 100644
--- a/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
@@ -2,12 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/analyzer.dart' as analyzer;
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
+import 'package:analyzer/dart/ast/visitor.dart' show GeneralizingAstVisitor;
 import 'package:analyzer/dart/element/type.dart' show DartType;
 import 'package:analyzer/src/dart/ast/ast.dart' show FunctionBodyImpl;
-import 'package:analyzer/src/dart/ast/utilities.dart' show NodeReplacer;
+import 'package:analyzer/src/dart/ast/utilities.dart'
+    show AstCloner, NodeReplacer;
 import 'package:analyzer/src/dart/element/type.dart' show DynamicTypeImpl;
 import 'package:analyzer/src/generated/parser.dart' show ResolutionCopier;
 import 'package:analyzer/src/task/strong/ast_properties.dart' as ast_properties;
@@ -17,7 +18,7 @@
 
 // This class implements a pass which modifies (in place) the ast replacing
 // abstract coercion nodes with their dart implementations.
-class CoercionReifier extends analyzer.GeneralizingAstVisitor<void> {
+class CoercionReifier extends GeneralizingAstVisitor<void> {
   final cloner = _TreeCloner();
 
   CoercionReifier._();
@@ -123,7 +124,7 @@
   }
 }
 
-class _TreeCloner extends analyzer.AstCloner {
+class _TreeCloner extends AstCloner {
   void _cloneProperties(AstNode clone, AstNode node) {
     if (clone is Expression && node is Expression) {
       ast_properties.setImplicitCast(
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
index 2112e0f..39c4759 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
@@ -48,7 +48,7 @@
   'dart.library.web_sql': 'true',
 };
 
-/// Shared compiler options between `dartdevc` and `dartdevk`.
+/// Shared compiler options between `dartdevc` kernel and analyzer backends.
 class SharedCompilerOptions {
   /// Whether to emit the source mapping file.
   ///
@@ -81,6 +81,11 @@
 
   final List<ModuleFormat> moduleFormats;
 
+  /// Experimental language features that are enabled/disabled, see
+  /// [the spec](https://github.com/dart-lang/sdk/blob/master/docs/process/experimental-flags.md)
+  /// for more details.
+  final Map<String, bool> experiments;
+
   /// The name of the module.
   ///
   /// This used when to support file concatenation. The JS module will contain
@@ -97,6 +102,7 @@
       this.bazelMapping = const {},
       this.summaryModules = const {},
       this.moduleFormats = const [],
+      this.experiments = const {},
       this.moduleName});
 
   SharedCompilerOptions.fromArguments(ArgResults args,
@@ -106,6 +112,8 @@
             summarizeApi: args['summarize'] as bool,
             emitMetadata: args['emit-metadata'] as bool,
             enableAsserts: args['enable-asserts'] as bool,
+            experiments:
+                _parseExperiments(args['enable-experiment'] as List<String>),
             bazelMapping:
                 _parseBazelMappings(args['bazel-mapping'] as List<String>),
             summaryModules: _parseCustomSummaryModules(
@@ -121,6 +129,9 @@
           abbr: 's',
           help: 'summary file(s) of imported libraries, optionally\n'
               'with module import path: -s path.sum=js/import/path')
+      ..addMultiOption('enable-experiment',
+          help: 'used to enable/disable experimental language features',
+          hide: hide)
       ..addFlag('summarize',
           help: 'emit an API summary file', defaultsTo: true, hide: hide)
       ..addFlag('source-map',
@@ -204,6 +215,20 @@
   return pathToModule;
 }
 
+Map<String, bool> _parseExperiments(List<String> arguments) {
+  var result = <String, bool>{};
+  for (var argument in arguments) {
+    for (var feature in argument.split(',')) {
+      if (feature.startsWith('no-')) {
+        result[feature.substring(3)] = false;
+      } else {
+        result[feature] = true;
+      }
+    }
+  }
+  return result;
+}
+
 Map<String, String> _parseBazelMappings(List<String> argument) {
   var mappings = <String, String>{};
   for (var mapping in argument) {
diff --git a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
index a94f7f6..503c60f 100644
--- a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
+++ b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
@@ -1,10 +1,9 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHO@override S file
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:core' hide MapEntry;
 import 'dart:collection';
-import 'package:analyzer/analyzer.dart' as a;
 import 'package:analyzer/dart/element/element.dart' as a;
 import 'package:analyzer/dart/element/type.dart' as a;
 import 'package:analyzer/file_system/physical_file_system.dart' as a;
@@ -74,7 +73,7 @@
   final a.StoreBasedSummaryResynthesizer _resynth;
   final a.SummaryDataStore _summaryData;
   final a.TypeProvider types;
-  final a.StrongTypeSystemImpl rules;
+  final a.Dart2TypeSystem rules;
 
   final _references = HashMap<a.Element, Reference>();
   final _typeParams = HashMap<a.TypeParameterElement, TypeParameter>();
@@ -84,7 +83,7 @@
       : _resynth = (context.resultProvider as a.InputPackagesResultProvider)
             .resynthesizer,
         types = context.typeProvider,
-        rules = context.typeSystem as a.StrongTypeSystemImpl;
+        rules = context.typeSystem as a.Dart2TypeSystem;
 
   /// Create an Analyzer summary to Kernel tree converter, using the provided
   /// [analyzerSdkSummary] and [summaryPaths].
@@ -869,7 +868,7 @@
     a.SummaryDataStore summaryData, String dartSdkPath) {
   var context = _createContextForSummaries(summaryData, dartSdkPath);
   return a.StoreBasedSummaryResynthesizer(
-      context, context.sourceFactory, /*strongMode*/ true, summaryData);
+      context, null, context.sourceFactory, /*strongMode*/ true, summaryData);
 }
 
 /// Creates a dummy Analyzer context so we can use summary resynthesizer.
diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index 3c7e212..15dd91c 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -10,7 +10,7 @@
 import 'package:build_integration/file_system/multi_root.dart';
 import 'package:cli_util/cli_util.dart' show getSdkPath;
 import 'package:front_end/src/api_unstable/ddc.dart' as fe;
-import 'package:kernel/kernel.dart';
+import 'package:kernel/kernel.dart' hide MapEntry;
 import 'package:kernel/text/ast_to_text.dart' as kernel show Printer;
 import 'package:kernel/binary/ast_to_binary.dart' as kernel show BinaryPrinter;
 import 'package:path/path.dart' as path;
@@ -49,7 +49,7 @@
 $error
 $stackTrace
 ''');
-    rethrow;
+    return CompilerResult(70);
   }
 }
 
@@ -80,7 +80,9 @@
     ..addMultiOption('multi-root',
         help: 'The directories to search when encountering uris with the '
             'specified multi-root scheme.',
-        defaultsTo: [Uri.base.path]);
+        defaultsTo: [Uri.base.path])
+    ..addOption('dart-sdk',
+        help: '(unsupported with --kernel) path to the Dart SDK.', hide: true);
   SharedCompilerOptions.addArguments(argParser);
 
   var declaredVariables = parseAndRemoveDeclaredVariables(args);
@@ -175,6 +177,16 @@
     fe.printDiagnosticMessage(message, print);
   }
 
+  var experiments = <fe.ExperimentalFlag, bool>{};
+  for (var name in options.experiments.keys) {
+    var flag = fe.parseExperimentalFlag(name);
+    if (flag != null) {
+      experiments[flag] = options.experiments[name];
+    } else {
+      stderr.writeln("Unknown experiment flag '$name'.");
+    }
+  }
+
   var oldCompilerState = compilerState;
   compilerState = await fe.initializeCompiler(
       oldCompilerState,
@@ -183,7 +195,8 @@
       sourcePathToUri(librarySpecPath),
       summaryModules.keys.toList(),
       DevCompilerTarget(),
-      fileSystem: fileSystem);
+      fileSystem: fileSystem,
+      experiments: experiments);
 
   var output = argResults['out'] as String;
   // TODO(jmesserly): is there a cleaner way to do this?
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 2617516..6a31922 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -58,7 +58,7 @@
   final _imports = Map<Library, JS.TemporaryId>();
 
   /// The variable for the current catch clause
-  VariableDeclaration _catchParameter;
+  VariableDeclaration _rethrowParameter;
 
   /// In an async* function, this represents the stream controller parameter.
   JS.TemporaryId _asyncStarController;
@@ -183,6 +183,7 @@
   final Class privateSymbolClass;
   final Class linkedHashMapImplClass;
   final Class identityHashMapImplClass;
+  final Class linkedHashSetClass;
   final Class linkedHashSetImplClass;
   final Class identityHashSetImplClass;
   final Class syncIterableClass;
@@ -198,7 +199,7 @@
   factory ProgramCompiler(Component component, ClassHierarchy hierarchy,
       SharedCompilerOptions options, Map<String, String> declaredVariables) {
     var coreTypes = CoreTypes(component);
-    var types = TypeSchemaEnvironment(coreTypes, hierarchy, false);
+    var types = TypeSchemaEnvironment(coreTypes, hierarchy);
     var constants = DevCompilerConstants(types, declaredVariables);
     var nativeTypes = NativeTypeSet(coreTypes, constants);
     var jsTypeRep = JSTypeRep(types);
@@ -222,6 +223,7 @@
         linkedHashMapImplClass = sdk.getClass('dart:_js_helper', 'LinkedMap'),
         identityHashMapImplClass =
             sdk.getClass('dart:_js_helper', 'IdentityMap'),
+        linkedHashSetClass = sdk.getClass('dart:collection', 'LinkedHashSet'),
         linkedHashSetImplClass = sdk.getClass('dart:collection', '_HashSet'),
         identityHashSetImplClass =
             sdk.getClass('dart:collection', '_IdentityHashSet'),
@@ -748,7 +750,7 @@
         .map((m) => hierarchy.getClassAsInstanceOf(c, m).asInterfaceType)
         .toList();
 
-    var hasUnnamedSuper = _hasUnnamedConstructor(superclass);
+    var hasUnnamedSuper = _hasUnnamedInheritedConstructor(superclass);
 
     void emitMixinConstructors(JS.Expression className, InterfaceType mixin) {
       JS.Statement mixinCtor;
@@ -1508,18 +1510,21 @@
         [className, _constructorName(name), args ?? []]);
   }
 
-  bool _hasUnnamedSuperConstructor(Class c) {
+  bool _hasUnnamedInheritedConstructor(Class c) {
     if (c == null) return false;
-    return _hasUnnamedConstructor(c.superclass) ||
-        _hasUnnamedConstructor(c.mixedInClass);
+    return _hasUnnamedConstructor(c) || _hasUnnamedSuperConstructor(c);
+  }
+
+  bool _hasUnnamedSuperConstructor(Class c) {
+    return _hasUnnamedConstructor(c.mixedInClass) ||
+        _hasUnnamedInheritedConstructor(c.superclass);
   }
 
   bool _hasUnnamedConstructor(Class c) {
     if (c == null || c == coreTypes.objectClass) return false;
     var ctor = unnamedConstructor(c);
     if (ctor != null && !ctor.isSynthetic) return true;
-    if (c.fields.any((f) => !f.isStatic)) return true;
-    return _hasUnnamedSuperConstructor(c);
+    return c.fields.any((f) => !f.isStatic);
   }
 
   /// Initialize fields. They follow the sequence:
@@ -1596,8 +1601,11 @@
   /// then we need to emit a special hidden default constructor for use by
   /// mixins.
   bool _usesMixinNew(Class mixin) {
-    return mixin.superclass?.superclass == null &&
-        mixin.constructors.every((c) => c.isExternal);
+    // TODO(jmesserly): mixin declarations don't get implicit constructor nodes,
+    // even if they have fields, so we need to ensure they're getting generated.
+    return mixin.isMixinDeclaration && _hasUnnamedConstructor(mixin) ||
+        mixin.superclass?.superclass == null &&
+            mixin.constructors.every((c) => c.isExternal);
   }
 
   JS.Statement _addConstructorToClass(
@@ -3106,10 +3114,16 @@
     if (offset == -1) return null;
     var fileUri = _currentUri;
     if (fileUri == null) return null;
-    var loc = _component.getLocation(fileUri, offset);
-    if (loc == null) return null;
-    return SourceLocation(offset,
-        sourceUrl: fileUri, line: loc.line - 1, column: loc.column - 1);
+    try {
+      var loc = _component.getLocation(fileUri, offset);
+      if (loc == null) return null;
+      return SourceLocation(offset,
+          sourceUrl: fileUri, line: loc.line - 1, column: loc.column - 1);
+    } on StateError catch (_) {
+      // TODO(jmesserly): figure out why this is throwing. Perhaps the file URI
+      // and offset are mismatched and don't correspond to the same source?
+      return null;
+    }
   }
 
   /// Adds a hover comment for Dart node using JS expression [expr], where
@@ -3496,65 +3510,76 @@
   JS.Catch _visitCatch(List<Catch> clauses) {
     if (clauses.isEmpty) return null;
 
-    var savedCatch = _catchParameter;
+    var caughtError = VariableDeclaration('#e');
+    var savedRethrow = _rethrowParameter;
+    _rethrowParameter = caughtError;
 
-    if (clauses.length == 1 && clauses.single.exception != null) {
-      // Special case for a single catch.
-      _catchParameter = clauses.single.exception;
-    } else {
-      _catchParameter = VariableDeclaration('#e');
-    }
+    // If we have more than one catch clause, always create a temporary so we
+    // don't shadow any names.
+    var exceptionParameter =
+        (clauses.length == 1 ? clauses[0].exception : null) ??
+            VariableDeclaration('#ex');
 
-    JS.Statement catchBody =
-        js.statement('throw #;', _emitVariableRef(_catchParameter));
+    var stackTraceParameter =
+        (clauses.length == 1 ? clauses[0].stackTrace : null) ??
+            (clauses.any((c) => c.stackTrace != null)
+                ? VariableDeclaration('#st')
+                : null);
+
+    JS.Statement catchBody = JS.Throw(_emitVariableRef(caughtError));
     for (var clause in clauses.reversed) {
-      catchBody = _catchClauseGuard(clause, catchBody);
+      catchBody = _catchClauseGuard(
+          clause, catchBody, exceptionParameter, stackTraceParameter);
     }
-
-    var catchVarDecl = _emitVariableRef(_catchParameter);
-    _catchParameter = savedCatch;
-    return JS.Catch(catchVarDecl, catchBody.toBlock());
+    var catchStatements = [
+      js.statement('let # = #.getThrown(#)', [
+        _emitVariableDef(exceptionParameter),
+        runtimeModule,
+        _emitVariableRef(caughtError)
+      ]),
+    ];
+    if (stackTraceParameter != null) {
+      catchStatements.add(js.statement('let # = #.stackTrace(#)', [
+        _emitVariableDef(stackTraceParameter),
+        runtimeModule,
+        _emitVariableRef(caughtError)
+      ]));
+    }
+    catchStatements.add(catchBody);
+    _rethrowParameter = savedRethrow;
+    return JS.Catch(_emitVariableDef(caughtError), JS.Block(catchStatements));
   }
 
-  JS.Statement _catchClauseGuard(Catch node, JS.Statement otherwise) {
+  JS.Statement _catchClauseGuard(
+      Catch node,
+      JS.Statement otherwise,
+      VariableDeclaration exceptionParameter,
+      VariableDeclaration stackTraceParameter) {
     var body = <JS.Statement>[];
-
-    var savedCatch = _catchParameter;
     var vars = HashSet<String>();
-    if (node.exception != null) {
-      var name = node.exception;
-      if (name == _catchParameter) {
-        vars.add(name.name);
-      } else if (name != null) {
-        vars.add(name.name);
-        body.add(js.statement('let # = #;',
-            [_emitVariableDef(name), _emitVariableRef(_catchParameter)]));
-        _catchParameter = name;
-      }
-      var stackTrace = node.stackTrace;
-      if (stackTrace != null) {
-        vars.add(stackTrace.name);
-        body.add(js.statement('let # = #.stackTrace(#);', [
-          _emitVariableDef(stackTrace),
-          runtimeModule,
-          _emitVariableRef(name)
-        ]));
+
+    void declareVariable(
+        VariableDeclaration variable, VariableDeclaration value) {
+      if (variable == null) return;
+      vars.add(variable.name);
+      if (variable.name != value.name) {
+        body.add(js.statement('let # = #',
+            [_emitVariableDef(variable), _emitVariableRef(value)]));
       }
     }
 
+    declareVariable(node.exception, exceptionParameter);
+    declareVariable(node.stackTrace, stackTraceParameter);
+
     body.add(_visitStatement(node.body).toScopedBlock(vars));
-    _catchParameter = savedCatch;
     var then = JS.Block(body);
 
+    // Discard following clauses, if any, as they are unreachable.
     if (types.isTop(node.guard)) return then;
 
-    // TODO(jmesserly): this is inconsistent with [visitIsExpression], which
-    // has special case for typeof.
-    return JS.If(
-        js.call('#.is(#)',
-            [_emitType(node.guard), _emitVariableRef(_catchParameter)]),
-        then,
-        otherwise)
+    var condition =
+        _emitIsExpression(VariableGet(exceptionParameter), node.guard);
+    return JS.If(condition, then, otherwise)
       ..sourceInformation = _nodeStart(node);
   }
 
@@ -4724,20 +4749,19 @@
 
   @override
   visitIsExpression(IsExpression node) {
+    return _emitIsExpression(node.operand, node.type);
+  }
+
+  JS.Expression _emitIsExpression(Expression operand, DartType type) {
     // Generate `is` as `dart.is` or `typeof` depending on the RHS type.
-    JS.Expression result;
-    var type = node.type;
-    var lhs = _visitExpression(node.operand);
+    var lhs = _visitExpression(operand);
     var typeofName = _typeRep.typeFor(type).primitiveTypeOf;
     // Inline primitives other than int (which requires a Math.floor check).
-    if (typeofName != null && type != coreTypes.intClass.rawType) {
-      result = js.call('typeof # == #', [lhs, js.string(typeofName, "'")]);
+    if (typeofName != null && type != types.intType) {
+      return js.call('typeof # == #', [lhs, js.string(typeofName, "'")]);
     } else {
-      // Always go through a runtime helper, because implicit interfaces.
-      var castType = _emitType(type);
-      result = js.call('#.is(#)', [castType, lhs]);
+      return js.call('#.is(#)', [_emitType(type), lhs]);
     }
-    return result;
   }
 
   @override
@@ -4852,7 +4876,7 @@
 
   @override
   visitRethrow(Rethrow node) {
-    return runtimeCall('rethrow(#)', _emitVariableRef(_catchParameter));
+    return runtimeCall('rethrow(#)', _emitVariableRef(_rethrowParameter));
   }
 
   @override
@@ -4869,6 +4893,23 @@
         _emitConstList(elementType, _visitExpressionList(node.expressions)));
   }
 
+  @override
+  visitSetLiteral(SetLiteral node) {
+    if (!node.isConst) {
+      var setType = visitInterfaceType(
+          InterfaceType(linkedHashSetClass, [node.typeArgument]));
+      if (node.expressions.isEmpty) {
+        return js.call('#.new()', [setType]);
+      }
+      return js.call(
+          '#.from([#])', [setType, _visitExpressionList(node.expressions)]);
+    }
+    return _cacheConst(() => runtimeCall('constSet(#, [#])', [
+          _emitType(node.typeArgument),
+          _visitExpressionList(node.expressions)
+        ]));
+  }
+
   JS.Expression _emitConstList(
       DartType elementType, List<JS.Expression> elements) {
     // dart.constList helper internally depends on _interceptors.JSArray.
diff --git a/pkg/dev_compiler/lib/src/kernel/constants.dart b/pkg/dev_compiler/lib/src/kernel/constants.dart
index 4fc8891..52329f7 100644
--- a/pkg/dev_compiler/lib/src/kernel/constants.dart
+++ b/pkg/dev_compiler/lib/src/kernel/constants.dart
@@ -44,6 +44,10 @@
       // It can also be caused by methods in the evaluator that don't understand
       // unavailable constants.
       return null;
+    } on NoSuchMethodError {
+      // TODO(jmesserly): this is probably the same issue as above, but verify
+      // that it's fixed once Kernel does constant evaluation.
+      return null;
     }
   }
 
@@ -180,7 +184,7 @@
   final Constant unavailableConstant;
 
   _ConstantEvaluator(TypeEnvironment types, this.declaredVariables,
-      {bool enableAsserts})
+      {bool enableAsserts: false})
       : unavailableConstant = InstanceConstant(null, [], {}),
         super(_ConstantsBackend(types.coreTypes), types, types.coreTypes,
             enableAsserts,
diff --git a/pkg/dev_compiler/test/nullable_inference_test.dart b/pkg/dev_compiler/test/nullable_inference_test.dart
index 517e6599..73981f7 100644
--- a/pkg/dev_compiler/test/nullable_inference_test.dart
+++ b/pkg/dev_compiler/test/nullable_inference_test.dart
@@ -488,7 +488,7 @@
   @override
   visitComponent(Component node) {
     inference ??= NullableInference(JSTypeRep(
-      fe.TypeSchemaEnvironment(CoreTypes(node), ClassHierarchy(node), false),
+      fe.TypeSchemaEnvironment(CoreTypes(node), ClassHierarchy(node)),
     ));
 
     if (useAnnotations) {
@@ -572,9 +572,11 @@
 
   var mainUri = Uri.file('/memory/test.dart');
   _fileSystem.entityForUri(mainUri).writeAsStringSync(code);
+  var oldCompilerState = _compilerState;
   _compilerState = await fe.initializeCompiler(
-      _compilerState, sdkUri, packagesUri, null, [], DevCompilerTarget(),
-      fileSystem: _fileSystem);
+      oldCompilerState, sdkUri, packagesUri, null, [], DevCompilerTarget(),
+      fileSystem: _fileSystem, experiments: const {});
+  if (!identical(oldCompilerState, _compilerState)) inference = null;
   fe.DdcResult result =
       await fe.compile(_compilerState, [mainUri], diagnosticMessageHandler);
   expect(succeeded, true);
diff --git a/pkg/dev_compiler/test/options/options_test.dart b/pkg/dev_compiler/test/options/options_test.dart
index 994bc65..3f5b3b1 100644
--- a/pkg/dev_compiler/test/options/options_test.dart
+++ b/pkg/dev_compiler/test/options/options_test.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:io';
-import 'package:analyzer/analyzer.dart';
+
 import 'package:analyzer/src/command_line/arguments.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/summary/summary_sdk.dart';
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
diff --git a/pkg/dev_compiler/test/sourcemap/ddc_common.dart b/pkg/dev_compiler/test/sourcemap/ddc_common.dart
index 7dbf654..3d187dd 100644
--- a/pkg/dev_compiler/test/sourcemap/ddc_common.dart
+++ b/pkg/dev_compiler/test/sourcemap/ddc_common.dart
@@ -139,7 +139,10 @@
     try {
       dartMainRunner(main, []);
     } catch(e) {
-      console.error(e.toString(), dart.stackTrace(e).toString());
+      console.error(e);
+      // d8 does not seem to print the `.stack` property like
+      // node.js and browsers do.
+      console.error(e.stack);
     }
     """;
 }
diff --git a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
index bb23866..b275906 100644
--- a/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
+++ b/pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart
@@ -54,8 +54,6 @@
 
     File ddcSdkSummary = findInOutDir("gen/utils/dartdevc/kernel/ddc_sdk.dill");
 
-    var ddc = getDdcDir().uri.resolve("bin/dartdevk.dart");
-
     List<String> args = <String>[
       "--packages=${sdkRoot.uri.resolve(".packages").toFilePath()}",
       "--modules=es6",
@@ -77,8 +75,10 @@
     }
 
     if (!succeeded) {
+      var ddc = getDdcDir().uri.resolve("bin/dartdevc.dart");
+
       throw "Error from ddc when executing with something like "
-          "$dartExecutable ${ddc.toFilePath()} "
+          "$dartExecutable ${ddc.toFilePath()} --kernel "
           "${args.reduce((value, element) => '$value "$element"')}";
     }
 
diff --git a/pkg/dev_compiler/tool/build_pkgs.dart b/pkg/dev_compiler/tool/build_pkgs.dart
index 9b003a6..5e8fc50 100755
--- a/pkg/dev_compiler/tool/build_pkgs.dart
+++ b/pkg/dev_compiler/tool/build_pkgs.dart
@@ -71,9 +71,6 @@
   await compileModule('expect', libs: ['minitest']);
   await compileModule('js', libs: ['js_util']);
   await compileModule('meta');
-  if (isTravis) {
-    await compileModule('microlytics', libs: ['html_channels']);
-  }
 
   // Under third_party/pkg.
   await compileModule('collection');
diff --git a/pkg/dev_compiler/tool/ddb b/pkg/dev_compiler/tool/ddb
index 52fe107..98f39aa 100755
--- a/pkg/dev_compiler/tool/ddb
+++ b/pkg/dev_compiler/tool/ddb
@@ -112,7 +112,8 @@
   }
   ProcessResult result;
   if (kernel) {
-    result = runDdc('dartdevk', [
+    result = runDdc('dartdevc', [
+      '--kernel',
       '--modules=$mod',
       '--dart-sdk-summary=$ddcSdk',
       '-o',
@@ -194,7 +195,7 @@
       if (!source_maps) {
         console.log('For Dart source maps: npm install source-map-support');
       }
-      console.error(e.toString(), sdk.dart.stackTrace(e).toString());
+      console.error(e);
       process.exit(1);
     }
     ''';
@@ -216,7 +217,7 @@
       _isolate_helper.startRootIsolate(() => {}, []);
       main();
     } catch(e) {
-      console.error(e.toString(), dart.stackTrace(e).toString());
+      console.error(e);
     }
     ''';
     var d8File = '$libRoot/$basename.d8.js';
diff --git a/pkg/dev_compiler/tool/ddc b/pkg/dev_compiler/tool/ddc
index bacfff7..e8d4ad0 100755
--- a/pkg/dev_compiler/tool/ddc
+++ b/pkg/dev_compiler/tool/ddc
@@ -68,13 +68,13 @@
   if [ ! -e $GEN_DIR/kernel/ddc_sdk.dill ]; then
     echo "DDC SDK must be built first, please run:"
     echo "    pushd $SDKDIR"
-    echo "    ./tools/build.py -m release dartdevk_sdk"
+    echo "    ./tools/build.py -m release dartdevc_kernel_sdk"
     exit 1
   fi
 
   NODE_PATH=$GEN_DIR/kernel/common:$LIBROOT:$NODE_PATH
 
-  $SDK_DIR/sdk/bin/dartdevk --modules=node \
+  $SDK_DIR/sdk/bin/dartdevc --kernel --modules=node \
       --dart-sdk-summary=$GEN_DIR/ddc_sdk.sum \
       -o $LIBROOT/$BASENAME.js $*
 else
@@ -113,8 +113,7 @@
       if (!source_maps) {
         console.log('For Dart source maps: npm install source-map-support');
       }
-      let toString = sdk.dart.toString;
-      console.error(toString(e), toString(sdk.dart.stackTrace(e)));
+      console.error(e);
       process.exit(1);
     }" \
     > $LIBROOT/$BASENAME.run.js
diff --git a/pkg/dev_compiler/tool/ddw b/pkg/dev_compiler/tool/ddw
index 86ecf9b..c35b2ca 100755
--- a/pkg/dev_compiler/tool/ddw
+++ b/pkg/dev_compiler/tool/ddw
@@ -68,13 +68,13 @@
   if [ ! -e $GEN_DIR/kernel/ddc_sdk.dill ]; then
     echo "DDC SDK must be built first, please run:"
     echo "    pushd $SDKDIR"
-    echo "    ./tools/build.py -m release dartdevk_sdk"
+    echo "    ./tools/build.py -m release dartdevc_kernel_sdk"
     exit 1
   fi
 
   NODE_PATH=$GEN_DIR/kernel/common:$LIBROOT:$NODE_PATH
 
-  dart -c $SDK_DIR/pkg/dev_compiler/bin/dartdevk.dart --modules=node \
+  dart -c $SDK_DIR/pkg/dev_compiler/bin/dartdevc.dart --kernel --modules=node \
       --dart-sdk-summary=$GEN_DIR/kernel/ddc_sdk.dill \
       -o $LIBROOT/$BASENAME.js $*
 else
diff --git a/pkg/dev_compiler/tool/global_compile.dart b/pkg/dev_compiler/tool/global_compile.dart
index d3090ae..de1bb64 100644
--- a/pkg/dev_compiler/tool/global_compile.dart
+++ b/pkg/dev_compiler/tool/global_compile.dart
@@ -6,7 +6,8 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:analyzer/analyzer.dart' show StringLiteral, parseDirectives;
+import 'package:analyzer/analyzer.dart' show parseDirectives;
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:args/args.dart' show ArgParser;
 import 'package:path/path.dart' as path;
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
index 62b34428..983bbcd 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
@@ -4,8 +4,7 @@
 
 // Patch file for the dart:async library.
 
-import 'dart:_js_helper'
-    show notNull, patch, setTraceForException, ReifyFunctionTypes;
+import 'dart:_js_helper' show notNull, patch, ReifyFunctionTypes;
 import 'dart:_isolate_helper'
     show TimerImpl, global, leaveJsAsync, enterJsAsync;
 import 'dart:_foreign_helper' show JS, JSExportName;
@@ -30,7 +29,7 @@
 _async<T>(Function() initGenerator) {
   var iter;
   Object Function(Object) onValue;
-  Object Function(Object) onError;
+  Object Function(Object, StackTrace) onError;
 
   onAwait(Object value) {
     _Future f;
@@ -60,8 +59,9 @@
   //
   // In essence, we are giving the code inside the generator a chance to
   // use try-catch-finally.
-  onError = (value) {
-    var iteratorResult = JS('', '#.throw(#)', iter, value);
+  onError = (value, stackTrace) {
+    var iteratorResult = JS(
+        '', '#.throw(#)', iter, dart.createErrorWithStack(value, stackTrace));
     value = JS('', '#.value', iteratorResult);
     return JS('bool', '#.done', iteratorResult) ? value : onAwait(value);
   };
@@ -69,7 +69,7 @@
   var zone = Zone.current;
   if (!identical(zone, _rootZone)) {
     onValue = zone.registerUnaryCallback(onValue);
-    onError = zone.registerUnaryCallback(onError);
+    onError = zone.registerBinaryCallback(onError);
   }
 
   var asyncFuture = _Future<T>();
@@ -243,8 +243,7 @@
 
 @patch
 void _rethrow(Object error, StackTrace stackTrace) {
-  setTraceForException(error, stackTrace);
-  dart.throw_(error);
+  JS('', 'throw #', dart.createErrorWithStack(error, stackTrace));
 }
 
 /// Used by the compiler to implement `async*` functions.
@@ -328,9 +327,12 @@
     if (_handleErrorCallback == null) {
       _handleErrorCallback = (error, StackTrace stackTrace) {
         try {
-          JS('', '#.throw(#)', jsIterator, error);
-        } catch (e) {
-          addError(e, stackTrace);
+          JS('', '#.throw(#)', jsIterator,
+              dart.createErrorWithStack(error, stackTrace));
+        } catch (e, newStack) {
+          // The generator didn't catch the error, or it threw a new one.
+          // Make sure to propagate the new error.
+          addError(e, newStack);
         }
       };
       var zone = Zone.current;
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
index ae91eda..ab94a36 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
@@ -5,6 +5,7 @@
 // Patch file for dart:collection classes.
 import 'dart:_foreign_helper' show JS, JSExportName;
 import 'dart:_runtime' as dart;
+import 'dart:_interceptors' show JSArray;
 import 'dart:_js_helper'
     show
         NoInline,
@@ -248,7 +249,7 @@
     int length = JS('', '#.size', map);
     for (E key in objects) {
       if (key == null) {
-        key = null;
+        key = null; // converts undefined to null, if needed.
       } else if (JS('bool', '#[#] !== #', key, dart.extensionSymbol('_equals'),
           dart.identityEquals)) {
         key = putLinkedMapKey(key, _keyMap);
@@ -302,6 +303,29 @@
   }
 }
 
+class ImmutableSet<E> extends _HashSet<E> {
+  ImmutableSet.from(JSArray entries) {
+    var map = _map;
+    for (Object key in entries) {
+      if (key == null) {
+        key = null; // converts undefined to null, if needed.
+      } else if (JS('bool', '#[#] !== #', key, dart.extensionSymbol('_equals'),
+          dart.identityEquals)) {
+        key = putLinkedMapKey(key, _keyMap);
+      }
+      JS('', '#.add(#)', map, key);
+    }
+  }
+
+  bool add(Object other) => throw _unsupported();
+  void addAll(Object other) => throw _unsupported();
+  void clear() => throw _unsupported();
+  bool remove(Object key) => throw _unsupported();
+
+  static Error _unsupported() =>
+      UnsupportedError("Cannot modify unmodifiable map");
+}
+
 class _IdentityHashSet<E> extends _InternalSet<E>
     implements HashSet<E>, LinkedHashSet<E> {
   /// The backing store for this set.
@@ -509,7 +533,7 @@
 /// Base class for our internal [LinkedHashSet]/[HashSet] implementations.
 ///
 /// This implements the common functionality.
-abstract class _InternalSet<E> extends _HashSetBase<E> {
+abstract class _InternalSet<E> extends _SetBase<E> {
   @notNull
   get _map;
 
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
index bfaf8ac..581bc3f 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
@@ -10,7 +10,6 @@
         patch,
         checkInt,
         getRuntimeType,
-        getTraceFromException,
         LinkedMap,
         JSSyntaxRegExp,
         NoInline,
@@ -207,7 +206,7 @@
   }
 
   @patch
-  StackTrace get stackTrace => getTraceFromException(this);
+  StackTrace get stackTrace => dart.stackTraceForError(this);
 }
 
 @patch
@@ -745,7 +744,7 @@
   @patch
   @NoInline()
   static StackTrace get current {
-    return getTraceFromException(JS('', 'new Error()'));
+    return dart.stackTrace(JS('', 'Error()'));
   }
 }
 
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
index a885aae..7d28269 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
@@ -20,6 +20,9 @@
 
 @patch
 Object inspect(Object object) {
+  // Note: this log level does not show up by default in Chrome.
+  // This is used for communication with the debugger service.
+  JS('', 'console.debug("dart.developer.inspect", #)', object);
   return object;
 }
 
@@ -32,7 +35,17 @@
     Zone zone,
     Object error,
     StackTrace stackTrace}) {
-  // TODO.
+  Object items =
+      JS('!', '{ message: #, name: #, level: # }', message, name, level);
+  if (time != null) JS('', '#.time = #', items, time);
+  if (sequenceNumber != null) {
+    JS('', '#.sequenceNumber = #', items, sequenceNumber);
+  }
+  if (zone != null) JS('', '#.zone = #', items, zone);
+  if (error != null) JS('', '#.error = #', items, error);
+  if (stackTrace != null) JS('', '#.stackTrace = #', items, stackTrace);
+
+  JS('', 'console.debug("dart.developer.log", #)', items);
 }
 
 final _extensions = Map<String, ServiceExtensionHandler>();
@@ -45,11 +58,13 @@
 @patch
 _registerExtension(String method, ServiceExtensionHandler handler) {
   _extensions[method] = handler;
+  JS('', 'console.debug("dart.developer.registerExtension", #)', method);
 }
 
 @patch
 void _postEvent(String eventKind, String eventData) {
-  // TODO.
+  JS('', 'console.debug("dart.developer.postEvent", #, #)', eventKind,
+      eventData);
 }
 
 @patch
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
index a7606a4..7c96274 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
@@ -84,3 +84,197 @@
   return "Type '${typeName(from)}' is not a subtype of "
       "expected type '${typeName(to)}'.";
 }
+
+/// The symbol that references the thrown Dart Object (typically but not
+/// necessarily an [Error] or [Exception]), used by the [exception] function.
+final Object _thrownValue = JS('', 'Symbol("_thrownValue")');
+
+/// For a Dart [Error], this provides access to the JS Error object that
+/// contains the stack trace if the error was thrown.
+final Object _jsError = JS('', 'Symbol("_jsError")');
+
+/// Gets the thrown Dart Object from an [error] caught by a JS catch.
+///
+/// If the throw originated in Dart, the result will typically be an [Error]
+/// or [Exception], but it could be any Dart object.
+///
+/// If the throw originated in JavaScript, then there is not a corresponding
+/// Dart value, so we just return the error object.
+Object getThrown(Object error) {
+  if (error != null) {
+    // Get the Dart thrown value, if any.
+    var value = JS('', '#[#]', error, _thrownValue);
+    if (value != null) return value;
+  }
+  // Otherwise return the original object.
+  return error;
+}
+
+final _stackTrace = JS('', 'Symbol("_stackTrace")');
+
+/// Returns the stack trace from an [error] caught by a JS catch.
+///
+/// If the throw originated in Dart, we should always have JS Error
+/// (see [throw_]) so we can create a Dart [StackTrace] from that (or return a
+/// previously created instance).
+///
+/// If the throw originated in JavaScript and was an `Error`, then we can get
+/// the corresponding stack trace the same way we do for Dart throws. If the
+/// throw object was not an Error, then we don't have a JS trace, so we create
+/// one here.
+StackTrace stackTrace(Object error) {
+  if (JS<bool>('!', '!(# instanceof Error)', error)) {
+    // We caught something that isn't a JS Error.
+    //
+    // We should only hit this path when a non-Error was thrown from JS. In
+    // case, there is no stack trace available, so create one here.
+    return _StackTrace.missing(error);
+  }
+
+  // If we've already created the Dart stack trace object, return it.
+  StackTrace trace = JS('', '#[#]', error, _stackTrace);
+  if (trace != null) return trace;
+
+  // Otherwise create the Dart stack trace (by parsing the JS stack), and
+  // cache it so we don't repeat the parsing/allocation.
+  return JS('', '#[#] = #', error, _stackTrace, _StackTrace(error));
+}
+
+StackTrace stackTraceForError(Error error) {
+  return stackTrace(JS('', '#[#]', error, _jsError));
+}
+
+/// Implements `rethrow` of [error], allowing rethrow in an expression context.
+///
+/// Note: [error] must be the raw JS error caught in the JS catch, not the
+/// unwrapped value returned by [getThrown].
+@JSExportName('rethrow')
+void rethrow_(Object error) {
+  JS('', 'throw #', error);
+}
+
+/// Subclass of JS `Error` that wraps a thrown Dart object, and evaluates the
+/// message lazily by calling `toString()` on the wrapped Dart object.
+///
+/// Also creates a pointer from the Dart [Error] to the JS Error
+/// (via [_jsError]). This is used to implement [Error.stackTrace].
+///
+/// TODO(jmesserly): Dart Errors should simply be JS Errors.
+final Object DartError = JS(
+    '!',
+    '''class DartError extends Error {
+      constructor(error) {
+        super();
+        this[#] = error;
+        if (error instanceof # && error[#] == null) error[#] = this;
+      }
+      get message() {
+        return #(this[#]);
+      }
+    }''',
+    _thrownValue,
+    Error,
+    _jsError,
+    _jsError,
+    _toString,
+    _thrownValue);
+
+/// Subclass of [DartError] for cases where we're rethrowing with a different,
+/// original Dart StackTrace object.
+///
+/// This includes the original stack trace in the JS Error message so it doesn't
+/// get lost if the exception reaches JS.
+final Object RethrownDartError = JS(
+    '!',
+    '''class RethrownDartError extends # {
+      constructor(error, stackTrace) {
+        super(error);
+        this[#] = stackTrace;
+      }
+      get message() {
+        return super.message + "\\n    " + #(this[#]) + "\\n";
+      }
+    }''',
+    DartError,
+    _stackTrace,
+    _toString,
+    _stackTrace);
+
+/// Implements `throw` of [exception], allowing for throw in an expression
+/// context, and capturing the current stack trace.
+@JSExportName('throw')
+void throw_(Object exception) {
+  /// Wrap the object so we capture a new stack trace, and so it will print
+  /// nicely from JS, as if it were a normal JS error.
+  JS('', 'throw new #(#)', DartError, exception);
+}
+
+/// Returns a JS error for throwing the Dart [exception] Object and using the
+/// provided stack [trace].
+///
+/// This is used by dart:async to rethrow unhandled errors in [Zone]s, and by
+/// `async`/`async*` to rethrow errors from Futures/Streams into the generator
+/// (so a try/catch in there can catch it).
+///
+/// If the exception and trace originated from the same Dart throw, then we can
+/// simply return the original JS Error. Otherwise, we have to create a new JS
+/// Error. The new error will have the correct Dart trace, but it will not have
+/// the correct JS stack trace (visible if JavaScript ends up handling it). To
+/// fix that, we use [RethrownDartError] to preserve the Dart trace and make
+/// sure it gets displayed in the JS error message.
+Object createErrorWithStack(Object exception, StackTrace trace) {
+  if (trace is _StackTrace) {
+    /// Optimization: if this stack trace and exception already have a matching
+    /// Error, we can just rethrow it.
+    var originalError = trace._jsError;
+    if (identical(exception, getThrown(originalError))) {
+      return originalError;
+    }
+  }
+  var error = JS('', 'new #(#)', RethrownDartError, exception);
+  JS('', '#[#] = #', error, _stackTrace, trace);
+  return error;
+}
+
+// This is a utility function: it is only intended to be called from dev
+// tools.
+void stackPrint(Object error) {
+  JS('', 'console.log(#.stack ? #.stack : "No stack trace for: " + #)', error,
+      error, error);
+}
+
+class _StackTrace implements StackTrace {
+  final Object _jsError;
+  final Object _jsObjectMissingTrace;
+  String _trace;
+
+  _StackTrace(this._jsError) : _jsObjectMissingTrace = null;
+
+  _StackTrace.missing(Object caughtObj)
+      : _jsObjectMissingTrace = caughtObj != null ? caughtObj : 'null',
+        _jsError = JS('', 'Error()');
+
+  String toString() {
+    if (_trace != null) return _trace;
+
+    var e = _jsError;
+    String trace = '';
+    if (e != null && JS('bool', 'typeof # === "object"', e)) {
+      trace = e is NativeError ? e.dartStack() : JS<String>('', '#.stack', e);
+      if (trace != null && stackTraceMapper != null) {
+        trace = stackTraceMapper(trace);
+      }
+    }
+    if (trace.isEmpty || _jsObjectMissingTrace != null) {
+      String jsToString;
+      try {
+        jsToString = JS('', '"" + #', _jsObjectMissingTrace);
+      } catch (_) {
+        jsToString = '<error converting JS object to string>';
+      }
+      trace = 'Non-error `$jsToString` thrown by JS does not have stack trace.'
+          '\nCaught in Dart at:\n\n$trace';
+    }
+    return _trace = trace;
+  }
+}
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
index 9c7142d..b3865c1 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -502,19 +502,24 @@
 /// The global constant map table.
 final constantMaps = JS('', 'new Map()');
 
-constMap<K, V>(JSArray elements) {
-  Function(Object, Object) lookupNonTerminal = JS('', '''function(map, key) {
-    let result = map.get(key);
-    if (result != null) return result;
-    map.set(key, result = new Map());
-    return result;
-  }''');
+// TODO(leafp): This table gets quite large in apps.
+// Keeping the paths is probably expensive.  It would probably
+// be more space efficient to just use a direct hash table with
+// an appropriately defined structural equality function.
+Object _lookupNonTerminal(Object map, Object key) {
+  var result = JS('', '#.get(#)', map, key);
+  if (result != null) return result;
+  JS('', '#.set(#, # = new Map())', map, key, result);
+  return result;
+}
+
+Map<K, V> constMap<K, V>(JSArray elements) {
   var count = elements.length;
-  var map = lookupNonTerminal(constantMaps, count);
+  var map = _lookupNonTerminal(constantMaps, count);
   for (var i = 0; i < count; i++) {
-    map = lookupNonTerminal(map, JS('', '#[#]', elements, i));
+    map = _lookupNonTerminal(map, JS('', '#[#]', elements, i));
   }
-  map = lookupNonTerminal(map, K);
+  map = _lookupNonTerminal(map, K);
   var result = JS('', '#.get(#)', map, V);
   if (result != null) return result;
   result = ImmutableMap<K, V>.from(elements);
@@ -522,6 +527,21 @@
   return result;
 }
 
+final constantSets = JS('', 'new Map()');
+
+Set<E> constSet<E>(JSArray<E> elements) {
+  var count = elements.length;
+  var map = _lookupNonTerminal(constantSets, count);
+  for (var i = 0; i < count; i++) {
+    map = _lookupNonTerminal(map, JS('', '#[#]', elements, i));
+  }
+  var result = JS('', '#.get(#)', map, E);
+  if (result != null) return result;
+  result = ImmutableSet<E>.from(elements);
+  JS('', '#.set(#, #)', map, E, result);
+  return result;
+}
+
 bool dassert(value) {
   if (JS('!', '# != null && #[#] instanceof #', value, value, _runtimeType,
       AbstractFunctionType)) {
@@ -530,76 +550,6 @@
   return dtest(value);
 }
 
-/// Store a JS error for an exception.  For non-primitives, we store as an
-/// expando.  For primitive, we use a side cache.  To limit memory leakage, we
-/// only keep the last [_maxTraceCache] entries.
-final _error = JS('', 'Symbol("_error")');
-Map _primitiveErrorCache;
-const _maxErrorCache = 10;
-
-bool _isJsError(exception) {
-  return JS('!', '#.Error != null && # instanceof #.Error', global_, exception,
-      global_);
-}
-
-// Record/return the JS error for an exception.  If an error was already
-// recorded, prefer that to [newError].
-recordJsError(exception, [newError]) {
-  if (_isJsError(exception)) return exception;
-
-  var useExpando =
-      exception != null && JS<bool>('!', 'typeof # == "object"', exception);
-  var error;
-  if (useExpando) {
-    error = JS('', '#[#]', exception, _error);
-  } else {
-    if (_primitiveErrorCache == null) _primitiveErrorCache = {};
-    error = _primitiveErrorCache[exception];
-  }
-  if (error != null) return error;
-  if (newError != null) {
-    error = newError;
-  } else {
-    // We should only hit this path when a non-Error was thrown from JS.  In
-    // case, there is no stack trace on the exception, so we create one:
-    error = JS('', 'new Error()');
-  }
-  if (useExpando) {
-    JS('', '#[#] = #', exception, _error, error);
-  } else {
-    _primitiveErrorCache[exception] = error;
-    if (_primitiveErrorCache.length > _maxErrorCache) {
-      _primitiveErrorCache.remove(_primitiveErrorCache.keys.first);
-    }
-  }
-  return error;
-}
-
-@JSExportName('throw')
-throw_(obj) {
-  // Note, we create the error here to avoid the extra frame.
-  // package:stack_trace and tests appear to assume this.  We could fix use
-  // cases instead, but we're already on the exceptional path here.
-  recordJsError(obj, JS('', 'new Error()'));
-  JS('', 'throw #', obj);
-}
-
-@JSExportName('rethrow')
-rethrow_(obj) {
-  JS('', 'throw #', obj);
-}
-
-// This is a utility function: it is only intended to be called from dev
-// tools.
-stackPrint(exception) {
-  var error = recordJsError(exception);
-  JS('', 'console.log(#.stack ? #.stack : "No stack trace for: " + #)', error,
-      error, error);
-}
-
-// Forward to dart:_js_helper to create a _StackTrace object.
-stackTrace(exception) => getTraceFromException(exception);
-
 final _value = JS('', 'Symbol("_value")');
 
 ///
@@ -646,22 +596,12 @@
 /// - nested values of the object are themselves already canonicalized.
 ///
 @JSExportName('const')
-const_(obj) => JS('', '''(() => {
-  // TODO(leafp): This table gets quite large in apps.
-  // Keeping the paths is probably expensive.  It would probably
-  // be more space efficient to just use a direct hash table with
-  // an appropriately defined structural equality function.
-  function lookupNonTerminal(map, key) {
-    let result = map.get(key);
-    if (result !== void 0) return result;
-    map.set(key, result = new Map());
-    return result;
-  };
+const_(obj) => JS('', '''(() => {  
   let names = $getOwnNamesAndSymbols($obj);
   let count = names.length;
   // Index by count.  All of the paths through this map
   // will have 2*count length.
-  let map = lookupNonTerminal($constants, count);
+  let map = $_lookupNonTerminal($constants, count);
   // TODO(jmesserly): there's no guarantee in JS that names/symbols are
   // returned in the same order.
   //
@@ -676,8 +616,8 @@
   // See issue https://github.com/dart-lang/sdk/issues/30876
   for (let i = 0; i < count; i++) {
     let name = names[i];
-    map = lookupNonTerminal(map, name);
-    map = lookupNonTerminal(map, $obj[name]);
+    map = $_lookupNonTerminal(map, name);
+    map = $_lookupNonTerminal(map, $obj[name]);
   }
   // TODO(leafp): It may be the case that the reified type
   // is always one of the keys already used above?
@@ -697,16 +637,10 @@
 
 /// Canonicalize a constant list
 constList(elements, elementType) => JS('', '''(() => {
-  function lookupNonTerminal(map, key) {
-    let result = map.get(key);
-    if (result !== void 0) return result;
-    map.set(key, result = new Map());
-    return result;
-  };
   let count = $elements.length;
-  let map = lookupNonTerminal($constantLists, count);
+  let map = $_lookupNonTerminal($constantLists, count);
   for (let i = 0; i < count; i++) {
-    map = lookupNonTerminal(map, elements[i]);
+    map = $_lookupNonTerminal(map, elements[i]);
   }
   let value = map.get($elementType);
   if (value) return value;
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart
index 82289ddd..116464a 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart
@@ -8,8 +8,9 @@
 import 'dart:async';
 import 'dart:collection';
 
+import 'dart:_debugger' show stackTraceMapper, trackCall;
 import 'dart:_foreign_helper' show JS, JSExportName, rest, spread;
-import 'dart:_interceptors' show JSArray, jsNull, JSFunction;
+import 'dart:_interceptors' show JSArray, jsNull, JSFunction, NativeError;
 import 'dart:_internal' as internal show Symbol;
 import 'dart:_js_helper'
     show
@@ -17,7 +18,6 @@
         BooleanConversionAssertionError,
         CastErrorImpl,
         DartIterator,
-        getTraceFromException,
         TypeErrorImpl,
         JsLinkedHashMap,
         ImmutableMap,
@@ -25,7 +25,6 @@
         ReifyFunctionTypes,
         NoReifyGeneric,
         notNull;
-import 'dart:_debugger' show trackCall;
 
 export 'dart:_debugger' show getDynamicStats, clearDynamicStats, trackCall;
 
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
index 4602bc2..13d6f88 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart
@@ -306,13 +306,6 @@
   return $_memoizeArray($map, key, () => $named);
 })()''');
 
-_lookupNonTerminal(map, key) => JS('', '''(() => {
-  let result = $map.get($key);
-  if (result !== void 0) return result;
-  $map.set($key, result = new Map());
-  return result;
-})()''');
-
 // TODO(leafp): This handles some low hanging fruit, but
 // really we should make all of this faster, and also
 // handle more cases here.
diff --git a/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart b/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
index de5ca6e..fb34f25 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart
@@ -138,7 +138,7 @@
     return stack;
   }
 
-  StackTrace get stackTrace => getTraceFromException(this);
+  StackTrace get stackTrace => dart.stackTrace(this);
 
   String toString() {
     String message = JS('!', '#.message', this);
@@ -211,7 +211,7 @@
 // it to be picked up as an extension type.
 @JsPeerInterface(name: 'RangeError')
 class JSRangeError extends Interceptor implements ArgumentError {
-  StackTrace get stackTrace => getTraceFromException(this);
+  StackTrace get stackTrace => dart.stackTrace(this);
 
   get invalidValue => null;
   get name => null;
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
index c9533c2..a8672f1 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
@@ -6,8 +6,6 @@
 
 import 'dart:collection';
 
-import 'dart:_debugger' show stackTraceMapper;
-
 import 'dart:_foreign_helper' show JS, JS_STRING_CONCAT, JSExportName;
 
 import 'dart:_interceptors';
@@ -579,53 +577,6 @@
 }
 
 /**
- * Called by generated code to fetch the stack trace from a Dart
- * exception. Should never return null.
- */
-final _stackTrace = JS('', 'Symbol("_stackTrace")');
-StackTrace getTraceFromException(exception) {
-  var error = dart.recordJsError(exception);
-  StackTrace trace = JS('', '#[#]', error, _stackTrace);
-  if (trace != null) return trace;
-  trace = _StackTrace(error);
-  JS('', '#[#] = #', error, _stackTrace, trace);
-  return trace;
-}
-
-/**
- * Called on rethrow to (potentially) set a different trace.
- */
-void setTraceForException(exception, StackTrace trace) {
-  var error = dart.recordJsError(exception);
-  JS('', '#[#] = #', error, _stackTrace, trace);
-}
-
-class _StackTrace implements StackTrace {
-  var _exception;
-  String _trace;
-
-  _StackTrace(this._exception);
-
-  String toString() {
-    if (_trace != null) return _trace;
-
-    String trace;
-    if (JS('bool', '# !== null', _exception) &&
-        JS('bool', 'typeof # === "object"', _exception)) {
-      if (_exception is NativeError) {
-        trace = _exception.dartStack();
-      } else {
-        trace = JS("", r"#.stack", _exception);
-      }
-      if (trace != null && stackTraceMapper != null) {
-        trace = stackTraceMapper(trace);
-      }
-    }
-    return _trace = (trace == null) ? '' : trace;
-  }
-}
-
-/**
  * Called by generated code to build a map literal. [keyValuePairs] is
  * a list of key, value, key, value, ..., etc.
  */
diff --git a/pkg/dev_compiler/tool/patch_sdk.dart b/pkg/dev_compiler/tool/patch_sdk.dart
index 4159cb5..e6d123b 100755
--- a/pkg/dev_compiler/tool/patch_sdk.dart
+++ b/pkg/dev_compiler/tool/patch_sdk.dart
@@ -9,8 +9,11 @@
 import 'dart:io';
 import 'dart:math' as math;
 
-import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/analyzer.dart'
+    show parseCompilationUnit, parseDirectives;
+import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:path/path.dart' as path;
 
diff --git a/pkg/diagnostic/pubspec.yaml b/pkg/diagnostic/pubspec.yaml
index 1ab1973..98411d4 100644
--- a/pkg/diagnostic/pubspec.yaml
+++ b/pkg/diagnostic/pubspec.yaml
@@ -1,5 +1,5 @@
 name: diagnostic
-version: 0.1.0
+publish_to: none
 author: Dart Team <misc@dartlang.org>
 description: Diagnostics for Dart
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/diagnostic
diff --git a/pkg/expect/lib/expect.dart b/pkg/expect/lib/expect.dart
index eff873d..8e2ff95 100644
--- a/pkg/expect/lib/expect.dart
+++ b/pkg/expect/lib/expect.dart
@@ -671,20 +671,6 @@
 }
 
 /// Annotation class for testing of dart2js. Use this as metadata on method
-/// declarations to make the type inferrer trust the parameter and return types,
-/// effectively asserting the runtime values will (at least) be subtypes of the
-/// annotated types.
-///
-/// While the actually inferred type is guaranteed to be a subtype of the
-/// annotation, it often is more precise. In particular, if a method is only
-/// called with `null`, the inferrer will still infer null. To ensure that
-/// the annotated type is also the inferred type, additionally use
-/// [AssumeDynamic].
-class TrustTypeAnnotations {
-  const TrustTypeAnnotations();
-}
-
-/// Annotation class for testing of dart2js. Use this as metadata on method
 /// declarations to disable closed world assumptions on parameters, effectively
 /// assuming that the runtime arguments could be any value. Note that the
 /// constraints due to [TrustTypeAnnotations] still apply.
diff --git a/pkg/expect/pubspec.yaml b/pkg/expect/pubspec.yaml
index 21ab22d..d4b48a4 100644
--- a/pkg/expect/pubspec.yaml
+++ b/pkg/expect/pubspec.yaml
@@ -1,6 +1,5 @@
 name: expect
-author: "Dart Team <misc@dartlang.org>"
-homepage: http://www.dartlang.org
+publish_to: none
 description: >
  Expect is used for tests that do not want to make use of the
  Dart unit test library - for example, the core language tests.
@@ -8,4 +7,4 @@
  the expect() function in the unit test library instead for
  test assertions.
 environment:
-  sdk: ">=0.8.10+6 <2.0.0"
+  sdk: ">=0.8.10+6 <3.0.0"
diff --git a/pkg/front_end/lib/src/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
index cf712e6..cb41df3 100644
--- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart
+++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
@@ -8,6 +8,8 @@
 
 import 'diagnostic_message.dart' show DiagnosticMessageHandler;
 
+import 'experimental_flags.dart' show ExperimentalFlag;
+
 import 'file_system.dart' show FileSystem;
 
 import 'standard_file_system.dart' show StandardFileSystem;
@@ -120,6 +122,11 @@
   // libraries.json)
   Map<String, List<Uri>> targetPatches = {};
 
+  /// Enable or disable experimental features. Features mapping to `true` are
+  /// explicitly enabled. Features mapping to `false` are explicitly disabled.
+  /// Features not mentioned in the map will have their default value.
+  Map<ExperimentalFlag, bool> experimentalFlags = {};
+
   /// The target platform that will consume the compiled code.
   ///
   /// Used to provide platform-specific details to the compiler like:
diff --git a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
new file mode 100644
index 0000000..1441108
--- /dev/null
+++ b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// TODO(askesc): Generate this file from a flag specification.
+
+enum ExperimentalFlag {
+  setLiterals,
+  constantUpdate2018,
+}
+
+ExperimentalFlag parseExperimentalFlag(String flag) {
+  switch (flag) {
+    case "set-literals":
+      return ExperimentalFlag.setLiterals;
+    case "constant-update-2018":
+      return ExperimentalFlag.constantUpdate2018;
+  }
+  return null;
+}
diff --git a/pkg/front_end/lib/src/api_unstable/ddc.dart b/pkg/front_end/lib/src/api_unstable/ddc.dart
index 1a85b55..0a129d8 100644
--- a/pkg/front_end/lib/src/api_unstable/ddc.dart
+++ b/pkg/front_end/lib/src/api_unstable/ddc.dart
@@ -12,6 +12,8 @@
 
 import '../api_prototype/diagnostic_message.dart' show DiagnosticMessageHandler;
 
+import '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
+
 import '../api_prototype/file_system.dart' show FileSystem;
 
 import '../api_prototype/standard_file_system.dart' show StandardFileSystem;
@@ -26,6 +28,9 @@
 
 export '../api_prototype/diagnostic_message.dart' show DiagnosticMessage;
 
+export '../api_prototype/experimental_flags.dart'
+    show ExperimentalFlag, parseExperimentalFlag;
+
 export '../api_prototype/kernel_generator.dart' show kernelForComponent;
 
 export '../api_prototype/memory_file_system.dart' show MemoryFileSystem;
@@ -59,7 +64,8 @@
     Uri librariesSpecificationUri,
     List<Uri> inputSummaries,
     Target target,
-    {FileSystem fileSystem}) async {
+    {FileSystem fileSystem,
+    Map<ExperimentalFlag, bool> experiments}) async {
   inputSummaries.sort((a, b) => a.toString().compareTo(b.toString()));
   bool listEqual(List<Uri> a, List<Uri> b) {
     if (a.length != b.length) return false;
@@ -69,11 +75,21 @@
     return true;
   }
 
+  bool mapEqual(Map<ExperimentalFlag, bool> a, Map<ExperimentalFlag, bool> b) {
+    if (a == null || b == null) return a == b;
+    if (a.length != b.length) return false;
+    for (var flag in a.keys) {
+      if (!b.containsKey(flag) || a[flag] != b[flag]) return false;
+    }
+    return true;
+  }
+
   if (oldState != null &&
       oldState.options.sdkSummary == sdkSummary &&
       oldState.options.packagesFileUri == packagesFile &&
       oldState.options.librariesSpecificationUri == librariesSpecificationUri &&
-      listEqual(oldState.options.inputSummaries, inputSummaries)) {
+      listEqual(oldState.options.inputSummaries, inputSummaries) &&
+      mapEqual(oldState.options.experimentalFlags, experiments)) {
     // Reuse old state.
 
     // These libraries are marked external when compiling. If not un-marking
@@ -96,6 +112,7 @@
     ..librariesSpecificationUri = librariesSpecificationUri
     ..target = target
     ..fileSystem = fileSystem ?? StandardFileSystem.instance;
+  if (experiments != null) options.experimentalFlags = experiments;
 
   ProcessedOptions processedOpts = new ProcessedOptions(options: options);
 
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index 126a0c0..206df5f 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -24,6 +24,8 @@
 import '../api_prototype/compiler_options.dart'
     show CompilerOptions, DiagnosticMessage;
 
+import '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
+
 import '../api_prototype/file_system.dart'
     show FileSystem, FileSystemEntity, FileSystemException;
 
@@ -293,6 +295,11 @@
   Target get target => _target ??=
       _raw.target ?? new NoneTarget(new TargetFlags(legacyMode: legacyMode));
 
+  bool isExperimentEnabled(ExperimentalFlag flag) {
+    // TODO(askesc): Determine default flag value from specification file.
+    return _raw.experimentalFlags[flag] ?? false;
+  }
+
   /// Get an outline component that summarizes the SDK, if any.
   // TODO(sigmund): move, this doesn't feel like an "option".
   Future<Component> loadSdkSummary(CanonicalName nameRoot) async {
diff --git a/pkg/front_end/lib/src/fasta/builder/field_builder.dart b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
index 054a552..fed33cf 100644
--- a/pkg/front_end/lib/src/fasta/builder/field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/field_builder.dart
@@ -26,6 +26,4 @@
   bool get hasInitializer;
 
   bool get isField => true;
-
-  bool get hasTypeInferredFromInitializer;
 }
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
index 0d54faa..75fd906 100644
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
@@ -54,6 +54,8 @@
         exportScopeBuilder = new ScopeBuilder(exportScope),
         super(null, -1, fileUri);
 
+  bool get legacyMode => false;
+
   bool get isSynthetic => false;
 
   @override
@@ -72,8 +74,6 @@
   @override
   R get target;
 
-  bool get disableTypeInference => true;
-
   Uri get uri;
 
   Iterator<Declaration> get iterator {
diff --git a/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart b/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart
index 47e75a7..0556c747 100644
--- a/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart
@@ -19,7 +19,7 @@
 import 'builder.dart' show Declaration;
 
 abstract class ModifierBuilder extends Declaration {
-  final Declaration parent;
+  Declaration parent;
 
   final int charOffset;
 
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_target.dart b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
index bae16f6..63348b0 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_target.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
@@ -58,8 +58,5 @@
   }
 
   @override
-  void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {}
-
-  @override
   void breakCycle(ClassBuilder cls) {}
 }
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes.dart b/pkg/front_end/lib/src/fasta/fasta_codes.dart
index e9425bb0..2fe4551 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes.dart
@@ -194,3 +194,14 @@
 }
 
 typedef SummaryTemplate = Message Function(int, int, num, num, num);
+
+String itemizeNames(List<String> names) {
+  StringBuffer buffer = new StringBuffer();
+  for (int i = 0; i < names.length - 1; i++) {
+    buffer.write(" - ");
+    buffer.writeln(names[i]);
+  }
+  buffer.write(" - ");
+  buffer.write(names.last);
+  return "$buffer";
+}
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 7ab454a..bfea29e 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
@@ -923,18 +923,6 @@
         r"""Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on  the class' constructor(s).""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Null> codeConstConstructorInSubclassOfMixinApplication =
-    messageConstConstructorInSubclassOfMixinApplication;
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageConstConstructorInSubclassOfMixinApplication =
-    const MessageCode("ConstConstructorInSubclassOfMixinApplication",
-        analyzerCodes: <String>[
-      "CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION"
-    ],
-        message: r"""Can't extend a mixin application and be 'const'.""");
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeConstConstructorNonFinalField =
     messageConstConstructorNonFinalField;
 
@@ -1766,27 +1754,24 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name, String string)>
-    templateCyclicClassHierarchy =
-    const Template<Message Function(String name, String string)>(
-        messageTemplate: r"""'#name' is a supertype of itself via '#string'.""",
+const Template<Message Function(String name)> templateCyclicClassHierarchy =
+    const Template<Message Function(String name)>(
+        messageTemplate: r"""'#name' is a supertype of itself.""",
         withArguments: _withArgumentsCyclicClassHierarchy);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, String string)>
-    codeCyclicClassHierarchy =
-    const Code<Message Function(String name, String string)>(
+const Code<Message Function(String name)> codeCyclicClassHierarchy =
+    const Code<Message Function(String name)>(
         "CyclicClassHierarchy", templateCyclicClassHierarchy,
         analyzerCodes: <String>["RECURSIVE_INTERFACE_INHERITANCE"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsCyclicClassHierarchy(String name, String string) {
+Message _withArgumentsCyclicClassHierarchy(String name) {
   if (name.isEmpty) throw 'No name provided';
   name = demangleMixinApplicationName(name);
-  if (string.isEmpty) throw 'No string provided';
   return new Message(codeCyclicClassHierarchy,
-      message: """'${name}' is a supertype of itself via '${string}'.""",
-      arguments: {'name': name, 'string': string});
+      message: """'${name}' is a supertype of itself.""",
+      arguments: {'name': name});
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2056,28 +2041,6 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name)>
-    templateDirectCyclicClassHierarchy =
-    const Template<Message Function(String name)>(
-        messageTemplate: r"""'#name' can't use itself as a supertype.""",
-        withArguments: _withArgumentsDirectCyclicClassHierarchy);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name)> codeDirectCyclicClassHierarchy =
-    const Code<Message Function(String name)>(
-        "DirectCyclicClassHierarchy", templateDirectCyclicClassHierarchy,
-        analyzerCodes: <String>["RECURSIVE_INTERFACE_INHERITANCE"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsDirectCyclicClassHierarchy(String name) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  return new Message(codeDirectCyclicClassHierarchy,
-      message: """'${name}' can't use itself as a supertype.""",
-      arguments: {'name': name});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeDirectiveAfterDeclaration =
     messageDirectiveAfterDeclaration;
 
@@ -3247,76 +3210,6 @@
     message: r"""Factory bodies can't use 'async', 'async*', or 'sync*'.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name, int count)>
-    templateFactoryRedirecteeHasTooFewPositionalParameters =
-    const Template<Message Function(String name, int count)>(
-        messageTemplate:
-            r"""Redirection target '#name' accepts fewer arguments ('#count') than the redirecting factory can provide.""",
-        tipTemplate: r"""Try redirecting to a different constructor.""",
-        withArguments:
-            _withArgumentsFactoryRedirecteeHasTooFewPositionalParameters);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, int count)>
-    codeFactoryRedirecteeHasTooFewPositionalParameters =
-    const Code<Message Function(String name, int count)>(
-        "FactoryRedirecteeHasTooFewPositionalParameters",
-        templateFactoryRedirecteeHasTooFewPositionalParameters,
-        analyzerCodes: <String>["REDIRECT_TO_INVALID_FUNCTION_TYPE"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsFactoryRedirecteeHasTooFewPositionalParameters(
-    String name, int count) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  if (count == null) throw 'No count provided';
-  return new Message(codeFactoryRedirecteeHasTooFewPositionalParameters,
-      message:
-          """Redirection target '${name}' accepts fewer arguments ('${count}') than the redirecting factory can provide.""",
-      tip: """Try redirecting to a different constructor.""",
-      arguments: {'name': name, 'count': count});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
-    Message Function(
-        DartType _type,
-        String name,
-        DartType
-            _type2)> templateFactoryRedirecteeInvalidReturnType = const Template<
-        Message Function(DartType _type, String name, DartType _type2)>(
-    messageTemplate:
-        r"""The return type '#type' of the constructor '#name' isn't a subtype of '#type2'.""",
-    tipTemplate: r"""Try redirecting to a different constructor.""",
-    withArguments: _withArgumentsFactoryRedirecteeInvalidReturnType);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(DartType _type, String name, DartType _type2)>
-    codeFactoryRedirecteeInvalidReturnType =
-    const Code<Message Function(DartType _type, String name, DartType _type2)>(
-        "FactoryRedirecteeInvalidReturnType",
-        templateFactoryRedirecteeInvalidReturnType,
-        analyzerCodes: <String>["REDIRECT_TO_INVALID_RETURN_TYPE"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsFactoryRedirecteeInvalidReturnType(
-    DartType _type, String name, DartType _type2) {
-  TypeLabeler labeler = new TypeLabeler();
-  List<Object> typeParts = labeler.labelType(_type);
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  List<Object> type2Parts = labeler.labelType(_type2);
-  String type = typeParts.join();
-  String type2 = type2Parts.join();
-  return new Message(codeFactoryRedirecteeInvalidReturnType,
-      message:
-          """The return type '${type}' of the constructor '${name}' isn't a subtype of '${type2}'.""" +
-              labeler.originMessages,
-      tip: """Try redirecting to a different constructor.""",
-      arguments: {'type': _type, 'name': name, 'type2': _type2});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeFactoryTopLevelDeclaration =
     messageFactoryTopLevelDeclaration;
 
@@ -3427,7 +3320,12 @@
     Makes messages of the given kinds fatal, that is, immediately stop the
     compiler with a non-zero exit-code. In --verbose mode, also display an
     internal stack trace from the compiler. Multiple kinds can be separated by
-    commas, for example, --fatal=errors,warnings.""");
+    commas, for example, --fatal=errors,warnings.
+
+  --enable-experiment=<flag>
+  --disable-experiment=<flag>
+    Enable or disable an experimental flag, used to guard features currently
+    in development. Multiple experiments can be separated by commas.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeFastaUsageShort = messageFastaUsageShort;
@@ -3440,6 +3338,18 @@
   -h        Display this message (add -v for information about all options).""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeFieldInitializedOutsideDeclaringClass =
+    messageFieldInitializedOutsideDeclaringClass;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageFieldInitializedOutsideDeclaringClass = const MessageCode(
+    "FieldInitializedOutsideDeclaringClass",
+    index: 88,
+    message: r"""A field can only be initialized in it's declaring class""",
+    tip:
+        r"""Try passing a value into the superclass constructor, or moving the initialization into the constructor body.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeFieldInitializerOutsideConstructor =
     messageFieldInitializerOutsideConstructor;
 
@@ -4149,6 +4059,40 @@
 const Template<
     Message Function(
         DartType _type,
+        DartType
+            _type2)> templateIncompatibleRedirecteeFunctionType = const Template<
+        Message Function(DartType _type, DartType _type2)>(
+    messageTemplate:
+        r"""The constructor function type '#type' isn't a subtype of '#type2'.""",
+    withArguments: _withArgumentsIncompatibleRedirecteeFunctionType);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, DartType _type2)>
+    codeIncompatibleRedirecteeFunctionType =
+    const Code<Message Function(DartType _type, DartType _type2)>(
+        "IncompatibleRedirecteeFunctionType",
+        templateIncompatibleRedirecteeFunctionType,
+        analyzerCodes: <String>["REDIRECT_TO_INVALID_TYPE"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsIncompatibleRedirecteeFunctionType(
+    DartType _type, DartType _type2) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeIncompatibleRedirecteeFunctionType,
+      message:
+          """The constructor function type '${type}' isn't a subtype of '${type2}'.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        DartType _type,
         DartType _type2,
         String name,
         String
@@ -4581,7 +4525,6 @@
 const MessageCode messageInheritedMembersConflict = const MessageCode(
     "InheritedMembersConflict",
     analyzerCodes: <String>["CONFLICTS_WITH_INHERITED_MEMBER"],
-    severity: Severity.errorLegacyWarning,
     message: r"""Can't inherit members that conflict with each other.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5652,7 +5595,6 @@
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageInvalidInitializer = const MessageCode(
     "InvalidInitializer",
-    analyzerCodes: <String>["INVALID_INITIALIZER"],
     message: r"""Not a valid initializer.""",
     tip: r"""To initialize a field, use the syntax 'name = value'.""");
 
@@ -5920,7 +5862,7 @@
     "MapLiteralTypeArgumentMismatch",
     analyzerCodes: <String>["EXPECTED_TWO_MAP_TYPE_ARGUMENTS"],
     severity: Severity.errorLegacyWarning,
-    message: r"""Map literal requires exactly two type arguments.""");
+    message: r"""A map literal requires exactly two type arguments.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeMemberWithSameNameAsClass =
@@ -6085,12 +6027,12 @@
 const Template<
     Message Function(
         String name,
-        String
-            string)> templateMissingImplementationNotAbstract = const Template<
-        Message Function(String name, String string)>(
+        List<String>
+            _names)> templateMissingImplementationNotAbstract = const Template<
+        Message Function(String name, List<String> _names)>(
     messageTemplate:
         r"""The non-abstract class '#name' is missing implementations for these members:
-  #string.""",
+#names""",
     tipTemplate: r"""Try to either
  - provide an implementation,
  - inherit an implementation from a superclass or mixin,
@@ -6100,31 +6042,31 @@
     withArguments: _withArgumentsMissingImplementationNotAbstract);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, String string)>
+const Code<Message Function(String name, List<String> _names)>
     codeMissingImplementationNotAbstract =
-    const Code<Message Function(String name, String string)>(
+    const Code<Message Function(String name, List<String> _names)>(
         "MissingImplementationNotAbstract",
         templateMissingImplementationNotAbstract,
-        analyzerCodes: <String>["CONCRETE_CLASS_WITH_ABSTRACT_MEMBER"],
-        severity: Severity.errorLegacyWarning);
+        analyzerCodes: <String>["CONCRETE_CLASS_WITH_ABSTRACT_MEMBER"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 Message _withArgumentsMissingImplementationNotAbstract(
-    String name, String string) {
+    String name, List<String> _names) {
   if (name.isEmpty) throw 'No name provided';
   name = demangleMixinApplicationName(name);
-  if (string.isEmpty) throw 'No string provided';
+  if (_names.isEmpty) throw 'No names provided';
+  String names = itemizeNames(_names);
   return new Message(codeMissingImplementationNotAbstract,
       message:
           """The non-abstract class '${name}' is missing implementations for these members:
-  ${string}.""",
+${names}""",
       tip: """Try to either
  - provide an implementation,
  - inherit an implementation from a superclass or mixin,
  - mark the class as abstract, or
  - provide a 'noSuchMethod' implementation.
 """,
-      arguments: {'name': name, 'string': string});
+      arguments: {'name': name, 'names': _names});
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6687,14 +6629,37 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeObjectExtends = messageObjectExtends;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageObjectExtends = const MessageCode("ObjectExtends",
+    message: r"""The class 'Object' can't have a superclass.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeObjectImplements = messageObjectImplements;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageObjectImplements = const MessageCode(
+    "ObjectImplements",
+    message: r"""The class 'Object' can't implement anything.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeObjectMixesIn = messageObjectMixesIn;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageObjectMixesIn = const MessageCode("ObjectMixesIn",
+    message: r"""The class 'Object' can't use mixins.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeOnlyTry = messageOnlyTry;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageOnlyTry = const MessageCode("OnlyTry",
-    analyzerCodes: <String>["MISSING_CATCH_OR_FINALLY"],
+    index: 92,
     message:
-        r"""Try block should be followed by 'on', 'catch', or 'finally' block.""",
-    tip: r"""Did you forget to add a 'finally' block?""");
+        r"""A try block must be followed by an 'on', 'catch', or 'finally' clause.""",
+    tip:
+        r"""Try adding either a catch or finally clause, or remove the try statement.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
@@ -7521,152 +7486,6 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name, DartType _type, DartType _type2)>
-    templateRedirectingFactoryInvalidNamedParameterType = const Template<
-            Message Function(String name, DartType _type, DartType _type2)>(
-        messageTemplate:
-            r"""The type of the named parameter '#name', '#type' is not a subtype of the redirection target's corresponding named parameter type, '#type2'.""",
-        tipTemplate:
-            r"""Try changing either the type of the parameter or the redirection target.""",
-        withArguments:
-            _withArgumentsRedirectingFactoryInvalidNamedParameterType);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, DartType _type, DartType _type2)>
-    codeRedirectingFactoryInvalidNamedParameterType =
-    const Code<Message Function(String name, DartType _type, DartType _type2)>(
-        "RedirectingFactoryInvalidNamedParameterType",
-        templateRedirectingFactoryInvalidNamedParameterType,
-        analyzerCodes: <String>["REDIRECT_TO_INVALID_FUNCTION_TYPE"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsRedirectingFactoryInvalidNamedParameterType(
-    String name, DartType _type, DartType _type2) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  TypeLabeler labeler = new TypeLabeler();
-  List<Object> typeParts = labeler.labelType(_type);
-  List<Object> type2Parts = labeler.labelType(_type2);
-  String type = typeParts.join();
-  String type2 = type2Parts.join();
-  return new Message(codeRedirectingFactoryInvalidNamedParameterType,
-      message:
-          """The type of the named parameter '${name}', '${type}' is not a subtype of the redirection target's corresponding named parameter type, '${type2}'.""" +
-              labeler.originMessages,
-      tip: """Try changing either the type of the parameter or the redirection target.""",
-      arguments: {'name': name, 'type': _type, 'type2': _type2});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name, DartType _type, DartType _type2)>
-    templateRedirectingFactoryInvalidPositionalParameterType = const Template<
-            Message Function(String name, DartType _type, DartType _type2)>(
-        messageTemplate:
-            r"""The type of parameter '#name', '#type' is not a subtype of the redirection target's corresponding parameter type, '#type2'.""",
-        tipTemplate:
-            r"""Try changing either the type of the parameter or the redirection target.""",
-        withArguments:
-            _withArgumentsRedirectingFactoryInvalidPositionalParameterType);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, DartType _type, DartType _type2)>
-    codeRedirectingFactoryInvalidPositionalParameterType =
-    const Code<Message Function(String name, DartType _type, DartType _type2)>(
-        "RedirectingFactoryInvalidPositionalParameterType",
-        templateRedirectingFactoryInvalidPositionalParameterType,
-        analyzerCodes: <String>["REDIRECT_TO_INVALID_FUNCTION_TYPE"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsRedirectingFactoryInvalidPositionalParameterType(
-    String name, DartType _type, DartType _type2) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  TypeLabeler labeler = new TypeLabeler();
-  List<Object> typeParts = labeler.labelType(_type);
-  List<Object> type2Parts = labeler.labelType(_type2);
-  String type = typeParts.join();
-  String type2 = type2Parts.join();
-  return new Message(codeRedirectingFactoryInvalidPositionalParameterType,
-      message:
-          """The type of parameter '${name}', '${type}' is not a subtype of the redirection target's corresponding parameter type, '${type2}'.""" +
-              labeler.originMessages,
-      tip: """Try changing either the type of the parameter or the redirection target.""",
-      arguments: {'name': name, 'type': _type, 'type2': _type2});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name, String name2)>
-    templateRedirectingFactoryMissingNamedParameter =
-    const Template<Message Function(String name, String name2)>(
-        messageTemplate:
-            r"""The constructor '#name' does not have a named parameter '#name2'.""",
-        tipTemplate:
-            r"""Try adding '#name2' as a named parameter to '#name'.""",
-        withArguments: _withArgumentsRedirectingFactoryMissingNamedParameter);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, String name2)>
-    codeRedirectingFactoryMissingNamedParameter =
-    const Code<Message Function(String name, String name2)>(
-        "RedirectingFactoryMissingNamedParameter",
-        templateRedirectingFactoryMissingNamedParameter,
-        analyzerCodes: <String>["REDIRECT_TO_INVALID_FUNCTION_TYPE"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsRedirectingFactoryMissingNamedParameter(
-    String name, String name2) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  if (name2.isEmpty) throw 'No name provided';
-  name2 = demangleMixinApplicationName(name2);
-  return new Message(codeRedirectingFactoryMissingNamedParameter,
-      message:
-          """The constructor '${name}' does not have a named parameter '${name2}'.""",
-      tip: """Try adding '${name2}' as a named parameter to '${name}'.""",
-      arguments: {'name': name, 'name2': name2});
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
-        Message Function(String name, int count, String name2, int count2)>
-    templateRedirectingFactoryProvidesTooFewRequiredParameters = const Template<
-            Message Function(String name, int count, String name2, int count2)>(
-        messageTemplate:
-            r"""Redirecting factory '#name' can provide less arguments ('#count') than required by the redirection target '#name2' ('#count2').""",
-        tipTemplate: r"""Try redirecting to a different constructor.""",
-        withArguments:
-            _withArgumentsRedirectingFactoryProvidesTooFewRequiredParameters);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, int count, String name2, int count2)>
-    codeRedirectingFactoryProvidesTooFewRequiredParameters = const Code<
-            Message Function(String name, int count, String name2, int count2)>(
-        "RedirectingFactoryProvidesTooFewRequiredParameters",
-        templateRedirectingFactoryProvidesTooFewRequiredParameters,
-        analyzerCodes: <String>["REDIRECT_TO_INVALID_FUNCTION_TYPE"]);
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsRedirectingFactoryProvidesTooFewRequiredParameters(
-    String name, int count, String name2, int count2) {
-  if (name.isEmpty) throw 'No name provided';
-  name = demangleMixinApplicationName(name);
-  if (count == null) throw 'No count provided';
-  if (name2.isEmpty) throw 'No name provided';
-  name2 = demangleMixinApplicationName(name2);
-  if (count2 == null) throw 'No count provided';
-  return new Message(codeRedirectingFactoryProvidesTooFewRequiredParameters,
-      message:
-          """Redirecting factory '${name}' can provide less arguments ('${count}') than required by the redirection target '${name2}' ('${count2}').""",
-      tip: """Try redirecting to a different constructor.""",
-      arguments: {
-        'name': name,
-        'count': count,
-        'name2': name2,
-        'count2': count2
-      });
-}
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeRedirectionInNonFactory = messageRedirectionInNonFactory;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -7820,6 +7639,35 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeSetLiteralTooManyTypeArguments =
+    messageSetLiteralTooManyTypeArguments;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageSetLiteralTooManyTypeArguments = const MessageCode(
+    "SetLiteralTooManyTypeArguments",
+    severity: Severity.errorLegacyWarning,
+    message: r"""A set literal requires exactly one type argument.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeSetLiteralsNotSupported = messageSetLiteralsNotSupported;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageSetLiteralsNotSupported = const MessageCode(
+    "SetLiteralsNotSupported",
+    message: r"""Set literals are not supported yet.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeSetOrMapLiteralTooManyTypeArguments =
+    messageSetOrMapLiteralTooManyTypeArguments;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageSetOrMapLiteralTooManyTypeArguments = const MessageCode(
+    "SetOrMapLiteralTooManyTypeArguments",
+    severity: Severity.errorLegacyWarning,
+    message:
+        r"""A set or map literal requires exactly one or two type arguments, respectively.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String name)> templateSetterNotFound =
     const Template<Message Function(String name)>(
         messageTemplate: r"""Setter not found: '#name'.""",
@@ -7965,7 +7813,9 @@
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageStackOverflow = const MessageCode("StackOverflow",
-    analyzerCodes: <String>["STACK_OVERFLOW"], message: r"""Stack overflow.""");
+    index: 91,
+    message: r"""The file has too many nested expressions or statements.""",
+    tip: r"""Try simplifying the code.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeStaticAfterConst = messageStaticAfterConst;
@@ -8051,8 +7901,9 @@
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageSuperNullAware = const MessageCode("SuperNullAware",
-    analyzerCodes: <String>["INVALID_OPERATOR_FOR_SUPER"],
-    message: r"""'super' can't be null.""",
+    index: 90,
+    message:
+        r"""The operator '?.' cannot be used with 'super' because 'super' cannot be null.""",
     tip: r"""Try replacing '?.' with '.'""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -8475,8 +8326,9 @@
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageTypeAfterVar = const MessageCode("TypeAfterVar",
-    analyzerCodes: <String>["VAR_AND_TYPE"],
-    message: r"""Can't have both a type and 'var'.""",
+    index: 89,
+    message:
+        r"""Variables can't be declared using both 'var' and a type name.""",
     tip: r"""Try removing 'var.'""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 2ba7eb7..91a78a6 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -152,18 +152,7 @@
         }
         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();
-        }
+        await dillLoadedData.buildOutlines();
         summaryBytes = null;
         userBuilders = <Uri, LibraryBuilder>{};
         platformBuilders = <LibraryBuilder>[];
@@ -222,8 +211,6 @@
             " of ${userCode.loader.builders.length} libraries");
       }
 
-      reusedLibraries.addAll(platformBuilders);
-
       KernelTarget userCodeOld = userCode;
       userCode = new KernelTarget(
           new HybridFileSystem(
@@ -559,11 +546,11 @@
   List<LibraryBuilder> computeReusedLibraries(
       Set<Uri> invalidatedUris, UriTranslator uriTranslator,
       {Set<LibraryBuilder> notReused}) {
-    if (userCode == null && userBuilders == null) {
-      return <LibraryBuilder>[];
-    }
-
     List<LibraryBuilder> result = <LibraryBuilder>[];
+    result.addAll(platformBuilders);
+    if (userCode == null && userBuilders == null) {
+      return result;
+    }
 
     // Maps all non-platform LibraryBuilders from their import URI.
     Map<Uri, LibraryBuilder> builders = <Uri, LibraryBuilder>{};
@@ -691,17 +678,7 @@
 }
 
 class IncrementalCompilerData {
-  bool includeUserLoadedLibraries;
-  Procedure userLoadedUriMain;
-  Component component;
-
-  IncrementalCompilerData() {
-    reset();
-  }
-
-  reset() {
-    includeUserLoadedLibraries = false;
-    userLoadedUriMain = null;
-    component = null;
-  }
+  bool includeUserLoadedLibraries = false;
+  Procedure userLoadedUriMain = null;
+  Component component = 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 2c1f64a..d023620 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -96,6 +96,8 @@
 
 import 'forest.dart' show Forest;
 
+import 'implicit_type_argument.dart' show ImplicitTypeArgument;
+
 import 'kernel_shadow_ast.dart' as shadow
     show SyntheticExpressionJudgment, SyntheticWrapper;
 
@@ -107,6 +109,8 @@
         getRedirectionTarget,
         isRedirectingFactory;
 
+import 'transform_set_literals.dart' show SetLiteralTransformer;
+
 import 'type_algorithms.dart' show calculateBounds;
 
 import 'kernel_api.dart';
@@ -162,6 +166,9 @@
   @override
   final TypePromoter typePromoter;
 
+  @override
+  final bool legacyMode;
+
   /// Only used when [member] is a constructor. It tracks if an implicit super
   /// initializer is needed.
   ///
@@ -197,6 +204,10 @@
 
   int functionNestingLevel = 0;
 
+  // Set by type inference when a set literal is encountered that needs to be
+  // transformed because the backend target does not support set literals.
+  bool transformSetLiterals = false;
+
   Statement problemInLoopOrSwitch;
 
   Scope switchScope;
@@ -247,6 +258,7 @@
         needsImplicitSuperInitializer =
             coreTypes?.objectClass != classBuilder?.cls,
         typePromoter = _typeInferrer?.typePromoter,
+        legacyMode = library.legacyMode,
         super(enclosingScope);
 
   BodyBuilder.withParents(KernelFieldBuilder field, KernelLibraryBuilder part,
@@ -272,8 +284,6 @@
             field.parent is KernelClassBuilder ? field.parent : null,
             typeInferrer);
 
-  bool get legacyMode => library.loader.target.legacyMode;
-
   bool get inConstructor {
     return functionNestingLevel == 0 && member is KernelConstructorBuilder;
   }
@@ -284,6 +294,9 @@
 
   TypeEnvironment get typeEnvironment => _typeInferrer?.typeSchemaEnvironment;
 
+  DartType get implicitTypeArgument =>
+      legacyMode ? const DynamicType() : const ImplicitTypeArgument();
+
   @override
   void push(Object node) {
     if (node is DartType) {
@@ -513,7 +526,7 @@
   void finishFields() {
     debugEvent("finishFields");
     int count = pop();
-    List<FieldBuilder<Object>> fields = <FieldBuilder<Object>>[];
+    List<KernelFieldBuilder> fields = <KernelFieldBuilder>[];
     for (int i = 0; i < count; i++) {
       Expression initializer = pop();
       Identifier identifier = pop();
@@ -524,7 +537,7 @@
       } else {
         declaration = library[name];
       }
-      FieldBuilder<Object> field;
+      KernelFieldBuilder field;
       if (declaration.isField && declaration.next == null) {
         field = declaration;
       } else {
@@ -539,9 +552,13 @@
         } else {
           field.initializer = initializer;
           _typeInferrer?.inferFieldInitializer(
-              this,
-              field.hasTypeInferredFromInitializer ? null : field.builtType,
-              initializer);
+              this, field.builtType, initializer);
+
+          if (transformSetLiterals) {
+            library.loader.setLiteralTransformer ??=
+                new SetLiteralTransformer(library.loader);
+            field.target.accept(library.loader.setLiteralTransformer);
+          }
         }
       }
     }
@@ -599,11 +616,6 @@
     ProcedureBuilder<TypeBuilder> member = this.member;
     scope = member.computeFormalParameterInitializerScope(scope);
     if (member is KernelConstructorBuilder) {
-      if (member.isConst &&
-          (classBuilder.cls.superclass?.isMixinApplication ?? false)) {
-        addProblem(fasta.messageConstConstructorInSubclassOfMixinApplication,
-            member.charOffset, member.name.length);
-      }
       if (member.formals != null) {
         for (KernelFormalParameterBuilder formal in member.formals) {
           if (formal.isInitializingFormal) {
@@ -717,13 +729,15 @@
     if (formals?.parameters != null) {
       for (int i = 0; i < formals.parameters.length; i++) {
         KernelFormalParameterBuilder parameter = formals.parameters[i];
-        if (parameter.isOptional) {
+        Expression initializer = parameter.target.initializer;
+        if (parameter.isOptional || initializer != null) {
           VariableDeclaration realParameter = builder.formals[i].target;
-          Expression initializer =
-              parameter.target.initializer ?? forest.literalNull(
-                  // TODO(ahe): Should store: realParameter.fileOffset
-                  // https://github.com/dart-lang/sdk/issues/32289
-                  null);
+          if (parameter.isOptional) {
+            initializer ??= forest.literalNull(
+                // TODO(ahe): Should store: realParameter.fileOffset
+                // https://github.com/dart-lang/sdk/issues/32289
+                null);
+          }
           realParameter.initializer = initializer..parent = realParameter;
           _typeInferrer?.inferParameterInitializer(
               this, initializer, realParameter.type);
@@ -734,6 +748,12 @@
     _typeInferrer?.inferFunctionBody(
         this, _computeReturnTypeContext(member), asyncModifier, body);
 
+    if (transformSetLiterals) {
+      library.loader.setLiteralTransformer ??=
+          new SetLiteralTransformer(library.loader);
+      body.accept(library.loader.setLiteralTransformer);
+    }
+
     // For async, async*, and sync* functions with declared return types, we
     // need to determine whether those types are valid.
     // TODO(hillerstrom): currently, we need to check whether [legacyMode] is
@@ -817,8 +837,21 @@
           statements.add(body);
           body = forest.block(null, statements, null)..fileOffset = charOffset;
         }
-        body = wrapInProblemStatement(
-            body, fasta.messageSetterWithWrongNumberOfFormals);
+        body = forest.block(
+            null,
+            <Statement>[
+              forest.expressionStatement(
+                  // This error is added after type inference is done, so we
+                  // don't need to wrap errors in SyntheticExpressionJudgment.
+                  desugarSyntheticExpression(buildProblem(
+                      fasta.messageSetterWithWrongNumberOfFormals,
+                      charOffset,
+                      noLength)),
+                  null),
+              body,
+            ],
+            null)
+          ..fileOffset = charOffset;
       }
     }
     // No-such-method forwarders get their bodies injected during outline
@@ -895,15 +928,13 @@
           assert(redirectingFactoryBody.isUnresolved);
           String errorName = redirectingFactoryBody.unresolvedName;
 
-          replacementNode = wrapSyntheticExpression(
-              throwNoSuchMethodError(
-                  forest.literalNull(null)..fileOffset = invocation.fileOffset,
-                  errorName,
-                  forest.arguments(invocation.arguments.positional, null,
-                      types: invocation.arguments.types,
-                      named: invocation.arguments.named),
-                  initialTarget.fileOffset),
-              invocation.fileOffset);
+          replacementNode = throwNoSuchMethodError(
+              forest.literalNull(null)..fileOffset = invocation.fileOffset,
+              errorName,
+              forest.arguments(invocation.arguments.positional, null,
+                  types: invocation.arguments.types,
+                  named: invocation.arguments.named),
+              initialTarget.fileOffset);
         } else {
           Substitution substitution = Substitution.fromPairs(
               initialTarget.function.typeParameters,
@@ -1130,7 +1161,7 @@
   }
 
   @override
-  void endExpressionStatement(Token token) {
+  void handleExpressionStatement(Token token) {
     debugEvent("ExpressionStatement");
     push(forest.expressionStatement(popForEffect(), token));
   }
@@ -1441,18 +1472,16 @@
     if (legacyMode && constantContext == ConstantContext.none) {
       addProblem(message.messageObject, message.charOffset, message.length,
           wasHandled: true, context: context);
-      return wrapSyntheticExpression(
-          forest.throwExpression(
-              null,
-              library.loader.instantiateNoSuchMethodError(
-                  receiver, name, forest.castArguments(arguments), charOffset,
-                  isMethod: !isGetter && !isSetter,
-                  isGetter: isGetter,
-                  isSetter: isSetter,
-                  isStatic: isStatic,
-                  isTopLevel: !isStatic && !isSuper))
-            ..fileOffset = charOffset,
-          charOffset);
+      return forest.throwExpression(
+          null,
+          library.loader.instantiateNoSuchMethodError(
+              receiver, name, forest.castArguments(arguments), charOffset,
+              isMethod: !isGetter && !isSetter,
+              isGetter: isGetter,
+              isSetter: isSetter,
+              isStatic: isStatic,
+              isTopLevel: !isStatic && !isSuper))
+        ..fileOffset = charOffset;
     }
     return desugarSyntheticExpression(buildProblem(
         message.messageObject, message.charOffset, message.length,
@@ -1565,9 +1594,6 @@
     Class cls = classBuilder.cls;
     if (isSuper) {
       cls = cls.superclass;
-      while (cls.isMixinApplication) {
-        cls = cls.superclass;
-      }
     }
     if (cls != null) {
       for (Constructor constructor in cls.constructors) {
@@ -1594,9 +1620,6 @@
 
       if (isSuper) {
         builder = getSuperclass(builder)?.origin;
-        while (builder?.isMixinApplication ?? false) {
-          builder = getSuperclass(builder)?.origin;
-        }
       }
       if (builder != null) {
         Class target = builder.target;
@@ -2163,17 +2186,29 @@
     }
   }
 
-  List<VariableDeclaration> buildForInitVariableDeclarations(
-      variableOrExpression) {
+  List<VariableDeclaration> buildVariableDeclarations(variableOrExpression) {
+    // TODO(ahe): This can be simplified now that we have the events
+    // `handleForInitializer...` events.
+    if (variableOrExpression is Generator) {
+      variableOrExpression = variableOrExpression.buildForEffect();
+    }
     if (variableOrExpression is VariableDeclaration) {
       return <VariableDeclaration>[variableOrExpression];
+    } else if (variableOrExpression is Expression) {
+      VariableDeclaration variable = new VariableDeclarationJudgment.forEffect(
+          variableOrExpression, functionNestingLevel);
+      return <VariableDeclaration>[variable];
+    } else if (variableOrExpression is ExpressionStatement) {
+      VariableDeclaration variable = new VariableDeclarationJudgment.forEffect(
+          variableOrExpression.expression, functionNestingLevel);
+      return <VariableDeclaration>[variable];
     } else if (forest.isVariablesDeclaration(variableOrExpression)) {
       return forest
           .variablesDeclarationExtractDeclarations(variableOrExpression);
     } else if (variableOrExpression is List<Object>) {
       List<VariableDeclaration> variables = <VariableDeclaration>[];
       for (Object v in variableOrExpression) {
-        variables.addAll(buildForInitVariableDeclarations(v));
+        variables.addAll(buildVariableDeclarations(v));
       }
       return variables;
     } else if (variableOrExpression == null) {
@@ -2182,15 +2217,6 @@
     return null;
   }
 
-  List<Expression> buildForInitExpressions(variableOrExpression) {
-    if (variableOrExpression is Expression) {
-      return <Expression>[variableOrExpression];
-    } else if (variableOrExpression is ExpressionStatementJudgment) {
-      return <Expression>[variableOrExpression.expression];
-    }
-    return null;
-  }
-
   @override
   void handleForInitializerEmptyStatement(Token token) {
     debugEvent("ForInitializerEmptyStatement");
@@ -2215,18 +2241,8 @@
     List<Expression> updates = popListForEffect(updateExpressionCount);
     Statement conditionStatement = popStatement();
     Object variableOrExpression = pop();
-
-    // TODO(ahe): This can be simplified now that we have the events
-    // `handleForInitializer...` events.
-    variableOrExpression = variableOrExpression is Generator
-        ? variableOrExpression.buildForEffect()
-        : variableOrExpression;
-    List<Expression> initializers =
-        buildForInitExpressions(variableOrExpression);
-    List<VariableDeclaration> variableList = initializers == null
-        ? buildForInitVariableDeclarations(variableOrExpression)
-        : null;
-
+    List<VariableDeclaration> variables =
+        buildVariableDeclarations(variableOrExpression);
     exitLocalScope();
     JumpTarget continueTarget = exitContinueTarget();
     JumpTarget breakTarget = exitBreakTarget();
@@ -2244,8 +2260,7 @@
     Statement result = forest.forStatement(
         forKeyword,
         leftParen,
-        variableList,
-        initializers,
+        variables,
         leftSeparator,
         condition,
         conditionStatement,
@@ -2289,6 +2304,7 @@
             fasta.messageListLiteralTooManyTypeArguments,
             offsetForToken(leftBracket),
             lengthOfSpan(leftBracket, leftBracket.endGroup));
+        typeArgument = const InvalidType();
       } else {
         typeArgument = buildDartType(typeArguments.single);
         if (!legacyMode) {
@@ -2296,6 +2312,8 @@
               instantiateToBounds(typeArgument, coreTypes.objectClass);
         }
       }
+    } else {
+      typeArgument = implicitTypeArgument;
     }
     Expression node = forest.literalList(
         constKeyword,
@@ -2310,6 +2328,78 @@
   }
 
   @override
+  void handleLiteralSet(
+      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
+    debugEvent("LiteralSet");
+    List<Expression> expressions = popListForValue(count);
+    List<UnresolvedType<KernelTypeBuilder>> typeArguments = pop();
+    DartType typeArgument;
+    if (typeArguments != null) {
+      if (typeArguments.length > 1) {
+        addProblem(
+            fasta.messageSetLiteralTooManyTypeArguments,
+            offsetForToken(leftBrace),
+            lengthOfSpan(leftBrace, leftBrace.endGroup));
+        typeArgument = const InvalidType();
+      } else {
+        typeArgument = buildDartType(typeArguments.single);
+        if (!library.loader.target.legacyMode) {
+          typeArgument =
+              instantiateToBounds(typeArgument, coreTypes.objectClass);
+        }
+      }
+    } else {
+      typeArgument = implicitTypeArgument;
+    }
+    Expression node = forest.literalSet(
+        constKeyword,
+        constKeyword != null || constantContext == ConstantContext.inferred,
+        typeArgument,
+        typeArguments,
+        leftBrace,
+        expressions,
+        rightBrace);
+    library.checkBoundsInSetLiteral(node, typeEnvironment);
+    if (!library.loader.target.enableSetLiterals) {
+      node = wrapInProblem(node, fasta.messageSetLiteralsNotSupported,
+          lengthOfSpan(leftBrace, leftBrace.endGroup));
+    }
+    push(node);
+  }
+
+  @override
+  void handleEmptyLiteralSetOrMap(
+      Token leftBrace, Token constKeyword, Token rightBrace) {
+    debugEvent("EmptyLiteralSetOrMap");
+    // Treat as map literal - type inference will find the right type.
+    List<UnresolvedType<KernelTypeBuilder>> typeArguments = pop();
+    assert(typeArguments == null || typeArguments.length > 2);
+    if (typeArguments != null && typeArguments.length > 2) {
+      if (library.loader.target.enableSetLiterals) {
+        addProblem(
+            fasta.messageSetOrMapLiteralTooManyTypeArguments,
+            offsetForToken(leftBrace),
+            lengthOfSpan(leftBrace, leftBrace.endGroup));
+      } else {
+        addProblem(
+            fasta.messageMapLiteralTypeArgumentMismatch,
+            offsetForToken(leftBrace),
+            lengthOfSpan(leftBrace, leftBrace.endGroup));
+      }
+    }
+    DartType implicitTypeArgument = this.implicitTypeArgument;
+    push(forest.literalMap(
+        constKeyword,
+        constKeyword != null || constantContext == ConstantContext.inferred,
+        implicitTypeArgument,
+        implicitTypeArgument,
+        null,
+        leftBrace,
+        <MapEntry>[],
+        rightBrace));
+  }
+
+  @override
   void handleLiteralBool(Token token) {
     debugEvent("LiteralBool");
     bool value = optional("true", token);
@@ -2344,6 +2434,8 @@
             fasta.messageMapLiteralTypeArgumentMismatch,
             offsetForToken(leftBrace),
             lengthOfSpan(leftBrace, leftBrace.endGroup));
+        keyType = const InvalidType();
+        valueType = const InvalidType();
       } else {
         keyType = buildDartType(typeArguments[0]);
         valueType = buildDartType(typeArguments[1]);
@@ -2352,6 +2444,10 @@
           valueType = instantiateToBounds(valueType, coreTypes.objectClass);
         }
       }
+    } else {
+      DartType implicitTypeArgument = this.implicitTypeArgument;
+      keyType = implicitTypeArgument;
+      valueType = implicitTypeArgument;
     }
     Expression node = forest.literalMap(
         constKeyword,
@@ -2413,9 +2509,10 @@
   }
 
   @override
-  void handleType(Token beginToken) {
+  void handleType(Token beginToken, Token questionMark) {
     // TODO(ahe): The scope is wrong for return types of generic functions.
     debugEvent("Type");
+    reportErrorIfNullableType(questionMark);
     List<UnresolvedType<KernelTypeBuilder>> arguments = pop();
     Object name = pop();
     if (name is QualifiedName) {
@@ -2491,8 +2588,9 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
+  void endFunctionType(Token functionToken, Token questionMark) {
     debugEvent("FunctionType");
+    reportErrorIfNullableType(questionMark);
     FormalParameters formals = pop();
     UnresolvedType<KernelTypeBuilder> returnType = pop();
     List<KernelTypeVariableBuilder> typeVariables = pop();
@@ -2663,6 +2761,8 @@
       } else {
         variable.initializer = initializer..parent = variable;
       }
+    } else if (kind != FormalParameterKind.mandatory) {
+      variable.initializer ??= forest.literalNull(null)..parent = variable;
     }
     if (annotations != null) {
       if (functionNestingLevel == 0) {
@@ -3061,13 +3161,15 @@
       LocatedMessage argMessage = checkArgumentsForFunction(
           target.function, arguments, charOffset, typeParameters);
       if (argMessage != null) {
-        return throwNoSuchMethodError(
-            forest.literalNull(null)..fileOffset = charOffset,
-            target.name.name,
-            arguments,
-            charOffset,
-            candidate: target,
-            message: argMessage);
+        return wrapSyntheticExpression(
+            throwNoSuchMethodError(
+                forest.literalNull(null)..fileOffset = charOffset,
+                target.name.name,
+                arguments,
+                charOffset,
+                candidate: target,
+                message: argMessage),
+            charOffset);
       }
     }
 
@@ -3570,13 +3672,12 @@
         Expression expression = new NamedFunctionExpressionJudgment(variable);
         if (oldInitializer != null) {
           // This must have been a compile-time error.
-          assert(isErroneousNode(oldInitializer));
-
+          Expression error = desugarSyntheticExpression(oldInitializer);
+          assert(isErroneousNode(error));
           int offset = forest.readOffset(expression);
           push(wrapSyntheticExpression(
               new Let(
-                  new VariableDeclaration.forValue(oldInitializer)
-                    ..fileOffset = offset,
+                  new VariableDeclaration.forValue(error)..fileOffset = offset,
                   expression)
                 ..fileOffset = offset,
               offset));
@@ -3633,6 +3734,25 @@
     FunctionNode function = formals.buildFunctionNode(
         library, null, typeParameters, asyncModifier, body, token.charOffset)
       ..fileOffset = beginToken.charOffset;
+
+    if (library.legacyMode && asyncModifier != AsyncMarker.Sync) {
+      DartType returnType;
+      switch (asyncModifier) {
+        case AsyncMarker.Async:
+          returnType = coreTypes.futureClass.rawType;
+          break;
+        case AsyncMarker.AsyncStar:
+          returnType = coreTypes.streamClass.rawType;
+          break;
+        case AsyncMarker.SyncStar:
+          returnType = coreTypes.iterableClass.rawType;
+          break;
+        default:
+          returnType = const DynamicType();
+          break;
+      }
+      function.returnType = returnType;
+    }
     if (constantContext != ConstantContext.none) {
       push(buildProblem(fasta.messageNotAConstantExpression, formals.charOffset,
           formals.length));
@@ -3686,20 +3806,17 @@
     exitLocalScope();
     JumpTarget continueTarget = exitContinueTarget();
     JumpTarget breakTarget = exitBreakTarget();
-    Statement kernelBody = body;
     if (continueTarget.hasUsers) {
-      kernelBody = new LabeledStatementJudgment(kernelBody);
-      continueTarget.resolveContinues(forest, kernelBody);
+      body = forest.syntheticLabeledStatement(body);
+      continueTarget.resolveContinues(forest, body);
     }
     VariableDeclaration variable;
-    bool declaresVariable = false;
-    Expression syntheticAssignment;
+    Expression problem;
     if (lvalue is VariableDeclaration) {
-      declaresVariable = true;
       variable = lvalue;
       if (variable.isConst) {
-        addProblem(fasta.messageForInLoopWithConstVariable, variable.fileOffset,
-            variable.name.length);
+        problem = buildProblem(fasta.messageForInLoopWithConstVariable,
+            variable.fileOffset, variable.name.length);
       }
     } else if (lvalue is Generator) {
       /// We are in this case, where `lvalue` isn't a [VariableDeclaration]:
@@ -3717,27 +3834,56 @@
       TypePromotionFact fact =
           typePromoter?.getFactForAccess(variable, functionNestingLevel);
       TypePromotionScope scope = typePromoter?.currentScope;
-      syntheticAssignment = lvalue.buildAssignment(
+      Expression syntheticAssignment = lvalue.buildAssignment(
           new VariableGetJudgment(variable, fact, scope)
             ..fileOffset = inKeyword.offset,
           voidContext: true);
+      if (syntheticAssignment is shadow.SyntheticExpressionJudgment) {
+        syntheticAssignment = wrapSyntheticExpression(
+            desugarSyntheticExpression(syntheticAssignment),
+            offsetForToken(lvalue.token));
+      }
+      body = combineStatements(
+          forest.expressionStatement(syntheticAssignment, null), body);
     } else {
       Message message = forest.isVariablesDeclaration(lvalue)
           ? fasta.messageForInLoopExactlyOneVariable
           : fasta.messageForInLoopNotAssignable;
       Token token = forToken.next.next;
-      variable = new VariableDeclaration.forValue(desugarSyntheticExpression(
-          buildProblem(message, offsetForToken(token), lengthForToken(token))));
+      variable =
+          new VariableDeclarationJudgment.forValue(null, functionNestingLevel);
+      problem =
+          buildProblem(message, offsetForToken(token), lengthForToken(token));
+      if (forest.isVariablesDeclaration(lvalue)) {
+        body = forest.block(
+            null,
+            <Statement>[]
+              ..addAll(forest.variablesDeclarationExtractDeclarations(lvalue))
+              ..add(body),
+            null);
+      } else {
+        body =
+            combineStatements(forest.expressionStatement(lvalue, null), body);
+      }
+      body = combineStatements(
+          forest.expressionStatement(
+              buildProblem(
+                  message, offsetForToken(token), lengthForToken(token)),
+              null),
+          body);
     }
-    Statement result = new ForInJudgment(
-        variable, expression, kernelBody, declaresVariable, syntheticAssignment,
+    Statement result = new ForInStatement(variable, expression, body,
         isAsync: awaitToken != null)
       ..fileOffset = awaitToken?.charOffset ?? forToken.charOffset
-      ..bodyOffset = kernelBody.fileOffset;
+      ..bodyOffset = body.fileOffset; // TODO(ahe): Isn't this redundant?
     if (breakTarget.hasUsers) {
-      result = new LabeledStatementJudgment(result);
+      result = forest.syntheticLabeledStatement(result);
       breakTarget.resolveBreaks(forest, result);
     }
+    if (problem != null) {
+      result =
+          combineStatements(forest.expressionStatement(problem, null), result);
+    }
     exitLoopOrSwitch(result);
   }
 
@@ -3778,7 +3924,7 @@
             uri);
       }
       if (statement is! LabeledStatement) {
-        statement = new LabeledStatementJudgment(statement);
+        statement = forest.syntheticLabeledStatement(statement);
       }
       target.breakTarget.resolveBreaks(forest, statement);
       target.continueTarget.resolveContinues(forest, statement);
@@ -3964,7 +4110,7 @@
     Statement result = new SwitchStatementJudgment(expression, cases)
       ..fileOffset = switchKeyword.charOffset;
     if (target.hasUsers) {
-      result = new LabeledStatementJudgment(result);
+      result = forest.syntheticLabeledStatement(result);
       target.resolveBreaks(forest, result);
     }
     exitLoopOrSwitch(result);
@@ -4758,12 +4904,14 @@
 
   @override
   Expression wrapSyntheticExpression(Expression desugared, int charOffset) {
+    if (legacyMode) return desugared;
     return shadow.SyntheticWrapper.wrapSyntheticExpression(desugared)
       ..fileOffset = charOffset;
   }
 
   @override
   Expression desugarSyntheticExpression(Expression node) {
+    if (legacyMode) return node;
     shadow.SyntheticExpressionJudgment shadowNode = node;
     return shadowNode.desugared;
   }
@@ -4771,6 +4919,7 @@
   @override
   Expression wrapInvalidConstructorInvocation(Expression desugared,
       Member constructor, Arguments arguments, int charOffset) {
+    if (legacyMode) return desugared;
     return shadow.SyntheticWrapper.wrapInvalidConstructorInvocation(
         desugared, constructor, arguments)
       ..fileOffset = charOffset;
@@ -4779,6 +4928,7 @@
   @override
   Expression wrapInvalidWrite(
       Expression desugared, Expression expression, int charOffset) {
+    if (legacyMode) return desugared;
     return shadow.SyntheticWrapper.wrapInvalidWrite(desugared, expression)
       ..fileOffset = charOffset;
   }
@@ -4786,6 +4936,7 @@
   @override
   Expression wrapUnresolvedTargetInvocation(
       Expression desugared, Arguments arguments, int charOffset) {
+    if (legacyMode) return desugared;
     return shadow.SyntheticWrapper.wrapUnresolvedTargetInvocation(
         desugared, arguments)
       ..fileOffset = charOffset;
@@ -4794,6 +4945,7 @@
   @override
   Expression wrapUnresolvedVariableAssignment(
       Expression desugared, bool isCompound, Expression rhs, int charOffset) {
+    if (legacyMode) return desugared;
     return shadow.SyntheticWrapper.wrapUnresolvedVariableAssignment(
         desugared, isCompound, rhs)
       ..fileOffset = charOffset;
@@ -5036,7 +5188,7 @@
     statement.parent = body;
     return body;
   } else {
-    return new Block(<Statement>[statement, body])
+    return new BlockJudgment(<Statement>[statement, body])
       ..fileOffset = statement.fileOffset;
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
new file mode 100644
index 0000000..61fe4bd
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
@@ -0,0 +1,457 @@
+// 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 fasta.class_hierarchy_builder;
+
+import 'package:kernel/ast.dart'
+    show Library, Member, Name, Procedure, ProcedureKind;
+
+import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
+
+import '../messages.dart'
+    show
+        LocatedMessage,
+        messageDeclaredMemberConflictsWithInheritedMember,
+        messageDeclaredMemberConflictsWithInheritedMemberCause,
+        messageInheritedMembersConflict,
+        messageInheritedMembersConflictCause1,
+        messageInheritedMembersConflictCause2,
+        templateMissingImplementationCause,
+        templateMissingImplementationNotAbstract;
+
+import '../names.dart' show noSuchMethodName;
+
+import '../scope.dart' show Scope;
+
+import 'kernel_builder.dart'
+    show
+        Declaration,
+        LibraryBuilder,
+        KernelClassBuilder,
+        KernelNamedTypeBuilder,
+        KernelTypeBuilder;
+
+int compareDeclarations(Declaration a, Declaration b) {
+  return ClassHierarchy.compareMembers(a.target, b.target);
+}
+
+ProcedureKind memberKind(Member member) {
+  return member is Procedure ? member.kind : null;
+}
+
+bool isNameVisibleIn(
+    Name name, LibraryBuilder<KernelTypeBuilder, Library> library) {
+  return !name.isPrivate || name.library == library.target;
+}
+
+class ClassHierarchyBuilder {
+  final Map<KernelClassBuilder, ClassHierarchyNode> nodes =
+      <KernelClassBuilder, ClassHierarchyNode>{};
+
+  final KernelClassBuilder objectClass;
+
+  bool hasNoSuchMethod = false;
+
+  int abstractMemberCount = 0;
+
+  ClassHierarchyBuilder(this.objectClass);
+
+  Declaration handleOverride(KernelClassBuilder cls, Declaration member,
+      Declaration superMember, MergeKind mergeKind) {
+    if (member.next != null || superMember.next != null) {
+      // Don't check overrides involving duplicated members.
+      return member;
+    }
+    Member target = member.target;
+    Member superTarget = superMember.target;
+    if ((memberKind(target) ?? ProcedureKind.Getter) !=
+        (memberKind(superTarget) ?? ProcedureKind.Getter)) {
+      String name = member.fullNameForErrors;
+      if (mergeKind == MergeKind.interfaces) {
+        cls.addProblem(messageInheritedMembersConflict, cls.charOffset,
+            cls.fullNameForErrors.length,
+            context: <LocatedMessage>[
+              messageInheritedMembersConflictCause1.withLocation(
+                  member.fileUri, member.charOffset, name.length),
+              messageInheritedMembersConflictCause2.withLocation(
+                  superMember.fileUri, superMember.charOffset, name.length),
+            ]);
+      } else {
+        cls.addProblem(messageDeclaredMemberConflictsWithInheritedMember,
+            member.charOffset, name.length,
+            context: <LocatedMessage>[
+              messageDeclaredMemberConflictsWithInheritedMemberCause
+                  .withLocation(
+                      superMember.fileUri, superMember.charOffset, name.length)
+            ]);
+      }
+    }
+    if (target.name == noSuchMethodName && !target.isAbstract) {
+      hasNoSuchMethod = true;
+    }
+    Declaration result = member;
+    if (mergeKind == MergeKind.interfaces) {
+      // TODO(ahe): Combine the signatures of member and superMember.
+    } else if (target.isAbstract) {
+      if (!superTarget.isAbstract) {
+        // An abstract method doesn't override an implemention inherited from a
+        // superclass.
+        result = superMember;
+      } else {
+        abstractMemberCount++;
+      }
+    }
+    return result;
+  }
+
+  void handleNewMember(Declaration member, MergeKind mergeKind) {
+    Member target = member.target;
+    if (mergeKind == MergeKind.superclass && target.isAbstract) {
+      abstractMemberCount++;
+    }
+  }
+
+  void handleInheritance(
+      KernelClassBuilder cls, Declaration member, MergeKind mergeKind) {
+    Member target = member.target;
+    if (mergeKind == MergeKind.superclass && target.isAbstract) {
+      if (isNameVisibleIn(target.name, cls.library)) {
+        abstractMemberCount++;
+      }
+    }
+    if (member.parent != objectClass &&
+        target.name == noSuchMethodName &&
+        !target.isAbstract) {
+      hasNoSuchMethod = true;
+    }
+  }
+
+  void add(KernelClassBuilder cls) {
+    if (cls.isPatch) {
+      // TODO(ahe): What about patch classes. Have we injected patched members
+      // into the class-builder's scope?
+      return;
+    }
+    ClassHierarchyNode supernode;
+    if (objectClass != cls) {
+      supernode = getNode(cls.supertype);
+      if (supernode == null) {
+        supernode = nodes[objectClass];
+        if (supernode == null) {
+          add(objectClass);
+          supernode = nodes[objectClass];
+        }
+      }
+      assert(supernode != null);
+    }
+
+    Scope scope = cls.scope;
+    if (cls.isMixinApplication) {
+      Declaration mixin = getDeclaration(cls.mixedInType);
+      if (mixin is KernelClassBuilder) {
+        scope = mixin.scope;
+      }
+    }
+    List<Declaration> sortedLocals =
+        new List<Declaration>.from(scope.local.values)
+          ..sort(compareDeclarations);
+    List<Declaration> sortedSetters =
+        new List<Declaration>.from(scope.setters.values)
+          ..sort(compareDeclarations);
+    List<Declaration> allMembers;
+    List<Declaration> allSetters;
+    List<Declaration> interfaceMembers;
+    List<Declaration> interfaceSetters;
+    if (supernode == null) {
+      // This should be Object.
+      interfaceMembers = allMembers = sortedLocals;
+      interfaceSetters = allSetters = sortedSetters;
+    } else {
+      allMembers = merge(
+          cls, sortedLocals, supernode.classMembers, MergeKind.superclass);
+      allSetters = merge(
+          cls, sortedSetters, supernode.classSetters, MergeKind.superclass);
+      List<KernelTypeBuilder> interfaces = cls.interfaces;
+      if (interfaces != null) {
+        MergeResult result = mergeInterfaces(cls, supernode, interfaces);
+        interfaceMembers = result.mergedMembers;
+        interfaceSetters = result.mergedSetters;
+      } else {
+        interfaceMembers = allMembers;
+        interfaceSetters = allSetters;
+      }
+    }
+    nodes[cls] = new ClassHierarchyNode(
+        cls, scope, allMembers, allSetters, interfaceMembers, interfaceSetters);
+    mergeAccessors(cls, allMembers, allSetters);
+
+    if (abstractMemberCount != 0 && !cls.isAbstract) {
+      if (!hasNoSuchMethod) {
+        reportMissingMembers(cls, allMembers, allSetters);
+      }
+      installNsmHandlers(cls);
+    }
+    hasNoSuchMethod = false;
+    abstractMemberCount = 0;
+  }
+
+  MergeResult mergeInterfaces(KernelClassBuilder cls,
+      ClassHierarchyNode supernode, List<KernelTypeBuilder> interfaces) {
+    List<List<Declaration>> memberLists =
+        List<List<Declaration>>(interfaces.length + 1);
+    List<List<Declaration>> setterLists =
+        List<List<Declaration>>(interfaces.length + 1);
+    memberLists[0] = supernode.interfaceMembers;
+    setterLists[0] = supernode.interfaceSetters;
+    for (int i = 0; i < interfaces.length; i++) {
+      ClassHierarchyNode interfaceNode = getNode(interfaces[i]);
+      if (interfaceNode == null) {
+        memberLists[i + 1] = <Declaration>[];
+        setterLists[i + 1] = <Declaration>[];
+      } else {
+        memberLists[i + 1] = interfaceNode.interfaceMembers;
+        setterLists[i + 1] = interfaceNode.interfaceSetters;
+      }
+    }
+    return new MergeResult(
+        mergeLists(cls, memberLists), mergeLists(cls, setterLists));
+  }
+
+  List<Declaration> mergeLists(
+      KernelClassBuilder cls, List<List<Declaration>> input) {
+    // This is a k-way merge sort (where k is `input.length + 1`). We merge the
+    // lists pairwise, which reduces the number of lists to merge by half on
+    // each iteration. Consequently, we perform O(log k) merges.
+    while (input.length > 1) {
+      List<List<Declaration>> output = <List<Declaration>>[];
+      for (int i = 0; i < input.length - 1; i += 2) {
+        output.add(merge(cls, input[i], input[i + 1], MergeKind.interfaces));
+      }
+      if (input.length.isOdd) {
+        output.add(input.last);
+      }
+      input = output;
+    }
+    return input.single;
+  }
+
+  /// Merge [and check] accessors. This entails removing setters corresponding
+  /// to fields, and checking that setters don't override regular methods.
+  void mergeAccessors(KernelClassBuilder cls, List<Declaration> allMembers,
+      List<Declaration> allSetters) {
+    List<Declaration> overriddenSetters;
+    int i = 0;
+    int j = 0;
+    while (i < allMembers.length && j < allSetters.length) {
+      Declaration member = allMembers[i];
+      Declaration setter = allSetters[j];
+      final int compare = compareDeclarations(member, setter);
+      if (compare == 0) {
+        if (member.isField) {
+          // TODO(ahe): What happens if we have both a field and a setter
+          // declared in the same class?
+          if (!member.isFinal && !member.isConst) {
+            // The field overrides the setter.
+            (overriddenSetters ??= <Declaration>[]).add(setter);
+            Member target = setter.target;
+            if (target.isAbstract) {
+              abstractMemberCount--;
+            }
+          }
+        } else if (!member.isGetter) {
+          String name = member.fullNameForErrors;
+          cls.library.addProblem(
+              messageDeclaredMemberConflictsWithInheritedMember,
+              member.charOffset,
+              name.length,
+              member.fileUri,
+              context: <LocatedMessage>[
+                messageDeclaredMemberConflictsWithInheritedMemberCause
+                    .withLocation(
+                        setter.fileUri, setter.charOffset, name.length)
+              ]);
+        }
+        i++;
+        j++;
+      } else if (compare < 0) {
+        i++;
+      } else {
+        j++;
+      }
+    }
+    // One of of the two lists is now exhausted. What remains in the other list
+    // cannot be a conflict.
+
+    if (overriddenSetters != null) {
+      // Remove [overriddenSetters] from [allSetters] by copying [allSetters]
+      // to itself.
+      int i = 0;
+      int j = 0;
+      int storeIndex = 0;
+      while (i < allSetters.length && j < overriddenSetters.length) {
+        if (allSetters[i] == overriddenSetters[j]) {
+          i++;
+          j++;
+        } else {
+          allSetters[storeIndex++] = allSetters[i++];
+        }
+      }
+      while (i < allSetters.length) {
+        allSetters[storeIndex++] = allSetters[i++];
+      }
+      allSetters.length = storeIndex;
+    }
+  }
+
+  void reportMissingMembers(KernelClassBuilder cls,
+      List<Declaration> allMembers, List<Declaration> allSetters) {
+    List<LocatedMessage> context = <LocatedMessage>[];
+    List<String> missingNames = <String>[];
+    for (int j = 0; j < 2; j++) {
+      List<Declaration> members = j == 0 ? allMembers : allSetters;
+      for (int i = 0; i < members.length; i++) {
+        Declaration declaration = members[i];
+        Member target = declaration.target;
+        if (target.isAbstract && isNameVisibleIn(target.name, cls.library)) {
+          String name = declaration.fullNameForErrors;
+          String parentName = declaration.parent.fullNameForErrors;
+          String displayName =
+              declaration.isSetter ? "$parentName.$name=" : "$parentName.$name";
+          missingNames.add(displayName);
+          context.add(templateMissingImplementationCause
+              .withArguments(displayName)
+              .withLocation(
+                  declaration.fileUri, declaration.charOffset, name.length));
+        }
+      }
+    }
+    cls.addProblem(
+        templateMissingImplementationNotAbstract.withArguments(
+            cls.fullNameForErrors, missingNames),
+        cls.charOffset,
+        cls.fullNameForErrors.length,
+        context: context);
+  }
+
+  void installNsmHandlers(KernelClassBuilder cls) {
+    // TOOD(ahe): Implement this.
+  }
+
+  ClassHierarchyNode getNode(KernelTypeBuilder type) {
+    if (type is KernelNamedTypeBuilder) {
+      Declaration declaration = type.declaration;
+      if (declaration is KernelClassBuilder) {
+        ClassHierarchyNode node = nodes[declaration];
+        if (node == null && declaration is KernelClassBuilder) {
+          add(declaration);
+          node = nodes[declaration];
+        }
+        return node;
+      }
+    }
+    return null;
+  }
+
+  Declaration getDeclaration(KernelTypeBuilder type) {
+    return type is KernelNamedTypeBuilder ? type.declaration : null;
+  }
+
+  List<Declaration> merge(
+      KernelClassBuilder cls,
+      List<Declaration> localMembers,
+      List<Declaration> superMembers,
+      MergeKind mergeKind) {
+    final List<Declaration> mergedMembers = new List<Declaration>.filled(
+        localMembers.length + superMembers.length, null,
+        growable: true);
+
+    int mergedMemberCount = 0;
+
+    int i = 0;
+    int j = 0;
+    while (i < localMembers.length && j < superMembers.length) {
+      final Declaration localMember = localMembers[i];
+      final Declaration superMember = superMembers[j];
+      final int compare = compareDeclarations(localMember, superMember);
+      if (compare == 0) {
+        mergedMembers[mergedMemberCount++] =
+            handleOverride(cls, localMember, superMember, mergeKind);
+        i++;
+        j++;
+      } else if (compare < 0) {
+        handleNewMember(localMember, mergeKind);
+        mergedMembers[mergedMemberCount++] = localMember;
+        i++;
+      } else {
+        handleInheritance(cls, superMember, mergeKind);
+        mergedMembers[mergedMemberCount++] = superMember;
+        j++;
+      }
+    }
+    while (i < localMembers.length) {
+      final Declaration localMember = localMembers[i];
+      handleNewMember(localMember, mergeKind);
+      mergedMembers[mergedMemberCount++] = localMember;
+      i++;
+    }
+    while (j < superMembers.length) {
+      final Declaration superMember = superMembers[j];
+      handleInheritance(cls, superMember, mergeKind);
+      mergedMembers[mergedMemberCount++] = superMember;
+      j++;
+    }
+    return mergedMembers..length = mergedMemberCount;
+  }
+}
+
+class ClassHierarchyNode {
+  /// The class corresponding to this hierarchy node.
+  final KernelClassBuilder cls;
+
+  /// The local members of [cls]. For regular classes, this is simply
+  /// `cls.scope`, but for mixin-applications this is the mixed-in type's
+  /// scope. The members are sorted in order of declaration.
+  // TODO(ahe): Do we need to copy the scope from the mixed-in type to remove
+  // static members?
+  final Scope localMembers;
+
+  /// All the members of this class including [classMembers] of its
+  /// superclasses. The members are sorted by [compareDeclarations].
+  final List<Declaration> classMembers;
+
+  /// Similar to [classMembers] but for setters.
+  final List<Declaration> classSetters;
+
+  /// All the interface members of this class including [interfaceMembers] of
+  /// its supertypes. The members are sorted by [compareDeclarations].
+  ///
+  /// In addition to the members of [classMembers] this also contains members
+  /// from interfaces.
+  final List<Declaration> interfaceMembers;
+
+  /// Similar to [interfaceMembers] but for setters.
+  final List<Declaration> interfaceSetters;
+
+  ClassHierarchyNode(this.cls, this.localMembers, this.classMembers,
+      this.classSetters, this.interfaceMembers, this.interfaceSetters);
+}
+
+class MergeResult {
+  final List<Declaration> mergedMembers;
+
+  final List<Declaration> mergedSetters;
+
+  MergeResult(this.mergedMembers, this.mergedSetters);
+}
+
+enum MergeKind {
+  /// Merging superclass members with the current class.
+  superclass,
+
+  /// Merging two interfaces.
+  interfaces,
+
+  /// Merging class members with interface members.
+  supertypes,
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
index 584d978..8c28085 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator_helper.dart
@@ -57,6 +57,8 @@
 
   Forest get forest;
 
+  bool get legacyMode;
+
   Constructor lookupConstructor(Name name, {bool isSuper});
 
   Expression toValue(node);
diff --git a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
index dc3d66a..412bc68 100644
--- a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
@@ -14,6 +14,7 @@
         AwaitExpression,
         Block,
         BoolLiteral,
+        BreakStatement,
         Catch,
         CheckLibraryIsLoaded,
         ConditionalExpression,
@@ -23,6 +24,7 @@
         ExpressionStatement,
         InvalidExpression,
         IsExpression,
+        LabeledStatement,
         Let,
         LibraryDependency,
         LogicalExpression,
@@ -80,9 +82,7 @@
         AssertInitializerJudgment,
         AssertStatementJudgment,
         BlockJudgment,
-        BreakJudgment,
         CatchJudgment,
-        ContinueJudgment,
         DoJudgment,
         DoubleJudgment,
         EmptyStatementJudgment,
@@ -90,12 +90,11 @@
         ForJudgment,
         IfJudgment,
         IntJudgment,
-        LabeledStatementJudgment,
         ListLiteralJudgment,
         LoadLibraryJudgment,
-        MapEntryJudgment,
         MapLiteralJudgment,
         ReturnJudgment,
+        SetLiteralJudgment,
         ShadowLargeIntLiteral,
         SymbolLiteralJudgment,
         SyntheticExpressionJudgment,
@@ -194,20 +193,36 @@
   }
 
   @override
+  SetLiteralJudgment literalSet(
+      Token constKeyword,
+      bool isConst,
+      Object typeArgument,
+      Object typeArguments,
+      Token leftBrace,
+      List<Expression> expressions,
+      Token rightBrace) {
+    // TODO(brianwilkerson): The file offset computed below will not be correct
+    // if there are type arguments but no `const` keyword.
+    return new SetLiteralJudgment(expressions,
+        typeArgument: typeArgument, isConst: isConst)
+      ..fileOffset = offsetForToken(constKeyword ?? leftBrace);
+  }
+
+  @override
   MapLiteralJudgment literalMap(
       Token constKeyword,
       bool isConst,
       DartType keyType,
       DartType valueType,
       Object typeArguments,
-      Token leftBracket,
+      Token leftBrace,
       List<MapEntry> entries,
-      Token rightBracket) {
+      Token rightBrace) {
     // TODO(brianwilkerson): The file offset computed below will not be correct
     // if there are type arguments but no `const` keyword.
     return new MapLiteralJudgment(entries,
         keyType: keyType, valueType: valueType, isConst: isConst)
-      ..fileOffset = offsetForToken(constKeyword ?? leftBracket);
+      ..fileOffset = offsetForToken(constKeyword ?? leftBrace);
   }
 
   @override
@@ -237,7 +252,7 @@
 
   @override
   MapEntry mapEntry(Expression key, Token colon, Expression value) {
-    return new MapEntryJudgment(key, value)..fileOffset = offsetForToken(colon);
+    return new MapEntry(key, value)..fileOffset = offsetForToken(colon);
   }
 
   @override
@@ -336,7 +351,7 @@
 
   @override
   Statement breakStatement(Token breakKeyword, Object label, Token semicolon) {
-    return new BreakJudgment(null)..fileOffset = breakKeyword.charOffset;
+    return new BreakStatement(null)..fileOffset = breakKeyword.charOffset;
   }
 
   @override
@@ -364,7 +379,7 @@
   @override
   Statement continueStatement(
       Token continueKeyword, Object label, Token semicolon) {
-    return new ContinueJudgment(null)..fileOffset = continueKeyword.charOffset;
+    return new BreakStatement(null)..fileOffset = continueKeyword.charOffset;
   }
 
   @override
@@ -386,16 +401,14 @@
   Statement forStatement(
       Token forKeyword,
       Token leftParenthesis,
-      List<VariableDeclaration> variableList,
-      List<Expression> initializers,
+      List<VariableDeclaration> variables,
       Token leftSeparator,
       Expression condition,
       Statement conditionStatement,
       List<Expression> updaters,
       Token rightParenthesis,
       Statement body) {
-    return new ForJudgment(
-        variableList, initializers, condition, updaters, body)
+    return new ForJudgment(variables, condition, updaters, body)
       ..fileOffset = forKeyword.charOffset;
   }
 
@@ -462,7 +475,7 @@
 
   @override
   Statement syntheticLabeledStatement(Statement statement) {
-    return new LabeledStatementJudgment(statement);
+    return new LabeledStatement(statement);
   }
 
   @override
@@ -481,10 +494,14 @@
   @override
   Statement tryStatement(Token tryKeyword, Statement body,
       List<Catch> catchClauses, Token finallyKeyword, Statement finallyBlock) {
-    if (finallyBlock != null) {
-      return new TryFinallyJudgment(body, catchClauses, finallyBlock);
+    Statement result = body;
+    if (catchClauses != null) {
+      result = new TryCatchJudgment(result, catchClauses);
     }
-    return new TryCatchJudgment(body, catchClauses ?? const <CatchJudgment>[]);
+    if (finallyBlock != null) {
+      result = new TryFinallyJudgment(result, finallyBlock);
+    }
+    return result;
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index a7ab83b..2ec0e2c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -111,6 +111,26 @@
       List<Expression> expressions,
       Token rightBracket);
 
+  /// Return a representation of a set literal. The [constKeyword] is the
+  /// location of the `const` keyword, or `null` if there is no keyword. The
+  /// [isConst] is `true` if the literal is either explicitly or implicitly a
+  /// constant. The [typeArgument] is the representation of the single valid
+  /// type argument preceding the set literal, or `null` if there is no type
+  /// argument, there is more than one type argument, or if the type argument
+  /// cannot be resolved. The [typeArguments] is the representation of all of
+  /// the type arguments preceding the set literal, or `null` if there are no
+  /// type arguments. The [leftBrace] is the location of the `{`. The list of
+  /// [expressions] is a list of the representations of the set elements. The
+  /// [rightBrace] is the location of the `}`.
+  Expression literalSet(
+      Token constKeyword,
+      bool isConst,
+      Object typeArgument,
+      Object typeArguments,
+      Token leftBrace,
+      List<Expression> expressions,
+      Token rightBrace);
+
   /// Return a representation of a map literal. The [constKeyword] is the
   /// location of the `const` keyword, or `null` if there is no keyword. The
   /// [isConst] is `true` if the literal is either explicitly or implicitly a
@@ -121,18 +141,18 @@
   /// the map literal, or `null` if there are not exactly two type arguments or
   /// if the second type argument cannot be resolved. The [typeArguments] is the
   /// representation of all of the type arguments preceding the map literal, or
-  /// `null` if there are no type arguments. The [leftBracket] is the location
+  /// `null` if there are no type arguments. The [leftBrace] is the location
   /// of the `{`. The list of [entries] is a list of the representations of the
-  /// map entries. The [rightBracket] is the location of the `}`.
+  /// map entries. The [rightBrace] is the location of the `}`.
   Expression literalMap(
       Token constKeyword,
       bool isConst,
       DartType keyType,
       DartType valueType,
       Object typeArguments,
-      Token leftBracket,
+      Token leftBrace,
       List<MapEntry> entries,
-      Token rightBracket);
+      Token rightBrace);
 
   /// Return a representation of a null literal at the given [location].
   Expression literalNull(Token location);
@@ -226,8 +246,7 @@
   Statement forStatement(
       Token forKeyword,
       Token leftParenthesis,
-      List<VariableDeclaration> variableList,
-      List<Expression> initializers,
+      List<VariableDeclaration> variables,
       Token leftSeparator,
       Expression condition,
       Statement conditionStatement,
diff --git a/pkg/front_end/lib/src/fasta/kernel/implicit_type.dart b/pkg/front_end/lib/src/fasta/kernel/implicit_type.dart
new file mode 100644
index 0000000..218438d
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/implicit_type.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.implicit_type;
+
+import 'package:kernel/ast.dart'
+    show DartType, DartTypeVisitor, DartTypeVisitor1, Visitor;
+
+import '../../scanner/token.dart' show Token;
+
+import '../problems.dart' show unsupported;
+
+import 'kernel_builder.dart' show MemberBuilder;
+
+class ImplicitType extends DartType {
+  final MemberBuilder member;
+  final Token initializerToken;
+
+  const ImplicitType(this.member, this.initializerToken);
+
+  accept(DartTypeVisitor<Object> v) {
+    unsupported("accept", member.charOffset, member.fileUri);
+  }
+
+  accept1(DartTypeVisitor1<Object, Object> v, arg) {
+    unsupported("accept1", member.charOffset, member.fileUri);
+  }
+
+  visitChildren(Visitor<Object> v) {
+    unsupported("visitChildren", member.charOffset, member.fileUri);
+  }
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/implicit_type_argument.dart b/pkg/front_end/lib/src/fasta/kernel/implicit_type_argument.dart
new file mode 100644
index 0000000..7195bac
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/implicit_type_argument.dart
@@ -0,0 +1,34 @@
+// 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.
+
+library fasta.implicit_type_argument;
+
+import 'package:kernel/ast.dart'
+    show DartType, DartTypeVisitor, DartTypeVisitor1, Visitor;
+
+import '../problems.dart' show unhandled;
+
+/// Marker type used as type argument on list, set and map literals whenever
+/// type arguments are omitted in the source.
+///
+/// All of these types are replaced by the type inference. It is an internal
+/// error if one survives to the final output.
+class ImplicitTypeArgument extends DartType {
+  const ImplicitTypeArgument();
+
+  @override
+  accept(DartTypeVisitor<Object> v) {
+    unhandled("$runtimeType", "${v.runtimeType}", -1, null);
+  }
+
+  @override
+  accept1(DartTypeVisitor1<Object, Object> v, arg) {
+    unhandled("$runtimeType", "${v.runtimeType}", -1, null);
+  }
+
+  @override
+  visitChildren(Visitor<Object> v) {
+    unhandled("$runtimeType", "${v.runtimeType}", -1, null);
+  }
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 755d2a0..08834e4 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -16,7 +16,7 @@
   }
 
   @override
-  void defaultStatement(Statement node, DartType _) {
+  void defaultStatement(Statement node, _) {
     unhandled("${node.runtimeType}", "InferenceVistor", node.fileOffset,
         inferrer.helper.uri);
   }
@@ -80,20 +80,15 @@
   @override
   void visitBoolLiteral(BoolLiteral node, DartType typeContext) {}
 
-  void visitBreakJudgment(BreakJudgment node) {
-    // No inference needs to be done.
-  }
-
-  void visitContinueJudgment(ContinueJudgment node) {
+  @override
+  void visitBreakStatement(BreakStatement node, _) {
     // No inference needs to be done.
   }
 
   void visitCascadeJudgment(CascadeJudgment node, DartType typeContext) {
     node.inferredType =
         inferrer.inferExpression(node.targetJudgment, typeContext, true);
-    if (!inferrer.legacyMode) {
-      node.variable.type = getInferredType(node, inferrer);
-    }
+    node.variable.type = getInferredType(node, inferrer);
     for (var judgment in node.cascadeJudgments) {
       inferrer.inferExpression(
           judgment, const UnknownType(), !inferrer.isTopLevel,
@@ -120,9 +115,7 @@
     DartType inferredType = inferrer.typeSchemaEnvironment
         .getStandardUpperBound(getInferredType(then, inferrer),
             getInferredType(otherwise, inferrer));
-    if (!inferrer.legacyMode) {
-      node.staticType = inferredType;
-    }
+    node.staticType = inferredType;
   }
 
   @override
@@ -195,7 +188,7 @@
 
   void visitDoJudgment(DoJudgment node) {
     var conditionJudgment = node.conditionJudgment;
-    inferrer.inferStatement(node.bodyJudgment);
+    inferrer.inferStatement(node.body);
     var boolType = inferrer.coreTypes.boolClass.rawType;
     inferrer.inferExpression(conditionJudgment, boolType, !inferrer.isTopLevel);
     inferrer.ensureAssignable(
@@ -247,46 +240,60 @@
         node.field.type, initializerType, node.value, node.fileOffset);
   }
 
-  void visitForInJudgment(ForInJudgment node) {
-    var iterableClass = node.isAsync
-        ? inferrer.coreTypes.streamClass
-        : inferrer.coreTypes.iterableClass;
-    DartType context;
+  void handleForInStatementDeclaringVariable(ForInStatement node) {
+    DartType elementType;
     bool typeNeeded = false;
     bool typeChecksNeeded = !inferrer.isTopLevel;
-    VariableDeclarationJudgment variable;
-    var syntheticAssignment = node._syntheticAssignment;
-    DartType syntheticWriteType;
-    if (node._declaresVariable) {
-      variable = node.variableJudgment;
-      if (!inferrer.legacyMode && variable._implicitlyTyped) {
-        typeNeeded = true;
-        context = const UnknownType();
-      } else {
-        context = variable.type;
-      }
-    } else if (syntheticAssignment is ComplexAssignmentJudgment) {
-      syntheticWriteType =
-          context = syntheticAssignment._getWriteType(inferrer);
+    final VariableDeclaration variable = node.variable;
+    if (VariableDeclarationJudgment.isImplicitlyTyped(variable)) {
+      typeNeeded = true;
+      elementType = const UnknownType();
     } else {
-      context = const UnknownType();
+      elementType = variable.type;
     }
-    context = inferrer.wrapType(context, iterableClass);
 
-    var iterableJudgment = node.iterableJudgment;
-    inferrer.inferExpression(
-        iterableJudgment, context, typeNeeded || typeChecksNeeded);
-    var inferredExpressionType = inferrer
-        .resolveTypeParameter(getInferredType(iterableJudgment, inferrer));
+    DartType inferredType =
+        inferForInIterable(node, elementType, typeNeeded || typeChecksNeeded);
+    if (typeNeeded) {
+      inferrer.instrumentation?.record(inferrer.uri, variable.fileOffset,
+          'type', new InstrumentationValueForType(inferredType));
+      variable.type = inferredType;
+    }
+
+    inferrer.inferStatement(node.body);
+
+    VariableDeclaration tempVar =
+        new VariableDeclaration(null, type: inferredType, isFinal: true);
+    VariableGet variableGet = new VariableGet(tempVar)
+      ..fileOffset = variable.fileOffset;
+    Expression implicitDowncast = inferrer.ensureAssignable(
+        variable.type, inferredType, variableGet, node.fileOffset,
+        template: templateForInLoopElementTypeNotAssignable);
+    if (implicitDowncast != null) {
+      node.variable = tempVar..parent = node;
+      variable.initializer = implicitDowncast..parent = variable;
+      node.body = combineStatements(variable, node.body)..parent = node;
+    }
+  }
+
+  DartType inferForInIterable(
+      ForInStatement node, DartType elementType, bool typeNeeded) {
+    Class iterableClass = node.isAsync
+        ? inferrer.coreTypes.streamClass
+        : inferrer.coreTypes.iterableClass;
+    DartType context = inferrer.wrapType(elementType, iterableClass);
+    Expression iterable = node.iterable;
+    inferrer.inferExpression(iterable, context, typeNeeded);
+    DartType inferredExpressionType =
+        inferrer.resolveTypeParameter(getInferredType(iterable, inferrer));
     inferrer.ensureAssignable(
         inferrer.wrapType(const DynamicType(), iterableClass),
         inferredExpressionType,
         node.iterable,
         node.iterable.fileOffset,
         template: templateForInLoopTypeNotIterable);
-
     DartType inferredType;
-    if (typeNeeded || typeChecksNeeded) {
+    if (typeNeeded) {
       inferredType = const DynamicType();
       if (inferredExpressionType is InterfaceType) {
         InterfaceType supertype = inferrer.classHierarchy
@@ -295,66 +302,87 @@
           inferredType = supertype.typeArguments[0];
         }
       }
-      if (typeNeeded) {
-        inferrer.instrumentation?.record(inferrer.uri, variable.fileOffset,
-            'type', new InstrumentationValueForType(inferredType));
-        variable.type = inferredType;
+    }
+    return inferredType;
+  }
+
+  void handleForInStatementWithoutVariable(ForInStatement node) {
+    DartType elementType;
+    bool typeChecksNeeded = !inferrer.isTopLevel;
+    DartType syntheticWriteType;
+    Expression syntheticAssignment;
+    Block block = node.body;
+    ExpressionStatement statement = block.statements[0];
+    SyntheticExpressionJudgment judgment = statement.expression;
+    Expression rhs;
+    syntheticAssignment = judgment.desugared;
+    if (syntheticAssignment is VariableSet) {
+      syntheticWriteType = elementType = syntheticAssignment.variable.type;
+      rhs = syntheticAssignment.value;
+    } else if (syntheticAssignment is PropertySet ||
+        syntheticAssignment is SuperPropertySet) {
+      DartType receiverType = inferrer.thisType;
+      Object writeMember =
+          inferrer.findPropertySetMember(receiverType, syntheticAssignment);
+      syntheticWriteType =
+          elementType = inferrer.getSetterType(writeMember, receiverType);
+      if (syntheticAssignment is PropertySet) {
+        rhs = syntheticAssignment.value;
+      } else if (syntheticAssignment is SuperPropertySet) {
+        rhs = syntheticAssignment.value;
       }
-      if (!node._declaresVariable) {
-        node.variable.type = inferredType;
-      }
+    } else if (syntheticAssignment is StaticSet) {
+      syntheticWriteType = elementType = syntheticAssignment.target.setterType;
+      rhs = syntheticAssignment.value;
+    } else if (syntheticAssignment is InvalidExpression) {
+      elementType = const UnknownType();
+    } else {
+      unhandled(
+          "${syntheticAssignment.runtimeType}",
+          "handleForInStatementWithoutVariable",
+          syntheticAssignment.fileOffset,
+          inferrer.helper.uri);
     }
 
-    inferrer.inferStatement(node.bodyJudgment);
-    if (syntheticAssignment != null) {
-      var syntheticStatement = new ExpressionStatement(syntheticAssignment);
-      node.body = combineStatements(syntheticStatement, node.body)
-        ..parent = node;
+    DartType inferredType =
+        inferForInIterable(node, elementType, typeChecksNeeded);
+    if (typeChecksNeeded) {
+      node.variable.type = inferredType;
     }
-    if (node._declaresVariable) {
-      var tempVar =
-          new VariableDeclaration(null, type: inferredType, isFinal: true);
-      var variableGet = new VariableGet(tempVar)
-        ..fileOffset = node.variable.fileOffset;
-      var implicitDowncast = inferrer.ensureAssignable(
-          variable.type, inferredType, variableGet, node.fileOffset,
-          template: templateForInLoopElementTypeNotAssignable);
-      if (implicitDowncast != null) {
-        node.variable = tempVar..parent = node;
-        variable.initializer = implicitDowncast..parent = variable;
-        node.body = combineStatements(variable, node.body)..parent = node;
-      }
-    } else if (syntheticAssignment is SyntheticExpressionJudgment) {
-      if (syntheticAssignment is ComplexAssignmentJudgment) {
-        inferrer.ensureAssignable(
-            greatestClosure(inferrer.coreTypes, syntheticWriteType),
-            node.variable.type,
-            syntheticAssignment.rhs,
-            syntheticAssignment.rhs.fileOffset,
-            template: templateForInLoopElementTypeNotAssignable,
-            isVoidAllowed: true);
-        if (syntheticAssignment is PropertyAssignmentJudgment) {
-          syntheticAssignment._handleWriteContravariance(
-              inferrer, inferrer.thisType);
-        }
-      }
-      syntheticAssignment._replaceWithDesugared();
+
+    inferrer.inferStatement(node.body);
+
+    if (syntheticWriteType != null) {
+      inferrer.ensureAssignable(
+          greatestClosure(inferrer.coreTypes, syntheticWriteType),
+          node.variable.type,
+          rhs,
+          rhs.fileOffset,
+          template: templateForInLoopElementTypeNotAssignable,
+          isVoidAllowed: true);
+    }
+  }
+
+  @override
+  void visitForInStatement(ForInStatement node, _) {
+    if (node.variable.name == null) {
+      handleForInStatementWithoutVariable(node);
+    } else {
+      handleForInStatementDeclaringVariable(node);
     }
   }
 
   void visitForJudgment(ForJudgment node) {
-    var initializers = node.initializers;
     var conditionJudgment = node.conditionJudgment;
-    if (initializers != null) {
-      for (var initializer in initializers) {
-        node.variables
-            .add(new VariableDeclaration.forValue(initializer)..parent = node);
-        inferrer.inferExpression(
-            initializer, const UnknownType(), !inferrer.isTopLevel,
-            isVoidAllowed: true);
-      }
-    } else {
-      for (var variable in node.variableJudgments) {
+    for (VariableDeclaration variable in node.variables) {
+      if (variable.name == null) {
+        Expression initializer = variable.initializer;
+        if (initializer != null) {
+          variable.type = inferrer.inferExpression(
+              initializer, const UnknownType(), true,
+              isVoidAllowed: true);
+        }
+      } else {
         inferrer.inferStatement(variable);
       }
     }
@@ -373,7 +401,7 @@
           update, const UnknownType(), !inferrer.isTopLevel,
           isVoidAllowed: true);
     }
-    inferrer.inferStatement(node.bodyJudgment);
+    inferrer.inferStatement(node.body);
   }
 
   ExpressionInferenceResult visitFunctionNodeJudgment(
@@ -387,9 +415,8 @@
 
   void visitFunctionDeclarationJudgment(FunctionDeclarationJudgment node) {
     inferrer.inferMetadataKeepingHelper(node.variable.annotations);
-    DartType returnContext = node._hasImplicitReturnType
-        ? (inferrer.legacyMode ? const DynamicType() : null)
-        : node.function.returnType;
+    DartType returnContext =
+        node._hasImplicitReturnType ? null : node.function.returnType;
     var inferenceResult = visitFunctionNodeJudgment(
         node.functionJudgment, null, returnContext, node.fileOffset);
     node.variable.type = inferenceResult.type;
@@ -424,9 +451,7 @@
     // - Infer e0 in context K to get T0
     inferrer.inferExpression(leftJudgment, typeContext, true);
     var lhsType = getInferredType(leftJudgment, inferrer);
-    if (!inferrer.legacyMode) {
-      node.variable.type = lhsType;
-    }
+    node.variable.type = lhsType;
     // - Let J = T0 if K is `?` else K.
     // - Infer e1 in context J to get T1
     if (typeContext is UnknownType) {
@@ -442,9 +467,7 @@
     // - Then the inferred type is T.
     node.inferredType =
         inferrer.typeSchemaEnvironment.getStandardUpperBound(lhsType, rhsType);
-    if (!inferrer.legacyMode) {
-      node.body.staticType = getInferredType(node, inferrer);
-    }
+    node.body.staticType = getInferredType(node, inferrer);
     return null;
   }
 
@@ -458,9 +481,9 @@
         getInferredType(conditionJudgment, inferrer),
         node.condition,
         node.condition.fileOffset);
-    inferrer.inferStatement(node.thenJudgment);
-    if (node.otherwiseJudgment != null) {
-      inferrer.inferStatement(node.otherwiseJudgment);
+    inferrer.inferStatement(node.then);
+    if (node.otherwise != null) {
+      inferrer.inferStatement(node.otherwise);
     }
   }
 
@@ -610,8 +633,9 @@
         node.operand, const UnknownType(), !inferrer.isTopLevel);
   }
 
-  void visitLabeledStatementJudgment(LabeledStatementJudgment node) {
-    inferrer.inferStatement(node.judgment);
+  @override
+  void visitLabeledStatement(LabeledStatement node, _) {
+    inferrer.inferStatement(node.body);
   }
 
   void visitListLiteralJudgment(
@@ -622,8 +646,7 @@
     DartType inferredTypeArgument;
     List<DartType> formalTypes;
     List<DartType> actualTypes;
-    bool inferenceNeeded =
-        node._declaredTypeArgument == null && !inferrer.legacyMode;
+    bool inferenceNeeded = node.typeArgument is ImplicitTypeArgument;
     bool typeChecksNeeded = !inferrer.isTopLevel;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
@@ -636,11 +659,11 @@
           isConst: node.isConst);
       inferredTypeArgument = inferredTypes[0];
     } else {
-      inferredTypeArgument = node._declaredTypeArgument ?? const DynamicType();
+      inferredTypeArgument = node.typeArgument;
     }
     if (inferenceNeeded || typeChecksNeeded) {
-      for (int i = 0; i < node.judgments.length; ++i) {
-        Expression judgment = node.judgments[i];
+      for (int i = 0; i < node.expressions.length; ++i) {
+        Expression judgment = node.expressions[i];
         inferrer.inferExpression(
             judgment, inferredTypeArgument, inferenceNeeded || typeChecksNeeded,
             isVoidAllowed: true);
@@ -667,16 +690,15 @@
       node.typeArgument = inferredTypeArgument;
     }
     if (typeChecksNeeded) {
-      for (int i = 0; i < node.judgments.length; i++) {
+      for (int i = 0; i < node.expressions.length; i++) {
         inferrer.ensureAssignable(node.typeArgument, actualTypes[i],
-            node.judgments[i], node.judgments[i].fileOffset,
+            node.expressions[i], node.expressions[i].fileOffset,
             isVoidAllowed: node.typeArgument is VoidType);
       }
     }
     node.inferredType = new InterfaceType(listClass, [inferredTypeArgument]);
     KernelLibraryBuilder inferrerLibrary = inferrer.library;
-    if (node._declaredTypeArgument == null &&
-        inferrerLibrary is KernelLibraryBuilder) {
+    if (inferenceNeeded && inferrerLibrary is KernelLibraryBuilder) {
       inferrerLibrary.checkBoundsInListLiteral(
           node, inferrer.typeSchemaEnvironment,
           inferred: true);
@@ -698,21 +720,6 @@
     return null;
   }
 
-  void visitMapEntryJudgment(MapEntryJudgment node, DartType keyTypeContext,
-      DartType valueTypeContext) {
-    Expression keyJudgment = node.keyJudgment;
-    inferrer.inferExpression(keyJudgment, keyTypeContext, true,
-        isVoidAllowed: true);
-    node.inferredKeyType = getInferredType(keyJudgment, inferrer);
-
-    Expression valueJudgment = node.valueJudgment;
-    inferrer.inferExpression(valueJudgment, valueTypeContext, true,
-        isVoidAllowed: true);
-    node.inferredValueType = getInferredType(valueJudgment, inferrer);
-
-    return null;
-  }
-
   void visitMapLiteralJudgment(MapLiteralJudgment node, DartType typeContext) {
     var mapClass = inferrer.coreTypes.mapClass;
     var mapType = mapClass.thisType;
@@ -721,10 +728,33 @@
     DartType inferredValueType;
     List<DartType> formalTypes;
     List<DartType> actualTypes;
-    assert(
-        (node._declaredKeyType == null) == (node._declaredValueType == null));
-    bool inferenceNeeded =
-        node._declaredKeyType == null && !inferrer.legacyMode;
+    assert((node.keyType is ImplicitTypeArgument) ==
+        (node.valueType is ImplicitTypeArgument));
+    bool inferenceNeeded = node.keyType is ImplicitTypeArgument;
+    KernelLibraryBuilder library = inferrer.library;
+    if (library != null &&
+        library.loader.target.enableSetLiterals &&
+        inferenceNeeded &&
+        node.entries.isEmpty) {
+      // Ambiguous set/map literal
+      DartType context =
+          inferrer.typeSchemaEnvironment.unfutureType(typeContext);
+      if (context is InterfaceType) {
+        if (inferrer.classHierarchy
+                .isSubclassOf(inferrer.coreTypes.setClass, context.classNode) &&
+            !inferrer.classHierarchy
+                .isSubclassOf(inferrer.coreTypes.mapClass, context.classNode)) {
+          // Set literal
+          SetLiteralJudgment setLiteral = new SetLiteralJudgment([],
+              typeArgument: const ImplicitTypeArgument(),
+              isConst: node.isConst);
+          node.replaceWith(setLiteral);
+          visitSetLiteralJudgment(setLiteral, typeContext);
+          node.inferredType = setLiteral.inferredType;
+          return;
+        }
+      }
+    }
     bool typeChecksNeeded = !inferrer.isTopLevel;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
@@ -738,22 +768,28 @@
       inferredKeyType = inferredTypes[0];
       inferredValueType = inferredTypes[1];
     } else {
-      inferredKeyType = node._declaredKeyType ?? const DynamicType();
-      inferredValueType = node._declaredValueType ?? const DynamicType();
+      inferredKeyType = node.keyType;
+      inferredValueType = node.valueType;
     }
-    List<Expression> cachedKeyJudgments =
-        node.judgments.map((j) => (j as MapEntryJudgment).keyJudgment).toList();
-    List<Expression> cachedValueJudgments = node.judgments
-        .map((j) => (j as MapEntryJudgment).valueJudgment)
-        .toList();
+    List<Expression> cachedKeys = new List(node.entries.length);
+    List<Expression> cachedValues = new List(node.entries.length);
+    for (int i = 0; i < node.entries.length; i++) {
+      cachedKeys[i] = node.entries[i].key;
+      cachedValues[i] = node.entries[i].value;
+    }
     if (inferenceNeeded || typeChecksNeeded) {
-      for (MapEntryJudgment judgment in node.judgments) {
-        visitMapEntryJudgment(judgment, inferredKeyType, inferredValueType);
+      for (MapEntry entry in node.entries) {
+        Expression key = entry.key;
+        inferrer.inferExpression(key, inferredKeyType, true,
+            isVoidAllowed: true);
+        actualTypes.add(getInferredType(key, inferrer));
+        Expression value = entry.value;
+        inferrer.inferExpression(value, inferredValueType, true,
+            isVoidAllowed: true);
+        actualTypes.add(getInferredType(value, inferrer));
         if (inferenceNeeded) {
           formalTypes.addAll(mapType.typeArguments);
         }
-        actualTypes.add(judgment.inferredKeyType);
-        actualTypes.add(judgment.inferredValueType);
       }
     }
     if (inferenceNeeded) {
@@ -776,13 +812,13 @@
       node.valueType = inferredValueType;
     }
     if (typeChecksNeeded) {
-      for (int i = 0; i < node.judgments.length; ++i) {
-        Expression keyJudgment = cachedKeyJudgments[i];
+      for (int i = 0; i < node.entries.length; ++i) {
+        Expression keyJudgment = cachedKeys[i];
         inferrer.ensureAssignable(node.keyType, actualTypes[2 * i], keyJudgment,
             keyJudgment.fileOffset,
             isVoidAllowed: node.keyType is VoidType);
 
-        Expression valueJudgment = cachedValueJudgments[i];
+        Expression valueJudgment = cachedValues[i];
         inferrer.ensureAssignable(node.valueType, actualTypes[2 * i + 1],
             valueJudgment, valueJudgment.fileOffset,
             isVoidAllowed: node.valueType is VoidType);
@@ -793,13 +829,11 @@
     KernelLibraryBuilder inferrerLibrary = inferrer.library;
     // Either both [_declaredKeyType] and [_declaredValueType] are omitted or
     // none of them, so we may just check one.
-    if (node._declaredKeyType == null &&
-        inferrerLibrary is KernelLibraryBuilder) {
+    if (inferenceNeeded && inferrerLibrary is KernelLibraryBuilder) {
       inferrerLibrary.checkBoundsInMapLiteral(
           node, inferrer.typeSchemaEnvironment,
           inferred: true);
     }
-    return null;
   }
 
   void visitMethodInvocationJudgment(
@@ -885,7 +919,7 @@
     Expression initializer = node.variableJudgment.initializer;
     inferrer.inferExpression(initializer, typeContext, true);
     node.inferredType = getInferredType(initializer, inferrer);
-    if (!inferrer.legacyMode) node.variable.type = node.inferredType;
+    node.variable.type = node.inferredType;
     return null;
   }
 
@@ -905,9 +939,7 @@
         receiverVariable: node.variable,
         desugaredInvocation: node._desugaredInvocation);
     node.inferredType = inferenceResult.type;
-    if (!inferrer.legacyMode) {
-      node.body.staticType = node.inferredType;
-    }
+    node.body.staticType = node.inferredType;
     return null;
   }
 
@@ -916,9 +948,7 @@
     inferrer.inferPropertyGet(
         node, node.receiverJudgment, node.fileOffset, typeContext,
         receiverVariable: node.variable, desugaredGet: node._desugaredGet);
-    if (!inferrer.legacyMode) {
-      node.body.staticType = node.inferredType;
-    }
+    node.body.staticType = node.inferredType;
     return null;
   }
 
@@ -967,8 +997,7 @@
     // doing compound assignment?
     var writeContext = inferrer.getSetterType(writeMember, receiverType);
     node._inferRhs(inferrer, readType, writeContext);
-    if (!inferrer.legacyMode)
-      node.nullAwareGuard?.staticType = node.inferredType;
+    node.nullAwareGuard?.staticType = node.inferredType;
     node._replaceWithDesugared();
     return null;
   }
@@ -1021,6 +1050,78 @@
         !identical(node.returnKeywordLexeme, "return"));
   }
 
+  void visitSetLiteralJudgment(SetLiteralJudgment node, DartType typeContext) {
+    var setClass = inferrer.coreTypes.setClass;
+    var setType = setClass.thisType;
+    List<DartType> inferredTypes;
+    DartType inferredTypeArgument;
+    List<DartType> formalTypes;
+    List<DartType> actualTypes;
+    bool inferenceNeeded = node.typeArgument is ImplicitTypeArgument;
+    bool typeChecksNeeded = !inferrer.isTopLevel;
+    if (inferenceNeeded || typeChecksNeeded) {
+      formalTypes = [];
+      actualTypes = [];
+    }
+    if (inferenceNeeded) {
+      inferredTypes = [const UnknownType()];
+      inferrer.typeSchemaEnvironment.inferGenericFunctionOrType(setType,
+          setClass.typeParameters, null, null, typeContext, inferredTypes,
+          isConst: node.isConst);
+      inferredTypeArgument = inferredTypes[0];
+    } else {
+      inferredTypeArgument = node.typeArgument;
+    }
+    if (inferenceNeeded || typeChecksNeeded) {
+      for (int i = 0; i < node.expressions.length; ++i) {
+        Expression judgment = node.expressions[i];
+        inferrer.inferExpression(
+            judgment, inferredTypeArgument, inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+        if (inferenceNeeded) {
+          formalTypes.add(setType.typeArguments[0]);
+        }
+        actualTypes.add(getInferredType(judgment, inferrer));
+      }
+    }
+    if (inferenceNeeded) {
+      inferrer.typeSchemaEnvironment.inferGenericFunctionOrType(
+          setType,
+          setClass.typeParameters,
+          formalTypes,
+          actualTypes,
+          typeContext,
+          inferredTypes);
+      inferredTypeArgument = inferredTypes[0];
+      inferrer.instrumentation?.record(
+          inferrer.uri,
+          node.fileOffset,
+          'typeArgs',
+          new InstrumentationValueForTypeArgs([inferredTypeArgument]));
+      node.typeArgument = inferredTypeArgument;
+    }
+    if (typeChecksNeeded) {
+      for (int i = 0; i < node.expressions.length; i++) {
+        inferrer.ensureAssignable(node.typeArgument, actualTypes[i],
+            node.expressions[i], node.expressions[i].fileOffset,
+            isVoidAllowed: node.typeArgument is VoidType);
+      }
+    }
+    node.inferredType = new InterfaceType(setClass, [inferredTypeArgument]);
+    KernelLibraryBuilder inferrerLibrary = inferrer.library;
+    if (inferenceNeeded && inferrerLibrary is KernelLibraryBuilder) {
+      inferrerLibrary.checkBoundsInSetLiteral(
+          node, inferrer.typeSchemaEnvironment,
+          inferred: true);
+    }
+
+    KernelLibraryBuilder library = inferrer.library;
+    if (library != null &&
+        !library.loader.target.backendTarget.supportsSetLiterals) {
+      inferrer.helper.transformSetLiterals = true;
+    }
+  }
+
   void visitStaticAssignmentJudgment(
       StaticAssignmentJudgment node, DartType typeContext) {
     DartType readType = const DynamicType(); // Only used in error recovery
@@ -1151,7 +1252,7 @@
               ]);
         }
       }
-      inferrer.inferStatement(switchCase.bodyJudgment);
+      inferrer.inferStatement(switchCase.body);
     }
   }
 
@@ -1210,11 +1311,11 @@
   }
 
   void visitCatchJudgment(CatchJudgment node) {
-    inferrer.inferStatement(node.bodyJudgment);
+    inferrer.inferStatement(node.body);
   }
 
   void visitTryCatchJudgment(TryCatchJudgment node) {
-    inferrer.inferStatement(node.bodyJudgment);
+    inferrer.inferStatement(node.body);
     for (var catch_ in node.catchJudgments) {
       visitCatchJudgment(catch_);
     }
@@ -1222,13 +1323,7 @@
 
   void visitTryFinallyJudgment(TryFinallyJudgment node) {
     inferrer.inferStatement(node.body);
-    if (node.catchJudgments != null) {
-      for (var catch_ in node.catchJudgments) {
-        visitCatchJudgment(catch_);
-      }
-      node.body = new TryCatch(node.body, node.catches)..parent = node;
-    }
-    inferrer.inferStatement(node.finalizerJudgment);
+    inferrer.inferStatement(node.finalizer);
   }
 
   void visitTypeLiteralJudgment(
@@ -1271,7 +1366,7 @@
     } else {
       inferredType = const DynamicType();
     }
-    if (!inferrer.legacyMode && node._implicitlyTyped) {
+    if (node._implicitlyTyped) {
       inferrer.instrumentation?.record(inferrer.uri, node.fileOffset, 'type',
           new InstrumentationValueForType(inferredType));
       node.type = inferredType;
@@ -1344,7 +1439,7 @@
         getInferredType(conditionJudgment, inferrer),
         node.condition,
         node.condition.fileOffset);
-    inferrer.inferStatement(node.bodyJudgment);
+    inferrer.inferStatement(node.body);
   }
 
   void visitYieldJudgment(YieldJudgment node) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart
index 9a49c47..05513ad 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart
@@ -73,7 +73,7 @@
   @override
   DartType visitConditionalExpression(
       ConditionalExpression node, TypeInferrerImpl inferrer) {
-    return inferrer.legacyMode ? const DynamicType() : node.staticType;
+    return node.staticType;
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
index 3bb2642..cded049 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
@@ -27,6 +27,7 @@
         Expression,
         ExpressionStatement,
         Field,
+        ForInStatement,
         FunctionDeclaration,
         FunctionExpression,
         FunctionNode,
@@ -84,20 +85,18 @@
         ArgumentsJudgment,
         AssertInitializerJudgment,
         AssertStatementJudgment,
-        BreakJudgment,
+        BlockJudgment,
         CascadeJudgment,
         ComplexAssignmentJudgment,
         ContinueSwitchJudgment,
         DeferredCheckJudgment,
         ExpressionStatementJudgment,
         FactoryConstructorInvocationJudgment,
-        ForInJudgment,
         FunctionDeclarationJudgment,
         FunctionNodeJudgment,
         IfJudgment,
         IfNullJudgment,
         InvalidSuperInitializerJudgment,
-        LabeledStatementJudgment,
         LoadLibraryTearOffJudgment,
         MethodInvocationJudgment,
         NamedFunctionExpressionJudgment,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
index a2fbeca..e81a108 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
@@ -16,6 +16,10 @@
 
 export '../builder/builder.dart';
 
+export 'class_hierarchy_builder.dart' show ClassHierarchyBuilder;
+
+export 'implicit_type.dart' show ImplicitType;
+
 export 'kernel_class_builder.dart' show KernelClassBuilder;
 
 export 'kernel_enum_builder.dart' show KernelEnumBuilder;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
index 873aa85..77098cf 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
@@ -32,8 +32,7 @@
         Arguments,
         VariableDeclaration;
 
-import 'package:kernel/ast.dart'
-    show FunctionType, NamedType, TypeParameterType;
+import 'package:kernel/ast.dart' show FunctionType, TypeParameterType;
 
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 
@@ -65,14 +64,13 @@
         messagePatchDeclarationOrigin,
         noLength,
         templateDuplicatedDeclarationUse,
-        templateFactoryRedirecteeHasTooFewPositionalParameters,
-        templateFactoryRedirecteeInvalidReturnType,
         templateGenericFunctionTypeInferredAsActualTypeArgument,
         templateIllegalMixinDueToConstructors,
         templateIllegalMixinDueToConstructorsCause,
         templateImplementsRepeated,
         templateImplementsSuperClass,
         templateImplicitMixinOverrideContext,
+        templateIncompatibleRedirecteeFunctionType,
         templateIncorrectTypeArgument,
         templateIncorrectTypeArgumentInSupertype,
         templateIncorrectTypeArgumentInSupertypeInferred,
@@ -90,10 +88,6 @@
         templateOverrideTypeMismatchReturnType,
         templateOverrideTypeVariablesMismatch,
         templateRedirectingFactoryIncompatibleTypeArgument,
-        templateRedirectingFactoryInvalidNamedParameterType,
-        templateRedirectingFactoryInvalidPositionalParameterType,
-        templateRedirectingFactoryMissingNamedParameter,
-        templateRedirectingFactoryProvidesTooFewRequiredParameters,
         templateRedirectionTargetNotFound,
         templateTypeArgumentMismatch;
 
@@ -646,9 +640,9 @@
           isInterfaceCheck: true);
     }
 
-    bool hasNoSuchMethod =
-        hierarchy.getDispatchTarget(cls, noSuchMethodName).enclosingClass !=
-            coreTypes.objectClass;
+    Member noSuchMethod = hierarchy.getDispatchTarget(cls, noSuchMethodName);
+    bool hasNoSuchMethod = noSuchMethod != null &&
+        noSuchMethod.enclosingClass != coreTypes.objectClass;
 
     void findMissingImplementations({bool setters}) {
       List<Member> dispatchTargets =
@@ -707,11 +701,11 @@
     findMissingImplementations(setters: true);
 
     if (context?.isNotEmpty ?? false) {
-      String memberString =
-          context.map((message) => "'${message.arguments["name"]}'").join(", ");
+      List<String> memberNames = new List<String>.from(
+          context.map((message) => "'${message.arguments["name"]}'"));
       library.addProblem(
           templateMissingImplementationNotAbstract.withArguments(
-              cls.name, memberString),
+              cls.name, memberNames),
           cls.fileOffset,
           cls.name.length,
           cls.fileUri,
@@ -1604,144 +1598,14 @@
     // happened during [_computeRedirecteeType].
     if (redirecteeType == null) return;
 
-    // Check whether [redirecteeType] <: [factoryType]. In the following let
-    //     [factoryType    = (S_1, ..., S_i, {S_(i+1), ..., S_n}) -> S']
-    //     [redirecteeType = (T_1, ..., T_j, {T_(j+1), ..., T_m}) -> T'].
-
-    // Ensure that any extra parameters that [redirecteeType] might have are
-    // optional.
-    if (redirecteeType.requiredParameterCount >
-        factoryType.requiredParameterCount) {
+    // Check whether [redirecteeType] <: [factoryType].
+    if (!typeEnvironment.isSubtypeOf(redirecteeType, factoryType)) {
       addProblem(
-          templateRedirectingFactoryProvidesTooFewRequiredParameters
-              .withArguments(
-                  factory.fullNameForErrors,
-                  factoryType.requiredParameterCount,
-                  computeRedirecteeName(factory.redirectionTarget),
-                  redirecteeType.requiredParameterCount),
-          factory.charOffset,
-          noLength);
-      return;
-    }
-    if (redirecteeType.positionalParameters.length <
-        factoryType.positionalParameters.length) {
-      String targetName = computeRedirecteeName(factory.redirectionTarget);
-      addProblem(
-          templateFactoryRedirecteeHasTooFewPositionalParameters.withArguments(
-              targetName, redirecteeType.positionalParameters.length),
+          templateIncompatibleRedirecteeFunctionType.withArguments(
+              redirecteeType, factoryType),
           factory.redirectionTarget.charOffset,
           noLength);
-      return;
     }
-
-    // For each 0 < k < i check S_k <: T_k.
-    for (int i = 0; i < factoryType.positionalParameters.length; ++i) {
-      var factoryParameterType = factoryType.positionalParameters[i];
-      var redirecteeParameterType = redirecteeType.positionalParameters[i];
-      if (!typeEnvironment.isSubtypeOf(
-          factoryParameterType, redirecteeParameterType)) {
-        final factoryParameter =
-            factory.target.function.positionalParameters[i];
-        addProblem(
-            templateRedirectingFactoryInvalidPositionalParameterType
-                .withArguments(factoryParameter.name, factoryParameterType,
-                    redirecteeParameterType),
-            factoryParameter.fileOffset,
-            factoryParameter.name.length);
-        return;
-      }
-    }
-
-    // For each i < k < n check that the named parameter S_k has a corresponding
-    // named parameter T_l in [redirecteeType] for some j < l < m.
-    int factoryTypeNameIndex = 0; // k.
-    int redirecteeTypeNameIndex = 0; // l.
-
-    // The following code makes use of the invariant that [namedParameters] are
-    // already sorted (i.e. it's a monotonic sequence) to determine in a linear
-    // pass whether [factory.namedParameters] is a subset of
-    // [redirectee.namedParameters]. In the comments below the symbol <= stands
-    // for the usual lexicographic relation on strings.
-    while (factoryTypeNameIndex < factoryType.namedParameters.length) {
-      // If we have gone beyond the bound of redirectee's named parameters, then
-      // signal a missing named parameter error.
-      if (redirecteeTypeNameIndex == redirecteeType.namedParameters.length) {
-        reportRedirectingFactoryMissingNamedParameter(
-            factory, factoryType.namedParameters[factoryTypeNameIndex]);
-        break;
-      }
-
-      int result = redirecteeType.namedParameters[redirecteeTypeNameIndex].name
-          .compareTo(factoryType.namedParameters[factoryTypeNameIndex].name);
-      if (result < 0) {
-        // T_l.name <= S_k.name.
-        redirecteeTypeNameIndex++;
-      } else if (result == 0) {
-        // S_k.name <= T_l.name.
-        NamedType factoryParameterType =
-            factoryType.namedParameters[factoryTypeNameIndex];
-        NamedType redirecteeParameterType =
-            redirecteeType.namedParameters[redirecteeTypeNameIndex];
-        // Check S_k <: T_l.
-        if (!typeEnvironment.isSubtypeOf(
-            factoryParameterType.type, redirecteeParameterType.type)) {
-          var factoryFormal =
-              factory.target.function.namedParameters[redirecteeTypeNameIndex];
-          addProblem(
-              templateRedirectingFactoryInvalidNamedParameterType.withArguments(
-                  factoryParameterType.name,
-                  factoryParameterType.type,
-                  redirecteeParameterType.type),
-              factoryFormal.fileOffset,
-              factoryFormal.name.length);
-          return;
-        }
-        redirecteeTypeNameIndex++;
-        factoryTypeNameIndex++;
-      } else {
-        // S_k.name <= T_l.name. By appealing to the monotinicity of
-        // [namedParameters] and the transivity of <= it follows that for any
-        // l', such that l < l', it must be the case that S_k <= T_l'. Thus the
-        // named parameter is missing from the redirectee's parameter list.
-        reportRedirectingFactoryMissingNamedParameter(
-            factory, factoryType.namedParameters[factoryTypeNameIndex]);
-
-        // Continue with the next factory named parameter.
-        factoryTypeNameIndex++;
-      }
-    }
-
-    // Report any unprocessed factory named parameters as missing.
-    if (factoryTypeNameIndex < factoryType.namedParameters.length) {
-      for (int i = factoryTypeNameIndex;
-          i < factoryType.namedParameters.length;
-          i++) {
-        reportRedirectingFactoryMissingNamedParameter(
-            factory, factoryType.namedParameters[factoryTypeNameIndex]);
-      }
-    }
-
-    // Check that T' <: S'.
-    if (!typeEnvironment.isSubtypeOf(
-        redirecteeType.returnType, factoryType.returnType)) {
-      String targetName = computeRedirecteeName(factory.redirectionTarget);
-      addProblem(
-          templateFactoryRedirecteeInvalidReturnType.withArguments(
-              redirecteeType.returnType, targetName, factoryType.returnType),
-          factory.redirectionTarget.charOffset,
-          noLength);
-      return;
-    }
-  }
-
-  void reportRedirectingFactoryMissingNamedParameter(
-      KernelRedirectingFactoryBuilder factory, NamedType missingParameter) {
-    addProblem(
-        templateRedirectingFactoryMissingNamedParameter.withArguments(
-            computeRedirecteeName(factory.redirectionTarget),
-            missingParameter.name),
-        factory.redirectionTarget.charOffset,
-        noLength);
   }
 
   void checkRedirectingFactories(TypeEnvironment typeEnvironment) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
new file mode 100644
index 0000000..b7372a5
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.kernel_constants;
+
+import 'package:kernel/ast.dart'
+    show
+        Constant,
+        DartType,
+        ListConstant,
+        MapConstant,
+        NullConstant,
+        StaticInvocation,
+        TreeNode;
+
+import 'package:kernel/transformations/constants.dart'
+    show ConstantsBackend, ErrorReporter;
+
+import '../problems.dart' show unimplemented;
+
+class KernelConstantsBackend extends ConstantsBackend {
+  @override
+  Constant lowerListConstant(ListConstant constant) => constant;
+
+  @override
+  Constant lowerMapConstant(MapConstant constant) => constant;
+
+  @override
+  Constant buildConstantForNative(
+      String nativeName,
+      List<DartType> typeArguments,
+      List<Constant> positionalArguments,
+      Map<String, Constant> namedArguments,
+      List<TreeNode> context,
+      StaticInvocation node,
+      ErrorReporter errorReporter,
+      void abortEvaluation()) {
+    // VM-specific names of the fromEnvironment factory constructors.
+    if (nativeName == 'Bool_fromEnvironment' ||
+        nativeName == 'Integer_fromEnvironment' ||
+        nativeName == 'String_fromEnvironment') {
+      return namedArguments['defaultValue'] ?? new NullConstant();
+    }
+    return unimplemented('constant evaluation of ${nativeName}',
+        node.fileOffset, node.location.file);
+  }
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
index ef82912..4f966c7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
@@ -133,9 +133,9 @@
     /// }
 
     members["index"] = new KernelFieldBuilder(null, intType, "index",
-        finalMask | hasInitializerMask, parent, charOffset, null);
+        finalMask | hasInitializerMask, parent, charOffset);
     members["_name"] = new KernelFieldBuilder(null, stringType, "_name",
-        finalMask | hasInitializerMask, parent, charOffset, null);
+        finalMask | hasInitializerMask, parent, charOffset);
     KernelConstructorBuilder constructorBuilder = new KernelConstructorBuilder(
         null,
         constMask,
@@ -160,8 +160,7 @@
         "values",
         constMask | staticMask | hasInitializerMask,
         parent,
-        charOffset,
-        null);
+        charOffset);
     members["values"] = valuesBuilder;
     KernelProcedureBuilder toStringBuilder = new KernelProcedureBuilder(
         null,
@@ -219,8 +218,7 @@
             name,
             constMask | staticMask | hasInitializerMask,
             parent,
-            enumConstantInfo.charOffset,
-            null);
+            enumConstantInfo.charOffset);
         metadataCollector?.setDocumentationComment(
             fieldBuilder.target, documentationComment);
         members[name] = fieldBuilder..next = existing;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart
index be45b59..38f029e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator.dart
@@ -265,20 +265,26 @@
 
   Expression _makeRead(ComplexAssignmentJudgment complexAssignment) {
     Expression read = makeInvalidRead();
-    complexAssignment?.read = read;
+    if (complexAssignment != null) {
+      read = helper.desugarSyntheticExpression(read);
+      complexAssignment.read = read;
+    }
     return read;
   }
 
   Expression _makeWrite(Expression value, bool voidContext,
       ComplexAssignmentJudgment complexAssignment) {
     Expression write = makeInvalidWrite(value);
-    complexAssignment?.write = write;
+    if (complexAssignment != null) {
+      write = helper.desugarSyntheticExpression(write);
+      complexAssignment.write = write;
+    }
     return write;
   }
 
   Expression _finish(
       Expression body, ComplexAssignmentJudgment complexAssignment) {
-    if (complexAssignment != null) {
+    if (!helper.legacyMode && complexAssignment != null) {
       complexAssignment.desugared = body;
       return complexAssignment;
     } else {
@@ -572,6 +578,7 @@
       ..fileOffset = offset;
     if (complexAssignment != null) {
       body = makeLet(receiver, nullAwareGuard);
+      if (helper.legacyMode) return body;
       shadow.PropertyAssignmentJudgment kernelPropertyAssign =
           complexAssignment;
       kernelPropertyAssign.nullAwareGuard = nullAwareGuard;
@@ -1106,13 +1113,17 @@
 
   @override
   Expression _makeRead(ComplexAssignmentJudgment complexAssignment) {
+    Expression read;
     if (readTarget == null) {
-      return makeInvalidRead();
+      read = makeInvalidRead();
+      if (complexAssignment != null) {
+        read = helper.desugarSyntheticExpression(read);
+      }
     } else {
-      var read = helper.makeStaticGet(readTarget, token);
-      complexAssignment?.read = read;
-      return read;
+      read = helper.makeStaticGet(readTarget, token);
     }
+    complexAssignment?.read = read;
+    return read;
   }
 
   @override
@@ -1121,6 +1132,9 @@
     Expression write;
     if (writeTarget == null) {
       write = makeInvalidWrite(value);
+      if (complexAssignment != null) {
+        write = helper.desugarSyntheticExpression(write);
+      }
     } else {
       write = new StaticSet(writeTarget, value);
     }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
index 02010bd..9870fb2 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
@@ -5,25 +5,24 @@
 library fasta.kernel_field_builder;
 
 import 'package:kernel/ast.dart'
-    show DartType, Expression, Field, Name, NullLiteral;
+    show DartType, DynamicType, Expression, Field, Name, NullLiteral;
 
 import '../../base/instrumentation.dart'
     show Instrumentation, InstrumentationValueForType;
 
-import '../../scanner/token.dart' show Token;
-
 import '../fasta_codes.dart' show messageInternalProblemAlreadyInitialized;
 
-import '../problems.dart' show internalProblem;
+import '../problems.dart' show internalProblem, unsupported;
 
 import 'kernel_body_builder.dart' show KernelBodyBuilder;
 
 import 'kernel_builder.dart'
     show
         Declaration,
+        ImplicitType,
         FieldBuilder,
+        KernelLibraryBuilder,
         KernelTypeBuilder,
-        LibraryBuilder,
         MetadataBuilder;
 
 import 'kernel_shadow_ast.dart' show ShadowField;
@@ -32,16 +31,9 @@
   final ShadowField field;
   final List<MetadataBuilder> metadata;
   final KernelTypeBuilder type;
-  Token initializerTokenForInference;
 
-  KernelFieldBuilder(
-      this.metadata,
-      this.type,
-      String name,
-      int modifiers,
-      Declaration compilationUnit,
-      int charOffset,
-      this.initializerTokenForInference)
+  KernelFieldBuilder(this.metadata, this.type, String name, int modifiers,
+      Declaration compilationUnit, int charOffset)
       : field = new ShadowField(null, type == null,
             fileUri: compilationUnit?.fileUri)
           ..fileOffset = charOffset,
@@ -55,10 +47,13 @@
     field.initializer = value..parent = field;
   }
 
-  bool get isEligibleForInference =>
-      type == null && (hasInitializer || isInstanceMember);
+  bool get isEligibleForInference {
+    return !library.legacyMode &&
+        type == null &&
+        (hasInitializer || isInstanceMember);
+  }
 
-  Field build(LibraryBuilder library) {
+  Field build(KernelLibraryBuilder library) {
     field.name ??= new Name(name, library.target);
     if (type != null) {
       field.type = type.build(library);
@@ -71,9 +66,7 @@
       ..hasImplicitGetter = isInstanceMember
       ..hasImplicitSetter = isInstanceMember && !isConst && !isFinal
       ..isStatic = !isInstanceMember;
-    if (!library.disableTypeInference &&
-        isEligibleForInference &&
-        !isInstanceMember) {
+    if (isEligibleForInference && !isInstanceMember) {
       library.loader.typeInferenceEngine
           .recordStaticFieldInferenceCandidate(field, library);
     }
@@ -84,14 +77,21 @@
 
   void prepareTopLevelInference() {
     if (!isEligibleForInference) return;
+    KernelLibraryBuilder library = this.library;
     var typeInferrer = library.loader.typeInferenceEngine
         .createTopLevelTypeInferrer(
             field.enclosingClass?.thisType, field, null);
     if (hasInitializer) {
+      if (field.type is! ImplicitType) {
+        unsupported(
+            "$name has unexpected type ${field.type}", charOffset, fileUri);
+        return;
+      }
+      ImplicitType type = field.type;
+      field.type = const DynamicType();
       initializer = new KernelBodyBuilder.forField(this, typeInferrer)
-          .parseFieldInitializer(initializerTokenForInference);
+          .parseFieldInitializer(type.initializerToken);
     }
-    initializerTokenForInference = null;
   }
 
   @override
@@ -104,8 +104,4 @@
 
   @override
   DartType get builtType => field.type;
-
-  @override
-  bool get hasTypeInferredFromInitializer =>
-      ShadowField.hasTypeInferredFromInitializer(field);
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
index 999f15e..ec775ef 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart
@@ -10,7 +10,10 @@
 
 import 'kernel_builder.dart'
     show
+        ClassBuilder,
+        Declaration,
         FormalParameterBuilder,
+        KernelFieldBuilder,
         KernelLibraryBuilder,
         KernelTypeBuilder,
         MetadataBuilder,
@@ -67,6 +70,17 @@
             name,
             null,
             charOffset)
+          ..parent = parent
           ..declaration = declaration);
   }
+
+  void finalizeInitializingFormal() {
+    Object cls = parent.parent;
+    if (cls is ClassBuilder) {
+      Declaration field = cls.scope.lookup(name, charOffset, fileUri);
+      if (field is KernelFieldBuilder) {
+        target.type = field.target.type;
+      }
+    }
+  }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index f2ec7bc..3f46eb3 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -28,8 +28,10 @@
         Name,
         Procedure,
         ProcedureKind,
+        SetLiteral,
         StaticInvocation,
         StringLiteral,
+        Supertype,
         TreeNode,
         Typedef,
         TypeParameter,
@@ -116,6 +118,7 @@
         DynamicTypeBuilder,
         EnumConstantInfo,
         FormalParameterBuilder,
+        ImplicitType,
         InvalidTypeBuilder,
         KernelClassBuilder,
         KernelConstructorBuilder,
@@ -191,6 +194,8 @@
   /// the error message is the corresponding value in the map.
   Map<String, String> unserializableExports;
 
+  List<KernelFormalParameterBuilder> untypedInitializingFormals;
+
   KernelLibraryBuilder(Uri uri, Uri fileUri, Loader loader, this.actualOrigin,
       [Scope scope, Library target])
       : library = target ??
@@ -597,9 +602,13 @@
     if (hasInitializer) {
       modifiers |= hasInitializerMask;
     }
-    KernelFieldBuilder field = new KernelFieldBuilder(metadata, type, name,
-        modifiers, this, charOffset, initializerTokenForInference);
+    KernelFieldBuilder field = new KernelFieldBuilder(
+        metadata, type, name, modifiers, this, charOffset);
     addBuilder(name, field, charOffset);
+    if (initializerTokenForInference != null) {
+      assert(type == null);
+      field.target.type = new ImplicitType(field, initializerTokenForInference);
+    }
     loader.target.metadataCollector
         ?.setDocumentationComment(field.target, documentationComment);
   }
@@ -632,6 +641,11 @@
         charOpenParenOffset,
         charEndOffset,
         nativeMethodName);
+    if (formals != null) {
+      for (int i = 0; i < formals.length; i++) {
+        formals[i].parent = procedure;
+      }
+    }
     metadataCollector?.setDocumentationComment(
         procedure.target, documentationComment);
     metadataCollector?.setConstructorNameOffset(procedure.target, name);
@@ -825,6 +839,10 @@
     }
     KernelFormalParameterBuilder formal = new KernelFormalParameterBuilder(
         metadata, modifiers, type, name, this, charOffset);
+    if (legacyMode && hasThis && type == null) {
+      (untypedInitializingFormals ??= <KernelFormalParameterBuilder>[])
+          .add(formal);
+    }
     return formal;
   }
 
@@ -1543,6 +1561,13 @@
         inferred: inferred, allowSuperBounded: true);
   }
 
+  void checkBoundsInSetLiteral(SetLiteral node, TypeEnvironment typeEnvironment,
+      {bool inferred = false}) {
+    if (loader.target.legacyMode) return;
+    checkBoundsInType(node.typeArgument, typeEnvironment, node.fileOffset,
+        inferred: inferred, allowSuperBounded: true);
+  }
+
   void checkBoundsInMapLiteral(MapLiteral node, TypeEnvironment typeEnvironment,
       {bool inferred = false}) {
     if (loader.target.legacyMode) return;
@@ -1635,23 +1660,29 @@
     if (loader.target.legacyMode) return;
     if (arguments.types.isEmpty) return;
     Class klass;
-    List<DartType> klassArguments;
+    List<DartType> receiverTypeArguments;
     if (receiverType is InterfaceType) {
       klass = receiverType.classNode;
-      klassArguments = receiverType.typeArguments;
+      receiverTypeArguments = receiverType.typeArguments;
     } else {
       return;
     }
-    Map<TypeParameter, DartType> substitutionMap = <TypeParameter, DartType>{};
-    for (int i = 0; i < klassArguments.length; ++i) {
-      substitutionMap[klass.typeParameters[i]] = klassArguments[i];
-    }
     // TODO(dmitryas): Find a better way than relying on [interfaceTarget].
     Member method = typeEnvironment.hierarchy.getDispatchTarget(klass, name) ??
         interfaceTarget;
     if (method == null || method is! Procedure) {
       return;
     }
+    if (klass != method.enclosingClass) {
+      Supertype parent = typeEnvironment.hierarchy
+          .getClassAsInstanceOf(klass, method.enclosingClass);
+      klass = method.enclosingClass;
+      receiverTypeArguments = parent.typeArguments;
+    }
+    Map<TypeParameter, DartType> substitutionMap = <TypeParameter, DartType>{};
+    for (int i = 0; i < receiverTypeArguments.length; ++i) {
+      substitutionMap[klass.typeParameters[i]] = receiverTypeArguments[i];
+    }
     List<TypeParameter> methodParameters = method.function.typeParameters;
     // The error is to be reported elsewhere.
     if (methodParameters.length != arguments.types.length) return;
@@ -1692,6 +1723,17 @@
     }
     inferredTypes.clear();
   }
+
+  @override
+  int finalizeInitializingFormals() {
+    if (!legacyMode || untypedInitializingFormals == null) return 0;
+    for (int i = 0; i < untypedInitializingFormals.length; i++) {
+      untypedInitializingFormals[i].finalizeInitializingFormal();
+    }
+    int count = untypedInitializingFormals.length;
+    untypedInitializingFormals = null;
+    return count;
+  }
 }
 
 Uri computeLibraryUri(Declaration declaration) {
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 03accd9..9dec3ab 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
@@ -308,6 +308,7 @@
   }
 
   bool get isEligibleForTopLevelInference {
+    if (library.legacyMode) return false;
     if (isInstanceMember) {
       if (returnType == null) return true;
       if (formals != null) {
@@ -451,6 +452,7 @@
   }
 
   bool get isEligibleForTopLevelInference {
+    if (library.legacyMode) return false;
     if (formals != null) {
       for (var formal in formals) {
         if (formal.type == null && formal.isInitializingFormal) return true;
@@ -470,7 +472,7 @@
       constructor.isExternal = isExternal;
       constructor.name = new Name(name, library.target);
     }
-    if (!library.disableTypeInference && isEligibleForTopLevelInference) {
+    if (isEligibleForTopLevelInference) {
       for (KernelFormalParameterBuilder formal in formals) {
         if (formal.type == null && formal.isInitializingFormal) {
           formal.declaration.type = null;
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 32ec3c5..21ca7db 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
@@ -54,11 +54,7 @@
 import '../type_inference/interface_resolver.dart' show InterfaceResolver;
 
 import '../type_inference/type_inference_engine.dart'
-    show
-        FieldInitializerInferenceNode,
-        IncludesTypeParametersCovariantly,
-        InferenceNode,
-        TypeInferenceEngine;
+    show IncludesTypeParametersCovariantly, InferenceNode, TypeInferenceEngine;
 
 import '../type_inference/type_inferrer.dart'
     show ExpressionInferenceResult, TypeInferrer, TypeInferrerImpl;
@@ -75,6 +71,8 @@
 
 import 'body_builder.dart' show combineStatements;
 
+import 'implicit_type_argument.dart' show ImplicitTypeArgument;
+
 import 'kernel_builder.dart' show KernelLibraryBuilder;
 
 import 'kernel_expression_generator.dart' show makeLet;
@@ -189,30 +187,6 @@
   }
 }
 
-/// Concrete shadow object representing a break statement in kernel form.
-class BreakJudgment extends BreakStatement implements StatementJudgment {
-  BreakJudgment(LabeledStatement target) : super(target);
-
-  LabeledStatementJudgment get targetJudgment => target;
-
-  @override
-  void acceptInference(InferenceVistor visitor) {
-    return visitor.visitBreakJudgment(this);
-  }
-}
-
-/// Concrete shadow object representing a continue statement in kernel form.
-class ContinueJudgment extends BreakStatement implements StatementJudgment {
-  ContinueJudgment(LabeledStatement target) : super(target);
-
-  LabeledStatementJudgment get targetJudgment => target;
-
-  @override
-  void acceptInference(InferenceVistor visitor) {
-    return visitor.visitContinueJudgment(this);
-  }
-}
-
 /// Concrete shadow object representing a cascade expression.
 ///
 /// A cascade expression of the form `a..b()..c()` is represented as the kernel
@@ -403,9 +377,6 @@
     return parts;
   }
 
-  DartType _getWriteType(ShadowTypeInferrer inferrer) => unhandled(
-      '$runtimeType', 'ShadowComplexAssignment._getWriteType', -1, null);
-
   _ComplexAssignmentInferenceResult _inferRhs(
       ShadowTypeInferrer inferrer, DartType readType, DartType writeContext) {
     assert(writeContext != null);
@@ -485,9 +456,7 @@
             ? rhsType
             : inferrer.typeSchemaEnvironment
                 .getStandardUpperBound(readType, rhsType);
-        if (!inferrer.legacyMode) {
-          nullAwareCombiner.staticType = combinedType;
-        }
+        nullAwareCombiner.staticType = combinedType;
       } else {
         combinedType = rhsType;
       }
@@ -573,8 +542,6 @@
 class DoJudgment extends DoStatement implements StatementJudgment {
   DoJudgment(Statement body, Expression condition) : super(body, condition);
 
-  StatementJudgment get bodyJudgment => body;
-
   Expression get conditionJudgment => condition;
 
   @override
@@ -666,9 +633,6 @@
     type = inferredType;
   }
 
-  static bool hasTypeInferredFromInitializer(ShadowField field) =>
-      field.inferenceNode is FieldInitializerInferenceNode;
-
   static bool isImplicitlyTyped(ShadowField field) => field._isImplicitlyTyped;
 
   static void setInferenceNode(ShadowField field, InferenceNode node) {
@@ -688,45 +652,16 @@
   }
 }
 
-/// Concrete shadow object representing a for-in loop in kernel form.
-class ForInJudgment extends ForInStatement implements StatementJudgment {
-  final bool _declaresVariable;
-
-  final SyntheticExpressionJudgment _syntheticAssignment;
-
-  ForInJudgment(VariableDeclaration variable, Expression iterable,
-      Statement body, this._declaresVariable, this._syntheticAssignment,
-      {bool isAsync: false})
-      : super(variable, iterable, body, isAsync: isAsync);
-
-  VariableDeclarationJudgment get variableJudgment => variable;
-
-  Expression get iterableJudgment => iterable;
-
-  StatementJudgment get bodyJudgment => body;
-
-  @override
-  void acceptInference(InferenceVistor visitor) {
-    return visitor.visitForInJudgment(this);
-  }
-}
-
 /// Concrete shadow object representing a classic for loop in kernel form.
 class ForJudgment extends ForStatement implements StatementJudgment {
-  final List<Expression> initializers;
-
-  ForJudgment(List<VariableDeclaration> variables, this.initializers,
-      Expression condition, List<Expression> updates, Statement body)
+  ForJudgment(List<VariableDeclaration> variables, Expression condition,
+      List<Expression> updates, Statement body)
       : super(variables ?? [], condition, updates, body);
 
-  List<VariableDeclarationJudgment> get variableJudgments => variables.cast();
-
   Expression get conditionJudgment => condition;
 
   List<Expression> get updateJudgments => updates.cast();
 
-  StatementJudgment get bodyJudgment => body;
-
   @override
   void acceptInference(InferenceVistor visitor) {
     return visitor.visitForJudgment(this);
@@ -828,10 +763,6 @@
 
   Expression get conditionJudgment => condition;
 
-  StatementJudgment get thenJudgment => then;
-
-  StatementJudgment get otherwiseJudgment => otherwise;
-
   @override
   void acceptInference(InferenceVistor visitor) {
     return visitor.visitIfJudgment(this);
@@ -851,11 +782,6 @@
   }
 
   @override
-  DartType _getWriteType(ShadowTypeInferrer inferrer) {
-    return const UnknownType();
-  }
-
-  @override
   void acceptInference(InferenceVistor visitor, DartType typeContext) {
     return visitor.visitIllegalAssignmentJudgment(this, typeContext);
   }
@@ -1007,33 +933,14 @@
   }
 }
 
-/// Concrete shadow object representing a labeled statement in kernel form.
-class LabeledStatementJudgment extends LabeledStatement
-    implements StatementJudgment {
-  LabeledStatementJudgment(Statement body) : super(body);
-
-  StatementJudgment get judgment => body;
-
-  @override
-  void acceptInference(InferenceVistor visitor) {
-    return visitor.visitLabeledStatementJudgment(this);
-  }
-}
-
-/// Type inference derivation for [LiteralList].
+/// Type inference derivation for [ListLiteral].
 class ListLiteralJudgment extends ListLiteral implements ExpressionJudgment {
   DartType inferredType;
 
-  List<Expression> get judgments => expressions;
-
-  final DartType _declaredTypeArgument;
-
   ListLiteralJudgment(List<Expression> expressions,
       {DartType typeArgument, bool isConst: false})
-      : _declaredTypeArgument = typeArgument,
-        super(expressions,
-            typeArgument: typeArgument ?? const DynamicType(),
-            isConst: isConst);
+      : assert(typeArgument != null),
+        super(expressions, typeArgument: typeArgument, isConst: isConst);
 
   @override
   void acceptInference(InferenceVistor visitor, DartType typeContext) {
@@ -1041,37 +948,31 @@
   }
 }
 
-/// Type inference derivation for [MapEntry].
-///
-/// This derivation is needed for uniformity.
-class MapEntryJudgment extends MapEntry {
-  DartType inferredKeyType;
-  DartType inferredValueType;
+/// Type inference derivation for [SetLiteral].
+class SetLiteralJudgment extends SetLiteral implements ExpressionJudgment {
+  DartType inferredType;
 
-  Expression get keyJudgment => key;
+  SetLiteralJudgment(List<Expression> expressions,
+      {DartType typeArgument, bool isConst: false})
+      : assert(typeArgument != null),
+        super(expressions, typeArgument: typeArgument, isConst: isConst);
 
-  Expression get valueJudgment => value;
-
-  MapEntryJudgment(Expression key, Expression value) : super(key, value);
+  @override
+  void acceptInference(InferenceVistor visitor, DartType typeContext) {
+    return visitor.visitSetLiteralJudgment(this, typeContext);
+  }
 }
 
 /// Type inference derivation for [MapLiteral].
 class MapLiteralJudgment extends MapLiteral implements ExpressionJudgment {
   DartType inferredType;
 
-  List<MapEntry> get judgments => entries;
-
-  final DartType _declaredKeyType;
-  final DartType _declaredValueType;
-
   MapLiteralJudgment(List<MapEntry> judgments,
       {DartType keyType, DartType valueType, bool isConst: false})
-      : _declaredKeyType = keyType,
-        _declaredValueType = valueType,
+      : assert(keyType != null),
+        assert(valueType != null),
         super(judgments,
-            keyType: keyType ?? const DynamicType(),
-            valueType: valueType ?? const DynamicType(),
-            isConst: isConst);
+            keyType: keyType, valueType: valueType, isConst: isConst);
 
   @override
   void acceptInference(InferenceVistor visitor, DartType typeContext) {
@@ -1246,14 +1147,6 @@
     return parts;
   }
 
-  @override
-  DartType _getWriteType(ShadowTypeInferrer inferrer) {
-    assert(receiver == null);
-    var receiverType = inferrer.thisType;
-    var writeMember = inferrer.findPropertySetMember(receiverType, write);
-    return inferrer.getSetterType(writeMember, receiverType);
-  }
-
   Object _handleWriteContravariance(
       ShadowTypeInferrer inferrer, DartType receiverType) {
     return inferrer.findPropertySetMember(receiverType, write);
@@ -1309,12 +1202,6 @@
   StaticAssignmentJudgment._(Expression rhs) : super._(rhs);
 
   @override
-  DartType _getWriteType(ShadowTypeInferrer inferrer) {
-    StaticSet write = this.write;
-    return write.target.setterType;
-  }
-
-  @override
   void acceptInference(InferenceVistor visitor, DartType typeContext) {
     return visitor.visitStaticAssignmentJudgment(this, typeContext);
   }
@@ -1377,8 +1264,6 @@
   SwitchCaseJudgment.empty() : super.empty();
 
   List<Expression> get expressionJudgments => expressions.cast();
-
-  StatementJudgment get bodyJudgment => body;
 }
 
 /// Concrete shadow object representing a switch statement in kernel form.
@@ -1480,7 +1365,6 @@
   /// fact that [expression] has the given [type].
   void _storeLetType(
       TypeInferrerImpl inferrer, Expression expression, DartType type) {
-    if (inferrer.legacyMode) return;
     Expression desugared = this.desugared;
     while (true) {
       if (desugared is Let) {
@@ -1517,16 +1401,12 @@
   VariableDeclarationJudgment get exceptionJudgment => exception;
 
   VariableDeclarationJudgment get stackTraceJudgment => stackTrace;
-
-  StatementJudgment get bodyJudgment => body;
 }
 
 /// Concrete shadow object representing a try-catch block in kernel form.
 class TryCatchJudgment extends TryCatch implements StatementJudgment {
   TryCatchJudgment(Statement body, List<Catch> catches) : super(body, catches);
 
-  StatementJudgment get bodyJudgment => body;
-
   List<CatchJudgment> get catchJudgments => catches.cast();
 
   @override
@@ -1537,15 +1417,9 @@
 
 /// Concrete shadow object representing a try-finally block in kernel form.
 class TryFinallyJudgment extends TryFinally implements StatementJudgment {
-  final List<Catch> catches;
-
-  TryFinallyJudgment(Statement body, this.catches, Statement finalizer)
+  TryFinallyJudgment(Statement body, Statement finalizer)
       : super(body, finalizer);
 
-  List<CatchJudgment> get catchJudgments => catches?.cast();
-
-  StatementJudgment get finalizerJudgment => finalizer;
-
   @override
   void acceptInference(InferenceVistor visitor) {
     return visitor.visitTryFinallyJudgment(this);
@@ -1555,8 +1429,8 @@
 /// Concrete implementation of [TypeInferenceEngine] specialized to work with
 /// kernel objects.
 class ShadowTypeInferenceEngine extends TypeInferenceEngine {
-  ShadowTypeInferenceEngine(Instrumentation instrumentation, bool legacyMode)
-      : super(instrumentation, legacyMode);
+  ShadowTypeInferenceEngine(Instrumentation instrumentation)
+      : super(instrumentation);
 
   @override
   ShadowTypeInferrer createLocalTypeInferrer(
@@ -1666,6 +1540,12 @@
       // so that the type hierarchy will be simpler (which may speed up "is"
       // checks).
       return statement.acceptInference(new InferenceVistor(this));
+    } else if (statement is ForInStatement) {
+      return statement.accept1(new InferenceVistor(this), null);
+    } else if (statement is LabeledStatement) {
+      return statement.accept1(new InferenceVistor(this), null);
+    } else if (statement is BreakStatement) {
+      return statement.accept1(new InferenceVistor(this), null);
     } else {
       // Encountered a statement type for which type inference is not yet
       // implemented, so just skip it for now.
@@ -1759,12 +1639,6 @@
   VariableAssignmentJudgment._(Expression rhs) : super._(rhs);
 
   @override
-  DartType _getWriteType(ShadowTypeInferrer inferrer) {
-    VariableSet write = this.write;
-    return write.variable.type;
-  }
-
-  @override
   void acceptInference(InferenceVistor visitor, DartType typeContext) {
     return visitor.visitVariableAssignmentJudgment(this, typeContext);
   }
@@ -1904,8 +1778,6 @@
 
   Expression get conditionJudgment => condition;
 
-  StatementJudgment get bodyJudgment => body;
-
   @override
   void acceptInference(InferenceVistor visitor) {
     return visitor.visitWhileJudgment(this);
@@ -1981,52 +1853,59 @@
   static Expression wrapIllegalAssignment(Expression rhs,
       {int assignmentOffset: -1}) {
     return new IllegalAssignmentJudgment._(rhs,
-        assignmentOffset: assignmentOffset);
+        assignmentOffset: assignmentOffset)
+      ..fileOffset = rhs.fileOffset;
   }
 
   static Expression wrapIndexAssignment(
       Expression receiver, Expression index, Expression rhs,
       {bool isSuper: false}) {
-    return new IndexAssignmentJudgment._(receiver, index, rhs,
-        isSuper: isSuper);
+    return new IndexAssignmentJudgment._(receiver, index, rhs, isSuper: isSuper)
+      ..fileOffset = index.fileOffset;
   }
 
   static Expression wrapInvalidConstructorInvocation(
       kernel.Expression desugared, Member constructor, Arguments arguments) {
     return new InvalidConstructorInvocationJudgment._(
-        desugared, constructor, arguments);
+        desugared, constructor, arguments)
+      ..fileOffset = desugared.fileOffset;
   }
 
   static Expression wrapInvalidWrite(
       Expression desugared, Expression expression) {
-    return new InvalidWriteJudgment._(desugared, expression);
+    return new InvalidWriteJudgment._(desugared, expression)
+      ..fileOffset = desugared.fileOffset;
   }
 
   static Expression wrapPropertyAssignment(Expression receiver, Expression rhs,
       {bool isSuper: false}) {
-    return new PropertyAssignmentJudgment._(receiver, rhs, isSuper: isSuper);
+    return new PropertyAssignmentJudgment._(receiver, rhs, isSuper: isSuper)
+      ..fileOffset = rhs.fileOffset;
   }
 
   static Expression wrapStaticAssignment(Expression rhs) {
-    return new StaticAssignmentJudgment._(rhs);
+    return new StaticAssignmentJudgment._(rhs)..fileOffset = rhs.fileOffset;
   }
 
   static Expression wrapSyntheticExpression(Expression desugared) {
-    return new SyntheticExpressionJudgment._(desugared);
+    return new SyntheticExpressionJudgment._(desugared)
+      ..fileOffset = desugared.fileOffset;
   }
 
   static Expression wrapUnresolvedTargetInvocation(
       Expression desugared, Arguments arguments) {
-    return new UnresolvedTargetInvocationJudgment._(desugared, arguments);
+    return new UnresolvedTargetInvocationJudgment._(desugared, arguments)
+      ..fileOffset = desugared.fileOffset;
   }
 
   static Expression wrapUnresolvedVariableAssignment(
       Expression desugared, bool isCompound, Expression rhs) {
     return new UnresolvedVariableAssignmentJudgment._(
-        desugared, isCompound, rhs);
+        desugared, isCompound, rhs)
+      ..fileOffset = desugared.fileOffset;
   }
 
   static Expression wrapVariableAssignment(Expression rhs) {
-    return new VariableAssignmentJudgment._(rhs);
+    return new VariableAssignmentJudgment._(rhs)..fileOffset = rhs.fileOffset;
   }
 }
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 424d996..39ea072 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -41,6 +41,11 @@
 
 import 'package:kernel/type_algebra.dart' show substitute;
 
+import 'package:kernel/type_environment.dart' show TypeEnvironment;
+
+import 'package:kernel/transformations/constants.dart' as constants
+    show transformLibraries;
+
 import '../../api_prototype/file_system.dart' show FileSystem;
 
 import '../compiler_context.dart' show CompilerContext;
@@ -64,7 +69,7 @@
         templateMissingImplementationCause,
         templateSuperclassHasNoDefaultConstructor;
 
-import '../problems.dart' show unhandled;
+import '../problems.dart' show unhandled, unimplemented;
 
 import '../severity.dart' show Severity;
 
@@ -93,6 +98,8 @@
         TypeBuilder,
         TypeDeclarationBuilder;
 
+import 'kernel_constants.dart' show KernelConstantsBackend;
+
 import 'metadata_collector.dart' show MetadataCollector;
 
 import 'verifier.dart' show verifyComponent;
@@ -125,8 +132,6 @@
 
   bool get legacyMode => backendTarget.legacyMode;
 
-  bool get disableTypeInference => backendTarget.disableTypeInference;
-
   final bool excludeSource = !CompilerContext.current.options.embedSourceText;
 
   final List<Object> clonedFormals = <Object>[];
@@ -197,37 +202,6 @@
     return new KernelLibraryBuilder(uri, fileUri, loader, origin);
   }
 
-  void forEachDirectSupertype(ClassBuilder cls, void f(NamedTypeBuilder type)) {
-    TypeBuilder supertype = cls.supertype;
-    if (supertype is NamedTypeBuilder) {
-      f(supertype);
-    } else if (supertype != null) {
-      unhandled("${supertype.runtimeType}", "forEachDirectSupertype",
-          cls.charOffset, cls.fileUri);
-    }
-    if (cls.interfaces != null) {
-      for (NamedTypeBuilder t in cls.interfaces) {
-        f(t);
-      }
-    }
-    if (cls.library.loader == loader &&
-        // TODO(ahe): Implement DillClassBuilder.mixedInType and remove the
-        // above check.
-        cls.mixedInType != null) {
-      f(cls.mixedInType);
-    }
-  }
-
-  void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {
-    if (cls == null) return;
-    forEachDirectSupertype(cls, (NamedTypeBuilder type) {
-      Declaration declaration = type.declaration;
-      if (declaration is ClassBuilder) {
-        set.add(declaration);
-      }
-    });
-  }
-
   /// Returns classes defined in libraries in [loader].
   List<SourceClassBuilder> collectMyClasses() {
     List<SourceClassBuilder> result = <SourceClassBuilder>[];
@@ -270,16 +244,18 @@
       bottomType.bind(loader.coreLibrary["Null"]);
       loader.resolveTypes();
       loader.computeDefaultTypes(dynamicType, bottomType, objectClassBuilder);
-      List<SourceClassBuilder> myClasses = collectMyClasses();
-      loader.checkSemantics(myClasses);
+      List<SourceClassBuilder> myClasses =
+          loader.checkSemantics(objectClassBuilder);
       loader.finishTypeVariables(objectClassBuilder, dynamicType);
       loader.buildComponent();
+      loader.finalizeInitializingFormals();
       installDefaultSupertypes();
       installSyntheticConstructors(myClasses);
       loader.resolveConstructors();
       component =
           link(new List<Library>.from(loader.libraries), nameRoot: nameRoot);
       computeCoreTypes();
+      loader.buildClassHierarchy(myClasses, objectClassBuilder);
       loader.computeHierarchy();
       loader.performTopLevelInference(myClasses);
       loader.checkSupertypes(myClasses);
@@ -412,7 +388,7 @@
   void installSyntheticConstructors(List<SourceClassBuilder> builders) {
     Class objectClass = this.objectClass;
     for (SourceClassBuilder builder in builders) {
-      if (builder.target != objectClass) {
+      if (builder.target != objectClass && !builder.isPatch) {
         if (builder.isPatch || builder.isMixinDeclaration) continue;
         if (builder.isMixinApplication) {
           installForwardingConstructors(builder);
@@ -533,7 +509,8 @@
     return new Constructor(function,
         name: constructor.name,
         initializers: <Initializer>[initializer],
-        isSynthetic: true);
+        isSynthetic: true,
+        isConst: constructor.isConst && mixin.fields.isEmpty);
   }
 
   void finishClonedParameters() {
@@ -771,12 +748,25 @@
   /// Run all transformations that are needed when building a bundle of
   /// libraries for the first time.
   void runBuildTransformations() {
+    if (loader.target.enableConstantUpdate2018) {
+      constants.transformLibraries(
+          loader.libraries,
+          new KernelConstantsBackend(),
+          loader.coreTypes,
+          new TypeEnvironment(loader.coreTypes, loader.hierarchy,
+              legacyMode: false));
+      ticker.logMs("Evaluated constants");
+    }
     backendTarget.performModularTransformationsOnLibraries(
         component, loader.coreTypes, loader.hierarchy, loader.libraries,
         logger: (String msg) => ticker.logMs(msg));
   }
 
   void runProcedureTransformations(Procedure procedure) {
+    if (loader.target.enableConstantUpdate2018) {
+      unimplemented('constant evaluation during expression evaluation',
+          procedure.fileOffset, procedure.fileUri);
+    }
     backendTarget.performTransformationsOnProcedure(
         loader.coreTypes, loader.hierarchy, procedure,
         logger: (String msg) => ticker.logMs(msg));
@@ -807,8 +797,8 @@
         } else {
           // If there's more than one patch file, it's interpreted as a part of
           // the patch library.
-          KernelLibraryBuilder part =
-              library.loader.read(patch, -1, fileUri: patch, accessor: first);
+          KernelLibraryBuilder part = library.loader.read(patch, -1,
+              origin: library, fileUri: patch, accessor: library);
           first.parts.add(part);
           part.partOfUri = first.uri;
         }
@@ -822,14 +812,13 @@
 /// arguments.
 Constructor defaultSuperConstructor(Class cls) {
   Class superclass = cls.superclass;
-  while (superclass != null && superclass.isMixinApplication) {
-    superclass = superclass.superclass;
-  }
-  for (Constructor constructor in superclass.constructors) {
-    if (constructor.name.name.isEmpty) {
-      return constructor.function.requiredParameterCount == 0
-          ? constructor
-          : null;
+  if (superclass != null) {
+    for (Constructor constructor in superclass.constructors) {
+      if (constructor.name.name.isEmpty) {
+        return constructor.function.requiredParameterCount == 0
+            ? constructor
+            : null;
+      }
     }
   }
   return null;
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
new file mode 100644
index 0000000..e32f179
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
@@ -0,0 +1,122 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.transform_set_literals;
+
+import 'dart:core' hide MapEntry;
+
+import 'package:kernel/ast.dart'
+    show
+        Arguments,
+        Class,
+        Constructor,
+        ConstructorInvocation,
+        DartType,
+        Expression,
+        InterfaceType,
+        Let,
+        Library,
+        MapEntry,
+        MapLiteral,
+        MethodInvocation,
+        Name,
+        NullLiteral,
+        Procedure,
+        SetLiteral,
+        StaticInvocation,
+        TreeNode,
+        VariableDeclaration,
+        VariableGet;
+
+import 'package:kernel/core_types.dart' show CoreTypes;
+
+import 'package:kernel/visitor.dart' show Transformer;
+
+import '../source/source_loader.dart' show SourceLoader;
+
+import 'redirecting_factory_body.dart' show RedirectingFactoryBody;
+
+// TODO(askesc): Delete this class when all backends support set literals.
+class SetLiteralTransformer extends Transformer {
+  final CoreTypes coreTypes;
+  final DartType nullType;
+  final Procedure setFactory;
+  final Procedure addMethod;
+  final Constructor unmodifiableSetConstructor;
+
+  static Procedure _findSetFactory(CoreTypes coreTypes) {
+    Procedure factory = coreTypes.index.getMember('dart:core', 'Set', '');
+    RedirectingFactoryBody body = factory?.function?.body;
+    return body?.target;
+  }
+
+  static Procedure _findAddMethod(CoreTypes coreTypes) {
+    return coreTypes.index.getMember('dart:core', 'Set', 'add');
+  }
+
+  static Constructor _findUnmodifiableSetConstructor(
+      SourceLoader<Library> loader) {
+    // We should not generally dig into libraries like this, and we should
+    // avoid dependencies on libraries other than the ones indexed by
+    // CoreTypes. This is a temporary solution until all backends have
+    // implemented support for set literals.
+    Uri collectionUri = Uri.parse("dart:collection");
+    Library collectionLibrary = loader.builders[collectionUri].target;
+    for (int i = 0; i < collectionLibrary.classes.length; i++) {
+      Class classNode = collectionLibrary.classes[i];
+      if (classNode.name == "_UnmodifiableSet") {
+        for (int j = 0; j < collectionLibrary.classes.length; j++) {
+          Constructor constructor = classNode.constructors[j];
+          if (constructor.name.name.isEmpty) {
+            return constructor;
+          }
+        }
+      }
+    }
+    return null;
+  }
+
+  SetLiteralTransformer(SourceLoader<Library> loader)
+      : coreTypes = loader.coreTypes,
+        nullType = new InterfaceType(loader.coreTypes.nullClass, []),
+        setFactory = _findSetFactory(loader.coreTypes),
+        addMethod = _findAddMethod(loader.coreTypes),
+        unmodifiableSetConstructor = _findUnmodifiableSetConstructor(loader);
+
+  TreeNode visitSetLiteral(SetLiteral node) {
+    if (node.isConst) {
+      List<MapEntry> entries = new List<MapEntry>(node.expressions.length);
+      for (int i = 0; i < node.expressions.length; i++) {
+        // expression_i: null
+        Expression entry = node.expressions[i].accept(this);
+        entries[i] = new MapEntry(entry, new NullLiteral());
+      }
+      Expression mapExp = new MapLiteral(entries,
+          keyType: node.typeArgument, valueType: nullType, isConst: true);
+      return new ConstructorInvocation(unmodifiableSetConstructor,
+          new Arguments([mapExp], types: [node.typeArgument]),
+          isConst: true);
+    } else {
+      // Outermost declaration of let chain: Set<E> setVar = new Set<E>();
+      VariableDeclaration setVar = new VariableDeclaration.forValue(
+          new StaticInvocation(
+              setFactory, new Arguments([], types: [node.typeArgument])),
+          type: new InterfaceType(coreTypes.setClass, [node.typeArgument]));
+      // Innermost body of let chain: setVar
+      Expression setExp = new VariableGet(setVar);
+      for (int i = node.expressions.length - 1; i >= 0; i--) {
+        // let _ = setVar.add(expression) in rest
+        Expression entry = node.expressions[i].accept(this);
+        setExp = new Let(
+            new VariableDeclaration.forValue(new MethodInvocation(
+                new VariableGet(setVar),
+                new Name("add"),
+                new Arguments([entry]),
+                addMethod)),
+            setExp);
+      }
+      return new Let(setVar, setExp);
+    }
+  }
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/verifier.dart b/pkg/front_end/lib/src/fasta/kernel/verifier.dart
index 547e01f..67ce675 100644
--- a/pkg/front_end/lib/src/fasta/kernel/verifier.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/verifier.dart
@@ -8,13 +8,14 @@
     show
         AsExpression,
         Class,
+        Component,
         ExpressionStatement,
         Field,
         InvalidInitializer,
+        Let,
         Library,
         Member,
         Procedure,
-        Component,
         StaticInvocation,
         SuperMethodInvocation,
         SuperPropertyGet,
@@ -34,6 +35,8 @@
 
 import '../type_inference/type_schema.dart' show TypeSchemaVisitor, UnknownType;
 
+import 'kernel_shadow_ast.dart' show SyntheticExpressionJudgment;
+
 import 'redirecting_factory_body.dart'
     show RedirectingFactoryBody, getRedirectingFactoryBody;
 
@@ -136,6 +139,14 @@
   }
 
   @override
+  visitLet(Let node) {
+    if (node is SyntheticExpressionJudgment) {
+      problem(node, "Leaking shadow node: ${node.runtimeType}");
+    }
+    super.visitLet(node);
+  }
+
+  @override
   visitLibrary(Library node) {
     // Issue(http://dartbug.com/32530)
     if (skipPlatform && node.importUri.scheme == 'dart') {
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index 1dcea9d..8823bfa 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -33,8 +33,6 @@
 
 import 'ticker.dart' show Ticker;
 
-import 'type_inference/type_inference_engine.dart' show TypeInferenceEngine;
-
 const String untranslatableUriScheme = "org-dartlang-untranslatable-uri";
 
 abstract class Loader<L> {
@@ -78,8 +76,6 @@
 
   Template<SummaryTemplate> get outlineSummaryTemplate;
 
-  TypeInferenceEngine get typeInferenceEngine => null;
-
   bool get isSourceLoader => false;
 
   /// Look up a library builder by the name [uri], or if such doesn't
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 166d266..51e3b9e 100644
--- a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
@@ -136,11 +136,6 @@
   }
 
   @override
-  void beginExpressionStatement(Token token) {
-    listener?.beginExpressionStatement(token);
-  }
-
-  @override
   void beginFactoryMethod(
       Token lastConsumed, Token externalToken, Token constToken) {
     listener?.beginFactoryMethod(lastConsumed, externalToken, constToken);
@@ -546,11 +541,6 @@
   }
 
   @override
-  void endExpressionStatement(Token token) {
-    listener?.endExpressionStatement(token);
-  }
-
-  @override
   void endFactoryMethod(
       Token beginToken, Token factoryKeyword, Token endToken) {
     listener?.endFactoryMethod(beginToken, factoryKeyword, endToken);
@@ -625,8 +615,8 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
-    listener?.endFunctionType(functionToken);
+  void endFunctionType(Token functionToken, Token questionMark) {
+    listener?.endFunctionType(functionToken, questionMark);
   }
 
   @override
@@ -1002,6 +992,11 @@
   }
 
   @override
+  void handleExpressionStatement(Token token) {
+    listener?.handleExpressionStatement(token);
+  }
+
+  @override
   void handleExtraneousExpression(Token token, Message message) {
     listener?.handleExtraneousExpression(token, message);
   }
@@ -1349,8 +1344,8 @@
   }
 
   @override
-  void handleType(Token beginToken) {
-    listener?.handleType(beginToken);
+  void handleType(Token beginToken, Token questionMark) {
+    listener?.handleType(beginToken, questionMark);
   }
 
   @override
@@ -1399,6 +1394,11 @@
   }
 
   @override
+  void reportErrorIfNullableType(Token questionMark) {
+    listener?.reportErrorIfNullableType(questionMark);
+  }
+
+  @override
   set suppressParseErrors(bool value) {
     listener?.suppressParseErrors = value;
   }
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 457928d..d681804 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -6,7 +6,7 @@
 
 import '../../scanner/token.dart' show Token;
 
-import '../fasta_codes.dart' show Message;
+import '../fasta_codes.dart' show Message, templateUnexpectedToken;
 
 import '../quote.dart' show UnescapeErrorListener;
 
@@ -18,6 +18,8 @@
 
 import 'member_kind.dart' show MemberKind;
 
+import 'util.dart' show optional;
+
 /// A parser event listener that does nothing except throw exceptions
 /// on parser errors.
 ///
@@ -249,8 +251,6 @@
     logEvent("Export");
   }
 
-  void beginExpressionStatement(Token token) {}
-
   /// Called by [Parser] after parsing an extraneous expression as error
   /// recovery. For a stack-based listener, the suggested action is to discard
   /// an expression from the stack.
@@ -258,7 +258,7 @@
     logEvent("ExtraneousExpression");
   }
 
-  void endExpressionStatement(Token token) {
+  void handleExpressionStatement(Token token) {
     logEvent("ExpressionStatement");
   }
 
@@ -933,10 +933,22 @@
     logEvent("TryStatement");
   }
 
-  void handleType(Token beginToken) {
+  void handleType(Token beginToken, Token questionMark) {
     logEvent("Type");
   }
 
+  // TODO(danrubel): Remove this once all listeners have been updated
+  // to properly handle nullable types
+  void reportErrorIfNullableType(Token questionMark) {
+    if (questionMark != null) {
+      assert(optional('?', questionMark));
+      handleRecoverableError(
+          templateUnexpectedToken.withArguments(questionMark),
+          questionMark,
+          questionMark);
+    }
+  }
+
   void handleNoName(Token token) {
     logEvent("NoName");
   }
@@ -949,7 +961,7 @@
   /// - Type variables
   /// - Return type
   /// - Formal parameters
-  void endFunctionType(Token functionToken) {
+  void endFunctionType(Token functionToken, Token questionMark) {
     logEvent("FunctionType");
   }
 
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 4e21b72..a3a59c2 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -100,6 +100,7 @@
         isLetter,
         isLetterOrDigit,
         isOneOf,
+        isOneOfOrEof,
         isWhitespace,
         optional;
 
@@ -263,15 +264,7 @@
 
   /// Experimental flag for enabling set literal support.
   /// See https://github.com/dart-lang/sdk/issues/35121
-  bool enableSetLiterals = false;
-
-  /// Obsolete experimental flag for enabling set literal support.
-  /// Use enableSetLiterals instead.
-  /// TODO(danrubel): Remove this once this has been merged into the analyzer
-  /// branch and the references to this have been cleaned up.
-  set parseSetLiterals(bool value) {
-    enableSetLiterals = value;
-  }
+  bool enableSetLiterals = true;
 
   /// Represents parser state: what asynchronous syntax is allowed in the
   /// function being currently parsed. In rare situations, this can be set by
@@ -343,6 +336,10 @@
     int count = 0;
     DirectiveContext directiveState = new DirectiveContext();
     token = syntheticPreviousToken(token);
+    if (identical(token.next.type, TokenType.SCRIPT_TAG)) {
+      directiveState?.checkScriptTag(this, token.next);
+      token = parseScript(token);
+    }
     while (!token.next.isEof) {
       final Token start = token.next;
       token = parseTopLevelDeclarationImpl(token, directiveState);
@@ -459,10 +456,6 @@
   /// ```
   Token parseTopLevelDeclarationImpl(
       Token token, DirectiveContext directiveState) {
-    if (identical(token.next.type, TokenType.SCRIPT_TAG)) {
-      directiveState?.checkScriptTag(this, token.next);
-      return parseScript(token);
-    }
     token = parseMetadataStar(token);
     Token next = token.next;
     if (next.isTopLevelKeyword) {
@@ -1134,18 +1127,50 @@
     return token;
   }
 
+  /// Parse the formal parameters of a getter (which shouldn't have parameters)
+  /// or function or method.
+  Token parseGetterOrFormalParameters(
+      Token token, Token name, bool isGetter, MemberKind kind) {
+    Token next = token.next;
+    if (optional("(", next)) {
+      if (isGetter) {
+        reportRecoverableError(next, fasta.messageGetterWithFormals);
+      }
+      token = parseFormalParameters(token, kind);
+    } else if (isGetter) {
+      listener.handleNoFormalParameters(next, kind);
+    } else {
+      // Recovery
+      if (optional('operator', name)) {
+        Token next = name.next;
+        if (next.isOperator) {
+          name = next;
+        } else if (isUnaryMinus(next)) {
+          name = next.next;
+        }
+      }
+      reportRecoverableError(name, missingParameterMessage(kind));
+      token = rewriter.insertParens(token, false);
+      token = parseFormalParametersRest(token, kind);
+    }
+    return token;
+  }
+
   Token parseFormalParametersOpt(Token token, MemberKind kind) {
     Token next = token.next;
     if (optional('(', next)) {
-      return parseFormalParameters(token, kind);
+      token = parseFormalParameters(token, kind);
     } else {
       listener.handleNoFormalParameters(next, kind);
-      return token;
     }
+    return token;
   }
 
   Token skipFormalParameters(Token token, MemberKind kind) {
-    token = token.next;
+    return skipFormalParametersRest(token.next, kind);
+  }
+
+  Token skipFormalParametersRest(Token token, MemberKind kind) {
     assert(optional('(', token));
     // TODO(ahe): Shouldn't this be `beginFormalParameters`?
     listener.beginOptionalFormalParameters(token);
@@ -1163,9 +1188,9 @@
     Token next = token.next;
     if (!optional('(', next)) {
       reportRecoverableError(next, missingParameterMessage(kind));
-      rewriter.insertParens(token, false);
+      next = rewriter.insertParens(token, false);
     }
-    return parseFormalParameters(token, kind);
+    return parseFormalParametersRest(next, kind);
   }
 
   /// Parses the formal parameter list of a function given that the left
@@ -1174,7 +1199,16 @@
   /// If `kind == MemberKind.GeneralizedFunctionType`, then names may be
   /// omitted (except for named arguments). Otherwise, types may be omitted.
   Token parseFormalParameters(Token token, MemberKind kind) {
-    Token begin = token = token.next;
+    return parseFormalParametersRest(token.next, kind);
+  }
+
+  /// Parses the formal parameter list of a function given that the left
+  /// parenthesis passed in as [token].
+  ///
+  /// If `kind == MemberKind.GeneralizedFunctionType`, then names may be
+  /// omitted (except for named arguments). Otherwise, types may be omitted.
+  Token parseFormalParametersRest(Token token, MemberKind kind) {
+    Token begin = token;
     assert(optional('(', token));
     listener.beginFormalParameters(begin, kind);
     int parameterCount = 0;
@@ -2285,8 +2319,8 @@
       token = name;
       listener.handleNoTypeVariables(token.next);
     }
-    checkFormals(token, name, isGetter, MemberKind.TopLevelMethod);
-    token = parseFormalParametersOpt(token, MemberKind.TopLevelMethod);
+    token = parseGetterOrFormalParameters(
+        token, name, isGetter, MemberKind.TopLevelMethod);
     AsyncModifier savedAsyncModifier = asyncState;
     Token asyncToken = token.next;
     token = parseAsyncModifierOpt(token);
@@ -2318,27 +2352,6 @@
     return token;
   }
 
-  void checkFormals(Token token, Token name, bool isGetter, MemberKind kind) {
-    Token next = token.next;
-    if (optional("(", next)) {
-      if (isGetter) {
-        reportRecoverableError(next, fasta.messageGetterWithFormals);
-      }
-    } else if (!isGetter) {
-      if (optional('operator', name)) {
-        Token next = name.next;
-        if (next.isOperator) {
-          name = next;
-        } else if (isUnaryMinus(next)) {
-          name = next.next;
-        }
-      }
-      // Recovery
-      reportRecoverableError(name, missingParameterMessage(kind));
-      rewriter.insertParens(token, false);
-    }
-  }
-
   Token parseFieldInitializerOpt(
       Token token, Token name, Token varFinalOrConst, bool isTopLevel) {
     Token next = token.next;
@@ -2538,7 +2551,14 @@
         token = next;
         next = token.next;
       }
-      if (!optional('(', next)) {
+      if (optional('=', next)) {
+        if (optional('super', token)) {
+          // parseExpression will report error on assignment to super
+        } else {
+          reportRecoverableError(
+              token, fasta.messageFieldInitializedOutsideDeclaringClass);
+        }
+      } else if (!optional('(', next)) {
         reportRecoverableError(
             next, fasta.templateExpectedAfterButGot.withArguments('('));
         rewriter.insertParens(token, false);
@@ -3016,11 +3036,8 @@
     MemberKind kind = staticToken != null
         ? MemberKind.StaticMethod
         : MemberKind.NonStaticMethod;
-    checkFormals(token, name, isGetter, kind);
     Token beforeParam = token;
-    token = isGetter
-        ? parseFormalParametersOpt(token, kind)
-        : parseFormalParametersRequiredOpt(token, kind);
+    token = parseGetterOrFormalParameters(token, name, isGetter, kind);
     token = parseInitializersOpt(token);
 
     AsyncModifier savedAsyncModifier = asyncState;
@@ -3656,10 +3673,9 @@
     // TODO(brianwilkerson): If the next token is not the start of a valid
     // expression, then this method shouldn't report that we have an expression
     // statement.
-    listener.beginExpressionStatement(token.next);
     token = parseExpression(token);
     token = ensureSemicolon(token);
-    listener.endExpressionStatement(token);
+    listener.handleExpressionStatement(token);
     return token;
   }
 
@@ -4077,17 +4093,16 @@
     return token;
   }
 
-  Token parseParenthesizedCondition(Token token) {
-    if (!optional('(', token.next)) {
+  Token ensureParenthesizedCondition(Token token) {
+    Token openParen = token.next;
+    if (!optional('(', openParen)) {
       // Recover
-      Token next = token.next;
       reportRecoverableError(
-          next, fasta.templateExpectedToken.withArguments('('));
-      rewriter.insertParens(token, false);
+          openParen, fasta.templateExpectedToken.withArguments('('));
+      openParen = rewriter.insertParens(token, false);
     }
-    Token begin = token.next;
-    token = parseExpressionInParenthesis(token);
-    listener.handleParenthesizedCondition(begin);
+    token = parseExpressionInParenthesisRest(openParen);
+    listener.handleParenthesizedCondition(openParen);
     return token;
   }
 
@@ -4099,7 +4114,10 @@
   }
 
   Token parseExpressionInParenthesis(Token token) {
-    token = token.next;
+    return parseExpressionInParenthesisRest(token.next);
+  }
+
+  Token parseExpressionInParenthesisRest(Token token) {
     assert(optional('(', token));
     BeginToken begin = token;
     token = parseExpression(token);
@@ -4444,8 +4462,6 @@
         case 2:
           return parseLiteralMapSuffix(token, constKeyword);
         default:
-          // TODO(danrubel): Add a compile time warning that set literals
-          // require one type argument and map literals require two.
           return parseLiteralSetOrMapSuffix(token, constKeyword);
       }
     }
@@ -4484,11 +4500,7 @@
     Token name = beforeName.next;
     if (name.isIdentifier) {
       TypeParamOrArgInfo typeParam = computeTypeParamOrArg(name);
-      Token next = name;
-      if (typeParam != noTypeParamOrArg) {
-        next = typeParam.skip(next);
-      }
-      next = next.next;
+      Token next = typeParam.skip(name).next;
       if (optional('(', next)) {
         if (looksLikeFunctionBody(next.endGroup.next)) {
           return parseFunctionLiteral(
@@ -4499,15 +4511,14 @@
     return parseSend(token, context);
   }
 
-  Token parseRequiredArguments(Token token) {
+  Token ensureArguments(Token token) {
     Token next = token.next;
     if (!optional('(', next)) {
       reportRecoverableError(
-          token, fasta.templateExpectedButGot.withArguments('('));
-      rewriter.insertParens(token, false);
+          token, fasta.templateExpectedAfterButGot.withArguments('('));
+      next = rewriter.insertParens(token, false);
     }
-    token = parseArguments(token);
-    return token;
+    return parseArgumentsRest(next);
   }
 
   Token parseConstructorInvocationArguments(Token token) {
@@ -4517,7 +4528,7 @@
       TypeParamOrArgInfo typeArg = computeTypeParamOrArg(token);
       if (typeArg == noTypeParamOrArg) {
         reportRecoverableError(
-            token, fasta.templateExpectedButGot.withArguments('('));
+            token, fasta.templateExpectedAfterButGot.withArguments('('));
       } else {
         reportRecoverableError(
             token, fasta.messageConstructorWithTypeArguments);
@@ -4526,11 +4537,10 @@
         next = token.next;
       }
       if (!optional('(', next)) {
-        rewriter.insertParens(token, false);
+        next = rewriter.insertParens(token, false);
       }
     }
-    token = parseArguments(token);
-    return token;
+    return parseArgumentsRest(next);
   }
 
   /// ```
@@ -4802,7 +4812,11 @@
   /// ;
   /// ```
   Token parseArguments(Token token) {
-    Token begin = token = token.next;
+    return parseArgumentsRest(token.next);
+  }
+
+  Token parseArgumentsRest(Token token) {
+    Token begin = token;
     assert(optional('(', begin));
     listener.beginArguments(begin);
     int argumentCount = 0;
@@ -4868,11 +4882,26 @@
     if (optional('!', token.next)) {
       not = token = token.next;
     }
-    token = computeType(token, true).ensureTypeNotVoid(token, this);
+    TypeInfo typeInfo = computeTypeAfterIsOrAs(token);
+    token = typeInfo.ensureTypeNotVoid(token, this);
     listener.handleIsOperator(operator, not);
     return skipChainedAsIsOperators(token);
   }
 
+  TypeInfo computeTypeAfterIsOrAs(Token token) {
+    TypeInfo typeInfo = computeType(token, true);
+    if (typeInfo.isNullable) {
+      Token next = typeInfo.skipType(token).next;
+      if (!isOneOfOrEof(next, const [')', '?', ';', 'is', 'as'])) {
+        // TODO(danrubel): investigate other situations
+        // where `?` should be considered part of the type info
+        // rather than the start of a conditional expression.
+        typeInfo = typeInfo.asNonNullable;
+      }
+    }
+    return typeInfo;
+  }
+
   /// ```
   /// typeCast:
   ///   'as' type
@@ -4881,7 +4910,8 @@
   Token parseAsOperatorRest(Token token) {
     Token operator = token = token.next;
     assert(optional('as', operator));
-    token = computeType(token, true).ensureTypeNotVoid(token, this);
+    TypeInfo typeInfo = computeTypeAfterIsOrAs(token);
+    token = typeInfo.ensureTypeNotVoid(token, this);
     listener.handleAsOperator(operator);
     return skipChainedAsIsOperators(token);
   }
@@ -4899,7 +4929,8 @@
       if (optional('!', next.next)) {
         next = next.next;
       }
-      token = computeType(next, true).skipType(next);
+      TypeInfo typeInfo = computeTypeAfterIsOrAs(next);
+      token = typeInfo.skipType(next);
       next = token.next;
       value = next.stringValue;
     }
@@ -5020,6 +5051,7 @@
       TypeInfo typeInfo,
       bool onlyParseVariableDeclarationStart = false]) {
     typeInfo ??= computeType(beforeType, false);
+
     Token token = typeInfo.skipType(beforeType);
     Token next = token.next;
 
@@ -5038,11 +5070,49 @@
             computeTypeParamOrArg(next).parseVariables(next, this);
         listener.beginLocalFunctionDeclaration(start.next);
         token = typeInfo.parseType(beforeType, this);
-        next = token.next;
         return parseNamedFunctionRest(token, start.next, beforeFormals, false);
       }
     }
 
+    if (beforeType == start &&
+        typeInfo.isNullable &&
+        typeInfo.couldBeExpression) {
+      assert(optional('?', token));
+      assert(next.isIdentifier);
+      Token afterIdentifier = next.next;
+      //
+      // found <typeref> `?` <identifier>
+      // with no annotations or modifiers preceeding it
+      //
+      if (optional('=', afterIdentifier)) {
+        //
+        // look past the next expression
+        // to determine if this is part of a conditional expression
+        //
+        final originalListener = listener;
+        listener = new ForwardingListener();
+        // TODO(danrubel): consider using TokenStreamGhostWriter here
+        Token afterExpression =
+            parseExpressionWithoutCascade(afterIdentifier).next;
+        listener = originalListener;
+
+        if (optional(':', afterExpression)) {
+          // Looks like part of a conditional expression.
+          // Drop the type information and reset the last consumed token.
+          typeInfo = noType;
+          token = start;
+          next = token.next;
+        }
+      } else if (!afterIdentifier.isKeyword &&
+          !isOneOfOrEof(afterIdentifier, const [';', ',', ')'])) {
+        // Looks like part of a conditional expression.
+        // Drop the type information and reset the last consumed token.
+        typeInfo = noType;
+        token = start;
+        next = token.next;
+      }
+    }
+
     if (token == start) {
       // If no annotation, modifier, or type, and this is not a local function
       // then this must be an expression statement.
@@ -5052,6 +5122,7 @@
         return parseExpressionStatement(start);
       }
     }
+
     if (next.type.isBuiltIn &&
         beforeType == start &&
         typeInfo.couldBeExpression) {
@@ -5136,7 +5207,7 @@
     Token ifToken = token.next;
     assert(optional('if', ifToken));
     listener.beginIfStatement(ifToken);
-    token = parseParenthesizedCondition(ifToken);
+    token = ensureParenthesizedCondition(ifToken);
     listener.beginThenStatement(token.next);
     token = parseStatement(token);
     listener.endThenStatement(token);
@@ -5354,7 +5425,7 @@
     Token whileToken = token.next;
     assert(optional('while', whileToken));
     listener.beginWhileStatement(whileToken);
-    token = parseParenthesizedCondition(whileToken);
+    token = ensureParenthesizedCondition(whileToken);
     listener.beginWhileStatementBody(token.next);
     LoopState savedLoopState = loopState;
     loopState = LoopState.InsideLoop;
@@ -5387,7 +5458,7 @@
       whileToken = rewriter.insertToken(token,
           new SyntheticKeywordToken(Keyword.WHILE, whileToken.charOffset));
     }
-    token = parseParenthesizedCondition(whileToken);
+    token = ensureParenthesizedCondition(whileToken);
     token = ensureSemicolon(token);
     listener.endDoWhileStatement(doToken, whileToken, token);
     return token;
@@ -5644,7 +5715,7 @@
     Token switchKeyword = token.next;
     assert(optional('switch', switchKeyword));
     listener.beginSwitchStatement(switchKeyword);
-    token = parseParenthesizedCondition(switchKeyword);
+    token = ensureParenthesizedCondition(switchKeyword);
     LoopState savedLoopState = loopState;
     if (loopState == LoopState.OutsideLoop) {
       loopState = LoopState.InsideSwitch;
diff --git a/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart b/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
index 86170d4..9a8b367 100644
--- a/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
+++ b/pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart
@@ -37,9 +37,6 @@
   // }
   //
 
-  /// Initialize a newly created re-writer.
-  TokenStreamRewriter();
-
   /// Insert a synthetic open and close parenthesis and return the new synthetic
   /// open parenthesis. If [insertIdentifier] is true, then a synthetic
   /// identifier is included between the open and close parenthesis.
@@ -140,3 +137,70 @@
     return current;
   }
 }
+
+/// Provides the capability of adding tokens that lead into a token stream
+/// without modifying the original token stream and not setting the any token's
+/// `previous` field.
+class TokenStreamGhostWriter implements TokenStreamRewriter {
+  @override
+  Token insertParens(Token token, bool includeIdentifier) {
+    Token next = token.next;
+    int offset = next.charOffset;
+    BeginToken leftParen =
+        next = new SyntheticBeginToken(TokenType.OPEN_PAREN, offset);
+    if (includeIdentifier) {
+      Token identifier =
+          new SyntheticStringToken(TokenType.IDENTIFIER, '', offset, 0);
+      next.next = identifier;
+      next = identifier;
+    }
+    Token rightParen = new SyntheticToken(TokenType.CLOSE_PAREN, offset);
+    next.next = rightParen;
+    rightParen.next = token.next;
+
+    return leftParen;
+  }
+
+  /// Insert a synthetic identifier after [token] and return the new identifier.
+  Token insertSyntheticIdentifier(Token token) {
+    return insertToken(
+        token,
+        new SyntheticStringToken(
+            TokenType.IDENTIFIER, '', token.next.charOffset, 0));
+  }
+
+  @override
+  Token insertToken(Token token, Token newToken) {
+    newToken.next = token.next;
+    return newToken;
+  }
+
+  @override
+  Token moveSynthetic(Token token, Token endGroup) {
+    Token newEndGroup =
+        new SyntheticToken(endGroup.type, token.next.charOffset);
+    newEndGroup.next = token.next;
+    return newEndGroup;
+  }
+
+  @override
+  Token replaceTokenFollowing(Token previousToken, Token replacementToken) {
+    Token replacedToken = previousToken.next;
+
+    (replacementToken as SimpleToken).precedingComments =
+        replacedToken.precedingComments;
+
+    _lastTokenInChain(replacementToken).next = replacedToken.next;
+    return replacementToken;
+  }
+
+  /// Given the [firstToken] in a chain of tokens to be inserted, return the
+  /// last token in the chain.
+  Token _lastTokenInChain(Token firstToken) {
+    Token current = firstToken;
+    while (current.next != null && current.next.type != TokenType.EOF) {
+      current = current.next;
+    }
+    return current;
+  }
+}
diff --git a/pkg/front_end/lib/src/fasta/parser/type_info.dart b/pkg/front_end/lib/src/fasta/parser/type_info.dart
index 585fedf3..8214825 100644
--- a/pkg/front_end/lib/src/fasta/parser/type_info.dart
+++ b/pkg/front_end/lib/src/fasta/parser/type_info.dart
@@ -17,12 +17,19 @@
 /// [TypeInfo] provides information collected by [computeType]
 /// about a particular type reference.
 abstract class TypeInfo {
+  /// Return type info representing the receiver without the trailing `?`
+  /// or the receiver if the receiver does not represent a nullable type.
+  TypeInfo get asNonNullable;
+
   /// Return `true` if the tokens comprising the type represented by the
   /// receiver could be interpreted as a valid standalone expression.
-  /// For example, `A` or `A.b` could be interpreted as a type references
-  /// or as expressions, while `A<T>` only looks like a type reference.
+  /// For example, `A` or `A.b` could be interpreted as type references
+  /// or expressions, while `A<T>` only looks like a type reference.
   bool get couldBeExpression;
 
+  /// Return true if the receiver has a trailing `?`.
+  bool get isNullable;
+
   /// Call this function when the token after [token] must be a type (not void).
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type, inserting a synthetic type reference if
@@ -183,7 +190,7 @@
   if (isGeneralizedFunctionType(next)) {
     // `Function` ...
     return new ComplexTypeInfo(token, noTypeParamOrArg)
-        .computeNoTypeGFT(required);
+        .computeNoTypeGFT(token, required);
   }
 
   // We've seen an identifier.
@@ -194,14 +201,24 @@
     if (typeParamOrArg.isSimpleTypeArgument) {
       // We've seen identifier `<` identifier `>`
       next = typeParamOrArg.skip(next).next;
-      if (!isGeneralizedFunctionType(next)) {
+      if (optional('?', next)) {
+        next = next.next;
+        if (!isGeneralizedFunctionType(next)) {
+          if ((required || looksLikeName(next)) &&
+              typeParamOrArg == simpleTypeArgument1) {
+            // identifier `<` identifier `>` `?` identifier
+            return simpleNullableTypeWith1Argument;
+          }
+          // identifier `<` identifier `>` `?` non-identifier
+          return noType;
+        }
+      } else if (!isGeneralizedFunctionType(next)) {
         if (required || looksLikeName(next)) {
           // identifier `<` identifier `>` identifier
           return typeParamOrArg.typeInfo;
-        } else {
-          // identifier `<` identifier `>` non-identifier
-          return noType;
         }
+        // identifier `<` identifier `>` non-identifier
+        return noType;
       }
     }
     // TODO(danrubel): Consider adding a const for
@@ -221,14 +238,29 @@
       // We've seen identifier `.` identifier
       typeParamOrArg = computeTypeParamOrArg(next, inDeclaration);
       next = next.next;
-      if (typeParamOrArg == noTypeParamOrArg &&
-          !isGeneralizedFunctionType(next)) {
-        if (required || looksLikeName(next)) {
-          // identifier `.` identifier identifier
-          return prefixedType;
+      if (typeParamOrArg == noTypeParamOrArg) {
+        if (optional('?', next)) {
+          next = next.next;
+          if (!isGeneralizedFunctionType(next)) {
+            if (required || looksLikeName(next)) {
+              // identifier `.` identifier `?` identifier
+              // TODO(danrubel): consider adding PrefixedNullableType
+              // Fall through to build complex type
+            } else {
+              // identifier `.` identifier `?` non-identifier
+              return noType;
+            }
+          }
         } else {
-          // identifier `.` identifier non-identifier
-          return noType;
+          if (!isGeneralizedFunctionType(next)) {
+            if (required || looksLikeName(next)) {
+              // identifier `.` identifier identifier
+              return prefixedType;
+            } else {
+              // identifier `.` identifier non-identifier
+              return noType;
+            }
+          }
         }
       }
       // identifier `.` identifier
@@ -251,7 +283,17 @@
         .computeIdentifierGFT(required);
   }
 
-  if (required || looksLikeName(next)) {
+  if (optional('?', next)) {
+    next = next.next;
+    if (isGeneralizedFunctionType(next)) {
+      // identifier `?` Function `(`
+      return new ComplexTypeInfo(token, noTypeParamOrArg)
+          .computeIdentifierQuestionGFT(required);
+    } else if (required || looksLikeName(next)) {
+      // identifier `?`
+      return simpleNullableType;
+    }
+  } else if (required || looksLikeName(next)) {
     // identifier identifier
     return simpleType;
   }
diff --git a/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart b/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
index f46d819..2063d4d 100644
--- a/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
+++ b/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
@@ -38,6 +38,10 @@
 /// when there is a single identifier as the type reference.
 const TypeInfo simpleType = const SimpleType();
 
+/// [SimpleNullableType] is a specialized [TypeInfo] returned by [computeType]
+/// when there is a single identifier followed by `?` as the type reference.
+const TypeInfo simpleNullableType = const SimpleNullableType();
+
 /// [PrefixedType] is a specialized [TypeInfo] returned by [computeType]
 /// when the type reference is of the form: identifier `.` identifier.
 const TypeInfo prefixedType = const PrefixedType();
@@ -60,6 +64,12 @@
 const TypeInfo simpleTypeWith1ArgumentGtGt =
     const SimpleTypeWith1Argument(simpleTypeArgument1GtGt);
 
+/// [SimpleNullableTypeWith1Argument] is a specialized [TypeInfo] returned by
+/// [computeType] when the type reference is of the form:
+/// identifier `<` identifier `>` `?`.
+const TypeInfo simpleNullableTypeWith1Argument =
+    const SimpleNullableTypeWith1Argument();
+
 /// [SimpleTypeArgument1] is a specialized [TypeParamOrArgInfo] returned by
 /// [computeTypeParamOrArg] when the type reference is of the form:
 /// `<` identifier `>`.
@@ -82,9 +92,15 @@
   const NoType();
 
   @override
+  TypeInfo get asNonNullable => this;
+
+  @override
   bool get couldBeExpression => false;
 
   @override
+  bool get isNullable => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) {
     parser.reportRecoverableErrorWithToken(
         token.next, fasta.templateExpectedType);
@@ -117,9 +133,15 @@
   const PrefixedType();
 
   @override
+  TypeInfo get asNonNullable => this;
+
+  @override
   bool get couldBeExpression => true;
 
   @override
+  bool get isNullable => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) =>
       parseType(token, parser);
 
@@ -148,7 +170,7 @@
     listener.handleQualified(period);
 
     listener.handleNoTypeArguments(token.next);
-    listener.handleType(start);
+    listener.handleType(start, null);
     return token;
   }
 
@@ -158,6 +180,32 @@
   }
 }
 
+/// See documentation on the [simpleNullableTypeWith1Argument] const.
+class SimpleNullableTypeWith1Argument extends SimpleTypeWith1Argument {
+  const SimpleNullableTypeWith1Argument() : super(simpleTypeArgument1);
+
+  @override
+  TypeInfo get asNonNullable => simpleTypeWith1Argument;
+
+  @override
+  bool get isNullable => true;
+
+  @override
+  Token parseTypeRest(Token start, Token token, Parser parser) {
+    token = token.next;
+    assert(optional('?', token));
+    parser.listener.handleType(start, token);
+    return token;
+  }
+
+  @override
+  Token skipType(Token token) {
+    token = super.skipType(token).next;
+    assert(optional('?', token));
+    return token;
+  }
+}
+
 /// See documentation on the [simpleTypeWith1Argument] const.
 class SimpleTypeWith1Argument implements TypeInfo {
   final TypeParamOrArgInfo typeArg;
@@ -165,9 +213,15 @@
   const SimpleTypeWith1Argument(this.typeArg);
 
   @override
+  TypeInfo get asNonNullable => this;
+
+  @override
   bool get couldBeExpression => false;
 
   @override
+  bool get isNullable => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) =>
       parseType(token, parser);
 
@@ -183,10 +237,13 @@
   Token parseType(Token token, Parser parser) {
     Token start = token = token.next;
     assert(token.isKeywordOrIdentifier);
-    Listener listener = parser.listener;
-    listener.handleIdentifier(token, IdentifierContext.typeReference);
+    parser.listener.handleIdentifier(token, IdentifierContext.typeReference);
     token = typeArg.parseArguments(token, parser);
-    listener.handleType(start);
+    return parseTypeRest(start, token, parser);
+  }
+
+  Token parseTypeRest(Token start, Token token, Parser parser) {
+    parser.listener.handleType(start, null);
     return token;
   }
 
@@ -198,14 +255,44 @@
   }
 }
 
+/// See documentation on the [simpleNullableType] const.
+class SimpleNullableType extends SimpleType {
+  const SimpleNullableType();
+
+  @override
+  TypeInfo get asNonNullable => simpleType;
+
+  @override
+  bool get isNullable => true;
+
+  @override
+  Token parseTypeRest(Token start, Parser parser) {
+    Token token = start.next;
+    assert(optional('?', token));
+    parser.listener.handleType(start, token);
+    return token;
+  }
+
+  @override
+  Token skipType(Token token) {
+    return token.next.next;
+  }
+}
+
 /// See documentation on the [simpleType] const.
 class SimpleType implements TypeInfo {
   const SimpleType();
 
   @override
+  TypeInfo get asNonNullable => this;
+
+  @override
   bool get couldBeExpression => true;
 
   @override
+  bool get isNullable => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) =>
       parseType(token, parser);
 
@@ -221,10 +308,13 @@
   Token parseType(Token token, Parser parser) {
     token = token.next;
     assert(isValidTypeReference(token));
-    Listener listener = parser.listener;
-    listener.handleIdentifier(token, IdentifierContext.typeReference);
+    parser.listener.handleIdentifier(token, IdentifierContext.typeReference);
     token = noTypeParamOrArg.parseArguments(token, parser);
-    listener.handleType(token);
+    return parseTypeRest(token, parser);
+  }
+
+  Token parseTypeRest(Token token, Parser parser) {
+    parser.listener.handleType(token, null);
     return token;
   }
 
@@ -239,9 +329,15 @@
   const VoidType();
 
   @override
+  TypeInfo get asNonNullable => this;
+
+  @override
   bool get couldBeExpression => false;
 
   @override
+  bool get isNullable => false;
+
+  @override
   Token ensureTypeNotVoid(Token token, Parser parser) {
     // Report an error, then parse `void` as if it were a type name.
     parser.reportRecoverableError(token.next, fasta.messageInvalidVoid);
@@ -301,6 +397,9 @@
   /// Type arguments were seen during analysis.
   final TypeParamOrArgInfo typeArguments;
 
+  /// The token before the trailing question mark or `null` if none.
+  Token beforeQuestionMark;
+
   /// The last token in the type reference.
   Token end;
 
@@ -313,10 +412,27 @@
   bool gftHasReturnType;
 
   ComplexTypeInfo(Token beforeStart, this.typeArguments)
-      : this.start = beforeStart.next;
+      : this.start = beforeStart.next {
+    assert(typeArguments != null);
+  }
+
+  ComplexTypeInfo._nonNullable(this.start, this.typeArguments, this.end,
+      this.typeVariableStarters, this.gftHasReturnType);
 
   @override
-  bool get couldBeExpression => false;
+  TypeInfo get asNonNullable {
+    return beforeQuestionMark == null
+        ? this
+        : new ComplexTypeInfo._nonNullable(start, typeArguments,
+            beforeQuestionMark, typeVariableStarters, gftHasReturnType);
+  }
+
+  @override
+  bool get couldBeExpression =>
+      typeArguments == noTypeParamOrArg && typeVariableStarters.isEmpty;
+
+  @override
+  bool get isNullable => beforeQuestionMark != null;
 
   @override
   Token ensureTypeNotVoid(Token token, Parser parser) =>
@@ -372,7 +488,17 @@
           }
         }
         token = typeArguments.parseArguments(token, parser);
-        parser.listener.handleType(typeRefOrPrefix);
+
+        // Only consume the `?` if it is part of the complex type
+        Token questionMark = token.next;
+        if (optional('?', questionMark) &&
+            (typeVariableEndGroups.isNotEmpty || beforeQuestionMark != null)) {
+          token = questionMark;
+        } else {
+          questionMark = null;
+        }
+
+        parser.listener.handleType(typeRefOrPrefix, questionMark);
       }
     }
 
@@ -381,15 +507,26 @@
       token = token.next;
       assert(optional('Function', token));
       Token functionToken = token;
+
       if (optional("<", token.next)) {
         // Skip type parameters, they were parsed above.
         token = typeVariableEndGroups[endGroupIndex];
         assert(optional('>', token));
       }
-      --endGroupIndex;
       token = parser.parseFormalParametersRequiredOpt(
           token, MemberKind.GeneralizedFunctionType);
-      parser.listener.endFunctionType(functionToken);
+
+      // Only consume the `?` if it is part of the complex type
+      Token questionMark = token.next;
+      if (optional('?', questionMark) &&
+          (endGroupIndex > 0 || beforeQuestionMark != null)) {
+        token = questionMark;
+      } else {
+        questionMark = null;
+      }
+
+      --endGroupIndex;
+      parser.listener.endFunctionType(functionToken, questionMark);
     }
 
     // There are two situations in which the [token] != [end]:
@@ -412,10 +549,11 @@
 
   /// Given `Function` non-identifier, compute the type
   /// and return the receiver or one of the [TypeInfo] constants.
-  TypeInfo computeNoTypeGFT(bool required) {
+  TypeInfo computeNoTypeGFT(Token beforeStart, bool required) {
     assert(optional('Function', start));
+    assert(beforeStart.next == start);
 
-    computeRest(start, required);
+    computeRest(beforeStart, required);
     if (gftHasReturnType == null) {
       return required ? simpleType : noType;
     }
@@ -429,7 +567,7 @@
     assert(optional('void', start));
     assert(optional('Function', start.next));
 
-    computeRest(start.next, required);
+    computeRest(start, required);
     if (gftHasReturnType == null) {
       return voidType;
     }
@@ -443,7 +581,7 @@
     assert(isValidTypeReference(start));
     assert(optional('Function', start.next));
 
-    computeRest(start.next, required);
+    computeRest(start, required);
     if (gftHasReturnType == null) {
       return simpleType;
     }
@@ -451,13 +589,28 @@
     return this;
   }
 
+  /// Given identifier `?` `Function` non-identifier, compute the type
+  /// and return the receiver or one of the [TypeInfo] constants.
+  TypeInfo computeIdentifierQuestionGFT(bool required) {
+    assert(isValidTypeReference(start));
+    assert(optional('?', start.next));
+    assert(optional('Function', start.next.next));
+
+    computeRest(start, required);
+    if (gftHasReturnType == null) {
+      return simpleNullableType;
+    }
+    assert(end != null);
+    return this;
+  }
+
   /// Given a builtin, return the receiver so that parseType will report
   /// an error for the builtin used as a type.
   TypeInfo computeBuiltinOrVarAsType(bool required) {
     assert(start.type.isBuiltIn || optional('var', start));
 
     end = typeArguments.skip(start);
-    computeRest(end.next, required);
+    computeRest(end, required);
     assert(end != null);
     return this;
   }
@@ -470,7 +623,7 @@
     assert(typeArguments != noTypeParamOrArg);
 
     end = typeArguments.skip(start);
-    computeRest(end.next, required);
+    computeRest(end, required);
 
     if (!required && !looksLikeName(end.next) && gftHasReturnType == null) {
       return noType;
@@ -494,7 +647,7 @@
     }
 
     end = typeArguments.skip(token);
-    computeRest(end.next, required);
+    computeRest(end, required);
     if (!required && !looksLikeName(end.next) && gftHasReturnType == null) {
       return noType;
     }
@@ -503,6 +656,11 @@
   }
 
   void computeRest(Token token, bool required) {
+    if (optional('?', token.next)) {
+      beforeQuestionMark = token;
+      end = token = token.next;
+    }
+    token = token.next;
     while (optional('Function', token)) {
       Token typeVariableStart = token;
       // TODO(danrubel): Consider caching TypeParamOrArgInfo
@@ -516,15 +674,27 @@
         break; // Not a function type.
       }
       if (!required) {
-        if (!(token.next.isIdentifier || optional('this', token.next))) {
+        Token next = token.next;
+        if (optional('?', next)) {
+          next = next.next;
+        }
+        if (!(next.isIdentifier || optional('this', next))) {
           break; // `Function` used as the name in a function declaration.
         }
       }
       assert(optional(')', token));
       gftHasReturnType ??= typeVariableStart != start;
       typeVariableStarters = typeVariableStarters.prepend(typeVariableStart);
+
+      beforeQuestionMark = null;
       end = token;
       token = token.next;
+
+      if (optional('?', token)) {
+        beforeQuestionMark = end;
+        end = token;
+        token = token.next;
+      }
     }
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/scanner.dart b/pkg/front_end/lib/src/fasta/scanner.dart
index 8e24f03..f276eda 100644
--- a/pkg/front_end/lib/src/fasta/scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner.dart
@@ -83,12 +83,16 @@
 /// Scan/tokenize the given [source].
 /// If [recover] is null, then the [defaultRecoveryStrategy] is used.
 ScannerResult scanString(String source,
-    {bool includeComments: false,
+    {bool enableGtGtGt: false,
+    bool includeComments: false,
     bool scanLazyAssignmentOperators: false,
     Recover recover}) {
+  // TODO(brianwilkerson): Remove the parameter `enableGtGtGt` after the feature
+  // has been anabled by default.
   assert(source != null, 'source must not be null');
   StringScanner scanner =
       new StringScanner(source, includeComments: includeComments);
+  scanner.enableGtGtGt = enableGtGtGt;
   return _tokenizeAndRecover(scanner, recover, source: source);
 }
 
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index 56575ba..276b0c3 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -148,7 +148,7 @@
   }
 
   @override
-  void handleType(Token beginToken) {
+  void handleType(Token beginToken, Token questionMark) {
     debugEvent("Type");
     discard(1);
   }
@@ -223,7 +223,7 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
+  void endFunctionType(Token functionToken, Token questionMark) {
     debugEvent("FunctionType");
     discard(1);
   }
@@ -590,9 +590,8 @@
     // Note: we set thisType regardless of whether we are building a static
     // member, since that provides better error recovery.
     InterfaceType thisType = currentClass?.target?.thisType;
-    var typeInferrer = library.disableTypeInference
-        ? null
-        : typeInferenceEngine.createLocalTypeInferrer(uri, thisType, library);
+    var typeInferrer =
+        typeInferenceEngine?.createLocalTypeInferrer(uri, thisType, library);
     ConstantContext constantContext = builder.isConstructor && builder.isConst
         ? ConstantContext.inferred
         : ConstantContext.none;
diff --git a/pkg/front_end/lib/src/fasta/source/diet_parser.dart b/pkg/front_end/lib/src/fasta/source/diet_parser.dart
index 9f1bc91..bc98715 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_parser.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_parser.dart
@@ -12,7 +12,7 @@
 class DietParser extends ClassMemberParser {
   DietParser(Listener listener) : super(listener);
 
-  Token parseFormalParameters(Token token, MemberKind kind) {
-    return skipFormalParameters(token, kind);
+  Token parseFormalParametersRest(Token token, MemberKind kind) {
+    return skipFormalParametersRest(token, kind);
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 5b1f67f..72901f5 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -961,8 +961,9 @@
   }
 
   @override
-  void handleType(Token beginToken) {
+  void handleType(Token beginToken, Token questionMark) {
     debugEvent("Type");
+    reportErrorIfNullableType(questionMark);
     List<TypeBuilder> arguments = pop();
     int charOffset = pop();
     Object name = pop();
@@ -1183,8 +1184,9 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
+  void endFunctionType(Token functionToken, Token questionMark) {
     debugEvent("FunctionType");
+    reportErrorIfNullableType(questionMark);
     List<FormalParameterBuilder> formals = pop();
     pop(); // formals offset
     TypeBuilder returnType = pop();
@@ -1506,6 +1508,8 @@
       // the tokens for the expression.
       // TODO(ahe): Might be clearer if this search was moved to
       // `library.addFields`.
+      // TODO(ahe): I don't even think this is necessary. [token] points to ;
+      // or , and we don't otherwise store tokens.
       beforeLast = next;
       next = next.next;
     }
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index 0c507c5..bfcb069 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -24,12 +24,14 @@
 
 import '../kernel/kernel_builder.dart'
     show
+        ClassBuilder,
         ConstructorReferenceBuilder,
         Declaration,
         KernelClassBuilder,
         KernelFieldBuilder,
         KernelFunctionBuilder,
         KernelLibraryBuilder,
+        KernelNamedTypeBuilder,
         KernelTypeBuilder,
         KernelTypeVariableBuilder,
         LibraryBuilder,
@@ -69,7 +71,8 @@
   return cls;
 }
 
-class SourceClassBuilder extends KernelClassBuilder {
+class SourceClassBuilder extends KernelClassBuilder
+    implements Comparable<SourceClassBuilder> {
   @override
   final Class actualCls;
 
@@ -243,11 +246,16 @@
 
   void prepareTopLevelInference() {
     scope.forEach((String name, Declaration declaration) {
-      if (declaration is KernelFieldBuilder) {
-        declaration.prepareTopLevelInference();
-      }
+      do {
+        if (declaration is KernelFieldBuilder) {
+          declaration.prepareTopLevelInference();
+        }
+        declaration = declaration.next;
+      } while (declaration != null);
     });
-    cls.setupApiMembers(library.loader.interfaceResolver);
+    if (!isPatch) {
+      cls.setupApiMembers(library.loader.interfaceResolver);
+    }
   }
 
   @override
@@ -274,4 +282,33 @@
     });
     return count;
   }
+
+  List<Declaration> computeDirectSupertypes(ClassBuilder objectClass) {
+    final List<Declaration> result = <Declaration>[];
+    final KernelNamedTypeBuilder supertype = this.supertype;
+    if (supertype != null) {
+      result.add(supertype.declaration);
+    } else if (objectClass != this) {
+      result.add(objectClass);
+    }
+    final List<KernelTypeBuilder> interfaces = this.interfaces;
+    if (interfaces != null) {
+      for (int i = 0; i < interfaces.length; i++) {
+        KernelNamedTypeBuilder interface = interfaces[i];
+        result.add(interface.declaration);
+      }
+    }
+    final KernelNamedTypeBuilder mixedInType = this.mixedInType;
+    if (mixedInType != null) {
+      result.add(mixedInType.declaration);
+    }
+    return result;
+  }
+
+  @override
+  int compareTo(SourceClassBuilder other) {
+    int result = "$fileUri".compareTo("${other.fileUri}");
+    if (result != 0) return result;
+    return charOffset.compareTo(other.charOffset);
+  }
 }
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index ceae497..1f1afc5 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -103,13 +103,10 @@
 
   final List<List> implementationBuilders = <List<List>>[];
 
-  /// Indicates whether type inference (and type promotion) should be disabled
-  /// for this library.
-  @override
-  final bool disableTypeInference;
-
   final List<Object> accessors = <Object>[];
 
+  final bool legacyMode;
+
   String documentationComment;
 
   String name;
@@ -138,8 +135,8 @@
 
   SourceLibraryBuilder.fromScopes(
       this.loader, this.fileUri, this.libraryDeclaration, this.importScope)
-      : disableTypeInference = loader.target.disableTypeInference,
-        currentDeclaration = libraryDeclaration,
+      : currentDeclaration = libraryDeclaration,
+        legacyMode = loader.target.legacyMode,
         super(
             fileUri, libraryDeclaration.toScope(importScope), new Scope.top());
 
@@ -402,7 +399,7 @@
       int charOffset = info.charOffset;
       bool hasInitializer = info.initializerTokenForInference != null;
       Token initializerTokenForInference =
-          type == null ? info.initializerTokenForInference : null;
+          type != null || legacyMode ? null : info.initializerTokenForInference;
       if (initializerTokenForInference != null) {
         Token beforeLast = info.beforeLast;
         beforeLast.setNext(new Token.eof(beforeLast.next.offset));
@@ -675,7 +672,11 @@
                     this.fileUri, -1, noLength)
               ]);
         } else {
-          usedParts.add(part.uri);
+          if (isPatch) {
+            usedParts.add(part.fileUri);
+          } else {
+            usedParts.add(part.uri);
+          }
           includePart(part, usedParts);
         }
       } else {
@@ -895,6 +896,8 @@
   }
 
   void checkBoundsInOutline(covariant typeEnvironment);
+
+  int finalizeInitializingFormals();
 }
 
 /// Unlike [Scope], this scope is used during construction of builders to
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index a330137..64ee146 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -47,6 +47,9 @@
         Message,
         SummaryTemplate,
         Template,
+        messageObjectExtends,
+        messageObjectImplements,
+        messageObjectMixesIn,
         messagePartOrphan,
         noLength,
         templateAmbiguousSupertypes,
@@ -63,7 +66,6 @@
         templateIllegalMixinDueToConstructorsCause,
         templateInternalProblemUriMissingScheme,
         templateSourceOutlineSummary,
-        templateDirectCyclicClassHierarchy,
         templateUntranslatableUri;
 
 import '../fasta_codes.dart' as fasta_codes;
@@ -74,6 +76,7 @@
 import '../kernel/kernel_builder.dart'
     show
         ClassBuilder,
+        ClassHierarchyBuilder,
         Declaration,
         EnumBuilder,
         KernelFieldBuilder,
@@ -86,13 +89,15 @@
 
 import '../kernel/body_builder.dart' show BodyBuilder;
 
+import '../kernel/transform_set_literals.dart' show SetLiteralTransformer;
+
 import '../loader.dart' show Loader, untranslatableUriScheme;
 
 import '../parser/class_member_parser.dart' show ClassMemberParser;
 
 import '../parser.dart' show Parser, lengthForToken, offsetForToken;
 
-import '../problems.dart' show internalProblem, unexpected, unhandled;
+import '../problems.dart' show internalProblem, unhandled;
 
 import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan;
 
@@ -100,8 +105,6 @@
 
 import '../type_inference/interface_resolver.dart' show InterfaceResolver;
 
-import '../type_inference/type_inference_engine.dart' show TypeInferenceEngine;
-
 import '../type_inference/type_inferrer.dart'
     show LegacyModeMixinInferrer, StrongModeMixinInferrer;
 
@@ -132,14 +135,13 @@
   DartType iterableOfBottom;
   DartType streamOfBottom;
 
-  @override
-  TypeInferenceEngine typeInferenceEngine;
+  ShadowTypeInferenceEngine typeInferenceEngine;
 
   InterfaceResolver interfaceResolver;
 
   Instrumentation instrumentation;
 
-  List<ClassBuilder> orderedClasses;
+  SetLiteralTransformer setLiteralTransformer;
 
   SourceLoader(this.fileSystem, this.includeComments, KernelTarget target)
       : super(target);
@@ -429,6 +431,17 @@
     ticker.logMs("Resolved $typeCount types");
   }
 
+  void finalizeInitializingFormals() {
+    int formalCount = 0;
+    builders.forEach((Uri uri, LibraryBuilder library) {
+      if (library.loader == this) {
+        SourceLibraryBuilder sourceLibrary = library;
+        formalCount += sourceLibrary.finalizeInitializingFormals();
+      }
+    });
+    ticker.logMs("Finalized $formalCount initializing formals");
+  }
+
   void finishDeferredLoadTearoffs() {
     int count = 0;
     builders.forEach((Uri uri, LibraryBuilder library) {
@@ -501,160 +514,164 @@
     ticker.logMs("Finished $count patch methods");
   }
 
-  /// Returns all the supertypes (including interfaces) of [cls]
-  /// transitively. Includes [cls].
-  Set<ClassBuilder> allSupertypes(ClassBuilder cls) {
-    int length = 0;
-    Set<ClassBuilder> result = new Set<ClassBuilder>()..add(cls);
-    while (length != result.length) {
-      length = result.length;
-      result.addAll(directSupertypes(result));
-    }
-    return result;
-  }
-
-  /// Returns the direct supertypes (including interface) of [classes]. A class
-  /// from [classes] is only included if it is a supertype of one of the other
-  /// classes in [classes].
-  Set<ClassBuilder> directSupertypes(Iterable<ClassBuilder> classes) {
-    Set<ClassBuilder> result = new Set<ClassBuilder>();
-    for (ClassBuilder cls in classes) {
-      target.addDirectSupertype(cls, result);
-    }
-    return result;
-  }
-
-  /// Computes a set of classes that may have cycles. The set is empty if there
-  /// are no cycles. If the set isn't empty, it will include supertypes of
-  /// classes with cycles, as well as the classes with cycles.
-  ///
-  /// It is assumed that [classes] is a transitive closure with respect to
-  /// supertypes.
-  Iterable<ClassBuilder> cyclicCandidates(Iterable<ClassBuilder> classes) {
-    // The candidates are found by a fixed-point computation.
-    //
-    // On each iteration, the classes that have no supertypes in the input set
-    // will be removed.
-    //
-    // If there are no cycles, eventually, the set will converge on Object, and
-    // the next iteration will make the set empty (as Object has no
-    // supertypes).
-    //
-    // On the other hand, if there is a cycle, the cycle will remain in the
-    // set, and so will its supertypes, and eventually the input and output set
-    // will have the same length.
-    Iterable<ClassBuilder> input = const [];
-    Iterable<ClassBuilder> output = classes;
-    while (input.length != output.length) {
-      input = output;
-      output = directSupertypes(input);
-    }
-    return output;
-  }
-
-  void checkSemantics(List<SourceClassBuilder> classes) {
-    Iterable<ClassBuilder> candidates = cyclicCandidates(classes);
-    if (candidates.isNotEmpty) {
-      Map<ClassBuilder, Set<ClassBuilder>> realCycles =
-          <ClassBuilder, Set<ClassBuilder>>{};
-      for (ClassBuilder cls in candidates) {
-        Set<ClassBuilder> cycles = cyclicCandidates(allSupertypes(cls));
-        if (cycles.isNotEmpty) {
-          realCycles[cls] = cycles;
-        }
+  /// Check that [objectClass] has no supertypes. Recover by removing any
+  /// found.
+  void checkObjectClassHierarchy(ClassBuilder objectClass) {
+    if (objectClass is SourceClassBuilder &&
+        objectClass.library.loader == this) {
+      if (objectClass.supertype != null) {
+        objectClass.supertype = null;
+        objectClass.addProblem(
+            messageObjectExtends, objectClass.charOffset, noLength);
       }
-      Map<LocatedMessage, ClassBuilder> messages =
-          <LocatedMessage, ClassBuilder>{};
-      realCycles.forEach((ClassBuilder cls, Set<ClassBuilder> cycles) {
-        target.breakCycle(cls);
-        List<ClassBuilder> involved = <ClassBuilder>[];
-        for (ClassBuilder cls in cycles) {
-          if (realCycles.containsKey(cls)) {
-            involved.add(cls);
+      if (objectClass.interfaces != null) {
+        objectClass.addProblem(
+            messageObjectImplements, objectClass.charOffset, noLength);
+        objectClass.interfaces = null;
+      }
+      if (objectClass.mixedInType != null) {
+        objectClass.addProblem(
+            messageObjectMixesIn, objectClass.charOffset, noLength);
+        objectClass.mixedInType = null;
+      }
+    }
+  }
+
+  /// Returns a list of all class builders declared in this loader.  As the
+  /// classes are sorted, any cycles in the hiearchy are reported as
+  /// errors. Recover by breaking the cycles. This means that the rest of the
+  /// pipeline (including backends) can assume that there are no hierarchy
+  /// cycles.
+  List<SourceClassBuilder> handleHierarchyCycles(ClassBuilder objectClass) {
+    // Compute the initial work list of all classes declared in this loader.
+    List<SourceClassBuilder> workList = <SourceClassBuilder>[];
+    for (LibraryBuilder library in builders.values) {
+      if (library.loader == this) {
+        Iterator<Declaration> members = library.iterator;
+        while (members.moveNext()) {
+          Declaration member = members.current;
+          if (member is SourceClassBuilder) {
+            workList.add(member);
           }
         }
-        // Sort the class names alphabetically to ensure the order is stable.
-        // TODO(ahe): It's possible that a better UX would be to sort the
-        // classes based on walking the class hierarchy in breadth-first order.
-        String involvedString = (involved
-                .where((c) => c != cls)
-                .map((c) => c.fullNameForErrors)
-                .toList()
-                  ..sort())
-            .join("', '");
-        LocatedMessage message = involvedString.isEmpty
-            ? templateDirectCyclicClassHierarchy
-                .withArguments(cls.fullNameForErrors)
-                .withLocation(cls.fileUri, cls.charOffset, noLength)
-            : templateCyclicClassHierarchy
-                .withArguments(cls.fullNameForErrors, involvedString)
-                .withLocation(cls.fileUri, cls.charOffset, noLength);
-        messages[message] = cls;
-      });
-
-      // Report all classes involved in a cycle, sorted to ensure stability as
-      // [cyclicCandidates] is sensitive to if the platform (or other modules)
-      // are included in [classes].
-      for (LocatedMessage message in messages.keys.toList()..sort()) {
-        messages[message].addProblem(
-            message.messageObject, message.charOffset, message.length);
       }
     }
-    ticker.logMs("Found cycles");
+
     Set<ClassBuilder> blackListedClasses = new Set<ClassBuilder>();
     for (int i = 0; i < blacklistedCoreClasses.length; i++) {
       blackListedClasses.add(coreLibrary[blacklistedCoreClasses[i]]);
     }
-    for (ClassBuilder cls in classes) {
-      if (cls.library.loader != this) continue;
-      Set<ClassBuilder> directSupertypes = new Set<ClassBuilder>();
-      target.addDirectSupertype(cls, directSupertypes);
-      for (ClassBuilder supertype in directSupertypes) {
-        if (supertype is EnumBuilder) {
-          cls.addProblem(templateExtendingEnum.withArguments(supertype.name),
-              cls.charOffset, noLength);
-        } else if (!cls.library.mayImplementRestrictedTypes &&
-            blackListedClasses.contains(supertype)) {
-          cls.addProblem(
-              templateExtendingRestricted.withArguments(supertype.name),
-              cls.charOffset,
-              noLength);
+
+    // Sort the classes topologically.
+    Set<SourceClassBuilder> topologicallySortedClasses =
+        new Set<SourceClassBuilder>();
+    List<SourceClassBuilder> previousWorkList;
+    do {
+      previousWorkList = workList;
+      workList = <SourceClassBuilder>[];
+      for (int i = 0; i < previousWorkList.length; i++) {
+        SourceClassBuilder cls = previousWorkList[i];
+        List<Declaration> directSupertypes =
+            cls.computeDirectSupertypes(objectClass);
+        bool allSupertypesProcessed = true;
+        for (int i = 0; i < directSupertypes.length; i++) {
+          Declaration supertype = directSupertypes[i];
+          if (supertype is SourceClassBuilder &&
+              supertype.library.loader == this &&
+              !topologicallySortedClasses.contains(supertype)) {
+            allSupertypesProcessed = false;
+            break;
+          }
+        }
+        if (allSupertypesProcessed) {
+          topologicallySortedClasses.add(cls);
+          checkClassSupertypes(cls, directSupertypes, blackListedClasses);
+        } else {
+          workList.add(cls);
         }
       }
-      TypeBuilder mixedInType = cls.mixedInType;
-      if (mixedInType != null) {
-        bool isClassBuilder = false;
-        if (mixedInType is NamedTypeBuilder) {
-          var builder = mixedInType.declaration;
-          if (builder is ClassBuilder) {
-            isClassBuilder = true;
-            for (Declaration constructory
-                in builder.constructors.local.values) {
-              if (constructory.isConstructor && !constructory.isSynthetic) {
-                cls.addProblem(
-                    templateIllegalMixinDueToConstructors
-                        .withArguments(builder.fullNameForErrors),
-                    cls.charOffset,
-                    noLength,
-                    context: [
-                      templateIllegalMixinDueToConstructorsCause
-                          .withArguments(builder.fullNameForErrors)
-                          .withLocation(constructory.fileUri,
-                              constructory.charOffset, noLength)
-                    ]);
-              }
+    } while (previousWorkList.length != workList.length);
+    List<SourceClassBuilder> classes = topologicallySortedClasses.toList();
+    List<SourceClassBuilder> classesWithCycles = previousWorkList;
+
+    // Once the work list doesn't change in size, it's either empty, or
+    // contains all classes with cycles.
+
+    // Sort the classes to ensure consistent output.
+    classesWithCycles.sort();
+    for (int i = 0; i < classesWithCycles.length; i++) {
+      SourceClassBuilder cls = classesWithCycles[i];
+      target.breakCycle(cls);
+      classes.add(cls);
+      cls.addProblem(
+          templateCyclicClassHierarchy.withArguments(cls.fullNameForErrors),
+          cls.charOffset,
+          noLength);
+    }
+
+    ticker.logMs("Checked class hierarchy");
+    return classes;
+  }
+
+  void checkClassSupertypes(
+      SourceClassBuilder cls,
+      List<Declaration> directSupertypes,
+      Set<ClassBuilder> blackListedClasses) {
+    // Check that the direct supertypes aren't black-listed or enums.
+    for (int i = 0; i < directSupertypes.length; i++) {
+      Declaration supertype = directSupertypes[i];
+      if (supertype is EnumBuilder) {
+        cls.addProblem(templateExtendingEnum.withArguments(supertype.name),
+            cls.charOffset, noLength);
+      } else if (!cls.library.mayImplementRestrictedTypes &&
+          blackListedClasses.contains(supertype)) {
+        cls.addProblem(
+            templateExtendingRestricted
+                .withArguments(supertype.fullNameForErrors),
+            cls.charOffset,
+            noLength);
+      }
+    }
+
+    // Check that the mixed-in type can be used as a mixin.
+    final TypeBuilder mixedInType = cls.mixedInType;
+    if (mixedInType != null) {
+      bool isClassBuilder = false;
+      if (mixedInType is NamedTypeBuilder) {
+        var builder = mixedInType.declaration;
+        if (builder is ClassBuilder) {
+          isClassBuilder = true;
+          for (Declaration constructory in builder.constructors.local.values) {
+            if (constructory.isConstructor && !constructory.isSynthetic) {
+              cls.addProblem(
+                  templateIllegalMixinDueToConstructors
+                      .withArguments(builder.fullNameForErrors),
+                  cls.charOffset,
+                  noLength,
+                  context: [
+                    templateIllegalMixinDueToConstructorsCause
+                        .withArguments(builder.fullNameForErrors)
+                        .withLocation(constructory.fileUri,
+                            constructory.charOffset, noLength)
+                  ]);
             }
           }
         }
-        if (!isClassBuilder) {
-          cls.addProblem(
-              templateIllegalMixin.withArguments(mixedInType.fullNameForErrors),
-              cls.charOffset,
-              noLength);
-        }
+      }
+      if (!isClassBuilder) {
+        // TODO(ahe): Either we need to check this for superclass and
+        // interfaces, or this shouldn't be necessary (or handled elsewhere).
+        cls.addProblem(
+            templateIllegalMixin.withArguments(mixedInType.fullNameForErrors),
+            cls.charOffset,
+            noLength);
       }
     }
-    ticker.logMs("Checked restricted supertypes");
+  }
+
+  List<SourceClassBuilder> checkSemantics(ClassBuilder objectClass) {
+    checkObjectClassHierarchy(objectClass);
+    List<SourceClassBuilder> classes = handleHierarchyCycles(objectClass);
 
     // Check imports and exports for duplicate names.
     // This is rather silly, e.g. it makes importing 'foo' and exporting another
@@ -729,6 +746,7 @@
       }
     });
     ticker.logMs("Checked imports and exports for duplicate names");
+    return classes;
   }
 
   void buildComponent() {
@@ -819,11 +837,11 @@
 
   void checkSupertypes(List<SourceClassBuilder> sourceClasses) {
     for (SourceClassBuilder builder in sourceClasses) {
-      if (builder.library.loader == this) {
+      if (builder.library.loader == this && !builder.isPatch) {
         builder.checkSupertypes(coreTypes);
       }
     }
-    ticker.logMs("Checked overrides");
+    ticker.logMs("Checked supertypes");
   }
 
   void checkBounds() {
@@ -843,7 +861,7 @@
   void checkOverrides(List<SourceClassBuilder> sourceClasses) {
     assert(hierarchy != null);
     for (SourceClassBuilder builder in sourceClasses) {
-      if (builder.library.loader == this) {
+      if (builder.library.loader == this && !builder.isPatch) {
         builder.checkOverrides(
             hierarchy, typeInferenceEngine?.typeSchemaEnvironment);
       }
@@ -852,10 +870,11 @@
   }
 
   void checkAbstractMembers(List<SourceClassBuilder> sourceClasses) {
+    // TODO(ahe): Move this to [ClassHierarchyBuilder].
     if (target.legacyMode) return;
     assert(hierarchy != null);
     for (SourceClassBuilder builder in sourceClasses) {
-      if (builder.library.loader == this) {
+      if (builder.library.loader == this && !builder.isPatch) {
         builder.checkAbstractMembers(
             coreTypes, hierarchy, typeInferenceEngine.typeSchemaEnvironment);
       }
@@ -864,9 +883,10 @@
   }
 
   void checkRedirectingFactories(List<SourceClassBuilder> sourceClasses) {
+    // TODO(ahe): Move this to [ClassHierarchyBuilder].
     if (target.legacyMode) return;
     for (SourceClassBuilder builder in sourceClasses) {
-      if (builder.library.loader == this) {
+      if (builder.library.loader == this && !builder.isPatch) {
         builder.checkRedirectingFactories(
             typeInferenceEngine.typeSchemaEnvironment);
       }
@@ -875,11 +895,12 @@
   }
 
   void addNoSuchMethodForwarders(List<SourceClassBuilder> sourceClasses) {
+    // TODO(ahe): Move this to [ClassHierarchyBuilder].
     if (!target.backendTarget.enableNoSuchMethodForwarders) return;
 
     List<Class> changedClasses = new List<Class>();
     for (SourceClassBuilder builder in sourceClasses) {
-      if (builder.library.loader == this) {
+      if (builder.library.loader == this && !builder.isPatch) {
         if (builder.addNoSuchMethodForwarders(target, hierarchy)) {
           changedClasses.add(builder.target);
         }
@@ -891,7 +912,7 @@
 
   void checkMixins(List<SourceClassBuilder> sourceClasses) {
     for (SourceClassBuilder builder in sourceClasses) {
-      if (builder.library.loader == this) {
+      if (builder.library.loader == this && !builder.isPatch) {
         if (builder.isMixinDeclaration) {
           builder.checkMixinDeclaration();
         }
@@ -905,24 +926,33 @@
     ticker.logMs("Checked mixin declaration applications");
   }
 
+  void buildClassHierarchy(
+      List<SourceClassBuilder> sourceClasses, ClassBuilder objectClass) {
+    if (!target.legacyMode) return;
+    ticker.logMs("Building class hierarchy");
+    ClassHierarchyBuilder classHierarchyBuilder =
+        new ClassHierarchyBuilder(objectClass);
+    for (int i = 0; i < sourceClasses.length; i++) {
+      classHierarchyBuilder.add(sourceClasses[i]);
+    }
+    ticker.logMs("Built class hierarchy");
+  }
+
   void createTypeInferenceEngine() {
-    typeInferenceEngine =
-        new ShadowTypeInferenceEngine(instrumentation, target.legacyMode);
+    if (target.legacyMode) return;
+    typeInferenceEngine = new ShadowTypeInferenceEngine(instrumentation);
   }
 
   void performTopLevelInference(List<SourceClassBuilder> sourceClasses) {
-    if (target.disableTypeInference) return;
+    if (target.legacyMode) return;
 
     /// The first phase of top level initializer inference, which consists of
     /// creating kernel objects for all fields and top level variables that
     /// might be subject to type inference, and records dependencies between
     /// them.
     typeInferenceEngine.prepareTopLevel(coreTypes, hierarchy);
-    interfaceResolver = new InterfaceResolver(
-        typeInferenceEngine,
-        typeInferenceEngine.typeSchemaEnvironment,
-        instrumentation,
-        target.legacyMode);
+    interfaceResolver = new InterfaceResolver(typeInferenceEngine,
+        typeInferenceEngine.typeSchemaEnvironment, instrumentation);
     for (LibraryBuilder library in builders.values) {
       if (library.loader == this) {
         Iterator<Declaration> iterator = library.iterator;
@@ -934,27 +964,8 @@
         }
       }
     }
-    {
-      // Note: we need to create a list before iterating, since calling
-      // builder.prepareTopLevelInference causes further class hierarchy
-      // queries to be made which would otherwise result in a concurrent
-      // modification exception.
-      List<Class> classes = new List<Class>(sourceClasses.length);
-      for (int i = 0; i < sourceClasses.length; i++) {
-        classes[i] = sourceClasses[i].target;
-      }
-      orderedClasses = null;
-      List<ClassBuilder> result = new List<ClassBuilder>(sourceClasses.length);
-      int i = 0;
-      for (Class cls
-          in new List<Class>.from(hierarchy.getOrderedClasses(classes))) {
-        result[i++] = ShadowClass.getClassInferenceInfo(cls).builder
-          ..prepareTopLevelInference();
-      }
-      if (i != result.length) {
-        unexpected("${result.length}", "$i", -1, null);
-      }
-      orderedClasses = result;
+    for (int i = 0; i < sourceClasses.length; i++) {
+      sourceClasses[i].prepareTopLevelInference();
     }
     typeInferenceEngine.isTypeInferencePrepared = true;
     ticker.logMs("Prepared top level inference");
@@ -964,7 +975,8 @@
     /// their types.
     typeInferenceEngine.finishTopLevelFields();
     List<Class> changedClasses = new List<Class>();
-    for (var builder in orderedClasses) {
+    for (var builder in sourceClasses) {
+      if (builder.isPatch) continue;
       ShadowClass class_ = builder.target;
       int memberCount = class_.fields.length +
           class_.constructors.length +
@@ -984,7 +996,6 @@
       }
     }
 
-    orderedClasses = null;
     typeInferenceEngine.finishTopLevelInitializingFormals();
     if (instrumentation != null) {
       builders.forEach((Uri uri, LibraryBuilder library) {
diff --git a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
index 3778a4c..5ba2c51 100644
--- a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
@@ -478,7 +478,7 @@
   }
 
   @override
-  void endExpressionStatement(Token token) {
+  void handleExpressionStatement(Token token) {
     debugEvent("ExpressionStatement", token);
     state.pop();
   }
@@ -619,7 +619,7 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
+  void endFunctionType(Token functionToken, Token questionMark) {
     debugEvent("FunctionType", functionToken);
   }
 
@@ -836,6 +836,14 @@
   }
 
   @override
+  void handleLiteralSet(
+      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
+    debugEvent("LiteralSet", leftBrace);
+    state.discard(count);
+    state.pushNull("{}", leftBrace);
+  }
+
+  @override
   void handleLiteralMap(
       int count, Token leftBrace, Token constKeyword, Token rightBrace) {
     debugEvent("LiteralMap", leftBrace);
@@ -844,6 +852,13 @@
   }
 
   @override
+  void handleEmptyLiteralSetOrMap(
+      Token leftBrace, Token constKeyword, Token rightBrace) {
+    debugEvent("EmptyLiteralSetOrMap", leftBrace);
+    state.pushNull("{}", leftBrace);
+  }
+
+  @override
   void handleLiteralMapEntry(Token colon, Token endToken) {
     debugEvent("LiteralMapEntry", colon);
     state.pop(); // Value.
@@ -1212,7 +1227,7 @@
   }
 
   @override
-  void handleType(Token beginToken) {
+  void handleType(Token beginToken, Token questionMark) {
     debugEvent("Type", beginToken);
     state.pop();
   }
diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart
index 08581aa..2705f16 100644
--- a/pkg/front_end/lib/src/fasta/target_implementation.dart
+++ b/pkg/front_end/lib/src/fasta/target_implementation.dart
@@ -18,6 +18,8 @@
 
 import 'uri_translator.dart' show UriTranslator;
 
+import '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
+
 /// Provides the implementation details used by a loader for a target.
 abstract class TargetImplementation extends Target {
   final UriTranslator uriTranslator;
@@ -33,8 +35,15 @@
   Declaration cachedNativeAnnotation;
   Declaration cachedNativeExtensionAnnotation;
 
+  bool enableSetLiterals;
+  bool enableConstantUpdate2018;
+
   TargetImplementation(Ticker ticker, this.uriTranslator, this.backendTarget)
-      : super(ticker);
+      : enableSetLiterals = CompilerContext.current.options
+            .isExperimentEnabled(ExperimentalFlag.setLiterals),
+        enableConstantUpdate2018 = CompilerContext.current.options
+            .isExperimentEnabled(ExperimentalFlag.constantUpdate2018),
+        super(ticker);
 
   /// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist
   /// already.
@@ -46,9 +55,6 @@
   LibraryBuilder createLibraryBuilder(
       Uri uri, Uri fileUri, covariant LibraryBuilder origin);
 
-  /// Add the classes extended or implemented directly by [cls] to [set].
-  void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set);
-
   /// The class [cls] is involved in a cyclic definition. This method should
   /// ensure that the cycle is broken, for example, by removing superclass and
   /// implemented interfaces.
diff --git a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
index fbfe897..0533d88 100644
--- a/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
+++ b/pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
@@ -21,10 +21,18 @@
 
 import 'package:kernel/kernel.dart' show loadComponentFromBinary;
 
-import 'package:kernel/naive_type_checker.dart' show StrongModeTypeChecker;
+import 'package:kernel/naive_type_checker.dart' show NaiveTypeChecker;
 
 import 'package:kernel/text/ast_to_text.dart' show Printer;
 
+import 'package:kernel/text/text_serialization_verifier.dart'
+    show
+        TextDeserializationFailure,
+        TextRoundTripFailure,
+        TextSerializationFailure,
+        TextSerializationVerificationFailure,
+        TextSerializationVerifier;
+
 import 'package:testing/testing.dart'
     show ChainContext, Result, StdioProcess, Step;
 
@@ -39,6 +47,9 @@
 
 import '../messages.dart' show LocatedMessage;
 
+import '../fasta_codes.dart'
+    show templateInternalProblemUnhandled, templateUnspecified;
+
 class Print extends Step<Component, Component, ChainContext> {
   const Print();
 
@@ -46,13 +57,17 @@
 
   Future<Result<Component>> run(Component component, _) async {
     StringBuffer sb = new StringBuffer();
-    for (Library library in component.libraries) {
-      Printer printer = new Printer(sb);
-      if (library.importUri.scheme != "dart" &&
-          library.importUri.scheme != "package") {
-        printer.writeLibraryFile(library);
+    await CompilerContext.runWithDefaultOptions((compilerContext) async {
+      compilerContext.uriToSource.addAll(component.uriToSource);
+
+      for (Library library in component.libraries) {
+        Printer printer = new Printer(sb);
+        if (library.importUri.scheme != "dart" &&
+            library.importUri.scheme != "package") {
+          printer.writeLibraryFile(library);
+        }
       }
-    }
+    });
     print("$sb");
     return pass(component);
   }
@@ -76,7 +91,9 @@
             }
             messages.writeAll(message.plainTextFormatted, "\n");
           });
-    return await CompilerContext.runWithOptions(options, (_) async {
+    return await CompilerContext.runWithOptions(options,
+        (compilerContext) async {
+      compilerContext.uriToSource.addAll(component.uriToSource);
       List<LocatedMessage> verificationErrors = verifyComponent(component,
           isOutline: !fullCompile, skipPlatform: true);
       assert(verificationErrors.isEmpty || messages.isNotEmpty);
@@ -99,7 +116,7 @@
       Component component, ChainContext context) async {
     var errorFormatter = new ErrorFormatter();
     var checker =
-        new StrongModeTypeChecker(errorFormatter, component, ignoreSdk: true);
+        new NaiveTypeChecker(errorFormatter, component, ignoreSdk: true);
     checker.checkComponent(component);
     if (errorFormatter.numberOfFailures == 0) {
       return pass(component);
@@ -192,6 +209,76 @@
   }
 }
 
+class KernelTextSerialization extends Step<Component, Component, ChainContext> {
+  const KernelTextSerialization();
+
+  String get name => "kernel text serialization";
+
+  Future<Result<Component>> run(
+      Component component, ChainContext context) async {
+    StringBuffer messages = new StringBuffer();
+    ProcessedOptions options = new ProcessedOptions(
+        options: new CompilerOptions()
+          ..onDiagnostic = (DiagnosticMessage message) {
+            if (messages.isNotEmpty) {
+              messages.write("\n");
+            }
+            messages.writeAll(message.plainTextFormatted, "\n");
+          });
+    return await CompilerContext.runWithOptions(options,
+        (compilerContext) async {
+      compilerContext.uriToSource.addAll(component.uriToSource);
+      TextSerializationVerifier verifier = new TextSerializationVerifier();
+      for (Library library in component.libraries) {
+        if (library.importUri.scheme != "dart" &&
+            library.importUri.scheme != "package") {
+          library.accept(verifier);
+        }
+      }
+      for (TextSerializationVerificationFailure failure in verifier.failures) {
+        LocatedMessage message;
+        if (failure is TextSerializationFailure) {
+          message = templateUnspecified
+              .withArguments(
+                  "Failed to serialize a node: ${failure.message.isNotEmpty}")
+              .withLocation(failure.uri, failure.offset, 1);
+        } else if (failure is TextDeserializationFailure) {
+          message = templateUnspecified
+              .withArguments(
+                  "Failed to deserialize a node: ${failure.message.isNotEmpty}")
+              .withLocation(failure.uri, failure.offset, 1);
+        } else if (failure is TextRoundTripFailure) {
+          String formattedInitial =
+              failure.initial.isNotEmpty ? failure.initial : "<empty>";
+          String formattedSerialized =
+              failure.serialized.isNotEmpty ? failure.serialized : "<empty>";
+          message = templateUnspecified
+              .withArguments(
+                  "Round trip failure: initial doesn't match serialized.\n"
+                  "  Initial    : $formattedInitial\n"
+                  "  Serialized : $formattedSerialized")
+              .withLocation(failure.uri, failure.offset, 1);
+        } else {
+          message = templateInternalProblemUnhandled
+              .withArguments(
+                  "${failure.runtimeType}", "KernelTextSerialization.run")
+              .withLocation(failure.uri, failure.offset, 1);
+        }
+        options.report(message, message.code.severity);
+      }
+
+      if (verifier.failures.isNotEmpty) {
+        return new Result<Component>(
+            null,
+            context.expectationSet["TextSerializationFailure"],
+            "$messages",
+            null);
+      }
+      return pass(component);
+    });
+  }
+}
+
 class WriteDill extends Step<Component, Uri, ChainContext> {
   const WriteDill();
 
diff --git a/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart b/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart
index ff3b0d4..c690103 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/inference_helper.dart
@@ -13,6 +13,8 @@
 
   Uri get uri;
 
+  set transformSetLiterals(bool value);
+
   Expression buildProblem(Message message, int charOffset, int length,
       {List<LocatedMessage> context, bool suppressMessage});
 
diff --git a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
index fba244b..b0f3d1e 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
@@ -257,7 +257,6 @@
   /// they would not be checked in an inherited implementation, a forwarding
   /// stub is introduced as a place to put the checks.
   Procedure _computeCovarianceFixes(Procedure interfaceMember) {
-    assert(!_interfaceResolver.legacyMode);
     var substitution =
         _interfaceResolver._substitutionFor(interfaceMember, enclosingClass);
     // We always create a forwarding stub when we've inherited a member from an
@@ -546,9 +545,7 @@
   /// Creates a forwarding stub for this node if necessary, and propagates
   /// covariance information.
   Procedure _finalize() {
-    return !_interfaceResolver.legacyMode
-        ? _computeCovarianceFixes(resolve())
-        : resolve();
+    return _computeCovarianceFixes(resolve());
   }
 
   /// Returns the [i]th element of [_candidates], finalizing it if necessary.
@@ -682,10 +679,8 @@
 
   final Instrumentation _instrumentation;
 
-  final bool legacyMode;
-
-  InterfaceResolver(this._typeInferenceEngine, this._typeEnvironment,
-      this._instrumentation, this.legacyMode);
+  InterfaceResolver(
+      this._typeInferenceEngine, this._typeEnvironment, this._instrumentation);
 
   /// Indicates whether the "prepare" phase of type inference is complete.
   bool get isTypeInferencePrepared =>
@@ -924,9 +919,7 @@
             return;
           }
         }
-        if (!legacyMode &&
-            member.enclosingClass == class_ &&
-            _requiresTypeInference(member)) {
+        if (member.enclosingClass == class_ && _requiresTypeInference(member)) {
           inferMethodType(library, class_, member, candidates, start + 1, end);
         }
         var forwardingNode = new ForwardingNode(
@@ -1067,7 +1060,7 @@
       if (resolution is Procedure &&
           resolution.isSyntheticForwarder &&
           identical(resolution.enclosingClass, class_)) {
-        if (!legacyMode) class_.addMember(resolution);
+        class_.addMember(resolution);
         _instrumentation?.record(
             class_.location.file,
             class_.fileOffset,
@@ -1128,10 +1121,10 @@
       Uri fileUri) {
     InferenceNode node;
     if (procedure.isAccessor && _requiresTypeInference(procedure)) {
-      if (!legacyMode && start < end) {
+      if (start < end) {
         node = new AccessorInferenceNode(
             this, procedure, candidates, start, end, library, fileUri);
-      } else if (!legacyMode && crossStart < crossEnd) {
+      } else if (crossStart < crossEnd) {
         node = new AccessorInferenceNode(this, procedure, candidates,
             crossStart, crossEnd, library, fileUri);
       } else if (procedure is SyntheticAccessor &&
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 31a0485..94cff43 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -48,29 +48,27 @@
 
   @override
   void resolveInternal() {
-    if (!_typeInferenceEngine.legacyMode) {
-      var typeInferrer = _typeInferenceEngine.getFieldTypeInferrer(field);
-      // Note: in the event that there is erroneous code, it's possible for
-      // typeInferrer to be null.  If this happens, just skip type inference for
-      // this field.
-      if (typeInferrer != null) {
-        var inferredType = typeInferrer
-            .inferDeclarationType(typeInferrer.inferFieldTopLevel(field));
-        if (isCircular) {
-          // Report the appropriate error.
-          _library.addProblem(
-              templateCantInferTypeDueToCircularity
-                  .withArguments(field.name.name),
-              field.fileOffset,
-              noLength,
-              field.fileUri);
-          inferredType = const DynamicType();
-        }
-        field.setInferredType(
-            _typeInferenceEngine, typeInferrer.uri, inferredType);
-        // TODO(paulberry): if type != null, then check that the type of the
-        // initializer is assignable to it.
+    var typeInferrer = _typeInferenceEngine.getFieldTypeInferrer(field);
+    // Note: in the event that there is erroneous code, it's possible for
+    // typeInferrer to be null.  If this happens, just skip type inference for
+    // this field.
+    if (typeInferrer != null) {
+      var inferredType = typeInferrer
+          .inferDeclarationType(typeInferrer.inferFieldTopLevel(field));
+      if (isCircular) {
+        // Report the appropriate error.
+        _library.addProblem(
+            templateCantInferTypeDueToCircularity
+                .withArguments(field.name.name),
+            field.fileOffset,
+            noLength,
+            field.fileUri);
+        inferredType = const DynamicType();
       }
+      field.setInferredType(
+          _typeInferenceEngine, typeInferrer.uri, inferredType);
+      // TODO(paulberry): if type != null, then check that the type of the
+      // initializer is assignable to it.
     }
     // TODO(paulberry): the following is a hack so that outlines don't contain
     // initializers.  But it means that we rebuild the initializers when doing
@@ -227,9 +225,7 @@
 
   final Instrumentation instrumentation;
 
-  final bool legacyMode;
-
-  TypeInferenceEngine(this.instrumentation, this.legacyMode);
+  TypeInferenceEngine(this.instrumentation);
 
   /// Creates a type inferrer for use inside of a method body declared in a file
   /// with the given [uri].
@@ -296,7 +292,7 @@
     this.coreTypes = coreTypes;
     this.classHierarchy = hierarchy;
     this.typeSchemaEnvironment =
-        new TypeSchemaEnvironment(coreTypes, hierarchy, legacyMode);
+        new TypeSchemaEnvironment(coreTypes, hierarchy);
   }
 
   /// Records that the given static [field] will need top level type inference.
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index ec3c1f1..6e93c77 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -516,8 +516,6 @@
   /// should apply.
   final bool isTopLevel;
 
-  final bool legacyMode;
-
   final ClassHierarchy classHierarchy;
 
   final Instrumentation instrumentation;
@@ -547,8 +545,7 @@
 
   TypeInferrerImpl.private(
       this.engine, this.uri, bool topLevel, this.thisType, this.library)
-      : legacyMode = engine.legacyMode,
-        classHierarchy = engine.classHierarchy,
+      : classHierarchy = engine.classHierarchy,
         instrumentation = topLevel ? null : engine.instrumentation,
         typeSchemaEnvironment = engine.typeSchemaEnvironment,
         isTopLevel = topLevel,
@@ -635,9 +632,6 @@
     // is inferred (the kernel code is discarded).
     if (isTopLevel) return null;
 
-    // In legacy mode, we don't check assignability.
-    if (legacyMode) return null;
-
     // If an interface type is being assigned to a function type, see if we
     // should tear off `.call`.
     // TODO(paulberry): use resolveTypeParameter.  See findInterfaceMember.
@@ -745,11 +739,6 @@
       bool instrumented: true}) {
     assert(receiverType != null && isKnown(receiverType));
 
-    // Our legacy golden files currently don't include interface targets, so we
-    // can't store the interface target without causing tests to fail.
-    // TODO(paulberry): fix this.
-    if (legacyMode) return null;
-
     receiverType = resolveTypeParameter(receiverType);
 
     if (receiverType is FunctionType && name.name == 'call') {
@@ -825,7 +814,7 @@
               new InstrumentationValueForMember(interfaceMember));
         }
         methodInvocation.interfaceTarget = interfaceMember;
-      } else if (!legacyMode && interfaceMember is Member) {
+      } else if (interfaceMember is Member) {
         methodInvocation.interfaceTarget = interfaceMember;
       }
       return interfaceMember;
@@ -834,7 +823,7 @@
       var interfaceMember = findInterfaceMember(
           receiverType, methodInvocation.name, methodInvocation.fileOffset,
           instrumented: instrumented);
-      if (!legacyMode && interfaceMember is Member) {
+      if (interfaceMember is Member) {
         methodInvocation.interfaceTarget = interfaceMember;
       }
       return interfaceMember;
@@ -857,7 +846,7 @@
           expression: propertyGet,
           receiver: propertyGet.receiver,
           instrumented: instrumented);
-      if (!legacyMode && interfaceMember is Member) {
+      if (interfaceMember is Member) {
         if (instrumented &&
             instrumentation != null &&
             receiverType == const DynamicType()) {
@@ -872,7 +861,7 @@
       var interfaceMember = findInterfaceMember(
           receiverType, propertyGet.name, propertyGet.fileOffset,
           instrumented: instrumented);
-      if (!legacyMode && interfaceMember is Member) {
+      if (interfaceMember is Member) {
         propertyGet.interfaceTarget = interfaceMember;
       }
       return interfaceMember;
@@ -894,7 +883,7 @@
           receiver: propertySet.receiver,
           setter: true,
           instrumented: instrumented);
-      if (!legacyMode && interfaceMember is Member) {
+      if (interfaceMember is Member) {
         if (instrumented &&
             instrumentation != null &&
             receiverType == const DynamicType()) {
@@ -909,7 +898,7 @@
       var interfaceMember = findInterfaceMember(
           receiverType, propertySet.name, propertySet.fileOffset,
           setter: true, instrumented: instrumented);
-      if (!legacyMode && interfaceMember is Member) {
+      if (interfaceMember is Member) {
         propertySet.interfaceTarget = interfaceMember;
       }
       return interfaceMember;
@@ -1157,20 +1146,18 @@
       {bool isVoidAllowed});
 
   @override
-  void inferFieldInitializer(InferenceHelper helper, DartType declaredType,
-      kernel.Expression initializer) {
+  void inferFieldInitializer(
+    InferenceHelper helper,
+    DartType context,
+    kernel.Expression initializer,
+  ) {
     assert(closureContext == null);
+    assert(!isTopLevel);
     this.helper = helper;
-    var actualType = inferExpression(
-        initializer,
-        declaredType ?? const UnknownType(),
-        !isTopLevel || declaredType != null,
-        isVoidAllowed: true);
-    if (declaredType != null) {
-      ensureAssignable(
-          declaredType, actualType, initializer, initializer.fileOffset,
-          isVoidAllowed: declaredType is VoidType);
-    }
+    var actualType =
+        inferExpression(initializer, context, true, isVoidAllowed: true);
+    ensureAssignable(context, actualType, initializer, initializer.fileOffset,
+        isVoidAllowed: context is VoidType);
     this.helper = null;
   }
 
@@ -1220,7 +1207,6 @@
     List<DartType> explicitTypeArguments = getExplicitTypeArguments(arguments);
     bool inferenceNeeded = !skipTypeArgumentInference &&
         explicitTypeArguments == null &&
-        !legacyMode &&
         calleeTypeParameters.isNotEmpty;
     bool typeChecksNeeded = !isTopLevel;
     List<DartType> inferredTypes;
@@ -1381,19 +1367,12 @@
       for (var i = 0; i < positionalParameters.length; i++) {
         var parameter = positionalParameters[i];
         inferMetadataKeepingHelper(parameter.annotations);
-        if (i >= function.requiredParameterCount &&
-            parameter.initializer == null) {
-          parameter.initializer = new NullLiteral()..parent = parameter;
-        }
         if (parameter.initializer != null) {
           inferExpression(parameter.initializer, parameter.type, !isTopLevel);
         }
       }
       for (var parameter in function.namedParameters) {
         inferMetadataKeepingHelper(parameter.annotations);
-        if (parameter.initializer == null) {
-          parameter.initializer = new NullLiteral()..parent = parameter;
-        }
         inferExpression(parameter.initializer, parameter.type, !isTopLevel);
       }
     }
@@ -1420,7 +1399,7 @@
     Substitution substitution;
     List<DartType> formalTypesFromContext =
         new List<DartType>.filled(formals.length, null);
-    if (!legacyMode && typeContext is FunctionType) {
+    if (typeContext is FunctionType) {
       for (int i = 0; i < formals.length; i++) {
         if (i < function.positionalParameters.length) {
           formalTypesFromContext[i] =
@@ -1480,7 +1459,7 @@
 
     // Apply type inference to `B` in return context `N’`, with any references
     // to `xi` in `B` having type `Pi`.  This produces `B’`.
-    bool needToSetReturnType = hasImplicitReturnType && !legacyMode;
+    bool needToSetReturnType = hasImplicitReturnType;
     ClosureContext oldClosureContext = this.closureContext;
     ClosureContext closureContext = new ClosureContext(
         this, function.asyncMarker, returnContext, needToSetReturnType);
@@ -1504,9 +1483,6 @@
       instrumentation?.record(uri, fileOffset, 'returnType',
           new InstrumentationValueForType(inferredReturnType));
       function.returnType = inferredReturnType;
-    } else if (legacyMode && hasImplicitReturnType) {
-      function.returnType =
-          closureContext._wrapAsyncOrGenerator(this, const DynamicType());
     }
     this.closureContext = oldClosureContext;
     return new ExpressionInferenceResult(null, function.functionType);
@@ -1556,9 +1532,7 @@
     var receiverType = receiver == null
         ? thisType
         : inferExpression(receiver, const UnknownType(), true);
-    if (!legacyMode) {
-      receiverVariable?.type = receiverType;
-    }
+    receiverVariable?.type = receiverType;
     if (desugaredInvocation != null) {
       interfaceMember =
           findMethodInvocationMember(receiverType, desugaredInvocation);
@@ -1594,8 +1568,7 @@
     handleInvocationContravariance(checkKind, desugaredInvocation, arguments,
         expression, inferredType, functionType, fileOffset);
     if (!identical(interfaceMember, 'call')) {
-      if (!legacyMode &&
-          isImplicitCall &&
+      if (isImplicitCall &&
           interfaceMember != null &&
           !(interfaceMember is Procedure &&
               interfaceMember.kind == ProcedureKind.Method) &&
@@ -1673,9 +1646,7 @@
       inferExpression(receiver, const UnknownType(), true);
       receiverType = getInferredType(receiver, this);
     }
-    if (!legacyMode) {
-      receiverVariable?.type = receiverType;
-    }
+    receiverVariable?.type = receiverType;
     propertyName ??= desugaredGet.name;
     if (desugaredGet != null) {
       interfaceMember = findInterfaceMember(
@@ -1683,7 +1654,7 @@
           errorTemplate: templateUndefinedGetter,
           expression: expression,
           receiver: receiver);
-      if (!legacyMode && interfaceMember is Member) {
+      if (interfaceMember is Member) {
         if (instrumentation != null && receiverType == const DynamicType()) {
           instrumentation.record(uri, desugaredGet.fileOffset, 'target',
               new InstrumentationValueForMember(interfaceMember));
@@ -1722,8 +1693,7 @@
   /// (if necessary).
   DartType instantiateTearOff(
       DartType tearoffType, DartType context, Expression expression) {
-    if (!legacyMode &&
-        tearoffType is FunctionType &&
+    if (tearoffType is FunctionType &&
         context is FunctionType &&
         context.typeParameters.isEmpty) {
       var typeParameters = tearoffType.typeParameters;
@@ -2059,7 +2029,7 @@
       Class mixinClass = mixedInType.classNode;
       Supertype mixinSupertype = mixinClass.supertype;
       gatherer = new TypeConstraintGatherer(
-          new TypeSchemaEnvironment(loader.coreTypes, hierarchy, false),
+          new TypeSchemaEnvironment(loader.coreTypes, hierarchy),
           mixinClass.typeParameters);
       // Generate constraints based on the mixin's supertype.
       generateConstraints(hierarchy, mixinClass, baseType, mixinSupertype);
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
index 507e085..1efa0e5 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
@@ -90,9 +90,8 @@
 }
 
 class TypeSchemaEnvironment extends TypeEnvironment {
-  TypeSchemaEnvironment(
-      CoreTypes coreTypes, ClassHierarchy hierarchy, bool legacyMode)
-      : super(coreTypes, hierarchy, strongMode: !legacyMode);
+  TypeSchemaEnvironment(CoreTypes coreTypes, ClassHierarchy hierarchy)
+      : super(coreTypes, hierarchy);
 
   /// Modify the given [constraint]'s lower bound to include [lower].
   void addLowerBound(TypeConstraint constraint, DartType lower) {
@@ -745,7 +744,7 @@
       }
       return new InterfaceType(type1.classNode, tArgs);
     }
-    return hierarchy.getClassicLeastUpperBound(type1, type2);
+    return hierarchy.getLegacyLeastUpperBound(type1, type2);
   }
 
   DartType _typeParameterStandardUpperBound(DartType type1, DartType type2) {
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 29e52a1..20e3338 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -172,6 +172,7 @@
 FastaUsageLong/example: Fail
 FastaUsageShort/analyzerCode: Fail
 FastaUsageShort/example: Fail
+FieldInitializedOutsideDeclaringClass/script1: Fail
 FieldInitializerOutsideConstructor/script1: Fail
 FinalAndCovariant/script2: Fail
 FinalFieldWithoutInitializer/example: Fail
@@ -199,6 +200,7 @@
 ImplementsFutureOr/analyzerCode: Fail # The analyzer doesn't report this error.
 ImplicitCallOfNonMethod/example: Fail
 ImportAfterPart/script1: Fail
+IncompatibleRedirecteeFunctionType/script6: Fail # Triggers multiple errors.
 InitializerForStaticField/example: Fail
 InitializerOutsideConstructor/example: Fail
 InputFileNotFound/analyzerCode: Fail
@@ -217,6 +219,7 @@
 InvalidCatchArguments/example: Fail
 InvalidContinueTarget/analyzerCode: Fail
 InvalidContinueTarget/example: Fail
+InvalidInitializer/analyzerCode: Fail # The analyzer reports a different error
 InvalidInitializer/example: Fail
 InvalidPackageUri/analyzerCode: Fail
 InvalidPackageUri/example: Fail
@@ -309,6 +312,11 @@
 SdkSpecificationNotFound/example: Fail
 SdkSummaryNotFound/analyzerCode: Fail
 SdkSummaryNotFound/example: Fail
+SetLiteralTooManyTypeArguments/analyzerCode: Fail
+SetLiteralTooManyTypeArguments/example: Fail
+SetLiteralsNotSupported/analyzerCode: Fail
+SetOrMapLiteralTooManyTypeArguments/analyzerCode: Fail
+SetOrMapLiteralTooManyTypeArguments/example: Fail
 SetterNotFound/example: Fail
 SetterNotSync/example: Fail
 SetterWithWrongNumberOfFormals/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index fad86e3..eb90f60 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -57,6 +57,8 @@
 #
 # `#name`, `#name2`, `#name3`, `#name4`: names (as strings).
 #
+# `#names`: A list of names (strings).
+#
 # `#lexeme` a token. The token's `lexeme` property is used.
 #
 # `#string`, `#string2`, `#string3`: strings (that aren't names).
@@ -931,10 +933,19 @@
     - "void x; main() {}"
     - "foo(void x) {} main() { foo(null); }"
 
+# TODO(danrubel): Review where this error is generated and consider generating
+# FieldInitializedOutsideDeclaringClass instead of this in some situations.
 InvalidInitializer:
   template: "Not a valid initializer."
   tip: "To initialize a field, use the syntax 'name = value'."
-  analyzerCode: INVALID_INITIALIZER
+
+FieldInitializedOutsideDeclaringClass:
+  index: 88
+  template: "A field can only be initialized in it's declaring class"
+  tip: "Try passing a value into the superclass constructor, or moving the initialization into the constructor body."
+  analyzerCode: ParserErrorCode.FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS
+  script:
+    - "class A { int a; } class C extends A { C() : super.a = 42; }"
 
 FinalFieldNotInitialized:
   template: "Final field '#name' is not initialized."
@@ -992,8 +1003,10 @@
       }
 
 StackOverflow:
-  template: "Stack overflow."
-  analyzerCode: STACK_OVERFLOW
+  index: 91
+  template: "The file has too many nested expressions or statements."
+  tip: "Try simplifying the code."
+  analyzerCode: ParserErrorCode.STACK_OVERFLOW
 
 InvalidCodePoint:
   template: "The escape sequence starting with '\\u' isn't a valid code point."
@@ -1173,15 +1186,17 @@
   analyzerCode: YIELD_IN_NON_GENERATOR
 
 OnlyTry:
-  template: "Try block should be followed by 'on', 'catch', or 'finally' block."
-  tip: "Did you forget to add a 'finally' block?"
-  analyzerCode: MISSING_CATCH_OR_FINALLY
+  index: 92
+  template: "A try block must be followed by an 'on', 'catch', or 'finally' clause."
+  tip: "Try adding either a catch or finally clause, or remove the try statement."
+  analyzerCode: ParserErrorCode.MISSING_CATCH_OR_FINALLY
   statement: "try {}"
 
 TypeAfterVar:
-  template: "Can't have both a type and 'var'."
+  index: 89
+  template: "Variables can't be declared using both 'var' and a type name."
   tip: "Try removing 'var.'"
-  analyzerCode: VAR_AND_TYPE
+  analyzerCode: ParserErrorCode.VAR_AND_TYPE
 
 AssertExtraneousArgument:
   template: "`assert` can't have more than two arguments."
@@ -1239,9 +1254,10 @@
     - "try {} catch (e, s, x) {}"
 
 SuperNullAware:
-  template: "'super' can't be null."
+  index: 90
+  template: "The operator '?.' cannot be used with 'super' because 'super' cannot be null."
   tip: "Try replacing '?.' with '.'"
-  analyzerCode: INVALID_OPERATOR_FOR_SUPER
+  analyzerCode: ParserErrorCode.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER
 
 ConstFieldWithoutInitializer:
   template: "The const variable '#name' must be initialized."
@@ -1392,14 +1408,13 @@
 MissingImplementationNotAbstract:
   template: |
     The non-abstract class '#name' is missing implementations for these members:
-      #string.
+    #names
   tip: |
     Try to either
      - provide an implementation,
      - inherit an implementation from a superclass or mixin,
      - mark the class as abstract, or
      - provide a 'noSuchMethod' implementation.
-  severity: ERROR_LEGACY_WARNING
   analyzerCode: CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
   script:
     - "class C {foo();}"
@@ -1425,11 +1440,23 @@
   severity: ERROR_LEGACY_WARNING
   analyzerCode: EXPECTED_ONE_LIST_TYPE_ARGUMENTS
 
+SetLiteralTooManyTypeArguments:
+  template: "A set literal requires exactly one type argument."
+  severity: ERROR_LEGACY_WARNING
+
 MapLiteralTypeArgumentMismatch:
-  template: "Map literal requires exactly two type arguments."
+  template: "A map literal requires exactly two type arguments."
   severity: ERROR_LEGACY_WARNING
   analyzerCode: EXPECTED_TWO_MAP_TYPE_ARGUMENTS
 
+SetOrMapLiteralTooManyTypeArguments:
+  template: "A set or map literal requires exactly one or two type arguments, respectively."
+  severity: ERROR_LEGACY_WARNING
+
+SetLiteralsNotSupported:
+  template: "Set literals are not supported yet."
+  script: "var s = { 24 };"
+
 LoadLibraryTakesNoArguments:
   template: "'loadLibrary' takes no arguments."
   severity: ERROR_LEGACY_WARNING
@@ -1559,6 +1586,11 @@
         internal stack trace from the compiler. Multiple kinds can be separated by
         commas, for example, --fatal=errors,warnings.
 
+      --enable-experiment=<flag>
+      --disable-experiment=<flag>
+        Enable or disable an experimental flag, used to guard features currently
+        in development. Multiple experiments can be separated by commas.
+
 FastaCLIArgumentRequired:
   template: "Expected value after '#name'."
 
@@ -1770,7 +1802,7 @@
     main.dart: "import 'lib1.dart'; import 'lib2.dart'; A a;"
 
 CyclicClassHierarchy:
-  template: "'#name' is a supertype of itself via '#string'."
+  template: "'#name' is a supertype of itself."
   analyzerCode: RECURSIVE_INTERFACE_INHERITANCE
   script:
     - |
@@ -1779,11 +1811,6 @@
     - |
       class A implements B {}
       class B implements A {}
-
-DirectCyclicClassHierarchy:
-  template: "'#name' can't use itself as a supertype."
-  analyzerCode: RECURSIVE_INTERFACE_INHERITANCE
-  script:
     - "class C = Object with C;"
     - "class C extends C {}"
     - "class C implements C {}"
@@ -1920,7 +1947,6 @@
 
 InheritedMembersConflict:
   template: "Can't inherit members that conflict with each other."
-  severity: ERROR_LEGACY_WARNING
   analyzerCode: CONFLICTS_WITH_INHERITED_MEMBER
   script:
     - >-
@@ -2643,10 +2669,6 @@
   template: "Field isn't final, but constructor is 'const'."
   severity: CONTEXT
 
-ConstConstructorInSubclassOfMixinApplication:
-  template: "Can't extend a mixin application and be 'const'."
-  analyzerCode: CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION
-
 ConstConstructorRedirectionToNonConst:
   template: "A constant constructor can't call a non-constant constructor."
   script:
@@ -3149,10 +3171,9 @@
   template: "Problem in packages configuration file: #string"
   external: test/packages_format_error_test.dart
 
-FactoryRedirecteeInvalidReturnType:
-  template: "The return type '#type' of the constructor '#name' isn't a subtype of '#type2'."
-  tip: "Try redirecting to a different constructor."
-  analyzerCode: REDIRECT_TO_INVALID_RETURN_TYPE
+IncompatibleRedirecteeFunctionType:
+  template: "The constructor function type '#type' isn't a subtype of '#type2'."
+  analyzerCode: REDIRECT_TO_INVALID_TYPE
   script:
     - >-
       class A {
@@ -3161,61 +3182,31 @@
       class B {
         B();
       }
-
-FactoryRedirecteeHasTooFewPositionalParameters:
-  template: "Redirection target '#name' accepts fewer arguments ('#count') than the redirecting factory can provide."
-  tip: "Try redirecting to a different constructor."
-  analyzerCode: REDIRECT_TO_INVALID_FUNCTION_TYPE
-  script:
     - >-
       class A {
         factory A.one(int x) = A.zero;
         A.zero() {}
       }
-
-RedirectingFactoryInvalidPositionalParameterType:
-  template: "The type of parameter '#name', '#type' is not a subtype of the redirection target's corresponding parameter type, '#type2'."
-  tip: "Try changing either the type of the parameter or the redirection target."
-  analyzerCode: REDIRECT_TO_INVALID_FUNCTION_TYPE
-  script:
     - >-
       class A {
         factory A.i(int x) = A.s;
         A.s(String x) { }
       }
-
-RedirectingFactoryMissingNamedParameter:
-  template: "The constructor '#name' does not have a named parameter '#name2'."
-  tip: "Try adding '#name2' as a named parameter to '#name'."
-  analyzerCode: REDIRECT_TO_INVALID_FUNCTION_TYPE
-  script:
     - >-
       class A {
         factory A.f({int x}) = A.g;
         A.g({int y}) { }
       }
-
-RedirectingFactoryInvalidNamedParameterType:
-  template: "The type of the named parameter '#name', '#type' is not a subtype of the redirection target's corresponding named parameter type, '#type2'."
-  tip: "Try changing either the type of the parameter or the redirection target."
-  analyzerCode: REDIRECT_TO_INVALID_FUNCTION_TYPE
-  script:
-    - >-
-      class A {
-        factory A.f({int x}) = A.g;
-        A.g({String x}) { }
-      }
-
-RedirectingFactoryProvidesTooFewRequiredParameters:
-  template: "Redirecting factory '#name' can provide less arguments ('#count') than required by the redirection target '#name2' ('#count2')."
-  tip: "Try redirecting to a different constructor."
-  analyzerCode: REDIRECT_TO_INVALID_FUNCTION_TYPE
-  script:
     - >-
       class A {
         factory A.f(int x) = A.g;
         A.g(int x, int y) {}
       }
+    - >-
+      class A<T extends int> {
+         factory A() = B<T, int>;
+      }
+      class B<T extends int, S extends String> implements A<T> {}
 
 RedirectingFactoryIncompatibleTypeArgument:
   template: "The type '#type' doesn't extend '#type2'."
@@ -3346,3 +3337,18 @@
   template: "'#name' is from '#uri' ('#uri2')."
   frontendInternal: true
   external: test/type_labeler_test.dart
+
+ObjectExtends:
+  template: "The class 'Object' can't have a superclass."
+  frontendInternal: true
+  external: test/fasta/object_supertype_test.dart
+
+ObjectImplements:
+  template: "The class 'Object' can't implement anything."
+  frontendInternal: true
+  external: test/fasta/object_supertype_test.dart
+
+ObjectMixesIn:
+  template: "The class 'Object' can't use mixins."
+  frontendInternal: true
+  external: test/fasta/object_supertype_test.dart
diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml
index 97934cb..86cecb5 100644
--- a/pkg/front_end/pubspec.yaml
+++ b/pkg/front_end/pubspec.yaml
@@ -1,7 +1,7 @@
 name: front_end
 # Currently, front_end API is not stable and users should not
 # depend on semver semantics when depending on this package.
-version: 0.1.6+8
+version: 0.1.8
 author: Dart Team <misc@dartlang.org>
 description: Front end for compilation of Dart code.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/front_end
@@ -11,14 +11,14 @@
   charcode: '^1.1.1'
   convert: '^2.0.1'
   crypto: '^2.0.2'
-  kernel: 0.3.6+8
+  kernel: 0.3.8
   meta: '^1.1.1'
   package_config: '^1.0.1'
   path: '^1.3.9'
   source_span: '^1.2.3'
   yaml: '^2.1.12'
 dev_dependencies:
-  analyzer: '^0.33.6'
+  analyzer: 0.34.1
   args: '>=0.13.0 <2.0.0'
   build_integration:
     path: ../build_integration
diff --git a/pkg/front_end/test/fasta/incremental_test.dart b/pkg/front_end/test/fasta/incremental_test.dart
index 3a6bc70..5324602 100644
--- a/pkg/front_end/test/fasta/incremental_test.dart
+++ b/pkg/front_end/test/fasta/incremental_test.dart
@@ -15,6 +15,8 @@
 import "package:testing/testing.dart"
     show Chain, ChainContext, Result, Step, TestDescription, runMe;
 
+import "package:testing/src/log.dart" show splitLines;
+
 import "package:yaml/yaml.dart" show YamlMap, loadYamlNode;
 
 import "package:front_end/src/api_prototype/compiler_options.dart"
@@ -158,8 +160,10 @@
           return fail(test, "Compile-time error expected, but none reported");
         }
       } else if (errors.isNotEmpty) {
-        return fail(
-            test, "Unexpected compile-time errors:\n  ${errors.join('\n  ')}");
+        String indentedErrors =
+            splitLines(errors.map((e) => e.ansiFormatted.join("\n")).join("\n"))
+                .join("  ");
+        return fail(test, "Unexpected compile-time errors:\n  $indentedErrors");
       } else if (component.libraries.length < 1) {
         return fail(test, "The compiler detected no changes");
       }
diff --git a/pkg/front_end/test/fasta/object_supertype_test.dart b/pkg/front_end/test/fasta/object_supertype_test.dart
new file mode 100644
index 0000000..fd00300
--- /dev/null
+++ b/pkg/front_end/test/fasta/object_supertype_test.dart
@@ -0,0 +1,101 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:convert" show json;
+
+import "package:async_helper/async_helper.dart" show asyncTest;
+
+import "package:expect/expect.dart" show Expect;
+
+import "package:front_end/src/api_prototype/compiler_options.dart"
+    show CompilerOptions;
+
+import "package:front_end/src/api_prototype/diagnostic_message.dart"
+    show DiagnosticMessage, getMessageCodeObject;
+
+import "package:front_end/src/api_prototype/memory_file_system.dart"
+    show MemoryFileSystem;
+
+import "package:front_end/src/base/processed_options.dart"
+    show ProcessedOptions;
+
+import "package:front_end/src/fasta/compiler_context.dart" show CompilerContext;
+
+import "package:front_end/src/fasta/messages.dart"
+    show Code, codeObjectExtends, codeObjectImplements, codeObjectMixesIn;
+
+import "package:front_end/src/fasta/source/source_loader.dart"
+    show defaultDartCoreSource;
+
+import "package:front_end/src/fasta/ticker.dart" show Ticker;
+
+import "../../tool/_fasta/entry_points.dart" show CompileTask;
+
+Future<List<DiagnosticMessage>> outline(String objectHeader) async {
+  final Ticker ticker = new Ticker(isVerbose: false);
+  final Uri base = Uri.parse("org-dartlang-test:///");
+
+  final MemoryFileSystem fs = new MemoryFileSystem(base);
+
+  final Uri librariesSpecificationUri = base.resolve("sdk/libraries.json");
+
+  fs.entityForUri(librariesSpecificationUri).writeAsStringSync(json.encode({
+        "none": {
+          "libraries": {
+            "core": {
+              "uri": "lib/core/core.dart",
+            },
+          },
+        },
+      }));
+
+  fs.entityForUri(base.resolve("sdk/lib/core/core.dart")).writeAsStringSync(
+      defaultDartCoreSource.replaceAll("class Object {", "$objectHeader"));
+
+  final List<DiagnosticMessage> messages = <DiagnosticMessage>[];
+
+  CompilerContext context = new CompilerContext(new ProcessedOptions(
+      options: new CompilerOptions()
+        ..onDiagnostic = messages.add
+        ..sdkRoot = base.resolve("sdk/")
+        ..fileSystem = fs
+        ..compileSdk = true
+        ..librariesSpecificationUri = librariesSpecificationUri,
+      inputs: [Uri.parse("dart:core")]));
+
+  await context.runInContext<void>((_) async {
+    CompileTask task = new CompileTask(context, ticker);
+    await task.buildOutline();
+  });
+  return messages;
+}
+
+test() async {
+  Set<String> normalErrors = (await outline("class Object {"))
+      .map((DiagnosticMessage message) => getMessageCodeObject(message).name)
+      .toSet();
+
+  check(String objectHeader, List<Code> expectedCodes) async {
+    List<DiagnosticMessage> messages = (await outline(objectHeader))
+        .where((DiagnosticMessage message) =>
+            !normalErrors.contains(getMessageCodeObject(message).name))
+        .toList();
+    Expect.setEquals(
+        expectedCodes,
+        messages.map((DiagnosticMessage m) => getMessageCodeObject(m)),
+        objectHeader);
+  }
+
+  await check("class Object extends String {", <Code>[codeObjectExtends]);
+
+  await check(
+      "class Object implements String, bool {", <Code>[codeObjectImplements]);
+
+  await check("class Object = Object with bool ; class Blah {",
+      <Code>[codeObjectExtends, codeObjectMixesIn]);
+}
+
+main() {
+  asyncTest(test);
+}
diff --git a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
index f47b461..a4f4aa5 100644
--- a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
+++ b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
@@ -12,6 +12,7 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(TokenStreamGhostWriterTest);
     defineReflectiveTests(TokenStreamRewriterTest_NoPrevious);
     defineReflectiveTests(TokenStreamRewriterTest_UsingPrevious);
   });
@@ -22,6 +23,71 @@
   /// Indicates whether the tests should set up [Token.previous].
   bool get setPrevious;
 
+  void test_insertParens() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var eof = _link([a, b]);
+    var rewriter = new TokenStreamRewriter();
+    var openParen = rewriter.insertParens(a, false);
+    var closeParen = openParen.next;
+
+    expect(openParen.lexeme, '(');
+    expect(closeParen.lexeme, ')');
+
+    expect(a.next, same(openParen));
+    expect(openParen.next, same(closeParen));
+    expect(closeParen.next, same(b));
+    expect(b.next, same(eof));
+
+    expect(b.previous, same(closeParen));
+    expect(closeParen.previous, same(openParen));
+    expect(openParen.previous, same(a));
+  }
+
+  void test_insertParensWithIdentifier() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var eof = _link([a, b]);
+    var rewriter = new TokenStreamRewriter();
+    var openParen = rewriter.insertParens(a, true);
+    var identifier = openParen.next;
+    var closeParen = identifier.next;
+
+    expect(openParen.lexeme, '(');
+    expect(identifier.lexeme, '');
+    expect(identifier.isSynthetic, isTrue);
+    expect(closeParen.lexeme, ')');
+
+    expect(a.next, same(openParen));
+    expect(openParen.next, same(identifier));
+    expect(identifier.next, same(closeParen));
+    expect(closeParen.next, same(b));
+    expect(b.next, same(eof));
+
+    expect(b.previous, same(closeParen));
+    expect(closeParen.previous, same(identifier));
+    expect(identifier.previous, same(openParen));
+    expect(openParen.previous, same(a));
+  }
+
+  void test_insertSyntheticIdentifier() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var eof = _link([a, b]);
+    var rewriter = new TokenStreamRewriter();
+    var identifier = rewriter.insertSyntheticIdentifier(a);
+
+    expect(identifier.lexeme, '');
+    expect(identifier.isSynthetic, isTrue);
+
+    expect(a.next, same(identifier));
+    expect(identifier.next, same(b));
+    expect(b.next, same(eof));
+
+    expect(b.previous, same(identifier));
+    expect(identifier.previous, same(a));
+  }
+
   void test_insertToken_end() {
     var a = _makeToken(0, 'a');
     var b = _makeToken(1, 'b');
@@ -142,9 +208,6 @@
 /// finding previous tokens.
 @reflectiveTest
 class TokenStreamRewriterTest_NoPrevious extends TokenStreamRewriterTest {
-  // These tests are failing because the re-writer currently depends on the
-  // previous pointer.
-
   @override
   bool get setPrevious => false;
 }
@@ -160,3 +223,201 @@
   @override
   bool get setPrevious => true;
 }
+
+@reflectiveTest
+class TokenStreamGhostWriterTest extends TokenStreamRewriterTest {
+  @override
+  bool get setPrevious => false;
+
+  void test_insertParens() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var eof = _link([a, b]);
+    var rewriter = new TokenStreamGhostWriter();
+    var openParen = rewriter.insertParens(a, false);
+    var closeParen = openParen.next;
+
+    expect(openParen.lexeme, '(');
+    expect(closeParen.lexeme, ')');
+
+    expect(a.next, same(b));
+    expect(openParen.next, same(closeParen));
+    expect(closeParen.next, same(b));
+    expect(b.next, same(eof));
+
+    expect(b.previous, isNull);
+    expect(closeParen.previous, isNull);
+    expect(openParen.previous, isNull);
+  }
+
+  void test_insertParensWithIdentifier() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var eof = _link([a, b]);
+    var rewriter = new TokenStreamGhostWriter();
+    var openParen = rewriter.insertParens(a, true);
+    var identifier = openParen.next;
+    var closeParen = identifier.next;
+
+    expect(openParen.lexeme, '(');
+    expect(identifier.lexeme, '');
+    expect(identifier.isSynthetic, isTrue);
+    expect(closeParen.lexeme, ')');
+
+    expect(a.next, same(b));
+    expect(openParen.next, same(identifier));
+    expect(identifier.next, same(closeParen));
+    expect(closeParen.next, same(b));
+    expect(b.next, same(eof));
+
+    expect(b.previous, isNull);
+    expect(closeParen.previous, isNull);
+    expect(identifier.previous, isNull);
+    expect(openParen.previous, isNull);
+  }
+
+  void test_insertSyntheticIdentifier() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var eof = _link([a, b]);
+    var rewriter = new TokenStreamGhostWriter();
+    var identifier = rewriter.insertSyntheticIdentifier(a);
+
+    expect(identifier.lexeme, '');
+    expect(identifier.isSynthetic, isTrue);
+
+    expect(a.next, same(b));
+    expect(identifier.next, same(b));
+    expect(b.next, same(eof));
+
+    expect(b.previous, isNull);
+    expect(identifier.previous, isNull);
+  }
+
+  void test_insertToken_end() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var eof = _link([a]);
+    var rewriter = new TokenStreamGhostWriter();
+
+    expect(rewriter.insertToken(a, b), same(b));
+    expect(a.next, same(eof));
+    expect(b.next, same(eof));
+
+    expect(eof.previous, isNull);
+    expect(b.previous, isNull);
+  }
+
+  void test_insertToken_middle() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var c = _makeToken(2, 'c');
+    _link([a, c]);
+
+    var rewriter = new TokenStreamGhostWriter();
+    rewriter.insertToken(a, b);
+    expect(a.next, same(c));
+    expect(b.next, same(c));
+
+    expect(a.previous, isNull);
+    expect(b.previous, isNull);
+    expect(c.previous, isNull);
+  }
+
+  void test_insertToken_second_insertion_earlier_in_stream() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var c = _makeToken(2, 'c');
+    var d = _makeToken(3, 'd');
+    var e = _makeToken(4, 'e');
+    _link([a, c, e]);
+    var rewriter = new TokenStreamGhostWriter();
+
+    rewriter.insertToken(c, d);
+    expect(c.next, same(e));
+    expect(d.next, same(e));
+
+    // The next call to rewriter should be able to find the insertion point
+    // even though it is before the insertion point used above.
+    rewriter.insertToken(a, b);
+    expect(a.next, same(c));
+    expect(b.next, same(c));
+
+    expect(a.previous, isNull);
+    expect(b.previous, isNull);
+    expect(c.previous, isNull);
+    expect(d.previous, isNull);
+    expect(e.previous, isNull);
+  }
+
+  void test_moveSynthetic() {
+    ScannerResult scanResult = scanString('Foo(bar; baz=0;');
+    expect(scanResult.hasErrors, isTrue);
+    Token open = scanResult.tokens.next.next;
+    expect(open.lexeme, '(');
+    Token semicolon = open.next.next;
+    expect(semicolon.lexeme, ';');
+    Token close = open.endGroup;
+    expect(close.isSynthetic, isTrue);
+    expect(close.next.isEof, isTrue);
+    Token semicolon2 = close.previous;
+    expect(semicolon2.lexeme, ';');
+    var rewriter = new TokenStreamGhostWriter();
+
+    Token newClose = rewriter.moveSynthetic(open.next, close);
+    expect(newClose, isNot(same(close)));
+    expect(newClose.next, same(semicolon));
+    expect(open.endGroup, close);
+    expect(open.next.next, semicolon);
+    expect(close.next.isEof, isTrue);
+
+    expect(newClose.previous, isNull);
+    expect(close.next.previous, close);
+    expect(close.previous, semicolon2);
+  }
+
+  void test_replaceTokenFollowing_multiple() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var c = _makeToken(2, 'c');
+    var d = _makeToken(3, 'd');
+    var e = _makeToken(4, 'e');
+    var f = _makeToken(5, 'f');
+    _link([a, b, e, f]);
+    _link([c, d]);
+    var rewriter = new TokenStreamGhostWriter();
+    Token result = rewriter.replaceTokenFollowing(b, c);
+
+    expect(result, same(c));
+    expect(a.next, same(b));
+    expect(b.next, same(e));
+    expect(e.next, same(f));
+    expect(c.next, same(d));
+    expect(d.next, same(f));
+
+    expect(a.previous, isNull);
+    expect(b.previous, isNull);
+    expect(c.previous, isNull);
+    expect(d.previous, isNull);
+    expect(e.previous, isNull);
+  }
+
+  void test_replaceTokenFollowing_single() {
+    var a = _makeToken(0, 'a');
+    var b = _makeToken(1, 'b');
+    var c = _makeToken(2, 'c');
+    var d = _makeToken(3, 'd');
+    _link([a, b, d]);
+    var rewriter = new TokenStreamGhostWriter();
+    Token result = rewriter.replaceTokenFollowing(a, c);
+
+    expect(result, same(c));
+    expect(a.next, same(b));
+    expect(b.next, same(d));
+    expect(c.next, same(d));
+
+    expect(a.previous, isNull);
+    expect(b.previous, isNull);
+    expect(c.previous, isNull);
+  }
+}
diff --git a/pkg/front_end/test/fasta/parser/type_info_test.dart b/pkg/front_end/test/fasta/parser/type_info_test.dart
index 975eda8..2f13cfe 100644
--- a/pkg/front_end/test/fasta/parser/type_info_test.dart
+++ b/pkg/front_end/test/fasta/parser/type_info_test.dart
@@ -19,7 +19,9 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(NoTypeInfoTest);
     defineReflectiveTests(PrefixedTypeInfoTest);
-    defineReflectiveTests(SimpleTypeInfoTest);
+    defineReflectiveTests(SimpleNullableTypeTest);
+    defineReflectiveTests(SimpleNullableTypeWith1ArgumentTest);
+    defineReflectiveTests(SimpleTypeTest);
     defineReflectiveTests(SimpleTypeWith1ArgumentTest);
     defineReflectiveTests(TypeInfoTest);
     defineReflectiveTests(VoidTypeInfoTest);
@@ -27,6 +29,7 @@
     defineReflectiveTests(NoTypeParamOrArgTest);
     defineReflectiveTests(SimpleTypeParamOrArgTest);
     defineReflectiveTests(TypeParamOrArgInfoTest);
+    defineReflectiveTests(CouldBeExpressionTest);
   });
 }
 
@@ -141,7 +144,7 @@
     expect(listener.calls, [
       'handleIdentifier  typeReference',
       'handleNoTypeArguments ;',
-      'handleType ',
+      'handleType  null',
     ]);
     expect(listener.errors, [new ExpectedError(codeExpectedType, 7, 1)]);
   }
@@ -155,7 +158,7 @@
     expect(listener.calls, [
       'handleIdentifier  typeReference',
       'handleNoTypeArguments ;',
-      'handleType ',
+      'handleType  null',
     ]);
     expect(listener.errors, [new ExpectedError(codeExpectedType, 7, 1)]);
   }
@@ -219,7 +222,7 @@
     expect(listener.calls, [
       'handleIdentifier void typeReference',
       'handleNoTypeArguments ;',
-      'handleType void',
+      'handleType void null',
     ]);
     expect(listener.errors, [new ExpectedError(codeInvalidVoid, 7, 4)]);
   }
@@ -250,7 +253,7 @@
     expect(listener.calls, [
       'handleIdentifier void typeReference',
       'handleNoTypeArguments ;',
-      'handleType void',
+      'handleType void null',
     ]);
     expect(listener.errors, [new ExpectedError(codeInvalidVoid, 7, 4)]);
   }
@@ -289,7 +292,7 @@
         'handleIdentifier a typeReferenceContinuation',
         'handleQualified .',
         'handleNoTypeArguments ;',
-        'handleType C',
+        'handleType C null',
       ]);
       expect(listener.errors, isNull);
     }
@@ -309,14 +312,133 @@
 }
 
 @reflectiveTest
-class SimpleTypeInfoTest {
+class SimpleNullableTypeTest {
+  void test_compute() {
+    expectInfo(simpleNullableType, 'C?', required: true);
+    expectInfo(simpleNullableType, 'C?;', required: true);
+    expectInfo(simpleNullableType, 'C?(', required: true);
+    expectInfo(simpleNullableType, 'C?<', required: true);
+    expectInfo(simpleNullableType, 'C?=', required: true);
+    expectInfo(simpleNullableType, 'C?*', required: true);
+    expectInfo(simpleNullableType, 'C? do', required: true);
+
+    expectInfo(simpleNullableType, 'C? foo');
+    expectInfo(simpleNullableType, 'C? get');
+    expectInfo(simpleNullableType, 'C? set');
+    expectInfo(simpleNullableType, 'C? operator');
+    expectInfo(simpleNullableType, 'C? this');
+    expectInfo(simpleNullableType, 'C? Function');
+
+    expectInfo(simpleNullableType, 'C? Function()', required: false);
+    expectInfo(simpleNullableType, 'C? Function<T>()', required: false);
+    expectInfo(simpleNullableType, 'C? Function(int)', required: false);
+    expectInfo(simpleNullableType, 'C? Function<T>(int)', required: false);
+    expectInfo(simpleNullableType, 'C? Function(int x)', required: false);
+    expectInfo(simpleNullableType, 'C? Function<T>(int x)', required: false);
+  }
+
+  void test_simpleNullableType() {
+    final Token start = scanString('before C? ;').tokens;
+    final Token expectedEnd = start.next.next;
+
+    expect(simpleNullableType.skipType(start), expectedEnd);
+    expect(simpleNullableType.couldBeExpression, isTrue);
+
+    TypeInfoListener listener;
+    assertResult(Token actualEnd) {
+      expect(actualEnd, expectedEnd);
+      expect(listener.calls, [
+        'handleIdentifier C typeReference',
+        'handleNoTypeArguments ?',
+        'handleType C ?',
+      ]);
+      expect(listener.errors, isNull);
+    }
+
+    listener = new TypeInfoListener();
+    assertResult(
+        simpleNullableType.ensureTypeNotVoid(start, new Parser(listener)));
+
+    listener = new TypeInfoListener();
+    assertResult(
+        simpleNullableType.ensureTypeOrVoid(start, new Parser(listener)));
+
+    listener = new TypeInfoListener();
+    assertResult(
+        simpleNullableType.parseTypeNotVoid(start, new Parser(listener)));
+
+    listener = new TypeInfoListener();
+    assertResult(simpleNullableType.parseType(start, new Parser(listener)));
+  }
+}
+
+@reflectiveTest
+class SimpleNullableTypeWith1ArgumentTest {
+  void test_compute() {
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>?', required: true);
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>?;', required: true);
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>?(', required: true);
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>? do', required: true);
+
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>? foo');
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>? get');
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>? set');
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>? operator');
+    expectInfo(simpleNullableTypeWith1Argument, 'C<T>? Function');
+  }
+
+  void test_gt_questionMark() {
+    final Token start = scanString('before C<T>? ;').tokens;
+    final Token expectedEnd = start.next.next.next.next.next;
+    expect(expectedEnd.lexeme, '?');
+
+    expect(simpleNullableTypeWith1Argument.skipType(start), expectedEnd);
+    expect(simpleNullableTypeWith1Argument.couldBeExpression, isFalse);
+
+    TypeInfoListener listener;
+    assertResult(Token actualEnd) {
+      expect(actualEnd, expectedEnd);
+      expect(listener.calls, [
+        'handleIdentifier C typeReference',
+        'beginTypeArguments <',
+        'handleIdentifier T typeReference',
+        'handleNoTypeArguments >',
+        'handleType T null',
+        'endTypeArguments 1 < >',
+        'handleType C ?',
+      ]);
+      expect(listener.errors, isNull);
+    }
+
+    listener = new TypeInfoListener();
+    assertResult(simpleNullableTypeWith1Argument.ensureTypeNotVoid(
+        start, new Parser(listener)));
+
+    listener = new TypeInfoListener();
+    assertResult(simpleNullableTypeWith1Argument.ensureTypeOrVoid(
+        start, new Parser(listener)));
+
+    listener = new TypeInfoListener();
+    assertResult(simpleNullableTypeWith1Argument.parseTypeNotVoid(
+        start, new Parser(listener)));
+
+    listener = new TypeInfoListener();
+    assertResult(
+        simpleNullableTypeWith1Argument.parseType(start, new Parser(listener)));
+  }
+}
+
+@reflectiveTest
+class SimpleTypeTest {
   void test_compute() {
     expectInfo(simpleType, 'C', required: true);
     expectInfo(simpleType, 'C;', required: true);
     expectInfo(simpleType, 'C(', required: true);
     expectInfo(simpleType, 'C<', required: true);
     expectComplexInfo('C.',
-        required: true, expectedErrors: [error(codeExpectedType, 2, 0)]);
+        required: true,
+        couldBeExpression: true,
+        expectedErrors: [error(codeExpectedType, 2, 0)]);
     expectInfo(simpleType, 'C=', required: true);
     expectInfo(simpleType, 'C*', required: true);
     expectInfo(simpleType, 'C do', required: true);
@@ -336,7 +458,7 @@
     expectInfo(simpleType, 'C Function<T>(int x)', required: false);
   }
 
-  void test_simpleTypeInfo() {
+  void test_simpleType() {
     final Token start = scanString('before C ;').tokens;
     final Token expectedEnd = start.next;
 
@@ -349,7 +471,7 @@
       expect(listener.calls, [
         'handleIdentifier C typeReference',
         'handleNoTypeArguments ;',
-        'handleType C',
+        'handleType C null',
       ]);
       expect(listener.errors, isNull);
     }
@@ -425,9 +547,9 @@
         'beginTypeArguments <',
         'handleIdentifier T typeReference',
         'handleNoTypeArguments >',
-        'handleType T',
+        'handleType T null',
         'endTypeArguments 1 < >',
-        'handleType C',
+        'handleType C null',
       ]);
       expect(listener.errors, isNull);
     }
@@ -471,9 +593,9 @@
         'beginTypeArguments <',
         'handleIdentifier T typeReference',
         'handleNoTypeArguments >',
-        'handleType T',
+        'handleType T null',
         'endTypeArguments 1 < >',
-        'handleType C',
+        'handleType C null',
       ]);
       expect(listener.errors, isNull);
     }
@@ -516,9 +638,9 @@
         'beginTypeArguments <',
         'handleIdentifier T typeReference',
         'handleNoTypeArguments >',
-        'handleType T',
+        'handleType T null',
         'endTypeArguments 1 < >',
-        'handleType C',
+        'handleType C null',
       ]);
       expect(listener.errors, isNull);
     }
@@ -545,14 +667,19 @@
 class TypeInfoTest {
   void test_computeType_basic() {
     expectInfo(noType, '.', required: false);
-    expectComplexInfo('.', required: true, expectedErrors: [
-      error(codeExpectedType, 0, 1),
-      error(codeExpectedType, 1, 0)
-    ]);
+    expectComplexInfo('.',
+        required: true,
+        couldBeExpression: true,
+        expectedErrors: [
+          error(codeExpectedType, 0, 1),
+          error(codeExpectedType, 1, 0)
+        ]);
 
     expectInfo(noType, '.Foo', required: false);
     expectComplexInfo('.Foo',
-        required: true, expectedErrors: [error(codeExpectedType, 0, 1)]);
+        required: true,
+        couldBeExpression: true,
+        expectedErrors: [error(codeExpectedType, 0, 1)]);
   }
 
   void test_computeType_builtin() {
@@ -560,16 +687,20 @@
     // an error for the builtin used as a type.
     expectComplexInfo('abstract',
         required: true,
+        couldBeExpression: true,
         expectedErrors: [error(codeBuiltInIdentifierAsType, 0, 8)]);
     expectComplexInfo('export',
         required: true,
+        couldBeExpression: true,
         expectedErrors: [error(codeBuiltInIdentifierAsType, 0, 6)]);
     expectComplexInfo('abstract Function()',
         required: false,
+        couldBeExpression: true,
         expectedAfter: 'Function',
         expectedErrors: [error(codeBuiltInIdentifierAsType, 0, 8)]);
     expectComplexInfo('export Function()',
         required: false,
+        couldBeExpression: true,
         expectedAfter: 'Function',
         expectedErrors: [error(codeBuiltInIdentifierAsType, 0, 6)]);
   }
@@ -581,7 +712,7 @@
       'handleNoType ',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-      'endFunctionType Function',
+      'endFunctionType Function null',
     ]);
     expectComplexInfo('Function<T>() m', expectedAfter: 'm', expectedCalls: [
       'beginTypeVariables <',
@@ -597,7 +728,7 @@
       'handleNoType ',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-      'endFunctionType Function',
+      'endFunctionType Function null',
     ]);
     expectComplexInfo('Function(int) m', expectedAfter: 'm', expectedCalls: [
       'handleNoTypeVariables (',
@@ -609,13 +740,13 @@
       'beginFormalParameter int MemberKind.GeneralizedFunctionType',
       'handleIdentifier int typeReference',
       'handleNoTypeArguments )',
-      'handleType int',
+      'handleType int null',
       'handleNoName )',
       'handleFormalParameterWithoutValue )',
       'endFormalParameter null null ) FormalParameterKind.mandatory '
           'MemberKind.GeneralizedFunctionType',
       'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
-      'endFunctionType Function',
+      'endFunctionType Function null',
     ]);
     expectComplexInfo('Function<T>(int) m', expectedAfter: 'm', expectedCalls: [
       'beginTypeVariables <',
@@ -635,13 +766,13 @@
       'beginFormalParameter int MemberKind.GeneralizedFunctionType',
       'handleIdentifier int typeReference',
       'handleNoTypeArguments )',
-      'handleType int',
+      'handleType int null',
       'handleNoName )',
       'handleFormalParameterWithoutValue )',
       'endFormalParameter null null ) FormalParameterKind.mandatory'
           ' MemberKind.GeneralizedFunctionType',
       'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
-      'endFunctionType Function',
+      'endFunctionType Function null',
     ]);
 
     expectComplexInfo('Function(int x)', required: true);
@@ -674,10 +805,173 @@
           'beginFunctionType C',
           'handleIdentifier C typeReference',
           'handleNoTypeArguments Function',
-          'handleType C',
+          'handleType C null',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
+        ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark() {
+    expectComplexInfo('C? Function()', required: true, expectedCalls: [
+      'handleNoTypeVariables (',
+      'beginFunctionType C',
+      'handleIdentifier C typeReference',
+      'handleNoTypeArguments ?',
+      'handleType C ?',
+      'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+      'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+      'endFunctionType Function null',
+    ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark2() {
+    expectComplexInfo('C Function()?', required: true, expectedCalls: [
+      'handleNoTypeVariables (',
+      'beginFunctionType C',
+      'handleIdentifier C typeReference',
+      'handleNoTypeArguments Function',
+      'handleType C null',
+      'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+      'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+      'endFunctionType Function ?',
+    ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark3() {
+    expectComplexInfo('C<T>? Function()', required: true, expectedCalls: [
+      'handleNoTypeVariables (',
+      'beginFunctionType C',
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments >',
+      'handleType T null',
+      'endTypeArguments 1 < >',
+      'handleType C ?',
+      'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+      'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+      'endFunctionType Function null',
+    ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark4() {
+    expectComplexInfo('C<S,T>? Function()', required: true, expectedCalls: [
+      'handleNoTypeVariables (',
+      'beginFunctionType C',
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'handleNoTypeArguments ,',
+      'handleType S null',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments >',
+      'handleType T null',
+      'endTypeArguments 2 < >',
+      'handleType C ?',
+      'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+      'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+      'endFunctionType Function null',
+    ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark5() {
+    expectComplexInfo('C Function()? Function()',
+        required: true,
+        expectedCalls: [
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleIdentifier C typeReference',
+          'handleNoTypeArguments Function',
+          'handleType C null',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function ?',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function null',
+        ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark6() {
+    expectComplexInfo('C Function() Function()?',
+        required: true,
+        expectedCalls: [
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleIdentifier C typeReference',
+          'handleNoTypeArguments Function',
+          'handleType C null',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function null',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function ?',
+        ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark7() {
+    expectComplexInfo('C? Function() Function()?',
+        required: true,
+        expectedCalls: [
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleIdentifier C typeReference',
+          'handleNoTypeArguments ?',
+          'handleType C ?',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function null',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function ?',
+        ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark8() {
+    expectComplexInfo('C Function()? Function()?',
+        required: true,
+        expectedCalls: [
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleIdentifier C typeReference',
+          'handleNoTypeArguments Function',
+          'handleType C null',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function ?',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function ?',
+        ]);
+  }
+
+  void test_computeType_identifierComplex_questionMark9() {
+    expectComplexInfo('C? Function()? Function()?',
+        required: true,
+        expectedCalls: [
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleIdentifier C typeReference',
+          'handleNoTypeArguments ?',
+          'handleType C ?',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function ?',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function ?',
         ]);
   }
 
@@ -687,7 +981,17 @@
       'beginTypeArguments <',
       'handleVoidKeyword void',
       'endTypeArguments 1 < >',
-      'handleType C',
+      'handleType C null',
+    ]);
+  }
+
+  void test_computeType_identifierTypeArg_questionMark() {
+    expectComplexInfo('C<void>?', required: true, expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleVoidKeyword void',
+      'endTypeArguments 1 < >',
+      'handleType C ?',
     ]);
   }
 
@@ -697,12 +1001,12 @@
       'beginTypeArguments <',
       'handleIdentifier S typeReference',
       'handleNoTypeArguments ,',
-      'handleType S',
+      'handleType S null',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 2 < >',
-      'handleType C',
+      'handleType C null',
     ]);
     expectComplexInfo('C<S<T>>', required: true, expectedCalls: [
       'handleIdentifier C typeReference',
@@ -711,23 +1015,23 @@
       'beginTypeArguments <',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >',
-      'handleType S',
+      'handleType S null',
       'endTypeArguments 1 < >',
-      'handleType C',
+      'handleType C null',
     ]);
     expectComplexInfo('C<S,T> f', expectedAfter: 'f', expectedCalls: [
       'handleIdentifier C typeReference',
       'beginTypeArguments <',
       'handleIdentifier S typeReference',
       'handleNoTypeArguments ,',
-      'handleType S',
+      'handleType S null',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 2 < >',
-      'handleType C',
+      'handleType C null',
     ]);
     expectComplexInfo('C<S<T>> f', expectedAfter: 'f', expectedCalls: [
       'handleIdentifier C typeReference',
@@ -736,11 +1040,162 @@
       'beginTypeArguments <',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >',
-      'handleType S',
+      'handleType S null',
       'endTypeArguments 1 < >',
-      'handleType C',
+      'handleType C null',
+    ]);
+  }
+
+  void test_computeType_identifierTypeArgComplex_questionMark() {
+    expectComplexInfo('C<S,T>?', required: true, expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'handleNoTypeArguments ,',
+      'handleType S null',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments >',
+      'handleType T null',
+      'endTypeArguments 2 < >',
+      'handleType C ?',
+    ]);
+    expectComplexInfo('C<S,T?>', required: true, expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'handleNoTypeArguments ,',
+      'handleType S null',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments ?',
+      'handleType T ?',
+      'endTypeArguments 2 < >',
+      'handleType C null',
+    ]);
+    expectComplexInfo('C<S,T?>>',
+        expectedAfter: '>',
+        required: true,
+        expectedCalls: [
+          'handleIdentifier C typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'handleNoTypeArguments ,',
+          'handleType S null',
+          'handleIdentifier T typeReference',
+          'handleNoTypeArguments ?',
+          'handleType T ?',
+          'endTypeArguments 2 < >',
+          'handleType C null',
+        ]);
+    expectComplexInfo('C<S,T?>=',
+        expectedAfter: '=',
+        required: true,
+        expectedCalls: [
+          'handleIdentifier C typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'handleNoTypeArguments ,',
+          'handleType S null',
+          'handleIdentifier T typeReference',
+          'handleNoTypeArguments ?',
+          'handleType T ?',
+          'endTypeArguments 2 < >',
+          'handleType C null',
+        ]);
+    expectComplexInfo('C<S,T?>>>',
+        expectedAfter: '>>',
+        required: true,
+        expectedCalls: [
+          'handleIdentifier C typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'handleNoTypeArguments ,',
+          'handleType S null',
+          'handleIdentifier T typeReference',
+          'handleNoTypeArguments ?',
+          'handleType T ?',
+          'endTypeArguments 2 < >',
+          'handleType C null',
+        ]);
+    expectComplexInfo('C<S?,T>', required: true, expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'handleNoTypeArguments ?',
+      'handleType S ?',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments >',
+      'handleType T null',
+      'endTypeArguments 2 < >',
+      'handleType C null',
+    ]);
+    expectComplexInfo('C<S<T>>?', required: true, expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments >',
+      'handleType T null',
+      'endTypeArguments 1 < >',
+      'handleType S null',
+      'endTypeArguments 1 < >',
+      'handleType C ?',
+    ]);
+    expectComplexInfo('C<S<T?>>', required: true, expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments ?',
+      'handleType T ?',
+      'endTypeArguments 1 < >',
+      'handleType S null',
+      'endTypeArguments 1 < >',
+      'handleType C null',
+    ]);
+    expectComplexInfo('C<S<T?>>>',
+        expectedAfter: '>',
+        required: true,
+        expectedCalls: [
+          'handleIdentifier C typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier T typeReference',
+          'handleNoTypeArguments ?',
+          'handleType T ?',
+          'endTypeArguments 1 < >',
+          'handleType S null',
+          'endTypeArguments 1 < >',
+          'handleType C null',
+        ]);
+    expectComplexInfo('C<S,T>? f', expectedAfter: 'f', expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'handleNoTypeArguments ,',
+      'handleType S null',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments >',
+      'handleType T null',
+      'endTypeArguments 2 < >',
+      'handleType C ?',
+    ]);
+    expectComplexInfo('C<S<T>>? f', expectedAfter: 'f', expectedCalls: [
+      'handleIdentifier C typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier S typeReference',
+      'beginTypeArguments <',
+      'handleIdentifier T typeReference',
+      'handleNoTypeArguments >',
+      'handleType T null',
+      'endTypeArguments 1 < >',
+      'handleType S null',
+      'endTypeArguments 1 < >',
+      'handleType C ?',
     ]);
   }
 
@@ -754,12 +1209,12 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType C',
+          'handleType C null',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
         ]);
     expectComplexInfo('C<T> Function<T>(int x) Function<T>(int x)',
         required: false, expectedAfter: 'Function');
@@ -780,12 +1235,12 @@
           'beginTypeArguments <',
           'handleIdentifier int typeReference',
           'handleNoTypeArguments double' /* was , */,
-          'handleType int' /* was , */,
+          'handleType int null' /* was , */,
           'handleIdentifier double typeReference',
           'handleNoTypeArguments >',
-          'handleType double',
+          'handleType double null',
           'endTypeArguments 2 < >',
-          'handleType G',
+          'handleType G null',
         ],
         expectedErrors: [
           error(codeExpectedButGot, 6, 6)
@@ -797,9 +1252,9 @@
       'beginTypeArguments <',
       'handleIdentifier  typeReference',
       'handleNoTypeArguments >',
-      'handleType ',
+      'handleType  null',
       'endTypeArguments 1 < >',
-      'handleType C',
+      'handleType C null',
     ], expectedErrors: [
       error(codeExpectedType, 2, 1)
     ]);
@@ -811,14 +1266,16 @@
           'beginTypeArguments <',
           'handleIdentifier  typeReference',
           'handleNoTypeArguments >',
-          'handleType ',
+          'handleType  null',
           'endTypeArguments 1 < >',
-          'handleType C',
+          'handleType C null',
         ],
         expectedErrors: [
           error(codeExpectedType, 2, 1)
         ]);
+  }
 
+  void test_computeType_statements() {
     // Statements that should not have a type
     expectInfo(noType, 'C<T ; T>U;', required: false);
     expectInfo(noType, 'C<T && T>U;', required: false);
@@ -865,10 +1322,10 @@
           'handleIdentifier a typeReferenceContinuation',
           'handleQualified .',
           'handleNoTypeArguments Function',
-          'handleType C',
+          'handleType C null',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
         ]);
     expectComplexInfo('C.a Function<T>(int x) Function<T>(int x)',
         required: false, expectedAfter: 'Function');
@@ -876,6 +1333,40 @@
         required: true);
   }
 
+  void test_computeType_prefixedGFT_questionMark() {
+    expectComplexInfo('C.a? Function(', // Scanner inserts synthetic ')'.
+        required: true,
+        expectedCalls: [
+          'handleNoTypeVariables (',
+          'beginFunctionType C',
+          'handleIdentifier C prefixedTypeReference',
+          'handleIdentifier a typeReferenceContinuation',
+          'handleQualified .',
+          'handleNoTypeArguments ?',
+          'handleType C ?',
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function null',
+        ]);
+    expectComplexInfo('C.a? Function<T>(int x) Function<T>(int x)',
+        required: false, expectedAfter: 'Function');
+    expectComplexInfo('C.a? Function<T>(int x) Function<T>(int x)',
+        required: true);
+  }
+
+  void test_computeType_prefixedQuestionMark() {
+    expectComplexInfo('C.a? Function',
+        couldBeExpression: true,
+        expectedAfter: 'Function',
+        expectedCalls: [
+          'handleIdentifier C prefixedTypeReference',
+          'handleIdentifier a typeReferenceContinuation',
+          'handleQualified .',
+          'handleNoTypeArguments ?',
+          'handleType C ?',
+        ]);
+  }
+
   void test_computeType_prefixedTypeArg() {
     expectComplexInfo('C.a<T>', required: true, expectedCalls: [
       'handleIdentifier C prefixedTypeReference',
@@ -884,9 +1375,9 @@
       'beginTypeArguments <',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >',
-      'handleType C',
+      'handleType C null',
     ]);
 
     expectComplexInfo('C.a<T> f', expectedAfter: 'f', expectedCalls: [
@@ -896,9 +1387,9 @@
       'beginTypeArguments <',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >',
-      'handleType C',
+      'handleType C null',
     ]);
   }
 
@@ -932,35 +1423,35 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType C',
+          'handleType C null',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'beginMetadataStar int',
           'endMetadataStar 0',
           'beginFormalParameter int MemberKind.GeneralizedFunctionType',
           'handleIdentifier int typeReference',
           'handleNoTypeArguments x',
-          'handleType int',
+          'handleType int null',
           'handleIdentifier x formalParameterDeclaration',
           'handleFormalParameterWithoutValue )',
           'endFormalParameter null null x FormalParameterKind.mandatory '
               'MemberKind.GeneralizedFunctionType',
           'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'beginMetadataStar int',
           'endMetadataStar 0',
           'beginFormalParameter int MemberKind.GeneralizedFunctionType',
           'handleIdentifier int typeReference',
           'handleNoTypeArguments x',
-          'handleType int',
+          'handleType int null',
           'handleIdentifier x formalParameterDeclaration',
           'handleFormalParameterWithoutValue )',
           'endFormalParameter null null x FormalParameterKind.mandatory '
               'MemberKind.GeneralizedFunctionType',
           'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
         ]);
   }
 
@@ -973,7 +1464,7 @@
           'handleVoidKeyword void',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
         ]);
   }
 
@@ -984,7 +1475,7 @@
       'handleVoidKeyword void',
       'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
       'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-      'endFunctionType Function',
+      'endFunctionType Function null',
     ]);
 
     expectComplexInfo('void Function<T>()', required: true);
@@ -1132,7 +1623,7 @@
       'beginTypeArguments <',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >'
     ]);
     expect(listener.errors, isNull);
@@ -1200,10 +1691,10 @@
       'beginTypeArguments <',
       'handleIdentifier S typeReference',
       'handleNoTypeArguments ,',
-      'handleType S',
+      'handleType S null',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 2 < >'
     ]);
     expectComplexTypeArg('<S,T>=',
@@ -1213,10 +1704,10 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments ,',
-          'handleType S',
+          'handleType S null',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >=',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 2 < >'
         ]);
     expectComplexTypeArg('<S,T>>=',
@@ -1226,10 +1717,10 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments ,',
-          'handleType S',
+          'handleType S null',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >>=',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 2 < >'
         ]);
     expectComplexTypeArg('<S Function()>',
@@ -1240,10 +1731,10 @@
           'beginFunctionType S',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments Function',
-          'handleType S',
+          'handleType S null',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeArguments 1 < >'
         ]);
     expectComplexTypeArg('<void Function()>',
@@ -1255,7 +1746,7 @@
           'handleVoidKeyword void',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeArguments 1 < >'
         ]);
     expectComplexTypeArg('<S<T>>', typeArgumentCount: 1, expectedCalls: [
@@ -1264,9 +1755,9 @@
       'beginTypeArguments <',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >',
-      'handleType S',
+      'handleType S null',
       'endTypeArguments 1 < >'
     ]);
     expectComplexTypeArg('<S<T>>=',
@@ -1278,9 +1769,9 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >>=',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >'
         ]);
     expectComplexTypeArg('<S<T<U>>>', typeArgumentCount: 1, expectedCalls: [
@@ -1291,11 +1782,11 @@
       'beginTypeArguments <',
       'handleIdentifier U typeReference',
       'handleNoTypeArguments >>>',
-      'handleType U',
+      'handleType U null',
       'endTypeArguments 1 < >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >',
-      'handleType S',
+      'handleType S null',
       'endTypeArguments 1 < >'
     ]);
     expectComplexTypeArg('<S<T<U,V>>>', typeArgumentCount: 1, expectedCalls: [
@@ -1306,14 +1797,14 @@
       'beginTypeArguments <',
       'handleIdentifier U typeReference',
       'handleNoTypeArguments ,',
-      'handleType U',
+      'handleType U null',
       'handleIdentifier V typeReference',
       'handleNoTypeArguments >>>',
-      'handleType V',
+      'handleType V null',
       'endTypeArguments 2 < >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 1 < >',
-      'handleType S',
+      'handleType S null',
       'endTypeArguments 1 < >'
     ]);
     expectComplexTypeArg('<S<Function()>>',
@@ -1327,9 +1818,9 @@
           'handleNoType <',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeArguments 1 < >',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >'
         ]);
     expectComplexTypeArg('<S<Function()>>=',
@@ -1344,9 +1835,9 @@
           'handleNoType <',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeArguments 1 < >',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >'
         ]);
     expectComplexTypeArg('<S<void Function()>>',
@@ -1360,9 +1851,9 @@
           'handleVoidKeyword void', // was 'handleNoType <'
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeArguments 1 < >',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >'
         ]);
     expectComplexTypeArg('<S<T<void Function()>>>',
@@ -1378,11 +1869,11 @@
           'handleVoidKeyword void', // was 'handleNoType <'
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeArguments 1 < >',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >'
         ]);
   }
@@ -1397,7 +1888,7 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments extends',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >',
         ]);
     expectComplexTypeArg('<S extends List<T>>',
@@ -1409,7 +1900,7 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments extends',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >',
         ]);
     expectComplexTypeArg('<@A S,T>', typeArgumentCount: 2, expectedErrors: [
@@ -1418,10 +1909,10 @@
       'beginTypeArguments <',
       'handleIdentifier S typeReference',
       'handleNoTypeArguments ,',
-      'handleType S',
+      'handleType S null',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 2 < >'
     ]);
     expectComplexTypeArg('<@A() S,T>', typeArgumentCount: 2, expectedErrors: [
@@ -1430,10 +1921,10 @@
       'beginTypeArguments <',
       'handleIdentifier S typeReference',
       'handleNoTypeArguments ,',
-      'handleType S',
+      'handleType S null',
       'handleIdentifier T typeReference',
       'handleNoTypeArguments >',
-      'handleType T',
+      'handleType T null',
       'endTypeArguments 2 < >'
     ]);
     expectComplexTypeArg('<@A() @B S,T>',
@@ -1446,10 +1937,10 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments ,',
-          'handleType S',
+          'handleType S null',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 2 < >'
         ]);
     expectComplexTypeArg('<S T>',
@@ -1479,9 +1970,9 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments ',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >'
         ]);
   }
@@ -1515,7 +2006,7 @@
           'handleTypeVariablesDefined T 1',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >',
-          'handleType T',
+          'handleType T null',
           'endTypeVariable > 0 extends',
           'endTypeVariables < >',
         ]);
@@ -1532,9 +2023,9 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType List',
+          'handleType List null',
           'endTypeVariable > 0 extends',
           'endTypeVariables < >',
         ]);
@@ -1556,7 +2047,7 @@
           'handleVoidKeyword void',
           'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
           'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeVariable > 1 extends',
           'handleNoType R',
           'endTypeVariable , 0 null',
@@ -1654,7 +2145,7 @@
           'handleTypeVariablesDefined void 1',
           'handleIdentifier void typeReference',
           'handleNoTypeArguments >',
-          'handleType void',
+          'handleType void null',
           'endTypeVariable > 0 extends',
           'endTypeVariables < >'
         ]);
@@ -1743,9 +2234,9 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments fieldName',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType List',
+          'handleType List null',
           'endTypeVariable fieldName 0 extends',
           'endTypeVariables < >',
         ]);
@@ -1765,9 +2256,9 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType Comparable',
+          'handleType Comparable null',
           'endTypeVariable > 0 extends',
           'endTypeVariables < >',
         ]);
@@ -1790,9 +2281,9 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments >',
-          'handleType S',
+          'handleType S null',
           'endTypeArguments 1 < >',
-          'handleType Comparable',
+          'handleType Comparable null',
           'endTypeVariable , 0 extends',
           'endTypeVariables < >'
         ]);
@@ -1814,12 +2305,12 @@
           'beginFormalParameter T MemberKind.GeneralizedFunctionType',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments )',
-          'handleType T',
+          'handleType T null',
           'handleNoName )',
           'handleFormalParameterWithoutValue )',
           'endFormalParameter null null ) FormalParameterKind.mandatory MemberKind.GeneralizedFunctionType',
           'endFormalParameters 1 ( ) MemberKind.GeneralizedFunctionType',
-          'endFunctionType Function',
+          'endFunctionType Function null',
           'endTypeVariable > 0 extends',
           'endTypeVariables < >'
         ]);
@@ -1838,11 +2329,11 @@
           'beginTypeArguments <',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >>>',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 1 < >',
-          'handleType List',
+          'handleType List null',
           'endTypeArguments 1 < >',
-          'handleType List',
+          'handleType List null',
           'endTypeVariable > 0 extends',
           'endTypeVariables < >'
         ]);
@@ -1861,14 +2352,14 @@
           'beginTypeArguments <',
           'handleIdentifier S typeReference',
           'handleNoTypeArguments ,',
-          'handleType S',
+          'handleType S null',
           'handleIdentifier T typeReference',
           'handleNoTypeArguments >>>',
-          'handleType T',
+          'handleType T null',
           'endTypeArguments 2 < >',
-          'handleType Map',
+          'handleType Map null',
           'endTypeArguments 1 < >',
-          'handleType List',
+          'handleType List null',
           'endTypeVariable > 0 extends',
           'endTypeVariables < >'
         ]);
@@ -1913,6 +2404,46 @@
   }
 }
 
+@reflectiveTest
+class CouldBeExpressionTest {
+  void couldBeExpression(String code, bool expected) {
+    final typeInfo = computeType(scan(code), true);
+    expect(typeInfo.couldBeExpression, expected);
+  }
+
+  void test_simple() {
+    couldBeExpression('S', true);
+  }
+
+  void test_simple_nullable() {
+    couldBeExpression('S?', true);
+  }
+
+  void test_partial() {
+    couldBeExpression('.S', true);
+  }
+
+  void test_partial_nullable() {
+    couldBeExpression('.S?', true);
+  }
+
+  void test_prefixed() {
+    couldBeExpression('p.S', true);
+  }
+
+  void test_prefixed_nullable() {
+    couldBeExpression('p.S?', true);
+  }
+
+  void test_typeArg() {
+    couldBeExpression('S<T>', false);
+  }
+
+  void test_typeArg_nullable() {
+    couldBeExpression('S<T>?', false);
+  }
+}
+
 void expectInfo(expectedInfo, String source, {bool required}) {
   if (required == null) {
     compute(expectedInfo, source, scan(source), true);
@@ -1925,17 +2456,18 @@
 void expectComplexInfo(String source,
     {bool required,
     bool inDeclaration = false,
+    bool couldBeExpression = false,
     String expectedAfter,
     List<String> expectedCalls,
     List<ExpectedError> expectedErrors}) {
   if (required == null) {
-    computeComplex(source, scan(source), true, inDeclaration, expectedAfter,
-        expectedCalls, expectedErrors);
-    computeComplex(source, scan(source), false, inDeclaration, expectedAfter,
-        expectedCalls, expectedErrors);
+    computeComplex(source, scan(source), true, inDeclaration, couldBeExpression,
+        expectedAfter, expectedCalls, expectedErrors);
+    computeComplex(source, scan(source), false, inDeclaration,
+        couldBeExpression, expectedAfter, expectedCalls, expectedErrors);
   } else {
-    computeComplex(source, scan(source), required, inDeclaration, expectedAfter,
-        expectedCalls, expectedErrors);
+    computeComplex(source, scan(source), required, inDeclaration,
+        couldBeExpression, expectedAfter, expectedCalls, expectedErrors);
   }
 }
 
@@ -1964,6 +2496,7 @@
     Token start,
     bool required,
     bool inDeclaration,
+    bool couldBeExpression,
     String expectedAfter,
     List<String> expectedCalls,
     List<ExpectedError> expectedErrors) {
@@ -1972,7 +2505,7 @@
       const isInstanceOf<ComplexTypeInfo>(), source, start, required,
       inDeclaration: inDeclaration);
   expect(typeInfo.start, start.next, reason: source);
-  expect(typeInfo.couldBeExpression, isFalse);
+  expect(typeInfo.couldBeExpression, couldBeExpression);
   expectEnd(expectedAfter, typeInfo.skipType(start));
   expect(countGtGtAndNullEnd(start), expectedGtGtAndNullEndCount,
       reason: 'TypeInfo.skipType should not modify the token stream');
@@ -2215,8 +2748,8 @@
   }
 
   @override
-  void endFunctionType(Token functionToken) {
-    calls.add('endFunctionType $functionToken');
+  void endFunctionType(Token functionToken, Token questionMark) {
+    calls.add('endFunctionType $functionToken $questionMark');
   }
 
   @override
@@ -2307,8 +2840,8 @@
   }
 
   @override
-  void handleType(Token beginToken) {
-    calls.add('handleType $beginToken');
+  void handleType(Token beginToken, Token questionMark) {
+    calls.add('handleType $beginToken $questionMark');
   }
 
   @override
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 69fd53d..8a89ddc 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -56,7 +56,13 @@
     show KernelTarget;
 
 import 'package:front_end/src/fasta/testing/kernel_chain.dart'
-    show MatchExpectation, Print, TypeCheck, Verify, WriteDill;
+    show
+        KernelTextSerialization,
+        MatchExpectation,
+        Print,
+        TypeCheck,
+        Verify,
+        WriteDill;
 
 import 'package:front_end/src/fasta/testing/validating_instrumentation.dart'
     show ValidatingInstrumentation;
@@ -92,10 +98,16 @@
   {
     "name": "VerificationError",
     "group": "Fail"
+  },
+  {
+    "name": "TextSerializationFailure",
+    "group": "Fail"
   }
 ]
 ''';
 
+const String KERNEL_TEXT_SERIALIZATION = " kernel text serialization ";
+
 String generateExpectationName(bool legacyMode) {
   return legacyMode ? "legacy" : "strong";
 }
@@ -127,6 +139,7 @@
       bool updateExpectations,
       bool updateComments,
       bool skipVm,
+      bool kernelTextSerialization,
       this.uriTranslator,
       bool fullCompile)
       : steps = <Step>[
@@ -146,6 +159,9 @@
       steps.add(const TypeCheck());
     }
     steps.add(const EnsureNoErrors());
+    if (kernelTextSerialization) {
+      steps.add(const KernelTextSerialization());
+    }
     if (fullCompile && !skipVm) {
       steps.add(const Transform());
       if (!ignoreExpectations) {
@@ -209,6 +225,8 @@
     bool updateExpectations = environment["updateExpectations"] == "true";
     bool updateComments = environment["updateComments"] == "true";
     bool skipVm = environment["skipVm"] == "true";
+    bool kernelTextSerialization =
+        environment.containsKey(KERNEL_TEXT_SERIALIZATION);
     String platformBinaries = environment["platformBinaries"];
     if (platformBinaries != null && !platformBinaries.endsWith('/')) {
       platformBinaries = '$platformBinaries/';
@@ -224,6 +242,7 @@
         updateExpectations,
         updateComments,
         skipVm,
+        kernelTextSerialization,
         uriTranslator,
         environment.containsKey(ENABLE_FULL_COMPILE));
   }
diff --git a/pkg/front_end/test/fasta/text_serialization_test.dart b/pkg/front_end/test/fasta/text_serialization_test.dart
new file mode 100644
index 0000000..07ecb85
--- /dev/null
+++ b/pkg/front_end/test/fasta/text_serialization_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+library fasta.test.text_serialization_test;
+
+import 'dart:async' show Future;
+
+import 'testing/suite.dart';
+
+Future<FastaContext> createContext(
+    Chain suite, Map<String, String> environment) {
+  environment[ENABLE_FULL_COMPILE] = "";
+  environment[KERNEL_TEXT_SERIALIZATION] = "";
+  return FastaContext.create(suite, environment);
+}
+
+main([List<String> arguments = const []]) =>
+    runMe(arguments, createContext, "../../testing.json");
diff --git a/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart b/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
index 6389bc7..d34cb01 100644
--- a/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
@@ -47,12 +47,12 @@
 
   TypeSchemaEnvironment get typeEnvironment {
     return cachedTypeEnvironment ??=
-        new TypeSchemaEnvironment(coreTypes, classHierarchy, false);
+        new TypeSchemaEnvironment(coreTypes, classHierarchy);
   }
 
   InterfaceResolver get interfaceResolver {
     return cachedInterfaceResolver ??=
-        new InterfaceResolver(null, typeEnvironment, null, false);
+        new InterfaceResolver(null, typeEnvironment, null);
   }
 
   InterfaceType get intType => coreTypes.intClass.rawType;
diff --git a/pkg/front_end/test/fasta/type_inference/type_constraint_gatherer_test.dart b/pkg/front_end/test/fasta/type_inference/type_constraint_gatherer_test.dart
index 3df1a9e..b323164 100644
--- a/pkg/front_end/test/fasta/type_inference/type_constraint_gatherer_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/type_constraint_gatherer_test.dart
@@ -209,8 +209,8 @@
 
   void _checkConstraints(
       DartType a, DartType b, List<String> expectedConstraints) {
-    var typeSchemaEnvironment = new TypeSchemaEnvironment(
-        coreTypes, new ClassHierarchy(component), false);
+    var typeSchemaEnvironment =
+        new TypeSchemaEnvironment(coreTypes, new ClassHierarchy(component));
     var typeConstraintGatherer = new TypeConstraintGatherer(
         typeSchemaEnvironment, [T1.parameter, T2.parameter]);
     var constraints = typeConstraintGatherer.trySubtypeMatch(a, b)
diff --git a/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart b/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart
index 86e1564..101fb7f 100644
--- a/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/type_schema_environment_test.dart
@@ -714,8 +714,7 @@
   }
 
   TypeSchemaEnvironment _makeEnv() {
-    return new TypeSchemaEnvironment(
-        coreTypes, new ClassHierarchy(component), false);
+    return new TypeSchemaEnvironment(coreTypes, new ClassHierarchy(component));
   }
 
   DartType _map(DartType key, DartType value) =>
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 8a1495d4..0e1d3a8 100644
--- a/pkg/front_end/test/incremental_load_from_dill_test.dart
+++ b/pkg/front_end/test/incremental_load_from_dill_test.dart
@@ -484,4 +484,20 @@
   void recordInvalidatedImportUrisForTesting(List<Uri> uris) {
     invalidatedImportUrisForTesting = uris.isEmpty ? null : uris.toSet();
   }
+
+  @override
+  Future<Component> computeDelta(
+      {Uri entryPoint, bool fullComponent = false}) async {
+    Component result = await super
+        .computeDelta(entryPoint: entryPoint, fullComponent: fullComponent);
+
+    // We should at least have the SDK builders available. Slight smoke test.
+    if (!dillLoadedData.loader.builders.keys
+        .map((uri) => uri.toString())
+        .contains("dart:core")) {
+      throw "Loaders builder should contain the sdk, "
+          "but didn't even contain dart:core.";
+    }
+    return result;
+  }
 }
diff --git a/pkg/front_end/test/tool/reload.dart b/pkg/front_end/test/tool/reload.dart
index 31e10a1..78d669e 100644
--- a/pkg/front_end/test/tool/reload.dart
+++ b/pkg/front_end/test/tool/reload.dart
@@ -75,7 +75,7 @@
     var id = await mainId;
     var result = await rpc.sendRequest('reloadSources', {
       'isolateId': id,
-      'rootLibUri': entryUri.path,
+      'rootLibUri': entryUri.toFilePath(),
     });
     return result;
   }
diff --git a/pkg/front_end/testcases/abstract_members.dart b/pkg/front_end/testcases/abstract_members.dart
new file mode 100644
index 0000000..00f4f14
--- /dev/null
+++ b/pkg/front_end/testcases/abstract_members.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Interface1 {
+  void interfaceMethod1() {}
+}
+
+class Interface2 {
+  void interfaceMethod2() {}
+
+  var interfaceMethod1;
+}
+
+class Interface3 {
+  void interfaceMethod3() {}
+}
+
+abstract class A implements Interface1, Interface2, Interface3 {
+  aMethod() {}
+  abstractMethod();
+  void set property1(_);
+  void set property2(_);
+  void set property3(_);
+}
+
+abstract class B extends A {
+  final property1 = null;
+  aMethod() {}
+  bMethod() {}
+}
+
+class MyClass extends B {
+  var property2;
+  aaMethod() {}
+  aMethod() {}
+  bMethod() {}
+  cMethod() {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/abstract_members.dart.legacy.expect b/pkg/front_end/testcases/abstract_members.dart.legacy.expect
new file mode 100644
index 0000000..3ac995d
--- /dev/null
+++ b/pkg/front_end/testcases/abstract_members.dart.legacy.expect
@@ -0,0 +1,113 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/abstract_members.dart:19:16: Error: Can't inherit members that conflict with each other.
+// abstract class A implements Interface1, Interface2, Interface3 {
+//                ^
+// pkg/front_end/testcases/abstract_members.dart:6:8: Context: This is one inherited member.
+//   void interfaceMethod1() {}
+//        ^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:12:7: Context: This is the other inherited member.
+//   var interfaceMethod1;
+//       ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/abstract_members.dart:33:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
+//  - A.abstractMethod
+//  - A.property3=
+//  - A.property1=
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+//
+// class MyClass extends B {
+//       ^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:21:3: Context: 'A.abstractMethod' is defined here.
+//   abstractMethod();
+//   ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:24:12: Context: 'A.property3=' is defined here.
+//   void set property3(_);
+//            ^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:22:12: Context: 'A.property1=' is defined here.
+//   void set property1(_);
+//            ^^^^^^^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/abstract_members.dart:19:16: Error: Can't inherit members that conflict with each other.
+// abstract class A implements Interface1, Interface2, Interface3 {
+//                ^
+//
+// pkg/front_end/testcases/abstract_members.dart:33:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
+//  - A.abstractMethod
+//  - A.property3=
+//  - A.property1=
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+// 
+// class MyClass extends B {
+//       ^^^^^^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Interface1 extends core::Object {
+  synthetic constructor •() → self::Interface1
+    : super core::Object::•()
+    ;
+  method interfaceMethod1() → void {}
+}
+class Interface2 extends core::Object {
+  field dynamic interfaceMethod1 = null;
+  synthetic constructor •() → self::Interface2
+    : super core::Object::•()
+    ;
+  method interfaceMethod2() → void {}
+}
+class Interface3 extends core::Object {
+  synthetic constructor •() → self::Interface3
+    : super core::Object::•()
+    ;
+  method interfaceMethod3() → void {}
+}
+abstract class A extends core::Object implements self::Interface1, self::Interface2, self::Interface3 {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method aMethod() → dynamic {}
+  abstract method abstractMethod() → dynamic;
+  abstract set property1(dynamic _) → void;
+  abstract set property2(dynamic _) → void;
+  abstract set property3(dynamic _) → void;
+}
+abstract class B extends self::A {
+  final field dynamic property1 = null;
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+}
+class MyClass extends self::B {
+  field dynamic property2 = null;
+  synthetic constructor •() → self::MyClass
+    : super self::B::•()
+    ;
+  method aaMethod() → dynamic {}
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+  method cMethod() → dynamic {}
+  no-such-method-forwarder get interfaceMethod1() → dynamic
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1, 1, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+  no-such-method-forwarder set property3(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property3=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set interfaceMethod1(dynamic value) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set property1(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/abstract_members.dart.legacy.transformed.expect b/pkg/front_end/testcases/abstract_members.dart.legacy.transformed.expect
new file mode 100644
index 0000000..1e1ebac
--- /dev/null
+++ b/pkg/front_end/testcases/abstract_members.dart.legacy.transformed.expect
@@ -0,0 +1,79 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/abstract_members.dart:19:16: Error: Can't inherit members that conflict with each other.
+// abstract class A implements Interface1, Interface2, Interface3 {
+//                ^
+//
+// pkg/front_end/testcases/abstract_members.dart:33:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
+//  - A.abstractMethod
+//  - A.property3=
+//  - A.property1=
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+// 
+// class MyClass extends B {
+//       ^^^^^^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Interface1 extends core::Object {
+  synthetic constructor •() → self::Interface1
+    : super core::Object::•()
+    ;
+  method interfaceMethod1() → void {}
+}
+class Interface2 extends core::Object {
+  field dynamic interfaceMethod1 = null;
+  synthetic constructor •() → self::Interface2
+    : super core::Object::•()
+    ;
+  method interfaceMethod2() → void {}
+}
+class Interface3 extends core::Object {
+  synthetic constructor •() → self::Interface3
+    : super core::Object::•()
+    ;
+  method interfaceMethod3() → void {}
+}
+abstract class A extends core::Object implements self::Interface1, self::Interface2, self::Interface3 {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method aMethod() → dynamic {}
+  abstract method abstractMethod() → dynamic;
+  abstract set property1(dynamic _) → void;
+  abstract set property2(dynamic _) → void;
+  abstract set property3(dynamic _) → void;
+}
+abstract class B extends self::A {
+  final field dynamic property1 = null;
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+}
+class MyClass extends self::B {
+  field dynamic property2 = null;
+  synthetic constructor •() → self::MyClass
+    : super self::B::•()
+    ;
+  method aaMethod() → dynamic {}
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+  method cMethod() → dynamic {}
+  no-such-method-forwarder get interfaceMethod1() → dynamic
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1, 1, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+  no-such-method-forwarder set property3(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property3=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set interfaceMethod1(dynamic value) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set property1(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/abstract_members.dart.outline.expect b/pkg/front_end/testcases/abstract_members.dart.outline.expect
new file mode 100644
index 0000000..1c95548
--- /dev/null
+++ b/pkg/front_end/testcases/abstract_members.dart.outline.expect
@@ -0,0 +1,99 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/abstract_members.dart:19:16: Error: Can't inherit members that conflict with each other.
+// abstract class A implements Interface1, Interface2, Interface3 {
+//                ^
+// pkg/front_end/testcases/abstract_members.dart:6:8: Context: This is one inherited member.
+//   void interfaceMethod1() {}
+//        ^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:12:7: Context: This is the other inherited member.
+//   var interfaceMethod1;
+//       ^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/abstract_members.dart:33:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
+//  - A.abstractMethod
+//  - A.property3=
+//  - A.property1=
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+//
+// class MyClass extends B {
+//       ^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:21:3: Context: 'A.abstractMethod' is defined here.
+//   abstractMethod();
+//   ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:24:12: Context: 'A.property3=' is defined here.
+//   void set property3(_);
+//            ^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:22:12: Context: 'A.property1=' is defined here.
+//   void set property1(_);
+//            ^^^^^^^^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Interface1 extends core::Object {
+  synthetic constructor •() → self::Interface1
+    ;
+  method interfaceMethod1() → void
+    ;
+}
+class Interface2 extends core::Object {
+  field dynamic interfaceMethod1;
+  synthetic constructor •() → self::Interface2
+    ;
+  method interfaceMethod2() → void
+    ;
+}
+class Interface3 extends core::Object {
+  synthetic constructor •() → self::Interface3
+    ;
+  method interfaceMethod3() → void
+    ;
+}
+abstract class A extends core::Object implements self::Interface1, self::Interface2, self::Interface3 {
+  synthetic constructor •() → self::A
+    ;
+  method aMethod() → dynamic
+    ;
+  abstract method abstractMethod() → dynamic;
+  abstract set property1(dynamic _) → void;
+  abstract set property2(dynamic _) → void;
+  abstract set property3(dynamic _) → void;
+}
+abstract class B extends self::A {
+  final field dynamic property1;
+  synthetic constructor •() → self::B
+    ;
+  method aMethod() → dynamic
+    ;
+  method bMethod() → dynamic
+    ;
+}
+class MyClass extends self::B {
+  field dynamic property2;
+  synthetic constructor •() → self::MyClass
+    ;
+  method aaMethod() → dynamic
+    ;
+  method aMethod() → dynamic
+    ;
+  method bMethod() → dynamic
+    ;
+  method cMethod() → dynamic
+    ;
+  no-such-method-forwarder get interfaceMethod1() → dynamic
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1, 1, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+  no-such-method-forwarder set property3(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property3=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set interfaceMethod1(dynamic value) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set property1(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/abstract_members.dart.strong.expect b/pkg/front_end/testcases/abstract_members.dart.strong.expect
new file mode 100644
index 0000000..81ff760
--- /dev/null
+++ b/pkg/front_end/testcases/abstract_members.dart.strong.expect
@@ -0,0 +1,138 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/abstract_members.dart:19:16: Error: Can't inherit members that conflict with each other.
+// abstract class A implements Interface1, Interface2, Interface3 {
+//                ^
+// pkg/front_end/testcases/abstract_members.dart:6:8: Context: This is one inherited member.
+//   void interfaceMethod1() {}
+//        ^
+// pkg/front_end/testcases/abstract_members.dart:12:7: Context: This is the other inherited member.
+//   var interfaceMethod1;
+//       ^
+//
+// pkg/front_end/testcases/abstract_members.dart:33:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
+//  - 'interfaceMethod2'
+//  - 'abstractMethod'
+//  - 'interfaceMethod1'
+//  - 'interfaceMethod1'
+//  - 'interfaceMethod3'
+//  - 'property3='
+//  - 'interfaceMethod1='
+//  - 'property1='
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+//
+// class MyClass extends B {
+//       ^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:10:8: Context: 'interfaceMethod2' is defined here.
+//   void interfaceMethod2() {}
+//        ^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:21:3: Context: 'abstractMethod' is defined here.
+//   abstractMethod();
+//   ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:6:8: Context: 'interfaceMethod1' is defined here.
+//   void interfaceMethod1() {}
+//        ^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:12:7: Context: 'interfaceMethod1' is defined here.
+//   var interfaceMethod1;
+//       ^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:16:8: Context: 'interfaceMethod3' is defined here.
+//   void interfaceMethod3() {}
+//        ^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:24:12: Context: 'property3=' is defined here.
+//   void set property3(_);
+//            ^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:12:7: Context: 'interfaceMethod1=' is defined here.
+//   var interfaceMethod1;
+//       ^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/abstract_members.dart:22:12: Context: 'property1=' is defined here.
+//   void set property1(_);
+//            ^^^^^^^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/abstract_members.dart:19:16: Error: Can't inherit members that conflict with each other.
+// abstract class A implements Interface1, Interface2, Interface3 {
+//                ^
+//
+// pkg/front_end/testcases/abstract_members.dart:33:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
+//  - 'interfaceMethod2'
+//  - 'abstractMethod'
+//  - 'interfaceMethod1'
+//  - 'interfaceMethod1'
+//  - 'interfaceMethod3'
+//  - 'property3='
+//  - 'interfaceMethod1='
+//  - 'property1='
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+// 
+// class MyClass extends B {
+//       ^^^^^^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Interface1 extends core::Object {
+  synthetic constructor •() → self::Interface1
+    : super core::Object::•()
+    ;
+  method interfaceMethod1() → void {}
+}
+class Interface2 extends core::Object {
+  field dynamic interfaceMethod1 = null;
+  synthetic constructor •() → self::Interface2
+    : super core::Object::•()
+    ;
+  method interfaceMethod2() → void {}
+}
+class Interface3 extends core::Object {
+  synthetic constructor •() → self::Interface3
+    : super core::Object::•()
+    ;
+  method interfaceMethod3() → void {}
+}
+abstract class A extends core::Object implements self::Interface1, self::Interface2, self::Interface3 {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method aMethod() → dynamic {}
+  abstract method abstractMethod() → dynamic;
+  abstract set property1(dynamic _) → void;
+  abstract set property2(dynamic _) → void;
+  abstract set property3(dynamic _) → void;
+}
+abstract class B extends self::A {
+  final field dynamic property1 = null;
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+}
+class MyClass extends self::B {
+  field dynamic property2 = null;
+  synthetic constructor •() → self::MyClass
+    : super self::B::•()
+    ;
+  method aaMethod() → dynamic {}
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+  method cMethod() → dynamic {}
+  no-such-method-forwarder get interfaceMethod1() → dynamic
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1, 1, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+  no-such-method-forwarder set property3(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property3=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set interfaceMethod1(dynamic value) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#interfaceMethod1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set property1(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/abstract_members.dart.strong.transformed.expect b/pkg/front_end/testcases/abstract_members.dart.strong.transformed.expect
new file mode 100644
index 0000000..a76d03a
--- /dev/null
+++ b/pkg/front_end/testcases/abstract_members.dart.strong.transformed.expect
@@ -0,0 +1,52 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/abstract_members.dart:19:7: Error: The non-abstract class 'MyClass' is missing implementations for these members:
+//  - 'abstractMethod'
+//  - 'property3='
+//  - 'property1='
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+// 
+// class MyClass extends B {
+//       ^^^^^^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+  method aMethod() → dynamic {}
+  abstract method abstractMethod() → dynamic;
+  abstract set property1(dynamic _) → void;
+  abstract set property2(dynamic _) → void;
+  abstract set property3(dynamic _) → void;
+}
+abstract class B extends self::A {
+  final field dynamic property1 = null;
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+}
+class MyClass extends self::B {
+  field dynamic property2 = null;
+  synthetic constructor •() → self::MyClass
+    : super self::B::•()
+    ;
+  method aaMethod() → dynamic {}
+  method aMethod() → dynamic {}
+  method bMethod() → dynamic {}
+  method cMethod() → dynamic {}
+  no-such-method-forwarder set property3(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property3=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  no-such-method-forwarder set property1(dynamic _) → void
+    return this.{core::Object::noSuchMethod}(new core::_InvocationMirror::_withType(#property1=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[_]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/accessors.dart.legacy.expect b/pkg/front_end/testcases/accessors.dart.legacy.expect
index a9452ce..9d3bdd4 100644
--- a/pkg/front_end/testcases/accessors.dart.legacy.expect
+++ b/pkg/front_end/testcases/accessors.dart.legacy.expect
@@ -53,7 +53,7 @@
 }
 static method main() → dynamic {
   try {
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#onlySetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#onlySetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     throw "No error thrown";
   }
   on core::NoSuchMethodError catch(final core::NoSuchMethodError e) {
diff --git a/pkg/front_end/testcases/accessors.dart.legacy.transformed.expect b/pkg/front_end/testcases/accessors.dart.legacy.transformed.expect
index 762a85e..c6c025f 100644
--- a/pkg/front_end/testcases/accessors.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/accessors.dart.legacy.transformed.expect
@@ -39,7 +39,7 @@
 }
 static method main() → dynamic {
   try {
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#onlySetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#onlySetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     throw "No error thrown";
   }
   on core::NoSuchMethodError catch(final core::NoSuchMethodError e) {
diff --git a/pkg/front_end/testcases/async_function.dart.legacy.transformed.expect b/pkg/front_end/testcases/async_function.dart.legacy.transformed.expect
index d09ecec..c4a5b51 100644
--- a/pkg/front_end/testcases/async_function.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/async_function.dart.legacy.transformed.expect
@@ -5,7 +5,7 @@
 
 static field core::List<core::String> stringList = <dynamic>["bar"];
 static method asyncString() → asy::Future<core::String> /* originally async */ {
-  final asy::Completer<core::String> :async_completer = asy::Completer::sync<core::String>();
+  final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
   asy::FutureOr<core::String> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -28,11 +28,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method asyncString2() → asy::Future<core::String> /* originally async */ {
-  final asy::Completer<core::String> :async_completer = asy::Completer::sync<core::String>();
+  final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
   asy::FutureOr<core::String> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -55,7 +55,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method syncStarString() → core::Iterable<core::String> /* originally sync* */ {
@@ -174,7 +174,7 @@
   return :controller_stream;
 }
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -198,6 +198,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/async_function.dart.strong.transformed.expect b/pkg/front_end/testcases/async_function.dart.strong.transformed.expect
index e0c9dae..a57a753 100644
--- a/pkg/front_end/testcases/async_function.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/async_function.dart.strong.transformed.expect
@@ -5,7 +5,7 @@
 
 static field core::List<core::String> stringList = <core::String>["bar"];
 static method asyncString() → asy::Future<core::String> /* originally async */ {
-  final asy::Completer<core::String> :async_completer = asy::Completer::sync<core::String>();
+  final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
   asy::FutureOr<core::String> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -28,11 +28,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method asyncString2() → asy::Future<core::String> /* originally async */ {
-  final asy::Completer<core::String> :async_completer = asy::Completer::sync<core::String>();
+  final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
   asy::FutureOr<core::String> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -55,7 +55,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method syncStarString() → core::Iterable<core::String> /* originally sync* */ {
@@ -174,7 +174,7 @@
   return :controller_stream;
 }
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -198,6 +198,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/async_nested.dart.legacy.transformed.expect b/pkg/front_end/testcases/async_nested.dart.legacy.transformed.expect
index 0dc1f7d..ad071a1 100644
--- a/pkg/front_end/testcases/async_nested.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/async_nested.dart.legacy.transformed.expect
@@ -16,7 +16,7 @@
   }
 }
 static method main() → void /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -59,6 +59,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/async_nested.dart.strong.transformed.expect b/pkg/front_end/testcases/async_nested.dart.strong.transformed.expect
index f173dfc7..b5b0c4b 100644
--- a/pkg/front_end/testcases/async_nested.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/async_nested.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
   }
 }
 static method main() → void /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -59,6 +59,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/await.dart.legacy.transformed.expect b/pkg/front_end/testcases/await.dart.legacy.transformed.expect
index 7693f8c..6a66550 100644
--- a/pkg/front_end/testcases/await.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/await.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -28,6 +28,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/await.dart.strong.transformed.expect b/pkg/front_end/testcases/await.dart.strong.transformed.expect
index 7693f8c..6a66550 100644
--- a/pkg/front_end/testcases/await.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/await.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -28,6 +28,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.expect b/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.expect
index 218527b..80e3471 100644
--- a/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.expect
+++ b/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.expect
@@ -58,36 +58,60 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
-static set b(dynamic #synthetic) → dynamic
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
+static set b(dynamic #synthetic) → dynamic {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
 set b();
      ^";
-static set c(dynamic #synthetic) → dynamic
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
+  ;
+}
+static set c(dynamic #synthetic) → dynamic {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
 set c(x, y);
      ^";
+  {
+    dynamic x;
+    dynamic y;
+    ;
+  }
+}
 static method main() → dynamic {
   core::bool threw;
   try {
diff --git a/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.transformed.expect b/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.transformed.expect
index 074ed34..cd9945f 100644
--- a/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bad_setter_abstract.dart.legacy.transformed.expect
@@ -18,36 +18,60 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → dynamic
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → dynamic {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
-static set b(dynamic #synthetic) → dynamic
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
+static set b(dynamic #synthetic) → dynamic {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
 set b();
      ^";
-static set c(dynamic #synthetic) → dynamic
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
+  ;
+}
+static set c(dynamic #synthetic) → dynamic {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
 set c(x, y);
      ^";
+  {
+    dynamic x;
+    dynamic y;
+    ;
+  }
+}
 static method main() → dynamic {
   core::bool threw;
   try {
diff --git a/pkg/front_end/testcases/bad_setter_abstract.dart.strong.expect b/pkg/front_end/testcases/bad_setter_abstract.dart.strong.expect
index 67c1c60..0334820 100644
--- a/pkg/front_end/testcases/bad_setter_abstract.dart.strong.expect
+++ b/pkg/front_end/testcases/bad_setter_abstract.dart.strong.expect
@@ -62,36 +62,60 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → void
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → void
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → void
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → void
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
-static set b(dynamic #synthetic) → void
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
+static set b(dynamic #synthetic) → void {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
 set b();
      ^";
-static set c(dynamic #synthetic) → void
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
+  ;
+}
+static set c(dynamic #synthetic) → void {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
 set c(x, y);
      ^";
+  {
+    dynamic x;
+    dynamic y;
+    ;
+  }
+}
 static method main() → dynamic {
   core::bool threw;
   try {
diff --git a/pkg/front_end/testcases/bad_setter_abstract.dart.strong.transformed.expect b/pkg/front_end/testcases/bad_setter_abstract.dart.strong.transformed.expect
index 2e2e6ab..a9335aa 100644
--- a/pkg/front_end/testcases/bad_setter_abstract.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/bad_setter_abstract.dart.strong.transformed.expect
@@ -22,36 +22,60 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → void
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:10:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → void
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:11:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
 abstract class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-  set a(dynamic #synthetic) → void
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
+  set a(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:15:8: Error: A setter should have exactly one formal parameter.
   set a();
        ^";
-  set d(dynamic #synthetic) → void
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
+    ;
+  }
+  set d(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:16:8: Error: A setter should have exactly one formal parameter.
   set d(x, y);
        ^";
+    {
+      dynamic x;
+      dynamic y;
+      ;
+    }
+  }
 }
-static set b(dynamic #synthetic) → void
-  let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
+static set b(dynamic #synthetic) → void {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:5:6: Error: A setter should have exactly one formal parameter.
 set b();
      ^";
-static set c(dynamic #synthetic) → void
-  let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
+  ;
+}
+static set c(dynamic #synthetic) → void {
+  invalid-expression "pkg/front_end/testcases/bad_setter_abstract.dart:7:6: Error: A setter should have exactly one formal parameter.
 set c(x, y);
      ^";
+  {
+    dynamic x;
+    dynamic y;
+    ;
+  }
+}
 static method main() → dynamic {
   core::bool threw;
   try {
diff --git a/pkg/front_end/testcases/bug30695.dart.legacy.expect b/pkg/front_end/testcases/bug30695.dart.legacy.expect
index 63df473..d1a2129 100644
--- a/pkg/front_end/testcases/bug30695.dart.legacy.expect
+++ b/pkg/front_end/testcases/bug30695.dart.legacy.expect
@@ -2,16 +2,16 @@
 //
 // pkg/front_end/testcases/bug30695.dart:11:3: Error: Can't declare a member that conflicts with an inherited one.
 //   foo() => 42;
-//   ^
+//   ^^^
 // pkg/front_end/testcases/bug30695.dart:6:7: Context: This is the inherited member.
 //   var foo = 42;
-//       ^
+//       ^^^
 
 // Unhandled errors:
 //
 // pkg/front_end/testcases/bug30695.dart:11:3: Error: Can't declare a member that conflicts with an inherited one.
 //   foo() => 42;
-//   ^
+//   ^^^
 
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/bug30695.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug30695.dart.legacy.transformed.expect
index 8836357..998f289 100644
--- a/pkg/front_end/testcases/bug30695.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug30695.dart.legacy.transformed.expect
@@ -2,7 +2,7 @@
 //
 // pkg/front_end/testcases/bug30695.dart:11:3: Error: Can't declare a member that conflicts with an inherited one.
 //   foo() => 42;
-//   ^
+//   ^^^
 
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/bug30695.dart.outline.expect b/pkg/front_end/testcases/bug30695.dart.outline.expect
index e65b195..a4ad123 100644
--- a/pkg/front_end/testcases/bug30695.dart.outline.expect
+++ b/pkg/front_end/testcases/bug30695.dart.outline.expect
@@ -2,10 +2,10 @@
 //
 // pkg/front_end/testcases/bug30695.dart:11:3: Error: Can't declare a member that conflicts with an inherited one.
 //   foo() => 42;
-//   ^
+//   ^^^
 // pkg/front_end/testcases/bug30695.dart:6:7: Context: This is the inherited member.
 //   var foo = 42;
-//       ^
+//       ^^^
 
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/bug33099.dart.outline.expect b/pkg/front_end/testcases/bug33099.dart.outline.expect
index 176f728..94c81bb 100644
--- a/pkg/front_end/testcases/bug33099.dart.outline.expect
+++ b/pkg/front_end/testcases/bug33099.dart.outline.expect
@@ -14,7 +14,7 @@
     ;
 }
 abstract class _MyTest2&Object&MyTest = core::Object with self::MyTest {
-  synthetic constructor •() → self::_MyTest2&Object&MyTest
+  const synthetic constructor •() → self::_MyTest2&Object&MyTest
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/bug33099.dart.strong.expect b/pkg/front_end/testcases/bug33099.dart.strong.expect
index 4293417..4fb89b3 100644
--- a/pkg/front_end/testcases/bug33099.dart.strong.expect
+++ b/pkg/front_end/testcases/bug33099.dart.strong.expect
@@ -16,13 +16,13 @@
   method foo() → void {}
 }
 abstract class _MyTest2&Object&MyTest = core::Object with self::MyTest {
-  synthetic constructor •() → self::_MyTest2&Object&MyTest
+  const synthetic constructor •() → self::_MyTest2&Object&MyTest
     : super core::Object::•()
     ;
 }
 class MyTest2 extends self::_MyTest2&Object&MyTest {
   synthetic constructor •() → self::MyTest2
-    : super core::Object::•()
+    : super self::_MyTest2&Object&MyTest::•()
     ;
 }
 static const field self::_FailingTest failingTest = const self::_FailingTest::•();
diff --git a/pkg/front_end/testcases/bug33099.dart.strong.transformed.expect b/pkg/front_end/testcases/bug33099.dart.strong.transformed.expect
index a8c371a..5ad81b8 100644
--- a/pkg/front_end/testcases/bug33099.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/bug33099.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
   method foo() → void {}
 }
 abstract class _MyTest2&Object&MyTest extends core::Object implements self::MyTest {
-  synthetic constructor •() → self::_MyTest2&Object&MyTest
+  const synthetic constructor •() → self::_MyTest2&Object&MyTest
     : super core::Object::•()
     ;
   @self::failingTest
@@ -24,7 +24,7 @@
 }
 class MyTest2 extends self::_MyTest2&Object&MyTest {
   synthetic constructor •() → self::MyTest2
-    : super core::Object::•()
+    : super self::_MyTest2&Object&MyTest::•()
     ;
 }
 static const field self::_FailingTest failingTest = const self::_FailingTest::•();
diff --git a/pkg/front_end/testcases/bug33196.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug33196.dart.legacy.transformed.expect
index cc0de23..8f79612 100644
--- a/pkg/front_end/testcases/bug33196.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug33196.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
   core::print(result.runtimeType);
 }
 static method returnsString() → asy::FutureOr<core::String> /* originally async */ {
-  final asy::Completer<core::String> :async_completer = asy::Completer::sync<core::String>();
+  final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
   asy::FutureOr<core::String> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,6 +31,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/bug33196.dart.strong.transformed.expect b/pkg/front_end/testcases/bug33196.dart.strong.transformed.expect
index 94661f3..1b395b7 100644
--- a/pkg/front_end/testcases/bug33196.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/bug33196.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
   core::print(result.{core::Object::runtimeType});
 }
 static method returnsString() → asy::FutureOr<core::String> /* originally async */ {
-  final asy::Completer<core::String> :async_completer = asy::Completer::sync<core::String>();
+  final asy::_AsyncAwaitCompleter<core::String> :async_completer = new asy::_AsyncAwaitCompleter::•<core::String>();
   asy::FutureOr<core::String> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,6 +31,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/bug33206.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug33206.dart.legacy.transformed.expect
index 94af5a5..e19e82a 100644
--- a/pkg/front_end/testcases/bug33206.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug33206.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
   method f(dynamic _) → dynamic {}
 }
 static method f1() → asy::Future<core::List<core::Object>> /* originally async */ {
-  final asy::Completer<core::List<core::Object>> :async_completer = asy::Completer::sync<core::List<core::Object>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::Object>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::Object>>();
   asy::FutureOr<core::List<core::Object>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -42,13 +42,13 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method f2() → core::List<core::Object>
   return <dynamic>[2];
 static method f3() → asy::Future<core::Object> /* originally async */ {
-  final asy::Completer<core::Object> :async_completer = asy::Completer::sync<core::Object>();
+  final asy::_AsyncAwaitCompleter<core::Object> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Object>();
   asy::FutureOr<core::Object> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -71,11 +71,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method foo() → asy::Future<self::X> /* originally async */ {
-  final asy::Completer<self::X> :async_completer = asy::Completer::sync<self::X>();
+  final asy::_AsyncAwaitCompleter<self::X> :async_completer = new asy::_AsyncAwaitCompleter::•<self::X>();
   asy::FutureOr<self::X> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -104,11 +104,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → asy::Future<void> /* originally async */ {
-  final asy::Completer<void> :async_completer = asy::Completer::sync<void>();
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
   asy::FutureOr<void> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -132,6 +132,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/bug33206.dart.strong.transformed.expect b/pkg/front_end/testcases/bug33206.dart.strong.transformed.expect
index 62903f9..217f7b0 100644
--- a/pkg/front_end/testcases/bug33206.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/bug33206.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
   method f(dynamic _) → dynamic {}
 }
 static method f1() → asy::Future<core::List<core::Object>> /* originally async */ {
-  final asy::Completer<core::List<core::Object>> :async_completer = asy::Completer::sync<core::List<core::Object>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::Object>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::Object>>();
   asy::FutureOr<core::List<core::Object>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -42,13 +42,13 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method f2() → core::List<core::Object>
   return <core::Object>[2];
 static method f3() → asy::Future<core::Object> /* originally async */ {
-  final asy::Completer<core::Object> :async_completer = asy::Completer::sync<core::Object>();
+  final asy::_AsyncAwaitCompleter<core::Object> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Object>();
   asy::FutureOr<core::Object> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -71,11 +71,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method foo() → asy::Future<self::X> /* originally async */ {
-  final asy::Completer<self::X> :async_completer = asy::Completer::sync<self::X>();
+  final asy::_AsyncAwaitCompleter<self::X> :async_completer = new asy::_AsyncAwaitCompleter::•<self::X>();
   asy::FutureOr<self::X> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -104,11 +104,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → asy::Future<void> /* originally async */ {
-  final asy::Completer<void> :async_completer = asy::Completer::sync<void>();
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
   asy::FutureOr<void> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -132,6 +132,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/bug34511.dart.legacy.expect b/pkg/front_end/testcases/bug34511.dart.legacy.expect
index ebad4e6..4ba96c3 100644
--- a/pkg/front_end/testcases/bug34511.dart.legacy.expect
+++ b/pkg/front_end/testcases/bug34511.dart.legacy.expect
@@ -8,13 +8,13 @@
     ;
 }
 abstract class _B&Object&A<Z extends core::Object = dynamic> = core::Object with self::A<() → self::_B&Object&A::Z> {
-  synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
+  const synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
     : super core::Object::•()
     ;
 }
 class B<Z extends core::Object = dynamic> extends self::_B&Object&A<self::B::Z> {
   synthetic constructor •() → self::B<self::B::Z>
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/bug34511.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug34511.dart.legacy.transformed.expect
index 739a1e4..fe93483 100644
--- a/pkg/front_end/testcases/bug34511.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug34511.dart.legacy.transformed.expect
@@ -8,13 +8,13 @@
     ;
 }
 abstract class _B&Object&A<Z extends core::Object = dynamic> extends core::Object implements self::A<() → self::_B&Object&A::Z> {
-  synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
+  const synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
     : super core::Object::•()
     ;
 }
 class B<Z extends core::Object = dynamic> extends self::_B&Object&A<self::B::Z> {
   synthetic constructor •() → self::B<self::B::Z>
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/bug34511.dart.outline.expect b/pkg/front_end/testcases/bug34511.dart.outline.expect
index 0291dc5..1d6dbda 100644
--- a/pkg/front_end/testcases/bug34511.dart.outline.expect
+++ b/pkg/front_end/testcases/bug34511.dart.outline.expect
@@ -7,7 +7,7 @@
     ;
 }
 abstract class _B&Object&A<Z extends core::Object = dynamic> = core::Object with self::A<() → self::_B&Object&A::Z> {
-  synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
+  const synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/bug34511.dart.strong.expect b/pkg/front_end/testcases/bug34511.dart.strong.expect
index ebad4e6..4ba96c3 100644
--- a/pkg/front_end/testcases/bug34511.dart.strong.expect
+++ b/pkg/front_end/testcases/bug34511.dart.strong.expect
@@ -8,13 +8,13 @@
     ;
 }
 abstract class _B&Object&A<Z extends core::Object = dynamic> = core::Object with self::A<() → self::_B&Object&A::Z> {
-  synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
+  const synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
     : super core::Object::•()
     ;
 }
 class B<Z extends core::Object = dynamic> extends self::_B&Object&A<self::B::Z> {
   synthetic constructor •() → self::B<self::B::Z>
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/bug34511.dart.strong.transformed.expect b/pkg/front_end/testcases/bug34511.dart.strong.transformed.expect
index 739a1e4..fe93483 100644
--- a/pkg/front_end/testcases/bug34511.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/bug34511.dart.strong.transformed.expect
@@ -8,13 +8,13 @@
     ;
 }
 abstract class _B&Object&A<Z extends core::Object = dynamic> extends core::Object implements self::A<() → self::_B&Object&A::Z> {
-  synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
+  const synthetic constructor •() → self::_B&Object&A<self::_B&Object&A::Z>
     : super core::Object::•()
     ;
 }
 class B<Z extends core::Object = dynamic> extends self::_B&Object&A<self::B::Z> {
   synthetic constructor •() → self::B<self::B::Z>
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/bug35470.dart b/pkg/front_end/testcases/bug35470.dart
new file mode 100644
index 0000000..9d8d9d9
--- /dev/null
+++ b/pkg/front_end/testcases/bug35470.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A<X> {
+  foo<Y extends X>() {}
+}
+
+class B extends A<dynamic> {}
+
+bar(B b) {
+  b.foo();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/bug35470.dart.legacy.expect b/pkg/front_end/testcases/bug35470.dart.legacy.expect
new file mode 100644
index 0000000..7f2ad6a
--- /dev/null
+++ b/pkg/front_end/testcases/bug35470.dart.legacy.expect
@@ -0,0 +1,19 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X>
+    : super core::Object::•()
+    ;
+  method foo<Y extends self::A::X = dynamic>() → dynamic {}
+}
+class B extends self::A<dynamic> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+}
+static method bar(self::B b) → dynamic {
+  b.foo();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
new file mode 100644
index 0000000..7f2ad6a
--- /dev/null
+++ b/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
@@ -0,0 +1,19 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X>
+    : super core::Object::•()
+    ;
+  method foo<Y extends self::A::X = dynamic>() → dynamic {}
+}
+class B extends self::A<dynamic> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+}
+static method bar(self::B b) → dynamic {
+  b.foo();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/bug35470.dart.outline.expect b/pkg/front_end/testcases/bug35470.dart.outline.expect
new file mode 100644
index 0000000..26320fb
--- /dev/null
+++ b/pkg/front_end/testcases/bug35470.dart.outline.expect
@@ -0,0 +1,18 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X>
+    ;
+  method foo<Y extends self::A::X = dynamic>() → dynamic
+    ;
+}
+class B extends self::A<dynamic> {
+  synthetic constructor •() → self::B
+    ;
+}
+static method bar(self::B b) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/bug35470.dart.strong.expect b/pkg/front_end/testcases/bug35470.dart.strong.expect
new file mode 100644
index 0000000..53cb0c8
--- /dev/null
+++ b/pkg/front_end/testcases/bug35470.dart.strong.expect
@@ -0,0 +1,19 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X>
+    : super core::Object::•()
+    ;
+  method foo<generic-covariant-impl Y extends self::A::X = self::A::X>() → dynamic {}
+}
+class B extends self::A<dynamic> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+}
+static method bar(self::B b) → dynamic {
+  b.{self::A::foo}<dynamic>();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/bug35470.dart.strong.transformed.expect b/pkg/front_end/testcases/bug35470.dart.strong.transformed.expect
new file mode 100644
index 0000000..53cb0c8
--- /dev/null
+++ b/pkg/front_end/testcases/bug35470.dart.strong.transformed.expect
@@ -0,0 +1,19 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A<X extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::A<self::A::X>
+    : super core::Object::•()
+    ;
+  method foo<generic-covariant-impl Y extends self::A::X = self::A::X>() → dynamic {}
+}
+class B extends self::A<dynamic> {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+}
+static method bar(self::B b) → dynamic {
+  b.{self::A::foo}<dynamic>();
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect
index c4b209d..f04ef3d 100644
--- a/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect
@@ -5,7 +5,7 @@
 
 static method main() → dynamic {}
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -30,6 +30,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect
index 8155d6a..6821c33 100644
--- a/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 
 static method main() → dynamic {}
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,6 +31,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/clone_function_type.dart.legacy.expect b/pkg/front_end/testcases/clone_function_type.dart.legacy.expect
index a1b55e6..ef2a4c6 100644
--- a/pkg/front_end/testcases/clone_function_type.dart.legacy.expect
+++ b/pkg/front_end/testcases/clone_function_type.dart.legacy.expect
@@ -70,167 +70,167 @@
     ;
 }
 abstract class _Bm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::_Bm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Bm1<Z extends core::Object = dynamic> extends self::_Bm1&Object&Am1<self::Bm1::Z> {
   synthetic constructor •() → self::Bm1<self::Bm1::Z>
-    : super core::Object::•()
+    : super self::_Bm1&Object&Am1::•()
     ;
 }
 abstract class _Cm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::_Cm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Cm1<Z extends core::Object = dynamic> extends self::_Cm1&Object&Am1<self::Cm1::Z> {
   synthetic constructor •() → self::Cm1<self::Cm1::Z>
-    : super core::Object::•()
+    : super self::_Cm1&Object&Am1::•()
     ;
 }
 abstract class _Dm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → core::int, self::_Dm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Dm1<Z extends core::Object = dynamic> extends self::_Dm1&Object&Am1<self::Dm1::Z> {
   synthetic constructor •() → self::Dm1<self::Dm1::Z>
-    : super core::Object::•()
+    : super self::_Dm1&Object&Am1::•()
     ;
 }
 abstract class _Em1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::_Em1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Em1<Z extends core::Object = dynamic> extends self::_Em1&Object&Am1<self::Em1::Z> {
   synthetic constructor •() → self::Em1<self::Em1::Z>
-    : super core::Object::•()
+    : super self::_Em1&Object&Am1::•()
     ;
 }
 abstract class _Fm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::_Fm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Fm1<Z extends core::Object = dynamic> extends self::_Fm1&Object&Am1<self::Fm1::Z> {
   synthetic constructor •() → self::Fm1<self::Fm1::Z>
-    : super core::Object::•()
+    : super self::_Fm1&Object&Am1::•()
     ;
 }
 abstract class _Gm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<({x: core::int}) → dynamic, self::_Gm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Gm1<Z extends core::Object = dynamic> extends self::_Gm1&Object&Am1<self::Gm1::Z> {
   synthetic constructor •() → self::Gm1<self::Gm1::Z>
-    : super core::Object::•()
+    : super self::_Gm1&Object&Am1::•()
     ;
 }
 abstract class _Hm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::_Hm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Hm1<Z extends core::Object = dynamic> extends self::_Hm1&Object&Am1<self::Hm1::Z> {
   synthetic constructor •() → self::Hm1<self::Hm1::Z>
-    : super core::Object::•()
+    : super self::_Hm1&Object&Am1::•()
     ;
 }
 abstract class _Im1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::_Im1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Im1<Z extends core::Object = dynamic> extends self::_Im1&Object&Am1<self::Im1::Z> {
   synthetic constructor •() → self::Im1<self::Im1::Z>
-    : super core::Object::•()
+    : super self::_Im1&Object&Am1::•()
     ;
 }
 abstract class _Jm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<core::Function, self::_Jm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Jm1<Z extends core::Object = dynamic> extends self::_Jm1&Object&Am1<self::Jm1::Z> {
   synthetic constructor •() → self::Jm1<self::Jm1::Z>
-    : super core::Object::•()
+    : super self::_Jm1&Object&Am1::•()
     ;
 }
 abstract class _Km1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::Function) → dynamic, self::_Km1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Km1<Z extends core::Object = dynamic> extends self::_Km1&Object&Am1<self::Km1::Z> {
   synthetic constructor •() → self::Km1<self::Km1::Z>
-    : super core::Object::•()
+    : super self::_Km1&Object&Am1::•()
     ;
 }
 abstract class _Lm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → (() → core::Function) → dynamic, self::_Lm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Lm1<Z extends core::Object = dynamic> extends self::_Lm1&Object&Am1<self::Lm1::Z> {
   synthetic constructor •() → self::Lm1<self::Lm1::Z>
-    : super core::Object::•()
+    : super self::_Lm1&Object&Am1::•()
     ;
 }
 class Mm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::Mm1::Z> {
-  synthetic constructor •() → self::Mm1<self::Mm1::Z>
+  const synthetic constructor •() → self::Mm1<self::Mm1::Z>
     : super core::Object::•()
     ;
 }
 class Nm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::Nm1::Z> {
-  synthetic constructor •() → self::Nm1<self::Nm1::Z>
+  const synthetic constructor •() → self::Nm1<self::Nm1::Z>
     : super core::Object::•()
     ;
 }
 class Om1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → core::int, self::Om1::Z> {
-  synthetic constructor •() → self::Om1<self::Om1::Z>
+  const synthetic constructor •() → self::Om1<self::Om1::Z>
     : super core::Object::•()
     ;
 }
 class Pm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::Pm1::Z> {
-  synthetic constructor •() → self::Pm1<self::Pm1::Z>
+  const synthetic constructor •() → self::Pm1<self::Pm1::Z>
     : super core::Object::•()
     ;
 }
 class Qm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::Qm1::Z> {
-  synthetic constructor •() → self::Qm1<self::Qm1::Z>
+  const synthetic constructor •() → self::Qm1<self::Qm1::Z>
     : super core::Object::•()
     ;
 }
 class Rm1<Z extends core::Object = dynamic> = core::Object with self::Am1<({x: core::int}) → dynamic, self::Rm1::Z> {
-  synthetic constructor •() → self::Rm1<self::Rm1::Z>
+  const synthetic constructor •() → self::Rm1<self::Rm1::Z>
     : super core::Object::•()
     ;
 }
 class Sm1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::Sm1::Z> {
-  synthetic constructor •() → self::Sm1<self::Sm1::Z>
+  const synthetic constructor •() → self::Sm1<self::Sm1::Z>
     : super core::Object::•()
     ;
 }
 class Tm1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::Tm1::Z> {
-  synthetic constructor •() → self::Tm1<self::Tm1::Z>
+  const synthetic constructor •() → self::Tm1<self::Tm1::Z>
     : super core::Object::•()
     ;
 }
 class Um1<Z extends core::Object = dynamic> = core::Object with self::Am1<core::Function, self::Um1::Z> {
-  synthetic constructor •() → self::Um1<self::Um1::Z>
+  const synthetic constructor •() → self::Um1<self::Um1::Z>
     : super core::Object::•()
     ;
 }
 class Vm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::Function) → dynamic, self::Vm1::Z> {
-  synthetic constructor •() → self::Vm1<self::Vm1::Z>
+  const synthetic constructor •() → self::Vm1<self::Vm1::Z>
     : super core::Object::•()
     ;
 }
 class Wm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → (() → core::Function) → dynamic, self::Wm1::Z> {
-  synthetic constructor •() → self::Wm1<self::Wm1::Z>
+  const synthetic constructor •() → self::Wm1<self::Wm1::Z>
     : super core::Object::•()
     ;
 }
@@ -240,167 +240,167 @@
     ;
 }
 abstract class _Bm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::_Bm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Bm2<Z extends core::Object = dynamic> extends self::_Bm2&Object&Am2<self::Bm2::Z> {
   synthetic constructor •() → self::Bm2<self::Bm2::Z>
-    : super core::Object::•()
+    : super self::_Bm2&Object&Am2::•()
     ;
 }
 abstract class _Cm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::_Cm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Cm2<Z extends core::Object = dynamic> extends self::_Cm2&Object&Am2<self::Cm2::Z> {
   synthetic constructor •() → self::Cm2<self::Cm2::Z>
-    : super core::Object::•()
+    : super self::_Cm2&Object&Am2::•()
     ;
 }
 abstract class _Dm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → core::int, self::_Dm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Dm2<Z extends core::Object = dynamic> extends self::_Dm2&Object&Am2<self::Dm2::Z> {
   synthetic constructor •() → self::Dm2<self::Dm2::Z>
-    : super core::Object::•()
+    : super self::_Dm2&Object&Am2::•()
     ;
 }
 abstract class _Em2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::_Em2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Em2<Z extends core::Object = dynamic> extends self::_Em2&Object&Am2<self::Em2::Z> {
   synthetic constructor •() → self::Em2<self::Em2::Z>
-    : super core::Object::•()
+    : super self::_Em2&Object&Am2::•()
     ;
 }
 abstract class _Fm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::_Fm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Fm2<Z extends core::Object = dynamic> extends self::_Fm2&Object&Am2<self::Fm2::Z> {
   synthetic constructor •() → self::Fm2<self::Fm2::Z>
-    : super core::Object::•()
+    : super self::_Fm2&Object&Am2::•()
     ;
 }
 abstract class _Gm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<({x: core::int}) → dynamic, self::_Gm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Gm2<Z extends core::Object = dynamic> extends self::_Gm2&Object&Am2<self::Gm2::Z> {
   synthetic constructor •() → self::Gm2<self::Gm2::Z>
-    : super core::Object::•()
+    : super self::_Gm2&Object&Am2::•()
     ;
 }
 abstract class _Hm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::_Hm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Hm2<Z extends core::Object = dynamic> extends self::_Hm2&Object&Am2<self::Hm2::Z> {
   synthetic constructor •() → self::Hm2<self::Hm2::Z>
-    : super core::Object::•()
+    : super self::_Hm2&Object&Am2::•()
     ;
 }
 abstract class _Im2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::_Im2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Im2<Z extends core::Object = dynamic> extends self::_Im2&Object&Am2<self::Im2::Z> {
   synthetic constructor •() → self::Im2<self::Im2::Z>
-    : super core::Object::•()
+    : super self::_Im2&Object&Am2::•()
     ;
 }
 abstract class _Jm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<core::Function, self::_Jm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Jm2<Z extends core::Object = dynamic> extends self::_Jm2&Object&Am2<self::Jm2::Z> {
   synthetic constructor •() → self::Jm2<self::Jm2::Z>
-    : super core::Object::•()
+    : super self::_Jm2&Object&Am2::•()
     ;
 }
 abstract class _Km2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::Function) → dynamic, self::_Km2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Km2<Z extends core::Object = dynamic> extends self::_Km2&Object&Am2<self::Km2::Z> {
   synthetic constructor •() → self::Km2<self::Km2::Z>
-    : super core::Object::•()
+    : super self::_Km2&Object&Am2::•()
     ;
 }
 abstract class _Lm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → (() → core::Function) → dynamic, self::_Lm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Lm2<Z extends core::Object = dynamic> extends self::_Lm2&Object&Am2<self::Lm2::Z> {
   synthetic constructor •() → self::Lm2<self::Lm2::Z>
-    : super core::Object::•()
+    : super self::_Lm2&Object&Am2::•()
     ;
 }
 class Mm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::Mm2::Z> {
-  synthetic constructor •() → self::Mm2<self::Mm2::Z>
+  const synthetic constructor •() → self::Mm2<self::Mm2::Z>
     : super core::Object::•()
     ;
 }
 class Nm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::Nm2::Z> {
-  synthetic constructor •() → self::Nm2<self::Nm2::Z>
+  const synthetic constructor •() → self::Nm2<self::Nm2::Z>
     : super core::Object::•()
     ;
 }
 class Om2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → core::int, self::Om2::Z> {
-  synthetic constructor •() → self::Om2<self::Om2::Z>
+  const synthetic constructor •() → self::Om2<self::Om2::Z>
     : super core::Object::•()
     ;
 }
 class Pm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::Pm2::Z> {
-  synthetic constructor •() → self::Pm2<self::Pm2::Z>
+  const synthetic constructor •() → self::Pm2<self::Pm2::Z>
     : super core::Object::•()
     ;
 }
 class Qm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::Qm2::Z> {
-  synthetic constructor •() → self::Qm2<self::Qm2::Z>
+  const synthetic constructor •() → self::Qm2<self::Qm2::Z>
     : super core::Object::•()
     ;
 }
 class Rm2<Z extends core::Object = dynamic> = core::Object with self::Am2<({x: core::int}) → dynamic, self::Rm2::Z> {
-  synthetic constructor •() → self::Rm2<self::Rm2::Z>
+  const synthetic constructor •() → self::Rm2<self::Rm2::Z>
     : super core::Object::•()
     ;
 }
 class Sm2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::Sm2::Z> {
-  synthetic constructor •() → self::Sm2<self::Sm2::Z>
+  const synthetic constructor •() → self::Sm2<self::Sm2::Z>
     : super core::Object::•()
     ;
 }
 class Tm2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::Tm2::Z> {
-  synthetic constructor •() → self::Tm2<self::Tm2::Z>
+  const synthetic constructor •() → self::Tm2<self::Tm2::Z>
     : super core::Object::•()
     ;
 }
 class Um2<Z extends core::Object = dynamic> = core::Object with self::Am2<core::Function, self::Um2::Z> {
-  synthetic constructor •() → self::Um2<self::Um2::Z>
+  const synthetic constructor •() → self::Um2<self::Um2::Z>
     : super core::Object::•()
     ;
 }
 class Vm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::Function) → dynamic, self::Vm2::Z> {
-  synthetic constructor •() → self::Vm2<self::Vm2::Z>
+  const synthetic constructor •() → self::Vm2<self::Vm2::Z>
     : super core::Object::•()
     ;
 }
 class Wm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → (() → core::Function) → dynamic, self::Wm2::Z> {
-  synthetic constructor •() → self::Wm2<self::Wm2::Z>
+  const synthetic constructor •() → self::Wm2<self::Wm2::Z>
     : super core::Object::•()
     ;
 }
@@ -410,103 +410,103 @@
     ;
 }
 abstract class _Bm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::int) → dynamic, self::_Bm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Bm3<Z extends core::Object = dynamic> extends self::_Bm3&Object&Am3<self::Bm3::Z> {
   synthetic constructor •() → self::Bm3<self::Bm3::Z>
-    : super core::Object::•()
+    : super self::_Bm3&Object&Am3::•()
     ;
 }
 abstract class _Cm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::int) → dynamic, self::_Cm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Cm3<Z extends core::Object = dynamic> extends self::_Cm3&Object&Am3<self::Cm3::Z> {
   synthetic constructor •() → self::Cm3<self::Cm3::Z>
-    : super core::Object::•()
+    : super self::_Cm3&Object&Am3::•()
     ;
 }
 abstract class _Dm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → core::int, self::_Dm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Dm3<Z extends core::Object = dynamic> extends self::_Dm3&Object&Am3<self::Dm3::Z> {
   synthetic constructor •() → self::Dm3<self::Dm3::Z>
-    : super core::Object::•()
+    : super self::_Dm3&Object&Am3::•()
     ;
 }
 abstract class _Em3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → dynamic, self::_Em3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Em3<Z extends core::Object = dynamic> extends self::_Em3&Object&Am3<self::Em3::Z> {
   synthetic constructor •() → self::Em3<self::Em3::Z>
-    : super core::Object::•()
+    : super self::_Em3&Object&Am3::•()
     ;
 }
 abstract class _Fm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → dynamic, self::_Fm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Fm3<Z extends core::Object = dynamic> extends self::_Fm3&Object&Am3<self::Fm3::Z> {
   synthetic constructor •() → self::Fm3<self::Fm3::Z>
-    : super core::Object::•()
+    : super self::_Fm3&Object&Am3::•()
     ;
 }
 abstract class _Gm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<({x: core::int}) → dynamic, self::_Gm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Gm3<Z extends core::Object = dynamic> extends self::_Gm3&Object&Am3<self::Gm3::Z> {
   synthetic constructor •() → self::Gm3<self::Gm3::Z>
-    : super core::Object::•()
+    : super self::_Gm3&Object&Am3::•()
     ;
 }
 abstract class _Hm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<([core::int]) → dynamic, self::_Hm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Hm3<Z extends core::Object = dynamic> extends self::_Hm3&Object&Am3<self::Hm3::Z> {
   synthetic constructor •() → self::Hm3<self::Hm3::Z>
-    : super core::Object::•()
+    : super self::_Hm3&Object&Am3::•()
     ;
 }
 abstract class _Im3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<([core::int]) → dynamic, self::_Im3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Im3<Z extends core::Object = dynamic> extends self::_Im3&Object&Am3<self::Im3::Z> {
   synthetic constructor •() → self::Im3<self::Im3::Z>
-    : super core::Object::•()
+    : super self::_Im3&Object&Am3::•()
     ;
 }
 abstract class _Jm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::Function) → dynamic, self::_Jm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Jm3<Z extends core::Object = dynamic> extends self::_Jm3&Object&Am3<self::Jm3::Z> {
   synthetic constructor •() → self::Jm3<self::Jm3::Z>
-    : super core::Object::•()
+    : super self::_Jm3&Object&Am3::•()
     ;
 }
 abstract class _Km3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → (() → core::Function) → dynamic, self::_Km3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Km3<Z extends core::Object = dynamic> extends self::_Km3&Object&Am3<self::Km3::Z> {
   synthetic constructor •() → self::Km3<self::Km3::Z>
-    : super core::Object::•()
+    : super self::_Km3&Object&Am3::•()
     ;
 }
 class Af1<X extends (core::int) → dynamic = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/clone_function_type.dart.legacy.transformed.expect b/pkg/front_end/testcases/clone_function_type.dart.legacy.transformed.expect
index 8508c16..5523c08 100644
--- a/pkg/front_end/testcases/clone_function_type.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/clone_function_type.dart.legacy.transformed.expect
@@ -44,167 +44,167 @@
     ;
 }
 abstract class _Bm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::_Bm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Bm1<Z extends core::Object = dynamic> extends self::_Bm1&Object&Am1<self::Bm1::Z> {
   synthetic constructor •() → self::Bm1<self::Bm1::Z>
-    : super core::Object::•()
+    : super self::_Bm1&Object&Am1::•()
     ;
 }
 abstract class _Cm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::_Cm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Cm1<Z extends core::Object = dynamic> extends self::_Cm1&Object&Am1<self::Cm1::Z> {
   synthetic constructor •() → self::Cm1<self::Cm1::Z>
-    : super core::Object::•()
+    : super self::_Cm1&Object&Am1::•()
     ;
 }
 abstract class _Dm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → core::int, self::_Dm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Dm1<Z extends core::Object = dynamic> extends self::_Dm1&Object&Am1<self::Dm1::Z> {
   synthetic constructor •() → self::Dm1<self::Dm1::Z>
-    : super core::Object::•()
+    : super self::_Dm1&Object&Am1::•()
     ;
 }
 abstract class _Em1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::_Em1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Em1<Z extends core::Object = dynamic> extends self::_Em1&Object&Am1<self::Em1::Z> {
   synthetic constructor •() → self::Em1<self::Em1::Z>
-    : super core::Object::•()
+    : super self::_Em1&Object&Am1::•()
     ;
 }
 abstract class _Fm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::_Fm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Fm1<Z extends core::Object = dynamic> extends self::_Fm1&Object&Am1<self::Fm1::Z> {
   synthetic constructor •() → self::Fm1<self::Fm1::Z>
-    : super core::Object::•()
+    : super self::_Fm1&Object&Am1::•()
     ;
 }
 abstract class _Gm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<({x: core::int}) → dynamic, self::_Gm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Gm1<Z extends core::Object = dynamic> extends self::_Gm1&Object&Am1<self::Gm1::Z> {
   synthetic constructor •() → self::Gm1<self::Gm1::Z>
-    : super core::Object::•()
+    : super self::_Gm1&Object&Am1::•()
     ;
 }
 abstract class _Hm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::_Hm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Hm1<Z extends core::Object = dynamic> extends self::_Hm1&Object&Am1<self::Hm1::Z> {
   synthetic constructor •() → self::Hm1<self::Hm1::Z>
-    : super core::Object::•()
+    : super self::_Hm1&Object&Am1::•()
     ;
 }
 abstract class _Im1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::_Im1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Im1<Z extends core::Object = dynamic> extends self::_Im1&Object&Am1<self::Im1::Z> {
   synthetic constructor •() → self::Im1<self::Im1::Z>
-    : super core::Object::•()
+    : super self::_Im1&Object&Am1::•()
     ;
 }
 abstract class _Jm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<core::Function, self::_Jm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Jm1<Z extends core::Object = dynamic> extends self::_Jm1&Object&Am1<self::Jm1::Z> {
   synthetic constructor •() → self::Jm1<self::Jm1::Z>
-    : super core::Object::•()
+    : super self::_Jm1&Object&Am1::•()
     ;
 }
 abstract class _Km1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::Function) → dynamic, self::_Km1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Km1<Z extends core::Object = dynamic> extends self::_Km1&Object&Am1<self::Km1::Z> {
   synthetic constructor •() → self::Km1<self::Km1::Z>
-    : super core::Object::•()
+    : super self::_Km1&Object&Am1::•()
     ;
 }
 abstract class _Lm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → (() → core::Function) → dynamic, self::_Lm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Lm1<Z extends core::Object = dynamic> extends self::_Lm1&Object&Am1<self::Lm1::Z> {
   synthetic constructor •() → self::Lm1<self::Lm1::Z>
-    : super core::Object::•()
+    : super self::_Lm1&Object&Am1::•()
     ;
 }
 class Mm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::Mm1::Z> {
-  synthetic constructor •() → self::Mm1<self::Mm1::Z>
+  const synthetic constructor •() → self::Mm1<self::Mm1::Z>
     : super core::Object::•()
     ;
 }
 class Nm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::Nm1::Z> {
-  synthetic constructor •() → self::Nm1<self::Nm1::Z>
+  const synthetic constructor •() → self::Nm1<self::Nm1::Z>
     : super core::Object::•()
     ;
 }
 class Om1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → core::int, self::Om1::Z> {
-  synthetic constructor •() → self::Om1<self::Om1::Z>
+  const synthetic constructor •() → self::Om1<self::Om1::Z>
     : super core::Object::•()
     ;
 }
 class Pm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::Pm1::Z> {
-  synthetic constructor •() → self::Pm1<self::Pm1::Z>
+  const synthetic constructor •() → self::Pm1<self::Pm1::Z>
     : super core::Object::•()
     ;
 }
 class Qm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::Qm1::Z> {
-  synthetic constructor •() → self::Qm1<self::Qm1::Z>
+  const synthetic constructor •() → self::Qm1<self::Qm1::Z>
     : super core::Object::•()
     ;
 }
 class Rm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<({x: core::int}) → dynamic, self::Rm1::Z> {
-  synthetic constructor •() → self::Rm1<self::Rm1::Z>
+  const synthetic constructor •() → self::Rm1<self::Rm1::Z>
     : super core::Object::•()
     ;
 }
 class Sm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::Sm1::Z> {
-  synthetic constructor •() → self::Sm1<self::Sm1::Z>
+  const synthetic constructor •() → self::Sm1<self::Sm1::Z>
     : super core::Object::•()
     ;
 }
 class Tm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::Tm1::Z> {
-  synthetic constructor •() → self::Tm1<self::Tm1::Z>
+  const synthetic constructor •() → self::Tm1<self::Tm1::Z>
     : super core::Object::•()
     ;
 }
 class Um1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<core::Function, self::Um1::Z> {
-  synthetic constructor •() → self::Um1<self::Um1::Z>
+  const synthetic constructor •() → self::Um1<self::Um1::Z>
     : super core::Object::•()
     ;
 }
 class Vm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::Function) → dynamic, self::Vm1::Z> {
-  synthetic constructor •() → self::Vm1<self::Vm1::Z>
+  const synthetic constructor •() → self::Vm1<self::Vm1::Z>
     : super core::Object::•()
     ;
 }
 class Wm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → (() → core::Function) → dynamic, self::Wm1::Z> {
-  synthetic constructor •() → self::Wm1<self::Wm1::Z>
+  const synthetic constructor •() → self::Wm1<self::Wm1::Z>
     : super core::Object::•()
     ;
 }
@@ -214,167 +214,167 @@
     ;
 }
 abstract class _Bm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::_Bm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Bm2<Z extends core::Object = dynamic> extends self::_Bm2&Object&Am2<self::Bm2::Z> {
   synthetic constructor •() → self::Bm2<self::Bm2::Z>
-    : super core::Object::•()
+    : super self::_Bm2&Object&Am2::•()
     ;
 }
 abstract class _Cm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::_Cm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Cm2<Z extends core::Object = dynamic> extends self::_Cm2&Object&Am2<self::Cm2::Z> {
   synthetic constructor •() → self::Cm2<self::Cm2::Z>
-    : super core::Object::•()
+    : super self::_Cm2&Object&Am2::•()
     ;
 }
 abstract class _Dm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → core::int, self::_Dm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Dm2<Z extends core::Object = dynamic> extends self::_Dm2&Object&Am2<self::Dm2::Z> {
   synthetic constructor •() → self::Dm2<self::Dm2::Z>
-    : super core::Object::•()
+    : super self::_Dm2&Object&Am2::•()
     ;
 }
 abstract class _Em2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::_Em2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Em2<Z extends core::Object = dynamic> extends self::_Em2&Object&Am2<self::Em2::Z> {
   synthetic constructor •() → self::Em2<self::Em2::Z>
-    : super core::Object::•()
+    : super self::_Em2&Object&Am2::•()
     ;
 }
 abstract class _Fm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::_Fm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Fm2<Z extends core::Object = dynamic> extends self::_Fm2&Object&Am2<self::Fm2::Z> {
   synthetic constructor •() → self::Fm2<self::Fm2::Z>
-    : super core::Object::•()
+    : super self::_Fm2&Object&Am2::•()
     ;
 }
 abstract class _Gm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<({x: core::int}) → dynamic, self::_Gm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Gm2<Z extends core::Object = dynamic> extends self::_Gm2&Object&Am2<self::Gm2::Z> {
   synthetic constructor •() → self::Gm2<self::Gm2::Z>
-    : super core::Object::•()
+    : super self::_Gm2&Object&Am2::•()
     ;
 }
 abstract class _Hm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::_Hm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Hm2<Z extends core::Object = dynamic> extends self::_Hm2&Object&Am2<self::Hm2::Z> {
   synthetic constructor •() → self::Hm2<self::Hm2::Z>
-    : super core::Object::•()
+    : super self::_Hm2&Object&Am2::•()
     ;
 }
 abstract class _Im2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::_Im2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Im2<Z extends core::Object = dynamic> extends self::_Im2&Object&Am2<self::Im2::Z> {
   synthetic constructor •() → self::Im2<self::Im2::Z>
-    : super core::Object::•()
+    : super self::_Im2&Object&Am2::•()
     ;
 }
 abstract class _Jm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<core::Function, self::_Jm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Jm2<Z extends core::Object = dynamic> extends self::_Jm2&Object&Am2<self::Jm2::Z> {
   synthetic constructor •() → self::Jm2<self::Jm2::Z>
-    : super core::Object::•()
+    : super self::_Jm2&Object&Am2::•()
     ;
 }
 abstract class _Km2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::Function) → dynamic, self::_Km2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Km2<Z extends core::Object = dynamic> extends self::_Km2&Object&Am2<self::Km2::Z> {
   synthetic constructor •() → self::Km2<self::Km2::Z>
-    : super core::Object::•()
+    : super self::_Km2&Object&Am2::•()
     ;
 }
 abstract class _Lm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → (() → core::Function) → dynamic, self::_Lm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Lm2<Z extends core::Object = dynamic> extends self::_Lm2&Object&Am2<self::Lm2::Z> {
   synthetic constructor •() → self::Lm2<self::Lm2::Z>
-    : super core::Object::•()
+    : super self::_Lm2&Object&Am2::•()
     ;
 }
 class Mm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::Mm2::Z> {
-  synthetic constructor •() → self::Mm2<self::Mm2::Z>
+  const synthetic constructor •() → self::Mm2<self::Mm2::Z>
     : super core::Object::•()
     ;
 }
 class Nm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::Nm2::Z> {
-  synthetic constructor •() → self::Nm2<self::Nm2::Z>
+  const synthetic constructor •() → self::Nm2<self::Nm2::Z>
     : super core::Object::•()
     ;
 }
 class Om2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → core::int, self::Om2::Z> {
-  synthetic constructor •() → self::Om2<self::Om2::Z>
+  const synthetic constructor •() → self::Om2<self::Om2::Z>
     : super core::Object::•()
     ;
 }
 class Pm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::Pm2::Z> {
-  synthetic constructor •() → self::Pm2<self::Pm2::Z>
+  const synthetic constructor •() → self::Pm2<self::Pm2::Z>
     : super core::Object::•()
     ;
 }
 class Qm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::Qm2::Z> {
-  synthetic constructor •() → self::Qm2<self::Qm2::Z>
+  const synthetic constructor •() → self::Qm2<self::Qm2::Z>
     : super core::Object::•()
     ;
 }
 class Rm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<({x: core::int}) → dynamic, self::Rm2::Z> {
-  synthetic constructor •() → self::Rm2<self::Rm2::Z>
+  const synthetic constructor •() → self::Rm2<self::Rm2::Z>
     : super core::Object::•()
     ;
 }
 class Sm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::Sm2::Z> {
-  synthetic constructor •() → self::Sm2<self::Sm2::Z>
+  const synthetic constructor •() → self::Sm2<self::Sm2::Z>
     : super core::Object::•()
     ;
 }
 class Tm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::Tm2::Z> {
-  synthetic constructor •() → self::Tm2<self::Tm2::Z>
+  const synthetic constructor •() → self::Tm2<self::Tm2::Z>
     : super core::Object::•()
     ;
 }
 class Um2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<core::Function, self::Um2::Z> {
-  synthetic constructor •() → self::Um2<self::Um2::Z>
+  const synthetic constructor •() → self::Um2<self::Um2::Z>
     : super core::Object::•()
     ;
 }
 class Vm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::Function) → dynamic, self::Vm2::Z> {
-  synthetic constructor •() → self::Vm2<self::Vm2::Z>
+  const synthetic constructor •() → self::Vm2<self::Vm2::Z>
     : super core::Object::•()
     ;
 }
 class Wm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → (() → core::Function) → dynamic, self::Wm2::Z> {
-  synthetic constructor •() → self::Wm2<self::Wm2::Z>
+  const synthetic constructor •() → self::Wm2<self::Wm2::Z>
     : super core::Object::•()
     ;
 }
@@ -384,103 +384,103 @@
     ;
 }
 abstract class _Bm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<(core::int) → dynamic, self::_Bm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Bm3<Z extends core::Object = dynamic> extends self::_Bm3&Object&Am3<self::Bm3::Z> {
   synthetic constructor •() → self::Bm3<self::Bm3::Z>
-    : super core::Object::•()
+    : super self::_Bm3&Object&Am3::•()
     ;
 }
 abstract class _Cm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<(core::int) → dynamic, self::_Cm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Cm3<Z extends core::Object = dynamic> extends self::_Cm3&Object&Am3<self::Cm3::Z> {
   synthetic constructor •() → self::Cm3<self::Cm3::Z>
-    : super core::Object::•()
+    : super self::_Cm3&Object&Am3::•()
     ;
 }
 abstract class _Dm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → core::int, self::_Dm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Dm3<Z extends core::Object = dynamic> extends self::_Dm3&Object&Am3<self::Dm3::Z> {
   synthetic constructor •() → self::Dm3<self::Dm3::Z>
-    : super core::Object::•()
+    : super self::_Dm3&Object&Am3::•()
     ;
 }
 abstract class _Em3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → dynamic, self::_Em3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Em3<Z extends core::Object = dynamic> extends self::_Em3&Object&Am3<self::Em3::Z> {
   synthetic constructor •() → self::Em3<self::Em3::Z>
-    : super core::Object::•()
+    : super self::_Em3&Object&Am3::•()
     ;
 }
 abstract class _Fm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → dynamic, self::_Fm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Fm3<Z extends core::Object = dynamic> extends self::_Fm3&Object&Am3<self::Fm3::Z> {
   synthetic constructor •() → self::Fm3<self::Fm3::Z>
-    : super core::Object::•()
+    : super self::_Fm3&Object&Am3::•()
     ;
 }
 abstract class _Gm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<({x: core::int}) → dynamic, self::_Gm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Gm3<Z extends core::Object = dynamic> extends self::_Gm3&Object&Am3<self::Gm3::Z> {
   synthetic constructor •() → self::Gm3<self::Gm3::Z>
-    : super core::Object::•()
+    : super self::_Gm3&Object&Am3::•()
     ;
 }
 abstract class _Hm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<([core::int]) → dynamic, self::_Hm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Hm3<Z extends core::Object = dynamic> extends self::_Hm3&Object&Am3<self::Hm3::Z> {
   synthetic constructor •() → self::Hm3<self::Hm3::Z>
-    : super core::Object::•()
+    : super self::_Hm3&Object&Am3::•()
     ;
 }
 abstract class _Im3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<([core::int]) → dynamic, self::_Im3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Im3<Z extends core::Object = dynamic> extends self::_Im3&Object&Am3<self::Im3::Z> {
   synthetic constructor •() → self::Im3<self::Im3::Z>
-    : super core::Object::•()
+    : super self::_Im3&Object&Am3::•()
     ;
 }
 abstract class _Jm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<(core::Function) → dynamic, self::_Jm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Jm3<Z extends core::Object = dynamic> extends self::_Jm3&Object&Am3<self::Jm3::Z> {
   synthetic constructor •() → self::Jm3<self::Jm3::Z>
-    : super core::Object::•()
+    : super self::_Jm3&Object&Am3::•()
     ;
 }
 abstract class _Km3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → (() → core::Function) → dynamic, self::_Km3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Km3<Z extends core::Object = dynamic> extends self::_Km3&Object&Am3<self::Km3::Z> {
   synthetic constructor •() → self::Km3<self::Km3::Z>
-    : super core::Object::•()
+    : super self::_Km3&Object&Am3::•()
     ;
 }
 class Af1<X extends (core::int) → dynamic = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/clone_function_type.dart.outline.expect b/pkg/front_end/testcases/clone_function_type.dart.outline.expect
index 7b8504c..6d46fb3 100644
--- a/pkg/front_end/testcases/clone_function_type.dart.outline.expect
+++ b/pkg/front_end/testcases/clone_function_type.dart.outline.expect
@@ -43,7 +43,7 @@
     ;
 }
 abstract class _Bm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::_Bm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -52,7 +52,7 @@
     ;
 }
 abstract class _Cm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::_Cm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -61,7 +61,7 @@
     ;
 }
 abstract class _Dm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → core::int, self::_Dm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -70,7 +70,7 @@
     ;
 }
 abstract class _Em1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::_Em1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -79,7 +79,7 @@
     ;
 }
 abstract class _Fm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::_Fm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -88,7 +88,7 @@
     ;
 }
 abstract class _Gm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<({x: core::int}) → dynamic, self::_Gm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -97,7 +97,7 @@
     ;
 }
 abstract class _Hm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::_Hm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -106,7 +106,7 @@
     ;
 }
 abstract class _Im1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::_Im1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -115,7 +115,7 @@
     ;
 }
 abstract class _Jm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<core::Function, self::_Jm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -124,7 +124,7 @@
     ;
 }
 abstract class _Km1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::Function) → dynamic, self::_Km1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -133,7 +133,7 @@
     ;
 }
 abstract class _Lm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → (() → core::Function) → dynamic, self::_Lm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
@@ -142,57 +142,57 @@
     ;
 }
 class Mm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::Mm1::Z> {
-  synthetic constructor •() → self::Mm1<self::Mm1::Z>
+  const synthetic constructor •() → self::Mm1<self::Mm1::Z>
     : super core::Object::•()
     ;
 }
 class Nm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::Nm1::Z> {
-  synthetic constructor •() → self::Nm1<self::Nm1::Z>
+  const synthetic constructor •() → self::Nm1<self::Nm1::Z>
     : super core::Object::•()
     ;
 }
 class Om1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → core::int, self::Om1::Z> {
-  synthetic constructor •() → self::Om1<self::Om1::Z>
+  const synthetic constructor •() → self::Om1<self::Om1::Z>
     : super core::Object::•()
     ;
 }
 class Pm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::Pm1::Z> {
-  synthetic constructor •() → self::Pm1<self::Pm1::Z>
+  const synthetic constructor •() → self::Pm1<self::Pm1::Z>
     : super core::Object::•()
     ;
 }
 class Qm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::Qm1::Z> {
-  synthetic constructor •() → self::Qm1<self::Qm1::Z>
+  const synthetic constructor •() → self::Qm1<self::Qm1::Z>
     : super core::Object::•()
     ;
 }
 class Rm1<Z extends core::Object = dynamic> = core::Object with self::Am1<({x: core::int}) → dynamic, self::Rm1::Z> {
-  synthetic constructor •() → self::Rm1<self::Rm1::Z>
+  const synthetic constructor •() → self::Rm1<self::Rm1::Z>
     : super core::Object::•()
     ;
 }
 class Sm1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::Sm1::Z> {
-  synthetic constructor •() → self::Sm1<self::Sm1::Z>
+  const synthetic constructor •() → self::Sm1<self::Sm1::Z>
     : super core::Object::•()
     ;
 }
 class Tm1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::Tm1::Z> {
-  synthetic constructor •() → self::Tm1<self::Tm1::Z>
+  const synthetic constructor •() → self::Tm1<self::Tm1::Z>
     : super core::Object::•()
     ;
 }
 class Um1<Z extends core::Object = dynamic> = core::Object with self::Am1<core::Function, self::Um1::Z> {
-  synthetic constructor •() → self::Um1<self::Um1::Z>
+  const synthetic constructor •() → self::Um1<self::Um1::Z>
     : super core::Object::•()
     ;
 }
 class Vm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::Function) → dynamic, self::Vm1::Z> {
-  synthetic constructor •() → self::Vm1<self::Vm1::Z>
+  const synthetic constructor •() → self::Vm1<self::Vm1::Z>
     : super core::Object::•()
     ;
 }
 class Wm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → (() → core::Function) → dynamic, self::Wm1::Z> {
-  synthetic constructor •() → self::Wm1<self::Wm1::Z>
+  const synthetic constructor •() → self::Wm1<self::Wm1::Z>
     : super core::Object::•()
     ;
 }
@@ -201,7 +201,7 @@
     ;
 }
 abstract class _Bm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::_Bm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -210,7 +210,7 @@
     ;
 }
 abstract class _Cm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::_Cm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -219,7 +219,7 @@
     ;
 }
 abstract class _Dm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → core::int, self::_Dm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -228,7 +228,7 @@
     ;
 }
 abstract class _Em2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::_Em2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -237,7 +237,7 @@
     ;
 }
 abstract class _Fm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::_Fm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -246,7 +246,7 @@
     ;
 }
 abstract class _Gm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<({x: core::int}) → dynamic, self::_Gm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -255,7 +255,7 @@
     ;
 }
 abstract class _Hm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::_Hm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -264,7 +264,7 @@
     ;
 }
 abstract class _Im2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::_Im2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -273,7 +273,7 @@
     ;
 }
 abstract class _Jm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<core::Function, self::_Jm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -282,7 +282,7 @@
     ;
 }
 abstract class _Km2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::Function) → dynamic, self::_Km2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -291,7 +291,7 @@
     ;
 }
 abstract class _Lm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → (() → core::Function) → dynamic, self::_Lm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
@@ -300,57 +300,57 @@
     ;
 }
 class Mm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::Mm2::Z> {
-  synthetic constructor •() → self::Mm2<self::Mm2::Z>
+  const synthetic constructor •() → self::Mm2<self::Mm2::Z>
     : super core::Object::•()
     ;
 }
 class Nm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::Nm2::Z> {
-  synthetic constructor •() → self::Nm2<self::Nm2::Z>
+  const synthetic constructor •() → self::Nm2<self::Nm2::Z>
     : super core::Object::•()
     ;
 }
 class Om2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → core::int, self::Om2::Z> {
-  synthetic constructor •() → self::Om2<self::Om2::Z>
+  const synthetic constructor •() → self::Om2<self::Om2::Z>
     : super core::Object::•()
     ;
 }
 class Pm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::Pm2::Z> {
-  synthetic constructor •() → self::Pm2<self::Pm2::Z>
+  const synthetic constructor •() → self::Pm2<self::Pm2::Z>
     : super core::Object::•()
     ;
 }
 class Qm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::Qm2::Z> {
-  synthetic constructor •() → self::Qm2<self::Qm2::Z>
+  const synthetic constructor •() → self::Qm2<self::Qm2::Z>
     : super core::Object::•()
     ;
 }
 class Rm2<Z extends core::Object = dynamic> = core::Object with self::Am2<({x: core::int}) → dynamic, self::Rm2::Z> {
-  synthetic constructor •() → self::Rm2<self::Rm2::Z>
+  const synthetic constructor •() → self::Rm2<self::Rm2::Z>
     : super core::Object::•()
     ;
 }
 class Sm2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::Sm2::Z> {
-  synthetic constructor •() → self::Sm2<self::Sm2::Z>
+  const synthetic constructor •() → self::Sm2<self::Sm2::Z>
     : super core::Object::•()
     ;
 }
 class Tm2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::Tm2::Z> {
-  synthetic constructor •() → self::Tm2<self::Tm2::Z>
+  const synthetic constructor •() → self::Tm2<self::Tm2::Z>
     : super core::Object::•()
     ;
 }
 class Um2<Z extends core::Object = dynamic> = core::Object with self::Am2<core::Function, self::Um2::Z> {
-  synthetic constructor •() → self::Um2<self::Um2::Z>
+  const synthetic constructor •() → self::Um2<self::Um2::Z>
     : super core::Object::•()
     ;
 }
 class Vm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::Function) → dynamic, self::Vm2::Z> {
-  synthetic constructor •() → self::Vm2<self::Vm2::Z>
+  const synthetic constructor •() → self::Vm2<self::Vm2::Z>
     : super core::Object::•()
     ;
 }
 class Wm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → (() → core::Function) → dynamic, self::Wm2::Z> {
-  synthetic constructor •() → self::Wm2<self::Wm2::Z>
+  const synthetic constructor •() → self::Wm2<self::Wm2::Z>
     : super core::Object::•()
     ;
 }
@@ -359,7 +359,7 @@
     ;
 }
 abstract class _Bm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::int) → dynamic, self::_Bm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -368,7 +368,7 @@
     ;
 }
 abstract class _Cm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::int) → dynamic, self::_Cm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -377,7 +377,7 @@
     ;
 }
 abstract class _Dm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → core::int, self::_Dm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -386,7 +386,7 @@
     ;
 }
 abstract class _Em3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → dynamic, self::_Em3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -395,7 +395,7 @@
     ;
 }
 abstract class _Fm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → dynamic, self::_Fm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -404,7 +404,7 @@
     ;
 }
 abstract class _Gm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<({x: core::int}) → dynamic, self::_Gm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -413,7 +413,7 @@
     ;
 }
 abstract class _Hm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<([core::int]) → dynamic, self::_Hm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -422,7 +422,7 @@
     ;
 }
 abstract class _Im3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<([core::int]) → dynamic, self::_Im3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -431,7 +431,7 @@
     ;
 }
 abstract class _Jm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::Function) → dynamic, self::_Jm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
@@ -440,7 +440,7 @@
     ;
 }
 abstract class _Km3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → (() → core::Function) → dynamic, self::_Km3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/clone_function_type.dart.strong.expect b/pkg/front_end/testcases/clone_function_type.dart.strong.expect
index ae0741e..993f5a8 100644
--- a/pkg/front_end/testcases/clone_function_type.dart.strong.expect
+++ b/pkg/front_end/testcases/clone_function_type.dart.strong.expect
@@ -182,167 +182,167 @@
     ;
 }
 abstract class _Bm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::_Bm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Bm1<Z extends core::Object = dynamic> extends self::_Bm1&Object&Am1<self::Bm1::Z> {
   synthetic constructor •() → self::Bm1<self::Bm1::Z>
-    : super core::Object::•()
+    : super self::_Bm1&Object&Am1::•()
     ;
 }
 abstract class _Cm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::_Cm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Cm1<Z extends core::Object = dynamic> extends self::_Cm1&Object&Am1<self::Cm1::Z> {
   synthetic constructor •() → self::Cm1<self::Cm1::Z>
-    : super core::Object::•()
+    : super self::_Cm1&Object&Am1::•()
     ;
 }
 abstract class _Dm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → core::int, self::_Dm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Dm1<Z extends core::Object = dynamic> extends self::_Dm1&Object&Am1<self::Dm1::Z> {
   synthetic constructor •() → self::Dm1<self::Dm1::Z>
-    : super core::Object::•()
+    : super self::_Dm1&Object&Am1::•()
     ;
 }
 abstract class _Em1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::_Em1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Em1<Z extends core::Object = dynamic> extends self::_Em1&Object&Am1<self::Em1::Z> {
   synthetic constructor •() → self::Em1<self::Em1::Z>
-    : super core::Object::•()
+    : super self::_Em1&Object&Am1::•()
     ;
 }
 abstract class _Fm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::_Fm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Fm1<Z extends core::Object = dynamic> extends self::_Fm1&Object&Am1<self::Fm1::Z> {
   synthetic constructor •() → self::Fm1<self::Fm1::Z>
-    : super core::Object::•()
+    : super self::_Fm1&Object&Am1::•()
     ;
 }
 abstract class _Gm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<({x: core::int}) → dynamic, self::_Gm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Gm1<Z extends core::Object = dynamic> extends self::_Gm1&Object&Am1<self::Gm1::Z> {
   synthetic constructor •() → self::Gm1<self::Gm1::Z>
-    : super core::Object::•()
+    : super self::_Gm1&Object&Am1::•()
     ;
 }
 abstract class _Hm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::_Hm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Hm1<Z extends core::Object = dynamic> extends self::_Hm1&Object&Am1<self::Hm1::Z> {
   synthetic constructor •() → self::Hm1<self::Hm1::Z>
-    : super core::Object::•()
+    : super self::_Hm1&Object&Am1::•()
     ;
 }
 abstract class _Im1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::_Im1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Im1<Z extends core::Object = dynamic> extends self::_Im1&Object&Am1<self::Im1::Z> {
   synthetic constructor •() → self::Im1<self::Im1::Z>
-    : super core::Object::•()
+    : super self::_Im1&Object&Am1::•()
     ;
 }
 abstract class _Jm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<core::Function, self::_Jm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Jm1<Z extends core::Object = dynamic> extends self::_Jm1&Object&Am1<self::Jm1::Z> {
   synthetic constructor •() → self::Jm1<self::Jm1::Z>
-    : super core::Object::•()
+    : super self::_Jm1&Object&Am1::•()
     ;
 }
 abstract class _Km1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::Function) → dynamic, self::_Km1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Km1<Z extends core::Object = dynamic> extends self::_Km1&Object&Am1<self::Km1::Z> {
   synthetic constructor •() → self::Km1<self::Km1::Z>
-    : super core::Object::•()
+    : super self::_Km1&Object&Am1::•()
     ;
 }
 abstract class _Lm1&Object&Am1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → (() → core::Function) → dynamic, self::_Lm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Lm1<Z extends core::Object = dynamic> extends self::_Lm1&Object&Am1<self::Lm1::Z> {
   synthetic constructor •() → self::Lm1<self::Lm1::Z>
-    : super core::Object::•()
+    : super self::_Lm1&Object&Am1::•()
     ;
 }
 class Mm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::Mm1::Z> {
-  synthetic constructor •() → self::Mm1<self::Mm1::Z>
+  const synthetic constructor •() → self::Mm1<self::Mm1::Z>
     : super core::Object::•()
     ;
 }
 class Nm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::int) → dynamic, self::Nm1::Z> {
-  synthetic constructor •() → self::Nm1<self::Nm1::Z>
+  const synthetic constructor •() → self::Nm1<self::Nm1::Z>
     : super core::Object::•()
     ;
 }
 class Om1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → core::int, self::Om1::Z> {
-  synthetic constructor •() → self::Om1<self::Om1::Z>
+  const synthetic constructor •() → self::Om1<self::Om1::Z>
     : super core::Object::•()
     ;
 }
 class Pm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::Pm1::Z> {
-  synthetic constructor •() → self::Pm1<self::Pm1::Z>
+  const synthetic constructor •() → self::Pm1<self::Pm1::Z>
     : super core::Object::•()
     ;
 }
 class Qm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → dynamic, self::Qm1::Z> {
-  synthetic constructor •() → self::Qm1<self::Qm1::Z>
+  const synthetic constructor •() → self::Qm1<self::Qm1::Z>
     : super core::Object::•()
     ;
 }
 class Rm1<Z extends core::Object = dynamic> = core::Object with self::Am1<({x: core::int}) → dynamic, self::Rm1::Z> {
-  synthetic constructor •() → self::Rm1<self::Rm1::Z>
+  const synthetic constructor •() → self::Rm1<self::Rm1::Z>
     : super core::Object::•()
     ;
 }
 class Sm1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::Sm1::Z> {
-  synthetic constructor •() → self::Sm1<self::Sm1::Z>
+  const synthetic constructor •() → self::Sm1<self::Sm1::Z>
     : super core::Object::•()
     ;
 }
 class Tm1<Z extends core::Object = dynamic> = core::Object with self::Am1<([core::int]) → dynamic, self::Tm1::Z> {
-  synthetic constructor •() → self::Tm1<self::Tm1::Z>
+  const synthetic constructor •() → self::Tm1<self::Tm1::Z>
     : super core::Object::•()
     ;
 }
 class Um1<Z extends core::Object = dynamic> = core::Object with self::Am1<core::Function, self::Um1::Z> {
-  synthetic constructor •() → self::Um1<self::Um1::Z>
+  const synthetic constructor •() → self::Um1<self::Um1::Z>
     : super core::Object::•()
     ;
 }
 class Vm1<Z extends core::Object = dynamic> = core::Object with self::Am1<(core::Function) → dynamic, self::Vm1::Z> {
-  synthetic constructor •() → self::Vm1<self::Vm1::Z>
+  const synthetic constructor •() → self::Vm1<self::Vm1::Z>
     : super core::Object::•()
     ;
 }
 class Wm1<Z extends core::Object = dynamic> = core::Object with self::Am1<() → (() → core::Function) → dynamic, self::Wm1::Z> {
-  synthetic constructor •() → self::Wm1<self::Wm1::Z>
+  const synthetic constructor •() → self::Wm1<self::Wm1::Z>
     : super core::Object::•()
     ;
 }
@@ -352,167 +352,167 @@
     ;
 }
 abstract class _Bm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::_Bm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Bm2<Z extends core::Object = dynamic> extends self::_Bm2&Object&Am2<self::Bm2::Z> {
   synthetic constructor •() → self::Bm2<self::Bm2::Z>
-    : super core::Object::•()
+    : super self::_Bm2&Object&Am2::•()
     ;
 }
 abstract class _Cm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::_Cm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Cm2<Z extends core::Object = dynamic> extends self::_Cm2&Object&Am2<self::Cm2::Z> {
   synthetic constructor •() → self::Cm2<self::Cm2::Z>
-    : super core::Object::•()
+    : super self::_Cm2&Object&Am2::•()
     ;
 }
 abstract class _Dm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → core::int, self::_Dm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Dm2<Z extends core::Object = dynamic> extends self::_Dm2&Object&Am2<self::Dm2::Z> {
   synthetic constructor •() → self::Dm2<self::Dm2::Z>
-    : super core::Object::•()
+    : super self::_Dm2&Object&Am2::•()
     ;
 }
 abstract class _Em2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::_Em2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Em2<Z extends core::Object = dynamic> extends self::_Em2&Object&Am2<self::Em2::Z> {
   synthetic constructor •() → self::Em2<self::Em2::Z>
-    : super core::Object::•()
+    : super self::_Em2&Object&Am2::•()
     ;
 }
 abstract class _Fm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::_Fm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Fm2<Z extends core::Object = dynamic> extends self::_Fm2&Object&Am2<self::Fm2::Z> {
   synthetic constructor •() → self::Fm2<self::Fm2::Z>
-    : super core::Object::•()
+    : super self::_Fm2&Object&Am2::•()
     ;
 }
 abstract class _Gm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<({x: core::int}) → dynamic, self::_Gm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Gm2<Z extends core::Object = dynamic> extends self::_Gm2&Object&Am2<self::Gm2::Z> {
   synthetic constructor •() → self::Gm2<self::Gm2::Z>
-    : super core::Object::•()
+    : super self::_Gm2&Object&Am2::•()
     ;
 }
 abstract class _Hm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::_Hm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Hm2<Z extends core::Object = dynamic> extends self::_Hm2&Object&Am2<self::Hm2::Z> {
   synthetic constructor •() → self::Hm2<self::Hm2::Z>
-    : super core::Object::•()
+    : super self::_Hm2&Object&Am2::•()
     ;
 }
 abstract class _Im2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::_Im2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Im2<Z extends core::Object = dynamic> extends self::_Im2&Object&Am2<self::Im2::Z> {
   synthetic constructor •() → self::Im2<self::Im2::Z>
-    : super core::Object::•()
+    : super self::_Im2&Object&Am2::•()
     ;
 }
 abstract class _Jm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<core::Function, self::_Jm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Jm2<Z extends core::Object = dynamic> extends self::_Jm2&Object&Am2<self::Jm2::Z> {
   synthetic constructor •() → self::Jm2<self::Jm2::Z>
-    : super core::Object::•()
+    : super self::_Jm2&Object&Am2::•()
     ;
 }
 abstract class _Km2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::Function) → dynamic, self::_Km2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Km2<Z extends core::Object = dynamic> extends self::_Km2&Object&Am2<self::Km2::Z> {
   synthetic constructor •() → self::Km2<self::Km2::Z>
-    : super core::Object::•()
+    : super self::_Km2&Object&Am2::•()
     ;
 }
 abstract class _Lm2&Object&Am2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → (() → core::Function) → dynamic, self::_Lm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Lm2<Z extends core::Object = dynamic> extends self::_Lm2&Object&Am2<self::Lm2::Z> {
   synthetic constructor •() → self::Lm2<self::Lm2::Z>
-    : super core::Object::•()
+    : super self::_Lm2&Object&Am2::•()
     ;
 }
 class Mm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::Mm2::Z> {
-  synthetic constructor •() → self::Mm2<self::Mm2::Z>
+  const synthetic constructor •() → self::Mm2<self::Mm2::Z>
     : super core::Object::•()
     ;
 }
 class Nm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::int) → dynamic, self::Nm2::Z> {
-  synthetic constructor •() → self::Nm2<self::Nm2::Z>
+  const synthetic constructor •() → self::Nm2<self::Nm2::Z>
     : super core::Object::•()
     ;
 }
 class Om2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → core::int, self::Om2::Z> {
-  synthetic constructor •() → self::Om2<self::Om2::Z>
+  const synthetic constructor •() → self::Om2<self::Om2::Z>
     : super core::Object::•()
     ;
 }
 class Pm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::Pm2::Z> {
-  synthetic constructor •() → self::Pm2<self::Pm2::Z>
+  const synthetic constructor •() → self::Pm2<self::Pm2::Z>
     : super core::Object::•()
     ;
 }
 class Qm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → dynamic, self::Qm2::Z> {
-  synthetic constructor •() → self::Qm2<self::Qm2::Z>
+  const synthetic constructor •() → self::Qm2<self::Qm2::Z>
     : super core::Object::•()
     ;
 }
 class Rm2<Z extends core::Object = dynamic> = core::Object with self::Am2<({x: core::int}) → dynamic, self::Rm2::Z> {
-  synthetic constructor •() → self::Rm2<self::Rm2::Z>
+  const synthetic constructor •() → self::Rm2<self::Rm2::Z>
     : super core::Object::•()
     ;
 }
 class Sm2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::Sm2::Z> {
-  synthetic constructor •() → self::Sm2<self::Sm2::Z>
+  const synthetic constructor •() → self::Sm2<self::Sm2::Z>
     : super core::Object::•()
     ;
 }
 class Tm2<Z extends core::Object = dynamic> = core::Object with self::Am2<([core::int]) → dynamic, self::Tm2::Z> {
-  synthetic constructor •() → self::Tm2<self::Tm2::Z>
+  const synthetic constructor •() → self::Tm2<self::Tm2::Z>
     : super core::Object::•()
     ;
 }
 class Um2<Z extends core::Object = dynamic> = core::Object with self::Am2<core::Function, self::Um2::Z> {
-  synthetic constructor •() → self::Um2<self::Um2::Z>
+  const synthetic constructor •() → self::Um2<self::Um2::Z>
     : super core::Object::•()
     ;
 }
 class Vm2<Z extends core::Object = dynamic> = core::Object with self::Am2<(core::Function) → dynamic, self::Vm2::Z> {
-  synthetic constructor •() → self::Vm2<self::Vm2::Z>
+  const synthetic constructor •() → self::Vm2<self::Vm2::Z>
     : super core::Object::•()
     ;
 }
 class Wm2<Z extends core::Object = dynamic> = core::Object with self::Am2<() → (() → core::Function) → dynamic, self::Wm2::Z> {
-  synthetic constructor •() → self::Wm2<self::Wm2::Z>
+  const synthetic constructor •() → self::Wm2<self::Wm2::Z>
     : super core::Object::•()
     ;
 }
@@ -522,103 +522,103 @@
     ;
 }
 abstract class _Bm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::int) → dynamic, self::_Bm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Bm3<Z extends core::Object = dynamic> extends self::_Bm3&Object&Am3<self::Bm3::Z> {
   synthetic constructor •() → self::Bm3<self::Bm3::Z>
-    : super core::Object::•()
+    : super self::_Bm3&Object&Am3::•()
     ;
 }
 abstract class _Cm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::int) → dynamic, self::_Cm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Cm3<Z extends core::Object = dynamic> extends self::_Cm3&Object&Am3<self::Cm3::Z> {
   synthetic constructor •() → self::Cm3<self::Cm3::Z>
-    : super core::Object::•()
+    : super self::_Cm3&Object&Am3::•()
     ;
 }
 abstract class _Dm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → core::int, self::_Dm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Dm3<Z extends core::Object = dynamic> extends self::_Dm3&Object&Am3<self::Dm3::Z> {
   synthetic constructor •() → self::Dm3<self::Dm3::Z>
-    : super core::Object::•()
+    : super self::_Dm3&Object&Am3::•()
     ;
 }
 abstract class _Em3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → dynamic, self::_Em3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Em3<Z extends core::Object = dynamic> extends self::_Em3&Object&Am3<self::Em3::Z> {
   synthetic constructor •() → self::Em3<self::Em3::Z>
-    : super core::Object::•()
+    : super self::_Em3&Object&Am3::•()
     ;
 }
 abstract class _Fm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → dynamic, self::_Fm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Fm3<Z extends core::Object = dynamic> extends self::_Fm3&Object&Am3<self::Fm3::Z> {
   synthetic constructor •() → self::Fm3<self::Fm3::Z>
-    : super core::Object::•()
+    : super self::_Fm3&Object&Am3::•()
     ;
 }
 abstract class _Gm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<({x: core::int}) → dynamic, self::_Gm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Gm3<Z extends core::Object = dynamic> extends self::_Gm3&Object&Am3<self::Gm3::Z> {
   synthetic constructor •() → self::Gm3<self::Gm3::Z>
-    : super core::Object::•()
+    : super self::_Gm3&Object&Am3::•()
     ;
 }
 abstract class _Hm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<([core::int]) → dynamic, self::_Hm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Hm3<Z extends core::Object = dynamic> extends self::_Hm3&Object&Am3<self::Hm3::Z> {
   synthetic constructor •() → self::Hm3<self::Hm3::Z>
-    : super core::Object::•()
+    : super self::_Hm3&Object&Am3::•()
     ;
 }
 abstract class _Im3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<([core::int]) → dynamic, self::_Im3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Im3<Z extends core::Object = dynamic> extends self::_Im3&Object&Am3<self::Im3::Z> {
   synthetic constructor •() → self::Im3<self::Im3::Z>
-    : super core::Object::•()
+    : super self::_Im3&Object&Am3::•()
     ;
 }
 abstract class _Jm3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<(core::Function) → dynamic, self::_Jm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Jm3<Z extends core::Object = dynamic> extends self::_Jm3&Object&Am3<self::Jm3::Z> {
   synthetic constructor •() → self::Jm3<self::Jm3::Z>
-    : super core::Object::•()
+    : super self::_Jm3&Object&Am3::•()
     ;
 }
 abstract class _Km3&Object&Am3<Z extends core::Object = dynamic> = core::Object with self::Am3<() → (() → core::Function) → dynamic, self::_Km3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Km3<Z extends core::Object = dynamic> extends self::_Km3&Object&Am3<self::Km3::Z> {
   synthetic constructor •() → self::Km3<self::Km3::Z>
-    : super core::Object::•()
+    : super self::_Km3&Object&Am3::•()
     ;
 }
 class Af1<X extends (core::int) → dynamic = (core::int) → dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/clone_function_type.dart.strong.transformed.expect b/pkg/front_end/testcases/clone_function_type.dart.strong.transformed.expect
index 22d08e5..6c6a057 100644
--- a/pkg/front_end/testcases/clone_function_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/clone_function_type.dart.strong.transformed.expect
@@ -88,167 +88,167 @@
     ;
 }
 abstract class _Bm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::_Bm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Bm1&Object&Am1<self::_Bm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Bm1<Z extends core::Object = dynamic> extends self::_Bm1&Object&Am1<self::Bm1::Z> {
   synthetic constructor •() → self::Bm1<self::Bm1::Z>
-    : super core::Object::•()
+    : super self::_Bm1&Object&Am1::•()
     ;
 }
 abstract class _Cm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::_Cm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Cm1&Object&Am1<self::_Cm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Cm1<Z extends core::Object = dynamic> extends self::_Cm1&Object&Am1<self::Cm1::Z> {
   synthetic constructor •() → self::Cm1<self::Cm1::Z>
-    : super core::Object::•()
+    : super self::_Cm1&Object&Am1::•()
     ;
 }
 abstract class _Dm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → core::int, self::_Dm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Dm1&Object&Am1<self::_Dm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Dm1<Z extends core::Object = dynamic> extends self::_Dm1&Object&Am1<self::Dm1::Z> {
   synthetic constructor •() → self::Dm1<self::Dm1::Z>
-    : super core::Object::•()
+    : super self::_Dm1&Object&Am1::•()
     ;
 }
 abstract class _Em1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::_Em1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Em1&Object&Am1<self::_Em1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Em1<Z extends core::Object = dynamic> extends self::_Em1&Object&Am1<self::Em1::Z> {
   synthetic constructor •() → self::Em1<self::Em1::Z>
-    : super core::Object::•()
+    : super self::_Em1&Object&Am1::•()
     ;
 }
 abstract class _Fm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::_Fm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Fm1&Object&Am1<self::_Fm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Fm1<Z extends core::Object = dynamic> extends self::_Fm1&Object&Am1<self::Fm1::Z> {
   synthetic constructor •() → self::Fm1<self::Fm1::Z>
-    : super core::Object::•()
+    : super self::_Fm1&Object&Am1::•()
     ;
 }
 abstract class _Gm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<({x: core::int}) → dynamic, self::_Gm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Gm1&Object&Am1<self::_Gm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Gm1<Z extends core::Object = dynamic> extends self::_Gm1&Object&Am1<self::Gm1::Z> {
   synthetic constructor •() → self::Gm1<self::Gm1::Z>
-    : super core::Object::•()
+    : super self::_Gm1&Object&Am1::•()
     ;
 }
 abstract class _Hm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::_Hm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Hm1&Object&Am1<self::_Hm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Hm1<Z extends core::Object = dynamic> extends self::_Hm1&Object&Am1<self::Hm1::Z> {
   synthetic constructor •() → self::Hm1<self::Hm1::Z>
-    : super core::Object::•()
+    : super self::_Hm1&Object&Am1::•()
     ;
 }
 abstract class _Im1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::_Im1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Im1&Object&Am1<self::_Im1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Im1<Z extends core::Object = dynamic> extends self::_Im1&Object&Am1<self::Im1::Z> {
   synthetic constructor •() → self::Im1<self::Im1::Z>
-    : super core::Object::•()
+    : super self::_Im1&Object&Am1::•()
     ;
 }
 abstract class _Jm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<core::Function, self::_Jm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Jm1&Object&Am1<self::_Jm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Jm1<Z extends core::Object = dynamic> extends self::_Jm1&Object&Am1<self::Jm1::Z> {
   synthetic constructor •() → self::Jm1<self::Jm1::Z>
-    : super core::Object::•()
+    : super self::_Jm1&Object&Am1::•()
     ;
 }
 abstract class _Km1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::Function) → dynamic, self::_Km1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Km1&Object&Am1<self::_Km1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Km1<Z extends core::Object = dynamic> extends self::_Km1&Object&Am1<self::Km1::Z> {
   synthetic constructor •() → self::Km1<self::Km1::Z>
-    : super core::Object::•()
+    : super self::_Km1&Object&Am1::•()
     ;
 }
 abstract class _Lm1&Object&Am1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → (() → core::Function) → dynamic, self::_Lm1&Object&Am1::Z> {
-  synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
+  const synthetic constructor •() → self::_Lm1&Object&Am1<self::_Lm1&Object&Am1::Z>
     : super core::Object::•()
     ;
 }
 class Lm1<Z extends core::Object = dynamic> extends self::_Lm1&Object&Am1<self::Lm1::Z> {
   synthetic constructor •() → self::Lm1<self::Lm1::Z>
-    : super core::Object::•()
+    : super self::_Lm1&Object&Am1::•()
     ;
 }
 class Mm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::Mm1::Z> {
-  synthetic constructor •() → self::Mm1<self::Mm1::Z>
+  const synthetic constructor •() → self::Mm1<self::Mm1::Z>
     : super core::Object::•()
     ;
 }
 class Nm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::int) → dynamic, self::Nm1::Z> {
-  synthetic constructor •() → self::Nm1<self::Nm1::Z>
+  const synthetic constructor •() → self::Nm1<self::Nm1::Z>
     : super core::Object::•()
     ;
 }
 class Om1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → core::int, self::Om1::Z> {
-  synthetic constructor •() → self::Om1<self::Om1::Z>
+  const synthetic constructor •() → self::Om1<self::Om1::Z>
     : super core::Object::•()
     ;
 }
 class Pm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::Pm1::Z> {
-  synthetic constructor •() → self::Pm1<self::Pm1::Z>
+  const synthetic constructor •() → self::Pm1<self::Pm1::Z>
     : super core::Object::•()
     ;
 }
 class Qm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → dynamic, self::Qm1::Z> {
-  synthetic constructor •() → self::Qm1<self::Qm1::Z>
+  const synthetic constructor •() → self::Qm1<self::Qm1::Z>
     : super core::Object::•()
     ;
 }
 class Rm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<({x: core::int}) → dynamic, self::Rm1::Z> {
-  synthetic constructor •() → self::Rm1<self::Rm1::Z>
+  const synthetic constructor •() → self::Rm1<self::Rm1::Z>
     : super core::Object::•()
     ;
 }
 class Sm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::Sm1::Z> {
-  synthetic constructor •() → self::Sm1<self::Sm1::Z>
+  const synthetic constructor •() → self::Sm1<self::Sm1::Z>
     : super core::Object::•()
     ;
 }
 class Tm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<([core::int]) → dynamic, self::Tm1::Z> {
-  synthetic constructor •() → self::Tm1<self::Tm1::Z>
+  const synthetic constructor •() → self::Tm1<self::Tm1::Z>
     : super core::Object::•()
     ;
 }
 class Um1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<core::Function, self::Um1::Z> {
-  synthetic constructor •() → self::Um1<self::Um1::Z>
+  const synthetic constructor •() → self::Um1<self::Um1::Z>
     : super core::Object::•()
     ;
 }
 class Vm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<(core::Function) → dynamic, self::Vm1::Z> {
-  synthetic constructor •() → self::Vm1<self::Vm1::Z>
+  const synthetic constructor •() → self::Vm1<self::Vm1::Z>
     : super core::Object::•()
     ;
 }
 class Wm1<Z extends core::Object = dynamic> extends core::Object implements self::Am1<() → (() → core::Function) → dynamic, self::Wm1::Z> {
-  synthetic constructor •() → self::Wm1<self::Wm1::Z>
+  const synthetic constructor •() → self::Wm1<self::Wm1::Z>
     : super core::Object::•()
     ;
 }
@@ -258,167 +258,167 @@
     ;
 }
 abstract class _Bm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::_Bm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Bm2&Object&Am2<self::_Bm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Bm2<Z extends core::Object = dynamic> extends self::_Bm2&Object&Am2<self::Bm2::Z> {
   synthetic constructor •() → self::Bm2<self::Bm2::Z>
-    : super core::Object::•()
+    : super self::_Bm2&Object&Am2::•()
     ;
 }
 abstract class _Cm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::_Cm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Cm2&Object&Am2<self::_Cm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Cm2<Z extends core::Object = dynamic> extends self::_Cm2&Object&Am2<self::Cm2::Z> {
   synthetic constructor •() → self::Cm2<self::Cm2::Z>
-    : super core::Object::•()
+    : super self::_Cm2&Object&Am2::•()
     ;
 }
 abstract class _Dm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → core::int, self::_Dm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Dm2&Object&Am2<self::_Dm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Dm2<Z extends core::Object = dynamic> extends self::_Dm2&Object&Am2<self::Dm2::Z> {
   synthetic constructor •() → self::Dm2<self::Dm2::Z>
-    : super core::Object::•()
+    : super self::_Dm2&Object&Am2::•()
     ;
 }
 abstract class _Em2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::_Em2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Em2&Object&Am2<self::_Em2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Em2<Z extends core::Object = dynamic> extends self::_Em2&Object&Am2<self::Em2::Z> {
   synthetic constructor •() → self::Em2<self::Em2::Z>
-    : super core::Object::•()
+    : super self::_Em2&Object&Am2::•()
     ;
 }
 abstract class _Fm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::_Fm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Fm2&Object&Am2<self::_Fm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Fm2<Z extends core::Object = dynamic> extends self::_Fm2&Object&Am2<self::Fm2::Z> {
   synthetic constructor •() → self::Fm2<self::Fm2::Z>
-    : super core::Object::•()
+    : super self::_Fm2&Object&Am2::•()
     ;
 }
 abstract class _Gm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<({x: core::int}) → dynamic, self::_Gm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Gm2&Object&Am2<self::_Gm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Gm2<Z extends core::Object = dynamic> extends self::_Gm2&Object&Am2<self::Gm2::Z> {
   synthetic constructor •() → self::Gm2<self::Gm2::Z>
-    : super core::Object::•()
+    : super self::_Gm2&Object&Am2::•()
     ;
 }
 abstract class _Hm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::_Hm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Hm2&Object&Am2<self::_Hm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Hm2<Z extends core::Object = dynamic> extends self::_Hm2&Object&Am2<self::Hm2::Z> {
   synthetic constructor •() → self::Hm2<self::Hm2::Z>
-    : super core::Object::•()
+    : super self::_Hm2&Object&Am2::•()
     ;
 }
 abstract class _Im2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::_Im2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Im2&Object&Am2<self::_Im2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Im2<Z extends core::Object = dynamic> extends self::_Im2&Object&Am2<self::Im2::Z> {
   synthetic constructor •() → self::Im2<self::Im2::Z>
-    : super core::Object::•()
+    : super self::_Im2&Object&Am2::•()
     ;
 }
 abstract class _Jm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<core::Function, self::_Jm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Jm2&Object&Am2<self::_Jm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Jm2<Z extends core::Object = dynamic> extends self::_Jm2&Object&Am2<self::Jm2::Z> {
   synthetic constructor •() → self::Jm2<self::Jm2::Z>
-    : super core::Object::•()
+    : super self::_Jm2&Object&Am2::•()
     ;
 }
 abstract class _Km2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::Function) → dynamic, self::_Km2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Km2&Object&Am2<self::_Km2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Km2<Z extends core::Object = dynamic> extends self::_Km2&Object&Am2<self::Km2::Z> {
   synthetic constructor •() → self::Km2<self::Km2::Z>
-    : super core::Object::•()
+    : super self::_Km2&Object&Am2::•()
     ;
 }
 abstract class _Lm2&Object&Am2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → (() → core::Function) → dynamic, self::_Lm2&Object&Am2::Z> {
-  synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
+  const synthetic constructor •() → self::_Lm2&Object&Am2<self::_Lm2&Object&Am2::Z>
     : super core::Object::•()
     ;
 }
 class Lm2<Z extends core::Object = dynamic> extends self::_Lm2&Object&Am2<self::Lm2::Z> {
   synthetic constructor •() → self::Lm2<self::Lm2::Z>
-    : super core::Object::•()
+    : super self::_Lm2&Object&Am2::•()
     ;
 }
 class Mm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::Mm2::Z> {
-  synthetic constructor •() → self::Mm2<self::Mm2::Z>
+  const synthetic constructor •() → self::Mm2<self::Mm2::Z>
     : super core::Object::•()
     ;
 }
 class Nm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::int) → dynamic, self::Nm2::Z> {
-  synthetic constructor •() → self::Nm2<self::Nm2::Z>
+  const synthetic constructor •() → self::Nm2<self::Nm2::Z>
     : super core::Object::•()
     ;
 }
 class Om2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → core::int, self::Om2::Z> {
-  synthetic constructor •() → self::Om2<self::Om2::Z>
+  const synthetic constructor •() → self::Om2<self::Om2::Z>
     : super core::Object::•()
     ;
 }
 class Pm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::Pm2::Z> {
-  synthetic constructor •() → self::Pm2<self::Pm2::Z>
+  const synthetic constructor •() → self::Pm2<self::Pm2::Z>
     : super core::Object::•()
     ;
 }
 class Qm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → dynamic, self::Qm2::Z> {
-  synthetic constructor •() → self::Qm2<self::Qm2::Z>
+  const synthetic constructor •() → self::Qm2<self::Qm2::Z>
     : super core::Object::•()
     ;
 }
 class Rm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<({x: core::int}) → dynamic, self::Rm2::Z> {
-  synthetic constructor •() → self::Rm2<self::Rm2::Z>
+  const synthetic constructor •() → self::Rm2<self::Rm2::Z>
     : super core::Object::•()
     ;
 }
 class Sm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::Sm2::Z> {
-  synthetic constructor •() → self::Sm2<self::Sm2::Z>
+  const synthetic constructor •() → self::Sm2<self::Sm2::Z>
     : super core::Object::•()
     ;
 }
 class Tm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<([core::int]) → dynamic, self::Tm2::Z> {
-  synthetic constructor •() → self::Tm2<self::Tm2::Z>
+  const synthetic constructor •() → self::Tm2<self::Tm2::Z>
     : super core::Object::•()
     ;
 }
 class Um2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<core::Function, self::Um2::Z> {
-  synthetic constructor •() → self::Um2<self::Um2::Z>
+  const synthetic constructor •() → self::Um2<self::Um2::Z>
     : super core::Object::•()
     ;
 }
 class Vm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<(core::Function) → dynamic, self::Vm2::Z> {
-  synthetic constructor •() → self::Vm2<self::Vm2::Z>
+  const synthetic constructor •() → self::Vm2<self::Vm2::Z>
     : super core::Object::•()
     ;
 }
 class Wm2<Z extends core::Object = dynamic> extends core::Object implements self::Am2<() → (() → core::Function) → dynamic, self::Wm2::Z> {
-  synthetic constructor •() → self::Wm2<self::Wm2::Z>
+  const synthetic constructor •() → self::Wm2<self::Wm2::Z>
     : super core::Object::•()
     ;
 }
@@ -428,103 +428,103 @@
     ;
 }
 abstract class _Bm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<(core::int) → dynamic, self::_Bm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Bm3&Object&Am3<self::_Bm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Bm3<Z extends core::Object = dynamic> extends self::_Bm3&Object&Am3<self::Bm3::Z> {
   synthetic constructor •() → self::Bm3<self::Bm3::Z>
-    : super core::Object::•()
+    : super self::_Bm3&Object&Am3::•()
     ;
 }
 abstract class _Cm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<(core::int) → dynamic, self::_Cm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Cm3&Object&Am3<self::_Cm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Cm3<Z extends core::Object = dynamic> extends self::_Cm3&Object&Am3<self::Cm3::Z> {
   synthetic constructor •() → self::Cm3<self::Cm3::Z>
-    : super core::Object::•()
+    : super self::_Cm3&Object&Am3::•()
     ;
 }
 abstract class _Dm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → core::int, self::_Dm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Dm3&Object&Am3<self::_Dm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Dm3<Z extends core::Object = dynamic> extends self::_Dm3&Object&Am3<self::Dm3::Z> {
   synthetic constructor •() → self::Dm3<self::Dm3::Z>
-    : super core::Object::•()
+    : super self::_Dm3&Object&Am3::•()
     ;
 }
 abstract class _Em3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → dynamic, self::_Em3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Em3&Object&Am3<self::_Em3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Em3<Z extends core::Object = dynamic> extends self::_Em3&Object&Am3<self::Em3::Z> {
   synthetic constructor •() → self::Em3<self::Em3::Z>
-    : super core::Object::•()
+    : super self::_Em3&Object&Am3::•()
     ;
 }
 abstract class _Fm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → dynamic, self::_Fm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Fm3&Object&Am3<self::_Fm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Fm3<Z extends core::Object = dynamic> extends self::_Fm3&Object&Am3<self::Fm3::Z> {
   synthetic constructor •() → self::Fm3<self::Fm3::Z>
-    : super core::Object::•()
+    : super self::_Fm3&Object&Am3::•()
     ;
 }
 abstract class _Gm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<({x: core::int}) → dynamic, self::_Gm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Gm3&Object&Am3<self::_Gm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Gm3<Z extends core::Object = dynamic> extends self::_Gm3&Object&Am3<self::Gm3::Z> {
   synthetic constructor •() → self::Gm3<self::Gm3::Z>
-    : super core::Object::•()
+    : super self::_Gm3&Object&Am3::•()
     ;
 }
 abstract class _Hm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<([core::int]) → dynamic, self::_Hm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Hm3&Object&Am3<self::_Hm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Hm3<Z extends core::Object = dynamic> extends self::_Hm3&Object&Am3<self::Hm3::Z> {
   synthetic constructor •() → self::Hm3<self::Hm3::Z>
-    : super core::Object::•()
+    : super self::_Hm3&Object&Am3::•()
     ;
 }
 abstract class _Im3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<([core::int]) → dynamic, self::_Im3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Im3&Object&Am3<self::_Im3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Im3<Z extends core::Object = dynamic> extends self::_Im3&Object&Am3<self::Im3::Z> {
   synthetic constructor •() → self::Im3<self::Im3::Z>
-    : super core::Object::•()
+    : super self::_Im3&Object&Am3::•()
     ;
 }
 abstract class _Jm3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<(core::Function) → dynamic, self::_Jm3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Jm3&Object&Am3<self::_Jm3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Jm3<Z extends core::Object = dynamic> extends self::_Jm3&Object&Am3<self::Jm3::Z> {
   synthetic constructor •() → self::Jm3<self::Jm3::Z>
-    : super core::Object::•()
+    : super self::_Jm3&Object&Am3::•()
     ;
 }
 abstract class _Km3&Object&Am3<Z extends core::Object = dynamic> extends core::Object implements self::Am3<() → (() → core::Function) → dynamic, self::_Km3&Object&Am3::Z> {
-  synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
+  const synthetic constructor •() → self::_Km3&Object&Am3<self::_Km3&Object&Am3::Z>
     : super core::Object::•()
     ;
 }
 class Km3<Z extends core::Object = dynamic> extends self::_Km3&Object&Am3<self::Km3::Z> {
   synthetic constructor •() → self::Km3<self::Km3::Z>
-    : super core::Object::•()
+    : super self::_Km3&Object&Am3::•()
     ;
 }
 class Af1<X extends (core::int) → dynamic = (core::int) → dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/cycles.dart.legacy.expect b/pkg/front_end/testcases/cycles.dart.legacy.expect
index d2e8cdf..4ee0331 100644
--- a/pkg/front_end/testcases/cycles.dart.legacy.expect
+++ b/pkg/front_end/testcases/cycles.dart.legacy.expect
@@ -1,28 +1,28 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself via 'B', 'C'.
+// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself.
 // class A implements C {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself via 'A', 'C'.
+// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself.
 // class B extends A {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself via 'A', 'B'.
+// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself.
 // class C extends B implements D {}
 //       ^
 
 // Unhandled errors:
 //
-// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself via 'B', 'C'.
+// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself.
 // class A implements C {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself via 'A', 'C'.
+// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself.
 // class B extends A {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself via 'A', 'B'.
+// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself.
 // class C extends B implements D {}
 //       ^
 
diff --git a/pkg/front_end/testcases/cycles.dart.legacy.transformed.expect b/pkg/front_end/testcases/cycles.dart.legacy.transformed.expect
index 435c417..08a24b3 100644
--- a/pkg/front_end/testcases/cycles.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/cycles.dart.legacy.transformed.expect
@@ -1,14 +1,14 @@
 // Unhandled errors:
 //
-// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself via 'B', 'C'.
+// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself.
 // class A implements C {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself via 'A', 'C'.
+// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself.
 // class B extends A {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself via 'A', 'B'.
+// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself.
 // class C extends B implements D {}
 //       ^
 
diff --git a/pkg/front_end/testcases/cycles.dart.outline.expect b/pkg/front_end/testcases/cycles.dart.outline.expect
index 3aaceb9..b1b0614 100644
--- a/pkg/front_end/testcases/cycles.dart.outline.expect
+++ b/pkg/front_end/testcases/cycles.dart.outline.expect
@@ -1,14 +1,14 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself via 'B', 'C'.
+// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself.
 // class A implements C {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself via 'A', 'C'.
+// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself.
 // class B extends A {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself via 'A', 'B'.
+// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself.
 // class C extends B implements D {}
 //       ^
 
diff --git a/pkg/front_end/testcases/cycles.dart.strong.expect b/pkg/front_end/testcases/cycles.dart.strong.expect
index d2e8cdf..4ee0331 100644
--- a/pkg/front_end/testcases/cycles.dart.strong.expect
+++ b/pkg/front_end/testcases/cycles.dart.strong.expect
@@ -1,28 +1,28 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself via 'B', 'C'.
+// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself.
 // class A implements C {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself via 'A', 'C'.
+// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself.
 // class B extends A {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself via 'A', 'B'.
+// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself.
 // class C extends B implements D {}
 //       ^
 
 // Unhandled errors:
 //
-// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself via 'B', 'C'.
+// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself.
 // class A implements C {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself via 'A', 'C'.
+// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself.
 // class B extends A {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself via 'A', 'B'.
+// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself.
 // class C extends B implements D {}
 //       ^
 
diff --git a/pkg/front_end/testcases/cycles.dart.strong.transformed.expect b/pkg/front_end/testcases/cycles.dart.strong.transformed.expect
index 435c417..08a24b3 100644
--- a/pkg/front_end/testcases/cycles.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/cycles.dart.strong.transformed.expect
@@ -1,14 +1,14 @@
 // Unhandled errors:
 //
-// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself via 'B', 'C'.
+// pkg/front_end/testcases/cycles.dart:5:7: Error: 'A' is a supertype of itself.
 // class A implements C {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself via 'A', 'C'.
+// pkg/front_end/testcases/cycles.dart:7:7: Error: 'B' is a supertype of itself.
 // class B extends A {}
 //       ^
 //
-// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself via 'A', 'B'.
+// pkg/front_end/testcases/cycles.dart:9:7: Error: 'C' is a supertype of itself.
 // class C extends B implements D {}
 //       ^
 
diff --git a/pkg/front_end/testcases/dartino/compile_time_error_field_becomes_removed_function.incremental.yaml b/pkg/front_end/testcases/dartino/compile_time_error_field_becomes_removed_function.incremental.yaml
index 59d245c..2dd840c 100644
--- a/pkg/front_end/testcases/dartino/compile_time_error_field_becomes_removed_function.incremental.yaml
+++ b/pkg/front_end/testcases/dartino/compile_time_error_field_becomes_removed_function.incremental.yaml
@@ -9,7 +9,7 @@
   <<<< {"messages":[],"hasCompileTimeError":1}
     int sync*;
   ==== []
-    sync();
+    sync() => null;
   ==== []
   >>>>
   }
diff --git a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect
index 6436332..f387607 100644
--- a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect
+++ b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect
@@ -593,7 +593,7 @@
 }
 class Sub extends core::Object {
   constructor •() → self::Sub
-    : final dynamic #t1 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Object, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[null]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t1 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Object, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[null]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   method m() → dynamic
     return super.m();
diff --git a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect
index d522e1e..50cee56 100644
--- a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect
@@ -245,7 +245,7 @@
 }
 class Sub extends core::Object {
   constructor •() → self::Sub
-    : final dynamic #t1 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Object, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[null]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t1 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Object, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[null]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   method m() → dynamic
     return super.m();
diff --git a/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect b/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect
index 2805d79..99a1f04 100644
--- a/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect
+++ b/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect
@@ -559,7 +559,7 @@
     ;
 }
 class C#2 extends core::Object { // from org-dartlang-testcase:///duplicated_declarations_part.dart
-  field dynamic field = null;
+  field core::String field = null;
   constructor •(dynamic a) → self::C#2
     : super core::Object::•()
     ;
@@ -580,7 +580,7 @@
     ;
 }
 class C extends core::Object {
-  field dynamic field = null;
+  field core::String field = null;
   constructor •(dynamic a) → self::C
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.expect b/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.expect
index 2c39c5e..a61a36d 100644
--- a/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.expect
+++ b/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.expect
@@ -23,7 +23,7 @@
 
 class A extends core::Object {
   field core::int a = null;
-  constructor •(core::int a) → self::A
+  constructor •(dynamic a) → self::A
     : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/duplicated_field_initializer.dart:8:10: Error: Can't use 'a' because it is declared more than once.
   A(this.a);
          ^", super core::Object::•()
diff --git a/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.transformed.expect b/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.transformed.expect
index b3fa279..97c35dc 100644
--- a/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/duplicated_field_initializer.dart.legacy.transformed.expect
@@ -10,7 +10,7 @@
 
 class A extends core::Object {
   field core::int a = null;
-  constructor •(core::int a) → self::A
+  constructor •(dynamic a) → self::A
     : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/duplicated_field_initializer.dart:8:10: Error: Can't use 'a' because it is declared more than once.
   A(this.a);
          ^", super core::Object::•()
diff --git a/pkg/front_end/testcases/duplicated_field_initializer.dart.outline.expect b/pkg/front_end/testcases/duplicated_field_initializer.dart.outline.expect
index 0d027ad..230dc5e 100644
--- a/pkg/front_end/testcases/duplicated_field_initializer.dart.outline.expect
+++ b/pkg/front_end/testcases/duplicated_field_initializer.dart.outline.expect
@@ -13,7 +13,7 @@
 
 class A extends core::Object {
   field core::int a;
-  constructor •(core::int a) → self::A
+  constructor •(dynamic a) → self::A
     ;
 }
 static method main() → void
diff --git a/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.expect b/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.expect
index 6ff96e9..2baebe3 100644
--- a/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.expect
@@ -1,13 +1,3 @@
-// Formatted problems:
-//
-// pkg/front_end/testcases/duplicated_named_args_3.dart:13:13: Error: Duplicated named argument 'a'.
-//   C.m(a: 1, a: 2, a: 3);
-//             ^
-//
-// pkg/front_end/testcases/duplicated_named_args_3.dart:13:19: Error: Duplicated named argument 'a'.
-//   C.m(a: 1, a: 2, a: 3);
-//                   ^
-
 library test;
 import self as self;
 import "dart:core" as core;
@@ -19,8 +9,6 @@
   static method m({core::int a = 0}) → dynamic {}
 }
 static method test() → void {
-  self::C::m(a: invalid-expression "pkg/front_end/testcases/duplicated_named_args_3.dart:13:19: Error: Duplicated named argument 'a'.
-  C.m(a: 1, a: 2, a: 3);
-                  ^");
+  self::C::m(a: 1, a: 2, a: 3);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.transformed.expect
index e65bd84..2baebe3 100644
--- a/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/duplicated_named_args_3.dart.legacy.transformed.expect
@@ -9,8 +9,6 @@
   static method m({core::int a = 0}) → dynamic {}
 }
 static method test() → void {
-  self::C::m(a: invalid-expression "pkg/front_end/testcases/duplicated_named_args_3.dart:13:19: Error: Duplicated named argument 'a'.
-  C.m(a: 1, a: 2, a: 3);
-                  ^");
+  self::C::m(a: 1, a: 2, a: 3);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/expressions.dart.legacy.expect b/pkg/front_end/testcases/expressions.dart.legacy.expect
index d171a65..158f1ec 100644
--- a/pkg/front_end/testcases/expressions.dart.legacy.expect
+++ b/pkg/front_end/testcases/expressions.dart.legacy.expect
@@ -75,7 +75,7 @@
   core::print(core::int);
   core::print(let final dynamic #t5 = core::int in let final dynamic #t6 = #t5.toString() in #t5);
   try {
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#int.toString, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#int.toString, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     throw "Shouldn't work";
   }
   on core::NoSuchMethodError catch(final core::NoSuchMethodError e) {
diff --git a/pkg/front_end/testcases/expressions.dart.legacy.transformed.expect b/pkg/front_end/testcases/expressions.dart.legacy.transformed.expect
index 50a474a..04022a3 100644
--- a/pkg/front_end/testcases/expressions.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/expressions.dart.legacy.transformed.expect
@@ -69,7 +69,7 @@
   core::print(core::int);
   core::print(let final dynamic #t5 = core::int in let final dynamic #t6 = #t5.toString() in #t5);
   try {
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#int.toString, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#int.toString, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     throw "Shouldn't work";
   }
   on core::NoSuchMethodError catch(final core::NoSuchMethodError e) {
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart b/pkg/front_end/testcases/for_in_without_declaration.dart
new file mode 100644
index 0000000..2e0951b
--- /dev/null
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart
@@ -0,0 +1,48 @@
+// 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.
+
+bool topLevelField;
+var untypedTopLevelField;
+
+class Super {
+  int superInstanceField;
+  var untypedSuperInstanceField;
+}
+
+class C extends Super {
+  int instanceField;
+  var untypedInstanceField;
+
+  static double staticField;
+
+  static var untypedStaticField;
+
+  m() {
+    String local;
+    var untypedLocal;
+    for (local in []) {}
+    for (untypedLocal in []) {}
+    for (instanceField in []) {}
+    for (untypedInstanceField in []) {}
+    for (staticField in []) {}
+    for (untypedStaticField in []) {}
+    for (topLevelField in []) {}
+    for (untypedTopLevelField in []) {}
+    for (super.superInstanceField in []) {}
+    for (super.untypedSuperInstanceField in []) {}
+    C c = new C();
+    for (c.instanceField in []) {}
+    for (c.untypedSuperInstanceField in []) {}
+    for (unresolved in []) {}
+    for (unresolved.foo in []) {}
+    for (c.unresolved in []) {}
+    for (main() in []) {}
+    for (var x, y in <int>[]) {
+      print(x);
+      print(y);
+    }
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
new file mode 100644
index 0000000..2aab6ce
--- /dev/null
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
@@ -0,0 +1,184 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:32:10: Error: Expected an identifier, but got 'super'.
+//     for (super.superInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:33:10: Error: Expected an identifier, but got 'super'.
+//     for (super.untypedSuperInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:35:11: Error: Unexpected token '.'.
+//     for (c.instanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:36:11: Error: Unexpected token '.'.
+//     for (c.untypedSuperInstanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:37:10: Warning: Setter not found: 'unresolved'.
+//     for (unresolved in []) {}
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:10: Warning: Getter not found: 'unresolved'.
+//     for (unresolved.foo in []) {}
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:20: Error: Unexpected token '.'.
+//     for (unresolved.foo in []) {}
+//                    ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:39:11: Error: Unexpected token '.'.
+//     for (c.unresolved in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:40:14: Error: Unexpected token '('.
+//     for (main() in []) {}
+//              ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+//     for (main() in []) {}
+//          ^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:41:15: Error: Unexpected token ','.
+//     for (var x, y in <int>[]) {
+//               ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+//     for (var x, y in <int>[]) {
+//          ^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:32:10: Error: Expected an identifier, but got 'super'.
+//     for (super.superInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:33:10: Error: Expected an identifier, but got 'super'.
+//     for (super.untypedSuperInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:35:11: Error: Unexpected token '.'.
+//     for (c.instanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:36:11: Error: Unexpected token '.'.
+//     for (c.untypedSuperInstanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:20: Error: Unexpected token '.'.
+//     for (unresolved.foo in []) {}
+//                    ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:39:11: Error: Unexpected token '.'.
+//     for (c.unresolved in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:40:14: Error: Unexpected token '('.
+//     for (main() in []) {}
+//              ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:41:15: Error: Unexpected token ','.
+//     for (var x, y in <int>[]) {
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Super extends core::Object {
+  field core::int superInstanceField = null;
+  field dynamic untypedSuperInstanceField = null;
+  synthetic constructor •() → self::Super
+    : super core::Object::•()
+    ;
+}
+class C extends self::Super {
+  field core::int instanceField = null;
+  field dynamic untypedInstanceField = null;
+  static field core::double staticField = null;
+  static field dynamic untypedStaticField = null;
+  synthetic constructor •() → self::C
+    : super self::Super::•()
+    ;
+  method m() → dynamic {
+    core::String local;
+    dynamic untypedLocal;
+    for (final dynamic #t1 in <dynamic>[]) {
+      local = #t1;
+    }
+    for (final dynamic #t2 in <dynamic>[]) {
+      untypedLocal = #t2;
+    }
+    for (final dynamic #t3 in <dynamic>[]) {
+      this.{self::C::instanceField} = #t3;
+    }
+    for (final dynamic #t4 in <dynamic>[]) {
+      this.{self::C::untypedInstanceField} = #t4;
+    }
+    for (final dynamic #t5 in <dynamic>[]) {
+      self::C::staticField = #t5;
+    }
+    for (final dynamic #t6 in <dynamic>[]) {
+      self::C::untypedStaticField = #t6;
+    }
+    for (final dynamic #t7 in <dynamic>[]) {
+      self::topLevelField = #t7;
+    }
+    for (final dynamic #t8 in <dynamic>[]) {
+      self::untypedTopLevelField = #t8;
+    }
+    for (final dynamic #t9 in <dynamic>[]) {
+      super.{self::Super::superInstanceField} = #t9;
+    }
+    for (final dynamic #t10 in <dynamic>[]) {
+      super.{self::Super::untypedSuperInstanceField} = #t10;
+    }
+    self::C c = new self::C::•();
+    for (final dynamic #t11 in <dynamic>[]) {
+      c.instanceField = #t11;
+    }
+    for (final dynamic #t12 in <dynamic>[]) {
+      c.untypedSuperInstanceField = #t12;
+    }
+    for (final dynamic #t13 in <dynamic>[]) {
+      this.unresolved = #t13;
+    }
+    for (final dynamic #t14 in <dynamic>[]) {
+      this.unresolved.foo = #t14;
+    }
+    for (final dynamic #t15 in <dynamic>[]) {
+      c.unresolved = #t15;
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (main() in []) {}
+         ^^^^";
+      for (final dynamic #t16 in <dynamic>[]) {
+        invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (main() in []) {}
+         ^^^^";
+        self::main();
+      }
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+    for (var x, y in <int>[]) {
+         ^^^";
+      for (final dynamic #t17 in <core::int>[]) {
+        invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+    for (var x, y in <int>[]) {
+         ^^^";
+        dynamic x;
+        dynamic y;
+        {
+          core::print(x);
+          core::print(y);
+        }
+      }
+    }
+  }
+}
+static field core::bool topLevelField;
+static field dynamic untypedTopLevelField;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
new file mode 100644
index 0000000..88f2996
--- /dev/null
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
@@ -0,0 +1,134 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:32:10: Error: Expected an identifier, but got 'super'.
+//     for (super.superInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:33:10: Error: Expected an identifier, but got 'super'.
+//     for (super.untypedSuperInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:35:11: Error: Unexpected token '.'.
+//     for (c.instanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:36:11: Error: Unexpected token '.'.
+//     for (c.untypedSuperInstanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:20: Error: Unexpected token '.'.
+//     for (unresolved.foo in []) {}
+//                    ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:39:11: Error: Unexpected token '.'.
+//     for (c.unresolved in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:40:14: Error: Unexpected token '('.
+//     for (main() in []) {}
+//              ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:41:15: Error: Unexpected token ','.
+//     for (var x, y in <int>[]) {
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Super extends core::Object {
+  field core::int superInstanceField = null;
+  field dynamic untypedSuperInstanceField = null;
+  synthetic constructor •() → self::Super
+    : super core::Object::•()
+    ;
+}
+class C extends self::Super {
+  field core::int instanceField = null;
+  field dynamic untypedInstanceField = null;
+  static field core::double staticField = null;
+  static field dynamic untypedStaticField = null;
+  synthetic constructor •() → self::C
+    : super self::Super::•()
+    ;
+  method m() → dynamic {
+    core::String local;
+    dynamic untypedLocal;
+    for (final dynamic #t1 in <dynamic>[]) {
+      local = #t1;
+    }
+    for (final dynamic #t2 in <dynamic>[]) {
+      untypedLocal = #t2;
+    }
+    for (final dynamic #t3 in <dynamic>[]) {
+      this.{self::C::instanceField} = #t3;
+    }
+    for (final dynamic #t4 in <dynamic>[]) {
+      this.{self::C::untypedInstanceField} = #t4;
+    }
+    for (final dynamic #t5 in <dynamic>[]) {
+      self::C::staticField = #t5;
+    }
+    for (final dynamic #t6 in <dynamic>[]) {
+      self::C::untypedStaticField = #t6;
+    }
+    for (final dynamic #t7 in <dynamic>[]) {
+      self::topLevelField = #t7;
+    }
+    for (final dynamic #t8 in <dynamic>[]) {
+      self::untypedTopLevelField = #t8;
+    }
+    for (final dynamic #t9 in <dynamic>[]) {
+      super.{self::Super::superInstanceField} = #t9;
+    }
+    for (final dynamic #t10 in <dynamic>[]) {
+      super.{self::Super::untypedSuperInstanceField} = #t10;
+    }
+    self::C c = new self::C::•();
+    for (final dynamic #t11 in <dynamic>[]) {
+      c.instanceField = #t11;
+    }
+    for (final dynamic #t12 in <dynamic>[]) {
+      c.untypedSuperInstanceField = #t12;
+    }
+    for (final dynamic #t13 in <dynamic>[]) {
+      this.unresolved = #t13;
+    }
+    for (final dynamic #t14 in <dynamic>[]) {
+      this.unresolved.foo = #t14;
+    }
+    for (final dynamic #t15 in <dynamic>[]) {
+      c.unresolved = #t15;
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (main() in []) {}
+         ^^^^";
+      for (final dynamic #t16 in <dynamic>[]) {
+        invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (main() in []) {}
+         ^^^^";
+        self::main();
+      }
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+    for (var x, y in <int>[]) {
+         ^^^";
+      for (final dynamic #t17 in <core::int>[]) {
+        invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+    for (var x, y in <int>[]) {
+         ^^^";
+        dynamic x;
+        dynamic y;
+        {
+          core::print(x);
+          core::print(y);
+        }
+      }
+    }
+  }
+}
+static field core::bool topLevelField;
+static field dynamic untypedTopLevelField;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.outline.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.outline.expect
new file mode 100644
index 0000000..c168ef6
--- /dev/null
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.outline.expect
@@ -0,0 +1,24 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Super extends core::Object {
+  field core::int superInstanceField;
+  field dynamic untypedSuperInstanceField;
+  synthetic constructor •() → self::Super
+    ;
+}
+class C extends self::Super {
+  field core::int instanceField;
+  field dynamic untypedInstanceField;
+  static field core::double staticField;
+  static field dynamic untypedStaticField;
+  synthetic constructor •() → self::C
+    ;
+  method m() → dynamic
+    ;
+}
+static field core::bool topLevelField;
+static field dynamic untypedTopLevelField;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
new file mode 100644
index 0000000..e672743
--- /dev/null
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
@@ -0,0 +1,222 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:32:10: Error: Expected an identifier, but got 'super'.
+//     for (super.superInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:33:10: Error: Expected an identifier, but got 'super'.
+//     for (super.untypedSuperInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:35:11: Error: Unexpected token '.'.
+//     for (c.instanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:36:11: Error: Unexpected token '.'.
+//     for (c.untypedSuperInstanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:37:10: Error: Setter not found: 'unresolved'.
+//     for (unresolved in []) {}
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:10: Error: Getter not found: 'unresolved'.
+//     for (unresolved.foo in []) {}
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:20: Error: Unexpected token '.'.
+//     for (unresolved.foo in []) {}
+//                    ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:39:11: Error: Unexpected token '.'.
+//     for (c.unresolved in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:40:14: Error: Unexpected token '('.
+//     for (main() in []) {}
+//              ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+//     for (main() in []) {}
+//          ^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:41:15: Error: Unexpected token ','.
+//     for (var x, y in <int>[]) {
+//               ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+//     for (var x, y in <int>[]) {
+//          ^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:37:10: Error: The setter 'unresolved' isn't defined for the class 'C'.
+//  - 'C' is from 'pkg/front_end/testcases/for_in_without_declaration.dart'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'unresolved'.
+//     for (unresolved in []) {}
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:21: Error: The setter 'foo' isn't defined for the class 'C'.
+//  - 'C' is from 'pkg/front_end/testcases/for_in_without_declaration.dart'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'foo'.
+//     for (unresolved.foo in []) {}
+//                     ^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:39:12: Error: The setter 'unresolved' isn't defined for the class 'C'.
+//  - 'C' is from 'pkg/front_end/testcases/for_in_without_declaration.dart'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'unresolved'.
+//     for (c.unresolved in []) {}
+//            ^^^^^^^^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:32:10: Error: Expected an identifier, but got 'super'.
+//     for (super.superInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:33:10: Error: Expected an identifier, but got 'super'.
+//     for (super.untypedSuperInstanceField in []) {}
+//          ^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:35:11: Error: Unexpected token '.'.
+//     for (c.instanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:36:11: Error: Unexpected token '.'.
+//     for (c.untypedSuperInstanceField in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:37:10: Error: Setter not found: 'unresolved'.
+//     for (unresolved in []) {}
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:10: Error: Getter not found: 'unresolved'.
+//     for (unresolved.foo in []) {}
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:38:20: Error: Unexpected token '.'.
+//     for (unresolved.foo in []) {}
+//                    ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:39:11: Error: Unexpected token '.'.
+//     for (c.unresolved in []) {}
+//           ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:40:14: Error: Unexpected token '('.
+//     for (main() in []) {}
+//              ^
+//
+// pkg/front_end/testcases/for_in_without_declaration.dart:41:15: Error: Unexpected token ','.
+//     for (var x, y in <int>[]) {
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class Super extends core::Object {
+  field core::int superInstanceField = null;
+  field dynamic untypedSuperInstanceField = null;
+  synthetic constructor •() → self::Super
+    : super core::Object::•()
+    ;
+}
+class C extends self::Super {
+  field core::int instanceField = null;
+  field dynamic untypedInstanceField = null;
+  static field core::double staticField = null;
+  static field dynamic untypedStaticField = null;
+  synthetic constructor •() → self::C
+    : super self::Super::•()
+    ;
+  method m() → dynamic {
+    core::String local;
+    dynamic untypedLocal;
+    for (final core::String #t1 in <core::String>[]) {
+      local = #t1;
+    }
+    for (final dynamic #t2 in <dynamic>[]) {
+      untypedLocal = #t2;
+    }
+    for (final core::int #t3 in <core::int>[]) {
+      this.{self::C::instanceField} = #t3;
+    }
+    for (final dynamic #t4 in <dynamic>[]) {
+      this.{self::C::untypedInstanceField} = #t4;
+    }
+    for (final core::double #t5 in <core::double>[]) {
+      self::C::staticField = #t5;
+    }
+    for (final dynamic #t6 in <dynamic>[]) {
+      self::C::untypedStaticField = #t6;
+    }
+    for (final core::bool #t7 in <core::bool>[]) {
+      self::topLevelField = #t7;
+    }
+    for (final dynamic #t8 in <dynamic>[]) {
+      self::untypedTopLevelField = #t8;
+    }
+    for (final core::int #t9 in <core::int>[]) {
+      super.{self::Super::superInstanceField} = #t9;
+    }
+    for (final dynamic #t10 in <dynamic>[]) {
+      super.{self::Super::untypedSuperInstanceField} = #t10;
+    }
+    self::C c = new self::C::•();
+    for (final core::int #t11 in <core::int>[]) {
+      c.{self::C::instanceField} = #t11;
+    }
+    for (final dynamic #t12 in <dynamic>[]) {
+      c.{self::Super::untypedSuperInstanceField} = #t12;
+    }
+    for (final dynamic #t13 in <dynamic>[]) {
+      let final dynamic #t14 = this in invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:37:10: Error: The setter 'unresolved' isn't defined for the class 'C'.
+ - 'C' is from 'pkg/front_end/testcases/for_in_without_declaration.dart'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'unresolved'.
+    for (unresolved in []) {}
+         ^^^^^^^^^^";
+    }
+    for (final dynamic #t15 in <dynamic>[]) {
+      let final dynamic #t16 = this.unresolved in invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:38:21: Error: The setter 'foo' isn't defined for the class 'C'.
+ - 'C' is from 'pkg/front_end/testcases/for_in_without_declaration.dart'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'foo'.
+    for (unresolved.foo in []) {}
+                    ^^^";
+    }
+    for (final dynamic #t17 in <dynamic>[]) {
+      let final dynamic #t18 = c in invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:39:12: Error: The setter 'unresolved' isn't defined for the class 'C'.
+ - 'C' is from 'pkg/front_end/testcases/for_in_without_declaration.dart'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'unresolved'.
+    for (c.unresolved in []) {}
+           ^^^^^^^^^^";
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (main() in []) {}
+         ^^^^";
+      for (final dynamic #t19 in <dynamic>[]) {
+        invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:40:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (main() in []) {}
+         ^^^^";
+        self::main();
+      }
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+    for (var x, y in <int>[]) {
+         ^^^";
+      for (final core::int #t20 in <core::int>[]) {
+        invalid-expression "pkg/front_end/testcases/for_in_without_declaration.dart:41:10: Error: A for-in loop can't have more than one loop variable.
+    for (var x, y in <int>[]) {
+         ^^^";
+        dynamic x;
+        dynamic y;
+        {
+          core::print(x);
+          core::print(y);
+        }
+      }
+    }
+  }
+}
+static field core::bool topLevelField;
+static field dynamic untypedTopLevelField;
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/future_or_test.dart.legacy.transformed.expect b/pkg/front_end/testcases/future_or_test.dart.legacy.transformed.expect
index 1461a82..e7939ce 100644
--- a/pkg/front_end/testcases/future_or_test.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/future_or_test.dart.legacy.transformed.expect
@@ -16,7 +16,7 @@
     : super core::Object::•()
     ;
   method bar() → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -39,7 +39,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
@@ -49,7 +49,7 @@
     : super core::Object::•()
     ;
   method baz() → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -72,7 +72,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
diff --git a/pkg/front_end/testcases/future_or_test.dart.strong.transformed.expect b/pkg/front_end/testcases/future_or_test.dart.strong.transformed.expect
index 5ee7d6b..91c8f82 100644
--- a/pkg/front_end/testcases/future_or_test.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/future_or_test.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
     : super core::Object::•()
     ;
   method bar() → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -39,7 +39,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
@@ -49,7 +49,7 @@
     : super core::Object::•()
     ;
   method baz() → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -72,7 +72,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
diff --git a/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.expect b/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.expect
index 1364b6c..79cb600 100644
--- a/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.expect
+++ b/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.expect
@@ -23,7 +23,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  dynamic x = let final <T extends core::Object = dynamic>(T) → void f = <T extends core::Object = dynamic>(T t) → dynamic {} in f;
+  dynamic x = let final <T extends core::Object = dynamic>(T) → void f = <T extends core::Object = dynamic>(T t) → void {} in f;
   core::print(x.runtimeType);
-  core::print(let final <T extends core::Object = dynamic>(T) → void g = <T extends core::Object = dynamic>(T t) → dynamic {} in g);
+  core::print(let final <T extends core::Object = dynamic>(T) → void g = <T extends core::Object = dynamic>(T t) → void {} in g);
 }
diff --git a/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.transformed.expect b/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.transformed.expect
index 72e3e66..9627a6e8 100644
--- a/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/illegal_named_function_expression.dart.legacy.transformed.expect
@@ -13,7 +13,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  dynamic x = let final <T extends core::Object = dynamic>(T) → void f = <T extends core::Object = dynamic>(T t) → dynamic {} in f;
+  dynamic x = let final <T extends core::Object = dynamic>(T) → void f = <T extends core::Object = dynamic>(T t) → void {} in f;
   core::print(x.runtimeType);
-  core::print(let final <T extends core::Object = dynamic>(T) → void g = <T extends core::Object = dynamic>(T t) → dynamic {} in g);
+  core::print(let final <T extends core::Object = dynamic>(T) → void g = <T extends core::Object = dynamic>(T t) → void {} in g);
 }
diff --git a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.expect b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.expect
index 246c806..a8247f6 100644
--- a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.expect
+++ b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.expect
@@ -16,5 +16,5 @@
 
 static method main() → dynamic {
   function f() → void {}
-  core::print(let final () → void f = () → dynamic {} in f);
+  core::print(let final () → void f = () → void {} in f);
 }
diff --git a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.transformed.expect b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.transformed.expect
index 1cf55b6..9df8705 100644
--- a/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/illegal_named_function_expression_scope.dart.legacy.transformed.expect
@@ -10,5 +10,5 @@
 
 static method main() → dynamic {
   function f() → void {}
-  core::print(let final () → void f = () → dynamic {} in f);
+  core::print(let final () → void f = () → void {} in f);
 }
diff --git a/pkg/front_end/testcases/implicit_new.dart.legacy.expect b/pkg/front_end/testcases/implicit_new.dart.legacy.expect
index a61a281..d2fd4b41 100644
--- a/pkg/front_end/testcases/implicit_new.dart.legacy.expect
+++ b/pkg/front_end/testcases/implicit_new.dart.legacy.expect
@@ -35,8 +35,8 @@
   operator []=(dynamic _a, dynamic _b) → void {}
 }
 static method testNSM() → dynamic {
-  dynamic y = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  dynamic y = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 static method f(dynamic x) → dynamic
   return x;
diff --git a/pkg/front_end/testcases/implicit_new.dart.legacy.transformed.expect b/pkg/front_end/testcases/implicit_new.dart.legacy.transformed.expect
index 3c0f68f..5a42d71 100644
--- a/pkg/front_end/testcases/implicit_new.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/implicit_new.dart.legacy.transformed.expect
@@ -25,8 +25,8 @@
   operator []=(dynamic _a, dynamic _b) → void {}
 }
 static method testNSM() → dynamic {
-  dynamic y = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  dynamic y = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bar, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 static method f(dynamic x) → dynamic
   return x;
diff --git a/pkg/front_end/testcases/incremental_bulk_compiler_smoke.status b/pkg/front_end/testcases/incremental_bulk_compiler_smoke.status
index 4240855..959cc51 100644
--- a/pkg/front_end/testcases/incremental_bulk_compiler_smoke.status
+++ b/pkg/front_end/testcases/incremental_bulk_compiler_smoke.status
@@ -1,9 +1,8 @@
 # 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.
+
 language_2/deferred_super_dependency_test: Crash # missing "#errors"
 language_2/missing_part_of_tag_test: Crash # missing empty library that shouldn't have been there in the first place
-language_2/regress_27957_test: Crash # isSynthetic becomes false on C1 SuperInitializer.
 language_2/script1_negative_test: Crash # missing "#errors", missing empty library that shouldn't have been there in the first place
 language_2/script2_negative_test: Crash # missing "#errors", missing empty library that shouldn't have been there in the first place
-
diff --git a/pkg/front_end/testcases/inference/async_await.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/async_await.dart.legacy.transformed.expect
index 7e5db5d..939d401 100644
--- a/pkg/front_end/testcases/inference/async_await.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_await.dart.legacy.transformed.expect
@@ -9,7 +9,7 @@
     ;
 }
 static method test() → void /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -32,7 +32,7 @@
         asy::FutureOr<self::MyFuture> x8;
         self::MyFuture x9;
         function test0() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -55,11 +55,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test1() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -82,11 +82,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test2() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -109,11 +109,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test3() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -136,11 +136,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test4() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -163,11 +163,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test5() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -190,11 +190,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test6() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -217,11 +217,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test7() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -244,11 +244,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test8() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -271,11 +271,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test9() → dynamic /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -298,7 +298,7 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         [yield] let dynamic #t1 = asy::_awaitHelper(x0, :async_op_then, :async_op_error, :async_op) in null;
@@ -331,7 +331,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/async_await.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/async_await.dart.strong.transformed.expect
index beac918..a6dc499 100644
--- a/pkg/front_end/testcases/inference/async_await.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_await.dart.strong.transformed.expect
@@ -9,7 +9,7 @@
     ;
 }
 static method test() → void /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -32,7 +32,7 @@
         asy::FutureOr<self::MyFuture> x8;
         self::MyFuture x9;
         function test0() → asy::Future<core::int> /* originally async */ {
-          final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+          final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
           asy::FutureOr<core::int> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -55,11 +55,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test1() → asy::Future<core::int> /* originally async */ {
-          final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+          final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
           asy::FutureOr<core::int> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -82,11 +82,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test2() → asy::Future<asy::Future<core::int>> /* originally async */ {
-          final asy::Completer<asy::Future<core::int>> :async_completer = asy::Completer::sync<asy::Future<core::int>>();
+          final asy::_AsyncAwaitCompleter<asy::Future<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<asy::Future<core::int>>();
           asy::FutureOr<asy::Future<core::int>> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -109,11 +109,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test3() → asy::Future<asy::FutureOr<core::int>> /* originally async */ {
-          final asy::Completer<asy::FutureOr<core::int>> :async_completer = asy::Completer::sync<asy::FutureOr<core::int>>();
+          final asy::_AsyncAwaitCompleter<asy::FutureOr<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<asy::FutureOr<core::int>>();
           asy::FutureOr<asy::FutureOr<core::int>> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -136,11 +136,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test4() → asy::Future<self::MyFuture> /* originally async */ {
-          final asy::Completer<self::MyFuture> :async_completer = asy::Completer::sync<self::MyFuture>();
+          final asy::_AsyncAwaitCompleter<self::MyFuture> :async_completer = new asy::_AsyncAwaitCompleter::•<self::MyFuture>();
           asy::FutureOr<self::MyFuture> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -163,11 +163,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test5() → asy::Future<core::int> /* originally async */ {
-          final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+          final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
           asy::FutureOr<core::int> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -190,11 +190,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test6() → asy::Future<asy::Future<core::int>> /* originally async */ {
-          final asy::Completer<asy::Future<core::int>> :async_completer = asy::Completer::sync<asy::Future<core::int>>();
+          final asy::_AsyncAwaitCompleter<asy::Future<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<asy::Future<core::int>>();
           asy::FutureOr<asy::Future<core::int>> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -217,11 +217,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test7() → asy::Future<asy::FutureOr<core::int>> /* originally async */ {
-          final asy::Completer<asy::FutureOr<core::int>> :async_completer = asy::Completer::sync<asy::FutureOr<core::int>>();
+          final asy::_AsyncAwaitCompleter<asy::FutureOr<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<asy::FutureOr<core::int>>();
           asy::FutureOr<asy::FutureOr<core::int>> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -244,11 +244,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test8() → asy::Future<self::MyFuture> /* originally async */ {
-          final asy::Completer<self::MyFuture> :async_completer = asy::Completer::sync<self::MyFuture>();
+          final asy::_AsyncAwaitCompleter<self::MyFuture> :async_completer = new asy::_AsyncAwaitCompleter::•<self::MyFuture>();
           asy::FutureOr<self::MyFuture> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -271,11 +271,11 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         function test9() → asy::Future<core::int> /* originally async */ {
-          final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+          final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
           asy::FutureOr<core::int> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -298,7 +298,7 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         }
         [yield] let dynamic #t1 = asy::_awaitHelper(x0, :async_op_then, :async_op_error, :async_op) in null;
@@ -331,7 +331,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.legacy.transformed.expect
index 0f3c9ac..32f482b 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
 static field asy::Future<core::int> futureInt = null;
 static field dynamic f = () → dynamic => self::futureInt;
 static field dynamic g = () → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -29,7 +29,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 };
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.strong.transformed.expect
index 1959108..f94e9db 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 static field asy::Future<core::int> futureInt = null;
 static field () → asy::Future<core::int> f = () → asy::Future<core::int> => self::futureInt;
 static field () → asy::Future<core::int> g = () → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -29,7 +29,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 };
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.legacy.transformed.expect
index a45113d..3f444b6 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:async" as asy;
 
 static field dynamic f = () → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -26,7 +26,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 };
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.strong.transformed.expect
index 2c350bc..fb23adf 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static field () → asy::Future<core::int> f = () → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -27,7 +27,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 };
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.legacy.transformed.expect
index 1c04583..694b2f2 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
 static field asy::FutureOr<core::int> futureOrInt = null;
 static field dynamic f = () → dynamic => self::futureOrInt;
 static field dynamic g = () → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -29,7 +29,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 };
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.strong.transformed.expect
index 5cc8ee5..b6536b0 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 static field asy::FutureOr<core::int> futureOrInt = null;
 static field () → asy::FutureOr<core::int> f = () → asy::FutureOr<core::int> => self::futureOrInt;
 static field () → asy::Future<core::int> g = () → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -29,7 +29,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 };
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.legacy.transformed.expect
index eeada89..298fc06 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
 
 static method test() → dynamic {
   dynamic f = () → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -35,7 +35,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   };
   asy::Future<core::num> g = f.call();
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect
index 1325622..28def78 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_futures.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 
 static method test() → dynamic {
   () → asy::Future<core::num> f = () → asy::Future<core::num> /* originally async */ {
-    final asy::Completer<core::num> :async_completer = asy::Completer::sync<core::num>();
+    final asy::_AsyncAwaitCompleter<core::num> :async_completer = new asy::_AsyncAwaitCompleter::•<core::num>();
     asy::FutureOr<core::num> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -35,7 +35,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   };
   asy::Future<core::num> g = f.call();
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.legacy.transformed.expect
index e651a4a..860e645 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
 
 static method test() → dynamic {
   dynamic f = () → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -35,7 +35,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   };
   asy::Future<core::num> g = f.call();
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect
index 4d101fa..3a4d495 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_all_returns_are_values.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 
 static method test() → dynamic {
   () → asy::Future<core::num> f = () → asy::Future<core::num> /* originally async */ {
-    final asy::Completer<core::num> :async_completer = asy::Completer::sync<core::num>();
+    final asy::_AsyncAwaitCompleter<core::num> :async_completer = new asy::_AsyncAwaitCompleter::•<core::num>();
     asy::FutureOr<core::num> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -35,7 +35,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   };
   asy::Future<core::num> g = f.call();
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.legacy.transformed.expect
index d306ab4..128abb0 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
 
 static method test() → dynamic {
   dynamic f = () → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -35,7 +35,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   };
   asy::Future<core::num> g = f.call();
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect
index be516f9..85a11ea 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_async_mix_of_values_and_futures.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 
 static method test() → dynamic {
   () → asy::Future<core::num> f = () → asy::Future<core::num> /* originally async */ {
-    final asy::Completer<core::num> :async_completer = asy::Completer::sync<core::num>();
+    final asy::_AsyncAwaitCompleter<core::num> :async_completer = new asy::_AsyncAwaitCompleter::•<core::num>();
     asy::FutureOr<core::num> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -35,7 +35,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   };
   asy::Future<core::num> g = f.call();
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.legacy.transformed.expect
index 7eafe2e..3ebd45f 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -17,7 +17,7 @@
       #L1:
       {
         dynamic f = () → asy::Future<dynamic> /* originally async */ {
-          final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+          final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
           asy::FutureOr<dynamic> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -40,7 +40,7 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         };
         asy::Future<dynamic> y = f.call();
@@ -57,6 +57,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.strong.transformed.expect
index 510f5e8..aab7652 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -17,7 +17,7 @@
       #L1:
       {
         () → asy::Future<core::Null> f = () → asy::Future<core::Null> /* originally async */ {
-          final asy::Completer<core::Null> :async_completer = asy::Completer::sync<core::Null>();
+          final asy::_AsyncAwaitCompleter<core::Null> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Null>();
           asy::FutureOr<core::Null> :return_value;
           dynamic :async_stack_trace;
           dynamic :async_op_then;
@@ -40,7 +40,7 @@
           :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
           :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
           :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-          asy::Future::microtask<dynamic>(:async_op);
+          :async_completer.start(:async_op);
           return :async_completer.{asy::Completer::future};
         };
         asy::Future<dynamic> y = f.call();
@@ -57,6 +57,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.legacy.transformed.expect
index 74093d5..35c6546 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -65,6 +65,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.strong.transformed.expect
index 3b73b9c..bb70985 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -65,6 +65,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/bug30620.dart.legacy.expect b/pkg/front_end/testcases/inference/bug30620.dart.legacy.expect
index acfcfa6..d7c749f 100644
--- a/pkg/front_end/testcases/inference/bug30620.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/bug30620.dart.legacy.expect
@@ -8,7 +8,7 @@
     : self::A::foo = foo, super core::Object::•()
     ;
   operator ==(core::Object other) → core::bool
-    return other is self::A && other{self::A}.foo.==(this.{self::A::foo});
+    return other is self::A && other.foo.==(this.{self::A::foo});
 }
 static method main() → dynamic {
   core::print(new self::A::•("hello").==(new self::A::•("hello")));
diff --git a/pkg/front_end/testcases/inference/bug30620.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/bug30620.dart.legacy.transformed.expect
index acfcfa6..d7c749f 100644
--- a/pkg/front_end/testcases/inference/bug30620.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/bug30620.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
     : self::A::foo = foo, super core::Object::•()
     ;
   operator ==(core::Object other) → core::bool
-    return other is self::A && other{self::A}.foo.==(this.{self::A::foo});
+    return other is self::A && other.foo.==(this.{self::A::foo});
 }
 static method main() → dynamic {
   core::print(new self::A::•("hello").==(new self::A::•("hello")));
diff --git a/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.expect b/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.expect
index 738dc94..db3e6ea 100644
--- a/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.expect
@@ -8,7 +8,7 @@
     : self::A::foo = foo, super core::Object::•()
     ;
   operator ==(core::Object other) → core::bool
-    return other is self::A && other{self::A}.foo.==(this.{self::A::foo}) && other{self::A}.foo.==(this.{self::A::foo});
+    return other is self::A && other.foo.==(this.{self::A::foo}) && other.foo.==(this.{self::A::foo});
 }
 static method main() → dynamic {
   core::print(new self::A::•("hello").==(new self::A::•("hello")));
diff --git a/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.transformed.expect
index 738dc94..db3e6ea 100644
--- a/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/bug30620_b.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
     : self::A::foo = foo, super core::Object::•()
     ;
   operator ==(core::Object other) → core::bool
-    return other is self::A && other{self::A}.foo.==(this.{self::A::foo}) && other{self::A}.foo.==(this.{self::A::foo});
+    return other is self::A && other.foo.==(this.{self::A::foo}) && other.foo.==(this.{self::A::foo});
 }
 static method main() → dynamic {
   core::print(new self::A::•("hello").==(new self::A::•("hello")));
diff --git a/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.expect b/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.expect
index ca08463..6ddfcf5 100644
--- a/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.expect
@@ -8,8 +8,8 @@
     : self::A::foo = foo, super core::Object::•()
     ;
   operator ==(core::Object other) → core::bool {
-    if(other is self::A && other{self::A}.foo.==(this.{self::A::foo})) {
-      if(other{self::A}.foo.==(this.{self::A::foo})) {
+    if(other is self::A && other.foo.==(this.{self::A::foo})) {
+      if(other.foo.==(this.{self::A::foo})) {
       }
     }
     return true;
diff --git a/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.transformed.expect
index ca08463..6ddfcf5 100644
--- a/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/bug30620_c.dart.legacy.transformed.expect
@@ -8,8 +8,8 @@
     : self::A::foo = foo, super core::Object::•()
     ;
   operator ==(core::Object other) → core::bool {
-    if(other is self::A && other{self::A}.foo.==(this.{self::A::foo})) {
-      if(other{self::A}.foo.==(this.{self::A::foo})) {
+    if(other is self::A && other.foo.==(this.{self::A::foo})) {
+      if(other.foo.==(this.{self::A::foo})) {
       }
     }
     return true;
diff --git a/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.expect b/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.expect
index 1149d5f..c5cd413 100644
--- a/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.expect
@@ -3,5 +3,5 @@
 import "dart:core" as core;
 
 static method foo(dynamic obj) → core::String
-  return obj is core::String ? obj{core::String}.toUpperCase() : null;
+  return obj is core::String ? obj.toUpperCase() : null;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.transformed.expect
index 1149d5f..c5cd413 100644
--- a/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/bug30620_d.dart.legacy.transformed.expect
@@ -3,5 +3,5 @@
 import "dart:core" as core;
 
 static method foo(dynamic obj) → core::String
-  return obj is core::String ? obj{core::String}.toUpperCase() : null;
+  return obj is core::String ? obj.toUpperCase() : null;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/bug31132.dart.legacy.expect b/pkg/front_end/testcases/inference/bug31132.dart.legacy.expect
index 31ec243..abedb00 100644
--- a/pkg/front_end/testcases/inference/bug31132.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/bug31132.dart.legacy.expect
@@ -14,7 +14,7 @@
     ;
 }
 static method test(self::B x) → void {
-  dynamic y = x is self::C ? x{self::C} : new self::C::•();
+  dynamic y = x is self::C ? x : new self::C::•();
   core::print(y.z);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/bug31132.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/bug31132.dart.legacy.transformed.expect
index 31ec243..abedb00 100644
--- a/pkg/front_end/testcases/inference/bug31132.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/bug31132.dart.legacy.transformed.expect
@@ -14,7 +14,7 @@
     ;
 }
 static method test(self::B x) → void {
-  dynamic y = x is self::C ? x{self::C} : new self::C::•();
+  dynamic y = x is self::C ? x : new self::C::•();
   core::print(y.z);
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/bug31133.dart.strong.expect b/pkg/front_end/testcases/inference/bug31133.dart.strong.expect
index e333816..f363308 100644
--- a/pkg/front_end/testcases/inference/bug31133.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/bug31133.dart.strong.expect
@@ -4,13 +4,13 @@
 
 static method test() → void {
   core::int i = 0;
-  for (final dynamic #t1 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
+  for (final core::int #t1 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
   }
-  for (final dynamic #t2 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
+  for (final core::int #t2 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
   }
-  for (final dynamic #t3 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
+  for (final core::int #t3 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
   }
-  for (final dynamic #t4 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
+  for (final core::int #t4 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/bug31133.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/bug31133.dart.strong.transformed.expect
index e333816..f363308 100644
--- a/pkg/front_end/testcases/inference/bug31133.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/bug31133.dart.strong.transformed.expect
@@ -4,13 +4,13 @@
 
 static method test() → void {
   core::int i = 0;
-  for (final dynamic #t1 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
+  for (final core::int #t1 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
   }
-  for (final dynamic #t2 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
+  for (final core::int #t2 = i = i.{core::num::+}(1); i.{core::num::<}(10); i = i.{core::num::+}(1)) {
   }
-  for (final dynamic #t3 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
+  for (final core::int #t3 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
   }
-  for (final dynamic #t4 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
+  for (final core::int #t4 = i = i.{core::num::-}(1); i.{core::num::>=}(0); i = i.{core::num::-}(1)) {
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.expect b/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.expect
index d03e49e..658bd51 100644
--- a/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.expect
@@ -1,20 +1,20 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself via 'B'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself.
 // abstract class A extends B {
 //                ^
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself via 'A'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself.
 // abstract class B extends A {
 //                ^
 
 // Unhandled errors:
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself via 'B'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself.
 // abstract class A extends B {
 //                ^
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself via 'A'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself.
 // abstract class B extends A {
 //                ^
 
diff --git a/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.transformed.expect
index 8f3be84..fa9873c 100644
--- a/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/circular_method_inference.dart.legacy.transformed.expect
@@ -1,10 +1,10 @@
 // Unhandled errors:
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself via 'B'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself.
 // abstract class A extends B {
 //                ^
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself via 'A'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself.
 // abstract class B extends A {
 //                ^
 
diff --git a/pkg/front_end/testcases/inference/circular_method_inference.dart.outline.expect b/pkg/front_end/testcases/inference/circular_method_inference.dart.outline.expect
index 1cb6512..bd72e73 100644
--- a/pkg/front_end/testcases/inference/circular_method_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/circular_method_inference.dart.outline.expect
@@ -1,10 +1,10 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself via 'B'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself.
 // abstract class A extends B {
 //                ^
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself via 'A'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself.
 // abstract class B extends A {
 //                ^
 
diff --git a/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.expect b/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.expect
index d03e49e..658bd51 100644
--- a/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.expect
@@ -1,20 +1,20 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself via 'B'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself.
 // abstract class A extends B {
 //                ^
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself via 'A'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself.
 // abstract class B extends A {
 //                ^
 
 // Unhandled errors:
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself via 'B'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself.
 // abstract class A extends B {
 //                ^
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself via 'A'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself.
 // abstract class B extends A {
 //                ^
 
diff --git a/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.transformed.expect
index 8f3be84..fa9873c 100644
--- a/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/circular_method_inference.dart.strong.transformed.expect
@@ -1,10 +1,10 @@
 // Unhandled errors:
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself via 'B'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:12:16: Error: 'A' is a supertype of itself.
 // abstract class A extends B {
 //                ^
 //
-// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself via 'A'.
+// pkg/front_end/testcases/inference/circular_method_inference.dart:16:16: Error: 'B' is a supertype of itself.
 // abstract class B extends A {
 //                ^
 
diff --git a/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.legacy.transformed.expect
index af02e87..b10f37a 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,6 +31,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.strong.transformed.expect
index fdda593..64565b5 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method main() → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,6 +31,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.legacy.transformed.expect
index c6a2b38..4c365f3 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.legacy.transformed.expect
@@ -10,7 +10,7 @@
 static method F<T extends core::Object = dynamic>() → self::F::T
   return null;
 static method f() → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -168,11 +168,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -249,6 +249,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.transformed.expect
index 60d8dbb..852887c 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
 static method F<T extends core::Object = dynamic>() → self::F::T
   return null;
 static method f() → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -168,11 +168,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → asy::Future<dynamic> /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -249,6 +249,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.legacy.transformed.expect
index 46d4a06..70c1eb6 100644
--- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -84,7 +84,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.transformed.expect
index abfce65..9572d11 100644
--- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -84,7 +84,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.expect b/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.expect
index 666cfba..6633f20 100644
--- a/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.expect
@@ -5,7 +5,7 @@
 static method test(core::List<core::num> nums) → void {
   for (dynamic x in nums) {
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.transformed.expect
index 666cfba..6633f20 100644
--- a/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/for_in_loop_promotion.dart.legacy.transformed.expect
@@ -5,7 +5,7 @@
 static method test(core::List<core::num> nums) → void {
   for (dynamic x in nums) {
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.expect b/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.expect
index 9f73c0c..bf17438 100644
--- a/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.expect
@@ -8,7 +8,7 @@
     if(x.>=(10))
       break #L1;
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.transformed.expect
index 9f73c0c..bf17438 100644
--- a/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/for_loop_empty_condition.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
     if(x.>=(10))
       break #L1;
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.expect b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.expect
index 2ae6220..3b7e21a 100644
--- a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.expect
@@ -6,7 +6,7 @@
   core::num x;
   for (final dynamic #t1 = x = 0; x.<(10); x = x.+(1)) {
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.transformed.expect
index 2ae6220..3b7e21a 100644
--- a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   core::num x;
   for (final dynamic #t1 = x = 0; x.<(10); x = x.+(1)) {
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.expect b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.expect
index dd4258d..0c93fcd 100644
--- a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.expect
@@ -4,7 +4,7 @@
 
 static method test() → void {
   core::num x;
-  for (final dynamic #t1 = x = 0; x.{core::num::<}(10); x = x.{core::num::+}(1)) {
+  for (final core::int #t1 = x = 0; x.{core::num::<}(10); x = x.{core::num::+}(1)) {
     if(x is core::int) {
       core::int y = x{core::int};
     }
diff --git a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.transformed.expect
index dd4258d..0c93fcd 100644
--- a/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/for_loop_initializer_expression.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 
 static method test() → void {
   core::num x;
-  for (final dynamic #t1 = x = 0; x.{core::num::<}(10); x = x.{core::num::+}(1)) {
+  for (final core::int #t1 = x = 0; x.{core::num::<}(10); x = x.{core::num::+}(1)) {
     if(x is core::int) {
       core::int y = x{core::int};
     }
diff --git a/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.expect b/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.expect
index 8edae6d..7f01ee0 100644
--- a/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.expect
@@ -5,7 +5,7 @@
 static method test() → void {
   for (core::num x = 0; x.<(10); x = x.+(1)) {
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.transformed.expect
index 8edae6d..7f01ee0 100644
--- a/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/for_loop_promotion.dart.legacy.transformed.expect
@@ -5,7 +5,7 @@
 static method test() → void {
   for (core::num x = 0; x.<(10); x = x.+(1)) {
     if(x is core::int) {
-      dynamic y = x{core::int};
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
index 0011b02..2523367 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   asy::Future<core::int> t1 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic _) → dynamic => asy::Future::value<core::int>(3));
@@ -140,7 +140,7 @@
     return asy::Future::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then.dart.strong.transformed.expect
index 804cb3b..cfca0bf 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   asy::Future<core::int> t1 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> => asy::Future::value<core::int>(3));
@@ -140,7 +140,7 @@
     return asy::Future::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
index b7670ca..5305928 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   asy::Future<core::int> t1 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic _) → dynamic => new self::MyFuture::value<core::int>(3));
@@ -140,7 +140,7 @@
     return new self::MyFuture::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_2.dart.strong.transformed.expect
index 0af6f19..16a1cda 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   asy::Future<core::int> t1 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>(3));
@@ -140,7 +140,7 @@
     return new self::MyFuture::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
index 27b7116..a8a5bcf 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   self::MyFuture<core::int> t1 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t3 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t4 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.then((dynamic _) → dynamic => asy::Future::value<core::int>(3));
@@ -140,7 +140,7 @@
     return asy::Future::value<core::int>(3);
   });
   self::MyFuture<core::int> t7 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t8 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_3.dart.strong.transformed.expect
index 4893183..ebec13e 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> => asy::Future::value<core::int>(3));
@@ -140,7 +140,7 @@
     return asy::Future::value<core::int>(3);
   });
   self::MyFuture<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
index 6429f8a..ec60686 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   self::MyFuture<core::int> t1 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t3 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t4 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.then((dynamic _) → dynamic => new self::MyFuture::value<core::int>(3));
@@ -140,7 +140,7 @@
     return new self::MyFuture::value<core::int>(3);
   });
   self::MyFuture<core::int> t7 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t8 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_4.dart.strong.transformed.expect
index b063fca..b9f26c5 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<dynamic> f;
   self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>(3));
@@ -140,7 +140,7 @@
     return new self::MyFuture::value<core::int>(3);
   });
   self::MyFuture<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
index 3d8e9145..3652669 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<dynamic> f;
   asy::Future<core::int> t1 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic _) → dynamic => new self::MyFuture::value<core::int>(3));
@@ -140,7 +140,7 @@
     return new self::MyFuture::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_5.dart.strong.transformed.expect
index 84c5216..aa2b0b1 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<dynamic> f;
   asy::Future<core::int> t1 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>(3));
@@ -140,7 +140,7 @@
     return new self::MyFuture::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
index 62b8c37..df4e351 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<dynamic> f;
   asy::Future<core::int> t1 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic _) → dynamic => asy::Future::value<core::int>(3));
@@ -140,7 +140,7 @@
     return asy::Future::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.then((dynamic _) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_6.dart.strong.transformed.expect
index 22c3d9c..3895fa1 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<dynamic> f;
   asy::Future<core::int> t1 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -49,11 +49,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -78,11 +78,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t3 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -105,11 +105,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t4 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -132,7 +132,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> => asy::Future::value<core::int>(3));
@@ -140,7 +140,7 @@
     return asy::Future::value<core::int>(3);
   });
   asy::Future<core::int> t7 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -163,11 +163,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t8 = f.{asy::Future::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -190,7 +190,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
 }
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
index 1886dfc..d665857 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   asy::Future<core::int> t1 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic x) → dynamic => x ? 2 : asy::Future::value<core::int>(3));
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.strong.transformed.expect
index ba028aa..acbce4c 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   asy::Future<core::int> t1 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::FutureOr<core::int> => (x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError} asy::FutureOr<core::int>);
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
index 85a1122..cae1f2d 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   asy::Future<core::int> t1 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic x) → dynamic => x ? 2 : new self::MyFuture::value<core::int>(3));
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.strong.transformed.expect
index a7e329f..3f3e26c 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   asy::Future<core::int> t1 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::FutureOr<core::int> => (x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError} asy::FutureOr<core::int>);
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
index 75321b8..2288861 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   self::MyFuture<core::int> t1 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.then((dynamic x) → dynamic => x ? 2 : asy::Future::value<core::int>(3));
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.strong.transformed.expect
index 7471d69..6e76891 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::FutureOr<core::int> => (x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError} asy::FutureOr<core::int>);
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
index 9b1a087..97a50ab 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   self::MyFuture<core::int> t1 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.then((dynamic x) → dynamic => x ? 2 : new self::MyFuture::value<core::int>(3));
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.transformed.expect
index 6c13a80..c07cdcb 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::bool> f;
   self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::FutureOr<core::int> => (x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError} asy::FutureOr<core::int>);
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
index 2c23aa4..c58e4b1 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<core::bool> f;
   asy::Future<core::int> t1 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic x) → dynamic => x ? 2 : new self::MyFuture::value<core::int>(3));
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.strong.transformed.expect
index a937bf0..a74751a 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<core::bool> f;
   asy::Future<core::int> t1 = f.{asy::Future::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{asy::Future::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → asy::FutureOr<core::int> => (x ?{core::Object} 2 : new self::MyFuture::value<core::int>(3)) as{TypeError} asy::FutureOr<core::int>);
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
index 7e89366..69471c1 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<core::bool> f;
   asy::Future<core::int> t1 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic x) → dynamic => x ? 2 : asy::Future::value<core::int>(3));
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.strong.transformed.expect
index 1f05b11..16db4a6 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   asy::Future<core::bool> f;
   asy::Future<core::int> t1 = f.{asy::Future::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -56,11 +56,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{asy::Future::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -85,7 +85,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{asy::Future::then}<core::int>((core::bool x) → asy::FutureOr<core::int> => (x ?{core::Object} 2 : asy::Future::value<core::int>(3)) as{TypeError} asy::FutureOr<core::int>);
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
index 204e5f2..816cc71 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::int> f;
   asy::Future<core::int> t1 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -57,11 +57,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.then((dynamic x) → asy::Future<dynamic> /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -86,7 +86,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.then((dynamic x) → dynamic => let final dynamic #t5 = x in #t5.==(null) ? asy::Future::value<core::int>(3) : #t5);
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.strong.transformed.expect
index d5c32ce..aa278ac 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 static method test() → void {
   self::MyFuture<core::int> f;
   asy::Future<core::int> t1 = f.{self::MyFuture::then}<core::int>((core::int x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -57,11 +57,11 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t2 = f.{self::MyFuture::then}<core::int>((core::int x) → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -86,7 +86,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   });
   asy::Future<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::int x) → asy::FutureOr<core::int> => (let final core::int #t5 = x in #t5.==(null) ?{core::Object} asy::Future::value<core::int>(3) : #t5) as{TypeError} asy::FutureOr<core::int>);
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
index 52f6962..23aa903 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
@@ -22,7 +22,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
 }
 static method g1(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -45,11 +45,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g2(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -72,11 +72,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -100,7 +100,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.strong.transformed.expect
index d27c725..a0d28bb1 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.strong.transformed.expect
@@ -22,7 +22,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
 }
 static method g1(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -45,11 +45,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g2(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -72,11 +72,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -100,7 +100,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
index f82b48c..f292acd 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
@@ -22,7 +22,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
 }
 static method g1(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -45,11 +45,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g2(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -72,11 +72,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -100,7 +100,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.transformed.expect
index 0d01746..84da7bd 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.transformed.expect
@@ -22,7 +22,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
 }
 static method g1(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -45,11 +45,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g2(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -72,11 +72,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3(core::bool x) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -100,7 +100,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
index c60fde1..62fcaa6 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
@@ -25,7 +25,7 @@
 static field asy::Future<core::int> t1 = self::f.then((dynamic _) → dynamic => asy::Future::value<dynamic>("hi"));
 static field asy::Future<core::List<core::int>> t2 = self::f.then((dynamic _) → dynamic => <dynamic>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -48,11 +48,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -75,7 +75,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.strong.transformed.expect
index 0ad3306..53247c8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.strong.transformed.expect
@@ -29,7 +29,7 @@
                                            ^" in "hi" as{TypeError} asy::FutureOr<core::int>));
 static field asy::Future<core::List<core::int>> t2 = self::f.{self::MyFuture::then}<core::List<core::int>>((dynamic _) → core::List<core::int> => <core::int>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -52,11 +52,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -79,7 +79,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
index b4d3d28..a332fc2 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
@@ -25,7 +25,7 @@
 static field asy::Future<core::int> t1 = self::f.then((dynamic _) → dynamic => new self::MyFuture::value<dynamic>("hi"));
 static field asy::Future<core::List<core::int>> t2 = self::f.then((dynamic _) → dynamic => <dynamic>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -48,11 +48,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -75,7 +75,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.strong.transformed.expect
index e2b3327..1e11465 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.strong.transformed.expect
@@ -25,7 +25,7 @@
 static field asy::Future<core::int> t1 = self::f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>("hi"));
 static field asy::Future<core::List<core::int>> t2 = self::f.{self::MyFuture::then}<core::List<core::int>>((dynamic _) → core::List<core::int> => <core::int>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -48,11 +48,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -75,7 +75,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
index 125fd56..704909d 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
@@ -25,7 +25,7 @@
 static field asy::Future<core::int> t1 = self::f.then((dynamic _) → dynamic => asy::Future::value<dynamic>("hi"));
 static field asy::Future<core::List<core::int>> t2 = self::f.then((dynamic _) → dynamic => <dynamic>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -48,11 +48,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -75,7 +75,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.strong.transformed.expect
index acd3be5..3e0356f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.strong.transformed.expect
@@ -29,7 +29,7 @@
                                            ^" in "hi" as{TypeError} asy::FutureOr<core::int>));
 static field asy::Future<core::List<core::int>> t2 = self::f.{asy::Future::then}<core::List<core::int>>((dynamic _) → core::List<core::int> => <core::int>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -52,11 +52,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -79,7 +79,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
index 50b3bb1..598ecd1 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
@@ -25,7 +25,7 @@
 static field asy::Future<core::int> t1 = self::f.then((dynamic _) → dynamic => new self::MyFuture::value<dynamic>("hi"));
 static field asy::Future<core::List<core::int>> t2 = self::f.then((dynamic _) → dynamic => <dynamic>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -48,11 +48,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -75,7 +75,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.strong.transformed.expect
index 918aaab..4232dc3 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.strong.transformed.expect
@@ -25,7 +25,7 @@
 static field asy::Future<core::int> t1 = self::f.{asy::Future::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>("hi"));
 static field asy::Future<core::List<core::int>> t2 = self::f.{asy::Future::then}<core::List<core::int>>((dynamic _) → core::List<core::int> => <core::int>[3]);
 static method g2() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -48,11 +48,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method g3() → asy::Future<core::List<core::int>> /* originally async */ {
-  final asy::Completer<core::List<core::int>> :async_completer = asy::Completer::sync<core::List<core::int>>();
+  final asy::_AsyncAwaitCompleter<core::List<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::List<core::int>>();
   asy::FutureOr<core::List<core::int>> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -75,7 +75,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.legacy.transformed.expect
index 58c7e21..c0244b3 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.legacy.transformed.expect
@@ -9,7 +9,7 @@
     ;
 }
 static method foo() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -35,7 +35,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.strong.transformed.expect
index dd2c304..45afa71 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.strong.transformed.expect
@@ -9,7 +9,7 @@
     ;
 }
 static method foo() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -35,7 +35,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.legacy.transformed.expect
index 6b4820f..fc9ead3 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
 static method id<T extends core::Object = dynamic>(self::id::T x) → self::id::T
   return x;
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,7 +31,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.strong.transformed.expect
index 8a4ec7e..8e23bd8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 static method id<T extends core::Object = dynamic>(self::id::T x) → self::id::T
   return x;
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,7 +31,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.legacy.transformed.expect
index a8cd981..f6baa93 100644
--- a/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
     ;
 }
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -50,6 +50,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.strong.transformed.expect
index 160256c..e55e2bc 100644
--- a/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
     ;
 }
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -50,6 +50,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.expect b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.expect
index 4d18a21..5b0e517 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.expect
@@ -31,8 +31,8 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::String x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["int", "42"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  dynamic y = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["String", "\"hello\""]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  core::String x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["int", "42"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  dynamic y = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["String", "\"hello\""]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
   y = "world";
   y = 42;
 }
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.transformed.expect
index 38e8d5b1..89adde8 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_js_builtin.dart.legacy.transformed.expect
@@ -13,8 +13,8 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  core::String x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["int", "42"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  dynamic y = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["String", "\"hello\""]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  core::String x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["int", "42"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  dynamic y = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#JS, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["String", "\"hello\""]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
   y = "world";
   y = 42;
 }
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.expect
index cb3988f..72b90ee 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.expect
@@ -40,14 +40,14 @@
     ;
 }
 abstract class _G&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
 }
 class G extends self::_G&Object&B {
   field dynamic x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.transformed.expect
index c1822ed..31c9fee 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.legacy.transformed.expect
@@ -40,7 +40,7 @@
     ;
 }
 abstract class _G&Object&B extends core::Object implements self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
   get x() → core::int
@@ -49,7 +49,7 @@
 class G extends self::_G&Object&B {
   field dynamic x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.outline.expect b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.outline.expect
index 56851ab..b627b29 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.outline.expect
@@ -34,7 +34,7 @@
     ;
 }
 abstract class _G&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.expect b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.expect
index fa8f9e8..9f9de47 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.expect
@@ -40,14 +40,14 @@
     ;
 }
 abstract class _G&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
 }
 class G extends self::_G&Object&B {
   field core::int x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.transformed.expect
index 427dbc2..9f7817b 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.strong.transformed.expect
@@ -40,7 +40,7 @@
     ;
 }
 abstract class _G&Object&B extends core::Object implements self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
   get x() → core::int
@@ -49,7 +49,7 @@
 class G extends self::_G&Object&B {
   field core::int x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.expect
index 33c6ea7..8baaa28 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.expect
@@ -39,14 +39,14 @@
     ;
 }
 abstract class _G&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
 }
 class G extends self::_G&Object&B {
   field dynamic x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.transformed.expect
index bf18d3f..1a36773 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.legacy.transformed.expect
@@ -39,7 +39,7 @@
     ;
 }
 abstract class _G&Object&B extends core::Object implements self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
   set x(core::int value) → void {}
@@ -47,7 +47,7 @@
 class G extends self::_G&Object&B {
   field dynamic x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.outline.expect b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.outline.expect
index f5711a5..02e0c2b 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.outline.expect
@@ -34,7 +34,7 @@
     ;
 }
 abstract class _G&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.expect b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.expect
index 2b77c7f..3c16ce0 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.expect
@@ -39,14 +39,14 @@
     ;
 }
 abstract class _G&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
 }
 class G extends self::_G&Object&B {
   field core::int x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.transformed.expect
index d81e504..e3da27e 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.strong.transformed.expect
@@ -39,7 +39,7 @@
     ;
 }
 abstract class _G&Object&B extends core::Object implements self::B {
-  synthetic constructor •() → self::_G&Object&B
+  const synthetic constructor •() → self::_G&Object&B
     : super core::Object::•()
     ;
   set x(core::int value) → void {}
@@ -47,7 +47,7 @@
 class G extends self::_G&Object&B {
   field core::int x = null;
   synthetic constructor •() → self::G
-    : super core::Object::•()
+    : super self::_G&Object&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
index 2e6223f..c1990f1 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
@@ -26,8 +26,8 @@
     ;
 }
 static field dynamic a = new self::A::•();
-static field dynamic b = new self::B::•(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-static field dynamic c1 = <dynamic>[let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))];
+static field dynamic b = new self::B::•(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+static field dynamic c1 = <dynamic>[throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))];
 static field dynamic c2 = const <dynamic>[];
 static field dynamic d = <dynamic, dynamic>{"a": "b"};
 static field dynamic e = let final dynamic #t1 = new self::A::•() in let final dynamic #t2 = #t1.x = 3 in #t1;
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
index 5140db2..9c6ee49 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
@@ -16,8 +16,8 @@
     ;
 }
 static field dynamic a = new self::A::•();
-static field dynamic b = new self::B::•(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-static field dynamic c1 = <dynamic>[let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))];
+static field dynamic b = new self::B::•(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+static field dynamic c1 = <dynamic>[throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))];
 static field dynamic c2 = const <dynamic>[];
 static field dynamic d = <dynamic, dynamic>{"a": "b"};
 static field dynamic e = let final dynamic #t1 = new self::A::•() in let final dynamic #t2 = #t1.x = 3 in #t1;
diff --git a/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.expect
index 22fa159..45294a7 100644
--- a/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.expect
@@ -17,7 +17,7 @@
 
 static method test() → dynamic {
   function f() → dynamic
-    return let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#g, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    return throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#g, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
   {
     invalid-expression "pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart:14:3: Error: Can't declare 'g' because it was already used in this scope.
   g() => 0;
diff --git a/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.transformed.expect
index 7a403de..9071805 100644
--- a/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 
 static method test() → dynamic {
   function f() → dynamic
-    return let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#g, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    return throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#g, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
   {
     invalid-expression "pkg/front_end/testcases/inference/infer_local_function_referenced_before_declaration.dart:14:3: Error: Can't declare 'g' because it was already used in this scope.
   g() => 0;
diff --git a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.legacy.transformed.expect
index 7e23d3a..256e504 100644
--- a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
   function f0() → dynamic
     return 42;
   function f1() → dynamic /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -30,14 +30,14 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
   function f2() → dynamic {
     return 42;
   }
   function f3() → dynamic /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -60,7 +60,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
   function f4() → dynamic /* originally sync* */ {
diff --git a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.transformed.expect
index 7946c1c..a6f275f 100644
--- a/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_local_function_return_type.dart.strong.transformed.expect
@@ -7,7 +7,7 @@
   function f0() → core::int
     return 42;
   function f1() → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -30,14 +30,14 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
   function f2() → core::int {
     return 42;
   }
   function f3() → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -60,7 +60,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
   function f4() → core::Iterable<core::int> /* originally sync* */ {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
index 0893769..22b3803 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
@@ -14,7 +14,7 @@
     : super core::Object::•()
     ;
   method foo(self::Bar::T t) → dynamic /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -64,7 +64,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
@@ -73,7 +73,7 @@
     : super core::Object::•()
     ;
   method foo(self::Baz::S t) → dynamic /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -124,7 +124,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
@@ -133,7 +133,7 @@
     return null;
 }
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -339,7 +339,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.strong.transformed.expect
index 10ec7fe..d01610c 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.strong.transformed.expect
@@ -14,7 +14,7 @@
     : super core::Object::•()
     ;
   method foo(generic-covariant-impl self::Bar::T t) → dynamic /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -67,7 +67,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
@@ -76,7 +76,7 @@
     : super core::Object::•()
     ;
   method foo(generic-covariant-impl self::Baz::S t) → dynamic /* originally async */ {
-    final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+    final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -130,7 +130,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
 }
@@ -139,7 +139,7 @@
     return null;
 }
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -361,7 +361,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/local_return_and_yield.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/local_return_and_yield.dart.legacy.transformed.expect
index 0460a17..a138755 100644
--- a/pkg/front_end/testcases/inference/local_return_and_yield.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/local_return_and_yield.dart.legacy.transformed.expect
@@ -9,7 +9,7 @@
     return (dynamic x) → dynamic => x;
   }
   function b() → asy::Future<(core::int) → core::int> /* originally async */ {
-    final asy::Completer<(core::int) → core::int> :async_completer = asy::Completer::sync<(core::int) → core::int>();
+    final asy::_AsyncAwaitCompleter<(core::int) → core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<(core::int) → core::int>();
     asy::FutureOr<(core::int) → core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -32,7 +32,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
   function c() → core::Iterable<(core::int) → core::int> /* originally sync* */ {
diff --git a/pkg/front_end/testcases/inference/local_return_and_yield.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/local_return_and_yield.dart.strong.transformed.expect
index 198327c..bba0bec 100644
--- a/pkg/front_end/testcases/inference/local_return_and_yield.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/local_return_and_yield.dart.strong.transformed.expect
@@ -9,7 +9,7 @@
     return (core::int x) → core::int => x;
   }
   function b() → asy::Future<(core::int) → core::int> /* originally async */ {
-    final asy::Completer<(core::int) → core::int> :async_completer = asy::Completer::sync<(core::int) → core::int>();
+    final asy::_AsyncAwaitCompleter<(core::int) → core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<(core::int) → core::int>();
     asy::FutureOr<(core::int) → core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -36,7 +36,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
   function c() → core::Iterable<(core::int) → core::int> /* originally sync* */ {
diff --git a/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.expect b/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.expect
index 9740119..8ab3b1c 100644
--- a/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.expect
@@ -20,7 +20,7 @@
   method f(core::Object o) → void {
     if(o is self::A || o is self::B) {
       if(o is self::A) {
-        this.{self::C::a} = o{self::A};
+        this.{self::C::a} = o;
       }
     }
   }
diff --git a/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.transformed.expect
index 9740119..8ab3b1c 100644
--- a/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/logical_or_promotion.dart.legacy.transformed.expect
@@ -20,7 +20,7 @@
   method f(core::Object o) → void {
     if(o is self::A || o is self::B) {
       if(o is self::A) {
-        this.{self::C::a} = o{self::A};
+        this.{self::C::a} = o;
       }
     }
   }
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.expect
index 18910bd..68141d0 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.expect
@@ -48,7 +48,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.transformed.expect
index aea6b53..d53ce70 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.legacy.transformed.expect
@@ -36,7 +36,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.expect
index 1faa3db..bfb7b01 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.expect
@@ -24,7 +24,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.transformed.expect
index 7a5e6b5..dfd7d1e 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.expect
index 4586536..b7e2c17 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.expect
@@ -48,7 +48,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.transformed.expect
index fa20027..353900f 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.legacy.transformed.expect
@@ -36,7 +36,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.expect
index 69818ca..db552ee 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.expect
@@ -24,7 +24,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.transformed.expect
index 8e64db9..6459244 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.expect
index d68e9c3..751f33d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.expect
@@ -48,7 +48,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.transformed.expect
index db8c3d4..e98e8f6 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.legacy.transformed.expect
@@ -36,7 +36,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.expect
index fb8fecd..7d0cb03 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.expect
@@ -43,7 +43,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.transformed.expect
index 70df06b..fe9fd8d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.strong.transformed.expect
@@ -32,7 +32,7 @@
 }
 class A extends self::_A&M1&M0 {
   synthetic constructor •() → self::A
-    : super self::M1::•()
+    : super self::_A&M1&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.expect
index e617321..1066a51 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.expect
@@ -63,7 +63,7 @@
 }
 class M0<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends self::_M0&I&J<self::M0::X, self::M0::Y> {
   synthetic constructor •() → self::M0<self::M0::X, self::M0::Y>
-    : super self::I::•()
+    : super self::_M0&I&J::•()
     ;
 }
 class M1 extends core::Object implements self::I<core::int> {
@@ -83,7 +83,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.transformed.expect
index b8d669d..ed90883 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.legacy.transformed.expect
@@ -41,7 +41,7 @@
 }
 class M0<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends self::_M0&I&J<self::M0::X, self::M0::Y> {
   synthetic constructor •() → self::M0<self::M0::X, self::M0::Y>
-    : super self::I::•()
+    : super self::_M0&I&J::•()
     ;
 }
 class M1 extends core::Object implements self::I<core::int> {
@@ -61,7 +61,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.expect
index 517eca6..9fe7a0a 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.expect
@@ -19,7 +19,7 @@
 }
 class M0<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends self::_M0&I&J<self::M0::X, self::M0::Y> {
   synthetic constructor •() → self::M0<self::M0::X, self::M0::Y>
-    : super self::I::•()
+    : super self::_M0&I&J::•()
     ;
 }
 class M1 extends core::Object implements self::I<core::int> {
@@ -39,7 +39,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.transformed.expect
index ac1a5bb..435ce3b 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
 }
 class M0<X extends core::Object = dynamic, Y extends core::Object = dynamic> extends self::_M0&I&J<self::M0::X, self::M0::Y> {
   synthetic constructor •() → self::M0<self::M0::X, self::M0::Y>
-    : super self::I::•()
+    : super self::_M0&I&J::•()
     ;
 }
 class M1 extends core::Object implements self::I<core::int> {
@@ -39,7 +39,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.expect
index 8a1cc49..1886407 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.expect
@@ -61,7 +61,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.transformed.expect
index 4a624af..41fb098 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.legacy.transformed.expect
@@ -45,7 +45,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.expect
index 36da7e3..1030f6b 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.expect
@@ -29,7 +29,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.transformed.expect
index 6199c28..3eabc8f 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_non_trivial_constraints.dart.strong.transformed.expect
@@ -29,7 +29,7 @@
 }
 class A extends self::_A&M2&M0 {
   synthetic constructor •() → self::A
-    : super self::M2::•()
+    : super self::_A&M2&M0::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.expect
index 872475c..bf40fc9 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.expect
@@ -48,7 +48,7 @@
 }
 class A extends self::_A&M0&M1 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.transformed.expect
index 8b45bc6..7a1c8c2 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.legacy.transformed.expect
@@ -36,7 +36,7 @@
 }
 class A extends self::_A&M0&M1 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.expect
index 128fa4a..b336c68 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.expect
@@ -24,7 +24,7 @@
 }
 class A extends self::_A&M0&M1 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.transformed.expect
index ec46a13..75ebf9d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_1.dart.strong.transformed.expect
@@ -24,7 +24,7 @@
 }
 class A extends self::_A&M0&M1 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.expect
index bb07438..231fbf6d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.expect
@@ -68,7 +68,7 @@
 }
 class A extends self::_A&M0&M1&M2 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1&M2::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.transformed.expect
index 5075370..6079249 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.legacy.transformed.expect
@@ -51,7 +51,7 @@
 }
 class A extends self::_A&M0&M1&M2 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1&M2::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.expect
index e17639c..d133391 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.expect
@@ -34,7 +34,7 @@
 }
 class A extends self::_A&M0&M1&M2 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1&M2::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.transformed.expect
index 37d01dc..d4edaee 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_2.dart.strong.transformed.expect
@@ -34,7 +34,7 @@
 }
 class A extends self::_A&M0&M1&M2 {
   synthetic constructor •() → self::A
-    : super self::M0::•()
+    : super self::_A&M0&M1&M2::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
index 0efa321..397be08 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
@@ -42,18 +42,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<core::int> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
index cbab346..2c73250 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
@@ -30,18 +30,18 @@
     ;
 }
 abstract class _A&Object&M0 extends core::Object implements self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 extends self::_A&Object&M0 implements self::M1<core::int> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
index bba1d1d..51eab20 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
@@ -27,12 +27,12 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<core::int> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
index 0efa321..397be08 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
@@ -42,18 +42,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<core::int> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
index 4f246b2..31db2ea 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
@@ -32,18 +32,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 implements self::I<core::int> {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
index 5b2d65a..6042159 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
@@ -25,18 +25,18 @@
     ;
 }
 abstract class _A&Object&M0 extends core::Object implements self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 extends self::_A&Object&M0 implements self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 implements self::I<core::int> {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
index a697e67..b9461de 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
@@ -22,12 +22,12 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
index 4f246b2..31db2ea 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
@@ -32,18 +32,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 implements self::I<core::int> {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
index 136a52f..7583b60 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
@@ -42,18 +42,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
index f4e7416..30ac8b5 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
@@ -30,18 +30,18 @@
     ;
 }
 abstract class _A&Object&M0 extends core::Object implements self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 extends self::_A&Object&M0 implements self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
index d48c58a..365b0b9 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
@@ -27,12 +27,12 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
index 136a52f..7583b60 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
@@ -42,18 +42,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
index 6107331..2da56f2 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
@@ -46,18 +46,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
index 7179092..04b8a12 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
@@ -32,18 +32,18 @@
     ;
 }
 abstract class _A&Object&M0 extends core::Object implements self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 extends self::_A&Object&M0 implements self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
index 793af88..738f378 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
@@ -29,12 +29,12 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
index 6107331..2da56f2 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
@@ -46,18 +46,18 @@
     ;
 }
 abstract class _A&Object&M0 = core::Object with self::M0<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0
+  const synthetic constructor •() → self::_A&Object&M0
     : super core::Object::•()
     ;
 }
 abstract class _A&Object&M0&M1 = self::_A&Object&M0 with self::M1<dynamic> {
-  synthetic constructor •() → self::_A&Object&M0&M1
+  const synthetic constructor •() → self::_A&Object&M0&M1
     : super self::_A&Object&M0::•()
     ;
 }
 class A extends self::_A&Object&M0&M1 {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M0&M1::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.expect b/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.expect
index a252b52..9d5a74b 100644
--- a/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.expect
@@ -19,7 +19,7 @@
     a.foo();
   }
   if(a is self::C) {
-    a{self::f::T extends self::C}.bar();
+    a.bar();
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.transformed.expect
index a252b52..9d5a74b 100644
--- a/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/promote_bounds.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
     a.foo();
   }
   if(a is self::C) {
-    a{self::f::T extends self::C}.bar();
+    a.bar();
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.expect b/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.expect
index ad926fb..4e40f86 100644
--- a/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.expect
@@ -4,7 +4,7 @@
 
 static method test(core::Object a, core::bool b) → void {
   if(b && a is core::int) {
-    core::print(a{core::int});
+    core::print(a);
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.transformed.expect
index ad926fb..4e40f86 100644
--- a/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/promote_from_logical_rhs.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 
 static method test(core::Object a, core::bool b) → void {
   if(b && a is core::int) {
-    core::print(a{core::int});
+    core::print(a);
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.expect b/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.expect
index cd61e5e..3c04046 100644
--- a/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.expect
@@ -4,8 +4,8 @@
 
 static method f(core::Object x) → void {
   if(x is core::int) {
-    if(x{core::int} is core::String) {
-      dynamic y = x{core::int};
+    if(x is core::String) {
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.transformed.expect
index cd61e5e..3c04046 100644
--- a/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/promotion_subtype_check.dart.legacy.transformed.expect
@@ -4,8 +4,8 @@
 
 static method f(core::Object x) → void {
   if(x is core::int) {
-    if(x{core::int} is core::String) {
-      dynamic y = x{core::int};
+    if(x is core::String) {
+      dynamic y = x;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.expect b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.expect
index 32b943a..8eced30 100644
--- a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.expect
@@ -1,8 +1,8 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:16: Error: A setter should have exactly one formal parameter.
+// pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:13: Error: A setter should have exactly one formal parameter.
 //   void set x() {}
-//                ^
+//             ^
 
 library test;
 import self as self;
@@ -12,10 +12,12 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set x(dynamic #synthetic) → void
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:16: Error: A setter should have exactly one formal parameter.
+  set x(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:13: Error: A setter should have exactly one formal parameter.
   void set x() {}
-               ^";
+            ^";
+    {}
+  }
 }
 static method f(self::A a) → void {
   dynamic x = a.x = 0;
diff --git a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.transformed.expect
index 6689f51..55e2dc6 100644
--- a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.legacy.transformed.expect
@@ -6,10 +6,12 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set x(dynamic #synthetic) → void
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:16: Error: A setter should have exactly one formal parameter.
+  set x(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:13: Error: A setter should have exactly one formal parameter.
   void set x() {}
-               ^";
+            ^";
+    {}
+  }
 }
 static method f(self::A a) → void {
   dynamic x = a.x = 0;
diff --git a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.expect b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.expect
index 0c7ff74c..b0a4fa1 100644
--- a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.expect
@@ -1,8 +1,8 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:16: Error: A setter should have exactly one formal parameter.
+// pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:13: Error: A setter should have exactly one formal parameter.
 //   void set x() {}
-//                ^
+//             ^
 
 library test;
 import self as self;
@@ -12,10 +12,12 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set x(dynamic #synthetic) → void
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:16: Error: A setter should have exactly one formal parameter.
+  set x(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:13: Error: A setter should have exactly one formal parameter.
   void set x() {}
-               ^";
+            ^";
+    {}
+  }
 }
 static method f(self::A a) → void {
   core::int x = a.{self::A::x} = 0;
diff --git a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.transformed.expect
index 1fc67b8..710fdf3 100644
--- a/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/property_set_bad_setter.dart.strong.transformed.expect
@@ -6,10 +6,12 @@
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
-  set x(dynamic #synthetic) → void
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:16: Error: A setter should have exactly one formal parameter.
+  set x(dynamic #synthetic) → void {
+    invalid-expression "pkg/front_end/testcases/inference/property_set_bad_setter.dart:9:13: Error: A setter should have exactly one formal parameter.
   void set x() {}
-               ^";
+            ^";
+    {}
+  }
 }
 static method f(self::A a) → void {
   core::int x = a.{self::A::x} = 0;
diff --git a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.legacy.transformed.expect
index c955da7..5058c0e 100644
--- a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
   return (dynamic x) → dynamic => x;
 }
 static method b() → asy::Future<(core::int) → core::int> /* originally async */ {
-  final asy::Completer<(core::int) → core::int> :async_completer = asy::Completer::sync<(core::int) → core::int>();
+  final asy::_AsyncAwaitCompleter<(core::int) → core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<(core::int) → core::int>();
   asy::FutureOr<(core::int) → core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -31,7 +31,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method c() → core::Iterable<(core::int) → core::int> /* originally sync* */ {
diff --git a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.strong.transformed.expect
index e548d63..ae67a0b 100644
--- a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
   return (core::int x) → core::int => x;
 }
 static method b() → asy::Future<(core::int) → core::int> /* originally async */ {
-  final asy::Completer<(core::int) → core::int> :async_completer = asy::Completer::sync<(core::int) → core::int>();
+  final asy::_AsyncAwaitCompleter<(core::int) → core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<(core::int) → core::int>();
   asy::FutureOr<(core::int) → core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -35,7 +35,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method c() → core::Iterable<(core::int) → core::int> /* originally sync* */ {
diff --git a/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.expect b/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.expect
index 85ad7c7..38d33b5 100644
--- a/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.expect
@@ -25,10 +25,10 @@
     dynamic x1 = x;
     dynamic y1 = y;
     if(x is self::D) {
-      dynamic x2 = x{self::D};
+      dynamic x2 = x;
     }
     if(y is self::E) {
-      dynamic y2 = y{self::E};
+      dynamic y2 = y;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.transformed.expect
index 85ad7c7..38d33b5 100644
--- a/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/try_catch_promotion.dart.legacy.transformed.expect
@@ -25,10 +25,10 @@
     dynamic x1 = x;
     dynamic y1 = y;
     if(x is self::D) {
-      dynamic x2 = x{self::D};
+      dynamic x2 = x;
     }
     if(y is self::E) {
-      dynamic y2 = y{self::E};
+      dynamic y2 = y;
     }
   }
 }
diff --git a/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.expect b/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.expect
index d61ebea..ac70ded 100644
--- a/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.expect
@@ -5,6 +5,6 @@
 static method main() → dynamic {
   core::num n = null;
   if(n is core::int) {
-    dynamic i = n{core::int};
+    dynamic i = n;
   }
 }
diff --git a/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.transformed.expect
index d61ebea..ac70ded 100644
--- a/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/type_promotion_simple.dart.legacy.transformed.expect
@@ -5,6 +5,6 @@
 static method main() → dynamic {
   core::num n = null;
   if(n is core::int) {
-    dynamic i = n{core::int};
+    dynamic i = n;
   }
 }
diff --git a/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart b/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
index 8b79005..4e96e3e 100644
--- a/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
+++ b/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
@@ -18,12 +18,8 @@
   void test() {
     A aLocal;
     for (aLocal in /*@typeArgs=Iterable<A>*/ f()) {}
-    // Note: "/*@target=C::aField*/" appears twice due to dartbug.com/31790.
-    for (/*@target=C::aField*/ /*@target=C::aField*/ aField
-        in /*@typeArgs=Iterable<A>*/ f()) {}
-    // Note: "/*@target=C::aSetter*/" appears twice due to dartbug.com/31790.
-    for (/*@target=C::aSetter*/ /*@target=C::aSetter*/ aSetter
-        in /*@typeArgs=Iterable<A>*/ f()) {}
+    for (/*@target=C::aField*/ aField in /*@typeArgs=Iterable<A>*/ f()) {}
+    for (/*@target=C::aSetter*/ aSetter in /*@typeArgs=Iterable<A>*/ f()) {}
     for (aTopLevel in /*@typeArgs=Iterable<A>*/ f()) {}
     for (aTopLevelSetter in /*@typeArgs=Iterable<A>*/ f()) {}
   }
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.legacy.transformed.expect
index 3eefc91..0e5e658 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.legacy.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -84,7 +84,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
index ef34ec9..062ec9e 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
@@ -4,7 +4,7 @@
 import "dart:core" as core;
 
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -99,7 +99,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.expect
index 91ab457..8a33d3b 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.expect
@@ -21,22 +21,22 @@
   self::A a;
   self::B b;
   core::int i;
-  for (final self::A #t1 in iterable) {
+  for (final dynamic #t1 in iterable) {
     a = #t1;
   }
-  await for (final self::A #t2 in stream) {
+  await for (final dynamic #t2 in stream) {
     a = #t2;
   }
-  for (final self::A #t3 in iterable) {
+  for (final dynamic #t3 in iterable) {
     b = #t3;
   }
-  await for (final self::A #t4 in stream) {
+  await for (final dynamic #t4 in stream) {
     b = #t4;
   }
-  for (final self::A #t5 in iterable) {
+  for (final dynamic #t5 in iterable) {
     i = #t5;
   }
-  await for (final self::A #t6 in stream) {
+  await for (final dynamic #t6 in stream) {
     i = #t6;
   }
   for (final dynamic #t7 in self::f<dynamic>()) {
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.transformed.expect
index c54ed4e..a974308 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.legacy.transformed.expect
@@ -16,7 +16,7 @@
 static method f<T extends core::Object = dynamic>() → self::f::T
   return null;
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -36,13 +36,13 @@
         self::A a;
         self::B b;
         core::int i;
-        for (final self::A #t1 in iterable) {
+        for (final dynamic #t1 in iterable) {
           a = #t1;
         }
         {
           dynamic :stream = stream;
           asy::_asyncStarListenHelper(:stream, :async_op);
-          asy::_StreamIterator<self::A> :for-iterator = new asy::_StreamIterator::•<self::A>(:stream);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
           const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
           try
             #L2:
@@ -50,7 +50,7 @@
               dynamic #t2 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
               [yield] let dynamic #t3 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(:result) {
-                final self::A #t4 = :for-iterator.{asy::_StreamIterator::current};
+                final dynamic #t4 = :for-iterator.{asy::_StreamIterator::current};
                 {
                   a = #t4;
                 }
@@ -64,13 +64,13 @@
               :result;
             }
         }
-        for (final self::A #t6 in iterable) {
+        for (final dynamic #t6 in iterable) {
           b = #t6;
         }
         {
           dynamic :stream = stream;
           asy::_asyncStarListenHelper(:stream, :async_op);
-          asy::_StreamIterator<self::A> :for-iterator = new asy::_StreamIterator::•<self::A>(:stream);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
           const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
           try
             #L3:
@@ -78,7 +78,7 @@
               dynamic #t7 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
               [yield] let dynamic #t8 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(:result) {
-                final self::A #t9 = :for-iterator.{asy::_StreamIterator::current};
+                final dynamic #t9 = :for-iterator.{asy::_StreamIterator::current};
                 {
                   b = #t9;
                 }
@@ -92,13 +92,13 @@
               :result;
             }
         }
-        for (final self::A #t11 in iterable) {
+        for (final dynamic #t11 in iterable) {
           i = #t11;
         }
         {
           dynamic :stream = stream;
           asy::_asyncStarListenHelper(:stream, :async_op);
-          asy::_StreamIterator<self::A> :for-iterator = new asy::_StreamIterator::•<self::A>(:stream);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
           const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
           try
             #L4:
@@ -106,7 +106,7 @@
               dynamic #t12 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
               [yield] let dynamic #t13 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
               if(:result) {
-                final self::A #t14 = :for-iterator.{asy::_StreamIterator::current};
+                final dynamic #t14 = :for-iterator.{asy::_StreamIterator::current};
                 {
                   i = #t14;
                 }
@@ -158,7 +158,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
index 692a025..b77def2 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
@@ -16,7 +16,7 @@
 static method f<T extends core::Object = dynamic>() → self::f::T
   return null;
 static method test() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -166,7 +166,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/legacy.status b/pkg/front_end/testcases/legacy.status
index 9832553..04f06f8 100644
--- a/pkg/front_end/testcases/legacy.status
+++ b/pkg/front_end/testcases/legacy.status
@@ -29,6 +29,7 @@
 inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: RuntimeError
 instantiate_to_bound/body_typedef_super_bounded_type: Fail # Issue 33444
 instantiate_to_bound/non_simple_class_parametrized_typedef_cycle: RuntimeError # May be related to Issue 33479
+instantiate_to_bound/non_simple_generic_function_in_bound_regress: RuntimeError # Expected
 instantiate_to_bound/typedef_super_bounded_type: Fail # Issue 33444
 invocations: Fail
 micro: Fail # External method marked abstract.
@@ -61,8 +62,6 @@
 rasta/issue_000031: Fail
 rasta/issue_000032: Fail
 rasta/issue_000034: RuntimeError
-rasta/issue_000035: Fail
-rasta/issue_000035a: Fail
 rasta/issue_000036: Fail
 rasta/issue_000039: Fail
 rasta/issue_000041: RuntimeError
@@ -83,8 +82,10 @@
 rasta/super_initializer: Fail
 rasta/super_operator: Fail
 rasta/try_label: Fail
+rasta/type_literals: Crash
 rasta/type_literals: Fail
 rasta/type_with_parse_error: Fail
+rasta/typedef: Crash
 rasta/typedef: Fail
 rasta/unresolved: Fail
 rasta/unresolved_constructor: Fail
@@ -101,7 +102,7 @@
 regress/issue_29976: RuntimeError # Tests runtime behavior of error recovery.
 regress/issue_29982: RuntimeError # Tests runtime behavior of error recovery.
 regress/issue_30836: RuntimeError # Issue 30836.
-regress/issue_32200: RuntimeError # Invalid type.
+regress/issue_32200: Pass # Invalid type mapped to dynamic type in kernel translation helper.
 regress/issue_32972: RuntimeError
 regress/issue_33452: RuntimeError # Test has an intentional error
 regress/issue_34225: RuntimeError
@@ -111,6 +112,7 @@
 regress/issue_35259: RuntimeError # Expected
 regress/issue_35260: RuntimeError # Expected
 regress/issue_35266: RuntimeError # Expected
+reject_generic_function_types_in_bounds: RuntimeError # Expected
 runtime_checks/implicit_downcast_constructor_initializer: RuntimeError # Test exercises strong mode semantics
 runtime_checks/implicit_downcast_do: RuntimeError # Test exercises strong mode semantics
 runtime_checks/implicit_downcast_for_condition: RuntimeError # Test exercises strong mode semantics
@@ -123,7 +125,6 @@
 runtime_checks_new/mixin_forwarding_stub_getter: RuntimeError # Test exercises strong mode semantics
 runtime_checks_new/mixin_forwarding_stub_setter: RuntimeError # Test exercises strong mode semantics
 runtime_checks_new/stub_checked_via_target: RuntimeError # Test exercises strong mode semantics
-statements: Fail # Make async tranformer optional for golden file testing.
 type_variable_as_super: Fail
 uninitialized_fields: Fail # Fasta and dartk disagree on static initializers
 void_methods: Fail # Bad return from setters.
diff --git a/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect b/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect
index 1da773d..cec02ba 100644
--- a/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect
+++ b/pkg/front_end/testcases/metadata_named_mixin_application.dart.outline.expect
@@ -4,6 +4,7 @@
 
 class C = self::D with self::E {
   synthetic constructor •() → self::C
+    : super self::D::•()
     ;
 }
 class D extends core::Object {
diff --git a/pkg/front_end/testcases/missing_constructor.dart.legacy.expect b/pkg/front_end/testcases/missing_constructor.dart.legacy.expect
index 5efe451..a886bd4 100644
--- a/pkg/front_end/testcases/missing_constructor.dart.legacy.expect
+++ b/pkg/front_end/testcases/missing_constructor.dart.legacy.expect
@@ -35,18 +35,18 @@
 }
 class Sub extends self::Super {
   constructor •() → self::Sub
-    : final dynamic #t1 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t1 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   constructor foo() → self::Sub
-    : final dynamic #t2 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
 }
 class Bad extends core::Object {
   constructor foo() → self::Bad
-    : final dynamic #t3 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t3 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   constructor bar() → self::Bad
-    : final dynamic #t4 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad.baz, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t4 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad.baz, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
 }
 class M extends core::Object {
@@ -61,10 +61,10 @@
 }
 class MixinApplication extends self::_MixinApplication&Super&M {
   constructor •() → self::MixinApplication
-    : final dynamic #t5 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t5 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   constructor foo() → self::MixinApplication
-    : final dynamic #t6 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t6 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/missing_constructor.dart.legacy.transformed.expect b/pkg/front_end/testcases/missing_constructor.dart.legacy.transformed.expect
index 0981c897..37a1c85 100644
--- a/pkg/front_end/testcases/missing_constructor.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/missing_constructor.dart.legacy.transformed.expect
@@ -9,18 +9,18 @@
 }
 class Sub extends self::Super {
   constructor •() → self::Sub
-    : final dynamic #t1 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t1 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   constructor foo() → self::Sub
-    : final dynamic #t2 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
 }
 class Bad extends core::Object {
   constructor foo() → self::Bad
-    : final dynamic #t3 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t3 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   constructor bar() → self::Bad
-    : final dynamic #t4 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad.baz, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t4 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Bad.baz, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
 }
 class M extends core::Object {
@@ -35,10 +35,10 @@
 }
 class MixinApplication extends self::_MixinApplication&Super&M {
   constructor •() → self::MixinApplication
-    : final dynamic #t5 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t5 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
   constructor foo() → self::MixinApplication
-    : final dynamic #t6 = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
+    : final dynamic #t6 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Super.foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/mixin.dart.legacy.expect b/pkg/front_end/testcases/mixin.dart.legacy.expect
index 6270bd2..0213797 100644
--- a/pkg/front_end/testcases/mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/mixin.dart.legacy.expect
@@ -3,18 +3,18 @@
 import "dart:core" as core;
 
 abstract class _B&Object&M1 = core::Object with self::M1 {
-  synthetic constructor •() → self::_B&Object&M1
+  const synthetic constructor •() → self::_B&Object&M1
     : super core::Object::•()
     ;
 }
 abstract class _B&Object&M1&M2 = self::_B&Object&M1 with self::M2 {
-  synthetic constructor •() → self::_B&Object&M1&M2
+  const synthetic constructor •() → self::_B&Object&M1&M2
     : super self::_B&Object&M1::•()
     ;
 }
 class B extends self::_B&Object&M1&M2 {
   constructor •(dynamic value) → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M1&M2::•()
     ;
 }
 abstract class M1 extends core::Object {
@@ -32,18 +32,18 @@
     return core::print("M2");
 }
 abstract class _C&Object&M1 = core::Object with self::M1 {
-  synthetic constructor •() → self::_C&Object&M1
+  const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
 }
 abstract class _C&Object&M1&M2 = self::_C&Object&M1 with self::M2 {
-  synthetic constructor •() → self::_C&Object&M1&M2
+  const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
 }
 class C extends self::_C&Object&M1&M2 {
   constructor •(dynamic value) → self::C
-    : super core::Object::•()
+    : super self::_C&Object&M1&M2::•()
     ;
 }
 abstract class G1<T extends core::Object = dynamic> extends core::Object {
@@ -54,13 +54,13 @@
     return core::print(self::G1::T);
 }
 abstract class _D&Object&G1<S extends core::Object = dynamic> = core::Object with self::G1<self::_D&Object&G1::S> {
-  synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
+  const synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
     : super core::Object::•()
     ;
 }
 class D<S extends core::Object = dynamic> extends self::_D&Object&G1<self::D::S> {
   synthetic constructor •() → self::D<self::D::S>
-    : super core::Object::•()
+    : super self::_D&Object&G1::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/mixin.dart.legacy.transformed.expect
index 7152f91..874cadf 100644
--- a/pkg/front_end/testcases/mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/mixin.dart.legacy.transformed.expect
@@ -3,14 +3,14 @@
 import "dart:core" as core;
 
 abstract class _B&Object&M1 extends core::Object implements self::M1 {
-  synthetic constructor •() → self::_B&Object&M1
+  const synthetic constructor •() → self::_B&Object&M1
     : super core::Object::•()
     ;
   method m() → dynamic
     return core::print("M1");
 }
 abstract class _B&Object&M1&M2 extends self::_B&Object&M1 implements self::M2 {
-  synthetic constructor •() → self::_B&Object&M1&M2
+  const synthetic constructor •() → self::_B&Object&M1&M2
     : super self::_B&Object&M1::•()
     ;
   method m() → dynamic
@@ -18,7 +18,7 @@
 }
 class B extends self::_B&Object&M1&M2 {
   constructor •(dynamic value) → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M1&M2::•()
     ;
 }
 abstract class M1 extends core::Object {
@@ -36,14 +36,14 @@
     return core::print("M2");
 }
 abstract class _C&Object&M1 extends core::Object implements self::M1 {
-  synthetic constructor •() → self::_C&Object&M1
+  const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
   method m() → dynamic
     return core::print("M1");
 }
 abstract class _C&Object&M1&M2 extends self::_C&Object&M1 implements self::M2 {
-  synthetic constructor •() → self::_C&Object&M1&M2
+  const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
   method m() → dynamic
@@ -51,7 +51,7 @@
 }
 class C extends self::_C&Object&M1&M2 {
   constructor •(dynamic value) → self::C
-    : super core::Object::•()
+    : super self::_C&Object&M1&M2::•()
     ;
 }
 abstract class G1<T extends core::Object = dynamic> extends core::Object {
@@ -62,7 +62,7 @@
     return core::print(self::G1::T);
 }
 abstract class _D&Object&G1<S extends core::Object = dynamic> extends core::Object implements self::G1<self::_D&Object&G1::S> {
-  synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
+  const synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
     : super core::Object::•()
     ;
   method m() → dynamic
@@ -70,7 +70,7 @@
 }
 class D<S extends core::Object = dynamic> extends self::_D&Object&G1<self::D::S> {
   synthetic constructor •() → self::D<self::D::S>
-    : super core::Object::•()
+    : super self::_D&Object&G1::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin.dart.outline.expect b/pkg/front_end/testcases/mixin.dart.outline.expect
index 989554e..2ab6aaa 100644
--- a/pkg/front_end/testcases/mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/mixin.dart.outline.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 abstract class _B&Object&M1 = core::Object with self::M1 {
-  synthetic constructor •() → self::_B&Object&M1
+  const synthetic constructor •() → self::_B&Object&M1
     : super core::Object::•()
     ;
 }
 abstract class _B&Object&M1&M2 = self::_B&Object&M1 with self::M2 {
-  synthetic constructor •() → self::_B&Object&M1&M2
+  const synthetic constructor •() → self::_B&Object&M1&M2
     : super self::_B&Object&M1::•()
     ;
 }
@@ -29,12 +29,12 @@
     ;
 }
 abstract class _C&Object&M1 = core::Object with self::M1 {
-  synthetic constructor •() → self::_C&Object&M1
+  const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
 }
 abstract class _C&Object&M1&M2 = self::_C&Object&M1 with self::M2 {
-  synthetic constructor •() → self::_C&Object&M1&M2
+  const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
 }
@@ -49,7 +49,7 @@
     ;
 }
 abstract class _D&Object&G1<S extends core::Object = dynamic> = core::Object with self::G1<self::_D&Object&G1::S> {
-  synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
+  const synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/mixin.dart.strong.expect b/pkg/front_end/testcases/mixin.dart.strong.expect
index f3bc002..3325ecd 100644
--- a/pkg/front_end/testcases/mixin.dart.strong.expect
+++ b/pkg/front_end/testcases/mixin.dart.strong.expect
@@ -3,18 +3,18 @@
 import "dart:core" as core;
 
 abstract class _B&Object&M1 = core::Object with self::M1 {
-  synthetic constructor •() → self::_B&Object&M1
+  const synthetic constructor •() → self::_B&Object&M1
     : super core::Object::•()
     ;
 }
 abstract class _B&Object&M1&M2 = self::_B&Object&M1 with self::M2 {
-  synthetic constructor •() → self::_B&Object&M1&M2
+  const synthetic constructor •() → self::_B&Object&M1&M2
     : super self::_B&Object&M1::•()
     ;
 }
 class B extends self::_B&Object&M1&M2 {
   constructor •(dynamic value) → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M1&M2::•()
     ;
 }
 abstract class M1 extends core::Object {
@@ -32,18 +32,18 @@
     return core::print("M2");
 }
 abstract class _C&Object&M1 = core::Object with self::M1 {
-  synthetic constructor •() → self::_C&Object&M1
+  const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
 }
 abstract class _C&Object&M1&M2 = self::_C&Object&M1 with self::M2 {
-  synthetic constructor •() → self::_C&Object&M1&M2
+  const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
 }
 class C extends self::_C&Object&M1&M2 {
   constructor •(dynamic value) → self::C
-    : super core::Object::•()
+    : super self::_C&Object&M1&M2::•()
     ;
 }
 abstract class G1<T extends core::Object = dynamic> extends core::Object {
@@ -54,13 +54,13 @@
     return core::print(self::G1::T);
 }
 abstract class _D&Object&G1<S extends core::Object = dynamic> = core::Object with self::G1<self::_D&Object&G1::S> {
-  synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
+  const synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
     : super core::Object::•()
     ;
 }
 class D<S extends core::Object = dynamic> extends self::_D&Object&G1<self::D::S> {
   synthetic constructor •() → self::D<self::D::S>
-    : super core::Object::•()
+    : super self::_D&Object&G1::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin.dart.strong.transformed.expect b/pkg/front_end/testcases/mixin.dart.strong.transformed.expect
index 3dff5eb..124f59c 100644
--- a/pkg/front_end/testcases/mixin.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/mixin.dart.strong.transformed.expect
@@ -3,14 +3,14 @@
 import "dart:core" as core;
 
 abstract class _B&Object&M1 extends core::Object implements self::M1 {
-  synthetic constructor •() → self::_B&Object&M1
+  const synthetic constructor •() → self::_B&Object&M1
     : super core::Object::•()
     ;
   method m() → dynamic
     return core::print("M1");
 }
 abstract class _B&Object&M1&M2 extends self::_B&Object&M1 implements self::M2 {
-  synthetic constructor •() → self::_B&Object&M1&M2
+  const synthetic constructor •() → self::_B&Object&M1&M2
     : super self::_B&Object&M1::•()
     ;
   method m() → dynamic
@@ -18,7 +18,7 @@
 }
 class B extends self::_B&Object&M1&M2 {
   constructor •(dynamic value) → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M1&M2::•()
     ;
 }
 abstract class M1 extends core::Object {
@@ -36,14 +36,14 @@
     return core::print("M2");
 }
 abstract class _C&Object&M1 extends core::Object implements self::M1 {
-  synthetic constructor •() → self::_C&Object&M1
+  const synthetic constructor •() → self::_C&Object&M1
     : super core::Object::•()
     ;
   method m() → dynamic
     return core::print("M1");
 }
 abstract class _C&Object&M1&M2 extends self::_C&Object&M1 implements self::M2 {
-  synthetic constructor •() → self::_C&Object&M1&M2
+  const synthetic constructor •() → self::_C&Object&M1&M2
     : super self::_C&Object&M1::•()
     ;
   method m() → dynamic
@@ -51,7 +51,7 @@
 }
 class C extends self::_C&Object&M1&M2 {
   constructor •(dynamic value) → self::C
-    : super core::Object::•()
+    : super self::_C&Object&M1&M2::•()
     ;
 }
 abstract class G1<T extends core::Object = dynamic> extends core::Object {
@@ -62,7 +62,7 @@
     return core::print(self::G1::T);
 }
 abstract class _D&Object&G1<S extends core::Object = dynamic> extends core::Object implements self::G1<self::_D&Object&G1::S> {
-  synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
+  const synthetic constructor •() → self::_D&Object&G1<self::_D&Object&G1::S>
     : super core::Object::•()
     ;
   method m() → dynamic
@@ -70,7 +70,7 @@
 }
 class D<S extends core::Object = dynamic> extends self::_D&Object&G1<self::D::S> {
   synthetic constructor •() → self::D<self::D::S>
-    : super core::Object::•()
+    : super self::_D&Object&G1::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin_application_override.dart.legacy.expect b/pkg/front_end/testcases/mixin_application_override.dart.legacy.expect
index 142551c..52129f0 100644
--- a/pkg/front_end/testcases/mixin_application_override.dart.legacy.expect
+++ b/pkg/front_end/testcases/mixin_application_override.dart.legacy.expect
@@ -233,7 +233,7 @@
 }
 class B0 extends self::_B0&S&M {
   synthetic constructor •() → self::B0
-    : super self::S::•()
+    : super self::_B0&S&M::•()
     ;
 }
 abstract class _B1&S&M1 = self::S with self::M1 {
@@ -248,7 +248,7 @@
 }
 class B1 extends self::_B1&S&M1&M {
   synthetic constructor •() → self::B1
-    : super self::S::•()
+    : super self::_B1&S&M1&M::•()
     ;
 }
 abstract class _B2&S&M1 = self::S with self::M1 {
@@ -268,7 +268,7 @@
 }
 class B2 extends self::_B2&S&M1&M2&M {
   synthetic constructor •() → self::B2
-    : super self::S::•()
+    : super self::_B2&S&M1&M2&M::•()
     ;
 }
 abstract class _B0X&S&M = self::S with self::M {
@@ -283,7 +283,7 @@
 }
 class B0X extends self::_B0X&S&M&MX {
   synthetic constructor •() → self::B0X
-    : super self::S::•()
+    : super self::_B0X&S&M&MX::•()
     ;
 }
 abstract class _B1X&S&M1 = self::S with self::M1 {
@@ -303,7 +303,7 @@
 }
 class B1X extends self::_B1X&S&M1&M&MX {
   synthetic constructor •() → self::B1X
-    : super self::S::•()
+    : super self::_B1X&S&M1&M&MX::•()
     ;
 }
 abstract class _B2X&S&M1 = self::S with self::M1 {
@@ -328,7 +328,7 @@
 }
 class B2X extends self::_B2X&S&M1&M2&M&MX {
   synthetic constructor •() → self::B2X
-    : super self::S::•()
+    : super self::_B2X&S&M1&M2&M&MX::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/mixin_application_override.dart.legacy.transformed.expect b/pkg/front_end/testcases/mixin_application_override.dart.legacy.transformed.expect
index 94d1bd7..381523a 100644
--- a/pkg/front_end/testcases/mixin_application_override.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/mixin_application_override.dart.legacy.transformed.expect
@@ -118,7 +118,7 @@
 }
 class B0 extends self::_B0&S&M {
   synthetic constructor •() → self::B0
-    : super self::S::•()
+    : super self::_B0&S&M::•()
     ;
 }
 abstract class _B1&S&M1 extends self::S implements self::M1 {
@@ -134,7 +134,7 @@
 }
 class B1 extends self::_B1&S&M1&M {
   synthetic constructor •() → self::B1
-    : super self::S::•()
+    : super self::_B1&S&M1&M::•()
     ;
 }
 abstract class _B2&S&M1 extends self::S implements self::M1 {
@@ -155,7 +155,7 @@
 }
 class B2 extends self::_B2&S&M1&M2&M {
   synthetic constructor •() → self::B2
-    : super self::S::•()
+    : super self::_B2&S&M1&M2&M::•()
     ;
 }
 abstract class _B0X&S&M extends self::S implements self::M {
@@ -171,7 +171,7 @@
 }
 class B0X extends self::_B0X&S&M&MX {
   synthetic constructor •() → self::B0X
-    : super self::S::•()
+    : super self::_B0X&S&M&MX::•()
     ;
 }
 abstract class _B1X&S&M1 extends self::S implements self::M1 {
@@ -192,7 +192,7 @@
 }
 class B1X extends self::_B1X&S&M1&M&MX {
   synthetic constructor •() → self::B1X
-    : super self::S::•()
+    : super self::_B1X&S&M1&M&MX::•()
     ;
 }
 abstract class _B2X&S&M1 extends self::S implements self::M1 {
@@ -218,7 +218,7 @@
 }
 class B2X extends self::_B2X&S&M1&M2&M&MX {
   synthetic constructor •() → self::B2X
-    : super self::S::•()
+    : super self::_B2X&S&M1&M2&M&MX::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/mixin_application_override.dart.strong.expect b/pkg/front_end/testcases/mixin_application_override.dart.strong.expect
index a25b92f..c8c6a90 100644
--- a/pkg/front_end/testcases/mixin_application_override.dart.strong.expect
+++ b/pkg/front_end/testcases/mixin_application_override.dart.strong.expect
@@ -290,7 +290,7 @@
 }
 class B0 extends self::_B0&S&M {
   synthetic constructor •() → self::B0
-    : super self::S::•()
+    : super self::_B0&S&M::•()
     ;
 }
 abstract class _B1&S&M1 = self::S with self::M1 {
@@ -306,7 +306,7 @@
 }
 class B1 extends self::_B1&S&M1&M {
   synthetic constructor •() → self::B1
-    : super self::S::•()
+    : super self::_B1&S&M1&M::•()
     ;
 }
 abstract class _B2&S&M1 = self::S with self::M1 {
@@ -327,7 +327,7 @@
 }
 class B2 extends self::_B2&S&M1&M2&M {
   synthetic constructor •() → self::B2
-    : super self::S::•()
+    : super self::_B2&S&M1&M2&M::•()
     ;
 }
 abstract class _B0X&S&M = self::S with self::M {
@@ -343,7 +343,7 @@
 }
 class B0X extends self::_B0X&S&M&MX {
   synthetic constructor •() → self::B0X
-    : super self::S::•()
+    : super self::_B0X&S&M&MX::•()
     ;
 }
 abstract class _B1X&S&M1 = self::S with self::M1 {
@@ -364,7 +364,7 @@
 }
 class B1X extends self::_B1X&S&M1&M&MX {
   synthetic constructor •() → self::B1X
-    : super self::S::•()
+    : super self::_B1X&S&M1&M&MX::•()
     ;
 }
 abstract class _B2X&S&M1 = self::S with self::M1 {
@@ -390,7 +390,7 @@
 }
 class B2X extends self::_B2X&S&M1&M2&M&MX {
   synthetic constructor •() → self::B2X
-    : super self::S::•()
+    : super self::_B2X&S&M1&M2&M&MX::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.expect b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.expect
index daec74c..b9d9373 100644
--- a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.expect
+++ b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.expect
@@ -21,7 +21,7 @@
 }
 class E extends self::D {
   synthetic constructor •() → self::E
-    : super self::C::•()
+    : super self::D::•()
     ;
 }
 abstract class _F&C&M = self::C<core::int> with self::M {
@@ -31,7 +31,7 @@
 }
 class F extends self::_F&C&M {
   synthetic constructor •() → self::F
-    : super self::C::•()
+    : super self::_F&C&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.transformed.expect b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.transformed.expect
index ce12709..3e9f1e9 100644
--- a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.legacy.transformed.expect
@@ -21,7 +21,7 @@
 }
 class E extends self::D {
   synthetic constructor •() → self::E
-    : super self::C::•()
+    : super self::D::•()
     ;
 }
 abstract class _F&C&M extends self::C<core::int> implements self::M {
@@ -31,7 +31,7 @@
 }
 class F extends self::_F&C&M {
   synthetic constructor •() → self::F
-    : super self::C::•()
+    : super self::_F&C&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.expect b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.expect
index c3bb2f6..67701f2 100644
--- a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.expect
+++ b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.expect
@@ -21,7 +21,7 @@
 }
 class E extends self::D {
   synthetic constructor •() → self::E
-    : super self::C::•()
+    : super self::D::•()
     ;
 }
 abstract class _F&C&M = self::C<core::int> with self::M {
@@ -31,7 +31,7 @@
 }
 class F extends self::_F&C&M {
   synthetic constructor •() → self::F
-    : super self::C::•()
+    : super self::_F&C&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.transformed.expect b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.transformed.expect
index 97235bc..e52a7ff 100644
--- a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.strong.transformed.expect
@@ -21,7 +21,7 @@
 }
 class E extends self::D {
   synthetic constructor •() → self::E
-    : super self::C::•()
+    : super self::D::•()
     ;
 }
 abstract class _F&C&M extends self::C<core::int> implements self::M {
@@ -31,7 +31,7 @@
 }
 class F extends self::_F&C&M {
   synthetic constructor •() → self::F
-    : super self::C::•()
+    : super self::_F&C&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
index 0efea2e..fb518e4 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
@@ -28,7 +28,7 @@
 }
 class Foo extends self::_Foo&Object&C {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&C::•()
     ;
 }
 class B extends self::A {
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
index 43b415d..9db2af2 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
@@ -32,7 +32,7 @@
 }
 class Foo extends self::_Foo&Object&C {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&C::•()
     ;
 }
 class B extends self::A {
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.expect
index 0b74544..b73697b 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.expect
@@ -28,7 +28,7 @@
 }
 class Foo extends self::_Foo&Object&C {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&C::•()
     ;
 }
 class B extends self::A {
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.transformed.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.transformed.expect
index bab35f4..6b38260 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.strong.transformed.expect
@@ -32,7 +32,7 @@
 }
 class Foo extends self::_Foo&Object&C {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&C::•()
     ;
 }
 class B extends self::A {
diff --git a/pkg/front_end/testcases/named_function_scope.dart.legacy.expect b/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
index f72549c..434f796 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
@@ -133,7 +133,7 @@
                                                 ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
         T() {};
         ^" in let final () → self::T T = () → self::T {} in T;
   }
@@ -143,7 +143,7 @@
                                               ^";
   }
   {
-    dynamic x = let final dynamic #t3 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
         ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect b/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
index 08b6a24..5a63c13 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
@@ -52,7 +52,7 @@
                                                 ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
         T() {};
         ^" in let final () → self::T T = () → self::T {} in T;
   }
@@ -62,7 +62,7 @@
                                               ^";
   }
   {
-    dynamic x = let final dynamic #t3 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
         ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.strong.expect b/pkg/front_end/testcases/named_function_scope.dart.strong.expect
index e178628..4a5f48d 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.strong.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.strong.expect
@@ -137,7 +137,7 @@
                                                 ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
         T() {};
         ^" in let final () → self::T T = () → self::T {} in T;
   }
@@ -147,7 +147,7 @@
                                               ^" as{TypeError} self::V;
   }
   {
-    dynamic x = let final dynamic #t3 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
         ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect b/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
index 4405962..d3e6f09 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
@@ -56,7 +56,7 @@
                                                 ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
         T() {};
         ^" in let final () → self::T T = () → self::T {} in T;
   }
@@ -66,7 +66,7 @@
                                               ^" as{TypeError} self::V;
   }
   {
-    dynamic x = let final dynamic #t3 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
         ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.expect
index ef2820d..0e0e756 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.expect
@@ -22,13 +22,13 @@
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _C&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_C&Object&B
+  const synthetic constructor •() → self::_C&Object&B
     : super core::Object::•()
     ;
 }
 class C extends self::_C&Object&B {
   synthetic constructor •() → self::C
-    : super core::Object::•()
+    : super self::_C&Object&B::•()
     ;
   get foo() → core::int
     return 42;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.transformed.expect
index 6a81396..e0f993c 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.legacy.transformed.expect
@@ -22,7 +22,7 @@
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _C&Object&B extends core::Object implements self::B {
-  synthetic constructor •() → self::_C&Object&B
+  const synthetic constructor •() → self::_C&Object&B
     : super core::Object::•()
     ;
   method noSuchMethod(dynamic i) → dynamic {
@@ -32,7 +32,7 @@
 }
 class C extends self::_C&Object&B {
   synthetic constructor •() → self::C
-    : super core::Object::•()
+    : super self::_C&Object&B::•()
     ;
   get foo() → core::int
     return 42;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.outline.expect
index 563fd5e..d92df10 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _C&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_C&Object&B
+  const synthetic constructor •() → self::_C&Object&B
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.expect
index b00b8c0..44c8cbf 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.expect
@@ -22,13 +22,13 @@
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _C&Object&B = core::Object with self::B {
-  synthetic constructor •() → self::_C&Object&B
+  const synthetic constructor •() → self::_C&Object&B
     : super core::Object::•()
     ;
 }
 class C extends self::_C&Object&B {
   synthetic constructor •() → self::C
-    : super core::Object::•()
+    : super self::_C&Object&B::•()
     ;
   get foo() → core::int
     return 42;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.transformed.expect
index 72a6cef..0685d8a 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.strong.transformed.expect
@@ -22,7 +22,7 @@
     return this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo=, 2, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[value]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _C&Object&B extends core::Object implements self::B {
-  synthetic constructor •() → self::_C&Object&B
+  const synthetic constructor •() → self::_C&Object&B
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic {
@@ -32,7 +32,7 @@
 }
 class C extends self::_C&Object&B {
   synthetic constructor •() → self::C
-    : super core::Object::•()
+    : super self::_C&Object&B::•()
     ;
   get foo() → core::int
     return 42;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.expect
index 5881215..521bedd 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.expect
@@ -30,7 +30,7 @@
 }
 class C extends self::_C&A&B {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.transformed.expect
index 32a808d..528ca88 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.legacy.transformed.expect
@@ -32,7 +32,7 @@
 }
 class C extends self::_C&A&B {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.expect
index 1418146..b71a516 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.expect
@@ -30,7 +30,7 @@
 }
 class C extends self::_C&A&B {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.transformed.expect
index 193af7a..7cd29a7 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.strong.transformed.expect
@@ -32,7 +32,7 @@
 }
 class C extends self::_C&A&B {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&B::•()
     ;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.expect
index a385598..d4ed912 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.expect
@@ -18,13 +18,13 @@
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&A = core::Object with self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.transformed.expect
index eda31a1..a14c6c9 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&A extends core::Object implements self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic
@@ -26,7 +26,7 @@
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.outline.expect
index a8727f8..93b22a1 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.outline.expect
@@ -16,7 +16,7 @@
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&A = core::Object with self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.expect
index a385598..d4ed912 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.expect
@@ -18,13 +18,13 @@
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&A = core::Object with self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.transformed.expect
index eda31a1..a14c6c9 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.strong.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&A extends core::Object implements self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic
@@ -26,7 +26,7 @@
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.expect
index a86290b..3dfcd26 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.expect
@@ -19,25 +19,25 @@
     return null;
 }
 abstract class _A&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
 }
 class A extends self::_A&Object&M implements self::I {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_B&Object&M
+  const synthetic constructor •() → self::_B&Object&M
     : super core::Object::•()
     ;
 }
 class B extends self::_B&Object&M implements self::I {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.transformed.expect
index 6d9efb3..4fcf0c6 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
     return null;
 }
 abstract class _A&Object&M extends core::Object implements self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic
@@ -27,13 +27,13 @@
 }
 class A extends self::_A&Object&M implements self::I {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&M extends core::Object implements self::M {
-  synthetic constructor •() → self::_B&Object&M
+  const synthetic constructor •() → self::_B&Object&M
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic
@@ -41,7 +41,7 @@
 }
 class B extends self::_B&Object&M implements self::I {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.outline.expect
index bcda192..a887c64 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.outline.expect
@@ -17,7 +17,7 @@
     ;
 }
 abstract class _A&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
 }
@@ -28,7 +28,7 @@
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_B&Object&M
+  const synthetic constructor •() → self::_B&Object&M
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.expect
index a86290b..3dfcd26 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.expect
@@ -19,25 +19,25 @@
     return null;
 }
 abstract class _A&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
 }
 class A extends self::_A&Object&M implements self::I {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_B&Object&M
+  const synthetic constructor •() → self::_B&Object&M
     : super core::Object::•()
     ;
 }
 class B extends self::_B&Object&M implements self::I {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.transformed.expect
index 6d9efb3..4fcf0c6 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.strong.transformed.expect
@@ -19,7 +19,7 @@
     return null;
 }
 abstract class _A&Object&M extends core::Object implements self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic
@@ -27,13 +27,13 @@
 }
 class A extends self::_A&Object&M implements self::I {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 abstract class _B&Object&M extends core::Object implements self::M {
-  synthetic constructor •() → self::_B&Object&M
+  const synthetic constructor •() → self::_B&Object&M
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic
@@ -41,7 +41,7 @@
 }
 class B extends self::_B&Object&M implements self::I {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&M::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.expect
index 3155d8f..3ca45b1 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.expect
@@ -11,13 +11,13 @@
   }
 }
 abstract class _B&Object&A = core::Object with self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.transformed.expect
index d91cc25..f9187d1 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.legacy.transformed.expect
@@ -11,7 +11,7 @@
   }
 }
 abstract class _B&Object&A extends core::Object implements self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic {
@@ -20,7 +20,7 @@
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.outline.expect
index 3ea742b..7cfd576 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.outline.expect
@@ -9,7 +9,7 @@
     ;
 }
 abstract class _B&Object&A = core::Object with self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.expect
index 3155d8f..3ca45b1 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.expect
@@ -11,13 +11,13 @@
   }
 }
 abstract class _B&Object&A = core::Object with self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.transformed.expect
index d91cc25..f9187d1 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.strong.transformed.expect
@@ -11,7 +11,7 @@
   }
 }
 abstract class _B&Object&A extends core::Object implements self::A {
-  synthetic constructor •() → self::_B&Object&A
+  const synthetic constructor •() → self::_B&Object&A
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic {
@@ -20,7 +20,7 @@
 }
 class B extends self::_B&Object&A {
   synthetic constructor •() → self::B
-    : super core::Object::•()
+    : super self::_B&Object&A::•()
     ;
   no-such-method-forwarder method foo() → void
     return this.{self::A::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.expect
index e055260..af73d67 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.expect
@@ -2,16 +2,16 @@
 //
 // pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Error: Can't declare a member that conflicts with an inherited one.
 //   void foo(int x) {}
-//        ^
+//        ^^^
 // pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Context: This is the inherited member.
 //   void set foo(int x);
-//            ^
+//            ^^^
 
 // Unhandled errors:
 //
 // pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Error: Can't declare a member that conflicts with an inherited one.
 //   void foo(int x) {}
-//        ^
+//        ^^^
 
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.transformed.expect
index f8ff1c7..37f1f55 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.legacy.transformed.expect
@@ -2,7 +2,7 @@
 //
 // pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Error: Can't declare a member that conflicts with an inherited one.
 //   void foo(int x) {}
-//        ^
+//        ^^^
 
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.outline.expect
index d3c1457..51ebf0c 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.outline.expect
@@ -2,10 +2,10 @@
 //
 // pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Error: Can't declare a member that conflicts with an inherited one.
 //   void foo(int x) {}
-//        ^
+//        ^^^
 // pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Context: This is the inherited member.
 //   void set foo(int x);
-//            ^
+//            ^^^
 
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.expect
index 0e43ba4..7711967 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.expect
@@ -17,13 +17,13 @@
   }
 }
 abstract class _A&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
 }
 class A extends self::_A&Object&M implements self::I<core::int> {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → core::int
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.transformed.expect
index 047bcf3..eb168b2 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.legacy.transformed.expect
@@ -17,7 +17,7 @@
   }
 }
 abstract class _A&Object&M extends core::Object implements self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic {
@@ -26,7 +26,7 @@
 }
 class A extends self::_A&Object&M implements self::I<core::int> {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → core::int
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.outline.expect
index 199bd26..d96e5bd 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.outline.expect
@@ -14,7 +14,7 @@
     ;
 }
 abstract class _A&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.expect
index 0e43ba4..7711967 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.expect
@@ -17,13 +17,13 @@
   }
 }
 abstract class _A&Object&M = core::Object with self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
 }
 class A extends self::_A&Object&M implements self::I<core::int> {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → core::int
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.transformed.expect
index 047bcf3..eb168b2 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.strong.transformed.expect
@@ -17,7 +17,7 @@
   }
 }
 abstract class _A&Object&M extends core::Object implements self::M {
-  synthetic constructor •() → self::_A&Object&M
+  const synthetic constructor •() → self::_A&Object&M
     : super core::Object::•()
     ;
   method noSuchMethod(core::Invocation i) → dynamic {
@@ -26,7 +26,7 @@
 }
 class A extends self::_A&Object&M implements self::I<core::int> {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&M::•()
     ;
   no-such-method-forwarder method foo() → core::int
     return this.{self::M::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/outline.status b/pkg/front_end/testcases/outline.status
index 3199cdb..da7ac91 100644
--- a/pkg/front_end/testcases/outline.status
+++ b/pkg/front_end/testcases/outline.status
@@ -241,7 +241,6 @@
 inference/void_return_type_subtypes_dynamic: Fail
 
 rasta/issue_000045: Fail
-rasta/issue_000046: Fail
 rasta/issue_000047: Fail
 rasta/native_is_illegal: Pass # Issue 29763
 rasta/type_with_parse_error: Fail
diff --git a/pkg/front_end/testcases/qualified.dart.legacy.expect b/pkg/front_end/testcases/qualified.dart.legacy.expect
index cf5f613..a54701c 100644
--- a/pkg/front_end/testcases/qualified.dart.legacy.expect
+++ b/pkg/front_end/testcases/qualified.dart.legacy.expect
@@ -49,7 +49,7 @@
 }
 class WithMixin extends self::_WithMixin&Supertype&Mixin {
   synthetic constructor •() → self::WithMixin
-    : super lib::Supertype::•()
+    : super self::_WithMixin&Supertype&Mixin::•()
     ;
 }
 class IllegalSupertype extends core::Object {
diff --git a/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect b/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect
index 020e7a3..20d9d18 100644
--- a/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect
@@ -31,7 +31,7 @@
 }
 class WithMixin extends self::_WithMixin&Supertype&Mixin {
   synthetic constructor •() → self::WithMixin
-    : super lib::Supertype::•()
+    : super self::_WithMixin&Supertype&Mixin::•()
     ;
 }
 class IllegalSupertype extends core::Object {
diff --git a/pkg/front_end/testcases/qualified.dart.outline.expect b/pkg/front_end/testcases/qualified.dart.outline.expect
index 42db141..fb0b74d 100644
--- a/pkg/front_end/testcases/qualified.dart.outline.expect
+++ b/pkg/front_end/testcases/qualified.dart.outline.expect
@@ -32,6 +32,7 @@
 }
 abstract class _WithMixin&Supertype&Mixin = lib::Supertype with lib::Mixin {
   synthetic constructor •() → self::_WithMixin&Supertype&Mixin
+    : super lib::Supertype::•()
     ;
 }
 class WithMixin extends self::_WithMixin&Supertype&Mixin {
diff --git a/pkg/front_end/testcases/qualified.dart.strong.expect b/pkg/front_end/testcases/qualified.dart.strong.expect
index f36c315..4ad22bd 100644
--- a/pkg/front_end/testcases/qualified.dart.strong.expect
+++ b/pkg/front_end/testcases/qualified.dart.strong.expect
@@ -53,7 +53,7 @@
 }
 class WithMixin extends self::_WithMixin&Supertype&Mixin {
   synthetic constructor •() → self::WithMixin
-    : super lib::Supertype::•()
+    : super self::_WithMixin&Supertype&Mixin::•()
     ;
 }
 class IllegalSupertype extends core::Object {
diff --git a/pkg/front_end/testcases/qualified.dart.strong.transformed.expect b/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
index c067a36..937b2a4 100644
--- a/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
@@ -35,7 +35,7 @@
 }
 class WithMixin extends self::_WithMixin&Supertype&Mixin {
   synthetic constructor •() → self::WithMixin
-    : super lib::Supertype::•()
+    : super self::_WithMixin&Supertype&Mixin::•()
     ;
 }
 class IllegalSupertype extends core::Object {
diff --git a/pkg/front_end/testcases/rasta/class_hierarchy.dart.legacy.expect b/pkg/front_end/testcases/rasta/class_hierarchy.dart.legacy.expect
index 73a23ec..504291a 100644
--- a/pkg/front_end/testcases/rasta/class_hierarchy.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/class_hierarchy.dart.legacy.expect
@@ -1,18 +1,69 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:9:7: Error: The type 'Missing' can't be mixed in.
+// class C = Object with Missing;
+//       ^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:5:17: Error: Type 'Missing' not found.
+// class A extends Missing {}
+//                 ^^^^^^^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:7:20: Error: Type 'Missing' not found.
+// class B implements Missing {}
+//                    ^^^^^^^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:9:23: Error: Type 'Missing' not found.
+// class C = Object with Missing;
+//                       ^^^^^^^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:12:17: Warning: Couldn't find constructor 'Missing'.
+//   factory D() = Missing;
+//                 ^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:12:11: Warning: Redirection constructor target not found: 'Missing'
+//   factory D() = Missing;
+//           ^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:12:11: Warning: Method not found: 'Missing'.
+//   factory D() = Missing;
+//           ^^^^^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:9:7: Error: The type 'Missing' can't be mixed in.
+// class C = Object with Missing;
+//       ^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:5:17: Error: Type 'Missing' not found.
+// class A extends Missing {}
+//                 ^^^^^^^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:7:20: Error: Type 'Missing' not found.
+// class B implements Missing {}
+//                    ^^^^^^^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:9:23: Error: Type 'Missing' not found.
+// class C = Object with Missing;
+//                       ^^^^^^^
+
 library;
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
   synthetic constructor •() → self::A
-    : invalid-initializer;
+    : super core::Object::•()
+    ;
 }
 class B extends core::Object {
   synthetic constructor •() → self::B
-    : invalid-initializer;
+    : super core::Object::•()
+    ;
 }
 class C extends core::Object {
-  constructor •() → dynamic
-    : invalid-initializer;
+  const synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
 }
 class D extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::D::•];
@@ -23,5 +74,5 @@
   new self::A::•();
   new self::B::•();
   new self::C::•();
-  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Missing, 32, null, <dynamic>[].toList(growable: false), <dynamic, dynamic>{}));
+  let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Missing, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/rasta/class_hierarchy.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/class_hierarchy.dart.legacy.transformed.expect
new file mode 100644
index 0000000..2574251
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/class_hierarchy.dart.legacy.transformed.expect
@@ -0,0 +1,48 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:9:7: Error: The type 'Missing' can't be mixed in.
+// class C = Object with Missing;
+//       ^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:5:17: Error: Type 'Missing' not found.
+// class A extends Missing {}
+//                 ^^^^^^^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:7:20: Error: Type 'Missing' not found.
+// class B implements Missing {}
+//                    ^^^^^^^
+//
+// pkg/front_end/testcases/rasta/class_hierarchy.dart:9:23: Error: Type 'Missing' not found.
+// class C = Object with Missing;
+//                       ^^^^^^^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends core::Object {
+  synthetic constructor •() → self::B
+    : super core::Object::•()
+    ;
+}
+class C extends core::Object {
+  const synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+}
+class D extends core::Object {
+  static field dynamic _redirecting# = <dynamic>[self::D::•];
+  static factory •() → self::D
+    let dynamic #redirecting_factory = "Missing" in invalid-expression;
+}
+static method main() → void {
+  new self::A::•();
+  new self::B::•();
+  new self::C::•();
+  let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Missing, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+}
diff --git a/pkg/front_end/testcases/rasta/class_hierarchy.dart.outline.expect b/pkg/front_end/testcases/rasta/class_hierarchy.dart.outline.expect
index 85e236b..e9ad29f 100644
--- a/pkg/front_end/testcases/rasta/class_hierarchy.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/class_hierarchy.dart.outline.expect
@@ -37,7 +37,7 @@
     ;
 }
 class C extends core::Object {
-  synthetic constructor •() → self::C
+  const synthetic constructor •() → self::C
     : super core::Object::•()
     ;
 }
diff --git a/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.expect b/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.expect
index 9580383..6ea6019 100644
--- a/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.expect
@@ -69,7 +69,7 @@
     ;
 }
 class C extends core::Object {
-  synthetic constructor •() → self::C
+  const synthetic constructor •() → self::C
     : super core::Object::•()
     ;
 }
@@ -82,7 +82,7 @@
   new self::A::•();
   new self::B::•();
   new self::C::•();
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/class_hierarchy.dart:12:11: Error: Method not found: 'Missing'.
+  invalid-expression "pkg/front_end/testcases/rasta/class_hierarchy.dart:12:11: Error: Method not found: 'Missing'.
   factory D() = Missing;
           ^^^^^^^";
 }
diff --git a/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.transformed.expect
index b0ed08e..7426197 100644
--- a/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/class_hierarchy.dart.strong.transformed.expect
@@ -39,7 +39,7 @@
     ;
 }
 class C extends core::Object {
-  synthetic constructor •() → self::C
+  const synthetic constructor •() → self::C
     : super core::Object::•()
     ;
 }
@@ -52,7 +52,7 @@
   new self::A::•();
   new self::B::•();
   new self::C::•();
-  let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/class_hierarchy.dart:12:11: Error: Method not found: 'Missing'.
+  invalid-expression "pkg/front_end/testcases/rasta/class_hierarchy.dart:12:11: Error: Method not found: 'Missing'.
   factory D() = Missing;
           ^^^^^^^";
 }
diff --git a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.expect b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.expect
index cb6cde6..7bfef12 100644
--- a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.expect
@@ -20,6 +20,6 @@
 }
 class A extends self::_A&Object&Mixin&Mixin {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&Mixin&Mixin::•()
     ;
 }
diff --git a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.transformed.expect
index d3c872e..25d8b41 100644
--- a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.legacy.transformed.expect
@@ -22,6 +22,6 @@
 }
 class A extends self::_A&Object&Mixin&Mixin {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&Mixin&Mixin::•()
     ;
 }
diff --git a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.expect b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.expect
index cb6cde6..7bfef12 100644
--- a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.expect
@@ -20,6 +20,6 @@
 }
 class A extends self::_A&Object&Mixin&Mixin {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&Mixin&Mixin::•()
     ;
 }
diff --git a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.transformed.expect
index d3c872e..25d8b41 100644
--- a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.strong.transformed.expect
@@ -22,6 +22,6 @@
 }
 class A extends self::_A&Object&Mixin&Mixin {
   synthetic constructor •() → self::A
-    : super core::Object::•()
+    : super self::_A&Object&Mixin&Mixin::•()
     ;
 }
diff --git a/pkg/front_end/testcases/rasta/generic_factory.dart.strong.expect b/pkg/front_end/testcases/rasta/generic_factory.dart.strong.expect
index 2567031..c0465b0 100644
--- a/pkg/front_end/testcases/rasta/generic_factory.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/generic_factory.dart.strong.expect
@@ -8,19 +8,17 @@
 //   factory A.c() = Missing;
 //           ^
 //
-// pkg/front_end/testcases/rasta/generic_factory.dart:15:19: Error: The return type 'B<C1>' of the constructor 'B.a' isn't a subtype of 'A<T>'.
+// pkg/front_end/testcases/rasta/generic_factory.dart:15:19: Error: The constructor function type 'B<C1> Function()' isn't a subtype of 'A<T> Function()'.
 //  - 'B' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'C1' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory A.b() = B<C1>.a;
 //                   ^
 //
-// pkg/front_end/testcases/rasta/generic_factory.dart:23:19: Error: The return type 'C<C2>' of the constructor 'C' isn't a subtype of 'B<S>'.
+// pkg/front_end/testcases/rasta/generic_factory.dart:23:19: Error: The constructor function type 'C<C2> Function()' isn't a subtype of 'B<S> Function()'.
 //  - 'C' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'C2' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'B' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory B.b() = C<C2>;
 //                   ^
 //
@@ -38,19 +36,17 @@
 //   factory A.c() = Missing;
 //           ^
 //
-// pkg/front_end/testcases/rasta/generic_factory.dart:15:19: Error: The return type 'B<C1>' of the constructor 'B.a' isn't a subtype of 'A<T>'.
+// pkg/front_end/testcases/rasta/generic_factory.dart:15:19: Error: The constructor function type 'B<C1> Function()' isn't a subtype of 'A<T> Function()'.
 //  - 'B' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'C1' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory A.b() = B<C1>.a;
 //                   ^
 //
-// pkg/front_end/testcases/rasta/generic_factory.dart:23:19: Error: The return type 'C<C2>' of the constructor 'C' isn't a subtype of 'B<S>'.
+// pkg/front_end/testcases/rasta/generic_factory.dart:23:19: Error: The constructor function type 'C<C2> Function()' isn't a subtype of 'B<S> Function()'.
 //  - 'C' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'C2' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'B' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory B.b() = C<C2>;
 //                   ^
 
@@ -105,7 +101,7 @@
   new self::C::•<self::C1>();
   new self::C::•<self::C3>();
   new self::C::•<self::C2>();
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/generic_factory.dart:16:11: Error: Method not found: 'Missing'.
+  invalid-expression "pkg/front_end/testcases/rasta/generic_factory.dart:16:11: Error: Method not found: 'Missing'.
   factory A.c() = Missing;
           ^^^^^^^";
 }
diff --git a/pkg/front_end/testcases/rasta/generic_factory.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/generic_factory.dart.strong.transformed.expect
index 4c7496d..d931017 100644
--- a/pkg/front_end/testcases/rasta/generic_factory.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/generic_factory.dart.strong.transformed.expect
@@ -8,19 +8,17 @@
 //   factory A.c() = Missing;
 //           ^
 //
-// pkg/front_end/testcases/rasta/generic_factory.dart:15:19: Error: The return type 'B<C1>' of the constructor 'B.a' isn't a subtype of 'A<T>'.
+// pkg/front_end/testcases/rasta/generic_factory.dart:15:19: Error: The constructor function type 'B<C1> Function()' isn't a subtype of 'A<T> Function()'.
 //  - 'B' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'C1' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory A.b() = B<C1>.a;
 //                   ^
 //
-// pkg/front_end/testcases/rasta/generic_factory.dart:23:19: Error: The return type 'C<C2>' of the constructor 'C' isn't a subtype of 'B<S>'.
+// pkg/front_end/testcases/rasta/generic_factory.dart:23:19: Error: The constructor function type 'C<C2> Function()' isn't a subtype of 'B<S> Function()'.
 //  - 'C' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'C2' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
 //  - 'B' is from 'pkg/front_end/testcases/rasta/generic_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory B.b() = C<C2>;
 //                   ^
 
@@ -75,7 +73,7 @@
   new self::C::•<self::C1>();
   new self::C::•<self::C3>();
   new self::C::•<self::C2>();
-  let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/generic_factory.dart:16:11: Error: Method not found: 'Missing'.
+  invalid-expression "pkg/front_end/testcases/rasta/generic_factory.dart:16:11: Error: Method not found: 'Missing'.
   factory A.c() = Missing;
           ^^^^^^^";
 }
diff --git a/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.expect
index a293cd7..16d9699 100644
--- a/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.expect
@@ -21,7 +21,7 @@
 }
 class Sub extends self::_Sub&Base&Mixin {
   synthetic constructor •() → self::Sub
-    : super self::Base::•()
+    : super self::_Sub&Base&Mixin::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.transformed.expect
index 7fb2814..c528ee0 100644
--- a/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000007.dart.legacy.transformed.expect
@@ -23,7 +23,7 @@
 }
 class Sub extends self::_Sub&Base&Mixin {
   synthetic constructor •() → self::Sub
-    : super self::Base::•()
+    : super self::_Sub&Base&Mixin::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/rasta/issue_000007.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000007.dart.strong.expect
index 11c3766..2df31da 100644
--- a/pkg/front_end/testcases/rasta/issue_000007.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000007.dart.strong.expect
@@ -21,7 +21,7 @@
 }
 class Sub extends self::_Sub&Base&Mixin {
   synthetic constructor •() → self::Sub
-    : super self::Base::•()
+    : super self::_Sub&Base&Mixin::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/rasta/issue_000007.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000007.dart.strong.transformed.expect
index 162a19d..70c6e40 100644
--- a/pkg/front_end/testcases/rasta/issue_000007.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000007.dart.strong.transformed.expect
@@ -23,7 +23,7 @@
 }
 class Sub extends self::_Sub&Base&Mixin {
   synthetic constructor •() → self::Sub
-    : super self::Base::•()
+    : super self::_Sub&Base&Mixin::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/rasta/issue_000035.dart b/pkg/front_end/testcases/rasta/issue_000035.dart
index 62e390e..e3c51c1 100644
--- a/pkg/front_end/testcases/rasta/issue_000035.dart
+++ b/pkg/front_end/testcases/rasta/issue_000035.dart
@@ -3,3 +3,5 @@
 // BSD-style license that can be found in the LICENSE.md file.
 
 class C {æøC();}
+
+main() {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000035.dart.legacy.expect
index 2d661c2..50d18b1 100644
--- a/pkg/front_end/testcases/rasta/issue_000035.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035.dart.legacy.expect
@@ -1,10 +1,60 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:10: Error: The non-ASCII character 'æ' (U+00E6) can't be used in identifiers, only in strings and comments.
+// Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).
+// class C {æøC();}
+//          ^
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:11: Error: The non-ASCII character 'ø' (U+00F8) can't be used in identifiers, only in strings and comments.
+// Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).
+// class C {æøC();}
+//           ^
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:7: Error: The non-abstract class 'C' is missing implementations for these members:
+//  - C.æøC
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+//
+// class C {æøC();}
+//       ^
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:10: Context: 'C.æøC' is defined here.
+// class C {æøC();}
+//          ^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:10: Error: The non-ASCII character 'æ' (U+00E6) can't be used in identifiers, only in strings and comments.
+// Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).
+// class C {æøC();}
+//          ^
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:11: Error: The non-ASCII character 'ø' (U+00F8) can't be used in identifiers, only in strings and comments.
+// Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).
+// class C {æøC();}
+//           ^
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:7: Error: The non-abstract class 'C' is missing implementations for these members:
+//  - C.æøC
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+// 
+// class C {æøC();}
+//       ^
+
 library;
 import self as self;
 import "dart:core" as core;
 
 class C extends core::Object {
-  synthetic constructor •() → void
+  synthetic constructor •() → self::C
     : super core::Object::•()
     ;
   abstract method æøC() → dynamic;
 }
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000035.dart.legacy.transformed.expect
new file mode 100644
index 0000000..05fecd8
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/issue_000035.dart.legacy.transformed.expect
@@ -0,0 +1,34 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:10: Error: The non-ASCII character 'æ' (U+00E6) can't be used in identifiers, only in strings and comments.
+// Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).
+// class C {æøC();}
+//          ^
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:11: Error: The non-ASCII character 'ø' (U+00F8) can't be used in identifiers, only in strings and comments.
+// Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).
+// class C {æøC();}
+//           ^
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:7: Error: The non-abstract class 'C' is missing implementations for these members:
+//  - C.æøC
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+// 
+// class C {æøC();}
+//       ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+  abstract method æøC() → dynamic;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035.dart.outline.expect b/pkg/front_end/testcases/rasta/issue_000035.dart.outline.expect
index 1cb4d37..9df0e68 100644
--- a/pkg/front_end/testcases/rasta/issue_000035.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035.dart.outline.expect
@@ -9,6 +9,20 @@
 // Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).
 // class C {æøC();}
 //           ^
+//
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:7: Error: The non-abstract class 'C' is missing implementations for these members:
+//  - C.æøC
+// Try to either
+//  - provide an implementation,
+//  - inherit an implementation from a superclass or mixin,
+//  - mark the class as abstract, or
+//  - provide a 'noSuchMethod' implementation.
+//
+// class C {æøC();}
+//       ^
+// pkg/front_end/testcases/rasta/issue_000035.dart:5:10: Context: 'C.æøC' is defined here.
+// class C {æøC();}
+//          ^^^
 
 library;
 import self as self;
@@ -19,3 +33,5 @@
     ;
   abstract method æøC() → dynamic;
 }
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/rasta/issue_000035.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000035.dart.strong.expect
index 6634367..e30cdd8 100644
--- a/pkg/front_end/testcases/rasta/issue_000035.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035.dart.strong.expect
@@ -11,7 +11,7 @@
 //           ^
 //
 // pkg/front_end/testcases/rasta/issue_000035.dart:5:7: Error: The non-abstract class 'C' is missing implementations for these members:
-//   'æøC'.
+//  - 'æøC'
 // Try to either
 //  - provide an implementation,
 //  - inherit an implementation from a superclass or mixin,
@@ -37,7 +37,7 @@
 //           ^
 //
 // pkg/front_end/testcases/rasta/issue_000035.dart:5:7: Error: The non-abstract class 'C' is missing implementations for these members:
-//   'æøC'.
+//  - 'æøC'
 // Try to either
 //  - provide an implementation,
 //  - inherit an implementation from a superclass or mixin,
@@ -57,3 +57,4 @@
     ;
   abstract method æøC() → dynamic;
 }
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000035.dart.strong.transformed.expect
index 685c552..62a78a7 100644
--- a/pkg/front_end/testcases/rasta/issue_000035.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035.dart.strong.transformed.expect
@@ -11,7 +11,7 @@
 //           ^
 //
 // pkg/front_end/testcases/rasta/issue_000035.dart:5:7: Error: The non-abstract class 'C' is missing implementations for these members:
-//   'æøC'.
+//  - 'æøC'
 // Try to either
 //  - provide an implementation,
 //  - inherit an implementation from a superclass or mixin,
@@ -31,3 +31,4 @@
     ;
   abstract method æøC() → dynamic;
 }
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035a.dart b/pkg/front_end/testcases/rasta/issue_000035a.dart
index d7da04e..1e6c8e4 100644
--- a/pkg/front_end/testcases/rasta/issue_000035a.dart
+++ b/pkg/front_end/testcases/rasta/issue_000035a.dart
@@ -3,3 +3,5 @@
 // BSD-style license that can be found in the LICENSE.md file.
 
 class C{

C();}
+
+main() {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035a.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000035a.dart.legacy.expect
index bfc00968..96ddc05 100644
--- a/pkg/front_end/testcases/rasta/issue_000035a.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035a.dart.legacy.expect
@@ -1,9 +1,30 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/rasta/issue_000035a.dart:5:9: Error: The non-ASCII space character U+2028 can only be used in strings and comments.
+// class C{

C();}
+//         ^
+//
+// pkg/front_end/testcases/rasta/issue_000035a.dart:5:10: Error: The non-ASCII space character U+2028 can only be used in strings and comments.
+// class C{

C();}
+//          ^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/issue_000035a.dart:5:9: Error: The non-ASCII space character U+2028 can only be used in strings and comments.
+// class C{

C();}
+//         ^
+//
+// pkg/front_end/testcases/rasta/issue_000035a.dart:5:10: Error: The non-ASCII space character U+2028 can only be used in strings and comments.
+// class C{

C();}
+//          ^
+
 library;
 import self as self;
 import "dart:core" as core;
 
 class C extends core::Object {
-  constructor •() → void
+  constructor •() → self::C
     : super core::Object::•()
     ;
 }
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035a.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000035a.dart.legacy.transformed.expect
new file mode 100644
index 0000000..5b57ed6
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/issue_000035a.dart.legacy.transformed.expect
@@ -0,0 +1,20 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/issue_000035a.dart:5:9: Error: The non-ASCII space character U+2028 can only be used in strings and comments.
+// class C{

C();}
+//         ^
+//
+// pkg/front_end/testcases/rasta/issue_000035a.dart:5:10: Error: The non-ASCII space character U+2028 can only be used in strings and comments.
+// class C{

C();}
+//          ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  constructor •() → self::C
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035a.dart.outline.expect b/pkg/front_end/testcases/rasta/issue_000035a.dart.outline.expect
index 94e5b72..4ad8bee 100644
--- a/pkg/front_end/testcases/rasta/issue_000035a.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035a.dart.outline.expect
@@ -16,3 +16,5 @@
   constructor •() → self::C
     ;
 }
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.expect
index 4956732..96ddc05 100644
--- a/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.expect
@@ -27,3 +27,4 @@
     : super core::Object::•()
     ;
 }
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.transformed.expect
index f94b743..5b57ed6 100644
--- a/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000035a.dart.strong.transformed.expect
@@ -17,3 +17,4 @@
     : super core::Object::•()
     ;
 }
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
index 1c85c97..ff7ce50 100644
--- a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
@@ -39,9 +39,18 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  for (final dynamic #t1 = invalid-expression "pkg/front_end/testcases/rasta/issue_000042.dart:6:8: Error: A for-in loop can't have more than one loop variable.
+  {
+    invalid-expression "pkg/front_end/testcases/rasta/issue_000042.dart:6:8: Error: A for-in loop can't have more than one loop variable.
   for (var x, y in []) {}
-       ^^^" in <dynamic>[]) {
+       ^^^";
+    for (final dynamic #t1 in <dynamic>[]) {
+      invalid-expression "pkg/front_end/testcases/rasta/issue_000042.dart:6:8: Error: A for-in loop can't have more than one loop variable.
+  for (var x, y in []) {}
+       ^^^";
+      dynamic x;
+      dynamic y;
+      {}
+    }
   }
   #L1:
   {
diff --git a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
index 0cf518b..f64ff50 100644
--- a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
@@ -19,9 +19,18 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  for (final dynamic #t1 = invalid-expression "pkg/front_end/testcases/rasta/issue_000042.dart:6:8: Error: A for-in loop can't have more than one loop variable.
+  {
+    invalid-expression "pkg/front_end/testcases/rasta/issue_000042.dart:6:8: Error: A for-in loop can't have more than one loop variable.
   for (var x, y in []) {}
-       ^^^" in <dynamic>[]) {
+       ^^^";
+    for (final dynamic #t1 in <dynamic>[]) {
+      invalid-expression "pkg/front_end/testcases/rasta/issue_000042.dart:6:8: Error: A for-in loop can't have more than one loop variable.
+  for (var x, y in []) {}
+       ^^^";
+      dynamic x;
+      dynamic y;
+      {}
+    }
   }
   #L1:
   {
diff --git a/pkg/front_end/testcases/rasta/issue_000046.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000046.dart.legacy.expect
index 2910ee2..433743b 100644
--- a/pkg/front_end/testcases/rasta/issue_000046.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000046.dart.legacy.expect
@@ -1,9 +1,46 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' after this.
+//   C c = new Object)();
+//             ^^^^^^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected ';' after this.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected a class member, but got ')'.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:20: Error: Expected an identifier, but got '('.
+//   C c = new Object)();
+//                    ^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' after this.
+//   C c = new Object)();
+//             ^^^^^^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected ';' after this.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected a class member, but got ')'.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:20: Error: Expected an identifier, but got '('.
+//   C c = new Object)();
+//                    ^
+
 library;
 import self as self;
 import "dart:core" as core;
 
 class C extends core::Object {
-  field invalid-type c;
-  constructor •() → self::C
-    : self::C::c = invalid-expression, super core::Object::•();
+  field self::C c = new core::Object::•();
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
 }
diff --git a/pkg/front_end/testcases/rasta/issue_000046.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000046.dart.legacy.transformed.expect
new file mode 100644
index 0000000..f92e78d
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/issue_000046.dart.legacy.transformed.expect
@@ -0,0 +1,28 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' after this.
+//   C c = new Object)();
+//             ^^^^^^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected ';' after this.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected a class member, but got ')'.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:20: Error: Expected an identifier, but got '('.
+//   C c = new Object)();
+//                    ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class C extends core::Object {
+  field self::C c = new core::Object::•();
+  synthetic constructor •() → self::C
+    : super core::Object::•()
+    ;
+}
diff --git a/pkg/front_end/testcases/rasta/issue_000046.dart.outline.expect b/pkg/front_end/testcases/rasta/issue_000046.dart.outline.expect
index d3f123b..5151357 100644
--- a/pkg/front_end/testcases/rasta/issue_000046.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/issue_000046.dart.outline.expect
@@ -1,9 +1,27 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' after this.
+//   C c = new Object)();
+//             ^^^^^^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected ';' after this.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:19: Error: Expected a class member, but got ')'.
+//   C c = new Object)();
+//                   ^
+//
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:20: Error: Expected an identifier, but got '('.
+//   C c = new Object)();
+//                    ^
+
 library;
 import self as self;
 import "dart:core" as core;
 
 class C extends core::Object {
-  field invalid-type c;
-  constructor •() → void
+  field self::C c;
+  synthetic constructor •() → self::C
     ;
 }
diff --git a/pkg/front_end/testcases/rasta/issue_000046.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000046.dart.strong.expect
index 51b42f0..6e4cf81 100644
--- a/pkg/front_end/testcases/rasta/issue_000046.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000046.dart.strong.expect
@@ -1,6 +1,6 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' before this.
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' after this.
 //   C c = new Object)();
 //             ^^^^^^
 //
@@ -25,7 +25,7 @@
 
 // Unhandled errors:
 //
-// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' before this.
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' after this.
 //   C c = new Object)();
 //             ^^^^^^
 //
diff --git a/pkg/front_end/testcases/rasta/issue_000046.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000046.dart.strong.transformed.expect
index de4a3e3..bb3c37b 100644
--- a/pkg/front_end/testcases/rasta/issue_000046.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000046.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
 // Unhandled errors:
 //
-// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' before this.
+// pkg/front_end/testcases/rasta/issue_000046.dart:6:13: Error: Expected '(' after this.
 //   C c = new Object)();
 //             ^^^^^^
 //
diff --git a/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.expect
index 5a311d6..3a5b253 100644
--- a/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.expect
@@ -17,7 +17,7 @@
 }
 class Foo extends self::_Foo&Object&Mixin {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&Mixin::•()
     ;
   method foo() → dynamic
     return super.{self::Mixin::foo}();
diff --git a/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.transformed.expect
index 8d9ceb4..290a349 100644
--- a/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000080.dart.legacy.transformed.expect
@@ -20,7 +20,7 @@
 }
 class Foo extends self::_Foo&Object&Mixin {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&Mixin::•()
     ;
   method foo() → dynamic
     return super.{self::Mixin::foo}();
diff --git a/pkg/front_end/testcases/rasta/issue_000080.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000080.dart.strong.expect
index f37485f..b027643 100644
--- a/pkg/front_end/testcases/rasta/issue_000080.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000080.dart.strong.expect
@@ -17,7 +17,7 @@
 }
 class Foo extends self::_Foo&Object&Mixin {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&Mixin::•()
     ;
   method foo() → dynamic
     return super.{self::Mixin::foo}();
diff --git a/pkg/front_end/testcases/rasta/issue_000080.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000080.dart.strong.transformed.expect
index b2db962..060831f 100644
--- a/pkg/front_end/testcases/rasta/issue_000080.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000080.dart.strong.transformed.expect
@@ -20,7 +20,7 @@
 }
 class Foo extends self::_Foo&Object&Mixin {
   synthetic constructor •() → self::Foo
-    : super core::Object::•()
+    : super self::_Foo&Object&Mixin::•()
     ;
   method foo() → dynamic
     return super.{self::Mixin::foo}();
diff --git a/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.expect b/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.expect
index bc30315..16c7815 100644
--- a/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.expect
@@ -19,6 +19,6 @@
 library;
 import self as self;
 
-static method main(dynamic arguments = <dynamic>[let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart:5:19: Error: Getter not found: 'x'.
+static method main(dynamic arguments = <dynamic>[invalid-expression "pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart:5:19: Error: Getter not found: 'x'.
 main(arguments = [x]) {
                   ^"]) → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.transformed.expect
index e6dd04e..060ab4d 100644
--- a/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart.strong.transformed.expect
@@ -8,6 +8,6 @@
 library;
 import self as self;
 
-static method main(dynamic arguments = <dynamic>[let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart:5:19: Error: Getter not found: 'x'.
+static method main(dynamic arguments = <dynamic>[invalid-expression "pkg/front_end/testcases/rasta/mandatory_parameter_initializer.dart:5:19: Error: Getter not found: 'x'.
 main(arguments = [x]) {
                   ^"]) → dynamic {}
diff --git a/pkg/front_end/testcases/rasta/static.dart.legacy.expect b/pkg/front_end/testcases/rasta/static.dart.legacy.expect
index 2640eb8..202c04a 100644
--- a/pkg/front_end/testcases/rasta/static.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.legacy.expect
@@ -165,28 +165,28 @@
     self::use(self::Foo::staticFunction);
     self::Foo::staticGetter;
     self::use(self::Foo::staticGetter);
-    let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let final dynamic #t1 = self::Foo::staticConstant in let final dynamic #t2 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t1.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t1);
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(let final dynamic #t1 = self::Foo::staticConstant in let final dynamic #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t1.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t1);
     self::Foo::staticField = self::Foo::staticField.+(1);
     self::use(let final dynamic #t3 = self::Foo::staticField in let final dynamic #t4 = self::Foo::staticField = #t3.+(1) in #t3);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let final dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t5.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t5);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t7);
-    self::Foo::staticSetter = (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
-    self::use(let final dynamic #t9 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in let final dynamic #t10 = self::Foo::staticSetter = #t9.+(1) in #t9);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(let final dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t5.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t5);
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t7);
+    self::Foo::staticSetter = (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
+    self::use(let final dynamic #t9 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in let final dynamic #t10 = self::Foo::staticSetter = #t9.+(1) in #t9);
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     self::Foo::staticField = self::Foo::staticField.+(1);
     self::use(self::Foo::staticField = self::Foo::staticField.+(1));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    self::Foo::staticSetter = (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
-    self::use(self::Foo::staticSetter = (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    self::Foo::staticSetter = (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
+    self::use(self::Foo::staticSetter = (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1));
     self::Foo::staticConstant.call();
     self::use(self::Foo::staticConstant.call());
     self::Foo::staticField.call();
@@ -195,28 +195,28 @@
     self::use(self::Foo::staticFunction());
     self::Foo::staticGetter.call();
     self::use(self::Foo::staticGetter.call());
-    (let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call();
-    self::use((let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call());
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call();
+    self::use((throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call());
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     self::Foo::staticField = 87;
     self::use(self::Foo::staticField = 87);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     self::Foo::staticSetter = 87;
     self::use(self::Foo::staticSetter = 87);
-    self::Foo::staticConstant.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
-    self::use(let final dynamic #t11 = self::Foo::staticConstant in #t11.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t11);
+    self::Foo::staticConstant.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
+    self::use(let final dynamic #t11 = self::Foo::staticConstant in #t11.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t11);
     self::Foo::staticField.==(null) ? self::Foo::staticField = 87 : null;
     self::use(let final dynamic #t12 = self::Foo::staticField in #t12.==(null) ? self::Foo::staticField = 87 : #t12);
-    self::Foo::staticFunction.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
-    self::use(let final dynamic #t13 = self::Foo::staticFunction in #t13.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t13);
-    self::Foo::staticGetter.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
-    self::use(let final dynamic #t14 = self::Foo::staticGetter in #t14.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t14);
-    (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).==(null) ? self::Foo::staticSetter = 87 : null;
-    self::use(let final dynamic #t15 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t15.==(null) ? self::Foo::staticSetter = 87 : #t15);
+    self::Foo::staticFunction.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
+    self::use(let final dynamic #t13 = self::Foo::staticFunction in #t13.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t13);
+    self::Foo::staticGetter.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
+    self::use(let final dynamic #t14 = self::Foo::staticGetter in #t14.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t14);
+    (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).==(null) ? self::Foo::staticSetter = 87 : null;
+    self::use(let final dynamic #t15 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t15.==(null) ? self::Foo::staticSetter = 87 : #t15);
   }
   on core::NoSuchMethodError catch(no-exception-var) {
   }
diff --git a/pkg/front_end/testcases/rasta/static.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/static.dart.legacy.transformed.expect
index 5db4e42..1147ce7 100644
--- a/pkg/front_end/testcases/rasta/static.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.legacy.transformed.expect
@@ -27,28 +27,28 @@
     self::use(self::Foo::staticFunction);
     self::Foo::staticGetter;
     self::use(self::Foo::staticGetter);
-    let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let final dynamic #t1 = self::Foo::staticConstant in let final dynamic #t2 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t1.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t1);
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(let final dynamic #t1 = self::Foo::staticConstant in let final dynamic #t2 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t1.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t1);
     self::Foo::staticField = self::Foo::staticField.+(1);
     self::use(let final dynamic #t3 = self::Foo::staticField in let final dynamic #t4 = self::Foo::staticField = #t3.+(1) in #t3);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let final dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t5.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t5);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t7);
-    self::Foo::staticSetter = (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
-    self::use(let final dynamic #t9 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in let final dynamic #t10 = self::Foo::staticSetter = #t9.+(1) in #t9);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(let final dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t5.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t5);
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t7);
+    self::Foo::staticSetter = (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
+    self::use(let final dynamic #t9 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in let final dynamic #t10 = self::Foo::staticSetter = #t9.+(1) in #t9);
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticConstant.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     self::Foo::staticField = self::Foo::staticField.+(1);
     self::use(self::Foo::staticField = self::Foo::staticField.+(1));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    self::Foo::staticSetter = (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
-    self::use(self::Foo::staticSetter = (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticFunction.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[self::Foo::staticGetter.+(1)]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    self::Foo::staticSetter = (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1);
+    self::use(self::Foo::staticSetter = (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).+(1));
     self::Foo::staticConstant.call();
     self::use(self::Foo::staticConstant.call());
     self::Foo::staticField.call();
@@ -57,28 +57,28 @@
     self::use(self::Foo::staticFunction());
     self::Foo::staticGetter.call();
     self::use(self::Foo::staticGetter.call());
-    (let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call();
-    self::use((let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call());
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call();
+    self::use((throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).call());
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     self::Foo::staticField = 87;
     self::use(self::Foo::staticField = 87);
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    self::use(let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    self::use(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
     self::Foo::staticSetter = 87;
     self::use(self::Foo::staticSetter = 87);
-    self::Foo::staticConstant.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
-    self::use(let final dynamic #t11 = self::Foo::staticConstant in #t11.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t11);
+    self::Foo::staticConstant.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
+    self::use(let final dynamic #t11 = self::Foo::staticConstant in #t11.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticConstant, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t11);
     self::Foo::staticField.==(null) ? self::Foo::staticField = 87 : null;
     self::use(let final dynamic #t12 = self::Foo::staticField in #t12.==(null) ? self::Foo::staticField = 87 : #t12);
-    self::Foo::staticFunction.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
-    self::use(let final dynamic #t13 = self::Foo::staticFunction in #t13.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t13);
-    self::Foo::staticGetter.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
-    self::use(let final dynamic #t14 = self::Foo::staticGetter in #t14.==(null) ? let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t14);
-    (let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).==(null) ? self::Foo::staticSetter = 87 : null;
-    self::use(let final dynamic #t15 = let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t15.==(null) ? self::Foo::staticSetter = 87 : #t15);
+    self::Foo::staticFunction.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
+    self::use(let final dynamic #t13 = self::Foo::staticFunction in #t13.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t13);
+    self::Foo::staticGetter.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : null;
+    self::use(let final dynamic #t14 = self::Foo::staticGetter in #t14.==(null) ? throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticGetter, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[87]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) : #t14);
+    (throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))).==(null) ? self::Foo::staticSetter = 87 : null;
+    self::use(let final dynamic #t15 = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#staticSetter, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) in #t15.==(null) ? self::Foo::staticSetter = 87 : #t15);
   }
   on core::NoSuchMethodError catch(no-exception-var) {
   }
diff --git a/pkg/front_end/testcases/rasta/static.dart.strong.expect b/pkg/front_end/testcases/rasta/static.dart.strong.expect
index a6b69e6..5efd7f0 100644
--- a/pkg/front_end/testcases/rasta/static.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.strong.expect
@@ -211,58 +211,58 @@
     self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:29:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter);
             ^^^^^^^^^^^^");
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:31:9: Error: Setter not found: 'staticConstant'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:31:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant++;
         ^^^^^^^^^^^^^^";
-    self::use(let final core::int #t1 = self::Foo::staticConstant in let final core::int #t2 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:32:13: Error: Setter not found: 'staticConstant'.
+    self::use(let final core::int #t1 = self::Foo::staticConstant in let final core::int #t2 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:32:13: Error: Setter not found: 'staticConstant'.
     use(Foo.staticConstant++);
             ^^^^^^^^^^^^^^" in #t1);
     self::Foo::staticField = self::Foo::staticField.{core::num::+}(1);
     self::use(let final core::int #t3 = self::Foo::staticField in let final core::int #t4 = self::Foo::staticField = #t3.{core::num::+}(1) in #t3);
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:35:9: Error: Setter not found: 'staticFunction'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:35:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction++;
         ^^^^^^^^^^^^^^";
-    self::use(let final () → dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:36:13: Error: Setter not found: 'staticFunction'.
+    self::use(let final () → dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:36:13: Error: Setter not found: 'staticFunction'.
     use(Foo.staticFunction++);
             ^^^^^^^^^^^^^^" in #t5);
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:37:9: Error: Setter not found: 'staticGetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:37:9: Error: Setter not found: 'staticGetter'.
     Foo.staticGetter++;
         ^^^^^^^^^^^^";
-    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:38:13: Error: Setter not found: 'staticGetter'.
+    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:38:13: Error: Setter not found: 'staticGetter'.
     use(Foo.staticGetter++);
             ^^^^^^^^^^^^" in #t7);
-    self::Foo::staticSetter = (let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:39:9: Error: Getter not found: 'staticSetter'.
+    self::Foo::staticSetter = invalid-expression "pkg/front_end/testcases/rasta/static.dart:39:9: Error: Getter not found: 'staticSetter'.
     Foo.staticSetter++;
-        ^^^^^^^^^^^^").+(1);
-    self::use(let final dynamic #t9 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:40:13: Error: Getter not found: 'staticSetter'.
+        ^^^^^^^^^^^^".+(1);
+    self::use(let final dynamic #t9 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:40:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter++);
             ^^^^^^^^^^^^" in let final dynamic #t10 = self::Foo::staticSetter = #t9.+(1) in #t9);
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:42:11: Error: Setter not found: 'staticConstant'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:42:11: Error: Setter not found: 'staticConstant'.
     ++Foo.staticConstant;
           ^^^^^^^^^^^^^^";
-    self::use(let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:43:15: Error: Setter not found: 'staticConstant'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:43:15: Error: Setter not found: 'staticConstant'.
     use(++Foo.staticConstant);
               ^^^^^^^^^^^^^^");
     self::Foo::staticField = self::Foo::staticField.{core::num::+}(1);
     self::use(self::Foo::staticField = self::Foo::staticField.{core::num::+}(1));
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:46:11: Error: Setter not found: 'staticFunction'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:46:11: Error: Setter not found: 'staticFunction'.
     ++Foo.staticFunction;
           ^^^^^^^^^^^^^^";
-    self::use(let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:47:15: Error: Setter not found: 'staticFunction'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:47:15: Error: Setter not found: 'staticFunction'.
     use(++Foo.staticFunction);
               ^^^^^^^^^^^^^^");
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:48:11: Error: Setter not found: 'staticGetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:48:11: Error: Setter not found: 'staticGetter'.
     ++Foo.staticGetter;
           ^^^^^^^^^^^^";
-    self::use(let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:49:15: Error: Setter not found: 'staticGetter'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:49:15: Error: Setter not found: 'staticGetter'.
     use(++Foo.staticGetter);
               ^^^^^^^^^^^^");
-    self::Foo::staticSetter = (let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:50:11: Error: Getter not found: 'staticSetter'.
+    self::Foo::staticSetter = invalid-expression "pkg/front_end/testcases/rasta/static.dart:50:11: Error: Getter not found: 'staticSetter'.
     ++Foo.staticSetter;
-          ^^^^^^^^^^^^").+(1);
-    self::use(self::Foo::staticSetter = (let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:51:15: Error: Getter not found: 'staticSetter'.
+          ^^^^^^^^^^^^".+(1);
+    self::use(self::Foo::staticSetter = invalid-expression "pkg/front_end/testcases/rasta/static.dart:51:15: Error: Getter not found: 'staticSetter'.
     use(++Foo.staticSetter);
-              ^^^^^^^^^^^^").+(1));
+              ^^^^^^^^^^^^".+(1));
     let final dynamic #t11 = self::Foo::staticConstant in invalid-expression "pkg/front_end/testcases/rasta/static.dart:53:23: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     Foo.staticConstant();
@@ -289,52 +289,52 @@
     self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:62:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter());
             ^^^^^^^^^^^^".call());
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:64:9: Error: Setter not found: 'staticConstant'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:64:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant = 87;
         ^^^^^^^^^^^^^^";
-    self::use(let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:65:13: Error: Setter not found: 'staticConstant'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:65:13: Error: Setter not found: 'staticConstant'.
     use(Foo.staticConstant = 87);
             ^^^^^^^^^^^^^^");
     self::Foo::staticField = 87;
     self::use(self::Foo::staticField = 87);
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:68:9: Error: Setter not found: 'staticFunction'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:68:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction = 87;
         ^^^^^^^^^^^^^^";
-    self::use(let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:69:13: Error: Setter not found: 'staticFunction'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:69:13: Error: Setter not found: 'staticFunction'.
     use(Foo.staticFunction = 87);
             ^^^^^^^^^^^^^^");
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:70:9: Error: Setter not found: 'staticGetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:70:9: Error: Setter not found: 'staticGetter'.
     Foo.staticGetter = 87;
         ^^^^^^^^^^^^";
-    self::use(let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:71:13: Error: Setter not found: 'staticGetter'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:71:13: Error: Setter not found: 'staticGetter'.
     use(Foo.staticGetter = 87);
             ^^^^^^^^^^^^");
     self::Foo::staticSetter = 87;
     self::use(self::Foo::staticSetter = 87);
-    self::Foo::staticConstant.{core::Object::==}(null) ?{core::int} let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
+    self::Foo::staticConstant.{core::Object::==}(null) ?{core::int} invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant ??= 87;
         ^^^^^^^^^^^^^^" : null;
-    self::use(let final core::int #t15 = self::Foo::staticConstant in #t15.{core::Object::==}(null) ?{core::int} let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'.
+    self::use(let final core::int #t15 = self::Foo::staticConstant in #t15.{core::Object::==}(null) ?{core::int} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'.
     use(Foo.staticConstant ??= 87);
             ^^^^^^^^^^^^^^" : #t15);
     self::Foo::staticField.{core::num::==}(null) ?{core::int} self::Foo::staticField = 87 : null;
     self::use(let final core::int #t16 = self::Foo::staticField in #t16.{core::num::==}(null) ?{core::int} self::Foo::staticField = 87 : #t16);
-    self::Foo::staticFunction.{core::Object::==}(null) ?{core::Object} let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
+    self::Foo::staticFunction.{core::Object::==}(null) ?{core::Object} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction ??= 87;
         ^^^^^^^^^^^^^^" : null;
-    self::use(let final () → dynamic #t17 = self::Foo::staticFunction in #t17.{core::Object::==}(null) ?{core::Object} let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:80:13: Error: Setter not found: 'staticFunction'.
+    self::use(let final () → dynamic #t17 = self::Foo::staticFunction in #t17.{core::Object::==}(null) ?{core::Object} invalid-expression "pkg/front_end/testcases/rasta/static.dart:80:13: Error: Setter not found: 'staticFunction'.
     use(Foo.staticFunction ??= 87);
             ^^^^^^^^^^^^^^" : #t17);
-    self::Foo::staticGetter.{core::Object::==}(null) ?{dynamic} let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:81:9: Error: Setter not found: 'staticGetter'.
+    self::Foo::staticGetter.{core::Object::==}(null) ?{dynamic} invalid-expression "pkg/front_end/testcases/rasta/static.dart:81:9: Error: Setter not found: 'staticGetter'.
     Foo.staticGetter ??= 87;
         ^^^^^^^^^^^^" : null;
-    self::use(let final dynamic #t18 = self::Foo::staticGetter in #t18.{core::Object::==}(null) ?{dynamic} let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:82:13: Error: Setter not found: 'staticGetter'.
+    self::use(let final dynamic #t18 = self::Foo::staticGetter in #t18.{core::Object::==}(null) ?{dynamic} invalid-expression "pkg/front_end/testcases/rasta/static.dart:82:13: Error: Setter not found: 'staticGetter'.
     use(Foo.staticGetter ??= 87);
             ^^^^^^^^^^^^" : #t18);
-    (let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:83:9: Error: Getter not found: 'staticSetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:83:9: Error: Getter not found: 'staticSetter'.
     Foo.staticSetter ??= 87;
-        ^^^^^^^^^^^^").{core::Object::==}(null) ?{dynamic} self::Foo::staticSetter = 87 : null;
-    self::use(let final dynamic #t19 = let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:84:13: Error: Getter not found: 'staticSetter'.
+        ^^^^^^^^^^^^".{core::Object::==}(null) ?{dynamic} self::Foo::staticSetter = 87 : null;
+    self::use(let final dynamic #t19 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:84:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter ??= 87);
             ^^^^^^^^^^^^" in #t19.{core::Object::==}(null) ?{dynamic} self::Foo::staticSetter = 87 : #t19);
   }
diff --git a/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect
index ce3d6f4..4ac004a 100644
--- a/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/static.dart.strong.transformed.expect
@@ -33,58 +33,58 @@
     self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:29:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter);
             ^^^^^^^^^^^^");
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:31:9: Error: Setter not found: 'staticConstant'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:31:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant++;
         ^^^^^^^^^^^^^^";
-    self::use(let final core::int #t1 = self::Foo::staticConstant in let final core::int #t2 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:32:13: Error: Setter not found: 'staticConstant'.
+    self::use(let final core::int #t1 = self::Foo::staticConstant in let final core::int #t2 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:32:13: Error: Setter not found: 'staticConstant'.
     use(Foo.staticConstant++);
             ^^^^^^^^^^^^^^" in #t1);
     self::Foo::staticField = self::Foo::staticField.{core::num::+}(1);
     self::use(let final core::int #t3 = self::Foo::staticField in let final core::int #t4 = self::Foo::staticField = #t3.{core::num::+}(1) in #t3);
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:35:9: Error: Setter not found: 'staticFunction'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:35:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction++;
         ^^^^^^^^^^^^^^";
-    self::use(let final () → dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:36:13: Error: Setter not found: 'staticFunction'.
+    self::use(let final () → dynamic #t5 = self::Foo::staticFunction in let final dynamic #t6 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:36:13: Error: Setter not found: 'staticFunction'.
     use(Foo.staticFunction++);
             ^^^^^^^^^^^^^^" in #t5);
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:37:9: Error: Setter not found: 'staticGetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:37:9: Error: Setter not found: 'staticGetter'.
     Foo.staticGetter++;
         ^^^^^^^^^^^^";
-    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:38:13: Error: Setter not found: 'staticGetter'.
+    self::use(let final dynamic #t7 = self::Foo::staticGetter in let final dynamic #t8 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:38:13: Error: Setter not found: 'staticGetter'.
     use(Foo.staticGetter++);
             ^^^^^^^^^^^^" in #t7);
-    self::Foo::staticSetter = (let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:39:9: Error: Getter not found: 'staticSetter'.
+    self::Foo::staticSetter = invalid-expression "pkg/front_end/testcases/rasta/static.dart:39:9: Error: Getter not found: 'staticSetter'.
     Foo.staticSetter++;
-        ^^^^^^^^^^^^").+(1);
-    self::use(let final dynamic #t9 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:40:13: Error: Getter not found: 'staticSetter'.
+        ^^^^^^^^^^^^".+(1);
+    self::use(let final dynamic #t9 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:40:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter++);
             ^^^^^^^^^^^^" in let final dynamic #t10 = self::Foo::staticSetter = #t9.+(1) in #t9);
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:42:11: Error: Setter not found: 'staticConstant'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:42:11: Error: Setter not found: 'staticConstant'.
     ++Foo.staticConstant;
           ^^^^^^^^^^^^^^";
-    self::use(let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:43:15: Error: Setter not found: 'staticConstant'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:43:15: Error: Setter not found: 'staticConstant'.
     use(++Foo.staticConstant);
               ^^^^^^^^^^^^^^");
     self::Foo::staticField = self::Foo::staticField.{core::num::+}(1);
     self::use(self::Foo::staticField = self::Foo::staticField.{core::num::+}(1));
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:46:11: Error: Setter not found: 'staticFunction'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:46:11: Error: Setter not found: 'staticFunction'.
     ++Foo.staticFunction;
           ^^^^^^^^^^^^^^";
-    self::use(let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:47:15: Error: Setter not found: 'staticFunction'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:47:15: Error: Setter not found: 'staticFunction'.
     use(++Foo.staticFunction);
               ^^^^^^^^^^^^^^");
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:48:11: Error: Setter not found: 'staticGetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:48:11: Error: Setter not found: 'staticGetter'.
     ++Foo.staticGetter;
           ^^^^^^^^^^^^";
-    self::use(let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:49:15: Error: Setter not found: 'staticGetter'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:49:15: Error: Setter not found: 'staticGetter'.
     use(++Foo.staticGetter);
               ^^^^^^^^^^^^");
-    self::Foo::staticSetter = (let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:50:11: Error: Getter not found: 'staticSetter'.
+    self::Foo::staticSetter = invalid-expression "pkg/front_end/testcases/rasta/static.dart:50:11: Error: Getter not found: 'staticSetter'.
     ++Foo.staticSetter;
-          ^^^^^^^^^^^^").+(1);
-    self::use(self::Foo::staticSetter = (let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:51:15: Error: Getter not found: 'staticSetter'.
+          ^^^^^^^^^^^^".+(1);
+    self::use(self::Foo::staticSetter = invalid-expression "pkg/front_end/testcases/rasta/static.dart:51:15: Error: Getter not found: 'staticSetter'.
     use(++Foo.staticSetter);
-              ^^^^^^^^^^^^").+(1));
+              ^^^^^^^^^^^^".+(1));
     let final core::int #t11 = self::Foo::staticConstant in invalid-expression "pkg/front_end/testcases/rasta/static.dart:53:23: Error: The method 'call' isn't defined for the class 'int'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
     Foo.staticConstant();
@@ -111,52 +111,52 @@
     self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:62:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter());
             ^^^^^^^^^^^^".call());
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:64:9: Error: Setter not found: 'staticConstant'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:64:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant = 87;
         ^^^^^^^^^^^^^^";
-    self::use(let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:65:13: Error: Setter not found: 'staticConstant'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:65:13: Error: Setter not found: 'staticConstant'.
     use(Foo.staticConstant = 87);
             ^^^^^^^^^^^^^^");
     self::Foo::staticField = 87;
     self::use(self::Foo::staticField = 87);
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:68:9: Error: Setter not found: 'staticFunction'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:68:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction = 87;
         ^^^^^^^^^^^^^^";
-    self::use(let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:69:13: Error: Setter not found: 'staticFunction'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:69:13: Error: Setter not found: 'staticFunction'.
     use(Foo.staticFunction = 87);
             ^^^^^^^^^^^^^^");
-    let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:70:9: Error: Setter not found: 'staticGetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:70:9: Error: Setter not found: 'staticGetter'.
     Foo.staticGetter = 87;
         ^^^^^^^^^^^^";
-    self::use(let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:71:13: Error: Setter not found: 'staticGetter'.
+    self::use(invalid-expression "pkg/front_end/testcases/rasta/static.dart:71:13: Error: Setter not found: 'staticGetter'.
     use(Foo.staticGetter = 87);
             ^^^^^^^^^^^^");
     self::Foo::staticSetter = 87;
     self::use(self::Foo::staticSetter = 87);
-    self::Foo::staticConstant.{core::Object::==}(null) ?{core::int} let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
+    self::Foo::staticConstant.{core::Object::==}(null) ?{core::int} invalid-expression "pkg/front_end/testcases/rasta/static.dart:75:9: Error: Setter not found: 'staticConstant'.
     Foo.staticConstant ??= 87;
         ^^^^^^^^^^^^^^" : null;
-    self::use(let final core::int #t15 = self::Foo::staticConstant in #t15.{core::Object::==}(null) ?{core::int} let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'.
+    self::use(let final core::int #t15 = self::Foo::staticConstant in #t15.{core::Object::==}(null) ?{core::int} invalid-expression "pkg/front_end/testcases/rasta/static.dart:76:13: Error: Setter not found: 'staticConstant'.
     use(Foo.staticConstant ??= 87);
             ^^^^^^^^^^^^^^" : #t15);
     self::Foo::staticField.{core::num::==}(null) ?{core::int} self::Foo::staticField = 87 : null;
     self::use(let final core::int #t16 = self::Foo::staticField in #t16.{core::num::==}(null) ?{core::int} self::Foo::staticField = 87 : #t16);
-    self::Foo::staticFunction.{core::Object::==}(null) ?{core::Object} let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
+    self::Foo::staticFunction.{core::Object::==}(null) ?{core::Object} invalid-expression "pkg/front_end/testcases/rasta/static.dart:79:9: Error: Setter not found: 'staticFunction'.
     Foo.staticFunction ??= 87;
         ^^^^^^^^^^^^^^" : null;
-    self::use(let final () → dynamic #t17 = self::Foo::staticFunction in #t17.{core::Object::==}(null) ?{core::Object} let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:80:13: Error: Setter not found: 'staticFunction'.
+    self::use(let final () → dynamic #t17 = self::Foo::staticFunction in #t17.{core::Object::==}(null) ?{core::Object} invalid-expression "pkg/front_end/testcases/rasta/static.dart:80:13: Error: Setter not found: 'staticFunction'.
     use(Foo.staticFunction ??= 87);
             ^^^^^^^^^^^^^^" : #t17);
-    self::Foo::staticGetter.{core::Object::==}(null) ?{dynamic} let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:81:9: Error: Setter not found: 'staticGetter'.
+    self::Foo::staticGetter.{core::Object::==}(null) ?{dynamic} invalid-expression "pkg/front_end/testcases/rasta/static.dart:81:9: Error: Setter not found: 'staticGetter'.
     Foo.staticGetter ??= 87;
         ^^^^^^^^^^^^" : null;
-    self::use(let final dynamic #t18 = self::Foo::staticGetter in #t18.{core::Object::==}(null) ?{dynamic} let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:82:13: Error: Setter not found: 'staticGetter'.
+    self::use(let final dynamic #t18 = self::Foo::staticGetter in #t18.{core::Object::==}(null) ?{dynamic} invalid-expression "pkg/front_end/testcases/rasta/static.dart:82:13: Error: Setter not found: 'staticGetter'.
     use(Foo.staticGetter ??= 87);
             ^^^^^^^^^^^^" : #t18);
-    (let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:83:9: Error: Getter not found: 'staticSetter'.
+    invalid-expression "pkg/front_end/testcases/rasta/static.dart:83:9: Error: Getter not found: 'staticSetter'.
     Foo.staticSetter ??= 87;
-        ^^^^^^^^^^^^").{core::Object::==}(null) ?{dynamic} self::Foo::staticSetter = 87 : null;
-    self::use(let final dynamic #t19 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/rasta/static.dart:84:13: Error: Getter not found: 'staticSetter'.
+        ^^^^^^^^^^^^".{core::Object::==}(null) ?{dynamic} self::Foo::staticSetter = 87 : null;
+    self::use(let final dynamic #t19 = invalid-expression "pkg/front_end/testcases/rasta/static.dart:84:13: Error: Getter not found: 'staticSetter'.
     use(Foo.staticSetter ??= 87);
             ^^^^^^^^^^^^" in #t19.{core::Object::==}(null) ?{dynamic} self::Foo::staticSetter = 87 : #t19);
   }
diff --git a/pkg/front_end/testcases/rasta/super.dart.legacy.expect b/pkg/front_end/testcases/rasta/super.dart.legacy.expect
index 05cd9a7..ffacfe6 100644
--- a/pkg/front_end/testcases/rasta/super.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/super.dart.legacy.expect
@@ -227,26 +227,6 @@
 //     use(super.m -= 42);
 //               ^
 //
-// pkg/front_end/testcases/rasta/super.dart:147:12: Warning: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-//     super.m(87);
-//            ^
-//
-// pkg/front_end/testcases/rasta/super.dart:148:16: Warning: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-//     use(super.m(87));
-//                ^
-//
-// pkg/front_end/testcases/rasta/super.dart:149:12: Warning: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-//     super.n(87);
-//            ^
-//
-// pkg/front_end/testcases/rasta/super.dart:150:16: Warning: Too many positional arguments: 0 allowed, but 1 found.
-// Try removing the extra positional arguments.
-//     use(super.n(87));
-//                ^
-//
 // pkg/front_end/testcases/rasta/super.dart:11:9: Error: Final field 'f' is not initialized.
 // Try to initialize the field in the declaration or in every constructor.
 //   final f;
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
index 8b75a6e..5aca9d3 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
@@ -25,7 +25,7 @@
 }
 class C<V extends core::Object = dynamic> extends self::_C&Super&Mixin<self::C::V> {
   synthetic constructor •() → self::C<self::C::V>
-    : super self::Super::•()
+    : super self::_C&Super&Mixin::•()
     ;
 }
 abstract class _D&Super&Mixin = self::Super<dynamic> with mix::Mixin<dynamic> {
@@ -35,7 +35,7 @@
 }
 class D extends self::_D&Super&Mixin {
   synthetic constructor •() → self::D
-    : super self::Super::•()
+    : super self::_D&Super&Mixin::•()
     ;
 }
 class C2<V extends core::Object = dynamic> = self::Super<self::C2::V> with mix::Mixin<self::C2::V> {
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
index 2205406..97f3b5a 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
@@ -35,7 +35,7 @@
 }
 class C<V extends core::Object = dynamic> extends self::_C&Super&Mixin<self::C::V> {
   synthetic constructor •() → self::C<self::C::V>
-    : super self::Super::•()
+    : super self::_C&Super&Mixin::•()
     ;
 }
 abstract class _D&Super&Mixin extends self::Super<dynamic> implements mix::Mixin<dynamic> {
@@ -61,7 +61,7 @@
 }
 class D extends self::_D&Super&Mixin {
   synthetic constructor •() → self::D
-    : super self::Super::•()
+    : super self::_D&Super&Mixin::•()
     ;
 }
 class C2<V extends core::Object = dynamic> extends self::Super<self::C2::V> implements mix::Mixin<self::C2::V> {
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
index 77780b3..ac00fc5 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
@@ -31,7 +31,7 @@
 }
 class C<V extends core::Object = dynamic> extends self::_C&Super&Mixin<self::C::V> {
   synthetic constructor •() → self::C<self::C::V>
-    : super self::Super::•()
+    : super self::_C&Super&Mixin::•()
     ;
 }
 abstract class _D&Super&Mixin = self::Super<dynamic> with mix::Mixin<dynamic> {
@@ -41,7 +41,7 @@
 }
 class D extends self::_D&Super&Mixin {
   synthetic constructor •() → self::D
-    : super self::Super::•()
+    : super self::_D&Super&Mixin::•()
     ;
 }
 class C2<V extends core::Object = dynamic> = self::Super<self::C2::V> with mix::Mixin<self::C2::V> {
diff --git a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.expect b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.expect
index 70ea902..907292f 100644
--- a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.expect
@@ -97,11 +97,11 @@
       core::print(this.key);
     }
     for (final dynamic #t2 in x) {
-      let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t2]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+      throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t2]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
       core::print(self::Fisk);
     }
     for (final dynamic #t3 in x) {
-      let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: A prefix can't be used as an expression.
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: A prefix can't be used as an expression.
     for (collection in x) {
          ^^^^^^^^^^";
       core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:18:13: Error: A prefix can't be used as an expression.
@@ -109,28 +109,35 @@
             ^^^^^^^^^^");
     }
     for (final dynamic #t4 in x) {
-      let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t4]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+      throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t4]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
       core::print(() → void);
     }
-    for (final dynamic #t5 = invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
     for (1 in x) {
-         ^" in x) {
-      core::print(this.key);
+         ^";
+      for (final dynamic #t5 in x) {
+        invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (1 in x) {
+         ^";
+        1;
+        core::print(this.key);
+      }
     }
   }
 }
 static method main(dynamic arguments) → dynamic {
   new self::Fisk::•();
   for (final dynamic #t6 in arguments) {
-    let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t6]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t6]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
   }
   for (final dynamic #t7 in arguments) {
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
     core::print(self::Fisk);
   }
   for (final dynamic #t8 in arguments) {
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: A prefix can't be used as an expression.
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: A prefix can't be used as an expression.
   for (collection in arguments) {
        ^^^^^^^^^^";
     core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:38:11: Error: A prefix can't be used as an expression.
@@ -138,12 +145,19 @@
           ^^^^^^^^^^");
   }
   for (final dynamic #t9 in arguments) {
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t9]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t9]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
     core::print(() → void);
   }
-  for (final dynamic #t10 = invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
   for (1 in arguments) {
-       ^" in arguments) {
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+       ^";
+    for (final dynamic #t10 in arguments) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  for (1 in arguments) {
+       ^";
+      1;
+      core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    }
   }
 }
diff --git a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.transformed.expect
index a833422..4629221 100644
--- a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.legacy.transformed.expect
@@ -23,11 +23,11 @@
       core::print(this.key);
     }
     for (final dynamic #t2 in x) {
-      let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t2]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+      throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t2]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
       core::print(self::Fisk);
     }
     for (final dynamic #t3 in x) {
-      let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: A prefix can't be used as an expression.
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: A prefix can't be used as an expression.
     for (collection in x) {
          ^^^^^^^^^^";
       core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:18:13: Error: A prefix can't be used as an expression.
@@ -35,28 +35,35 @@
             ^^^^^^^^^^");
     }
     for (final dynamic #t4 in x) {
-      let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t4]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+      throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t4]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
       core::print(() → void);
     }
-    for (final dynamic #t5 = invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
     for (1 in x) {
-         ^" in x) {
-      core::print(this.key);
+         ^";
+      for (final dynamic #t5 in x) {
+        invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (1 in x) {
+         ^";
+        1;
+        core::print(this.key);
+      }
     }
   }
 }
 static method main(dynamic arguments) → dynamic {
   new self::Fisk::•();
   for (final dynamic #t6 in arguments) {
-    let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t6]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t6]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
   }
   for (final dynamic #t7 in arguments) {
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Fisk, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t7]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
     core::print(self::Fisk);
   }
   for (final dynamic #t8 in arguments) {
-    let dynamic _ = null in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: A prefix can't be used as an expression.
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: A prefix can't be used as an expression.
   for (collection in arguments) {
        ^^^^^^^^^^";
     core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:38:11: Error: A prefix can't be used as an expression.
@@ -64,12 +71,19 @@
           ^^^^^^^^^^");
   }
   for (final dynamic #t9 in arguments) {
-    let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t9]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+    throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#VoidFunction, 34, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[#t9]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
     core::print(() → void);
   }
-  for (final dynamic #t10 = invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
   for (1 in arguments) {
-       ^" in arguments) {
-    core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+       ^";
+    for (final dynamic #t10 in arguments) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  for (1 in arguments) {
+       ^";
+      1;
+      core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#key, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    }
   }
 }
diff --git a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.strong.expect b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.strong.expect
new file mode 100644
index 0000000..31ad421
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.strong.expect
@@ -0,0 +1,219 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:12:13: Error: Getter not found: 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:11:10: Error: Setter not found: 'key'.
+//     for (key in x) {
+//          ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:14:10: Error: Setter not found: 'Fisk'.
+//     for (Fisk in x) {
+//          ^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:18:13: Error: A prefix can't be used as an expression.
+//       print(collection);
+//             ^^^^^^^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: A prefix can't be used as an expression.
+//     for (collection in x) {
+//          ^^^^^^^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:20:10: Error: Setter not found: 'VoidFunction'.
+//     for (VoidFunction in x) {
+//          ^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Expected an identifier, but got '1'.
+//     for (1 in x) {
+//          ^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:24:13: Error: Getter not found: 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+//     for (1 in x) {
+//          ^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:11:10: Error: The setter 'key' isn't defined for the class 'Fisk'.
+//  - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+// Try correcting the name to the name of an existing setter, or defining a setter or field named 'key'.
+//     for (key in x) {
+//          ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:12:13: Error: The getter 'key' isn't defined for the class 'Fisk'.
+//  - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:24:13: Error: The getter 'key' isn't defined for the class 'Fisk'.
+//  - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+// Try correcting the name to the name of an existing getter, or defining a getter or field named 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:32:11: Error: Getter not found: 'key'.
+//     print(key);
+//           ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:31:8: Error: Setter not found: 'key'.
+//   for (key in arguments) {
+//        ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:34:8: Error: Setter not found: 'Fisk'.
+//   for (Fisk in arguments) {
+//        ^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:38:11: Error: A prefix can't be used as an expression.
+//     print(collection);
+//           ^^^^^^^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: A prefix can't be used as an expression.
+//   for (collection in arguments) {
+//        ^^^^^^^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:40:8: Error: Setter not found: 'VoidFunction'.
+//   for (VoidFunction in arguments) {
+//        ^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Expected an identifier, but got '1'.
+//   for (1 in arguments) {
+//        ^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:44:11: Error: Getter not found: 'key'.
+//     print(key);
+//           ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+//   for (1 in arguments) {
+//        ^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:12:13: Error: Getter not found: 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:11:10: Error: Setter not found: 'key'.
+//     for (key in x) {
+//          ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Expected an identifier, but got '1'.
+//     for (1 in x) {
+//          ^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:24:13: Error: Getter not found: 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Expected an identifier, but got '1'.
+//   for (1 in arguments) {
+//        ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+typedef VoidFunction = () → void;
+class Fisk extends core::Object {
+  synthetic constructor •() → self::Fisk
+    : super core::Object::•()
+    ;
+  method it1(dynamic x) → dynamic {
+    for (final dynamic #t1 in x as{TypeError} core::Iterable<dynamic>) {
+      let final dynamic #t2 = this in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:11:10: Error: The setter 'key' isn't defined for the class 'Fisk'.
+ - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'key'.
+    for (key in x) {
+         ^^^";
+      core::print(let final dynamic #t3 = this in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:12:13: Error: The getter 'key' isn't defined for the class 'Fisk'.
+ - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'key'.
+      print(key);
+            ^^^");
+    }
+    for (final dynamic #t4 in x as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:14:10: Error: Setter not found: 'Fisk'.
+    for (Fisk in x) {
+         ^^^^";
+      core::print(self::Fisk);
+    }
+    for (final dynamic #t5 in x as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: A prefix can't be used as an expression.
+    for (collection in x) {
+         ^^^^^^^^^^";
+      core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:18:13: Error: A prefix can't be used as an expression.
+      print(collection);
+            ^^^^^^^^^^");
+    }
+    for (final dynamic #t6 in x as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:20:10: Error: Setter not found: 'VoidFunction'.
+    for (VoidFunction in x) {
+         ^^^^^^^^^^^^";
+      core::print(() → void);
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (1 in x) {
+         ^";
+      for (final dynamic #t7 in x as{TypeError} core::Iterable<dynamic>) {
+        invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (1 in x) {
+         ^";
+        1;
+        core::print(let final dynamic #t8 = this in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:24:13: Error: The getter 'key' isn't defined for the class 'Fisk'.
+ - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'key'.
+      print(key);
+            ^^^");
+      }
+    }
+  }
+}
+static method main(dynamic arguments) → dynamic {
+  new self::Fisk::•();
+  for (final dynamic #t9 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:31:8: Error: Setter not found: 'key'.
+  for (key in arguments) {
+       ^^^";
+    core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:32:11: Error: Getter not found: 'key'.
+    print(key);
+          ^^^");
+  }
+  for (final dynamic #t10 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:34:8: Error: Setter not found: 'Fisk'.
+  for (Fisk in arguments) {
+       ^^^^";
+    core::print(self::Fisk);
+  }
+  for (final dynamic #t11 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: A prefix can't be used as an expression.
+  for (collection in arguments) {
+       ^^^^^^^^^^";
+    core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:38:11: Error: A prefix can't be used as an expression.
+    print(collection);
+          ^^^^^^^^^^");
+  }
+  for (final dynamic #t12 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:40:8: Error: Setter not found: 'VoidFunction'.
+  for (VoidFunction in arguments) {
+       ^^^^^^^^^^^^";
+    core::print(() → void);
+  }
+  {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  for (1 in arguments) {
+       ^";
+    for (final dynamic #t13 in arguments as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  for (1 in arguments) {
+       ^";
+      1;
+      core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:44:11: Error: Getter not found: 'key'.
+    print(key);
+          ^^^");
+    }
+  }
+}
diff --git a/pkg/front_end/testcases/rasta/unresolved_for_in.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.strong.transformed.expect
new file mode 100644
index 0000000..9316b38
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/unresolved_for_in.dart.strong.transformed.expect
@@ -0,0 +1,127 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:12:13: Error: Getter not found: 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:11:10: Error: Setter not found: 'key'.
+//     for (key in x) {
+//          ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Expected an identifier, but got '1'.
+//     for (1 in x) {
+//          ^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:24:13: Error: Getter not found: 'key'.
+//       print(key);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Expected an identifier, but got '1'.
+//   for (1 in arguments) {
+//        ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+typedef VoidFunction = () → void;
+class Fisk extends core::Object {
+  synthetic constructor •() → self::Fisk
+    : super core::Object::•()
+    ;
+  method it1(dynamic x) → dynamic {
+    for (final dynamic #t1 in x as{TypeError} core::Iterable<dynamic>) {
+      let final self::Fisk #t2 = this in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:11:10: Error: The setter 'key' isn't defined for the class 'Fisk'.
+ - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+Try correcting the name to the name of an existing setter, or defining a setter or field named 'key'.
+    for (key in x) {
+         ^^^";
+      core::print(let final self::Fisk #t3 = this in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:12:13: Error: The getter 'key' isn't defined for the class 'Fisk'.
+ - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'key'.
+      print(key);
+            ^^^");
+    }
+    for (final dynamic #t4 in x as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:14:10: Error: Setter not found: 'Fisk'.
+    for (Fisk in x) {
+         ^^^^";
+      core::print(self::Fisk);
+    }
+    for (final dynamic #t5 in x as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:17:10: Error: A prefix can't be used as an expression.
+    for (collection in x) {
+         ^^^^^^^^^^";
+      core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:18:13: Error: A prefix can't be used as an expression.
+      print(collection);
+            ^^^^^^^^^^");
+    }
+    for (final dynamic #t6 in x as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:20:10: Error: Setter not found: 'VoidFunction'.
+    for (VoidFunction in x) {
+         ^^^^^^^^^^^^";
+      core::print(() → void);
+    }
+    {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (1 in x) {
+         ^";
+      for (final dynamic #t7 in x as{TypeError} core::Iterable<dynamic>) {
+        invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:23:10: Error: Can't assign to this, so it can't be used in a for-in loop.
+    for (1 in x) {
+         ^";
+        1;
+        core::print(let final self::Fisk #t8 = this in invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:24:13: Error: The getter 'key' isn't defined for the class 'Fisk'.
+ - 'Fisk' is from 'pkg/front_end/testcases/rasta/unresolved_for_in.dart'.
+Try correcting the name to the name of an existing getter, or defining a getter or field named 'key'.
+      print(key);
+            ^^^");
+      }
+    }
+  }
+}
+static method main(dynamic arguments) → dynamic {
+  new self::Fisk::•();
+  for (final dynamic #t9 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:31:8: Error: Setter not found: 'key'.
+  for (key in arguments) {
+       ^^^";
+    core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:32:11: Error: Getter not found: 'key'.
+    print(key);
+          ^^^");
+  }
+  for (final dynamic #t10 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:34:8: Error: Setter not found: 'Fisk'.
+  for (Fisk in arguments) {
+       ^^^^";
+    core::print(self::Fisk);
+  }
+  for (final dynamic #t11 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:37:8: Error: A prefix can't be used as an expression.
+  for (collection in arguments) {
+       ^^^^^^^^^^";
+    core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:38:11: Error: A prefix can't be used as an expression.
+    print(collection);
+          ^^^^^^^^^^");
+  }
+  for (final dynamic #t12 in arguments as{TypeError} core::Iterable<dynamic>) {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:40:8: Error: Setter not found: 'VoidFunction'.
+  for (VoidFunction in arguments) {
+       ^^^^^^^^^^^^";
+    core::print(() → void);
+  }
+  {
+    invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  for (1 in arguments) {
+       ^";
+    for (final dynamic #t13 in arguments as{TypeError} core::Iterable<dynamic>) {
+      invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:43:8: Error: Can't assign to this, so it can't be used in a for-in loop.
+  for (1 in arguments) {
+       ^";
+      1;
+      core::print(invalid-expression "pkg/front_end/testcases/rasta/unresolved_for_in.dart:44:11: Error: Getter not found: 'key'.
+    print(key);
+          ^^^");
+    }
+  }
+}
diff --git a/pkg/front_end/testcases/redirecting_factory.dart.strong.expect b/pkg/front_end/testcases/redirecting_factory.dart.strong.expect
index 7b9ff13..bcf4fb8 100644
--- a/pkg/front_end/testcases/redirecting_factory.dart.strong.expect
+++ b/pkg/front_end/testcases/redirecting_factory.dart.strong.expect
@@ -1,18 +1,16 @@
 // Formatted problems:
 //
-// pkg/front_end/testcases/redirecting_factory.dart:7:28: Error: The return type 'Foo<Tf>' of the constructor 'Foo' isn't a subtype of 'FooBase<Tf>'.
+// pkg/front_end/testcases/redirecting_factory.dart:7:28: Error: The constructor function type 'Foo<Tf> Function(int)' isn't a subtype of 'FooBase<Tf> Function(int)'.
 //  - 'Foo' is from 'pkg/front_end/testcases/redirecting_factory.dart'.
 //  - 'FooBase' is from 'pkg/front_end/testcases/redirecting_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory FooBase(int x) = Foo<Tf>;
 //                            ^
 
 // Unhandled errors:
 //
-// pkg/front_end/testcases/redirecting_factory.dart:7:28: Error: The return type 'Foo<Tf>' of the constructor 'Foo' isn't a subtype of 'FooBase<Tf>'.
+// pkg/front_end/testcases/redirecting_factory.dart:7:28: Error: The constructor function type 'Foo<Tf> Function(int)' isn't a subtype of 'FooBase<Tf> Function(int)'.
 //  - 'Foo' is from 'pkg/front_end/testcases/redirecting_factory.dart'.
 //  - 'FooBase' is from 'pkg/front_end/testcases/redirecting_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory FooBase(int x) = Foo<Tf>;
 //                            ^
 
diff --git a/pkg/front_end/testcases/redirecting_factory.dart.strong.transformed.expect b/pkg/front_end/testcases/redirecting_factory.dart.strong.transformed.expect
index dd5dc0f..4885beb 100644
--- a/pkg/front_end/testcases/redirecting_factory.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/redirecting_factory.dart.strong.transformed.expect
@@ -1,9 +1,8 @@
 // Unhandled errors:
 //
-// pkg/front_end/testcases/redirecting_factory.dart:7:28: Error: The return type 'Foo<Tf>' of the constructor 'Foo' isn't a subtype of 'FooBase<Tf>'.
+// pkg/front_end/testcases/redirecting_factory.dart:7:28: Error: The constructor function type 'Foo<Tf> Function(int)' isn't a subtype of 'FooBase<Tf> Function(int)'.
 //  - 'Foo' is from 'pkg/front_end/testcases/redirecting_factory.dart'.
 //  - 'FooBase' is from 'pkg/front_end/testcases/redirecting_factory.dart'.
-// Try redirecting to a different constructor.
 //   factory FooBase(int x) = Foo<Tf>;
 //                            ^
 
diff --git a/pkg/front_end/testcases/regress/issue_29976.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_29976.dart.legacy.expect
index 2ed84b8..f434e4b 100644
--- a/pkg/front_end/testcases/regress/issue_29976.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_29976.dart.legacy.expect
@@ -75,5 +75,5 @@
 static get x() → dynamic
   return null;
 static method main() → void {
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#f, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["x${self::x.*("'")}"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#f, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["x${self::x.*("'")}"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_29976.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_29976.dart.legacy.transformed.expect
index adcec4e..ea4c4a8 100644
--- a/pkg/front_end/testcases/regress/issue_29976.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29976.dart.legacy.transformed.expect
@@ -38,5 +38,5 @@
 static get x() → dynamic
   return null;
 static method main() → void {
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#f, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["x${self::x.*("'")}"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#f, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>["x${self::x.*("'")}"]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_29982.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_29982.dart.legacy.expect
index 3828528..e361b02 100644
--- a/pkg/front_end/testcases/regress/issue_29982.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_29982.dart.legacy.expect
@@ -74,5 +74,5 @@
 
 static method main() → dynamic {
   dynamic eh = <dynamic, dynamic>{"\u0233h": "\u0233h"};
-  core::print("${eh.[](let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#éh, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))))}");
+  core::print("${eh.[](throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#éh, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))))}");
 }
diff --git a/pkg/front_end/testcases/regress/issue_29982.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_29982.dart.legacy.transformed.expect
index 11a5695..f419a37 100644
--- a/pkg/front_end/testcases/regress/issue_29982.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29982.dart.legacy.transformed.expect
@@ -37,5 +37,5 @@
 
 static method main() → dynamic {
   dynamic eh = <dynamic, dynamic>{"\u0233h": "\u0233h"};
-  core::print("${eh.[](let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#éh, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))))}");
+  core::print("${eh.[](throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#éh, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))))}");
 }
diff --git a/pkg/front_end/testcases/regress/issue_29984.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_29984.dart.legacy.expect
index b932140..b8e39cc 100644
--- a/pkg/front_end/testcases/regress/issue_29984.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_29984.dart.legacy.expect
@@ -18,7 +18,7 @@
 static method bad() → dynamic {
   for (core::int i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_29984.dart:6:12: Error: Can't declare 'i' because it was already used in this scope.
   for (int i = i;; false) {}
-           ^" in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))); ; false) {
+           ^" in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))); ; false) {
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_29984.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_29984.dart.legacy.transformed.expect
index cf64ae4..8b75d05 100644
--- a/pkg/front_end/testcases/regress/issue_29984.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29984.dart.legacy.transformed.expect
@@ -5,7 +5,7 @@
 static method bad() → dynamic {
   for (core::int i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_29984.dart:6:12: Error: Can't declare 'i' because it was already used in this scope.
   for (int i = i;; false) {}
-           ^" in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))); ; false) {
+           ^" in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#i, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))); ; false) {
   }
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_29985.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_29985.dart.legacy.expect
index 1e02c8b..d6e6130 100644
--- a/pkg/front_end/testcases/regress/issue_29985.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_29985.dart.legacy.expect
@@ -29,6 +29,6 @@
 import "dart:core" as core;
 
 static method bad() → dynamic {
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#🔛, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#🔛, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_29985.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_29985.dart.legacy.transformed.expect
index 0f35dbc..52f90dd 100644
--- a/pkg/front_end/testcases/regress/issue_29985.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_29985.dart.legacy.transformed.expect
@@ -14,6 +14,6 @@
 import "dart:core" as core;
 
 static method bad() → dynamic {
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#🔛, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#🔛, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_31188.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_31188.dart.legacy.expect
index dd4cc1d..b43e742 100644
--- a/pkg/front_end/testcases/regress/issue_31188.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_31188.dart.legacy.expect
@@ -34,6 +34,6 @@
 import self as self;
 import "dart:core" as core;
 
-static field invalid-type T = core::Map<dynamic, dynamic>.<(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#A, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+static field invalid-type T = core::Map<dynamic, dynamic>.<(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#A, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 static field invalid-type B;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_31188.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_31188.dart.legacy.transformed.expect
index d24fdb3..17bbd41 100644
--- a/pkg/front_end/testcases/regress/issue_31188.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31188.dart.legacy.transformed.expect
@@ -12,6 +12,6 @@
 import self as self;
 import "dart:core" as core;
 
-static field invalid-type T = core::Map<dynamic, dynamic>.<(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#A, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+static field invalid-type T = core::Map<dynamic, dynamic>.<(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#A, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 static field invalid-type B;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/regress/issue_32182.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_32182.dart.legacy.expect
index 3f9071f..2b0e26e 100644
--- a/pkg/front_end/testcases/regress/issue_32182.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_32182.dart.legacy.expect
@@ -21,7 +21,7 @@
 }
 class C extends self::_C&A&M {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/regress/issue_32182.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_32182.dart.legacy.transformed.expect
index 49ef114..a9c10f4 100644
--- a/pkg/front_end/testcases/regress/issue_32182.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_32182.dart.legacy.transformed.expect
@@ -23,7 +23,7 @@
 }
 class C extends self::_C&A&M {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/regress/issue_32182.dart.strong.expect b/pkg/front_end/testcases/regress/issue_32182.dart.strong.expect
index 369e464..ccec30c 100644
--- a/pkg/front_end/testcases/regress/issue_32182.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_32182.dart.strong.expect
@@ -21,7 +21,7 @@
 }
 class C extends self::_C&A&M {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/regress/issue_32182.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_32182.dart.strong.transformed.expect
index 43a28a0..063d09c 100644
--- a/pkg/front_end/testcases/regress/issue_32182.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_32182.dart.strong.transformed.expect
@@ -23,7 +23,7 @@
 }
 class C extends self::_C&A&M {
   synthetic constructor •() → self::C
-    : super self::A::•()
+    : super self::_C&A&M::•()
     ;
 }
 static method main() → dynamic {
diff --git a/pkg/front_end/testcases/regress/issue_33452.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_33452.dart.legacy.expect
index a0ff133..1b94419 100644
--- a/pkg/front_end/testcases/regress/issue_33452.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_33452.dart.legacy.expect
@@ -34,10 +34,10 @@
     ;
 }
 static method main() → dynamic {
-  dynamic x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String, core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#NonExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  dynamic x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String, core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#NonExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_33452.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_33452.dart.legacy.transformed.expect
index 038ecc7..22a417b 100644
--- a/pkg/front_end/testcases/regress/issue_33452.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_33452.dart.legacy.transformed.expect
@@ -8,10 +8,10 @@
     ;
 }
 static method main() → dynamic {
-  dynamic x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String, core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
-  x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#NonExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  dynamic x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#ExistingClass.nonExistingConstructor, 32, core::List::unmodifiable<dynamic>(<core::Type>[core::String, core::String]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#NonExistingClass, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_34850.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_34850.dart.legacy.transformed.expect
index 2ae0673..38947f8 100644
--- a/pkg/front_end/testcases/regress/issue_34850.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34850.dart.legacy.transformed.expect
@@ -35,7 +35,7 @@
 }
 static method Future<List extends core::Object = dynamic>() → invalid-type {}
 static method f2() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -58,11 +58,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method f3() → invalid-type /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -85,11 +85,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -116,6 +116,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/regress/issue_34850.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_34850.dart.strong.transformed.expect
index 64ced99..72bac6c 100644
--- a/pkg/front_end/testcases/regress/issue_34850.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34850.dart.strong.transformed.expect
@@ -51,7 +51,7 @@
 }
 static method Future<List extends core::Object = dynamic>() → invalid-type {}
 static method f2() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -74,11 +74,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method f3() → invalid-type /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -101,11 +101,11 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 static method main() → dynamic /* originally async */ {
-  final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
   asy::FutureOr<dynamic> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -132,6 +132,6 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
diff --git a/pkg/front_end/testcases/regress/issue_35151.dart b/pkg/front_end/testcases/regress/issue_35151.dart
new file mode 100644
index 0000000..fedf195
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35151.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  int a;
+}
+
+class B extends A {
+  B() : super.a = 42;
+}
+
+class C {
+  C() : super = 42;
+}
+
+main() {
+  try {
+    var b = new B();
+  } catch (_) {
+    // ignore
+  }
+  try {
+    var c = new C();
+  } catch (_) {
+    // ignore
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_35151.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_35151.dart.legacy.expect
new file mode 100644
index 0000000..de1108c
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35151.dart.legacy.expect
@@ -0,0 +1,60 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: A field can only be initialized in it's declaring class
+// Try passing a value into the superclass constructor, or moving the initialization into the constructor body.
+//   B() : super.a = 42;
+//               ^
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: Not a valid initializer.
+// To initialize a field, use the syntax 'name = value'.
+//   B() : super.a = 42;
+//               ^
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:14:9: Error: Can't access 'super' in a field initializer.
+//   C() : super = 42;
+//         ^^^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: A field can only be initialized in it's declaring class
+// Try passing a value into the superclass constructor, or moving the initialization into the constructor body.
+//   B() : super.a = 42;
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int a = null;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  constructor •() → self::B
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: Not a valid initializer.
+To initialize a field, use the syntax 'name = value'.
+  B() : super.a = 42;
+              ^"
+    ;
+}
+class C extends core::Object {
+  constructor •() → self::C
+    : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:14:9: Error: Can't access 'super' in a field initializer.
+  C() : super = 42;
+        ^^^^^"
+    ;
+}
+static method main() → dynamic {
+  try {
+    dynamic b = new self::B::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+  try {
+    dynamic c = new self::C::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_35151.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_35151.dart.legacy.transformed.expect
new file mode 100644
index 0000000..8b2425d
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35151.dart.legacy.transformed.expect
@@ -0,0 +1,44 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: A field can only be initialized in it's declaring class
+// Try passing a value into the superclass constructor, or moving the initialization into the constructor body.
+//   B() : super.a = 42;
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int a = null;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  constructor •() → self::B
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: Not a valid initializer.
+To initialize a field, use the syntax 'name = value'.
+  B() : super.a = 42;
+              ^"
+    ;
+}
+class C extends core::Object {
+  constructor •() → self::C
+    : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:14:9: Error: Can't access 'super' in a field initializer.
+  C() : super = 42;
+        ^^^^^"
+    ;
+}
+static method main() → dynamic {
+  try {
+    dynamic b = new self::B::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+  try {
+    dynamic c = new self::C::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_35151.dart.outline.expect b/pkg/front_end/testcases/regress/issue_35151.dart.outline.expect
new file mode 100644
index 0000000..0699365
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35151.dart.outline.expect
@@ -0,0 +1,26 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: A field can only be initialized in it's declaring class
+// Try passing a value into the superclass constructor, or moving the initialization into the constructor body.
+//   B() : super.a = 42;
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int a;
+  synthetic constructor •() → self::A
+    ;
+}
+class B extends self::A {
+  constructor •() → self::B
+    ;
+}
+class C extends core::Object {
+  constructor •() → self::C
+    ;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/regress/issue_35151.dart.strong.expect b/pkg/front_end/testcases/regress/issue_35151.dart.strong.expect
new file mode 100644
index 0000000..6f8a3c8
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35151.dart.strong.expect
@@ -0,0 +1,60 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: A field can only be initialized in it's declaring class
+// Try passing a value into the superclass constructor, or moving the initialization into the constructor body.
+//   B() : super.a = 42;
+//               ^
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: Not a valid initializer.
+// To initialize a field, use the syntax 'name = value'.
+//   B() : super.a = 42;
+//               ^
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:14:9: Error: Can't access 'super' in a field initializer.
+//   C() : super = 42;
+//         ^^^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: A field can only be initialized in it's declaring class
+// Try passing a value into the superclass constructor, or moving the initialization into the constructor body.
+//   B() : super.a = 42;
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int a = null;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  constructor •() → self::B
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: Not a valid initializer.
+To initialize a field, use the syntax 'name = value'.
+  B() : super.a = 42;
+              ^"
+    ;
+}
+class C extends core::Object {
+  constructor •() → self::C
+    : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:14:9: Error: Can't access 'super' in a field initializer.
+  C() : super = 42;
+        ^^^^^"
+    ;
+}
+static method main() → dynamic {
+  try {
+    self::B b = new self::B::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+  try {
+    self::C c = new self::C::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_35151.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_35151.dart.strong.transformed.expect
new file mode 100644
index 0000000..de1b159
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35151.dart.strong.transformed.expect
@@ -0,0 +1,44 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: A field can only be initialized in it's declaring class
+// Try passing a value into the superclass constructor, or moving the initialization into the constructor body.
+//   B() : super.a = 42;
+//               ^
+
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::int a = null;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  constructor •() → self::B
+    : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:10:15: Error: Not a valid initializer.
+To initialize a field, use the syntax 'name = value'.
+  B() : super.a = 42;
+              ^"
+    ;
+}
+class C extends core::Object {
+  constructor •() → self::C
+    : final dynamic #t2 = invalid-expression "pkg/front_end/testcases/regress/issue_35151.dart:14:9: Error: Can't access 'super' in a field initializer.
+  C() : super = 42;
+        ^^^^^"
+    ;
+}
+static method main() → dynamic {
+  try {
+    self::B b = new self::B::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+  try {
+    self::C c = new self::C::•();
+  }
+  on dynamic catch(final dynamic _) {
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_35258.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_35258.dart.legacy.expect
index 0707a98..dd57ef3 100644
--- a/pkg/front_end/testcases/regress/issue_35258.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_35258.dart.legacy.expect
@@ -37,5 +37,5 @@
     : super core::Object::•() {}
 }
 static method main() → dynamic {
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#C, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#C, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35258.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_35258.dart.legacy.transformed.expect
index 15c4c7d..89e7a08 100644
--- a/pkg/front_end/testcases/regress/issue_35258.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_35258.dart.legacy.transformed.expect
@@ -19,5 +19,5 @@
     : super core::Object::•() {}
 }
 static method main() → dynamic {
-  let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#C, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#C, 32, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35259.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_35259.dart.legacy.expect
index 37d28a6..cdee012 100644
--- a/pkg/front_end/testcases/regress/issue_35259.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_35259.dart.legacy.expect
@@ -43,5 +43,5 @@
     let dynamic #redirecting_factory = "Unresolved" in invalid-expression;
 }
 static method main() → dynamic {
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35259.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_35259.dart.legacy.transformed.expect
index 263531d..b95387a 100644
--- a/pkg/front_end/testcases/regress/issue_35259.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_35259.dart.legacy.transformed.expect
@@ -14,5 +14,5 @@
     let dynamic #redirecting_factory = "Unresolved" in invalid-expression;
 }
 static method main() → dynamic {
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35260.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_35260.dart.legacy.expect
index 87975f8..37f976f 100644
--- a/pkg/front_end/testcases/regress/issue_35260.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_35260.dart.legacy.expect
@@ -32,5 +32,5 @@
     ;
 }
 static method main() → dynamic {
-  self::X x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  self::X x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35260.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_35260.dart.legacy.transformed.expect
index 07ace47..64871ce 100644
--- a/pkg/front_end/testcases/regress/issue_35260.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_35260.dart.legacy.transformed.expect
@@ -19,5 +19,5 @@
     ;
 }
 static method main() → dynamic {
-  self::X x = let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  self::X x = throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#Supertype, 32, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35266.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_35266.dart.legacy.expect
index 247942c..aba6888 100644
--- a/pkg/front_end/testcases/regress/issue_35266.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_35266.dart.legacy.expect
@@ -46,5 +46,5 @@
     let dynamic #redirecting_factory = "B.foo" in invalid-expression;
 }
 static method main() → dynamic {
-  let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#B.foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[dynamic]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#B.foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[dynamic]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35266.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_35266.dart.legacy.transformed.expect
index c538a3d..65c513f 100644
--- a/pkg/front_end/testcases/regress/issue_35266.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_35266.dart.legacy.transformed.expect
@@ -29,5 +29,5 @@
     let dynamic #redirecting_factory = "B.foo" in invalid-expression;
 }
 static method main() → dynamic {
-  let dynamic _ = null in let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#B.foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[dynamic]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
+  throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#B.foo, 32, core::List::unmodifiable<dynamic>(<core::Type>[dynamic]), const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})));
 }
diff --git a/pkg/front_end/testcases/regress/issue_35266.dart.strong.expect b/pkg/front_end/testcases/regress/issue_35266.dart.strong.expect
index 52afc68..7ae1045 100644
--- a/pkg/front_end/testcases/regress/issue_35266.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_35266.dart.strong.expect
@@ -46,7 +46,7 @@
     let dynamic #redirecting_factory = "B.foo" in invalid-expression;
 }
 static method main() → dynamic {
-  let dynamic _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_35266.dart:13:11: Error: Method not found: 'B.foo'.
+  invalid-expression "pkg/front_end/testcases/regress/issue_35266.dart:13:11: Error: Method not found: 'B.foo'.
   factory C.bar() = B<K>.foo;
           ^^^";
 }
diff --git a/pkg/front_end/testcases/regress/issue_35266.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_35266.dart.strong.transformed.expect
index c97d4b6..dbe98fd 100644
--- a/pkg/front_end/testcases/regress/issue_35266.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_35266.dart.strong.transformed.expect
@@ -29,7 +29,7 @@
     let core::String #redirecting_factory = "B.foo" in invalid-expression;
 }
 static method main() → dynamic {
-  let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/regress/issue_35266.dart:13:11: Error: Method not found: 'B.foo'.
+  invalid-expression "pkg/front_end/testcases/regress/issue_35266.dart:13:11: Error: Method not found: 'B.foo'.
   factory C.bar() = B<K>.foo;
           ^^^";
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.expect
index dc8bb3d..0546d0e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.expect
@@ -39,7 +39,7 @@
 }
 class D extends self::C<core::int> {
   synthetic constructor •() → self::D
-    : super self::B::•()
+    : super self::C::•()
     ;
   method f() → (core::int) → void
     return (core::int i) → dynamic {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.transformed.expect
index f47ed24..839a7dc 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.legacy.transformed.expect
@@ -45,7 +45,7 @@
 }
 class D extends self::C<core::int> {
   synthetic constructor •() → self::D
-    : super self::B::•()
+    : super self::C::•()
     ;
   method f() → (core::int) → void
     return (core::int i) → dynamic {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect
index a31d746..45084df 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect
@@ -59,7 +59,7 @@
 }
 class D extends self::C<core::int> {
   synthetic constructor •() → self::D
-    : super self::B::•()
+    : super self::C::•()
     ;
   method f() → (core::int) → void
     return (core::int i) → core::Null {
diff --git a/pkg/front_end/testcases/statements.dart.legacy.expect b/pkg/front_end/testcases/statements.dart.legacy.expect
index 440b92a..533d647 100644
--- a/pkg/front_end/testcases/statements.dart.legacy.expect
+++ b/pkg/front_end/testcases/statements.dart.legacy.expect
@@ -1,3 +1,23 @@
+// Formatted problems:
+//
+// pkg/front_end/testcases/statements.dart:15:5: Error: 'yield' can only be used in 'sync*' or 'async*' methods.
+//     yield x;
+//     ^^^^^
+//
+// pkg/front_end/testcases/statements.dart:16:5: Error: 'yield' can only be used in 'sync*' or 'async*' methods.
+//     yield* x;
+//     ^^^^^
+
+// Unhandled errors:
+//
+// pkg/front_end/testcases/statements.dart:15:5: Error: 'yield' can only be used in 'sync*' or 'async*' methods.
+//     yield x;
+//     ^^^^^
+//
+// pkg/front_end/testcases/statements.dart:16:5: Error: 'yield' can only be used in 'sync*' or 'async*' methods.
+//     yield* x;
+//     ^^^^^
+
 library;
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/statements.dart.legacy.transformed.expect b/pkg/front_end/testcases/statements.dart.legacy.transformed.expect
new file mode 100644
index 0000000..2cc8929
--- /dev/null
+++ b/pkg/front_end/testcases/statements.dart.legacy.transformed.expect
@@ -0,0 +1,211 @@
+// Unhandled errors:
+//
+// pkg/front_end/testcases/statements.dart:15:5: Error: 'yield' can only be used in 'sync*' or 'async*' methods.
+//     yield x;
+//     ^^^^^
+//
+// pkg/front_end/testcases/statements.dart:16:5: Error: 'yield' can only be used in 'sync*' or 'async*' methods.
+//     yield* x;
+//     ^^^^^
+
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+static method foo() → dynamic {
+  try {
+    return;
+  }
+  finally {
+    core::print("Hello from finally block!");
+  }
+}
+static method bar() → dynamic /* originally async */ {
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
+  asy::FutureOr<dynamic> :return_value;
+  dynamic :async_stack_trace;
+  dynamic :async_op_then;
+  dynamic :async_op_error;
+  dynamic :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  dynamic :saved_try_context_var1;
+  dynamic :exception0;
+  dynamic :stack_trace0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        {
+          dynamic :stream = <dynamic>[];
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L2:
+            while (true) {
+              dynamic #t1 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t2 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                dynamic x = :for-iterator.{asy::_StreamIterator::current};
+                {
+                  yield x;
+                  yield* x;
+                }
+              }
+              else
+                break #L2;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t3 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.start(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method main() → dynamic {
+  do {
+    core::print("Hello from do-while!");
+  }
+  while (false)
+  do {
+    dynamic x = core::print("Hello from do-while!");
+  }
+  while (false)
+  for (core::String s in <dynamic>["Hello from for-in!"]) {
+    core::print(s);
+  }
+  for (core::String s in <dynamic>["Hello from for-in without block!"])
+    core::print(s);
+  dynamic s;
+  for (final dynamic #t4 in <dynamic>["Hello from for-in without decl!"]) {
+    s = #t4;
+    core::print(s);
+  }
+  for (final dynamic #t5 in <dynamic>["Hello from for-in without decl and block!"]) {
+    s = #t5;
+    core::print(s);
+  }
+  core::print("Hello from labeled statement!");
+  try {
+    try {
+      throw "Hello from rethrow!";
+    }
+    on dynamic catch(final dynamic e) {
+      rethrow;
+    }
+  }
+  on dynamic catch(final dynamic e) {
+    core::print(e);
+  }
+  self::foo();
+  core::bool done = false;
+  while (!done) {
+    done = true;
+    core::print("Hello from while!");
+  }
+  ;
+  assert(true);
+  assert(true, "Hello from assert!");
+  try {
+    assert(false, "Hello from assert!");
+  }
+  on dynamic catch(final dynamic e) {
+    core::print(e);
+  }
+  #L3:
+  switch(1) {
+    #L4:
+    case 1:
+    case 2:
+      {
+        core::print("Hello from switch case!");
+        break #L3;
+      }
+    #L5:
+    default:
+      {
+        break #L3;
+      }
+  }
+  #L6:
+  switch(4) {
+    #L7:
+    case 2:
+      {
+        core::print("Hello from case 2!");
+        break #L6;
+      }
+    #L8:
+    case 1:
+      {
+        core::print("Hello from case 1!");
+        continue #L7;
+      }
+    #L9:
+    case 0:
+      {
+        core::print("Hello from case 0!");
+        continue #L8;
+      }
+    #L10:
+    case 4:
+      {
+        core::print("Hello from case 4!");
+        continue #L11;
+      }
+    #L11:
+    default:
+      {
+        continue #L9;
+      }
+  }
+  #L12:
+  switch(4) {
+    #L13:
+    case 1:
+      {
+        core::print("Hello from next case 1");
+        break #L12;
+      }
+    #L14:
+    default:
+      {
+        continue #L13;
+      }
+  }
+  core::int i = 0;
+  #L15:
+  do
+    #L16:
+    {
+      core::print("Hello from do-while!");
+      if((i = i.+(1)).<(3))
+        break #L16;
+      break #L15;
+    }
+  while (true)
+  i = 0;
+  #L17:
+  while (true)
+    #L18:
+    {
+      core::print("Hello from while!");
+      if((i = i.+(1)).<(3))
+        break #L18;
+      break #L17;
+    }
+}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index ce39537..20f95d6 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -6,6 +6,7 @@
 # Kernel ASTs directly, that is, code in pkg/fasta/lib/src/kernel/ with
 # strong-mode enabled.
 
+abstract_members: TypeCheckError
 accessors: RuntimeError
 ambiguous_exports: RuntimeError # Expected, this file exports two main methods.
 argument_mismatch: InstrumentationMismatch # Test assumes Dart 1.0 semantics
@@ -23,6 +24,7 @@
 expressions: RuntimeError
 external_import: RuntimeError # The native extension to import doesn't exist. This is ok.
 fallthrough: ExpectationFileMismatch
+for_in_without_declaration: TypeCheckError
 incomplete_field_formal_parameter: RuntimeError
 inference/abstract_class_instantiation: InstrumentationMismatch # Issue #30040
 inference/conflicts_can_happen: TypeCheckError
@@ -65,6 +67,8 @@
 inference_new/infer_field_getter_setter_mismatch: TypeCheckError
 inference_new/infer_field_override_getter_overrides_setter: TypeCheckError
 inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
+instantiate_to_bound/non_simple_generic_function_in_bound_regress: RuntimeError # Expected
+instantiate_to_bound/non_simple_class_parametrized_typedef_cycle: RuntimeError # Expected
 invalid_type: TypeCheckError
 invocations: RuntimeError
 issue34899: TypeCheckError
@@ -98,11 +102,10 @@
 rasta/issue_000031: RuntimeError
 rasta/issue_000032: RuntimeError
 rasta/issue_000034: RuntimeError
-rasta/issue_000035: RuntimeError
-rasta/issue_000035a: RuntimeError
 rasta/issue_000036: RuntimeError
 rasta/issue_000039: VerificationError
 rasta/issue_000041: RuntimeError
+rasta/issue_000042: RuntimeError
 rasta/issue_000043: RuntimeError
 rasta/issue_000044: RuntimeError
 rasta/issue_000046: RuntimeError
@@ -121,7 +124,7 @@
 rasta/typedef: Crash
 rasta/unresolved: RuntimeError
 rasta/unresolved_constructor: RuntimeError
-rasta/unresolved_for_in: VerificationError
+rasta/unresolved_for_in: RuntimeError
 rasta/unresolved_recovery: TypeCheckError
 regress/issue_29976: RuntimeError # Tests runtime behavior of error recovery.
 regress/issue_29982: RuntimeError # Tests runtime behavior of error recovery.
@@ -137,6 +140,7 @@
 regress/issue_35259: RuntimeError # Expected
 regress/issue_35260: RuntimeError # Expected
 regress/issue_35266: RuntimeError # Expected
+reject_generic_function_types_in_bounds: RuntimeError # Expected
 runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast: RuntimeError
 runtime_checks_new/mixin_forwarding_stub_field: TypeCheckError
 runtime_checks_new/mixin_forwarding_stub_getter: TypeCheckError
diff --git a/pkg/front_end/testcases/tabs.dart.legacy.expect b/pkg/front_end/testcases/tabs.dart.legacy.expect
index 71641b8..a304f47 100644
--- a/pkg/front_end/testcases/tabs.dart.legacy.expect
+++ b/pkg/front_end/testcases/tabs.dart.legacy.expect
@@ -25,10 +25,10 @@
 import "dart:core" as core;
 
 static method test() → dynamic {
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#one, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#two, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#three, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#four, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#five, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#one, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#two, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#three, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#four, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#five, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/tabs.dart.legacy.transformed.expect b/pkg/front_end/testcases/tabs.dart.legacy.transformed.expect
index e5b77aa..b542e17 100644
--- a/pkg/front_end/testcases/tabs.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/tabs.dart.legacy.transformed.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 static method test() → dynamic {
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#one, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#two, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#three, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#four, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-  core::print(let dynamic _ = null in throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#five, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#one, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#two, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#three, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#four, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+  core::print(throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#five, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
new file mode 100644
index 0000000..08fd945
--- /dev/null
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -0,0 +1,973 @@
+# Copyright (c) 2019, 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.
+
+# Status file for the text_serialization_test.dart test suite. This is testing
+# the round trip for Kernel textual serialization where the initial binary
+# Kernel files are produced by compiling Dart code via Fasta.
+
+abstract_members: TypeCheckError
+accessors: TextSerializationFailure # Was: RuntimeError
+ambiguous_exports: TextSerializationFailure # Was: RuntimeError # Expected, this file exports two main methods.
+annotation_eof: TextSerializationFailure # Was: Pass
+annotation_on_enum_values: TextSerializationFailure # Was: Pass
+annotation_top: TextSerializationFailure # Was: Pass
+annotation_typedef_formals_resolution: TextSerializationFailure # Was: Pass
+annotation_typedef_formals: TextSerializationFailure # Was: Pass
+annotation_variable_declaration: TextSerializationFailure # Was: Pass
+argument_mismatch: InstrumentationMismatch # Test assumes Dart 1.0 semantics
+argument: TextSerializationFailure # Was: Pass
+arithmetic: TextSerializationFailure # Was: Pass
+arrow_function: TextSerializationFailure # Was: Pass
+async_function: TextSerializationFailure # Was: Pass
+async_nested: TextSerializationFailure # Was: Pass
+await: TextSerializationFailure # Was: Pass
+bad_setter_abstract: TextSerializationFailure # Was: Pass
+bad_store: TextSerializationFailure # Was: Pass
+bounds_check_depends_on_inference: TextSerializationFailure # Was: Pass
+bug21938: TypeCheckError
+bug30695: TypeCheckError
+bug31124: TextSerializationFailure # Was: RuntimeError # Test has no main method (and we shouldn't add one).
+bug32414a: TextSerializationFailure # Was: Pass
+bug32414b: TextSerializationFailure # Was: Pass
+bug32426: TextSerializationFailure # Was: Pass
+bug32629: InstrumentationMismatch # Test has an intentional error
+bug32866: TextSerializationFailure # Was: Pass
+bug33099: TextSerializationFailure # Was: Pass
+bug33196: TextSerializationFailure # Was: Pass
+bug33206: TextSerializationFailure # Was: Pass
+bug33298: TextSerializationFailure # Was: Pass
+bug34511: TextSerializationFailure # Was: Pass
+bug35470: TextSerializationFailure # Was: Pass
+call: TypeCheckError
+cascade: TextSerializationFailure # Was: RuntimeError
+casts: TextSerializationFailure # Was: Pass
+check_deferred_allocation: TextSerializationFailure # Was: Pass
+check_deferred_as_check: TextSerializationFailure # Was: Pass
+check_deferred_before_args2: TextSerializationFailure # Was: Pass
+check_deferred_before_args: TextSerializationFailure # Was: Pass
+check_deferred_before_call: TextSerializationFailure # Was: Pass
+check_deferred_before_write: TextSerializationFailure # Was: Pass
+check_deferred_is_check: TextSerializationFailure # Was: Pass
+check_deferred_read_static_field: TextSerializationFailure # Was: Pass
+check_deferred_read: TextSerializationFailure # Was: Pass
+check_deferred_read_type: TextSerializationFailure # Was: Pass
+check_deferred_static_method_call: TextSerializationFailure # Was: Pass
+check_deferred_type_declaration: TextSerializationFailure # Was: Pass
+circularity-via-initializing-formal: TextSerializationFailure # Was: Pass
+classes: TextSerializationFailure # Was: Pass
+clone_function_type: TextSerializationFailure # Was: Pass
+closure: TextSerializationFailure # Was: Pass
+co19_language_metadata_syntax_t04: TextSerializationFailure # Was: Pass
+constructor_const_inference: TextSerializationFailure # Was: Pass
+constructor_cycle: Crash # Was: Pass
+constructor_function_types: TextSerializationFailure # Was: Pass
+constructor_initializer_invalid: TextSerializationFailure # Was: RuntimeError # Fails execution after recovery
+continue_inference_after_error_lib: TextSerializationFailure # Was: Pass
+continue_inference_after_error: TextSerializationFailure # Was: Pass
+covariant_generic: TextSerializationFailure # Was: RuntimeError
+cycles: TextSerializationFailure # Was: Pass
+default_values: TextSerializationFailure # Was: Pass
+deferred_lib: TextSerializationFailure # Was: Pass
+deferred_type_annotation: TextSerializationFailure # Was: Pass
+DeltaBlue: TextSerializationFailure # Was: Pass
+duplicated_bad_prefix_lib1: TextSerializationFailure # Was: Pass
+duplicated_bad_prefix_lib2: TextSerializationFailure # Was: Pass
+duplicated_bad_prefix: TextSerializationFailure # Was: Pass
+duplicated_declarations_lib: TextSerializationFailure # Was: Pass
+duplicated_declarations_part: TextSerializationFailure # Was: Pass
+duplicated_declarations: TypeCheckError
+duplicated_field_initializer: TextSerializationFailure # Was: RuntimeError
+duplicated_named_args_3: TextSerializationFailure # Was: Pass
+dynamic_and_void: InstrumentationMismatch # Test assumes Dart 1.0 semantics
+escape: TextSerializationFailure # Was: Pass
+export_main: TextSerializationFailure # Was: Pass
+export_test: TextSerializationFailure # Was: Pass
+expression/eval: TextSerializationFailure # Was: Pass
+expression/main: TextSerializationFailure # Was: Pass
+expressions: TextSerializationFailure # Was: RuntimeError
+external_import: TextSerializationFailure # Was: RuntimeError # The native extension to import doesn't exist. This is ok.
+external: TextSerializationFailure # Was: Pass
+fallthrough: ExpectationFileMismatch
+fibonacci: TextSerializationFailure # Was: Pass
+for_in_scope: TextSerializationFailure # Was: Pass
+for_in_without_declaration: TypeCheckError
+function_in_field: TextSerializationFailure # Was: Pass
+functions: TextSerializationFailure # Was: Pass
+function_type_assignments: TextSerializationFailure # Was: Pass
+function_type_default_value: TextSerializationFailure # Was: Pass
+function_type_is_check: TextSerializationFailure # Was: Pass
+function_type_recovery: TextSerializationFailure # Was: Pass
+future_or_test: TextSerializationFailure # Was: Pass
+hello: TextSerializationFailure # Was: Pass
+illegal_named_function_expression_scope: TextSerializationFailure # Was: Pass
+illegal_named_function_expression: TextSerializationFailure # Was: Pass
+implicit_const_with_static_fields: TextSerializationFailure # Was: Pass
+implicit_new: TextSerializationFailure # Was: Pass
+implicit_scope_test: TextSerializationFailure # Was: Pass
+implicit_this: TextSerializationFailure # Was: Pass
+incomplete_field_formal_parameter: TextSerializationFailure # Was: RuntimeError
+inference/abstract_class_instantiation: InstrumentationMismatch # Issue #30040
+inference/assert_initializer: TextSerializationFailure # Was: Pass
+inference/assert: TextSerializationFailure # Was: Pass
+inference/assign_local: TextSerializationFailure # Was: Pass
+inference/async_await: TextSerializationFailure # Was: Pass
+inference/async_closure_return_type_flatten: TextSerializationFailure # Was: Pass
+inference/async_closure_return_type_future_or: TextSerializationFailure # Was: Pass
+inference/async_closure_return_type_future: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_async_all_returns_are_futures: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_async_all_returns_are_values: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_async_mix_of_values_and_futures: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_async_star: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_basic: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_basic_void: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_infer_bottom_async_star: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_infer_bottom_async: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_infer_bottom_sync_star: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_infer_bottom_sync: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_lub: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_nested_lambdas: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_no_return: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_returns: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_sync_star: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_void_context: TextSerializationFailure # Was: Pass
+inference/bottom_in_closure: TextSerializationFailure # Was: Pass
+inference/bottom: TextSerializationFailure # Was: Pass
+inference/bug30251: TextSerializationFailure # Was: Pass
+inference/bug30620_b: TextSerializationFailure # Was: Pass
+inference/bug30620_c: TextSerializationFailure # Was: Pass
+inference/bug30620_d: TextSerializationFailure # Was: Pass
+inference/bug30620: TextSerializationFailure # Was: Pass
+inference/bug30624: TextSerializationFailure # Was: Pass
+inference/bug31132: TextSerializationFailure # Was: Pass
+inference/bug31133: TextSerializationFailure # Was: Pass
+inference/bug31436: TextSerializationFailure # Was: Pass
+inference/bug32291: TextSerializationFailure # Was: Pass
+inference/bug33324: TextSerializationFailure # Was: Pass
+inference/callable_generic_class: TextSerializationFailure # Was: Pass
+inference/call_corner_cases: TextSerializationFailure # Was: Pass
+inference/circular_method_inference: TextSerializationFailure # Was: Pass
+inference/circular_reference_via_closures_initializer_types: TextSerializationFailure # Was: Pass
+inference/circular_reference_via_closures: TextSerializationFailure # Was: Pass
+inference/closure_param_null_to_object: TextSerializationFailure # Was: Pass
+inference/coerce_bottom_and_null_types: TextSerializationFailure # Was: Pass
+inference/complex_predecrement: TextSerializationFailure # Was: Pass
+inference/conditional_lub: TextSerializationFailure # Was: Pass
+inference/conditional_upwards_inference: TextSerializationFailure # Was: Pass
+inference/conflicts_can_happen2: TypeCheckError
+inference/conflicts_can_happen: TypeCheckError
+inference/constructors_downwards_with_constraint: TextSerializationFailure # Was: Pass
+inference/constructors_inference_f_bounded: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_argument_not_assignable: TypeCheckError
+inference/constructors_infer_from_arguments_const: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_const_with_upper_bound: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_downwards_from_constructor: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_factory_calls_constructor: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_factory: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_named_factory: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_named: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_redirecting_factory: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_redirecting_factory_to_factory: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_redirecting: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments: TextSerializationFailure # Was: Pass
+inference/constructors_reverse_type_parameters: TextSerializationFailure # Was: Pass
+inference/constructors_too_many_positional_arguments: InstrumentationMismatch # Issue #30040
+inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer: TypeCheckError
+inference/dont_infer_field_type_when_initializer_is_null: TextSerializationFailure # Was: Pass
+inference/dont_infer_type_on_dynamic: TextSerializationFailure # Was: Pass
+inference/dont_infer_type_when_initializer_is_null: TextSerializationFailure # Was: Pass
+inference/downward_inference_fixes_no_upwards_errors: TextSerializationFailure # Was: Pass
+inference/downward_inference_miscellaneous: TextSerializationFailure # Was: Pass
+inference/downwards_context_from_inferred_field_type: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_class_members: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_for_loop_variable: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_locals_referring_to_locals: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_locals: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_parameter_local: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_parameter: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_typedef: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_type_variable: InstrumentationMismatch # Issue 28981
+inference/downwards_inference_annotations_type_variable_local: TextSerializationFailure # Was: Pass
+inference/downwards_inference_assignment_statements: TextSerializationFailure # Was: Pass
+inference/downwards_inference_async_await: TextSerializationFailure # Was: Pass
+inference/downwards_inference_for_each: TextSerializationFailure # Was: Pass
+inference/downwards_inference_initializing_formal_default_formal: TextSerializationFailure # Was: Pass
+inference/downwards_inference_inside_top_level_2: TextSerializationFailure # Was: Pass
+inference/downwards_inference_inside_top_level: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_constructor_arguments_infer_downwards: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_function_arguments_infer_downwards: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_function_expressions: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_function_of_t_using_the_t: InstrumentationMismatch # Issue #29798
+inference/downwards_inference_on_generic_constructor_arguments_empty_list: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_generic_constructor_arguments_infer_downwards: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_generic_function_expressions: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_instance_creations_infer_downwards: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_list_literals_infer_downwards: TextSerializationFailure # Was: RuntimeError
+inference/downwards_inference_on_list_literals_infer_if_value_types_match_context: TextSerializationFailure # Was: Pass
+inference/downwards_inference_on_map_literals: TextSerializationFailure # Was: Pass
+inference/downwards_inference_yield_yield_star: TextSerializationFailure # Was: Pass
+inference/dynamic_methods: TextSerializationFailure # Was: Pass
+inference/field_initializer_context_explicit: TextSerializationFailure # Was: Pass
+inference/field_initializer_context_implicit: TextSerializationFailure # Was: Pass
+inference/field_initializer_context_this: TextSerializationFailure # Was: Pass
+inference/field_initializer_parameter: TextSerializationFailure # Was: Pass
+inference/field_refers_to_static_getter: TextSerializationFailure # Was: Pass
+inference/field_refers_to_top_level_getter: TextSerializationFailure # Was: Pass
+inference/for_each_downcast_iterable: TextSerializationFailure # Was: Pass
+inference/for_in_loop_promotion: TextSerializationFailure # Was: Pass
+inference/for_loop_empty_condition: TextSerializationFailure # Was: Pass
+inference/for_loop_initializer_expression: TextSerializationFailure # Was: Pass
+inference/for_loop_promotion: TextSerializationFailure # Was: Pass
+inference/future_or_subtyping: TextSerializationFailure # Was: Pass
+inference/future_then_2: TextSerializationFailure # Was: Pass
+inference/future_then_3: TextSerializationFailure # Was: Pass
+inference/future_then_4: TextSerializationFailure # Was: Pass
+inference/future_then_5: TextSerializationFailure # Was: Pass
+inference/future_then_6: TextSerializationFailure # Was: Pass
+inference/future_then_conditional_2: TextSerializationFailure # Was: Pass
+inference/future_then_conditional_3: TextSerializationFailure # Was: Pass
+inference/future_then_conditional_4: TextSerializationFailure # Was: Pass
+inference/future_then_conditional_5: TextSerializationFailure # Was: Pass
+inference/future_then_conditional_6: TextSerializationFailure # Was: Pass
+inference/future_then_conditional: TextSerializationFailure # Was: Pass
+inference/future_then_downwards_method_target: TextSerializationFailure # Was: Pass
+inference/future_then_explicit_future: InstrumentationMismatch # Issue #30040
+inference/future_then_ifNull: TextSerializationFailure # Was: Pass
+inference/future_then: TextSerializationFailure # Was: Pass
+inference/future_then_upwards_2: TextSerializationFailure # Was: RuntimeError
+inference/future_then_upwards_3: TextSerializationFailure # Was: Pass
+inference/future_then_upwards_from_block: TextSerializationFailure # Was: Pass
+inference/future_then_upwards: TextSerializationFailure # Was: RuntimeError
+inference/future_union_async_conditional_2: TextSerializationFailure # Was: Pass
+inference/future_union_async_conditional: TextSerializationFailure # Was: Pass
+inference/future_union_downwards_2: TextSerializationFailure # Was: Pass
+inference/future_union_downwards_3: TextSerializationFailure # Was: Pass
+inference/future_union_downwards_4: TextSerializationFailure # Was: Pass
+inference/future_union_downwards_generic_method_with_future_return: TextSerializationFailure # Was: Pass
+inference/future_union_downwards_generic_method_with_generic_return: TextSerializationFailure # Was: Pass
+inference/future_union_downwards: TextSerializationFailure # Was: Pass
+inference/future_union_upwards_generic_methods: TextSerializationFailure # Was: Pass
+inference/generator_closure: TextSerializationFailure # Was: Pass
+inference/generic_functions_return_typedef: InstrumentationMismatch # Issue #29798
+inference/generic_methods_basic_downward_inference: TextSerializationFailure # Was: Pass
+inference/generic_methods_correctly_recognize_generic_upper_bound: TypeCheckError
+inference/generic_methods_dart_math_min_max: TextSerializationFailure # Was: Pass
+inference/generic_methods_do_not_infer_invalid_override_of_generic_method: TypeCheckError
+inference/generic_methods_downwards_inference_affects_arguments: TextSerializationFailure # Was: Pass
+inference/generic_methods_downwards_inference_fold: TextSerializationFailure # Was: Pass
+inference/generic_methods_handle_override_of_non_generic_with_generic: TypeCheckError
+inference/generic_methods_inference_error: TextSerializationFailure # Was: Pass
+inference/generic_methods_infer_generic_function_parameter_type2: TextSerializationFailure # Was: Pass
+inference/generic_methods_infer_generic_function_parameter_type: TextSerializationFailure # Was: Pass
+inference/generic_methods_infer_generic_function_return_type: TextSerializationFailure # Was: Pass
+inference/generic_methods_infer_generic_instantiation: TextSerializationFailure # Was: Pass
+inference/generic_methods_infer_generic_method_type: TextSerializationFailure # Was: Pass
+inference/generic_methods_infer_js_builtin: InstrumentationMismatch # Issue #30029
+inference/generic_methods_iterable_and_future: TextSerializationFailure # Was: Pass
+inference/generic_methods_nested_generic_instantiation: TextSerializationFailure # Was: Pass
+inference/generic_methods_uses_greatest_lower_bound: TextSerializationFailure # Was: Pass
+inference/greatest_closure_multiple_params: TextSerializationFailure # Was: Pass
+inference/index_assign_operator_return_type_2: TextSerializationFailure # Was: Pass
+inference/index_assign_operator_return_type: TextSerializationFailure # Was: Pass
+inference/infer_accessor_from_later_inferred_field: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_implicit_this: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_implicit_this_upwards: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_index_full: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_index_super: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_index_this: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_local: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_local_upwards: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_property_full: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_property_null_aware: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_property_null_aware_upwards: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_property_super: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_property_super_upwards: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_property_upwards: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_ref: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_static: TextSerializationFailure # Was: Pass
+inference/infer_assign_to_static_upwards: TextSerializationFailure # Was: Pass
+inference/infer_binary_custom: TextSerializationFailure # Was: Pass
+inference/infer_binary_double_double: TextSerializationFailure # Was: Pass
+inference/infer_binary_double_int: TextSerializationFailure # Was: Pass
+inference/infer_binary_int_double: TextSerializationFailure # Was: Pass
+inference/infer_binary_int_int: TextSerializationFailure # Was: Pass
+inference/infer_conditional: TextSerializationFailure # Was: Pass
+inference/infer_consts_transitively_2_a: TextSerializationFailure # Was: Pass
+inference/infer_consts_transitively_2_b: TextSerializationFailure # Was: Pass
+inference/infer_consts_transitively_2: TextSerializationFailure # Was: Pass
+inference/infer_consts_transitively_b: TextSerializationFailure # Was: Pass
+inference/infer_correctly_on_multiple_variables_declared_together: TextSerializationFailure # Was: Pass
+inference/infer_field_from_later_inferred_field: TextSerializationFailure # Was: Pass
+inference/infer_field_from_later_inferred_getter: TextSerializationFailure # Was: Pass
+inference/infer_field_from_later_inferred_setter: TextSerializationFailure # Was: Pass
+inference/infer_field_override_multiple: TypeCheckError
+inference/infer_field_override_of_override: TextSerializationFailure # Was: Pass
+inference/infer_field_overrides_getter: TextSerializationFailure # Was: Pass
+inference/infer_field_overrides_setter: TextSerializationFailure # Was: Pass
+inference/infer_field_override_with_substitution: TextSerializationFailure # Was: Pass
+inference/infer_field_static: TextSerializationFailure # Was: Pass
+inference/infer_final_field_getter_and_setter: TextSerializationFailure # Was: Pass
+inference/infer_final_field_getter_only: TextSerializationFailure # Was: Pass
+inference/infer_final_field_setter_only: TextSerializationFailure # Was: Pass
+inference/infer_from_complex_expressions_if_outer_most_value_is_precise: TextSerializationFailure # Was: Pass
+inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2: TextSerializationFailure # Was: Pass
+inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_cycle_libs_when_flag_is_on2: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_cycle_libs_when_flag_is_on: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_non_cycle_imports_with_flag2_a: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_non_cycle_imports_with_flag2: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_non_cycle_imports_with_flag_a: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_non_cycle_imports_with_flag: TextSerializationFailure # Was: Pass
+inference/infer_generic_method_type_named: TextSerializationFailure # Was: Pass
+inference/infer_generic_method_type_positional2: TextSerializationFailure # Was: Pass
+inference/infer_generic_method_type_positional: TextSerializationFailure # Was: Pass
+inference/infer_generic_method_type_required: TextSerializationFailure # Was: Pass
+inference/infer_getter_cross_to_setter: TextSerializationFailure # Was: Pass
+inference/infer_getter_from_later_inferred_getter: TextSerializationFailure # Was: Pass
+inference/infer_list_literal_nested_in_map_literal: TextSerializationFailure # Was: Pass
+inference/infer_local_function_referenced_before_declaration: TextSerializationFailure # Was: Pass
+inference/infer_local_function_return_type: TextSerializationFailure # Was: Pass
+inference/infer_method_function_typed: TextSerializationFailure # Was: Pass
+inference/infer_method_missing_params: TypeCheckError
+inference/infer_parameter_type_setter_from_field: TextSerializationFailure # Was: Pass
+inference/infer_parameter_type_setter_from_setter: TextSerializationFailure # Was: Pass
+inference/infer_prefix_expression_custom: TextSerializationFailure # Was: Pass
+inference/infer_prefix_expression: TextSerializationFailure # Was: Pass
+inference/inferred_initializing_formal_checks_default_value: TextSerializationFailure # Was: Pass
+inference/inferred_nonstatic_field_depends_on_static_field_complex: TextSerializationFailure # Was: Pass
+inference/inferred_nonstatic_field_depends_on_top_level_var_simple: TextSerializationFailure # Was: Pass
+inference/inferred_type_block_closure_no_args_no_return: TextSerializationFailure # Was: Pass
+inference/inferred_type_block_closure_no_args_no_return_void_context: TextSerializationFailure # Was: Pass
+inference/inferred_type_cascade: TextSerializationFailure # Was: Pass
+inference/inferred_type_custom_binary_op: TextSerializationFailure # Was: Pass
+inference/inferred_type_custom_binary_op_via_interface: TextSerializationFailure # Was: Pass
+inference/inferred_type_custom_index_op: TextSerializationFailure # Was: Pass
+inference/inferred_type_custom_index_op_via_interface: TextSerializationFailure # Was: Pass
+inference/inferred_type_custom_unary_op: TextSerializationFailure # Was: Pass
+inference/inferred_type_custom_unary_op_via_interface: TextSerializationFailure # Was: Pass
+inference/inferred_type_extract_method_tear_off: TextSerializationFailure # Was: Pass
+inference/inferred_type_extract_method_tear_off_via_interface: TextSerializationFailure # Was: Pass
+inference/inferred_type_from_top_level_executable_tear_off: TextSerializationFailure # Was: Pass
+inference/inferred_type_invoke_method: TextSerializationFailure # Was: Pass
+inference/inferred_type_invoke_method_via_interface: TextSerializationFailure # Was: Pass
+inference/inferred_type_is_enum: TextSerializationFailure # Was: Pass
+inference/inferred_type_is_enum_values: TextSerializationFailure # Was: Pass
+inference/inferred_type_is_typedef_parameterized: TextSerializationFailure # Was: Pass
+inference/inferred_type_is_typedef: TextSerializationFailure # Was: Pass
+inference/inferred_type_uses_synthetic_function_type_function_typed_param: TextSerializationFailure # Was: Pass
+inference/inferred_type_uses_synthetic_function_type_named_param: TextSerializationFailure # Was: Pass
+inference/inferred_type_uses_synthetic_function_type_positional_param: TextSerializationFailure # Was: Pass
+inference/inferred_type_uses_synthetic_function_type_required_param: TextSerializationFailure # Was: Pass
+inference/inferred_type_uses_synthetic_function_type: TextSerializationFailure # Was: Pass
+inference/inferred_type_via_closure_multiple_levels_of_nesting: TextSerializationFailure # Was: Pass
+inference/inferred_type_via_closure_type_depends_on_args: TextSerializationFailure # Was: Pass
+inference/inferred_type_via_closure_type_independent_of_args_field: TextSerializationFailure # Was: Pass
+inference/inferred_type_via_closure_type_independent_of_args_top_level: TextSerializationFailure # Was: Pass
+inference/infer_rethrow: TextSerializationFailure # Was: Pass
+inference/infer_return_of_statement_lambda: TextSerializationFailure # Was: Pass
+inference/infer_return_type_for_static_setter: TextSerializationFailure # Was: Pass
+inference/infer_setter_cross_to_getter: TextSerializationFailure # Was: Pass
+inference/infer_setter_from_later_inferred_setter: TextSerializationFailure # Was: Pass
+inference/infer_setter_function_typed: TextSerializationFailure # Was: Pass
+inference/infer_setter_return_type_only: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively_2_a: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively2: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively3_a: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively3: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively_a: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively_b: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively: TextSerializationFailure # Was: Pass
+inference/infer_statics_with_method_invocations_a: TextSerializationFailure # Was: Pass
+inference/infer_statics_with_method_invocations: TextSerializationFailure # Was: Pass
+inference/infer_throw_downwards: TextSerializationFailure # Was: Pass
+inference/infer_throw: TextSerializationFailure # Was: Pass
+inference/infer_typed_map_literal: TextSerializationFailure # Was: Pass
+inference/infer_type_on_overridden_fields2: TextSerializationFailure # Was: Pass
+inference/infer_type_on_overridden_fields4: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var2: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var_from_field: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var_from_top_level: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var: TextSerializationFailure # Was: Pass
+inference/infer_type_regardless_of_declaration_order_or_cycles_b: TextSerializationFailure # Was: Pass
+inference/infer_type_regardless_of_declaration_order_or_cycles: TextSerializationFailure # Was: RuntimeError
+inference/infer_types_on_generic_instantiations_3: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_4: TextSerializationFailure # Was: RuntimeError
+inference/infer_types_on_generic_instantiations_5: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_infer: TypeCheckError
+inference/infer_types_on_generic_instantiations_in_library_cycle_a: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_in_library_cycle: TextSerializationFailure # Was: Pass
+inference/infer_types_on_loop_indices_for_each_loop_async: TextSerializationFailure # Was: Pass
+inference/infer_types_on_loop_indices_for_each_loop: TextSerializationFailure # Was: Pass
+inference/infer_types_on_loop_indices_for_loop_with_inference: TextSerializationFailure # Was: Pass
+inference/infer_use_of_void_local: TextSerializationFailure # Was: Pass
+inference/infer_variable_void: TextSerializationFailure # Was: Pass
+inference/inheritance_does_not_imply_circularity: TextSerializationFailure # Was: Pass
+inference/instance_creation_downwards: TextSerializationFailure # Was: Pass
+inference/instantiate_tearoff_after_contravariance_check: TextSerializationFailure # Was: Pass
+inference/instantiate_tearoff_of_call: TypeCheckError # Issue #31746
+inference/instantiate_tearoff: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_generic2_has_bound_defined_after: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_generic2_has_bound_defined_before: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_generic2_no_bound: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_generic_has_bound_defined_after: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_generic_has_bound_defined_after transform: RuntimeError
+inference/instantiate_to_bounds_generic_has_bound_defined_before: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_invoke_constructor_no_bound: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_invoke_constructor_type_args_exact: TextSerializationFailure # Was: Pass
+inference/instantiate_to_bounds_not_generic: TextSerializationFailure # Was: Pass
+inference/int_upwards_local: TextSerializationFailure # Was: Pass
+inference/lambda_does_not_have_propagated_type_hint: TextSerializationFailure # Was: Pass
+inference/lambda_return_type: TextSerializationFailure # Was: Pass
+inference/lambda_void_context: TextSerializationFailure # Was: Pass
+inference/list_literals_can_infer_null_bottom: TextSerializationFailure # Was: Pass
+inference/list_literals: TextSerializationFailure # Was: Pass
+inference/list_literals_top_level: TextSerializationFailure # Was: Pass
+inference/list_literal_typed: TextSerializationFailure # Was: Pass
+inference/local_constructor_from_arguments: TextSerializationFailure # Was: Pass
+inference/local_reference_upwards_local: TextSerializationFailure # Was: Pass
+inference/local_return_and_yield: TextSerializationFailure # Was: Pass
+inference/logical_or_promotion: TextSerializationFailure # Was: Pass
+inference/map_literals_can_infer_null: TextSerializationFailure # Was: Pass
+inference/map_literals: TextSerializationFailure # Was: Pass
+inference/map_literals_top_level: TextSerializationFailure # Was: Pass
+inference/method_call_with_type_arguments_instance_method_identifier_sequence: TextSerializationFailure # Was: Pass
+inference/method_call_with_type_arguments_instance_method: TextSerializationFailure # Was: Pass
+inference/method_call_with_type_arguments_static_method: TextSerializationFailure # Was: Pass
+inference/method_call_with_type_arguments_top_level_function: TextSerializationFailure # Was: Pass
+inference/mixin_inference_instantiate_to_bounds_1: TextSerializationFailure # Was: Pass
+inference/mixin_inference_instantiate_to_bounds_2: TextSerializationFailure # Was: Pass
+inference/mixin_inference_instantiate_to_bounds_3: TextSerializationFailure # Was: Pass
+inference/mixin_inference_multiple_constraints: TextSerializationFailure # Was: Pass
+inference/mixin_inference_non_trivial_constraints: TextSerializationFailure # Was: Pass
+inference/mixin_inference_outwards_1: TextSerializationFailure # Was: Pass
+inference/mixin_inference_outwards_2: TextSerializationFailure # Was: Pass
+inference/mixin_inference_outwards_3: TypeCheckError
+inference/mixin_inference_outwards_4: TypeCheckError
+inference/mixin_inference_unification_1: TypeCheckError
+inference/mixin_inference_unification_2: TypeCheckError
+inference_new/const_invocation: TextSerializationFailure # Was: Pass
+inference_new/dependency_only_if_generic_method: TextSerializationFailure # Was: Pass
+inference_new/dependency_only_if_overloaded: TextSerializationFailure # Was: Pass
+inference_new/do_loop: TextSerializationFailure # Was: Pass
+inference_new/downwards_inference_inside_top_level_2: TextSerializationFailure # Was: Pass
+inference_new/downwards_inference_inside_top_level: TextSerializationFailure # Was: Pass
+inference_new/field_inference_circularity: TextSerializationFailure # Was: Pass
+inference_new/for_each_identifier_downwards: TextSerializationFailure # Was: Pass
+inference_new/for_each_invalid_iterable: TextSerializationFailure # Was: Pass
+inference_new/for_each_outer_var_type: TextSerializationFailure # Was: Pass
+inference_new/indexed_assign_combiner: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_implicit_this: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_implicit_this_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_full: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_set_vs_get: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_super: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_super_upwards: TypeCheckError
+inference_new/infer_assign_to_index: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_this: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_this_upwards: TypeCheckError
+inference_new/infer_assign_to_index_upwards: TypeCheckError
+inference_new/infer_assign_to_local: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_local_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_custom: TypeCheckError
+inference_new/infer_assign_to_property_full: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_null_aware: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_null_aware_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_super: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_super_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_ref: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_static: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_static_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_field_getter_setter_mismatch: TypeCheckError
+inference_new/infer_field_override_getter_overrides_setter: TypeCheckError
+inference_new/infer_field_override_setter_overrides_getter: TextSerializationFailure # Was: Pass
+inference_new/infer_instance_accessor_ref: TextSerializationFailure # Was: Pass
+inference_new/infer_instance_field_ref_circular: TextSerializationFailure # Was: Pass
+inference_new/infer_instance_field_ref: TextSerializationFailure # Was: Pass
+inference_new/infer_logical: TextSerializationFailure # Was: Pass
+inference_new/infer_use_of_void: TextSerializationFailure # Was: Pass
+inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
+inference_new/list_literals_can_infer_null_top_level: TextSerializationFailure # Was: Pass
+inference_new/map_literals_can_infer_null_top_level: TextSerializationFailure # Was: Pass
+inference_new/multiple_interface_inheritance: TextSerializationFailure # Was: Pass
+inference_new/property_assign_combiner: TextSerializationFailure # Was: Pass
+inference_new/property_get_toplevel: TextSerializationFailure # Was: Pass
+inference_new/static_assign_combiner: TextSerializationFailure # Was: Pass
+inference_new/strongly_connected_component: TextSerializationFailure # Was: Pass
+inference_new/super_index_get_substitution: TextSerializationFailure # Was: Pass
+inference_new/super_index_get: TextSerializationFailure # Was: Pass
+inference_new/switch: TextSerializationFailure # Was: Pass
+inference_new/top_level_field_depends_on_multiple_inheritance: TextSerializationFailure # Was: Pass
+inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: TextSerializationFailure # Was: Pass
+inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: TextSerializationFailure # Was: Pass
+inference_new/void_return_type_subtypes_dynamic: TextSerializationFailure # Was: Pass
+inference_new/while_loop: TextSerializationFailure # Was: Pass
+inference/no_error_when_declared_type_is_num_and_assigned_null: TextSerializationFailure # Was: Pass
+inference/non_const_invocation: TextSerializationFailure # Was: Pass
+inference/non_inferrable_getter_setter: TextSerializationFailure # Was: Pass
+inference/null_aware_method_invocation: TextSerializationFailure # Was: Pass
+inference/null_aware_property_get: TextSerializationFailure # Was: Pass
+inference/null_coalescing_operator_2: TextSerializationFailure # Was: Pass
+inference/null_coalescing_operator: TextSerializationFailure # Was: Pass
+inference/null_literal_should_not_infer_as_bottom: TextSerializationFailure # Was: Pass
+inference/overloaded_int_operators: TextSerializationFailure # Was: Pass
+inference/override_equals: TextSerializationFailure # Was: RuntimeError
+inference/parameter_defaults_downwards: TextSerializationFailure # Was: Pass
+inference/parameter_defaults_upwards: TextSerializationFailure # Was: Pass
+inference/promote_bounds: TextSerializationFailure # Was: Pass
+inference/promote_from_logical_rhs: TextSerializationFailure # Was: Pass
+inference/promotion_subtype_check: TextSerializationFailure # Was: Pass
+inference/propagate_inference_to_field_in_class_dynamic_warnings: TextSerializationFailure # Was: Pass
+inference/propagate_inference_to_field_in_class: TextSerializationFailure # Was: Pass
+inference/propagate_inference_transitively2: TextSerializationFailure # Was: Pass
+inference/propagate_inference_transitively: TextSerializationFailure # Was: Pass
+inference/propagate_variable_get: TextSerializationFailure # Was: Pass
+inference/property_get_toplevel: TextSerializationFailure # Was: Pass
+inference/property_set_bad_setter: TextSerializationFailure # Was: Pass
+inference/property_set: TextSerializationFailure # Was: Pass
+inference/recursive_generic_function: TextSerializationFailure # Was: Pass
+inference/reference_to_typedef: TextSerializationFailure # Was: Pass
+inference/refine_binary_expression_type_type_parameter_t_double: TextSerializationFailure # Was: Pass
+inference/refine_binary_expression_type_type_parameter_t_int: TextSerializationFailure # Was: Pass
+inference/refine_binary_expression_type_type_parameter_t_t: TextSerializationFailure # Was: Pass
+inference/setter_return_type: TextSerializationFailure # Was: Pass
+inference/simple_literal_bool: TextSerializationFailure # Was: Pass
+inference/simple_literal_double: TextSerializationFailure # Was: Pass
+inference/simple_literal_int: TextSerializationFailure # Was: Pass
+inference/static_method_tear_off: TextSerializationFailure # Was: Pass
+inference/string_literal: TextSerializationFailure # Was: Pass
+inference/subexpressions_of_explicitly_typed_fields: TextSerializationFailure # Was: Pass
+inference/super_index_set_substitution: TextSerializationFailure # Was: Pass
+inference/super_index_set: TextSerializationFailure # Was: Pass
+inference/super_initializer_substitution: TextSerializationFailure # Was: Pass
+inference/super_initializer: TextSerializationFailure # Was: Pass
+inference/super_method_invocation_substitution: TextSerializationFailure # Was: Pass
+inference/super_method_invocation: TextSerializationFailure # Was: Pass
+inference/super_property_get_invoke_function_typed: TextSerializationFailure # Was: Pass
+inference/super_property_get_invoke_implicit_call: TextSerializationFailure # Was: Pass
+inference/super_property_get_substitution: TextSerializationFailure # Was: Pass
+inference/super_property_get_tearoff: TextSerializationFailure # Was: Pass
+inference/super_property_get: TextSerializationFailure # Was: Pass
+inference/super_property_set_substitution: TextSerializationFailure # Was: Pass
+inference/switch_continue: TextSerializationFailure # Was: Pass
+inference/symbol_literal: TextSerializationFailure # Was: Pass
+inference/this_reference: TextSerializationFailure # Was: Pass
+inference/toplevel_inference_toplevel_var: TextSerializationFailure # Was: Pass
+inference/top_level_return_and_yield: TextSerializationFailure # Was: Pass
+inference/try_catch_finally: TextSerializationFailure # Was: Pass
+inference/try_catch_promotion: TextSerializationFailure # Was: Pass
+inference/try_catch: TextSerializationFailure # Was: Pass
+inference/try_finally: TextSerializationFailure # Was: Pass
+inference/type_cast: TextSerializationFailure # Was: Pass
+inference/type_promotion_ignores_local_functions: TextSerializationFailure # Was: Pass
+inference/type_promotion_not_and_not: TextSerializationFailure # Was: Pass
+inference/type_promotion_simple: TextSerializationFailure # Was: Pass
+inference/type_promotion_stopped_by_access_in_a_closure: TextSerializationFailure # Was: Pass
+inference/type_promotion_stopped_by_assignment_in_scope: TextSerializationFailure # Was: Pass
+inference/type_promotion_stopped_by_mutation_in_a_closure: TextSerializationFailure # Was: Pass
+inference/unresolved_super: TypeCheckError
+inference/unsafe_block_closure_inference_closure_call: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_constructor_call_explicit_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_constructor_call_implicit_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_constructor_call_no_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_explicit_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_implicit_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_function_call_no_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_function_call_no_type_param_via_expr: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_in_list_dynamic: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_in_list_typed: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_in_list_untyped: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_in_map_dynamic: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_in_map_typed: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_in_map_untyped: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_method_call_explicit_dynamic_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_method_call_explicit_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_method_call_implicit_type_param: TextSerializationFailure # Was: Pass
+inference/unsafe_block_closure_inference_method_call_no_type_param: TextSerializationFailure # Was: Pass
+inference/void_return_type_subtypes_dynamic: TextSerializationFailure # Was: Pass
+instantiate_to_bound/all_steps: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_generic_classes_from_dill: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_literal_list: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_literal_list_with_generic_argument: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_literal_map: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_omitted_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_super_bounded_type: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_typedef_literal_list: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_typedef_literal_list_with_generic_argument: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_typedef_literal_map: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_typedef_omitted_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/body_typedef_super_bounded_type: TextSerializationFailure # Was: Pass
+instantiate_to_bound/contravariant_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/contravariant_dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/contravariant_mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/contravariant_mutual_dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/covariant_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/covariant_dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/covariant_mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/covariant_mutual_dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/generic_classes_from_dill: TextSerializationFailure # Was: Pass
+instantiate_to_bound/inference_constrained_by_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/inference_defaults_to_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/inference_gives_input: TextSerializationFailure # Was: Pass
+instantiate_to_bound/inference_super_bounded_rejected: TextSerializationFailure # Was: Pass
+instantiate_to_bound/instantiated_in_outline: TextSerializationFailure # Was: Pass
+instantiate_to_bound/literal_list: TextSerializationFailure # Was: Pass
+instantiate_to_bound/literal_list_with_generic_argument: TextSerializationFailure # Was: Pass
+instantiate_to_bound/literal_map: TextSerializationFailure # Was: Pass
+instantiate_to_bound/multiple_strongly_connected: TextSerializationFailure # Was: Pass
+instantiate_to_bound/mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/mutual_dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_bound_due_to_non_simple: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_bound_due_to_variables: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_class_parametrized_typedef_cycle: TextSerializationFailure # Was: RuntimeError # Expected
+instantiate_to_bound/non_simple_class_typedef_cycle: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_co_inductive_for_each: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_co_inductive_no_dup: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_co_inductive: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_folded_regress: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_for_each: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_from_compiled: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_generic_function_in_bound_regress: TextSerializationFailure # Was: RuntimeError # Expected
+instantiate_to_bound/non_simple_many_libs_same_name_cycle_lib: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_many_libs_same_name_cycle: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_many: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_no_dup: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_suppress_consequence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_variables_from_same: TextSerializationFailure # Was: Pass
+instantiate_to_bound/omitted_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/raw_in_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/super_bounded_type: TextSerializationFailure # Was: Pass
+instantiate_to_bound/supertypes: TextSerializationFailure # Was: Pass
+instantiate_to_bound/typedef_instantiated_in_outline: TextSerializationFailure # Was: Pass
+instantiate_to_bound/typedef_literal_list: TextSerializationFailure # Was: Pass
+instantiate_to_bound/typedef_literal_list_with_generic_argument: TextSerializationFailure # Was: Pass
+instantiate_to_bound/typedef_literal_map: TextSerializationFailure # Was: Pass
+instantiate_to_bound/typedef_omitted_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/typedef_raw_in_bound: TextSerializationFailure # Was: Pass
+instantiate_to_bound/typedef_super_bounded_type: TextSerializationFailure # Was: Pass
+invalid_assignment: TextSerializationFailure # Was: Pass
+invalid_cast: TextSerializationFailure # Was: Pass
+invalid_type: TypeCheckError
+invocations: TextSerializationFailure # Was: RuntimeError
+issue34899: TypeCheckError
+literals: TextSerializationFailure # Was: Pass
+local_generic_function: TextSerializationFailure # Was: Pass
+magic_const: TextSerializationFailure # Was: Pass
+map: TextSerializationFailure # Was: Pass
+metadata_enum: TextSerializationFailure # Was: Pass
+metadata_named_mixin_application: TextSerializationFailure # Was: Pass
+micro: TextSerializationFailure # Was: RuntimeError
+minimum_int: TextSerializationFailure # Was: Pass
+missing_constructor: TextSerializationFailure # Was: Pass
+mixin_application_override: TypeCheckError
+mixin_constructors_with_default_values: TextSerializationFailure # Was: Pass
+mixin_inherited_setter_for_mixed_in_field: TextSerializationFailure # Was: Pass
+mixin_super_repeated: TextSerializationFailure # Was: Pass
+mixin: TextSerializationFailure # Was: Pass
+named_function_scope: TextSerializationFailure # Was: Pass
+named_parameters: TextSerializationFailure # Was: Pass
+native_as_name: TextSerializationFailure # Was: Pass
+nested_implicit_const_with_env_var: TextSerializationFailure # Was: Pass
+new_const_insertion/simple: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/abstract_accessors_from_field_one_defined: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/abstract_accessors_from_field: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/abstract_accessors_from_field_with_substitution: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/abstract_interface_nsm_inherited: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/default_argument_values: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/duplicated_abstract_method: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/forwarders_not_assumed_from_mixin: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/interface_with_concrete: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/interface_with_nsm: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/no_forwarders_for_abstract_classes_chain: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/no_forwarders_for_abstract_classes: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/nsm_inherited: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/nsm_mixed_in: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/private_module: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/private_same: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/private: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/same: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/setter_not_shadowed_by_method: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/subst_on_forwarder: TextSerializationFailure # Was: Pass
+no_such_method_private_setter_lib: TextSerializationFailure # Was: Pass
+no_such_method_private_setter: TextSerializationFailure # Was: Pass
+null_aware: TextSerializationFailure # Was: Pass
+operators: TextSerializationFailure # Was: Pass
+optional: TypeCheckError
+override_check_accessor_after_inference: TypeCheckError # Issue #31620
+override_check_accessor_basic: TypeCheckError # Issue #31620
+override_check_accessor_with_covariant_modifier: TypeCheckError # Issue #31620
+override_check_after_inference: TypeCheckError # Issue #31620
+override_check_basic: TypeCheckError # Issue #31620
+override_check_generic_method_f_bounded: TextSerializationFailure # Was: Pass
+override_check_two_substitutions: TextSerializationFailure # Was: Pass
+override_check_with_covariant_modifier: TypeCheckError # Issue #31620
+override: TextSerializationFailure # Was: Pass
+part_as_entry_point_lib: TextSerializationFailure # Was: Pass
+part_as_entry_point: TextSerializationFailure # Was: Pass
+prefer_baseclass: TextSerializationFailure # Was: Pass
+private_method_tearoff_lib: TextSerializationFailure # Was: Pass
+private_method_tearoff: TextSerializationFailure # Was: Pass
+public_method_tearoff_lib: TextSerializationFailure # Was: Pass
+public_method_tearoff: TextSerializationFailure # Was: Pass
+qualified_lib: TextSerializationFailure # Was: Pass
+qualified_part: TextSerializationFailure # Was: Pass
+qualified: TextSerializationFailure # Was: Pass
+rasta/abstract_constructor: TextSerializationFailure # Was: RuntimeError
+rasta/bad_constructor_redirection: TextSerializationFailure # Was: RuntimeError
+rasta/bad_continue: RuntimeError
+rasta/bad_default_constructor: VerificationError
+rasta/bad_explicit_super_constructor: TextSerializationFailure # Was: RuntimeError
+rasta/bad_implicit_super_constructor: TextSerializationFailure # Was: RuntimeError
+rasta/bad_interpolation: TextSerializationFailure # Was: RuntimeError
+rasta/bad_redirection: TextSerializationFailure # Was: RuntimeError
+rasta/bad_setter_initializer: TextSerializationFailure # Was: RuntimeError
+rasta/bad_unicode: TextSerializationFailure # Was: Pass
+rasta/breaking_bad: RuntimeError
+rasta/cascades: TextSerializationFailure # Was: Pass
+rasta/class_hierarchy: TextSerializationFailure # Was: RuntimeError
+rasta/class_member: TextSerializationFailure # Was: RuntimeError
+rasta/constant_get_and_invoke: TextSerializationFailure # Was: RuntimeError
+rasta/deferred_lib: TextSerializationFailure # Was: Pass
+rasta/deferred_load: TextSerializationFailure # Was: Pass
+rasta/duplicated_mixin: TextSerializationFailure # Was: RuntimeError # Expected, this file has no main method.
+rasta/enum: TextSerializationFailure # Was: Pass
+rasta/export: TextSerializationFailure # Was: RuntimeError # Expected, this file has no main method.
+rasta/external_factory_redirection: TextSerializationFailure # Was: Pass
+rasta/foo: TextSerializationFailure # Was: RuntimeError # Expected, this file has no main method.
+rasta/for_loop: TextSerializationFailure # Was: Pass
+rasta/generic_factory: TextSerializationFailure # Was: RuntimeError
+rasta/hello: TextSerializationFailure # Was: Pass
+rasta/import_export: TextSerializationFailure # Was: Pass
+rasta/issue_000001: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000002: TextSerializationFailure # Was: Pass
+rasta/issue_000004: TextSerializationFailure # Was: Pass
+rasta/issue_000006: TextSerializationFailure # Was: Pass
+rasta/issue_000007: TextSerializationFailure # Was: Pass
+rasta/issue_000008: TextSerializationFailure # Was: Pass
+rasta/issue_000011: TextSerializationFailure # Was: Pass
+rasta/issue_000012: TextSerializationFailure # Was: Pass
+rasta/issue_000025: TextSerializationFailure # Was: Pass
+rasta/issue_000026: TextSerializationFailure # Was: Pass
+rasta/issue_000031: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000032: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000034: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000035a: TextSerializationFailure # Was: Pass
+rasta/issue_000035: TextSerializationFailure # Was: Pass
+rasta/issue_000036: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000039: VerificationError
+rasta/issue_000041: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000042: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000043: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000044: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000046: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000047: TextSerializationFailure # Was: Pass
+rasta/issue_000048: TextSerializationFailure # Was: Pass
+rasta/issue_000052: TextSerializationFailure # Was: Pass
+rasta/issue_000053: TextSerializationFailure # Was: Pass
+rasta/issue_000067: TextSerializationFailure # Was: Pass
+rasta/issue_000068: TextSerializationFailure # Was: Pass
+rasta/issue_000069: TextSerializationFailure # Was: Pass
+rasta/issue_000070: TextSerializationFailure # Was: Pass
+rasta/issue_000080: TextSerializationFailure # Was: Pass
+rasta/issue_000081: TextSerializationFailure # Was: RuntimeError
+rasta/malformed_const_constructor: TextSerializationFailure # Was: RuntimeError
+rasta/malformed_function: RuntimeError
+rasta/malformed_function_type: TextSerializationFailure # Was: Pass
+rasta/mixin_library: TypeCheckError
+rasta/native_is_illegal: TextSerializationFailure # Was: RuntimeError
+rasta/parser_error: TextSerializationFailure # Was: RuntimeError
+rasta/previsit_deferred: TextSerializationFailure # Was: Pass
+rasta/static: TextSerializationFailure # Was: RuntimeError
+rasta/super_initializer: TextSerializationFailure # Was: RuntimeError
+rasta/super_mixin: TypeCheckError
+rasta/super_operator: TypeCheckError
+rasta/super: TypeCheckError
+rasta/supports_reflection: TextSerializationFailure # Was: Pass
+rasta/switch_execution_case_t02: TextSerializationFailure # Was: Pass
+rasta/switch_fall_through: TextSerializationFailure # Was: Pass
+rasta/this_invoke: TextSerializationFailure # Was: Pass
+rasta/typedef: Crash
+rasta/type_literals: Crash
+rasta/type_with_parse_error: TextSerializationFailure # Was: Pass
+rasta/unresolved_constructor: TextSerializationFailure # Was: RuntimeError
+rasta/unresolved_for_in: TextSerializationFailure # Was: RuntimeError
+rasta/unresolved_recovery: TypeCheckError
+rasta/unresolved: RuntimeError
+redirecting_constructor: TextSerializationFailure # Was: Pass
+redirecting_factory_chain_test: TextSerializationFailure # Was: Pass
+redirecting_factory_const_inference: TextSerializationFailure # Was: Pass
+redirecting_factory_metadata: TextSerializationFailure # Was: Pass
+redirecting_factory_simple_test: TextSerializationFailure # Was: Pass
+redirecting_factory: TextSerializationFailure # Was: Pass
+redirecting_factory_typeargs_test: TextSerializationFailure # Was: Pass
+redirecting_factory_typeparambounds_test: TextSerializationFailure # Was: Pass
+redirecting_factory_typeparam_test: TextSerializationFailure # Was: Pass
+redirecting_initializer_arguments_assignable_test: TextSerializationFailure # Was: Pass
+redirecting_initializer_arguments_test: TextSerializationFailure # Was: Pass
+redirection_chain_type_arguments_subst: TextSerializationFailure # Was: Pass
+redirection_chain_type_arguments: TextSerializationFailure # Was: Pass
+redirection_type_arguments: TextSerializationFailure # Was: Pass
+regress/issue_29937: TextSerializationFailure # Was: Pass
+regress/issue_29940: TextSerializationFailure # Was: Pass
+regress/issue_29941: TextSerializationFailure # Was: Pass
+regress/issue_29942: TextSerializationFailure # Was: Pass
+regress/issue_29944: TextSerializationFailure # Was: Pass
+regress/issue_29975: TextSerializationFailure # Was: Pass
+regress/issue_29976: RuntimeError # Tests runtime behavior of error recovery.
+regress/issue_29978: TextSerializationFailure # Was: Pass
+regress/issue_29979: TextSerializationFailure # Was: Pass
+regress/issue_29981: TextSerializationFailure # Was: Pass
+regress/issue_29982: TextSerializationFailure # Was: RuntimeError # Tests runtime behavior of error recovery.
+regress/issue_29983: TextSerializationFailure # Was: Pass
+regress/issue_29984: TextSerializationFailure # Was: Pass
+regress/issue_30834: TextSerializationFailure # Was: Pass
+regress/issue_30836: TextSerializationFailure # Was: RuntimeError # Issue 30836.
+regress/issue_30838: TextSerializationFailure # Was: Pass
+regress/issue_30981: TextSerializationFailure # Was: Pass
+regress/issue_31155: TextSerializationFailure # Was: Pass
+regress/issue_31171: TextSerializationFailure # Was: Pass
+regress/issue_31181: TextSerializationFailure # Was: Pass
+regress/issue_31183: TextSerializationFailure # Was: Pass
+regress/issue_31184: TextSerializationFailure # Was: Pass
+regress/issue_31185: TextSerializationFailure # Was: Pass
+regress/issue_31188: TextSerializationFailure # Was: Pass
+regress/issue_31190: TextSerializationFailure # Was: Pass
+regress/issue_31192: TextSerializationFailure # Was: Pass
+regress/issue_31198: TextSerializationFailure # Was: Pass
+regress/issue_31213: TextSerializationFailure # Was: Pass
+regress/issue_31299: TypeCheckError
+regress/issue_31766: TextSerializationFailure # Was: Pass
+regress/issue_31846: TextSerializationFailure # Was: Pass
+regress/issue_31996: TextSerializationFailure # Was: Pass
+regress/issue_32182: TextSerializationFailure # Was: Pass
+regress/issue_32196: TextSerializationFailure # Was: Pass
+regress/issue_32200: TextSerializationFailure # Was: RuntimeError # Invalid type.
+regress/issue_32660: TextSerializationFailure # Was: Pass
+regress/issue_32972: TypeCheckError
+regress/issue_33452: TextSerializationFailure # Was: RuntimeError # Test has an intentional error
+regress/issue_33672: TextSerializationFailure # Was: Pass
+regress/issue_34225: TextSerializationFailure # Was: RuntimeError
+regress/issue_34291_lib: TextSerializationFailure # Was: Pass
+regress/issue_34291: TextSerializationFailure # Was: Pass
+regress/issue_34403_lib: TextSerializationFailure # Was: Pass
+regress/issue_34403: TextSerializationFailure # Was: Pass
+regress/issue_34498_lib: TextSerializationFailure # Was: Pass
+regress/issue_34498: TextSerializationFailure # Was: Pass
+regress/issue_34563: TextSerializationFailure # Was: RuntimeError # Test execution after recovery
+regress/issue_34610: TextSerializationFailure # Was: Pass
+regress/issue_34614: TextSerializationFailure # Was: Pass
+regress/issue_34850: TextSerializationFailure # Was: Pass
+regress/issue_35151: TextSerializationFailure # Was: Pass
+regress/issue_35177: TextSerializationFailure # Was: RuntimeError
+regress/issue_35213: TextSerializationFailure # Was: Pass
+regress/issue_35258: TextSerializationFailure # Was: RuntimeError # Expected
+regress/issue_35259: TextSerializationFailure # Was: RuntimeError # Expected
+regress/issue_35260: TextSerializationFailure # Was: RuntimeError # Expected
+regress/issue_35266: TextSerializationFailure # Was: RuntimeError # Expected
+reject_generic_function_types_in_bounds: TextSerializationFailure # Was: RuntimeError # Expected
+return_with_unknown_type_in_context: TextSerializationFailure # Was: Pass
+runtime_checks/call_kinds_get: TextSerializationFailure # Was: Pass
+runtime_checks/call_kinds_set: TextSerializationFailure # Was: Pass
+runtime_checks/call_kinds: TextSerializationFailure # Was: Pass
+runtime_checks/call_method_implicit_tear_off_future_or: TextSerializationFailure # Was: Pass
+runtime_checks/call_method_implicit_tear_off: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_field: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_generic_method_type_parameter: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_generic_return_null_aware: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_generic_return_tear_off: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_generic_return: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_getter_return_null_aware: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_getter_return: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_getter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_method_type_parameter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_complex: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface_mixin: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface_super_mixin: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface_super: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_tear_off: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_field_inherited_by_setter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_field: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_setter_inherited_by_field: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_setter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_setter: TextSerializationFailure # Was: Pass
+runtime_checks/dynamic_invocation_generic: TextSerializationFailure # Was: Pass
+runtime_checks/dynamic_invocation_of_getter: TextSerializationFailure # Was: Pass
+runtime_checks/dynamic_invocation: TextSerializationFailure # Was: Pass
+runtime_checks/field_forwarding_stub_generic_covariant: TextSerializationFailure # Was: Pass
+runtime_checks/forwarding_stub_with_default_values: TextSerializationFailure # Was: Pass
+runtime_checks/forwarding_stub_with_non_covariant_param: TextSerializationFailure # Was: Pass
+runtime_checks/generic_covariance_inheritance_setter_field: TextSerializationFailure # Was: Pass
+runtime_checks/generic_vs_explicit_covariance: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_assert_initializer: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_assert_statement: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_constructor_initializer: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_do: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_for_condition: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_if: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_not: TextSerializationFailure # Was: Pass
+runtime_checks/implicit_downcast_while: TextSerializationFailure # Was: Pass
+runtime_checks_new/abstract_override_becomes_forwarding_stub: TextSerializationFailure # Was: Pass
+runtime_checks_new/call_through_this: TextSerializationFailure # Was: Pass
+runtime_checks_new/contravariant_combiner: TextSerializationFailure # Was: Pass
+runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast: TextSerializationFailure # Was: RuntimeError
+runtime_checks_new/contravariant_getter_return_compound_assign: TextSerializationFailure # Was: Pass
+runtime_checks_new/contravariant_index_assign: TextSerializationFailure # Was: Pass
+runtime_checks_new/contravariant_index_get: TextSerializationFailure # Was: Pass
+runtime_checks_new/derived_class_typed: TextSerializationFailure # Was: Pass
+runtime_checks_new/field_forwarding_stub_abstract_generic_covariant: TextSerializationFailure # Was: Pass
+runtime_checks_new/field_forwarding_stub_explicit_covariant: TextSerializationFailure # Was: Pass
+runtime_checks_new/for_in_call_kinds: TextSerializationFailure # Was: Pass
+runtime_checks_new/generic_covariance_based_on_inference: TextSerializationFailure # Was: Pass
+runtime_checks_new/implicit_downcast_field: TextSerializationFailure # Was: Pass
+runtime_checks_new/mixin_forwarding_stub_field: TypeCheckError
+runtime_checks_new/mixin_forwarding_stub_getter: TypeCheckError
+runtime_checks_new/mixin_forwarding_stub_setter: TypeCheckError
+runtime_checks_new/stub_checked_via_target: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_contravariant_from_class: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariant_from_interface: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariant_from_super: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariantImpl_from_class: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariantImpl_from_interface: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariantImpl_from_super: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariantInterface_from_class: TextSerializationFailure # Was: Pass
+statements: Crash
+static_setter: TextSerializationFailure # Was: Pass
+store_load: TextSerializationFailure # Was: Pass
+stringliteral: TextSerializationFailure # Was: Pass
+super_call: TextSerializationFailure # Was: Pass
+super_nsm: TextSerializationFailure # Was: Pass
+tabs: TextSerializationFailure # Was: Pass
+top_level_accessors_part: TextSerializationFailure # Was: Pass
+top_level_accessors: TextSerializationFailure # Was: Pass
+top_level_library_method: TextSerializationFailure # Was: Pass
+typedef: TextSerializationFailure # Was: Pass
+type_variable_as_super: TextSerializationFailure # Was: RuntimeError
+type_variable_prefix: TextSerializationFailure # Was: RuntimeError
+type_variable_uses: TextSerializationFailure # Was: Pass
+undefined_getter_in_compound_assignment: TextSerializationFailure # Was: Pass
+undefined: TextSerializationFailure # Was: Pass
+uninitialized_fields: TextSerializationFailure # Was: Pass
+unused_methods: TextSerializationFailure # Was: Pass
+var_as_type_name: TextSerializationFailure # Was: Pass
+void_methods: ExpectationFileMismatch
+warn_unresolved_sends: InstrumentationMismatch # Test assumes Dart 1.0 semantics
diff --git a/pkg/front_end/testing.json b/pkg/front_end/testing.json
index a63d66f..6ad3fa1 100644
--- a/pkg/front_end/testing.json
+++ b/pkg/front_end/testing.json
@@ -123,6 +123,24 @@
     },
 
     {
+      "name": "text_serialization",
+      "kind": "Chain",
+      "source": "test/fasta/text_serialization_test.dart",
+      "path": "testcases/",
+      "status": "testcases/text_serialization.status",
+      "pattern": [
+        "\\.dart$"
+      ],
+      "exclude": [
+        "/testcases/.*_part[0-9]*\\.dart$",
+        "/testcases/.*_lib[0-9]*\\.dart$",
+        "/testcases/dartino/",
+        "/testcases/shaker/",
+        "/testcases/expression/"
+      ]
+    },
+
+    {
       "name": "incremental",
       "kind": "Chain",
       "source": "test/fasta/incremental_test.dart",
diff --git a/pkg/front_end/tool/_fasta/command_line.dart b/pkg/front_end/tool/_fasta/command_line.dart
index f31ab71..7728f88 100644
--- a/pkg/front_end/tool/_fasta/command_line.dart
+++ b/pkg/front_end/tool/_fasta/command_line.dart
@@ -14,6 +14,9 @@
 import 'package:front_end/src/api_prototype/compiler_options.dart'
     show CompilerOptions;
 
+import 'package:front_end/src/api_prototype/experimental_flags.dart'
+    show ExperimentalFlag, parseExperimentalFlag;
+
 import 'package:front_end/src/api_prototype/file_system.dart' show FileSystem;
 
 import 'package:front_end/src/api_prototype/standard_file_system.dart'
@@ -237,7 +240,9 @@
 const Map<String, dynamic> optionSpecification = const <String, dynamic>{
   "--bytecode": false,
   "--compile-sdk": Uri,
+  "--disable-experiment": ",",
   "--dump-ir": false,
+  "--enable-experiment": ",",
   "--exclude-source": false,
   "--omit-platform": false,
   "--fatal": ",",
@@ -252,7 +257,6 @@
   "--single-root-base": Uri,
   "--single-root-scheme": String,
   "--supermixin": true,
-  "--sync-async": true,
   "--target": String,
   "--verbose": false,
   "--verify": false,
@@ -289,12 +293,9 @@
 
   final bool legacyMode = options["--legacy-mode"];
 
-  final bool syncAsync = options["--sync-async"];
-
   final String targetName = options["--target"] ?? "vm";
 
-  final TargetFlags flags =
-      new TargetFlags(legacyMode: legacyMode, syncAsync: syncAsync);
+  final TargetFlags flags = new TargetFlags(legacyMode: legacyMode);
 
   final Target target = getTarget(targetName, flags);
   if (target == null) {
@@ -342,6 +343,31 @@
     });
   }
 
+  final List<String> enabledExperiments = options["--enable-experiment"];
+  final List<String> disabledExperiments = options["--disable-experiment"];
+
+  Map<ExperimentalFlag, bool> experimentalFlags = {};
+
+  void setExperimentalFlags(List<String> experiments, bool value) {
+    if (experiments != null) {
+      for (String experiment in experiments) {
+        ExperimentalFlag flag = parseExperimentalFlag(experiment);
+        if (flag == null) {
+          throw new CommandLineProblem.deprecated(
+              "Unknown experiment: " + experiment);
+        }
+        if (experimentalFlags.containsKey(flag)) {
+          throw new CommandLineProblem.deprecated(
+              "Experiment mentioned more than once: " + experiment);
+        }
+        experimentalFlags[flag] = value;
+      }
+    }
+  }
+
+  setExperimentalFlags(enabledExperiments, true);
+  setExperimentalFlags(disabledExperiments, false);
+
   if (programName == "compile_platform") {
     if (arguments.length != 5) {
       return throw new CommandLineProblem.deprecated(
@@ -373,7 +399,8 @@
           ..omitPlatform = omitPlatform
           ..verbose = verbose
           ..verify = verify
-          ..bytecode = bytecode,
+          ..bytecode = bytecode
+          ..experimentalFlags = experimentalFlags,
         inputs: <Uri>[Uri.parse(arguments[0])],
         output: resolveInputUri(arguments[3], extraSchemes: extraSchemes));
   } else if (arguments.isEmpty) {
@@ -407,7 +434,8 @@
     ..debugDump = dumpIr
     ..omitPlatform = omitPlatform
     ..verbose = verbose
-    ..verify = verify;
+    ..verify = verify
+    ..experimentalFlags = experimentalFlags;
 
   // TODO(ahe): What about chase dependencies?
 
diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart
index ccbae0a..1da6852 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -134,7 +134,8 @@
     hasLabeler = true;
   }
 
-  for (Match match in placeholderPattern.allMatches("$template${tip ?? ''}")) {
+  for (Match match
+      in placeholderPattern.allMatches("$template\n${tip ?? ''}")) {
     String name = match[1];
     String padding = match[2];
     String fractionDigits = match[3];
@@ -202,6 +203,13 @@
         conversions.add("name4 = demangleMixinApplicationName(name4);");
         break;
 
+      case "names":
+        parameters.add("List<String> _names");
+        conversions.add("if (_names.isEmpty) throw 'No names provided';");
+        arguments.add("'names': _names");
+        conversions.add("String names = itemizeNames(_names);");
+        break;
+
       case "lexeme":
         parameters.add("Token token");
         conversions.add("String lexeme = token.lexeme;");
diff --git a/pkg/front_end/tool/perf_common.dart b/pkg/front_end/tool/perf_common.dart
index a6054cc..67f93a9 100644
--- a/pkg/front_end/tool/perf_common.dart
+++ b/pkg/front_end/tool/perf_common.dart
@@ -73,28 +73,12 @@
 Target createTarget({bool isFlutter: false, bool legacyMode: false}) {
   var flags = new TargetFlags(legacyMode: legacyMode);
   if (isFlutter) {
-    return legacyMode
-        ? new LegacyFlutterTarget(flags)
-        : new FlutterTarget(flags);
+    return new FlutterTarget(flags);
   } else {
-    return legacyMode ? new LegacyVmTarget(flags) : new VmTarget(flags);
+    return new VmTarget(flags);
   }
 }
 
-class LegacyVmTarget extends VmTarget {
-  LegacyVmTarget(TargetFlags flags) : super(flags);
-
-  @override
-  bool get disableTypeInference => true;
-}
-
-class LegacyFlutterTarget extends FlutterTarget {
-  LegacyFlutterTarget(TargetFlags flags) : super(flags);
-
-  @override
-  bool get disableTypeInference => true;
-}
-
 class TimingsCollector {
   final Stopwatch stopwatch = new Stopwatch();
 
@@ -137,10 +121,16 @@
   void printTimings() {
     timings.forEach((String key, List<double> durations) {
       double total = 0.0;
-      for (double duration in durations.skip(3)) {
-        total += duration;
+      int length = durations.length;
+      if (length == 1) {
+        total += durations.single;
+      } else {
+        length -= 3;
+        for (double duration in durations.skip(3)) {
+          total += duration;
+        }
       }
-      print("$key took: ${total / (durations.length - 3)}ms");
+      print("$key took: ${total / length}ms");
     });
   }
 }
diff --git a/pkg/kernel/bin/transform.dart b/pkg/kernel/bin/transform.dart
index 9e30c76..a2d90ae 100755
--- a/pkg/kernel/bin/transform.dart
+++ b/pkg/kernel/bin/transform.dart
@@ -41,10 +41,7 @@
   ..addOption('transformation',
       abbr: 't',
       help: 'The transformation to apply.',
-      defaultsTo: 'continuation')
-  ..addFlag('sync-async',
-      help: 'Whether `async` functions start synchronously.',
-      defaultsTo: false);
+      defaultsTo: 'continuation');
 
 main(List<String> arguments) async {
   if (arguments.isNotEmpty && arguments[0] == '--batch') {
@@ -69,7 +66,6 @@
   var output = options['out'];
   var format = options['format'];
   var verbose = options['verbose'];
-  var syncAsync = options['sync-async'];
 
   if (output == null) {
     output = '${input.substring(0, input.lastIndexOf('.'))}.transformed.dill';
@@ -86,7 +82,7 @@
   final hierarchy = new ClassHierarchy(component);
   switch (options['transformation']) {
     case 'continuation':
-      component = cont.transformComponent(coreTypes, component, syncAsync);
+      component = cont.transformComponent(coreTypes, component);
       break;
     case 'resolve-mixins':
       mix.transformLibraries(
diff --git a/pkg/kernel/bin/type_check.dart b/pkg/kernel/bin/type_check.dart
index 7591ee0..5c3ef65 100755
--- a/pkg/kernel/bin/type_check.dart
+++ b/pkg/kernel/bin/type_check.dart
@@ -10,8 +10,7 @@
 import 'package:kernel/src/tool/command_line_util.dart';
 
 void usage() {
-  print("Type checker that can be used to find strong mode");
-  print("violations in the Kernel files.");
+  print("Type checker that can be used to find type errors in Kernel files.");
   print("");
   print("Usage: dart <script> dillFile.dill");
   print("The given argument should be an existing file");
@@ -24,7 +23,7 @@
       requireFileExists: true);
   final binary = CommandLineHelper.tryLoadDill(args[0]);
   ErrorFormatter errorFormatter = new ErrorFormatter();
-  new StrongModeTypeChecker(errorFormatter, binary)..checkComponent(binary);
+  new NaiveTypeChecker(errorFormatter, binary)..checkComponent(binary);
   if (errorFormatter.numberOfFailures > 0) {
     errorFormatter.failures.forEach(print);
     print('------- Found ${errorFormatter.numberOfFailures} errors -------');
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index 15c2aa4..865beb6 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -131,7 +131,7 @@
 
 type ComponentFile {
   UInt32 magic = 0x90ABCDEF;
-  UInt32 formatVersion = 13;
+  UInt32 formatVersion = 15;
   Library[] libraries;
   UriSource sourceMap;
   List<CanonicalName> canonicalNames;
@@ -373,8 +373,8 @@
   Name name;
   List<Expression> annotations;
   // Only present if the 'isForwardingStub' flag is set.
-  Option<MemberReference> forwardingStubSuperTarget;
-  Option<MemberReference> forwardingStubInterfaceTarget;
+  MemberReference forwardingStubSuperTarget; // May be NullReference.
+  MemberReference forwardingStubInterfaceTarget; // May be NullReference.
   // Can only be absent if abstract, but tag is there anyway.
   Option<FunctionNode> function;
 }
@@ -784,6 +784,20 @@
   List<Expression> values;
 }
 
+type SetLiteral extends Expression {
+  Byte tag = 109; // Note: tag is out of order.
+  FileOffset fileOffset;
+  DartType typeArgument;
+  List<Expression> values;
+}
+
+type ConstSetLiteral extends Expression {
+  Byte tag = 110; // Note: tag is out of order.
+  FileOffset fileOffset;
+  DartType typeArgument;
+  List<Expression> values;
+}
+
 type MapLiteral extends Expression {
   Byte tag = 50;
   FileOffset fileOffset;
@@ -872,7 +886,7 @@
 
 type SymbolConstant extends Constant {
   Byte tag = 5;
-  Option<LibraryReference> library;
+  LibraryReference library; // May be NullReference.
   StringReference name;
 }
 
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 78bc419..4f16b8a 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -2161,15 +2161,15 @@
 abstract class Expression extends TreeNode {
   /// Returns the static type of the expression.
   ///
-  /// Should only be used on code compiled in strong mode, as this method
-  /// assumes the IR is strongly typed.
+  /// Shouldn't be used on code compiled in legacy mode, as this method assumes
+  /// the IR is strongly typed.
   DartType getStaticType(TypeEnvironment types);
 
   /// Returns the static type of the expression as an instantiation of
   /// [superclass].
   ///
-  /// Should only be used on code compiled in strong mode, as this method
-  /// assumes the IR is strongly typed.
+  /// Shouldn't be used on code compiled in legacy mode, as this method assumes
+  /// the IR is strongly typed.
   ///
   /// This method furthermore assumes that the type of the expression actually
   /// is a subtype of (some instantiation of) the given [superclass].
@@ -3425,6 +3425,35 @@
   }
 }
 
+class SetLiteral extends Expression {
+  bool isConst;
+  DartType typeArgument; // Not null, defaults to DynamicType.
+  final List<Expression> expressions;
+
+  SetLiteral(this.expressions,
+      {this.typeArgument: const DynamicType(), this.isConst: false}) {
+    assert(typeArgument != null);
+    setParents(expressions, this);
+  }
+
+  DartType getStaticType(TypeEnvironment types) {
+    return types.literalSetType(typeArgument);
+  }
+
+  accept(ExpressionVisitor v) => v.visitSetLiteral(this);
+  accept1(ExpressionVisitor1 v, arg) => v.visitSetLiteral(this, arg);
+
+  visitChildren(Visitor v) {
+    typeArgument?.accept(v);
+    visitList(expressions, v);
+  }
+
+  transformChildren(Transformer v) {
+    typeArgument = v.visitDartType(typeArgument);
+    transformList(expressions, v, this);
+  }
+}
+
 class MapLiteral extends Expression {
   bool isConst;
   DartType keyType; // Not null, defaults to DynamicType.
@@ -5564,7 +5593,7 @@
   /// Write List<Byte> into the sink.
   void writeByteList(List<int> bytes);
 
-  void writeCanonicalNameReference(CanonicalName name);
+  void writeNullAllowedCanonicalNameReference(CanonicalName name);
   void writeStringReference(String str);
   void writeName(Name node);
   void writeDartType(DartType type);
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index b39a376..0c9b61b 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -216,10 +216,7 @@
       case ConstantTag.StringConstant:
         return new StringConstant(readStringReference());
       case ConstantTag.SymbolConstant:
-        Reference libraryReference;
-        if (readAndCheckOptionTag()) {
-          libraryReference = readLibraryReference();
-        }
+        Reference libraryReference = readLibraryReference(allowNull: true);
         return new SymbolConstant(readStringReference(), libraryReference);
       case ConstantTag.MapConstant:
         final DartType keyType = readDartType();
@@ -1113,9 +1110,9 @@
         (kind == ProcedureKind.Factory && functionNodeSize <= 50) ||
             _disableLazyReading;
     var forwardingStubSuperTargetReference =
-        readAndCheckOptionTag() ? readMemberReference() : null;
+        readMemberReference(allowNull: true);
     var forwardingStubInterfaceTargetReference =
-        readAndCheckOptionTag() ? readMemberReference() : null;
+        readMemberReference(allowNull: true);
     var function = readFunctionNodeOption(!readFunctionNodeNow, endOffset);
     var transformerFlags = getAndResetTransformerFlags();
     assert(((_) => true)(debugPath.removeLast()));
@@ -1533,6 +1530,18 @@
         return new ListLiteral(readExpressionList(),
             typeArgument: typeArgument, isConst: true)
           ..fileOffset = offset;
+      case Tag.SetLiteral:
+        int offset = readOffset();
+        var typeArgument = readDartType();
+        return new SetLiteral(readExpressionList(),
+            typeArgument: typeArgument, isConst: false)
+          ..fileOffset = offset;
+      case Tag.ConstSetLiteral:
+        int offset = readOffset();
+        var typeArgument = readDartType();
+        return new SetLiteral(readExpressionList(),
+            typeArgument: typeArgument, isConst: true)
+          ..fileOffset = offset;
       case Tag.MapLiteral:
         int offset = readOffset();
         var keyType = readDartType();
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index cd3edbe..892a72b 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -203,7 +203,7 @@
       writeStringReference(constant.value);
     } else if (constant is SymbolConstant) {
       writeByte(ConstantTag.SymbolConstant);
-      writeOptionalReference(constant.libraryReference);
+      writeNullAllowedReference(constant.libraryReference);
       writeStringReference(constant.name);
     } else if (constant is MapConstant) {
       writeByte(ConstantTag.MapConstant);
@@ -226,7 +226,7 @@
       constant.typeArguments.forEach(writeDartType);
       writeUInt30(constant.fieldValues.length);
       constant.fieldValues.forEach((Reference fieldRef, Constant value) {
-        writeCanonicalNameReference(fieldRef.canonicalName);
+        writeNonNullCanonicalNameReference(fieldRef.canonicalName);
         writeConstantReference(value);
       });
     } else if (constant is PartialInstantiationConstant) {
@@ -239,12 +239,12 @@
       }
     } else if (constant is TearOffConstant) {
       writeByte(ConstantTag.TearOffConstant);
-      writeCanonicalNameReference(constant.procedure.canonicalName);
+      writeNonNullCanonicalNameReference(constant.procedure.canonicalName);
     } else if (constant is TypeLiteralConstant) {
       writeByte(ConstantTag.TypeLiteralConstant);
       writeDartType(constant.type);
     } else {
-      throw 'Unsupported constant $constant';
+      throw new ArgumentError('Unsupported constant $constant');
     }
     _sink = oldSink;
     return _constantsSink.offset - initialOffset;
@@ -283,6 +283,79 @@
     }
   }
 
+  void writeProcedureNodeList(List<Procedure> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeProcedureNode(node);
+    }
+  }
+
+  void writeFieldNodeList(List<Field> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeFieldNode(node);
+    }
+  }
+
+  void writeClassNodeList(List<Class> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeClassNode(node);
+    }
+  }
+
+  void writeConstructorNodeList(List<Constructor> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeConstructorNode(node);
+    }
+  }
+
+  void writeRedirectingFactoryConstructorNodeList(
+      List<RedirectingFactoryConstructor> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeRedirectingFactoryConstructorNode(node);
+    }
+  }
+
+  void writeSwitchCaseNodeList(List<SwitchCase> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeSwitchCaseNode(node);
+    }
+  }
+
+  void writeCatchNodeList(List<Catch> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeCatchNode(node);
+    }
+  }
+
+  void writeTypedefNodeList(List<Typedef> nodes) {
+    final len = nodes.length;
+    writeUInt30(len);
+    for (int i = 0; i < len; i++) {
+      final node = nodes[i];
+      writeTypedefNode(node);
+    }
+  }
+
   void writeNode(Node node) {
     if (_metadataSubsections != null) {
       _writeNodeMetadata(node);
@@ -290,6 +363,84 @@
     node.accept(this);
   }
 
+  void writeFunctionNode(FunctionNode node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeArgumentsNode(Arguments node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeLibraryNode(Library node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeProcedureNode(Procedure node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeFieldNode(Field node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeClassNode(Class node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeConstructorNode(Constructor node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeRedirectingFactoryConstructorNode(
+      RedirectingFactoryConstructor node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeSwitchCaseNode(SwitchCase node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeCatchNode(Catch node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
+  void writeTypedefNode(Typedef node) {
+    if (_metadataSubsections != null) {
+      _writeNodeMetadata(node);
+    }
+    node.accept(this);
+  }
+
   void writeOptionalNode(Node node) {
     if (node == null) {
       writeByte(Tag.Nothing);
@@ -299,12 +450,12 @@
     }
   }
 
-  void writeOptionalReference(Reference ref) {
-    if (ref == null) {
+  void writeOptionalFunctionNode(FunctionNode node) {
+    if (node == null) {
       writeByte(Tag.Nothing);
     } else {
       writeByte(Tag.Something);
-      writeReference(ref);
+      writeFunctionNode(node);
     }
   }
 
@@ -407,12 +558,14 @@
       }
 
       if (!MetadataRepository.isSupported(node)) {
-        throw "Nodes of type ${node.runtimeType} can't have metadata.";
+        throw new ArgumentError(
+            "Nodes of type ${node.runtimeType} can't have metadata.");
       }
 
       if (!identical(_sink, _mainSink)) {
-        throw "Node written into metadata can't have metadata "
-            "(metadata: ${repository.tag}, node: ${node.runtimeType} $node)";
+        throw new ArgumentError(
+            "Node written into metadata can't have metadata "
+            "(metadata: ${repository.tag}, node: ${node.runtimeType} $node)");
       }
 
       _sink = _metadataSink;
@@ -499,11 +652,30 @@
   /// Write all of some of the libraries of the [component].
   void writeLibraries(Component component) {
     for (int i = 0; i < component.libraries.length; ++i) {
-      writeNode(component.libraries[i]);
+      writeLibraryNode(component.libraries[i]);
     }
   }
 
   void writeComponentIndex(Component component, List<Library> libraries) {
+    // It is allowed to concatenate several kernel binaries to create a
+    // multi-component kernel file. In order to maintain alignment of
+    // metadata sections within kernel binaries after concatenation,
+    // size of each kernel binary should be aligned.
+    // Component index is located at the end of a kernel binary, so padding
+    // is added before component index.
+    const int kernelFileAlignment = 8;
+
+    // Keep this in sync with number of writeUInt32 below.
+    int numComponentIndexEntries = 7 + libraryOffsets.length + 3;
+
+    int unalignedSize = getBufferOffset() + numComponentIndexEntries * 4;
+    int padding =
+        ((unalignedSize + kernelFileAlignment - 1) & -kernelFileAlignment) -
+            unalignedSize;
+    for (int i = 0; i < padding; ++i) {
+      writeByte(0);
+    }
+
     // Fixed-size ints at the end used as an index.
     assert(_binaryOffsetForSourceTable >= 0);
     writeUInt32(_binaryOffsetForSourceTable);
@@ -592,18 +764,32 @@
   void writeLibraryDependencyReference(LibraryDependency node) {
     int index = _libraryDependencyIndex[node];
     if (index == null) {
-      throw 'Reference to library dependency $node out of scope';
+      throw new ArgumentError(
+          'Reference to library dependency $node out of scope');
     }
     writeUInt30(index);
   }
 
-  void writeReference(Reference reference) {
+  void writeNullAllowedReference(Reference reference) {
     if (reference == null) {
       writeUInt30(0);
     } else {
       CanonicalName name = reference.canonicalName;
       if (name == null) {
-        throw 'Missing canonical name for $reference';
+        throw new ArgumentError('Missing canonical name for $reference');
+      }
+      checkCanonicalName(name);
+      writeUInt30(name.index + 1);
+    }
+  }
+
+  void writeNonNullReference(Reference reference) {
+    if (reference == null) {
+      throw new ArgumentError('Got null reference');
+    } else {
+      CanonicalName name = reference.canonicalName;
+      if (name == null) {
+        throw new ArgumentError('Missing canonical name for $reference');
       }
       checkCanonicalName(name);
       writeUInt30(name.index + 1);
@@ -621,7 +807,7 @@
     _reindexedCanonicalNames.add(node);
   }
 
-  void writeCanonicalNameReference(CanonicalName name) {
+  void writeNullAllowedCanonicalNameReference(CanonicalName name) {
     if (name == null) {
       writeUInt30(0);
     } else {
@@ -630,8 +816,22 @@
     }
   }
 
-  void writeLibraryReference(Library node) {
-    writeCanonicalNameReference(node.canonicalName);
+  void writeNonNullCanonicalNameReference(CanonicalName name) {
+    if (name == null) {
+      throw new ArgumentError(
+          'Expected a canonical name to be valid but was `null`.');
+    } else {
+      checkCanonicalName(name);
+      writeUInt30(name.index + 1);
+    }
+  }
+
+  void writeLibraryReference(Library node, {bool allowNull: false}) {
+    if (node.canonicalName == null && !allowNull) {
+      throw new ArgumentError(
+          'Expected a library reference to be valid but was `null`.');
+    }
+    writeNullAllowedCanonicalNameReference(node.canonicalName);
   }
 
   writeOffset(int offset) {
@@ -641,18 +841,12 @@
     writeUInt30(offset + 1);
   }
 
-  void writeClassReference(Class class_, {bool allowNull: false}) {
-    if (class_ == null && !allowNull) {
-      throw 'Expected a class reference to be valid but was `null`.';
+  void writeClassReference(Class class_) {
+    if (class_ == null) {
+      throw new ArgumentError(
+          'Expected a class reference to be valid but was `null`.');
     }
-    writeCanonicalNameReference(getCanonicalNameOfClass(class_));
-  }
-
-  void writeMemberReference(Member member, {bool allowNull: false}) {
-    if (member == null && !allowNull) {
-      throw 'Expected a member reference to be valid but was `null`.';
-    }
-    writeCanonicalNameReference(getCanonicalNameOfMember(member));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfClass(class_));
   }
 
   void writeName(Name node) {
@@ -674,7 +868,7 @@
     insideExternalLibrary = node.isExternal;
     libraryOffsets.add(getBufferOffset());
     writeByte(insideExternalLibrary ? 1 : 0);
-    writeCanonicalNameReference(getCanonicalNameOfLibrary(node));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfLibrary(node));
     writeStringReference(node.name ?? '');
     writeUriReference(node.fileUri);
     enterScope(memberScope: true);
@@ -684,13 +878,13 @@
     writeLibraryParts(node);
     leaveScope(memberScope: true);
 
-    writeNodeList(node.typedefs);
+    writeTypedefNodeList(node.typedefs);
     classOffsets = new List<int>();
-    writeNodeList(node.classes);
+    writeClassNodeList(node.classes);
     classOffsets.add(getBufferOffset());
-    writeNodeList(node.fields);
+    writeFieldNodeList(node.fields);
     procedureOffsets = new List<int>();
-    writeNodeList(node.procedures);
+    writeProcedureNodeList(node.procedures);
     procedureOffsets.add(getBufferOffset());
 
     // Fixed-size ints at the end used as an index.
@@ -724,7 +918,7 @@
   void writeAdditionalExports(List<Reference> additionalExports) {
     writeUInt30(additionalExports.length);
     for (Reference ref in additionalExports) {
-      writeReference(ref);
+      writeNonNullReference(ref);
     }
   }
 
@@ -735,7 +929,7 @@
     writeOffset(node.fileOffset);
     writeByte(node.flags);
     writeAnnotationList(node.annotations);
-    writeLibraryReference(node.targetLibrary);
+    writeLibraryReference(node.targetLibrary, allowNull: true);
     writeStringReference(node.name ?? '');
     writeNodeList(node.combinators);
   }
@@ -763,7 +957,7 @@
 
   void visitTypedef(Typedef node) {
     enterScope(memberScope: true);
-    writeCanonicalNameReference(getCanonicalNameOfTypedef(node));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfTypedef(node));
     writeUriReference(node.fileUri);
     writeOffset(node.fileOffset);
     writeStringReference(node.name);
@@ -811,10 +1005,10 @@
 
     int flags = _encodeClassFlags(node.flags, node.level);
     if (node.canonicalName == null) {
-      throw 'Missing canonical name for $node';
+      throw new ArgumentError('Missing canonical name for $node');
     }
     writeByte(Tag.Class);
-    writeCanonicalNameReference(getCanonicalNameOfClass(node));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfClass(node));
     writeUriReference(node.fileUri);
     writeOffset(node.startFileOffset);
     writeOffset(node.fileOffset);
@@ -831,12 +1025,13 @@
     writeOptionalNode(node.supertype);
     writeOptionalNode(node.mixedInType);
     writeNodeList(node.implementedTypes);
-    writeNodeList(node.fields);
-    writeNodeList(node.constructors);
+    writeFieldNodeList(node.fields);
+    writeConstructorNodeList(node.constructors);
     procedureOffsets = <int>[];
-    writeNodeList(node.procedures);
+    writeProcedureNodeList(node.procedures);
     procedureOffsets.add(getBufferOffset());
-    writeNodeList(node.redirectingFactoryConstructors);
+    writeRedirectingFactoryConstructorNodeList(
+        node.redirectingFactoryConstructors);
     leaveScope(typeParameters: node.typeParameters);
 
     assert(procedureOffsets.length > 0);
@@ -853,11 +1048,11 @@
   @override
   void visitConstructor(Constructor node) {
     if (node.canonicalName == null) {
-      throw 'Missing canonical name for $node';
+      throw new ArgumentError('Missing canonical name for $node');
     }
     enterScope(memberScope: true);
     writeByte(Tag.Constructor);
-    writeCanonicalNameReference(getCanonicalNameOfMember(node));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfMember(node));
     writeUriReference(node.fileUri);
     writeOffset(node.startFileOffset);
     writeOffset(node.fileOffset);
@@ -868,7 +1063,7 @@
 
     writeAnnotationList(node.annotations);
     assert(node.function.typeParameters.isEmpty);
-    writeNode(node.function);
+    writeFunctionNode(node.function);
     // Parameters are in scope in the initializers.
     _variableIndexer ??= new VariableIndexer();
     _variableIndexer.restoreScope(node.function.positionalParameters.length +
@@ -883,7 +1078,7 @@
     procedureOffsets.add(getBufferOffset());
 
     if (node.canonicalName == null) {
-      throw 'Missing canonical name for $node';
+      throw new ArgumentError('Missing canonical name for $node');
     }
 
     final bool currentlyInNonimplementationSaved =
@@ -894,7 +1089,7 @@
 
     enterScope(memberScope: true);
     writeByte(Tag.Procedure);
-    writeCanonicalNameReference(getCanonicalNameOfMember(node));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfMember(node));
     writeUriReference(node.fileUri);
     writeOffset(node.startFileOffset);
     writeOffset(node.fileOffset);
@@ -903,9 +1098,9 @@
     writeByte(node.flags);
     writeName(node.name ?? _emptyName);
     writeAnnotationList(node.annotations);
-    writeOptionalReference(node.forwardingStubSuperTargetReference);
-    writeOptionalReference(node.forwardingStubInterfaceTargetReference);
-    writeOptionalNode(node.function);
+    writeNullAllowedReference(node.forwardingStubSuperTargetReference);
+    writeNullAllowedReference(node.forwardingStubInterfaceTargetReference);
+    writeOptionalFunctionNode(node.function);
     leaveScope(memberScope: true);
 
     _currentlyInNonimplementation = currentlyInNonimplementationSaved;
@@ -916,11 +1111,11 @@
   @override
   void visitField(Field node) {
     if (node.canonicalName == null) {
-      throw 'Missing canonical name for $node';
+      throw new ArgumentError('Missing canonical name for $node');
     }
     enterScope(memberScope: true);
     writeByte(Tag.Field);
-    writeCanonicalNameReference(getCanonicalNameOfMember(node));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfMember(node));
     writeUriReference(node.fileUri);
     writeOffset(node.fileOffset);
     writeOffset(node.fileEndOffset);
@@ -935,14 +1130,14 @@
   @override
   void visitRedirectingFactoryConstructor(RedirectingFactoryConstructor node) {
     if (node.canonicalName == null) {
-      throw 'Missing canonical name for $node';
+      throw new ArgumentError('Missing canonical name for $node');
     }
     writeByte(Tag.RedirectingFactoryConstructor);
     enterScope(
         typeParameters: node.typeParameters,
         memberScope: true,
         variableScope: true);
-    writeCanonicalNameReference(getCanonicalNameOfMember(node));
+    writeNonNullCanonicalNameReference(getCanonicalNameOfMember(node));
     writeUriReference(node.fileUri);
     writeOffset(node.fileOffset);
     writeOffset(node.fileEndOffset);
@@ -950,7 +1145,7 @@
     writeName(node.name);
 
     writeAnnotationList(node.annotations);
-    writeReference(node.targetReference);
+    writeNonNullReference(node.targetReference);
     writeNodeList(node.typeArguments);
     writeNodeList(node.typeParameters);
     writeUInt30(node.positionalParameters.length + node.namedParameters.length);
@@ -974,7 +1169,7 @@
   void visitFieldInitializer(FieldInitializer node) {
     writeByte(Tag.FieldInitializer);
     writeByte(node.isSynthetic ? 1 : 0);
-    writeReference(node.fieldReference);
+    writeNonNullReference(node.fieldReference);
     writeNode(node.value);
   }
 
@@ -983,8 +1178,8 @@
     writeByte(Tag.SuperInitializer);
     writeByte(node.isSynthetic ? 1 : 0);
     writeOffset(node.fileOffset);
-    writeReference(node.targetReference);
-    writeNode(node.arguments);
+    writeNonNullReference(node.targetReference);
+    writeArgumentsNode(node.arguments);
   }
 
   @override
@@ -992,8 +1187,8 @@
     writeByte(Tag.RedirectingInitializer);
     writeByte(node.isSynthetic ? 1 : 0);
     writeOffset(node.fileOffset);
-    writeReference(node.targetReference);
-    writeNode(node.arguments);
+    writeNonNullReference(node.targetReference);
+    writeArgumentsNode(node.arguments);
   }
 
   @override
@@ -1086,7 +1281,7 @@
     writeOffset(node.fileOffset);
     writeNode(node.receiver);
     writeName(node.name);
-    writeReference(node.interfaceTargetReference);
+    writeNullAllowedReference(node.interfaceTargetReference);
   }
 
   @override
@@ -1096,7 +1291,7 @@
     writeNode(node.receiver);
     writeName(node.name);
     writeNode(node.value);
-    writeReference(node.interfaceTargetReference);
+    writeNullAllowedReference(node.interfaceTargetReference);
   }
 
   @override
@@ -1104,7 +1299,7 @@
     writeByte(Tag.SuperPropertyGet);
     writeOffset(node.fileOffset);
     writeName(node.name);
-    writeReference(node.interfaceTargetReference);
+    writeNullAllowedReference(node.interfaceTargetReference);
   }
 
   @override
@@ -1113,7 +1308,7 @@
     writeOffset(node.fileOffset);
     writeName(node.name);
     writeNode(node.value);
-    writeReference(node.interfaceTargetReference);
+    writeNullAllowedReference(node.interfaceTargetReference);
   }
 
   @override
@@ -1121,7 +1316,7 @@
     writeByte(Tag.DirectPropertyGet);
     writeOffset(node.fileOffset);
     writeNode(node.receiver);
-    writeReference(node.targetReference);
+    writeNonNullReference(node.targetReference);
   }
 
   @override
@@ -1129,7 +1324,7 @@
     writeByte(Tag.DirectPropertySet);
     writeOffset(node.fileOffset);
     writeNode(node.receiver);
-    writeReference(node.targetReference);
+    writeNonNullReference(node.targetReference);
     writeNode(node.value);
   }
 
@@ -1137,14 +1332,14 @@
   void visitStaticGet(StaticGet node) {
     writeByte(Tag.StaticGet);
     writeOffset(node.fileOffset);
-    writeReference(node.targetReference);
+    writeNonNullReference(node.targetReference);
   }
 
   @override
   void visitStaticSet(StaticSet node) {
     writeByte(Tag.StaticSet);
     writeOffset(node.fileOffset);
-    writeReference(node.targetReference);
+    writeNonNullReference(node.targetReference);
     writeNode(node.value);
   }
 
@@ -1154,8 +1349,8 @@
     writeOffset(node.fileOffset);
     writeNode(node.receiver);
     writeName(node.name);
-    writeNode(node.arguments);
-    writeReference(node.interfaceTargetReference);
+    writeArgumentsNode(node.arguments);
+    writeNullAllowedReference(node.interfaceTargetReference);
   }
 
   @override
@@ -1163,8 +1358,8 @@
     writeByte(Tag.SuperMethodInvocation);
     writeOffset(node.fileOffset);
     writeName(node.name);
-    writeNode(node.arguments);
-    writeReference(node.interfaceTargetReference);
+    writeArgumentsNode(node.arguments);
+    writeNullAllowedReference(node.interfaceTargetReference);
   }
 
   @override
@@ -1172,16 +1367,16 @@
     writeByte(Tag.DirectMethodInvocation);
     writeOffset(node.fileOffset);
     writeNode(node.receiver);
-    writeReference(node.targetReference);
-    writeNode(node.arguments);
+    writeNonNullReference(node.targetReference);
+    writeArgumentsNode(node.arguments);
   }
 
   @override
   void visitStaticInvocation(StaticInvocation node) {
     writeByte(node.isConst ? Tag.ConstStaticInvocation : Tag.StaticInvocation);
     writeOffset(node.fileOffset);
-    writeReference(node.targetReference);
-    writeNode(node.arguments);
+    writeNonNullReference(node.targetReference);
+    writeArgumentsNode(node.arguments);
   }
 
   @override
@@ -1190,8 +1385,8 @@
         ? Tag.ConstConstructorInvocation
         : Tag.ConstructorInvocation);
     writeOffset(node.fileOffset);
-    writeReference(node.targetReference);
-    writeNode(node.arguments);
+    writeNonNullReference(node.targetReference);
+    writeArgumentsNode(node.arguments);
   }
 
   @override
@@ -1221,7 +1416,7 @@
       case '||':
         return 1;
     }
-    throw 'Not a logical operator: $operator';
+    throw new ArgumentError('Not a logical operator: $operator');
   }
 
   @override
@@ -1355,6 +1550,14 @@
   }
 
   @override
+  void visitSetLiteral(SetLiteral node) {
+    writeByte(node.isConst ? Tag.ConstSetLiteral : Tag.SetLiteral);
+    writeOffset(node.fileOffset);
+    writeNode(node.typeArgument);
+    writeNodeList(node.expressions);
+  }
+
+  @override
   void visitMapLiteral(MapLiteral node) {
     writeByte(node.isConst ? Tag.ConstMapLiteral : Tag.MapLiteral);
     writeOffset(node.fileOffset);
@@ -1380,7 +1583,7 @@
   void visitFunctionExpression(FunctionExpression node) {
     writeByte(Tag.FunctionExpression);
     writeOffset(node.fileOffset);
-    writeNode(node.function);
+    writeFunctionNode(node.function);
   }
 
   @override
@@ -1533,7 +1736,7 @@
     writeByte(Tag.SwitchStatement);
     writeOffset(node.fileOffset);
     writeNode(node.expression);
-    writeNodeList(node.cases);
+    writeSwitchCaseNodeList(node.cases);
     _switchCaseIndexer.exit(node);
   }
 
@@ -1583,7 +1786,7 @@
     writeNode(node.body);
     bool needsStackTrace = node.catches.any((Catch c) => c.stackTrace != null);
     writeByte(_encodeTryCatchFlags(needsStackTrace, node.isSynthetic));
-    writeNodeList(node.catches);
+    writeCatchNodeList(node.catches);
   }
 
   @override
@@ -1656,7 +1859,7 @@
     writeByte(Tag.FunctionDeclaration);
     writeOffset(node.fileOffset);
     writeVariableDeclaration(node.variable);
-    writeNode(node.function);
+    writeFunctionNode(node.function);
   }
 
   @override
@@ -1683,10 +1886,10 @@
   void visitInterfaceType(InterfaceType node) {
     if (node.typeArguments.isEmpty) {
       writeByte(Tag.SimpleInterfaceType);
-      writeReference(node.className);
+      writeNonNullReference(node.className);
     } else {
       writeByte(Tag.InterfaceType);
-      writeReference(node.className);
+      writeNonNullReference(node.className);
       writeNodeList(node.typeArguments);
     }
   }
@@ -1695,10 +1898,10 @@
   void visitSupertype(Supertype node) {
     if (node.typeArguments.isEmpty) {
       writeByte(Tag.SimpleInterfaceType);
-      writeReference(node.className);
+      writeNonNullReference(node.className);
     } else {
       writeByte(Tag.InterfaceType);
-      writeReference(node.className);
+      writeNonNullReference(node.className);
       writeNodeList(node.typeArguments);
     }
   }
@@ -1743,7 +1946,7 @@
   @override
   void visitTypedefType(TypedefType node) {
     writeByte(Tag.TypedefType);
-    writeReference(node.typedefReference);
+    writeNullAllowedReference(node.typedefReference);
     writeNodeList(node.typeArguments);
   }
 
@@ -2118,7 +2321,8 @@
   }
 
   int operator [](TypeParameter parameter) =>
-      index[parameter] ?? (throw 'Type parameter $parameter is not indexed');
+      index[parameter] ??
+      (throw new ArgumentError('Type parameter $parameter is not indexed'));
 }
 
 class StringIndexer {
diff --git a/pkg/kernel/lib/binary/limited_ast_to_binary.dart b/pkg/kernel/lib/binary/limited_ast_to_binary.dart
index 0b7d088..0cef7c7 100644
--- a/pkg/kernel/lib/binary/limited_ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/limited_ast_to_binary.dart
@@ -46,7 +46,7 @@
   void writeLibraries(Component component) {
     for (int i = 0; i < component.libraries.length; ++i) {
       Library library = component.libraries[i];
-      if (predicate(library)) writeNode(library);
+      if (predicate(library)) writeLibraryNode(library);
     }
   }
 
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index 5ef6760..a53ccc7 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -11,11 +11,13 @@
 
   static const int FunctionNode = 3;
 
+  // Members
   static const int Field = 4;
   static const int Constructor = 5;
   static const int Procedure = 6;
   static const int RedirectingFactoryConstructor = 108;
 
+  // Initializers
   static const int InvalidInitializer = 7;
   static const int FieldInitializer = 8;
   static const int SuperInitializer = 9;
@@ -23,6 +25,7 @@
   static const int LocalInitializer = 11;
   static const int AssertInitializer = 12;
 
+  // Expressions
   static const int CheckLibraryIsLoaded = 13;
   static const int LoadLibrary = 14;
   static const int DirectPropertyGet = 15;
@@ -70,7 +73,10 @@
   static const int BigIntLiteral = 57;
   static const int ConstListLiteral = 58;
   static const int ConstMapLiteral = 59;
+  static const int SetLiteral = 109;
+  static const int ConstSetLiteral = 110;
 
+  // Statements
   static const int ExpressionStatement = 61;
   static const int Block = 62;
   static const int EmptyStatement = 63;
@@ -93,6 +99,7 @@
   static const int AsyncForInStatement = 80;
   static const int AssertBlock = 81;
 
+  // Types
   static const int TypedefType = 87;
   static const int BottomType = 89;
   static const int InvalidType = 90;
@@ -104,13 +111,15 @@
   static const int SimpleInterfaceType = 96;
   static const int SimpleFunctionType = 97;
 
+  // References
   static const int NullReference = 99;
   static const int ClassReference = 100;
   static const int MemberReference = 101;
 
   static const int ConstantExpression = 107;
-
-  // Note that 108 is occupied by [RedirectingFactoryConstructor] above.
+  // 108 is occupied by [RedirectingFactoryConstructor] (member).
+  // 109 is occupied by [SetLiteral] (expression).
+  // 110 is occupied by [ConstSetLiteral] (expression).
 
   static const int SpecializedTagHighBit = 0x80; // 10000000
   static const int SpecializedTagMask = 0xF8; // 11111000
@@ -127,7 +136,7 @@
   /// Internal version of kernel binary format.
   /// Bump it when making incompatible changes in kernel binaries.
   /// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
-  static const int BinaryFormatVersion = 13;
+  static const int BinaryFormatVersion = 15;
 }
 
 abstract class ConstantTag {
diff --git a/pkg/kernel/lib/class_hierarchy.dart b/pkg/kernel/lib/class_hierarchy.dart
index 214572a..1a7de5c 100644
--- a/pkg/kernel/lib/class_hierarchy.dart
+++ b/pkg/kernel/lib/class_hierarchy.dart
@@ -58,11 +58,11 @@
   /// q be the largest number such that S_q has cardinality one.  The least
   /// upper bound of I and J is the sole element of S_q.
   ///
-  /// This is called the "classic" least upper bound to distinguish it from the
-  /// strong mode least upper bound, which has special behaviors in the case
-  /// where one type is a subtype of the other, or where both types are based on
-  /// the same class.
-  InterfaceType getClassicLeastUpperBound(
+  /// This is called the "legacy" least upper bound to distinguish it from the
+  /// Dart 2 least upper bound, which has special behaviors in the case where
+  /// one type is a subtype of the other, or where both types are based on the
+  /// same class.
+  InterfaceType getLegacyLeastUpperBound(
       InterfaceType type1, InterfaceType type2);
 
   /// Returns the instantiation of [superclass] that is implemented by [class_],
@@ -506,7 +506,7 @@
   }
 
   @override
-  InterfaceType getClassicLeastUpperBound(
+  InterfaceType getLegacyLeastUpperBound(
       InterfaceType type1, InterfaceType type2) {
     // The algorithm is: first we compute a list of superclasses for both types,
     // ordered from greatest to least depth, and ordered by topological sort
@@ -609,7 +609,7 @@
       throw "${class_.fileUri}: No class info for ${class_.name}";
     }
     _ClassInfo superInfo = _infoFor[superclass];
-    if (info == null) {
+    if (superInfo == null) {
       throw "${superclass.fileUri}: No class info for ${superclass.name}";
     }
     if (!info.isSubtypeOf(superInfo)) return null;
@@ -1405,7 +1405,7 @@
   ClassSet(this._classes);
 
   bool contains(Object class_) {
-    return _classes.contains(_classes);
+    return _classes.contains(class_);
   }
 
   ClassSet union(ClassSet other) {
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index c5ea6e3..17ade68 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -224,6 +224,11 @@
         typeArgument: visitType(node.typeArgument), isConst: node.isConst);
   }
 
+  visitSetLiteral(SetLiteral node) {
+    return new SetLiteral(node.expressions.map(clone).toList(),
+        typeArgument: visitType(node.typeArgument), isConst: node.isConst);
+  }
+
   visitMapLiteral(MapLiteral node) {
     return new MapLiteral(node.entries.map(clone).toList(),
         keyType: visitType(node.keyType),
diff --git a/pkg/kernel/lib/core_types.dart b/pkg/kernel/lib/core_types.dart
index f74dc34..9df95ca 100644
--- a/pkg/kernel/lib/core_types.dart
+++ b/pkg/kernel/lib/core_types.dart
@@ -47,6 +47,7 @@
   Class _doubleClass;
   Class _stringClass;
   Class _listClass;
+  Class _setClass;
   Class _mapClass;
   Class _iterableClass;
   Class _iteratorClass;
@@ -54,19 +55,13 @@
   Class _typeClass;
   Class _functionClass;
   Class _invocationClass;
-  Constructor _externalNameDefaultConstructor;
   Class _invocationMirrorClass;
   Constructor _invocationMirrorWithTypeConstructor;
-  Constructor _invocationMirrorWithoutTypeConstructor;
-  Class _noSuchMethodErrorClass;
   Constructor _noSuchMethodErrorDefaultConstructor;
   Procedure _listFromConstructor;
   Procedure _listUnmodifiableConstructor;
-  Procedure _printProcedure;
   Procedure _identicalProcedure;
-  Constructor _duplicatedFieldInitializerErrorDefaultConstructor;
   Constructor _fallThroughErrorUrlAndLineConstructor;
-  Constructor _compileTimeErrorDefaultConstructor;
   Procedure _objectEquals;
   Procedure _mapUnmodifiable;
 
@@ -76,15 +71,11 @@
   Class _futureClass;
   Class _stackTraceClass;
   Class _streamClass;
-  Class _completerClass;
   Class _asyncAwaitCompleterClass;
   Class _futureOrClass;
   Constructor _asyncAwaitCompleterConstructor;
   Procedure _completeOnAsyncReturnProcedure;
-  Procedure _completerSyncConstructor;
-  Procedure _completerComplete;
   Procedure _completerCompleteError;
-  Procedure _futureMicrotaskConstructor;
   Constructor _syncIterableDefaultConstructor;
   Constructor _streamIteratorDefaultConstructor;
   Constructor _asyncStarStreamControllerDefaultConstructor;
@@ -176,20 +167,11 @@
     return _boolClass ??= index.getClass('dart:core', 'bool');
   }
 
-  Class get completerClass {
-    return _completerClass ??= index.getClass('dart:async', 'Completer');
-  }
-
   Class get asyncAwaitCompleterClass {
     return _asyncAwaitCompleterClass ??=
         index.getClass('dart:async', '_AsyncAwaitCompleter');
   }
 
-  Procedure get completerSyncConstructor {
-    return _completerSyncConstructor ??=
-        index.getMember('dart:async', 'Completer', 'sync');
-  }
-
   Constructor get asyncAwaitCompleterConstructor {
     return _asyncAwaitCompleterConstructor ??=
         index.getMember('dart:async', '_AsyncAwaitCompleter', '');
@@ -200,11 +182,6 @@
         index.getTopLevelMember('dart:async', '_completeOnAsyncReturn');
   }
 
-  Procedure get completerComplete {
-    return _completerComplete ??=
-        index.getMember('dart:async', 'Completer', 'complete');
-  }
-
   Procedure get completerCompleteError {
     return _completerCompleteError ??=
         index.getMember('dart:async', 'Completer', 'completeError');
@@ -222,11 +199,6 @@
     return _doubleClass ??= index.getClass('dart:core', 'double');
   }
 
-  Constructor get externalNameDefaultConstructor {
-    return _externalNameDefaultConstructor ??=
-        index.getMember('dart:_internal', 'ExternalName', '');
-  }
-
   Class get functionClass {
     return _functionClass ??= index.getClass('dart:core', 'Function');
   }
@@ -235,11 +207,6 @@
     return _futureClass ??= index.getClass('dart:async', 'Future');
   }
 
-  Procedure get futureMicrotaskConstructor {
-    return _futureMicrotaskConstructor ??=
-        index.getMember('dart:async', 'Future', 'microtask');
-  }
-
   Class get futureOrClass {
     return _futureOrClass ??= index.getClass('dart:async', 'FutureOr');
   }
@@ -271,11 +238,6 @@
         index.getMember('dart:core', '_InvocationMirror', '_withType');
   }
 
-  Constructor get invocationMirrorWithoutTypeConstructor {
-    return _invocationMirrorWithoutTypeConstructor ??=
-        index.getMember('dart:core', '_InvocationMirror', '_withoutType');
-  }
-
   Class get iterableClass {
     return _iterableClass ??= index.getClass('dart:core', 'Iterable');
   }
@@ -298,6 +260,10 @@
         index.getMember('dart:core', 'List', 'unmodifiable');
   }
 
+  Class get setClass {
+    return _setClass ??= index.getClass('dart:core', 'Set');
+  }
+
   Class get mapClass {
     return _mapClass ??= index.getClass('dart:core', 'Map');
   }
@@ -311,11 +277,6 @@
     return _mirrorsLibrary ??= index.tryGetLibrary('dart:mirrors');
   }
 
-  Class get noSuchMethodErrorClass {
-    return _noSuchMethodErrorClass ??=
-        index.getClass('dart:core', 'NoSuchMethodError');
-  }
-
   Constructor get noSuchMethodErrorDefaultConstructor {
     return _noSuchMethodErrorDefaultConstructor ??=
         // TODO(regis): Replace 'withInvocation' with '' after dart2js is fixed.
@@ -350,10 +311,6 @@
     return _pragmaOptions ??= index.getMember('dart:core', 'pragma', 'options');
   }
 
-  Procedure get printProcedure {
-    return _printProcedure ??= index.getTopLevelMember('dart:core', 'print');
-  }
-
   Class get stackTraceClass {
     return _stackTraceClass ??= index.getClass('dart:core', 'StackTrace');
   }
@@ -416,21 +373,11 @@
     return _typeClass ??= index.getClass('dart:core', 'Type');
   }
 
-  Constructor get duplicatedFieldInitializerErrorDefaultConstructor {
-    return _duplicatedFieldInitializerErrorDefaultConstructor ??=
-        index.getMember('dart:core', '_DuplicatedFieldInitializerError', '');
-  }
-
   Constructor get fallThroughErrorUrlAndLineConstructor {
     return _fallThroughErrorUrlAndLineConstructor ??=
         index.getMember('dart:core', 'FallThroughError', '_create');
   }
 
-  Constructor get compileTimeErrorDefaultConstructor {
-    return _compileTimeErrorDefaultConstructor ??=
-        index.getMember('dart:core', '_CompileTimeError', '');
-  }
-
   Procedure get boolFromEnvironment {
     return _boolFromEnvironment ??=
         index.getMember('dart:core', 'bool', 'fromEnvironment');
diff --git a/pkg/kernel/lib/naive_type_checker.dart b/pkg/kernel/lib/naive_type_checker.dart
index 4a13042..5924ca6 100644
--- a/pkg/kernel/lib/naive_type_checker.dart
+++ b/pkg/kernel/lib/naive_type_checker.dart
@@ -14,10 +14,10 @@
   void reportInvalidOverride(Member member, Member inherited, String message);
 }
 
-class StrongModeTypeChecker extends type_checker.TypeChecker {
+class NaiveTypeChecker extends type_checker.TypeChecker {
   final FailureListener failures;
 
-  StrongModeTypeChecker(FailureListener failures, Component component,
+  NaiveTypeChecker(FailureListener failures, Component component,
       {bool ignoreSdk: false})
       : this._(
             failures,
@@ -29,7 +29,7 @@
             }),
             ignoreSdk);
 
-  StrongModeTypeChecker._(this.failures, CoreTypes coreTypes,
+  NaiveTypeChecker._(this.failures, CoreTypes coreTypes,
       ClassHierarchy hierarchy, bool ignoreSdk)
       : super(coreTypes, hierarchy, ignoreSdk: ignoreSdk);
 
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index c540910..007fc9e 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -14,15 +14,12 @@
   final bool legacyMode;
   final bool treeShake;
 
-  /// Whether `async` functions start synchronously.
-  final bool syncAsync;
   final List<ProgramRoot> programRoots;
   final Uri kernelRuntime;
 
   TargetFlags(
       {this.legacyMode: false,
       this.treeShake: false,
-      this.syncAsync: false,
       this.programRoots: const <ProgramRoot>[],
       this.kernelRuntime});
 }
@@ -61,13 +58,6 @@
 
   bool get legacyMode;
 
-  /// A derived class may change this to `true` to disable type inference and
-  /// type promotion phases of analysis.
-  ///
-  /// This is intended for profiling, to ensure that type inference and type
-  /// promotion do not slow down compilation too much.
-  bool get disableTypeInference => false;
-
   /// A derived class may change this to `true` to enable forwarders to
   /// user-defined `noSuchMethod` that are generated for each abstract member
   /// if such `noSuchMethod` is present.
@@ -158,6 +148,12 @@
   /// `Math.pow(2, 53) = Math.pow(2, 53) + 1`.
   bool get errorOnUnexactWebIntLiterals => false;
 
+  /// Whether set literals are natively supported by this target. If set
+  /// literals are not supported by the target, they will be desugared into
+  /// explicit `Set` creation (for non-const set literals) or wrapped map
+  /// literals (for const set literals).
+  bool get supportsSetLiterals => false;
+
   /// Builds an expression that instantiates an [Invocation] that can be passed
   /// to [noSuchMethod].
   Expression instantiateInvocation(CoreTypes coreTypes, Expression receiver,
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 5e19c6e..57eb05c 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -1264,6 +1264,21 @@
     writeSymbol(']');
   }
 
+  visitSetLiteral(SetLiteral node) {
+    if (node.isConst) {
+      writeWord('const');
+      writeSpace();
+    }
+    if (node.typeArgument != null) {
+      writeSymbol('<');
+      writeType(node.typeArgument);
+      writeSymbol('>');
+    }
+    writeSymbol('{');
+    writeList(node.expressions, writeNode);
+    writeSymbol('}');
+  }
+
   visitMapLiteral(MapLiteral node) {
     if (node.isConst) {
       writeWord('const');
@@ -1973,6 +1988,7 @@
   int visitRethrow(Rethrow node) => PRIMARY;
   int visitThrow(Throw node) => EXPRESSION;
   int visitListLiteral(ListLiteral node) => PRIMARY;
+  int visitSetLiteral(SetLiteral node) => PRIMARY;
   int visitMapLiteral(MapLiteral node) => PRIMARY;
   int visitAwaitExpression(AwaitExpression node) => PREFIX;
   int visitFunctionExpression(FunctionExpression node) => EXPRESSION;
diff --git a/pkg/kernel/lib/text/serializer_combinators.dart b/pkg/kernel/lib/text/serializer_combinators.dart
new file mode 100644
index 0000000..46d0237
--- /dev/null
+++ b/pkg/kernel/lib/text/serializer_combinators.dart
@@ -0,0 +1,323 @@
+// 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 kernel.serializer_combinators;
+
+import 'dart:convert' show json;
+
+import '../ast.dart' show Node;
+import 'text_serializer.dart' show Tagger;
+
+abstract class TextSerializer<T> {
+  const TextSerializer();
+
+  T readFrom(Iterator<Object> stream);
+  void writeTo(StringBuffer buffer, T object);
+
+  /// True if this serializer/deserializer writes/reads nothing.  This is true
+  /// for the serializer [Nothing] and also some serializers derived from it.
+  bool get isEmpty => false;
+}
+
+class Nothing extends TextSerializer<void> {
+  const Nothing();
+
+  void readFrom(Iterator<Object> stream) {}
+
+  void writeTo(StringBuffer buffer, void ignored) {}
+
+  bool get isEmpty => true;
+}
+
+class DartString extends TextSerializer<String> {
+  const DartString();
+
+  String readFrom(Iterator<Object> stream) {
+    if (stream.current is! String) {
+      throw StateError("expected an atom, found a list");
+    }
+    String result = json.decode(stream.current);
+    stream.moveNext();
+    return result;
+  }
+
+  void writeTo(StringBuffer buffer, String object) {
+    buffer.write(json.encode(object));
+  }
+}
+
+class DartInt extends TextSerializer<int> {
+  const DartInt();
+
+  int readFrom(Iterator<Object> stream) {
+    if (stream.current is! String) {
+      throw StateError("expected an atom, found a list");
+    }
+    int result = int.parse(stream.current);
+    stream.moveNext();
+    return result;
+  }
+
+  void writeTo(StringBuffer buffer, int object) {
+    buffer.write(object);
+  }
+}
+
+class DartDouble extends TextSerializer<double> {
+  const DartDouble();
+
+  double readFrom(Iterator<Object> stream) {
+    if (stream.current is! String) {
+      throw StateError("expected an atom, found a list");
+    }
+    double result = double.parse(stream.current);
+    stream.moveNext();
+    return result;
+  }
+
+  void writeTo(StringBuffer buffer, double object) {
+    buffer.write(object);
+  }
+}
+
+class DartBool extends TextSerializer<bool> {
+  const DartBool();
+
+  bool readFrom(Iterator<Object> stream) {
+    if (stream.current is! String) {
+      throw StateError("expected an atom, found a list");
+    }
+    bool result;
+    if (stream.current == "true") {
+      result = true;
+    } else if (stream.current == "false") {
+      result = false;
+    } else {
+      throw StateError("expected 'true' or 'false', found '${stream.current}'");
+    }
+    stream.moveNext();
+    return result;
+  }
+
+  void writeTo(StringBuffer buffer, bool object) {
+    buffer.write(object ? 'true' : 'false');
+  }
+}
+
+// == Serializers for tagged (disjoint) unions.
+//
+// They require a function mapping serializables to a tag string.  This is
+// implemented by Tagger visitors.
+// A tagged union of serializer/deserializers.
+class Case<T extends Node> extends TextSerializer<T> {
+  final Tagger<T> tagger;
+  final List<String> tags;
+  final List<TextSerializer<T>> serializers;
+
+  Case(this.tagger, this.tags, this.serializers);
+
+  Case.uninitialized(this.tagger)
+      : tags = [],
+        serializers = [];
+
+  T readFrom(Iterator<Object> stream) {
+    if (stream.current is! Iterator) {
+      throw StateError("expected list, found atom");
+    }
+    Iterator nested = stream.current;
+    nested.moveNext();
+    if (nested.current is! String) {
+      throw StateError("expected atom, found list");
+    }
+    String tag = nested.current;
+    for (int i = 0; i < tags.length; ++i) {
+      if (tags[i] == tag) {
+        nested.moveNext();
+        T result = serializers[i].readFrom(nested);
+        if (nested.moveNext()) {
+          throw StateError("extra cruft in tagged '${tag}'");
+        }
+        stream.moveNext();
+        return result;
+      }
+    }
+    throw StateError("unrecognized tag '${tag}'");
+  }
+
+  void writeTo(StringBuffer buffer, T object) {
+    String tag = tagger.tag(object);
+    for (int i = 0; i < tags.length; ++i) {
+      if (tags[i] == tag) {
+        buffer.write("(${tag}");
+        if (!serializers[i].isEmpty) {
+          buffer.write(" ");
+        }
+        serializers[i].writeTo(buffer, object);
+        buffer.write(")");
+        return;
+      }
+    }
+    throw StateError("unrecognized tag '${tag}");
+  }
+}
+
+// A serializer/deserializer that unwraps/wraps nodes before serialization and
+// after deserialization.
+class Wrapped<S, K> extends TextSerializer<K> {
+  final S Function(K) unwrap;
+  final K Function(S) wrap;
+  final TextSerializer<S> contents;
+
+  Wrapped(this.unwrap, this.wrap, this.contents);
+
+  K readFrom(Iterator<Object> stream) {
+    return wrap(contents.readFrom(stream));
+  }
+
+  void writeTo(StringBuffer buffer, K object) {
+    contents.writeTo(buffer, unwrap(object));
+  }
+
+  bool get isEmpty => contents.isEmpty;
+}
+
+// A serializer/deserializer for pairs.
+class Tuple2Serializer<T1, T2> extends TextSerializer<Tuple2<T1, T2>> {
+  final TextSerializer<T1> first;
+  final TextSerializer<T2> second;
+
+  const Tuple2Serializer(this.first, this.second);
+
+  Tuple2<T1, T2> readFrom(Iterator<Object> stream) {
+    return new Tuple2(first.readFrom(stream), second.readFrom(stream));
+  }
+
+  void writeTo(StringBuffer buffer, Tuple2<T1, T2> object) {
+    first.writeTo(buffer, object.first);
+    buffer.write(' ');
+    second.writeTo(buffer, object.second);
+  }
+}
+
+class Tuple2<T1, T2> {
+  final T1 first;
+  final T2 second;
+
+  const Tuple2(this.first, this.second);
+}
+
+class Tuple3Serializer<T1, T2, T3> extends TextSerializer<Tuple3<T1, T2, T3>> {
+  final TextSerializer<T1> first;
+  final TextSerializer<T2> second;
+  final TextSerializer<T3> third;
+
+  const Tuple3Serializer(this.first, this.second, this.third);
+
+  Tuple3<T1, T2, T3> readFrom(Iterator<Object> stream) {
+    return new Tuple3(first.readFrom(stream), second.readFrom(stream),
+        third.readFrom(stream));
+  }
+
+  void writeTo(StringBuffer buffer, Tuple3<T1, T2, T3> object) {
+    first.writeTo(buffer, object.first);
+    buffer.write(' ');
+    second.writeTo(buffer, object.second);
+    buffer.write(' ');
+    third.writeTo(buffer, object.third);
+  }
+}
+
+class Tuple3<T1, T2, T3> {
+  final T1 first;
+  final T2 second;
+  final T3 third;
+
+  const Tuple3(this.first, this.second, this.third);
+}
+
+class Tuple4Serializer<T1, T2, T3, T4>
+    extends TextSerializer<Tuple4<T1, T2, T3, T4>> {
+  final TextSerializer<T1> first;
+  final TextSerializer<T2> second;
+  final TextSerializer<T3> third;
+  final TextSerializer<T4> fourth;
+
+  const Tuple4Serializer(this.first, this.second, this.third, this.fourth);
+
+  Tuple4<T1, T2, T3, T4> readFrom(Iterator<Object> stream) {
+    return new Tuple4(first.readFrom(stream), second.readFrom(stream),
+        third.readFrom(stream), fourth.readFrom(stream));
+  }
+
+  void writeTo(StringBuffer buffer, Tuple4<T1, T2, T3, T4> object) {
+    first.writeTo(buffer, object.first);
+    buffer.write(' ');
+    second.writeTo(buffer, object.second);
+    buffer.write(' ');
+    third.writeTo(buffer, object.third);
+    buffer.write(' ');
+    fourth.writeTo(buffer, object.fourth);
+  }
+}
+
+class Tuple4<T1, T2, T3, T4> {
+  final T1 first;
+  final T2 second;
+  final T3 third;
+  final T4 fourth;
+
+  const Tuple4(this.first, this.second, this.third, this.fourth);
+}
+
+// A serializer/deserializer for lists.
+class ListSerializer<T> extends TextSerializer<List<T>> {
+  final TextSerializer<T> elements;
+
+  const ListSerializer(this.elements);
+
+  List<T> readFrom(Iterator<Object> stream) {
+    if (stream.current is! Iterator) {
+      throw StateError("expected a list, found an atom");
+    }
+    Iterator<Object> list = stream.current;
+    list.moveNext();
+    List<T> result = [];
+    while (list.current != null) {
+      result.add(elements.readFrom(list));
+    }
+    stream.moveNext();
+    return result;
+  }
+
+  void writeTo(StringBuffer buffer, List<T> object) {
+    buffer.write('(');
+    for (int i = 0; i < object.length; ++i) {
+      if (i != 0) buffer.write(' ');
+      elements.writeTo(buffer, object[i]);
+    }
+    buffer.write(')');
+  }
+}
+
+class Optional<T> extends TextSerializer<T> {
+  final TextSerializer<T> contents;
+
+  const Optional(this.contents);
+
+  T readFrom(Iterator<Object> stream) {
+    if (stream.current == '_') {
+      stream.moveNext();
+      return null;
+    }
+    return contents.readFrom(stream);
+  }
+
+  void writeTo(StringBuffer buffer, T object) {
+    if (object == null) {
+      buffer.write('_');
+    } else {
+      contents.writeTo(buffer, object);
+    }
+  }
+}
diff --git a/pkg/kernel/lib/text/text_reader.dart b/pkg/kernel/lib/text/text_reader.dart
new file mode 100644
index 0000000..e066fde
--- /dev/null
+++ b/pkg/kernel/lib/text/text_reader.dart
@@ -0,0 +1,99 @@
+// 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 kernel.text_reader;
+
+// S-expressions
+//
+// An S-expression is an atom or an S-list, an atom is a string that does not
+// contain the delimiters '(', ')', or ' ', and an S-list is a space delimited
+// sequence of S-expressions enclosed in parentheses:
+//
+// <S-expression> ::= <Atom>
+//                  | <S-list>
+// <S-list>       ::= '(' ')'
+//                  | '(' <S-expression> {' ' <S-expression>}* ')'
+//
+// We use an iterator to read S-expressions.  The iterator produces a stream
+// of atoms (strings) and nested iterators (S-lists).
+class TextIterator implements Iterator<Object /* String | TextIterator */ > {
+  static int space = ' '.codeUnitAt(0);
+  static int lparen = '('.codeUnitAt(0);
+  static int rparen = ')'.codeUnitAt(0);
+  static int dquote = '"'.codeUnitAt(0);
+  static int bslash = '\\'.codeUnitAt(0);
+
+  final String input;
+  int index;
+
+  TextIterator(this.input, this.index);
+
+  // Consume spaces.
+  void skipWhitespace() {
+    while (index < input.length && input.codeUnitAt(index) == space) {
+      ++index;
+    }
+  }
+
+  // Consume the rest of a nested S-expression and the closing delimiter.
+  void skipToEndOfNested() {
+    if (current is TextIterator) {
+      TextIterator it = current;
+      while (it.moveNext());
+      index = it.index + 1;
+    }
+  }
+
+  void skipToEndOfAtom() {
+    bool isQuoted = false;
+    if (index < input.length && input.codeUnitAt(index) == dquote) {
+      ++index;
+      isQuoted = true;
+    }
+    do {
+      if (index >= input.length) return;
+      int codeUnit = input.codeUnitAt(index);
+      if (isQuoted) {
+        // Terminator.
+        if (codeUnit == dquote) {
+          ++index;
+          return;
+        }
+        // Escaped double quote.
+        if (codeUnit == bslash &&
+            index < input.length + 1 &&
+            input.codeUnitAt(index + 1) == dquote) {
+          index += 2;
+        } else {
+          ++index;
+        }
+      } else {
+        // Terminator.
+        if (codeUnit == space || codeUnit == rparen) return;
+        ++index;
+      }
+    } while (true);
+  }
+
+  @override
+  Object current = null;
+
+  @override
+  bool moveNext() {
+    skipToEndOfNested();
+    skipWhitespace();
+    if (index >= input.length || input.codeUnitAt(index) == rparen) {
+      current = null;
+      return false;
+    }
+    if (input.codeUnitAt(index) == lparen) {
+      current = new TextIterator(input, index + 1);
+      return true;
+    }
+    int start = index;
+    skipToEndOfAtom();
+    current = input.substring(start, index);
+    return true;
+  }
+}
diff --git a/pkg/kernel/lib/text/text_serialization_verifier.dart b/pkg/kernel/lib/text/text_serialization_verifier.dart
new file mode 100644
index 0000000..9ab7e77
--- /dev/null
+++ b/pkg/kernel/lib/text/text_serialization_verifier.dart
@@ -0,0 +1,963 @@
+// Copyright (c) 2019, 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 '../ast.dart';
+
+import '../text/serializer_combinators.dart' show TextSerializer;
+
+import '../text/text_reader.dart' show TextIterator;
+
+import '../text/text_serializer.dart'
+    show dartTypeSerializer, expressionSerializer, initializeSerializers;
+
+import '../visitor.dart' show Visitor;
+
+const Uri noUri = null;
+
+const int noOffset = -1;
+
+abstract class TextSerializationVerificationFailure {
+  /// [Uri] of the file containing the expression that produced an error during
+  /// the round trip.
+  final Uri uri;
+
+  /// Offset within the file with [uri] of the expression that produced an error
+  /// during the round trip.
+  final int offset;
+
+  TextSerializationVerificationFailure(this.uri, this.offset);
+}
+
+class TextSerializationFailure extends TextSerializationVerificationFailure {
+  final String message;
+
+  TextSerializationFailure(this.message, Uri uri, int offset)
+      : super(uri, offset);
+}
+
+class TextDeserializationFailure extends TextSerializationVerificationFailure {
+  final String message;
+
+  TextDeserializationFailure(this.message, Uri uri, int offset)
+      : super(uri, offset);
+}
+
+class TextRoundTripFailure extends TextSerializationVerificationFailure {
+  final String initial;
+  final String serialized;
+
+  TextRoundTripFailure(this.initial, this.serialized, Uri uri, int offset)
+      : super(uri, offset);
+}
+
+class TextSerializationVerifier implements Visitor<void> {
+  /// List of errors produced during round trips on the visited nodes.
+  final List<TextSerializationVerificationFailure> failures =
+      <TextSerializationVerificationFailure>[];
+
+  Uri lastSeenUri = noUri;
+
+  int lastSeenOffset = noOffset;
+
+  TextSerializationVerifier() {
+    initializeSerializers();
+  }
+
+  void storeLastSeenUriAndOffset(Node node) {
+    if (node is TreeNode) {
+      Location location = node.location;
+      if (location != null) {
+        lastSeenUri = location.file;
+        lastSeenOffset = node.fileOffset;
+      }
+    }
+  }
+
+  T readNode<T extends Node>(
+      String input, TextSerializer<T> serializer, Uri uri, int offset) {
+    TextIterator stream = new TextIterator(input, 0);
+    stream.moveNext();
+    T result;
+    try {
+      result = serializer.readFrom(stream);
+    } catch (exception) {
+      failures.add(
+          new TextDeserializationFailure(exception.toString(), uri, offset));
+    }
+    if (stream.moveNext()) {
+      failures.add(new TextDeserializationFailure(
+          "unexpected trailing text", uri, offset));
+    }
+    return result;
+  }
+
+  String writeNode<T extends Node>(
+      T node, TextSerializer<T> serializer, Uri uri, int offset) {
+    StringBuffer buffer = new StringBuffer();
+    try {
+      serializer.writeTo(buffer, node);
+    } catch (exception) {
+      failures
+          .add(new TextSerializationFailure(exception.toString(), uri, offset));
+    }
+    return buffer.toString();
+  }
+
+  void makeExpressionRoundTrip(Expression node) {
+    Uri uri = noUri;
+    int offset = noOffset;
+    Location location = node.location;
+    if (location != null) {
+      uri = location.file;
+      offset = node.fileOffset;
+    }
+
+    String initial = writeNode(node, expressionSerializer, uri, offset);
+
+    // Do the round trip.
+    Expression deserialized =
+        readNode(initial, expressionSerializer, uri, offset);
+    String serialized =
+        writeNode(deserialized, expressionSerializer, uri, offset);
+
+    if (initial != serialized) {
+      failures.add(new TextRoundTripFailure(initial, serialized, uri, offset));
+    }
+  }
+
+  void makeDartTypeRoundTrip(DartType node) {
+    Uri uri = lastSeenUri;
+    int offset = lastSeenOffset;
+
+    String initial = writeNode(node, dartTypeSerializer, uri, offset);
+
+    // Do the round trip.
+    DartType deserialized = readNode(initial, dartTypeSerializer, uri, offset);
+    String serialized =
+        writeNode(deserialized, dartTypeSerializer, uri, offset);
+
+    if (initial != serialized) {
+      failures.add(new TextRoundTripFailure(initial, serialized, uri, offset));
+    }
+  }
+
+  @override
+  void defaultExpression(Expression node) {
+    throw new UnsupportedError("defaultExpression");
+  }
+
+  @override
+  void defaultMemberReference(Member node) {
+    throw new UnsupportedError("defaultMemberReference");
+  }
+
+  @override
+  void defaultConstantReference(Constant node) {
+    throw new UnsupportedError("defaultConstantReference");
+  }
+
+  @override
+  void defaultConstant(Constant node) {
+    throw new UnsupportedError("defaultConstant");
+  }
+
+  @override
+  void defaultDartType(DartType node) {
+    throw new UnsupportedError("defaultDartType");
+  }
+
+  @override
+  void defaultTreeNode(TreeNode node) {
+    throw new UnsupportedError("defaultTreeNode");
+  }
+
+  @override
+  void defaultNode(Node node) {
+    throw new UnsupportedError("defaultNode");
+  }
+
+  @override
+  void defaultInitializer(Initializer node) {
+    throw new UnsupportedError("defaultInitializer");
+  }
+
+  @override
+  void defaultMember(Member node) {
+    throw new UnsupportedError("defaultMember");
+  }
+
+  @override
+  void defaultStatement(Statement node) {
+    throw new UnsupportedError("defaultStatement");
+  }
+
+  @override
+  void defaultBasicLiteral(BasicLiteral node) {
+    throw new UnsupportedError("defaultBasicLiteral");
+  }
+
+  @override
+  void visitNamedType(NamedType node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSupertype(Supertype node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitName(Name node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitRedirectingFactoryConstructorReference(
+      RedirectingFactoryConstructor node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitProcedureReference(Procedure node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitConstructorReference(Constructor node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitFieldReference(Field node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTypeLiteralConstantReference(TypeLiteralConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTearOffConstantReference(TearOffConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitPartialInstantiationConstantReference(
+      PartialInstantiationConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitInstanceConstantReference(InstanceConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitListConstantReference(ListConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitMapConstantReference(MapConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSymbolConstantReference(SymbolConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitStringConstantReference(StringConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitDoubleConstantReference(DoubleConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitIntConstantReference(IntConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitBoolConstantReference(BoolConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitNullConstantReference(NullConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTypedefReference(Typedef node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitClassReference(Class node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTypeLiteralConstant(TypeLiteralConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTearOffConstant(TearOffConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitPartialInstantiationConstant(PartialInstantiationConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitInstanceConstant(InstanceConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitListConstant(ListConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitMapConstant(MapConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSymbolConstant(SymbolConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitStringConstant(StringConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitDoubleConstant(DoubleConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitIntConstant(IntConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitBoolConstant(BoolConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitNullConstant(NullConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTypedefType(TypedefType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitTypeParameterType(TypeParameterType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitFunctionType(FunctionType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitInterfaceType(InterfaceType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitBottomType(BottomType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitVoidType(VoidType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitDynamicType(DynamicType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitInvalidType(InvalidType node) {
+    storeLastSeenUriAndOffset(node);
+    makeDartTypeRoundTrip(node);
+  }
+
+  @override
+  void visitComponent(Component node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitMapEntry(MapEntry node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitCatch(Catch node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSwitchCase(SwitchCase node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitNamedExpression(NamedExpression node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitArguments(Arguments node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitFunctionNode(FunctionNode node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTypeParameter(TypeParameter node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTypedef(Typedef node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitLibraryPart(LibraryPart node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitCombinator(Combinator node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitLibraryDependency(LibraryDependency node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitLibrary(Library node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitAssertInitializer(AssertInitializer node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitLocalInitializer(LocalInitializer node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitRedirectingInitializer(RedirectingInitializer node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSuperInitializer(SuperInitializer node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitFieldInitializer(FieldInitializer node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitInvalidInitializer(InvalidInitializer node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitClass(Class node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitRedirectingFactoryConstructor(RedirectingFactoryConstructor node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitField(Field node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitProcedure(Procedure node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitConstructor(Constructor node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitVariableDeclaration(VariableDeclaration node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitYieldStatement(YieldStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTryFinally(TryFinally node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitTryCatch(TryCatch node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitReturnStatement(ReturnStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitIfStatement(IfStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitContinueSwitchStatement(ContinueSwitchStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitSwitchStatement(SwitchStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitForInStatement(ForInStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitForStatement(ForStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitDoStatement(DoStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitWhileStatement(WhileStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitBreakStatement(BreakStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitLabeledStatement(LabeledStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitAssertStatement(AssertStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitEmptyStatement(EmptyStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitAssertBlock(AssertBlock node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitBlock(Block node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitExpressionStatement(ExpressionStatement node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
+  void visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitLoadLibrary(LoadLibrary node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitInstantiation(Instantiation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitLet(Let node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitNullLiteral(NullLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitBoolLiteral(BoolLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitDoubleLiteral(DoubleLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitIntLiteral(IntLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitStringLiteral(StringLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitConstantExpression(ConstantExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitAwaitExpression(AwaitExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitMapLiteral(MapLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitSetLiteral(SetLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitListLiteral(ListLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitThrow(Throw node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitRethrow(Rethrow node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitThisExpression(ThisExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitTypeLiteral(TypeLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitSymbolLiteral(SymbolLiteral node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitAsExpression(AsExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitIsExpression(IsExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitStringConcatenation(StringConcatenation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitConditionalExpression(ConditionalExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitLogicalExpression(LogicalExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitNot(Not node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitConstructorInvocation(ConstructorInvocation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitStaticInvocation(StaticInvocation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitSuperMethodInvocation(SuperMethodInvocation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitDirectMethodInvocation(DirectMethodInvocation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitMethodInvocation(MethodInvocation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitStaticSet(StaticSet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitStaticGet(StaticGet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitSuperPropertySet(SuperPropertySet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitSuperPropertyGet(SuperPropertyGet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitDirectPropertySet(DirectPropertySet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitDirectPropertyGet(DirectPropertyGet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitPropertySet(PropertySet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitPropertyGet(PropertyGet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitVariableSet(VariableSet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitVariableGet(VariableGet node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitInvalidExpression(InvalidExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+}
diff --git a/pkg/kernel/lib/text/text_serializer.dart b/pkg/kernel/lib/text/text_serializer.dart
new file mode 100644
index 0000000..2848583
--- /dev/null
+++ b/pkg/kernel/lib/text/text_serializer.dart
@@ -0,0 +1,583 @@
+// 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 kernel.text_serializer;
+
+import '../ast.dart';
+
+import 'serializer_combinators.dart';
+
+import '../visitor.dart' show ExpressionVisitor;
+
+abstract class Tagger<T extends Node> {
+  String tag(T node);
+}
+
+class NameTagger implements Tagger<Name> {
+  const NameTagger();
+
+  String tag(Name name) => name.isPrivate ? "private" : "public";
+}
+
+TextSerializer<Name> publicName =
+    new Wrapped(unwrapPublicName, wrapPublicName, const DartString());
+
+String unwrapPublicName(Name name) => name.name;
+
+Name wrapPublicName(String name) => new Name(name);
+
+TextSerializer<Name> privateName = new Wrapped(unwrapPrivateName,
+    wrapPrivateName, Tuple2Serializer(const DartString(), const DartString()));
+
+Tuple2<String, String> unwrapPrivateName(Name name) {
+  return new Tuple2(name.library.importUri.toString(), name.name);
+}
+
+Name wrapPrivateName(Tuple2<String, String> tuple) {
+  // We need a map from import URI to libraries.  More generally, we will need
+  // a way to map any 'named' node to the node's reference.
+  throw UnimplementedError('deserialization of private names');
+}
+
+TextSerializer<Name> nameSerializer = new Case(const NameTagger(), [
+  "public",
+  "private",
+], [
+  publicName,
+  privateName
+]);
+
+class ExpressionTagger extends ExpressionVisitor<String>
+    implements Tagger<Expression> {
+  const ExpressionTagger();
+
+  String tag(Expression expression) => expression.accept(this);
+
+  String visitStringLiteral(StringLiteral _) => "string";
+  String visitIntLiteral(IntLiteral _) => "int";
+  String visitDoubleLiteral(DoubleLiteral _) => "double";
+  String visitBoolLiteral(BoolLiteral _) => "bool";
+  String visitNullLiteral(NullLiteral _) => "null";
+  String visitInvalidExpression(InvalidExpression _) => "invalid";
+  String visitNot(Not _) => "not";
+  String visitLogicalExpression(LogicalExpression expression) {
+    return expression.operator;
+  }
+
+  String visitStringConcatenation(StringConcatenation _) => "concat";
+  String visitSymbolLiteral(SymbolLiteral _) => "symbol";
+  String visitThisExpression(ThisExpression _) => "this";
+  String visitRethrow(Rethrow _) => "rethrow";
+  String visitThrow(Throw _) => "throw";
+  String visitAwaitExpression(AwaitExpression _) => "await";
+  String visitConditionalExpression(ConditionalExpression _) => "cond";
+  String visitIsExpression(IsExpression _) => "is";
+  String visitAsExpression(AsExpression _) => "as";
+  String visitTypeLiteral(TypeLiteral _) => "type";
+  String visitListLiteral(ListLiteral expression) {
+    return expression.isConst ? "const-list" : "list";
+  }
+
+  String visitSetLiteral(SetLiteral expression) {
+    return expression.isConst ? "const-set" : "set";
+  }
+
+  String visitMapLiteral(MapLiteral expression) {
+    return expression.isConst ? "const-map" : "map";
+  }
+
+  String visitLet(Let _) => "let";
+}
+
+TextSerializer<InvalidExpression> invalidExpressionSerializer = new Wrapped(
+    unwrapInvalidExpression, wrapInvalidExpression, const DartString());
+
+String unwrapInvalidExpression(InvalidExpression expression) {
+  return expression.message;
+}
+
+InvalidExpression wrapInvalidExpression(String message) {
+  return new InvalidExpression(message);
+}
+
+TextSerializer<Not> notSerializer =
+    new Wrapped(unwrapNot, wrapNot, expressionSerializer);
+
+Expression unwrapNot(Not expression) => expression.operand;
+
+Not wrapNot(Expression operand) => new Not(operand);
+
+TextSerializer<LogicalExpression> logicalAndSerializer = new Wrapped(
+    unwrapLogicalExpression,
+    wrapLogicalAnd,
+    new Tuple2Serializer(expressionSerializer, expressionSerializer));
+
+Tuple2<Expression, Expression> unwrapLogicalExpression(
+    LogicalExpression expression) {
+  return new Tuple2(expression.left, expression.right);
+}
+
+LogicalExpression wrapLogicalAnd(Tuple2<Expression, Expression> tuple) {
+  return new LogicalExpression(tuple.first, '&&', tuple.second);
+}
+
+TextSerializer<LogicalExpression> logicalOrSerializer = new Wrapped(
+    unwrapLogicalExpression,
+    wrapLogicalOr,
+    new Tuple2Serializer(expressionSerializer, expressionSerializer));
+
+LogicalExpression wrapLogicalOr(Tuple2<Expression, Expression> tuple) {
+  return new LogicalExpression(tuple.first, '||', tuple.second);
+}
+
+TextSerializer<StringConcatenation> stringConcatenationSerializer = new Wrapped(
+    unwrapStringConcatenation,
+    wrapStringConcatenation,
+    new ListSerializer(expressionSerializer));
+
+List<Expression> unwrapStringConcatenation(StringConcatenation expression) {
+  return expression.expressions;
+}
+
+StringConcatenation wrapStringConcatenation(List<Expression> expressions) {
+  return new StringConcatenation(expressions);
+}
+
+TextSerializer<StringLiteral> stringLiteralSerializer =
+    new Wrapped(unwrapStringLiteral, wrapStringLiteral, const DartString());
+
+String unwrapStringLiteral(StringLiteral literal) => literal.value;
+
+StringLiteral wrapStringLiteral(String value) => new StringLiteral(value);
+
+TextSerializer<IntLiteral> intLiteralSerializer =
+    new Wrapped(unwrapIntLiteral, wrapIntLiteral, const DartInt());
+
+int unwrapIntLiteral(IntLiteral literal) => literal.value;
+
+IntLiteral wrapIntLiteral(int value) => new IntLiteral(value);
+
+TextSerializer<DoubleLiteral> doubleLiteralSerializer =
+    new Wrapped(unwrapDoubleLiteral, wrapDoubleLiteral, const DartDouble());
+
+double unwrapDoubleLiteral(DoubleLiteral literal) => literal.value;
+
+DoubleLiteral wrapDoubleLiteral(double value) => new DoubleLiteral(value);
+
+TextSerializer<BoolLiteral> boolLiteralSerializer =
+    new Wrapped(unwrapBoolLiteral, wrapBoolLiteral, const DartBool());
+
+bool unwrapBoolLiteral(BoolLiteral literal) => literal.value;
+
+BoolLiteral wrapBoolLiteral(bool value) => new BoolLiteral(value);
+
+TextSerializer<NullLiteral> nullLiteralSerializer =
+    new Wrapped(unwrapNullLiteral, wrapNullLiteral, const Nothing());
+
+void unwrapNullLiteral(NullLiteral literal) {}
+
+NullLiteral wrapNullLiteral(void ignored) => new NullLiteral();
+
+TextSerializer<SymbolLiteral> symbolLiteralSerializer =
+    new Wrapped(unwrapSymbolLiteral, wrapSymbolLiteral, const DartString());
+
+String unwrapSymbolLiteral(SymbolLiteral expression) => expression.value;
+
+SymbolLiteral wrapSymbolLiteral(String value) => new SymbolLiteral(value);
+
+TextSerializer<ThisExpression> thisExpressionSerializer =
+    new Wrapped(unwrapThisExpression, wrapThisExpression, const Nothing());
+
+void unwrapThisExpression(ThisExpression expression) {}
+
+ThisExpression wrapThisExpression(void ignored) => new ThisExpression();
+
+TextSerializer<Rethrow> rethrowSerializer =
+    new Wrapped(unwrapRethrow, wrapRethrow, const Nothing());
+
+void unwrapRethrow(Rethrow expression) {}
+
+Rethrow wrapRethrow(void ignored) => new Rethrow();
+
+TextSerializer<Throw> throwSerializer =
+    new Wrapped(unwrapThrow, wrapThrow, expressionSerializer);
+
+Expression unwrapThrow(Throw expression) => expression.expression;
+
+Throw wrapThrow(Expression expression) => new Throw(expression);
+
+TextSerializer<AwaitExpression> awaitExpressionSerializer = new Wrapped(
+    unwrapAwaitExpression, wrapAwaitExpression, expressionSerializer);
+
+Expression unwrapAwaitExpression(AwaitExpression expression) =>
+    expression.operand;
+
+AwaitExpression wrapAwaitExpression(Expression operand) =>
+    new AwaitExpression(operand);
+
+TextSerializer<ConditionalExpression> conditionalExpressionSerializer =
+    new Wrapped(
+        unwrapConditionalExpression,
+        wrapConditionalExpression,
+        new Tuple4Serializer(expressionSerializer, dartTypeSerializer,
+            expressionSerializer, expressionSerializer));
+
+Tuple4<Expression, DartType, Expression, Expression>
+    unwrapConditionalExpression(ConditionalExpression expression) {
+  return new Tuple4(expression.condition, expression.staticType,
+      expression.then, expression.otherwise);
+}
+
+ConditionalExpression wrapConditionalExpression(
+    Tuple4<Expression, DartType, Expression, Expression> tuple) {
+  return new ConditionalExpression(
+      tuple.first, tuple.third, tuple.fourth, tuple.second);
+}
+
+TextSerializer<IsExpression> isExpressionSerializer = new Wrapped(
+    unwrapIsExpression,
+    wrapIsExpression,
+    new Tuple2Serializer(expressionSerializer, dartTypeSerializer));
+
+Tuple2<Expression, DartType> unwrapIsExpression(IsExpression expression) {
+  return new Tuple2(expression.operand, expression.type);
+}
+
+IsExpression wrapIsExpression(Tuple2<Expression, DartType> tuple) {
+  return new IsExpression(tuple.first, tuple.second);
+}
+
+TextSerializer<AsExpression> asExpressionSerializer = new Wrapped(
+    unwrapAsExpression,
+    wrapAsExpression,
+    new Tuple2Serializer(expressionSerializer, dartTypeSerializer));
+
+Tuple2<Expression, DartType> unwrapAsExpression(AsExpression expression) {
+  return new Tuple2(expression.operand, expression.type);
+}
+
+AsExpression wrapAsExpression(Tuple2<Expression, DartType> tuple) {
+  return new AsExpression(tuple.first, tuple.second);
+}
+
+TextSerializer<TypeLiteral> typeLiteralSerializer =
+    new Wrapped(unwrapTypeLiteral, wrapTypeLiteral, dartTypeSerializer);
+
+DartType unwrapTypeLiteral(TypeLiteral expression) => expression.type;
+
+TypeLiteral wrapTypeLiteral(DartType type) => new TypeLiteral(type);
+
+TextSerializer<ListLiteral> listLiteralSerializer = new Wrapped(
+    unwrapListLiteral,
+    wrapListLiteral,
+    new Tuple2Serializer(
+        dartTypeSerializer, new ListSerializer(expressionSerializer)));
+
+Tuple2<DartType, List<Expression>> unwrapListLiteral(ListLiteral expression) {
+  return new Tuple2(expression.typeArgument, expression.expressions);
+}
+
+ListLiteral wrapListLiteral(Tuple2<DartType, List<Expression>> tuple) {
+  return new ListLiteral(tuple.second,
+      typeArgument: tuple.first, isConst: false);
+}
+
+TextSerializer<ListLiteral> constListLiteralSerializer = new Wrapped(
+    unwrapListLiteral,
+    wrapConstListLiteral,
+    new Tuple2Serializer(
+        dartTypeSerializer, new ListSerializer(expressionSerializer)));
+
+ListLiteral wrapConstListLiteral(Tuple2<DartType, List<Expression>> tuple) {
+  return new ListLiteral(tuple.second,
+      typeArgument: tuple.first, isConst: true);
+}
+
+TextSerializer<SetLiteral> setLiteralSerializer = new Wrapped(
+    unwrapSetLiteral,
+    wrapSetLiteral,
+    new Tuple2Serializer(
+        dartTypeSerializer, new ListSerializer(expressionSerializer)));
+
+Tuple2<DartType, List<Expression>> unwrapSetLiteral(SetLiteral expression) {
+  return new Tuple2(expression.typeArgument, expression.expressions);
+}
+
+SetLiteral wrapSetLiteral(Tuple2<DartType, List<Expression>> tuple) {
+  return new SetLiteral(tuple.second,
+      typeArgument: tuple.first, isConst: false);
+}
+
+TextSerializer<SetLiteral> constSetLiteralSerializer = new Wrapped(
+    unwrapSetLiteral,
+    wrapConstSetLiteral,
+    new Tuple2Serializer(
+        dartTypeSerializer, new ListSerializer(expressionSerializer)));
+
+SetLiteral wrapConstSetLiteral(Tuple2<DartType, List<Expression>> tuple) {
+  return new SetLiteral(tuple.second, typeArgument: tuple.first, isConst: true);
+}
+
+TextSerializer<MapLiteral> mapLiteralSerializer = new Wrapped(
+    unwrapMapLiteral,
+    wrapMapLiteral,
+    new Tuple3Serializer(dartTypeSerializer, dartTypeSerializer,
+        new ListSerializer(expressionSerializer)));
+
+Tuple3<DartType, DartType, List<Expression>> unwrapMapLiteral(
+    MapLiteral expression) {
+  List<Expression> entries = new List(2 * expression.entries.length);
+  for (int from = 0, to = 0; from < expression.entries.length; ++from) {
+    MapEntry entry = expression.entries[from];
+    entries[to++] = entry.key;
+    entries[to++] = entry.value;
+  }
+  return new Tuple3(expression.keyType, expression.valueType, entries);
+}
+
+MapLiteral wrapMapLiteral(Tuple3<DartType, DartType, List<Expression>> tuple) {
+  List<MapEntry> entries = new List(tuple.third.length ~/ 2);
+  for (int from = 0, to = 0; to < entries.length; ++to) {
+    entries[to] = new MapEntry(tuple.third[from++], tuple.third[from++]);
+  }
+  return new MapLiteral(entries,
+      keyType: tuple.first, valueType: tuple.second, isConst: false);
+}
+
+TextSerializer<MapLiteral> constMapLiteralSerializer = new Wrapped(
+    unwrapMapLiteral,
+    wrapConstMapLiteral,
+    new Tuple3Serializer(dartTypeSerializer, dartTypeSerializer,
+        new ListSerializer(expressionSerializer)));
+
+MapLiteral wrapConstMapLiteral(
+    Tuple3<DartType, DartType, List<Expression>> tuple) {
+  List<MapEntry> entries = new List(tuple.third.length ~/ 2);
+  for (int from = 0, to = 0; to < entries.length; ++to) {
+    entries[to] = new MapEntry(tuple.third[from++], tuple.third[from++]);
+  }
+  return new MapLiteral(entries,
+      keyType: tuple.first, valueType: tuple.second, isConst: true);
+}
+
+TextSerializer<Let> letSerializer = new Wrapped(unwrapLet, wrapLet,
+    new Tuple2Serializer(variableDeclarationSerializer, expressionSerializer));
+
+Tuple2<VariableDeclaration, Expression> unwrapLet(Let expression) {
+  return new Tuple2(expression.variable, expression.body);
+}
+
+Let wrapLet(Tuple2<VariableDeclaration, Expression> tuple) {
+  return new Let(tuple.first, tuple.second);
+}
+
+Case<Expression> expressionSerializer =
+    new Case.uninitialized(const ExpressionTagger());
+
+class VariableDeclarationTagger implements Tagger<VariableDeclaration> {
+  const VariableDeclarationTagger();
+
+  String tag(VariableDeclaration decl) {
+    if (decl.isCovariant) throw UnimplementedError("covariant declaration");
+    if (decl.isFieldFormal) throw UnimplementedError("initializing formal");
+    if (decl.isConst) {
+      // It's not clear what invariants we assume about const/final.  For now
+      // throw if we have both.
+      if (decl.isFinal) throw UnimplementedError("const and final");
+      return "const";
+    }
+    if (decl.isFinal) {
+      return "final";
+    }
+    return "var";
+  }
+}
+
+TextSerializer<VariableDeclaration> varDeclarationSerializer = new Wrapped(
+    unwrapVariableDeclaration,
+    wrapVarDeclaration,
+    Tuple4Serializer(
+        const DartString(),
+        dartTypeSerializer,
+        new Optional(expressionSerializer),
+        new ListSerializer(expressionSerializer)));
+
+Tuple4<String, DartType, Expression, List<Expression>>
+    unwrapVariableDeclaration(VariableDeclaration declaration) {
+  return new Tuple4(declaration.name ?? "", declaration.type,
+      declaration.initializer, declaration.annotations);
+}
+
+VariableDeclaration wrapVarDeclaration(
+    Tuple4<String, DartType, Expression, List<Expression>> tuple) {
+  var result = new VariableDeclaration(tuple.first.isEmpty ? null : tuple.first,
+      initializer: tuple.third, type: tuple.second);
+  for (int i = 0; i < tuple.fourth.length; ++i) {
+    result.addAnnotation(tuple.fourth[i]);
+  }
+  return result;
+}
+
+TextSerializer<VariableDeclaration> finalDeclarationSerializer = new Wrapped(
+    unwrapVariableDeclaration,
+    wrapFinalDeclaration,
+    Tuple4Serializer(
+        const DartString(),
+        dartTypeSerializer,
+        new Optional(expressionSerializer),
+        new ListSerializer(expressionSerializer)));
+
+VariableDeclaration wrapFinalDeclaration(
+    Tuple4<String, DartType, Expression, List<Expression>> tuple) {
+  var result = new VariableDeclaration(tuple.first.isEmpty ? null : tuple.first,
+      initializer: tuple.third, type: tuple.second, isFinal: true);
+  for (int i = 0; i < tuple.fourth.length; ++i) {
+    result.addAnnotation(tuple.fourth[i]);
+  }
+  return result;
+}
+
+TextSerializer<VariableDeclaration> constDeclarationSerializer = new Wrapped(
+    unwrapVariableDeclaration,
+    wrapConstDeclaration,
+    Tuple4Serializer(
+        const DartString(),
+        dartTypeSerializer,
+        new Optional(expressionSerializer),
+        new ListSerializer(expressionSerializer)));
+
+VariableDeclaration wrapConstDeclaration(
+    Tuple4<String, DartType, Expression, List<Expression>> tuple) {
+  var result = new VariableDeclaration(tuple.first.isEmpty ? null : tuple.first,
+      initializer: tuple.third, type: tuple.second, isConst: true);
+  for (int i = 0; i < tuple.fourth.length; ++i) {
+    result.addAnnotation(tuple.fourth[i]);
+  }
+  return result;
+}
+
+TextSerializer<VariableDeclaration> variableDeclarationSerializer =
+    new Case(const VariableDeclarationTagger(), [
+  "var",
+  "final",
+  "const",
+], [
+  varDeclarationSerializer,
+  finalDeclarationSerializer,
+  constDeclarationSerializer,
+]);
+
+class DartTypeTagger extends DartTypeVisitor<String>
+    implements Tagger<DartType> {
+  const DartTypeTagger();
+
+  String tag(DartType type) => type.accept(this);
+
+  String visitInvalidType(InvalidType _) => "invalid";
+  String visitDynamicType(DynamicType _) => "dynamic";
+  String visitVoidType(VoidType _) => "void";
+  String visitBottomType(BottomType _) => "bottom";
+}
+
+TextSerializer<InvalidType> invalidTypeSerializer =
+    new Wrapped(unwrapInvalidType, wrapInvalidType, const Nothing());
+
+void unwrapInvalidType(InvalidType type) {}
+
+InvalidType wrapInvalidType(void ignored) => const InvalidType();
+
+TextSerializer<DynamicType> dynamicTypeSerializer =
+    new Wrapped(unwrapDynamicType, wrapDynamicType, const Nothing());
+
+void unwrapDynamicType(DynamicType type) {}
+
+DynamicType wrapDynamicType(void ignored) => const DynamicType();
+
+TextSerializer<VoidType> voidTypeSerializer =
+    new Wrapped(unwrapVoidType, wrapVoidType, const Nothing());
+
+void unwrapVoidType(VoidType type) {}
+
+VoidType wrapVoidType(void ignored) => const VoidType();
+
+TextSerializer<BottomType> bottomTypeSerializer =
+    new Wrapped(unwrapBottomType, wrapBottomType, const Nothing());
+
+void unwrapBottomType(BottomType type) {}
+
+BottomType wrapBottomType(void ignored) => const BottomType();
+
+Case<DartType> dartTypeSerializer =
+    new Case.uninitialized(const DartTypeTagger());
+
+void initializeSerializers() {
+  expressionSerializer.tags.addAll([
+    "string",
+    "int",
+    "double",
+    "bool",
+    "null",
+    "invalid",
+    "not",
+    "&&",
+    "||",
+    "concat",
+    "symbol",
+    "this",
+    "rethrow",
+    "throw",
+    "await",
+    "cond",
+    "is",
+    "as",
+    "type",
+    "list",
+    "const-list",
+    "set",
+    "const-set",
+    "map",
+    "const-map",
+    "let",
+  ]);
+  expressionSerializer.serializers.addAll([
+    stringLiteralSerializer,
+    intLiteralSerializer,
+    doubleLiteralSerializer,
+    boolLiteralSerializer,
+    nullLiteralSerializer,
+    invalidExpressionSerializer,
+    notSerializer,
+    logicalAndSerializer,
+    logicalOrSerializer,
+    stringConcatenationSerializer,
+    symbolLiteralSerializer,
+    thisExpressionSerializer,
+    rethrowSerializer,
+    throwSerializer,
+    awaitExpressionSerializer,
+    conditionalExpressionSerializer,
+    isExpressionSerializer,
+    asExpressionSerializer,
+    typeLiteralSerializer,
+    listLiteralSerializer,
+    constListLiteralSerializer,
+    setLiteralSerializer,
+    constSetLiteralSerializer,
+    mapLiteralSerializer,
+    constMapLiteralSerializer,
+    letSerializer,
+  ]);
+  dartTypeSerializer.tags.addAll([
+    "invalid",
+    "dynamic",
+    "void",
+    "bottom",
+  ]);
+  dartTypeSerializer.serializers.addAll([
+    invalidTypeSerializer,
+    dynamicTypeSerializer,
+    voidTypeSerializer,
+    bottomTypeSerializer,
+  ]);
+}
diff --git a/pkg/kernel/lib/transformations/async.dart b/pkg/kernel/lib/transformations/async.dart
index 7977045..31fe3f3 100644
--- a/pkg/kernel/lib/transformations/async.dart
+++ b/pkg/kernel/lib/transformations/async.dart
@@ -499,8 +499,8 @@
   }
 
   visitFunctionNode(FunctionNode node) {
-    var nestedRewriter = new RecursiveContinuationRewriter(
-        continuationRewriter.helper, continuationRewriter.syncAsync);
+    var nestedRewriter =
+        new RecursiveContinuationRewriter(continuationRewriter.helper);
     return node.accept(nestedRewriter);
   }
 }
diff --git a/pkg/kernel/lib/transformations/constants.dart b/pkg/kernel/lib/transformations/constants.dart
index 2db13a1..4b1208c 100644
--- a/pkg/kernel/lib/transformations/constants.dart
+++ b/pkg/kernel/lib/transformations/constants.dart
@@ -40,7 +40,7 @@
   hierarchy ??= new ClassHierarchy(component);
 
   final typeEnvironment =
-      new TypeEnvironment(coreTypes, hierarchy, strongMode: !legacyMode);
+      new TypeEnvironment(coreTypes, hierarchy, legacyMode: legacyMode);
 
   transformLibraries(component.libraries, backend, coreTypes, typeEnvironment,
       keepFields: keepFields,
@@ -463,8 +463,8 @@
   }
 
   visitIntLiteral(IntLiteral node) {
-    // The frontend will ensure the integer literals are in signed 64-bit range
-    // in strong mode.
+    // The frontend will ensure the integer literals are in signed 64-bit
+    // range.
     return canonicalize(new IntConstant(node.value));
   }
 
diff --git a/pkg/kernel/lib/transformations/continuation.dart b/pkg/kernel/lib/transformations/continuation.dart
index 723c78d..a78a3ab 100644
--- a/pkg/kernel/lib/transformations/continuation.dart
+++ b/pkg/kernel/lib/transformations/continuation.dart
@@ -23,42 +23,36 @@
   static String stackTraceVar(int depth) => ':stack_trace$depth';
 }
 
-void transformLibraries(
-    CoreTypes coreTypes, List<Library> libraries, bool syncAsync) {
+void transformLibraries(CoreTypes coreTypes, List<Library> libraries) {
   var helper = new HelperNodes.fromCoreTypes(coreTypes);
-  var rewriter = new RecursiveContinuationRewriter(helper, syncAsync);
+  var rewriter = new RecursiveContinuationRewriter(helper);
   for (var library in libraries) {
     rewriter.rewriteLibrary(library);
   }
 }
 
-Component transformComponent(
-    CoreTypes coreTypes, Component component, bool syncAsync) {
+Component transformComponent(CoreTypes coreTypes, Component component) {
   var helper = new HelperNodes.fromCoreTypes(coreTypes);
-  var rewriter = new RecursiveContinuationRewriter(helper, syncAsync);
+  var rewriter = new RecursiveContinuationRewriter(helper);
   return rewriter.rewriteComponent(component);
 }
 
-Procedure transformProcedure(
-    CoreTypes coreTypes, Procedure procedure, bool syncAsync) {
+Procedure transformProcedure(CoreTypes coreTypes, Procedure procedure) {
   var helper = new HelperNodes.fromCoreTypes(coreTypes);
-  var rewriter = new RecursiveContinuationRewriter(helper, syncAsync);
+  var rewriter = new RecursiveContinuationRewriter(helper);
   return rewriter.visitProcedure(procedure);
 }
 
 class RecursiveContinuationRewriter extends Transformer {
   final HelperNodes helper;
 
-  /// Whether `async` functions should start synchronously.
-  final bool syncAsync;
-
   final VariableDeclaration asyncJumpVariable = new VariableDeclaration(
       ContinuationVariables.awaitJumpVar,
       initializer: new IntLiteral(0));
   final VariableDeclaration asyncContextVariable =
       new VariableDeclaration(ContinuationVariables.awaitContextVar);
 
-  RecursiveContinuationRewriter(this.helper, this.syncAsync);
+  RecursiveContinuationRewriter(this.helper);
 
   Component rewriteComponent(Component node) {
     return node.accept(this);
@@ -76,15 +70,14 @@
     switch (node.asyncMarker) {
       case AsyncMarker.Sync:
       case AsyncMarker.SyncYielding:
-        node.transformChildren(
-            new RecursiveContinuationRewriter(helper, syncAsync));
+        node.transformChildren(new RecursiveContinuationRewriter(helper));
         return node;
       case AsyncMarker.SyncStar:
-        return new SyncStarFunctionRewriter(helper, node, syncAsync).rewrite();
+        return new SyncStarFunctionRewriter(helper, node).rewrite();
       case AsyncMarker.Async:
-        return new AsyncFunctionRewriter(helper, node, syncAsync).rewrite();
+        return new AsyncFunctionRewriter(helper, node).rewrite();
       case AsyncMarker.AsyncStar:
-        return new AsyncStarFunctionRewriter(helper, node, syncAsync).rewrite();
+        return new AsyncStarFunctionRewriter(helper, node).rewrite();
       default:
         return null;
     }
@@ -99,9 +92,8 @@
   int capturedTryDepth = 0; // Deepest yield point within a try-block.
   int capturedCatchDepth = 0; // Deepest yield point within a catch-block.
 
-  ContinuationRewriterBase(
-      HelperNodes helper, this.enclosingFunction, bool syncAsync)
-      : super(helper, syncAsync);
+  ContinuationRewriterBase(HelperNodes helper, this.enclosingFunction)
+      : super(helper);
 
   /// Given a container [type], which is an instantiation of the given
   /// [containerClass] extract its element type.
@@ -187,14 +179,13 @@
 class SyncStarFunctionRewriter extends ContinuationRewriterBase {
   final VariableDeclaration iteratorVariable;
 
-  SyncStarFunctionRewriter(
-      HelperNodes helper, FunctionNode enclosingFunction, syncAsync)
+  SyncStarFunctionRewriter(HelperNodes helper, FunctionNode enclosingFunction)
       : iteratorVariable = new VariableDeclaration(':iterator')
           ..type = new InterfaceType(helper.syncIteratorClass, [
             ContinuationRewriterBase.elementTypeFrom(
                 helper.iterableClass, enclosingFunction.returnType)
           ]),
-        super(helper, enclosingFunction, syncAsync);
+        super(helper, enclosingFunction);
 
   FunctionNode rewrite() {
     // :sync_op(:iterator) {
@@ -289,9 +280,8 @@
 
   ExpressionLifter expressionRewriter;
 
-  AsyncRewriterBase(
-      HelperNodes helper, FunctionNode enclosingFunction, bool syncAsync)
-      : super(helper, enclosingFunction, syncAsync) {}
+  AsyncRewriterBase(HelperNodes helper, FunctionNode enclosingFunction)
+      : super(helper, enclosingFunction) {}
 
   void setupAsyncContinuations(List<Statement> statements) {
     expressionRewriter = new ExpressionLifter(this);
@@ -904,9 +894,8 @@
 class AsyncStarFunctionRewriter extends AsyncRewriterBase {
   VariableDeclaration controllerVariable;
 
-  AsyncStarFunctionRewriter(
-      HelperNodes helper, FunctionNode enclosingFunction, bool syncAsync)
-      : super(helper, enclosingFunction, syncAsync);
+  AsyncStarFunctionRewriter(HelperNodes helper, FunctionNode enclosingFunction)
+      : super(helper, enclosingFunction);
 
   FunctionNode rewrite() {
     var statements = <Statement>[];
@@ -1022,9 +1011,8 @@
   VariableDeclaration completerVariable;
   VariableDeclaration returnVariable;
 
-  AsyncFunctionRewriter(
-      HelperNodes helper, FunctionNode enclosingFunction, bool syncAsync)
-      : super(helper, enclosingFunction, syncAsync);
+  AsyncFunctionRewriter(HelperNodes helper, FunctionNode enclosingFunction)
+      : super(helper, enclosingFunction);
 
   FunctionNode rewrite() {
     var statements = <Statement>[];
@@ -1042,28 +1030,16 @@
         new InterfaceType(helper.futureOrClass, <DartType>[valueType]);
     var completerTypeArguments = <DartType>[valueType];
 
-    if (syncAsync) {
-      final completerType = new InterfaceType(
-          helper.asyncAwaitCompleterClass, completerTypeArguments);
-      // final Completer<T> :async_completer = new _AsyncAwaitCompleter<T>();
-      completerVariable = new VariableDeclaration(":async_completer",
-          initializer: new ConstructorInvocation(
-              helper.asyncAwaitCompleterConstructor,
-              new Arguments([], types: completerTypeArguments))
-            ..fileOffset = enclosingFunction.body?.fileOffset ?? -1,
-          isFinal: true,
-          type: completerType);
-    } else {
-      final completerType =
-          new InterfaceType(helper.completerClass, completerTypeArguments);
-      // final Completer<T> :async_completer = new Completer<T>.sync();
-      completerVariable = new VariableDeclaration(":async_completer",
-          initializer: new StaticInvocation(helper.completerConstructor,
-              new Arguments([], types: completerTypeArguments))
-            ..fileOffset = enclosingFunction.body?.fileOffset ?? -1,
-          isFinal: true,
-          type: completerType);
-    }
+    final completerType = new InterfaceType(
+        helper.asyncAwaitCompleterClass, completerTypeArguments);
+    // final Completer<T> :async_completer = new _AsyncAwaitCompleter<T>();
+    completerVariable = new VariableDeclaration(":async_completer",
+        initializer: new ConstructorInvocation(
+            helper.asyncAwaitCompleterConstructor,
+            new Arguments([], types: completerTypeArguments))
+          ..fileOffset = enclosingFunction.body?.fileOffset ?? -1,
+        isFinal: true,
+        type: completerType);
     statements.add(completerVariable);
 
     returnVariable = new VariableDeclaration(":return_value", type: returnType);
@@ -1071,23 +1047,13 @@
 
     setupAsyncContinuations(statements);
 
-    if (syncAsync) {
-      // :async_completer.start(:async_op);
-      var startStatement = new ExpressionStatement(new MethodInvocation(
-          new VariableGet(completerVariable),
-          new Name('start'),
-          new Arguments([new VariableGet(nestedClosureVariable)]))
-        ..fileOffset = enclosingFunction.fileOffset);
-      statements.add(startStatement);
-    } else {
-      // new Future.microtask(:async_op);
-      var newMicrotaskStatement = new ExpressionStatement(new StaticInvocation(
-          helper.futureMicrotaskConstructor,
-          new Arguments([new VariableGet(nestedClosureVariable)],
-              types: [const DynamicType()]))
-        ..fileOffset = enclosingFunction.fileOffset);
-      statements.add(newMicrotaskStatement);
-    }
+    // :async_completer.start(:async_op);
+    var startStatement = new ExpressionStatement(new MethodInvocation(
+        new VariableGet(completerVariable),
+        new Name('start'),
+        new Arguments([new VariableGet(nestedClosureVariable)]))
+      ..fileOffset = enclosingFunction.fileOffset);
+    statements.add(startStatement);
     // return :async_completer.future;
     var completerGet = new VariableGet(completerVariable);
     var returnStatement = new ReturnStatement(new PropertyGet(completerGet,
@@ -1152,22 +1118,16 @@
   final Member asyncStarMoveNextHelper;
   final Procedure asyncThenWrapper;
   final Procedure awaitHelper;
-  final Class completerClass;
   final Class asyncAwaitCompleterClass;
-  final Member completerComplete;
   final Member completerCompleteError;
-  final Member completerConstructor;
   final Member asyncAwaitCompleterConstructor;
   final Member completeOnAsyncReturn;
   final Member completerFuture;
   final Library coreLibrary;
   final CoreTypes coreTypes;
   final Class futureClass;
-  final Procedure futureMicrotaskConstructor;
   final Class futureOrClass;
   final Class iterableClass;
-  final Class iteratorClass;
-  final Procedure printProcedure;
   final Class streamClass;
   final Member streamIteratorCancel;
   final Class streamIteratorClass;
@@ -1196,22 +1156,16 @@
       this.asyncStarMoveNextHelper,
       this.asyncThenWrapper,
       this.awaitHelper,
-      this.completerClass,
       this.asyncAwaitCompleterClass,
-      this.completerComplete,
       this.completerCompleteError,
-      this.completerConstructor,
       this.asyncAwaitCompleterConstructor,
       this.completeOnAsyncReturn,
       this.completerFuture,
       this.coreLibrary,
       this.coreTypes,
       this.futureClass,
-      this.futureMicrotaskConstructor,
       this.futureOrClass,
       this.iterableClass,
-      this.iteratorClass,
-      this.printProcedure,
       this.streamClass,
       this.streamIteratorCancel,
       this.streamIteratorClass,
@@ -1241,22 +1195,16 @@
         coreTypes.asyncStarMoveNextHelper,
         coreTypes.asyncThenWrapperHelperProcedure,
         coreTypes.awaitHelperProcedure,
-        coreTypes.completerClass,
         coreTypes.asyncAwaitCompleterClass,
-        coreTypes.completerComplete,
         coreTypes.completerCompleteError,
-        coreTypes.completerSyncConstructor,
         coreTypes.asyncAwaitCompleterConstructor,
         coreTypes.completeOnAsyncReturn,
         coreTypes.completerFuture,
         coreTypes.coreLibrary,
         coreTypes,
         coreTypes.futureClass,
-        coreTypes.futureMicrotaskConstructor,
         coreTypes.futureOrClass,
         coreTypes.iterableClass,
-        coreTypes.iteratorClass,
-        coreTypes.printProcedure,
         coreTypes.streamClass,
         coreTypes.streamIteratorCancel,
         coreTypes.streamIteratorClass,
diff --git a/pkg/kernel/lib/transformations/treeshaker.dart b/pkg/kernel/lib/transformations/treeshaker.dart
index 4ab0c38..07218c9 100644
--- a/pkg/kernel/lib/transformations/treeshaker.dart
+++ b/pkg/kernel/lib/transformations/treeshaker.dart
@@ -663,14 +663,15 @@
   final TreeShaker shaker;
   final CoreTypes coreTypes;
   final TypeEnvironment types;
-  final bool strongMode;
+  final bool legacyMode;
   List<Node> summary;
 
   _TreeShakerVisitor(TreeShaker shaker)
       : this.shaker = shaker,
         this.coreTypes = shaker.coreTypes,
-        this.strongMode = !shaker.legacyMode,
-        this.types = new TypeEnvironment(shaker.coreTypes, shaker.hierarchy) {
+        this.legacyMode = shaker.legacyMode,
+        this.types = new TypeEnvironment(shaker.coreTypes, shaker.hierarchy,
+            legacyMode: true) {
     types.errorHandler = handleError;
   }
 
@@ -795,7 +796,7 @@
   }
 
   Class getStaticType(Expression node) {
-    if (!strongMode) return coreTypes.objectClass;
+    if (legacyMode) return coreTypes.objectClass;
     return getKnownSupertype(node.getStaticType(types));
   }
 
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart
index 850b2dd..8fa6ea8 100644
--- a/pkg/kernel/lib/type_checker.dart
+++ b/pkg/kernel/lib/type_checker.dart
@@ -9,7 +9,7 @@
 import 'type_algebra.dart';
 import 'type_environment.dart';
 
-/// Performs strong-mode type checking on the kernel IR.
+/// Performs type checking on the kernel IR.
 ///
 /// A concrete subclass of [TypeChecker] must implement [checkAssignable] and
 /// [fail] in order to deal with subtyping requirements and error handling.
@@ -22,7 +22,7 @@
   TypeChecker(this.coreTypes, this.hierarchy,
       {bool legacyMode: false, this.ignoreSdk: true})
       : environment =
-            new TypeEnvironment(coreTypes, hierarchy, strongMode: !legacyMode);
+            new TypeEnvironment(coreTypes, hierarchy, legacyMode: legacyMode);
 
   void checkComponent(Component component) {
     for (var library in component.libraries) {
@@ -515,6 +515,15 @@
   }
 
   @override
+  DartType visitSetLiteral(SetLiteral node) {
+    for (int i = 0; i < node.expressions.length; ++i) {
+      node.expressions[i] =
+          checkAndDowncastExpression(node.expressions[i], node.typeArgument);
+    }
+    return environment.literalSetType(node.typeArgument);
+  }
+
+  @override
   DartType visitLogicalExpression(LogicalExpression node) {
     node.left = checkAndDowncastExpression(node.left, environment.boolType);
     node.right = checkAndDowncastExpression(node.right, environment.boolType);
diff --git a/pkg/kernel/lib/type_environment.dart b/pkg/kernel/lib/type_environment.dart
index 5b4e5ba..d0603b8 100644
--- a/pkg/kernel/lib/type_environment.dart
+++ b/pkg/kernel/lib/type_environment.dart
@@ -13,7 +13,10 @@
 class TypeEnvironment extends SubtypeTester {
   final CoreTypes coreTypes;
   final ClassHierarchy hierarchy;
-  final bool strongMode;
+
+  @override
+  final bool legacyMode;
+
   InterfaceType thisType;
 
   DartType returnType;
@@ -24,7 +27,7 @@
   /// be tolerated.  See [typeError].
   ErrorHandler errorHandler;
 
-  TypeEnvironment(this.coreTypes, this.hierarchy, {this.strongMode: false});
+  TypeEnvironment(this.coreTypes, this.hierarchy, {this.legacyMode: false});
 
   InterfaceType get objectType => coreTypes.objectClass.rawType;
   InterfaceType get nullType => coreTypes.nullClass.rawType;
@@ -45,6 +48,10 @@
     return new InterfaceType(coreTypes.listClass, <DartType>[elementType]);
   }
 
+  InterfaceType literalSetType(DartType elementType) {
+    return new InterfaceType(coreTypes.setClass, <DartType>[elementType]);
+  }
+
   InterfaceType literalMapType(DartType key, DartType value) {
     return new InterfaceType(coreTypes.mapClass, <DartType>[key, value]);
   }
@@ -163,12 +170,12 @@
   ClassHierarchy get hierarchy;
   Class get futureOrClass;
   InterfaceType futureType(DartType type);
-  bool get strongMode;
+  bool get legacyMode;
 
   /// Determines if the given type is at the bottom of the type hierarchy.  May
   /// be overridden in subclasses.
   bool isBottom(DartType type) =>
-      type is BottomType || (strongMode && type == nullType);
+      type is BottomType || (!legacyMode && type == nullType);
 
   /// Determines if the given type is at the top of the type hierarchy.  May be
   /// overridden in subclasses.
@@ -184,7 +191,7 @@
     if (isTop(supertype)) return true;
 
     // Handle FutureOr<T> union type.
-    if (strongMode &&
+    if (!legacyMode &&
         subtype is InterfaceType &&
         identical(subtype.classNode, futureOrClass)) {
       var subtypeArg = subtype.typeArguments[0];
@@ -202,7 +209,7 @@
           isSubtypeOf(subtypeArg, supertype);
     }
 
-    if (strongMode &&
+    if (!legacyMode &&
         supertype is InterfaceType &&
         identical(supertype.classNode, futureOrClass)) {
       // given t2 is Future<A> | A, then:
diff --git a/pkg/kernel/lib/verifier.dart b/pkg/kernel/lib/verifier.dart
index 3d8e362..85a8177 100644
--- a/pkg/kernel/lib/verifier.dart
+++ b/pkg/kernel/lib/verifier.dart
@@ -86,7 +86,8 @@
           node,
           "Incorrect parent pointer on ${node.runtimeType}:"
           " expected '${currentParent.runtimeType}',"
-          " but found: '${node.parent.runtimeType}'.");
+          " but found: '${node.parent.runtimeType}'.",
+          context: currentParent);
     }
     var oldParent = currentParent;
     currentParent = node;
diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart
index a93186e..177a883 100644
--- a/pkg/kernel/lib/visitor.dart
+++ b/pkg/kernel/lib/visitor.dart
@@ -46,6 +46,7 @@
   R visitRethrow(Rethrow node) => defaultExpression(node);
   R visitThrow(Throw node) => defaultExpression(node);
   R visitListLiteral(ListLiteral node) => defaultExpression(node);
+  R visitSetLiteral(SetLiteral node) => defaultExpression(node);
   R visitMapLiteral(MapLiteral node) => defaultExpression(node);
   R visitAwaitExpression(AwaitExpression node) => defaultExpression(node);
   R visitFunctionExpression(FunctionExpression node) => defaultExpression(node);
@@ -167,6 +168,7 @@
   R visitRethrow(Rethrow node) => defaultExpression(node);
   R visitThrow(Throw node) => defaultExpression(node);
   R visitListLiteral(ListLiteral node) => defaultExpression(node);
+  R visitSetLiteral(SetLiteral node) => defaultExpression(node);
   R visitMapLiteral(MapLiteral node) => defaultExpression(node);
   R visitAwaitExpression(AwaitExpression node) => defaultExpression(node);
   R visitFunctionExpression(FunctionExpression node) => defaultExpression(node);
@@ -249,6 +251,8 @@
 }
 
 class DartTypeVisitor<R> {
+  const DartTypeVisitor();
+
   R defaultDartType(DartType node) => null;
 
   R visitInvalidType(InvalidType node) => defaultDartType(node);
@@ -494,6 +498,7 @@
   R visitRethrow(Rethrow node, T arg) => defaultExpression(node, arg);
   R visitThrow(Throw node, T arg) => defaultExpression(node, arg);
   R visitListLiteral(ListLiteral node, T arg) => defaultExpression(node, arg);
+  R visitSetLiteral(SetLiteral node, T arg) => defaultExpression(node, arg);
   R visitMapLiteral(MapLiteral node, T arg) => defaultExpression(node, arg);
   R visitAwaitExpression(AwaitExpression node, T arg) =>
       defaultExpression(node, arg);
diff --git a/pkg/kernel/lib/vm/constants_native_effects.dart b/pkg/kernel/lib/vm/constants_native_effects.dart
index 167d82b..e3611d2 100644
--- a/pkg/kernel/lib/vm/constants_native_effects.dart
+++ b/pkg/kernel/lib/vm/constants_native_effects.dart
@@ -137,8 +137,8 @@
       kvListPairs[2 * i] = entry.key;
       kvListPairs[2 * i + 1] = entry.value;
     }
-    // Strong mode is a bit fishy here, since we merge the key and the value
-    // type by putting both into the same list!
+    // This is a bit fishy, since we merge the key and the value type by
+    // putting both into the same list.
     final kvListConstant = new ListConstant(const DynamicType(), kvListPairs);
     assert(immutableMapClass.fields.length == 1);
     final Field kvPairListField = immutableMapClass.fields[0];
diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml
index 0be2276..f9ee3da 100644
--- a/pkg/kernel/pubspec.yaml
+++ b/pkg/kernel/pubspec.yaml
@@ -1,7 +1,7 @@
 name: kernel
 # Currently, kernel API is not stable and users should
 # not depend on semver semantics when depending on this package.
-version: 0.3.6+8
+version: 0.3.8
 author: Dart Team <misc@dartlang.org>
 description: Dart IR (Intermediate Representation)
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/kernel
@@ -11,7 +11,9 @@
   path: ^1.3.9
   args: '>=0.13.4 <2.0.0'
 dev_dependencies:
-  front_end: 0.1.6+8
+  expect:
+    path: ../expect
+  front_end: 0.1.8
   test: ^1.3.4
   stack_trace: ^1.6.6
   test_reflective_loader: ^0.1.0
diff --git a/pkg/kernel/runtime/reify/types.dart b/pkg/kernel/runtime/reify/types.dart
index 96ffcd8..f119342 100644
--- a/pkg/kernel/runtime/reify/types.dart
+++ b/pkg/kernel/runtime/reify/types.dart
@@ -633,7 +633,7 @@
       }
     }
 
-    if (!other.hasNamedParameters) true;
+    if (!other.hasNamedParameters) return true;
 
     int j = positionalParameters;
     for (int i = otherPositionalParameters;
diff --git a/pkg/kernel/test/class_hierarchy_test.dart b/pkg/kernel/test/class_hierarchy_test.dart
index 10b2ba2..28b6038 100644
--- a/pkg/kernel/test/class_hierarchy_test.dart
+++ b/pkg/kernel/test/class_hierarchy_test.dart
@@ -650,7 +650,7 @@
   }
 
   /// Copy of the tests/language/least_upper_bound_expansive_test.dart test.
-  void test_getClassicLeastUpperBound_expansive() {
+  void test_getLegacyLeastUpperBound_expansive() {
     var int = coreTypes.intClass.rawType;
     var string = coreTypes.stringClass.rawType;
 
@@ -705,7 +705,7 @@
     //     {N<C1<String>>, Object} for N<C1<String>> and
     // Object is the most specific type in the intersection of the supertypes.
     expect(
-        hierarchy.getClassicLeastUpperBound(
+        hierarchy.getLegacyLeastUpperBound(
             new InterfaceType(C1, [int]),
             new InterfaceType(N, [
               new InterfaceType(C1, [string])
@@ -718,7 +718,7 @@
     //     {N<C2<String>>, Object} for N<C2<String>> and
     // Object is the most specific type in the intersection of the supertypes.
     expect(
-        hierarchy.getClassicLeastUpperBound(
+        hierarchy.getLegacyLeastUpperBound(
             new InterfaceType(C2, [int]),
             new InterfaceType(N, [
               new InterfaceType(C2, [string])
@@ -726,7 +726,7 @@
         objectClass.thisType);
   }
 
-  void test_getClassicLeastUpperBound_generic() {
+  void test_getLegacyLeastUpperBound_generic() {
     var int = coreTypes.intClass.rawType;
     var double = coreTypes.doubleClass.rawType;
     var bool = coreTypes.boolClass.rawType;
@@ -763,26 +763,26 @@
 ''');
 
     expect(
-        hierarchy.getClassicLeastUpperBound(new InterfaceType(d, [int, double]),
+        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
             new InterfaceType(d, [int, double])),
         new InterfaceType(d, [int, double]));
     expect(
-        hierarchy.getClassicLeastUpperBound(new InterfaceType(d, [int, double]),
+        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
             new InterfaceType(d, [int, bool])),
         new InterfaceType(b, [int]));
     expect(
-        hierarchy.getClassicLeastUpperBound(new InterfaceType(d, [int, double]),
+        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
             new InterfaceType(d, [bool, double])),
         new InterfaceType(c, [double]));
     expect(
-        hierarchy.getClassicLeastUpperBound(new InterfaceType(d, [int, double]),
+        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
             new InterfaceType(d, [bool, int])),
         a.rawType);
-    expect(hierarchy.getClassicLeastUpperBound(e.rawType, f.rawType),
+    expect(hierarchy.getLegacyLeastUpperBound(e.rawType, f.rawType),
         new InterfaceType(b, [int]));
   }
 
-  void test_getClassicLeastUpperBound_nonGeneric() {
+  void test_getLegacyLeastUpperBound_nonGeneric() {
     var a = addImplementsClass('A', []);
     var b = addImplementsClass('B', []);
     var c = addImplementsClass('C', [a]);
@@ -805,22 +805,17 @@
 class I implements self::C, self::D, self::E {}
 ''');
 
-    expect(hierarchy.getClassicLeastUpperBound(a.rawType, b.rawType),
+    expect(hierarchy.getLegacyLeastUpperBound(a.rawType, b.rawType),
         objectClass.rawType);
-    expect(hierarchy.getClassicLeastUpperBound(a.rawType, objectClass.rawType),
+    expect(hierarchy.getLegacyLeastUpperBound(a.rawType, objectClass.rawType),
         objectClass.rawType);
-    expect(hierarchy.getClassicLeastUpperBound(objectClass.rawType, b.rawType),
+    expect(hierarchy.getLegacyLeastUpperBound(objectClass.rawType, b.rawType),
         objectClass.rawType);
-    expect(
-        hierarchy.getClassicLeastUpperBound(c.rawType, d.rawType), a.rawType);
-    expect(
-        hierarchy.getClassicLeastUpperBound(c.rawType, a.rawType), a.rawType);
-    expect(
-        hierarchy.getClassicLeastUpperBound(a.rawType, d.rawType), a.rawType);
-    expect(
-        hierarchy.getClassicLeastUpperBound(f.rawType, g.rawType), a.rawType);
-    expect(
-        hierarchy.getClassicLeastUpperBound(h.rawType, i.rawType), a.rawType);
+    expect(hierarchy.getLegacyLeastUpperBound(c.rawType, d.rawType), a.rawType);
+    expect(hierarchy.getLegacyLeastUpperBound(c.rawType, a.rawType), a.rawType);
+    expect(hierarchy.getLegacyLeastUpperBound(a.rawType, d.rawType), a.rawType);
+    expect(hierarchy.getLegacyLeastUpperBound(f.rawType, g.rawType), a.rawType);
+    expect(hierarchy.getLegacyLeastUpperBound(h.rawType, i.rawType), a.rawType);
   }
 
   void test_getDeclaredMembers() {
diff --git a/pkg/kernel/test/metadata_test.dart b/pkg/kernel/test/metadata_test.dart
index e8f3e1c..d544535 100644
--- a/pkg/kernel/test/metadata_test.dart
+++ b/pkg/kernel/test/metadata_test.dart
@@ -61,7 +61,7 @@
     expect(metadata, equals(mapping[node]));
     sink.writeByteList(utf8.encode(metadata.string));
     sink.writeStringReference(metadata.string);
-    sink.writeCanonicalNameReference(metadata.member?.canonicalName);
+    sink.writeNullAllowedCanonicalNameReference(metadata.member?.canonicalName);
     sink.writeDartType(metadata.type);
   }
 
diff --git a/pkg/kernel/test/text_serializer_test.dart b/pkg/kernel/test/text_serializer_test.dart
new file mode 100644
index 0000000..f19b5b8
--- /dev/null
+++ b/pkg/kernel/test/text_serializer_test.dart
@@ -0,0 +1,87 @@
+// 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 kernel.text_serializer_test;
+
+import 'package:kernel/ast.dart';
+import 'package:kernel/text/text_reader.dart';
+import 'package:kernel/text/text_serializer.dart';
+
+void main() {
+  initializeSerializers();
+  test();
+}
+
+// Wrappers for testing.
+Expression readExpression(String input) {
+  TextIterator stream = new TextIterator(input, 0);
+  stream.moveNext();
+  Expression result = expressionSerializer.readFrom(stream);
+  if (stream.moveNext()) {
+    throw StateError("extra cruft in basic literal");
+  }
+  return result;
+}
+
+String writeExpression(Expression expression) {
+  StringBuffer buffer = new StringBuffer();
+  expressionSerializer.writeTo(buffer, expression);
+  return buffer.toString();
+}
+
+void test() {
+  List<String> failures = [];
+  List<String> tests = [
+    "(let (var \"x\" (dynamic) (int 0) ()) (null))",
+    "(let (var \"x\" (dynamic) _ ()) (null))",
+    "(let (const \"x\" (dynamic) (int 0) ()) (null))",
+    "(let (const \"x\" (dynamic) _ ()) (null))",
+    "(let (final \"x\" (dynamic) (int 0) ()) (null))",
+    "(let (final \"x\" (dynamic) _ ()) (null))",
+    "(string \"Hello, 'string'!\")",
+    "(string \"Hello, \\\"string\\\"!\")",
+    "(string \"Yeah nah yeah, here is\\nthis really long string haiku\\n"
+        "blowing in the wind\\n\")",
+    "(int 42)",
+    "(int 0)",
+    "(int -1001)",
+    "(double 3.14159)",
+    "(bool true)",
+    "(bool false)",
+    "(null)",
+    "(invalid \"You can't touch this\")",
+    "(not (bool true))",
+    "(&& (bool true) (bool false))",
+    "(|| (&& (bool true) (not (bool true))) (bool true))",
+    "(concat ((string \"The opposite of \") (int 3) "
+        "(string \" is \") (int 7)))",
+    "(symbol \"unquote-splicing\")",
+    "(this)",
+    "(rethrow)",
+    "(throw (string \"error\"))",
+    "(await (null))",
+    "(cond (bool true) (dynamic) (int 0) (int 1))",
+    "(is (bool true) (invalid))",
+    "(as (bool true) (void))",
+    "(type (bottom))",
+    "(list (dynamic) ((null) (null) (null)))",
+    "(const-list (dynamic) ((int 0) (int 1) (int 2)))",
+    "(set (dynamic) ((bool true) (bool false) (int 0)))",
+    "(const-set (dynamic) ((int 0) (int 1) (int 2)))",
+    "(map (dynamic) (void) ((int 0) (null) (int 1) (null) (int 2) (null)))",
+    "(const-map (dynamic) (void) ((int 0) (null) (int 1) (null) "
+        "(int 2) (null)))",
+  ];
+  for (var test in tests) {
+    var literal = readExpression(test);
+    var output = writeExpression(literal);
+    if (output != test) {
+      failures.add('* input "${test}" gave output "${output}"');
+    }
+  }
+  if (failures.isNotEmpty) {
+    print('Round trip failures:');
+    failures.forEach(print);
+    throw StateError('Round trip failures');
+  }
+}
diff --git a/pkg/kernel/test/treeshaker_bench.dart b/pkg/kernel/test/treeshaker_bench.dart
index c2a6de9..a34ac9e 100644
--- a/pkg/kernel/test/treeshaker_bench.dart
+++ b/pkg/kernel/test/treeshaker_bench.dart
@@ -20,8 +20,8 @@
       help: 'Rebuild class hierarchy for each tree shaking', negatable: false)
   ..addFlag('diagnose',
       abbr: 'd', help: 'Print internal diagnostics', negatable: false)
-  ..addFlag('strong',
-      help: 'Run the tree shaker in strong mode', negatable: false);
+  ..addFlag('legacy-mode',
+      help: 'Run the tree shaker in legacy mode', negatable: false);
 
 String usage = '''
 Usage: treeshaker_bench [options] FILE.dill
@@ -43,7 +43,7 @@
     exit(1);
   }
   String filename = options.rest.single;
-  bool strongMode = options['strong'];
+  bool legacyMode = options['legacy-mode'];
 
   Component component = loadComponentFromBinary(filename);
 
@@ -59,7 +59,7 @@
   ClassHierarchy sharedClassHierarchy = buildClassHierarchy();
   int coldHierarchyTime = watch.elapsedMicroseconds;
   var shaker = new TreeShaker(coreTypes, sharedClassHierarchy, component,
-      legacyMode: !strongMode);
+      legacyMode: legacyMode);
   if (options['diagnose']) {
     print(shaker.getDiagnosticString());
   }
@@ -80,7 +80,7 @@
     watch.reset();
     var hierarchy = getClassHierarchy();
     hotHierarchyTime += watch.elapsedMicroseconds;
-    new TreeShaker(coreTypes, hierarchy, component, legacyMode: !strongMode);
+    new TreeShaker(coreTypes, hierarchy, component, legacyMode: legacyMode);
     hotTreeShakingTime += watch.elapsedMicroseconds;
   }
   hotHierarchyTime ~/= numberOfTrials;
diff --git a/pkg/kernel/test/treeshaker_dump.dart b/pkg/kernel/test/treeshaker_dump.dart
index 2ed4aa8..1073c6d 100644
--- a/pkg/kernel/test/treeshaker_dump.dart
+++ b/pkg/kernel/test/treeshaker_dump.dart
@@ -27,7 +27,7 @@
   ..addOption('output',
       help: 'The --diff files are written to the given directory instead of '
           'the working directory')
-  ..addFlag('strong', help: 'Run the tree shaker in strong mode');
+  ..addFlag('legacy-mode', help: 'Run the tree shaker in legacy mode');
 
 String usage = '''
 Usage: treeshaker_dump [options] FILE.dill
@@ -63,13 +63,13 @@
     exit(1);
   }
 
-  bool strong = options['strong'];
+  bool legacyMode = options['legacy-mode'];
 
   Component component = loadComponentFromBinary(filename);
   CoreTypes coreTypes = new CoreTypes(component);
   ClassHierarchy hierarchy = new ClassHierarchy(component);
   TreeShaker shaker =
-      new TreeShaker(coreTypes, hierarchy, component, legacyMode: !strong);
+      new TreeShaker(coreTypes, hierarchy, component, legacyMode: legacyMode);
   int totalClasses = 0;
   int totalInstantiationCandidates = 0;
   int totalMembers = 0;
@@ -132,7 +132,7 @@
     StringBuffer before = new StringBuffer();
     new Printer(before, syntheticNames: names).writeComponentFile(component);
     new File(beforeFile).writeAsStringSync('$before');
-    new TreeShaker(coreTypes, hierarchy, component, legacyMode: !strong)
+    new TreeShaker(coreTypes, hierarchy, component, legacyMode: legacyMode)
         .transform(component);
     StringBuffer after = new StringBuffer();
     new Printer(after, syntheticNames: names).writeComponentFile(component);
diff --git a/pkg/kernel/test/treeshaker_membench.dart b/pkg/kernel/test/treeshaker_membench.dart
index 537442c..937637d 100644
--- a/pkg/kernel/test/treeshaker_membench.dart
+++ b/pkg/kernel/test/treeshaker_membench.dart
@@ -14,7 +14,7 @@
 ArgParser argParser = new ArgParser(allowTrailingOptions: true)
   ..addOption('count',
       abbr: 'c', help: 'Build N copies of the tree shaker', defaultsTo: '100')
-  ..addFlag('strong', help: 'Run the tree shaker in strong mode');
+  ..addFlag('legacy-mode', help: 'Run the tree shaker in legacy mode');
 
 String usage = """
 Usage: treeshaker_membench [options] FILE.dill
@@ -36,7 +36,7 @@
     exit(1);
   }
   String filename = options.rest.single;
-  bool strongMode = options['strong'];
+  bool legacyMode = options['legacy-mode'];
 
   Component component = loadComponentFromBinary(filename);
   ClassHierarchy hierarchy = new ClassHierarchy(component);
@@ -46,7 +46,7 @@
 
   TreeShaker buildTreeShaker() {
     return new TreeShaker(coreTypes, hierarchy, component,
-        legacyMode: !strongMode);
+        legacyMode: legacyMode);
   }
 
   List<TreeShaker> keepAlive = <TreeShaker>[];
diff --git a/pkg/kernel/test/type_subtype_test.dart b/pkg/kernel/test/type_subtype_test.dart
index e9abd59..d97c690 100644
--- a/pkg/kernel/test/type_subtype_test.dart
+++ b/pkg/kernel/test/type_subtype_test.dart
@@ -22,140 +22,151 @@
 };
 
 List<TestCase> testCases = <TestCase>[
-  subtype('int', 'num'),
-  subtype('int', 'Comparable<num>'),
-  subtype('int', 'Comparable<Object>'),
-  subtype('int', 'Object'),
-  subtype('double', 'num'),
+  subtype('int', 'num', legacyMode: true),
+  subtype('int', 'Comparable<num>', legacyMode: true),
+  subtype('int', 'Comparable<Object>', legacyMode: true),
+  subtype('int', 'Object', legacyMode: true),
+  subtype('double', 'num', legacyMode: true),
 
-  notSubtype('int', 'double'),
-  notSubtype('int', 'Comparable<int>'),
-  notSubtype('int', 'Iterable<int>'),
-  notSubtype('Comparable<int>', 'Iterable<int>'),
+  notSubtype('int', 'double', legacyMode: true),
+  notSubtype('int', 'Comparable<int>', legacyMode: true),
+  notSubtype('int', 'Iterable<int>', legacyMode: true),
+  notSubtype('Comparable<int>', 'Iterable<int>', legacyMode: true),
 
-  subtype('List<int>', 'List<int>'),
-  subtype('List<int>', 'Iterable<int>'),
-  subtype('List<int>', 'List<num>'),
-  subtype('List<int>', 'Iterable<num>'),
-  subtype('List<int>', 'List<Object>'),
-  subtype('List<int>', 'Iterable<Object>'),
-  subtype('List<int>', 'Object'),
-  subtype('List<int>', 'List<Comparable<Object>>'),
-  subtype('List<int>', 'List<Comparable<num>>'),
-  subtype('List<int>', 'List<Comparable<Comparable<num>>>'),
+  subtype('List<int>', 'List<int>', legacyMode: true),
+  subtype('List<int>', 'Iterable<int>', legacyMode: true),
+  subtype('List<int>', 'List<num>', legacyMode: true),
+  subtype('List<int>', 'Iterable<num>', legacyMode: true),
+  subtype('List<int>', 'List<Object>', legacyMode: true),
+  subtype('List<int>', 'Iterable<Object>', legacyMode: true),
+  subtype('List<int>', 'Object', legacyMode: true),
+  subtype('List<int>', 'List<Comparable<Object>>', legacyMode: true),
+  subtype('List<int>', 'List<Comparable<num>>', legacyMode: true),
+  subtype('List<int>', 'List<Comparable<Comparable<num>>>', legacyMode: true),
 
-  notSubtype('List<int>', 'List<double>'),
-  notSubtype('List<int>', 'Iterable<double>'),
-  notSubtype('List<int>', 'Comparable<int>'),
-  notSubtype('List<int>', 'List<Comparable<int>>'),
-  notSubtype('List<int>', 'List<Comparable<Comparable<int>>>'),
+  notSubtype('List<int>', 'List<double>', legacyMode: true),
+  notSubtype('List<int>', 'Iterable<double>', legacyMode: true),
+  notSubtype('List<int>', 'Comparable<int>', legacyMode: true),
+  notSubtype('List<int>', 'List<Comparable<int>>', legacyMode: true),
+  notSubtype('List<int>', 'List<Comparable<Comparable<int>>>',
+      legacyMode: true),
 
-  subtype('(num) => num', '(int) => num'),
-  subtype('(num) => int', '(num) => num'),
-  subtype('(num) => int', '(int) => num'),
-  notSubtype('(int) => int', '(num) => num'),
+  subtype('(num) => num', '(int) => num', legacyMode: true),
+  subtype('(num) => int', '(num) => num', legacyMode: true),
+  subtype('(num) => int', '(int) => num', legacyMode: true),
+  notSubtype('(int) => int', '(num) => num', legacyMode: true),
 
-  subtype('(num) => (num) => num', '(num) => (int) => num'),
-  notSubtype('(num) => (int) => int', '(num) => (num) => num'),
+  subtype('(num) => (num) => num', '(num) => (int) => num', legacyMode: true),
+  notSubtype('(num) => (int) => int', '(num) => (num) => num',
+      legacyMode: true),
 
-  subtype('(x:num) => num', '(x:int) => num'), // named parameters
-  subtype('(num,x:num) => num', '(int,x:int) => num'),
-  subtype('(x:num) => int', '(x:num) => num'),
-  notSubtype('(x:int) => int', '(x:num) => num'),
+  subtype('(x:num) => num', '(x:int) => num',
+      legacyMode: true), // named parameters
+  subtype('(num,x:num) => num', '(int,x:int) => num', legacyMode: true),
+  subtype('(x:num) => int', '(x:num) => num', legacyMode: true),
+  notSubtype('(x:int) => int', '(x:num) => num', legacyMode: true),
 
-  subtype('<E>(E) => int', '<E>(E) => num'), // type parameters
-  subtype('<E>(num) => E', '<E>(int) => E'),
-  subtype('<E>(E,num) => E', '<E>(E,int) => E'),
-  notSubtype('<E>(E,num) => E', '<E>(E,E) => E'),
+  subtype('<E>(E) => int', '<E>(E) => num',
+      legacyMode: true), // type parameters
+  subtype('<E>(num) => E', '<E>(int) => E', legacyMode: true),
+  subtype('<E>(E,num) => E', '<E>(E,int) => E', legacyMode: true),
+  notSubtype('<E>(E,num) => E', '<E>(E,E) => E', legacyMode: true),
 
-  subtype('<E>(E) => (E) => E', '<F>(F) => (F) => F'),
-  subtype('<E>(E, (int,E) => E) => E', '<E>(E, (int,E) => E) => E'),
-  subtype('<E>(E, (int,E) => E) => E', '<E>(E, (num,E) => E) => E'),
-  notSubtype('<E,F>(E) => (F) => E', '<E>(E) => <F>(F) => E'),
-  notSubtype('<E,F>(E) => (F) => E', '<F,E>(E) => (F) => E'),
+  subtype('<E>(E) => (E) => E', '<F>(F) => (F) => F', legacyMode: true),
+  subtype('<E>(E, (int,E) => E) => E', '<E>(E, (int,E) => E) => E',
+      legacyMode: true),
+  subtype('<E>(E, (int,E) => E) => E', '<E>(E, (num,E) => E) => E',
+      legacyMode: true),
+  notSubtype('<E,F>(E) => (F) => E', '<E>(E) => <F>(F) => E', legacyMode: true),
+  notSubtype('<E,F>(E) => (F) => E', '<F,E>(E) => (F) => E', legacyMode: true),
 
-  notSubtype('<E>(E,num) => E', '<E:num>(E,E) => E'),
-  notSubtype('<E:num>(E) => int', '<E:int>(E) => int'),
-  notSubtype('<E:num>(E) => E', '<E:int>(E) => E'),
-  notSubtype('<E:num>(int) => E', '<E:int>(int) => E'),
-  subtype('<E:num>(E) => E', '<F:num>(F) => num'),
-  subtype('<E:int>(E) => E', '<F:int>(F) => num'),
-  subtype('<E:int>(E) => E', '<F:int>(F) => int'),
-  notSubtype('<E>(int) => int', '(int) => int'),
-  notSubtype('<E,F>(int) => int', '<E>(int) => int'),
+  notSubtype('<E>(E,num) => E', '<E:num>(E,E) => E', legacyMode: true),
+  notSubtype('<E:num>(E) => int', '<E:int>(E) => int', legacyMode: true),
+  notSubtype('<E:num>(E) => E', '<E:int>(E) => E', legacyMode: true),
+  notSubtype('<E:num>(int) => E', '<E:int>(int) => E', legacyMode: true),
+  subtype('<E:num>(E) => E', '<F:num>(F) => num', legacyMode: true),
+  subtype('<E:int>(E) => E', '<F:int>(F) => num', legacyMode: true),
+  subtype('<E:int>(E) => E', '<F:int>(F) => int', legacyMode: true),
+  notSubtype('<E>(int) => int', '(int) => int', legacyMode: true),
+  notSubtype('<E,F>(int) => int', '<E>(int) => int', legacyMode: true),
 
-  subtype('<E:List<E>>(E) => E', '<F:List<F>>(F) => F'),
-  notSubtype('<E:Iterable<E>>(E) => E', '<F:List<F>>(F) => F'),
-  notSubtype('<E>(E,List<Object>) => E', '<F:List<F>>(F,F) => F'),
-  notSubtype('<E>(E,List<Object>) => List<E>', '<F:List<F>>(F,F) => F'),
-  notSubtype('<E>(E,List<Object>) => int', '<F:List<F>>(F,F) => F'),
-  notSubtype('<E>(E,List<Object>) => E', '<F:List<F>>(F,F) => void'),
+  subtype('<E:List<E>>(E) => E', '<F:List<F>>(F) => F', legacyMode: true),
+  notSubtype('<E:Iterable<E>>(E) => E', '<F:List<F>>(F) => F',
+      legacyMode: true),
+  notSubtype('<E>(E,List<Object>) => E', '<F:List<F>>(F,F) => F',
+      legacyMode: true),
+  notSubtype('<E>(E,List<Object>) => List<E>', '<F:List<F>>(F,F) => F',
+      legacyMode: true),
+  notSubtype('<E>(E,List<Object>) => int', '<F:List<F>>(F,F) => F',
+      legacyMode: true),
+  notSubtype('<E>(E,List<Object>) => E', '<F:List<F>>(F,F) => void',
+      legacyMode: true),
 
-  subtype('int', 'FutureOr<int>', strongMode: true),
-  subtype('int', 'FutureOr<num>', strongMode: true),
-  subtype('Future<int>', 'FutureOr<int>', strongMode: true),
-  subtype('Future<int>', 'FutureOr<num>', strongMode: true),
-  subtype('Future<int>', 'FutureOr<Object>', strongMode: true),
-  subtype('FutureOr<int>', 'FutureOr<int>', strongMode: true),
-  subtype('FutureOr<int>', 'FutureOr<num>', strongMode: true),
-  subtype('FutureOr<int>', 'Object', strongMode: true),
-  notSubtype('int', 'FutureOr<double>', strongMode: true),
-  notSubtype('FutureOr<double>', 'int', strongMode: true),
-  notSubtype('FutureOr<int>', 'Future<num>', strongMode: true),
-  notSubtype('FutureOr<int>', 'num', strongMode: true),
+  subtype('int', 'FutureOr<int>'),
+  subtype('int', 'FutureOr<num>'),
+  subtype('Future<int>', 'FutureOr<int>'),
+  subtype('Future<int>', 'FutureOr<num>'),
+  subtype('Future<int>', 'FutureOr<Object>'),
+  subtype('FutureOr<int>', 'FutureOr<int>'),
+  subtype('FutureOr<int>', 'FutureOr<num>'),
+  subtype('FutureOr<int>', 'Object'),
+  notSubtype('int', 'FutureOr<double>'),
+  notSubtype('FutureOr<double>', 'int'),
+  notSubtype('FutureOr<int>', 'Future<num>'),
+  notSubtype('FutureOr<int>', 'num'),
 
   // T & B <: T & A if B <: A
-  subtype('T & int', 'T & int'),
-  subtype('T & int', 'T & num'),
-  subtype('T & num', 'T & num'),
-  notSubtype('T & num', 'T & int'),
+  subtype('T & int', 'T & int', legacyMode: true),
+  subtype('T & int', 'T & num', legacyMode: true),
+  subtype('T & num', 'T & num', legacyMode: true),
+  notSubtype('T & num', 'T & int', legacyMode: true),
 
   // T & B <: T extends A if B <: A
   // (Trivially satisfied since promoted bounds are always a subtype of the
   // original bound)
-  subtype('T & int', 'T', typeParameters: 'T: int'),
-  subtype('T & int', 'T', typeParameters: 'T: num'),
-  subtype('T & num', 'T', typeParameters: 'T: num'),
+  subtype('T & int', 'T', legacyMode: true, typeParameters: 'T: int'),
+  subtype('T & int', 'T', legacyMode: true, typeParameters: 'T: num'),
+  subtype('T & num', 'T', legacyMode: true, typeParameters: 'T: num'),
 
   // T extends B <: T & A if B <: A
-  subtype('T', 'T & int', typeParameters: 'T: int'),
-  subtype('T', 'T & num', typeParameters: 'T: int'),
-  subtype('T', 'T & num', typeParameters: 'T: num'),
-  notSubtype('T', 'T & int', typeParameters: 'T: num'),
+  subtype('T', 'T & int', legacyMode: true, typeParameters: 'T: int'),
+  subtype('T', 'T & num', legacyMode: true, typeParameters: 'T: int'),
+  subtype('T', 'T & num', legacyMode: true, typeParameters: 'T: num'),
+  notSubtype('T', 'T & int', legacyMode: true, typeParameters: 'T: num'),
 
   // T extends A <: T extends A
-  subtype('T', 'T', typeParameters: 'T: num'),
+  subtype('T', 'T', legacyMode: true, typeParameters: 'T: num'),
 
   // S & B <: A if B <: A, A is not S (or a promotion thereof)
-  subtype('S & int', 'int'),
-  subtype('S & int', 'num'),
-  subtype('S & num', 'num'),
-  notSubtype('S & num', 'int'),
-  notSubtype('S & num', 'T'),
-  notSubtype('S & num', 'T & num'),
+  subtype('S & int', 'int', legacyMode: true),
+  subtype('S & int', 'num', legacyMode: true),
+  subtype('S & num', 'num', legacyMode: true),
+  notSubtype('S & num', 'int', legacyMode: true),
+  notSubtype('S & num', 'T', legacyMode: true),
+  notSubtype('S & num', 'T & num', legacyMode: true),
 
   // S extends B <: A if B <: A, A is not S (or a promotion thereof)
-  subtype('S', 'int', typeParameters: 'S: int'),
-  subtype('S', 'num', typeParameters: 'S: int'),
-  subtype('S', 'num', typeParameters: 'S: num'),
-  notSubtype('S', 'int', typeParameters: 'S: num'),
-  notSubtype('S', 'T', typeParameters: 'S: num'),
-  notSubtype('S', 'T & num', typeParameters: 'S: num'),
+  subtype('S', 'int', legacyMode: true, typeParameters: 'S: int'),
+  subtype('S', 'num', legacyMode: true, typeParameters: 'S: int'),
+  subtype('S', 'num', legacyMode: true, typeParameters: 'S: num'),
+  notSubtype('S', 'int', legacyMode: true, typeParameters: 'S: num'),
+  notSubtype('S', 'T', legacyMode: true, typeParameters: 'S: num'),
+  notSubtype('S', 'T & num', legacyMode: true, typeParameters: 'S: num'),
 ];
 
 /// Assert that [subtype] is a subtype of [supertype], and that [supertype]
 /// is not a subtype of [subtype] (unless the two strings are equal).
 TestCase subtype(String subtype_, String supertype,
-    {bool strongMode: false, String typeParameters}) {
+    {bool legacyMode: false, String typeParameters}) {
   return new TestCase(subtype_, supertype,
-      isSubtype: true, strongMode: strongMode, typeParameters: typeParameters);
+      isSubtype: true, legacyMode: legacyMode, typeParameters: typeParameters);
 }
 
 /// Assert that neither type is a subtype of the other.
 TestCase notSubtype(String subtype_, String supertype,
-    {bool strongMode: false, String typeParameters}) {
+    {bool legacyMode: false, String typeParameters}) {
   return new TestCase(subtype_, supertype,
-      isSubtype: false, strongMode: strongMode, typeParameters: typeParameters);
+      isSubtype: false, legacyMode: legacyMode, typeParameters: typeParameters);
 }
 
 class TestCase {
@@ -163,10 +174,10 @@
   String supertype;
   String typeParameters;
   bool isSubtype;
-  bool strongMode;
+  bool legacyMode;
 
   TestCase(this.subtype, this.supertype,
-      {this.isSubtype, this.strongMode: false, this.typeParameters});
+      {this.isSubtype, this.legacyMode: false, this.typeParameters});
 
   String toString() {
     var description =
@@ -174,8 +185,8 @@
     if (typeParameters != null) {
       description += ' (type parameters: $typeParameters)';
     }
-    if (strongMode) {
-      description += ' (strong mode)';
+    if (legacyMode) {
+      description += ' (legacy mode)';
     }
     return description;
   }
@@ -189,7 +200,7 @@
   Class futureClass;
   Class futureOrClass;
   LazyTypeEnvironment environment;
-  bool strongMode = false;
+  bool legacyMode = true;
 
   InterfaceType futureType(DartType type) =>
       new InterfaceType(futureClass, [type]);
@@ -242,7 +253,7 @@
   var tester = makeSubtypeTester(classEnvironment);
   for (var testCase in testCases) {
     test('$testCase', () {
-      tester.strongMode = testCase.strongMode;
+      tester.legacyMode = testCase.legacyMode;
       var environment = tester.environment;
       environment.clearTypeParameters();
       if (testCase.typeParameters != null) {
diff --git a/pkg/kernel/test/typecheck.dart b/pkg/kernel/test/typecheck.dart
index 0a6d83b..565892b 100644
--- a/pkg/kernel/test/typecheck.dart
+++ b/pkg/kernel/test/typecheck.dart
@@ -11,7 +11,7 @@
 final String usage = '''
 Usage: typecheck FILE.dill
 
-Runs the strong mode type checker on the given component.
+Runs the type checker on the given component.
 ''';
 
 main(List<String> args) {
diff --git a/pkg/meta/lib/meta.dart b/pkg/meta/lib/meta.dart
index 0b1699f..9fd9fca 100644
--- a/pkg/meta/lib/meta.dart
+++ b/pkg/meta/lib/meta.dart
@@ -12,7 +12,7 @@
 /// function's name differently.
 ///
 /// For information on installing and importing this library, see the
-/// [meta package on pub.dartlang.org] (http://pub.dartlang.org/packages/meta).
+/// [meta package on pub.dartlang.org] (https://pub.dartlang.org/packages/meta).
 /// For examples of using annotations, see
 /// [Metadata](https://www.dartlang.org/docs/dart-up-and-running/ch02.html#metadata)
 /// in the language tour.
@@ -188,18 +188,17 @@
 ///   corresponding to a named parameter that has this annotation.
 const Required required = const Required();
 
-/// Annotation marking a class or mixin as not allowed as a super-type.
+/// Annotation marking a class as not allowed as a super-type.
 ///
-/// Classes in the same package as the marked class or mixin may extend,
-/// implement or mix-in the annotated class or mixin.
+/// Classes in the same package as the marked class may extend, implement or
+/// mix-in the annotated class.
 ///
-/// Given a class or mixin `C`, which is annotated with this, and a class or
-/// mixin `D`, which extends, implements, or mixes in `C`, then tools, such as
-/// the analyzer, may emit warnings if:
+/// Tools, such as the analyzer, can provide feedback if
 ///
-/// * `C` and `D` are declared in different packages, or
-/// * `C` and `D` are declared in the same package, and `D` is not also
-///   annotated with this.
+/// * the annotation is associated with anything other than a class,
+/// * the annotation is associated with a class `C`, and there is a class or
+///   mixin `D`, which extends, implements, mixes in, or constrains to `C`, and
+///   `C` and `D` are declared in different packages.
 const _Sealed sealed = const _Sealed();
 
 /// Used to annotate a field that is allowed to be overridden in Strong Mode.
diff --git a/pkg/microlytics/example/simple.dart b/pkg/microlytics/example/simple.dart
deleted file mode 100644
index 42b323e..0000000
--- a/pkg/microlytics/example/simple.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:microlytics/channels.dart';
-import 'package:microlytics/io_channels.dart';
-import 'package:microlytics/microlytics.dart';
-
-void main(List<String> arguments) {
-  // Create the channel that will be used to communicate to analytics.
-  var channel = new RateLimitingBufferedChannel(new HttpClientChannel(),
-      packetsPerSecond: 1.0);
-
-  if (arguments.length != 1) {
-    print("usage: dart simple.dart GA-Client-ID");
-    return;
-  }
-  final String clientID = arguments.single;
-
-  // Create the logger.
-  var lg = new AnalyticsLogger(channel, "555", clientID, "test", "1.2");
-
-  // Send some messages.
-  lg.logAnonymousEvent("hello", "world");
-  lg.logAnonymousTiming("loader", "var", 42);
-}
diff --git a/pkg/microlytics/lib/channels.dart b/pkg/microlytics/lib/channels.dart
deleted file mode 100644
index 18f233c..0000000
--- a/pkg/microlytics/lib/channels.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library microlytics.channels;
-
-import 'dart:async';
-
-const String ANALYTICS_URL = "https://ssl.google-analytics.com/collect";
-
-abstract class Channel {
-  void sendData(String data);
-  void shutdown() {}
-}
-
-/// [Channel] that implements a leaky bucket
-/// algorithm to provide rate limiting.
-/// See [http://en.wikipedia.org/wiki/Leaky_bucket].
-class RateLimitingBufferedChannel extends Channel {
-  final List<String> _buffer = <String>[];
-  final Channel _innerChannel;
-  final int _bufferSizeLimit;
-  Timer _timer;
-
-  RateLimitingBufferedChannel(this._innerChannel,
-      {int bufferSizeLimit: 10, double packetsPerSecond: 1.0})
-      : this._bufferSizeLimit = bufferSizeLimit {
-    if (!(packetsPerSecond > 0)) {
-      throw new ArgumentError("packetsPerSecond must be larger than zero.");
-    }
-
-    int transmitDelay = (1000 / packetsPerSecond).floor();
-    _timer = new Timer.periodic(
-        new Duration(milliseconds: transmitDelay), _onTimerTick);
-  }
-
-  void _onTimerTick(_) {
-    if (_buffer.length > 0) {
-      String item = _buffer.removeLast();
-      _innerChannel.sendData(item);
-    }
-  }
-
-  void sendData(String data) {
-    if (_buffer.length >= _bufferSizeLimit) return;
-    _buffer.add(data);
-  }
-
-  void shutdown() {
-    _timer.cancel();
-    _innerChannel.shutdown();
-  }
-}
diff --git a/pkg/microlytics/lib/html_channels.dart b/pkg/microlytics/lib/html_channels.dart
deleted file mode 100644
index b3eef43..0000000
--- a/pkg/microlytics/lib/html_channels.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library microlytics.html_channels;
-
-import 'dart:html';
-import 'channels.dart';
-
-class HttpRequestChannel extends Channel {
-  void sendData(String data) {
-    HttpRequest.request(ANALYTICS_URL, method: "POST", sendData: data);
-  }
-}
diff --git a/pkg/microlytics/lib/io_channels.dart b/pkg/microlytics/lib/io_channels.dart
deleted file mode 100644
index 044005c..0000000
--- a/pkg/microlytics/lib/io_channels.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library microlytics.io_channels;
-
-import 'dart:io';
-import 'channels.dart';
-
-class HttpClientChannel extends Channel {
-  void sendData(String data) {
-    HttpClient client = new HttpClient();
-    client.postUrl(Uri.parse(ANALYTICS_URL)).then((HttpClientRequest req) {
-      req.write(data);
-      return req.close();
-    }).then((HttpClientResponse response) {
-      response.drain();
-    });
-  }
-}
diff --git a/pkg/microlytics/lib/microlytics.dart b/pkg/microlytics/lib/microlytics.dart
deleted file mode 100644
index 509ae26..0000000
--- a/pkg/microlytics/lib/microlytics.dart
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library microlytics;
-
-import 'channels.dart';
-
-/// Very limited implementation of an API to report usage to Google Analytics.
-/// No Personally Identifiable Information must ever be passed to this class.
-class AnalyticsLogger {
-  final Channel _channel;
-  final String _clientID;
-  final String _analyticsID;
-  final String _appName;
-  final String _appVersion;
-  final String _messagePrefix; //Computed prefix for analytics messages
-
-  /// Create a new logger
-  /// [channel] represents how this is going to be sent, this would typically
-  /// be a [RateLimitingBufferedChannel] wrapping either a [HttpRequestChannel]
-  /// or a [HttpClientChannel].
-  /// [clientID] is a version 4 UUID associated with the site or app.
-  /// [appName] is an application name.
-  /// [appVersion] is a verion string.
-  AnalyticsLogger(Channel channel, String clientID, String analyticsID,
-      String appName, String appVersion)
-      : this._channel = channel,
-        this._clientID = clientID,
-        this._analyticsID = analyticsID,
-        this._appName = appName,
-        this._appVersion = appVersion,
-        this._messagePrefix = "v=1"
-            "&tid=$analyticsID"
-            "&cid=$clientID"
-            "&an=$appName"
-            "&av=$appVersion";
-
-  void logAnonymousTiming(String category, String variable, int ms) {
-    category = Uri.encodeComponent(category);
-    variable = Uri.encodeComponent(variable);
-    _channel.sendData("${this._messagePrefix}"
-        "&t=timing"
-        "&utc=$category"
-        "&utv=$variable"
-        "&utt=$ms");
-  }
-
-  void logAnonymousEvent(String category, String event) {
-    category = Uri.encodeComponent(category);
-    event = Uri.encodeComponent(event);
-    _channel.sendData("${this._messagePrefix}"
-        "&t=event"
-        "&ec=$category"
-        "&ea=$event");
-  }
-}
diff --git a/pkg/microlytics/pubspec.yaml b/pkg/microlytics/pubspec.yaml
deleted file mode 100644
index 620b7cb..0000000
--- a/pkg/microlytics/pubspec.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-name: microlytics
-description: A minimal implementation of the Analytics API in pure Dart
-dev_dependencies:
-  unittest: any
diff --git a/pkg/microlytics/test/dart_microlytics_test.dart b/pkg/microlytics/test/dart_microlytics_test.dart
deleted file mode 100644
index ca76b75..0000000
--- a/pkg/microlytics/test/dart_microlytics_test.dart
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library microlytics.test;
-
-import 'package:expect/expect.dart';
-import 'package:microlytics/microlytics.dart';
-
-import 'test_channel.dart';
-
-void main() {
-  testBasicEventRead();
-  testBasicNegativeEventRead();
-  testBasicTimingRead();
-  testBasicTimingMultiread();
-}
-
-void testBasicEventRead() {
-  TestChannel c = new TestChannel();
-  AnalyticsLogger logger = new AnalyticsLogger(
-      c,
-      "2cfac780-31e2-11e4-8c21-0800200c9a66",
-      "UA-53895644-1",
-      "TestApp",
-      "0.42");
-  logger.logAnonymousEvent("video", "play");
-  Expect.isTrue(c.contains("v=1"
-      "&tid=UA-53895644-1"
-      "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
-      "&an=TestApp"
-      "&av=0.42"
-      "&t=event"
-      "&ec=video"
-      "&ea=play"));
-}
-
-void testBasicNegativeEventRead() {
-  TestChannel c = new TestChannel();
-  AnalyticsLogger logger = new AnalyticsLogger(
-      c,
-      "2cfac780-31e2-11e4-8c21-0800200c9a66",
-      "UA-53895644-1",
-      "TestApp",
-      "0.42");
-  logger.logAnonymousEvent("video", "play");
-  Expect.isFalse(c.contains("v=1"
-      "&tid=UA-53895644-1"
-      "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
-      "&an=TestApp"
-      "&av=XXX"
-      "&t=event"
-      "&ec=video"
-      "&ea=play"));
-}
-
-void testBasicTimingRead() {
-  TestChannel c = new TestChannel();
-  AnalyticsLogger logger = new AnalyticsLogger(
-      c,
-      "2cfac780-31e2-11e4-8c21-0800200c9a66",
-      "UA-53895644-1",
-      "TestApp",
-      "0.42");
-  logger.logAnonymousTiming("video", "delay", 157);
-  Expect.isTrue(c.contains("v=1"
-      "&tid=UA-53895644-1"
-      "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
-      "&an=TestApp"
-      "&av=0.42"
-      "&t=timing"
-      "&utc=video"
-      "&utv=delay"
-      "&utt=157"));
-}
-
-void testBasicTimingMultiread() {
-  TestChannel c = new TestChannel();
-  AnalyticsLogger logger = new AnalyticsLogger(
-      c,
-      "2cfac780-31e2-11e4-8c21-0800200c9a66",
-      "UA-53895644-1",
-      "TestApp",
-      "0.42");
-  logger.logAnonymousTiming("video", "delay", 159);
-  logger.logAnonymousTiming("video", "delay", 152);
-  Expect.isTrue(c.contains("v=1"
-      "&tid=UA-53895644-1"
-      "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
-      "&an=TestApp"
-      "&av=0.42"
-      "&t=timing"
-      "&utc=video"
-      "&utv=delay"
-      "&utt=152"));
-  Expect.isTrue(c.contains("v=1"
-      "&tid=UA-53895644-1"
-      "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
-      "&an=TestApp"
-      "&av=0.42"
-      "&t=timing"
-      "&utc=video"
-      "&utv=delay"
-      "&utt=159"));
-  Expect.isFalse(c.contains("v=1"
-      "&tid=UA-53895644-1"
-      "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
-      "&an=TestApp"
-      "&av=0.42"
-      "&t=timing"
-      "&utc=video"
-      "&utv=delay"
-      "&utt=19"));
-}
diff --git a/pkg/microlytics/test/test_channel.dart b/pkg/microlytics/test/test_channel.dart
deleted file mode 100644
index a7f9c8b..0000000
--- a/pkg/microlytics/test/test_channel.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library microlytics.test_channel;
-
-import 'package:microlytics/channels.dart';
-
-class TestChannel extends Channel {
-  List<String> _channelLog = [];
-
-  void sendData(String data) {
-    _channelLog.add(data);
-  }
-
-  bool contains(String data) {
-    return _channelLog.contains(data);
-  }
-}
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 75a8ca5..47cc165 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -37,6 +37,7 @@
 front_end/test/fasta/sdk_test: SkipByDesign # sdk_test would take too long to complete, and should be run in a different way.
 front_end/test/fasta/shaker_test: Skip # Issue http://dartbug.com/32531
 front_end/test/fasta/strong_test: Pass, ExtraSlow
+front_end/test/fasta/text_serialization_test: Pass, ExtraSlow
 front_end/test/minimal_incremental_kernel_generator_test: Slow, Pass
 front_end/test/whole_program_test: Slow, Pass
 front_end/testcases/*: Skip # These are not tests but input for tests.
@@ -122,6 +123,7 @@
 analyzer/test/src/task/strong/inferred_type_test: Pass, Slow
 analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test: Pass, Slow
 analyzer_plugin/test/src/utilities/completion/optype_test: Pass, Slow
+dartfix/test/src/driver_test: RuntimeError # dartbug.com/35478
 mutation_observer: Skip # Skip tests on the VM if the package depends on dart:html
 
 [ $runtime != vm ]
@@ -137,7 +139,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/hot_reload_e2e_test: Skip # Issue 31901
+front_end/test/fasta/text_serialization_test: Pass, Slow, Timeout
 front_end/test/incremental_dart2js_load_from_dill_test: Pass, Slow
 front_end/test/whole_program_test: Skip # Issue 31902
 
diff --git a/pkg/telemetry/pubspec.yaml b/pkg/telemetry/pubspec.yaml
index ecbef8a..15dc588 100644
--- a/pkg/telemetry/pubspec.yaml
+++ b/pkg/telemetry/pubspec.yaml
@@ -1,6 +1,6 @@
 name: telemetry
 description: A library to facilitate reporting analytics and crash reports.
-version: 0.0.1
+publish_to: none
 author: Dart Team <misc@dartlang.org>
 
 environment:
diff --git a/pkg/testing/pubspec.yaml b/pkg/testing/pubspec.yaml
index 9c2e635..9811fa7 100644
--- a/pkg/testing/pubspec.yaml
+++ b/pkg/testing/pubspec.yaml
@@ -1,5 +1,6 @@
 # This pubspec is currently mainly used to make it easier to develop by making 
 # it a package.
 name: testing
-#version: do-not-upload
-dependencies:
+publish_to: none
+environment:
+  sdk: '>=2.0.0 <3.0.0'
diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart
index b5d7d03..30c3b6c 100644
--- a/pkg/vm/bin/kernel_service.dart
+++ b/pkg/vm/bin/kernel_service.dart
@@ -27,7 +27,9 @@
 import 'dart:typed_data' show Uint8List;
 
 import 'package:build_integration/file_system/multi_root.dart';
+import 'package:front_end/src/api_prototype/memory_file_system.dart';
 import 'package:front_end/src/api_unstable/vm.dart';
+import 'package:kernel/binary/ast_to_binary.dart';
 import 'package:kernel/kernel.dart' show Component, Procedure;
 import 'package:kernel/target/targets.dart' show TargetFlags;
 import 'package:vm/bytecode/gen_bytecode.dart' show generateBytecode;
@@ -63,14 +65,19 @@
 
 abstract class Compiler {
   final FileSystem fileSystem;
+  final Uri platformKernelPath;
+  bool suppressWarnings;
+  bool bytecode;
+  String packageConfig;
+
   final List<String> errors = new List<String>();
 
   CompilerOptions options;
 
-  Compiler(this.fileSystem, Uri platformKernelPath,
-      {bool suppressWarnings: false,
-      bool bytecode: false,
-      String packageConfig: null}) {
+  Compiler(this.fileSystem, this.platformKernelPath,
+      {this.suppressWarnings: false,
+      this.bytecode: false,
+      this.packageConfig: null}) {
     Uri packagesUri = null;
     if (packageConfig != null) {
       packagesUri = Uri.parse(packageConfig);
@@ -87,7 +94,7 @@
 
     options = new CompilerOptions()
       ..fileSystem = fileSystem
-      ..target = new VmTarget(new TargetFlags(syncAsync: true))
+      ..target = new VmTarget(new TargetFlags())
       ..packagesFileUri = packagesUri
       ..sdkSummary = platformKernelPath
       ..verbose = verbose
@@ -134,6 +141,23 @@
   Future<Component> compileInternal(Uri script);
 }
 
+class FileSink implements Sink<List<int>> {
+  MemoryFileSystemEntity entityForUri;
+  List<int> bytes = <int>[];
+
+  FileSink(this.entityForUri);
+
+  @override
+  void add(List<int> data) {
+    bytes.addAll(data);
+  }
+
+  @override
+  void close() {
+    this.entityForUri.writeAsBytesSync(bytes);
+  }
+}
+
 class IncrementalCompilerWrapper extends Compiler {
   IncrementalCompiler generator;
 
@@ -157,6 +181,30 @@
 
   void accept() => generator.accept();
   void invalidate(Uri uri) => generator.invalidate(uri);
+
+  Future<IncrementalCompilerWrapper> clone(int isolateId) async {
+    IncrementalCompilerWrapper clone = IncrementalCompilerWrapper(
+        fileSystem, platformKernelPath,
+        suppressWarnings: suppressWarnings,
+        bytecode: bytecode,
+        packageConfig: packageConfig);
+
+    generator.resetDeltaState();
+    Component fullComponent = await generator.compile();
+
+    // Assume fileSystem is HybridFileSystem because that is the setup where
+    // clone should be used for.
+    MemoryFileSystem memoryFileSystem = (fileSystem as HybridFileSystem).memory;
+
+    String filename = 'full-component-$isolateId.dill';
+    Sink sink = FileSink(memoryFileSystem.entityForUri(Uri.file(filename)));
+    new BinaryPrinter(sink).writeComponentFile(fullComponent);
+    await sink.close();
+
+    clone.generator = new IncrementalCompiler(options, generator.entryPoint,
+        initializeFromDillUri: Uri.file(filename));
+    return clone;
+  }
 }
 
 class SingleShotCompilerWrapper extends Compiler {
@@ -201,17 +249,28 @@
     updateSources(compiler, sourceFiles);
     invalidateSources(compiler, sourceFiles);
   } else {
-    FileSystem fileSystem = _buildFileSystem(
-        sourceFiles, platformKernel, multirootFilepaths, multirootScheme);
+    // This is how identify scenario where child isolate hot reload requests
+    // requires setting up actual compiler first: non-empty sourceFiles list has
+    // no actual content specified for the source file.
+    if (sourceFiles != null &&
+        sourceFiles.length > 0 &&
+        sourceFiles[1] == null) {
+      // Just use first compiler that should represent main isolate as a source for cloning.
+      var source = isolateCompilers.entries.first;
+      compiler = await source.value.clone(isolateId);
+    } else {
+      FileSystem fileSystem = _buildFileSystem(
+          sourceFiles, platformKernel, multirootFilepaths, multirootScheme);
 
-    // TODO(aam): IncrementalCompilerWrapper instance created below have to be
-    // destroyed when corresponding isolate is shut down. To achieve that kernel
-    // isolate needs to receive a message indicating that particular
-    // isolate was shut down. Message should be handled here in this script.
-    compiler = new IncrementalCompilerWrapper(fileSystem, platformKernelPath,
-        suppressWarnings: suppressWarnings,
-        bytecode: bytecode,
-        packageConfig: packageConfig);
+      // TODO(aam): IncrementalCompilerWrapper instance created below have to be
+      // destroyed when corresponding isolate is shut down. To achieve that kernel
+      // isolate needs to receive a message indicating that particular
+      // isolate was shut down. Message should be handled here in this script.
+      compiler = new IncrementalCompilerWrapper(fileSystem, platformKernelPath,
+          suppressWarnings: suppressWarnings,
+          bytecode: bytecode,
+          packageConfig: packageConfig);
+    }
     isolateCompilers[isolateId] = compiler;
   }
   return compiler;
@@ -350,7 +409,16 @@
 }
 
 Future _processLoadRequest(request) async {
-  if (verbose) print("DFE: request: $request");
+  if (verbose) {
+    for (int i = 0; i < request.length; i++) {
+      var part = request[i];
+      String partToString = part.toString();
+      if (partToString.length > 256) {
+        partToString = partToString.substring(0, 255) + "...";
+      }
+      print("DFE: request[$i]: $partToString");
+    }
+  }
 
   int tag = request[0];
 
@@ -373,7 +441,7 @@
   final String inputFileUri = request[2];
   final Uri script =
       inputFileUri != null ? Uri.base.resolve(inputFileUri) : null;
-  final bool incremental = request[4];
+  bool incremental = request[4];
   final int isolateId = request[6];
   final List sourceFiles = request[7];
   final bool suppressWarnings = request[8];
@@ -382,6 +450,14 @@
   final String multirootFilepaths = request[11];
   final String multirootScheme = request[12];
 
+  if (bytecode) {
+    // Bytecode generator is hooked into kernel service after kernel component
+    // is produced. In case of incremental compilation resulting component
+    // doesn't have core libraries which are needed for bytecode generation.
+    // TODO(alexmarkov): Support bytecode generation in incremental compiler.
+    incremental = false;
+  }
+
   Uri platformKernelPath = null;
   List<int> platformKernel = null;
   if (request[3] is String) {
diff --git a/pkg/vm/lib/bytecode/assembler.dart b/pkg/vm/lib/bytecode/assembler.dart
index f937116..eaab503 100644
--- a/pkg/vm/lib/bytecode/assembler.dart
+++ b/pkg/vm/lib/bytecode/assembler.dart
@@ -271,9 +271,14 @@
     emitWord(_encodeAD(Opcode.kIndirectStaticCall, ra, rd));
   }
 
-  void emitInstanceCall(int ra, int rd) {
+  void emitInterfaceCall(int ra, int rd) {
     emitSourcePosition();
-    emitWord(_encodeAD(Opcode.kInstanceCall, ra, rd));
+    emitWord(_encodeAD(Opcode.kInterfaceCall, ra, rd));
+  }
+
+  void emitDynamicCall(int ra, int rd) {
+    emitSourcePosition();
+    emitWord(_encodeAD(Opcode.kDynamicCall, ra, rd));
   }
 
   void emitNativeCall(int rd) {
diff --git a/pkg/vm/lib/bytecode/constant_pool.dart b/pkg/vm/lib/bytecode/constant_pool.dart
index fda38ee..e4c77c1 100644
--- a/pkg/vm/lib/bytecode/constant_pool.dart
+++ b/pkg/vm/lib/bytecode/constant_pool.dart
@@ -169,6 +169,15 @@
   PackedObject name;
 }
 
+// Occupies 2 entries in the constant pool.
+type ConstantInterfaceCall extends ConstantPoolEntry {
+  Byte tag = 26;
+  Byte flags(invocationKindBit0, invocationKindBit1);
+             // Where invocationKind is index into InvocationKind.
+  PackedObject targetName;
+  ConstantIndex argDesc;
+}
+
 */
 
 enum ConstantTag {
@@ -198,6 +207,7 @@
   kPartialTearOffInstantiation,
   kEmptyTypeArguments,
   kSymbol,
+  kInterfaceCall,
 }
 
 abstract class ConstantPoolEntry {
@@ -271,6 +281,8 @@
         return new ConstantEmptyTypeArguments.read(reader);
       case ConstantTag.kSymbol:
         return new ConstantSymbol.read(reader);
+      case ConstantTag.kInterfaceCall:
+        return new ConstantInterfaceCall.read(reader);
     }
     throw 'Unexpected constant tag $tag';
   }
@@ -1071,6 +1083,50 @@
   bool operator ==(other) => other is ConstantSymbol && this.name == other.name;
 }
 
+class ConstantInterfaceCall extends ConstantPoolEntry {
+  final InvocationKind invocationKind;
+  final ObjectHandle targetName;
+  final int argDescConstantIndex;
+
+  ConstantInterfaceCall(
+      this.invocationKind, this.targetName, this.argDescConstantIndex);
+
+  // Reserve 1 extra slot for arguments descriptor, following target name slot.
+  int get numReservedEntries => 1;
+
+  @override
+  ConstantTag get tag => ConstantTag.kInterfaceCall;
+
+  @override
+  void writeValue(BufferedWriter writer) {
+    writer.writeByte(invocationKind.index);
+    writer.writePackedObject(targetName);
+    writer.writePackedUInt30(argDescConstantIndex);
+  }
+
+  ConstantInterfaceCall.read(BufferedReader reader)
+      : invocationKind = InvocationKind.values[reader.readByte()],
+        targetName = reader.readPackedObject(),
+        argDescConstantIndex = reader.readPackedUInt30();
+
+  @override
+  String toString() => 'InterfaceCall '
+      '${_invocationKindToString(invocationKind)}'
+      'target-name \'$targetName\', arg-desc CP#$argDescConstantIndex';
+
+  @override
+  int get hashCode => _combineHashes(
+      _combineHashes(invocationKind.index, targetName.hashCode),
+      argDescConstantIndex);
+
+  @override
+  bool operator ==(other) =>
+      other is ConstantInterfaceCall &&
+      this.invocationKind == other.invocationKind &&
+      this.targetName == other.targetName &&
+      this.argDescConstantIndex == other.argDescConstantIndex;
+}
+
 /// Reserved constant pool entry.
 class _ReservedConstantPoolEntry extends ConstantPoolEntry {
   const _ReservedConstantPoolEntry();
@@ -1131,6 +1187,23 @@
               isSetter: invocationKind == InvocationKind.setter),
           argDescCpIndex));
 
+  int addInterfaceCall(
+          InvocationKind invocationKind, Name targetName, int argDescCpIndex) =>
+      _add(new ConstantInterfaceCall(
+          invocationKind,
+          objectTable.getSelectorNameHandle(targetName,
+              isGetter: invocationKind == InvocationKind.getter,
+              isSetter: invocationKind == InvocationKind.setter),
+          argDescCpIndex));
+
+  int addInstanceCall(
+          InvocationKind invocationKind, Name targetName, int argDescCpIndex,
+          {bool isDynamic: false}) =>
+      isDynamic
+          ? addICData(invocationKind, targetName, argDescCpIndex,
+              isDynamic: true)
+          : addInterfaceCall(invocationKind, targetName, argDescCpIndex);
+
   int addStaticField(Field field) =>
       _add(new ConstantStaticField(objectTable.getHandle(field)));
 
diff --git a/pkg/vm/lib/bytecode/dbc.dart b/pkg/vm/lib/bytecode/dbc.dart
index 1092e14..6f7923a 100644
--- a/pkg/vm/lib/bytecode/dbc.dart
+++ b/pkg/vm/lib/bytecode/dbc.dart
@@ -82,7 +82,8 @@
 
   // Calls.
   kIndirectStaticCall,
-  kInstanceCall,
+  kInterfaceCall,
+  kDynamicCall,
   kNativeCall,
   kReturnTOS,
 
@@ -235,7 +236,9 @@
       Encoding.kT, const [Operand.tgt, Operand.none, Operand.none]),
   Opcode.kIndirectStaticCall: const Format(
       Encoding.kAD, const [Operand.imm, Operand.lit, Operand.none]),
-  Opcode.kInstanceCall: const Format(
+  Opcode.kInterfaceCall: const Format(
+      Encoding.kAD, const [Operand.imm, Operand.lit, Operand.none]),
+  Opcode.kDynamicCall: const Format(
       Encoding.kAD, const [Operand.imm, Operand.lit, Operand.none]),
   Opcode.kNativeCall: const Format(
       Encoding.kD, const [Operand.lit, Operand.none, Operand.none]),
@@ -312,7 +315,8 @@
 bool isCall(Opcode opcode) {
   switch (opcode) {
     case Opcode.kIndirectStaticCall:
-    case Opcode.kInstanceCall:
+    case Opcode.kInterfaceCall:
+    case Opcode.kDynamicCall:
     case Opcode.kNativeCall:
       return true;
     default:
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 6dd7960..11f5bcf 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -53,8 +53,7 @@
   void ignoreAmbiguousSupertypes(Class cls, Supertype a, Supertype b) {}
   final hierarchy = new ClassHierarchy(component,
       onAmbiguousSupertypes: ignoreAmbiguousSupertypes);
-  final typeEnvironment =
-      new TypeEnvironment(coreTypes, hierarchy, strongMode: true);
+  final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
   final constantsBackend =
       new VmConstantsBackend(environmentDefines, coreTypes);
   final errorReporter = new ForwardConstantEvaluationErrors(typeEnvironment);
@@ -772,9 +771,9 @@
       assert(type.classNode.typeParameters.isEmpty);
       asm.emitPushConstant(cp.addType(type));
       final argDescIndex = cp.addArgDesc(2);
-      final icdataIndex = cp.addICData(
+      final icdataIndex = cp.addInterfaceCall(
           InvocationKind.method, objectSimpleInstanceOf.name, argDescIndex);
-      asm.emitInstanceCall(2, icdataIndex);
+      asm.emitInterfaceCall(2, icdataIndex);
       return;
     }
 
@@ -786,9 +785,9 @@
     }
     asm.emitPushConstant(cp.addType(type));
     final argDescIndex = cp.addArgDesc(4);
-    final icdataIndex = cp.addICData(
+    final icdataIndex = cp.addInterfaceCall(
         InvocationKind.method, objectInstanceOf.name, argDescIndex);
-    asm.emitInstanceCall(4, icdataIndex);
+    asm.emitInterfaceCall(4, icdataIndex);
   }
 
   void start(Member node) {
@@ -1945,6 +1944,14 @@
     asm.emitBytecode0(opcode);
   }
 
+  void _genInstanceCall(int totalArgCount, int icdataCpIndex, bool isDynamic) {
+    if (isDynamic) {
+      asm.emitDynamicCall(totalArgCount, icdataCpIndex);
+    } else {
+      asm.emitInterfaceCall(totalArgCount, icdataCpIndex);
+    }
+  }
+
   @override
   visitMethodInvocation(MethodInvocation node) {
     final Opcode opcode = recognizedMethods.specializedBytecodeFor(node);
@@ -1953,26 +1960,28 @@
       return;
     }
     final args = node.arguments;
+    final isDynamic = node.interfaceTarget == null;
     _genArguments(node.receiver, args);
     final argDescIndex = cp.addArgDescByArguments(args, hasReceiver: true);
-    final icdataIndex = cp.addICData(
+    final icdataIndex = cp.addInstanceCall(
         InvocationKind.method, node.name, argDescIndex,
-        isDynamic: node.interfaceTarget == null);
+        isDynamic: isDynamic);
     final totalArgCount = args.positional.length +
         args.named.length +
         1 /* receiver */ +
         (args.types.isNotEmpty ? 1 : 0) /* type arguments */;
-    asm.emitInstanceCall(totalArgCount, icdataIndex);
+    _genInstanceCall(totalArgCount, icdataIndex, isDynamic);
   }
 
   @override
   visitPropertyGet(PropertyGet node) {
     _generateNode(node.receiver);
+    final isDynamic = node.interfaceTarget == null;
     final argDescIndex = cp.addArgDesc(1);
-    final icdataIndex = cp.addICData(
+    final icdataIndex = cp.addInstanceCall(
         InvocationKind.getter, node.name, argDescIndex,
-        isDynamic: node.interfaceTarget == null);
-    asm.emitInstanceCall(1, icdataIndex);
+        isDynamic: isDynamic);
+    _genInstanceCall(1, icdataIndex, isDynamic);
   }
 
   @override
@@ -1987,11 +1996,12 @@
       asm.emitStoreLocal(temp);
     }
 
+    final isDynamic = node.interfaceTarget == null;
     final argDescIndex = cp.addArgDesc(2);
-    final icdataIndex = cp.addICData(
+    final icdataIndex = cp.addInstanceCall(
         InvocationKind.setter, node.name, argDescIndex,
-        isDynamic: node.interfaceTarget == null);
-    asm.emitInstanceCall(2, icdataIndex);
+        isDynamic: isDynamic);
+    _genInstanceCall(2, icdataIndex, isDynamic);
     asm.emitDrop1();
 
     if (hasResult) {
@@ -2402,9 +2412,11 @@
     const kMoveNext = 'moveNext'; // Iterator.moveNext
     const kCurrent = 'current'; // Iterator.current
 
-    asm.emitInstanceCall(
+    // Front-end inserts implicit cast (type check) which ensures that
+    // result of iterable expression is Iterable<dynamic>.
+    asm.emitInterfaceCall(
         1,
-        cp.addICData(
+        cp.addInterfaceCall(
             InvocationKind.getter, new Name(kIterator), cp.addArgDesc(1)));
 
     final iteratorTemp = locals.tempIndexInFrame(node);
@@ -2436,9 +2448,9 @@
       asm.emitPush(iteratorTemp);
     }
 
-    asm.emitInstanceCall(
+    asm.emitInterfaceCall(
         1,
-        cp.addICData(
+        cp.addInterfaceCall(
             InvocationKind.method, new Name(kMoveNext), cp.addArgDesc(1)));
     _genJumpIfFalse(/* negated = */ false, done);
 
@@ -2447,9 +2459,9 @@
     _genPushContextIfCaptured(node.variable);
 
     asm.emitPush(iteratorTemp);
-    asm.emitInstanceCall(
+    asm.emitInterfaceCall(
         1,
-        cp.addICData(
+        cp.addInterfaceCall(
             InvocationKind.getter, new Name(kCurrent), cp.addArgDesc(1)));
 
     _genStoreVar(node.variable);
@@ -2606,9 +2618,9 @@
         for (var expr in switchCase.expressions) {
           asm.emitPush(temp);
           _genPushConstExpr(expr);
-          asm.emitInstanceCall(
+          asm.emitInterfaceCall(
               2,
-              cp.addICData(
+              cp.addInterfaceCall(
                   InvocationKind.method, new Name('=='), equalsArgDesc));
           _genJumpIfTrue(/* negated = */ false, caseLabel);
         }
diff --git a/pkg/vm/lib/frontend_server.dart b/pkg/vm/lib/frontend_server.dart
index 99e6976..2d4b546 100644
--- a/pkg/vm/lib/frontend_server.dart
+++ b/pkg/vm/lib/frontend_server.dart
@@ -48,7 +48,6 @@
       defaultsTo: false)
   // TODO(alexmarkov): Cleanup uses in Flutter and remove these obsolete flags.
   ..addFlag('strong', help: 'Obsolete', defaultsTo: true)
-  ..addFlag('sync-async', help: 'Obsolete', defaultsTo: true)
   ..addFlag('tfa',
       help:
           'Enable global type flow analysis and related transformations in AOT mode.',
diff --git a/pkg/vm/lib/incremental_compiler.dart b/pkg/vm/lib/incremental_compiler.dart
index 92136c2..e1715745 100644
--- a/pkg/vm/lib/incremental_compiler.dart
+++ b/pkg/vm/lib/incremental_compiler.dart
@@ -32,6 +32,8 @@
   Uri initializeFromDillUri;
   Uri _entryPoint;
 
+  Uri get entryPoint => _entryPoint;
+
   IncrementalCompiler(this._compilerOptions, this._entryPoint,
       {this.initializeFromDillUri}) {
     _generator = new IncrementalKernelGenerator(
@@ -44,6 +46,7 @@
   /// If [entryPoint] is specified, that points to new entry point for the
   /// compilation. Otherwise, previously set entryPoint is used.
   Future<Component> compile({Uri entryPoint}) async {
+    _entryPoint = entryPoint ?? _entryPoint;
     Component component = await _generator.computeDelta(
         entryPoint: entryPoint, fullComponent: fullComponent);
     initialized = true;
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index ffb74bf..d84850d 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -21,6 +21,7 @@
         DiagnosticMessageHandler,
         FileSystem,
         FileSystemEntity,
+        FileSystemException,
         ProcessedOptions,
         Severity,
         StandardFileSystem,
@@ -54,6 +55,7 @@
     show transformComponent;
 import 'transformations/obfuscation_prohibitions_annotator.dart'
     as obfuscationProhibitions;
+import 'transformations/call_site_annotator.dart' as call_site_annotator;
 
 /// Declare options consumed by [runCompiler].
 void declareCompilerOptions(ArgParser args) {
@@ -69,14 +71,12 @@
   args.addOption('depfile', help: 'Path to output Ninja depfile');
   args.addFlag('link-platform',
       help: 'Include platform into resulting kernel file.', defaultsTo: true);
-  args.addFlag('sync-async',
-      help: 'Start `async` functions synchronously', defaultsTo: true);
   args.addFlag('embed-sources',
       help: 'Embed source files in the generated kernel component',
       defaultsTo: true);
   args.addMultiOption('filesystem-root',
       help: 'A base path for the multi-root virtual file system.'
-          ' If multi-root file system is used, the input script should be specified using URI.');
+          ' If multi-root file system is used, the input script and .packages file should be specified using URI.');
   args.addOption('filesystem-scheme',
       help: 'The URI scheme for the multi-root virtual filesystem.');
   args.addOption('target',
@@ -162,8 +162,9 @@
   final fileSystem =
       createFrontEndFileSystem(fileSystemScheme, fileSystemRoots);
 
-  final Uri packagesUri =
-      packages != null ? Uri.base.resolveUri(new Uri.file(packages)) : null;
+  final Uri packagesUri = packages != null
+      ? convertFileOrUriArgumentToUri(fileSystem, packages)
+      : null;
 
   final platformKernelUri = Uri.base.resolveUri(new Uri.file(platformKernel));
   final List<Uri> linkedDependencies = <Uri>[];
@@ -337,6 +338,13 @@
     no_dynamic_invocations_annotator.transformComponent(component);
   }
 
+  // TODO(35069): avoid recomputing CSA by reading it from the platform files.
+  void ignoreAmbiguousSupertypes(cls, a, b) {}
+  final hierarchy = new ClassHierarchy(component,
+      onAmbiguousSupertypes: ignoreAmbiguousSupertypes);
+  call_site_annotator.transformLibraries(
+      component, component.libraries, coreTypes, hierarchy);
+
   // We don't know yet whether gen_snapshot will want to do obfuscation, but if
   // it does it will need the obfuscation prohibitions.
   obfuscationProhibitions.transformComponent(component, coreTypes);
@@ -372,8 +380,7 @@
 
   await runWithFrontEndCompilerContext(source, compilerOptions, component, () {
     final hierarchy = new ClassHierarchy(component);
-    final typeEnvironment =
-        new TypeEnvironment(coreTypes, hierarchy, strongMode: true);
+    final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
 
     // TFA will remove constants fields which are unused (and respects the
     // vm/embedder entrypoints).
@@ -462,7 +469,7 @@
   // Make sure VM-specific targets are available.
   installAdditionalTargets();
 
-  final TargetFlags targetFlags = new TargetFlags(syncAsync: true);
+  final TargetFlags targetFlags = new TargetFlags();
   return getTarget(targetName, targetFlags);
 }
 
@@ -526,7 +533,9 @@
   String uriString = (await asFileUri(fileSystem, uri)).toString();
   List<String> packages;
   try {
-    packages = await new File(packagesUri.toFilePath()).readAsLines();
+    packages =
+        await new File((await asFileUri(fileSystem, packagesUri)).toFilePath())
+            .readAsLines();
   } on IOException {
     // Can't read packages file - silently give up.
     return uri;
@@ -538,7 +547,15 @@
       continue;
     }
     final packageName = line.substring(0, colon);
-    final packagePath = line.substring(colon + 1);
+    String packagePath;
+    try {
+      packagePath = (await asFileUri(
+              fileSystem, packagesUri.resolve(line.substring(colon + 1))))
+          .toString();
+    } on FileSystemException {
+      // Can't resolve package path.
+      continue;
+    }
     if (uriString.startsWith(packagePath)) {
       return Uri.parse(
           'package:$packageName/${uriString.substring(packagePath.length)}');
diff --git a/pkg/vm/lib/metadata/direct_call.dart b/pkg/vm/lib/metadata/direct_call.dart
index dd9348c..9c2594e 100644
--- a/pkg/vm/lib/metadata/direct_call.dart
+++ b/pkg/vm/lib/metadata/direct_call.dart
@@ -35,7 +35,8 @@
 
   @override
   void writeToBinary(DirectCallMetadata metadata, Node node, BinarySink sink) {
-    sink.writeCanonicalNameReference(getCanonicalNameOfMember(metadata.target));
+    sink.writeNullAllowedCanonicalNameReference(
+        getCanonicalNameOfMember(metadata.target));
     sink.writeByte(metadata.checkReceiverForNull ? 1 : 0);
   }
 
diff --git a/pkg/vm/lib/metadata/inferred_type.dart b/pkg/vm/lib/metadata/inferred_type.dart
index 55e9443..c22b155 100644
--- a/pkg/vm/lib/metadata/inferred_type.dart
+++ b/pkg/vm/lib/metadata/inferred_type.dart
@@ -14,8 +14,7 @@
   static const int flagNullable = 1 << 0;
   static const int flagInt = 1 << 1;
 
-  // For Parameters and Fields, whether a type-check is required at assignment
-  // (invocation/setter). Not meaningful on other kernel nodes.
+  // For invocations: whether to use the unchecked entry-point.
   static const int flagSkipCheck = 1 << 2;
 
   // Entire list may be null if no type arguments were inferred.
@@ -76,7 +75,7 @@
   void writeToBinary(InferredType metadata, Node node, BinarySink sink) {
     // TODO(sjindel/tfa): Implement serialization of type arguments when can use
     // them for optimizations.
-    sink.writeCanonicalNameReference(
+    sink.writeNullAllowedCanonicalNameReference(
         getCanonicalNameOfClass(metadata.concreteClass));
     sink.writeByte(metadata._flags);
   }
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 817672e..a43e07c 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -76,7 +76,7 @@
     logger?.call("Transformed mixin applications");
 
     // TODO(kmillikin): Make this run on a per-method basis.
-    transformAsync.transformLibraries(coreTypes, libraries, flags.syncAsync);
+    transformAsync.transformLibraries(coreTypes, libraries);
     logger?.call("Transformed async methods");
 
     listFactorySpecializer.transformLibraries(libraries, coreTypes);
@@ -90,7 +90,7 @@
   void performTransformationsOnProcedure(
       CoreTypes coreTypes, ClassHierarchy hierarchy, Procedure procedure,
       {void logger(String msg)}) {
-    transformAsync.transformProcedure(coreTypes, procedure, flags.syncAsync);
+    transformAsync.transformProcedure(coreTypes, procedure);
     logger?.call("Transformed async functions");
   }
 
diff --git a/pkg/vm/lib/transformations/call_site_annotator.dart b/pkg/vm/lib/transformations/call_site_annotator.dart
index 66f1cfe..7b6b620 100644
--- a/pkg/vm/lib/transformations/call_site_annotator.dart
+++ b/pkg/vm/lib/transformations/call_site_annotator.dart
@@ -36,7 +36,7 @@
   AnnotateWithStaticTypes(
       Component component, CoreTypes coreTypes, ClassHierarchy hierarchy)
       : _metadata = addRepositoryTo(component),
-        env = new TypeEnvironment(coreTypes, hierarchy, strongMode: true);
+        env = new TypeEnvironment(coreTypes, hierarchy);
 
   @override
   visitProcedure(Procedure proc) {
diff --git a/pkg/vm/lib/transformations/mixin_deduplication.dart b/pkg/vm/lib/transformations/mixin_deduplication.dart
index 19375aa..73c7e0b 100644
--- a/pkg/vm/lib/transformations/mixin_deduplication.dart
+++ b/pkg/vm/lib/transformations/mixin_deduplication.dart
@@ -126,26 +126,24 @@
       throw 'Unexpected node ${node.runtimeType}: $node';
 }
 
-/// Corrects synthetic forwarding constructors inserted by mixin resolution
-/// after replacing superclass.
+/// Corrects forwarding constructors inserted by mixin resolution after
+/// replacing superclass.
 void _correctForwardingConstructors(Class c, Class oldSuper, Class newSuper) {
   for (var constructor in c.constructors) {
-    if (constructor.isSynthetic) {
-      for (var initializer in constructor.initializers) {
-        if ((initializer is SuperInitializer) &&
-            initializer.target.enclosingClass == oldSuper) {
-          Constructor replacement = null;
-          for (var c in newSuper.constructors) {
-            if (c.name == initializer.target.name) {
-              replacement = c;
-              break;
-            }
+    for (var initializer in constructor.initializers) {
+      if ((initializer is SuperInitializer) &&
+          initializer.target.enclosingClass == oldSuper) {
+        Constructor replacement = null;
+        for (var c in newSuper.constructors) {
+          if (c.name == initializer.target.name) {
+            replacement = c;
+            break;
           }
-          if (replacement == null) {
-            throw 'Unable to find a replacement for $c in $newSuper';
-          }
-          initializer.target = replacement;
         }
+        if (replacement == null) {
+          throw 'Unable to find a replacement for $c in $newSuper';
+        }
+        initializer.target = replacement;
       }
     }
   }
diff --git a/pkg/vm/lib/transformations/type_flow/analysis.dart b/pkg/vm/lib/transformations/type_flow/analysis.dart
index a7dc830..71d48cb 100644
--- a/pkg/vm/lib/transformations/type_flow/analysis.dart
+++ b/pkg/vm/lib/transformations/type_flow/analysis.dart
@@ -90,6 +90,10 @@
   /// Number of times result of this invocation was invalidated.
   int invalidationCounter = 0;
 
+  /// Whether a call-site directed to this invocation can call through the
+  /// unchecked entry-point.
+  bool typeChecksNeeded = false;
+
   /// If an invocation is invalidated more than [invalidationLimit] times,
   /// its result is saturated in order to guarantee convergence.
   static const int invalidationLimit = 1000;
@@ -143,7 +147,17 @@
 
 class _DirectInvocation extends _Invocation {
   _DirectInvocation(DirectSelector selector, Args<Type> args)
-      : super(selector, args);
+      : super(selector, args) {
+    // We don't emit [TypeCheck] statements for bounds checks of type
+    // parameters, so if there are any type parameters, we must assume
+    // they could fail bounds checks.
+    //
+    // TODO(sjindel): Use [TypeCheck] to avoid bounds checks.
+    if (selector.member.function != null) {
+      typeChecksNeeded = selector.member.function.typeParameters
+          .any((t) => t.isGenericCovariantImpl);
+    }
+  }
 
   @override
   Type process(TypeFlowAnalysis typeFlowAnalysis) {
@@ -287,6 +301,15 @@
   Set<Call> _callSites; // Populated only if not polymorphic.
   Member _monomorphicTarget;
 
+  @override
+  set typeChecksNeeded(bool value) {
+    if (typeChecksNeeded) return;
+    if (value) {
+      super.typeChecksNeeded = true;
+      _notifyCallSites();
+    }
+  }
+
   /// Marker for noSuchMethod() invocation in the map of invocation targets.
   static final Member kNoSuchMethodMarker =
       new Procedure(new Name('noSuchMethod&&'), ProcedureKind.Method, null);
@@ -329,6 +352,8 @@
         Type type;
 
         if (target == kNoSuchMethodMarker) {
+          // Non-dynamic call-sites must hit NSM-forwarders in Dart 2.
+          assertx(selector is DynamicSelector);
           type = _processNoSuchMethod(receiver, typeFlowAnalysis);
         } else {
           final directSelector =
@@ -360,6 +385,10 @@
               typeFlowAnalysis._calledViaInterfaceSelector.add(target);
             }
           }
+
+          if (directInvocation.typeChecksNeeded) {
+            typeChecksNeeded = true;
+          }
         }
 
         result = result.union(type, typeFlowAnalysis.hierarchyCache);
@@ -515,10 +544,10 @@
     if (!_isPolymorphic) {
       _isPolymorphic = true;
       _monomorphicTarget = null;
+      typeChecksNeeded = true;
 
       _notifyCallSites();
-
-      _callSites = null; // No longer needed.
+      _callSites = null;
     }
   }
 
@@ -536,14 +565,13 @@
     }
 
     _notifyCallSite(callSite);
-
     if (!callSite.isPolymorphic) {
-      assertx(!_isPolymorphic);
       (_callSites ??= new Set<Call>()).add(callSite);
     }
   }
 
-  /// Notify call site about changes in polymorphism of this invocation.
+  /// Notify call site about changes in polymorphism or checkedness of this
+  /// invocation.
   void _notifyCallSite(Call callSite) {
     assert(selector is! DirectSelector);
 
@@ -554,6 +582,10 @@
         callSite.addTarget(_monomorphicTarget);
       }
     }
+
+    if (typeChecksNeeded) {
+      callSite.setUseCheckedEntry();
+    }
   }
 
   /// Notify call sites monitoring this invocation about changes in
@@ -709,14 +741,6 @@
     }
   }
 
-  bool get staticCallSiteSkipCheck {
-    if (typeGuardSummary != null) {
-      return (typeGuardSummary.result as TypeCheck).canSkipOnStaticCallSite;
-    } else {
-      return false;
-    }
-  }
-
   bool _isDefaultValueOfFieldObservable() {
     if (field.isStatic) {
       return true;
@@ -1024,8 +1048,16 @@
       return true;
     }
 
-    if (superType is DynamicType || superType is VoidType) return true;
-    if (subType is DynamicType || subType is VoidType) return false;
+    if (superType is DynamicType ||
+        superType is VoidType ||
+        subType is BottomType) {
+      return true;
+    }
+    if (subType is DynamicType ||
+        subType is VoidType ||
+        superType is BottomType) {
+      return false;
+    }
 
     // TODO(alexmarkov): handle function types properly
     if (subType is FunctionType) {
@@ -1175,6 +1207,7 @@
 
   Class get futureOrClass => environment.coreTypes.futureOrClass;
   Class get futureClass => environment.coreTypes.futureClass;
+  Class get functionClass => environment.coreTypes.functionClass;
 }
 
 class _WorkList {
@@ -1364,16 +1397,16 @@
 
   Call callSite(TreeNode node) => summaryCollector.callSites[node];
 
+  TypeCheck explicitCast(AsExpression cast) =>
+      summaryCollector.explicitCasts[cast];
+
   Type fieldType(Field field) => _fieldValues[field]?.value;
 
-  // True if a the runtime type-check for this field can be skipped on
-  // statically-typed setter calls. (The type-check is only simulated after
-  // narrowing by the static parameter type.)
-  bool fieldStaticCallSiteSkipCheck(Field field) =>
-      _fieldValues[field]?.staticCallSiteSkipCheck;
-
   Args<Type> argumentTypes(Member member) => _summaries[member]?.argumentTypes;
 
+  List<VariableDeclaration> uncheckedParameters(Member member) =>
+      _summaries[member]?.uncheckedParameters;
+
   bool isTearOffTaken(Member member) => _tearOffTaken.contains(member);
 
   /// Returns true if this member is called dynamically.
@@ -1391,12 +1424,6 @@
       _calledViaDynamicSelector.contains(member) ||
       _calledViaInterfaceSelector.contains(member);
 
-  // Returns parameters for which a runtime type-check can be skipped on
-  // statically-typed call-sites. (The type-check is only simulated after
-  // narrowing by the static parameter type.)
-  List<VariableDeclaration> staticCallSiteSkipCheckParams(Member member) =>
-      _summaries[member]?.staticCallSiteSkipCheckParams;
-
   /// ---- Implementation of [CallHandler] interface. ----
 
   @override
@@ -1434,6 +1461,11 @@
     }
   }
 
+  @override
+  void typeCheckTriggered() {
+    currentInvocation.typeChecksNeeded = true;
+  }
+
   /// ---- Implementation of [EntryPointsListener] interface. ----
 
   @override
diff --git a/pkg/vm/lib/transformations/type_flow/summary.dart b/pkg/vm/lib/transformations/type_flow/summary.dart
index c2e7b40..01529f7 100644
--- a/pkg/vm/lib/transformations/type_flow/summary.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary.dart
@@ -16,6 +16,7 @@
 abstract class CallHandler {
   Type applyCall(Call callSite, Selector selector, Args<Type> args,
       {bool isResultUsed});
+  void typeCheckTriggered();
 }
 
 /// Base class for all statements in a summary.
@@ -65,13 +66,15 @@
 class Parameter extends Statement {
   final String name;
 
-  // 'staticType' is null for type parameters to factory constructors.
-  final Type staticType;
+  // [staticType] is null if no narrowing should be performed. This happens for
+  // type parameters and for parameters whose type is narrowed by a [TypeCheck]
+  // statement.
+  final Type staticTypeForNarrowing;
 
   Type defaultValue;
   Type _argumentType = const EmptyType();
 
-  Parameter(this.name, this.staticType);
+  Parameter(this.name, this.staticTypeForNarrowing);
 
   @override
   String get label => "%$name";
@@ -80,7 +83,13 @@
   void accept(StatementVisitor visitor) => visitor.visitParameter(this);
 
   @override
-  String dump() => "$label = _Parameter #$index [$staticType]";
+  String dump() {
+    String text = "$label = _Parameter #$index";
+    if (staticTypeForNarrowing != null) {
+      text += " [$staticTypeForNarrowing]";
+    }
+    return text;
+  }
 
   @override
   Type apply(List<Type> computedTypes, TypeHierarchy typeHierarchy,
@@ -168,7 +177,13 @@
   final Selector selector;
   final Args<TypeExpr> args;
 
-  Call(this.selector, this.args);
+  Call(this.selector, this.args) {
+    // TODO(sjindel/tfa): Support inferring unchecked entry-points for dynamic
+    // and direct calls as well.
+    if (selector is DynamicSelector || selector is DirectSelector) {
+      setUseCheckedEntry();
+    }
+  }
 
   @override
   void accept(StatementVisitor visitor) => visitor.visitCall(this);
@@ -212,6 +227,7 @@
   static const int kNullableReceiver = (1 << 2);
   static const int kResultUsed = (1 << 3);
   static const int kReachable = (1 << 4);
+  static const int kUseCheckedEntry = (1 << 5);
 
   Member _monomorphicTarget;
 
@@ -227,8 +243,14 @@
 
   bool get isReachable => (_flags & kReachable) != 0;
 
+  bool get useCheckedEntry => (_flags & kUseCheckedEntry) != 0;
+
   Type get resultType => _resultType;
 
+  void setUseCheckedEntry() {
+    _flags |= kUseCheckedEntry;
+  }
+
   void setResultUsed() {
     _flags |= kResultUsed;
   }
@@ -391,16 +413,30 @@
   TypeExpr arg;
   TypeExpr type;
 
-  bool _canSkip = true;
+  // The Kernel which this TypeCheck corresponds to. Can be a
+  // VariableDeclaration, AsExpression or Field.
+  //
+  // VariableDeclaration is used for parameter type-checks.
+  // Field is used for type-checks of parameters to implicit setters.
+  final TreeNode node;
 
-  // True if a the runtime type-check for this parameter can be skipped on
-  // statically-typed call-sites. (The type-check is only simulated after
-  // narrowing by the static parameter type.)
-  bool get canSkipOnStaticCallSite => _canSkip;
+  final Type staticType;
 
-  final VariableDeclaration parameter;
+  // 'isTestedOnlyOnCheckedEntryPoint' is whether or not this parameter's type-check will
+  // occur on the "checked" entrypoint in the VM but will be skipped on
+  // "unchecked" entrypoint.
+  bool isTestedOnlyOnCheckedEntryPoint;
 
-  TypeCheck(this.arg, this.type, this.parameter);
+  VariableDeclaration get parameter =>
+      node is VariableDeclaration ? node : null;
+
+  bool canAlwaysSkip = true;
+
+  TypeCheck(this.arg, this.type, this.node, this.staticType) {
+    assertx(node != null);
+    isTestedOnlyOnCheckedEntryPoint =
+        parameter != null && !parameter.isCovariant;
+  }
 
   @override
   void accept(StatementVisitor visitor) => visitor.visitTypeCheck(this);
@@ -408,9 +444,7 @@
   @override
   String dump() {
     String result = "$label = _TypeCheck ($arg against $type)";
-    if (parameter != null) {
-      result += " (for parameter ${parameter.name})";
-    }
+    result += " (for ${node})";
     return result;
   }
 
@@ -421,25 +455,36 @@
     Type checkType = type.getComputedType(computedTypes);
     // TODO(sjindel/tfa): Narrow the result if possible.
     assertx(checkType is AnyType || checkType is RuntimeType);
-    if (_canSkip) {
-      if (checkType is AnyType) {
-        // If we don't know what the RHS of the check is going to be, we can't
-        // guarantee that it will pass.
-        if (kPrintTrace) {
-          tracePrint("TypeCheck failed, type is unknown");
-        }
-        _canSkip = false;
-      } else if (checkType is RuntimeType) {
-        _canSkip = argType.isSubtypeOfRuntimeType(typeHierarchy, checkType);
-        if (kPrintTrace && !_canSkip) {
-          tracePrint("TypeCheck of $argType against $checkType failed.");
-        }
-        argType = argType.intersection(
-            Type.fromStatic(checkType.representedTypeRaw), typeHierarchy);
-      } else {
-        assertx(false, details: "Cannot see $checkType on RHS of TypeCheck.");
+
+    bool canSkip = true; // Can this check be skipped on this invocation.
+
+    if (checkType is AnyType) {
+      // If we don't know what the RHS of the check is going to be, we can't
+      // guarantee that it will pass.
+      canSkip = false;
+    } else if (checkType is RuntimeType) {
+      canSkip = argType.isSubtypeOfRuntimeType(typeHierarchy, checkType);
+      argType = argType.intersection(
+          Type.fromStatic(checkType.representedTypeRaw), typeHierarchy);
+    } else {
+      assertx(false, details: "Cannot see $checkType on RHS of TypeCheck.");
+    }
+
+    // If this check might be skipped on an
+    // unchecked entry-point, we need to signal that the call-site must be
+    // checked.
+    if (!canSkip) {
+      canAlwaysSkip = false;
+      if (isTestedOnlyOnCheckedEntryPoint) {
+        callHandler.typeCheckTriggered();
+      }
+      if (kPrintTrace) {
+        tracePrint("TypeCheck of $argType against $checkType failed.");
       }
     }
+
+    argType = argType.intersection(staticType, typeHierarchy);
+
     return argType;
   }
 }
@@ -501,19 +546,23 @@
 
     for (int i = 0; i < positionalArgCount; i++) {
       final Parameter param = _statements[i] as Parameter;
-      if (param.staticType != null) {
-        final argType = args[i].specialize(typeHierarchy);
-        param._observeArgumentType(argType, typeHierarchy);
-        // TODO(sjindel/tfa): Perform narrowing inside 'TypeCheck'.
-        types[i] = argType.intersection(param.staticType, typeHierarchy);
+      if (args[i] is RuntimeType) {
+        types[i] = args[i];
+        continue;
+      }
+      final argType = args[i].specialize(typeHierarchy);
+      param._observeArgumentType(argType, typeHierarchy);
+      if (param.staticTypeForNarrowing != null) {
+        types[i] =
+            argType.intersection(param.staticTypeForNarrowing, typeHierarchy);
       } else {
+        // TODO(sjindel/tfa): Narrowing is performed inside a [TypeCheck] later.
         types[i] = args[i];
       }
     }
 
     for (int i = positionalArgCount; i < positionalParameterCount; i++) {
       final Parameter param = _statements[i] as Parameter;
-      assertx(param.staticType != null);
       final argType = param.defaultValue.specialize(typeHierarchy);
       param._observeArgumentType(argType, typeHierarchy);
       types[i] = argType;
@@ -529,7 +578,12 @@
             args[positionalArgCount + argIndex].specialize(typeHierarchy);
         argIndex++;
         param._observeArgumentType(argType, typeHierarchy);
-        types[i] = argType.intersection(param.staticType, typeHierarchy);
+        if (param.staticTypeForNarrowing != null) {
+          types[i] =
+              argType.intersection(param.staticTypeForNarrowing, typeHierarchy);
+        } else {
+          types[i] = argType;
+        }
       } else {
         assertx((argIndex == namedArgCount) ||
             (param.name.compareTo(argNames[argIndex]) < 0));
@@ -570,14 +624,15 @@
     return new Args<Type>(argTypes, names: argNames);
   }
 
-  List<VariableDeclaration> get staticCallSiteSkipCheckParams {
-    final vars = <VariableDeclaration>[];
-    for (final statement in _statements) {
-      if (statement is TypeCheck && statement.canSkipOnStaticCallSite) {
-        final decl = statement.parameter;
-        if (decl != null) vars.add(decl);
+  List<VariableDeclaration> get uncheckedParameters {
+    final params = List<VariableDeclaration>();
+    for (Statement statement in _statements) {
+      if (statement is TypeCheck &&
+          statement.canAlwaysSkip &&
+          statement.parameter != null) {
+        params.add(statement.parameter);
       }
     }
-    return vars;
+    return params;
   }
 }
diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
index 9cd99b0..af0e734 100644
--- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
@@ -61,7 +61,7 @@
     }
 
     for (Statement st in statements) {
-      if (st is Call) {
+      if (st is Call || st is TypeCheck) {
         _normalizeExpr(st, false);
       } else if (st is Use) {
         _normalizeExpr(st.arg, true);
@@ -283,6 +283,8 @@
   final GenericInterfacesInfo _genericInterfacesInfo;
 
   final Map<TreeNode, Call> callSites = <TreeNode, Call>{};
+  final Map<AsExpression, TypeCheck> explicitCasts =
+      <AsExpression, TypeCheck>{};
   final _FallthroughDetector _fallthroughDetector = new _FallthroughDetector();
 
   Summary _summary;
@@ -329,8 +331,8 @@
         _summary = new Summary();
       }
 
-      _translator = new RuntimeTypeTranslator(member.enclosingClass, _summary,
-          _receiver, null, _genericInterfacesInfo);
+      _translator = new RuntimeTypeTranslator(
+          _summary, _receiver, null, _genericInterfacesInfo);
 
       if (fieldSummaryType == FieldSummaryType.kInitializer) {
         assertx(member.initializer != null);
@@ -338,7 +340,8 @@
       } else {
         Parameter valueParam = _declareParameter("value", member.type, null);
         TypeExpr runtimeType = _translator.translate(member.type);
-        final check = new TypeCheck(valueParam, runtimeType, null);
+        final check = new TypeCheck(
+            valueParam, runtimeType, member, Type.fromStatic(member.type));
         _summary.add(check);
         _summary.result = check;
       }
@@ -373,25 +376,57 @@
         _environment.thisType = member.enclosingClass?.thisType;
       }
 
-      _translator = new RuntimeTypeTranslator(member.enclosingClass, _summary,
-          _receiver, _fnTypeVariables, _genericInterfacesInfo);
+      _translator = new RuntimeTypeTranslator(
+          _summary, _receiver, _fnTypeVariables, _genericInterfacesInfo);
 
-      for (VariableDeclaration param in function.positionalParameters) {
-        _declareParameter(param.name, param.type, param.initializer);
+      // Handle forwarding stubs. We need to check types against the types of
+      // the forwarding stub's target, [member.forwardingStubSuperTarget].
+      FunctionNode useTypesFrom = member.function;
+      if (member is Procedure &&
+          member.isForwardingStub &&
+          member.forwardingStubSuperTarget != null) {
+        final target = member.forwardingStubSuperTarget;
+        if (target is Field) {
+          useTypesFrom = FunctionNode(null, positionalParameters: [
+            VariableDeclaration("value", type: target.type)
+          ]);
+        } else {
+          useTypesFrom = member.forwardingStubSuperTarget.function;
+        }
       }
-      for (VariableDeclaration param in function.namedParameters) {
-        _declareParameter(param.name, param.type, param.initializer);
+
+      for (int i = 0; i < function.positionalParameters.length; ++i) {
+        final decl = function.positionalParameters[i];
+        _declareParameter(
+            decl.name,
+            _useTypeCheckForParameter(decl)
+                ? null
+                : useTypesFrom.positionalParameters[i].type,
+            function.positionalParameters[i].initializer);
+      }
+      for (int i = 0; i < function.namedParameters.length; ++i) {
+        final decl = function.namedParameters[i];
+        _declareParameter(
+            decl.name,
+            _useTypeCheckForParameter(decl)
+                ? null
+                : useTypesFrom.namedParameters[i].type,
+            function.namedParameters[i].initializer);
       }
 
       int count = firstParamIndex;
-      for (VariableDeclaration param in function.positionalParameters) {
-        Join v =
-            _declareVariable(param, useTypeCheck: param.isGenericCovariantImpl);
+      for (int i = 0; i < function.positionalParameters.length; ++i) {
+        final decl = function.positionalParameters[i];
+        Join v = _declareVariable(decl,
+            useTypeCheck: _useTypeCheckForParameter(decl),
+            checkType: useTypesFrom.positionalParameters[i].type);
         v.values.add(_summary.statements[count++]);
       }
-      for (VariableDeclaration param in function.namedParameters) {
-        Join v =
-            _declareVariable(param, useTypeCheck: param.isGenericCovariantImpl);
+      for (int i = 0; i < function.namedParameters.length; ++i) {
+        final decl = function.namedParameters[i];
+        Join v = _declareVariable(decl,
+            useTypeCheck: _useTypeCheckForParameter(decl),
+            checkType: useTypesFrom.namedParameters[i].type);
         v.values.add(_summary.statements[count++]);
       }
       assertx(count == _summary.parameterCount);
@@ -441,6 +476,10 @@
     return _summary;
   }
 
+  bool _useTypeCheckForParameter(VariableDeclaration decl) {
+    return decl.isCovariant || decl.isGenericCovariantImpl;
+  }
+
   Args<Type> rawArguments(Selector selector) {
     final member = selector.member;
     assertx(member != null);
@@ -559,17 +598,20 @@
   }
 
   Join _declareVariable(VariableDeclaration decl,
-      {bool addInitType: false, bool useTypeCheck: false}) {
-    Join join = new Join(decl.name, decl.type);
+      {bool addInitType: false,
+      bool useTypeCheck: false,
+      DartType checkType: null}) {
+    final type = checkType ?? decl.type;
+    Join join = new Join(decl.name, type);
     _summary.add(join);
     _variableJoins[decl] = join;
 
     TypeExpr variable = join;
     if (useTypeCheck) {
-      TypeExpr runtimeType = _translator.translate(decl.type);
-      variable = new TypeCheck(variable, runtimeType, decl);
+      TypeExpr runtimeType = _translator.translate(type);
+      variable = new TypeCheck(
+          variable, runtimeType, decl, Type.fromStatic(decl.type));
       _summary.add(variable);
-      _summary.add(new Use(variable));
     }
 
     _variables[decl] = variable;
@@ -697,15 +739,10 @@
   TypeExpr visitAsExpression(AsExpression node) {
     TypeExpr operand = _visit(node.operand);
     Type type = new Type.fromStatic(node.type);
-
-    TypeExpr result = _makeNarrow(operand, type);
-
     TypeExpr runtimeType = _translator.translate(node.type);
-    if (runtimeType is Statement) {
-      result = new TypeCheck(operand, runtimeType, /*parameter=*/ null);
-      _summary.add(result);
-    }
-
+    TypeExpr result = new TypeCheck(operand, runtimeType, node, type);
+    explicitCasts[node] = result;
+    _summary.add(result);
     return result;
   }
 
@@ -886,16 +923,19 @@
       return _makeCall(
           node, new DynamicSelector(CallKind.Method, node.name), args);
     }
+    // TODO(dartbug.com/34497): Once front-end desugars calls via
+    // fields/getters, handling of field and getter targets here
+    // can be turned into assertions.
     if ((target is Field) || ((target is Procedure) && target.isGetter)) {
-      // Call via field.
-      final fieldValue = _makeCall(
-          node,
+      // Call via field/getter.
+      final value = _makeCall(
+          null,
           (node.receiver is ThisExpression)
               ? new VirtualSelector(target, callKind: CallKind.PropertyGet)
               : new InterfaceSelector(target, callKind: CallKind.PropertyGet),
           new Args<TypeExpr>([receiver]));
       _makeCall(
-          null, DynamicSelector.kCall, new Args.withReceiver(args, fieldValue));
+          null, DynamicSelector.kCall, new Args.withReceiver(args, value));
       return _staticType(node);
     } else {
       // TODO(alexmarkov): overloaded arithmetic operators
@@ -1341,21 +1381,19 @@
 }
 
 class RuntimeTypeTranslator extends DartTypeVisitor<TypeExpr> {
-  final Class enclosingClass;
   final Summary summary;
   final Map<TypeParameter, TypeExpr> functionTypeVariables;
   final Map<DartType, TypeExpr> typesCache = <DartType, TypeExpr>{};
   final TypeExpr receiver;
   final GenericInterfacesInfo genericInterfacesInfo;
 
-  RuntimeTypeTranslator(this.enclosingClass, this.summary, this.receiver,
-      this.functionTypeVariables, this.genericInterfacesInfo) {}
+  RuntimeTypeTranslator(this.summary, this.receiver, this.functionTypeVariables,
+      this.genericInterfacesInfo) {}
 
   // Create a type translator which can be used only for types with no free type
   // variables.
   RuntimeTypeTranslator.forClosedTypes(this.genericInterfacesInfo)
-      : enclosingClass = null,
-        summary = null,
+      : summary = null,
         functionTypeVariables = null,
         receiver = null {}
 
@@ -1465,11 +1503,10 @@
       if (result != null) return result;
     }
     if (type.parameter.parent is! Class) return const AnyType();
-    assertx(type.parameter.parent == enclosingClass);
-
+    final interfaceClass = type.parameter.parent as Class;
     assertx(receiver != null);
-    final extract = new Extract(receiver, enclosingClass,
-        enclosingClass.typeParameters.indexOf(type.parameter));
+    final extract = new Extract(receiver, interfaceClass,
+        interfaceClass.typeParameters.indexOf(type.parameter));
     summary.add(extract);
     return extract;
   }
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index 71df95d..837baeb 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -16,6 +16,7 @@
 
 import 'analysis.dart';
 import 'calls.dart';
+import 'summary.dart';
 import 'summary_collector.dart';
 import 'types.dart';
 import 'utils.dart';
@@ -39,7 +40,7 @@
   void ignoreAmbiguousSupertypes(Class cls, Supertype a, Supertype b) {}
   final hierarchy = new ClassHierarchy(component,
       onAmbiguousSupertypes: ignoreAmbiguousSupertypes);
-  final types = new TypeEnvironment(coreTypes, hierarchy, strongMode: true);
+  final types = new TypeEnvironment(coreTypes, hierarchy);
   final libraryIndex = new LibraryIndex.all(component);
   final genericInterfacesInfo = new GenericInterfacesInfoImpl(hierarchy);
 
@@ -158,7 +159,7 @@
           .toList();
     }
 
-    if ((concreteClass != null) || !nullable || isInt) {
+    if ((concreteClass != null) || !nullable || isInt || skipCheck) {
       return new InferredType(concreteClass, nullable, isInt,
           exactTypeArguments: typeArgs, skipCheck: skipCheck);
     }
@@ -167,7 +168,6 @@
   }
 
   void _setInferredType(TreeNode node, Type type, {bool skipCheck: false}) {
-    assertx(skipCheck == false || node is VariableDeclaration || node is Field);
     final inferredType = _convertType(type, skipCheck: skipCheck);
     if (inferredType != null) {
       _inferredTypeMetadata.mapping[node] = inferredType;
@@ -182,8 +182,20 @@
     final callSite = _typeFlowAnalysis.callSite(node);
     if (callSite != null) {
       if (callSite.isReachable) {
+        bool markSkipCheck = !callSite.useCheckedEntry &&
+            (node is MethodInvocation || node is PropertySet);
         if (callSite.isResultUsed) {
-          _setInferredType(node, callSite.resultType);
+          _setInferredType(node, callSite.resultType, skipCheck: markSkipCheck);
+        } else if (markSkipCheck) {
+          // If the call is not marked as 'isResultUsed', the 'resultType' will
+          // not be observed (i.e., it will always be EmptyType). This is the
+          // case even if the result acutally might be used but is not used by
+          // the summary, e.g. if the result is an argument to a closure call.
+          // Therefore, we need to pass in 'NullableType(AnyType)' as the
+          // inferred result type here (since we don't know what it actually
+          // is).
+          _setInferredType(node, NullableType(const AnyType()),
+              skipCheck: true);
         }
       } else {
         _setUnreachable(node);
@@ -194,15 +206,13 @@
   void _annotateMember(Member member) {
     if (_typeFlowAnalysis.isMemberUsed(member)) {
       if (member is Field) {
-        _setInferredType(member, _typeFlowAnalysis.fieldType(member),
-            skipCheck: _typeFlowAnalysis.fieldStaticCallSiteSkipCheck(member));
+        _setInferredType(member, _typeFlowAnalysis.fieldType(member));
       } else {
         Args<Type> argTypes = _typeFlowAnalysis.argumentTypes(member);
+        final uncheckedParameters =
+            _typeFlowAnalysis.uncheckedParameters(member);
         assertx(argTypes != null);
 
-        final skipCheckParams = new Set<VariableDeclaration>.from(
-            _typeFlowAnalysis.staticCallSiteSkipCheckParams(member));
-
         final int firstParamIndex =
             numTypeParams(member) + (hasReceiverArg(member) ? 1 : 0);
 
@@ -213,7 +223,7 @@
         for (int i = 0; i < positionalParams.length; i++) {
           _setInferredType(
               positionalParams[i], argTypes.values[firstParamIndex + i],
-              skipCheck: skipCheckParams.contains(positionalParams[i]));
+              skipCheck: uncheckedParameters.contains(positionalParams[i]));
         }
 
         // TODO(dartbug.com/32292): make sure parameters are sorted in kernel
@@ -224,7 +234,7 @@
           assertx(param != null);
           _setInferredType(param,
               argTypes.values[firstParamIndex + positionalParams.length + i],
-              skipCheck: skipCheckParams.contains(param));
+              skipCheck: uncheckedParameters.contains(param));
         }
 
         // TODO(alexmarkov): figure out how to pass receiver type.
@@ -479,6 +489,7 @@
 /// transforms unreachable calls into 'throw' expressions.
 class _TreeShakerPass1 extends Transformer {
   final TreeShaker shaker;
+  Procedure _unsafeCast;
 
   _TreeShakerPass1(this.shaker);
 
@@ -808,6 +819,24 @@
   TreeNode visitAssertInitializer(AssertInitializer node) {
     return _visitAssertNode(node);
   }
+
+  @override
+  TreeNode visitAsExpression(AsExpression node) {
+    node.transformChildren(this);
+    TypeCheck check = shaker.typeFlowAnalysis.explicitCast(node);
+    if (check != null && check.canAlwaysSkip) {
+      return StaticInvocation(
+          unsafeCast, Arguments([node.operand], types: [node.type]));
+    }
+    return node;
+  }
+
+  Procedure get unsafeCast {
+    _unsafeCast ??= shaker.typeFlowAnalysis.environment.coreTypes.index
+        .getTopLevelMember('dart:_internal', 'unsafeCast');
+    assertx(_unsafeCast != null);
+    return _unsafeCast;
+  }
 }
 
 /// The second pass of [TreeShaker]. It is called after set of used
diff --git a/pkg/vm/lib/transformations/type_flow/types.dart b/pkg/vm/lib/transformations/type_flow/types.dart
index cf23ea8..9904fa7 100644
--- a/pkg/vm/lib/transformations/type_flow/types.dart
+++ b/pkg/vm/lib/transformations/type_flow/types.dart
@@ -45,6 +45,7 @@
 
   Class get futureOrClass;
   Class get futureClass;
+  Class get functionClass;
 }
 
 /// Basic normalization of Dart types.
@@ -615,6 +616,15 @@
 
   bool isSubtypeOfRuntimeType(
       TypeHierarchy typeHierarchy, RuntimeType runtimeType) {
+    if (runtimeType._type is InterfaceType &&
+        (runtimeType._type as InterfaceType).classNode ==
+            typeHierarchy.functionClass) {
+      // TODO(35573): "implements/extends Function" is not handled correctly by
+      // the CFE. By returning "false" we force an approximation -- that a type
+      // check against "Function" might fail, whatever the LHS is.
+      return false;
+    }
+
     if (!typeHierarchy.isSubtype(this.classNode.rawType, runtimeType._type)) {
       return false;
     }
diff --git a/pkg/vm/test/kernel_front_end_test.dart b/pkg/vm/test/kernel_front_end_test.dart
new file mode 100644
index 0000000..5a8379c
--- /dev/null
+++ b/pkg/vm/test/kernel_front_end_test.dart
@@ -0,0 +1,109 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:front_end/src/api_unstable/vm.dart'
+    show computePlatformBinariesLocation;
+import 'package:test/test.dart';
+import 'package:vm/kernel_front_end.dart';
+
+final String sdkDir = Platform.script.resolve('../../..').toFilePath();
+
+String platformPath() => computePlatformBinariesLocation()
+    .resolve('vm_platform_strong.dill')
+    .toFilePath();
+
+const String mainScript = 'pkg/vm/bin/gen_kernel.dart';
+const String packagesFile = '.packages';
+
+void testCompile(List<String> args) async {
+  final compilerExitCode =
+      await runCompiler(createCompilerArgParser().parse(args), '');
+  expect(compilerExitCode, successExitCode);
+}
+
+main() {
+  Directory tempDir;
+  setUp(() {
+    var systemTempDir = Directory.systemTemp;
+    tempDir = systemTempDir.createTempSync('kernel_front_end_test');
+  });
+
+  tearDown(() {
+    tempDir.delete(recursive: true);
+  });
+
+  String outputDill() => new File('${tempDir.path}/foo.dill').path;
+
+  test('compile-simple', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--packages',
+      '$sdkDir/$packagesFile',
+      '--output',
+      outputDill(),
+      '$sdkDir/$mainScript',
+    ]);
+  });
+
+  test('compile-multi-root', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--filesystem-scheme',
+      'test-filesystem-scheme',
+      '--filesystem-root',
+      sdkDir,
+      '--packages',
+      'test-filesystem-scheme:///$packagesFile',
+      '--output',
+      outputDill(),
+      'test-filesystem-scheme:///$mainScript',
+    ]);
+  });
+
+  test('compile-package-split', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--packages',
+      '$sdkDir/$packagesFile',
+      '--output',
+      outputDill(),
+      '--split-output-by-packages',
+      '$sdkDir/$mainScript',
+    ]);
+  });
+
+  test('compile-bytecode', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--packages',
+      '$sdkDir/$packagesFile',
+      '--output',
+      outputDill(),
+      '--gen-bytecode',
+      '--drop-ast',
+      '$sdkDir/$mainScript',
+    ]);
+  });
+
+  test('compile-bytecode-package-split', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--packages',
+      '$sdkDir/$packagesFile',
+      '--output',
+      outputDill(),
+      '--gen-bytecode',
+      '--drop-ast',
+      '--split-output-by-packages',
+      '$sdkDir/$mainScript',
+    ]);
+  });
+}
diff --git a/pkg/vm/test/transformations/type_flow/types_test.dart b/pkg/vm/test/transformations/type_flow/types_test.dart
index 213b6d9..b317843 100644
--- a/pkg/vm/test/transformations/type_flow/types_test.dart
+++ b/pkg/vm/test/transformations/type_flow/types_test.dart
@@ -39,6 +39,8 @@
   Class get futureOrClass =>
       throw "futureOrClass not supported in the types test.";
   Class get futureClass => throw "futureClass not supported in the types test.";
+  Class get functionClass =>
+      throw "functionClass not supported in the types test.";
 }
 
 main() {
diff --git a/pkg/vm/testcases/bytecode/asserts.dart.expect b/pkg/vm/testcases/bytecode/asserts.dart.expect
index a7706b7..575ae5f 100644
--- a/pkg/vm/testcases/bytecode/asserts.dart.expect
+++ b/pkg/vm/testcases/bytecode/asserts.dart.expect
@@ -33,13 +33,13 @@
   CheckStack           0
   JumpIfNoAsserts      L1
   Push                 FP[-6]
-  InstanceCall         1, CP#1
+  DynamicCall          1, CP#1
   AssertBoolean        0
   JumpIfTrue           L1
   PushInt              0
   PushInt              0
   Push                 FP[-5]
-  InstanceCall         1, CP#2
+  DynamicCall          1, CP#2
   PushConstant         CP#4
   IndirectStaticCall   3, CP#3
   Drop1
diff --git a/pkg/vm/testcases/bytecode/async.dart.expect b/pkg/vm/testcases/bytecode/async.dart.expect
index db9690f..115e062 100644
--- a/pkg/vm/testcases/bytecode/async.dart.expect
+++ b/pkg/vm/testcases/bytecode/async.dart.expect
@@ -7,20 +7,20 @@
 Bytecode {
   Entry                3
   CheckStack           0
-  Allocate             CP#19
+  Allocate             CP#21
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#20
-  Push                 r2
-  PushNull
   StoreFieldTOS        CP#22
   Push                 r2
-  PushConstant         CP#24
-  StoreFieldTOS        CP#25
+  PushNull
+  StoreFieldTOS        CP#24
+  Push                 r2
+  PushConstant         CP#26
+  StoreFieldTOS        CP#27
   Push                 r2
   PushConstant         CP#0
-  StoreFieldTOS        CP#27
+  StoreFieldTOS        CP#29
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
@@ -33,36 +33,38 @@
   [3] = Type dart:async::Future < dart:core::int >
   [4] = String 'x'
   [5] = SubtypeTestCache
-  [6] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::Null]
-  [7] = ArgDesc num-args 1, num-type-args 0, names []
-  [8] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#7
-  [9] = ClosureFunction 1
-  [10] = Null
-  [11] = ArgDesc num-args 4, num-type-args 0, names []
-  [12] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#11
-  [13] = ArgDesc num-args 2, num-type-args 0, names []
-  [14] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#13
-  [15] = Type dynamic
-  [16] = ArgDesc num-args 3, num-type-args 0, names []
-  [17] = ICData target-name 'completeError', arg-desc CP#16
-  [18] = EndClosureFunctionScope
-  [19] = Class dart:core::_Closure
-  [20] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [21] = Reserved
-  [22] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [6] = Class dart:async::_AsyncAwaitCompleter
+  [7] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::Null]
+  [8] = ArgDesc num-args 1, num-type-args 0, names []
+  [9] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#8
+  [10] = ClosureFunction 1
+  [11] = Null
+  [12] = ArgDesc num-args 4, num-type-args 0, names []
+  [13] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#12
+  [14] = ArgDesc num-args 2, num-type-args 0, names []
+  [15] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#14
+  [16] = Type dynamic
+  [17] = ArgDesc num-args 3, num-type-args 0, names []
+  [18] = InterfaceCall target-name 'completeError', arg-desc CP#17
+  [19] = Reserved
+  [20] = EndClosureFunctionScope
+  [21] = Class dart:core::_Closure
+  [22] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
   [23] = Reserved
-  [24] = EmptyTypeArguments
-  [25] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [26] = Reserved
-  [27] = InstanceField dart:core::_Closure::_function (field)
+  [24] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [25] = Reserved
+  [26] = EmptyTypeArguments
+  [27] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
   [28] = Reserved
-  [29] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#7
-  [30] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#7
-  [31] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#7
-  [32] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
-  [33] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#13
-  [34] = ICData get target-name 'get:future', arg-desc CP#7
-  [35] = EndClosureFunctionScope
+  [29] = InstanceField dart:core::_Closure::_function (field)
+  [30] = Reserved
+  [31] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#8
+  [32] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#8
+  [33] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#8
+  [34] = ICData dynamic target-name 'start', arg-desc CP#14
+  [35] = InterfaceCall get target-name 'get:future', arg-desc CP#8
+  [36] = Reserved
+  [37] = EndClosureFunctionScope
 }
 Closure #lib::asyncInFieldInitializer (field)::<anonymous closure> (dart:async::Future < dart:core::int > x) -> dart:async::Future < dart:core::Null >
 ClosureBytecode {
@@ -84,15 +86,20 @@
   AssertAssignable     0, CP#5
   Drop1
   Push                 r0
+  PushConstant         CP#7
   PushConstant         CP#6
-  PushConstant         CP#8
-  IndirectStaticCall   1, CP#7
+  AllocateT
+  StoreLocal           r2
+  Push                 r2
+  PushConstant         CP#9
+  IndirectStaticCall   1, CP#8
+  Drop1
   StoreContextVar      0, 1
   Push                 r0
   PushNull
   StoreContextVar      0, 2
   PushNull
-  PopLocal             r2
+  PopLocal             r3
   Push                 r0
   PushNull
   StoreContextVar      0, 3
@@ -109,50 +116,50 @@
   PushNull
   StoreContextVar      0, 7
   Push                 r0
-  Allocate             CP#19
-  StoreLocal           r3
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#20
-  Push                 r3
+  Allocate             CP#21
+  StoreLocal           r2
+  Push                 r2
   PushNull
   StoreFieldTOS        CP#22
-  Push                 r3
-  PushConstant         CP#24
-  StoreFieldTOS        CP#25
-  Push                 r3
-  PushConstant         CP#9
+  Push                 r2
+  PushNull
+  StoreFieldTOS        CP#24
+  Push                 r2
+  PushConstant         CP#26
   StoreFieldTOS        CP#27
-  Push                 r3
+  Push                 r2
+  PushConstant         CP#10
+  StoreFieldTOS        CP#29
+  Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
   StoreContextVar      0, 8
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#29
-  IndirectStaticCall   1, CP#7
-  PopLocal             r2
+  PushConstant         CP#31
+  IndirectStaticCall   1, CP#8
+  PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#30
-  IndirectStaticCall   1, CP#7
+  PushConstant         CP#32
+  IndirectStaticCall   1, CP#8
   StoreContextVar      0, 3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#31
-  IndirectStaticCall   1, CP#7
+  PushConstant         CP#33
+  IndirectStaticCall   1, CP#8
   StoreContextVar      0, 4
-  PushConstant         CP#32
+  Push                 r0
+  LoadContextVar       0, 1
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#33
-  IndirectStaticCall   2, CP#13
+  DynamicCall          2, CP#34
   Drop1
   Push                 r0
   LoadContextVar       0, 1
-  InstanceCall         1, CP#34
+  InterfaceCall        1, CP#35
   ReturnTOS
 
 }
@@ -160,9 +167,9 @@
 Closure #lib::asyncInFieldInitializer (field)::Closure/0:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
 ClosureBytecode {
   EntryOptional        1, 3, 0
-  LoadConstant         r1, CP#10
-  LoadConstant         r2, CP#10
-  LoadConstant         r3, CP#10
+  LoadConstant         r1, CP#11
+  LoadConstant         r2, CP#11
+  LoadConstant         r3, CP#11
   Frame                6
   CheckStack           0
   Push                 r0
@@ -191,8 +198,8 @@
   LoadContextVar       0, 4
   Push                 r4
   LoadContextVar       0, 8
-  PushConstant         CP#12
-  IndirectStaticCall   4, CP#11
+  PushConstant         CP#13
+  IndirectStaticCall   4, CP#12
   PopLocal             r8
   PushNull
   ReturnTOS
@@ -209,8 +216,8 @@
   LoadContextVar       0, 1
   Push                 r4
   LoadContextVar       0, 2
-  PushConstant         CP#14
-  IndirectStaticCall   2, CP#13
+  PushConstant         CP#15
+  IndirectStaticCall   2, CP#14
   Drop1
   PushNull
   ReturnTOS
@@ -233,7 +240,7 @@
   LoadContextVar       0, 1
   Push                 r8
   Push                 r9
-  InstanceCall         3, CP#17
+  InterfaceCall        3, CP#18
   Drop1
   Jump                 L3
 L3:
@@ -247,7 +254,7 @@
 
 }
 ]static field (asy::Future<core::int>) → asy::Future<core::Null> asyncInFieldInitializer = (asy::Future<core::int> x) → asy::Future<core::Null> /* originally async */ {
-  final asy::Completer<core::Null> :async_completer = asy::Completer::sync<core::Null>();
+  final asy::_AsyncAwaitCompleter<core::Null> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Null>();
   asy::FutureOr<core::Null> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -271,7 +278,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 };
 [@vm.bytecode=
@@ -281,106 +288,113 @@
   AllocateContext      0, 4
   PopLocal             r0
   Push                 r0
+  PushConstant         CP#1
   PushConstant         CP#0
-  PushConstant         CP#2
-  IndirectStaticCall   1, CP#1
+  AllocateT
+  StoreLocal           r2
+  Push                 r2
+  PushConstant         CP#3
+  IndirectStaticCall   1, CP#2
+  Drop1
   StoreContextVar      0, 0
   Push                 r0
   PushNull
   StoreContextVar      0, 1
   PushNull
-  PopLocal             r2
-  PushNull
   PopLocal             r3
   PushNull
   PopLocal             r4
+  PushNull
+  PopLocal             r5
   Push                 r0
   PushInt              0
   StoreContextVar      0, 2
   Push                 r0
   PushNull
   StoreContextVar      0, 3
-  Allocate             CP#13
-  StoreLocal           r6
-  Push                 r6
-  PushNull
-  StoreFieldTOS        CP#14
-  Push                 r6
+  Allocate             CP#15
+  StoreLocal           r2
+  Push                 r2
   PushNull
   StoreFieldTOS        CP#16
-  Push                 r6
-  PushConstant         CP#18
-  StoreFieldTOS        CP#19
-  Push                 r6
-  PushConstant         CP#3
+  Push                 r2
+  PushNull
+  StoreFieldTOS        CP#18
+  Push                 r2
+  PushConstant         CP#20
   StoreFieldTOS        CP#21
-  Push                 r6
+  Push                 r2
+  PushConstant         CP#4
+  StoreFieldTOS        CP#23
+  Push                 r2
   Push                 r0
-  StoreFieldTOS        CP#5
-  PopLocal             r5
-  Push                 r5
-  PushConstant         CP#23
-  IndirectStaticCall   1, CP#1
-  PopLocal             r2
-  Push                 r5
-  PushConstant         CP#24
-  IndirectStaticCall   1, CP#1
-  PopLocal             r3
-  Push                 r5
+  StoreFieldTOS        CP#6
+  PopLocal             r6
+  Push                 r6
   PushConstant         CP#25
-  IndirectStaticCall   1, CP#1
-  PopLocal             r4
+  IndirectStaticCall   1, CP#2
+  PopLocal             r3
+  Push                 r6
   PushConstant         CP#26
-  Push                 r5
+  IndirectStaticCall   1, CP#2
+  PopLocal             r4
+  Push                 r6
   PushConstant         CP#27
-  IndirectStaticCall   2, CP#7
+  IndirectStaticCall   1, CP#2
+  PopLocal             r5
+  Push                 r0
+  LoadContextVar       0, 0
+  Push                 r6
+  DynamicCall          2, CP#28
   Drop1
   Push                 r0
   LoadContextVar       0, 0
-  InstanceCall         1, CP#28
+  InterfaceCall        1, CP#29
   ReturnTOS
 }
 ConstantPool {
-  [0] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::int]
-  [1] = ArgDesc num-args 1, num-type-args 0, names []
-  [2] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#1
-  [3] = ClosureFunction 0
-  [4] = Null
-  [5] = InstanceField dart:core::_Closure::_context (field)
-  [6] = Reserved
-  [7] = ArgDesc num-args 2, num-type-args 0, names []
-  [8] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#7
-  [9] = Type dynamic
-  [10] = ArgDesc num-args 3, num-type-args 0, names []
-  [11] = ICData target-name 'completeError', arg-desc CP#10
-  [12] = EndClosureFunctionScope
-  [13] = Class dart:core::_Closure
-  [14] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [15] = Reserved
-  [16] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [0] = Class dart:async::_AsyncAwaitCompleter
+  [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+  [2] = ArgDesc num-args 1, num-type-args 0, names []
+  [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+  [4] = ClosureFunction 0
+  [5] = Null
+  [6] = InstanceField dart:core::_Closure::_context (field)
+  [7] = Reserved
+  [8] = ArgDesc num-args 2, num-type-args 0, names []
+  [9] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#8
+  [10] = Type dynamic
+  [11] = ArgDesc num-args 3, num-type-args 0, names []
+  [12] = InterfaceCall target-name 'completeError', arg-desc CP#11
+  [13] = Reserved
+  [14] = EndClosureFunctionScope
+  [15] = Class dart:core::_Closure
+  [16] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
   [17] = Reserved
-  [18] = EmptyTypeArguments
-  [19] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [20] = Reserved
-  [21] = InstanceField dart:core::_Closure::_function (field)
+  [18] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [19] = Reserved
+  [20] = EmptyTypeArguments
+  [21] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
   [22] = Reserved
-  [23] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
-  [24] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
-  [25] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
-  [26] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
-  [27] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#7
-  [28] = ICData get target-name 'get:future', arg-desc CP#1
+  [23] = InstanceField dart:core::_Closure::_function (field)
+  [24] = Reserved
+  [25] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+  [26] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+  [27] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+  [28] = ICData dynamic target-name 'start', arg-desc CP#8
+  [29] = InterfaceCall get target-name 'get:future', arg-desc CP#2
+  [30] = Reserved
 }
 Closure #lib::foo:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
 ClosureBytecode {
   EntryOptional        1, 3, 0
-  LoadConstant         r1, CP#4
-  LoadConstant         r2, CP#4
-  LoadConstant         r3, CP#4
+  LoadConstant         r1, CP#5
+  LoadConstant         r2, CP#5
+  LoadConstant         r3, CP#5
   Frame                6
   CheckStack           0
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 2
@@ -399,8 +413,8 @@
   LoadContextVar       0, 0
   Push                 r4
   LoadContextVar       0, 1
-  PushConstant         CP#8
-  IndirectStaticCall   2, CP#7
+  PushConstant         CP#9
+  IndirectStaticCall   2, CP#8
   Drop1
   PushNull
   ReturnTOS
@@ -419,7 +433,7 @@
   LoadContextVar       0, 0
   Push                 r8
   Push                 r9
-  InstanceCall         3, CP#11
+  InterfaceCall        3, CP#12
   Drop1
   Jump                 L3
 L3:
@@ -430,7 +444,7 @@
 
 }
 ]static method foo() → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -453,7 +467,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 [@vm.bytecode=
@@ -469,15 +483,20 @@
   Push                 FP[-5]
   StoreContextVar      0, 1
   Push                 r0
+  PushConstant         CP#1
   PushConstant         CP#0
-  PushConstant         CP#2
-  IndirectStaticCall   1, CP#1
+  AllocateT
+  StoreLocal           r2
+  Push                 r2
+  PushConstant         CP#3
+  IndirectStaticCall   1, CP#2
+  Drop1
   StoreContextVar      0, 2
   Push                 r0
   PushNull
   StoreContextVar      0, 3
   PushNull
-  PopLocal             r2
+  PopLocal             r3
   Push                 r0
   PushNull
   StoreContextVar      0, 4
@@ -497,97 +516,100 @@
   PushNull
   StoreContextVar      0, 9
   Push                 r0
-  Allocate             CP#17
-  StoreLocal           r3
-  Push                 r3
+  Allocate             CP#20
+  StoreLocal           r2
+  Push                 r2
   PushNull
-  StoreFieldTOS        CP#18
-  Push                 r3
+  StoreFieldTOS        CP#21
+  Push                 r2
   PushNull
-  StoreFieldTOS        CP#20
-  Push                 r3
-  PushConstant         CP#22
   StoreFieldTOS        CP#23
-  Push                 r3
-  PushConstant         CP#3
-  StoreFieldTOS        CP#25
-  Push                 r3
+  Push                 r2
+  PushConstant         CP#25
+  StoreFieldTOS        CP#26
+  Push                 r2
+  PushConstant         CP#4
+  StoreFieldTOS        CP#28
+  Push                 r2
   Push                 r0
-  StoreFieldTOS        CP#5
+  StoreFieldTOS        CP#6
   StoreContextVar      0, 10
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#27
-  IndirectStaticCall   1, CP#1
-  PopLocal             r2
+  PushConstant         CP#30
+  IndirectStaticCall   1, CP#2
+  PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#28
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#31
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 4
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#29
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#32
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 5
-  PushConstant         CP#30
+  Push                 r0
+  LoadContextVar       0, 2
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#31
-  IndirectStaticCall   2, CP#10
+  DynamicCall          2, CP#33
   Drop1
   Push                 r0
   LoadContextVar       0, 2
-  InstanceCall         1, CP#32
+  InterfaceCall        1, CP#34
   ReturnTOS
 }
 ConstantPool {
-  [0] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::int]
-  [1] = ArgDesc num-args 1, num-type-args 0, names []
-  [2] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#1
-  [3] = ClosureFunction 0
-  [4] = Null
-  [5] = InstanceField dart:core::_Closure::_context (field)
-  [6] = Reserved
-  [7] = ArgDesc num-args 4, num-type-args 0, names []
-  [8] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [10] = ArgDesc num-args 2, num-type-args 0, names []
-  [11] = ICData target-name '+', arg-desc CP#10
-  [12] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#10
-  [13] = Type dynamic
-  [14] = ArgDesc num-args 3, num-type-args 0, names []
-  [15] = ICData target-name 'completeError', arg-desc CP#14
-  [16] = EndClosureFunctionScope
-  [17] = Class dart:core::_Closure
-  [18] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [19] = Reserved
-  [20] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [21] = Reserved
-  [22] = EmptyTypeArguments
-  [23] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [0] = Class dart:async::_AsyncAwaitCompleter
+  [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+  [2] = ArgDesc num-args 1, num-type-args 0, names []
+  [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+  [4] = ClosureFunction 0
+  [5] = Null
+  [6] = InstanceField dart:core::_Closure::_context (field)
+  [7] = Reserved
+  [8] = ArgDesc num-args 4, num-type-args 0, names []
+  [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [10] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [11] = ArgDesc num-args 2, num-type-args 0, names []
+  [12] = InterfaceCall target-name '+', arg-desc CP#11
+  [13] = Reserved
+  [14] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#11
+  [15] = Type dynamic
+  [16] = ArgDesc num-args 3, num-type-args 0, names []
+  [17] = InterfaceCall target-name 'completeError', arg-desc CP#16
+  [18] = Reserved
+  [19] = EndClosureFunctionScope
+  [20] = Class dart:core::_Closure
+  [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [22] = Reserved
+  [23] = InstanceField dart:core::_Closure::_function_type_arguments (field)
   [24] = Reserved
-  [25] = InstanceField dart:core::_Closure::_function (field)
-  [26] = Reserved
-  [27] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
-  [28] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
-  [29] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
-  [30] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
-  [31] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#10
-  [32] = ICData get target-name 'get:future', arg-desc CP#1
+  [25] = EmptyTypeArguments
+  [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [27] = Reserved
+  [28] = InstanceField dart:core::_Closure::_function (field)
+  [29] = Reserved
+  [30] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+  [31] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+  [32] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+  [33] = ICData dynamic target-name 'start', arg-desc CP#11
+  [34] = InterfaceCall get target-name 'get:future', arg-desc CP#2
+  [35] = Reserved
 }
 Closure #lib::simpleAsyncAwait:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
 ClosureBytecode {
   EntryOptional        1, 3, 0
-  LoadConstant         r1, CP#4
-  LoadConstant         r2, CP#4
-  LoadConstant         r3, CP#4
+  LoadConstant         r1, CP#5
+  LoadConstant         r2, CP#5
+  LoadConstant         r3, CP#5
   Frame                6
   CheckStack           0
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 6
@@ -612,8 +634,8 @@
   LoadContextVar       0, 5
   Push                 r4
   LoadContextVar       0, 10
-  PushConstant         CP#8
-  IndirectStaticCall   4, CP#7
+  PushConstant         CP#9
+  IndirectStaticCall   4, CP#8
   PopLocal             r8
   PushNull
   ReturnTOS
@@ -641,8 +663,8 @@
   LoadContextVar       0, 5
   Push                 r4
   LoadContextVar       0, 10
-  PushConstant         CP#9
-  IndirectStaticCall   4, CP#7
+  PushConstant         CP#10
+  IndirectStaticCall   4, CP#8
   PopLocal             r9
   PushNull
   ReturnTOS
@@ -657,7 +679,7 @@
   Push                 r4
   LoadContextVar       0, 9
   Push                 r1
-  InstanceCall         2, CP#11
+  InterfaceCall        2, CP#12
   StoreContextVar      0, 3
   Jump                 L4
 L4:
@@ -665,8 +687,8 @@
   LoadContextVar       0, 2
   Push                 r4
   LoadContextVar       0, 3
-  PushConstant         CP#12
-  IndirectStaticCall   2, CP#10
+  PushConstant         CP#14
+  IndirectStaticCall   2, CP#11
   Drop1
   PushNull
   ReturnTOS
@@ -674,7 +696,7 @@
 Try #0 handler:
   SetFrame             10
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 8
@@ -689,7 +711,7 @@
   LoadContextVar       0, 2
   Push                 r8
   Push                 r9
-  InstanceCall         3, CP#15
+  InterfaceCall        3, CP#17
   Drop1
   Jump                 L5
 L5:
@@ -706,7 +728,7 @@
 
 }
 ]static method simpleAsyncAwait(asy::Future<core::int> a, asy::Future<core::int> b) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -734,7 +756,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 [@vm.bytecode=
@@ -747,15 +769,20 @@
   Push                 FP[-5]
   StoreContextVar      0, 0
   Push                 r0
+  PushConstant         CP#1
   PushConstant         CP#0
-  PushConstant         CP#2
-  IndirectStaticCall   1, CP#1
+  AllocateT
+  StoreLocal           r2
+  Push                 r2
+  PushConstant         CP#3
+  IndirectStaticCall   1, CP#2
+  Drop1
   StoreContextVar      0, 1
   Push                 r0
   PushNull
   StoreContextVar      0, 2
   PushNull
-  PopLocal             r2
+  PopLocal             r3
   Push                 r0
   PushNull
   StoreContextVar      0, 3
@@ -778,102 +805,107 @@
   PushNull
   StoreContextVar      0, 9
   Push                 r0
-  Allocate             CP#22
-  StoreLocal           r3
-  Push                 r3
+  Allocate             CP#27
+  StoreLocal           r2
+  Push                 r2
   PushNull
-  StoreFieldTOS        CP#23
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#25
-  Push                 r3
-  PushConstant         CP#27
   StoreFieldTOS        CP#28
-  Push                 r3
-  PushConstant         CP#3
+  Push                 r2
+  PushNull
   StoreFieldTOS        CP#30
-  Push                 r3
+  Push                 r2
+  PushConstant         CP#32
+  StoreFieldTOS        CP#33
+  Push                 r2
+  PushConstant         CP#4
+  StoreFieldTOS        CP#35
+  Push                 r2
   Push                 r0
-  StoreFieldTOS        CP#5
+  StoreFieldTOS        CP#6
   StoreContextVar      0, 10
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#32
-  IndirectStaticCall   1, CP#1
-  PopLocal             r2
+  PushConstant         CP#37
+  IndirectStaticCall   1, CP#2
+  PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#33
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#38
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#34
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#39
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 4
-  PushConstant         CP#35
+  Push                 r0
+  LoadContextVar       0, 1
   Push                 r0
   LoadContextVar       0, 10
-  PushConstant         CP#36
-  IndirectStaticCall   2, CP#14
+  DynamicCall          2, CP#40
   Drop1
   Push                 r0
   LoadContextVar       0, 1
-  InstanceCall         1, CP#37
+  InterfaceCall        1, CP#41
   ReturnTOS
 }
 ConstantPool {
-  [0] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::int]
-  [1] = ArgDesc num-args 1, num-type-args 0, names []
-  [2] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#1
-  [3] = ClosureFunction 0
-  [4] = Null
-  [5] = InstanceField dart:core::_Closure::_context (field)
-  [6] = Reserved
-  [7] = ICData get target-name 'get:iterator', arg-desc CP#1
-  [8] = ICData target-name 'moveNext', arg-desc CP#1
-  [9] = ICData get target-name 'get:current', arg-desc CP#1
-  [10] = ArgDesc num-args 0, num-type-args 0, names []
-  [11] = StaticICData target '#lib::foo', arg-desc CP#10
-  [12] = ArgDesc num-args 4, num-type-args 0, names []
-  [13] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#12
-  [14] = ArgDesc num-args 2, num-type-args 0, names []
-  [15] = ICData target-name '+', arg-desc CP#14
-  [16] = ICData target-name '+', arg-desc CP#14
-  [17] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#14
-  [18] = Type dynamic
-  [19] = ArgDesc num-args 3, num-type-args 0, names []
-  [20] = ICData target-name 'completeError', arg-desc CP#19
-  [21] = EndClosureFunctionScope
-  [22] = Class dart:core::_Closure
-  [23] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [24] = Reserved
-  [25] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [26] = Reserved
-  [27] = EmptyTypeArguments
-  [28] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [0] = Class dart:async::_AsyncAwaitCompleter
+  [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+  [2] = ArgDesc num-args 1, num-type-args 0, names []
+  [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+  [4] = ClosureFunction 0
+  [5] = Null
+  [6] = InstanceField dart:core::_Closure::_context (field)
+  [7] = Reserved
+  [8] = InterfaceCall get target-name 'get:iterator', arg-desc CP#2
+  [9] = Reserved
+  [10] = InterfaceCall target-name 'moveNext', arg-desc CP#2
+  [11] = Reserved
+  [12] = InterfaceCall get target-name 'get:current', arg-desc CP#2
+  [13] = Reserved
+  [14] = ArgDesc num-args 0, num-type-args 0, names []
+  [15] = StaticICData target '#lib::foo', arg-desc CP#14
+  [16] = ArgDesc num-args 4, num-type-args 0, names []
+  [17] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#16
+  [18] = ArgDesc num-args 2, num-type-args 0, names []
+  [19] = InterfaceCall target-name '+', arg-desc CP#18
+  [20] = Reserved
+  [21] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#18
+  [22] = Type dynamic
+  [23] = ArgDesc num-args 3, num-type-args 0, names []
+  [24] = InterfaceCall target-name 'completeError', arg-desc CP#23
+  [25] = Reserved
+  [26] = EndClosureFunctionScope
+  [27] = Class dart:core::_Closure
+  [28] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
   [29] = Reserved
-  [30] = InstanceField dart:core::_Closure::_function (field)
+  [30] = InstanceField dart:core::_Closure::_function_type_arguments (field)
   [31] = Reserved
-  [32] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
-  [33] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
-  [34] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
-  [35] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
-  [36] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#14
-  [37] = ICData get target-name 'get:future', arg-desc CP#1
+  [32] = EmptyTypeArguments
+  [33] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [34] = Reserved
+  [35] = InstanceField dart:core::_Closure::_function (field)
+  [36] = Reserved
+  [37] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+  [38] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+  [39] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+  [40] = ICData dynamic target-name 'start', arg-desc CP#18
+  [41] = InterfaceCall get target-name 'get:future', arg-desc CP#2
+  [42] = Reserved
 }
 Closure #lib::loops:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
 ClosureBytecode {
   EntryOptional        1, 3, 0
-  LoadConstant         r1, CP#4
-  LoadConstant         r2, CP#4
-  LoadConstant         r3, CP#4
+  LoadConstant         r1, CP#5
+  LoadConstant         r2, CP#5
+  LoadConstant         r3, CP#5
   Frame                7
   CheckStack           0
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 5
@@ -913,7 +945,7 @@
   LoadContextParent
   LoadContextParent
   LoadContextVar       0, 0
-  InstanceCall         1, CP#7
+  InterfaceCall        1, CP#8
   PopLocal             r8
   Push                 r4
   Push                 r8
@@ -923,7 +955,7 @@
   Push                 r4
   LoadContextVar       2, 1
   StoreLocal           r8
-  InstanceCall         1, CP#8
+  InterfaceCall        1, CP#10
   JumpIfFalse          L3
   AllocateContext      3, 1
   StoreLocal           r5
@@ -933,7 +965,7 @@
   PopLocal             r4
   Push                 r4
   Push                 r8
-  InstanceCall         1, CP#9
+  InterfaceCall        1, CP#12
   StoreContextVar      3, 0
   Push                 r4
   LoadContextParent
@@ -967,8 +999,8 @@
   LoadContextParent
   Push                 r4
   StoreContextVar      0, 6
-  PushConstant         CP#11
-  IndirectStaticCall   0, CP#10
+  PushConstant         CP#15
+  IndirectStaticCall   0, CP#14
   Push                 r4
   LoadContextParent
   LoadContextParent
@@ -984,8 +1016,8 @@
   LoadContextParent
   LoadContextParent
   LoadContextVar       0, 10
-  PushConstant         CP#13
-  IndirectStaticCall   4, CP#12
+  PushConstant         CP#17
+  IndirectStaticCall   4, CP#16
   PopLocal             r10
   PushNull
   ReturnTOS
@@ -1010,8 +1042,8 @@
   LoadContextParent
   LoadContextVar       0, 8
   Push                 r1
-  InstanceCall         2, CP#15
-  InstanceCall         2, CP#16
+  InterfaceCall        2, CP#19
+  InterfaceCall        2, CP#19
   StoreContextVar      1, 0
   Push                 r4
   LoadContextParent
@@ -1070,8 +1102,8 @@
   LoadContextVar       0, 1
   Push                 r4
   LoadContextVar       0, 2
-  PushConstant         CP#17
-  IndirectStaticCall   2, CP#14
+  PushConstant         CP#21
+  IndirectStaticCall   2, CP#18
   Drop1
   PushNull
   ReturnTOS
@@ -1079,7 +1111,7 @@
 Try #0 handler:
   SetFrame             11
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 7
@@ -1094,7 +1126,7 @@
   LoadContextVar       0, 1
   Push                 r8
   Push                 r9
-  InstanceCall         3, CP#20
+  InterfaceCall        3, CP#24
   Drop1
   Jump                 L10
 L10:
@@ -1108,7 +1140,7 @@
 
 }
 ]static method loops(core::List<core::int> list) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -1146,7 +1178,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 [@vm.bytecode=
@@ -1165,15 +1197,20 @@
   Push                 FP[-5]
   StoreContextVar      0, 2
   Push                 r0
+  PushConstant         CP#1
   PushConstant         CP#0
-  PushConstant         CP#2
-  IndirectStaticCall   1, CP#1
+  AllocateT
+  StoreLocal           r2
+  Push                 r2
+  PushConstant         CP#3
+  IndirectStaticCall   1, CP#2
+  Drop1
   StoreContextVar      0, 3
   Push                 r0
   PushNull
   StoreContextVar      0, 4
   PushNull
-  PopLocal             r2
+  PopLocal             r3
   Push                 r0
   PushNull
   StoreContextVar      0, 5
@@ -1206,81 +1243,81 @@
   StoreContextVar      0, 14
   Push                 r0
   Allocate             CP#30
-  StoreLocal           r3
-  Push                 r3
+  StoreLocal           r2
+  Push                 r2
   PushNull
   StoreFieldTOS        CP#31
-  Push                 r3
+  Push                 r2
   PushNull
   StoreFieldTOS        CP#33
-  Push                 r3
+  Push                 r2
   PushConstant         CP#35
   StoreFieldTOS        CP#36
-  Push                 r3
-  PushConstant         CP#3
+  Push                 r2
+  PushConstant         CP#4
   StoreFieldTOS        CP#38
-  Push                 r3
+  Push                 r2
   Push                 r0
-  StoreFieldTOS        CP#5
+  StoreFieldTOS        CP#6
   StoreContextVar      0, 15
   Push                 r0
   LoadContextVar       0, 15
   PushConstant         CP#40
-  IndirectStaticCall   1, CP#1
-  PopLocal             r2
+  IndirectStaticCall   1, CP#2
+  PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 15
   PushConstant         CP#41
-  IndirectStaticCall   1, CP#1
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 5
   Push                 r0
   Push                 r0
   LoadContextVar       0, 15
   PushConstant         CP#42
-  IndirectStaticCall   1, CP#1
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 6
-  PushConstant         CP#43
+  Push                 r0
+  LoadContextVar       0, 3
   Push                 r0
   LoadContextVar       0, 15
-  PushConstant         CP#44
-  IndirectStaticCall   2, CP#9
+  DynamicCall          2, CP#43
   Drop1
   Push                 r0
   LoadContextVar       0, 3
-  InstanceCall         1, CP#45
+  InterfaceCall        1, CP#44
   ReturnTOS
 }
 ConstantPool {
-  [0] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::int]
-  [1] = ArgDesc num-args 1, num-type-args 0, names []
-  [2] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#1
-  [3] = ClosureFunction 0
-  [4] = Null
-  [5] = InstanceField dart:core::_Closure::_context (field)
-  [6] = Reserved
-  [7] = ArgDesc num-args 4, num-type-args 0, names []
-  [8] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [9] = ArgDesc num-args 2, num-type-args 0, names []
-  [10] = ICData target-name '+', arg-desc CP#9
-  [11] = Type dynamic
-  [12] = Type dart:core::Error
-  [13] = ICData target-name '_simpleInstanceOf', arg-desc CP#9
-  [14] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [15] = ICData target-name '+', arg-desc CP#9
-  [16] = String 'fin'
-  [17] = StaticICData target 'dart:core::print', arg-desc CP#1
-  [18] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [19] = ICData target-name '+', arg-desc CP#9
-  [20] = StaticICData target 'dart:core::print', arg-desc CP#1
-  [21] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [22] = ICData target-name '+', arg-desc CP#9
-  [23] = StaticICData target 'dart:core::print', arg-desc CP#1
-  [24] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [25] = ICData target-name '+', arg-desc CP#9
-  [26] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#9
-  [27] = ArgDesc num-args 3, num-type-args 0, names []
-  [28] = ICData target-name 'completeError', arg-desc CP#27
+  [0] = Class dart:async::_AsyncAwaitCompleter
+  [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+  [2] = ArgDesc num-args 1, num-type-args 0, names []
+  [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+  [4] = ClosureFunction 0
+  [5] = Null
+  [6] = InstanceField dart:core::_Closure::_context (field)
+  [7] = Reserved
+  [8] = ArgDesc num-args 4, num-type-args 0, names []
+  [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [10] = ArgDesc num-args 2, num-type-args 0, names []
+  [11] = InterfaceCall target-name '+', arg-desc CP#10
+  [12] = Reserved
+  [13] = Type dynamic
+  [14] = Type dart:core::Error
+  [15] = InterfaceCall target-name '_simpleInstanceOf', arg-desc CP#10
+  [16] = Reserved
+  [17] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [18] = String 'fin'
+  [19] = StaticICData target 'dart:core::print', arg-desc CP#2
+  [20] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [21] = StaticICData target 'dart:core::print', arg-desc CP#2
+  [22] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [23] = StaticICData target 'dart:core::print', arg-desc CP#2
+  [24] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [25] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#10
+  [26] = ArgDesc num-args 3, num-type-args 0, names []
+  [27] = InterfaceCall target-name 'completeError', arg-desc CP#26
+  [28] = Reserved
   [29] = EndClosureFunctionScope
   [30] = Class dart:core::_Closure
   [31] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
@@ -1292,23 +1329,23 @@
   [37] = Reserved
   [38] = InstanceField dart:core::_Closure::_function (field)
   [39] = Reserved
-  [40] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
-  [41] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
-  [42] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
-  [43] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
-  [44] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#9
-  [45] = ICData get target-name 'get:future', arg-desc CP#1
+  [40] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+  [41] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+  [42] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+  [43] = ICData dynamic target-name 'start', arg-desc CP#10
+  [44] = InterfaceCall get target-name 'get:future', arg-desc CP#2
+  [45] = Reserved
 }
 Closure #lib::tryCatchRethrow:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
 ClosureBytecode {
   EntryOptional        1, 3, 0
-  LoadConstant         r1, CP#4
-  LoadConstant         r2, CP#4
-  LoadConstant         r3, CP#4
+  LoadConstant         r1, CP#5
+  LoadConstant         r2, CP#5
+  LoadConstant         r3, CP#5
   Frame                10
   CheckStack           0
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 7
@@ -1363,8 +1400,8 @@
   Push                 r4
   LoadContextParent
   LoadContextVar       0, 15
-  PushConstant         CP#8
-  IndirectStaticCall   4, CP#7
+  PushConstant         CP#9
+  IndirectStaticCall   4, CP#8
   PopLocal             r13
   PushNull
   ReturnTOS
@@ -1380,14 +1417,14 @@
   LoadContextParent
   LoadContextVar       0, 14
   Push                 r1
-  InstanceCall         2, CP#10
+  InterfaceCall        2, CP#11
   StoreContextVar      1, 0
   Jump                 L3
 Try #2 end:
 Try #2 handler:
   SetFrame             14
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 11
@@ -1407,8 +1444,8 @@
   StoreContextVar      1, 1
   Push                 r4
   LoadContextVar       1, 1
-  PushConstant         CP#12
-  InstanceCall         2, CP#13
+  PushConstant         CP#14
+  InterfaceCall        2, CP#15
   JumpIfFalse          L4
   Push                 r4
   LoadContextParent
@@ -1441,8 +1478,8 @@
   Push                 r4
   LoadContextParent
   LoadContextVar       0, 15
-  PushConstant         CP#14
-  IndirectStaticCall   4, CP#7
+  PushConstant         CP#17
+  IndirectStaticCall   4, CP#8
   PopLocal             r13
   PushNull
   ReturnTOS
@@ -1458,7 +1495,7 @@
   LoadContextParent
   LoadContextVar       0, 14
   Push                 r1
-  InstanceCall         2, CP#15
+  InterfaceCall        2, CP#11
   StoreContextVar      1, 0
   Push                 r4
   LoadContextParent
@@ -1473,7 +1510,7 @@
 Try #1 handler:
   SetFrame             14
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 10
@@ -1488,9 +1525,9 @@
   LoadContextParent
   Push                 r9
   StoreContextVar      0, 13
-  PushConstant         CP#16
-  PushConstant         CP#17
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#18
+  PushConstant         CP#19
+  IndirectStaticCall   1, CP#2
   Drop1
   Push                 r4
   LoadContextParent
@@ -1517,8 +1554,8 @@
   Push                 r4
   LoadContextParent
   LoadContextVar       0, 15
-  PushConstant         CP#18
-  IndirectStaticCall   4, CP#7
+  PushConstant         CP#20
+  IndirectStaticCall   4, CP#8
   PopLocal             r12
   PushNull
   ReturnTOS
@@ -1534,7 +1571,7 @@
   LoadContextParent
   LoadContextVar       0, 14
   Push                 r1
-  InstanceCall         2, CP#19
+  InterfaceCall        2, CP#11
   StoreContextVar      1, 0
   Push                 r4
   LoadContextParent
@@ -1547,14 +1584,14 @@
   Jump                 L9
 L5:
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 10
   PopLocal             r4
-  PushConstant         CP#16
-  PushConstant         CP#20
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#18
+  PushConstant         CP#21
+  IndirectStaticCall   1, CP#2
   Drop1
   Push                 r4
   LoadContextParent
@@ -1581,8 +1618,8 @@
   Push                 r4
   LoadContextParent
   LoadContextVar       0, 15
-  PushConstant         CP#21
-  IndirectStaticCall   4, CP#7
+  PushConstant         CP#22
+  IndirectStaticCall   4, CP#8
   PopLocal             r12
   PushNull
   ReturnTOS
@@ -1598,7 +1635,7 @@
   LoadContextParent
   LoadContextVar       0, 14
   Push                 r1
-  InstanceCall         2, CP#22
+  InterfaceCall        2, CP#11
   StoreContextVar      1, 0
   Push                 r4
   LoadContextParent
@@ -1611,14 +1648,14 @@
   Jump                 L9
 L7:
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 10
   PopLocal             r4
-  PushConstant         CP#16
+  PushConstant         CP#18
   PushConstant         CP#23
-  IndirectStaticCall   1, CP#1
+  IndirectStaticCall   1, CP#2
   Drop1
   Push                 r4
   LoadContextParent
@@ -1646,7 +1683,7 @@
   LoadContextParent
   LoadContextVar       0, 15
   PushConstant         CP#24
-  IndirectStaticCall   4, CP#7
+  IndirectStaticCall   4, CP#8
   PopLocal             r12
   PushNull
   ReturnTOS
@@ -1662,7 +1699,7 @@
   LoadContextParent
   LoadContextVar       0, 14
   Push                 r1
-  InstanceCall         2, CP#25
+  InterfaceCall        2, CP#11
   StoreContextVar      1, 0
   Push                 r4
   LoadContextParent
@@ -1678,8 +1715,8 @@
   LoadContextVar       0, 3
   Push                 r4
   LoadContextVar       0, 4
-  PushConstant         CP#26
-  IndirectStaticCall   2, CP#9
+  PushConstant         CP#25
+  IndirectStaticCall   2, CP#10
   Drop1
   PushNull
   ReturnTOS
@@ -1687,7 +1724,7 @@
 Try #0 handler:
   SetFrame             14
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 9
@@ -1702,7 +1739,7 @@
   LoadContextVar       0, 3
   Push                 r8
   Push                 r9
-  InstanceCall         3, CP#28
+  InterfaceCall        3, CP#27
   Drop1
   Jump                 L12
 L12:
@@ -1728,7 +1765,7 @@
 
 }
 ]static method tryCatchRethrow(asy::Future<core::int> a, asy::Future<core::int> b, asy::Future<core::int> c) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -1780,7 +1817,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 [@vm.bytecode=
@@ -1795,20 +1832,20 @@
   Push                 r0
   PushInt              3
   StoreContextVar      0, 1
-  Allocate             CP#19
+  Allocate             CP#21
   StoreLocal           r3
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#20
-  Push                 r3
-  PushNull
   StoreFieldTOS        CP#22
   Push                 r3
-  PushConstant         CP#24
-  StoreFieldTOS        CP#25
+  PushNull
+  StoreFieldTOS        CP#24
+  Push                 r3
+  PushConstant         CP#26
+  StoreFieldTOS        CP#27
   Push                 r3
   PushConstant         CP#0
-  StoreFieldTOS        CP#27
+  StoreFieldTOS        CP#29
   Push                 r3
   Push                 r0
   StoreFieldTOS        CP#1
@@ -1820,39 +1857,41 @@
   [0] = ClosureFunction 0
   [1] = InstanceField dart:core::_Closure::_context (field)
   [2] = Reserved
-  [3] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::int]
-  [4] = ArgDesc num-args 1, num-type-args 0, names []
-  [5] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#4
-  [6] = ClosureFunction 1
-  [7] = Null
-  [8] = ArgDesc num-args 4, num-type-args 0, names []
-  [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
-  [10] = Type dynamic
-  [11] = String 'fin'
-  [12] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [13] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [14] = ArgDesc num-args 2, num-type-args 0, names []
-  [15] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#14
-  [16] = ArgDesc num-args 3, num-type-args 0, names []
-  [17] = ICData target-name 'completeError', arg-desc CP#16
-  [18] = EndClosureFunctionScope
-  [19] = Class dart:core::_Closure
-  [20] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [21] = Reserved
-  [22] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [3] = Class dart:async::_AsyncAwaitCompleter
+  [4] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+  [5] = ArgDesc num-args 1, num-type-args 0, names []
+  [6] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#5
+  [7] = ClosureFunction 1
+  [8] = Null
+  [9] = ArgDesc num-args 4, num-type-args 0, names []
+  [10] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#9
+  [11] = Type dynamic
+  [12] = String 'fin'
+  [13] = StaticICData target 'dart:core::print', arg-desc CP#5
+  [14] = StaticICData target 'dart:core::print', arg-desc CP#5
+  [15] = ArgDesc num-args 2, num-type-args 0, names []
+  [16] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#15
+  [17] = ArgDesc num-args 3, num-type-args 0, names []
+  [18] = InterfaceCall target-name 'completeError', arg-desc CP#17
+  [19] = Reserved
+  [20] = EndClosureFunctionScope
+  [21] = Class dart:core::_Closure
+  [22] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
   [23] = Reserved
-  [24] = EmptyTypeArguments
-  [25] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [26] = Reserved
-  [27] = InstanceField dart:core::_Closure::_function (field)
+  [24] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [25] = Reserved
+  [26] = EmptyTypeArguments
+  [27] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
   [28] = Reserved
-  [29] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#4
-  [30] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#4
-  [31] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#4
-  [32] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
-  [33] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#14
-  [34] = ICData get target-name 'get:future', arg-desc CP#4
-  [35] = EndClosureFunctionScope
+  [29] = InstanceField dart:core::_Closure::_function (field)
+  [30] = Reserved
+  [31] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#5
+  [32] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#5
+  [33] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#5
+  [34] = ICData dynamic target-name 'start', arg-desc CP#15
+  [35] = InterfaceCall get target-name 'get:future', arg-desc CP#5
+  [36] = Reserved
+  [37] = EndClosureFunctionScope
 }
 Closure #lib::closure::nested () -> dart:async::Future < dart:core::int >
 ClosureBytecode {
@@ -1868,15 +1907,20 @@
   StoreContextParent
   PopLocal             r0
   Push                 r0
+  PushConstant         CP#4
   PushConstant         CP#3
-  PushConstant         CP#5
-  IndirectStaticCall   1, CP#4
+  AllocateT
+  StoreLocal           r2
+  Push                 r2
+  PushConstant         CP#6
+  IndirectStaticCall   1, CP#5
+  Drop1
   StoreContextVar      1, 0
   Push                 r0
   PushNull
   StoreContextVar      1, 1
   PushNull
-  PopLocal             r2
+  PopLocal             r3
   Push                 r0
   PushNull
   StoreContextVar      1, 2
@@ -1896,50 +1940,50 @@
   PushNull
   StoreContextVar      1, 7
   Push                 r0
-  Allocate             CP#19
-  StoreLocal           r3
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#20
-  Push                 r3
+  Allocate             CP#21
+  StoreLocal           r2
+  Push                 r2
   PushNull
   StoreFieldTOS        CP#22
-  Push                 r3
-  PushConstant         CP#24
-  StoreFieldTOS        CP#25
-  Push                 r3
-  PushConstant         CP#6
+  Push                 r2
+  PushNull
+  StoreFieldTOS        CP#24
+  Push                 r2
+  PushConstant         CP#26
   StoreFieldTOS        CP#27
-  Push                 r3
+  Push                 r2
+  PushConstant         CP#7
+  StoreFieldTOS        CP#29
+  Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
   StoreContextVar      1, 8
   Push                 r0
   LoadContextVar       1, 8
-  PushConstant         CP#29
-  IndirectStaticCall   1, CP#4
-  PopLocal             r2
+  PushConstant         CP#31
+  IndirectStaticCall   1, CP#5
+  PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       1, 8
-  PushConstant         CP#30
-  IndirectStaticCall   1, CP#4
+  PushConstant         CP#32
+  IndirectStaticCall   1, CP#5
   StoreContextVar      1, 2
   Push                 r0
   Push                 r0
   LoadContextVar       1, 8
-  PushConstant         CP#31
-  IndirectStaticCall   1, CP#4
+  PushConstant         CP#33
+  IndirectStaticCall   1, CP#5
   StoreContextVar      1, 3
-  PushConstant         CP#32
+  Push                 r0
+  LoadContextVar       1, 0
   Push                 r0
   LoadContextVar       1, 8
-  PushConstant         CP#33
-  IndirectStaticCall   2, CP#14
+  DynamicCall          2, CP#34
   Drop1
   Push                 r0
   LoadContextVar       1, 0
-  InstanceCall         1, CP#34
+  InterfaceCall        1, CP#35
   ReturnTOS
 
 }
@@ -1947,9 +1991,9 @@
 Closure #lib::closure::Closure/0:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
 ClosureBytecode {
   EntryOptional        1, 3, 0
-  LoadConstant         r1, CP#7
-  LoadConstant         r2, CP#7
-  LoadConstant         r3, CP#7
+  LoadConstant         r1, CP#8
+  LoadConstant         r2, CP#8
+  LoadConstant         r3, CP#8
   Frame                8
   CheckStack           0
   Push                 r0
@@ -2004,8 +2048,8 @@
   Push                 r4
   LoadContextParent
   LoadContextVar       1, 8
-  PushConstant         CP#9
-  IndirectStaticCall   4, CP#8
+  PushConstant         CP#10
+  IndirectStaticCall   4, CP#9
   PopLocal             r11
   PushNull
   ReturnTOS
@@ -2041,9 +2085,9 @@
   PopLocal             r4
   MoveSpecial          exception, r8
   MoveSpecial          stackTrace, r9
-  PushConstant         CP#11
   PushConstant         CP#12
-  IndirectStaticCall   1, CP#4
+  PushConstant         CP#13
+  IndirectStaticCall   1, CP#5
   Drop1
   Push                 r8
   Push                 r9
@@ -2055,9 +2099,9 @@
   Push                 r4
   LoadContextVar       1, 7
   PopLocal             r4
-  PushConstant         CP#11
-  PushConstant         CP#13
-  IndirectStaticCall   1, CP#4
+  PushConstant         CP#12
+  PushConstant         CP#14
+  IndirectStaticCall   1, CP#5
   Drop1
   Push                 r4
   LoadContextParent
@@ -2068,8 +2112,8 @@
   LoadContextVar       1, 0
   Push                 r4
   LoadContextVar       1, 1
-  PushConstant         CP#15
-  IndirectStaticCall   2, CP#14
+  PushConstant         CP#16
+  IndirectStaticCall   2, CP#15
   Drop1
   PushNull
   ReturnTOS
@@ -2092,7 +2136,7 @@
   LoadContextVar       1, 0
   Push                 r8
   Push                 r9
-  InstanceCall         3, CP#17
+  InterfaceCall        3, CP#18
   Drop1
   Jump                 L5
 L5:
@@ -2108,7 +2152,7 @@
 ]static method closure(asy::Future<core::int> a) → dynamic {
   core::int x = 3;
   function nested() → asy::Future<core::int> /* originally async */ {
-    final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
     asy::FutureOr<core::int> :return_value;
     dynamic :async_stack_trace;
     dynamic :async_op_then;
@@ -2142,7 +2186,7 @@
     :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
     :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
     :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    asy::Future::microtask<dynamic>(:async_op);
+    :async_completer.start(:async_op);
     return :async_completer.{asy::Completer::future};
   }
   return nested;
@@ -2157,15 +2201,20 @@
   Push                 FP[-5]
   StoreContextVar      0, 0
   Push                 r0
+  PushConstant         CP#1
   PushConstant         CP#0
-  PushConstant         CP#2
-  IndirectStaticCall   1, CP#1
+  AllocateT
+  StoreLocal           r2
+  Push                 r2
+  PushConstant         CP#3
+  IndirectStaticCall   1, CP#2
+  Drop1
   StoreContextVar      0, 1
   Push                 r0
   PushNull
   StoreContextVar      0, 2
   PushNull
-  PopLocal             r2
+  PopLocal             r3
   Push                 r0
   PushNull
   StoreContextVar      0, 3
@@ -2182,97 +2231,100 @@
   PushNull
   StoreContextVar      0, 7
   Push                 r0
-  Allocate             CP#17
-  StoreLocal           r3
-  Push                 r3
+  Allocate             CP#20
+  StoreLocal           r2
+  Push                 r2
   PushNull
-  StoreFieldTOS        CP#18
-  Push                 r3
+  StoreFieldTOS        CP#21
+  Push                 r2
   PushNull
-  StoreFieldTOS        CP#20
-  Push                 r3
-  PushConstant         CP#22
   StoreFieldTOS        CP#23
-  Push                 r3
-  PushConstant         CP#3
-  StoreFieldTOS        CP#25
-  Push                 r3
+  Push                 r2
+  PushConstant         CP#25
+  StoreFieldTOS        CP#26
+  Push                 r2
+  PushConstant         CP#4
+  StoreFieldTOS        CP#28
+  Push                 r2
   Push                 r0
-  StoreFieldTOS        CP#5
+  StoreFieldTOS        CP#6
   StoreContextVar      0, 8
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#27
-  IndirectStaticCall   1, CP#1
-  PopLocal             r2
+  PushConstant         CP#30
+  IndirectStaticCall   1, CP#2
+  PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#28
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#31
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#29
-  IndirectStaticCall   1, CP#1
+  PushConstant         CP#32
+  IndirectStaticCall   1, CP#2
   StoreContextVar      0, 4
-  PushConstant         CP#30
+  Push                 r0
+  LoadContextVar       0, 1
   Push                 r0
   LoadContextVar       0, 8
-  PushConstant         CP#31
-  IndirectStaticCall   2, CP#9
+  DynamicCall          2, CP#33
   Drop1
   Push                 r0
   LoadContextVar       0, 1
-  InstanceCall         1, CP#32
+  InterfaceCall        1, CP#34
   ReturnTOS
 }
 ConstantPool {
-  [0] = TypeArgumentsForInstanceAllocation dart:async::Completer [dart:core::int]
-  [1] = ArgDesc num-args 1, num-type-args 0, names []
-  [2] = StaticICData target 'dart:async::Completer::sync (constructor)', arg-desc CP#1
-  [3] = ClosureFunction 0
-  [4] = Null
-  [5] = InstanceField dart:core::_Closure::_context (field)
-  [6] = Reserved
-  [7] = ArgDesc num-args 4, num-type-args 0, names []
-  [8] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#7
-  [9] = ArgDesc num-args 2, num-type-args 0, names []
-  [10] = ICData target-name '==', arg-desc CP#9
-  [11] = ArgDesc num-args 3, num-type-args 0, names []
-  [12] = StaticICData target 'dart:core::_AssertionError::_throwNew', arg-desc CP#11
-  [13] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#9
-  [14] = Type dynamic
-  [15] = ICData target-name 'completeError', arg-desc CP#11
-  [16] = EndClosureFunctionScope
-  [17] = Class dart:core::_Closure
-  [18] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [19] = Reserved
-  [20] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [21] = Reserved
-  [22] = EmptyTypeArguments
-  [23] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [0] = Class dart:async::_AsyncAwaitCompleter
+  [1] = TypeArgumentsForInstanceAllocation dart:async::_AsyncAwaitCompleter [dart:core::int]
+  [2] = ArgDesc num-args 1, num-type-args 0, names []
+  [3] = StaticICData target 'dart:async::_AsyncAwaitCompleter::'' (constructor)', arg-desc CP#2
+  [4] = ClosureFunction 0
+  [5] = Null
+  [6] = InstanceField dart:core::_Closure::_context (field)
+  [7] = Reserved
+  [8] = ArgDesc num-args 4, num-type-args 0, names []
+  [9] = StaticICData target 'dart:async::_awaitHelper', arg-desc CP#8
+  [10] = ArgDesc num-args 2, num-type-args 0, names []
+  [11] = InterfaceCall target-name '==', arg-desc CP#10
+  [12] = Reserved
+  [13] = ArgDesc num-args 3, num-type-args 0, names []
+  [14] = StaticICData target 'dart:core::_AssertionError::_throwNew', arg-desc CP#13
+  [15] = StaticICData target 'dart:async::_completeOnAsyncReturn', arg-desc CP#10
+  [16] = Type dynamic
+  [17] = InterfaceCall target-name 'completeError', arg-desc CP#13
+  [18] = Reserved
+  [19] = EndClosureFunctionScope
+  [20] = Class dart:core::_Closure
+  [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [22] = Reserved
+  [23] = InstanceField dart:core::_Closure::_function_type_arguments (field)
   [24] = Reserved
-  [25] = InstanceField dart:core::_Closure::_function (field)
-  [26] = Reserved
-  [27] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#1
-  [28] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#1
-  [29] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#1
-  [30] = TypeArgumentsForInstanceAllocation dart:async::Future [dynamic]
-  [31] = StaticICData target 'dart:async::Future::microtask (constructor)', arg-desc CP#9
-  [32] = ICData get target-name 'get:future', arg-desc CP#1
+  [25] = EmptyTypeArguments
+  [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [27] = Reserved
+  [28] = InstanceField dart:core::_Closure::_function (field)
+  [29] = Reserved
+  [30] = StaticICData target 'dart:async::_asyncStackTraceHelper', arg-desc CP#2
+  [31] = StaticICData target 'dart:async::_asyncThenWrapperHelper', arg-desc CP#2
+  [32] = StaticICData target 'dart:async::_asyncErrorWrapperHelper', arg-desc CP#2
+  [33] = ICData dynamic target-name 'start', arg-desc CP#10
+  [34] = InterfaceCall get target-name 'get:future', arg-desc CP#2
+  [35] = Reserved
 }
 Closure #lib::testAssert:::async_op ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
 ClosureBytecode {
   EntryOptional        1, 3, 0
-  LoadConstant         r1, CP#4
-  LoadConstant         r2, CP#4
-  LoadConstant         r3, CP#4
+  LoadConstant         r1, CP#5
+  LoadConstant         r2, CP#5
+  LoadConstant         r3, CP#5
   Frame                6
   CheckStack           0
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 5
@@ -2298,8 +2350,8 @@
   LoadContextVar       0, 4
   Push                 r4
   LoadContextVar       0, 8
-  PushConstant         CP#8
-  IndirectStaticCall   4, CP#7
+  PushConstant         CP#9
+  IndirectStaticCall   4, CP#8
   PopLocal             r8
   PushNull
   ReturnTOS
@@ -2313,14 +2365,14 @@
   JumpIfNoAsserts      L2
   Push                 r1
   PushInt              42
-  InstanceCall         2, CP#10
+  InterfaceCall        2, CP#11
   AssertBoolean        0
   JumpIfTrue           L2
   PushInt              0
   PushInt              0
   PushNull
-  PushConstant         CP#12
-  IndirectStaticCall   3, CP#11
+  PushConstant         CP#14
+  IndirectStaticCall   3, CP#13
   Drop1
 L2:
   Push                 r4
@@ -2332,8 +2384,8 @@
   LoadContextVar       0, 1
   Push                 r4
   LoadContextVar       0, 2
-  PushConstant         CP#13
-  IndirectStaticCall   2, CP#9
+  PushConstant         CP#15
+  IndirectStaticCall   2, CP#10
   Drop1
   PushNull
   ReturnTOS
@@ -2341,7 +2393,7 @@
 Try #0 handler:
   SetFrame             10
   Push                 r0
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#6
   PopLocal             r4
   Push                 r4
   LoadContextVar       0, 7
@@ -2356,7 +2408,7 @@
   LoadContextVar       0, 1
   Push                 r8
   Push                 r9
-  InstanceCall         3, CP#15
+  InterfaceCall        3, CP#17
   Drop1
   Jump                 L5
 L5:
@@ -2370,7 +2422,7 @@
 
 }
 ]static method testAssert(asy::Future<core::int> a) → asy::Future<core::int> /* originally async */ {
-  final asy::Completer<core::int> :async_completer = asy::Completer::sync<core::int>();
+  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
   asy::FutureOr<core::int> :return_value;
   dynamic :async_stack_trace;
   dynamic :async_op_then;
@@ -2398,7 +2450,7 @@
   :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
   :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
   :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  asy::Future::microtask<dynamic>(:async_op);
+  :async_completer.start(:async_op);
   return :async_completer.{asy::Completer::future};
 }
 [@vm.bytecode=
diff --git a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
index 5b7b1bf..ed981f0 100644
--- a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
+++ b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
@@ -308,7 +308,7 @@
   JumpIfFalse          L3
   PushConstant         CP#1
   PushStatic           CP#1
-  InstanceCall         1, CP#3
+  DynamicCall          1, CP#3
   StoreStaticTOS       CP#0
 L3:
   PushConstant         CP#0
@@ -402,8 +402,8 @@
   Entry                0
   CheckStack           0
   Push                 FP[-5]
-  InstanceCall         1, CP#1
-  PushConstant         CP#2
+  InterfaceCall        1, CP#1
+  PushConstant         CP#3
   IndirectStaticCall   1, CP#0
   Drop1
   PushNull
@@ -411,8 +411,9 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData target-name 'toString', arg-desc CP#0
-  [2] = StaticICData target '#lib::_printString', arg-desc CP#0
+  [1] = InterfaceCall target-name 'toString', arg-desc CP#0
+  [2] = Reserved
+  [3] = StaticICData target '#lib::_printString', arg-desc CP#0
 }
 ]static method _print(dynamic arg) → void {
   self::_printString(arg.{core::Object::toString}());
@@ -474,13 +475,13 @@
   PushConstant         CP#0
   PushStatic           CP#0
   PushConstant         CP#1
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#3
   AssertBoolean        0
   JumpIfTrue           L1
   PushConstant         CP#0
   PushStatic           CP#0
-  PushConstant         CP#4
-  InstanceCall         2, CP#5
+  PushConstant         CP#5
+  InterfaceCall        2, CP#3
   AssertBoolean        0
   PopLocal             r1
   Jump                 L2
@@ -493,7 +494,7 @@
   PushConstant         CP#0
   PushStatic           CP#0
   PushConstant         CP#6
-  InstanceCall         2, CP#7
+  InterfaceCall        2, CP#3
   AssertBoolean        0
   PopLocal             r0
   Jump                 L4
@@ -505,35 +506,35 @@
   JumpIfFalse          L5
   PushConstant         CP#0
   PushStatic           CP#0
-  PushConstant         CP#9
-  IndirectStaticCall   1, CP#8
+  PushConstant         CP#8
+  IndirectStaticCall   1, CP#7
   ReturnTOS
 L5:
-  PushConstant         CP#11
-  IndirectStaticCall   0, CP#10
+  PushConstant         CP#10
+  IndirectStaticCall   0, CP#9
   PushNull
   PushConstant         CP#0
   PushStatic           CP#0
-  PushConstant         CP#12
+  PushConstant         CP#11
   IndirectStaticCall   2, CP#2
-  InstanceCall         2, CP#13
+  InterfaceCall        2, CP#12
   ReturnTOS
 }
 ConstantPool {
   [0] = StaticField #lib::_rawScript (field)
   [1] = String 'http:'
   [2] = ArgDesc num-args 2, num-type-args 0, names []
-  [3] = ICData target-name 'startsWith', arg-desc CP#2
-  [4] = String 'https:'
-  [5] = ICData target-name 'startsWith', arg-desc CP#2
+  [3] = InterfaceCall target-name 'startsWith', arg-desc CP#2
+  [4] = Reserved
+  [5] = String 'https:'
   [6] = String 'file:'
-  [7] = ICData target-name 'startsWith', arg-desc CP#2
-  [8] = ArgDesc num-args 1, num-type-args 0, names []
-  [9] = StaticICData target 'dart:core::Uri::parse', arg-desc CP#8
-  [10] = ArgDesc num-args 0, num-type-args 0, names []
-  [11] = StaticICData target 'dart:core::Uri::get:base', arg-desc CP#10
-  [12] = StaticICData target 'dart:core::_Uri::file (constructor)', arg-desc CP#2
-  [13] = ICData target-name 'resolveUri', arg-desc CP#2
+  [7] = ArgDesc num-args 1, num-type-args 0, names []
+  [8] = StaticICData target 'dart:core::Uri::parse', arg-desc CP#7
+  [9] = ArgDesc num-args 0, num-type-args 0, names []
+  [10] = StaticICData target 'dart:core::Uri::get:base', arg-desc CP#9
+  [11] = StaticICData target 'dart:core::_Uri::file (constructor)', arg-desc CP#2
+  [12] = InterfaceCall target-name 'resolveUri', arg-desc CP#2
+  [13] = Reserved
 }
 ]static method _scriptUri() → core::Uri {
   if(self::_rawScript.{core::String::startsWith}("http:") || self::_rawScript.{core::String::startsWith}("https:") || self::_rawScript.{core::String::startsWith}("file:")) {
diff --git a/pkg/vm/testcases/bytecode/closures.dart.expect b/pkg/vm/testcases/bytecode/closures.dart.expect
index cf8425c..f801084 100644
--- a/pkg/vm/testcases/bytecode/closures.dart.expect
+++ b/pkg/vm/testcases/bytecode/closures.dart.expect
@@ -213,11 +213,11 @@
   PopLocal             r3
   PushConstant         CP#44
   Push                 r3
-  InstanceCall         2, CP#45
+  DynamicCall          2, CP#45
   Drop1
   PushConstant         CP#46
   Push                 r3
-  InstanceCall         2, CP#47
+  DynamicCall          2, CP#47
   Drop1
   PushNull
   ReturnTOS
@@ -319,11 +319,11 @@
   PopLocal             r3
   PushConstant         CP#38
   Push                 r3
-  InstanceCall         2, CP#40
+  DynamicCall          2, CP#40
   Drop1
   PushConstant         CP#41
   Push                 r3
-  InstanceCall         2, CP#42
+  DynamicCall          2, CP#42
   Drop1
   PushNull
   ReturnTOS
@@ -376,7 +376,7 @@
   StoreFieldTOS        CP#1
   PopLocal             r3
   Push                 r3
-  InstanceCall         1, CP#36
+  DynamicCall          1, CP#36
   Drop1
   PushNull
   ReturnTOS
@@ -522,69 +522,69 @@
   Push                 r0
   PushInt              3
   StoreContextVar      0, 2
-  Allocate             CP#10
+  Allocate             CP#11
   StoreLocal           r4
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#12
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#14
   Push                 r4
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#16
+  StoreFieldTOS        CP#17
   Push                 r4
   PushConstant         CP#0
-  StoreFieldTOS        CP#18
+  StoreFieldTOS        CP#19
   Push                 r4
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r3
   Push                 r3
   PushInt              10
-  InstanceCall         2, CP#24
+  DynamicCall          2, CP#25
   Drop1
   Push                 r3
   PushInt              11
-  InstanceCall         2, CP#25
+  DynamicCall          2, CP#26
   Drop1
   Push                 r2
-  PushConstant         CP#26
-  IndirectStaticCall   1, CP#7
-  Drop1
-  Push                 r0
-  LoadContextVar       0, 2
   PushConstant         CP#27
   IndirectStaticCall   1, CP#7
   Drop1
   Push                 r0
-  LoadContextVar       0, 1
+  LoadContextVar       0, 2
   PushConstant         CP#28
   IndirectStaticCall   1, CP#7
   Drop1
   Push                 r0
+  LoadContextVar       0, 1
+  PushConstant         CP#29
+  IndirectStaticCall   1, CP#7
+  Drop1
+  Push                 r0
   PushInt              42
   StoreContextVar      0, 3
-  Allocate             CP#10
+  Allocate             CP#11
   StoreLocal           r3
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#12
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#14
   Push                 r3
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#16
+  StoreFieldTOS        CP#17
   Push                 r3
-  PushConstant         CP#29
-  StoreFieldTOS        CP#18
+  PushConstant         CP#30
+  StoreFieldTOS        CP#19
   Push                 r3
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r2
   Push                 r2
-  InstanceCall         1, CP#32
+  DynamicCall          1, CP#34
   Drop1
   PushNull
   ReturnTOS
@@ -598,31 +598,33 @@
   [5] = SubtypeTestCache
   [6] = ClosureFunction 1
   [7] = ArgDesc num-args 1, num-type-args 0, names []
-  [8] = ICData get target-name 'get:foo', arg-desc CP#7
-  [9] = EndClosureFunctionScope
-  [10] = Class dart:core::_Closure
-  [11] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [12] = Reserved
-  [13] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [14] = Reserved
-  [15] = EmptyTypeArguments
-  [16] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [17] = Reserved
-  [18] = InstanceField dart:core::_Closure::_function (field)
-  [19] = Reserved
-  [20] = ICData dynamic target-name 'call', arg-desc CP#7
-  [21] = StaticICData target 'dart:core::print', arg-desc CP#7
-  [22] = EndClosureFunctionScope
-  [23] = ArgDesc num-args 2, num-type-args 0, names []
-  [24] = ICData dynamic target-name 'call', arg-desc CP#23
-  [25] = ICData dynamic target-name 'call', arg-desc CP#23
-  [26] = StaticICData target 'dart:core::print', arg-desc CP#7
+  [8] = InterfaceCall get target-name 'get:foo', arg-desc CP#7
+  [9] = Reserved
+  [10] = EndClosureFunctionScope
+  [11] = Class dart:core::_Closure
+  [12] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [13] = Reserved
+  [14] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [15] = Reserved
+  [16] = EmptyTypeArguments
+  [17] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [18] = Reserved
+  [19] = InstanceField dart:core::_Closure::_function (field)
+  [20] = Reserved
+  [21] = ICData dynamic target-name 'call', arg-desc CP#7
+  [22] = StaticICData target 'dart:core::print', arg-desc CP#7
+  [23] = EndClosureFunctionScope
+  [24] = ArgDesc num-args 2, num-type-args 0, names []
+  [25] = ICData dynamic target-name 'call', arg-desc CP#24
+  [26] = ICData dynamic target-name 'call', arg-desc CP#24
   [27] = StaticICData target 'dart:core::print', arg-desc CP#7
   [28] = StaticICData target 'dart:core::print', arg-desc CP#7
-  [29] = ClosureFunction 2
-  [30] = ICData set target-name 'set:foo', arg-desc CP#23
-  [31] = EndClosureFunctionScope
-  [32] = ICData dynamic target-name 'call', arg-desc CP#7
+  [29] = StaticICData target 'dart:core::print', arg-desc CP#7
+  [30] = ClosureFunction 2
+  [31] = InterfaceCall set target-name 'set:foo', arg-desc CP#24
+  [32] = Reserved
+  [33] = EndClosureFunctionScope
+  [34] = ICData dynamic target-name 'call', arg-desc CP#7
 }
 Closure #lib::B::topLevel::<anonymous closure> (dart:core::int y) -> dart:core::Null
 ClosureBytecode {
@@ -663,30 +665,30 @@
   Push                 r0
   PushInt              4
   StoreContextVar      1, 1
-  Allocate             CP#10
+  Allocate             CP#11
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#12
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#14
   Push                 r2
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#16
+  StoreFieldTOS        CP#17
   Push                 r2
   PushConstant         CP#6
-  StoreFieldTOS        CP#18
+  StoreFieldTOS        CP#19
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r3
   Push                 r3
-  InstanceCall         1, CP#20
+  DynamicCall          1, CP#21
   Drop1
   Push                 r0
   LoadContextVar       1, 1
-  PushConstant         CP#21
+  PushConstant         CP#22
   IndirectStaticCall   1, CP#7
   Drop1
 L1:
@@ -714,7 +716,7 @@
   Push                 r0
   LoadContextParent
   LoadContextVar       0, 0
-  InstanceCall         1, CP#8
+  InterfaceCall        1, CP#8
   Push                 r0
   LoadContextVar       1, 0
   AddInt
@@ -735,7 +737,7 @@
   LoadContextVar       0, 0
   Push                 r0
   LoadContextVar       0, 3
-  InstanceCall         2, CP#30
+  InterfaceCall        2, CP#31
   Drop1
   PushNull
   ReturnTOS
@@ -855,7 +857,7 @@
   Push                 r3
   Push                 r0
   StoreFieldTOS        CP#5
-  InstanceCall         2, CP#18
+  InterfaceCall        2, CP#18
   Drop1
   Push                 r4
   Allocate             CP#8
@@ -870,12 +872,12 @@
   PushConstant         CP#13
   StoreFieldTOS        CP#14
   Push                 r3
-  PushConstant         CP#19
+  PushConstant         CP#20
   StoreFieldTOS        CP#16
   Push                 r3
   Push                 r0
   StoreFieldTOS        CP#5
-  InstanceCall         2, CP#24
+  InterfaceCall        2, CP#18
   Drop1
   Push                 r0
   CloneContext         1, 1
@@ -919,13 +921,13 @@
   [15] = Reserved
   [16] = InstanceField dart:core::_Closure::_function (field)
   [17] = Reserved
-  [18] = ICData target-name 'add', arg-desc CP#1
-  [19] = ClosureFunction 1
-  [20] = Type dart:core::int
-  [21] = String 'ii'
-  [22] = SubtypeTestCache
-  [23] = EndClosureFunctionScope
-  [24] = ICData target-name 'add', arg-desc CP#1
+  [18] = InterfaceCall target-name 'add', arg-desc CP#1
+  [19] = Reserved
+  [20] = ClosureFunction 1
+  [21] = Type dart:core::int
+  [22] = String 'ii'
+  [23] = SubtypeTestCache
+  [24] = EndClosureFunctionScope
 }
 Closure #lib::C::testForLoop::<anonymous closure> () -> dart:core::int
 ClosureBytecode {
@@ -952,11 +954,11 @@
   LoadFieldTOS         CP#5
   PopLocal             r0
   Push                 FP[-5]
-  PushConstant         CP#20
-  PushNull
-  PushNull
   PushConstant         CP#21
-  AssertAssignable     1, CP#22
+  PushNull
+  PushNull
+  PushConstant         CP#22
+  AssertAssignable     1, CP#23
   Drop1
   Push                 r0
   Push                 FP[-5]
@@ -985,43 +987,43 @@
   Entry                5
   CheckStack           0
   Push                 FP[-5]
-  InstanceCall         1, CP#1
+  InterfaceCall        1, CP#1
   PopLocal             r2
 L2:
   CheckStack           1
   Push                 r2
-  InstanceCall         1, CP#2
+  InterfaceCall        1, CP#3
   JumpIfFalse          L1
   AllocateContext      0, 1
   PopLocal             r0
   Push                 r0
   Push                 r2
-  InstanceCall         1, CP#3
+  InterfaceCall        1, CP#5
   StoreContextVar      0, 0
-  Allocate             CP#8
+  Allocate             CP#11
   StoreLocal           r4
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#9
+  StoreFieldTOS        CP#12
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#11
-  Push                 r4
-  PushConstant         CP#13
   StoreFieldTOS        CP#14
   Push                 r4
-  PushConstant         CP#4
-  StoreFieldTOS        CP#16
+  PushConstant         CP#16
+  StoreFieldTOS        CP#17
+  Push                 r4
+  PushConstant         CP#7
+  StoreFieldTOS        CP#19
   Push                 r4
   Push                 r0
-  StoreFieldTOS        CP#5
+  StoreFieldTOS        CP#8
   PopLocal             r3
   Push                 r3
-  InstanceCall         1, CP#18
+  DynamicCall          1, CP#21
   Drop1
   Push                 r0
   LoadContextVar       0, 0
-  PushConstant         CP#19
+  PushConstant         CP#22
   IndirectStaticCall   1, CP#0
   Drop1
   Push                 r0
@@ -1034,32 +1036,35 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData get target-name 'get:iterator', arg-desc CP#0
-  [2] = ICData target-name 'moveNext', arg-desc CP#0
-  [3] = ICData get target-name 'get:current', arg-desc CP#0
-  [4] = ClosureFunction 0
-  [5] = InstanceField dart:core::_Closure::_context (field)
+  [1] = InterfaceCall get target-name 'get:iterator', arg-desc CP#0
+  [2] = Reserved
+  [3] = InterfaceCall target-name 'moveNext', arg-desc CP#0
+  [4] = Reserved
+  [5] = InterfaceCall get target-name 'get:current', arg-desc CP#0
   [6] = Reserved
-  [7] = EndClosureFunctionScope
-  [8] = Class dart:core::_Closure
-  [9] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [10] = Reserved
-  [11] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [12] = Reserved
-  [13] = EmptyTypeArguments
-  [14] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [7] = ClosureFunction 0
+  [8] = InstanceField dart:core::_Closure::_context (field)
+  [9] = Reserved
+  [10] = EndClosureFunctionScope
+  [11] = Class dart:core::_Closure
+  [12] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [13] = Reserved
+  [14] = InstanceField dart:core::_Closure::_function_type_arguments (field)
   [15] = Reserved
-  [16] = InstanceField dart:core::_Closure::_function (field)
-  [17] = Reserved
-  [18] = ICData dynamic target-name 'call', arg-desc CP#0
-  [19] = StaticICData target 'dart:core::print', arg-desc CP#0
+  [16] = EmptyTypeArguments
+  [17] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [18] = Reserved
+  [19] = InstanceField dart:core::_Closure::_function (field)
+  [20] = Reserved
+  [21] = ICData dynamic target-name 'call', arg-desc CP#0
+  [22] = StaticICData target 'dart:core::print', arg-desc CP#0
 }
 Closure #lib::C::testForInLoop::<anonymous closure> () -> dart:core::Null
 ClosureBytecode {
   EntryFixed           1, 3
   CheckStack           0
   Push                 FP[-5]
-  LoadFieldTOS         CP#5
+  LoadFieldTOS         CP#8
   PopLocal             r0
   Push                 r0
   Push                 r0
@@ -1202,7 +1207,7 @@
   PopLocal             r2
   Push                 r2
   PushInt              3
-  InstanceCall         2, CP#18
+  DynamicCall          2, CP#18
   Drop1
   Push                 r0
   LoadContextVar       0, 0
@@ -1359,20 +1364,20 @@
   PushConstant         CP#4
   IndirectStaticCall   1, CP#3
   Drop1
-  InstanceCall         2, CP#6
+  InterfaceCall        2, CP#6
   Drop1
-  PushConstant         CP#7
+  PushConstant         CP#8
   PushConstant         CP#2
   PushConstant         CP#1
   AllocateT
   StoreLocal           r0
   Push                 r0
-  PushConstant         CP#8
+  PushConstant         CP#9
   IndirectStaticCall   1, CP#3
   Drop1
-  InstanceCall         2, CP#9
+  InterfaceCall        2, CP#6
   Drop1
-  PushConstant         CP#7
+  PushConstant         CP#8
   PushConstant         CP#10
   PushConstant         CP#1
   AllocateT
@@ -1381,7 +1386,7 @@
   PushConstant         CP#11
   IndirectStaticCall   1, CP#3
   Drop1
-  InstanceCall         2, CP#12
+  InterfaceCall        2, CP#6
   Drop1
   PushNull
   ReturnTOS
@@ -1393,13 +1398,12 @@
   [3] = ArgDesc num-args 1, num-type-args 0, names []
   [4] = StaticICData target '#lib::A::'' (constructor)', arg-desc CP#3
   [5] = ArgDesc num-args 1, num-type-args 2, names []
-  [6] = ICData target-name 'foo', arg-desc CP#5
-  [7] = TypeArgs [dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 >]
-  [8] = StaticICData target '#lib::A::'' (constructor)', arg-desc CP#3
-  [9] = ICData target-name 'foo', arg-desc CP#5
+  [6] = InterfaceCall target-name 'foo', arg-desc CP#5
+  [7] = Reserved
+  [8] = TypeArgs [dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 >]
+  [9] = StaticICData target '#lib::A::'' (constructor)', arg-desc CP#3
   [10] = TypeArgumentsForInstanceAllocation #lib::A [dart:core::List < #lib::C1 >, dart:core::List < #lib::C2 >]
   [11] = StaticICData target '#lib::A::'' (constructor)', arg-desc CP#3
-  [12] = ICData target-name 'foo', arg-desc CP#5
 }
 ]static method callA() → void {
   new self::A::•<self::C1, self::C2>().{self::A::foo}<self::C3, self::C4>();
diff --git a/pkg/vm/testcases/bytecode/literals.dart.expect b/pkg/vm/testcases/bytecode/literals.dart.expect
index 233eed7..4649642 100644
--- a/pkg/vm/testcases/bytecode/literals.dart.expect
+++ b/pkg/vm/testcases/bytecode/literals.dart.expect
@@ -483,15 +483,15 @@
   Push                 r0
   PushInt              1
   Push                 FP[-5]
-  InstanceCall         1, CP#7
+  InterfaceCall        1, CP#7
   StoreIndexedTOS
   Push                 r0
   PushInt              2
-  PushConstant         CP#8
-  StoreIndexedTOS
   PushConstant         CP#9
-  IndirectStaticCall   2, CP#1
+  StoreIndexedTOS
   PushConstant         CP#10
+  IndirectStaticCall   2, CP#1
+  PushConstant         CP#11
   IndirectStaticCall   1, CP#3
   Drop1
   PushNull
@@ -505,10 +505,11 @@
   [4] = StaticICData target 'dart:core::print', arg-desc CP#3
   [5] = TypeArgs [dart:core::String]
   [6] = String 'a'
-  [7] = ICData target-name 'toString', arg-desc CP#3
-  [8] = String 'b'
-  [9] = StaticICData target 'dart:core::List::_fromLiteral (constructor)', arg-desc CP#1
-  [10] = StaticICData target 'dart:core::print', arg-desc CP#3
+  [7] = InterfaceCall target-name 'toString', arg-desc CP#3
+  [8] = Reserved
+  [9] = String 'b'
+  [10] = StaticICData target 'dart:core::List::_fromLiteral (constructor)', arg-desc CP#1
+  [11] = StaticICData target 'dart:core::print', arg-desc CP#3
 }
 ]static method test_list_literal(core::int a) → void {
   core::print(<core::int>[1, a, 3]);
@@ -561,29 +562,29 @@
   Push                 r1
   PushInt              2
   Push                 FP[-6]
-  InstanceCall         1, CP#8
+  InterfaceCall        1, CP#8
   StoreIndexedTOS
   Push                 r1
   PushInt              3
   PushInt              3
   StoreIndexedTOS
-  PushConstant         CP#9
-  IndirectStaticCall   2, CP#2
   PushConstant         CP#10
-  IndirectStaticCall   1, CP#4
-  Drop1
-  PushNull
-  Push                 r0
-  InstantiateTypeArgumentsTOS 0, CP#11
-  PushConstant         CP#12
-  PushConstant         CP#13
   IndirectStaticCall   2, CP#2
-  PushConstant         CP#14
+  PushConstant         CP#11
   IndirectStaticCall   1, CP#4
   Drop1
   PushNull
   Push                 r0
-  InstantiateTypeArgumentsTOS 0, CP#15
+  InstantiateTypeArgumentsTOS 0, CP#12
+  PushConstant         CP#13
+  PushConstant         CP#14
+  IndirectStaticCall   2, CP#2
+  PushConstant         CP#15
+  IndirectStaticCall   1, CP#4
+  Drop1
+  PushNull
+  Push                 r0
+  InstantiateTypeArgumentsTOS 0, CP#16
   PushConstant         CP#1
   PushInt              2
   CreateArrayTOS
@@ -596,9 +597,9 @@
   PushInt              1
   PushInt              4
   StoreIndexedTOS
-  PushConstant         CP#16
-  IndirectStaticCall   2, CP#2
   PushConstant         CP#17
+  IndirectStaticCall   2, CP#2
+  PushConstant         CP#18
   IndirectStaticCall   1, CP#4
   Drop1
   PushNull
@@ -613,16 +614,17 @@
   [5] = StaticICData target 'dart:core::print', arg-desc CP#4
   [6] = TypeArgs [dart:core::String, dart:core::int]
   [7] = String 'foo'
-  [8] = ICData target-name 'toString', arg-desc CP#4
-  [9] = StaticICData target 'dart:core::Map::_fromLiteral (constructor)', arg-desc CP#2
-  [10] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [11] = TypeArgs [dart:core::String, #lib::test_map_literal::TypeParam/0]
-  [12] = List type-arg dynamic, entries CP# []
-  [13] = StaticICData target 'dart:core::Map::_fromLiteral (constructor)', arg-desc CP#2
-  [14] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [15] = TypeArgs [#lib::test_map_literal::TypeParam/0, dart:core::int]
-  [16] = StaticICData target 'dart:core::Map::_fromLiteral (constructor)', arg-desc CP#2
-  [17] = StaticICData target 'dart:core::print', arg-desc CP#4
+  [8] = InterfaceCall target-name 'toString', arg-desc CP#4
+  [9] = Reserved
+  [10] = StaticICData target 'dart:core::Map::_fromLiteral (constructor)', arg-desc CP#2
+  [11] = StaticICData target 'dart:core::print', arg-desc CP#4
+  [12] = TypeArgs [dart:core::String, #lib::test_map_literal::TypeParam/0]
+  [13] = List type-arg dynamic, entries CP# []
+  [14] = StaticICData target 'dart:core::Map::_fromLiteral (constructor)', arg-desc CP#2
+  [15] = StaticICData target 'dart:core::print', arg-desc CP#4
+  [16] = TypeArgs [#lib::test_map_literal::TypeParam/0, dart:core::int]
+  [17] = StaticICData target 'dart:core::Map::_fromLiteral (constructor)', arg-desc CP#2
+  [18] = StaticICData target 'dart:core::print', arg-desc CP#4
 }
 ]static method test_map_literal<T extends core::Object = dynamic>(core::int a, core::int b, self::test_map_literal::T c) → void {
   core::print(<core::int, core::int>{1: a, b: 2});
diff --git a/pkg/vm/testcases/bytecode/loops.dart.expect b/pkg/vm/testcases/bytecode/loops.dart.expect
index b3714bd..4fbdb3b 100644
--- a/pkg/vm/testcases/bytecode/loops.dart.expect
+++ b/pkg/vm/testcases/bytecode/loops.dart.expect
@@ -14,13 +14,13 @@
   CheckStack           1
   Push                 r1
   Push                 FP[-5]
-  InstanceCall         1, CP#1
+  InterfaceCall        1, CP#1
   CompareIntLt
   JumpIfFalse          L1
   Push                 r0
   Push                 FP[-5]
   Push                 r1
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#4
   AddInt
   PopLocal             r0
   Push                 r1
@@ -35,9 +35,11 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData get target-name 'get:length', arg-desc CP#0
-  [2] = ArgDesc num-args 2, num-type-args 0, names []
-  [3] = ICData target-name '[]', arg-desc CP#2
+  [1] = InterfaceCall get target-name 'get:length', arg-desc CP#0
+  [2] = Reserved
+  [3] = ArgDesc num-args 2, num-type-args 0, names []
+  [4] = InterfaceCall target-name '[]', arg-desc CP#3
+  [5] = Reserved
 }
 ]static method test_for(core::List<core::int> list) → core::int {
   core::int sum = 0;
@@ -62,7 +64,7 @@
   JumpIfFalse          L1
   Push                 r1
   Push                 FP[-5]
-  InstanceCall         1, CP#1
+  InterfaceCall        1, CP#1
   CompareIntGe
   JumpIfFalse          L2
   Jump                 L1
@@ -70,7 +72,7 @@
   Push                 r0
   Push                 FP[-5]
   Push                 r1
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#4
   AddInt
   PopLocal             r0
   Push                 r1
@@ -85,9 +87,11 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData get target-name 'get:length', arg-desc CP#0
-  [2] = ArgDesc num-args 2, num-type-args 0, names []
-  [3] = ICData target-name '[]', arg-desc CP#2
+  [1] = InterfaceCall get target-name 'get:length', arg-desc CP#0
+  [2] = Reserved
+  [3] = ArgDesc num-args 2, num-type-args 0, names []
+  [4] = InterfaceCall target-name '[]', arg-desc CP#3
+  [5] = Reserved
 }
 ]static method test_for_break(core::List<core::int> list) → core::int {
   core::int sum = 0;
@@ -113,7 +117,7 @@
   CheckStack           1
   Push                 r1
   Push                 FP[-5]
-  InstanceCall         1, CP#1
+  InterfaceCall        1, CP#1
   CompareIntLt
   JumpIfFalse          L1
   Push                 r1
@@ -125,7 +129,7 @@
   Push                 r0
   Push                 FP[-5]
   Push                 r1
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#4
   AddInt
   PopLocal             r0
 L3:
@@ -141,9 +145,11 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData get target-name 'get:length', arg-desc CP#0
-  [2] = ArgDesc num-args 2, num-type-args 0, names []
-  [3] = ICData target-name '[]', arg-desc CP#2
+  [1] = InterfaceCall get target-name 'get:length', arg-desc CP#0
+  [2] = Reserved
+  [3] = ArgDesc num-args 2, num-type-args 0, names []
+  [4] = InterfaceCall target-name '[]', arg-desc CP#3
+  [5] = Reserved
 }
 ]static method test_for_continue(core::List<core::int> list) → core::int {
   core::int sum = 0;
@@ -169,7 +175,7 @@
   CheckStack           1
   Push                 r1
   Push                 FP[-5]
-  InstanceCall         1, CP#1
+  InterfaceCall        1, CP#1
   CompareIntLt
   JumpIfFalse          L1
   Push                 r0
@@ -182,7 +188,7 @@
   StoreLocal           r1
   PopLocal             r3
   Push                 r2
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#4
   AddInt
   PopLocal             r0
   Jump                 L2
@@ -192,9 +198,11 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData get target-name 'get:length', arg-desc CP#0
-  [2] = ArgDesc num-args 2, num-type-args 0, names []
-  [3] = ICData target-name '[]', arg-desc CP#2
+  [1] = InterfaceCall get target-name 'get:length', arg-desc CP#0
+  [2] = Reserved
+  [3] = ArgDesc num-args 2, num-type-args 0, names []
+  [4] = InterfaceCall target-name '[]', arg-desc CP#3
+  [5] = Reserved
 }
 ]static method test_while(core::List<core::int> list) → core::int {
   core::int sum = 0;
@@ -217,7 +225,7 @@
   Push                 r0
   Push                 FP[-5]
   Push                 r1
-  InstanceCall         2, CP#1
+  InterfaceCall        2, CP#1
   AddInt
   PopLocal             r0
   Push                 r1
@@ -226,7 +234,7 @@
   PopLocal             r1
   Push                 r1
   Push                 FP[-5]
-  InstanceCall         1, CP#3
+  InterfaceCall        1, CP#4
   CompareIntLt
   JumpIfTrue           L1
   Push                 r0
@@ -234,9 +242,11 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 2, num-type-args 0, names []
-  [1] = ICData target-name '[]', arg-desc CP#0
-  [2] = ArgDesc num-args 1, num-type-args 0, names []
-  [3] = ICData get target-name 'get:length', arg-desc CP#2
+  [1] = InterfaceCall target-name '[]', arg-desc CP#0
+  [2] = Reserved
+  [3] = ArgDesc num-args 1, num-type-args 0, names []
+  [4] = InterfaceCall get target-name 'get:length', arg-desc CP#3
+  [5] = Reserved
 }
 ]static method test_do_while(core::List<core::int> list) → core::int {
   core::int sum = 0;
@@ -255,15 +265,15 @@
   PushInt              0
   PopLocal             r0
   Push                 FP[-5]
-  InstanceCall         1, CP#1
+  InterfaceCall        1, CP#1
   PopLocal             r1
 L2:
   CheckStack           1
   Push                 r1
-  InstanceCall         1, CP#2
+  InterfaceCall        1, CP#3
   JumpIfFalse          L1
   Push                 r1
-  InstanceCall         1, CP#3
+  InterfaceCall        1, CP#5
   PopLocal             r2
   Push                 r0
   Push                 r2
@@ -276,9 +286,12 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData get target-name 'get:iterator', arg-desc CP#0
-  [2] = ICData target-name 'moveNext', arg-desc CP#0
-  [3] = ICData get target-name 'get:current', arg-desc CP#0
+  [1] = InterfaceCall get target-name 'get:iterator', arg-desc CP#0
+  [2] = Reserved
+  [3] = InterfaceCall target-name 'moveNext', arg-desc CP#0
+  [4] = Reserved
+  [5] = InterfaceCall get target-name 'get:current', arg-desc CP#0
+  [6] = Reserved
 }
 ]static method test_for_in(core::List<core::int> list) → core::int {
   core::int sum = 0;
@@ -296,15 +309,15 @@
   PushInt              42
   PopLocal             r1
   Push                 FP[-5]
-  InstanceCall         1, CP#1
+  InterfaceCall        1, CP#1
   PopLocal             r2
 L2:
   CheckStack           1
   Push                 r2
-  InstanceCall         1, CP#2
+  InterfaceCall        1, CP#3
   JumpIfFalse          L1
   Push                 r2
-  InstanceCall         1, CP#3
+  InterfaceCall        1, CP#5
   PopLocal             r3
   Push                 r3
   PopLocal             r1
@@ -319,9 +332,12 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 1, num-type-args 0, names []
-  [1] = ICData get target-name 'get:iterator', arg-desc CP#0
-  [2] = ICData target-name 'moveNext', arg-desc CP#0
-  [3] = ICData get target-name 'get:current', arg-desc CP#0
+  [1] = InterfaceCall get target-name 'get:iterator', arg-desc CP#0
+  [2] = Reserved
+  [3] = InterfaceCall target-name 'moveNext', arg-desc CP#0
+  [4] = Reserved
+  [5] = InterfaceCall get target-name 'get:current', arg-desc CP#0
+  [6] = Reserved
 }
 ]static method test_for_in_with_outer_var(core::List<core::int> list) → core::int {
   core::int sum = 0;
diff --git a/pkg/vm/testcases/bytecode/super_calls.dart.expect b/pkg/vm/testcases/bytecode/super_calls.dart.expect
index 9ee6e1e..346cd8a 100644
--- a/pkg/vm/testcases/bytecode/super_calls.dart.expect
+++ b/pkg/vm/testcases/bytecode/super_calls.dart.expect
@@ -132,7 +132,7 @@
   PushConstant         CP#2
   IndirectStaticCall   1, CP#1
   PushConstant         CP#3
-  InstanceCall         3, CP#5
+  DynamicCall          3, CP#5
   ReturnTOS
 }
 ConstantPool {
@@ -347,7 +347,7 @@
   PushConstant         CP#7
   IndirectStaticCall   2, CP#6
   PushConstant         CP#8
-  InstanceCall         3, CP#10
+  DynamicCall          3, CP#10
   ReturnTOS
 }
 ConstantPool {
diff --git a/pkg/vm/testcases/bytecode/switch.dart.expect b/pkg/vm/testcases/bytecode/switch.dart.expect
index fe265d6..93301c3 100644
--- a/pkg/vm/testcases/bytecode/switch.dart.expect
+++ b/pkg/vm/testcases/bytecode/switch.dart.expect
@@ -12,15 +12,15 @@
   PopLocal             r1
   Push                 r1
   PushInt              1
-  InstanceCall         2, CP#1
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r1
   PushInt              2
-  InstanceCall         2, CP#2
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Push                 r1
   PushInt              3
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#1
   JumpIfTrue           L3
   Jump                 L4
 L1:
@@ -41,9 +41,8 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 2, num-type-args 0, names []
-  [1] = ICData target-name '==', arg-desc CP#0
-  [2] = ICData target-name '==', arg-desc CP#0
-  [3] = ICData target-name '==', arg-desc CP#0
+  [1] = InterfaceCall target-name '==', arg-desc CP#0
+  [2] = Reserved
 }
 ]static method foo1(core::int x) → core::int {
   core::int y;
@@ -80,27 +79,27 @@
   PopLocal             r1
   Push                 r1
   PushInt              1
-  InstanceCall         2, CP#1
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r1
   PushInt              2
-  InstanceCall         2, CP#2
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r1
   PushInt              3
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r1
   PushInt              4
-  InstanceCall         2, CP#4
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Push                 r1
   PushInt              5
-  InstanceCall         2, CP#5
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Push                 r1
   PushInt              6
-  InstanceCall         2, CP#6
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Jump                 L3
 L1:
@@ -120,12 +119,8 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 2, num-type-args 0, names []
-  [1] = ICData target-name '==', arg-desc CP#0
-  [2] = ICData target-name '==', arg-desc CP#0
-  [3] = ICData target-name '==', arg-desc CP#0
-  [4] = ICData target-name '==', arg-desc CP#0
-  [5] = ICData target-name '==', arg-desc CP#0
-  [6] = ICData target-name '==', arg-desc CP#0
+  [1] = InterfaceCall target-name '==', arg-desc CP#0
+  [2] = Reserved
 }
 ]static method foo2(core::int x) → core::int {
   core::int y;
@@ -165,27 +160,27 @@
   PopLocal             r1
   Push                 r1
   PushInt              1
-  InstanceCall         2, CP#1
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r1
   PushInt              2
-  InstanceCall         2, CP#2
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r1
   PushInt              3
-  InstanceCall         2, CP#3
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r1
   PushInt              4
-  InstanceCall         2, CP#4
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Push                 r1
   PushInt              5
-  InstanceCall         2, CP#5
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Push                 r1
   PushInt              6
-  InstanceCall         2, CP#6
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Jump                 L3
 L1:
@@ -205,12 +200,8 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 2, num-type-args 0, names []
-  [1] = ICData target-name '==', arg-desc CP#0
-  [2] = ICData target-name '==', arg-desc CP#0
-  [3] = ICData target-name '==', arg-desc CP#0
-  [4] = ICData target-name '==', arg-desc CP#0
-  [5] = ICData target-name '==', arg-desc CP#0
-  [6] = ICData target-name '==', arg-desc CP#0
+  [1] = InterfaceCall target-name '==', arg-desc CP#0
+  [2] = Reserved
 }
 ]static method foo3(core::int x) → core::int {
   core::int y;
diff --git a/pkg/vm/testcases/bytecode/try_blocks.dart.expect b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
index e50ba42..e946fb1 100644
--- a/pkg/vm/testcases/bytecode/try_blocks.dart.expect
+++ b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
@@ -78,17 +78,17 @@
   MoveSpecial          stackTrace, r1
   Push                 r0
   PushConstant         CP#3
-  InstanceCall         2, CP#5
+  InterfaceCall        2, CP#5
   JumpIfFalse          L2
-  PushConstant         CP#6
   PushConstant         CP#7
+  PushConstant         CP#8
   IndirectStaticCall   1, CP#1
   Drop1
   Jump                 L1
 L2:
   Push                 r0
-  PushConstant         CP#8
-  InstanceCall         2, CP#9
+  PushConstant         CP#9
+  InterfaceCall        2, CP#5
   JumpIfFalse          L3
   Push                 r0
   PopLocal             r2
@@ -113,7 +113,7 @@
 L3:
   Push                 r0
   PushConstant         CP#13
-  InstanceCall         2, CP#14
+  InterfaceCall        2, CP#5
   JumpIfFalse          L4
   Push                 r0
   PopLocal             r2
@@ -125,7 +125,7 @@
   StoreLocal           r4
   Push                 r4
   PushInt              0
-  PushConstant         CP#15
+  PushConstant         CP#14
   StoreIndexedTOS
   Push                 r4
   PushInt              1
@@ -133,15 +133,15 @@
   StoreIndexedTOS
   Push                 r4
   PushInt              2
-  PushConstant         CP#16
+  PushConstant         CP#15
   StoreIndexedTOS
   Push                 r4
   PushInt              3
   Push                 r3
   StoreIndexedTOS
-  PushConstant         CP#17
+  PushConstant         CP#16
   IndirectStaticCall   1, CP#1
-  PushConstant         CP#18
+  PushConstant         CP#17
   IndirectStaticCall   1, CP#1
   Drop1
   Jump                 L1
@@ -156,7 +156,7 @@
   StoreLocal           r4
   Push                 r4
   PushInt              0
-  PushConstant         CP#20
+  PushConstant         CP#19
   StoreIndexedTOS
   Push                 r4
   PushInt              1
@@ -164,15 +164,15 @@
   StoreIndexedTOS
   Push                 r4
   PushInt              2
-  PushConstant         CP#16
+  PushConstant         CP#15
   StoreIndexedTOS
   Push                 r4
   PushInt              3
   Push                 r3
   StoreIndexedTOS
-  PushConstant         CP#21
+  PushConstant         CP#20
   IndirectStaticCall   1, CP#1
-  PushConstant         CP#22
+  PushConstant         CP#21
   IndirectStaticCall   1, CP#1
   Drop1
   Jump                 L1
@@ -181,7 +181,7 @@
   ReturnTOS
 }
 ExceptionsTable {
-  try-index 0, outer -1, start 2, end 7, handler 7, needs-stack-trace, types [CP#3, CP#8, CP#13, CP#19]
+  try-index 0, outer -1, start 2, end 7, handler 7, needs-stack-trace, types [CP#3, CP#9, CP#13, CP#18]
 }
 ConstantPool {
   [0] = String 'danger!'
@@ -189,24 +189,23 @@
   [2] = StaticICData target 'dart:core::print', arg-desc CP#1
   [3] = Type dart:core::TypeError
   [4] = ArgDesc num-args 2, num-type-args 0, names []
-  [5] = ICData target-name '_simpleInstanceOf', arg-desc CP#4
-  [6] = String 'caught type error'
-  [7] = StaticICData target 'dart:core::print', arg-desc CP#1
-  [8] = Type dart:core::AssertionError
-  [9] = ICData target-name '_simpleInstanceOf', arg-desc CP#4
+  [5] = InterfaceCall target-name '_simpleInstanceOf', arg-desc CP#4
+  [6] = Reserved
+  [7] = String 'caught type error'
+  [8] = StaticICData target 'dart:core::print', arg-desc CP#1
+  [9] = Type dart:core::AssertionError
   [10] = String 'caught assertion error '
   [11] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#1
   [12] = StaticICData target 'dart:core::print', arg-desc CP#1
   [13] = Type dart:core::Error
-  [14] = ICData target-name '_simpleInstanceOf', arg-desc CP#4
-  [15] = String 'caught error '
-  [16] = String ' '
-  [17] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#1
-  [18] = StaticICData target 'dart:core::print', arg-desc CP#1
-  [19] = Type dynamic
-  [20] = String 'caught something '
-  [21] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#1
-  [22] = StaticICData target 'dart:core::print', arg-desc CP#1
+  [14] = String 'caught error '
+  [15] = String ' '
+  [16] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#1
+  [17] = StaticICData target 'dart:core::print', arg-desc CP#1
+  [18] = Type dynamic
+  [19] = String 'caught something '
+  [20] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#1
+  [21] = StaticICData target 'dart:core::print', arg-desc CP#1
 }
 ]static method testTryCatch2() → dynamic {
   try {
@@ -259,7 +258,7 @@
   StoreFieldTOS        CP#1
   PopLocal             r4
   Push                 r4
-  InstanceCall         1, CP#19
+  DynamicCall          1, CP#19
   Drop1
   Push                 r0
   LoadContextVar       0, 1
@@ -366,12 +365,13 @@
   [27] = StaticICData target 'dart:core::print', arg-desc CP#4
   [28] = Type dart:core::Error
   [29] = ArgDesc num-args 2, num-type-args 0, names []
-  [30] = ICData target-name '_simpleInstanceOf', arg-desc CP#29
-  [31] = String 'error '
-  [32] = String ', captured stack trace: '
-  [33] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#4
-  [34] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [35] = EndClosureFunctionScope
+  [30] = InterfaceCall target-name '_simpleInstanceOf', arg-desc CP#29
+  [31] = Reserved
+  [32] = String 'error '
+  [33] = String ', captured stack trace: '
+  [34] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#4
+  [35] = StaticICData target 'dart:core::print', arg-desc CP#4
+  [36] = EndClosureFunctionScope
 }
 Closure #lib::testTryCatch3::foo () -> void
 ClosureBytecode {
@@ -436,7 +436,7 @@
   MoveSpecial          stackTrace, r3
   Push                 r2
   PushConstant         CP#28
-  InstanceCall         2, CP#30
+  InterfaceCall        2, CP#30
   JumpIfFalse          L2
   Push                 r2
   PopLocal             r4
@@ -446,7 +446,7 @@
   StoreLocal           r5
   Push                 r5
   PushInt              0
-  PushConstant         CP#31
+  PushConstant         CP#32
   StoreIndexedTOS
   Push                 r5
   PushInt              1
@@ -454,17 +454,17 @@
   StoreIndexedTOS
   Push                 r5
   PushInt              2
-  PushConstant         CP#32
+  PushConstant         CP#33
   StoreIndexedTOS
   Push                 r5
   PushInt              3
   Push                 r0
   LoadContextVar       0, 2
   StoreIndexedTOS
-  PushConstant         CP#33
-  IndirectStaticCall   1, CP#4
   PushConstant         CP#34
   IndirectStaticCall   1, CP#4
+  PushConstant         CP#35
+  IndirectStaticCall   1, CP#4
   Drop1
   Jump                 L1
 L2:
@@ -704,11 +704,11 @@
   PopLocal             r2
   Push                 r2
   PushInt              1
-  InstanceCall         2, CP#1
+  InterfaceCall        2, CP#1
   JumpIfTrue           L1
   Push                 r2
   PushInt              2
-  InstanceCall         2, CP#2
+  InterfaceCall        2, CP#1
   JumpIfTrue           L2
   Jump                 L3
 L1:
@@ -748,7 +748,7 @@
   StoreFieldTOS        CP#9
   PopLocal             r7
   Push                 r7
-  InstanceCall         1, CP#24
+  DynamicCall          1, CP#24
   Drop1
   Jump                 L4
 Try #1 end:
@@ -811,8 +811,8 @@
 }
 ConstantPool {
   [0] = ArgDesc num-args 2, num-type-args 0, names []
-  [1] = ICData target-name '==', arg-desc CP#0
-  [2] = ICData target-name '==', arg-desc CP#0
+  [1] = InterfaceCall target-name '==', arg-desc CP#0
+  [2] = Reserved
   [3] = String 'before try 1'
   [4] = ArgDesc num-args 1, num-type-args 0, names []
   [5] = StaticICData target 'dart:core::print', arg-desc CP#4
@@ -950,7 +950,7 @@
   IndirectStaticCall   1, CP#3
   Drop1
   Push                 r2
-  InstanceCall         1, CP#27
+  DynamicCall          1, CP#27
   Drop1
   Push                 r3
   Push                 r4
@@ -964,7 +964,7 @@
   IndirectStaticCall   1, CP#3
   Drop1
   Push                 r2
-  InstanceCall         1, CP#29
+  DynamicCall          1, CP#29
   Drop1
   Push                 r0
   LoadContextParent
diff --git a/pkg/vm/testcases/bytecode/type_ops.dart.expect b/pkg/vm/testcases/bytecode/type_ops.dart.expect
index 43203fc..04a4e32 100644
--- a/pkg/vm/testcases/bytecode/type_ops.dart.expect
+++ b/pkg/vm/testcases/bytecode/type_ops.dart.expect
@@ -106,23 +106,23 @@
   LoadTypeArgumentsField CP#0
   PushNull
   PushConstant         CP#1
-  InstanceCall         4, CP#3
+  InterfaceCall        4, CP#3
   JumpIfFalse          L1
-  PushConstant         CP#4
-  PushConstant         CP#6
-  IndirectStaticCall   1, CP#5
+  PushConstant         CP#5
+  PushConstant         CP#7
+  IndirectStaticCall   1, CP#6
   Drop1
 L1:
   Push                 FP[-5]
   Push                 FP[-6]
   LoadTypeArgumentsField CP#0
   PushNull
-  PushConstant         CP#7
-  InstanceCall         4, CP#8
+  PushConstant         CP#8
+  InterfaceCall        4, CP#3
   JumpIfFalse          L2
   PushConstant         CP#9
   PushConstant         CP#10
-  IndirectStaticCall   1, CP#5
+  IndirectStaticCall   1, CP#6
   Drop1
 L2:
   Push                 FP[-6]
@@ -133,7 +133,7 @@
   PushNull
   PushConstant         CP#12
   AssertAssignable     0, CP#13
-  InstanceCall         2, CP#15
+  InterfaceCall        2, CP#15
   Drop1
   PushNull
   ReturnTOS
@@ -142,19 +142,20 @@
   [0] = TypeArgumentsField #lib::D
   [1] = Type #lib::A < #lib::D::TypeParam/0 >
   [2] = ArgDesc num-args 4, num-type-args 0, names []
-  [3] = ICData target-name '_instanceOf', arg-desc CP#2
-  [4] = String '21'
-  [5] = ArgDesc num-args 1, num-type-args 0, names []
-  [6] = StaticICData target 'dart:core::print', arg-desc CP#5
-  [7] = Type #lib::C < dynamic, #lib::D::TypeParam/1, dart:core::List < #lib::D::TypeParam/0 > >
-  [8] = ICData target-name '_instanceOf', arg-desc CP#2
+  [3] = InterfaceCall target-name '_instanceOf', arg-desc CP#2
+  [4] = Reserved
+  [5] = String '21'
+  [6] = ArgDesc num-args 1, num-type-args 0, names []
+  [7] = StaticICData target 'dart:core::print', arg-desc CP#6
+  [8] = Type #lib::C < dynamic, #lib::D::TypeParam/1, dart:core::List < #lib::D::TypeParam/0 > >
   [9] = String '22'
-  [10] = StaticICData target 'dart:core::print', arg-desc CP#5
+  [10] = StaticICData target 'dart:core::print', arg-desc CP#6
   [11] = Type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
   [12] = String ''
   [13] = SubtypeTestCache
   [14] = ArgDesc num-args 2, num-type-args 0, names []
-  [15] = ICData set target-name 'set:foo', arg-desc CP#14
+  [15] = InterfaceCall set target-name 'set:foo', arg-desc CP#14
+  [16] = Reserved
 }
 ]  method foo2(dynamic y) → dynamic {
     if(y is self::A<self::D::P>) {
@@ -174,51 +175,52 @@
   PushNull
   Push                 r0
   PushConstant         CP#0
-  InstanceCall         4, CP#2
+  InterfaceCall        4, CP#2
   JumpIfFalse          L1
-  PushConstant         CP#3
-  PushConstant         CP#5
-  IndirectStaticCall   1, CP#4
+  PushConstant         CP#4
+  PushConstant         CP#6
+  IndirectStaticCall   1, CP#5
   Drop1
 L1:
   Push                 FP[-5]
   Push                 FP[-6]
-  LoadTypeArgumentsField CP#6
+  LoadTypeArgumentsField CP#7
   Push                 r0
-  PushConstant         CP#7
-  InstanceCall         4, CP#8
+  PushConstant         CP#8
+  InterfaceCall        4, CP#2
   JumpIfFalse          L2
   PushConstant         CP#9
   PushConstant         CP#10
-  IndirectStaticCall   1, CP#4
+  IndirectStaticCall   1, CP#5
   Drop1
 L2:
   Push                 FP[-5]
   PushConstant         CP#11
   Push                 FP[-6]
-  LoadTypeArgumentsField CP#6
+  LoadTypeArgumentsField CP#7
   Push                 r0
   PushConstant         CP#12
   AssertAssignable     0, CP#13
-  InstanceCall         1, CP#14
+  InterfaceCall        1, CP#14
   ReturnTOS
 }
 ConstantPool {
   [0] = Type #lib::A < #lib::D::foo3::TypeParam/0 >
   [1] = ArgDesc num-args 4, num-type-args 0, names []
-  [2] = ICData target-name '_instanceOf', arg-desc CP#1
-  [3] = String '31'
-  [4] = ArgDesc num-args 1, num-type-args 0, names []
-  [5] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [6] = TypeArgumentsField #lib::D
-  [7] = Type #lib::C < dart:core::Map < #lib::D::foo3::TypeParam/0, #lib::D::TypeParam/0 >, dart:core::List < #lib::D::foo3::TypeParam/1 >, #lib::D::TypeParam/1 >
-  [8] = ICData target-name '_instanceOf', arg-desc CP#1
+  [2] = InterfaceCall target-name '_instanceOf', arg-desc CP#1
+  [3] = Reserved
+  [4] = String '31'
+  [5] = ArgDesc num-args 1, num-type-args 0, names []
+  [6] = StaticICData target 'dart:core::print', arg-desc CP#5
+  [7] = TypeArgumentsField #lib::D
+  [8] = Type #lib::C < dart:core::Map < #lib::D::foo3::TypeParam/0, #lib::D::TypeParam/0 >, dart:core::List < #lib::D::foo3::TypeParam/1 >, #lib::D::TypeParam/1 >
   [9] = String '32'
-  [10] = StaticICData target 'dart:core::print', arg-desc CP#4
+  [10] = StaticICData target 'dart:core::print', arg-desc CP#5
   [11] = Type dart:core::Map < #lib::D::foo3::TypeParam/1, #lib::D::TypeParam/1 >
   [12] = String ' in type cast'
   [13] = SubtypeTestCache
-  [14] = ICData get target-name 'get:values', arg-desc CP#4
+  [14] = InterfaceCall get target-name 'get:values', arg-desc CP#5
+  [15] = Reserved
 }
 ]  method foo3<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic>(dynamic z) → dynamic {
     if(z is self::A<self::D::foo3::T1>) {
@@ -329,47 +331,49 @@
   CheckStack           0
   Push                 FP[-5]
   PushConstant         CP#0
-  InstanceCall         2, CP#2
+  InterfaceCall        2, CP#2
   JumpIfFalse          L1
-  PushConstant         CP#3
-  PushConstant         CP#5
-  IndirectStaticCall   1, CP#4
+  PushConstant         CP#4
+  PushConstant         CP#6
+  IndirectStaticCall   1, CP#5
   Drop1
 L1:
   Push                 FP[-5]
   PushNull
   PushNull
-  PushConstant         CP#6
-  InstanceCall         4, CP#8
+  PushConstant         CP#7
+  InterfaceCall        4, CP#9
   JumpIfFalse          L2
-  PushConstant         CP#9
-  PushConstant         CP#10
-  IndirectStaticCall   1, CP#4
+  PushConstant         CP#11
+  PushConstant         CP#12
+  IndirectStaticCall   1, CP#5
   Drop1
 L2:
   Push                 FP[-5]
-  PushConstant         CP#11
+  PushConstant         CP#13
   PushNull
   PushNull
-  PushConstant         CP#12
-  AssertAssignable     0, CP#13
+  PushConstant         CP#14
+  AssertAssignable     0, CP#15
   ReturnTOS
 }
 ConstantPool {
   [0] = Type #lib::B
   [1] = ArgDesc num-args 2, num-type-args 0, names []
-  [2] = ICData target-name '_simpleInstanceOf', arg-desc CP#1
-  [3] = String '11'
-  [4] = ArgDesc num-args 1, num-type-args 0, names []
-  [5] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [6] = Type #lib::C < dart:core::int, dart:core::Object, dynamic >
-  [7] = ArgDesc num-args 4, num-type-args 0, names []
-  [8] = ICData target-name '_instanceOf', arg-desc CP#7
-  [9] = String '12'
-  [10] = StaticICData target 'dart:core::print', arg-desc CP#4
-  [11] = Type #lib::A < dart:core::int >
-  [12] = String ' in type cast'
-  [13] = SubtypeTestCache
+  [2] = InterfaceCall target-name '_simpleInstanceOf', arg-desc CP#1
+  [3] = Reserved
+  [4] = String '11'
+  [5] = ArgDesc num-args 1, num-type-args 0, names []
+  [6] = StaticICData target 'dart:core::print', arg-desc CP#5
+  [7] = Type #lib::C < dart:core::int, dart:core::Object, dynamic >
+  [8] = ArgDesc num-args 4, num-type-args 0, names []
+  [9] = InterfaceCall target-name '_instanceOf', arg-desc CP#8
+  [10] = Reserved
+  [11] = String '12'
+  [12] = StaticICData target 'dart:core::print', arg-desc CP#5
+  [13] = Type #lib::A < dart:core::int >
+  [14] = String ' in type cast'
+  [15] = SubtypeTestCache
 }
 ]static method foo1(dynamic x) → dynamic {
   if(x is self::B) {
diff --git a/pkg/vm/testcases/transformations/type_flow/summary_collector/bool_expressions.dart.expect b/pkg/vm/testcases/transformations/type_flow/summary_collector/bool_expressions.dart.expect
index d4deb68..bf7dfc6 100644
--- a/pkg/vm/testcases/transformations/type_flow/summary_collector/bool_expressions.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/summary_collector/bool_expressions.dart.expect
@@ -6,21 +6,24 @@
 RESULT: _T {}?
 ------------ #lib::bool_expressions ------------
 t0* = _Call direct [#lib::foo] ()
-t1* = _Call direct [#lib::bar] ()
-t2* = _Call [dart.core::num::+] (_T (dart.core::int)+?, _T (dart.core::_Smi))
-i = _Join [dart.core::int] (_T (dart.core::_Smi), t2)
-t4* = _Call [dart.core::num::<] (i, _T (dart.core::_Smi))
-t5* = _Call direct [#lib::bar] ()
-x = _Join [dart.core::bool] (t5, _T (dart.core::bool)+)
-t7* = _Call direct [#lib::foo] ()
-t8* = _Call direct [#lib::bar] ()
-t9* = _Call direct [#lib::bar] ()
-t10* = _Call direct [#lib::foo] ()
-t11* = _Call direct [#lib::foo] ()
-t12 = _Join [dynamic] (_T (dart.core::bool)+, t7)
-t13 = _Narrow (t12 to _T ANY?)
-t14 = _Narrow (t13 to _T (dart.core::bool)+?)
-y = _Join [dart.core::bool] (_T (dart.core::bool)+, t14, _T (dart.core::bool)+, _T (dart.core::bool)+)
+t1 = _TypeCheck (t0 against dart.core::bool) (for #lib::foo() as{TypeError} dart.core::bool)
+t2* = _Call direct [#lib::bar] ()
+t3* = _Call [dart.core::num::+] (_T (dart.core::int)+?, _T (dart.core::_Smi))
+i = _Join [dart.core::int] (_T (dart.core::_Smi), t3)
+t5* = _Call [dart.core::num::<] (i, _T (dart.core::_Smi))
+t6* = _Call direct [#lib::bar] ()
+x = _Join [dart.core::bool] (t6, _T (dart.core::bool)+)
+t8* = _Call direct [#lib::foo] ()
+t9 = _Join [dynamic] (_T (dart.core::bool)+, t8)
+t10 = _Narrow (t9 to _T ANY?)
+t11 = _TypeCheck (t10 against dart.core::bool) (for (x{dart.core::bool} ?{dynamic} true : #lib::foo()) as{TypeError} dart.core::bool)
+t12* = _Call direct [#lib::bar] ()
+t13* = _Call direct [#lib::bar] ()
+t14* = _Call direct [#lib::foo] ()
+t15 = _TypeCheck (t14 against dart.core::bool) (for #lib::foo() as{TypeError} dart.core::bool)
+t16* = _Call direct [#lib::foo] ()
+t17 = _TypeCheck (t16 against dart.core::bool) (for #lib::foo() as{TypeError} dart.core::bool)
+y = _Join [dart.core::bool] (_T (dart.core::bool)+, t11, _T (dart.core::bool)+, _T (dart.core::bool)+)
 RESULT: _T {}?
 ------------ #lib::main ------------
 
diff --git a/pkg/vm/testcases/transformations/type_flow/summary_collector/calls.dart.expect b/pkg/vm/testcases/transformations/type_flow/summary_collector/calls.dart.expect
index e5c30ed..9843dc5 100644
--- a/pkg/vm/testcases/transformations/type_flow/summary_collector/calls.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/summary_collector/calls.dart.expect
@@ -37,7 +37,7 @@
 t5 = _Call direct [#lib::B::] (_T (#lib::B))
 t6 = _Call [#lib::A::foo1] (%aa, _T (#lib::B))
 t7* = _Call get [#lib::A::foo2] (%aa)
-t8 = _Narrow (t7 to _T (dart.core::int)+?)
+t8 = _TypeCheck (t7 against dart.core::int) (for aa.{#lib::A::foo2} as{TypeError} dart.core::int)
 t9 = _Call set [#lib::A::foo3] (%aa, t8)
 t10* = _Call get [#lib::A::foo1] (%aa)
 t11* = _Call get [#lib::A::foo2] (%aa)
diff --git a/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_basic.dart.expect b/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_basic.dart.expect
index 9e9fb78..0163697 100644
--- a/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_basic.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_basic.dart.expect
@@ -10,15 +10,15 @@
 RESULT: t2
 ------------ #lib::C::id1 ------------
 %this = _Parameter #0 [_T (#lib::C<dynamic>)+]
-%x = _Parameter #1 [_T (dart.core::Object)+?]
+%x = _Parameter #1
 t2 = _Extract (%this[#lib::C/0])
-t3 = _TypeCheck (%x against t2) (for parameter x)
+t3 = _TypeCheck (%x against t2) (for x)
 RESULT: t3
 ------------ #lib::C::id2 ------------
 %this = _Parameter #0 [_T (#lib::C<dynamic>)+]
-%x = _Parameter #1 [_T (dart.core::Object)+?]
+%x = _Parameter #1
 t2 = _Extract (%this[#lib::C/0])
-t3 = _TypeCheck (%x against t2) (for parameter x)
+t3 = _TypeCheck (%x against t2) (for x)
 RESULT: t3
 ------------ #lib::D:: ------------
 %this = _Parameter #0 [_T (#lib::D<dynamic>)+]
@@ -74,18 +74,18 @@
 RESULT: _T {}?
 ------------ #lib::C2::id3 ------------
 %this = _Parameter #0 [_T (#lib::C2<dynamic>)+]
-%x = _Parameter #1 [_T (dart.core::Comparable<dynamic>)+?]
+%x = _Parameter #1
 t2 = _Extract (%this[#lib::C2/0])
 t3 = _CreateRuntimeType (dart.core::Comparable @ (t2))
-t4 = _TypeCheck (%x against t3) (for parameter x)
+t4 = _TypeCheck (%x against t3) (for x)
 RESULT: t4
 ------------ #lib::C2::id4 ------------
 %this = _Parameter #0 [_T (#lib::C2<dynamic>)+]
-%x = _Parameter #1 [_T (#lib::K<dynamic>)+?]
+%x = _Parameter #1
 t2 = _Extract (%this[#lib::C2/0])
 t3 = _CreateRuntimeType (#lib::I @ (t2))
 t4 = _CreateRuntimeType (#lib::K @ (t3))
-t5 = _TypeCheck (%x against t4) (for parameter x)
+t5 = _TypeCheck (%x against t4) (for x)
 RESULT: t5
 ------------ #lib::main ------------
 t0 = _Call direct [#lib::C::] (_T (#lib::C<dart.core::int>))
diff --git a/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_case1.dart.expect b/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_case1.dart.expect
index fae7252..2095424 100644
--- a/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_case1.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/summary_collector/class_generics_case1.dart.expect
@@ -3,8 +3,8 @@
 t1 = _Call direct [dart.core::Object::] (%this)
 RESULT: _T {}?
 ------------ #lib::MockHashMap:: ------------
-%K = _Parameter #0 [null]
-%V = _Parameter #1 [null]
+%K = _Parameter #0
+%V = _Parameter #1
 t2 = _CreateConcreteType (#lib::_NotRealHashMap @ (%K, %V))
 t3 = _Call direct [#lib::_NotRealHashMap::] (t2)
 RESULT: t2
@@ -14,12 +14,12 @@
 RESULT: _T {}?
 ------------ #lib::_NotRealHashMap::setEntry ------------
 %this = _Parameter #0 [_T (#lib::_NotRealHashMap<dynamic, dynamic>)+]
-%key = _Parameter #1 [_T (dart.core::Object)+?]
-%value = _Parameter #2 [_T (dart.core::Object)+?]
+%key = _Parameter #1
+%value = _Parameter #2
 t3 = _Extract (%this[#lib::_NotRealHashMap/0])
-t4 = _TypeCheck (%key against t3) (for parameter key)
+t4 = _TypeCheck (%key against t3) (for key)
 t5 = _Extract (%this[#lib::_NotRealHashMap/1])
-t6 = _TypeCheck (%value against t5) (for parameter value)
+t6 = _TypeCheck (%value against t5) (for value)
 RESULT: _T {}?
 ------------ #lib::InheritedElement:: ------------
 %this = _Parameter #0 [_T (#lib::InheritedElement)+]
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect
index 6e4319f..ea11fc1 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect
@@ -37,11 +37,11 @@
 }
 static method foo([@vm.inferred-type.metadata=dart.core::Null?] (core::List<core::int>) → void a) → core::int {
   @self::VarAnnotation::•() core::int x = 2;
-  return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int?] x.{core::num::+}(2);
+  return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] x.{core::num::+}(2);
 }
 @self::ParametrizedAnnotation::•<core::Null>(null)
 static method main(core::List<core::String> args) → dynamic {
   self::A::staticMethod();
-  [@vm.direct-call.metadata=#lib::B::instanceMethod] new self::B::•().{self::B::instanceMethod}();
+  [@vm.direct-call.metadata=#lib::B::instanceMethod] [@vm.inferred-type.metadata=!? (skip check)] new self::B::•().{self::B::instanceMethod}();
   self::foo(null);
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
index 8347032..ffdd14f 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
@@ -1,11 +1,12 @@
 library #lib;
 import self as self;
 import "dart:core" as core;
+import "dart:_internal" as _in;
 
 static method isPrime([@vm.inferred-type.metadata=int?] dynamic n) → core::bool {
-  if([@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool] n.<(2) as{TypeError} core::bool)
+  if(_in::unsafeCast<core::bool>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool] n.<(2)))
     return false;
-  for (core::int i = 2; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<=??] [@vm.inferred-type.metadata=dart.core::bool] [@vm.direct-call.metadata=dart.core::_IntegerImplementation::*??] [@vm.inferred-type.metadata=int?] i.{core::num::*}(i).{core::num::<=}(n as{TypeError} core::num); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int?] i.{core::num::+}(1)) {
+  for (core::int i = 2; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<=??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.direct-call.metadata=dart.core::_IntegerImplementation::*??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::*}(i).{core::num::<=}(_in::unsafeCast<core::num>(n)); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
     if([@vm.inferred-type.metadata=dart.core::bool] [@vm.direct-call.metadata=dart.core::_IntegerImplementation::%??] [@vm.inferred-type.metadata=int?] n.%(i).{core::Object::==}(0))
       return false;
   }
@@ -13,9 +14,9 @@
 }
 static method nThPrimeNumber([@vm.inferred-type.metadata=dart.core::_Smi] core::int n) → core::int {
   core::int counter = 0;
-  for (core::int i = 1; ; i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int?] i.{core::num::+}(1)) {
+  for (core::int i = 1; ; i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
     if([@vm.inferred-type.metadata=dart.core::bool] self::isPrime(i))
-      counter = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int?] counter.{core::num::+}(1);
+      counter = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] counter.{core::num::+}(1);
     if([@vm.inferred-type.metadata=dart.core::bool] counter.{core::num::==}(n)) {
       return i;
     }
@@ -29,10 +30,10 @@
   }
 }
 static method main(core::List<core::String> args) → dynamic {
-  core::Stopwatch timer = let final core::Stopwatch #t1 = new core::Stopwatch::•() in let final dynamic #t2 = [@vm.direct-call.metadata=dart.core::Stopwatch::start] #t1.{core::Stopwatch::start}() in #t1;
-  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool] i.{core::num::<}(100); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int?] i.{core::num::+}(1)) {
+  core::Stopwatch timer = let final core::Stopwatch #t1 = new core::Stopwatch::•() in let final dynamic #t2 = [@vm.direct-call.metadata=dart.core::Stopwatch::start] [@vm.inferred-type.metadata=!? (skip check)] #t1.{core::Stopwatch::start}() in #t1;
+  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
     self::run();
   }
-  [@vm.direct-call.metadata=dart.core::Stopwatch::stop] timer.{core::Stopwatch::stop}();
+  [@vm.direct-call.metadata=dart.core::Stopwatch::stop] [@vm.inferred-type.metadata=!? (skip check)] timer.{core::Stopwatch::stop}();
   core::print("Elapsed ${[@vm.direct-call.metadata=dart.core::Stopwatch::elapsedMilliseconds] timer.{core::Stopwatch::elapsedMilliseconds}}ms");
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
index 4fe492d..b2c1ba2 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
@@ -11,24 +11,24 @@
     : self::_Vector::_offset = 0, self::_Vector::_length = size, self::_Vector::_elements = [@vm.inferred-type.metadata=dart.typed_data::_Float64List] typ::Float64List::•(size), super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasTearOffUses:false]  operator [](core::int i) → core::double
-    return [@vm.direct-call.metadata=dart.typed_data::_Float64List::[]] [@vm.inferred-type.metadata=dart.core::_Double] [@vm.direct-call.metadata=#lib::_Vector::_elements] [@vm.inferred-type.metadata=dart.typed_data::_Float64List] this.{self::_Vector::_elements}.{core::List::[]}([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int?] i.{core::num::+}([@vm.direct-call.metadata=#lib::_Vector::_offset] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_offset}));
+    return [@vm.direct-call.metadata=dart.typed_data::_Float64List::[]] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.direct-call.metadata=#lib::_Vector::_elements] [@vm.inferred-type.metadata=dart.typed_data::_Float64List] this.{self::_Vector::_elements}.{core::List::[]}([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}([@vm.direct-call.metadata=#lib::_Vector::_offset] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_offset}));
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  operator []=([@vm.inferred-type.metadata=dart.core::_OneByteString] core::int i, core::double value) → void {
     let dynamic #t1 = [@vm.direct-call.metadata=#lib::_Vector::_elements] [@vm.inferred-type.metadata=dart.typed_data::_Float64List] this.{self::_Vector::_elements} in let dynamic #t2 = i in let dynamic #t3 = [@vm.direct-call.metadata=#lib::_Vector::_offset] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_offset} in throw "Attempt to execute code removed by Dart AOT compiler (TFA)";
   }
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  operator *([@vm.inferred-type.metadata=#lib::_Vector?] self::_Vector a) → core::double {
     core::double result = 0.0;
-    for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool] i.{core::num::<}([@vm.direct-call.metadata=#lib::_Vector::_length] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_length}); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int?] i.{core::num::+}(1))
-      result = [@vm.direct-call.metadata=dart.core::_Double::+??] [@vm.inferred-type.metadata=dart.core::_Double] result.{core::double::+}([@vm.direct-call.metadata=dart.core::_Double::*] [@vm.inferred-type.metadata=dart.core::_Double] [@vm.direct-call.metadata=#lib::_Vector::[]] [@vm.inferred-type.metadata=dart.core::_Double] this.{self::_Vector::[]}(i).{core::double::*}([@vm.direct-call.metadata=#lib::_Vector::[]??] [@vm.inferred-type.metadata=dart.core::_Double] a.{self::_Vector::[]}(i)));
+    for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}([@vm.direct-call.metadata=#lib::_Vector::_length] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_length}); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1))
+      result = [@vm.direct-call.metadata=dart.core::_Double::+??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] result.{core::double::+}([@vm.direct-call.metadata=dart.core::_Double::*] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.direct-call.metadata=#lib::_Vector::[]] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] this.{self::_Vector::[]}(i).{core::double::*}([@vm.direct-call.metadata=#lib::_Vector::[]??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] a.{self::_Vector::[]}(i)));
     return result;
   }
 }
 [@vm.inferred-type.metadata=#lib::_Vector?]static field self::_Vector v = new self::_Vector::•(10);
 [@vm.inferred-type.metadata=dart.core::_Double?]static field core::double x = 0.0;
 static method main(core::List<core::String> args) → dynamic {
-  core::Stopwatch timer = let final core::Stopwatch #t4 = new core::Stopwatch::•() in let final dynamic #t5 = [@vm.direct-call.metadata=dart.core::Stopwatch::start] #t4.{core::Stopwatch::start}() in #t4;
-  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool] i.{core::num::<}(100000000); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int?] i.{core::num::+}(1)) {
-    self::x = [@vm.direct-call.metadata=dart.core::_Double::+??] [@vm.inferred-type.metadata=dart.core::_Double] [@vm.inferred-type.metadata=dart.core::_Double?] self::x.{core::double::+}([@vm.direct-call.metadata=#lib::_Vector::*??] [@vm.inferred-type.metadata=dart.core::_Double] [@vm.inferred-type.metadata=#lib::_Vector?] self::v.{self::_Vector::*}([@vm.inferred-type.metadata=#lib::_Vector?] self::v));
+  core::Stopwatch timer = let final core::Stopwatch #t4 = new core::Stopwatch::•() in let final dynamic #t5 = [@vm.direct-call.metadata=dart.core::Stopwatch::start] [@vm.inferred-type.metadata=!? (skip check)] #t4.{core::Stopwatch::start}() in #t4;
+  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100000000); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
+    self::x = [@vm.direct-call.metadata=dart.core::_Double::+??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.inferred-type.metadata=dart.core::_Double?] self::x.{core::double::+}([@vm.direct-call.metadata=#lib::_Vector::*??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.inferred-type.metadata=#lib::_Vector?] self::v.{self::_Vector::*}([@vm.inferred-type.metadata=#lib::_Vector?] self::v));
   }
-  [@vm.direct-call.metadata=dart.core::Stopwatch::stop] timer.{core::Stopwatch::stop}();
+  [@vm.direct-call.metadata=dart.core::Stopwatch::stop] [@vm.inferred-type.metadata=!? (skip check)] timer.{core::Stopwatch::stop}();
   core::print("Elapsed ${[@vm.direct-call.metadata=dart.core::Stopwatch::elapsedMilliseconds] timer.{core::Stopwatch::elapsedMilliseconds}}ms, result ${self::x}");
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect
index 7f4b4d5..4acf3a3 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_basic.dart.expect
@@ -64,15 +64,15 @@
 }
 static method main() → dynamic {
   dynamic used;
-  used = [@vm.direct-call.metadata=#lib::C::foo] [@vm.inferred-type.metadata=#lib::D<dart.core::int>] new self::C::•<core::int>().{self::C::foo}();
-  used = [@vm.direct-call.metadata=#lib::E::foo] [@vm.inferred-type.metadata=#lib::D<dart.core::String>] new self::E::•<core::int, core::String>().{self::E::foo}();
-  used = [@vm.direct-call.metadata=#lib::E::bar] [@vm.inferred-type.metadata=#lib::D<dart.core::int>] new self::E::•<core::int, core::String>().{self::E::bar}();
-  used = [@vm.direct-call.metadata=#lib::E::baz] [@vm.inferred-type.metadata=#lib::D<dart.core::String>] new self::E::•<core::int, core::String>().{self::E::baz}();
+  used = [@vm.direct-call.metadata=#lib::C::foo] [@vm.inferred-type.metadata=#lib::D<dart.core::int> (skip check)] new self::C::•<core::int>().{self::C::foo}();
+  used = [@vm.direct-call.metadata=#lib::E::foo] [@vm.inferred-type.metadata=#lib::D<dart.core::String> (skip check)] new self::E::•<core::int, core::String>().{self::E::foo}();
+  used = [@vm.direct-call.metadata=#lib::E::bar] [@vm.inferred-type.metadata=#lib::D<dart.core::int> (skip check)] new self::E::•<core::int, core::String>().{self::E::bar}();
+  used = [@vm.direct-call.metadata=#lib::E::baz] [@vm.inferred-type.metadata=#lib::D<dart.core::String> (skip check)] new self::E::•<core::int, core::String>().{self::E::baz}();
   self::C<self::X> c = new self::C::•<self::Y>();
-  [@vm.call-site-attributes.metadata=receiverType:#lib::C<#lib::X>] [@vm.direct-call.metadata=#lib::C::id1] c.{self::C::id1}(new self::Y::•());
+  [@vm.call-site-attributes.metadata=receiverType:#lib::C<#lib::X>] [@vm.direct-call.metadata=#lib::C::id1] [@vm.inferred-type.metadata=!? (skip check)] c.{self::C::id1}(new self::Y::•());
   [@vm.call-site-attributes.metadata=receiverType:#lib::C<#lib::X>] [@vm.direct-call.metadata=#lib::C::id2] c.{self::C::id2}(new self::Z::•());
   self::C2<core::num> c2 = new self::C2::•<core::num>();
-  [@vm.call-site-attributes.metadata=receiverType:#lib::C2<dart.core::num>] [@vm.direct-call.metadata=#lib::C2::id3] c2.{self::C2::id3}(3.0);
-  [@vm.call-site-attributes.metadata=receiverType:#lib::C2<dart.core::num>] [@vm.direct-call.metadata=#lib::C2::id4] c2.{self::C2::id4}(new self::K::•<self::J>());
+  [@vm.call-site-attributes.metadata=receiverType:#lib::C2<dart.core::num>] [@vm.direct-call.metadata=#lib::C2::id3] [@vm.inferred-type.metadata=!? (skip check)] c2.{self::C2::id3}(3.0);
+  [@vm.call-site-attributes.metadata=receiverType:#lib::C2<dart.core::num>] [@vm.direct-call.metadata=#lib::C2::id4] [@vm.inferred-type.metadata=!? (skip check)] c2.{self::C2::id4}(new self::K::•<self::J>());
   return used;
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart
index 3b211f3..c211e10 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart
@@ -1,40 +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.
-//
-// This test checks that TFA works as expected on an example imitating the
-// InheritedElement.setDependencies hotspot in Flutter. The example is modified
-// to use a custom class 'MockHashMap' rather than the regular 'HashMap' since
-// we want to print out the inferred type of the '_dependents' field, which
-// would be a 'SetType' under the regular 'HashMap' (and set types aren't
-// translated into 'InferredType'). Also, []= is the target of a truly-dynamic
-// call, and we want to make sure there is only one call-site in this example
-// (call-site level info is not available yet).
 
 import 'dart:collection';
 
 class Element {}
 
-abstract class MockHashMap<K, V> {
-  factory MockHashMap() {
-    return _NotRealHashMap<K, V>();
-  }
-
-  void setEntry(K key, V value);
-}
-
-class _NotRealHashMap<K, V> implements MockHashMap<K, V> {
-  void setEntry(K key, V value) {}
-}
-
 class InheritedElement extends Element {
-  // The inferred type for '_dependents' needs to be concrete and have exact
-  // type arguments.
-  final MockHashMap<Element, Object> _dependents =
-      MockHashMap<Element, Object>();
+  final Map<Element, Object> _dependents = <Element, Object>{};
 
   void setDependencies(Element dependent, Object value) {
-    _dependents.setEntry(dependent, value);
+    _dependents[dependent] = value;
   }
 }
 
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect
index bc476af..a84a25f 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/class_generics_case1.dart.expect
@@ -7,29 +7,17 @@
     : super core::Object::•()
     ;
 }
-abstract class MockHashMap<K extends core::Object = dynamic, V extends core::Object = dynamic> extends core::Object {
-  static factory •<K extends core::Object = dynamic, V extends core::Object = dynamic>() → self::MockHashMap<self::MockHashMap::•::K, self::MockHashMap::•::V> {
-    return new self::_NotRealHashMap::•<self::MockHashMap::•::K, self::MockHashMap::•::V>();
-  }
-  abstract method setEntry(generic-covariant-impl self::MockHashMap::K key, generic-covariant-impl self::MockHashMap::V value) → void;
-}
-class _NotRealHashMap<K extends core::Object = dynamic, V extends core::Object = dynamic> extends core::Object implements self::MockHashMap<self::_NotRealHashMap::K, self::_NotRealHashMap::V> {
-  synthetic constructor •() → self::_NotRealHashMap<self::_NotRealHashMap::K, self::_NotRealHashMap::V>
-    : super core::Object::•()
-    ;
-[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method setEntry([@vm.inferred-type.metadata=! (skip check)] generic-covariant-impl self::_NotRealHashMap::K key, [@vm.inferred-type.metadata=dart.core::_Smi? (skip check)] generic-covariant-impl self::_NotRealHashMap::V value) → void {}
-}
 class InheritedElement extends self::Element {
-[@vm.inferred-type.metadata=#lib::_NotRealHashMap<#lib::Element, dart.core::Object>] [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false]  final field self::MockHashMap<self::Element, core::Object> _dependents = [@vm.inferred-type.metadata=#lib::_NotRealHashMap<#lib::Element, dart.core::Object>] self::MockHashMap::•<self::Element, core::Object>();
+[@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap<#lib::Element, dart.core::Object>] [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false]  final field core::Map<self::Element, core::Object> _dependents = <self::Element, core::Object>{};
   synthetic constructor •() → self::InheritedElement
     : super self::Element::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method setDependencies([@vm.inferred-type.metadata=!] self::Element dependent, [@vm.inferred-type.metadata=dart.core::_Smi?] core::Object value) → void {
-    [@vm.call-site-attributes.metadata=receiverType:#lib::MockHashMap<#lib::Element, dart.core::Object>] [@vm.direct-call.metadata=#lib::_NotRealHashMap::setEntry] [@vm.direct-call.metadata=#lib::InheritedElement::_dependents] [@vm.inferred-type.metadata=#lib::_NotRealHashMap<#lib::Element, dart.core::Object>] this.{self::InheritedElement::_dependents}.{self::MockHashMap::setEntry}(dependent, value);
+    [@vm.call-site-attributes.metadata=receiverType:dart.core::Map<#lib::Element, dart.core::Object>] [@vm.direct-call.metadata=dart.collection::__InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin::[]=] [@vm.inferred-type.metadata=!? (skip check)] [@vm.direct-call.metadata=#lib::InheritedElement::_dependents] [@vm.inferred-type.metadata=dart.collection::_InternalLinkedHashMap<#lib::Element, dart.core::Object>] this.{self::InheritedElement::_dependents}.{core::Map::[]=}(dependent, value);
   }
 }
 static method main() → dynamic {
   self::InheritedElement ie = new self::InheritedElement::•();
-  [@vm.direct-call.metadata=#lib::InheritedElement::setDependencies] ie.{self::InheritedElement::setDependencies}(ie, 0);
-  [@vm.direct-call.metadata=#lib::InheritedElement::setDependencies] ie.{self::InheritedElement::setDependencies}(new self::Element::•(), null);
+  [@vm.direct-call.metadata=#lib::InheritedElement::setDependencies] [@vm.inferred-type.metadata=!? (skip check)] ie.{self::InheritedElement::setDependencies}(ie, 0);
+  [@vm.direct-call.metadata=#lib::InheritedElement::setDependencies] [@vm.inferred-type.metadata=!? (skip check)] ie.{self::InheritedElement::setDependencies}(new self::Element::•(), null);
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
index a64c4af..aee6417 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
@@ -37,19 +37,19 @@
 [@vm.inferred-type.metadata=#lib::D?]static field self::A dd;
 [@vm.inferred-type.metadata=#lib::E?]static field self::E ee = new self::E::•();
 static method callerA1([@vm.inferred-type.metadata=!] self::A aa) → void {
-  aa.{self::A::foo}();
+  [@vm.inferred-type.metadata=!? (skip check)] aa.{self::A::foo}();
 }
 static method callerA2([@vm.inferred-type.metadata=#lib::B] self::A aa) → void {
-  [@vm.direct-call.metadata=#lib::B::foo] aa.{self::A::foo}();
+  [@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=!? (skip check)] aa.{self::A::foo}();
 }
 static method callerA3({[@vm.inferred-type.metadata=#lib::C] self::A aa = null}) → void {
-  [@vm.direct-call.metadata=#lib::C::foo] aa.{self::A::foo}();
+  [@vm.direct-call.metadata=#lib::C::foo] [@vm.inferred-type.metadata=!? (skip check)] aa.{self::A::foo}();
 }
 static method callerA4([@vm.inferred-type.metadata=#lib::D?] self::A aa) → void {
-  [@vm.direct-call.metadata=#lib::C::foo??] aa.{self::A::foo}();
+  [@vm.direct-call.metadata=#lib::C::foo??] [@vm.inferred-type.metadata=!? (skip check)] aa.{self::A::foo}();
 }
 static method callerE1([@vm.inferred-type.metadata=dart.core::_OneByteString] dynamic x) → void {
-  [@vm.direct-call.metadata=dart.core::_StringBase::toString] x.{core::Object::toString}();
+  [@vm.direct-call.metadata=dart.core::_StringBase::toString] [@vm.inferred-type.metadata=!? (skip check)] x.{core::Object::toString}();
 }
 static method callerE2([@vm.inferred-type.metadata=#lib::E?] dynamic x) → void {
   x.{core::Object::toString}();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect
index 8c953da..999e779 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect
@@ -82,7 +82,7 @@
 }
 static method round1({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = null}) → void {
   self::ByteStream x = new self::ByteStream::•(new self::ByteStream::•(new self::_GeneratedStreamImpl::•()));
-  [@vm.direct-call.metadata=#lib::ByteStream::super_foobar1] x.{self::ByteStream::super_foobar1}(onData);
+  [@vm.direct-call.metadata=#lib::ByteStream::super_foobar1] [@vm.inferred-type.metadata=!? (skip check)] x.{self::ByteStream::super_foobar1}(onData);
 }
 static method round2({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = null, [@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = null}) → void {
   new self::_ControllerStream::•();
@@ -100,14 +100,14 @@
   self::ByteStream x = new self::ByteStream::•(new self::_ControllerStream::•());
   self::Stream y = [@vm.direct-call.metadata=#lib::ByteStream::super_stream] [@vm.inferred-type.metadata=!] x.{self::ByteStream::super_stream};
   self::Stream z = [@vm.direct-call.metadata=#lib::StreamView::_stream] [@vm.inferred-type.metadata=!] x.{self::StreamView::_stream};
-  if([@vm.direct-call.metadata=dart.core::Object::==] [@vm.inferred-type.metadata=dart.core::bool] y.{core::Object::==}(z)) {
-    [@vm.direct-call.metadata=#lib::ByteStream::super_foobar2] x.{self::ByteStream::super_foobar2}(onData);
+  if([@vm.direct-call.metadata=dart.core::Object::==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] y.{core::Object::==}(z)) {
+    [@vm.direct-call.metadata=#lib::ByteStream::super_foobar2] [@vm.inferred-type.metadata=!? (skip check)] x.{self::ByteStream::super_foobar2}(onData);
   }
 }
 static method round5() → void {
   self::ByteStream x = new self::ByteStream::•(new self::_GeneratedStreamImpl::•());
   new self::_HandleErrorStream::•();
-  [@vm.direct-call.metadata=#lib::ByteStream::super_foobar3] x.{self::ByteStream::super_foobar3}();
+  [@vm.direct-call.metadata=#lib::ByteStream::super_foobar3] [@vm.inferred-type.metadata=!? (skip check)] x.{self::ByteStream::super_foobar3}();
 }
 static method main(core::List<core::String> args) → dynamic {
   new self::_GeneratedStreamImpl::•();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect
index e1eda81..cdb0b58 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect
@@ -34,11 +34,11 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method barL1() → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL2] this.{self::DeepCaller1::barL2}();
+    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL2] [@vm.inferred-type.metadata=!? (skip check)] this.{self::DeepCaller1::barL2}();
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL2() → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL3] this.{self::DeepCaller1::barL3}();
+    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL3] [@vm.inferred-type.metadata=!? (skip check)] this.{self::DeepCaller1::barL3}();
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL3() → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL4] this.{self::DeepCaller1::barL4}();
+    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL4] [@vm.inferred-type.metadata=!? (skip check)] this.{self::DeepCaller1::barL4}();
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL4() → dynamic
     return self::field1;
 }
@@ -53,11 +53,11 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method barL1([@vm.inferred-type.metadata=#lib::D] self::D dd) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL2] [@vm.inferred-type.metadata=!] this.{self::DeepCaller2::barL2}(dd);
+    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL2] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL2}(dd);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL2([@vm.inferred-type.metadata=#lib::D] self::D dd) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL3] [@vm.inferred-type.metadata=!] this.{self::DeepCaller2::barL3}(dd);
+    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL3] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL3}(dd);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL3([@vm.inferred-type.metadata=#lib::D] self::D dd) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL4] [@vm.inferred-type.metadata=!] this.{self::DeepCaller2::barL4}(dd);
+    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL4] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL4}(dd);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL4([@vm.inferred-type.metadata=#lib::D] self::D dd) → dynamic
     return [@vm.direct-call.metadata=#lib::D::field2] [@vm.inferred-type.metadata=!] dd.{self::D::field2};
 }
@@ -70,9 +70,9 @@
   return [@vm.inferred-type.metadata=!] aa.{self::A::foo}();
 }
 static method use1([@vm.inferred-type.metadata=#lib::DeepCaller1] self::DeepCaller1 x) → dynamic
-  return [@vm.direct-call.metadata=#lib::DeepCaller1::barL1] x.{self::DeepCaller1::barL1}();
+  return [@vm.direct-call.metadata=#lib::DeepCaller1::barL1] [@vm.inferred-type.metadata=!? (skip check)] x.{self::DeepCaller1::barL1}();
 static method use2([@vm.inferred-type.metadata=#lib::DeepCaller2] self::DeepCaller2 x) → dynamic
-  return [@vm.direct-call.metadata=#lib::DeepCaller2::barL1] [@vm.inferred-type.metadata=!] x.{self::DeepCaller2::barL1}(new self::D::•());
+  return [@vm.direct-call.metadata=#lib::DeepCaller2::barL1] [@vm.inferred-type.metadata=! (skip check)] x.{self::DeepCaller2::barL1}(new self::D::•());
 static method createC() → dynamic {
   new self::C::•();
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class1.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class1.dart.expect
index dafde6a..40ad603 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class1.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class1.dart.expect
@@ -25,13 +25,13 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method bar([@vm.inferred-type.metadata=#lib::B?] self::A aa) → dynamic
-    return [@vm.direct-call.metadata=#lib::B::foo??] [@vm.inferred-type.metadata=#lib::T1] aa.{self::A::foo}();
+    return [@vm.direct-call.metadata=#lib::B::foo??] [@vm.inferred-type.metadata=#lib::T1 (skip check)] aa.{self::A::foo}();
 }
 [@vm.inferred-type.metadata=dart.core::Null?]static field core::Function unknown;
 static method use1([@vm.inferred-type.metadata=#lib::Intermediate] self::Intermediate i, [@vm.inferred-type.metadata=#lib::B?] self::A aa) → dynamic
-  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=#lib::T1] i.{self::Intermediate::bar}(aa);
+  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=#lib::T1 (skip check)] i.{self::Intermediate::bar}(aa);
 static method use2([@vm.inferred-type.metadata=#lib::Intermediate] self::Intermediate i, [@vm.inferred-type.metadata=#lib::B?] self::A aa) → dynamic
-  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=#lib::T1] i.{self::Intermediate::bar}(aa);
+  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=#lib::T1 (skip check)] i.{self::Intermediate::bar}(aa);
 static method getDynamic() → dynamic
   return [@vm.call-site-attributes.metadata=receiverType:dart.core::Function] self::unknown.call();
 static method allocateB() → dynamic {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class2.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class2.dart.expect
index 6eb8e58..dedf792 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class2.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_class2.dart.expect
@@ -39,7 +39,7 @@
 }
 class E extends self::_E&D&C {
   synthetic constructor •() → self::E
-    : super self::D::•()
+    : super self::_E&D&C::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method foo() → dynamic
     return new self::T2::•();
@@ -53,11 +53,11 @@
 }
 [@vm.inferred-type.metadata=dart.core::Null?]static field core::Function unknown;
 static method use1([@vm.inferred-type.metadata=#lib::Intermediate] self::Intermediate i, self::A aa) → dynamic
-  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=!] i.{self::Intermediate::bar}(aa);
+  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=! (skip check)] i.{self::Intermediate::bar}(aa);
 static method use2([@vm.inferred-type.metadata=#lib::Intermediate] self::Intermediate i, self::A aa) → dynamic
-  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=!] i.{self::Intermediate::bar}(aa);
+  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=! (skip check)] i.{self::Intermediate::bar}(aa);
 static method use3([@vm.inferred-type.metadata=#lib::Intermediate] self::Intermediate i, self::A aa) → dynamic
-  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=!] i.{self::Intermediate::bar}(aa);
+  return [@vm.direct-call.metadata=#lib::Intermediate::bar] [@vm.inferred-type.metadata=! (skip check)] i.{self::Intermediate::bar}(aa);
 static method getDynamic() → dynamic
   return [@vm.call-site-attributes.metadata=receiverType:dart.core::Function] self::unknown.call();
 static method allocateB() → dynamic {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect
index 8557ca8..2c40b66 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect
@@ -24,11 +24,11 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method barL1([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL2] [@vm.inferred-type.metadata=#lib::T1] this.{self::DeepCaller1::barL2}(aa);
+    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL2] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::DeepCaller1::barL2}(aa);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL2([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL3] [@vm.inferred-type.metadata=#lib::T1] this.{self::DeepCaller1::barL3}(aa);
+    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL3] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::DeepCaller1::barL3}(aa);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL3([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL4] [@vm.inferred-type.metadata=#lib::T1] this.{self::DeepCaller1::barL4}(aa);
+    return [@vm.direct-call.metadata=#lib::DeepCaller1::barL4] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::DeepCaller1::barL4}(aa);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL4([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
     return [@vm.direct-call.metadata=#lib::A::field1??] [@vm.inferred-type.metadata=#lib::T1] aa.{self::A::field1};
 }
@@ -37,19 +37,19 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method barL1([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL2] [@vm.inferred-type.metadata=!] this.{self::DeepCaller2::barL2}(aa);
+    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL2] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL2}(aa);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL2([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL3] [@vm.inferred-type.metadata=!] this.{self::DeepCaller2::barL3}(aa);
+    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL3] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL3}(aa);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL3([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL4] [@vm.inferred-type.metadata=!] this.{self::DeepCaller2::barL4}(aa);
+    return [@vm.direct-call.metadata=#lib::DeepCaller2::barL4] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL4}(aa);
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method barL4([@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
     return [@vm.direct-call.metadata=#lib::A::field2??] [@vm.inferred-type.metadata=!] aa.{self::A::field2};
 }
 [@vm.inferred-type.metadata=dart.core::Null?]static field core::Function unknown;
 static method use1([@vm.inferred-type.metadata=#lib::DeepCaller1] self::DeepCaller1 x, [@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-  return [@vm.direct-call.metadata=#lib::DeepCaller1::barL1] [@vm.inferred-type.metadata=#lib::T1] x.{self::DeepCaller1::barL1}(aa);
+  return [@vm.direct-call.metadata=#lib::DeepCaller1::barL1] [@vm.inferred-type.metadata=#lib::T1 (skip check)] x.{self::DeepCaller1::barL1}(aa);
 static method use2([@vm.inferred-type.metadata=#lib::DeepCaller2] self::DeepCaller2 x, [@vm.inferred-type.metadata=#lib::A?] self::A aa) → dynamic
-  return [@vm.direct-call.metadata=#lib::DeepCaller2::barL1] [@vm.inferred-type.metadata=!] x.{self::DeepCaller2::barL1}(aa);
+  return [@vm.direct-call.metadata=#lib::DeepCaller2::barL1] [@vm.inferred-type.metadata=! (skip check)] x.{self::DeepCaller2::barL1}(aa);
 static method getDynamic() → dynamic
   return [@vm.call-site-attributes.metadata=receiverType:dart.core::Function] self::unknown.call();
 static method setField2([@vm.inferred-type.metadata=#lib::A] self::A aa, [@vm.inferred-type.metadata=#lib::T2] dynamic value) → void {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field2.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field2.dart.expect
index 43d8894..925d3df 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field2.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field2.dart.expect
@@ -29,7 +29,7 @@
     ;
 }
 static method foo1([@vm.inferred-type.metadata=dart.core::_GrowableList<#lib::T1>] core::List<self::T1> list) → dynamic {
-  [@vm.direct-call.metadata=#lib::T3::run] [@vm.direct-call.metadata=#lib::T1::go??] [@vm.inferred-type.metadata=#lib::T3] [@vm.direct-call.metadata=#lib::Q::result??] [@vm.direct-call.metadata=dart._internal::ListIterable::first] [@vm.direct-call.metadata=dart.collection::_ListBase&Object&ListMixin::map] [@vm.inferred-type.metadata=dart._internal::MappedListIterable<#lib::T1, ?>] list.{core::Iterable::map}<self::Q<self::T1>>((self::T1 t1) → self::Q<self::T1> => new self::Q::•<self::T1>(t1)).{core::Iterable::first}.{self::Q::result}.{self::T1::go}().{self::T3::run}();
+  [@vm.direct-call.metadata=#lib::T3::run] [@vm.inferred-type.metadata=!? (skip check)] [@vm.direct-call.metadata=#lib::T1::go??] [@vm.inferred-type.metadata=#lib::T3 (skip check)] [@vm.direct-call.metadata=#lib::Q::result??] [@vm.direct-call.metadata=dart._internal::ListIterable::first] [@vm.direct-call.metadata=dart.collection::_ListBase&Object&ListMixin::map] [@vm.inferred-type.metadata=dart._internal::MappedListIterable<#lib::T1, ?> (skip check)] list.{core::Iterable::map}<self::Q<self::T1>>((self::T1 t1) → self::Q<self::T1> => new self::Q::•<self::T1>(t1)).{core::Iterable::first}.{self::Q::result}.{self::T1::go}().{self::T3::run}();
 }
 static method foo2NewValue() → self::Q<dynamic>
   return new self::Q::•<self::T2>(new self::T2::•());
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_while_processing.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_while_processing.dart.expect
index 9e1d95e..8099495 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_while_processing.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_while_processing.dart.expect
@@ -35,6 +35,6 @@
   core::print([@vm.direct-call.metadata=#lib::Point::x] [@vm.inferred-type.metadata=!] a.{self::Point::x});
   self::Point c = new self::Point::•(new self::T2::•());
   [@vm.direct-call.metadata=#lib::Point::x] [@vm.inferred-type.metadata=!] c.{self::Point::x}.{self::I::foo}();
-  self::getX([@vm.direct-call.metadata=#lib::Point::newPoint1] [@vm.inferred-type.metadata=#lib::Point] a.{self::Point::newPoint1}());
-  self::getX([@vm.direct-call.metadata=#lib::Point::newPoint2] [@vm.inferred-type.metadata=#lib::Point] a.{self::Point::newPoint2}());
+  self::getX([@vm.direct-call.metadata=#lib::Point::newPoint1] [@vm.inferred-type.metadata=#lib::Point (skip check)] a.{self::Point::newPoint1}());
+  self::getX([@vm.direct-call.metadata=#lib::Point::newPoint2] [@vm.inferred-type.metadata=#lib::Point (skip check)] a.{self::Point::newPoint2}());
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
index a29bcf3..5c65020 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
@@ -1,6 +1,7 @@
 library #lib;
 import self as self;
 import "dart:core" as core;
+import "dart:_internal" as _in;
 
 class T1 extends core::Object {
   synthetic constructor •() → self::T1
@@ -48,11 +49,11 @@
     return new self::T1::•();
   }
   no-such-method-forwarder get bar() → dynamic
-    return [@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method foo() → dynamic
-    return [@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi] dynamic a4 = null, [@vm.inferred-type.metadata=dart.core::Null?] dynamic a5 = null]) → dynamic
-    return [@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#bazz, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#bazz, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
@@ -67,11 +68,11 @@
     : super self::C::•()
     ;
   no-such-method-forwarder get bar() → dynamic
-    return [@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method foo() → dynamic
-    return [@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi] dynamic a4 = null, [@vm.inferred-type.metadata=dart.core::Null?] dynamic a5 = null]) → dynamic
-    return [@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#bazz, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#bazz, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 }
 class E extends core::Object implements self::A {
   synthetic constructor •() → self::E
@@ -81,7 +82,7 @@
     return new self::T4::•();
   }
   no-such-method-forwarder get bar() → dynamic
-    return [@vm.direct-call.metadata=#lib::E::noSuchMethod] [@vm.inferred-type.metadata=#lib::T4] this.{self::E::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} dynamic;
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::E::noSuchMethod] [@vm.inferred-type.metadata=#lib::T4 (skip check)] this.{self::E::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
 }
 class F extends core::Object {
   synthetic constructor •() → self::F
@@ -115,12 +116,12 @@
 static method getDynamic() → dynamic
   return [@vm.call-site-attributes.metadata=receiverType:dart.core::Function] self::unknown.call();
 static method main(core::List<core::String> args) → dynamic {
-  core::print([@vm.direct-call.metadata=#lib::B::foo??] [@vm.inferred-type.metadata=#lib::T1] [@vm.inferred-type.metadata=#lib::B?] self::bb.{self::A::foo}());
+  core::print([@vm.direct-call.metadata=#lib::B::foo??] [@vm.inferred-type.metadata=#lib::T1 (skip check)] [@vm.inferred-type.metadata=#lib::B?] self::bb.{self::A::foo}());
   core::print([@vm.direct-call.metadata=#lib::B::bar??] [@vm.inferred-type.metadata=#lib::T1] [@vm.inferred-type.metadata=#lib::B?] self::bb.{self::A::bar});
-  core::print([@vm.direct-call.metadata=#lib::B::bazz??] [@vm.inferred-type.metadata=#lib::T1] [@vm.inferred-type.metadata=#lib::B?] self::bb.{self::A::bazz}(1, 2, 3, 4));
-  core::print([@vm.direct-call.metadata=#lib::D::foo??] [@vm.inferred-type.metadata=#lib::T2] [@vm.inferred-type.metadata=#lib::D?] self::dd.{self::A::foo}());
+  core::print([@vm.direct-call.metadata=#lib::B::bazz??] [@vm.inferred-type.metadata=#lib::T1 (skip check)] [@vm.inferred-type.metadata=#lib::B?] self::bb.{self::A::bazz}(1, 2, 3, 4));
+  core::print([@vm.direct-call.metadata=#lib::D::foo??] [@vm.inferred-type.metadata=#lib::T2 (skip check)] [@vm.inferred-type.metadata=#lib::D?] self::dd.{self::A::foo}());
   core::print([@vm.direct-call.metadata=#lib::D::bar??] [@vm.inferred-type.metadata=#lib::T2] [@vm.inferred-type.metadata=#lib::D?] self::dd.{self::A::bar});
-  core::print([@vm.direct-call.metadata=#lib::D::bazz??] [@vm.inferred-type.metadata=#lib::T2] [@vm.inferred-type.metadata=#lib::D?] self::dd.{self::A::bazz}(1, 2, 3, 4));
+  core::print([@vm.direct-call.metadata=#lib::D::bazz??] [@vm.inferred-type.metadata=#lib::T2 (skip check)] [@vm.inferred-type.metadata=#lib::D?] self::dd.{self::A::bazz}(1, 2, 3, 4));
   new self::E::•();
   self::A xx = self::getDynamic() as{TypeError} self::A;
   core::print([@vm.inferred-type.metadata=!] xx.{self::A::bar});
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
index f898084..472fbbd 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
@@ -19,7 +19,7 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false]  method method1(self::T0 t0) → void {
-    [@vm.direct-call.metadata=#lib::T2::foo??] t0.{self::T0::foo}();
+    [@vm.direct-call.metadata=#lib::T2::foo??] [@vm.inferred-type.metadata=!? (skip check)] t0.{self::T0::foo}();
   }
 }
 abstract class B extends core::Object {
@@ -30,7 +30,7 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method method2(covariant self::T0 t0) → void {
-    [@vm.direct-call.metadata=#lib::T2::foo??] t0.{self::T0::foo}();
+    [@vm.direct-call.metadata=#lib::T2::foo??] [@vm.inferred-type.metadata=!? (skip check)] t0.{self::T0::foo}();
   }
 }
 class D extends core::Object {
@@ -38,15 +38,15 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method method3(self::T0 t0) → void {
-    [@vm.direct-call.metadata=#lib::T2::foo??] t0.{self::T0::foo}();
+    [@vm.direct-call.metadata=#lib::T2::foo??] [@vm.inferred-type.metadata=!? (skip check)] t0.{self::T0::foo}();
   }
 }
 [@vm.inferred-type.metadata=dart.core::Null?]static field core::Function unknown;
 static method func1([@vm.inferred-type.metadata=#lib::T2?] self::T0 t0) → void {
-  [@vm.direct-call.metadata=#lib::T2::foo??] t0.{self::T0::foo}();
+  [@vm.direct-call.metadata=#lib::T2::foo??] [@vm.inferred-type.metadata=!? (skip check)] t0.{self::T0::foo}();
 }
 static method func2(self::T0 t0) → void {
-  [@vm.direct-call.metadata=#lib::T2::foo??] t0.{self::T0::foo}();
+  [@vm.direct-call.metadata=#lib::T2::foo??] [@vm.inferred-type.metadata=!? (skip check)] t0.{self::T0::foo}();
 }
 static method getDynamic() → dynamic
   return [@vm.call-site-attributes.metadata=receiverType:dart.core::Function] self::unknown.call();
@@ -57,7 +57,7 @@
   self::use(self::func2);
   self::use(new self::A::•().{self::A::method1});
   self::B bb = self::getDynamic() as{TypeError} self::B;
-  [@vm.direct-call.metadata=#lib::C::method2??] bb.{self::B::method2}(self::getDynamic());
+  [@vm.direct-call.metadata=#lib::C::method2??] [@vm.inferred-type.metadata=!? (skip check)] bb.{self::B::method2}(self::getDynamic());
   self::getDynamic().method3(self::getDynamic());
   new self::T2::•();
   new self::A::•();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
index 3de865c..feb28eb 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
@@ -1,6 +1,7 @@
 library #lib;
 import self as self;
 import "dart:core" as core;
+import "dart:_internal" as _in;
 import "package:expect/expect.dart" as exp;
 
 class T1 extends core::Object {
@@ -17,7 +18,7 @@
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = null, dynamic a2 = null, dynamic a3 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = null, [@vm.inferred-type.metadata=#lib::T1?] dynamic a5 = null]) → void {
-    [@vm.direct-call.metadata=#lib::A1::foo] this.{self::A1::foo} = a5 as{TypeError} self::T1;
+    [@vm.direct-call.metadata=#lib::A1::foo] this.{self::A1::foo} = _in::unsafeCast<self::T1>(a5);
   }
 }
 class B1 extends core::Object {
@@ -114,14 +115,14 @@
 [@vm.inferred-type.metadata=dart.core::_Closure?]static field core::Function unknown4 = () → dynamic => self::bb4;
 static method test1() → void {
   self::B1 bb = new self::B1::•();
-  [@vm.inferred-type.metadata=#lib::A1] bb.{self::B1::aa1}(1, 2, 3, 4, new self::T1::•());
+  bb.{self::B1::aa1}(1, 2, 3, 4, new self::T1::•());
   self::ok = false;
-  [@vm.direct-call.metadata=#lib::T1::doTest1??] [@vm.direct-call.metadata=#lib::A1::foo] [@vm.inferred-type.metadata=#lib::T1?] [@vm.direct-call.metadata=#lib::B1::aa1] [@vm.inferred-type.metadata=#lib::A1] bb.{self::B1::aa1}.{self::A1::foo}.{self::T1::doTest1}();
+  [@vm.direct-call.metadata=#lib::T1::doTest1??] [@vm.inferred-type.metadata=!? (skip check)] [@vm.direct-call.metadata=#lib::A1::foo] [@vm.inferred-type.metadata=#lib::T1?] [@vm.direct-call.metadata=#lib::B1::aa1] [@vm.inferred-type.metadata=#lib::A1] bb.{self::B1::aa1}.{self::A1::foo}.{self::T1::doTest1}();
   exp::Expect::isTrue([@vm.inferred-type.metadata=dart.core::bool?] self::ok);
 }
 static method test2() → void {
   self::B2 bb = new self::B2::•();
-  [@vm.direct-call.metadata=#lib::B2::doSuperCall] bb.{self::B2::doSuperCall}();
+  [@vm.direct-call.metadata=#lib::B2::doSuperCall] [@vm.inferred-type.metadata=!? (skip check)] bb.{self::B2::doSuperCall}();
   self::ok = false;
   [@vm.direct-call.metadata=#lib::T2::doTest2??] [@vm.direct-call.metadata=#lib::A2::foo] [@vm.inferred-type.metadata=#lib::T2?] [@vm.direct-call.metadata=#lib::B2Base::aa2] [@vm.inferred-type.metadata=#lib::A2] bb.{self::B2Base::aa2}.foo.doTest2();
   exp::Expect::isTrue([@vm.inferred-type.metadata=dart.core::bool?] self::ok);
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
index 2f8a8ba..2c96882 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
@@ -12,7 +12,7 @@
     : super self::A::•()
     ;
 [@vm.procedure-attributes.metadata=hasThisUses:false]  method foo() → core::int
-    return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] 1.{core::num::+}([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo() as{TypeError} core::num) as{TypeError} core::int;
+    return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=!? (skip check)] 1.{core::num::+}([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo() as{TypeError} core::num) as{TypeError} core::int;
 }
 class TearOffDynamicMethod extends core::Object {
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false]  field dynamic bazz;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
index f56b7cc..66af620 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
@@ -1,6 +1,7 @@
 library #lib;
 import self as self;
 import "dart:core" as core;
+import "dart:_internal" as _in;
 
 abstract class A extends core::Object {
   synthetic constructor •() → self::A
@@ -13,7 +14,7 @@
     : super self::A::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false]  method foo() → core::int
-    return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int?] 1.{core::num::+}([@vm.direct-call.metadata=#lib::B::bar] [@vm.inferred-type.metadata=dart.core::_Smi] [@vm.inferred-type.metadata=#lib::B] self::knownResult().bar() as{TypeError} core::num) as{TypeError} core::int;
+    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] 1.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::bar] [@vm.inferred-type.metadata=dart.core::_Smi] [@vm.inferred-type.metadata=#lib::B] self::knownResult().bar())));
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method bar() → core::int
     return 3;
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
index 1410d58..950a81d 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
@@ -1,6 +1,7 @@
 library #lib;
 import self as self;
 import "dart:core" as core;
+import "dart:_internal" as _in;
 
 abstract class A extends core::Object {
   synthetic constructor •() → self::A
@@ -13,14 +14,14 @@
     : super self::A::•()
     ;
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method foo() → core::int
-    return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int?] 1.{core::num::+}([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo() as{TypeError} core::num) as{TypeError} core::int;
+    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] 1.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo())));
 }
 abstract class Base extends core::Object {
   synthetic constructor •() → self::Base
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false]  method foo() → core::int
-    return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int?] 3.{core::num::+}([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo() as{TypeError} core::num) as{TypeError} core::int;
+    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] 3.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo())));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method doCall(dynamic x) → core::int
     return [@vm.call-site-attributes.metadata=receiverType:dynamic] x.call() as{TypeError} core::int;
 }
@@ -29,12 +30,12 @@
     : super self::Base::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method bar() → core::int
-    return [@vm.direct-call.metadata=#lib::Base::doCall] [@vm.inferred-type.metadata=int?] this.{self::Base::doCall}(super.{self::Base::foo});
+    return [@vm.direct-call.metadata=#lib::Base::doCall] [@vm.inferred-type.metadata=int? (skip check)] this.{self::Base::doCall}(super.{self::Base::foo});
 }
 [@vm.inferred-type.metadata=#lib::B?]static field self::A aa = new self::B::•();
 static method knownResult() → dynamic
   return new self::B::•();
 static method main(core::List<core::String> args) → dynamic {
-  [@vm.direct-call.metadata=#lib::TearOffSuperMethod::bar] new self::TearOffSuperMethod::•().{self::TearOffSuperMethod::bar}();
-  [@vm.direct-call.metadata=#lib::B::foo??] [@vm.inferred-type.metadata=#lib::B?] self::aa.{self::A::foo}();
+  [@vm.direct-call.metadata=#lib::TearOffSuperMethod::bar] [@vm.inferred-type.metadata=!? (skip check)] new self::TearOffSuperMethod::•().{self::TearOffSuperMethod::bar}();
+  [@vm.direct-call.metadata=#lib::B::foo??] [@vm.inferred-type.metadata=!? (skip check)] [@vm.inferred-type.metadata=#lib::B?] self::aa.{self::A::foo}();
 }
diff --git a/runtime/bin/isolate_data.cc b/runtime/bin/isolate_data.cc
index 4be4208..54b1050 100644
--- a/runtime/bin/isolate_data.cc
+++ b/runtime/bin/isolate_data.cc
@@ -21,8 +21,7 @@
       dependencies_(NULL),
       resolved_packages_config_(NULL),
       kernel_buffer_(NULL),
-      kernel_buffer_size_(0),
-      owns_kernel_buffer_(false) {
+      kernel_buffer_size_(0) {
   if (package_root != NULL) {
     ASSERT(packages_file == NULL);
     this->package_root = strdup(package_root);
@@ -43,10 +42,6 @@
   packages_file = NULL;
   free(resolved_packages_config_);
   resolved_packages_config_ = NULL;
-  if (owns_kernel_buffer_) {
-    ASSERT(kernel_buffer_ != NULL);
-    free(kernel_buffer_);
-  }
   kernel_buffer_ = NULL;
   kernel_buffer_size_ = 0;
   delete app_snapshot_;
diff --git a/runtime/bin/isolate_data.h b/runtime/bin/isolate_data.h
index ceab601..528f397 100644
--- a/runtime/bin/isolate_data.h
+++ b/runtime/bin/isolate_data.h
@@ -5,6 +5,9 @@
 #ifndef RUNTIME_BIN_ISOLATE_DATA_H_
 #define RUNTIME_BIN_ISOLATE_DATA_H_
 
+#include <memory>
+#include <utility>
+
 #include "include/dart_api.h"
 #include "platform/assert.h"
 #include "platform/globals.h"
@@ -40,13 +43,37 @@
   char* package_root;
   char* packages_file;
 
-  const uint8_t* kernel_buffer() const { return kernel_buffer_; }
+  const std::shared_ptr<uint8_t>& kernel_buffer() const {
+    return kernel_buffer_;
+  }
+
   intptr_t kernel_buffer_size() const { return kernel_buffer_size_; }
-  void set_kernel_buffer(uint8_t* buffer, intptr_t size, bool take_ownership) {
-    ASSERT(kernel_buffer_ == NULL);
-    kernel_buffer_ = buffer;
+
+  // Associate the given kernel buffer with this IsolateData without giving it
+  // ownership of the buffer.
+  void SetKernelBufferUnowned(uint8_t* buffer, intptr_t size) {
+    ASSERT(kernel_buffer_.get() == NULL);
+    kernel_buffer_ = std::shared_ptr<uint8_t>(buffer, FreeUnownedKernelBuffer);
     kernel_buffer_size_ = size;
-    owns_kernel_buffer_ = take_ownership;
+  }
+
+  // Associate the given kernel buffer with this IsolateData and give it
+  // ownership of the buffer. This IsolateData is the first one to own the
+  // buffer.
+  void SetKernelBufferNewlyOwned(uint8_t* buffer, intptr_t size) {
+    ASSERT(kernel_buffer_.get() == NULL);
+    kernel_buffer_ = std::shared_ptr<uint8_t>(buffer, free);
+    kernel_buffer_size_ = size;
+  }
+
+  // Associate the given kernel buffer with this IsolateData and give it
+  // ownership of the buffer. The buffer is already owned by another
+  // IsolateData.
+  void SetKernelBufferAlreadyOwned(std::shared_ptr<uint8_t> buffer,
+                                   intptr_t size) {
+    ASSERT(kernel_buffer_.get() == NULL);
+    kernel_buffer_ = std::move(buffer);
+    kernel_buffer_size_ = size;
   }
 
   void UpdatePackagesFile(const char* packages_file_) {
@@ -91,9 +118,10 @@
   AppSnapshot* app_snapshot_;
   MallocGrowableArray<char*>* dependencies_;
   char* resolved_packages_config_;
-  uint8_t* kernel_buffer_;
+  std::shared_ptr<uint8_t> kernel_buffer_;
   intptr_t kernel_buffer_size_;
-  bool owns_kernel_buffer_;
+
+  static void FreeUnownedKernelBuffer(uint8_t*) {}
 
   DISALLOW_COPY_AND_ASSIGN(IsolateData);
 };
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 339a63ed..bd32e22 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -5,6 +5,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <memory>
 
 #include "include/bin/dart_io_api.h"
 #include "include/dart_api.h"
@@ -213,7 +214,7 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
   IsolateData* isolate_data =
       reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate));
-  const uint8_t* kernel_buffer = isolate_data->kernel_buffer();
+  const uint8_t* kernel_buffer = isolate_data->kernel_buffer().get();
   intptr_t kernel_buffer_size = isolate_data->kernel_buffer_size();
 #endif
 
@@ -274,9 +275,8 @@
       Dart_ShutdownIsolate();
       return NULL;
     }
-    isolate_data->set_kernel_buffer(application_kernel_buffer,
-                                    application_kernel_buffer_size,
-                                    true /*take ownership*/);
+    isolate_data->SetKernelBufferNewlyOwned(application_kernel_buffer,
+                                            application_kernel_buffer_size);
     kernel_buffer = application_kernel_buffer;
     kernel_buffer_size = application_kernel_buffer_size;
   }
@@ -433,9 +433,9 @@
     dfe.LoadKernelService(&kernel_service_buffer, &kernel_service_buffer_size);
     ASSERT(kernel_service_buffer != NULL);
     isolate_data = new IsolateData(uri, package_root, packages_config, NULL);
-    isolate_data->set_kernel_buffer(const_cast<uint8_t*>(kernel_service_buffer),
-                                    kernel_service_buffer_size,
-                                    false /* take_ownership */);
+    isolate_data->SetKernelBufferUnowned(
+        const_cast<uint8_t*>(kernel_service_buffer),
+        kernel_service_buffer_size);
     isolate = Dart_CreateIsolateFromKernel(
         DART_KERNEL_ISOLATE_NAME, main, kernel_service_buffer,
         kernel_service_buffer_size, flags, isolate_data, error);
@@ -527,11 +527,13 @@
                                                 const char* package_root,
                                                 const char* packages_config,
                                                 Dart_IsolateFlags* flags,
+                                                void* callback_data,
                                                 char** error,
                                                 int* exit_code) {
   int64_t start = Dart_TimelineGetMicros();
   ASSERT(script_uri != NULL);
   uint8_t* kernel_buffer = NULL;
+  std::shared_ptr<uint8_t> parent_kernel_buffer;
   intptr_t kernel_buffer_size = 0;
   AppSnapshot* app_snapshot = NULL;
 
@@ -565,7 +567,16 @@
           &isolate_snapshot_data, &isolate_snapshot_instructions);
     }
   }
-  if (!isolate_run_app_snapshot) {
+
+  if (flags->copy_parent_code && callback_data) {
+    IsolateData* parent_isolate_data =
+        reinterpret_cast<IsolateData*>(callback_data);
+    parent_kernel_buffer = parent_isolate_data->kernel_buffer();
+    kernel_buffer = parent_kernel_buffer.get();
+    kernel_buffer_size = parent_isolate_data->kernel_buffer_size();
+  }
+
+  if (kernel_buffer == NULL && !isolate_run_app_snapshot) {
     dfe.ReadScript(script_uri, &kernel_buffer, &kernel_buffer_size);
   }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -573,8 +584,13 @@
   IsolateData* isolate_data =
       new IsolateData(script_uri, package_root, packages_config, app_snapshot);
   if (kernel_buffer != NULL) {
-    isolate_data->set_kernel_buffer(kernel_buffer, kernel_buffer_size,
-                                    true /*take ownership*/);
+    if (parent_kernel_buffer) {
+      isolate_data->SetKernelBufferAlreadyOwned(std::move(parent_kernel_buffer),
+                                                kernel_buffer_size);
+    } else {
+      isolate_data->SetKernelBufferNewlyOwned(kernel_buffer,
+                                              kernel_buffer_size);
+    }
   }
   if (is_main_isolate && (Options::depfile() != NULL)) {
     isolate_data->set_dependencies(new MallocGrowableArray<char*>());
@@ -640,7 +656,7 @@
                                           const char* package_root,
                                           const char* package_config,
                                           Dart_IsolateFlags* flags,
-                                          void* data,
+                                          void* callback_data,
                                           char** error) {
   // The VM should never call the isolate helper with a NULL flags.
   ASSERT(flags != NULL);
@@ -667,8 +683,8 @@
   }
   bool is_main_isolate = false;
   return CreateIsolateAndSetupHelper(is_main_isolate, script_uri, main,
-                                     package_root, package_config, flags, error,
-                                     &exit_code);
+                                     package_root, package_config, flags,
+                                     callback_data, error, &exit_code);
 }
 
 char* BuildIsolateName(const char* script_name, const char* func_name) {
@@ -802,7 +818,8 @@
 
   Dart_Isolate isolate = CreateIsolateAndSetupHelper(
       is_main_isolate, script_name, "main", Options::package_root(),
-      Options::packages_file(), &flags, &error, &exit_code);
+      Options::packages_file(), &flags, NULL /* callback_data */, &error,
+      &exit_code);
 
   if (isolate == NULL) {
     delete[] isolate_name;
diff --git a/runtime/bin/platform.h b/runtime/bin/platform.h
index 76712a6..30d92ae7 100644
--- a/runtime/bin/platform.h
+++ b/runtime/bin/platform.h
@@ -88,7 +88,7 @@
   static int GetScriptIndex() { return script_index_; }
   static char** GetArgv() { return argv_; }
 
-  static DART_NORETURN void Exit(int exit_code);
+  DART_NORETURN static void Exit(int exit_code);
 
   static void SetCoreDumpResourceLimit(int value);
 
diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc
index b0fd774..5cdf6fc 100644
--- a/runtime/bin/platform_win.cc
+++ b/runtime/bin/platform_win.cc
@@ -43,11 +43,21 @@
     // Disable the message box for assertions in the CRT in Debug builds.
     // See: https://msdn.microsoft.com/en-us/library/1y71x448.aspx
     _CrtSetReportMode(_CRT_ASSERT, 0);
+
     // Disable dialog boxes for "critical" errors or when OpenFile cannot find
-    // the requested file. See:
+    // the requested file. However only disable error boxes for general
+    // protection faults if an environment variable is set. Passing
+    // SEM_NOGPFAULTERRORBOX completely disables WindowsErrorReporting (WER)
+    // for the process, which means users loose ability to enable local dump
+    // archiving to collect minidumps for Dart VM crashes.
+    // Our test runner would set DART_SUPPRESS_WER to suppress WER UI during
+    // test suite execution.
     // See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms680621(v=vs.85).aspx
-    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX |
-                 SEM_NOGPFAULTERRORBOX);
+    UINT uMode = SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX;
+    if (getenv("DART_SUPPRESS_WER") != nullptr) {
+      uMode |= SEM_NOGPFAULTERRORBOX;
+    }
+    SetErrorMode(uMode);
 #ifndef PRODUCT
     // Set up global exception handler to be able to dump stack trace on crash.
     SetExceptionHandler();
@@ -71,8 +81,12 @@
           ExceptionInfo->ExceptionRecord->ExceptionFlags,
           ExceptionInfo->ExceptionRecord->ExceptionAddress);
       Dart_DumpNativeStackTrace(ExceptionInfo->ContextRecord);
-      const int kAbortExitCode = 3;
-      Platform::Exit(kAbortExitCode);
+      Console::RestoreConfig();
+      // TODO(zra): Remove once VM shuts down cleanly.
+      ::dart::private_flag_windows_run_tls_destructors = false;
+      // Note: we want to abort(...) here instead of exiting because exiting
+      // would not cause WER to generate a minidump.
+      abort();
     }
     return EXCEPTION_CONTINUE_SEARCH;
   }
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index 703f57f..f024c4d 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -166,9 +166,9 @@
     ASSERT(kernel_service_buffer != NULL);
     isolate_data =
         new bin::IsolateData(script_uri, package_root, packages_config, NULL);
-    isolate_data->set_kernel_buffer(const_cast<uint8_t*>(kernel_service_buffer),
-                                    kernel_service_buffer_size,
-                                    false /* take_ownership */);
+    isolate_data->SetKernelBufferUnowned(
+        const_cast<uint8_t*>(kernel_service_buffer),
+        kernel_service_buffer_size);
     isolate = Dart_CreateIsolateFromKernel(
         script_uri, main, kernel_service_buffer, kernel_service_buffer_size,
         flags, isolate_data, error);
diff --git a/runtime/docs/snapshot_profiling.md b/runtime/docs/snapshot_profiling.md
new file mode 100644
index 0000000..596bda2
--- /dev/null
+++ b/runtime/docs/snapshot_profiling.md
@@ -0,0 +1,19 @@
+# AOT Snapshot Size Profiling
+
+The VM supports profiling the size of AOT snapshots by leveraging the object-graph based file format introduced by V8.
+
+## Recording a profile
+
+To generate a snapshot profile, simply pass the `--write-v8-snapshot-profile-to=<filename>` flag to `gen_snapshot`.
+The profile will be written in JSON format to the requested file.
+Make sure to use the ".heapsnaphsot" extension for the file to open it in Chrome DevTools.
+
+## Examining a profile in Chrome
+
+Open Chrome DevTools, navigate to the "Memory" tab, right-click on the "Profiles" panel, click Load..." and select the snapshot profile file.
+See https://developers.google.com/web/tools/chrome-devtools/memory-problems/heap-snapshots for details on how to use the tool.
+
+## Examining a profile programmatically
+
+A Dart library to parse the snapshot profile format is provided in `pkg/vm/lib/v8_snaphsot_profile.dart`.
+The `dart2js_info` package has some useful code for calculating retainers and other graph statistics.
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 185c901..5ac0f25 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -553,7 +553,7 @@
  * for each part.
  */
 
-#define DART_FLAGS_CURRENT_VERSION (0x0000000a)
+#define DART_FLAGS_CURRENT_VERSION (0x0000000b)
 
 typedef struct {
   int32_t version;
@@ -562,8 +562,10 @@
   bool use_osr;
   bool obfuscate;
   Dart_QualifiedFunctionName* entry_points;
+  bool use_bare_instructions;
   bool load_vmservice_library;
   bool unsafe_trust_strong_mode_types;
+  bool copy_parent_code;
 } Dart_IsolateFlags;
 
 /**
@@ -2459,15 +2461,6 @@
  */
 
 /**
- * Creates a native wrapper class.
- *
- * TODO(turnidge): Document.
- */
-DART_EXPORT Dart_Handle Dart_CreateNativeWrapperClass(Dart_Handle library,
-                                                      Dart_Handle class_name,
-                                                      int field_count);
-
-/**
  * Gets the number of native instance fields in an object.
  */
 DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj,
diff --git a/runtime/include/dart_tools_api.h b/runtime/include/dart_tools_api.h
index 809177b..49b1f19 100644
--- a/runtime/include/dart_tools_api.h
+++ b/runtime/include/dart_tools_api.h
@@ -222,6 +222,25 @@
     Dart_ServiceStreamCancelCallback cancel_callback);
 
 /**
+ * A callback invoked when the VM service receives an event.
+ */
+typedef void (*Dart_NativeStreamConsumer)(const uint8_t* event_json,
+                                          intptr_t event_json_length);
+
+/**
+ * Sets the native VM service stream callbacks for a particular stream.
+ * Note: The function may be called on multiple threads concurrently.
+ *
+ * \param consumer A function pointer to an event handler callback function.
+ *   A NULL value removes the existing listen callback function if any.
+ *
+ * \param stream_id The ID of the stream on which to set the callback.
+ */
+DART_EXPORT void Dart_SetNativeServiceStreamCallback(
+    Dart_NativeStreamConsumer consumer,
+    const char* stream_id);
+
+/**
  * Sends a data event to clients of the VM Service.
  *
  * A data event is used to pass an array of bytes to subscribed VM
diff --git a/runtime/lib/array.cc b/runtime/lib/array.cc
index 3322745..d143a98 100644
--- a/runtime/lib/array.cc
+++ b/runtime/lib/array.cc
@@ -10,19 +10,19 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(List_new, 2) {
+DEFINE_NATIVE_ENTRY(List_new, 0, 2) {
   // This function is handled by flow-graph builder.
   UNREACHABLE();
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(List_allocate, 2) {
+DEFINE_NATIVE_ENTRY(List_allocate, 0, 2) {
   // Implemented in FlowGraphBuilder::VisitNativeBody.
   UNREACHABLE();
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(List_getIndexed, 2) {
+DEFINE_NATIVE_ENTRY(List_getIndexed, 0, 2) {
   const Array& array = Array::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
   if ((index.Value() < 0) || (index.Value() >= array.Length())) {
@@ -31,7 +31,7 @@
   return array.At(index.Value());
 }
 
-DEFINE_NATIVE_ENTRY(List_setIndexed, 3) {
+DEFINE_NATIVE_ENTRY(List_setIndexed, 0, 3) {
   const Array& array = Array::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
   const Instance& value =
@@ -43,13 +43,13 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(List_getLength, 1) {
+DEFINE_NATIVE_ENTRY(List_getLength, 0, 1) {
   const Array& array = Array::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Smi::New(array.Length());
 }
 
 // ObjectArray src, int start, int count, bool needTypeArgument.
-DEFINE_NATIVE_ENTRY(List_slice, 4) {
+DEFINE_NATIVE_ENTRY(List_slice, 0, 4) {
   const Array& src = Array::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, start, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, count, arguments->NativeArgAt(2));
@@ -70,7 +70,7 @@
 }
 
 // Private factory, expects correct arguments.
-DEFINE_NATIVE_ENTRY(ImmutableList_from, 4) {
+DEFINE_NATIVE_ENTRY(ImmutableList_from, 0, 4) {
   // Ignore first argument of a thsi factory (type argument).
   const Array& from_array =
       Array::CheckedHandle(zone, arguments->NativeArgAt(1));
diff --git a/runtime/lib/async.cc b/runtime/lib/async.cc
index 2799419..5a11f34 100644
--- a/runtime/lib/async.cc
+++ b/runtime/lib/async.cc
@@ -11,7 +11,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(AsyncStarMoveNext_debuggerStepCheck, 1) {
+DEFINE_NATIVE_ENTRY(AsyncStarMoveNext_debuggerStepCheck, 0, 1) {
 #if !defined(PRODUCT)
   GET_NON_NULL_NATIVE_ARGUMENT(Closure, async_op, arguments->NativeArgAt(0));
   Debugger* debugger = isolate->debugger();
diff --git a/runtime/lib/bool.cc b/runtime/lib/bool.cc
index dc2b00f..c52fd71 100644
--- a/runtime/lib/bool.cc
+++ b/runtime/lib/bool.cc
@@ -16,7 +16,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(Bool_fromEnvironment, 3) {
+DEFINE_NATIVE_ENTRY(Bool_fromEnvironment, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(1));
   GET_NATIVE_ARGUMENT(Bool, default_value, arguments->NativeArgAt(2));
   // Call the embedder to supply us with the environment.
diff --git a/runtime/lib/class_id.cc b/runtime/lib/class_id.cc
index 2d9f67d..c0f5295 100644
--- a/runtime/lib/class_id.cc
+++ b/runtime/lib/class_id.cc
@@ -7,7 +7,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(ClassID_getID, 1) {
+DEFINE_NATIVE_ENTRY(ClassID_getID, 0, 1) {
   const Instance& instance =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Smi::New(instance.GetClassId());
diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart
index 664f619..07d6afb5 100644
--- a/runtime/lib/collection_patch.dart
+++ b/runtime/lib/collection_patch.dart
@@ -543,7 +543,7 @@
   factory HashSet.identity() => new _IdentityHashSet<E>();
 }
 
-class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> {
+class _HashSet<E> extends _SetBase<E> implements HashSet<E> {
   static const int _INITIAL_CAPACITY = 8;
 
   List<_HashSetEntry<E>> _buckets =
diff --git a/runtime/lib/date.cc b/runtime/lib/date.cc
index 3f694d3..e605c05 100644
--- a/runtime/lib/date.cc
+++ b/runtime/lib/date.cc
@@ -14,7 +14,7 @@
 
 static int64_t kMaxAllowedSeconds = kMaxInt32;
 
-DEFINE_NATIVE_ENTRY(DateTime_timeZoneName, 1) {
+DEFINE_NATIVE_ENTRY(DateTime_timeZoneName, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, dart_seconds,
                                arguments->NativeArgAt(0));
   int64_t seconds = dart_seconds.AsInt64Value();
@@ -25,7 +25,7 @@
   return String::New(name);
 }
 
-DEFINE_NATIVE_ENTRY(DateTime_timeZoneOffsetInSeconds, 1) {
+DEFINE_NATIVE_ENTRY(DateTime_timeZoneOffsetInSeconds, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, dart_seconds,
                                arguments->NativeArgAt(0));
   int64_t seconds = dart_seconds.AsInt64Value();
@@ -36,12 +36,12 @@
   return Integer::New(offset);
 }
 
-DEFINE_NATIVE_ENTRY(DateTime_localTimeZoneAdjustmentInSeconds, 0) {
+DEFINE_NATIVE_ENTRY(DateTime_localTimeZoneAdjustmentInSeconds, 0, 0) {
   int adjustment = OS::GetLocalTimeZoneAdjustmentInSeconds();
   return Integer::New(adjustment);
 }
 
-DEFINE_NATIVE_ENTRY(DateTime_currentTimeMicros, 0) {
+DEFINE_NATIVE_ENTRY(DateTime_currentTimeMicros, 0, 0) {
   return Integer::New(OS::GetCurrentTimeMicros());
 }
 
diff --git a/runtime/lib/developer.cc b/runtime/lib/developer.cc
index e8056b4..defe884 100644
--- a/runtime/lib/developer.cc
+++ b/runtime/lib/developer.cc
@@ -19,7 +19,7 @@
 namespace dart {
 
 // Native implementations for the dart:developer library.
-DEFINE_NATIVE_ENTRY(Developer_debugger, 2) {
+DEFINE_NATIVE_ENTRY(Developer_debugger, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0));
 #if !defined(PRODUCT)
   GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1));
@@ -34,7 +34,7 @@
   return when.raw();
 }
 
-DEFINE_NATIVE_ENTRY(Developer_inspect, 1) {
+DEFINE_NATIVE_ENTRY(Developer_inspect, 0, 1) {
   GET_NATIVE_ARGUMENT(Instance, inspectee, arguments->NativeArgAt(0));
 #ifndef PRODUCT
   if (FLAG_support_service) {
@@ -44,7 +44,7 @@
   return inspectee.raw();
 }
 
-DEFINE_NATIVE_ENTRY(Developer_log, 8) {
+DEFINE_NATIVE_ENTRY(Developer_log, 0, 8) {
 #if defined(PRODUCT)
   return Object::null();
 #else
@@ -66,7 +66,7 @@
 #endif  // PRODUCT
 }
 
-DEFINE_NATIVE_ENTRY(Developer_postEvent, 2) {
+DEFINE_NATIVE_ENTRY(Developer_postEvent, 0, 2) {
 #if defined(PRODUCT)
   return Object::null();
 #else
@@ -80,7 +80,7 @@
 #endif  // PRODUCT
 }
 
-DEFINE_NATIVE_ENTRY(Developer_lookupExtension, 1) {
+DEFINE_NATIVE_ENTRY(Developer_lookupExtension, 0, 1) {
 #if defined(PRODUCT)
   return Object::null();
 #else
@@ -92,7 +92,7 @@
 #endif  // PRODUCT
 }
 
-DEFINE_NATIVE_ENTRY(Developer_registerExtension, 2) {
+DEFINE_NATIVE_ENTRY(Developer_registerExtension, 0, 2) {
 #if defined(PRODUCT)
   return Object::null();
 #else
@@ -112,7 +112,7 @@
 #endif  // PRODUCT
 }
 
-DEFINE_NATIVE_ENTRY(Developer_getServiceMajorVersion, 0) {
+DEFINE_NATIVE_ENTRY(Developer_getServiceMajorVersion, 0, 0) {
 #if defined(PRODUCT)
   return Smi::New(0);
 #else
@@ -120,7 +120,7 @@
 #endif
 }
 
-DEFINE_NATIVE_ENTRY(Developer_getServiceMinorVersion, 0) {
+DEFINE_NATIVE_ENTRY(Developer_getServiceMinorVersion, 0, 0) {
 #if defined(PRODUCT)
   return Smi::New(0);
 #else
@@ -134,7 +134,7 @@
                                    Message::kNormalPriority));
 }
 
-DEFINE_NATIVE_ENTRY(Developer_getServerInfo, 1) {
+DEFINE_NATIVE_ENTRY(Developer_getServerInfo, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
 #if defined(PRODUCT)
   SendNull(port);
@@ -149,7 +149,7 @@
 #endif
 }
 
-DEFINE_NATIVE_ENTRY(Developer_webServerControl, 2) {
+DEFINE_NATIVE_ENTRY(Developer_webServerControl, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
 #if defined(PRODUCT)
   SendNull(port);
@@ -165,7 +165,7 @@
 #endif
 }
 
-DEFINE_NATIVE_ENTRY(Developer_getIsolateIDFromSendPort, 1) {
+DEFINE_NATIVE_ENTRY(Developer_getIsolateIDFromSendPort, 0, 1) {
 #if defined(PRODUCT)
   return Object::null();
 #else
diff --git a/runtime/lib/double.cc b/runtime/lib/double.cc
index eb24241..fb2f903 100644
--- a/runtime/lib/double.cc
+++ b/runtime/lib/double.cc
@@ -17,7 +17,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(Double_doubleFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Double_doubleFromInteger, 0, 2) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   const Integer& value =
@@ -28,7 +28,7 @@
   return Double::New(value.AsDoubleValue());
 }
 
-DEFINE_NATIVE_ENTRY(Double_add, 2) {
+DEFINE_NATIVE_ENTRY(Double_add, 0, 2) {
   double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
@@ -38,7 +38,7 @@
   return Double::New(left + right);
 }
 
-DEFINE_NATIVE_ENTRY(Double_sub, 2) {
+DEFINE_NATIVE_ENTRY(Double_sub, 0, 2) {
   double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
@@ -48,7 +48,7 @@
   return Double::New(left - right);
 }
 
-DEFINE_NATIVE_ENTRY(Double_mul, 2) {
+DEFINE_NATIVE_ENTRY(Double_mul, 0, 2) {
   double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
@@ -58,7 +58,7 @@
   return Double::New(left * right);
 }
 
-DEFINE_NATIVE_ENTRY(Double_div, 2) {
+DEFINE_NATIVE_ENTRY(Double_div, 0, 2) {
   double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
@@ -85,7 +85,7 @@
   return Integer::New(ival);
 }
 
-DEFINE_NATIVE_ENTRY(Double_hashCode, 1) {
+DEFINE_NATIVE_ENTRY(Double_hashCode, 0, 1) {
   double val = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   if (FLAG_trace_intrinsified_natives) {
     OS::PrintErr("Double_hashCode %f\n", val);
@@ -102,7 +102,7 @@
   return Smi::New(((uval >> 32) ^ (uval)) & kSmiMax);
 }
 
-DEFINE_NATIVE_ENTRY(Double_trunc_div, 2) {
+DEFINE_NATIVE_ENTRY(Double_trunc_div, 0, 2) {
   double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
@@ -113,21 +113,21 @@
                          "Result of truncating division is Infinity or NaN");
 }
 
-DEFINE_NATIVE_ENTRY(Double_modulo, 2) {
+DEFINE_NATIVE_ENTRY(Double_modulo, 0, 2) {
   double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   return Double::New(DartModulo(left, right));
 }
 
-DEFINE_NATIVE_ENTRY(Double_remainder, 2) {
+DEFINE_NATIVE_ENTRY(Double_remainder, 0, 2) {
   double left = Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
   double right = right_object.value();
   return Double::New(fmod_ieee(left, right));
 }
 
-DEFINE_NATIVE_ENTRY(Double_greaterThan, 2) {
+DEFINE_NATIVE_ENTRY(Double_greaterThan, 0, 2) {
   const Double& left = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right, arguments->NativeArgAt(1));
   bool result = right.IsNull() ? false : (left.value() > right.value());
@@ -138,13 +138,13 @@
   return Bool::Get(result).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Double_greaterThanFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Double_greaterThanFromInteger, 0, 2) {
   const Double& right = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
   return Bool::Get(left.AsDoubleValue() > right.value()).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Double_equal, 2) {
+DEFINE_NATIVE_ENTRY(Double_equal, 0, 2) {
   const Double& left = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, right, arguments->NativeArgAt(1));
   bool result = right.IsNull() ? false : (left.value() == right.value());
@@ -155,28 +155,28 @@
   return Bool::Get(result).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Double_equalToInteger, 2) {
+DEFINE_NATIVE_ENTRY(Double_equalToInteger, 0, 2) {
   const Double& left = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, right, arguments->NativeArgAt(1));
   return Bool::Get(left.value() == right.AsDoubleValue()).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Double_round, 1) {
+DEFINE_NATIVE_ENTRY(Double_round, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Double::New(round(arg.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Double_floor, 1) {
+DEFINE_NATIVE_ENTRY(Double_floor, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Double::New(floor(arg.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Double_ceil, 1) {
+DEFINE_NATIVE_ENTRY(Double_ceil, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Double::New(ceil(arg.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Double_truncate, 1) {
+DEFINE_NATIVE_ENTRY(Double_truncate, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Double::New(trunc(arg.value()));
 }
@@ -186,12 +186,12 @@
 #pragma GCC diagnostic ignored "-Wold-style-cast"
 #endif
 
-DEFINE_NATIVE_ENTRY(Double_toInt, 1) {
+DEFINE_NATIVE_ENTRY(Double_toInt, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   return DoubleToInteger(arg.value(), "Infinity or NaN toInt");
 }
 
-DEFINE_NATIVE_ENTRY(Double_parse, 3) {
+DEFINE_NATIVE_ENTRY(Double_parse, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, value, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, startValue, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, endValue, arguments->NativeArgAt(2));
@@ -210,12 +210,12 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Double_toString, 1) {
+DEFINE_NATIVE_ENTRY(Double_toString, 0, 1) {
   const Number& number = Number::CheckedHandle(zone, arguments->NativeArgAt(0));
   return number.ToString(Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(Double_toStringAsFixed, 2) {
+DEFINE_NATIVE_ENTRY(Double_toStringAsFixed, 0, 2) {
   // The boundaries are exclusive.
   static const double kLowerBoundary = -1e21;
   static const double kUpperBoundary = 1e21;
@@ -234,7 +234,7 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(Double_toStringAsExponential, 2) {
+DEFINE_NATIVE_ENTRY(Double_toStringAsExponential, 0, 2) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, fraction_digits, arguments->NativeArgAt(1));
   double d = arg.value();
@@ -249,7 +249,7 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(Double_toStringAsPrecision, 2) {
+DEFINE_NATIVE_ENTRY(Double_toStringAsPrecision, 0, 2) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, precision, arguments->NativeArgAt(1));
   double d = arg.value();
@@ -263,24 +263,24 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(Double_getIsInfinite, 1) {
+DEFINE_NATIVE_ENTRY(Double_getIsInfinite, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Bool::Get(isinf(arg.value())).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Double_getIsNaN, 1) {
+DEFINE_NATIVE_ENTRY(Double_getIsNaN, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Bool::Get(isnan(arg.value())).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Double_getIsNegative, 1) {
+DEFINE_NATIVE_ENTRY(Double_getIsNegative, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   // Include negative zero, infinity.
   double dval = arg.value();
   return Bool::Get(signbit(dval) && !isnan(dval)).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Double_flipSignBit, 1) {
+DEFINE_NATIVE_ENTRY(Double_flipSignBit, 0, 1) {
   const Double& arg = Double::CheckedHandle(zone, arguments->NativeArgAt(0));
   const double in_val = arg.value();
   const int64_t bits = bit_cast<int64_t, double>(in_val) ^ kSignBitDouble;
diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc
index 22c1130..54e61eb 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -68,7 +68,7 @@
 // Arg1: index of the first token after the failed assertion.
 // Arg2: Message object or null.
 // Return value: none, throws an exception.
-DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 3) {
+DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 0, 3) {
   // No need to type check the arguments. This function can only be called
   // internally from the VM.
   const TokenPosition assertion_start = TokenPosition(
@@ -112,9 +112,8 @@
 // Arg1: src value.
 // Arg2: dst type.
 // Arg3: dst name.
-// Arg4: type error message.
 // Return value: none, throws an exception.
-DEFINE_NATIVE_ENTRY(TypeError_throwNew, 5) {
+DEFINE_NATIVE_ENTRY(TypeError_throwNew, 0, 4) {
   // No need to type check the arguments. This function can only be called
   // internally from the VM.
   const TokenPosition location = TokenPosition(
@@ -125,12 +124,9 @@
       AbstractType::CheckedHandle(zone, arguments->NativeArgAt(2));
   const String& dst_name =
       String::CheckedHandle(zone, arguments->NativeArgAt(3));
-  const String& error_msg =
-      String::CheckedHandle(zone, arguments->NativeArgAt(4));
   const AbstractType& src_type =
       AbstractType::Handle(src_value.GetType(Heap::kNew));
-  Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name,
-                                      error_msg);
+  Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name);
   UNREACHABLE();
   return Object::null();
 }
@@ -138,7 +134,7 @@
 // Allocate and throw a new FallThroughError.
 // Arg0: index of the case clause token into which we fall through.
 // Return value: none, throws an exception.
-DEFINE_NATIVE_ENTRY(FallThroughError_throwNew, 1) {
+DEFINE_NATIVE_ENTRY(FallThroughError_throwNew, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
   TokenPosition fallthrough_pos = TokenPosition(smi_pos.Value());
 
@@ -163,7 +159,7 @@
 // Arg0: Token position of allocation statement.
 // Arg1: class name of the abstract class that cannot be instantiated.
 // Return value: none, throws an exception.
-DEFINE_NATIVE_ENTRY(AbstractClassInstantiationError_throwNew, 2) {
+DEFINE_NATIVE_ENTRY(AbstractClassInstantiationError_throwNew, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, smi_pos, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, class_name, arguments->NativeArgAt(1));
   TokenPosition error_pos = TokenPosition(smi_pos.Value());
@@ -187,7 +183,7 @@
 }
 
 // Rethrow an error with a stacktrace.
-DEFINE_NATIVE_ENTRY(Async_rethrow, 2) {
+DEFINE_NATIVE_ENTRY(Async_rethrow, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, error, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, stacktrace, arguments->NativeArgAt(1));
   Exceptions::ReThrow(thread, error, stacktrace);
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 4f53173..1fd86bd 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -86,19 +86,7 @@
       : super._create("is assignable", url, line, column, errorMsg);
 
   static _throwNew(int location, Object src_value, _Type dst_type,
-      String dst_name, String bound_error_msg) native "TypeError_throwNew";
-
-  static _throwNewIfNotLoaded(
-      _LibraryPrefix prefix,
-      int location,
-      Object src_value,
-      _Type dst_type,
-      String dst_name,
-      String bound_error_msg) {
-    if (!prefix.isLoaded()) {
-      _throwNew(location, src_value, dst_type, dst_name, bound_error_msg);
-    }
-  }
+      String dst_name) native "TypeError_throwNew";
 
   String toString() => super.message;
 }
diff --git a/runtime/lib/function.cc b/runtime/lib/function.cc
index 0a50260..4311238 100644
--- a/runtime/lib/function.cc
+++ b/runtime/lib/function.cc
@@ -13,7 +13,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(Function_apply, 2) {
+DEFINE_NATIVE_ENTRY(Function_apply, 0, 2) {
   const int kTypeArgsLen = 0;  // TODO(regis): Add support for generic function.
   const Array& fun_arguments =
       Array::CheckedHandle(zone, arguments->NativeArgAt(0));
@@ -30,7 +30,7 @@
   return result.raw();
 }
 
-DEFINE_NATIVE_ENTRY(Closure_equals, 2) {
+DEFINE_NATIVE_ENTRY(Closure_equals, 0, 2) {
   const Closure& receiver =
       Closure::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NATIVE_ARGUMENT(Instance, other, arguments->NativeArgAt(1));
@@ -65,13 +65,13 @@
   return Bool::False().raw();
 }
 
-DEFINE_NATIVE_ENTRY(Closure_computeHash, 1) {
+DEFINE_NATIVE_ENTRY(Closure_computeHash, 0, 1) {
   const Closure& receiver =
       Closure::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Smi::New(receiver.ComputeHash());
 }
 
-DEFINE_NATIVE_ENTRY(Closure_clone, 1) {
+DEFINE_NATIVE_ENTRY(Closure_clone, 0, 1) {
   const Closure& receiver =
       Closure::CheckedHandle(zone, arguments->NativeArgAt(0));
   const TypeArguments& instantiator_type_arguments =
diff --git a/runtime/lib/growable_array.cc b/runtime/lib/growable_array.cc
index 1d57b7a..71d9f2a 100644
--- a/runtime/lib/growable_array.cc
+++ b/runtime/lib/growable_array.cc
@@ -11,7 +11,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(GrowableList_allocate, 2) {
+DEFINE_NATIVE_ENTRY(GrowableList_allocate, 0, 2) {
   const TypeArguments& type_arguments =
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Array, data, arguments->NativeArgAt(1));
@@ -27,7 +27,7 @@
   return new_array.raw();
 }
 
-DEFINE_NATIVE_ENTRY(GrowableList_getIndexed, 2) {
+DEFINE_NATIVE_ENTRY(GrowableList_getIndexed, 0, 2) {
   const GrowableObjectArray& array =
       GrowableObjectArray::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
@@ -38,7 +38,7 @@
   return obj.raw();
 }
 
-DEFINE_NATIVE_ENTRY(GrowableList_setIndexed, 3) {
+DEFINE_NATIVE_ENTRY(GrowableList_setIndexed, 0, 3) {
   const GrowableObjectArray& array =
       GrowableObjectArray::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, index, arguments->NativeArgAt(1));
@@ -50,19 +50,19 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(GrowableList_getLength, 1) {
+DEFINE_NATIVE_ENTRY(GrowableList_getLength, 0, 1) {
   const GrowableObjectArray& array =
       GrowableObjectArray::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Smi::New(array.Length());
 }
 
-DEFINE_NATIVE_ENTRY(GrowableList_getCapacity, 1) {
+DEFINE_NATIVE_ENTRY(GrowableList_getCapacity, 0, 1) {
   const GrowableObjectArray& array =
       GrowableObjectArray::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Smi::New(array.Capacity());
 }
 
-DEFINE_NATIVE_ENTRY(GrowableList_setLength, 2) {
+DEFINE_NATIVE_ENTRY(GrowableList_setLength, 0, 2) {
   const GrowableObjectArray& array =
       GrowableObjectArray::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(1));
@@ -71,7 +71,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(GrowableList_setData, 2) {
+DEFINE_NATIVE_ENTRY(GrowableList_setData, 0, 2) {
   const GrowableObjectArray& array =
       GrowableObjectArray::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Array, data, arguments->NativeArgAt(1));
@@ -80,13 +80,13 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Internal_makeListFixedLength, 1) {
+DEFINE_NATIVE_ENTRY(Internal_makeListFixedLength, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(GrowableObjectArray, array,
                                arguments->NativeArgAt(0));
   return Array::MakeFixedLength(array, /* unique = */ true);
 }
 
-DEFINE_NATIVE_ENTRY(Internal_makeFixedListUnmodifiable, 1) {
+DEFINE_NATIVE_ENTRY(Internal_makeFixedListUnmodifiable, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Array, array, arguments->NativeArgAt(0));
   array.MakeImmutable();
   return array.raw();
diff --git a/runtime/lib/identical.cc b/runtime/lib/identical.cc
index bbb47bd..c0d2b96 100644
--- a/runtime/lib/identical.cc
+++ b/runtime/lib/identical.cc
@@ -8,7 +8,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(Identical_comparison, 2) {
+DEFINE_NATIVE_ENTRY(Identical_comparison, 0, 2) {
   GET_NATIVE_ARGUMENT(Instance, a, arguments->NativeArgAt(0));
   GET_NATIVE_ARGUMENT(Instance, b, arguments->NativeArgAt(1));
   const bool is_identical = a.IsIdenticalTo(b);
diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc
index 1c8cf7c..c66299f 100644
--- a/runtime/lib/integers.cc
+++ b/runtime/lib/integers.cc
@@ -28,7 +28,7 @@
   return true;
 }
 
-DEFINE_NATIVE_ENTRY(Integer_bitAndFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_bitAndFromInteger, 0, 2) {
   const Integer& right =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
@@ -41,7 +41,7 @@
   return left.BitOp(Token::kBIT_AND, right);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_bitOrFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_bitOrFromInteger, 0, 2) {
   const Integer& right =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
@@ -54,7 +54,7 @@
   return left.BitOp(Token::kBIT_OR, right);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_bitXorFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_bitXorFromInteger, 0, 2) {
   const Integer& right =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
@@ -67,7 +67,7 @@
   return left.BitOp(Token::kBIT_XOR, right);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_addFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_addFromInteger, 0, 2) {
   const Integer& right_int =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
@@ -80,7 +80,7 @@
   return left_int.ArithmeticOp(Token::kADD, right_int);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_subFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_subFromInteger, 0, 2) {
   const Integer& right_int =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
@@ -93,7 +93,7 @@
   return left_int.ArithmeticOp(Token::kSUB, right_int);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_mulFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_mulFromInteger, 0, 2) {
   const Integer& right_int =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
@@ -106,7 +106,7 @@
   return left_int.ArithmeticOp(Token::kMUL, right_int);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_truncDivFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_truncDivFromInteger, 0, 2) {
   const Integer& right_int =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
@@ -116,7 +116,7 @@
   return left_int.ArithmeticOp(Token::kTRUNCDIV, right_int);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_moduloFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_moduloFromInteger, 0, 2) {
   const Integer& right_int =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left_int, arguments->NativeArgAt(1));
@@ -133,7 +133,7 @@
   return left_int.ArithmeticOp(Token::kMOD, right_int);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_greaterThanFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_greaterThanFromInteger, 0, 2) {
   const Integer& right =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, left, arguments->NativeArgAt(1));
@@ -146,7 +146,7 @@
   return Bool::Get(left.CompareWith(right) == 1).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Integer_equalToInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_equalToInteger, 0, 2) {
   const Integer& left = Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, right, arguments->NativeArgAt(1));
   ASSERT(CheckInteger(left));
@@ -179,12 +179,12 @@
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_parse, 1) {
+DEFINE_NATIVE_ENTRY(Integer_parse, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, value, arguments->NativeArgAt(0));
   return ParseInteger(value);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_fromEnvironment, 3) {
+DEFINE_NATIVE_ENTRY(Integer_fromEnvironment, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(1));
   GET_NATIVE_ARGUMENT(Integer, default_value, arguments->NativeArgAt(2));
   // Call the embedder to supply us with the environment.
@@ -211,7 +211,7 @@
   return value.ShiftOp(kind, amount, Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_shrFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_shrFromInteger, 0, 2) {
   const Integer& amount =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, value, arguments->NativeArgAt(1));
@@ -224,7 +224,7 @@
   return ShiftOperationHelper(Token::kSHR, value, amount);
 }
 
-DEFINE_NATIVE_ENTRY(Integer_shlFromInteger, 2) {
+DEFINE_NATIVE_ENTRY(Integer_shlFromInteger, 0, 2) {
   const Integer& amount =
       Integer::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, value, arguments->NativeArgAt(1));
@@ -237,7 +237,7 @@
   return ShiftOperationHelper(Token::kSHL, value, amount);
 }
 
-DEFINE_NATIVE_ENTRY(Smi_bitAndFromSmi, 2) {
+DEFINE_NATIVE_ENTRY(Smi_bitAndFromSmi, 0, 2) {
   const Smi& left = Smi::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, right, arguments->NativeArgAt(1));
   if (FLAG_trace_intrinsified_natives) {
@@ -249,7 +249,7 @@
   return Smi::New(left_value.Value() & right_value.Value());
 }
 
-DEFINE_NATIVE_ENTRY(Smi_bitNegate, 1) {
+DEFINE_NATIVE_ENTRY(Smi_bitNegate, 0, 1) {
   const Smi& operand = Smi::CheckedHandle(zone, arguments->NativeArgAt(0));
   if (FLAG_trace_intrinsified_natives) {
     OS::PrintErr("Smi_bitNegate: %s\n", operand.ToCString());
@@ -259,7 +259,7 @@
   return Smi::New(result);
 }
 
-DEFINE_NATIVE_ENTRY(Smi_bitLength, 1) {
+DEFINE_NATIVE_ENTRY(Smi_bitLength, 0, 1) {
   const Smi& operand = Smi::CheckedHandle(zone, arguments->NativeArgAt(0));
   if (FLAG_trace_intrinsified_natives) {
     OS::PrintErr("Smi_bitLength: %s\n", operand.ToCString());
@@ -272,7 +272,7 @@
 
 // Mint natives.
 
-DEFINE_NATIVE_ENTRY(Mint_bitNegate, 1) {
+DEFINE_NATIVE_ENTRY(Mint_bitNegate, 0, 1) {
   const Mint& operand = Mint::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(CheckInteger(operand));
   if (FLAG_trace_intrinsified_natives) {
@@ -282,7 +282,7 @@
   return Integer::New(result);
 }
 
-DEFINE_NATIVE_ENTRY(Mint_bitLength, 1) {
+DEFINE_NATIVE_ENTRY(Mint_bitLength, 0, 1) {
   const Mint& operand = Mint::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(CheckInteger(operand));
   if (FLAG_trace_intrinsified_natives) {
diff --git a/runtime/lib/integers_patch.dart b/runtime/lib/integers_patch.dart
index a871e7c..dc0a20a 100644
--- a/runtime/lib/integers_patch.dart
+++ b/runtime/lib/integers_patch.dart
@@ -49,7 +49,9 @@
   @patch
   static int parse(String source, {int radix, int onError(String source)}) {
     if (source == null) throw new ArgumentError("The source must not be null");
-    if (source.isEmpty) return _throwFormatException(onError, source, 0, radix);
+    if (source.isEmpty) {
+      return _throwFormatException(onError, source, 0, radix, null);
+    }
     if (radix == null || radix == 10) {
       // Try parsing immediately, without trimming whitespace.
       int result = _tryParseSmi(source, 0, source.length - 1);
@@ -64,7 +66,7 @@
   static int _parse(_StringBase source, int radix, onError) {
     int end = source._lastNonWhitespace() + 1;
     if (end == 0) {
-      return _throwFormatException(onError, source, source.length, radix);
+      return _throwFormatException(onError, source, source.length, radix, null);
     }
     int start = source._firstNonWhitespace();
 
@@ -74,7 +76,7 @@
       sign = 0x2c - first; // -1 if '-', +1 if '+'.
       start++;
       if (start == end) {
-        return _throwFormatException(onError, source, end, radix);
+        return _throwFormatException(onError, source, end, radix, null);
       }
       first = source.codeUnitAt(start);
     }
@@ -88,22 +90,14 @@
         if ((first | 0x20) == 0x78 /* x */) {
           index++;
           if (index == end) {
-            return _throwFormatException(onError, source, index, null);
+            return _throwFormatException(onError, source, index, null, null);
           }
-          int result = _parseRadix(source, 16, index, end, sign, sign > 0);
-          if (result == null) {
-            return _throwFormatException(onError, source, null, null);
-          }
-          return result;
+          return _parseRadix(source, 16, index, end, sign, sign > 0, onError);
         }
       }
       radix = 10;
     }
-    int result = _parseRadix(source, radix, start, end, sign, false);
-    if (result == null) {
-      return _throwFormatException(onError, source, null, radix);
-    }
-    return result;
+    return _parseRadix(source, radix, start, end, sign, false, onError);
   }
 
   @patch
@@ -117,28 +111,37 @@
     } else if (radix < 2 || radix > 36) {
       throw new RangeError("Radix $radix not in range 2..36");
     }
-    return _parse(source, radix, _kNull);
+    try {
+      return _parse(source, radix, _kNull);
+    } catch (e) {
+      return null;
+    }
   }
 
   static Null _kNull(_) => null;
 
-  static int _throwFormatException(onError, source, index, radix) {
+  static int _throwFormatException(onError, source, index, radix, message) {
     if (onError != null) return onError(source);
+    if (message != null) {
+      throw new FormatException(message, source, index);
+    }
     if (radix == null) {
       throw new FormatException("Invalid number", source, index);
     }
     throw new FormatException("Invalid radix-$radix number", source, index);
   }
 
-  static int _parseRadix(
-      String source, int radix, int start, int end, int sign, bool allowU64) {
+  static int _parseRadix(String source, int radix, int start, int end, int sign,
+      bool allowU64, onError) {
     int tableIndex = (radix - 2) * 4 + (is64Bit ? 2 : 0);
     int blockSize = _PARSE_LIMITS[tableIndex];
     int length = end - start;
     if (length <= blockSize) {
       _Smi smi = _parseBlock(source, radix, start, end);
-      if (smi != null) return sign * smi;
-      return null;
+      if (smi == null) {
+        return _throwFormatException(onError, source, start, radix, null);
+      }
+      return sign * smi;
     }
 
     // Often cheaper than: int smallBlockSize = length % blockSize;
@@ -150,7 +153,9 @@
     if (smallBlockSize > 0) {
       int blockEnd = start + smallBlockSize;
       _Smi smi = _parseBlock(source, radix, start, blockEnd);
-      if (smi == null) return null;
+      if (smi == null) {
+        return _throwFormatException(onError, source, start, radix, null);
+      }
       result = sign * smi;
       start = blockEnd;
     }
@@ -166,7 +171,9 @@
     int blockEnd = start + blockSize;
     do {
       _Smi smi = _parseBlock(source, radix, start, blockEnd);
-      if (smi == null) return null;
+      if (smi == null) {
+        return _throwFormatException(onError, source, start, radix, null);
+      }
       if (result >= positiveOverflowLimit) {
         if ((result > positiveOverflowLimit) ||
             (smi > _int64OverflowLimits[tableIndex + 2])) {
@@ -181,12 +188,14 @@
               blockEnd + blockSize > end) {
             return (result * multiplier) + smi;
           }
-          return null;
+          return _throwFormatException(onError, source, null, radix,
+              "Positive input exceeds the limit of integer");
         }
       } else if (result <= negativeOverflowLimit) {
         if ((result < negativeOverflowLimit) ||
             (smi > _int64OverflowLimits[tableIndex + 3])) {
-          return null;
+          return _throwFormatException(onError, source, null, radix,
+              "Negative input exceeds the limit of integer");
         }
       }
       result = (result * multiplier) + (sign * smi);
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index bd52652..b925147 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -25,20 +25,20 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(CapabilityImpl_factory, 1) {
+DEFINE_NATIVE_ENTRY(CapabilityImpl_factory, 0, 1) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   uint64_t id = isolate->random()->NextUInt64();
   return Capability::New(id);
 }
 
-DEFINE_NATIVE_ENTRY(CapabilityImpl_equals, 2) {
+DEFINE_NATIVE_ENTRY(CapabilityImpl_equals, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Capability, recv, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Capability, other, arguments->NativeArgAt(1));
   return (recv.Id() == other.Id()) ? Bool::True().raw() : Bool::False().raw();
 }
 
-DEFINE_NATIVE_ENTRY(CapabilityImpl_get_hashcode, 1) {
+DEFINE_NATIVE_ENTRY(CapabilityImpl_get_hashcode, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Capability, cap, arguments->NativeArgAt(0));
   int64_t id = cap.Id();
   int32_t hi = static_cast<int32_t>(id >> 32);
@@ -47,36 +47,36 @@
   return Smi::New(hash);
 }
 
-DEFINE_NATIVE_ENTRY(RawReceivePortImpl_factory, 1) {
+DEFINE_NATIVE_ENTRY(RawReceivePortImpl_factory, 0, 1) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   Dart_Port port_id = PortMap::CreatePort(isolate->message_handler());
   return ReceivePort::New(port_id, false /* not control port */);
 }
 
-DEFINE_NATIVE_ENTRY(RawReceivePortImpl_get_id, 1) {
+DEFINE_NATIVE_ENTRY(RawReceivePortImpl_get_id, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(ReceivePort, port, arguments->NativeArgAt(0));
   return Integer::New(port.Id());
 }
 
-DEFINE_NATIVE_ENTRY(RawReceivePortImpl_get_sendport, 1) {
+DEFINE_NATIVE_ENTRY(RawReceivePortImpl_get_sendport, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(ReceivePort, port, arguments->NativeArgAt(0));
   return port.send_port();
 }
 
-DEFINE_NATIVE_ENTRY(RawReceivePortImpl_closeInternal, 1) {
+DEFINE_NATIVE_ENTRY(RawReceivePortImpl_closeInternal, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(ReceivePort, port, arguments->NativeArgAt(0));
   Dart_Port id = port.Id();
   PortMap::ClosePort(id);
   return Integer::New(id);
 }
 
-DEFINE_NATIVE_ENTRY(SendPortImpl_get_id, 1) {
+DEFINE_NATIVE_ENTRY(SendPortImpl_get_id, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   return Integer::New(port.Id());
 }
 
-DEFINE_NATIVE_ENTRY(SendPortImpl_get_hashcode, 1) {
+DEFINE_NATIVE_ENTRY(SendPortImpl_get_hashcode, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   int64_t id = port.Id();
   int32_t hi = static_cast<int32_t>(id >> 32);
@@ -85,7 +85,7 @@
   return Smi::New(hash);
 }
 
-DEFINE_NATIVE_ENTRY(SendPortImpl_sendInternal_, 2) {
+DEFINE_NATIVE_ENTRY(SendPortImpl_sendInternal_, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   // TODO(iposva): Allow for arbitrary messages to be sent.
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, obj, arguments->NativeArgAt(1));
@@ -182,7 +182,7 @@
   return result;
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 10) {
+DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 0, 10) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, script_uri, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(2));
@@ -230,6 +230,10 @@
           isolate->spawn_count_monitor(), isolate->spawn_count(),
           utf8_package_root, utf8_package_config, paused.value(), fatal_errors,
           on_exit_port, on_error_port);
+
+      // Since this is a call to Isolate.spawn, copy the parent isolate's code.
+      state->isolate_flags()->copy_parent_code = true;
+
       ThreadPool::Task* spawn_task = new SpawnIsolateTask(state);
 
       isolate->IncrementSpawnCount();
@@ -281,7 +285,7 @@
   return result;
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 12) {
+DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 0, 12) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, uri, arguments->NativeArgAt(1));
 
@@ -357,6 +361,9 @@
     flags->enable_asserts = checked.value();
   }
 
+  // Since this is a call to Isolate.spawnUri, don't copy the parent's code.
+  state->isolate_flags()->copy_parent_code = false;
+
   ThreadPool::Task* spawn_task = new SpawnIsolateTask(state);
 
   isolate->IncrementSpawnCount();
@@ -371,7 +378,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0) {
+DEFINE_NATIVE_ENTRY(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0, 0) {
   const Array& result = Array::Handle(Array::New(3));
   result.SetAt(0, SendPort::Handle(SendPort::New(isolate->main_port())));
   result.SetAt(
@@ -381,13 +388,13 @@
   return result.raw();
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_getCurrentRootUriStr, 0) {
+DEFINE_NATIVE_ENTRY(Isolate_getCurrentRootUriStr, 0, 0) {
   const Library& root_lib =
       Library::Handle(zone, isolate->object_store()->root_library());
   return root_lib.url();
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_sendOOB, 2) {
+DEFINE_NATIVE_ENTRY(Isolate_sendOOB, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Array, msg, arguments->NativeArgAt(1));
 
diff --git a/runtime/lib/linked_hash_map.cc b/runtime/lib/linked_hash_map.cc
index cd09658..89ad2bb 100644
--- a/runtime/lib/linked_hash_map.cc
+++ b/runtime/lib/linked_hash_map.cc
@@ -12,13 +12,13 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_getIndex, 1) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_getIndex, 0, 1) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   return map.index();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_setIndex, 2) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_setIndex, 0, 2) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   const TypedData& index =
@@ -27,13 +27,13 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_getData, 1) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_getData, 0, 1) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   return map.data();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_setData, 2) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_setData, 0, 2) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Array& data = Array::CheckedHandle(zone, arguments->NativeArgAt(1));
@@ -41,13 +41,13 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_getHashMask, 1) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_getHashMask, 0, 1) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   return map.hash_mask();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_setHashMask, 2) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_setHashMask, 0, 2) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Smi& hashMask = Smi::CheckedHandle(zone, arguments->NativeArgAt(1));
@@ -55,13 +55,13 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_getDeletedKeys, 1) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_getDeletedKeys, 0, 1) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   return map.deleted_keys();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_setDeletedKeys, 2) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_setDeletedKeys, 0, 2) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Smi& deletedKeys = Smi::CheckedHandle(zone, arguments->NativeArgAt(1));
@@ -69,13 +69,13 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_getUsedData, 1) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_getUsedData, 0, 1) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   return map.used_data();
 }
 
-DEFINE_NATIVE_ENTRY(LinkedHashMap_setUsedData, 2) {
+DEFINE_NATIVE_ENTRY(LinkedHashMap_setUsedData, 0, 2) {
   const LinkedHashMap& map =
       LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Smi& usedData = Smi::CheckedHandle(zone, arguments->NativeArgAt(1));
diff --git a/runtime/lib/math.cc b/runtime/lib/math.cc
index e3ef926..b4a5bfd 100644
--- a/runtime/lib/math.cc
+++ b/runtime/lib/math.cc
@@ -13,58 +13,58 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(Math_sqrt, 1) {
+DEFINE_NATIVE_ENTRY(Math_sqrt, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(sqrt(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_sin, 1) {
+DEFINE_NATIVE_ENTRY(Math_sin, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(sin(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_cos, 1) {
+DEFINE_NATIVE_ENTRY(Math_cos, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(cos(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_tan, 1) {
+DEFINE_NATIVE_ENTRY(Math_tan, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(tan(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_asin, 1) {
+DEFINE_NATIVE_ENTRY(Math_asin, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(asin(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_acos, 1) {
+DEFINE_NATIVE_ENTRY(Math_acos, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(acos(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_atan, 1) {
+DEFINE_NATIVE_ENTRY(Math_atan, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(atan(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_atan2, 2) {
+DEFINE_NATIVE_ENTRY(Math_atan2, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand1, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand2, arguments->NativeArgAt(1));
   return Double::New(atan2_ieee(operand1.value(), operand2.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_exp, 1) {
+DEFINE_NATIVE_ENTRY(Math_exp, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(exp(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_log, 1) {
+DEFINE_NATIVE_ENTRY(Math_log, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
   return Double::New(log(operand.value()));
 }
 
-DEFINE_NATIVE_ENTRY(Math_doublePow, 2) {
+DEFINE_NATIVE_ENTRY(Math_doublePow, 0, 2) {
   const double operand =
       Double::CheckedHandle(zone, arguments->NativeArgAt(0)).value();
   GET_NON_NULL_NATIVE_ARGUMENT(Double, exponent_object,
@@ -94,7 +94,7 @@
 //       ((_A * (_state[_kSTATE_LO])) + _state[_kSTATE_HI]) & (1 << 64) - 1);
 //   _state[_kSTATE_LO] = state & (1 << 32) - 1);
 //   _state[_kSTATE_HI] = state >> 32;
-DEFINE_NATIVE_ENTRY(Random_nextState, 1) {
+DEFINE_NATIVE_ENTRY(Random_nextState, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, receiver, arguments->NativeArgAt(0));
   const TypedData& array = TypedData::Handle(GetRandomStateArray(receiver));
   const uint64_t state_lo = array.GetUint32(0);
@@ -143,7 +143,7 @@
 //   result[_kSTATE_LO] = seed & ((1 << 32) - 1);
 //   result[_kSTATE_HI] = seed >> 32;
 //   return result;
-DEFINE_NATIVE_ENTRY(Random_setupSeed, 1) {
+DEFINE_NATIVE_ENTRY(Random_setupSeed, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, seed_int, arguments->NativeArgAt(0));
   uint64_t seed = mix64(static_cast<uint64_t>(seed_int.AsInt64Value()));
 
@@ -153,14 +153,14 @@
   return CreateRandomState(zone, seed);
 }
 
-DEFINE_NATIVE_ENTRY(Random_initialSeed, 0) {
+DEFINE_NATIVE_ENTRY(Random_initialSeed, 0, 0) {
   Random* rnd = isolate->random();
   uint64_t seed = rnd->NextUInt32();
   seed |= (static_cast<uint64_t>(rnd->NextUInt32()) << 32);
   return CreateRandomState(zone, seed);
 }
 
-DEFINE_NATIVE_ENTRY(SecureRandom_getBytes, 1) {
+DEFINE_NATIVE_ENTRY(SecureRandom_getBytes, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, count, arguments->NativeArgAt(0));
   const intptr_t n = count.Value();
   ASSERT((n > 0) && (n <= 8));
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 02437d3..d4916d0 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -23,11 +23,6 @@
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
 
-#define PROPAGATE_IF_MALFORMED(type)                                           \
-  if (type.IsMalformed()) {                                                    \
-    Exceptions::PropagateError(Error::Handle(type.error()));                   \
-  }
-
 #define RETURN_OR_PROPAGATE(expr)                                              \
   RawObject* result = expr;                                                    \
   if (RawObject::IsErrorClassId(result->GetClassIdMayBeSmi())) {               \
@@ -220,7 +215,6 @@
   for (intptr_t i = 0; i < args.Length(); i++) {
     type ^= args.TypeAt(i);
     ASSERT(type.IsTypeParameter());
-    PROPAGATE_IF_MALFORMED(type);
     ASSERT(type.IsFinalized());
     name ^= type.name();
     result.SetAt(2 * i, name);
@@ -322,24 +316,16 @@
     return CreateTypedefMirror(cls, type, is_declaration, owner_mirror);
   }
 
-  const Array& args = Array::Handle(Array::New(10));
+  const Array& args = Array::Handle(Array::New(9));
   args.SetAt(0, MirrorReference::Handle(MirrorReference::New(cls)));
   args.SetAt(1, type);
-  // Note that the VM does not consider mixin application aliases to be mixin
-  // applications, so this only covers anonymous mixin applications. We do not
-  // set the names of anonymous mixin applications here because the mirrors
-  // use a different naming convention than the VM (lib.S with lib.M and S&M
-  // respectively).
-  if (!cls.IsMixinApplication()) {
-    args.SetAt(2, String::Handle(cls.Name()));
-  }
+  args.SetAt(2, String::Handle(cls.Name()));
   args.SetAt(3, owner_mirror);
   args.SetAt(4, Bool::Get(cls.is_abstract()));
   args.SetAt(5, Bool::Get(cls.IsGeneric()));
-  args.SetAt(6, Bool::Get(cls.is_mixin_app_alias()));
-  args.SetAt(7, Bool::Get(cls.is_transformed_mixin_application()));
-  args.SetAt(8, cls.NumTypeParameters() == 0 ? Bool::False() : is_declaration);
-  args.SetAt(9, Bool::Get(cls.is_enum_class()));
+  args.SetAt(6, Bool::Get(cls.is_transformed_mixin_application()));
+  args.SetAt(7, cls.NumTypeParameters() == 0 ? Bool::False() : is_declaration);
+  args.SetAt(8, Bool::Get(cls.is_enum_class()));
   return CreateMirror(Symbols::_LocalClassMirror(), args);
 }
 
@@ -433,7 +419,7 @@
   return CreateMirror(Symbols::_LocalLibraryDependencyMirror(), args);
 }
 
-DEFINE_NATIVE_ENTRY(LibraryMirror_fromPrefix, 1) {
+DEFINE_NATIVE_ENTRY(LibraryMirror_fromPrefix, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(LibraryPrefix, prefix,
                                arguments->NativeArgAt(0));
   const Library& deferred_lib = Library::Handle(prefix.GetLibrary(0));
@@ -443,7 +429,7 @@
   return CreateLibraryMirror(thread, deferred_lib);
 }
 
-DEFINE_NATIVE_ENTRY(LibraryMirror_libraryDependencies, 2) {
+DEFINE_NATIVE_ENTRY(LibraryMirror_libraryDependencies, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, lib_mirror, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
   const Library& lib = Library::Handle(ref.GetLibraryReferent());
@@ -511,8 +497,7 @@
     return CreateTypeMirror(ref_type);
   }
   ASSERT(type.IsFinalized());
-  PROPAGATE_IF_MALFORMED(type);
-  ASSERT(type.IsCanonical() || type.IsTypeParameter() || type.IsBoundedType());
+  ASSERT(type.IsCanonical() || type.IsTypeParameter());
 
   if (type.IsFunctionType()) {
     const Class& scope_class = Class::Handle(Type::Cast(type).type_class());
@@ -539,10 +524,6 @@
   } else if (type.IsTypeParameter()) {
     return CreateTypeVariableMirror(TypeParameter::Cast(type),
                                     Object::null_instance());
-  } else if (type.IsBoundedType()) {
-    AbstractType& actual_type =
-        AbstractType::Handle(BoundedType::Cast(type).type());
-    return CreateTypeMirror(actual_type);
   }
   UNREACHABLE();
   return Instance::null();
@@ -591,8 +572,7 @@
   // Generic function type parameters are not reified, but mapped to dynamic,
   // i.e. all function type parameters are free with a null vector.
   ASSERT(type.IsFinalized());
-  PROPAGATE_IF_MALFORMED(type);
-  ASSERT(type.IsCanonical() || type.IsTypeParameter() || type.IsBoundedType());
+  ASSERT(type.IsCanonical() || type.IsTypeParameter());
 
   if (type.IsInstantiated()) {
     return type.Canonicalize();
@@ -600,22 +580,16 @@
   TypeArguments& instantiator_type_args = TypeArguments::Handle();
   if (!instantiator.IsNull()) {
     ASSERT(instantiator.IsFinalized());
-    PROPAGATE_IF_MALFORMED(instantiator);
     instantiator_type_args = instantiator.arguments();
   }
-  Error& bound_error = Error::Handle();
   AbstractType& result = AbstractType::Handle(type.InstantiateFrom(
-      instantiator_type_args, Object::null_type_arguments(), kAllFree,
-      &bound_error, NULL, NULL, Heap::kOld));
-  if (!bound_error.IsNull()) {
-    Exceptions::PropagateError(bound_error);
-    UNREACHABLE();
-  }
+      instantiator_type_args, Object::null_type_arguments(), kAllFree, NULL,
+      Heap::kOld));
   ASSERT(result.IsFinalized());
   return result.Canonicalize();
 }
 
-DEFINE_NATIVE_ENTRY(MirrorSystem_libraries, 0) {
+DEFINE_NATIVE_ENTRY(MirrorSystem_libraries, 0, 0) {
   const GrowableObjectArray& libraries =
       GrowableObjectArray::Handle(zone, isolate->object_store()->libraries());
 
@@ -635,7 +609,7 @@
   return library_mirrors.raw();
 }
 
-DEFINE_NATIVE_ENTRY(MirrorSystem_isolate, 0) {
+DEFINE_NATIVE_ENTRY(MirrorSystem_isolate, 0, 0) {
   VerifyMethodKindShifts();
 
   return CreateIsolateMirror();
@@ -647,7 +621,7 @@
   Exceptions::PropagateError(error);
 }
 
-DEFINE_NATIVE_ENTRY(IsolateMirror_loadUri, 1) {
+DEFINE_NATIVE_ENTRY(IsolateMirror_loadUri, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, uri, arguments->NativeArgAt(0));
 
   if (!isolate->HasTagHandler()) {
@@ -726,9 +700,8 @@
   FATAL("Non-library from tag handler");
 }
 
-DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) {
+DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
-  PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
   ASSERT(type.HasTypeClass());
   const Class& cls = Class::Handle(type.type_class());
@@ -742,12 +715,12 @@
                            Object::null_instance());
 }
 
-DEFINE_NATIVE_ENTRY(Mirrors_makeLocalTypeMirror, 1) {
+DEFINE_NATIVE_ENTRY(Mirrors_makeLocalTypeMirror, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
   return CreateTypeMirror(type);
 }
 
-DEFINE_NATIVE_ENTRY(Mirrors_instantiateGenericType, 2) {
+DEFINE_NATIVE_ENTRY(Mirrors_instantiateGenericType, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Array, args, arguments->NativeArgAt(1));
 
@@ -795,34 +768,23 @@
   Type& instantiated_type =
       Type::Handle(Type::New(clz, type_args_obj, TokenPosition::kNoSource));
   instantiated_type ^= ClassFinalizer::FinalizeType(clz, instantiated_type);
-  if (instantiated_type.IsMalbounded()) {
-    const LanguageError& type_error =
-        LanguageError::Handle(instantiated_type.error());
-    const Array& error_args = Array::Handle(Array::New(3));
-    error_args.SetAt(0, args);
-    error_args.SetAt(1, String::Handle(String::New("typeArguments")));
-    error_args.SetAt(2, String::Handle(type_error.FormatMessage()));
-    Exceptions::ThrowByType(Exceptions::kArgumentValue, error_args);
-    UNREACHABLE();
-  }
-
   return instantiated_type.raw();
 }
 
-DEFINE_NATIVE_ENTRY(Mirrors_mangleName, 2) {
+DEFINE_NATIVE_ENTRY(Mirrors_mangleName, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
   const Library& lib = Library::Handle(ref.GetLibraryReferent());
   return lib.IsPrivate(name) ? lib.PrivateName(name) : name.raw();
 }
 
-DEFINE_NATIVE_ENTRY(MirrorReference_equals, 2) {
+DEFINE_NATIVE_ENTRY(MirrorReference_equals, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, b, arguments->NativeArgAt(1));
   return Bool::Get(a.referent() == b.referent()).raw();
 }
 
-DEFINE_NATIVE_ENTRY(DeclarationMirror_metadata, 1) {
+DEFINE_NATIVE_ENTRY(DeclarationMirror_metadata, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, reflectee, arguments->NativeArgAt(0));
   Object& decl = Object::Handle();
   if (reflectee.IsMirrorReference()) {
@@ -866,7 +828,7 @@
   return metadata.raw();
 }
 
-DEFINE_NATIVE_ENTRY(FunctionTypeMirror_call_method, 2) {
+DEFINE_NATIVE_ENTRY(FunctionTypeMirror_call_method, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
                                arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
@@ -877,14 +839,14 @@
   return CreateMethodMirror(func, owner_mirror, AbstractType::Handle());
 }
 
-DEFINE_NATIVE_ENTRY(FunctionTypeMirror_parameters, 2) {
+DEFINE_NATIVE_ENTRY(FunctionTypeMirror_parameters, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
   const Function& func = Function::Handle(ref.GetFunctionReferent());
   return CreateParameterMirrorList(func, owner);
 }
 
-DEFINE_NATIVE_ENTRY(FunctionTypeMirror_return_type, 1) {
+DEFINE_NATIVE_ENTRY(FunctionTypeMirror_return_type, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   const Function& func = Function::Handle(ref.GetFunctionReferent());
   ASSERT(!func.IsNull());
@@ -893,7 +855,7 @@
   return type.Canonicalize();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_libraryUri, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_libraryUri, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   const Class& klass = Class::Handle(ref.GetClassReferent());
   const Library& library = Library::Handle(klass.library());
@@ -901,9 +863,8 @@
   return library.url();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_supertype, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_supertype, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
-  PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
   const Class& cls = Class::Handle(type.type_class());
   const AbstractType& super_type = AbstractType::Handle(cls.super_type());
@@ -911,18 +872,16 @@
   return super_type.raw();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_supertype_instantiated, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_supertype_instantiated, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
-  PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
   const Class& cls = Class::Handle(type.type_class());
   const AbstractType& super_type = AbstractType::Handle(cls.super_type());
   return InstantiateType(super_type, type);
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_interfaces, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_interfaces, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
-  PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
   const Class& cls = Class::Handle(type.type_class());
   const Error& error = Error::Handle(cls.EnsureIsFinalized(thread));
@@ -933,9 +892,8 @@
   return cls.interfaces();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_interfaces_instantiated, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_interfaces_instantiated, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
-  PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
   const Class& cls = Class::Handle(type.type_class());
   const Error& error = Error::Handle(cls.EnsureIsFinalized(thread));
@@ -956,35 +914,29 @@
   return interfaces_inst.raw();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_mixin, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_mixin, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
-  PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
   const Class& cls = Class::Handle(type.type_class());
   AbstractType& mixin_type = AbstractType::Handle();
   if (cls.is_transformed_mixin_application()) {
     const Array& interfaces = Array::Handle(cls.interfaces());
     mixin_type ^= interfaces.At(interfaces.Length() - 1);
-  } else {
-    mixin_type = cls.mixin();
   }
   ASSERT(mixin_type.IsNull() || mixin_type.IsFinalized());
   return mixin_type.raw();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_mixin_instantiated, 2) {
+DEFINE_NATIVE_ENTRY(ClassMirror_mixin_instantiated, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, instantiator,
                                arguments->NativeArgAt(1));
-  PROPAGATE_IF_MALFORMED(type);
   ASSERT(type.IsFinalized());
   const Class& cls = Class::Handle(type.type_class());
   AbstractType& mixin_type = AbstractType::Handle();
   if (cls.is_transformed_mixin_application()) {
     const Array& interfaces = Array::Handle(cls.interfaces());
     mixin_type ^= interfaces.At(interfaces.Length() - 1);
-  } else {
-    mixin_type = cls.mixin();
   }
   if (mixin_type.IsNull()) {
     return mixin_type.raw();
@@ -993,7 +945,7 @@
   return InstantiateType(mixin_type, instantiator);
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_members, 3) {
+DEFINE_NATIVE_ENTRY(ClassMirror_members, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
                                arguments->NativeArgAt(0));
   GET_NATIVE_ARGUMENT(AbstractType, owner_instantiator,
@@ -1041,7 +993,7 @@
   return member_mirrors.raw();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_constructors, 3) {
+DEFINE_NATIVE_ENTRY(ClassMirror_constructors, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
                                arguments->NativeArgAt(0));
   GET_NATIVE_ARGUMENT(AbstractType, owner_instantiator,
@@ -1074,7 +1026,7 @@
   return constructor_mirrors.raw();
 }
 
-DEFINE_NATIVE_ENTRY(LibraryMirror_members, 2) {
+DEFINE_NATIVE_ENTRY(LibraryMirror_members, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
                                arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
@@ -1093,11 +1045,9 @@
     entry = entries.GetNext();
     if (entry.IsClass()) {
       const Class& klass = Class::Cast(entry);
-      // We filter out mixin application classes and dynamic.
+      // We filter out dynamic.
       // TODO(12478): Should not need to filter out dynamic.
-      // Note that the VM does not consider mixin application aliases to be
-      // mixin applications.
-      if (!klass.IsDynamicClass() && !klass.IsMixinApplication()) {
+      if (!klass.IsDynamicClass()) {
         type = klass.DeclarationType();
         member_mirror = CreateClassMirror(klass, type,
                                           Bool::True(),  // is_declaration
@@ -1126,7 +1076,7 @@
   return member_mirrors.raw();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_type_variables, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_type_variables, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   const Class& klass = Class::Handle(ref.GetClassReferent());
   const Error& error = Error::Handle(zone, klass.EnsureIsFinalized(thread));
@@ -1137,7 +1087,7 @@
   return CreateTypeVariableList(klass);
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 1) {
+DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
 
   const Class& cls = Class::Handle(type.type_class());
@@ -1174,7 +1124,7 @@
   return result.raw();
 }
 
-DEFINE_NATIVE_ENTRY(TypeVariableMirror_owner, 1) {
+DEFINE_NATIVE_ENTRY(TypeVariableMirror_owner, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(TypeParameter, param, arguments->NativeArgAt(0));
   Class& owner = Class::Handle(param.parameterized_class());
   AbstractType& type = AbstractType::Handle();
@@ -1192,12 +1142,12 @@
                            Instance::null_instance());
 }
 
-DEFINE_NATIVE_ENTRY(TypeVariableMirror_upper_bound, 1) {
+DEFINE_NATIVE_ENTRY(TypeVariableMirror_upper_bound, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(TypeParameter, param, arguments->NativeArgAt(0));
   return param.bound();
 }
 
-DEFINE_NATIVE_ENTRY(TypedefMirror_declaration, 1) {
+DEFINE_NATIVE_ENTRY(TypedefMirror_declaration, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0));
   ASSERT(type.IsFunctionType());
   const Class& cls = Class::Handle(type.type_class());
@@ -1207,7 +1157,7 @@
                              Object::null_instance());
 }
 
-DEFINE_NATIVE_ENTRY(InstanceMirror_invoke, 5) {
+DEFINE_NATIVE_ENTRY(InstanceMirror_invoke, 0, 5) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1219,7 +1169,7 @@
   RETURN_OR_PROPAGATE(reflectee.Invoke(function_name, args, arg_names));
 }
 
-DEFINE_NATIVE_ENTRY(InstanceMirror_invokeGetter, 3) {
+DEFINE_NATIVE_ENTRY(InstanceMirror_invokeGetter, 0, 3) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1228,7 +1178,7 @@
   RETURN_OR_PROPAGATE(reflectee.InvokeGetter(getter_name));
 }
 
-DEFINE_NATIVE_ENTRY(InstanceMirror_invokeSetter, 4) {
+DEFINE_NATIVE_ENTRY(InstanceMirror_invokeSetter, 0, 4) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1238,7 +1188,7 @@
   RETURN_OR_PROPAGATE(reflectee.InvokeSetter(setter_name, value));
 }
 
-DEFINE_NATIVE_ENTRY(InstanceMirror_computeType, 1) {
+DEFINE_NATIVE_ENTRY(InstanceMirror_computeType, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0));
   const AbstractType& type = AbstractType::Handle(instance.GetType(Heap::kNew));
   // The static type of null is specified to be the bottom type, however, the
@@ -1246,7 +1196,7 @@
   return type.Canonicalize();
 }
 
-DEFINE_NATIVE_ENTRY(ClosureMirror_function, 1) {
+DEFINE_NATIVE_ENTRY(ClosureMirror_function, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(0));
   ASSERT(!closure.IsNull());
 
@@ -1280,7 +1230,7 @@
   return Instance::null();
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_invoke, 5) {
+DEFINE_NATIVE_ENTRY(ClassMirror_invoke, 0, 5) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1293,7 +1243,7 @@
   RETURN_OR_PROPAGATE(klass.Invoke(function_name, args, arg_names));
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_invokeGetter, 3) {
+DEFINE_NATIVE_ENTRY(ClassMirror_invokeGetter, 0, 3) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1308,7 +1258,7 @@
   RETURN_OR_PROPAGATE(klass.InvokeGetter(getter_name, true));
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 4) {
+DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 0, 4) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1319,7 +1269,7 @@
   RETURN_OR_PROPAGATE(klass.InvokeSetter(setter_name, value));
 }
 
-DEFINE_NATIVE_ENTRY(ClassMirror_invokeConstructor, 5) {
+DEFINE_NATIVE_ENTRY(ClassMirror_invokeConstructor, 0, 5) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   const Class& klass = Class::Handle(ref.GetClassReferent());
   GET_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(1));
@@ -1383,21 +1333,17 @@
   Class& redirected_klass = Class::Handle(klass.raw());
   Function& redirected_constructor = Function::Handle(lookup_constructor.raw());
   if (lookup_constructor.IsRedirectingFactory()) {
-    ClassFinalizer::ResolveRedirectingFactory(klass, lookup_constructor);
+    // Redirecting factory must be resolved.
+    ASSERT(lookup_constructor.RedirectionTarget() != Function::null());
     Type& redirect_type = Type::Handle(lookup_constructor.RedirectionType());
 
     if (!redirect_type.IsInstantiated()) {
       // The type arguments of the redirection type are instantiated from the
       // type arguments of the type reflected by the class mirror.
       ASSERT(redirect_type.IsInstantiated(kFunctions));
-      Error& bound_error = Error::Handle();
       redirect_type ^= redirect_type.InstantiateFrom(
-          type_arguments, Object::null_type_arguments(), kNoneFree,
-          &bound_error, NULL, NULL, Heap::kOld);
-      if (!bound_error.IsNull()) {
-        Exceptions::PropagateError(bound_error);
-        UNREACHABLE();
-      }
+          type_arguments, Object::null_type_arguments(), kNoneFree, NULL,
+          Heap::kOld);
       redirect_type ^= redirect_type.Canonicalize();
     }
 
@@ -1434,6 +1380,13 @@
                       InvocationMirror::kMethod);
     UNREACHABLE();
   }
+  const Object& type_error =
+      Object::Handle(redirected_constructor.DoArgumentTypesMatch(
+          args, args_descriptor, type_arguments));
+  if (!type_error.IsNull()) {
+    Exceptions::PropagateError(Error::Cast(type_error));
+    UNREACHABLE();
+  }
 
   Instance& new_object = Instance::Handle();
   if (redirected_constructor.IsGenerativeConstructor()) {
@@ -1471,7 +1424,7 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(LibraryMirror_invoke, 5) {
+DEFINE_NATIVE_ENTRY(LibraryMirror_invoke, 0, 5) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1484,7 +1437,7 @@
   RETURN_OR_PROPAGATE(library.Invoke(function_name, args, arg_names));
 }
 
-DEFINE_NATIVE_ENTRY(LibraryMirror_invokeGetter, 3) {
+DEFINE_NATIVE_ENTRY(LibraryMirror_invokeGetter, 0, 3) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1494,7 +1447,7 @@
   RETURN_OR_PROPAGATE(library.InvokeGetter(getter_name, true));
 }
 
-DEFINE_NATIVE_ENTRY(LibraryMirror_invokeSetter, 4) {
+DEFINE_NATIVE_ENTRY(LibraryMirror_invokeSetter, 0, 4) {
   // Argument 0 is the mirror, which is unused by the native. It exists
   // because this native is an instance method in order to be polymorphic
   // with its cousins.
@@ -1505,7 +1458,7 @@
   RETURN_OR_PROPAGATE(library.InvokeSetter(setter_name, value));
 }
 
-DEFINE_NATIVE_ENTRY(MethodMirror_owner, 2) {
+DEFINE_NATIVE_ENTRY(MethodMirror_owner, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1));
   const Function& func = Function::Handle(ref.GetFunctionReferent());
@@ -1522,14 +1475,14 @@
   return CreateClassMirror(owner, type, Bool::True(), Object::null_instance());
 }
 
-DEFINE_NATIVE_ENTRY(MethodMirror_parameters, 2) {
+DEFINE_NATIVE_ENTRY(MethodMirror_parameters, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
   const Function& func = Function::Handle(ref.GetFunctionReferent());
   return CreateParameterMirrorList(func, owner);
 }
 
-DEFINE_NATIVE_ENTRY(MethodMirror_return_type, 2) {
+DEFINE_NATIVE_ENTRY(MethodMirror_return_type, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   const Function& func = Function::Handle(ref.GetFunctionReferent());
   GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1));
@@ -1540,7 +1493,7 @@
   return InstantiateType(type, instantiator);
 }
 
-DEFINE_NATIVE_ENTRY(MethodMirror_source, 1) {
+DEFINE_NATIVE_ENTRY(MethodMirror_source, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   const Function& func = Function::Handle(ref.GetFunctionReferent());
   return func.GetSource();
@@ -1556,7 +1509,7 @@
   return CreateMirror(Symbols::_SourceLocation(), args);
 }
 
-DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 1) {
+DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, reflectee, arguments->NativeArgAt(0));
   Object& decl = Object::Handle(zone);
   if (reflectee.IsMirrorReference()) {
@@ -1582,8 +1535,7 @@
   } else if (decl.IsClass()) {
     const Class& cls = Class::Cast(decl);
     const bool is_typedef = cls.IsTypedefClass();
-    if (cls.is_synthesized_class() && !is_typedef &&
-        !cls.is_mixin_app_alias() && !cls.is_enum_class()) {
+    if (cls.is_synthesized_class() && !is_typedef && !cls.is_enum_class()) {
       return Instance::null();  // Synthetic.
     }
     script = cls.script();
@@ -1634,7 +1586,7 @@
   return CreateSourceLocation(uri, from_line, from_col);
 }
 
-DEFINE_NATIVE_ENTRY(TypedefMirror_referent, 1) {
+DEFINE_NATIVE_ENTRY(TypedefMirror_referent, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0));
   ASSERT(type.IsFunctionType());
   const Class& cls = Class::Handle(type.type_class());
@@ -1646,7 +1598,7 @@
   return CreateFunctionTypeMirror(referent_type);
 }
 
-DEFINE_NATIVE_ENTRY(ParameterMirror_type, 3) {
+DEFINE_NATIVE_ENTRY(ParameterMirror_type, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, pos, arguments->NativeArgAt(1));
   GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(2));
@@ -1657,7 +1609,7 @@
   return InstantiateType(type, instantiator);
 }
 
-DEFINE_NATIVE_ENTRY(VariableMirror_type, 2) {
+DEFINE_NATIVE_ENTRY(VariableMirror_type, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
   const Field& field = Field::Handle(ref.GetFieldReferent());
   GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1));
@@ -1665,10 +1617,10 @@
   return InstantiateType(type, instantiator);
 }
 
-DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
+DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
-  return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw();
+  return Bool::Get(a.IsSubtypeOf(b, Heap::kNew)).raw();
 }
 
 #endif  // !DART_PRECOMPILED_RUNTIME
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index 902e7ff..b11223b 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -368,10 +368,6 @@
   final bool isAbstract;
   final bool _isGeneric;
 
-  // Only used for Dart 1 named mixin applications.
-  // TODO(alexmarkov): Clean up after Dart 1 is gone.
-  final bool _isMixinAlias;
-
   // Since Dart 2, mixins are erased by kernel transformation.
   // Resulting classes have this flag set, and mixed-in type is pulled into
   // the end of interfaces list.
@@ -388,7 +384,6 @@
       this._owner,
       this.isAbstract,
       this._isGeneric,
-      this._isMixinAlias,
       this._isTransformedMixinApplication,
       this._isGenericDeclaration,
       this.isEnum)
@@ -455,7 +450,7 @@
   }
 
   ClassMirror get superclass {
-    return _isMixinAlias ? _trueSuperclass._trueSuperclass : _trueSuperclass;
+    return _trueSuperclass;
   }
 
   var _superinterfaces;
@@ -492,19 +487,13 @@
   var _mixin;
   ClassMirror get mixin {
     if (_mixin == null) {
-      if (_isMixinAlias) {
-        Type mixinType = _nativeMixinInstantiated(
-            _trueSuperclass._reflectedType, _instantiator);
-        _mixin = reflectType(mixinType);
+      Type mixinType =
+          _nativeMixinInstantiated(_reflectedType, _instantiator);
+      if (mixinType == null) {
+        // The reflectee is not a mixin application.
+        _mixin = this;
       } else {
-        Type mixinType =
-            _nativeMixinInstantiated(_reflectedType, _instantiator);
-        if (mixinType == null) {
-          // The reflectee is not a mixin application.
-          _mixin = this;
-        } else {
-          _mixin = reflectType(mixinType);
-        }
+        _mixin = reflectType(mixinType);
       }
     }
     return _mixin;
@@ -572,9 +561,8 @@
 
     var decls = new Map<Symbol, DeclarationMirror>();
 
-    var whoseMembers = _isMixinAlias ? _trueSuperclass : this;
     var members = (mixin as _LocalClassMirror)._computeMembers(
-        _instantiator, (whoseMembers.mixin as _LocalClassMirror)._reflectee);
+        _instantiator, (mixin as _LocalClassMirror)._reflectee);
     for (var member in members) {
       decls[member.simpleName] = member;
     }
@@ -596,7 +584,6 @@
 
   // Note: returns correct result only for Dart 1 anonymous mixin applications.
   bool get _isAnonymousMixinApplication {
-    if (_isMixinAlias) return false; // Named mixin application.
     if (mixin == this) return false; // Not a mixin application.
     return true;
   }
@@ -760,7 +747,7 @@
   final _functionReflectee;
   _LocalFunctionTypeMirror(reflectee, this._functionReflectee, reflectedType)
       : super(reflectee, reflectedType, null, null, false, false, false, false,
-            false, false);
+            false);
 
   bool get _isAnonymousMixinApplication => false;
 
diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
index e09e633..2c5f526 100644
--- a/runtime/lib/object.cc
+++ b/runtime/lib/object.cc
@@ -15,7 +15,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(DartAsync_fatal, 1) {
+DEFINE_NATIVE_ENTRY(DartAsync_fatal, 0, 1) {
   // The dart:async library code entered an unrecoverable state.
   const Instance& instance =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
@@ -25,13 +25,13 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Object_equals, 1) {
+DEFINE_NATIVE_ENTRY(Object_equals, 0, 1) {
   // Implemented in the flow graph builder.
   UNREACHABLE();
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Object_getHash, 1) {
+DEFINE_NATIVE_ENTRY(Object_getHash, 0, 1) {
 // Please note that no handle is created for the argument.
 // This is safe since the argument is only used in a tail call.
 // The performance benefit is more than 5% when using hashCode.
@@ -44,7 +44,7 @@
 #endif
 }
 
-DEFINE_NATIVE_ENTRY(Object_setHash, 2) {
+DEFINE_NATIVE_ENTRY(Object_setHash, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, hash, arguments->NativeArgAt(1));
 #if defined(HASH_IN_OBJECT_HEADER)
   Object::SetCachedHash(arguments->NativeArgAt(0), hash.Value());
@@ -57,7 +57,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Object_toString, 1) {
+DEFINE_NATIVE_ENTRY(Object_toString, 0, 1) {
   const Instance& instance =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   if (instance.IsString()) {
@@ -70,7 +70,7 @@
   return String::New(c_str);
 }
 
-DEFINE_NATIVE_ENTRY(Object_runtimeType, 1) {
+DEFINE_NATIVE_ENTRY(Object_runtimeType, 0, 1) {
   const Instance& instance =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   if (instance.IsString()) {
@@ -83,7 +83,7 @@
   return instance.GetType(Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(Object_haveSameRuntimeType, 2) {
+DEFINE_NATIVE_ENTRY(Object_haveSameRuntimeType, 0, 2) {
   const Instance& left =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Instance& right =
@@ -131,7 +131,7 @@
       .raw();
 }
 
-DEFINE_NATIVE_ENTRY(Object_instanceOf, 4) {
+DEFINE_NATIVE_ENTRY(Object_instanceOf, 0, 4) {
   const Instance& instance =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   const TypeArguments& instantiator_type_arguments =
@@ -141,11 +141,8 @@
   const AbstractType& type =
       AbstractType::CheckedHandle(zone, arguments->NativeArgAt(3));
   ASSERT(type.IsFinalized());
-  ASSERT(!type.IsMalformed());
-  ASSERT(!type.IsMalbounded());
-  Error& bound_error = Error::Handle(zone, Error::null());
   const bool is_instance_of = instance.IsInstanceOf(
-      type, instantiator_type_arguments, function_type_arguments, &bound_error);
+      type, instantiator_type_arguments, function_type_arguments);
   if (FLAG_trace_type_checks) {
     const char* result_str = is_instance_of ? "true" : "false";
     OS::PrintErr("Native Object.instanceOf: result %s\n", result_str);
@@ -155,28 +152,11 @@
                  String::Handle(zone, instance_type.Name()).ToCString());
     OS::PrintErr("  test type: %s\n",
                  String::Handle(zone, type.Name()).ToCString());
-    if (!bound_error.IsNull()) {
-      OS::PrintErr("  bound error: %s\n", bound_error.ToErrorCString());
-    }
-  }
-  if (!is_instance_of && !bound_error.IsNull()) {
-    // Throw a dynamic type error only if the instanceof test fails.
-    DartFrameIterator iterator(thread,
-                               StackFrameIterator::kNoCrossThreadIteration);
-    StackFrame* caller_frame = iterator.NextFrame();
-    ASSERT(caller_frame != NULL);
-    const TokenPosition location = caller_frame->GetTokenPos();
-    String& bound_error_message =
-        String::Handle(zone, String::New(bound_error.ToErrorCString()));
-    Exceptions::CreateAndThrowTypeError(location, AbstractType::Handle(zone),
-                                        AbstractType::Handle(zone),
-                                        Symbols::Empty(), bound_error_message);
-    UNREACHABLE();
   }
   return Bool::Get(is_instance_of).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Object_simpleInstanceOf, 2) {
+DEFINE_NATIVE_ENTRY(Object_simpleInstanceOf, 0, 2) {
   // This native is only called when the right hand side passes
   // SimpleInstanceOfType and it is a non-negative test.
   const Instance& instance =
@@ -184,37 +164,19 @@
   const AbstractType& type =
       AbstractType::CheckedHandle(zone, arguments->NativeArgAt(1));
   ASSERT(type.IsFinalized());
-  ASSERT(!type.IsMalformed());
-  ASSERT(!type.IsMalbounded());
   ASSERT(type.IsInstantiated());
-  Error& bound_error = Error::Handle(zone, Error::null());
-  const bool is_instance_of =
-      instance.IsInstanceOf(type, Object::null_type_arguments(),
-                            Object::null_type_arguments(), &bound_error);
-  if (!is_instance_of && !bound_error.IsNull()) {
-    // Throw a dynamic type error only if the instanceof test fails.
-    DartFrameIterator iterator(thread,
-                               StackFrameIterator::kNoCrossThreadIteration);
-    StackFrame* caller_frame = iterator.NextFrame();
-    ASSERT(caller_frame != NULL);
-    const TokenPosition location = caller_frame->GetTokenPos();
-    String& bound_error_message =
-        String::Handle(zone, String::New(bound_error.ToErrorCString()));
-    Exceptions::CreateAndThrowTypeError(location, AbstractType::Handle(zone),
-                                        AbstractType::Handle(zone),
-                                        Symbols::Empty(), bound_error_message);
-    UNREACHABLE();
-  }
+  const bool is_instance_of = instance.IsInstanceOf(
+      type, Object::null_type_arguments(), Object::null_type_arguments());
   return Bool::Get(is_instance_of).raw();
 }
 
-DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) {
+DEFINE_NATIVE_ENTRY(AbstractType_toString, 0, 1) {
   const AbstractType& type =
       AbstractType::CheckedHandle(zone, arguments->NativeArgAt(0));
   return type.UserVisibleName();
 }
 
-DEFINE_NATIVE_ENTRY(Type_getHashCode, 1) {
+DEFINE_NATIVE_ENTRY(Type_getHashCode, 0, 1) {
   const Type& type = Type::CheckedHandle(zone, arguments->NativeArgAt(0));
   intptr_t hash_val = type.Hash();
   ASSERT(hash_val > 0);
@@ -222,21 +184,21 @@
   return Smi::New(hash_val);
 }
 
-DEFINE_NATIVE_ENTRY(LibraryPrefix_invalidateDependentCode, 1) {
+DEFINE_NATIVE_ENTRY(LibraryPrefix_invalidateDependentCode, 0, 1) {
   const LibraryPrefix& prefix =
       LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   prefix.InvalidateDependentCode();
   return Bool::Get(true).raw();
 }
 
-DEFINE_NATIVE_ENTRY(LibraryPrefix_load, 1) {
+DEFINE_NATIVE_ENTRY(LibraryPrefix_load, 0, 1) {
   const LibraryPrefix& prefix =
       LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   bool hasCompleted = prefix.LoadLibrary();
   return Bool::Get(hasCompleted).raw();
 }
 
-DEFINE_NATIVE_ENTRY(LibraryPrefix_loadError, 1) {
+DEFINE_NATIVE_ENTRY(LibraryPrefix_loadError, 0, 1) {
   const LibraryPrefix& prefix =
       LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   // Currently all errors are Dart instances, e.g. I/O errors
@@ -247,13 +209,13 @@
   return error.raw();
 }
 
-DEFINE_NATIVE_ENTRY(LibraryPrefix_isLoaded, 1) {
+DEFINE_NATIVE_ENTRY(LibraryPrefix_isLoaded, 0, 1) {
   const LibraryPrefix& prefix =
       LibraryPrefix::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Bool::Get(prefix.is_loaded()).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) {
+DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0, 0) {
 #if defined(ARCH_IS_64_BIT)
   return Bool::True().raw();
 #else
@@ -261,7 +223,7 @@
 #endif  // defined(ARCH_IS_64_BIT)
 }
 
-DEFINE_NATIVE_ENTRY(Internal_unsafeCast, 1) {
+DEFINE_NATIVE_ENTRY(Internal_unsafeCast, 0, 1) {
   UNREACHABLE();  // Should be erased at Kernel translation time.
   return arguments->NativeArgAt(0);
 }
@@ -272,12 +234,11 @@
                                      const Class& interface_cls,
                                      TypeArguments* interface_type_args) {
   Class& cur_cls = Class::Handle(zone, instance_cls.raw());
-  // The following code is a specialization of Class::TypeTestNonRecursive().
+  // The following code is a specialization of Class::IsSubtypeOf().
   Array& interfaces = Array::Handle(zone);
   AbstractType& interface = AbstractType::Handle(zone);
   Class& cur_interface_cls = Class::Handle(zone);
   TypeArguments& cur_interface_type_args = TypeArguments::Handle(zone);
-  Error& error = Error::Handle(zone);
   while (true) {
     // Additional subtyping rules related to 'FutureOr' are not applied.
     if (cur_cls.raw() == interface_cls.raw()) {
@@ -287,18 +248,14 @@
     interfaces = cur_cls.interfaces();
     for (intptr_t i = 0; i < interfaces.Length(); i++) {
       interface ^= interfaces.At(i);
-      ASSERT(interface.IsFinalized() && !interface.IsMalbounded());
+      ASSERT(interface.IsFinalized());
       cur_interface_cls = interface.type_class();
       cur_interface_type_args = interface.arguments();
       if (!cur_interface_type_args.IsNull() &&
           !cur_interface_type_args.IsInstantiated()) {
-        error = Error::null();
         cur_interface_type_args = cur_interface_type_args.InstantiateFrom(
-            instance_type_args, Object::null_type_arguments(), kNoneFree,
-            &error, NULL, NULL, Heap::kNew);
-        if (!error.IsNull()) {
-          continue;  // Another interface may work better.
-        }
+            instance_type_args, Object::null_type_arguments(), kNoneFree, NULL,
+            Heap::kNew);
       }
       if (ExtractInterfaceTypeArgs(zone, cur_interface_cls,
                                    cur_interface_type_args, interface_cls,
@@ -313,7 +270,8 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(Internal_extractTypeArguments, 2) {
+// for documentation see pkg/dart_internal/lib/extract_type_arguments.dart
+DEFINE_NATIVE_ENTRY(Internal_extractTypeArguments, 0, 2) {
   const Instance& instance =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Instance& extract =
@@ -321,11 +279,9 @@
 
   Class& interface_cls = Class::Handle(zone);
   intptr_t num_type_args = 0;
-  const TypeArguments& function_type_args =
-      TypeArguments::Handle(zone, arguments->NativeTypeArgs());
-  if (function_type_args.Length() == 1) {
+  if (arguments->NativeTypeArgCount() >= 1) {
     const AbstractType& function_type_arg =
-        AbstractType::Handle(zone, function_type_args.TypeAt(0));
+        AbstractType::Handle(zone, arguments->NativeTypeArgAt(0));
     if (function_type_arg.IsType() &&
         (function_type_arg.arguments() == TypeArguments::null())) {
       interface_cls = function_type_arg.type_class();
@@ -401,7 +357,7 @@
   return result.raw();
 }
 
-DEFINE_NATIVE_ENTRY(Internal_prependTypeArguments, 4) {
+DEFINE_NATIVE_ENTRY(Internal_prependTypeArguments, 0, 4) {
   const TypeArguments& function_type_arguments =
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0));
   const TypeArguments& parent_type_arguments =
@@ -416,7 +372,7 @@
 // closure.
 // Arg0: Closure object
 // Arg1: Type arguments to function
-DEFINE_NATIVE_ENTRY(Internal_boundsCheckForPartialInstantiation, 2) {
+DEFINE_NATIVE_ENTRY(Internal_boundsCheckForPartialInstantiation, 0, 2) {
   const Closure& closure =
       Closure::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Function& target = Function::Handle(zone, closure.function());
@@ -442,20 +398,18 @@
   AbstractType& supertype = AbstractType::Handle(zone);
   AbstractType& subtype = AbstractType::Handle(zone);
   TypeParameter& parameter = TypeParameter::Handle(zone);
-  Error& bound_error = Error::Handle(zone);
   for (intptr_t i = 0; i < bounds.Length(); ++i) {
     parameter ^= bounds.TypeAt(i);
     supertype = parameter.bound();
     subtype = type_args_to_check.IsNull() ? Object::dynamic_type().raw()
                                           : type_args_to_check.TypeAt(i);
 
-    ASSERT(!subtype.IsNull() && !subtype.IsMalformedOrMalbounded());
-    ASSERT(!supertype.IsNull() && !supertype.IsMalformedOrMalbounded());
+    ASSERT(!subtype.IsNull());
+    ASSERT(!supertype.IsNull());
 
     // The supertype may not be instantiated.
     if (!AbstractType::InstantiateAndTestSubtype(
-            &subtype, &supertype, &bound_error, instantiator_type_args,
-            function_type_args)) {
+            &subtype, &supertype, instantiator_type_args, function_type_args)) {
       // Throw a dynamic type error.
       TokenPosition location;
       {
@@ -465,13 +419,9 @@
         ASSERT(caller_frame != NULL);
         location = caller_frame->GetTokenPos();
       }
-      String& bound_error_message = String::Handle(zone);
-      if (!bound_error.IsNull()) {
-        bound_error_message = String::New(bound_error.ToErrorCString());
-      }
       String& parameter_name = String::Handle(zone, parameter.Name());
       Exceptions::CreateAndThrowTypeError(location, subtype, supertype,
-                                          parameter_name, bound_error_message);
+                                          parameter_name);
       UNREACHABLE();
     }
   }
@@ -479,7 +429,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(InvocationMirror_unpackTypeArguments, 2) {
+DEFINE_NATIVE_ENTRY(InvocationMirror_unpackTypeArguments, 0, 2) {
   const TypeArguments& type_arguments =
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Smi& num_type_arguments =
@@ -502,7 +452,7 @@
   return type_list.raw();
 }
 
-DEFINE_NATIVE_ENTRY(NoSuchMethodError_existingMethodSignature, 3) {
+DEFINE_NATIVE_ENTRY(NoSuchMethodError_existingMethodSignature, 0, 3) {
   const Instance& receiver =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, method_name, arguments->NativeArgAt(1));
diff --git a/runtime/lib/profiler.cc b/runtime/lib/profiler.cc
index 009a2d3..3d6d84e 100644
--- a/runtime/lib/profiler.cc
+++ b/runtime/lib/profiler.cc
@@ -15,19 +15,19 @@
 
 // Native implementations of the profiler parts of the dart:developer library.
 
-DEFINE_NATIVE_ENTRY(UserTag_new, 2) {
+DEFINE_NATIVE_ENTRY(UserTag_new, 0, 2) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(String, tag_label, arguments->NativeArgAt(1));
   return UserTag::New(tag_label);
 }
 
-DEFINE_NATIVE_ENTRY(UserTag_label, 1) {
+DEFINE_NATIVE_ENTRY(UserTag_label, 0, 1) {
   const UserTag& self = UserTag::CheckedHandle(zone, arguments->NativeArgAt(0));
   return self.label();
 }
 
-DEFINE_NATIVE_ENTRY(UserTag_makeCurrent, 1) {
+DEFINE_NATIVE_ENTRY(UserTag_makeCurrent, 0, 1) {
   const UserTag& self = UserTag::CheckedHandle(zone, arguments->NativeArgAt(0));
   if (FLAG_trace_intrinsified_natives) {
     OS::PrintErr("UserTag_makeCurrent: %s\n", self.ToCString());
@@ -37,14 +37,14 @@
   return old.raw();
 }
 
-DEFINE_NATIVE_ENTRY(UserTag_defaultTag, 0) {
+DEFINE_NATIVE_ENTRY(UserTag_defaultTag, 0, 0) {
   if (FLAG_trace_intrinsified_natives) {
     OS::PrintErr("UserTag_defaultTag\n");
   }
   return isolate->default_tag();
 }
 
-DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0) {
+DEFINE_NATIVE_ENTRY(Profiler_getCurrentTag, 0, 0) {
   if (FLAG_trace_intrinsified_natives) {
     OS::PrintErr("Profiler_getCurrentTag\n");
   }
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
index 96b0ed1..aa58c5f 100644
--- a/runtime/lib/regexp.cc
+++ b/runtime/lib/regexp.cc
@@ -14,7 +14,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(RegExp_factory, 4) {
+DEFINE_NATIVE_ENTRY(RegExp_factory, 0, 4) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(String, pattern, arguments->NativeArgAt(1));
@@ -28,34 +28,32 @@
   // Parse the pattern once in order to throw any format exceptions within
   // the factory constructor. It is parsed again upon compilation.
   RegExpCompileData compileData;
-  if (!RegExpParser::ParseRegExp(pattern, multi_line, &compileData)) {
-    // Parsing failures throw an exception.
-    UNREACHABLE();
-  }
+  // Throws an exception on parsing failure.
+  RegExpParser::ParseRegExp(pattern, multi_line, &compileData);
 
   // Create a RegExp object containing only the initial parameters.
   return RegExpEngine::CreateRegExp(thread, pattern, multi_line, ignore_case);
 }
 
-DEFINE_NATIVE_ENTRY(RegExp_getPattern, 1) {
+DEFINE_NATIVE_ENTRY(RegExp_getPattern, 0, 1) {
   const RegExp& regexp = RegExp::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return regexp.pattern();
 }
 
-DEFINE_NATIVE_ENTRY(RegExp_getIsMultiLine, 1) {
+DEFINE_NATIVE_ENTRY(RegExp_getIsMultiLine, 0, 1) {
   const RegExp& regexp = RegExp::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return Bool::Get(regexp.is_multi_line()).raw();
 }
 
-DEFINE_NATIVE_ENTRY(RegExp_getIsCaseSensitive, 1) {
+DEFINE_NATIVE_ENTRY(RegExp_getIsCaseSensitive, 0, 1) {
   const RegExp& regexp = RegExp::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   return Bool::Get(!regexp.is_ignore_case()).raw();
 }
 
-DEFINE_NATIVE_ENTRY(RegExp_getGroupCount, 1) {
+DEFINE_NATIVE_ENTRY(RegExp_getGroupCount, 0, 1) {
   const RegExp& regexp = RegExp::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(!regexp.IsNull());
   if (regexp.is_initialized()) {
@@ -89,12 +87,12 @@
                                                  /*sticky=*/sticky, zone);
 }
 
-DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatch, 3) {
+DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatch, 0, 3) {
   // This function is intrinsified. See Intrinsifier::RegExp_ExecuteMatch.
   return ExecuteMatch(zone, arguments, /*sticky=*/false);
 }
 
-DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatchSticky, 3) {
+DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatchSticky, 0, 3) {
   // This function is intrinsified. See Intrinsifier::RegExp_ExecuteMatchSticky.
   return ExecuteMatch(zone, arguments, /*sticky=*/true);
 }
diff --git a/runtime/lib/simd128.cc b/runtime/lib/simd128.cc
index 41f0602..356853b 100644
--- a/runtime/lib/simd128.cc
+++ b/runtime/lib/simd128.cc
@@ -18,7 +18,7 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_fromDoubles, 5) {
+DEFINE_NATIVE_ENTRY(Float32x4_fromDoubles, 0, 5) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(Double, x, arguments->NativeArgAt(1));
@@ -32,7 +32,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_splat, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_splat, 0, 2) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(Double, v, arguments->NativeArgAt(1));
@@ -40,25 +40,25 @@
   return Float32x4::New(_v, _v, _v, _v);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_zero, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_zero, 0, 1) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   return Float32x4::New(0.0f, 0.0f, 0.0f, 0.0f);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_fromInt32x4Bits, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_fromInt32x4Bits, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, v, arguments->NativeArgAt(1));
   return Float32x4::New(v.value());
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_fromFloat64x2, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_fromFloat64x2, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, v, arguments->NativeArgAt(1));
   float _x = static_cast<float>(v.x());
   float _y = static_cast<float>(v.y());
   return Float32x4::New(_x, _y, 0.0f, 0.0f);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_add, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_add, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, other, arguments->NativeArgAt(1));
   float _x = self.x() + other.x();
@@ -68,7 +68,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_negate, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_negate, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   float _x = -self.x();
   float _y = -self.y();
@@ -77,7 +77,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_sub, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_sub, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, other, arguments->NativeArgAt(1));
   float _x = self.x() - other.x();
@@ -87,7 +87,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_mul, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_mul, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, other, arguments->NativeArgAt(1));
   float _x = self.x() * other.x();
@@ -97,7 +97,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_div, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_div, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, other, arguments->NativeArgAt(1));
   float _x = self.x() / other.x();
@@ -107,7 +107,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_cmplt, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_cmplt, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, b, arguments->NativeArgAt(1));
   uint32_t _x = a.x() < b.x() ? 0xFFFFFFFF : 0x0;
@@ -117,7 +117,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_cmplte, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_cmplte, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, b, arguments->NativeArgAt(1));
   uint32_t _x = a.x() <= b.x() ? 0xFFFFFFFF : 0x0;
@@ -127,7 +127,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_cmpgt, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_cmpgt, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, b, arguments->NativeArgAt(1));
   uint32_t _x = a.x() > b.x() ? 0xFFFFFFFF : 0x0;
@@ -137,7 +137,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_cmpgte, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_cmpgte, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, b, arguments->NativeArgAt(1));
   uint32_t _x = a.x() >= b.x() ? 0xFFFFFFFF : 0x0;
@@ -147,7 +147,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_cmpequal, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_cmpequal, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, b, arguments->NativeArgAt(1));
   uint32_t _x = a.x() == b.x() ? 0xFFFFFFFF : 0x0;
@@ -157,7 +157,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_cmpnequal, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_cmpnequal, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, a, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, b, arguments->NativeArgAt(1));
   uint32_t _x = a.x() != b.x() ? 0xFFFFFFFF : 0x0;
@@ -167,7 +167,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_scale, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_scale, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, scale, arguments->NativeArgAt(1));
   float _s = static_cast<float>(scale.value());
@@ -178,7 +178,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_abs, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_abs, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   float _x = fabsf(self.x());
   float _y = fabsf(self.y());
@@ -187,7 +187,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_clamp, 3) {
+DEFINE_NATIVE_ENTRY(Float32x4_clamp, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, lo, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, hi, arguments->NativeArgAt(2));
@@ -204,31 +204,31 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_getX, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_getX, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   double value = static_cast<double>(self.x());
   return Double::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_getY, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_getY, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   double value = static_cast<double>(self.y());
   return Double::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_getZ, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_getZ, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   double value = static_cast<double>(self.z());
   return Double::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_getW, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_getW, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   double value = static_cast<double>(self.w());
   return Double::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_getSignMask, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_getSignMask, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   uint32_t mx = (bit_cast<uint32_t>(self.x()) & 0x80000000) >> 31;
   uint32_t my = (bit_cast<uint32_t>(self.y()) & 0x80000000) >> 31;
@@ -238,7 +238,7 @@
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getSignMask, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getSignMask, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   uint32_t mx = (self.x() & 0x80000000) >> 31;
   uint32_t my = (self.y() & 0x80000000) >> 31;
@@ -248,7 +248,7 @@
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_shuffle, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_shuffle, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, mask, arguments->NativeArgAt(1));
   int64_t m = mask.AsInt64Value();
@@ -261,7 +261,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_shuffleMix, 3) {
+DEFINE_NATIVE_ENTRY(Float32x4_shuffleMix, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, other, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, mask, arguments->NativeArgAt(2));
@@ -276,7 +276,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_setX, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_setX, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, x, arguments->NativeArgAt(1));
   float _x = static_cast<float>(x.value());
@@ -286,7 +286,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_setY, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_setY, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, y, arguments->NativeArgAt(1));
   float _x = self.x();
@@ -296,7 +296,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_setZ, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_setZ, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, z, arguments->NativeArgAt(1));
   float _x = self.x();
@@ -306,7 +306,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_setW, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_setW, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, w, arguments->NativeArgAt(1));
   float _x = self.x();
@@ -316,7 +316,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_min, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_min, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, other, arguments->NativeArgAt(1));
   float _x = self.x() < other.x() ? self.x() : other.x();
@@ -326,7 +326,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_max, 2) {
+DEFINE_NATIVE_ENTRY(Float32x4_max, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, other, arguments->NativeArgAt(1));
   float _x = self.x() > other.x() ? self.x() : other.x();
@@ -336,7 +336,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_sqrt, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_sqrt, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   float _x = sqrtf(self.x());
   float _y = sqrtf(self.y());
@@ -345,7 +345,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_reciprocal, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_reciprocal, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   float _x = 1.0f / self.x();
   float _y = 1.0f / self.y();
@@ -354,7 +354,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Float32x4_reciprocalSqrt, 1) {
+DEFINE_NATIVE_ENTRY(Float32x4_reciprocalSqrt, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, self, arguments->NativeArgAt(0));
   float _x = sqrtf(1.0f / self.x());
   float _y = sqrtf(1.0f / self.y());
@@ -363,7 +363,7 @@
   return Float32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_fromInts, 5) {
+DEFINE_NATIVE_ENTRY(Int32x4_fromInts, 0, 5) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, x, arguments->NativeArgAt(1));
@@ -377,7 +377,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_fromBools, 5) {
+DEFINE_NATIVE_ENTRY(Int32x4_fromBools, 0, 5) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(Bool, x, arguments->NativeArgAt(1));
@@ -391,12 +391,12 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_fromFloat32x4Bits, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_fromFloat32x4Bits, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, v, arguments->NativeArgAt(1));
   return Int32x4::New(v.value());
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_or, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_or, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, other, arguments->NativeArgAt(1));
   int32_t _x = self.x() | other.x();
@@ -406,7 +406,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_and, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_and, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, other, arguments->NativeArgAt(1));
   int32_t _x = self.x() & other.x();
@@ -416,7 +416,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_xor, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_xor, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, other, arguments->NativeArgAt(1));
   int32_t _x = self.x() ^ other.x();
@@ -426,7 +426,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_add, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_add, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, other, arguments->NativeArgAt(1));
   int32_t _x = self.x() + other.x();
@@ -436,7 +436,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_sub, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_sub, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, other, arguments->NativeArgAt(1));
   int32_t _x = self.x() - other.x();
@@ -446,31 +446,31 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getX, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getX, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.x();
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getY, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getY, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.y();
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getZ, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getZ, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.z();
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getW, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getW, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.w();
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_shuffle, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_shuffle, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, mask, arguments->NativeArgAt(1));
   int64_t m = mask.AsInt64Value();
@@ -483,7 +483,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_shuffleMix, 3) {
+DEFINE_NATIVE_ENTRY(Int32x4_shuffleMix, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, zw, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, mask, arguments->NativeArgAt(2));
@@ -498,7 +498,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setX, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setX, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, x, arguments->NativeArgAt(1));
   int32_t _x = static_cast<int32_t>(x.AsInt64Value() & 0xFFFFFFFF);
@@ -508,7 +508,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setY, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setY, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, y, arguments->NativeArgAt(1));
   int32_t _x = self.x();
@@ -518,7 +518,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setZ, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setZ, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, z, arguments->NativeArgAt(1));
   int32_t _x = self.x();
@@ -528,7 +528,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setW, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setW, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, w, arguments->NativeArgAt(1));
   int32_t _x = self.x();
@@ -538,31 +538,31 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getFlagX, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getFlagX, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.x();
   return Bool::Get(value != 0).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getFlagY, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getFlagY, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.y();
   return Bool::Get(value != 0).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getFlagZ, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getFlagZ, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.z();
   return Bool::Get(value != 0).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_getFlagW, 1) {
+DEFINE_NATIVE_ENTRY(Int32x4_getFlagW, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   int32_t value = self.w();
   return Bool::Get(value != 0).raw();
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setFlagX, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setFlagX, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Bool, flagX, arguments->NativeArgAt(1));
   int32_t _x = self.x();
@@ -573,7 +573,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setFlagY, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setFlagY, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Bool, flagY, arguments->NativeArgAt(1));
   int32_t _x = self.x();
@@ -584,7 +584,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setFlagZ, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setFlagZ, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Bool, flagZ, arguments->NativeArgAt(1));
   int32_t _x = self.x();
@@ -595,7 +595,7 @@
   return Int32x4::New(_x, _y, _z, _w);
 }
 
-DEFINE_NATIVE_ENTRY(Int32x4_setFlagW, 2) {
+DEFINE_NATIVE_ENTRY(Int32x4_setFlagW, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Bool, flagW, arguments->NativeArgAt(1));
   int32_t _x = self.x();
@@ -615,7 +615,7 @@
   float32_int32(int32_t v) { u = v; }
 };
 
-DEFINE_NATIVE_ENTRY(Int32x4_select, 3) {
+DEFINE_NATIVE_ENTRY(Int32x4_select, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Int32x4, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, tv, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, fv, arguments->NativeArgAt(2));
@@ -640,7 +640,7 @@
   return Float32x4::New(tempX.f, tempY.f, tempZ.f, tempW.f);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_fromDoubles, 3) {
+DEFINE_NATIVE_ENTRY(Float64x2_fromDoubles, 0, 3) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(Double, x, arguments->NativeArgAt(1));
@@ -648,20 +648,20 @@
   return Float64x2::New(x.value(), y.value());
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_splat, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_splat, 0, 2) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(Double, v, arguments->NativeArgAt(1));
   return Float64x2::New(v.value(), v.value());
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_zero, 1) {
+DEFINE_NATIVE_ENTRY(Float64x2_zero, 0, 1) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   return Float64x2::New(0.0, 0.0);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_fromFloat32x4, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_fromFloat32x4, 0, 2) {
   ASSERT(
       TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
   GET_NON_NULL_NATIVE_ARGUMENT(Float32x4, v, arguments->NativeArgAt(1));
@@ -670,7 +670,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_add, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_add, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, other, arguments->NativeArgAt(1));
   double _x = self.x() + other.x();
@@ -678,14 +678,14 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_negate, 1) {
+DEFINE_NATIVE_ENTRY(Float64x2_negate, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   double _x = -self.x();
   double _y = -self.y();
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_sub, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_sub, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, other, arguments->NativeArgAt(1));
   double _x = self.x() - other.x();
@@ -693,7 +693,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_mul, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_mul, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, other, arguments->NativeArgAt(1));
   double _x = self.x() * other.x();
@@ -701,7 +701,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_div, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_div, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, other, arguments->NativeArgAt(1));
   double _x = self.x() / other.x();
@@ -709,7 +709,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_scale, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_scale, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, scale, arguments->NativeArgAt(1));
   double _s = scale.value();
@@ -718,14 +718,14 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_abs, 1) {
+DEFINE_NATIVE_ENTRY(Float64x2_abs, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   double _x = fabs(self.x());
   double _y = fabs(self.y());
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_clamp, 3) {
+DEFINE_NATIVE_ENTRY(Float64x2_clamp, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, lo, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, hi, arguments->NativeArgAt(2));
@@ -738,17 +738,17 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_getX, 1) {
+DEFINE_NATIVE_ENTRY(Float64x2_getX, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   return Double::New(self.x());
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_getY, 1) {
+DEFINE_NATIVE_ENTRY(Float64x2_getY, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   return Double::New(self.y());
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_getSignMask, 1) {
+DEFINE_NATIVE_ENTRY(Float64x2_getSignMask, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   uint32_t mx = (bit_cast<uint64_t>(self.x()) & 0x8000000000000000LL) >> 63;
   uint32_t my = (bit_cast<uint64_t>(self.y()) & 0x8000000000000000LL) >> 63;
@@ -756,7 +756,7 @@
   return Integer::New(value);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_setX, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_setX, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, x, arguments->NativeArgAt(1));
   double _x = x.value();
@@ -764,7 +764,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_setY, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_setY, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Double, y, arguments->NativeArgAt(1));
   double _x = self.x();
@@ -772,7 +772,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_min, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_min, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, other, arguments->NativeArgAt(1));
   double _x = self.x() < other.x() ? self.x() : other.x();
@@ -780,7 +780,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_max, 2) {
+DEFINE_NATIVE_ENTRY(Float64x2_max, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, other, arguments->NativeArgAt(1));
   double _x = self.x() > other.x() ? self.x() : other.x();
@@ -788,7 +788,7 @@
   return Float64x2::New(_x, _y);
 }
 
-DEFINE_NATIVE_ENTRY(Float64x2_sqrt, 1) {
+DEFINE_NATIVE_ENTRY(Float64x2_sqrt, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
   double _x = sqrt(self.x());
   double _y = sqrt(self.y());
diff --git a/runtime/lib/stacktrace.cc b/runtime/lib/stacktrace.cc
index c84b78b..0a412f2 100644
--- a/runtime/lib/stacktrace.cc
+++ b/runtime/lib/stacktrace.cc
@@ -102,11 +102,11 @@
   return CurrentStackTrace(thread, false, 0);
 }
 
-DEFINE_NATIVE_ENTRY(StackTrace_current, 0) {
+DEFINE_NATIVE_ENTRY(StackTrace_current, 0, 0) {
   return CurrentStackTrace(thread, false);
 }
 
-DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 1) {
+DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 0, 1) {
   if (!FLAG_causal_async_stacks) {
     return Object::null();
   }
@@ -120,12 +120,12 @@
   return CurrentStackTrace(thread, true);
 }
 
-DEFINE_NATIVE_ENTRY(StackTrace_clearAsyncThreadStackTrace, 0) {
+DEFINE_NATIVE_ENTRY(StackTrace_clearAsyncThreadStackTrace, 0, 0) {
   thread->clear_async_stack_trace();
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(StackTrace_setAsyncThreadStackTrace, 1) {
+DEFINE_NATIVE_ENTRY(StackTrace_setAsyncThreadStackTrace, 0, 1) {
   if (!FLAG_causal_async_stacks) {
     return Object::null();
   }
diff --git a/runtime/lib/stopwatch.cc b/runtime/lib/stopwatch.cc
index 8adb201..d569cb6 100644
--- a/runtime/lib/stopwatch.cc
+++ b/runtime/lib/stopwatch.cc
@@ -9,11 +9,11 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(Stopwatch_now, 0) {
+DEFINE_NATIVE_ENTRY(Stopwatch_now, 0, 0) {
   return Integer::New(OS::GetCurrentMonotonicTicks());
 }
 
-DEFINE_NATIVE_ENTRY(Stopwatch_frequency, 0) {
+DEFINE_NATIVE_ENTRY(Stopwatch_frequency, 0, 0) {
   return Integer::New(OS::GetCurrentMonotonicFrequency());
 }
 
diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc
index 2aa299d..5592f20 100644
--- a/runtime/lib/string.cc
+++ b/runtime/lib/string.cc
@@ -16,7 +16,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(String_fromEnvironment, 3) {
+DEFINE_NATIVE_ENTRY(String_fromEnvironment, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(1));
   GET_NATIVE_ARGUMENT(String, default_value, arguments->NativeArgAt(2));
   // Call the embedder to supply us with the environment.
@@ -28,7 +28,7 @@
   return default_value.raw();
 }
 
-DEFINE_NATIVE_ENTRY(StringBase_createFromCodePoints, 3) {
+DEFINE_NATIVE_ENTRY(StringBase_createFromCodePoints, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, list, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_obj, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, end_obj, arguments->NativeArgAt(2));
@@ -89,7 +89,7 @@
   return TwoByteString::New(utf16_len, utf32_array, array_len, Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(StringBase_substringUnchecked, 3) {
+DEFINE_NATIVE_ENTRY(StringBase_substringUnchecked, 0, 3) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_obj, arguments->NativeArgAt(1));
@@ -160,7 +160,7 @@
   return true;
 }
 
-DEFINE_NATIVE_ENTRY(StringBase_joinReplaceAllResult, 4) {
+DEFINE_NATIVE_ENTRY(StringBase_joinReplaceAllResult, 0, 4) {
   const String& base = String::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(GrowableObjectArray, matches_growable,
                                arguments->NativeArgAt(1));
@@ -245,7 +245,7 @@
   return result.raw();
 }
 
-DEFINE_NATIVE_ENTRY(OneByteString_substringUnchecked, 3) {
+DEFINE_NATIVE_ENTRY(OneByteString_substringUnchecked, 0, 3) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(receiver.IsOneByteString());
@@ -258,7 +258,7 @@
 }
 
 // This is high-performance code.
-DEFINE_NATIVE_ENTRY(OneByteString_splitWithCharCode, 2) {
+DEFINE_NATIVE_ENTRY(OneByteString_splitWithCharCode, 0, 2) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(receiver.IsOneByteString());
@@ -286,12 +286,12 @@
   return result.raw();
 }
 
-DEFINE_NATIVE_ENTRY(OneByteString_allocate, 1) {
+DEFINE_NATIVE_ENTRY(OneByteString_allocate, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, length_obj, arguments->NativeArgAt(0));
   return OneByteString::New(length_obj.Value(), Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(OneByteString_allocateFromOneByteList, 3) {
+DEFINE_NATIVE_ENTRY(OneByteString_allocateFromOneByteList, 0, 3) {
   Instance& list = Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_obj, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, end_obj, arguments->NativeArgAt(2));
@@ -377,7 +377,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(OneByteString_setAt, 3) {
+DEFINE_NATIVE_ENTRY(OneByteString_setAt, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(String, receiver, arguments->NativeArgAt(0));
   ASSERT(receiver.IsOneByteString());
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, index_obj, arguments->NativeArgAt(1));
@@ -387,7 +387,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(TwoByteString_allocateFromTwoByteList, 3) {
+DEFINE_NATIVE_ENTRY(TwoByteString_allocateFromTwoByteList, 0, 3) {
   Instance& list = Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_obj, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, end_obj, arguments->NativeArgAt(2));
@@ -472,7 +472,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(String_getHashCode, 1) {
+DEFINE_NATIVE_ENTRY(String_getHashCode, 0, 1) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   intptr_t hash_val = receiver.Hash();
@@ -481,7 +481,7 @@
   return Smi::New(hash_val);
 }
 
-DEFINE_NATIVE_ENTRY(String_getLength, 1) {
+DEFINE_NATIVE_ENTRY(String_getLength, 0, 1) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   return Smi::New(receiver.Length());
@@ -500,7 +500,7 @@
   return 0;
 }
 
-DEFINE_NATIVE_ENTRY(String_charAt, 2) {
+DEFINE_NATIVE_ENTRY(String_charAt, 0, 2) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, index, arguments->NativeArgAt(1));
@@ -509,7 +509,7 @@
 }
 
 // Returns the 16-bit UTF-16 code unit at the given index.
-DEFINE_NATIVE_ENTRY(String_codeUnitAt, 2) {
+DEFINE_NATIVE_ENTRY(String_codeUnitAt, 0, 2) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, index, arguments->NativeArgAt(1));
@@ -517,28 +517,28 @@
   return Smi::New(static_cast<intptr_t>(value));
 }
 
-DEFINE_NATIVE_ENTRY(String_concat, 2) {
+DEFINE_NATIVE_ENTRY(String_concat, 0, 2) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, b, arguments->NativeArgAt(1));
   return String::Concat(receiver, b);
 }
 
-DEFINE_NATIVE_ENTRY(String_toLowerCase, 1) {
+DEFINE_NATIVE_ENTRY(String_toLowerCase, 0, 1) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(!receiver.IsNull());
   return String::ToLowerCase(receiver);
 }
 
-DEFINE_NATIVE_ENTRY(String_toUpperCase, 1) {
+DEFINE_NATIVE_ENTRY(String_toUpperCase, 0, 1) {
   const String& receiver =
       String::CheckedHandle(zone, arguments->NativeArgAt(0));
   ASSERT(!receiver.IsNull());
   return String::ToUpperCase(receiver);
 }
 
-DEFINE_NATIVE_ENTRY(String_concatRange, 3) {
+DEFINE_NATIVE_ENTRY(String_concatRange, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, argument, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, start, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, end, arguments->NativeArgAt(2));
@@ -573,7 +573,7 @@
   return String::ConcatAllRange(strings, start_ix, end_ix, Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(StringBuffer_createStringFromUint16Array, 3) {
+DEFINE_NATIVE_ENTRY(StringBuffer_createStringFromUint16Array, 0, 3) {
   GET_NON_NULL_NATIVE_ARGUMENT(TypedData, codeUnits, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Bool, isLatin1, arguments->NativeArgAt(2));
diff --git a/runtime/lib/timeline.cc b/runtime/lib/timeline.cc
index 5fb597bb..3e68d99 100644
--- a/runtime/lib/timeline.cc
+++ b/runtime/lib/timeline.cc
@@ -15,7 +15,7 @@
 
 // Native implementations for the dart:developer library.
 
-DEFINE_NATIVE_ENTRY(Timeline_isDartStreamEnabled, 0) {
+DEFINE_NATIVE_ENTRY(Timeline_isDartStreamEnabled, 0, 0) {
 #ifndef PRODUCT
   if (!FLAG_support_timeline) {
     return Bool::False().raw();
@@ -27,7 +27,7 @@
   return Bool::False().raw();
 }
 
-DEFINE_NATIVE_ENTRY(Timeline_getNextAsyncId, 0) {
+DEFINE_NATIVE_ENTRY(Timeline_getNextAsyncId, 0, 0) {
   if (!FLAG_support_timeline) {
     return Integer::New(0);
   }
@@ -38,15 +38,15 @@
   return Integer::New(recorder->GetNextAsyncId());
 }
 
-DEFINE_NATIVE_ENTRY(Timeline_getTraceClock, 0) {
+DEFINE_NATIVE_ENTRY(Timeline_getTraceClock, 0, 0) {
   return Integer::New(OS::GetCurrentMonotonicMicros(), Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(Timeline_getThreadCpuClock, 0) {
+DEFINE_NATIVE_ENTRY(Timeline_getThreadCpuClock, 0, 0) {
   return Integer::New(OS::GetCurrentThreadCPUMicros(), Heap::kNew);
 }
 
-DEFINE_NATIVE_ENTRY(Timeline_reportTaskEvent, 6) {
+DEFINE_NATIVE_ENTRY(Timeline_reportTaskEvent, 0, 6) {
 #ifndef PRODUCT
   if (!FLAG_support_timeline) {
     return Object::null();
@@ -76,7 +76,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Timeline_reportCompleteEvent, 5) {
+DEFINE_NATIVE_ENTRY(Timeline_reportCompleteEvent, 0, 5) {
 #ifndef PRODUCT
   if (!FLAG_support_timeline) {
     return Object::null();
@@ -105,7 +105,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Timeline_reportFlowEvent, 7) {
+DEFINE_NATIVE_ENTRY(Timeline_reportFlowEvent, 0, 7) {
 #ifndef PRODUCT
   if (!FLAG_support_timeline) {
     return Object::null();
@@ -137,7 +137,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 4) {
+DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 0, 4) {
 #ifndef PRODUCT
   if (!FLAG_support_timeline) {
     return Object::null();
diff --git a/runtime/lib/type_patch.dart b/runtime/lib/type_patch.dart
index 40eff3c..a05ce70 100644
--- a/runtime/lib/type_patch.dart
+++ b/runtime/lib/type_patch.dart
@@ -25,11 +25,3 @@
 // Equivalent of RawTypeParameter.
 @pragma("vm:entry-point")
 class _TypeParameter extends _AbstractType {}
-
-// Equivalent of RawBoundedType.
-@pragma("vm:entry-point")
-class _BoundedType extends _AbstractType {}
-
-// Equivalent of RawMixinAppType.
-@pragma("vm:entry-point")
-class _MixinAppType extends _AbstractType {}
diff --git a/runtime/lib/typed_data.cc b/runtime/lib/typed_data.cc
index 36e480a..4a373fc 100644
--- a/runtime/lib/typed_data.cc
+++ b/runtime/lib/typed_data.cc
@@ -37,7 +37,7 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(TypedData_length, 1) {
+DEFINE_NATIVE_ENTRY(TypedData_length, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0));
   if (instance.IsTypedData()) {
     const TypedData& array = TypedData::Cast(instance);
@@ -105,7 +105,7 @@
   }
 }
 
-DEFINE_NATIVE_ENTRY(TypedData_setRange, 7) {
+DEFINE_NATIVE_ENTRY(TypedData_setRange, 0, 7) {
   const Instance& dst =
       Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
   const Smi& dst_start = Smi::CheckedHandle(zone, arguments->NativeArgAt(1));
@@ -158,7 +158,7 @@
 //
 // Argument 0 is type arguments and is ignored.
 #define TYPED_DATA_NEW(name)                                                   \
-  DEFINE_NATIVE_ENTRY(TypedData_##name##_new, 2) {                             \
+  DEFINE_NATIVE_ENTRY(TypedData_##name##_new, 0, 2) {                          \
     GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(1));      \
     intptr_t cid = kTypedData##name##Cid;                                      \
     intptr_t len = length.Value();                                             \
@@ -172,7 +172,7 @@
 CLASS_LIST_TYPED_DATA(TYPED_DATA_NEW_NATIVE)
 
 #define TYPED_DATA_GETTER(getter, object, ctor, access_size)                   \
-  DEFINE_NATIVE_ENTRY(TypedData_##getter, 2) {                                 \
+  DEFINE_NATIVE_ENTRY(TypedData_##getter, 0, 2) {                              \
     GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance,                           \
                                  arguments->NativeArgAt(0));                   \
     GET_NON_NULL_NATIVE_ARGUMENT(Smi, offsetInBytes,                           \
@@ -197,7 +197,7 @@
 
 #define TYPED_DATA_SETTER(setter, object, get_object_value, access_size,       \
                           access_type)                                         \
-  DEFINE_NATIVE_ENTRY(TypedData_##setter, 3) {                                 \
+  DEFINE_NATIVE_ENTRY(TypedData_##setter, 0, 3) {                              \
     GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance,                           \
                                  arguments->NativeArgAt(0));                   \
     GET_NON_NULL_NATIVE_ARGUMENT(Smi, offsetInBytes,                           \
diff --git a/runtime/lib/uri.cc b/runtime/lib/uri.cc
index 2f5dba1..4f1ef81 100644
--- a/runtime/lib/uri.cc
+++ b/runtime/lib/uri.cc
@@ -8,7 +8,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(Uri_isWindowsPlatform, 0) {
+DEFINE_NATIVE_ENTRY(Uri_isWindowsPlatform, 0, 0) {
 #if defined(HOST_OS_WINDOWS)
   return Bool::True().raw();
 #else
diff --git a/runtime/lib/vmservice.cc b/runtime/lib/vmservice.cc
index aa87514..deec036 100644
--- a/runtime/lib/vmservice.cc
+++ b/runtime/lib/vmservice.cc
@@ -78,7 +78,7 @@
 };
 #endif  // !PRODUCT
 
-DEFINE_NATIVE_ENTRY(VMService_SendIsolateServiceMessage, 2) {
+DEFINE_NATIVE_ENTRY(VMService_SendIsolateServiceMessage, 0, 2) {
 #ifndef PRODUCT
   if (!FLAG_support_service) {
     return Bool::Get(false).raw();
@@ -101,7 +101,7 @@
 #endif
 }
 
-DEFINE_NATIVE_ENTRY(VMService_SendRootServiceMessage, 1) {
+DEFINE_NATIVE_ENTRY(VMService_SendRootServiceMessage, 0, 1) {
 #ifndef PRODUCT
   GET_NON_NULL_NATIVE_ARGUMENT(Array, message, arguments->NativeArgAt(0));
   if (FLAG_support_service) {
@@ -111,7 +111,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(VMService_SendObjectRootServiceMessage, 1) {
+DEFINE_NATIVE_ENTRY(VMService_SendObjectRootServiceMessage, 0, 1) {
 #ifndef PRODUCT
   GET_NON_NULL_NATIVE_ARGUMENT(Array, message, arguments->NativeArgAt(0));
   if (FLAG_support_service) {
@@ -121,7 +121,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(VMService_OnStart, 0) {
+DEFINE_NATIVE_ENTRY(VMService_OnStart, 0, 0) {
 #ifndef PRODUCT
   if (FLAG_trace_service) {
     OS::PrintErr("vm-service: Booting dart:vmservice library.\n");
@@ -141,7 +141,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(VMService_OnExit, 0) {
+DEFINE_NATIVE_ENTRY(VMService_OnExit, 0, 0) {
 #ifndef PRODUCT
   if (FLAG_trace_service) {
     OS::PrintErr("vm-service: processed exit message.\n");
@@ -153,7 +153,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(VMService_OnServerAddressChange, 1) {
+DEFINE_NATIVE_ENTRY(VMService_OnServerAddressChange, 0, 1) {
 #ifndef PRODUCT
   if (!FLAG_support_service) {
     return Object::null();
@@ -168,7 +168,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(VMService_ListenStream, 1) {
+DEFINE_NATIVE_ENTRY(VMService_ListenStream, 0, 1) {
 #ifndef PRODUCT
   GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0));
   bool result = false;
@@ -181,7 +181,7 @@
 #endif
 }
 
-DEFINE_NATIVE_ENTRY(VMService_CancelStream, 1) {
+DEFINE_NATIVE_ENTRY(VMService_CancelStream, 0, 1) {
 #ifndef PRODUCT
   GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0));
   if (FLAG_support_service) {
@@ -191,7 +191,7 @@
   return Object::null();
 }
 
-DEFINE_NATIVE_ENTRY(VMService_RequestAssets, 0) {
+DEFINE_NATIVE_ENTRY(VMService_RequestAssets, 0, 0) {
 #ifndef PRODUCT
   if (!FLAG_support_service) {
     return Object::null();
@@ -381,7 +381,7 @@
 
 #endif
 
-DEFINE_NATIVE_ENTRY(VMService_DecodeAssets, 1) {
+DEFINE_NATIVE_ENTRY(VMService_DecodeAssets, 0, 1) {
 #ifndef PRODUCT
   if (!FLAG_support_service) {
     return Object::null();
@@ -439,7 +439,7 @@
 #endif
 }
 
-DEFINE_NATIVE_ENTRY(VMService_spawnUriNotify, 2) {
+DEFINE_NATIVE_ENTRY(VMService_spawnUriNotify, 0, 2) {
 #ifndef PRODUCT
   if (!FLAG_support_service) {
     return Object::null();
diff --git a/runtime/lib/weak_property.cc b/runtime/lib/weak_property.cc
index 069f77d..8715b6d 100644
--- a/runtime/lib/weak_property.cc
+++ b/runtime/lib/weak_property.cc
@@ -10,7 +10,7 @@
 
 namespace dart {
 
-DEFINE_NATIVE_ENTRY(WeakProperty_new, 2) {
+DEFINE_NATIVE_ENTRY(WeakProperty_new, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, key, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1));
   const WeakProperty& weak_property = WeakProperty::Handle(WeakProperty::New());
@@ -19,19 +19,19 @@
   return weak_property.raw();
 }
 
-DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 1) {
+DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(WeakProperty, weak_property,
                                arguments->NativeArgAt(0));
   return weak_property.key();
 }
 
-DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 1) {
+DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(WeakProperty, weak_property,
                                arguments->NativeArgAt(0));
   return weak_property.value();
 }
 
-DEFINE_NATIVE_ENTRY(WeakProperty_setValue, 2) {
+DEFINE_NATIVE_ENTRY(WeakProperty_setValue, 0, 2) {
   GET_NON_NULL_NATIVE_ARGUMENT(WeakProperty, weak_property,
                                arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1));
diff --git a/runtime/observatory/lib/src/elements/cpu_profile_table.dart b/runtime/observatory/lib/src/elements/cpu_profile_table.dart
index a78e2a4..b1a9160 100644
--- a/runtime/observatory/lib/src/elements/cpu_profile_table.dart
+++ b/runtime/observatory/lib/src/elements/cpu_profile_table.dart
@@ -411,7 +411,7 @@
 
   Future _request({bool clear: false, bool forceFetch: false}) async {
     _progress = null;
-    _progressStream = _profiles.get(isolate, M.SampleProfileTag.none,
+    _progressStream = _profiles.get(isolate, M.SampleProfileTag.vmOnly,
         clear: clear, forceFetch: forceFetch);
     _r.dirty();
     _progress = (await _progressStream.first).progress;
diff --git a/runtime/observatory/lib/src/elements/instance_ref.dart b/runtime/observatory/lib/src/elements/instance_ref.dart
index 9130e69..6ee4dfd 100644
--- a/runtime/observatory/lib/src/elements/instance_ref.dart
+++ b/runtime/observatory/lib/src/elements/instance_ref.dart
@@ -128,7 +128,6 @@
       case M.InstanceKind.type:
       case M.InstanceKind.typeRef:
       case M.InstanceKind.typeParameter:
-      case M.InstanceKind.boundedType:
         return [
           new AnchorElement(href: Uris.inspect(_isolate, object: _instance))
             ..text = _instance.name
diff --git a/runtime/observatory/lib/src/models/objects/field.dart b/runtime/observatory/lib/src/models/objects/field.dart
index d0d1221..ca59328c 100644
--- a/runtime/observatory/lib/src/models/objects/field.dart
+++ b/runtime/observatory/lib/src/models/objects/field.dart
@@ -15,7 +15,7 @@
   /// The declared type of this field.
   ///
   /// The value will always be of one of the kinds:
-  /// Type, TypeRef, TypeParameter, BoundedType.
+  /// Type, TypeRef, TypeParameter.
   InstanceRef get declaredType;
 
   /// Is this field const?
diff --git a/runtime/observatory/lib/src/models/objects/instance.dart b/runtime/observatory/lib/src/models/objects/instance.dart
index 1a1b8d4..66965e9 100644
--- a/runtime/observatory/lib/src/models/objects/instance.dart
+++ b/runtime/observatory/lib/src/models/objects/instance.dart
@@ -120,9 +120,6 @@
 
   /// An instance of the Dart class TypeRef.
   typeRef,
-
-  /// An instance of the Dart class BoundedType.
-  boundedType,
 }
 
 bool isTypedData(InstanceKind kind) {
@@ -163,7 +160,6 @@
     case InstanceKind.type:
     case InstanceKind.typeRef:
     case InstanceKind.typeParameter:
-    case InstanceKind.boundedType:
       return true;
     default:
       return false;
@@ -376,25 +372,21 @@
   ///   TypeParameter
   int get parameterIndex;
 
-  /// [optional] The type bounded by a BoundedType instance
-  /// - or -
-  /// the referent of a TypeRef instance.
+  /// [optional] The referent of a TypeRef instance.
   ///
   /// The value will always be of one of the kinds:
-  /// Type, TypeRef, TypeParameter, BoundedType.
+  /// Type, TypeRef, TypeParameter.
   ///
   /// Provided for instance kinds:
-  ///   BoundedType
   ///   TypeRef
   InstanceRef get targetType;
 
-  /// [optional] The bound of a TypeParameter or BoundedType.
+  /// [optional] The bound of a TypeParameter.
   ///
   /// The value will always be of one of the kinds:
-  /// Type, TypeRef, TypeParameter, BoundedType.
+  /// Type, TypeRef, TypeParameter.
   ///
   /// Provided for instance kinds:
-  ///   BoundedType
   ///   TypeParameter
   InstanceRef get bound;
 
diff --git a/runtime/observatory/lib/src/models/objects/type_arguments.dart b/runtime/observatory/lib/src/models/objects/type_arguments.dart
index 13316af..a3614dd 100644
--- a/runtime/observatory/lib/src/models/objects/type_arguments.dart
+++ b/runtime/observatory/lib/src/models/objects/type_arguments.dart
@@ -13,6 +13,6 @@
   /// A list of types.
   ///
   /// The value will always be one of the kinds:
-  /// Type, TypeRef, TypeParameter, BoundedType.
+  /// Type, TypeRef, TypeParameter.
   Iterable<InstanceRef> get types;
 }
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 7ebc69c..aa59574 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -2748,8 +2748,6 @@
       return M.InstanceKind.typeParameter;
     case 'TypeRef':
       return M.InstanceKind.typeRef;
-    case 'BoundedType':
-      return M.InstanceKind.boundedType;
   }
   var message = 'Unrecognized instance kind: $s';
   Logger.root.severe(message);
@@ -3699,7 +3697,7 @@
     }
     // Line and column numbers start at 1 in the VM.
     column -= 1;
-    String sourceLine = getLine(line).text;
+    String sourceLine = getLine(line)?.text;
     if (sourceLine == null) {
       return null;
     }
diff --git a/runtime/observatory/tests/service/async_generator_breakpoint_test.dart b/runtime/observatory/tests/service/async_generator_breakpoint_test.dart
index fdef362..af14028 100644
--- a/runtime/observatory/tests/service/async_generator_breakpoint_test.dart
+++ b/runtime/observatory/tests/service/async_generator_breakpoint_test.dart
@@ -1,8 +1,8 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--verbose-debug --no-sync-async
-// VMOptions=--verbose-debug --stacktrace-every=55 --stress-async-stacks --no-sync-async
+// VMOptions=--verbose-debug
+// VMOptions=--verbose-debug --stacktrace-every=55 --stress-async-stacks
 
 import 'dart:async';
 import 'package:observatory/service_io.dart';
@@ -10,19 +10,21 @@
 import 'test_helper.dart';
 
 printSync() {
-  print('sync'); // Line 12
+  print('sync'); // Line 13
 }
 
 printAsync() async {
-  print('async'); // Line 16
+  await null;
+  print('async'); // Line 18
 }
 
 printAsyncStar() async* {
-  print('async*'); // Line 20
+  await null;
+  print('async*'); // Line 23
 }
 
 printSyncStar() sync* {
-  print('sync*'); // Line 24
+  print('sync*'); // Line 27
 }
 
 var testerReady = false;
@@ -39,7 +41,7 @@
   var stream = printAsyncStar();
   var iterator = printSyncStar();
 
-  print('middle'); // Line 42
+  print('middle'); // Line 44
 
   future.then((v) => print(v));
   stream.toList();
@@ -50,19 +52,19 @@
   await isolate.rootLibrary.load();
   var script = isolate.rootLibrary.scripts[0];
 
-  var bp1 = await isolate.addBreakpoint(script, 12);
+  var bp1 = await isolate.addBreakpoint(script, 13);
   expect(bp1, isNotNull);
   expect(bp1 is Breakpoint, isTrue);
-  var bp2 = await isolate.addBreakpoint(script, 16);
+  var bp2 = await isolate.addBreakpoint(script, 18);
   expect(bp2, isNotNull);
   expect(bp2 is Breakpoint, isTrue);
-  var bp3 = await isolate.addBreakpoint(script, 20);
+  var bp3 = await isolate.addBreakpoint(script, 23);
   expect(bp3, isNotNull);
   expect(bp3 is Breakpoint, isTrue);
-  var bp4 = await isolate.addBreakpoint(script, 24);
+  var bp4 = await isolate.addBreakpoint(script, 27);
   expect(bp4, isNotNull);
   expect(bp4 is Breakpoint, isTrue);
-  var bp5 = await isolate.addBreakpoint(script, 42);
+  var bp5 = await isolate.addBreakpoint(script, 44);
   print("BP5 - $bp5");
   expect(bp5, isNotNull);
   expect(bp5 is Breakpoint, isTrue);
diff --git a/runtime/observatory/tests/service/async_single_step_exception_test.dart b/runtime/observatory/tests/service/async_single_step_exception_test.dart
index cb91485..d269a72 100644
--- a/runtime/observatory/tests/service/async_single_step_exception_test.dart
+++ b/runtime/observatory/tests/service/async_single_step_exception_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--verbose_debug --async_debugger --no-sync-async
+// VMOptions=--verbose_debug --async_debugger
 
 import 'dart:developer';
 import 'service_test_common.dart';
@@ -38,27 +38,41 @@
 
 var tests = <IsolateTest>[
   hasStoppedAtBreakpoint,
-  stoppedAtLine(LINE_C),
-  stepOver, // print.
+  stoppedAtLine(LINE_C), // print mmmm
+  smartNext,
+
   hasStoppedAtBreakpoint,
-  stoppedAtLine(LINE_D),
+  stoppedAtLine(LINE_D), // await helper
   stepInto,
+
   hasStoppedAtBreakpoint,
-  stoppedAtLine(LINE_A),
-  stepOver, // print.
+  stoppedAtLine(LINE_A), // print helper
+  smartNext,
+
   hasStoppedAtBreakpoint,
-  stoppedAtLine(LINE_B), // throw 'a'.
-  stepInto, // exit helper via a throw.
+  stoppedAtLine(LINE_B), // throw a
+  smartNext,
+
   hasStoppedAtBreakpoint,
-  stepInto, // exit helper via a throw.
+  stoppedAtLine(22), // } (weird dispatching)
+  smartNext,
+
   hasStoppedAtBreakpoint,
-  stepInto, // step once from entry to main.
+  stoppedAtLine(LINE_D), // await helper (weird dispatching)
+  smartNext,
+
   hasStoppedAtBreakpoint,
   stoppedAtLine(LINE_E), // print(error)
-  stepOver,
+  smartNext,
+
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_E), // print(error) (weird finally dispatching)
+  smartNext,
+
   hasStoppedAtBreakpoint,
   stoppedAtLine(LINE_F), // print(foo)
-  stepOver,
+  smartNext,
+
   hasStoppedAtBreakpoint,
   stoppedAtLine(LINE_G), // print(z)
   resumeIsolate
diff --git a/runtime/observatory/tests/service/async_single_step_out_test.dart b/runtime/observatory/tests/service/async_single_step_out_test.dart
index 15661e0..fc38d2f 100644
--- a/runtime/observatory/tests/service/async_single_step_out_test.dart
+++ b/runtime/observatory/tests/service/async_single_step_out_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--verbose_debug --async_debugger --no-sync-async
+// VMOptions=--verbose_debug --async_debugger
 
 import 'dart:developer';
 import 'service_test_common.dart';
@@ -27,18 +27,30 @@
 
 var tests = <IsolateTest>[
   hasStoppedAtBreakpoint,
-  stoppedAtLine(LINE_C),
-  stepOver, // print.
+  stoppedAtLine(LINE_C), // print mmmm
+  stepOver,
+
   hasStoppedAtBreakpoint,
-  stoppedAtLine(LINE_D),
+  stoppedAtLine(LINE_D), // await helper
   stepInto,
+
   hasStoppedAtBreakpoint,
-  stoppedAtLine(LINE_A),
-  stepOver, // print.
+  stoppedAtLine(LINE_A), // print.
+  stepOver,
+
   hasStoppedAtBreakpoint,
   stoppedAtLine(LINE_B), // return null.
   stepInto, // exit helper via a single step.
+
   hasStoppedAtBreakpoint,
+  stoppedAtLine(19), // return null (weird dispatching)
+  stepInto, // exit helper via a single step.
+
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(24), // await helper (weird dispatching)
+  smartNext,
+
+  hasStoppedAtBreakpoint, //19
   stoppedAtLine(LINE_E), // arrive after the await.
   resumeIsolate
 ];
diff --git a/runtime/observatory/tests/service/get_source_report_test.dart b/runtime/observatory/tests/service/get_source_report_test.dart
index 411d7a0..ce2fa5b3 100644
--- a/runtime/observatory/tests/service/get_source_report_test.dart
+++ b/runtime/observatory/tests/service/get_source_report_test.dart
@@ -75,8 +75,12 @@
       'scriptId': func.location.script.id
     };
     var coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
+    final numRanges = coverage['ranges'].length;
     expect(coverage['type'], equals('SourceReport'));
-    expect(coverage['ranges'].length, 6);
+
+    // Running in app_jitk mode will result in the number of ranges being 6
+    // during the training run and 7 when running from the snapshot.
+    expect(((numRanges == 6) || (numRanges == 7)), isTrue);
     expect(coverage['ranges'][0], equals(expectedRange));
     expect(coverage['scripts'].length, 1);
     expect(
@@ -91,7 +95,7 @@
     };
     coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
     expect(coverage['type'], equals('SourceReport'));
-    expect(coverage['ranges'].length, 6);
+    expect(coverage['ranges'].length, numRanges);
     expect(allRangesCompiled(coverage), isTrue);
 
     // One function
diff --git a/runtime/observatory/tests/service/get_version_rpc_test.dart b/runtime/observatory/tests/service/get_version_rpc_test.dart
index dc2c129..9b1fb1a 100644
--- a/runtime/observatory/tests/service/get_version_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_version_rpc_test.dart
@@ -12,7 +12,7 @@
     var result = await vm.invokeRpcNoUpgrade('getVersion', {});
     expect(result['type'], equals('Version'));
     expect(result['major'], equals(3));
-    expect(result['minor'], equals(12));
+    expect(result['minor'], equals(13));
     expect(result['_privateMajor'], equals(0));
     expect(result['_privateMinor'], equals(0));
   },
diff --git a/runtime/observatory/tests/service/local_variable_declaration_test.dart b/runtime/observatory/tests/service/local_variable_declaration_test.dart
index 3204bb4..2c59824 100644
--- a/runtime/observatory/tests/service/local_variable_declaration_test.dart
+++ b/runtime/observatory/tests/service/local_variable_declaration_test.dart
@@ -47,7 +47,11 @@
       final int declarationTokenPos = variable['declarationTokenPos'];
       final String name = variable['name'];
       final String token = script.getToken(declarationTokenPos);
-      expect(name, token);
+      // When running from an appjit snapshot, sources aren't available so the returned token will
+      // be null.
+      if (token != null) {
+        expect(name, token);
+      }
     }
   },
   resumeIsolate,
@@ -69,7 +73,11 @@
       final int declarationTokenPos = variable['declarationTokenPos'];
       final String name = variable['name'];
       final String token = script.getToken(declarationTokenPos);
-      expect(name, token);
+      // When running from an appjit snapshot, sources aren't available so the returned token will
+      // be null.
+      if (token != null) {
+        expect(name, token);
+      }
     }
   },
   resumeIsolate,
@@ -92,7 +100,11 @@
       final int declarationTokenPos = variable['declarationTokenPos'];
       final String name = variable['name'];
       final String token = script.getToken(declarationTokenPos);
-      expect(name, token);
+      // When running from an appjit snapshot, sources aren't available so the returned token will
+      // be null.
+      if (token != null) {
+        expect(name, token);
+      }
     }
   }
 ];
diff --git a/runtime/observatory/tests/service/positive_token_pos_test.dart b/runtime/observatory/tests/service/positive_token_pos_test.dart
index 6257882..5bf9cb2 100644
--- a/runtime/observatory/tests/service/positive_token_pos_test.dart
+++ b/runtime/observatory/tests/service/positive_token_pos_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--verbose_debug --no-sync-async
+// VMOptions=--verbose_debug
 
 import 'dart:developer';
 import 'package:observatory/service_io.dart';
@@ -28,7 +28,7 @@
     expect(stack['frames'].length, greaterThan(3));
 
     var frame = stack['frames'][0];
-    expect(frame.function.name, equals('Completer.sync'));
+    expect(frame.function.name, equals('_AsyncAwaitCompleter'));
     expect(await frame.location.getLine(), greaterThan(0));
     expect(await frame.location.getColumn(), greaterThan(0));
 
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index 8fb2b1d..2340759 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -50,11 +50,6 @@
 [ $compiler == precompiler ]
 *: Skip # Issue 24651
 
-# Debugger location tests are slow in debug mode.
-[ $mode == debug ]
-debugger_location_second_test: Pass, Slow
-debugger_location_test: Pass, Slow
-
 # Service protocol is not supported in product mode.
 [ $mode == product ]
 *: SkipByDesign
@@ -99,6 +94,11 @@
 step_through_function_test: RuntimeError # Debugging StringConcatenation doesn't work the same on simdbc as on other platforms (bug #28975).
 step_through_getter_test: RuntimeError # Debugging StringConcatenation doesn't work the same on simdbc as on other platforms (bug #28975).
 
+[ $arch == simdbc || $arch == simdbc64 || $mode == debug ]
+break_on_default_constructor_test: Pass, Slow
+debugger_location_second_test: Pass, Slow
+debugger_location_test: Pass, Slow
+
 # All tests use dart:io
 [ $compiler == dart2js || $browser ]
 *: SkipByDesign
diff --git a/runtime/observatory/tests/service/service_kernel.status b/runtime/observatory/tests/service/service_kernel.status
index c6010cb..3b35e4f 100644
--- a/runtime/observatory/tests/service/service_kernel.status
+++ b/runtime/observatory/tests/service/service_kernel.status
@@ -3,67 +3,53 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == app_jitk ]
-add_breakpoint_rpc_test: RuntimeError
-async_generator_breakpoint_test: Skip # No incremental compiler available.
-async_single_step_exception_test: RuntimeError
-async_single_step_out_test: RuntimeError
+add_breakpoint_rpc_test: SkipByDesign # non-kernel specific version of add_breakpoint_rpc_kernel_test.
+async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 bad_reload_test: RuntimeError
-break_on_activation_test: Skip # No incremental compiler available.
+break_on_activation_test: SkipByDesign # No incremental compiler available.
 complex_reload_test: RuntimeError
-debugger_inspect_test: Skip # No incremental compiler available.
+debugger_inspect_test: SkipByDesign # No incremental compiler available.
 debugger_location_second_test: RuntimeError
-developer_service_get_isolate_id_test: Skip #  No incremental compiler available.
-eval_internal_class_test: Skip # No incremental compiler available.
-eval_regression_flutter20255_test: Skip # No incremental compiler available.
-eval_test: Skip # No incremental compiler available.
-evaluate_activation_in_method_class_test: RuntimeError
-evaluate_activation_test: Skip # No incremental compiler available.
-evaluate_async_closure_test: Skip # No incremental compiler available.
-evaluate_class_type_parameters_test: RuntimeError
-evaluate_in_async_activation_test: RuntimeError
-evaluate_in_async_star_activation_test: RuntimeError
-evaluate_in_frame_rpc_test: RuntimeError
-evaluate_in_frame_with_scope_test: Skip # No incremental compiler available.
-evaluate_in_sync_star_activation_test: RuntimeError
-evaluate_with_scope_test: Skip # No incremental compiler available.
-get_instances_rpc_test: Skip # No incremental compiler available.
-get_object_rpc_test: Skip # No incremental compiler available.
-get_retained_size_rpc_test: Skip # No incremental compiler available.
-get_retaining_path_rpc_test: Skip # No incremental compiler available.
-get_source_report_test: RuntimeError
-get_user_level_retaining_path_rpc_test: Skip # No incremental compiler available.
-get_vm_rpc_test: RuntimeError
-get_vm_timeline_rpc_test: RuntimeError
-instance_field_order_rpc_test: Skip # No incremental compiler available.
-local_variable_declaration_test: RuntimeError
-pause_on_exceptions_test: Skip # No incremental compiler available.
-positive_token_pos_test: RuntimeError
-rewind_optimized_out_test: RuntimeError
-rewind_test: RuntimeError
-set_name_rpc_test: RuntimeError
-set_vm_name_rpc_test: RuntimeError
-simple_reload_test: RuntimeError
+developer_service_get_isolate_id_test: SkipByDesign # No incremental compiler available.
+eval_internal_class_test: SkipByDesign # No incremental compiler available.
+eval_regression_flutter20255_test: SkipByDesign # No incremental compiler available.
+eval_test: SkipByDesign # No incremental compiler available.
+evaluate_activation_in_method_class_test: RuntimeError # Issue 35505
+evaluate_activation_test: SkipByDesign # No incremental compiler available.
+evaluate_async_closure_test: SkipByDesign # No incremental compiler available.
+evaluate_class_type_parameters_test: SkipByDesign # No incremental compiler available.
+evaluate_in_async_activation_test: SkipByDesign # No incremental compiler available.
+evaluate_in_async_star_activation_test: SkipByDesign # No incremental compiler available.
+evaluate_in_frame_rpc_test: SkipByDesign # No incremental compiler available.
+evaluate_in_frame_with_scope_test: SkipByDesign # No incremental compiler available.
+evaluate_in_sync_star_activation_test: SkipByDesign # No incremental compiler available.
+evaluate_with_scope_test: SkipByDesign # No incremental compiler available.
+get_instances_rpc_test: SkipByDesign # No incremental compiler available.
+get_object_rpc_test: SkipByDesign # No incremental compiler available.
+get_retained_size_rpc_test: SkipByDesign # No incremental compiler available.
+get_retaining_path_rpc_test: SkipByDesign # No incremental compiler available.
+get_user_level_retaining_path_rpc_test: SkipByDesign # No incremental compiler available.
+instance_field_order_rpc_test: SkipByDesign # No incremental compiler available.
+pause_on_exceptions_test: SkipByDesign # No incremental compiler available.
+rewind_optimized_out_test: SkipByDesign # No incremental compiler available.
+rewind_test: SkipByDesign # No incremental compiler available.
+simple_reload_test: RuntimeError, Timeout # Issue 35506
 unused_changes_in_last_reload_test: RuntimeError
-valid_source_locations_test: RuntimeError
 
 # Kernel works slightly different. There are kernel specific versions.
 # These are the non-kernel specific versions so skip tests and allow errors.
 [ $compiler == dartk ]
 add_breakpoint_rpc_test: SkipByDesign # non-kernel specific version of add_breakpoint_rpc_kernel_test.
-async_generator_breakpoint_test: Crash, RuntimeError # Issue 34746
-async_single_step_exception_test: RuntimeError # Issue 34746
-async_single_step_out_test: RuntimeError # Issue 34746
 bad_reload_test: RuntimeError # Issue 34025
 coverage_optimized_function_test: Pass, Slow
-evaluate_activation_in_method_class_test: RuntimeError
+evaluate_activation_in_method_class_test: RuntimeError # Issue 35505
 evaluate_activation_test/instance: RuntimeError # http://dartbug.com/20047
 evaluate_activation_test/scope: RuntimeError # http://dartbug.com/20047
 pause_on_unhandled_async_exceptions2_test: Pass, Slow
-positive_token_pos_test: RuntimeError # Issue 34746
 unused_changes_in_last_reload_test: RuntimeError
 
 [ $compiler == dartkp ]
-*: Skip # Non-kernel also skips precompiled mode.
+*: SkipByDesign # Non-kernel also skips precompiled mode.
 
 [ $fasta ]
 developer_extension_test: CompileTimeError
@@ -84,8 +70,8 @@
 complex_reload_test: RuntimeError
 
 [ $arch == simdbc64 && $compiler == dartk ]
-eval_test: RuntimeError, Timeout # Issue #33087
-evaluate_in_frame_rpc_test: RuntimeError, Timeout # Issue #33087
+eval_test: RuntimeError, Timeout # Issue #34736
+evaluate_in_frame_rpc_test: RuntimeError, Timeout # Issue #34736
 get_cpu_profile_timeline_rpc_test: Pass, RuntimeError # http://dartbug.com/31794
 
 [ $arch == simdbc64 && $compiler == dartk && $mode == debug ]
@@ -97,7 +83,9 @@
 rewind_optimized_out_test: Pass, Slow
 
 [ $compiler == dartk && $system == windows ]
+add_breakpoint_rpc_kernel_test: Skip # Timeout
 break_on_default_constructor_test: Skip # Issues 32137 and 32138.
+breakpoint_in_parts_class_test: Skip # Timeout
 coverage_optimized_function_test: Skip # Timeout
 field_script_test: Skip # Timeout
 get_vm_timeline_rpc_test: Skip # Issue 32137.
@@ -107,84 +95,75 @@
 next_through_assign_int_test: Skip # Issues 32137 and 32138.
 next_through_call_on_field_in_class_test: Skip # Issues 32137 and 32138.
 next_through_call_on_field_test: Skip # Issues 32137 and 32138.
+next_through_call_on_static_field_in_class_test: Skip # Timeout
 next_through_catch_test: Skip # Issues 32137 and 32138.
+next_through_closure_test: Skip # Timeout
 next_through_create_list_and_map_test: Skip # Issues 32137 and 32138.
+next_through_for_each_loop_test: Skip # Timeout
 next_through_for_loop_with_break_and_continue_test: Skip # Timeout
 next_through_function_expression_test: Skip # Issues 32137 and 32138.
+next_through_implicit_call_test: Skip # Timeout
 next_through_is_and_as_test: Skip # Issues 32137 and 32138.
 next_through_multi_catch_test: Skip # Issues 32137 and 32138.
+next_through_new_test: Skip # Timeout
+next_through_operator_bracket_on_super_test: Skip # Timeout
+next_through_operator_bracket_on_this_test: Skip # Timeout
+next_through_operator_bracket_test: Skip # Timeout
+next_through_simple_async_test: Skip # Timeout
 next_through_simple_async_with_returns_test: Skip # Issues 32137 and 32138.
 next_through_simple_linear_2_test: Skip # Issues 32137 and 32138.
 next_through_simple_linear_test: Skip # Issues 32137 and 32138.
 pause_idle_isolate_test: Skip # Issues 32137 and 32138.
 pause_on_start_and_exit_test: Skip # Issues 32225, 32138.
+pause_on_start_and_exit_with_child_test: Skip # Timeout
 pause_on_start_then_step_test: Skip # Issue 32225, 32138.
 regress_28443_test: Skip # Times out.
 regress_28980_test: Skip # Issues 32137 and 32138.
 reload_sources_test: RuntimeError
 set_vm_name_rpc_test: Skip # Times out. Issue 32137.
 step_test: Skip # Issues 32137 and 32138.
+step_through_constructor_calls_test: Skip # Timeout
 step_through_constructor_test: Skip # Timeout
 step_through_function_2_test: Skip # Issues 32137 and 32138.
 step_through_function_test: Skip # Issues 32137 and 32138.
+step_through_getter_test: Skip # Timeout
 step_through_property_get_test: Skip # Times out. Issue 32137.
+step_through_property_set_test: Skip # Timeout
 step_through_setter_test: Skip # Issues 32137 and 32138.
 step_through_switch_test: Skip # Times out. Issue 32137.
 step_through_switch_with_continue_test: Skip # Times out. Issue 32137.
 
-[ $compiler == dartk && $system == windows && $strong ]
-add_breakpoint_rpc_kernel_test: Skip # Timeout
-breakpoint_in_parts_class_test: Skip # Timeout
-next_through_call_on_static_field_in_class_test: Skip # Timeout
-next_through_closure_test: Skip # Timeout
-next_through_for_each_loop_test: Skip # Timeout
-next_through_implicit_call_test: Skip # Timeout
-next_through_new_test: Skip # Timeout
-next_through_operator_bracket_on_super_test: Skip # Timeout
-next_through_operator_bracket_on_this_test: Skip # Timeout
-next_through_operator_bracket_test: Skip # Timeout
-next_through_simple_async_test: Skip # Timeout
-pause_on_start_and_exit_with_child_test: Skip # Timeout
-step_through_constructor_calls_test: Skip # Timeout
-step_through_getter_test: Skip # Timeout
-step_through_property_set_test: Skip # Timeout
-
-[ $compiler == dartk && $system == windows && !$strong ]
-next_through_simple_async_test: Skip # Timeout
-step_test: Skip # Timeout
-step_through_constructor_test: Skip # Timeout
-
 [ $compiler == dartk && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) ]
-add_breakpoint_rpc_kernel_test: RuntimeError # Issue #33087
-async_generator_breakpoint_test: Skip # No incremental compiler available.
+add_breakpoint_rpc_kernel_test: RuntimeError # Issue #34736
+async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
-break_on_activation_test: RuntimeError # Issue #33087
+break_on_activation_test: RuntimeError # Issue #34736
 complex_reload_test: Skip # Times out on sim architectures, also RuntimeError.
-debugger_inspect_test: RuntimeError, Timeout # Issue #33087
-developer_service_get_isolate_id_test: RuntimeError # Issue #33087
-eval_internal_class_test: RuntimeError # Issue #33087
-eval_regression_flutter20255_test: RuntimeError # "No incremental compiler available for this isolate"
-eval_test: RuntimeError # Issue #33087
-evaluate_activation_test/none: RuntimeError # Issue #33087
-evaluate_async_closure_test: RuntimeError # Issue #33087
-evaluate_class_type_parameters_test: RuntimeError # Issue 33087
-evaluate_function_type_parameters_test: RuntimeError # Issue 33087
-evaluate_in_async_activation_test: RuntimeError # Issue #33087
-evaluate_in_async_star_activation_test: RuntimeError # Issue #33087
-evaluate_in_frame_rpc_test: RuntimeError # Issue #33087
-evaluate_in_frame_with_scope_test: RuntimeError # Issue #33087
-evaluate_in_sync_star_activation_test: RuntimeError # "No incremental compiler available for this isolate"
-evaluate_with_scope_test: RuntimeError # Issue #33087
-get_instances_rpc_test: RuntimeError # Issue #33087
+debugger_inspect_test: RuntimeError, Timeout # Issue #34736
+developer_service_get_isolate_id_test: RuntimeError # Issue #34736
+eval_internal_class_test: RuntimeError # Issue #34736
+eval_regression_flutter20255_test: SkipByDesign # No incremental compiler available.
+eval_test: RuntimeError # Issue #34736
+evaluate_activation_test/none: RuntimeError # Issue #34736
+evaluate_async_closure_test: RuntimeError # Issue #34736
+evaluate_class_type_parameters_test: RuntimeError # Issue 34736
+evaluate_function_type_parameters_test: RuntimeError # Issue 34736
+evaluate_in_async_activation_test: RuntimeError # Issue #34736
+evaluate_in_async_star_activation_test: RuntimeError # Issue #34736
+evaluate_in_frame_rpc_test: RuntimeError # Issue #34736
+evaluate_in_frame_with_scope_test: RuntimeError # Issue #34736
+evaluate_in_sync_star_activation_test: SkipByDesign # No incremental compiler available.
+evaluate_with_scope_test: RuntimeError # Issue #34736
+get_instances_rpc_test: RuntimeError # Issue #34736
 get_object_rpc_test: RuntimeError # Please triage.
-get_retaining_path_rpc_test: RuntimeError # Issue #33087
-get_user_level_retaining_path_rpc_test: RuntimeError # Issue #33087
-instance_field_order_rpc_test: RuntimeError # Issue #33087
-pause_on_exceptions_test: RuntimeError, Timeout # Issue #33087
+get_retaining_path_rpc_test: RuntimeError # Issue #34736
+get_user_level_retaining_path_rpc_test: RuntimeError # Issue #34736
+instance_field_order_rpc_test: RuntimeError # Issue #34736
+pause_on_exceptions_test: RuntimeError, Timeout # Issue #34736
 reload_sources_test: Skip # Times out.
-rewind_optimized_out_test: RuntimeError # Issue #33087
+rewind_optimized_out_test: RuntimeError # Issue #34736
 rewind_test: Pass, RuntimeError
 set_name_rpc_test: RuntimeError # Please triage.
 simple_reload_test: RuntimeError, Timeout
 unused_changes_in_last_reload_test: Skip # Times out on sim architectures.
-valid_source_locations_test: Pass, Slow, Timeout # Issue 33087
+valid_source_locations_test: Pass, Slow, Timeout # Issue 34736
diff --git a/runtime/observatory/tests/service/set_name_rpc_test.dart b/runtime/observatory/tests/service/set_name_rpc_test.dart
index 790cd46..1d743cc 100644
--- a/runtime/observatory/tests/service/set_name_rpc_test.dart
+++ b/runtime/observatory/tests/service/set_name_rpc_test.dart
@@ -10,7 +10,10 @@
 
 var tests = <IsolateTest>[
   (Isolate isolate) async {
-    expect(isolate.name, equals('set_name_rpc_test.dart:main()'));
+    expect(
+        ((isolate.name == 'set_name_rpc_test.dart:main()') ||
+            (isolate.name == 'out.jitsnapshot:main()')),
+        isTrue);
 
     Completer completer = new Completer();
     var stream = await isolate.vm.getEventStream(VM.kIsolateStream);
diff --git a/runtime/observatory/tests/service/udp_socket_service_test.dart b/runtime/observatory/tests/service/udp_socket_service_test.dart
index 88f719f..01b88d3 100644
--- a/runtime/observatory/tests/service/udp_socket_service_test.dart
+++ b/runtime/observatory/tests/service/udp_socket_service_test.dart
@@ -61,7 +61,7 @@
     expect(server['port'], greaterThanOrEqualTo(1024));
     final now = DateTime.now().millisecondsSinceEpoch;
     expect(
-        server['lastRead'], closeTo(now, Duration(seconds: 5).inMilliseconds));
+        server['lastRead'], closeTo(now, Duration(seconds: 10).inMilliseconds));
     expect(server['totalRead'], equals(6));
     expect(server['lastWrite'], equals(0));
     expect(server['totalWritten'], equals(0));
diff --git a/runtime/tests/vm/dart/entrypoints/aot/static_this_test.dart b/runtime/tests/vm/dart/entrypoints/aot/static_this_test.dart
new file mode 100644
index 0000000..2aef254
--- /dev/null
+++ b/runtime/tests/vm/dart/entrypoints/aot/static_this_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5 -Denable_inlining=true
+
+import '../static_this.dart';
+
+main(args) => test(args);
diff --git a/runtime/tests/vm/dart/entrypoints/aot/super_test.dart b/runtime/tests/vm/dart/entrypoints/aot/super_test.dart
new file mode 100644
index 0000000..8b19e02
--- /dev/null
+++ b/runtime/tests/vm/dart/entrypoints/aot/super_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5 -Denable_inlining=true
+
+import "../super.dart";
+
+main(args) => test(args);
diff --git a/runtime/tests/vm/dart/entrypoints/common.dart b/runtime/tests/vm/dart/entrypoints/common.dart
index 37a6aa5..3d6521b 100644
--- a/runtime/tests/vm/dart/entrypoints/common.dart
+++ b/runtime/tests/vm/dart/entrypoints/common.dart
@@ -11,6 +11,11 @@
 const String NeverInline =
     const bool.fromEnvironment("enable_inlining") ? "" : "NeverInline";
 
+// In AOT we need to force some functions to be inlined since we only build the
+// unchecked entry-point when inlining.
+const String AlwaysInline =
+    const bool.fromEnvironment("enable_inlining") ? "AlwaysInline" : "";
+
 // All these tests can be run in test mode or in benchmark mode. In benchmark
 // mode, there is introspection is omitted and the tests runs for many more
 // iterations.
@@ -48,5 +53,7 @@
       entryPoint);
 }
 
+@pragma("vm:entry-point", "get")
 const validate = benchmarkMode ? null : _validateFn;
+@pragma("vm:entry-point", "get")
 const validateTearoff = benchmarkMode ? null : _validateTearoffFn;
diff --git a/runtime/tests/vm/dart/entrypoints/polymorphic_optional_this_test.dart b/runtime/tests/vm/dart/entrypoints/jit/polymorphic_optional_this_test.dart
similarity index 95%
rename from runtime/tests/vm/dart/entrypoints/polymorphic_optional_this_test.dart
rename to runtime/tests/vm/dart/entrypoints/jit/polymorphic_optional_this_test.dart
index 026b6f4..12523e8 100644
--- a/runtime/tests/vm/dart/entrypoints/polymorphic_optional_this_test.dart
+++ b/runtime/tests/vm/dart/entrypoints/jit/polymorphic_optional_this_test.dart
@@ -9,7 +9,7 @@
 // entrypoint. The use of optional arguments here encourages prologue sharing
 // between the entrypoints.
 
-import "common.dart";
+import "../common.dart";
 import "package:expect/expect.dart";
 
 abstract class C<T> {
@@ -24,6 +24,7 @@
 class D<T> extends C<T> {
   @NeverInline
   @pragma("vm:testing.unsafe.trace-entrypoints-fn", validate)
+  @pragma("vm:entry-point")
   void samir2(T x, {String y}) {
     Expect.notEquals(x, -1);
     Expect.equals(y, "hi");
@@ -33,6 +34,7 @@
 class E<T> extends C<T> {
   @NeverInline
   @pragma("vm:testing.unsafe.trace-entrypoints-fn", validate)
+  @pragma("vm:entry-point")
   void samir2(T x, {String y}) {
     Expect.notEquals(x, -1);
     Expect.equals(y, "hi");
diff --git a/runtime/tests/vm/dart/entrypoints/polymorphic_this_test.dart b/runtime/tests/vm/dart/entrypoints/jit/polymorphic_this_test.dart
similarity index 94%
rename from runtime/tests/vm/dart/entrypoints/polymorphic_this_test.dart
rename to runtime/tests/vm/dart/entrypoints/jit/polymorphic_this_test.dart
index e1cb856..4a360e9 100644
--- a/runtime/tests/vm/dart/entrypoints/polymorphic_this_test.dart
+++ b/runtime/tests/vm/dart/entrypoints/jit/polymorphic_this_test.dart
@@ -8,7 +8,7 @@
 // Test that 'PolymorphicInstanceCall's against "this" go through the unchecked
 // entrypoint.
 
-import "common.dart";
+import "../common.dart";
 import "package:expect/expect.dart";
 
 abstract class C<T> {
@@ -63,10 +63,10 @@
 
   // Once for D and once for E.
   expectedEntryPoint = 0;
-  dynamic f = getC().target2;
-  f(0);
-  f = getC().target2;
-  f(0);
+  dynamic x = getC();
+  x.target2(0);
+  x = getC();
+  x.target2(0);
 
   Expect.isTrue(validateRan);
 }
diff --git a/runtime/tests/vm/dart/entrypoints/jit/static_this_test.dart b/runtime/tests/vm/dart/entrypoints/jit/static_this_test.dart
new file mode 100644
index 0000000..0662ada
--- /dev/null
+++ b/runtime/tests/vm/dart/entrypoints/jit/static_this_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5
+// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5 -Denable_inlining=true
+
+import '../static_this.dart';
+
+main(args) => test(args);
diff --git a/runtime/tests/vm/dart/entrypoints/jit/super_test.dart b/runtime/tests/vm/dart/entrypoints/jit/super_test.dart
new file mode 100644
index 0000000..dff824c
--- /dev/null
+++ b/runtime/tests/vm/dart/entrypoints/jit/super_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5 -Denable_inlining=true
+// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5
+
+import "../super.dart";
+
+main(args) => test(args);
diff --git a/runtime/tests/vm/dart/entrypoints/static_this_test.dart b/runtime/tests/vm/dart/entrypoints/static_this.dart
similarity index 73%
rename from runtime/tests/vm/dart/entrypoints/static_this_test.dart
rename to runtime/tests/vm/dart/entrypoints/static_this.dart
index 8b962ed..da610da 100644
--- a/runtime/tests/vm/dart/entrypoints/static_this_test.dart
+++ b/runtime/tests/vm/dart/entrypoints/static_this.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 //
-// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5
-// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5 -Denable_inlining=true
-
 // Test that 'StaticCall's against "this" go through the unchecked entry-point.
 
 import "common.dart";
@@ -13,6 +10,7 @@
 class C<T> {
   @pragma("vm:testing.unsafe.trace-entrypoints-fn", validate)
   @NeverInline
+  @AlwaysInline
   void target2(T x) {
     Expect.notEquals(x, -1);
   }
@@ -23,7 +21,7 @@
   }
 }
 
-main(List<String> args) {
+test(List<String> args) {
   // Make sure the precise runtime-type of C is not known below.
   C c = args.length == 0 ? C<int>() : C<String>();
 
@@ -40,8 +38,8 @@
   }
 
   expectedEntryPoint = 0;
-  dynamic f = c.target2;
-  f(0);
+  dynamic x = c;
+  x.target2(0);
 
   Expect.isTrue(validateRan);
 }
diff --git a/runtime/tests/vm/dart/entrypoints/super_test.dart b/runtime/tests/vm/dart/entrypoints/super.dart
similarity index 78%
rename from runtime/tests/vm/dart/entrypoints/super_test.dart
rename to runtime/tests/vm/dart/entrypoints/super.dart
index e923180..088b193 100644
--- a/runtime/tests/vm/dart/entrypoints/super_test.dart
+++ b/runtime/tests/vm/dart/entrypoints/super.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 //
-// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5 -Denable_inlining=true
-// VMOptions=--enable-testing-pragmas --no-background-compilation --enable-inlining-annotations --optimization-counter-threshold=5
-
 // Test that 'StaticCall's against "super" go through the unchecked entrypoint.
 
 import "common.dart";
 import "package:expect/expect.dart";
 
-abstract class C<T> {
+class C<T> {
+  @AlwaysInline
   @NeverInline
   @pragma("vm:testing.unsafe.trace-entrypoints-fn", validate)
   void target1(T x) {
@@ -38,9 +36,11 @@
   if (j % 2 == 0) {
     ++j;
     return new D<int>();
-  } else {
+  } else if (j % 2 == 1) {
     ++j;
     return new E<int>();
+  } else {
+    return new C<int>();
   }
 }
 
@@ -48,7 +48,12 @@
 // counter threshold.
 void testOneC(C x, int i) => x.target1(i);
 
-main(List<String> args) {
+test(List<String> args) {
+  // Make sure the check on target1.x is not completely eliminated.
+  if (args.length > 0) {
+    (C<int>() as C<num>).target1(1.0);
+  }
+
   expectedEntryPoint = -1;
   for (int i = 0; i < 100; ++i) {
     testOneC(getC(), i);
diff --git a/runtime/tests/vm/dart/entrypoints/tearoff_prologue_test.dart b/runtime/tests/vm/dart/entrypoints/tearoff_prologue_test.dart
index 47d1c89..c74b806 100644
--- a/runtime/tests/vm/dart/entrypoints/tearoff_prologue_test.dart
+++ b/runtime/tests/vm/dart/entrypoints/tearoff_prologue_test.dart
@@ -12,6 +12,7 @@
 class C<T> {
   @NeverInline
   @pragma("vm:testing.unsafe.trace-entrypoints-fn", validateTearoff)
+  @pragma("vm:entry-point")
   void samir1(T x) {
     if (x == -1) {
       throw "oh no";
diff --git a/runtime/tests/vm/dart/entrypoints/tearoff_test.dart b/runtime/tests/vm/dart/entrypoints/tearoff_test.dart
index 356a819..1b29cbe 100644
--- a/runtime/tests/vm/dart/entrypoints/tearoff_test.dart
+++ b/runtime/tests/vm/dart/entrypoints/tearoff_test.dart
@@ -13,6 +13,7 @@
 class C<T> {
   @NeverInline
   @pragma("vm:testing.unsafe.trace-entrypoints-fn", validateTearoff)
+  @pragma("vm:entry-point")
   void target1(T x, String y) {
     Expect.notEquals(x, -1);
     Expect.equals(y, "foo");
diff --git a/runtime/tests/vm/dart/regress_33999_test.dart b/runtime/tests/vm/dart/regress_33999_test.dart
index 933d2e0..e7e9e89 100644
--- a/runtime/tests/vm/dart/regress_33999_test.dart
+++ b/runtime/tests/vm/dart/regress_33999_test.dart
@@ -8,12 +8,16 @@
 
 // Class with two type parameters.
 class A<U, T> {
-  T field;
+  T field1;
+  List<T> field2;
+  T Function(T) field3;
 }
 
 // Class with a single type parameter
 class B<T> {
-  T field;
+  T field1;
+  List<T> field2;
+  T Function(T) field3;
 }
 
 var TRUE = true;
@@ -22,9 +26,13 @@
   dynamic x = f ? new B<int>() : new A<String, int>();
   if (f == TRUE) {
     // Prevent constant folding by accessing a global
-    x.field = 10;
+    x.field1 = 10;
+    x.field2 = <int>[];
+    x.field3 = (int i) => ++i;
   } else {
-    x.field = 10;
+    x.field1 = 10;
+    x.field2 = <int>[];
+    x.field3 = (int i) => ++i;
   }
 }
 
diff --git a/runtime/tests/vm/dart/regress_35481_test.dart b/runtime/tests/vm/dart/regress_35481_test.dart
new file mode 100644
index 0000000..21fd2ed
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_35481_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test checking that inlines replacing binding instructions with non-binding
+// instructions do not cause the compiler to crash due to not appropriately
+// replacing uses of the original binding instruction.
+//
+// Here, all phi nodes generated within the try block are kept alive, and one of
+// the phi nodes within toList (which gets inlined) uses the value of an
+// instance call to setLength. Inlining setLength wthin toList replaced the
+// (binding) InstanceCall instruction with a (non-binding) StoreInstanceField
+// instruction, which caused the phi node to have an invalid SSA index argument.
+
+void foo() {
+  try {
+    for (var i = 0; i < 1000; i++) {
+      List(10).toList(growable: true);
+    }
+  } catch (e) {}
+}
+
+void main() {
+  foo();
+  foo();
+}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 219da39..dda2b1d 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -53,7 +53,16 @@
 dart/wrap_around_in_range_analysis_test: SkipByDesign # The test requires int64.
 
 [ $compiler != dartk || ($arch != x64 && $arch != simarm && $arch != arm) || $hot_reload || $hot_reload_rollback ]
-dart/entrypoints/*: SkipByDesign  # Only supported in the Dart 2 JIT and test optimizations - hence disabled on hotreload bots.
+dart/entrypoints/jit/*: SkipByDesign  # Only supported in the Dart 2 JIT and AOT, and test optimizations - hence disabled on hotreload bots.
+
+[ $compiler != dartkp || ($arch != x64 && $arch != simarm && $arch != arm) || $hot_reload || $hot_reload_rollback ]
+dart/entrypoints/aot/*: SkipByDesign  # Only supported in the Dart 2 JIT and AOT, and test optimizations - hence disabled on hotreload bots.
+
+[ ($compiler != dartk && $compiler != dartkp) || ($arch != x64 && $arch != simarm && $arch != arm) || $hot_reload || $hot_reload_rollback ]
+dart/entrypoints/*: SkipByDesign  # Only supported in the Dart 2 JIT and AOT, and test optimizations - hence disabled on hotreload bots.
+
+[ $compiler == dartk ]
+dart/entrypoints/aot/*: SkipByDesign
 
 [ ($compiler == dartk || $compiler == dartkb) ]
 cc/DartAPI_New: Fail # Issue #33041
@@ -70,7 +79,6 @@
 cc/IsolateReload_KernelIncrementalCompileGenerics: SkipByDesign
 cc/Mixin_PrivateSuperResolution: Skip
 cc/Mixin_PrivateSuperResolutionCrossLibraryShouldFail: Skip
-dart/appjit_determinism_test: Pass, Fail # Issue 31427 - Lingering non-determinism.
 
 [ $compiler == fasta ]
 dart/data_uri_import_test/badencodeddate: CompileTimeError
@@ -174,7 +182,6 @@
 cc/SourceReport_Coverage_UnusedClass_NoForceCompile: Fail
 cc/SourceReport_MultipleReports: Fail
 cc/SourceReport_PossibleBreakpoints_Simple: Fail
-cc/UseDartApi: Fail
 dart/data_uri_import_test/utf16: MissingRuntimeError
 dart/spawn_shutdown_test: SkipSlow
 
diff --git a/runtime/tools/create_archive.py b/runtime/tools/create_archive.py
index ebad9c9..fafbcfe 100755
--- a/runtime/tools/create_archive.py
+++ b/runtime/tools/create_archive.py
@@ -76,13 +76,14 @@
                 name,
                 tar_archive,
                 ):
-  cc_text = '''
+  with open(output_file, 'w') as out:
+    out.write('''
 // Copyright (c) %d, 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.
 
-''' % date.today().year
-  cc_text += '''
+''' % date.today().year)
+    out.write('''
 
 #if defined(_WIN32)
 typedef unsigned __int8 uint8_t;
@@ -92,31 +93,31 @@
 #endif
 #include <stddef.h>
 
-'''
-  cc_text += 'namespace %s {\n' % outer_namespace
-  if inner_namespace != None:
-    cc_text += 'namespace %s {\n' % inner_namespace
-  cc_text += '\n\n'
-  # Write the archive.
-  cc_text += 'static const uint8_t %s_[] = {\n   ' % name
-  lineCounter = 0
-  for byte in tar_archive:
-    cc_text += r" %d," % ord(byte)
-    lineCounter += 1
-    if lineCounter == 10:
-      cc_text += '\n   '
-      lineCounter = 0
-  if lineCounter != 0:
-    cc_text += '\n   '
-  cc_text += '\n};\n'
-  cc_text += '\nunsigned int %s_len = %d;\n' % (name, len(tar_archive))
-  cc_text += '\nconst uint8_t* %s = %s_;\n\n' % (name, name)
-  if inner_namespace != None:
-    cc_text += '}  // namespace %s\n' % inner_namespace
-  cc_text += '} // namespace %s\n' % outer_namespace
-
-  open(output_file, 'w').write(cc_text)
-
+''')
+    out.write('namespace %s {\n' % outer_namespace)
+    if inner_namespace != None:
+      out.write('namespace %s {\n' % inner_namespace)
+    out.write('\n\n')
+    # Write the byte contents of the archive as a comma separated list of
+    # integers, one integer for each byte.
+    out.write('static const uint8_t %s_[] = {\n' % name)
+    line = '   '
+    lineCounter = 0
+    for byte in tar_archive:
+      line += r" %d," % ord(byte)
+      lineCounter += 1
+      if lineCounter == 10:
+        out.write(line + '\n')
+        line = '   '
+        lineCounter = 0
+    if lineCounter != 0:
+      out.write(line + '\n')
+    out.write('};\n')
+    out.write('\nunsigned int %s_len = %d;\n' % (name, len(tar_archive)))
+    out.write('\nconst uint8_t* %s = %s_;\n\n' % (name, name))
+    if inner_namespace != None:
+      out.write('}  // namespace %s\n' % inner_namespace)
+    out.write('} // namespace %s\n' % outer_namespace)
 
 def MakeCCFile(options):
   if not options.output:
diff --git a/runtime/tools/create_snapshot_file.py b/runtime/tools/create_snapshot_file.py
index d31cc06..d862a45 100755
--- a/runtime/tools/create_snapshot_file.py
+++ b/runtime/tools/create_snapshot_file.py
@@ -4,14 +4,15 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-# Script to create snapshot files.
+# Script to convert snapshot files to a C++ file which can be compiled and
+# linked together with VM binary.
 
 import getopt
 import optparse
 import string
 import subprocess
 import sys
-import utils
+import google3.third_party.dart_lang.v2_1_1_dev_0_1.runtime.tools.utils as utils
 
 
 HOST_OS = utils.GuessOS()
@@ -54,28 +55,46 @@
   return True
 
 
-def makeString(input_file):
-  result = ' '
-  fileHandle = open(input_file, 'rb')
-  lineCounter = 0
-  for byte in fileHandle.read():
-    result += ' %d,' % ord(byte)
-    lineCounter += 1
-    if lineCounter == 10:
-      result += '\n   '
-      lineCounter = 0
-  if lineCounter != 0:
-    result += '\n   '
-  return result
+def WriteBytesAsText(out, input_file):
+  """Writes byte contents of the input_file into out file as text.
+
+  Output is formatted as a list of comma separated integer values - one value
+  for each byte.
+  """
+  with open(input_file, 'rb') as input:
+    lineCounter = 0
+    line = ' '
+    for byte in input.read():
+      line += ' %d,' % ord(byte)
+      lineCounter += 1
+      if lineCounter == 10:
+        out.write(line + '\n')
+        line = ' '
+        lineCounter = 0
+    if lineCounter != 0:
+      out.write(line + '\n')
 
 
-def makeFile(output_file, input_cc_file,
+def GenerateFileFromTemplate(output_file, input_cc_file,
              vm_isolate_input_file, isolate_input_file):
+  """Generates C++ file based on a input_cc_file template and two binary files
+
+  Template is expected to have two %s placehoders which would be filled
+  with binary contents of the given files each formatted as a comma separated
+  list of integers.
+  """
   snapshot_cc_text = open(input_cc_file).read()
-  snapshot_cc_text = snapshot_cc_text % (makeString(vm_isolate_input_file),
-                                         makeString(isolate_input_file))
-  open(output_file, 'w').write(snapshot_cc_text)
-  return True
+  chunks = snapshot_cc_text.split("%s")
+  if len(chunks) != 3:
+    raise Exception("Template %s should contain exactly two %%s occurrences"
+        % input_cc_file)
+
+  with open(output_file, 'w') as out:
+    out.write(chunks[0])
+    WriteBytesAsText(out, vm_isolate_input_file)
+    out.write(chunks[1])
+    WriteBytesAsText(out, isolate_input_file)
+    out.write(chunks[2])
 
 
 def Main():
@@ -91,10 +110,8 @@
     parser.print_help()
     return 1
 
-  if not makeFile(options.output, options.input_cc,
-                  options.vm_input_bin, options.input_bin):
-    print "Unable to generate snapshot in C buffer form"
-    return -1
+  GenerateFileFromTemplate(options.output, options.input_cc,
+                           options.vm_input_bin, options.input_bin)
 
   return 0
 
diff --git a/runtime/tools/dartfuzz/README.md b/runtime/tools/dartfuzz/README.md
index 3545739..ba3dfcc 100644
--- a/runtime/tools/dartfuzz/README.md
+++ b/runtime/tools/dartfuzz/README.md
@@ -50,19 +50,19 @@
     --dart-top        : sets DART_TOP explicitly through command line
     --mode1           : m1
     --mode2           : m2, and values one of
-        jit-[opt-][debug-]ia32  = Dart JIT (ia32)
-        jit-[opt-][debug-]x64   = Dart JIT (x64)
-        jit-[opt-][debug-]arm32 = Dart JIT (simarm)
-        jit-[opt-][debug-]arm64 = Dart JIT (simarm64)
-        jit-[opt-][debug-]dbc   = Dart JIT (simdbc)
-        jit-[opt-][debug-]dbc64 = Dart JIT (simdbc64)
-        aot-[debug-]x64         = Dart AOT (x64)
-        aot-[debug-]arm32       = Dart AOT (simarm)
-        aot-[debug-]arm64       = Dart AOT (simarm64)
-        kbc-int-[debug-]x64     = Dart KBC (interpreted bytecode)
-        kbc-mix-[debug-]x64     = Dart KBC (mixed-mode bytecode)
-        kbc-cmp-[debug-]x64     = Dart KBC (compiled bytecode)
-        js                      = dart2js + JS
+        jit-[stress-][debug-]ia32  = Dart JIT (ia32)
+        jit-[stress-][debug-]x64   = Dart JIT (x64)
+        jit-[stress-][debug-]arm32 = Dart JIT (simarm)
+        jit-[stress-][debug-]arm64 = Dart JIT (simarm64)
+        jit-[stress-][debug-]dbc   = Dart JIT (simdbc)
+        jit-[stress-][debug-]dbc64 = Dart JIT (simdbc64)
+        aot-[debug-]x64            = Dart AOT (x64)
+        aot-[debug-]arm32          = Dart AOT (simarm)
+        aot-[debug-]arm64          = Dart AOT (simarm64)
+        kbc-int-[debug-]x64        = Dart KBC (interpreted bytecode)
+        kbc-mix-[debug-]x64        = Dart KBC (mixed-mode bytecode)
+        kbc-cmp-[debug-]x64        = Dart KBC (compiled bytecode)
+        js-x64                     = dart2js + Node.JS
 
 If no modes are given, a random JIT and/or AOT combination is used.
 
diff --git a/runtime/tools/dartfuzz/dartfuzz.dart b/runtime/tools/dartfuzz/dartfuzz.dart
index d2986d7..0ad5858 100644
--- a/runtime/tools/dartfuzz/dartfuzz.dart
+++ b/runtime/tools/dartfuzz/dartfuzz.dart
@@ -7,6 +7,8 @@
 
 import 'package:args/args.dart';
 
+import 'dartfuzz_values.dart';
+
 // Version of DartFuzz. Increase this each time changes are made
 // to preserve the property that a given version of DartFuzz yields
 // the same fuzzed program for a deterministic random seed.
@@ -16,82 +18,6 @@
 const int stmtDepth = 5;
 const int exprDepth = 2;
 
-// Interesting integer values.
-const List<int> interestingIntegers = [
-  0x0000000000000000,
-  0x0000000000000001,
-  0x000000007fffffff,
-  0x0000000080000000,
-  0x0000000080000001,
-  0x00000000ffffffff,
-  0x0000000100000000,
-  0x0000000100000001,
-  0x000000017fffffff,
-  0x0000000180000000,
-  0x0000000180000001,
-  0x00000001ffffffff,
-  0x7fffffff00000000,
-  0x7fffffff00000001,
-  0x7fffffff7fffffff,
-  0x7fffffff80000000,
-  0x7fffffff80000001,
-  0x7fffffffffffffff,
-  0x8000000000000000,
-  0x8000000000000001,
-  0x800000007fffffff,
-  0x8000000080000000,
-  0x8000000080000001,
-  0x80000000ffffffff,
-  0x8000000100000000,
-  0x8000000100000001,
-  0x800000017fffffff,
-  0x8000000180000000,
-  0x8000000180000001,
-  0x80000001ffffffff,
-  0xffffffff00000000,
-  0xffffffff00000001,
-  0xffffffff7fffffff,
-  0xffffffff80000000,
-  0xffffffff80000001,
-  0xffffffffffffffff
-];
-
-// Interesting characters.
-const interestingChars =
-    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#&()+- ';
-
-// Class that represents Dart types.
-class DartType {
-  final String name;
-
-  const DartType._withName(this.name);
-
-  static const VOID = const DartType._withName('void');
-  static const BOOL = const DartType._withName('bool');
-  static const INT = const DartType._withName('int');
-  static const DOUBLE = const DartType._withName('double');
-  static const STRING = const DartType._withName('String');
-  static const INT_LIST = const DartType._withName('List<int>');
-  static const INT_STRING_MAP = const DartType._withName('Map<int, String>');
-}
-
-// All value types.
-const allTypes = [
-  DartType.BOOL,
-  DartType.INT,
-  DartType.DOUBLE,
-  DartType.STRING,
-  DartType.INT_LIST,
-  DartType.INT_STRING_MAP
-];
-
-// Class that represents Dart library methods.
-class DartLib {
-  final String name;
-  final List<DartType> proto;
-  const DartLib(this.name, this.proto);
-}
-
 // Naming conventions.
 const varName = 'var';
 const paramName = 'par';
@@ -112,7 +38,7 @@
     // Setup the types.
     localVars = new List<DartType>();
     globalVars = fillTypes1();
-    globalVars.addAll(allTypes); // always one each
+    globalVars.addAll(DartType.allTypes); // always one each
     globalMethods = fillTypes2();
     classFields = fillTypes2();
     classMethods = fillTypes3(classFields.length);
@@ -387,7 +313,7 @@
       // favors small positive int
       case 0:
         emit(
-            '${interestingIntegers[rand.nextInt(interestingIntegers.length)]}');
+            '${DartFuzzValues.interestingIntegers[rand.nextInt(DartFuzzValues.interestingIntegers.length)]}');
         break;
       case 1:
         emitSmallNegativeInt();
@@ -432,7 +358,8 @@
         emit('\\u{1f600}'); // rune
         break;
       default:
-        emit(interestingChars[rand.nextInt(interestingChars.length)]);
+        emit(DartFuzzValues.interestingChars[
+            rand.nextInt(DartFuzzValues.interestingChars.length)]);
         break;
     }
   }
@@ -607,7 +534,7 @@
       emitTerminal(tp); // resort to terminal
       return;
     }
-    DartLib lib = oneOf(getLibrary(tp));
+    DartLib lib = getLibraryMethod(tp);
     List<DartType> proto = lib.proto;
     // Receiver.
     if (proto[0] != null) {
@@ -786,93 +713,18 @@
   // Library methods.
   //
 
-  // Get list of library methods, organized by return type.
-  // Proto list:
-  //   [ receiver-type (null denotes none),
-  //     param1 type (null denotes getter),
-  //     param2 type,
-  //     ...
-  //   ]
-  List<DartLib> getLibrary(DartType tp) {
+  // Get a library method that returns given type.
+  DartLib getLibraryMethod(DartType tp) {
     if (tp == DartType.BOOL) {
-      return const [
-        DartLib('isEven', [DartType.INT, null]),
-        DartLib('isOdd', [DartType.INT, null]),
-        DartLib('isEmpty', [DartType.STRING, null]),
-        DartLib('isEmpty', [DartType.INT_STRING_MAP, null]),
-        DartLib('isNotEmpty', [DartType.STRING, null]),
-        DartLib('isNotEmpty', [DartType.INT_STRING_MAP, null]),
-        DartLib('endsWith', [DartType.STRING, DartType.STRING]),
-        DartLib('remove', [DartType.INT_LIST, DartType.INT]),
-        DartLib('containsValue', [DartType.INT_STRING_MAP, DartType.STRING]),
-        DartLib('containsKey', [DartType.INT_STRING_MAP, DartType.INT]),
-      ];
+      return oneOf(DartLib.boolLibs);
     } else if (tp == DartType.INT) {
-      return const [
-        DartLib('bitLength', [DartType.INT, null]),
-        DartLib('sign', [DartType.INT, null]),
-        DartLib('abs', [DartType.INT]),
-        DartLib('round', [DartType.INT]),
-        DartLib('round', [DartType.DOUBLE]),
-        DartLib('floor', [DartType.INT]),
-        DartLib('floor', [DartType.DOUBLE]),
-        DartLib('ceil', [DartType.INT]),
-        DartLib('ceil', [DartType.DOUBLE]),
-        DartLib('truncate', [DartType.INT]),
-        DartLib('truncate', [DartType.DOUBLE]),
-        DartLib('toInt', [DartType.DOUBLE]),
-        DartLib('toUnsigned', [DartType.INT, DartType.INT]),
-        DartLib('toSigned', [DartType.INT, DartType.INT]),
-        DartLib('modInverse', [DartType.INT, DartType.INT]),
-        DartLib('modPow', [DartType.INT, DartType.INT, DartType.INT]),
-        DartLib('length', [DartType.STRING, null]),
-        DartLib('length', [DartType.INT_LIST, null]),
-        DartLib('length', [DartType.INT_STRING_MAP, null]),
-        DartLib('codeUnitAt', [DartType.STRING, DartType.INT]),
-        DartLib('compareTo', [DartType.STRING, DartType.STRING]),
-        DartLib('removeLast', [DartType.INT_LIST]),
-        DartLib('removeAt', [DartType.INT_LIST, DartType.INT]),
-        DartLib('indexOf', [DartType.INT_LIST, DartType.INT]),
-        DartLib('lastIndexOf', [DartType.INT_LIST, DartType.INT]),
-      ];
+      return oneOf(DartLib.intLibs);
     } else if (tp == DartType.DOUBLE) {
-      return const [
-        DartLib('sign', [DartType.DOUBLE, null]),
-        DartLib('abs', [DartType.DOUBLE]),
-        DartLib('toDouble', [DartType.INT]),
-        DartLib('roundToDouble', [DartType.INT]),
-        DartLib('roundToDouble', [DartType.DOUBLE]),
-        DartLib('floorToDouble', [DartType.INT]),
-        DartLib('floorToDouble', [DartType.DOUBLE]),
-        DartLib('ceilToDouble', [DartType.INT]),
-        DartLib('ceilToDouble', [DartType.DOUBLE]),
-        DartLib('truncateToDouble', [DartType.INT]),
-        DartLib('truncateToDouble', [DartType.DOUBLE]),
-        DartLib('remainder', [DartType.DOUBLE, DartType.DOUBLE]),
-      ];
+      return oneOf(DartLib.doubleLibs);
     } else if (tp == DartType.STRING) {
-      return const [
-        DartLib('toString', [DartType.BOOL]),
-        DartLib('toString', [DartType.INT]),
-        DartLib('toString', [DartType.DOUBLE]),
-        DartLib('toRadixString', [DartType.INT, DartType.INT]),
-        DartLib('trim', [DartType.STRING]),
-        DartLib('trimLeft', [DartType.STRING]),
-        DartLib('trimRight', [DartType.STRING]),
-        DartLib('toLowerCase', [DartType.STRING]),
-        DartLib('toUpperCase', [DartType.STRING]),
-        DartLib('substring', [DartType.STRING, DartType.INT]),
-        DartLib('replaceRange',
-            [DartType.STRING, DartType.INT, DartType.INT, DartType.STRING]),
-        DartLib('remove', [DartType.INT_STRING_MAP, DartType.INT]),
-        // Avoid (OOM divergences, unless we restrict parameters):
-        // DartLib('padLeft', [DartType.STRING, DartType.INT]),
-        // DartLib('padRight', [DartType.STRING, DartType.INT]),
-      ];
+      return oneOf(DartLib.stringLibs);
     } else if (tp == DartType.INT_LIST) {
-      return const [
-        DartLib('sublist', [DartType.INT_LIST, DartType.INT])
-      ];
+      return oneOf(DartLib.intListLibs);
     } else {
       assert(false);
     }
diff --git a/runtime/tools/dartfuzz/dartfuzz_test.dart b/runtime/tools/dartfuzz/dartfuzz_test.dart
index 35d9a56..06545ca 100644
--- a/runtime/tools/dartfuzz/dartfuzz_test.dart
+++ b/runtime/tools/dartfuzz/dartfuzz_test.dart
@@ -49,18 +49,40 @@
   String description;
 
   // Factory.
-  static TestRunner getTestRunner(
-      String mode, String top, String tmp, Map<String, String> env) {
-    if (mode.startsWith('jit-opt'))
-      return new TestRunnerJIT(
-          getTag(mode), top, tmp, env, ['--optimization_counter_threshold=1']);
+  static TestRunner getTestRunner(String mode, String top, String tmp,
+      Map<String, String> env, Random rand) {
+    String tag = getTag(mode);
+    if (mode.startsWith('jit-stress'))
+      switch (rand.nextInt(6)) {
+        case 0:
+          return new TestRunnerJIT('JIT-NOFIELDGUARDS', tag, top, tmp, env,
+              ['--use_field_guards=false']);
+        case 1:
+          return new TestRunnerJIT(
+              'JIT-NOINTRINSIFY', tag, top, tmp, env, ['--intrinsify=false']);
+        case 2:
+          return new TestRunnerJIT('JIT-COMPACTEVERY', tag, top, tmp, env,
+              ['--gc_every=1000', '--use_compactor=true']);
+        case 3:
+          return new TestRunnerJIT('JIT-MARKSWEEPEVERY', tag, top, tmp, env,
+              ['--gc_every=1000', '--use_compactor=false']);
+        case 4:
+          return new TestRunnerJIT('JIT-DEPOPTEVERY', tag, top, tmp, env,
+              ['--deoptimize_every=100']);
+        case 5:
+          return new TestRunnerJIT('JIT-STACKTRACEEVERY', tag, top, tmp, env,
+              ['--stacktrace_every=100']);
+        case 6:
+          // Crashes (https://github.com/dart-lang/sdk/issues/35196):
+          return new TestRunnerJIT('JIT-OPTCOUNTER', tag, top, tmp, env,
+              ['--optimization_counter_threshold=1']);
+      }
     if (mode.startsWith('jit'))
-      return new TestRunnerJIT(getTag(mode), top, tmp, env, []);
-    if (mode.startsWith('aot'))
-      return new TestRunnerAOT(getTag(mode), top, tmp, env);
+      return new TestRunnerJIT('JIT', tag, top, tmp, env, []);
+    if (mode.startsWith('aot')) return new TestRunnerAOT(tag, top, tmp, env);
     if (mode.startsWith('kbc'))
-      return new TestRunnerKBC(mode, getTag(mode), top, tmp, env);
-    if (mode.startsWith('js')) return new TestRunnerJS(top, tmp, env);
+      return new TestRunnerKBC(mode, tag, top, tmp, env);
+    if (mode.startsWith('js')) return new TestRunnerJS(tag, top, tmp, env);
     throw ('unknown runner in mode: $mode');
   }
 
@@ -84,13 +106,13 @@
 
 /// Concrete test runner of Dart JIT.
 class TestRunnerJIT implements TestRunner {
-  TestRunnerJIT(String tag, String top, String tmp, Map<String, String> e,
-      List<String> extra_flags) {
-    description = extra_flags.length == 0 ? 'JIT-${tag}' : 'JIT-OPT-${tag}';
+  TestRunnerJIT(String prefix, String tag, String top, String tmp,
+      Map<String, String> e, List<String> extra_flags) {
+    description = '$prefix-$tag';
     dart = '$top/out/$tag/dart';
     fileName = '$tmp/fuzz.dart';
     env = e;
-    cmd = [dart] + extra_flags + [fileName];
+    cmd = [dart, "--deterministic"] + extra_flags + [fileName];
   }
 
   TestResult run() {
@@ -179,9 +201,9 @@
 
 /// Concrete test runner of Dart2JS.
 class TestRunnerJS implements TestRunner {
-  TestRunnerJS(String top, String tmp, Map<String, String> e) {
-    description = 'Dart2JS';
-    dart2js = '$top/out/ReleaseX64/dart-sdk/bin/dart2js';
+  TestRunnerJS(String tag, String top, String tmp, Map<String, String> e) {
+    description = 'Dart2JS-$tag';
+    dart2js = '$top/sdk/bin/dart2js';
     fileName = '$tmp/fuzz.dart';
     js = '$tmp/out.js';
     env = e;
@@ -241,8 +263,8 @@
     rand = new Random();
     tmpDir = Directory.systemTemp.createTempSync('dart_fuzz');
     fileName = '${tmpDir.path}/fuzz.dart';
-    runner1 = TestRunner.getTestRunner(mode1, top, tmpDir.path, env);
-    runner2 = TestRunner.getTestRunner(mode2, top, tmpDir.path, env);
+    runner1 = TestRunner.getTestRunner(mode1, top, tmpDir.path, env, rand);
+    runner2 = TestRunner.getTestRunner(mode2, top, tmpDir.path, env, rand);
     isolate = 'Isolate (${tmpDir.path}) '
         '${runner1.description} - ${runner2.description}';
 
@@ -464,10 +486,9 @@
     // Random when not set.
     if (mode == null || mode == '') {
       // Pick a mode at random (cluster), different from other.
-      int cluster_modes = modes.indexOf('aot-debug-arm32');
       Random rand = new Random();
       do {
-        mode = modes[rand.nextInt(cluster_modes)];
+        mode = clusterModes[rand.nextInt(clusterModes.length)];
       } while (mode == other);
     }
     // Verify mode.
@@ -490,9 +511,8 @@
   // Passes each port to isolate.
   SendPort port;
 
-  // Supported modes.
-  static const List<String> modes = [
-    // Cluster options:
+  // Modes used on cluster runs.
+  static const List<String> clusterModes = [
     'jit-debug-ia32',
     'jit-debug-x64',
     'jit-debug-arm32',
@@ -505,6 +525,18 @@
     'jit-arm64',
     'jit-dbc',
     'jit-dbc64',
+    'jit-stress-debug-ia32',
+    'jit-stress-debug-x64',
+    'jit-stress-debug-arm32',
+    'jit-stress-debug-arm64',
+    'jit-stress-debug-dbc',
+    'jit-stress-debug-dbc64',
+    'jit-stress-ia32',
+    'jit-stress-x64',
+    'jit-stress-arm32',
+    'jit-stress-arm64',
+    'jit-stress-dbc',
+    'jit-stress-dbc64',
     'aot-debug-x64',
     'aot-x64',
     'kbc-int-debug-x64',
@@ -513,30 +545,21 @@
     'kbc-int-x64',
     'kbc-cmp-x64',
     'kbc-mix-x64',
+  ];
+
+  // Modes not used on cluster runs because they have outstanding issues.
+  static const List<String> nonClusterModes = [
     // Times out often:
     'aot-debug-arm32',
     'aot-debug-arm64',
     'aot-arm32',
     'aot-arm64',
     // Too many divergences (due to arithmetic):
-    'js',
-    // https://github.com/dart-lang/sdk/issues/35196
-    'jit-opt-debug-ia32',
-    'jit-opt-debug-x64',
-    'jit-opt-debug-arm32',
-    'jit-opt-debug-arm64',
-    'jit-opt-debug-dbc',
-    'jit-opt-debug-dbc64',
-    'jit-opt-ia32',
-    'jit-opt-x64',
-    'jit-opt-arm32',
-    'jit-opt-arm64',
-    'jit-opt-dbc',
-    'jit-opt-dbc64',
-    // Not supported:
-    'aot-debug-ia32',
-    'aot-ia32',
+    'js-x64',
   ];
+
+  // All modes.
+  static List<String> modes = clusterModes + nonClusterModes;
 }
 
 /// Main driver for a fuzz testing session.
diff --git a/runtime/tools/dartfuzz/dartfuzz_values.dart b/runtime/tools/dartfuzz/dartfuzz_values.dart
new file mode 100644
index 0000000..e19e301
--- /dev/null
+++ b/runtime/tools/dartfuzz/dartfuzz_values.dart
@@ -0,0 +1,167 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Class that represents some common Dart types.
+///
+/// TODO(ajcbik): generalize
+///
+class DartType {
+  final String name;
+
+  const DartType._withName(this.name);
+
+  static const VOID = const DartType._withName('void');
+  static const BOOL = const DartType._withName('bool');
+  static const INT = const DartType._withName('int');
+  static const DOUBLE = const DartType._withName('double');
+  static const STRING = const DartType._withName('String');
+  static const INT_LIST = const DartType._withName('List<int>');
+  static const INT_STRING_MAP = const DartType._withName('Map<int, String>');
+
+  // All value types.
+  static const allTypes = [BOOL, INT, DOUBLE, STRING, INT_LIST, INT_STRING_MAP];
+}
+
+/// Class with interesting values for fuzzing.
+class DartFuzzValues {
+  // Interesting characters.
+  static const interestingChars =
+      'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#&()+- ';
+
+  // Interesting integer values.
+  static const List<int> interestingIntegers = [
+    0x0000000000000000,
+    0x0000000000000001,
+    0x000000007fffffff,
+    0x0000000080000000,
+    0x0000000080000001,
+    0x00000000ffffffff,
+    0x0000000100000000,
+    0x0000000100000001,
+    0x000000017fffffff,
+    0x0000000180000000,
+    0x0000000180000001,
+    0x00000001ffffffff,
+    0x7fffffff00000000,
+    0x7fffffff00000001,
+    0x7fffffff7fffffff,
+    0x7fffffff80000000,
+    0x7fffffff80000001,
+    0x7fffffffffffffff,
+    0x8000000000000000,
+    0x8000000000000001,
+    0x800000007fffffff,
+    0x8000000080000000,
+    0x8000000080000001,
+    0x80000000ffffffff,
+    0x8000000100000000,
+    0x8000000100000001,
+    0x800000017fffffff,
+    0x8000000180000000,
+    0x8000000180000001,
+    0x80000001ffffffff,
+    0xffffffff00000000,
+    0xffffffff00000001,
+    0xffffffff7fffffff,
+    0xffffffff80000000,
+    0xffffffff80000001,
+    0xffffffffffffffff
+  ];
+}
+
+/// Class that represents Dart library methods.
+/// The invididual lists are organized by return type.
+/// Proto list:
+///   [ receiver-type (null denotes none),
+///     param1 type (null denotes getter),
+///     param2 type,
+///     ...
+///   ]
+///
+/// TODO(ajcbik): generate these lists automatically
+///
+class DartLib {
+  final String name;
+  final List<DartType> proto;
+  const DartLib(this.name, this.proto);
+
+  static const boolLibs = [
+    DartLib('isEven', [DartType.INT, null]),
+    DartLib('isOdd', [DartType.INT, null]),
+    DartLib('isEmpty', [DartType.STRING, null]),
+    DartLib('isEmpty', [DartType.INT_STRING_MAP, null]),
+    DartLib('isNotEmpty', [DartType.STRING, null]),
+    DartLib('isNotEmpty', [DartType.INT_STRING_MAP, null]),
+    DartLib('endsWith', [DartType.STRING, DartType.STRING]),
+    DartLib('remove', [DartType.INT_LIST, DartType.INT]),
+    DartLib('containsValue', [DartType.INT_STRING_MAP, DartType.STRING]),
+    DartLib('containsKey', [DartType.INT_STRING_MAP, DartType.INT]),
+  ];
+
+  static const intLibs = [
+    DartLib('bitLength', [DartType.INT, null]),
+    DartLib('sign', [DartType.INT, null]),
+    DartLib('abs', [DartType.INT]),
+    DartLib('round', [DartType.INT]),
+    DartLib('round', [DartType.DOUBLE]),
+    DartLib('floor', [DartType.INT]),
+    DartLib('floor', [DartType.DOUBLE]),
+    DartLib('ceil', [DartType.INT]),
+    DartLib('ceil', [DartType.DOUBLE]),
+    DartLib('truncate', [DartType.INT]),
+    DartLib('truncate', [DartType.DOUBLE]),
+    DartLib('toInt', [DartType.DOUBLE]),
+    DartLib('toUnsigned', [DartType.INT, DartType.INT]),
+    DartLib('toSigned', [DartType.INT, DartType.INT]),
+    DartLib('modInverse', [DartType.INT, DartType.INT]),
+    DartLib('modPow', [DartType.INT, DartType.INT, DartType.INT]),
+    DartLib('length', [DartType.STRING, null]),
+    DartLib('length', [DartType.INT_LIST, null]),
+    DartLib('length', [DartType.INT_STRING_MAP, null]),
+    DartLib('codeUnitAt', [DartType.STRING, DartType.INT]),
+    DartLib('compareTo', [DartType.STRING, DartType.STRING]),
+    DartLib('removeLast', [DartType.INT_LIST]),
+    DartLib('removeAt', [DartType.INT_LIST, DartType.INT]),
+    DartLib('indexOf', [DartType.INT_LIST, DartType.INT]),
+    DartLib('lastIndexOf', [DartType.INT_LIST, DartType.INT]),
+  ];
+
+  static const doubleLibs = [
+    DartLib('sign', [DartType.DOUBLE, null]),
+    DartLib('abs', [DartType.DOUBLE]),
+    DartLib('toDouble', [DartType.INT]),
+    DartLib('roundToDouble', [DartType.INT]),
+    DartLib('roundToDouble', [DartType.DOUBLE]),
+    DartLib('floorToDouble', [DartType.INT]),
+    DartLib('floorToDouble', [DartType.DOUBLE]),
+    DartLib('ceilToDouble', [DartType.INT]),
+    DartLib('ceilToDouble', [DartType.DOUBLE]),
+    DartLib('truncateToDouble', [DartType.INT]),
+    DartLib('truncateToDouble', [DartType.DOUBLE]),
+    DartLib('remainder', [DartType.DOUBLE, DartType.DOUBLE]),
+  ];
+
+  static const stringLibs = [
+    DartLib('toString', [DartType.BOOL]),
+    DartLib('toString', [DartType.INT]),
+    DartLib('toString', [DartType.DOUBLE]),
+    DartLib('toRadixString', [DartType.INT, DartType.INT]),
+    DartLib('trim', [DartType.STRING]),
+    DartLib('trimLeft', [DartType.STRING]),
+    DartLib('trimRight', [DartType.STRING]),
+    DartLib('toLowerCase', [DartType.STRING]),
+    DartLib('toUpperCase', [DartType.STRING]),
+    DartLib('substring', [DartType.STRING, DartType.INT]),
+    DartLib('replaceRange',
+        [DartType.STRING, DartType.INT, DartType.INT, DartType.STRING]),
+    DartLib('remove', [DartType.INT_STRING_MAP, DartType.INT]),
+    // Avoid (OOM divergences, TODO(ajcbik): restrict parameters)
+    // DartLib('padLeft', [DartType.STRING, DartType.INT]),
+    // DartLib('padRight', [DartType.STRING, DartType.INT]),
+  ];
+
+  static const intListLibs = [
+    DartLib('sublist', [DartType.INT_LIST, DartType.INT])
+  ];
+}
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 60078c6..c3e1db3 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -240,7 +240,6 @@
 // Measure invocation of Dart API functions.
 //
 static void InitNativeFields(Dart_NativeArguments args) {
-  Dart_EnterScope();
   int count = Dart_GetNativeArgumentCount(args);
   EXPECT_EQ(1, count);
 
@@ -248,8 +247,6 @@
   EXPECT_VALID(recv);
   Dart_Handle result = Dart_SetNativeInstanceField(recv, 0, 7);
   EXPECT_VALID(result);
-
-  Dart_ExitScope();
 }
 
 // The specific api functions called here are a bit arbitrary.  We are
@@ -300,7 +297,8 @@
 BENCHMARK(UseDartApi) {
   const int kNumIterations = 1000000;
   const char* kScriptChars =
-      "class Class extends NativeFieldsWrapper{\n"
+      "import 'dart:nativewrappers';\n"
+      "class Class extends NativeFieldWrapperClass1 {\n"
       "  int init() native 'init';\n"
       "  int method(int param1, int param2) native 'method';\n"
       "}\n"
@@ -316,12 +314,7 @@
   Dart_Handle lib = TestCase::LoadTestScript(
       kScriptChars, reinterpret_cast<Dart_NativeEntryResolver>(bm_uda_lookup),
       USER_TEST_URI, false);
-
-  // Create a native wrapper class with native fields.
-  Dart_Handle result =
-      Dart_CreateNativeWrapperClass(lib, NewString("NativeFieldsWrapper"), 1);
-  EXPECT_VALID(result);
-  result = Dart_FinalizeLoading(false);
+  Dart_Handle result = Dart_FinalizeLoading(false);
   EXPECT_VALID(result);
 
   Dart_Handle args[1];
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index 37d6578..fc59b64 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -48,7 +48,7 @@
   ObjectStore* object_store = thread->isolate()->object_store();
   Zone* zone = thread->zone();
   Class& cls = Class::Handle(zone, object_store->closure_class());
-  Compiler::CompileClass(cls);
+  ClassFinalizer::LoadClassMembers(cls);
 
 #if defined(DEBUG)
   // Verify that closure field offsets are identical in Dart and C++.
@@ -71,7 +71,7 @@
 
   // Eagerly compile Bool class, bool constants are used from within compiler.
   cls = object_store->bool_class();
-  Compiler::CompileClass(cls);
+  ClassFinalizer::LoadClassMembers(cls);
 }
 
 static RawError* BootstrapFromKernel(Thread* thread,
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 929dc6c..551784d 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -156,7 +156,7 @@
   V(StackTrace_clearAsyncThreadStackTrace, 0)                                  \
   V(StackTrace_setAsyncThreadStackTrace, 1)                                    \
   V(StackTrace_current, 0)                                                     \
-  V(TypeError_throwNew, 5)                                                     \
+  V(TypeError_throwNew, 4)                                                     \
   V(FallThroughError_throwNew, 1)                                              \
   V(AbstractClassInstantiationError_throwNew, 2)                               \
   V(Stopwatch_now, 0)                                                          \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index f578339..00a16a7 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -85,7 +85,7 @@
   AbstractType& super_type = Type::Handle();
   super_type = cls.super_type();
   if (!super_type.IsNull()) {
-    if (!super_type.IsMalformed() && super_type.HasTypeClass()) {
+    if (super_type.HasTypeClass()) {
       cls ^= super_type.type_class();
       if (cls.is_finalized()) {
         AddSuperType(super_type, finalized_super_classes);
@@ -155,7 +155,6 @@
   AbstractType& type = AbstractType::Handle();
   for (intptr_t i = 0; i < interfaces.Length(); ++i) {
     type ^= interfaces.At(i);
-    if (type.IsMalformed()) continue;
     if (!type.HasTypeClass()) continue;
     ifc ^= type.type_class();
     for (intptr_t j = 0; j < cids->length(); ++j) {
@@ -193,11 +192,11 @@
     class_array = object_store->pending_classes();
     ASSERT(!class_array.IsNull());
     Class& cls = Class::Handle();
-    // First resolve all superclasses.
+    // First check all superclasses.
     for (intptr_t i = 0; i < class_array.Length(); i++) {
       cls ^= class_array.At(i);
       GrowableArray<intptr_t> visited_interfaces;
-      ResolveSuperTypeAndInterfaces(cls, &visited_interfaces);
+      CheckSuperTypeAndInterfaces(cls, &visited_interfaces);
     }
     // Finalize all classes.
     for (intptr_t i = 0; i < class_array.Length(); i++) {
@@ -224,22 +223,6 @@
   return true;
 }
 
-// Adds all interfaces of cls into 'collected'. Duplicate entries may occur.
-// No cycles are allowed.
-void ClassFinalizer::CollectInterfaces(const Class& cls,
-                                       GrowableArray<const Class*>* collected) {
-  Zone* zone = Thread::Current()->zone();
-  const Array& interface_array = Array::Handle(zone, cls.interfaces());
-  AbstractType& interface = AbstractType::Handle(zone);
-  Class& interface_class = Class::Handle(zone);
-  for (intptr_t i = 0; i < interface_array.Length(); i++) {
-    interface ^= interface_array.At(i);
-    interface_class = interface.type_class();
-    collected->Add(&Class::ZoneHandle(zone, interface_class.raw()));
-    CollectInterfaces(interface_class, collected);
-  }
-}
-
 #if !defined(DART_PRECOMPILED_RUNTIME)
 void ClassFinalizer::VerifyBootstrapClasses() {
   if (FLAG_trace_class_finalization) {
@@ -308,275 +291,12 @@
 }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
-void ClassFinalizer::ResolveRedirectingFactory(const Class& cls,
-                                               const Function& factory) {
-  const Function& target = Function::Handle(factory.RedirectionTarget());
-  if (target.IsNull()) {
-    Type& type = Type::Handle(factory.RedirectionType());
-    if (!type.IsMalformed()) {
-      const GrowableObjectArray& visited_factories =
-          GrowableObjectArray::Handle(GrowableObjectArray::New());
-      ResolveRedirectingFactoryTarget(cls, factory, visited_factories);
-    }
-    if (factory.is_const()) {
-      type = factory.RedirectionType();
-      if (type.IsMalformedOrMalbounded()) {
-        ReportError(Error::Handle(type.error()));
-      }
-    }
-  }
-}
-
-void ClassFinalizer::ResolveRedirectingFactoryTarget(
-    const Class& cls,
-    const Function& factory,
-    const GrowableObjectArray& visited_factories) {
-  ASSERT(factory.IsRedirectingFactory());
-
-  // Check for redirection cycle.
-  for (intptr_t i = 0; i < visited_factories.Length(); i++) {
-    if (visited_factories.At(i) == factory.raw()) {
-      // A redirection cycle is reported as a compile-time error.
-      ReportError(cls, factory.token_pos(),
-                  "factory '%s' illegally redirects to itself",
-                  String::Handle(factory.name()).ToCString());
-    }
-  }
-  visited_factories.Add(factory);
-
-  // Check if target is already resolved.
-  Type& type = Type::Handle(factory.RedirectionType());
-  Function& target = Function::Handle(factory.RedirectionTarget());
-  if (type.IsMalformedOrMalbounded()) {
-    // Already resolved to a malformed or malbounded type. Will throw on usage.
-    ASSERT(target.IsNull());
-    return;
-  }
-  if (!target.IsNull()) {
-    // Already resolved.
-    return;
-  }
-
-  // Target is not resolved yet.
-  if (FLAG_trace_class_finalization) {
-    THR_Print("Resolving redirecting factory: %s\n",
-              String::Handle(factory.name()).ToCString());
-  }
-  type ^= FinalizeType(cls, type);
-  factory.SetRedirectionType(type);
-  if (type.IsMalformedOrMalbounded()) {
-    ASSERT(factory.RedirectionTarget() == Function::null());
-    return;
-  }
-  ASSERT(!type.IsTypeParameter());  // Resolved in parser.
-  if (type.IsDynamicType()) {
-    // Replace the type with a malformed type and compile a throw when called.
-    type = NewFinalizedMalformedType(Error::Handle(),  // No previous error.
-                                     Script::Handle(cls.script()),
-                                     factory.token_pos(),
-                                     "factory may not redirect to 'dynamic'");
-    factory.SetRedirectionType(type);
-    ASSERT(factory.RedirectionTarget() == Function::null());
-    return;
-  }
-  const Class& target_class = Class::Handle(type.type_class());
-  String& target_class_name = String::Handle(target_class.Name());
-  String& target_name =
-      String::Handle(String::Concat(target_class_name, Symbols::Dot()));
-  const String& identifier = String::Handle(factory.RedirectionIdentifier());
-  if (!identifier.IsNull()) {
-    target_name = String::Concat(target_name, identifier);
-  }
-
-  // Verify that the target constructor of the redirection exists.
-  target = target_class.LookupConstructor(target_name);
-  if (target.IsNull()) {
-    target = target_class.LookupFactory(target_name);
-  }
-  if (target.IsNull()) {
-    const String& user_visible_target_name =
-        identifier.IsNull() ? target_class_name : target_name;
-    // Replace the type with a malformed type and compile a throw when called.
-    type = NewFinalizedMalformedType(
-        Error::Handle(),  // No previous error.
-        Script::Handle(target_class.script()), factory.token_pos(),
-        "class '%s' has no constructor or factory named '%s'",
-        target_class_name.ToCString(), user_visible_target_name.ToCString());
-    factory.SetRedirectionType(type);
-    ASSERT(factory.RedirectionTarget() == Function::null());
-    return;
-  }
-
-  // Verify that the target is const if the redirecting factory is const.
-  if (factory.is_const() && !target.is_const()) {
-    ReportError(target_class, target.token_pos(),
-                "constructor '%s' must be const as required by "
-                "redirecting const factory '%s'",
-                String::Handle(target.name()).ToCString(),
-                String::Handle(factory.name()).ToCString());
-  }
-
-  // Update redirection data with resolved target.
-  factory.SetRedirectionTarget(target);
-  // Not needed anymore.
-  factory.SetRedirectionIdentifier(Object::null_string());
-  if (!target.IsRedirectingFactory()) {
-    return;
-  }
-
-  // The target is itself a redirecting factory. Recursively resolve its own
-  // target and update the current redirection data to point to the end target
-  // of the redirection chain.
-  ResolveRedirectingFactoryTarget(target_class, target, visited_factories);
-  Type& target_type = Type::Handle(target.RedirectionType());
-  Function& target_target = Function::Handle(target.RedirectionTarget());
-  if (target_target.IsNull()) {
-    ASSERT(target_type.IsMalformed());
-  } else {
-    // If the target type refers to type parameters, substitute them with the
-    // type arguments of the redirection type.
-    if (!target_type.IsInstantiated()) {
-      // We do not support generic constructors.
-      ASSERT(target_type.IsInstantiated(kFunctions));
-      const TypeArguments& type_args = TypeArguments::Handle(type.arguments());
-      Error& bound_error = Error::Handle();
-      target_type ^= target_type.InstantiateFrom(
-          type_args, Object::null_type_arguments(), kNoneFree, &bound_error,
-          NULL, NULL, Heap::kOld);
-      if (bound_error.IsNull()) {
-        target_type ^= FinalizeType(cls, target_type);
-      } else {
-        ASSERT(target_type.IsInstantiated() && type_args.IsInstantiated());
-        const Script& script = Script::Handle(target_class.script());
-        FinalizeMalformedType(bound_error, script, target_type,
-                              "cannot resolve redirecting factory");
-        target_target = Function::null();
-      }
-    }
-  }
-  factory.SetRedirectionType(target_type);
-  factory.SetRedirectionTarget(target_target);
-}
-
-void ClassFinalizer::ResolveTypeClass(const Class& cls, const Type& type) {
-  if (type.IsFinalized()) {
-    return;
-  }
-  if (FLAG_trace_type_finalization) {
-    THR_Print("Resolve type class of '%s'\n",
-              String::Handle(type.Name()).ToCString());
-  }
-
-  // Type parameters are always resolved in the parser in the correct
-  // non-static scope or factory scope. That resolution scope is unknown here.
-  // Being able to resolve a type parameter from class cls here would indicate
-  // that the type parameter appeared in a static scope. Leaving the type as
-  // unresolved is the correct thing to do.
-
-  // Lookup the type class if necessary.
-  Class& type_class = Class::Handle(type.type_class());
-  // Promote the type to a function type in case its type class is a typedef.
-  // Note that the type may already be a function type if it was parsed as a
-  // formal parameter function type.
-  if (!type.IsFunctionType() && type_class.IsTypedefClass() &&
-      !type.IsMalformedOrMalbounded()) {
-    type.set_signature(Function::Handle(type_class.signature_function()));
-  }
-  ASSERT(!type_class.IsTypedefClass() ||
-         (type.signature() != Function::null()));
-}
-
-void ClassFinalizer::ResolveType(const Class& cls, const AbstractType& type) {
-  if (type.IsResolved()) {
-    return;
-  }
-  if (FLAG_trace_type_finalization) {
-    THR_Print("Resolve type '%s'\n", String::Handle(type.Name()).ToCString());
-  }
-  if (type.IsType()) {
-    ResolveTypeClass(cls, Type::Cast(type));
-    if (type.IsMalformed()) {
-      ASSERT(type.IsResolved());
-      return;
-    }
-  }
-  // Mark type as resolved before resolving its type arguments and, in case of a
-  // function type, its signature, in order to avoid cycles.
-  type.SetIsResolved();
-  // Resolve type arguments, if any.
-  const TypeArguments& arguments = TypeArguments::Handle(type.arguments());
-  if (!arguments.IsNull()) {
-    const intptr_t num_arguments = arguments.Length();
-    AbstractType& type_argument = AbstractType::Handle();
-    for (intptr_t i = 0; i < num_arguments; i++) {
-      type_argument = arguments.TypeAt(i);
-      ResolveType(cls, type_argument);
-    }
-  }
-  // Resolve signature if function type.
-  if (type.IsFunctionType()) {
-    const Function& signature = Function::Handle(Type::Cast(type).signature());
-    Type& signature_type = Type::Handle(signature.SignatureType());
-    if (signature_type.raw() != type.raw()) {
-      // This type was promoted to a function type because its type class is a
-      // typedef class. The promotion is achieved by assigning the signature
-      // function of the typedef class to this type. This function is pointing
-      // to the original typedef function type, which is not this type.
-      // By resolving the typedef function type (which may already be resolved,
-      // hence saving work), we will resolve the shared signature function.
-      ASSERT(Class::Handle(type.type_class()).IsTypedefClass());
-      ResolveType(cls, signature_type);
-    } else {
-      const Class& scope_class = Class::Handle(type.type_class());
-      if (scope_class.IsTypedefClass()) {
-        // This type is the original function type of the typedef class.
-        ResolveSignature(scope_class, signature);
-      } else {
-        ASSERT(scope_class.IsClosureClass());
-        ResolveSignature(cls, signature);
-        ASSERT(type.arguments() == TypeArguments::null());
-        if (signature.IsSignatureFunction()) {
-          // Drop fields that are not necessary anymore after resolution.
-          // The parent function, owner, and token position of a shared
-          // canonical function type are meaningless, since the canonical
-          // representent is picked arbitrarily.
-          // The parent function is however still required to finalize function
-          // type parameters when the function has a generic parent.
-          if (!signature.HasGenericParent()) {
-            signature.set_parent_function(Function::Handle());
-          }
-          // TODO(regis): As long as we support metadata in typedef signatures,
-          // we cannot reset these fields used to reparse a typedef.
-          // Note that the scope class of a typedef function type is always
-          // preserved as the typedef class (not reset to _Closure class),
-          // thereby preventing sharing of canonical function types between
-          // typedefs. Not being shared, these fields are therefore always
-          // meaningful for typedefs.
-          if (!scope_class.IsTypedefClass()) {
-            signature.set_owner(Object::Handle());
-            signature.set_token_pos(TokenPosition::kNoSource);
-          }
-        }
-      }
-    }
-  }
-
-  // After resolving, we re-initialize the type testing stub.
-  type.SetTypeTestingStub(
-      Instructions::Handle(TypeTestingStubGenerator::DefaultCodeForType(type)));
-}
-
 void ClassFinalizer::FinalizeTypeParameters(const Class& cls,
                                             PendingTypes* pending_types) {
   if (FLAG_trace_type_finalization) {
     THR_Print("Finalizing type parameters of '%s'\n",
               String::Handle(cls.Name()).ToCString());
   }
-  if (cls.IsMixinApplication()) {
-    // Setup the type parameters of the mixin application and finalize the
-    // mixin type.
-    ApplyMixinType(cls, pending_types);
-  }
   // The type parameter bounds are not finalized here.
   const TypeArguments& type_parameters =
       TypeArguments::Handle(cls.type_parameters());
@@ -657,16 +377,14 @@
           !pending_arguments.IsSubvectorInstantiated(first_type_param,
                                                      num_type_params)) {
         const TypeArguments& instantiated_arguments = TypeArguments::Handle(
-            zone,
-            arguments.InstantiateFrom(Object::null_type_arguments(),
-                                      Object::null_type_arguments(), kNoneFree,
-                                      NULL, NULL, NULL, Heap::kNew));
+            zone, arguments.InstantiateFrom(Object::null_type_arguments(),
+                                            Object::null_type_arguments(),
+                                            kNoneFree, NULL, Heap::kNew));
         const TypeArguments& instantiated_pending_arguments =
-            TypeArguments::Handle(
-                zone, pending_arguments.InstantiateFrom(
-                          Object::null_type_arguments(),
-                          Object::null_type_arguments(), kNoneFree, NULL, NULL,
-                          NULL, Heap::kNew));
+            TypeArguments::Handle(zone, pending_arguments.InstantiateFrom(
+                                            Object::null_type_arguments(),
+                                            Object::null_type_arguments(),
+                                            kNoneFree, NULL, Heap::kNew));
         if (!instantiated_pending_arguments.IsSubvectorEquivalent(
                 instantiated_arguments, first_type_param, num_type_params)) {
           const String& type_name = String::Handle(zone, type.Name());
@@ -685,15 +403,11 @@
     const AbstractType& type,
     PendingTypes* pending_types) {
   Zone* zone = Thread::Current()->zone();
-  // The type class does not need to be finalized in order to finalize the type,
-  // however, it must at least be resolved (this was done as part of resolving
-  // the type itself, a precondition to calling FinalizeType).
-  // Also, the interfaces of the type class must be resolved and the type
-  // parameters of the type class must be finalized.
+  // The type class does not need to be finalized in order to finalize the type.
+  // Also, the type parameters of the type class must be finalized.
   Class& type_class = Class::Handle(zone, type.type_class());
   if (!type_class.is_type_finalized()) {
     FinalizeTypeParameters(type_class, pending_types);
-    ResolveUpperBounds(type_class);
   }
 
   // The finalized type argument vector needs num_type_arguments types.
@@ -757,10 +471,7 @@
           type_arg = full_arguments.TypeAt(offset + i);
           ASSERT(!type_arg.IsBeingFinalized());
           type_arg = FinalizeType(cls, type_arg, kFinalize, pending_types);
-          if (type_arg.IsMalformed()) {
-            // Malformed type arguments are mapped to dynamic.
-            type_arg = Type::DynamicType();
-          } else if (type_arg.IsFunctionType()) {
+          if (type_arg.IsFunctionType()) {
             const Function& signature_function =
                 Function::Handle(zone, Type::Cast(type_arg).signature());
             if (signature_function.IsGeneric()) {
@@ -779,9 +490,8 @@
       }
       if (offset > 0) {
         TrailPtr instantiation_trail = new Trail(zone, 4);
-        Error& bound_error = Error::Handle(zone);
-        FinalizeTypeArguments(type_class, full_arguments, offset, &bound_error,
-                              pending_types, instantiation_trail);
+        FinalizeTypeArguments(type_class, full_arguments, offset, pending_types,
+                              instantiation_trail);
       }
       if (full_arguments.IsRaw(0, num_type_arguments)) {
         // The parameterized_type is raw. Set its argument vector to null, which
@@ -835,13 +545,11 @@
 void ClassFinalizer::FinalizeTypeArguments(const Class& cls,
                                            const TypeArguments& arguments,
                                            intptr_t num_uninitialized_arguments,
-                                           Error* bound_error,
                                            PendingTypes* pending_types,
                                            TrailPtr instantiation_trail) {
   ASSERT(arguments.Length() >= cls.NumTypeArguments());
   if (!cls.is_type_finalized()) {
     FinalizeTypeParameters(cls, pending_types);
-    ResolveUpperBounds(cls);
   }
   AbstractType& super_type = AbstractType::Handle(cls.super_type());
   if (!super_type.IsNull()) {
@@ -906,20 +614,9 @@
             arguments.SetTypeAt(i, super_type_arg);
             continue;
           }
-          Error& error = Error::Handle();
           super_type_arg = super_type_arg.InstantiateFrom(
-              arguments, Object::null_type_arguments(), kNoneFree, &error,
-              instantiation_trail, NULL, Heap::kOld);
-          if (!error.IsNull()) {
-            // InstantiateFrom does not report an error if the type is still
-            // uninstantiated. Instead, it will return a new BoundedType so
-            // that the check is postponed to run time.
-            ASSERT(super_type_arg.IsInstantiated());
-            // Keep only the first bound error.
-            if (bound_error->IsNull()) {
-              *bound_error = error.raw();
-            }
-          }
+              arguments, Object::null_type_arguments(), kNoneFree,
+              instantiation_trail, Heap::kOld);
           if (super_type_arg.IsBeingFinalized()) {
             // The super_type_arg was instantiated from a type being finalized.
             // We need to finish finalizing its type arguments.
@@ -947,7 +644,7 @@
             FinalizeTypeArguments(
                 super_cls, super_args,
                 super_cls.NumTypeArguments() - super_cls.NumTypeParameters(),
-                bound_error, pending_types, instantiation_trail);
+                pending_types, instantiation_trail);
             if (FLAG_trace_type_finalization) {
               THR_Print("Finalized instantiated TypeRef '%s': '%s'\n",
                         String::Handle(super_type_arg.Name()).ToCString(),
@@ -958,8 +655,8 @@
       }
       arguments.SetTypeAt(i, super_type_arg);
     }
-    FinalizeTypeArguments(super_class, arguments, super_offset, bound_error,
-                          pending_types, instantiation_trail);
+    FinalizeTypeArguments(super_class, arguments, super_offset, pending_types,
+                          instantiation_trail);
   }
 }
 
@@ -971,10 +668,9 @@
   // types have been bound checked.
   ASSERT((pending_types == NULL) || (finalization < kCanonicalize));
   if (type.IsFinalized()) {
-    // Ensure type is canonical if canonicalization is requested, unless type is
-    // malformed.
-    if ((finalization >= kCanonicalize) && !type.IsMalformed() &&
-        !type.IsCanonical() && type.IsType()) {
+    // Ensure type is canonical if canonicalization is requested.
+    if ((finalization >= kCanonicalize) && !type.IsCanonical() &&
+        type.IsType()) {
       return type.Canonicalize();
     }
     return type.raw();
@@ -992,12 +688,6 @@
   ASSERT(!type.IsBeingFinalized());
 
   Zone* zone = Thread::Current()->zone();
-  ResolveType(cls, type);
-  // A malformed type gets mapped to a finalized type.
-  if (type.IsMalformed()) {
-    ASSERT(type.IsFinalized());
-    return type.raw();
-  }
 
   if (FLAG_trace_type_finalization) {
     THR_Print("Finalizing type '%s' for class '%s'\n",
@@ -1024,14 +714,8 @@
       ASSERT(!function.IsNull());
       offset = function.NumParentTypeParameters();
     }
-    // Calling NumTypeParameters() may finalize this type parameter if it
-    // belongs to a mixin application class.
-    if (!type_parameter.IsFinalized()) {
-      type_parameter.set_index(type_parameter.index() + offset);
-      type_parameter.SetIsFinalized();
-    } else {
-      ASSERT(cls.IsMixinApplication());
-    }
+    type_parameter.set_index(type_parameter.index() + offset);
+    type_parameter.SetIsFinalized();
 
     if (FLAG_trace_type_finalization) {
       THR_Print("Done finalizing type parameter '%s' with index %" Pd "\n",
@@ -1136,46 +820,6 @@
   }
 }
 
-void ClassFinalizer::ResolveSignature(const Class& cls,
-                                      const Function& function) {
-  AbstractType& type = AbstractType::Handle();
-  // Resolve upper bounds of function type parameters.
-  const intptr_t num_type_params = function.NumTypeParameters();
-  if (num_type_params > 0) {
-    TypeParameter& type_param = TypeParameter::Handle();
-    const TypeArguments& type_params =
-        TypeArguments::Handle(function.type_parameters());
-    for (intptr_t i = 0; i < num_type_params; i++) {
-      type_param ^= type_params.TypeAt(i);
-      type = type_param.bound();
-      ResolveType(cls, type);
-      if (type.IsFunctionType()) {
-        const Function& signature_function =
-            Function::Handle(Type::Cast(type).signature());
-        if (signature_function.IsGeneric()) {
-          const String& type_name = String::Handle(type.UserVisibleName());
-          const String& type_param_name = String::Handle(type_param.name());
-          ReportError(cls, type.token_pos(),
-                      "generic function type '%s' not allowed as bound of "
-                      "function type parameter '%s'",
-                      type_name.ToCString(), type_param_name.ToCString());
-        }
-      }
-    }
-  }
-  // Resolve result type.
-  type = function.result_type();
-  // It is not a compile time error if this name does not resolve to a class or
-  // interface.
-  ResolveType(cls, type);
-  // Resolve formal parameter types.
-  const intptr_t num_parameters = function.NumParameters();
-  for (intptr_t i = 0; i < num_parameters; i++) {
-    type = function.ParameterTypeAt(i);
-    ResolveType(cls, type);
-  }
-}
-
 void ClassFinalizer::FinalizeSignature(const Class& cls,
                                        const Function& function,
                                        FinalizationKind finalization) {
@@ -1220,36 +864,6 @@
   }
 }
 
-// Resolve the upper bounds of the type parameters of class cls.
-void ClassFinalizer::ResolveUpperBounds(const Class& cls) {
-  const intptr_t num_type_params = cls.NumTypeParameters();
-  TypeParameter& type_param = TypeParameter::Handle();
-  AbstractType& bound = AbstractType::Handle();
-  const TypeArguments& type_params =
-      TypeArguments::Handle(cls.type_parameters());
-  ASSERT((type_params.IsNull() && (num_type_params == 0)) ||
-         (type_params.Length() == num_type_params));
-  // In a first pass, resolve all bounds. This guarantees that finalization
-  // of mutually referencing bounds will not encounter an unresolved bound.
-  for (intptr_t i = 0; i < num_type_params; i++) {
-    type_param ^= type_params.TypeAt(i);
-    bound = type_param.bound();
-    ResolveType(cls, bound);
-    if (bound.IsFunctionType()) {
-      const Function& signature_function =
-          Function::Handle(Type::Cast(bound).signature());
-      if (signature_function.IsGeneric()) {
-        const String& bound_name = String::Handle(bound.UserVisibleName());
-        const String& type_param_name = String::Handle(type_param.name());
-        ReportError(cls, bound.token_pos(),
-                    "generic function type '%s' not allowed as bound of "
-                    "class type parameter '%s'",
-                    bound_name.ToCString(), type_param_name.ToCString());
-      }
-    }
-  }
-}
-
 // Finalize the upper bounds of the type parameters of class cls.
 void ClassFinalizer::FinalizeUpperBounds(const Class& cls,
                                          FinalizationKind finalization) {
@@ -1263,6 +877,18 @@
   for (intptr_t i = 0; i < num_type_params; i++) {
     type_param ^= type_params.TypeAt(i);
     bound = type_param.bound();
+    if (bound.IsFunctionType()) {
+      const Function& signature_function =
+          Function::Handle(Type::Cast(bound).signature());
+      if (signature_function.IsGeneric()) {
+        const String& bound_name = String::Handle(bound.UserVisibleName());
+        const String& type_param_name = String::Handle(type_param.name());
+        ReportError(cls, bound.token_pos(),
+                    "generic function type '%s' not allowed as bound of "
+                    "class type parameter '%s'",
+                    bound_name.ToCString(), type_param_name.ToCString());
+      }
+    }
     // Bound may be finalized, but not canonical yet.
     if (bound.IsCanonical() || bound.IsBeingFinalized()) {
       // A bound involved in F-bounded quantification may form a cycle.
@@ -1292,7 +918,7 @@
 }
 #endif
 
-void ClassFinalizer::ResolveAndFinalizeMemberTypes(const Class& cls) {
+void ClassFinalizer::FinalizeMemberTypes(const Class& cls) {
   // Note that getters and setters are explicitly listed as such in the list of
   // functions of a class, so we do not need to consider fields as implicitly
   // generating getters and setters.
@@ -1312,7 +938,7 @@
   // - an instance field or instance getter conflicting with an inherited
   //   instance method.
 
-  // Resolve type of fields and check for conflicts in super classes.
+  // Finalize type of fields and check for conflicts in super classes.
   Isolate* isolate = Isolate::Current();
   Zone* zone = Thread::Current()->zone();
   Array& array = Array::Handle(zone, cls.fields());
@@ -1330,7 +956,7 @@
           StaticTypeExactnessState::Unitialized());
     }
   }
-  // Resolve function signatures and check for conflicts in super classes and
+  // Finalize function signatures and check for conflicts in super classes and
   // interfaces.
   array = cls.functions();
   Function& function = Function::Handle(zone);
@@ -1343,11 +969,6 @@
     }
     if (function.is_static()) {
       if (function.IsRedirectingFactory()) {
-        // The function may be a still unresolved redirecting factory. Do not
-        // yet try to resolve it in order to avoid cycles in class finalization.
-        // However, the redirection type should be finalized.
-        // If the redirection type is from a deferred library and is not
-        // yet loaded, do not attempt to resolve.
         Type& type = Type::Handle(zone, function.RedirectionType());
         type ^= FinalizeType(cls, type);
         function.SetRedirectionType(type);
@@ -1356,691 +977,6 @@
   }
 }
 
-// Clone the type parameters of the super class and of the mixin class of this
-// mixin application class and use them as the type parameters of this mixin
-// application class. Set the type arguments of the super type, of the mixin
-// type (as well as of the interface type, which is identical to the mixin type)
-// to refer to the respective type parameters of the mixin application class.
-// In other words, decorate this mixin application class with type parameters
-// that forward to the super type and mixin type (and interface type).
-// Example:
-//   class S<T extends BT> { }
-//   class M<T extends BT> { }
-//   class C<E extends BE> extends S<E> with M<List<E>> { }
-// results in
-//   class S&M<T`, T extends BT> extends S<T`> implements M<T> { }
-//   class C<E extends BE> extends S&M<E, List<E>> { }
-// CloneMixinAppTypeParameters decorates class S&M with type parameters T` and
-// T, and use them as type arguments in S<T`> and M<T>.
-// Note that the bound BT on T of S is not applied to T` of S&M. However, the
-// bound BT on T of M is applied to T of S&M. See comments below.
-void ClassFinalizer::CloneMixinAppTypeParameters(const Class& mixin_app_class) {
-  ASSERT(mixin_app_class.type_parameters() == TypeArguments::null());
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  const AbstractType& super_type =
-      AbstractType::Handle(zone, mixin_app_class.super_type());
-  ASSERT(super_type.IsResolved());
-  const Class& super_class = Class::Handle(zone, super_type.type_class());
-  const intptr_t num_super_type_params = super_class.NumTypeParameters();
-  const Type& mixin_type = Type::Handle(zone, mixin_app_class.mixin());
-  const Class& mixin_class = Class::Handle(zone, mixin_type.type_class());
-  const intptr_t num_mixin_type_params = mixin_class.NumTypeParameters();
-
-  // The mixin type (in raw form) should have been added to the interfaces
-  // implemented by the mixin application class. This is necessary so that cycle
-  // check works at compile time (type arguments are ignored) and so that
-  // type tests work at runtime (by then, type arguments will have been set, see
-  // below).
-  ASSERT(mixin_app_class.interfaces() != Object::empty_array().raw());
-
-  // If both the super type and the mixin type are non generic, the mixin
-  // application class is non generic as well and we can skip type parameter
-  // cloning.
-  TypeArguments& instantiator = TypeArguments::Handle(zone);
-  if ((num_super_type_params + num_mixin_type_params) > 0) {
-    // If the last ampersand in the name of the mixin application class is
-    // doubled, the same type parameters can propagate the type arguments to
-    // the super type and to the mixin type.
-    bool share_type_params = false;
-    if (num_super_type_params == num_mixin_type_params) {
-      const String& name = String::Handle(zone, mixin_app_class.Name());
-      for (intptr_t i = name.Length() - 1; i > 0; --i) {
-        if (name.CharAt(i) == '&') {
-          if (name.CharAt(i - 1) == '&') {
-            share_type_params = true;
-          }
-          break;
-        }
-      }
-    }
-
-    const TypeArguments& cloned_type_params = TypeArguments::Handle(
-        zone,
-        TypeArguments::New((share_type_params ? 0 : num_super_type_params) +
-                           num_mixin_type_params));
-    TypeParameter& param = TypeParameter::Handle(zone);
-    TypeParameter& cloned_param = TypeParameter::Handle(zone);
-    String& param_name = String::Handle(zone);
-    AbstractType& param_bound = AbstractType::Handle(zone);
-    Function& null_function = Function::Handle(zone);
-    intptr_t cloned_index = 0;
-
-    // First, clone the super class type parameters. Rename them so that
-    // there can be no name conflict between the parameters of the super
-    // class and the mixin class.
-    if (!share_type_params && (num_super_type_params > 0)) {
-      const TypeArguments& super_type_params =
-          TypeArguments::Handle(zone, super_class.type_parameters());
-      const TypeArguments& super_type_args = TypeArguments::Handle(
-          zone, TypeArguments::New(num_super_type_params));
-      // The cloned super class type parameters do not need to repeat their
-      // bounds, since the bound checks will be performed at the super class
-      // level. As a consequence, if this mixin application is used itself as a
-      // mixin in another mixin application, the bounds will be ignored, which
-      // is correct, because the other mixin application does not inherit from
-      // the super class of its mixin. Note also that the other mixin
-      // application will only mixin the last mixin type listed in the first
-      // mixin application it is mixing in.
-      param_bound = thread->isolate()->object_store()->object_type();
-      for (intptr_t i = 0; i < num_super_type_params; i++) {
-        param ^= super_type_params.TypeAt(i);
-        param_name = param.name();
-        param_name =
-            Symbols::FromConcat(thread, param_name, Symbols::Backtick());
-        cloned_param =
-            TypeParameter::New(mixin_app_class, null_function, cloned_index,
-                               param_name, param_bound, param.token_pos());
-        cloned_type_params.SetTypeAt(cloned_index, cloned_param);
-        // Change the type arguments of the super type to refer to the
-        // cloned type parameters of the mixin application class.
-        super_type_args.SetTypeAt(cloned_index, cloned_param);
-        cloned_index++;
-      }
-      // The super type may have a BoundedType as type argument, but cannot be
-      // a BoundedType itself.
-      Type::Cast(super_type).set_arguments(super_type_args);
-      ASSERT(!super_type.IsFinalized());
-    }
-
-    // Second, clone the type parameters of the mixin class.
-    // We need to retain the parameter names of the mixin class
-    // since the code that will be compiled in the context of the
-    // mixin application class may refer to the type parameters
-    // with that name. We also retain the type parameter bounds.
-    if (num_mixin_type_params > 0) {
-      const TypeArguments& mixin_params =
-          TypeArguments::Handle(zone, mixin_class.type_parameters());
-      const intptr_t offset =
-          mixin_class.NumTypeArguments() - mixin_class.NumTypeParameters();
-      const TypeArguments& mixin_type_args = TypeArguments::Handle(
-          zone, TypeArguments::New(num_mixin_type_params));
-      instantiator ^= TypeArguments::New(offset + num_mixin_type_params);
-      bool has_uninstantiated_bounds = false;
-      for (intptr_t i = 0; i < num_mixin_type_params; i++) {
-        param ^= mixin_params.TypeAt(i);
-        param_name = param.name();
-        param_bound = param.bound();  // The bound will be adjusted below.
-        if (!param_bound.IsInstantiated()) {
-          has_uninstantiated_bounds = true;
-        }
-        cloned_param =
-            TypeParameter::New(mixin_app_class, null_function,
-                               cloned_index,  // Unfinalized index.
-                               param_name, param_bound, param.token_pos());
-        cloned_type_params.SetTypeAt(cloned_index, cloned_param);
-        mixin_type_args.SetTypeAt(i, cloned_param);  // Unfinalized length.
-        instantiator.SetTypeAt(offset + i, cloned_param);  // Finalized length.
-        cloned_index++;
-      }
-
-      // Third, replace the type parameters appearing in the bounds of the mixin
-      // type parameters, if any, by the cloned type parameters. This can be
-      // done by instantiating each bound using the instantiator built above.
-      // If the mixin class extends a generic super class, its first finalized
-      // type parameter has a non-zero index, therefore, the instantiator
-      // requires shifting by the offset calculated above.
-      // Unfinalized type parameters replace finalized type parameters, which
-      // is not a problem since they will get finalized shortly as the mixin
-      // application class gets finalized.
-      if (has_uninstantiated_bounds) {
-        Error& bound_error = Error::Handle(zone);
-        for (intptr_t i = 0; i < num_mixin_type_params; i++) {
-          param ^= mixin_type_args.TypeAt(i);
-          param_bound = param.bound();
-          if (!param_bound.IsInstantiated()) {
-            // Make sure the bound is finalized before instantiating it.
-            if (!param_bound.IsFinalized() && !param_bound.IsBeingFinalized()) {
-              param_bound = FinalizeType(mixin_app_class, param_bound);
-              param.set_bound(param_bound);  // In case part of recursive type.
-            }
-            param_bound = param_bound.InstantiateFrom(
-                instantiator, Object::null_type_arguments(), kNoneFree,
-                &bound_error, NULL, NULL, Heap::kOld);
-            // The instantiator contains only TypeParameter objects and no
-            // BoundedType objects, so no bound error may occur.
-            ASSERT(!param_bound.IsBoundedType());
-            ASSERT(bound_error.IsNull());
-            ASSERT(!param_bound.IsInstantiated());
-            param.set_bound(param_bound);
-          }
-        }
-      }
-
-      // Lastly, set the type arguments of the mixin type, which is also the
-      // single interface type.
-      ASSERT(!mixin_type.IsFinalized());
-      mixin_type.set_arguments(mixin_type_args);
-      if (share_type_params) {
-        Type::Cast(super_type).set_arguments(mixin_type_args);
-        ASSERT(!super_type.IsFinalized());
-      }
-    }
-    mixin_app_class.set_type_parameters(cloned_type_params);
-  }
-  // If the mixin class is a mixin application alias class, we insert a new
-  // synthesized mixin application class in the super chain of this mixin
-  // application class. The new class will have the aliased mixin as actual
-  // mixin.
-  if (mixin_class.is_mixin_app_alias()) {
-    ApplyMixinAppAlias(mixin_app_class, instantiator);
-  }
-}
-
-/* Support for mixin alias.
-Consider the following example:
-
-class I<T> { }
-class J<T> { }
-class S<T extends num> { }
-class M<T extends Map> { }
-class A<U, V extends List> = Object with M<Map<U, V>> implements I<V>;
-class C<T, K extends T> = S<T> with A<T, List<K>> implements J<K>;
-
-Before the call to ApplyMixinAppAlias, the VM has already synthesized 2 mixin
-application classes Object&M and S&A:
-
-Object&M<T extends Map> extends Object implements M<T> {
-  ... members of M applied here ...
-}
-A<U, V extends List> extends Object&M<Map<U, V>> implements I<V> { }
-
-S&A<T`, U, V extends List> extends S<T`> implements A<U, V> {
-  ... members of A applied here, but A has no members ...
-}
-C<T, K extends T> extends S&A<T, T, List<K>> implements J<K> { }
-
-In theory, class A should be an alias of Object&M instead of extending it.
-In practice, the additional class provides a hook for implemented interfaces
-(e.g. I<V>) and for type argument substitution via the super type relation (e.g.
-type parameter T of Object&M is substituted with Map<U, V>, U and V being the
-type parameters of the alias A).
-
-Similarly, class C should be an alias of S&A instead of extending it.
-
-Now, A does not have any members to be mixed into S&A, because A is an alias.
-The members to be mixed in are actually those of M, and they should appear in a
-scope where the type parameter T is visible. The class S&A declares the type
-parameters of A, i.e. U and V, but not T.
-
-Therefore, the call to ApplyMixinAppAlias inserts another synthesized class S&A`
-as the superclass of S&A. The class S&A` declares a type argument T:
-
-Instead of
-S&A<T`, U, V extends List> extends S<T`> implements A<U, V> { }
-
-We now have:
-S&A`<T`, T extends Map> extends S<T`> implements M<T> {
-  ... members of M applied here ...
-}
-S&A<T`, U, V extends List> extends S&A`<T`, Map<U, V>> implements A<U, V> { }
-
-The main implementation difficulty resides in the fact that the type parameters
-U and V in the super type S&A`<T`, Map<U, V>> of S&A must refer to the type
-parameters U and V of S&A. However, Map<U, V> is copied from the super type
-Object&M<Map<U, V>> of A and, therefore, U and V refer to A. An instantiation
-step with a properly crafted instantiator vector takes care of the required type
-parameter substitution.
-The instantiator vector must end with the type parameters U and V of S&A.
-The offset in the instantiator of the type parameter U of S&A must be at the
-finalized index of type parameter U of A.
-
-The same instantiator vector is used to adjust the type parameter bounds on U
-and V, if any. This step is done in CloneMixinAppTypeParameters above, and the
-already built instantiator is passed here.
-
-Also, a possible bound on type parameter T of M must be applied to type
-parameter T of S&A`. If the bound is uninstantiated, i.e. if it refers to T or
-other type parameters of M, an instantiation step is required to substitute
-these type parameters of M with type parameters of S&A`.
-The instantiator vector consists of the cloned type parameters of M shifted by
-an offset corresponding to the finalized index of the first type parameter of M.
-This is done in the recursive call to CloneMixinAppTypeParameters and does not
-require specific code in ApplyMixinAppAlias.
-*/
-void ClassFinalizer::ApplyMixinAppAlias(const Class& mixin_app_class,
-                                        const TypeArguments& instantiator) {
-  // If this mixin alias is aliasing another mixin alias, another class
-  // will be inserted via recursion. No need to check here.
-  // The mixin type may or may not be finalized yet.
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  AbstractType& super_type =
-      AbstractType::Handle(zone, mixin_app_class.super_type());
-  const Type& mixin_type = Type::Handle(zone, mixin_app_class.mixin());
-  const Class& mixin_class = Class::Handle(zone, mixin_type.type_class());
-  ASSERT(mixin_class.is_mixin_app_alias());
-  const Class& aliased_mixin_app_class =
-      Class::Handle(zone, mixin_class.SuperClass());
-  // Note that the super class of aliased_mixin_app_class can itself be a
-  // mixin application class (this happens if the alias is mixing more than one
-  // type). Instead of trying to recursively insert yet another class as the
-  // super class of this inserted class, we apply the composition rules of the
-  // spec and only mixin the members of aliased_mixin_app_class, not those of
-  // its super class. In other words, we only mixin the last mixin of the alias.
-  const Type& aliased_mixin_type =
-      Type::Handle(zone, aliased_mixin_app_class.mixin());
-  // The name of the inserted mixin application class is the name of mixin
-  // class name with a backtick added.
-  String& inserted_class_name = String::Handle(zone, mixin_app_class.Name());
-  inserted_class_name =
-      String::Concat(inserted_class_name, Symbols::Backtick());
-  const Library& library = Library::Handle(zone, mixin_app_class.library());
-  Class& inserted_class =
-      Class::Handle(zone, library.LookupLocalClass(inserted_class_name));
-  if (inserted_class.IsNull()) {
-    inserted_class_name = Symbols::New(thread, inserted_class_name);
-    const Script& script = Script::Handle(zone, mixin_app_class.script());
-    inserted_class = Class::New(library, inserted_class_name, script,
-                                mixin_app_class.token_pos());
-    inserted_class.set_is_synthesized_class();
-    library.AddClass(inserted_class);
-
-    if (FLAG_trace_class_finalization) {
-      THR_Print("Creating mixin application alias %s\n",
-                inserted_class.ToCString());
-    }
-
-    // The super type of the inserted class is identical to the super type of
-    // this mixin application class, except that it must refer to the type
-    // parameters of the inserted class rather than to those of the mixin
-    // application class.
-    // The type arguments of the super type will be set properly when calling
-    // CloneMixinAppTypeParameters on the inserted class, as long as the super
-    // type class is set properly.
-    inserted_class.set_super_type(super_type);  // Super class only is used.
-
-    // The mixin type and interface type must also be set before calling
-    // CloneMixinAppTypeParameters.
-    // After FinalizeTypesInClass, if the mixin type and interface type are
-    // generic, their type arguments will refer to the type parameters of
-    // inserted_class.
-    const Type& inserted_class_mixin_type = Type::Handle(
-        zone, Type::New(Class::Handle(zone, aliased_mixin_type.type_class()),
-                        Object::null_type_arguments(),
-                        aliased_mixin_type.token_pos()));
-    inserted_class.set_mixin(inserted_class_mixin_type);
-    // Add the mixin type to the list of interfaces that the mixin application
-    // class implements. This is necessary so that cycle check work at
-    // compile time (type arguments are ignored by that check).
-    const Array& interfaces = Array::Handle(Array::New(1));
-    interfaces.SetAt(0, inserted_class_mixin_type);
-    ASSERT(inserted_class.interfaces() == Object::empty_array().raw());
-    inserted_class.set_interfaces(interfaces);
-    // The type arguments of the interface, if any, will be set in
-    // CloneMixinAppTypeParameters, which is called indirectly from
-    // FinalizeTypesInClass below.
-  }
-
-  // Finalize the types and call CloneMixinAppTypeParameters.
-  FinalizeTypesInClass(inserted_class);
-
-  // The super type of this mixin application class must point to the
-  // inserted class. The super type arguments are the concatenation of the
-  // old super type arguments (propagating type arguments to the super class)
-  // with new type arguments providing type arguments to the mixin.
-  // The appended type arguments are those of the super type of the mixin
-  // application alias that are forwarding to the aliased mixin type, except
-  // that they must refer to the type parameters of the mixin application
-  // class rather than to those of the mixin application alias class.
-  // This type parameter substitution is performed by an instantiation step.
-  // It is important that the type parameters of the mixin application class
-  // are not finalized yet, because new type parameters may have been added
-  // to the super class.
-  const Class& super_class = Class::Handle(zone, super_type.type_class());
-  ASSERT(mixin_app_class.SuperClass() == super_class.raw());  // Will change.
-  const intptr_t num_super_type_params = super_class.NumTypeParameters();
-  AbstractType& type = AbstractType::Handle(zone);
-  // The instantiator is mapping finalized type parameters of mixin_class to
-  // unfinalized type parameters of mixin_app_class. Therefore, the type
-  // arguments of mixin_class_super_type must be finalized, since they get
-  // instantiated by this instantiator. Finalizing the types in mixin_class
-  // will finalize mixin_class_super_type.
-  // The aliased_mixin_type does not need to be finalized, but only resolved.
-  ASSERT(aliased_mixin_type.IsResolved());
-  const Class& aliased_mixin_type_class =
-      Class::Handle(zone, aliased_mixin_type.type_class());
-  FinalizeTypesInClass(mixin_class);
-  const intptr_t num_aliased_mixin_type_params =
-      aliased_mixin_type_class.NumTypeParameters();
-  ASSERT(inserted_class.NumTypeParameters() ==
-         (num_super_type_params + num_aliased_mixin_type_params));
-  const AbstractType& mixin_class_super_type =
-      AbstractType::Handle(zone, mixin_class.super_type());
-  ASSERT(mixin_class_super_type.IsFinalized());
-  // The aliased_mixin_type may be raw.
-  const TypeArguments& mixin_class_super_type_args =
-      TypeArguments::Handle(zone, mixin_class_super_type.arguments());
-  TypeArguments& new_mixin_type_args = TypeArguments::Handle(zone);
-  if ((num_aliased_mixin_type_params > 0) &&
-      !mixin_class_super_type_args.IsNull()) {
-    new_mixin_type_args = TypeArguments::New(num_aliased_mixin_type_params);
-    AbstractType& bounded_type = AbstractType::Handle(zone);
-    AbstractType& upper_bound = AbstractType::Handle(zone);
-    TypeParameter& type_parameter = TypeParameter::Handle(zone);
-    Error& bound_error = Error::Handle(zone);
-    const intptr_t offset =
-        mixin_class_super_type_args.Length() - num_aliased_mixin_type_params;
-    for (intptr_t i = 0; i < num_aliased_mixin_type_params; i++) {
-      type = mixin_class_super_type_args.TypeAt(offset + i);
-      if (!type.IsInstantiated()) {
-        // In the presence of bounds, the bounded type and the upper bound must
-        // be instantiated separately. Instantiating a BoundedType would wrap
-        // the BoundedType in another BoundedType.
-        if (type.IsBoundedType()) {
-          bounded_type = BoundedType::Cast(type).type();
-          bounded_type = bounded_type.InstantiateFrom(
-              instantiator, Object::null_type_arguments(), kNoneFree,
-              &bound_error, NULL, NULL, Heap::kOld);
-          // The instantiator contains only TypeParameter objects and no
-          // BoundedType objects, so no bound error may occur.
-          ASSERT(bound_error.IsNull());
-          upper_bound = BoundedType::Cast(type).bound();
-          upper_bound = upper_bound.InstantiateFrom(
-              instantiator, Object::null_type_arguments(), kNoneFree,
-              &bound_error, NULL, NULL, Heap::kOld);
-          ASSERT(bound_error.IsNull());
-          type_parameter = BoundedType::Cast(type).type_parameter();
-          // The type parameter that declared the bound does not change.
-          type = BoundedType::New(bounded_type, upper_bound, type_parameter);
-        } else {
-          type = type.InstantiateFrom(instantiator,
-                                      Object::null_type_arguments(), kNoneFree,
-                                      &bound_error, NULL, NULL, Heap::kOld);
-          ASSERT(bound_error.IsNull());
-        }
-      }
-      new_mixin_type_args.SetTypeAt(i, type);
-    }
-  }
-  TypeArguments& new_super_type_args = TypeArguments::Handle(zone);
-  if ((num_super_type_params + num_aliased_mixin_type_params) > 0) {
-    new_super_type_args = TypeArguments::New(num_super_type_params +
-                                             num_aliased_mixin_type_params);
-    const TypeArguments& type_params =
-        TypeArguments::Handle(zone, mixin_app_class.type_parameters());
-    for (intptr_t i = 0; i < num_super_type_params; i++) {
-      type = type_params.TypeAt(i);
-      new_super_type_args.SetTypeAt(i, type);
-    }
-    for (intptr_t i = 0; i < num_aliased_mixin_type_params; i++) {
-      if (new_mixin_type_args.IsNull()) {
-        type = Type::DynamicType();
-      } else {
-        type = new_mixin_type_args.TypeAt(i);
-      }
-      new_super_type_args.SetTypeAt(num_super_type_params + i, type);
-    }
-  }
-  super_type = Type::New(inserted_class, new_super_type_args,
-                         mixin_app_class.token_pos());
-  mixin_app_class.set_super_type(super_type);
-
-  // Mark this mixin application class as being an alias.
-  mixin_app_class.set_is_mixin_app_alias();
-  ASSERT(!mixin_app_class.is_type_finalized());
-  ASSERT(!mixin_app_class.is_mixin_type_applied());
-  if (FLAG_trace_class_finalization) {
-    THR_Print(
-        "Inserting class '%s' %s\n"
-        "  as super type '%s' with %" Pd
-        " type args: %s\n"
-        "  of mixin application alias '%s' %s\n",
-        String::Handle(inserted_class.Name()).ToCString(),
-        TypeArguments::Handle(inserted_class.type_parameters()).ToCString(),
-        String::Handle(zone, super_type.Name()).ToCString(),
-        num_super_type_params + num_aliased_mixin_type_params,
-        super_type.ToCString(),
-        String::Handle(mixin_app_class.Name()).ToCString(),
-        TypeArguments::Handle(mixin_app_class.type_parameters()).ToCString());
-  }
-}
-
-void ClassFinalizer::ApplyMixinType(const Class& mixin_app_class,
-                                    PendingTypes* pending_types) {
-  if (mixin_app_class.is_mixin_type_applied()) {
-    return;
-  }
-  Type& mixin_type = Type::Handle(mixin_app_class.mixin());
-  ASSERT(!mixin_type.IsNull());
-  ASSERT(mixin_type.HasTypeClass());
-  const Class& mixin_class = Class::Handle(mixin_type.type_class());
-
-  if (FLAG_trace_class_finalization) {
-    THR_Print("Applying mixin type '%s' to %s at pos %s\n",
-              String::Handle(mixin_type.Name()).ToCString(),
-              mixin_app_class.ToCString(),
-              mixin_app_class.token_pos().ToCString());
-  }
-
-  // Check for illegal self references.
-  GrowableArray<intptr_t> visited_mixins;
-  if (!IsMixinCycleFree(mixin_class, &visited_mixins)) {
-    const String& class_name = String::Handle(mixin_class.Name());
-    ReportError(mixin_class, mixin_class.token_pos(),
-                "mixin class '%s' illegally refers to itself",
-                class_name.ToCString());
-  }
-
-  // Copy type parameters to mixin application class.
-  CloneMixinAppTypeParameters(mixin_app_class);
-
-  // Verify that no restricted class is used as a mixin by checking the
-  // interfaces of the mixin application class, which implements its mixin.
-  GrowableArray<intptr_t> visited_interfaces;
-  ResolveSuperTypeAndInterfaces(mixin_app_class, &visited_interfaces);
-
-  if (FLAG_trace_class_finalization) {
-    THR_Print(
-        "Done applying mixin type '%s' to class '%s' %s extending '%s'\n",
-        String::Handle(mixin_type.Name()).ToCString(),
-        String::Handle(mixin_app_class.Name()).ToCString(),
-        TypeArguments::Handle(mixin_app_class.type_parameters()).ToCString(),
-        AbstractType::Handle(mixin_app_class.super_type()).ToCString());
-  }
-  // Mark the application class as having been applied its mixin type in order
-  // to avoid cycles while finalizing its mixin type.
-  mixin_app_class.set_is_mixin_type_applied();
-  // Finalize the mixin type, which may have been changed in case
-  // mixin_app_class is an alias.
-  mixin_type = mixin_app_class.mixin();
-  ASSERT(!mixin_type.IsBeingFinalized());
-  mixin_type ^=
-      FinalizeType(mixin_app_class, mixin_type, kFinalize, pending_types);
-  // The mixin type cannot be malbounded, since it merely substitutes the
-  // type parameters of the mixin class with those of the mixin application
-  // class, but it does not instantiate them.
-  ASSERT(!mixin_type.IsMalbounded());
-  mixin_app_class.set_mixin(mixin_type);
-}
-
-void ClassFinalizer::CreateForwardingConstructors(
-    const Class& mixin_app,
-    const Class& mixin_cls,
-    const GrowableObjectArray& cloned_funcs) {
-  Thread* T = Thread::Current();
-  Zone* Z = T->zone();
-  const String& mixin_name = String::Handle(Z, mixin_app.Name());
-  const Class& super_class = Class::Handle(Z, mixin_app.SuperClass());
-  const String& super_name = String::Handle(Z, super_class.Name());
-  const Array& functions = Array::Handle(Z, super_class.functions());
-  const intptr_t num_functions = functions.Length();
-  Function& func = Function::Handle(Z);
-  for (intptr_t i = 0; i < num_functions; i++) {
-    func ^= functions.At(i);
-    if (func.IsGenerativeConstructor()) {
-      // Build constructor name from mixin application class name
-      // and name of cloned super class constructor.
-      const String& ctor_name = String::Handle(Z, func.name());
-      String& clone_name =
-          String::Handle(Z, String::SubString(ctor_name, super_name.Length()));
-      clone_name = Symbols::FromConcat(T, mixin_name, clone_name);
-
-      if (FLAG_trace_class_finalization) {
-        THR_Print("Cloning constructor '%s' as '%s'\n", ctor_name.ToCString(),
-                  clone_name.ToCString());
-      }
-
-      // The owner of the forwarding constructor is the mixin application
-      // class. The source is the mixin class. The source may be needed
-      // to parse field initializer expressions in the mixin class.
-      const PatchClass& owner =
-          PatchClass::Handle(Z, PatchClass::New(mixin_app, mixin_cls));
-
-      const Function& clone = Function::Handle(
-          Z, Function::New(clone_name, func.kind(), func.is_static(),
-                           false,  // Not const.
-                           false,  // Not abstract.
-                           false,  // Not external.
-                           false,  // Not native.
-                           owner, mixin_cls.token_pos()));
-      clone.set_num_fixed_parameters(func.num_fixed_parameters());
-      clone.SetNumOptionalParameters(func.NumOptionalParameters(),
-                                     func.HasOptionalPositionalParameters());
-      clone.set_result_type(Object::dynamic_type());
-      clone.set_is_debuggable(false);
-
-      const intptr_t num_parameters = func.NumParameters();
-      // The cloned ctor shares the parameter names array with the
-      // original.
-      const Array& parameter_names = Array::Handle(Z, func.parameter_names());
-      ASSERT(parameter_names.Length() == num_parameters);
-      clone.set_parameter_names(parameter_names);
-      // The parameter types of the cloned constructor are 'dynamic'.
-      clone.set_parameter_types(Array::Handle(Z, Array::New(num_parameters)));
-      for (intptr_t n = 0; n < num_parameters; n++) {
-        clone.SetParameterTypeAt(n, Object::dynamic_type());
-      }
-      cloned_funcs.Add(clone);
-    }
-  }
-}
-
-void ClassFinalizer::ApplyMixinMembers(const Class& cls) {
-  Zone* zone = Thread::Current()->zone();
-  const Type& mixin_type = Type::Handle(zone, cls.mixin());
-  ASSERT(!mixin_type.IsNull());
-  ASSERT(mixin_type.HasTypeClass());
-  const Class& mixin_cls = Class::Handle(zone, mixin_type.type_class());
-  FinalizeClass(mixin_cls);
-  // If the mixin is a mixin application alias class, there are no members to
-  // apply here. A new synthesized class representing the aliased mixin
-  // application class was inserted in the super chain of this mixin application
-  // class. Members of the actual mixin class will be applied when visiting
-  // the mixin application class referring to the actual mixin.
-  ASSERT(!mixin_cls.is_mixin_app_alias() ||
-         Class::Handle(zone, cls.SuperClass()).IsMixinApplication());
-  // A default constructor will be created for the mixin app alias class.
-
-  if (FLAG_trace_class_finalization) {
-    THR_Print("Applying mixin members of %s to %s at pos %s\n",
-              mixin_cls.ToCString(), cls.ToCString(),
-              cls.token_pos().ToCString());
-  }
-
-  const GrowableObjectArray& cloned_funcs =
-      GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
-
-  Array& functions = Array::Handle(zone);
-  Function& func = Function::Handle(zone);
-
-  // The parser creates the mixin application class with no functions.
-  // But the Kernel frontend will generate mixin classes with only
-  // constructors inside them, which forward to the base class constructors.
-  //
-  // => We generate the constructors if they are not already there.
-  functions = cls.functions();
-  if (functions.Length() == 0) {
-    CreateForwardingConstructors(cls, mixin_cls, cloned_funcs);
-  } else {
-    for (intptr_t i = 0; i < functions.Length(); i++) {
-      func ^= functions.At(i);
-      ASSERT(func.kernel_offset() > 0);
-      cloned_funcs.Add(func);
-    }
-  }
-
-  // Now clone the functions from the mixin class.
-  const Library& from_library = Library::Handle(zone, mixin_cls.library());
-  const Library& to_library = Library::Handle(zone, cls.library());
-  Function& from_func = Function::Handle(zone);
-
-  functions = mixin_cls.functions();
-  const intptr_t num_functions = functions.Length();
-  for (intptr_t i = 0; i < num_functions; i++) {
-    from_func ^= functions.At(i);
-    if (from_func.IsGenerativeConstructor()) {
-      // A mixin class must not have explicit constructors.
-      if (!from_func.IsImplicitConstructor()) {
-        const Script& script = Script::Handle(cls.script());
-        const Error& error = Error::Handle(LanguageError::NewFormatted(
-            Error::Handle(), script, from_func.token_pos(), Report::AtLocation,
-            Report::kError, Heap::kNew,
-            "constructor '%s' is illegal in mixin class %s",
-            String::Handle(from_func.UserVisibleName()).ToCString(),
-            String::Handle(zone, mixin_cls.Name()).ToCString()));
-
-        ReportErrors(error, cls, cls.token_pos(),
-                     "mixin class '%s' must not have constructors",
-                     String::Handle(zone, mixin_cls.Name()).ToCString());
-      }
-      continue;  // Skip the implicit constructor.
-    }
-    if (!from_func.is_static() && !from_func.IsMethodExtractor() &&
-        !from_func.IsNoSuchMethodDispatcher() &&
-        !from_func.IsInvokeFieldDispatcher()) {
-      func = from_func.Clone(cls);
-      to_library.CloneMetadataFrom(from_library, from_func, func);
-      cloned_funcs.Add(func);
-    }
-  }
-  functions = Array::MakeFixedLength(cloned_funcs);
-  cls.SetFunctions(functions);
-
-  // Now clone the fields from the mixin class. There should be no
-  // existing fields in the mixin application class.
-  ASSERT(Array::Handle(cls.fields()).Length() == 0);
-  const Array& fields = Array::Handle(zone, mixin_cls.fields());
-  const intptr_t num_fields = fields.Length();
-  Field& field = Field::Handle(zone);
-  GrowableArray<const Field*> cloned_fields(num_fields);
-  for (intptr_t i = 0; i < num_fields; i++) {
-    field ^= fields.At(i);
-    // Static fields are shared between the mixin class and the mixin
-    // application class.
-    if (!field.is_static()) {
-      const Field& cloned = Field::ZoneHandle(zone, field.Clone(cls));
-      cloned_fields.Add(&cloned);
-    }
-  }
-  cls.AddFields(cloned_fields);
-
-  if (FLAG_trace_class_finalization) {
-    THR_Print("Done applying mixin members of %s to %s\n",
-              mixin_cls.ToCString(), cls.ToCString());
-  }
-}
-
 void ClassFinalizer::FinalizeTypesInClass(const Class& cls) {
   Thread* thread = Thread::Current();
   HANDLESCOPE(thread);
@@ -2065,31 +1001,13 @@
   FinalizeTypeParameters(cls);  // May change super type while applying mixin.
   super_class = cls.SuperClass();  // Get again possibly changed super class.
   ASSERT(super_class.IsNull() || super_class.is_type_finalized());
-  // Only resolving rather than finalizing the upper bounds here would result in
-  // instantiated type parameters of the super type to temporarily have
-  // unfinalized bounds. It is more efficient to finalize them early.
-  // Finalize bounds even if running in production mode, so that a snapshot
-  // contains them.
   FinalizeUpperBounds(cls);
   // Finalize super type.
   AbstractType& super_type = AbstractType::Handle(cls.super_type());
   if (!super_type.IsNull()) {
-    // In case of a bound error in the super type in production mode, the
-    // finalized super type will have a BoundedType as type argument for the
-    // out of bound type argument.
-    // It should not be a problem if the class is written to a snapshot and
-    // later executed in checked mode. Note that the finalized type argument
-    // vector of any type of the base class will contain a BoundedType for the
-    // out of bound type argument.
     super_type = FinalizeType(cls, super_type);
     cls.set_super_type(super_type);
   }
-  // Finalize mixin type.
-  Type& mixin_type = Type::Handle(cls.mixin());
-  if (!mixin_type.IsNull()) {
-    mixin_type ^= FinalizeType(cls, mixin_type);
-    cls.set_mixin(mixin_type);
-  }
   if (cls.IsTypedefClass()) {
     Function& signature = Function::Handle(cls.signature_function());
     Type& type = Type::Handle(signature.SignatureType());
@@ -2105,12 +1023,12 @@
     }
     cls.set_is_type_finalized();
 
-    // Resolve and finalize the result and parameter types of the signature
+    // Finalize the result and parameter types of the signature
     // function of this typedef class.
     FinalizeSignature(cls, signature);  // Does not modify signature type.
     ASSERT(signature.SignatureType() == type.raw());
 
-    // Resolve and finalize the signature type of this typedef.
+    // Finalize the signature type of this typedef.
     type ^= FinalizeType(cls, type);
     ASSERT(type.type_class() == cls.raw());
 
@@ -2160,8 +1078,6 @@
       }
     }
   }
-  // Mark as type finalized before resolving type parameter upper bounds
-  // in order to break cycles.
   cls.set_is_type_finalized();
 
   // Add this class to the direct subclasses of the superclass, unless the
@@ -2194,33 +1110,9 @@
     }
   }
 
-  // A top level class is parsed eagerly so just finalize it.
+  // A top level class is loaded eagerly so just finalize it.
   if (cls.IsTopLevel()) {
     FinalizeClass(cls);
-  } else {
-    // This class should not contain any functions or user-defined fields yet,
-    // because it has not been compiled yet. There may however be metadata
-    // fields because type parameters are parsed before the class body. Since
-    // 'ResolveAndFinalizeMemberTypes(cls)' has not been called yet, unfinalized
-    // member types could choke the snapshotter.
-    // Or
-    // if the class is being refinalized because a patch is being applied
-    // after the class has been finalized then it is ok for the class to have
-    // functions.
-    //
-    // TODO(kmillikin): This ASSERT will fail when bootstrapping from Kernel
-    // because classes are first created, methods are added, and then classes
-    // are finalized.  It is not easy to finalize classes earlier because not
-    // all bootstrap classes have been created yet.  It would be possible to
-    // create all classes, delay adding methods, finalize the classes, and then
-    // reprocess all classes to add methods, but that seems unnecessary.
-    // Marking the bootstrap classes as is_refinalize_after_patch seems cute but
-    // it causes other things to fail by violating their assumptions.  Reenable
-    // this ASSERT if it's important, remove it if it's just a sanity check and
-    // not required for correctness.
-    //
-    // ASSERT((Array::Handle(cls.functions()).Length() == 0) ||
-    //        cls.is_refinalize_after_patch());
   }
 }
 
@@ -2245,6 +1137,9 @@
   // Top level classes are always fully loaded.
   if (!cls.IsTopLevel() && cls.kernel_offset() > 0) {
     kernel::KernelLoader::FinishLoading(cls);
+    if (cls.is_finalized()) {
+      return;
+    }
   }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
@@ -2261,37 +1156,15 @@
   if (!super.IsNull()) {
     FinalizeClass(super);
   }
-  if (cls.IsMixinApplication()) {
-    // Copy instance methods and fields from the mixin class.
-    // This has to happen before the check whether the methods of
-    // the class conflict with inherited methods.
-    ApplyMixinMembers(cls);
-  }
-  // Mark as parsed and finalized.
+  // Mark as loaded and finalized.
   cls.Finalize();
-  // Mixin app alias classes may still lack their forwarding constructor.
-  if (cls.is_mixin_app_alias() &&
-      (cls.functions() == Object::empty_array().raw())) {
-    const GrowableObjectArray& cloned_funcs =
-        GrowableObjectArray::Handle(GrowableObjectArray::New());
-
-    const Class& mixin_app_class = Class::Handle(cls.SuperClass());
-    const Type& mixin_type = Type::Handle(mixin_app_class.mixin());
-    const Class& mixin_cls = Class::Handle(mixin_type.type_class());
-
-    CreateForwardingConstructors(cls, mixin_cls, cloned_funcs);
-    const Array& functions =
-        Array::Handle(Array::MakeFixedLength(cloned_funcs));
-    cls.SetFunctions(functions);
-  }
   // Every class should have at least a constructor, unless it is a top level
   // class or a typedef class. The Kernel frontend does not create an implicit
   // constructor for abstract classes.
   // Moreover, Dart 2 precompiler (TFA) can tree shake all members if unused.
   ASSERT(FLAG_precompiled_mode || cls.IsTopLevel() || cls.IsTypedefClass() ||
          cls.is_abstract() || (Array::Handle(cls.functions()).Length() > 0));
-  // Resolve and finalize all member types.
-  ResolveAndFinalizeMemberTypes(cls);
+  FinalizeMemberTypes(cls);
   // Run additional checks after all types are finalized.
   if (cls.is_const()) {
     CheckForLegalConstClass(cls);
@@ -2308,6 +1181,158 @@
   }
 }
 
+static void AddRelatedClassesToList(
+    const Class& cls,
+    GrowableHandlePtrArray<const Class>* load_class_list,
+    GrowableHandlePtrArray<const Class>* load_patchclass_list) {
+  Zone* zone = Thread::Current()->zone();
+  Class& load_class = Class::Handle(zone);
+  AbstractType& interface_type = Type::Handle(zone);
+  Array& interfaces = Array::Handle(zone);
+
+  // Add all the interfaces implemented by the class that have not been
+  // already loaded to the load list. Mark the interface as loading so that
+  // we don't recursively add it back into the list.
+  interfaces ^= cls.interfaces();
+  for (intptr_t i = 0; i < interfaces.Length(); i++) {
+    interface_type ^= interfaces.At(i);
+    load_class ^= interface_type.type_class();
+    if (!load_class.is_finalized() &&
+        !load_class.is_marked_for_lazy_loading()) {
+      load_class_list->Add(load_class);
+      load_class.set_is_marked_for_lazy_loading();
+    }
+  }
+
+  // Walk up the super_class chain and add these classes to the list if they
+  // have not been already added to the load class list. Mark the class as
+  // loading so that we don't recursively add it back into the list.
+  load_class ^= cls.SuperClass();
+  while (!load_class.IsNull()) {
+    if (!load_class.is_finalized() &&
+        !load_class.is_marked_for_lazy_loading()) {
+      load_class_list->Add(load_class);
+      load_class.set_is_marked_for_lazy_loading();
+    }
+    load_class ^= load_class.SuperClass();
+  }
+
+  // Add patch classes if they exist to the load patchclass list if they have
+  // not already been loaded and patched. Mark the class as loading so that
+  // we don't recursively add it back into the list.
+  load_class ^= cls.GetPatchClass();
+  if (!load_class.IsNull()) {
+    if (!load_class.is_finalized() &&
+        !load_class.is_marked_for_lazy_loading()) {
+      load_patchclass_list->Add(load_class);
+      load_class.set_is_marked_for_lazy_loading();
+    }
+  }
+}
+
+RawError* ClassFinalizer::LoadClassMembers(const Class& cls) {
+  ASSERT(Thread::Current()->IsMutatorThread());
+  // If class is a top level class it is already loaded.
+  if (cls.IsTopLevel()) {
+    return Error::null();
+  }
+  // If the class is already marked for loading return immediately.
+  if (cls.is_marked_for_lazy_loading()) {
+    return Error::null();
+  }
+  // If the class is a typedef class there is no need to try and
+  // compile it. Just finalize it directly.
+  if (cls.IsTypedefClass()) {
+#if defined(DEBUG)
+    const Class& closure_cls =
+        Class::Handle(Isolate::Current()->object_store()->closure_class());
+    ASSERT(closure_cls.is_finalized());
+#endif
+    LongJumpScope jump;
+    if (setjmp(*jump.Set()) == 0) {
+      ClassFinalizer::FinalizeClass(cls);
+      return Error::null();
+    } else {
+      return Thread::Current()->StealStickyError();
+    }
+  }
+
+  Thread* const thread = Thread::Current();
+  StackZone zone(thread);
+#if !defined(PRODUCT)
+  VMTagScope tagScope(thread, VMTag::kClassLoadingTagId);
+  TimelineDurationScope tds(thread, Timeline::GetCompilerStream(),
+                            "ClassLoading");
+  if (tds.enabled()) {
+    tds.SetNumArguments(1);
+    tds.CopyArgument(0, "class", cls.ToCString());
+  }
+#endif  // !defined(PRODUCT)
+
+  // We remember all the classes that are being lazy loaded in these lists.
+  // This also allows us to reset the marked_for_loading state in case we see
+  // an error.
+  GrowableHandlePtrArray<const Class> load_class_list(thread->zone(), 4);
+  GrowableHandlePtrArray<const Class> load_patchclass_list(thread->zone(), 4);
+
+  // Load the class and all the interfaces it implements and super classes.
+  LongJumpScope jump;
+  if (setjmp(*jump.Set()) == 0) {
+    if (FLAG_trace_class_finalization) {
+      THR_Print("Lazy Loading Class '%s'\n", cls.ToCString());
+    }
+
+    // Add the primary class which needs to be load to the load list.
+    // Mark the class as loading so that we don't recursively add the same
+    // class back into the list.
+    load_class_list.Add(cls);
+    cls.set_is_marked_for_lazy_loading();
+
+    // Add all super classes, interface classes and patch class if one
+    // exists to the corresponding lists.
+    // NOTE: The load_class_list array keeps growing as more classes are added
+    // to it by AddRelatedClassesToList. It is not OK to hoist
+    // load_class_list.Length() into a local variable and iterate using the
+    // local variable.
+    for (intptr_t i = 0; i < load_class_list.length(); i++) {
+      AddRelatedClassesToList(load_class_list.At(i), &load_class_list,
+                              &load_patchclass_list);
+    }
+
+    // Finish lazy loading of these classes and finialize them.
+    for (intptr_t i = (load_class_list.length() - 1); i >= 0; i--) {
+      const Class& load_class = load_class_list.At(i);
+      ASSERT(!load_class.IsNull());
+      ClassFinalizer::FinalizeClass(load_class);
+      load_class.reset_is_marked_for_lazy_loading();
+    }
+    for (intptr_t i = (load_patchclass_list.length() - 1); i >= 0; i--) {
+      const Class& load_class = load_patchclass_list.At(i);
+      ASSERT(!load_class.IsNull());
+      ClassFinalizer::FinalizeClass(load_class);
+      load_class.reset_is_marked_for_lazy_loading();
+    }
+
+    return Error::null();
+  } else {
+    // Reset the marked for parsing flags.
+    for (intptr_t i = 0; i < load_class_list.length(); i++) {
+      const Class& load_class = load_class_list.At(i);
+      if (load_class.is_marked_for_lazy_loading()) {
+        load_class.reset_is_marked_for_lazy_loading();
+      }
+    }
+    for (intptr_t i = 0; i < load_patchclass_list.length(); i++) {
+      const Class& load_class = load_patchclass_list.At(i);
+      if (load_class.is_marked_for_lazy_loading()) {
+        load_class.reset_is_marked_for_lazy_loading();
+      }
+    }
+
+    return Thread::Current()->StealStickyError();
+  }
+}
+
 // Allocate instances for each enumeration value, and populate the
 // static field 'values'.
 // By allocating the instances programmatically, we save an implicit final
@@ -2349,7 +1374,7 @@
   sentinel.RecordStore(enum_value);
 
   if (enum_cls.kernel_offset() > 0) {
-    Object& result = Object::Handle(zone);
+    Error& error = Error::Handle(zone);
     for (intptr_t i = 0; i < fields.Length(); i++) {
       field = Field::RawCast(fields.At(i));
       if (!field.is_static() || !field.is_const() ||
@@ -2359,11 +1384,12 @@
       // The eager evaluation of the enum values is required for hot-reload (see
       // commit e3ecc87).
       if (!FLAG_precompiled_mode) {
-        field.SetStaticValue(Object::transition_sentinel());
-        result = Compiler::EvaluateStaticInitializer(field);
-        ASSERT(!result.IsError());
-        field.SetStaticValue(Instance::Cast(result), true);
-        field.RecordStore(Instance::Cast(result));
+        if (field.IsUninitialized()) {
+          error = field.EvaluateInitializer();
+          if (!error.IsNull()) {
+            ReportError(error);
+          }
+        }
       }
     }
   } else {
@@ -2438,9 +1464,8 @@
                                         const AbstractType& type,
                                         GrowableArray<intptr_t>* visited) {
   ASSERT(visited != NULL);
-  ResolveType(cls, type);
   bool checking_typedef = false;
-  if (type.IsType() && !type.IsMalformed()) {
+  if (type.IsType()) {
     AbstractType& other_type = AbstractType::Handle();
     if (type.IsFunctionType()) {
       const Class& scope_class = Class::Handle(type.type_class());
@@ -2507,234 +1532,6 @@
   return true;
 }
 
-// Returns false if the mixin illegally refers to itself.
-bool ClassFinalizer::IsMixinCycleFree(const Class& cls,
-                                      GrowableArray<intptr_t>* visited) {
-  ASSERT(visited != NULL);
-  const intptr_t cls_index = cls.id();
-  for (intptr_t i = 0; i < visited->length(); i++) {
-    if ((*visited)[i] == cls_index) {
-      // We have already visited mixin 'cls'. We found a cycle.
-      return false;
-    }
-  }
-
-  // Visit the super chain of cls.
-  visited->Add(cls.id());
-  Class& super_class = Class::Handle(cls.raw());
-  do {
-    if (super_class.IsMixinApplication()) {
-      const Type& mixin_type = Type::Handle(super_class.mixin());
-      ASSERT(!mixin_type.IsNull());
-      ASSERT(mixin_type.HasTypeClass());
-      const Class& mixin_class = Class::Handle(mixin_type.type_class());
-      if (!IsMixinCycleFree(mixin_class, visited)) {
-        return false;
-      }
-    }
-    super_class = super_class.SuperClass();
-  } while (!super_class.IsNull());
-  visited->RemoveLast();
-  return true;
-}
-
-void ClassFinalizer::CollectTypeArguments(
-    const Class& cls,
-    const Type& type,
-    const GrowableObjectArray& collected_args) {
-  ASSERT(type.HasTypeClass());
-  Class& type_class = Class::Handle(type.type_class());
-  TypeArguments& type_args = TypeArguments::Handle(type.arguments());
-  const intptr_t num_type_parameters = type_class.NumTypeParameters();
-  const intptr_t num_type_arguments =
-      type_args.IsNull() ? 0 : type_args.Length();
-  AbstractType& arg = AbstractType::Handle();
-  if (num_type_arguments > 0) {
-    if (num_type_arguments == num_type_parameters) {
-      for (intptr_t i = 0; i < num_type_arguments; i++) {
-        arg = type_args.TypeAt(i);
-        arg = arg.CloneUnfinalized();
-        ASSERT(!arg.IsBeingFinalized());
-        collected_args.Add(arg);
-      }
-      return;
-    }
-    // TODO(regis): Check if this is dead code.
-    // Discard provided type arguments and treat type as raw.
-  }
-  // Fill arguments with type dynamic.
-  for (intptr_t i = 0; i < num_type_parameters; i++) {
-    arg = Type::DynamicType();
-    collected_args.Add(arg);
-  }
-}
-
-RawType* ClassFinalizer::ResolveMixinAppType(
-    const Class& cls,
-    const MixinAppType& mixin_app_type) {
-  // Lookup or create mixin application classes in the library of cls
-  // and resolve super type and mixin types.
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  const Library& library = Library::Handle(zone, cls.library());
-  ASSERT(!library.IsNull());
-  const Script& script = Script::Handle(zone, cls.script());
-  ASSERT(!script.IsNull());
-  const GrowableObjectArray& type_args =
-      GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
-  AbstractType& mixin_super_type =
-      AbstractType::Handle(zone, mixin_app_type.super_type());
-  ResolveType(cls, mixin_super_type);
-  ASSERT(mixin_super_type.HasTypeClass());  // Even if malformed.
-  if (mixin_super_type.IsMalformedOrMalbounded()) {
-    ReportError(Error::Handle(zone, mixin_super_type.error()));
-  }
-  if (mixin_super_type.IsDynamicType()) {
-    ReportError(cls, cls.token_pos(), "class '%s' may not extend 'dynamic'",
-                String::Handle(zone, cls.Name()).ToCString());
-  }
-  // The super type may have a BoundedType as type argument, but cannot be
-  // a BoundedType itself.
-  CollectTypeArguments(cls, Type::Cast(mixin_super_type), type_args);
-  AbstractType& mixin_type = AbstractType::Handle(zone);
-  Class& mixin_app_class = Class::Handle(zone);
-  Class& mixin_super_type_class = Class::Handle(zone);
-  Class& mixin_type_class = Class::Handle(zone);
-  Library& mixin_super_type_library = Library::Handle(zone);
-  Library& mixin_type_library = Library::Handle(zone);
-  String& mixin_app_class_name = String::Handle(zone);
-  String& mixin_type_class_name = String::Handle(zone);
-  AbstractType& super_type_arg = AbstractType::Handle(zone);
-  AbstractType& mixin_type_arg = AbstractType::Handle(zone);
-  Type& generic_mixin_type = Type::Handle(zone);
-  Array& interfaces = Array::Handle(zone);
-  const intptr_t depth = mixin_app_type.Depth();
-  for (intptr_t i = 0; i < depth; i++) {
-    mixin_type = mixin_app_type.MixinTypeAt(i);
-    ASSERT(!mixin_type.IsNull());
-    ResolveType(cls, mixin_type);
-    ASSERT(mixin_type.HasTypeClass());  // Even if malformed.
-    ASSERT(mixin_type.IsType());
-    if (mixin_type.IsMalformedOrMalbounded()) {
-      ReportError(Error::Handle(zone, mixin_type.error()));
-    }
-    if (mixin_type.IsDynamicType()) {
-      ReportError(cls, cls.token_pos(), "class '%s' may not mixin 'dynamic'",
-                  String::Handle(zone, cls.Name()).ToCString());
-    }
-    const intptr_t num_super_type_args = type_args.Length();
-    CollectTypeArguments(cls, Type::Cast(mixin_type), type_args);
-
-    // If the mixin type has identical type arguments as the super type, they
-    // can share the same type parameters of the mixin application class,
-    // thereby allowing for further optimizations, such as instantiator vector
-    // reuse or sharing of type arguments with the super class.
-    bool share_type_params = (num_super_type_args > 0) &&
-                             (type_args.Length() == 2 * num_super_type_args);
-    if (share_type_params) {
-      for (intptr_t i = 0; i < num_super_type_args; i++) {
-        super_type_arg ^= type_args.At(i);
-        mixin_type_arg ^= type_args.At(num_super_type_args + i);
-        if (!super_type_arg.Equals(mixin_type_arg)) {
-          share_type_params = false;
-          break;
-        }
-      }
-      if (share_type_params) {
-        // Cut the type argument vector in half.
-        type_args.SetLength(num_super_type_args);
-      }
-    }
-
-    // The name of the mixin application class is a combination of
-    // the super class name and mixin class name, as well as their respective
-    // library private keys if their library is different than the library of
-    // the mixin application class.
-    // Note that appending the library url would break naming conventions (e.g.
-    // no period in the class name).
-    mixin_app_class_name = mixin_super_type.ClassName();
-    mixin_super_type_class = mixin_super_type.type_class();
-    mixin_super_type_library = mixin_super_type_class.library();
-    if (mixin_super_type_library.raw() != library.raw()) {
-      mixin_app_class_name = String::Concat(
-          mixin_app_class_name,
-          String::Handle(zone, mixin_super_type_library.private_key()));
-    }
-    mixin_app_class_name =
-        String::Concat(mixin_app_class_name, Symbols::Ampersand());
-    // If the type parameters are shared between the super type and the mixin
-    // type, use two ampersand symbols, so that the class has a different name
-    // and is not reused in a context where this optimization is not possible.
-    if (share_type_params) {
-      mixin_app_class_name =
-          String::Concat(mixin_app_class_name, Symbols::Ampersand());
-    }
-    mixin_type_class_name = mixin_type.ClassName();
-    mixin_type_class = mixin_type.type_class();
-    mixin_type_library = mixin_type_class.library();
-    if (mixin_type_library.raw() != library.raw()) {
-      mixin_type_class_name = String::Concat(
-          mixin_type_class_name,
-          String::Handle(zone, mixin_type_library.private_key()));
-    }
-    mixin_app_class_name =
-        String::Concat(mixin_app_class_name, mixin_type_class_name);
-    mixin_app_class = library.LookupLocalClass(mixin_app_class_name);
-    if (mixin_app_class.IsNull()) {
-      mixin_app_class_name = Symbols::New(thread, mixin_app_class_name);
-      mixin_app_class = Class::New(library, mixin_app_class_name, script,
-                                   mixin_type.token_pos());
-      mixin_app_class.set_super_type(mixin_super_type);
-      generic_mixin_type =
-          Type::New(mixin_type_class, Object::null_type_arguments(),
-                    mixin_type.token_pos());
-      mixin_app_class.set_mixin(generic_mixin_type);
-      // Add the mixin type to the list of interfaces that the mixin application
-      // class implements. This is necessary so that cycle check work at
-      // compile time (type arguments are ignored by that check).
-      interfaces = Array::New(1);
-      interfaces.SetAt(0, generic_mixin_type);
-      ASSERT(mixin_app_class.interfaces() == Object::empty_array().raw());
-      mixin_app_class.set_interfaces(interfaces);
-      mixin_app_class.set_is_synthesized_class();
-      library.AddClass(mixin_app_class);
-
-      // No need to add the new class to pending_classes, since it will be
-      // processed via the super_type chain of a pending class.
-
-      if (FLAG_trace_class_finalization) {
-        THR_Print("Creating mixin application %s\n",
-                  mixin_app_class.ToCString());
-      }
-    }
-    // This mixin application class becomes the type class of the super type of
-    // the next mixin application class. It is however too early to provide the
-    // correct super type arguments. We use the raw type for now.
-    mixin_super_type = Type::New(mixin_app_class, Object::null_type_arguments(),
-                                 mixin_type.token_pos());
-  }
-  TypeArguments& mixin_app_args = TypeArguments::Handle(zone);
-  if (type_args.Length() > 0) {
-    mixin_app_args = TypeArguments::New(type_args.Length());
-    AbstractType& type_arg = AbstractType::Handle(zone);
-    for (intptr_t i = 0; i < type_args.Length(); i++) {
-      type_arg ^= type_args.At(i);
-      mixin_app_args.SetTypeAt(i, type_arg);
-    }
-  }
-  if (FLAG_trace_class_finalization) {
-    THR_Print("ResolveMixinAppType: mixin appl type args: %s\n",
-              mixin_app_args.ToCString());
-  }
-  // The mixin application class at depth k is a subclass of mixin application
-  // class at depth k - 1. Build a new super type with the class at the highest
-  // depth (the last one processed by the loop above) as the type class and the
-  // collected type arguments from the super type and all mixin types.
-  // This super type replaces the MixinAppType object in the class that extends
-  // the mixin application.
-  return Type::New(mixin_app_class, mixin_app_args, mixin_app_type.token_pos());
-}
-
 // For a class used as an interface marks this class and all its superclasses
 // implemented.
 //
@@ -2755,19 +1552,17 @@
     if (type.IsNull() || type.IsObjectType()) {
       break;
     }
-    ASSERT(type.IsResolved());
     cls = type.type_class();
   }
 }
 
 // Recursively walks the graph of explicitly declared super type and
-// interfaces, resolving unresolved super types and interfaces.
-// Reports an error if there is an interface reference that cannot be
-// resolved, or if there is a cycle in the graph. We detect cycles by
+// interfaces.
+// Reports an error if there is a cycle in the graph. We detect cycles by
 // remembering interfaces we've visited in each path through the
 // graph. If we visit an interface a second time on a given path,
 // we found a loop.
-void ClassFinalizer::ResolveSuperTypeAndInterfaces(
+void ClassFinalizer::CheckSuperTypeAndInterfaces(
     const Class& cls,
     GrowableArray<intptr_t>* visited) {
   if (cls.is_cycle_free()) {
@@ -2775,7 +1570,7 @@
   }
   ASSERT(visited != NULL);
   if (FLAG_trace_class_finalization) {
-    THR_Print("Resolving super and interfaces: %s\n", cls.ToCString());
+    THR_Print("Checking super and interfaces: %s\n", cls.ToCString());
   }
   Zone* zone = Thread::Current()->zone();
   const intptr_t cls_index = cls.id();
@@ -2788,8 +1583,7 @@
     }
   }
 
-  // If the class/interface has no explicit super class/interfaces
-  // and is not a mixin application, we are done.
+  // If the class/interface has no explicit super class/interfaces, we are done.
   AbstractType& super_type = AbstractType::Handle(zone, cls.super_type());
   Array& super_interfaces = Array::Handle(zone, cls.interfaces());
   if ((super_type.IsNull() || super_type.IsObjectType()) &&
@@ -2798,32 +1592,18 @@
     return;
   }
 
-  if (super_type.IsMixinAppType()) {
-    // For the cycle check below to work, ResolveMixinAppType needs to set
-    // the mixin interfaces in the super classes, even if only in raw form.
-    // It is indeed too early to set the correct type arguments, which is not
-    // a problem since they are ignored in the cycle check.
-    const MixinAppType& mixin_app_type = MixinAppType::Cast(super_type);
-    super_type = ResolveMixinAppType(cls, mixin_app_type);
-    cls.set_super_type(super_type);
-  }
-
   // If cls belongs to core lib or is a synthetic class which could belong to
   // the core library, the restrictions about allowed interfaces are lifted.
   const bool exempt_from_hierarchy_restrictions =
       cls.library() == Library::CoreLibrary() ||
       String::Handle(cls.Name()).Equals(Symbols::DebugClassName());
 
-  // Resolve and check the super type and interfaces of cls.
+  // Check the super type and interfaces of cls.
   visited->Add(cls_index);
   AbstractType& interface = AbstractType::Handle(zone);
   Class& interface_class = Class::Handle(zone);
 
-  // Resolve super type. Failures lead to a longjmp.
-  ResolveType(cls, super_type);
-  if (super_type.IsMalformedOrMalbounded()) {
-    ReportError(Error::Handle(zone, super_type.error()));
-  }
+  // Check super type. Failures lead to a longjmp.
   if (super_type.IsDynamicType()) {
     ReportError(cls, cls.token_pos(), "class '%s' may not extend 'dynamic'",
                 String::Handle(zone, cls.Name()).ToCString());
@@ -2888,18 +1668,13 @@
                   interface_name.ToCString());
     }
   }
-  // Now resolve the super interfaces of the super type.
-  ResolveSuperTypeAndInterfaces(interface_class, visited);
+  // Now check the super interfaces of the super type.
+  CheckSuperTypeAndInterfaces(interface_class, visited);
 
-  // Resolve interfaces. Failures lead to a longjmp.
+  // Check interfaces. Failures lead to a longjmp.
   for (intptr_t i = 0; i < super_interfaces.Length(); i++) {
     interface ^= super_interfaces.At(i);
-    ResolveType(cls, interface);
     ASSERT(!interface.IsTypeParameter());  // Should be detected by parser.
-    // A malbounded interface is only reported when involved in a type test.
-    if (interface.IsMalformed()) {
-      ReportError(Error::Handle(zone, interface.error()));
-    }
     if (interface.IsDynamicType()) {
       ReportError(cls, cls.token_pos(),
                   "'dynamic' may not be used as interface");
@@ -2928,20 +1703,15 @@
           interface.IsDynamicType()) {
         const String& interface_name =
             String::Handle(zone, interface_class.Name());
-        if (cls.IsMixinApplication()) {
-          ReportError(cls, cls.token_pos(), "illegal mixin of '%s'",
-                      interface_name.ToCString());
-        } else {
-          ReportError(cls, cls.token_pos(),
-                      "'%s' is not allowed to extend or implement '%s'",
-                      String::Handle(zone, cls.Name()).ToCString(),
-                      interface_name.ToCString());
-        }
+        ReportError(cls, cls.token_pos(),
+                    "'%s' is not allowed to extend or implement '%s'",
+                    String::Handle(zone, cls.Name()).ToCString(),
+                    interface_name.ToCString());
       }
     }
 
-    // Now resolve the super interfaces.
-    ResolveSuperTypeAndInterfaces(interface_class, visited);
+    // Now check the super interfaces.
+    CheckSuperTypeAndInterfaces(interface_class, visited);
     MarkImplemented(zone, interface_class);
   }
   visited->RemoveLast();
@@ -3014,77 +1784,6 @@
   }
 }
 
-// Either report an error or mark the type as malformed.
-void ClassFinalizer::MarkTypeMalformed(const Error& prev_error,
-                                       const Script& script,
-                                       const Type& type,
-                                       const char* format,
-                                       va_list args) {
-  LanguageError& error = LanguageError::Handle(LanguageError::NewFormattedV(
-      prev_error, script, type.token_pos(), Report::AtLocation,
-      Report::kMalformedType, Heap::kOld, format, args));
-  type.set_error(error);
-  // Make the type raw, since it may not be possible to
-  // properly finalize its type arguments.
-  type.set_type_class(Class::Handle(Object::dynamic_class()));
-  type.set_arguments(Object::null_type_arguments());
-  if (!type.IsFinalized()) {
-    type.SetIsFinalized();
-    // Do not canonicalize malformed types, since they contain an error field.
-  } else {
-    // The only case where the malformed type was already finalized is when its
-    // type arguments are not within bounds. In that case, we have a prev_error.
-    ASSERT(!prev_error.IsNull());
-  }
-}
-
-RawType* ClassFinalizer::NewFinalizedMalformedType(const Error& prev_error,
-                                                   const Script& script,
-                                                   TokenPosition type_pos,
-                                                   const char* format,
-                                                   ...) {
-  va_list args;
-  va_start(args, format);
-  // TODO(regis): Are malformed types still used in strong mode? Probably not.
-  const Type& type =
-      Type::Handle(Type::New(Class::Handle(Object::dynamic_class()),
-                             Object::null_type_arguments(), type_pos));
-  MarkTypeMalformed(prev_error, script, type, format, args);
-  va_end(args);
-  ASSERT(type.IsMalformed());
-  ASSERT(type.IsFinalized());
-  return type.raw();
-}
-
-void ClassFinalizer::FinalizeMalformedType(const Error& prev_error,
-                                           const Script& script,
-                                           const Type& type,
-                                           const char* format,
-                                           ...) {
-  va_list args;
-  va_start(args, format);
-  MarkTypeMalformed(prev_error, script, type, format, args);
-  va_end(args);
-}
-
-void ClassFinalizer::FinalizeMalboundedType(const Error& prev_error,
-                                            const Script& script,
-                                            const AbstractType& type,
-                                            const char* format,
-                                            ...) {
-  va_list args;
-  va_start(args, format);
-  LanguageError& error = LanguageError::Handle(LanguageError::NewFormattedV(
-      prev_error, script, type.token_pos(), Report::AtLocation,
-      Report::kMalboundedType, Heap::kOld, format, args));
-  va_end(args);
-  type.set_error(error);
-  if (!type.IsFinalized()) {
-    type.SetIsFinalized();
-    // Do not canonicalize malbounded types.
-  }
-}
-
 void ClassFinalizer::ReportError(const Error& error) {
   Report::LongJump(error);
   UNREACHABLE();
@@ -3356,7 +2055,6 @@
 //
 //    * RawTypeRef (due to RawTypeRef::type_->type_class_id)
 //    * RawType (due to RawType::signature_'s result/parameter types)
-//    * RawBoundedType (due to RawBoundedType::type_parameter_)
 //    * RawTypeArguments (due to type references)
 //    * RawInstance (due to instance fields)
 //    * RawArray (due to type arguments & array entries)
@@ -3365,7 +2063,6 @@
 //
 //    * RawType::hash_
 //    * RawTypeParameter::hash_
-//    * RawBoundedType::hash_
 //    * RawTypeArguments::hash_
 //
 // No caching of canonical hash codes (i.e. it gets re-computed every time)
@@ -3386,8 +2083,7 @@
   explicit ClearTypeHashVisitor(Zone* zone)
       : type_param_(TypeParameter::Handle(zone)),
         type_(Type::Handle(zone)),
-        type_args_(TypeArguments::Handle(zone)),
-        bounded_type_(BoundedType::Handle(zone)) {}
+        type_args_(TypeArguments::Handle(zone)) {}
 
   void VisitObject(RawObject* obj) {
     if (obj->IsTypeParameter()) {
@@ -3396,9 +2092,6 @@
     } else if (obj->IsType()) {
       type_ ^= obj;
       type_.SetHash(0);
-    } else if (obj->IsBoundedType()) {
-      bounded_type_ ^= obj;
-      bounded_type_.SetHash(0);
     } else if (obj->IsTypeArguments()) {
       type_args_ ^= obj;
       type_args_.SetHash(0);
@@ -3409,7 +2102,6 @@
   TypeParameter& type_param_;
   Type& type_;
   TypeArguments& type_args_;
-  BoundedType& bounded_type_;
 };
 
 void ClassFinalizer::RehashTypes() {
@@ -3482,7 +2174,7 @@
   object_store->set_canonical_type_arguments(typeargs_table.Release());
 }
 
-void ClassFinalizer::ClearAllCode() {
+void ClassFinalizer::ClearAllCode(bool including_nonchanging_cids) {
   class ClearCodeFunctionVisitor : public FunctionVisitor {
     void Visit(const Function& function) {
       function.ClearCode();
@@ -3493,14 +2185,34 @@
   ProgramVisitor::VisitFunctions(&function_visitor);
 
   class ClearCodeClassVisitor : public ClassVisitor {
+   public:
+    explicit ClearCodeClassVisitor(bool force) : force_(force) {}
+
     void Visit(const Class& cls) {
-      if (cls.id() >= kNumPredefinedCids) {
+      if (force_ || cls.id() >= kNumPredefinedCids) {
         cls.DisableAllocationStub();
       }
     }
+
+   private:
+    bool force_;
   };
-  ClearCodeClassVisitor class_visitor;
+  ClearCodeClassVisitor class_visitor(including_nonchanging_cids);
   ProgramVisitor::VisitClasses(&class_visitor);
+
+  // Apart from normal function code and allocation stubs we have two global
+  // code objects to clear.
+  if (including_nonchanging_cids) {
+    auto thread = Thread::Current();
+    auto object_store = thread->isolate()->object_store();
+    auto& null_code = Code::Handle(thread->zone());
+    object_store->set_build_method_extractor_code(null_code);
+
+    auto& miss_function = Function::Handle(
+        thread->zone(), object_store->megamorphic_miss_function());
+    miss_function.ClearCode();
+    object_store->SetMegamorphicMissHandler(null_code, miss_function);
+  }
 }
 
 }  // namespace dart
diff --git a/runtime/vm/class_finalizer.h b/runtime/vm/class_finalizer.h
index 81a13b4..a720aa0 100644
--- a/runtime/vm/class_finalizer.h
+++ b/runtime/vm/class_finalizer.h
@@ -17,13 +17,10 @@
  public:
   typedef ZoneGrowableHandlePtrArray<const AbstractType> PendingTypes;
 
-  // Modes for type resolution and finalization. The ordering is relevant.
+  // Modes for finalization. The ordering is relevant.
   enum FinalizationKind {
-    kIgnore,                 // Type is ignored and replaced by dynamic.
-    kDoNotResolve,           // Type resolution is postponed.
-    kResolveTypeParameters,  // Resolve type parameters only.
-    kFinalize,               // Resolve and finalize type and type arguments.
-    kCanonicalize            // Finalize, check bounds, and canonicalize.
+    kFinalize,     // Finalize type and type arguments.
+    kCanonicalize  // Finalize and canonicalize.
   };
 
   // Finalize given type while parsing class cls.
@@ -39,34 +36,6 @@
                                 const Function& function,
                                 FinalizationKind finalization = kCanonicalize);
 
-  // Allocate, finalize, and return a new malformed type as if it was declared
-  // in class cls at the given token position.
-  // If not null, prepend prev_error to the error message built from the format
-  // string and its arguments.
-  static RawType* NewFinalizedMalformedType(const Error& prev_error,
-                                            const Script& script,
-                                            TokenPosition type_pos,
-                                            const char* format,
-                                            ...) PRINTF_ATTRIBUTE(4, 5);
-
-  // Mark the given type as malformed.
-  // If not null, prepend prev_error to the error message built from the format
-  // string and its arguments.
-  static void FinalizeMalformedType(const Error& prev_error,
-                                    const Script& script,
-                                    const Type& type,
-                                    const char* format,
-                                    ...) PRINTF_ATTRIBUTE(4, 5);
-
-  // Mark the given type as malbounded.
-  // If not null, prepend prev_error to the error message built from the format
-  // string and its arguments.
-  static void FinalizeMalboundedType(const Error& prev_error,
-                                     const Script& script,
-                                     const AbstractType& type,
-                                     const char* format,
-                                     ...) PRINTF_ATTRIBUTE(4, 5);
-
   // Return false if we still have classes pending to be finalized.
   static bool AllClassesFinalized();
 
@@ -74,7 +43,7 @@
   static void SortClasses();
   static void RemapClassIds(intptr_t* old_to_new_cid);
   static void RehashTypes();
-  static void ClearAllCode();
+  static void ClearAllCode(bool including_nonchanging_cids = false);
 
   // Return whether processing pending classes (ObjectStore::pending_classes_)
   // failed. The function returns true if the processing was successful.
@@ -91,53 +60,27 @@
   // Finalize the class including its fields and functions.
   static void FinalizeClass(const Class& cls);
 
+  // Completes loading of the class, this populates the function
+  // and fields of the class.
+  //
+  // Returns Error::null() if there is no loading error.
+  static RawError* LoadClassMembers(const Class& cls);
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
   // Verify that the classes have been properly prefinalized. This is
   // needed during bootstrapping where the classes have been preloaded.
   static void VerifyBootstrapClasses();
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
-  // Resolve the class of the type, but not the type's type arguments.
-  // May promote the type to function type by setting its signature field.
-  static void ResolveTypeClass(const Class& cls, const Type& type);
-
-  // Resolve the type and target of the redirecting factory.
-  static void ResolveRedirectingFactory(const Class& cls,
-                                        const Function& factory);
-
-  // Apply the mixin type to the mixin application class.
-  static void ApplyMixinType(const Class& mixin_app_class,
-                             PendingTypes* pending_types = NULL);
-
  private:
   static void AllocateEnumValues(const Class& enum_cls);
   static bool IsSuperCycleFree(const Class& cls);
   static bool IsTypedefCycleFree(const Class& cls,
                                  const AbstractType& type,
                                  GrowableArray<intptr_t>* visited);
-  static bool IsMixinCycleFree(const Class& cls,
-                               GrowableArray<intptr_t>* visited);
   static void CheckForLegalConstClass(const Class& cls);
-  static void ResolveType(const Class& cls, const AbstractType& type);
-  static void ResolveRedirectingFactoryTarget(
-      const Class& cls,
-      const Function& factory,
-      const GrowableObjectArray& visited_factories);
-  static void CloneMixinAppTypeParameters(const Class& mixin_app_class);
-  static void ApplyMixinAppAlias(const Class& mixin_app_class,
-                                 const TypeArguments& instantiator);
-  static void ApplyMixinMembers(const Class& cls);
-  static void CreateForwardingConstructors(
-      const Class& mixin_app,
-      const Class& mixin_cls,
-      const GrowableObjectArray& cloned_funcs);
-  static void CollectTypeArguments(const Class& cls,
-                                   const Type& type,
-                                   const GrowableObjectArray& collected_args);
-  static RawType* ResolveMixinAppType(const Class& cls,
-                                      const MixinAppType& mixin_app_type);
-  static void ResolveSuperTypeAndInterfaces(const Class& cls,
-                                            GrowableArray<intptr_t>* visited);
+  static void CheckSuperTypeAndInterfaces(const Class& cls,
+                                          GrowableArray<intptr_t>* visited);
   static void FinalizeTypeParameters(const Class& cls,
                                      PendingTypes* pending_types = NULL);
   static intptr_t ExpandAndFinalizeTypeArguments(const Class& cls,
@@ -146,27 +89,17 @@
   static void FinalizeTypeArguments(const Class& cls,
                                     const TypeArguments& arguments,
                                     intptr_t num_uninitialized_arguments,
-                                    Error* bound_error,
                                     PendingTypes* pending_types,
                                     TrailPtr trail);
   static void CheckRecursiveType(const Class& cls,
                                  const AbstractType& type,
                                  PendingTypes* pending_types);
-  static void ResolveUpperBounds(const Class& cls);
   static void FinalizeUpperBounds(
       const Class& cls,
       FinalizationKind finalization = kCanonicalize);
-  static void ResolveSignature(const Class& cls, const Function& function);
-  static void ResolveAndFinalizeMemberTypes(const Class& cls);
+  static void FinalizeMemberTypes(const Class& cls);
   static void PrintClassInformation(const Class& cls);
-  static void CollectInterfaces(const Class& cls,
-                                GrowableArray<const Class*>* collected);
 
-  static void MarkTypeMalformed(const Error& prev_error,
-                                const Script& script,
-                                const Type& type,
-                                const char* format,
-                                va_list args);
   static void ReportError(const Error& error);
   static void ReportError(const Class& cls,
                           TokenPosition token_pos,
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 118143ed..27536c5 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -7,6 +7,7 @@
 #include "platform/assert.h"
 #include "vm/bootstrap.h"
 #include "vm/compiler/backend/code_statistics.h"
+#include "vm/compiler/relocation.h"
 #include "vm/dart.h"
 #include "vm/heap/heap.h"
 #include "vm/image_snapshot.h"
@@ -23,6 +24,41 @@
 
 namespace dart {
 
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32) &&                 \
+    !defined(TARGET_ARCH_DBC)
+
+static void RelocateCodeObjects(
+    bool is_vm,
+    GrowableArray<RawCode*>* code_objects,
+    GrowableArray<ImageWriterCommand>* image_writer_commands) {
+  auto thread = Thread::Current();
+  auto isolate = is_vm ? Dart::vm_isolate() : thread->isolate();
+
+  WritableCodePages writable_code_pages(thread, isolate);
+  CodeRelocator::Relocate(thread, code_objects, image_writer_commands, is_vm);
+}
+
+class RawCodeKeyValueTrait {
+ public:
+  // Typedefs needed for the DirectChainedHashMap template.
+  typedef const RawCode* Key;
+  typedef const RawCode* Value;
+  typedef const RawCode* Pair;
+
+  static Key KeyOf(Pair kv) { return kv; }
+  static Value ValueOf(Pair kv) { return kv; }
+  static inline intptr_t Hashcode(Key key) {
+    return reinterpret_cast<intptr_t>(key);
+  }
+
+  static inline bool IsKeyEqual(Pair pair, Key key) { return pair == key; }
+};
+
+typedef DirectChainedHashMap<RawCodeKeyValueTrait> RawCodeSet;
+
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32) &&          \
+        // !defined(TARGET_ARCH_DBC)
+
 static RawObject* AllocateUninitialized(PageSpace* old_space, intptr_t size) {
   ASSERT(Utils::IsAligned(size, kObjectAlignment));
   uword address =
@@ -1397,6 +1433,8 @@
     }
   }
 
+  GrowableArray<RawCode*>* discovered_objects() { return &objects_; }
+
  private:
   GrowableArray<RawCode*> objects_;
 };
@@ -1408,17 +1446,46 @@
   ~CodeDeserializationCluster() {}
 
   void ReadAlloc(Deserializer* d) {
+    const bool is_vm_object = d->isolate() == Dart::vm_isolate();
+
     start_index_ = d->next_index();
     PageSpace* old_space = d->heap()->old_space();
-    intptr_t count = d->ReadUnsigned();
-    for (intptr_t i = 0; i < count; i++) {
-      d->AssignRef(AllocateUninitialized(old_space, Code::InstanceSize(0)));
+    const intptr_t count = d->ReadUnsigned();
+
+    // Build an array of code objects representing the order in which the
+    // [Code]'s instructions will be located in memory.
+    const bool build_code_order =
+        FLAG_precompiled_mode && FLAG_use_bare_instructions;
+    RawArray* code_order = nullptr;
+    const intptr_t code_order_length = d->code_order_length();
+    if (build_code_order) {
+      code_order = static_cast<RawArray*>(
+          AllocateUninitialized(old_space, Array::InstanceSize(count)));
+      Deserializer::InitializeHeader(code_order, kArrayCid,
+                                     Array::InstanceSize(count), is_vm_object,
+                                     /*is_canonical=*/false);
+      code_order->ptr()->type_arguments_ = TypeArguments::null();
+      code_order->ptr()->length_ = Smi::New(code_order_length);
     }
+
+    for (intptr_t i = 0; i < count; i++) {
+      auto code = AllocateUninitialized(old_space, Code::InstanceSize(0));
+      d->AssignRef(code);
+      if (code_order != nullptr && i < code_order_length) {
+        code_order->ptr()->data()[i] = code;
+      }
+    }
+
+    if (code_order != nullptr) {
+      const auto& code_order_table = Array::Handle(code_order);
+      d->isolate()->object_store()->set_code_order_table(code_order_table);
+    }
+
     stop_index_ = d->next_index();
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
+    const bool is_vm_object = d->isolate() == Dart::vm_isolate();
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawCode* code = reinterpret_cast<RawCode*>(d->Ref(id));
@@ -1430,10 +1497,12 @@
       code->ptr()->entry_point_ = Instructions::EntryPoint(instr);
       code->ptr()->monomorphic_entry_point_ =
           Instructions::MonomorphicEntryPoint(instr);
-      NOT_IN_PRECOMPILED(code->ptr()->active_instructions_ = instr);
-      code->ptr()->instructions_ = instr;
       code->ptr()->unchecked_entry_point_ =
           Instructions::UncheckedEntryPoint(instr);
+      code->ptr()->monomorphic_unchecked_entry_point_ =
+          Instructions::MonomorphicUncheckedEntryPoint(instr);
+      NOT_IN_PRECOMPILED(code->ptr()->active_instructions_ = instr);
+      code->ptr()->instructions_ = instr;
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
       if (d->kind() == Snapshot::kFullJIT) {
@@ -2271,6 +2340,32 @@
       cache->ptr()->filled_entry_count_ = d->Read<int32_t>();
     }
   }
+
+  void PostLoad(const Array& refs, Snapshot::Kind kind, Zone* zone) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    if (FLAG_use_bare_instructions) {
+      // By default, every megamorphic call site will load the target
+      // [Function] from the hash table and call indirectly via loading the
+      // entrypoint from the function.
+      //
+      // In --use-bare-instruction we reduce the extra indirection via the
+      // [Function] object by storing the entry point directly into the hashmap.
+      //
+      // Currently our AOT compiler will emit megamorphic calls in certain
+      // situations (namely in slow-path code of CheckedSmi* instructions).
+      //
+      // TODO(compiler-team): Change the CheckedSmi* slow path code to use
+      // normal switchable calls instead of megamorphic calls. (This is also a
+      // memory balance beause [MegamorphicCache]s are per-selector while
+      // [ICData] are per-callsite.)
+      auto& cache = MegamorphicCache::Handle(zone);
+      for (intptr_t i = start_index_; i < stop_index_; ++i) {
+        cache ^= refs.At(i);
+        cache.SwitchToBareInstructions();
+      }
+    }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+  }
 };
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
@@ -3056,70 +3151,6 @@
 };
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
-class BoundedTypeSerializationCluster : public SerializationCluster {
- public:
-  BoundedTypeSerializationCluster() : SerializationCluster("BoundedType") {}
-  ~BoundedTypeSerializationCluster() {}
-
-  void Trace(Serializer* s, RawObject* object) {
-    RawBoundedType* type = BoundedType::RawCast(object);
-    objects_.Add(type);
-    PushFromTo(type);
-  }
-
-  void WriteAlloc(Serializer* s) {
-    s->WriteCid(kBoundedTypeCid);
-    intptr_t count = objects_.length();
-    s->WriteUnsigned(count);
-    for (intptr_t i = 0; i < count; i++) {
-      RawBoundedType* type = objects_[i];
-      s->AssignRef(type);
-    }
-  }
-
-  void WriteFill(Serializer* s) {
-    intptr_t count = objects_.length();
-    for (intptr_t i = 0; i < count; i++) {
-      RawBoundedType* type = objects_[i];
-      AutoTraceObject(type);
-      WriteFromTo(type);
-    }
-  }
-
- private:
-  GrowableArray<RawBoundedType*> objects_;
-};
-#endif  // !DART_PRECOMPILED_RUNTIME
-
-class BoundedTypeDeserializationCluster : public DeserializationCluster {
- public:
-  BoundedTypeDeserializationCluster() {}
-  ~BoundedTypeDeserializationCluster() {}
-
-  void ReadAlloc(Deserializer* d) {
-    start_index_ = d->next_index();
-    PageSpace* old_space = d->heap()->old_space();
-    intptr_t count = d->ReadUnsigned();
-    for (intptr_t i = 0; i < count; i++) {
-      d->AssignRef(
-          AllocateUninitialized(old_space, BoundedType::InstanceSize()));
-    }
-    stop_index_ = d->next_index();
-  }
-
-  void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
-    for (intptr_t id = start_index_; id < stop_index_; id++) {
-      RawBoundedType* type = reinterpret_cast<RawBoundedType*>(d->Ref(id));
-      Deserializer::InitializeHeader(type, kBoundedTypeCid,
-                                     BoundedType::InstanceSize(), is_vm_object);
-      ReadFromTo(type);
-    }
-  }
-};
-
-#if !defined(DART_PRECOMPILED_RUNTIME)
 class ClosureSerializationCluster : public SerializationCluster {
  public:
   ClosureSerializationCluster() : SerializationCluster("Closure") {}
@@ -4331,8 +4362,6 @@
       return new (Z) TypeRefSerializationCluster(type_testing_stubs_);
     case kTypeParameterCid:
       return new (Z) TypeParameterSerializationCluster(type_testing_stubs_);
-    case kBoundedTypeCid:
-      return new (Z) BoundedTypeSerializationCluster();
     case kClosureCid:
       return new (Z) ClosureSerializationCluster();
     case kMintCid:
@@ -4483,7 +4512,6 @@
     ASSERT(heap_->GetObjectId(object) != 0);
     stack_.Add(object);
     num_written_objects_++;
-
 #if defined(SNAPSHOT_BACKTRACE)
     parent_pairs_.Add(&Object::Handle(zone_, object));
     parent_pairs_.Add(&Object::Handle(zone_, current_parent_));
@@ -4585,6 +4613,46 @@
     Trace(stack_.RemoveLast());
   }
 
+  intptr_t code_order_length = 0;
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32) &&                 \
+    !defined(TARGET_ARCH_DBC)
+  if (Snapshot::IncludesCode(kind_)) {
+    auto code_objects =
+        static_cast<CodeSerializationCluster*>(clusters_by_cid_[kCodeCid])
+            ->discovered_objects();
+
+    GrowableArray<ImageWriterCommand> writer_commands;
+    RelocateCodeObjects(vm_, code_objects, &writer_commands);
+    image_writer_->PrepareForSerialization(&writer_commands);
+
+    // We permute the code objects in the [CodeSerializationCluster] so they
+    // will arrive in the order in which the [Code]'s instructions will be in
+    // memory at AOT runtime.
+    GrowableArray<RawCode*> code_order;
+    RawCodeSet code_set;
+    for (auto& command : writer_commands) {
+      if (command.op == ImageWriterCommand::InsertInstructionOfCode) {
+        RawCode* code = command.insert_instruction_of_code.code;
+        ASSERT(!code_set.HasKey(code));
+        code_set.Insert(code);
+        code_order.Add(code);
+        code_order_length++;
+      }
+    }
+    for (RawCode* code : *code_objects) {
+      if (!code_set.HasKey(code)) {
+        code_set.Insert(code);
+        code_order.Add(code);
+      }
+    }
+    RELEASE_ASSERT(code_order.length() == code_objects->length());
+    for (intptr_t i = 0; i < code_objects->length(); ++i) {
+      (*code_objects)[i] = code_order[i];
+    }
+  }
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32) &&          \
+        // !defined(TARGET_ARCH_DBC)
+
   intptr_t num_clusters = 0;
   for (intptr_t cid = 1; cid < num_cids_; cid++) {
     SerializationCluster* cluster = clusters_by_cid_[cid];
@@ -4603,6 +4671,7 @@
   WriteUnsigned(num_base_objects_);
   WriteUnsigned(num_objects);
   WriteUnsigned(num_clusters);
+  WriteUnsigned(code_order_length);
 
   for (intptr_t cid = 1; cid < num_cids_; cid++) {
     SerializationCluster* cluster = clusters_by_cid_[cid];
@@ -4821,7 +4890,6 @@
 
 DeserializationCluster* Deserializer::ReadCluster() {
   intptr_t cid = ReadCid();
-
   Zone* Z = zone_;
   if ((cid >= kNumPredefinedCids) || (cid == kInstanceCid) ||
       RawObject::IsTypedDataViewClassId(cid)) {
@@ -4899,8 +4967,6 @@
       return new (Z) TypeRefDeserializationCluster();
     case kTypeParameterCid:
       return new (Z) TypeParameterDeserializationCluster();
-    case kBoundedTypeCid:
-      return new (Z) BoundedTypeDeserializationCluster();
     case kClosureCid:
       return new (Z) ClosureDeserializationCluster();
     case kMintCid:
@@ -5033,6 +5099,7 @@
   num_base_objects_ = ReadUnsigned();
   num_objects_ = ReadUnsigned();
   num_clusters_ = ReadUnsigned();
+  code_order_length_ = ReadUnsigned();
 
   clusters_ = new DeserializationCluster*[num_clusters_];
   refs_ = Array::New(num_objects_ + 1, Heap::kOld);
@@ -5577,7 +5644,38 @@
     }
   }
 
-  deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store());
+  auto object_store = thread_->isolate()->object_store();
+  deserializer.ReadIsolateSnapshot(object_store);
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+  if (FLAG_use_bare_instructions) {
+    // By default, every switchable call site will put (ic_data, code) into the
+    // object pool.  The [code] is initialized (at AOT compile-time) to be a
+    // [StubCode::UnlinkedCall].
+    //
+    // In --use-bare-instruction we reduce the extra indirection via the [code]
+    // object and store instead (ic_data, entrypoint) in the object pool.
+    //
+    // Since the actual [entrypoint] is only known at AOT runtime we switch all
+    // existing UnlinkedCall entries in the object pool to be it's entrypoint.
+    auto zone = thread_->zone();
+    const auto& pool = ObjectPool::Handle(
+        zone, ObjectPool::RawCast(object_store->global_object_pool()));
+    auto& entry = Object::Handle(zone);
+    auto& smi = Smi::Handle(zone);
+    for (intptr_t i = 0; i < pool.Length(); i++) {
+      if (pool.TypeAt(i) == ObjectPool::kTaggedObject) {
+        entry = pool.ObjectAt(i);
+        if (entry.raw() == StubCode::UnlinkedCall().raw()) {
+          smi = Smi::FromAlignedAddress(
+              StubCode::UnlinkedCall().MonomorphicEntryPoint());
+          pool.SetTypeAt(i, ObjectPool::kImmediate, ObjectPool::kPatchable);
+          pool.SetObjectAt(i, smi);
+        }
+      }
+    }
+  }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 
   return ApiError::null();
 }
diff --git a/runtime/vm/clustered_snapshot.h b/runtime/vm/clustered_snapshot.h
index 412ffb5..f1eb0c9 100644
--- a/runtime/vm/clustered_snapshot.h
+++ b/runtime/vm/clustered_snapshot.h
@@ -13,6 +13,7 @@
 #include "vm/growable_array.h"
 #include "vm/hash_map.h"
 #include "vm/heap/heap.h"
+#include "vm/image_snapshot.h"
 #include "vm/object.h"
 #include "vm/raw_object_fields.h"
 #include "vm/snapshot.h"
@@ -527,6 +528,21 @@
   Heap* heap() const { return heap_; }
   Snapshot::Kind kind() const { return kind_; }
 
+  // The number of code objects which were relocated during AOT snapshot
+  // writing.
+  //
+  // After relocating the instructions in the ".text" segment, the
+  // [CodeSerializationCluster] will re-order those code objects that get
+  // written out in the cluster.  The order will be dictated by the order of
+  // the code's instructions in the ".text" segment.
+  //
+  // The [code_order_length] represents therefore the prefix of code objects in
+  // the written out code cluster. (There might be code objects for which no
+  // relocation was performed.)
+  //
+  // This will be used to construct [ObjectStore::code_order_table].
+  intptr_t code_order_length() const { return code_order_length_; }
+
  private:
   Heap* heap_;
   Zone* zone_;
@@ -536,6 +552,7 @@
   intptr_t num_base_objects_;
   intptr_t num_objects_;
   intptr_t num_clusters_;
+  intptr_t code_order_length_ = 0;
   RawArray* refs_;
   intptr_t next_ref_index_;
   DeserializationCluster** clusters_;
diff --git a/runtime/vm/code_patcher.cc b/runtime/vm/code_patcher.cc
index 3546b60..4926926 100644
--- a/runtime/vm/code_patcher.cc
+++ b/runtime/vm/code_patcher.cc
@@ -28,7 +28,7 @@
   }
 }
 
-bool MatchesPattern(uword end, int16_t* pattern, intptr_t size) {
+bool MatchesPattern(uword end, const int16_t* pattern, intptr_t size) {
   // When breaking within generated code in GDB, it may overwrite individual
   // instructions with trap instructions, which can cause this test to fail.
   //
diff --git a/runtime/vm/code_patcher.h b/runtime/vm/code_patcher.h
index 8b69986..9b31dcd 100644
--- a/runtime/vm/code_patcher.h
+++ b/runtime/vm/code_patcher.h
@@ -108,7 +108,7 @@
 // [0..255] values in [pattern] have to match, negative values are skipped.
 //
 // Example pattern: `[0x3d, 0x8b, -1, -1]`.
-bool MatchesPattern(uword end, int16_t* pattern, intptr_t size);
+bool MatchesPattern(uword end, const int16_t* pattern, intptr_t size);
 
 class KBCPatcher : public AllStatic {
  public:
diff --git a/runtime/vm/code_patcher_arm.cc b/runtime/vm/code_patcher_arm.cc
index f7204fa..258b035 100644
--- a/runtime/vm/code_patcher_arm.cc
+++ b/runtime/vm/code_patcher_arm.cc
@@ -61,23 +61,39 @@
                                         const Object& data,
                                         const Code& target) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCallPattern call(return_address, caller_code);
-  call.SetData(data);
-  call.SetTarget(target);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCallPattern call(return_address, caller_code);
+    call.SetData(data);
+    call.SetTarget(target);
+  } else {
+    SwitchableCallPattern call(return_address, caller_code);
+    call.SetData(data);
+    call.SetTarget(target);
+  }
 }
 
 RawCode* CodePatcher::GetSwitchableCallTargetAt(uword return_address,
                                                 const Code& caller_code) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCallPattern call(return_address, caller_code);
-  return call.target();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCallPattern call(return_address, caller_code);
+    return call.target();
+  } else {
+    SwitchableCallPattern call(return_address, caller_code);
+    return call.target();
+  }
 }
 
 RawObject* CodePatcher::GetSwitchableCallDataAt(uword return_address,
                                                 const Code& caller_code) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCallPattern call(return_address, caller_code);
-  return call.data();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCallPattern call(return_address, caller_code);
+    return call.data();
+  } else {
+    SwitchableCallPattern call(return_address, caller_code);
+    return call.data();
+  }
 }
 
 void CodePatcher::PatchNativeCallAt(uword return_address,
diff --git a/runtime/vm/code_patcher_arm64.cc b/runtime/vm/code_patcher_arm64.cc
index d084ac1..7716090 100644
--- a/runtime/vm/code_patcher_arm64.cc
+++ b/runtime/vm/code_patcher_arm64.cc
@@ -96,23 +96,39 @@
                                         const Object& data,
                                         const Code& target) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCallPattern call(return_address, caller_code);
-  call.SetData(data);
-  call.SetTarget(target);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCallPattern call(return_address, caller_code);
+    call.SetData(data);
+    call.SetTarget(target);
+  } else {
+    SwitchableCallPattern call(return_address, caller_code);
+    call.SetData(data);
+    call.SetTarget(target);
+  }
 }
 
 RawCode* CodePatcher::GetSwitchableCallTargetAt(uword return_address,
                                                 const Code& caller_code) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCallPattern call(return_address, caller_code);
-  return call.target();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCallPattern call(return_address, caller_code);
+    return call.target();
+  } else {
+    SwitchableCallPattern call(return_address, caller_code);
+    return call.target();
+  }
 }
 
 RawObject* CodePatcher::GetSwitchableCallDataAt(uword return_address,
                                                 const Code& caller_code) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCallPattern call(return_address, caller_code);
-  return call.data();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCallPattern call(return_address, caller_code);
+    return call.data();
+  } else {
+    SwitchableCallPattern call(return_address, caller_code);
+    return call.data();
+  }
 }
 
 void CodePatcher::PatchNativeCallAt(uword return_address,
diff --git a/runtime/vm/code_patcher_x64.cc b/runtime/vm/code_patcher_x64.cc
index 9915d70..1794125 100644
--- a/runtime/vm/code_patcher_x64.cc
+++ b/runtime/vm/code_patcher_x64.cc
@@ -12,7 +12,9 @@
 #include "vm/dart_entry.h"
 #include "vm/instructions.h"
 #include "vm/object.h"
+#include "vm/object_store.h"
 #include "vm/raw_object.h"
+#include "vm/reverse_pc_lookup_cache.h"
 
 namespace dart {
 
@@ -209,12 +211,41 @@
 //   load guarded cid            load ICData             load MegamorphicCache
 //   load monomorphic target <-> load ICLookup stub  ->  load MMLookup stub
 //   call target.entry           call stub.entry         call stub.entry
-class SwitchableCall : public ValueObject {
+class SwitchableCallBase : public ValueObject {
  public:
-  SwitchableCall(uword return_address, const Code& code)
+  explicit SwitchableCallBase(const Code& code)
       : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
         target_index_(-1),
-        data_index_(-1) {
+        data_index_(-1) {}
+
+  intptr_t data_index() const { return data_index_; }
+  intptr_t target_index() const { return target_index_; }
+
+  RawObject* data() const { return object_pool_.ObjectAt(data_index()); }
+
+  void SetData(const Object& data) const {
+    ASSERT(!Object::Handle(object_pool_.ObjectAt(data_index())).IsCode());
+    object_pool_.SetObjectAt(data_index(), data);
+    // No need to flush the instruction cache, since the code is not modified.
+  }
+
+ protected:
+  ObjectPool& object_pool_;
+  intptr_t target_index_;
+  intptr_t data_index_;
+
+ private:
+  DISALLOW_IMPLICIT_CONSTRUCTORS(SwitchableCallBase);
+};
+
+// See [SwitchableCallBase] for a switchable calls in general.
+//
+// The target slot is always a [Code] object: Either the code of the
+// monomorphic function or a stub code.
+class SwitchableCall : public SwitchableCallBase {
+ public:
+  SwitchableCall(uword return_address, const Code& code)
+      : SwitchableCallBase(code) {
     uword pc = return_address;
 
     // callq RCX
@@ -248,7 +279,7 @@
 
     // movq rcx, [CODE_REG + entrypoint_offset]
     static int16_t load_entry_pattern[] = {
-        0x49, 0x8b, 0x4c, 0x24, 0x0f,
+        0x49, 0x8b, 0x4c, 0x24, -1,
     };
     if (MatchesPattern(pc, load_entry_pattern,
                        ARRAY_SIZE(load_entry_pattern))) {
@@ -277,33 +308,96 @@
     ASSERT(Object::Handle(object_pool_.ObjectAt(target_index_)).IsCode());
   }
 
-  intptr_t data_index() const { return data_index_; }
-  intptr_t target_index() const { return target_index_; }
-
-  RawObject* data() const { return object_pool_.ObjectAt(data_index()); }
-  RawCode* target() const {
-    return reinterpret_cast<RawCode*>(object_pool_.ObjectAt(target_index()));
-  }
-
-  void SetData(const Object& data) const {
-    ASSERT(!Object::Handle(object_pool_.ObjectAt(data_index())).IsCode());
-    object_pool_.SetObjectAt(data_index(), data);
-    // No need to flush the instruction cache, since the code is not modified.
-  }
-
   void SetTarget(const Code& target) const {
     ASSERT(Object::Handle(object_pool_.ObjectAt(target_index())).IsCode());
     object_pool_.SetObjectAt(target_index(), target);
     // No need to flush the instruction cache, since the code is not modified.
   }
 
- protected:
-  const ObjectPool& object_pool_;
-  intptr_t target_index_;
-  intptr_t data_index_;
+  RawCode* target() const {
+    return reinterpret_cast<RawCode*>(object_pool_.ObjectAt(target_index()));
+  }
+};
 
- private:
-  DISALLOW_IMPLICIT_CONSTRUCTORS(SwitchableCall);
+// See [SwitchableCallBase] for a switchable calls in general.
+//
+// The target slot is always a direct entrypoint address: Either the entry point
+// of the monomorphic function or a stub entry point.
+class BareSwitchableCall : public SwitchableCallBase {
+ public:
+  BareSwitchableCall(uword return_address, const Code& code)
+      : SwitchableCallBase(code) {
+    object_pool_ = ObjectPool::RawCast(
+        Isolate::Current()->object_store()->global_object_pool());
+
+    uword pc = return_address;
+
+    // callq RCX
+    static int16_t call_pattern[] = {
+        0xff, 0xd1,  //
+    };
+    if (MatchesPattern(pc, call_pattern, ARRAY_SIZE(call_pattern))) {
+      pc -= ARRAY_SIZE(call_pattern);
+    } else {
+      FATAL1("Failed to decode at %" Px, pc);
+    }
+
+    // movq RBX, [PP + offset]
+    static int16_t load_data_disp8[] = {
+        0x49, 0x8b, 0x5f, -1,  //
+    };
+    static int16_t load_data_disp32[] = {
+        0x49, 0x8b, 0x9f, -1, -1, -1, -1,
+    };
+    if (MatchesPattern(pc, load_data_disp8, ARRAY_SIZE(load_data_disp8))) {
+      pc -= ARRAY_SIZE(load_data_disp8);
+      data_index_ = IndexFromPPLoadDisp8(pc + 3);
+    } else if (MatchesPattern(pc, load_data_disp32,
+                              ARRAY_SIZE(load_data_disp32))) {
+      pc -= ARRAY_SIZE(load_data_disp32);
+      data_index_ = IndexFromPPLoadDisp32(pc + 3);
+    } else {
+      FATAL1("Failed to decode at %" Px, pc);
+    }
+    ASSERT(!Object::Handle(object_pool_.ObjectAt(data_index_)).IsCode());
+
+    // movq RCX, [PP + offset]
+    static int16_t load_code_disp8[] = {
+        0x49, 0x8b, 0x4f, -1,  //
+    };
+    static int16_t load_code_disp32[] = {
+        0x49, 0x8b, 0x8f, -1, -1, -1, -1,
+    };
+    if (MatchesPattern(pc, load_code_disp8, ARRAY_SIZE(load_code_disp8))) {
+      pc -= ARRAY_SIZE(load_code_disp8);
+      target_index_ = IndexFromPPLoadDisp8(pc + 3);
+    } else if (MatchesPattern(pc, load_code_disp32,
+                              ARRAY_SIZE(load_code_disp32))) {
+      pc -= ARRAY_SIZE(load_code_disp32);
+      target_index_ = IndexFromPPLoadDisp32(pc + 3);
+    } else {
+      FATAL1("Failed to decode at %" Px, pc);
+    }
+    ASSERT(object_pool_.TypeAt(target_index_) == ObjectPool::kImmediate);
+  }
+
+  void SetTarget(const Code& target) const {
+    ASSERT(object_pool_.TypeAt(target_index()) == ObjectPool::kImmediate);
+    object_pool_.SetRawValueAt(target_index(), target.MonomorphicEntryPoint());
+  }
+
+  RawCode* target() const {
+    const uword pc = object_pool_.RawValueAt(target_index());
+    auto rct = Isolate::Current()->reverse_pc_lookup_cache();
+    if (rct->Contains(pc)) {
+      return rct->Lookup(pc);
+    }
+    rct = Dart::vm_isolate()->reverse_pc_lookup_cache();
+    if (rct->Contains(pc)) {
+      return rct->Lookup(pc);
+    }
+    UNREACHABLE();
+  }
 };
 
 RawCode* CodePatcher::GetStaticCallTargetAt(uword return_address,
@@ -360,23 +454,39 @@
                                         const Object& data,
                                         const Code& target) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCall call(return_address, caller_code);
-  call.SetData(data);
-  call.SetTarget(target);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCall call(return_address, caller_code);
+    call.SetData(data);
+    call.SetTarget(target);
+  } else {
+    SwitchableCall call(return_address, caller_code);
+    call.SetData(data);
+    call.SetTarget(target);
+  }
 }
 
 RawCode* CodePatcher::GetSwitchableCallTargetAt(uword return_address,
                                                 const Code& caller_code) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCall call(return_address, caller_code);
-  return call.target();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCall call(return_address, caller_code);
+    return call.target();
+  } else {
+    SwitchableCall call(return_address, caller_code);
+    return call.target();
+  }
 }
 
 RawObject* CodePatcher::GetSwitchableCallDataAt(uword return_address,
                                                 const Code& caller_code) {
   ASSERT(caller_code.ContainsInstructionAt(return_address));
-  SwitchableCall call(return_address, caller_code);
-  return call.data();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    BareSwitchableCall call(return_address, caller_code);
+    return call.data();
+  } else {
+    SwitchableCall call(return_address, caller_code);
+    return call.data();
+  }
 }
 
 void CodePatcher::PatchNativeCallAt(uword return_address,
diff --git a/runtime/vm/compilation_trace.cc b/runtime/vm/compilation_trace.cc
index 3d978a3..a05f94f 100644
--- a/runtime/vm/compilation_trace.cc
+++ b/runtime/vm/compilation_trace.cc
@@ -247,7 +247,7 @@
   if (!field_.IsNull() && field_.is_const() && field_.is_static() &&
       (field_.StaticValue() == Object::sentinel().raw())) {
     processed = true;
-    error_ = EvaluateInitializer(field_);
+    error_ = field_.EvaluateInitializer();
     if (error_.IsError()) {
       if (FLAG_trace_compilation_trace) {
         THR_Print(
@@ -303,19 +303,6 @@
   return Compiler::CompileFunction(thread_, function);
 }
 
-RawObject* CompilationTraceLoader::EvaluateInitializer(const Field& field) {
-  LongJumpScope jump;
-  if (setjmp(*jump.Set()) == 0) {
-    field_.EvaluateInitializer();
-  } else {
-    Thread* thread = Thread::Current();
-    const Error& error = Error::Handle(thread->sticky_error());
-    thread->clear_sticky_error();
-    return error.raw();
-  }
-  return Object::null();
-}
-
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 }  // namespace dart
diff --git a/runtime/vm/compilation_trace.h b/runtime/vm/compilation_trace.h
index 865cb12..7e489d9 100644
--- a/runtime/vm/compilation_trace.h
+++ b/runtime/vm/compilation_trace.h
@@ -43,7 +43,6 @@
                            const char* cls_cstr,
                            const char* func_cstr);
   RawObject* CompileFunction(const Function& function);
-  RawObject* EvaluateInitializer(const Field& field);
 
   Thread* thread_;
   Zone* zone_;
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index fba0ee4..1e6a8b3 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -550,14 +550,13 @@
       return false;
     }
 
-    // Issue http://dartbug.com/35180 for adding support for Token::kBIT_NOT
-    // here.
 #ifndef TARGET_ARCH_DBC
-    if (op_kind == Token::kNEGATE) {
-      left_value = PrepareStaticOpInput(left_value, kMintCid, instr);
-      replacement =
-          new (Z) UnaryInt64OpInstr(Token::kNEGATE, left_value, DeoptId::kNone,
-                                    Instruction::kNotSpeculative);
+    if (FlowGraphCompiler::SupportsUnboxedInt64()) {
+      if (op_kind == Token::kNEGATE || op_kind == Token::kBIT_NOT) {
+        left_value = PrepareStaticOpInput(left_value, kMintCid, instr);
+        replacement = new (Z) UnaryInt64OpInstr(
+            op_kind, left_value, DeoptId::kNone, Instruction::kNotSpeculative);
+      }
     }
 #endif
   }
@@ -608,7 +607,7 @@
       case Token::kNE: {
         // TODO(dartbug.com/32166): Support EQ, NE for nullable doubles.
         // (requires null-aware comparison instruction).
-        if (right_type->IsDouble()) {
+        if (left_type->IsDouble() && right_type->IsDouble()) {
           left_value = PrepareStaticOpInput(left_value, kDoubleCid, instr);
           right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
           replacement = new (Z) EqualityCompareInstr(
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index d355960..d250b51 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -24,6 +24,7 @@
 #include "vm/compiler/compiler_pass.h"
 #include "vm/compiler/compiler_state.h"
 #include "vm/compiler/frontend/flow_graph_builder.h"
+#include "vm/compiler/frontend/kernel_to_il.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/dart_entry.h"
 #include "vm/exceptions.h"
@@ -58,6 +59,7 @@
 #define Z (zone())
 
 DEFINE_FLAG(bool, print_unique_targets, false, "Print unique dynamic targets");
+DEFINE_FLAG(bool, print_gop, false, "Print global object pool");
 DEFINE_FLAG(bool, trace_precompiler, false, "Trace precompiler.");
 DEFINE_FLAG(
     int,
@@ -84,6 +86,8 @@
 DECLARE_FLAG(int, inlining_constant_arguments_min_size_threshold);
 DECLARE_FLAG(bool, print_instruction_stats);
 
+Precompiler* Precompiler::singleton_ = nullptr;
+
 #if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
     !defined(TARGET_ARCH_IA32)
 
@@ -142,10 +146,7 @@
     precompiler.DoCompileAll();
     return Error::null();
   } else {
-    Thread* thread = Thread::Current();
-    const Error& error = Error::Handle(thread->sticky_error());
-    thread->clear_sticky_error();
-    return error.raw();
+    return Thread::Current()->StealStickyError();
   }
 }
 
@@ -176,7 +177,15 @@
       types_to_retain_(),
       consts_to_retain_(),
       error_(Error::Handle()),
-      get_runtime_type_is_unique_(false) {}
+      get_runtime_type_is_unique_(false) {
+  ASSERT(Precompiler::singleton_ == NULL);
+  Precompiler::singleton_ = this;
+}
+
+Precompiler::~Precompiler() {
+  ASSERT(Precompiler::singleton_ == this);
+  Precompiler::singleton_ = NULL;
+}
 
 void Precompiler::DoCompileAll() {
   ASSERT(I->compilation_allowed());
@@ -185,8 +194,16 @@
     StackZone stack_zone(T);
     zone_ = stack_zone.GetZone();
 
+    if (FLAG_use_bare_instructions) {
+      // Since we keep the object pool until the end of AOT compilation, it
+      // will hang on to its entries until the very end. Therefore we have
+      // to use handles which survive that long, so we use [zone_] here.
+      global_object_pool_wrapper_.InitializeWithZone(zone_);
+    }
+
     {
       HANDLESCOPE(T);
+
       // Make sure class hierarchy is stable before compilation so that CHA
       // can be used. Also ensures lookup of entry points won't miss functions
       // because their class hasn't been finalized yet.
@@ -205,10 +222,35 @@
 
       // Precompile constructors to compute information such as
       // optimized instruction count (used in inlining heuristics).
-      ClassFinalizer::ClearAllCode();
+      ClassFinalizer::ClearAllCode(
+          /*including_nonchanging_cids=*/FLAG_use_bare_instructions);
       PrecompileConstructors();
 
-      ClassFinalizer::ClearAllCode();
+      ClassFinalizer::ClearAllCode(
+          /*including_nonchanging_cids=*/FLAG_use_bare_instructions);
+
+      // All stubs have already been generated, all of them share the same pool.
+      // We use that pool to initialize our global object pool, to guarantee
+      // stubs as well as code compiled from here on will have the same pool.
+      if (FLAG_use_bare_instructions) {
+        // We use any stub here to get it's object pool (all stubs share the
+        // same object pool in bare instructions mode).
+        const Code& code = StubCode::InterpretCall();
+        const ObjectPool& stub_pool = ObjectPool::Handle(code.object_pool());
+
+        global_object_pool_wrapper()->Reset();
+        global_object_pool_wrapper()->InitializeFrom(stub_pool);
+
+        // We have two global code objects we need to re-generate with the new
+        // global object pool, namely the
+        //   - megamorphic miss handler code and the
+        //   - build method extractor code
+        MegamorphicCacheTable::ReInitMissHandlerCode(
+            isolate_, global_object_pool_wrapper());
+        I->object_store()->set_build_method_extractor_code(
+            Code::Handle(StubCode::GetBuildMethodExtractorStub(
+                global_object_pool_wrapper())));
+      }
 
       CollectDynamicFunctionNames();
 
@@ -224,6 +266,21 @@
       // [Type]-specialized stubs.
       AttachOptimizedTypeTestingStub();
 
+      if (FLAG_use_bare_instructions) {
+        // Now we generate the actual object pool instance and attach it to the
+        // object store. The AOT runtime will use it from there in the enter
+        // dart code stub.
+        const auto& pool =
+            ObjectPool::Handle(global_object_pool_wrapper()->MakeObjectPool());
+        I->object_store()->set_global_object_pool(pool);
+        global_object_pool_wrapper()->Reset();
+
+        if (FLAG_print_gop) {
+          THR_Print("Global object pool:\n");
+          pool.DebugPrint();
+        }
+      }
+
       I->set_compilation_allowed(false);
 
       TraceForRetainedFunctions();
@@ -436,6 +493,10 @@
 }
 
 void Precompiler::ProcessFunction(const Function& function) {
+  const intptr_t gop_offset =
+      FLAG_use_bare_instructions ? global_object_pool_wrapper()->CurrentLength()
+                                 : 0;
+
   if (!function.HasCode()) {
     function_count_++;
 
@@ -467,10 +528,10 @@
   }
 
   ASSERT(function.HasCode());
-  AddCalleesOf(function);
+  AddCalleesOf(function, gop_offset);
 }
 
-void Precompiler::AddCalleesOf(const Function& function) {
+void Precompiler::AddCalleesOf(const Function& function, intptr_t gop_offset) {
   ASSERT(function.HasCode());
 
   const Code& code = Code::Handle(Z, function.CurrentCode());
@@ -497,12 +558,24 @@
   FATAL("Callee scanning unimplemented for IA32");
 #endif
 
-  const ObjectPool& pool = ObjectPool::Handle(Z, code.GetObjectPool());
   String& selector = String::Handle(Z);
-  for (intptr_t i = 0; i < pool.Length(); i++) {
-    if (pool.TypeAt(i) == ObjectPool::kTaggedObject) {
-      entry = pool.ObjectAt(i);
-      AddCalleesOfHelper(entry, &selector, &cls);
+  if (FLAG_use_bare_instructions) {
+    for (intptr_t i = gop_offset;
+         i < global_object_pool_wrapper()->CurrentLength(); i++) {
+      const auto& wrapper_entry = global_object_pool_wrapper()->EntryAt(i);
+      if (wrapper_entry.type() == ObjectPool::kTaggedObject) {
+        const auto& entry = *wrapper_entry.obj_;
+        AddCalleesOfHelper(entry, &selector, &cls);
+      }
+    }
+  } else {
+    const auto& pool = ObjectPool::Handle(Z, code.object_pool());
+    auto& entry = Object::Handle(Z);
+    for (intptr_t i = 0; i < pool.Length(); i++) {
+      if (pool.TypeAt(i) == ObjectPool::kTaggedObject) {
+        entry = pool.ObjectAt(i);
+        AddCalleesOfHelper(entry, &selector, &cls);
+      }
     }
   }
 
@@ -578,9 +651,6 @@
   type = cls.super_type();
   AddType(type);
 
-  type = cls.mixin();
-  AddType(type);
-
   if (cls.IsTypedefClass()) {
     AddTypesOf(Function::Handle(Z, cls.signature_function()));
   }
@@ -651,12 +721,6 @@
       const Function& func = Function::Handle(Z, type.signature());
       AddTypesOf(func);
     }
-  } else if (abstype.IsBoundedType()) {
-    AbstractType& type = AbstractType::Handle(Z);
-    type = BoundedType::Cast(abstype).type();
-    AddType(type);
-    type = BoundedType::Cast(abstype).bound();
-    AddType(type);
   } else if (abstype.IsTypeRef()) {
     AbstractType& type = AbstractType::Handle(Z);
     type = TypeRef::Cast(abstype).type();
@@ -684,7 +748,7 @@
   }
 }
 
-void Precompiler::AddConstObject(const Instance& instance) {
+void Precompiler::AddConstObject(const class Instance& instance) {
   // Types and type arguments require special handling.
   if (instance.IsAbstractType()) {
     AddType(AbstractType::Cast(instance));
@@ -782,12 +846,16 @@
         if (FLAG_trace_precompiler) {
           THR_Print("Precompiling initializer for %s\n", field.ToCString());
         }
+        const intptr_t gop_offset =
+            FLAG_use_bare_instructions
+                ? global_object_pool_wrapper()->CurrentLength()
+                : 0;
         ASSERT(Dart::vm_snapshot_kind() != Snapshot::kFullAOT);
         const Function& initializer =
             Function::Handle(Z, CompileStaticInitializer(field));
         ASSERT(!initializer.IsNull());
         field.SetPrecompiledInitializer(initializer);
-        AddCalleesOf(initializer);
+        AddCalleesOf(initializer, gop_offset);
       }
     }
   }
@@ -804,7 +872,7 @@
       kernel::ParseStaticFieldInitializer(zone, field);
 
   DartCompilationPipeline pipeline;
-  PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL,
+  PrecompileParsedFunctionHelper helper(Precompiler::Instance(),
                                         parsed_function,
                                         /* optimized = */ true);
   if (!helper.Compile(&pipeline)) {
@@ -1430,24 +1498,18 @@
   for (intptr_t i = 0; i < types.length(); i++) {
     const AbstractType& type = types.At(i);
 
-    if (!type.IsResolved()) {
-      continue;
-    }
-
     if (type.InVMHeap()) {
       // The only important types in the vm isolate are "dynamic"/"void", which
       // will get their optimized top-type testing stub installed at creation.
       continue;
     }
 
-    if (type.IsResolved() && !type.IsMalformedOrMalbounded()) {
-      if (type_usage_info->IsUsedInTypeTest(type)) {
-        instr = type_testing_stubs.OptimizedCodeForType(type);
-        type.SetTypeTestingStub(instr);
+    if (type_usage_info->IsUsedInTypeTest(type)) {
+      instr = type_testing_stubs.OptimizedCodeForType(type);
+      type.SetTypeTestingStub(instr);
 
-        // Ensure we retain the type.
-        AddType(type);
-      }
+      // Ensure we retain the type.
+      AddType(type);
     }
   }
 
@@ -1545,12 +1607,12 @@
 }
 
 void Precompiler::TraceTypesFromRetainedClasses() {
-  Library& lib = Library::Handle(Z);
-  Class& cls = Class::Handle(Z);
-  Array& members = Array::Handle(Z);
-  Array& constants = Array::Handle(Z);
-  GrowableObjectArray& retained_constants = GrowableObjectArray::Handle(Z);
-  Instance& constant = Instance::Handle(Z);
+  auto& lib = Library::Handle(Z);
+  auto& cls = Class::Handle(Z);
+  auto& members = Array::Handle(Z);
+  auto& constants = Array::Handle(Z);
+  auto& retained_constants = GrowableObjectArray::Handle(Z);
+  auto& constant = Instance::Handle(Z);
 
   for (intptr_t i = 0; i < libraries_.Length(); i++) {
     lib ^= libraries_.At(i);
@@ -1855,33 +1917,41 @@
       code_ = function.CurrentCode();
       table_ = code_.static_calls_target_table();
       StaticCallsTable static_calls(table_);
+      bool only_call_via_code = true;
       for (auto& view : static_calls) {
         kind_and_offset_ = view.Get<Code::kSCallTableKindAndOffset>();
         auto kind = Code::KindField::decode(kind_and_offset_.Value());
-        ASSERT(kind == Code::kCallViaCode);
         auto pc_offset = Code::OffsetField::decode(kind_and_offset_.Value());
-        target_ = view.Get<Code::kSCallTableFunctionTarget>();
-        if (target_.IsNull()) {
-          target_ = view.Get<Code::kSCallTableCodeTarget>();
-          ASSERT(!Code::Cast(target_).IsFunctionCode());
-          // Allocation stub or AllocateContext or AllocateArray or ...
+        if (kind == Code::kCallViaCode) {
+          target_ = view.Get<Code::kSCallTableFunctionTarget>();
+          if (target_.IsNull()) {
+            target_ = view.Get<Code::kSCallTableCodeTarget>();
+            ASSERT(!Code::Cast(target_).IsFunctionCode());
+            // Allocation stub or AllocateContext or AllocateArray or ...
+          } else {
+            // Static calls initially call the CallStaticFunction stub because
+            // their target might not be compiled yet. After tree shaking, all
+            // static call targets are compiled.
+            // Cf. runtime entry PatchStaticCall called from CallStaticFunction
+            // stub.
+            auto& fun = Function::Cast(target_);
+            ASSERT(fun.HasCode());
+            target_code_ ^= fun.CurrentCode();
+            uword pc = pc_offset + code_.PayloadStart();
+            CodePatcher::PatchStaticCallAt(pc, code_, target_code_);
+          }
         } else {
-          // Static calls initially call the CallStaticFunction stub because
-          // their target might not be compiled yet. After tree shaking, all
-          // static call targets are compiled.
-          // Cf. runtime entry PatchStaticCall called from CallStaticFunction
-          // stub.
-          const auto& fun = Function::Cast(target_);
-          ASSERT(fun.HasCode());
-          target_code_ ^= fun.CurrentCode();
-          uword pc = pc_offset + code_.PayloadStart();
-          CodePatcher::PatchStaticCallAt(pc, code_, target_code_);
+          ASSERT(kind == Code::kPcRelativeCall ||
+                 kind == Code::kPcRelativeTailCall);
+          only_call_via_code = false;
         }
       }
 
       // We won't patch static calls anymore, so drop the static call table to
       // save space.
-      code_.set_static_calls_target_table(Object::empty_array());
+      if (only_call_via_code) {
+        code_.set_static_calls_target_table(Object::empty_array());
+      }
     }
 
    private:
@@ -1907,6 +1977,7 @@
 }
 
 void Precompiler::SwitchICCalls() {
+  ASSERT(!I->compilation_allowed());
 #if !defined(TARGET_ARCH_DBC)
   // Now that all functions have been compiled, we can switch to an instance
   // call sequence that loads the Code object and entry point directly from
@@ -1996,17 +2067,23 @@
   };
 
   ICCallSwitcher switcher(Z);
-  SwitchICCallsVisitor visitor(&switcher, Z);
+  auto& gop = ObjectPool::Handle(I->object_store()->global_object_pool());
+  ASSERT(gop.IsNull() != FLAG_use_bare_instructions);
+  if (FLAG_use_bare_instructions) {
+    switcher.SwitchPool(gop);
+  } else {
+    SwitchICCallsVisitor visitor(&switcher, Z);
 
-  // We need both iterations to ensure we visit all the functions that might end
-  // up in the snapshot. The ProgramVisitor will miss closures from duplicated
-  // finally clauses, and not all functions are compiled through the
-  // tree-shaker's queue
-  ProgramVisitor::VisitFunctions(&visitor);
-  FunctionSet::Iterator it(enqueued_functions_.GetIterator());
-  for (const Function** current = it.Next(); current != NULL;
-       current = it.Next()) {
-    visitor.Visit(**current);
+    // We need both iterations to ensure we visit all the functions that might
+    // end up in the snapshot. The ProgramVisitor will miss closures from
+    // duplicated finally clauses, and not all functions are compiled through
+    // the tree-shaker's queue
+    ProgramVisitor::VisitFunctions(&visitor);
+    FunctionSet::Iterator it(enqueued_functions_.GetIterator());
+    for (const Function** current = it.Next(); current != NULL;
+         current = it.Next()) {
+      visitor.Visit(**current);
+    }
   }
 #endif
 }
@@ -2133,9 +2210,12 @@
       Array::Handle(zone, graph_compiler->CreateDeoptInfo(assembler));
   // Allocates instruction object. Since this occurs only at safepoint,
   // there can be no concurrent access to the instruction page.
-  const Code& code = Code::Handle(Code::FinalizeCode(
-      function, graph_compiler, assembler, Code::PoolAttachment::kAttachPool,
-      optimized(), stats));
+  const auto pool_attachment = FLAG_use_bare_instructions
+                                   ? Code::PoolAttachment::kNotAttachPool
+                                   : Code::PoolAttachment::kAttachPool;
+  const Code& code =
+      Code::Handle(Code::FinalizeCode(function, graph_compiler, assembler,
+                                      pool_attachment, optimized(), stats));
   code.set_is_optimized(optimized());
   code.set_owner(function);
   if (!function.IsOptimizable()) {
@@ -2262,8 +2342,14 @@
       ASSERT(pass_state.inline_id_to_function.length() ==
              pass_state.caller_inline_id.length());
 
+      ASSERT(!FLAG_use_bare_instructions || precompiler_ != nullptr);
+
       ObjectPoolWrapper object_pool;
-      Assembler assembler(&object_pool, use_far_branches);
+      ObjectPoolWrapper* active_object_pool_wrapper =
+          FLAG_use_bare_instructions
+              ? precompiler_->global_object_pool_wrapper()
+              : &object_pool;
+      Assembler assembler(active_object_pool_wrapper, use_far_branches);
 
       CodeStatistics* function_stats = NULL;
       if (FLAG_print_instruction_stats) {
@@ -2298,7 +2384,7 @@
       done = true;
     } else {
       // We bailed out or we encountered an error.
-      const Error& error = Error::Handle(thread()->sticky_error());
+      const Error& error = Error::Handle(thread()->StealStickyError());
 
       if (error.raw() == Object::branch_offset_error().raw()) {
         // Compilation failed due to an out of range branch offset in the
@@ -2330,10 +2416,12 @@
         done = true;
       }
 
-      // Clear the error if it was not a real error, but just a bailout.
       if (error.IsLanguageError() &&
           (LanguageError::Cast(error).kind() == Report::kBailout)) {
-        thread()->clear_sticky_error();
+        // Discard the error if it was not a real error, but just a bailout.
+      } else {
+        // Otherwise, continue propagating.
+        thread()->set_sticky_error(error);
       }
       is_compiled = false;
     }
@@ -2376,11 +2464,8 @@
                                           optimized);
     const bool success = helper.Compile(pipeline);
     if (!success) {
-      // Encountered error.
-      Error& error = Error::Handle();
       // We got an error during compilation.
-      error = thread->sticky_error();
-      thread->clear_sticky_error();
+      const Error& error = Error::Handle(thread->StealStickyError());
       ASSERT(error.IsLanguageError() &&
              LanguageError::Cast(error).kind() != Report::kBailout);
       return error.raw();
@@ -2408,10 +2493,8 @@
   } else {
     Thread* const thread = Thread::Current();
     StackZone stack_zone(thread);
-    Error& error = Error::Handle();
     // We got an error during compilation.
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
+    const Error& error = Error::Handle(thread->StealStickyError());
     // Precompilation may encounter compile-time errors.
     // Do not attempt to optimize functions that can cause errors.
     function.set_is_optimizable(false);
diff --git a/runtime/vm/compiler/aot/precompiler.h b/runtime/vm/compiler/aot/precompiler.h
index 7c4dacac..9454afc 100644
--- a/runtime/vm/compiler/aot/precompiler.h
+++ b/runtime/vm/compiler/aot/precompiler.h
@@ -6,6 +6,7 @@
 #define RUNTIME_VM_COMPILER_AOT_PRECOMPILER_H_
 
 #include "vm/allocation.h"
+#include "vm/compiler/assembler/assembler.h"
 #include "vm/hash_map.h"
 #include "vm/hash_table.h"
 #include "vm/object.h"
@@ -246,8 +247,18 @@
     return get_runtime_type_is_unique_;
   }
 
+  ObjectPoolWrapper* global_object_pool_wrapper() {
+    ASSERT(FLAG_use_bare_instructions);
+    return &global_object_pool_wrapper_;
+  }
+
+  static Precompiler* Instance() { return singleton_; }
+
  private:
+  static Precompiler* singleton_;
+
   explicit Precompiler(Thread* thread);
+  ~Precompiler();
 
   void DoCompileAll();
   void AddRoots();
@@ -258,11 +269,11 @@
   void AddTypesOf(const Class& cls);
   void AddTypesOf(const Function& function);
   void AddTypeArguments(const TypeArguments& args);
-  void AddCalleesOf(const Function& function);
+  void AddCalleesOf(const Function& function, intptr_t gop_offset);
   void AddCalleesOfHelper(const Object& entry,
                           String* temp_selector,
                           Class* temp_cls);
-  void AddConstObject(const Instance& instance);
+  void AddConstObject(const class Instance& instance);
   void AddClosureCall(const Array& arguments_descriptor);
   void AddField(const Field& field);
   void AddFunction(const Function& function);
@@ -320,6 +331,7 @@
   intptr_t dropped_type_count_;
   intptr_t dropped_library_count_;
 
+  ObjectPoolWrapper global_object_pool_wrapper_;
   GrowableObjectArray& libraries_;
   const GrowableObjectArray& pending_functions_;
   SymbolSet sent_selectors_;
diff --git a/runtime/vm/compiler/assembler/assembler.cc b/runtime/vm/compiler/assembler/assembler.cc
index af83190..f945e3f 100644
--- a/runtime/vm/compiler/assembler/assembler.cc
+++ b/runtime/vm/compiler/assembler/assembler.cc
@@ -227,6 +227,70 @@
   return comments;
 }
 
+intptr_t ObjIndexPair::Hashcode(Key key) {
+  if (key.type() != ObjectPool::kTaggedObject) {
+    return key.raw_value_;
+  }
+  if (key.obj_->IsNull()) {
+    return 2011;
+  }
+  if (key.obj_->IsString() || key.obj_->IsNumber()) {
+    return Instance::Cast(*key.obj_).CanonicalizeHash();
+  }
+  if (key.obj_->IsCode()) {
+    // Instructions don't move during compaction.
+    return Code::Cast(*key.obj_).PayloadStart();
+  }
+  if (key.obj_->IsFunction()) {
+    return Function::Cast(*key.obj_).Hash();
+  }
+  if (key.obj_->IsField()) {
+    return String::HashRawSymbol(Field::Cast(*key.obj_).name());
+  }
+  // Unlikely.
+  return key.obj_->GetClassId();
+}
+void ObjectPoolWrapper::Reset() {
+  // Null out the handles we've accumulated.
+  for (intptr_t i = 0; i < object_pool_.length(); ++i) {
+    if (object_pool_[i].type() == ObjectPool::kTaggedObject) {
+      *const_cast<Object*>(object_pool_[i].obj_) = Object::null();
+      *const_cast<Object*>(object_pool_[i].equivalence_) = Object::null();
+    }
+  }
+
+  object_pool_.Clear();
+  object_pool_index_table_.Clear();
+}
+
+void ObjectPoolWrapper::InitializeFrom(const ObjectPool& other) {
+  ASSERT(object_pool_.length() == 0);
+
+  for (intptr_t i = 0; i < other.Length(); i++) {
+    auto type = other.TypeAt(i);
+    auto patchable = other.PatchableAt(i);
+    switch (type) {
+      case ObjectPool::kTaggedObject: {
+        ObjectPoolWrapperEntry entry(&Object::ZoneHandle(other.ObjectAt(i)),
+                                     patchable);
+        AddObject(entry);
+        break;
+      }
+      case ObjectPool::kImmediate:
+      case ObjectPool::kNativeFunction:
+      case ObjectPool::kNativeFunctionWrapper: {
+        ObjectPoolWrapperEntry entry(other.RawValueAt(i), type, patchable);
+        AddObject(entry);
+        break;
+      }
+      default:
+        UNREACHABLE();
+    }
+  }
+
+  ASSERT(CurrentLength() == other.Length());
+}
+
 intptr_t ObjectPoolWrapper::AddObject(const Object& obj,
                                       ObjectPool::Patchability patchable) {
   ASSERT(obj.IsNotTemporaryScopedHandle());
@@ -243,6 +307,19 @@
          (entry.obj_->IsNotTemporaryScopedHandle() &&
           (entry.equivalence_ == NULL ||
            entry.equivalence_->IsNotTemporaryScopedHandle())));
+
+  if (entry.type() == ObjectPool::kTaggedObject) {
+    // If the owner of the object pool wrapper specified a specific zone we
+    // shoulld use we'll do so.
+    if (zone_ != NULL) {
+      entry.obj_ = &Object::ZoneHandle(zone_, entry.obj_->raw());
+      if (entry.equivalence_ != NULL) {
+        entry.equivalence_ =
+            &Object::ZoneHandle(zone_, entry.equivalence_->raw());
+      }
+    }
+  }
+
   object_pool_.Add(entry);
   if (entry.patchable() == ObjectPool::kNotPatchable) {
     // The object isn't patchable. Record the index for fast lookup.
diff --git a/runtime/vm/compiler/assembler/assembler.h b/runtime/vm/compiler/assembler/assembler.h
index b411ed3..8d600d5 100644
--- a/runtime/vm/compiler/assembler/assembler.h
+++ b/runtime/vm/compiler/assembler/assembler.h
@@ -352,20 +352,7 @@
 
   static Value ValueOf(Pair kv) { return kv.value_; }
 
-  static intptr_t Hashcode(Key key) {
-    if (key.type() != ObjectPool::kTaggedObject) {
-      return key.raw_value_;
-    }
-    if (key.obj_->IsSmi()) {
-      return Smi::Cast(*key.obj_).Value();
-    }
-    // TODO(asiva) For now we assert that the object is from Old space
-    // and use the address of the raw object, once the weak_entry_table code
-    // in heap allows for multiple thread access we should switch this code
-    // to create a temporary raw obj => id mapping and use that.
-    ASSERT(key.obj_->IsOld());
-    return reinterpret_cast<intptr_t>(key.obj_->raw());
-  }
+  static intptr_t Hashcode(Key key);
 
   static inline bool IsKeyEqual(Pair kv, Key key) {
     if (kv.key_.entry_bits_ != key.entry_bits_) return false;
@@ -383,10 +370,40 @@
 
 class ObjectPoolWrapper : public ValueObject {
  public:
+  ObjectPoolWrapper() : zone_(nullptr) {}
+  ~ObjectPoolWrapper() {
+    if (zone_ != nullptr) {
+      Reset();
+      zone_ = nullptr;
+    }
+  }
+
+  // Clears all existing entries in this object pool builder.
+  //
+  // Note: Any code which has been compiled via this builder might use offsets
+  // into the pool which are not correct anymore.
+  void Reset();
+
+  // Initializes this object pool builder from [other].
+  //
+  // All entries from [other] will be populated, including their
+  // kind/patchability bits.
+  void InitializeFrom(const ObjectPool& other);
+
+  // Initialize this object pool builder with a [zone].
+  //
+  // Any objects added later on will be referenced using handles from [zone].
+  void InitializeWithZone(Zone* zone) {
+    ASSERT(object_pool_.length() == 0);
+    ASSERT(zone_ == nullptr && zone != nullptr);
+    zone_ = zone;
+  }
+
   intptr_t AddObject(
       const Object& obj,
       ObjectPool::Patchability patchable = ObjectPool::kNotPatchable);
   intptr_t AddImmediate(uword imm);
+
   intptr_t FindObject(
       const Object& obj,
       ObjectPool::Patchability patchable = ObjectPool::kNotPatchable);
@@ -399,6 +416,9 @@
 
   RawObjectPool* MakeObjectPool();
 
+  intptr_t CurrentLength() { return object_pool_.length(); }
+  ObjectPoolWrapperEntry& EntryAt(intptr_t i) { return object_pool_[i]; }
+
  private:
   intptr_t AddObject(ObjectPoolWrapperEntry entry);
   intptr_t FindObject(ObjectPoolWrapperEntry entry);
@@ -408,6 +428,11 @@
 
   // Hashmap for fast lookup in object pool.
   DirectChainedHashMap<ObjIndexPair> object_pool_index_table_;
+
+  // The zone used for allocating the handles we keep in the map and array (or
+  // NULL, in which case allocations happen using the zone active at the point
+  // of insertion).
+  Zone* zone_;
 };
 
 enum RestorePP { kRestoreCallerPP, kKeepCalleePP };
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index 2ca5b32..53de88b 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -24,6 +24,7 @@
 
 DECLARE_FLAG(bool, check_code_pointer);
 DECLARE_FLAG(bool, inline_alloc);
+DECLARE_FLAG(bool, precompiled_mode);
 
 uint32_t Address::encoding3() const {
   if (kind_ == Immediate) {
@@ -3162,10 +3163,16 @@
   COMPILE_ASSERT(PP < CODE_REG);
   COMPILE_ASSERT(CODE_REG < FP);
   COMPILE_ASSERT(FP < LR);
-  EnterFrame((1 << PP) | (1 << CODE_REG) | (1 << FP) | (1 << LR), 0);
 
-  // Setup pool pointer for this dart function.
-  LoadPoolPointer();
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    EnterFrame((1 << PP) | (1 << CODE_REG) | (1 << FP) | (1 << LR), 0);
+
+    // Setup pool pointer for this dart function.
+    LoadPoolPointer();
+  } else {
+    EnterFrame((1 << FP) | (1 << LR), 0);
+  }
+  set_constant_pool_allowed(true);
 
   // Reserve space for locals.
   AddImmediate(SP, -frame_size);
@@ -3186,8 +3193,10 @@
 }
 
 void Assembler::LeaveDartFrame() {
-  ldr(PP,
-      Address(FP, compiler_frame_layout.saved_caller_pp_from_fp * kWordSize));
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    ldr(PP,
+        Address(FP, compiler_frame_layout.saved_caller_pp_from_fp * kWordSize));
+  }
   set_constant_pool_allowed(false);
 
   // This will implicitly drop saved PP, PC marker due to restoring SP from FP
@@ -3196,8 +3205,10 @@
 }
 
 void Assembler::LeaveDartFrameAndReturn() {
-  ldr(PP,
-      Address(FP, compiler_frame_layout.saved_caller_pp_from_fp * kWordSize));
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    ldr(PP,
+        Address(FP, compiler_frame_layout.saved_caller_pp_from_fp * kWordSize));
+  }
   set_constant_pool_allowed(false);
 
   // This will implicitly drop saved PP, PC marker due to restoring SP from FP
@@ -3216,21 +3227,21 @@
 // R0 receiver, R9 guarded cid as Smi.
 // Preserve R4 (ARGS_DESC_REG), not required today, but maybe later.
 void Assembler::MonomorphicCheckedEntry() {
-  ASSERT(has_single_entry_point_);
   has_single_entry_point_ = false;
 #if defined(TESTING) || defined(DEBUG)
   bool saved_use_far_branches = use_far_branches();
   set_use_far_branches(false);
 #endif
+  intptr_t start = CodeSize();
 
   Comment("MonomorphicCheckedEntry");
-  ASSERT(CodeSize() == Instructions::kCheckedEntryOffset);
+  ASSERT(CodeSize() - start == Instructions::kPolymorphicEntryOffset);
   LoadClassIdMayBeSmi(IP, R0);
   cmp(R9, Operand(IP, LSL, 1));
   Branch(Address(THR, Thread::monomorphic_miss_entry_offset()), NE);
 
   // Fall through to unchecked entry.
-  ASSERT(CodeSize() == Instructions::kUncheckedEntryOffset);
+  ASSERT(CodeSize() - start == Instructions::kMonomorphicEntryOffset);
 
 #if defined(TESTING) || defined(DEBUG)
   set_use_far_branches(saved_use_far_branches);
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index b76aad5..4fb6ef4 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -18,6 +18,7 @@
 
 DECLARE_FLAG(bool, check_code_pointer);
 DECLARE_FLAG(bool, inline_alloc);
+DECLARE_FLAG(bool, precompiled_mode);
 
 DEFINE_FLAG(bool, use_far_branches, false, "Always use far branches");
 
@@ -1205,7 +1206,7 @@
 #if defined(TARGET_OS_FUCHSIA)
   // Make any future signal handlers fail fast. Verifies our assumption in
   // EnterFrame.
-  LoadImmediate(CSP, 0);
+  orri(CSP, ZR, Immediate(16));
 #endif
 }
 
@@ -1250,15 +1251,18 @@
   ASSERT(!constant_pool_allowed());
   // Setup the frame.
   EnterFrame(0);
-  TagAndPushPPAndPcMarker();  // Save PP and PC marker.
 
-  // Load the pool pointer.
-  if (new_pp == kNoRegister) {
-    LoadPoolPointer();
-  } else {
-    mov(PP, new_pp);
-    set_constant_pool_allowed(true);
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    TagAndPushPPAndPcMarker();  // Save PP and PC marker.
+
+    // Load the pool pointer.
+    if (new_pp == kNoRegister) {
+      LoadPoolPointer();
+    } else {
+      mov(PP, new_pp);
+    }
   }
+  set_constant_pool_allowed(true);
 
   // Reserve space.
   if (frame_size > 0) {
@@ -1283,13 +1287,15 @@
 }
 
 void Assembler::LeaveDartFrame(RestorePP restore_pp) {
-  if (restore_pp == kRestoreCallerPP) {
-    set_constant_pool_allowed(false);
-    // Restore and untag PP.
-    LoadFromOffset(PP, FP,
-                   compiler_frame_layout.saved_caller_pp_from_fp * kWordSize);
-    sub(PP, PP, Operand(kHeapObjectTag));
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    if (restore_pp == kRestoreCallerPP) {
+      // Restore and untag PP.
+      LoadFromOffset(PP, FP,
+                     compiler_frame_layout.saved_caller_pp_from_fp * kWordSize);
+      sub(PP, PP, Operand(kHeapObjectTag));
+    }
   }
+  set_constant_pool_allowed(false);
   LeaveFrame();
 }
 
@@ -1325,7 +1331,8 @@
   const intptr_t kPushedRegistersSize =
       kDartVolatileCpuRegCount * kWordSize +
       kDartVolatileFpuRegCount * kWordSize +
-      2 * kWordSize;  // PP and pc marker from EnterStubFrame.
+      (compiler_frame_layout.dart_fixed_frame_size - 2) *
+          kWordSize;  // From EnterStubFrame (excluding PC / FP)
   AddImmediate(SP, FP, -kPushedRegistersSize);
   for (int i = kDartLastVolatileCpuReg; i >= kDartFirstVolatileCpuReg; i--) {
     const Register reg = static_cast<Register>(i);
@@ -1373,13 +1380,13 @@
   br(IP0);
 
   Comment("MonomorphicCheckedEntry");
-  ASSERT(CodeSize() == Instructions::kCheckedEntryOffset);
+  ASSERT(CodeSize() == Instructions::kPolymorphicEntryOffset);
   LoadClassIdMayBeSmi(IP0, R0);
   cmp(R5, Operand(IP0, LSL, 1));
   b(&miss, NE);
 
   // Fall through to unchecked entry.
-  ASSERT(CodeSize() == Instructions::kUncheckedEntryOffset);
+  ASSERT(CodeSize() == Instructions::kMonomorphicEntryOffset);
 
   set_use_far_branches(saved_use_far_branches);
 }
diff --git a/runtime/vm/compiler/assembler/assembler_dbc.cc b/runtime/vm/compiler/assembler/assembler_dbc.cc
index 3465c38..a7643b6 100644
--- a/runtime/vm/compiler/assembler/assembler_dbc.cc
+++ b/runtime/vm/compiler/assembler/assembler_dbc.cc
@@ -75,6 +75,10 @@
   return Thread::Current()->zone()->PrintToString("R%d", reg);
 }
 
+const char* Assembler::FpuRegisterName(FpuRegister reg) {
+  return Thread::Current()->zone()->PrintToString("F%d", reg);
+}
+
 static int32_t EncodeJump(int32_t relative_pc) {
   return SimulatorBytecode::kJump | (relative_pc << 8);
 }
diff --git a/runtime/vm/compiler/assembler/assembler_dbc.h b/runtime/vm/compiler/assembler/assembler_dbc.h
index 09a5aa1..9787191 100644
--- a/runtime/vm/compiler/assembler/assembler_dbc.h
+++ b/runtime/vm/compiler/assembler/assembler_dbc.h
@@ -45,7 +45,7 @@
 
   static const char* RegisterName(Register reg);
 
-  static const char* FpuRegisterName(FpuRegister reg) { return "?"; }
+  static const char* FpuRegisterName(FpuRegister reg);
 
   static uword GetBreakInstructionFiller() { return SimulatorBytecode::kTrap; }
 
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index cd3206c..74f20d2 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -21,6 +21,7 @@
 
 DECLARE_FLAG(bool, check_code_pointer);
 DECLARE_FLAG(bool, inline_alloc);
+DECLARE_FLAG(bool, precompiled_mode);
 
 Assembler::Assembler(ObjectPoolWrapper* object_pool_wrapper,
                      bool use_far_branches)
@@ -1531,7 +1532,9 @@
   const intptr_t kPushedRegistersSize =
       kPushedCpuRegistersCount * kWordSize +
       kPushedXmmRegistersCount * kFpuRegisterSize +
-      2 * kWordSize;  // PP, pc marker from EnterStubFrame
+      (compiler_frame_layout.dart_fixed_frame_size - 2) *
+          kWordSize;  // From EnterStubFrame (excluding PC / FP)
+
   leaq(RSP, Address(RBP, -kPushedRegistersSize));
 
   // TODO(vegorov): avoid saving FpuTMP, it is used only as scratch.
@@ -1568,12 +1571,14 @@
 void Assembler::EnterDartFrame(intptr_t frame_size, Register new_pp) {
   ASSERT(!constant_pool_allowed());
   EnterFrame(0);
-  pushq(CODE_REG);
-  pushq(PP);
-  if (new_pp == kNoRegister) {
-    LoadPoolPointer(PP);
-  } else {
-    movq(PP, new_pp);
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    pushq(CODE_REG);
+    pushq(PP);
+    if (new_pp == kNoRegister) {
+      LoadPoolPointer(PP);
+    } else {
+      movq(PP, new_pp);
+    }
   }
   set_constant_pool_allowed(true);
   if (frame_size != 0) {
@@ -1583,11 +1588,13 @@
 
 void Assembler::LeaveDartFrame(RestorePP restore_pp) {
   // Restore caller's PP register that was pushed in EnterDartFrame.
-  if (restore_pp == kRestoreCallerPP) {
-    movq(PP, Address(RBP, (compiler_frame_layout.saved_caller_pp_from_fp *
-                           kWordSize)));
-    set_constant_pool_allowed(false);
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    if (restore_pp == kRestoreCallerPP) {
+      movq(PP, Address(RBP, (compiler_frame_layout.saved_caller_pp_from_fp *
+                             kWordSize)));
+    }
   }
+  set_constant_pool_allowed(false);
   LeaveFrame();
 }
 
@@ -1651,8 +1658,8 @@
 // RDI receiver, RBX guarded cid as Smi.
 // Preserve R10 (ARGS_DESC_REG), not required today, but maybe later.
 void Assembler::MonomorphicCheckedEntry() {
-  ASSERT(has_single_entry_point_);
   has_single_entry_point_ = false;
+  intptr_t start = CodeSize();
   Label immediate, have_cid, miss;
   Bind(&miss);
   jmp(Address(THR, Thread::monomorphic_miss_entry_offset()));
@@ -1661,11 +1668,18 @@
   movq(TMP, Immediate(kSmiCid));
   jmp(&have_cid, kNearJump);
 
+  // Ensure the monomorphic entry is 2-byte aligned (so GC can see them if we
+  // store them in ICData / MegamorphicCache arrays)
+  nop(1);
+
   Comment("MonomorphicCheckedEntry");
-  ASSERT(CodeSize() == Instructions::kCheckedEntryOffset);
+  ASSERT(CodeSize() - start == Instructions::kPolymorphicEntryOffset);
+  ASSERT((CodeSize() & kSmiTagMask) == kSmiTag);
+
   SmiUntag(RBX);
   testq(RDI, Immediate(kSmiTagMask));
   j(ZERO, &immediate, kNearJump);
+  nop(1);
 
   LoadClassId(TMP, RDI);
 
@@ -1674,8 +1688,8 @@
   j(NOT_EQUAL, &miss, Assembler::kNearJump);
 
   // Fall through to unchecked entry.
-  ASSERT(CodeSize() == Instructions::kUncheckedEntryOffset);
-  ASSERT((CodeSize() & kSmiTagMask) == kSmiTag);
+  ASSERT(CodeSize() - start == Instructions::kMonomorphicEntryOffset);
+  ASSERT(((CodeSize() - start) & kSmiTagMask) == kSmiTag);
 }
 
 #ifndef PRODUCT
diff --git a/runtime/vm/compiler/assembler/assembler_x64_test.cc b/runtime/vm/compiler/assembler/assembler_x64_test.cc
index a478cf7..c06b96a 100644
--- a/runtime/vm/compiler/assembler/assembler_x64_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64_test.cc
@@ -3935,7 +3935,7 @@
       "push thr\n"
       "movq r12,[rdi+0x8]\n"
       "movq thr,rsi\n"
-      "movq pp,[r12+0x1f]\n"
+      "movq pp,[r12+0x27]\n"
       "movl rax,0x........\n"
       "movd xmm0,rax\n"
       "shufps xmm0,xmm0 [0]\n"
@@ -3972,7 +3972,7 @@
       "push thr\n"
       "movq r12,[rdi+0x8]\n"
       "movq thr,rsi\n"
-      "movq pp,[r12+0x1f]\n"
+      "movq pp,[r12+0x27]\n"
       "movl rax,-0x........\n"
       "movd xmm0,rax\n"
       "shufps xmm0,xmm0 [0]\n"
@@ -4007,7 +4007,7 @@
       "push thr\n"
       "movq r12,[rdi+0x8]\n"
       "movq thr,rsi\n"
-      "movq pp,[r12+0x1f]\n"
+      "movq pp,[r12+0x27]\n"
       "movl rax,0x........\n"
       "movd xmm0,rax\n"
       "shufps xmm0,xmm0 [0]\n"
@@ -4852,7 +4852,7 @@
       "push thr\n"
       "movq r12,[rdi+0x8]\n"
       "movq thr,rsi\n"
-      "movq pp,[r12+0x1f]\n"
+      "movq pp,[r12+0x27]\n"
       "movq rax,[pp+0xf]\n"
       "cmpq rax,[pp+0xf]\n"
       "jnz 0x................\n"
@@ -5290,7 +5290,7 @@
       "push thr\n"
       "movq r12,[rdi+0x8]\n"
       "movq thr,rsi\n"
-      "movq pp,[r12+0x1f]\n"
+      "movq pp,[r12+0x27]\n"
       "movq r11,[thr+0x...]\n"
       "andpd xmm0,[r11]\n"
       "pop thr\n"
diff --git a/runtime/vm/compiler/assembler/disassembler.cc b/runtime/vm/compiler/assembler/disassembler.cc
index 11138e6..8cf7adc 100644
--- a/runtime/vm/compiler/assembler/disassembler.cc
+++ b/runtime/vm/compiler/assembler/disassembler.cc
@@ -329,19 +329,23 @@
     THR_Print("Static call target functions {\n");
     const auto& table = Array::Handle(zone, code.static_calls_target_table());
     auto& cls = Class::Handle(zone);
-    auto& kind_and_offset = Smi::Handle(zone);
+    auto& kind_type_and_offset = Smi::Handle(zone);
     auto& function = Function::Handle(zone);
     auto& code = Code::Handle(zone);
     if (!table.IsNull()) {
       StaticCallsTable static_calls(table);
       for (auto& call : static_calls) {
-        kind_and_offset = call.Get<Code::kSCallTableKindAndOffset>();
+        kind_type_and_offset = call.Get<Code::kSCallTableKindAndOffset>();
         function = call.Get<Code::kSCallTableFunctionTarget>();
         code = call.Get<Code::kSCallTableCodeTarget>();
 
-        auto kind = Code::KindField::decode(kind_and_offset.Value());
-        auto offset = Code::OffsetField::decode(kind_and_offset.Value());
+        auto kind = Code::KindField::decode(kind_type_and_offset.Value());
+        auto offset = Code::OffsetField::decode(kind_type_and_offset.Value());
+        auto entry_point =
+            Code::EntryPointField::decode(kind_type_and_offset.Value());
 
+        const char* s_entry_point =
+            entry_point == Code::kUncheckedEntry ? " <unchecked-entry>" : "";
         const char* skind = nullptr;
         switch (kind) {
           case Code::kPcRelativeCall:
@@ -359,15 +363,17 @@
         if (function.IsNull()) {
           cls ^= code.owner();
           if (cls.IsNull()) {
-            THR_Print("  0x%" Px ": %s, %p (%s)\n", start + offset,
-                      code.QualifiedName(), code.raw(), skind);
+            THR_Print("  0x%" Px ": %s, %p (%s)%s\n", start + offset,
+                      code.QualifiedName(), code.raw(), skind, s_entry_point);
           } else {
-            THR_Print("  0x%" Px ": allocation stub for %s, %p (%s)\n",
-                      start + offset, cls.ToCString(), code.raw(), skind);
+            THR_Print("  0x%" Px ": allocation stub for %s, %p (%s)%s\n",
+                      start + offset, cls.ToCString(), code.raw(), skind,
+                      s_entry_point);
           }
         } else {
-          THR_Print("  0x%" Px ": %s, %p (%s)\n", start + offset,
-                    function.ToFullyQualifiedCString(), code.raw(), skind);
+          THR_Print("  0x%" Px ": %s, %p (%s)%s\n", start + offset,
+                    function.ToFullyQualifiedCString(), code.raw(), skind,
+                    s_entry_point);
         }
       }
     }
@@ -389,6 +395,11 @@
   DisassembleCodeHelper(function_fullname, code, optimized);
 }
 
+#else   // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
+
+void Disassembler::DisassembleCode(const Function& function,
+                                   const Code& code,
+                                   bool optimized) {}
 #endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
 
 }  // namespace dart
diff --git a/runtime/vm/compiler/assembler/disassembler_kbc.cc b/runtime/vm/compiler/assembler/disassembler_kbc.cc
index 9102f84..151429a 100644
--- a/runtime/vm/compiler/assembler/disassembler_kbc.cc
+++ b/runtime/vm/compiler/assembler/disassembler_kbc.cc
@@ -214,7 +214,8 @@
     case KernelBytecode::kLoadConstant:
     case KernelBytecode::kPushConstant:
     case KernelBytecode::kIndirectStaticCall:
-    case KernelBytecode::kInstanceCall:
+    case KernelBytecode::kInterfaceCall:
+    case KernelBytecode::kDynamicCall:
     case KernelBytecode::kStoreStaticTOS:
     case KernelBytecode::kPushStatic:
     case KernelBytecode::kAllocate:
diff --git a/runtime/vm/compiler/backend/compile_type.h b/runtime/vm/compiler/backend/compile_type.h
index 86f148a..217ab1e 100644
--- a/runtime/vm/compiler/backend/compile_type.h
+++ b/runtime/vm/compiler/backend/compile_type.h
@@ -66,8 +66,8 @@
   // Return true if the value is known to be always null.
   bool IsNull();
 
-  // Return true if this type is more specific than given type.
-  bool IsMoreSpecificThan(const AbstractType& other);
+  // Return true if this type is a subtype of the given type.
+  bool IsSubtypeOf(const AbstractType& other);
 
   // Return true if value of this type is assignable to a location of the
   // given type.
diff --git a/runtime/vm/compiler/backend/constant_propagator.cc b/runtime/vm/compiler/backend/constant_propagator.cc
index 8716c0d..47e4be6 100644
--- a/runtime/vm/compiler/backend/constant_propagator.cc
+++ b/runtime/vm/compiler/backend/constant_propagator.cc
@@ -761,12 +761,9 @@
       const Instance& instance = Instance::Cast(value);
       if (instr->instantiator_type_arguments()->BindsToConstantNull() &&
           instr->function_type_arguments()->BindsToConstantNull()) {
-        Error& bound_error = Error::Handle();
         bool is_instance =
             instance.IsInstanceOf(checked_type, Object::null_type_arguments(),
-                                  Object::null_type_arguments(), &bound_error);
-        // Can only have bound error with generics.
-        ASSERT(bound_error.IsNull());
+                                  Object::null_type_arguments());
         SetValue(instr, Bool::Get(is_instance));
         return;
       }
@@ -1160,6 +1157,9 @@
     }
     const Double& result = Double::ZoneHandle(Double::NewCanonical(result_val));
     SetValue(instr, result);
+  } else if (IsConstant(left) && IsConstant(right)) {
+    // Both values known, but no rule to evaluate this further.
+    SetValue(instr, non_constant_);
   }
 }
 
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index a156279..c87bfc8 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -65,6 +65,7 @@
 DECLARE_FLAG(int, reoptimization_counter_threshold);
 DECLARE_FLAG(int, stacktrace_every);
 DECLARE_FLAG(charp, stacktrace_filter);
+DECLARE_FLAG(int, gc_every);
 DECLARE_FLAG(bool, trace_compiler);
 
 // Assign locations to incoming arguments, i.e., values pushed above spill slots
@@ -240,16 +241,9 @@
 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const {
 #if !defined(PRODUCT)
   if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) ||
+      (FLAG_gc_every > 0) ||
       (isolate()->reload_every_n_stack_overflow_checks() > 0)) {
-    bool is_auxiliary_isolate = ServiceIsolate::IsServiceIsolate(isolate());
-#if !defined(DART_PRECOMPILED_RUNTIME)
-    // Certain flags should not effect the kernel isolate itself.  They might be
-    // used by tests via the "VMOptions=--..." annotation to test VM
-    // functionality in the main isolate.
-    is_auxiliary_isolate =
-        is_auxiliary_isolate || KernelIsolate::IsKernelIsolate(isolate());
-#endif  // !defined(DART_PRECOMPILED_RUNTIME)
-    if (!is_auxiliary_isolate) {
+    if (!Isolate::IsVMInternalIsolate(isolate())) {
       return true;
     }
   }
@@ -324,6 +318,16 @@
 }
 
 intptr_t FlowGraphCompiler::UncheckedEntryOffset() const {
+  // On ARM64 we cannot use the position of the label bound in the
+  // FunctionEntryInstr, because `FunctionEntryInstr::EmitNativeCode` does not
+  // emit the monomorphic entry and frame entry (instead on ARM64 this is done
+  // in FlowGraphCompiler::CompileGraph()).
+  //
+  // See http://dartbug.com/34162
+#if defined(TARGET_ARCH_ARM64)
+  return 0;
+#endif
+
   BlockEntryInstr* entry = flow_graph().graph_entry()->unchecked_entry();
   if (entry == nullptr) {
     entry = flow_graph().graph_entry()->normal_entry();
@@ -341,7 +345,7 @@
   // Intrinsification happened.
 #ifdef DART_PRECOMPILER
   if (parsed_function().function().IsDynamicFunction()) {
-    return Instructions::kUncheckedEntryOffset;
+    return Instructions::kMonomorphicEntryOffset;
   }
 #endif
   return 0;
@@ -699,29 +703,40 @@
                                           null_check_name_idx);
 }
 
-void FlowGraphCompiler::AddPcRelativeCallTarget(const Function& function) {
+void FlowGraphCompiler::AddPcRelativeCallTarget(const Function& function,
+                                                Code::EntryKind entry_kind) {
   ASSERT(function.IsZoneHandle());
-  static_calls_target_table_.Add(new (zone()) StaticCallsStruct(
-      Code::kPcRelativeCall, assembler()->CodeSize(), &function, NULL));
+  const auto entry_point = entry_kind == Code::EntryKind::kUnchecked
+                               ? Code::kUncheckedEntry
+                               : Code::kDefaultEntry;
+  static_calls_target_table_.Add(
+      new (zone()) StaticCallsStruct(Code::kPcRelativeCall, entry_point,
+                                     assembler()->CodeSize(), &function, NULL));
 }
 
 void FlowGraphCompiler::AddPcRelativeCallStubTarget(const Code& stub_code) {
   ASSERT(stub_code.IsZoneHandle() || stub_code.IsReadOnlyHandle());
   ASSERT(!stub_code.IsNull());
   static_calls_target_table_.Add(new (zone()) StaticCallsStruct(
-      Code::kPcRelativeCall, assembler()->CodeSize(), NULL, &stub_code));
+      Code::kPcRelativeCall, Code::kDefaultEntry, assembler()->CodeSize(), NULL,
+      &stub_code));
 }
 
-void FlowGraphCompiler::AddStaticCallTarget(const Function& func) {
+void FlowGraphCompiler::AddStaticCallTarget(const Function& func,
+                                            Code::EntryKind entry_kind) {
   ASSERT(func.IsZoneHandle());
+  const auto entry_point = entry_kind == Code::EntryKind::kUnchecked
+                               ? Code::kUncheckedEntry
+                               : Code::kDefaultEntry;
   static_calls_target_table_.Add(new (zone()) StaticCallsStruct(
-      Code::kCallViaCode, assembler()->CodeSize(), &func, NULL));
+      Code::kCallViaCode, entry_point, assembler()->CodeSize(), &func, NULL));
 }
 
 void FlowGraphCompiler::AddStubCallTarget(const Code& code) {
   ASSERT(code.IsZoneHandle() || code.IsReadOnlyHandle());
-  static_calls_target_table_.Add(new (zone()) StaticCallsStruct(
-      Code::kCallViaCode, assembler()->CodeSize(), NULL, &code));
+  static_calls_target_table_.Add(
+      new (zone()) StaticCallsStruct(Code::kCallViaCode, Code::kDefaultEntry,
+                                     assembler()->CodeSize(), NULL, &code));
 }
 
 CompilerDeoptInfo* FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id) {
@@ -1081,13 +1096,15 @@
       Array::Handle(zone(), Array::New(array_length, Heap::kOld));
 
   StaticCallsTable entries(targets);
-  auto& kind_and_offset = Smi::Handle(zone());
+  auto& kind_type_and_offset = Smi::Handle(zone());
   for (intptr_t i = 0; i < calls.length(); i++) {
     auto entry = calls[i];
-    kind_and_offset = Smi::New(Code::KindField::encode(entry->call_kind) |
-                               Code::OffsetField::encode(entry->offset));
+    kind_type_and_offset =
+        Smi::New(Code::KindField::encode(entry->call_kind) |
+                 Code::EntryPointField::encode(entry->entry_point) |
+                 Code::OffsetField::encode(entry->offset));
     auto view = entries[i];
-    view.Set<Code::kSCallTableKindAndOffset>(kind_and_offset);
+    view.Set<Code::kSCallTableKindAndOffset>(kind_type_and_offset);
     const Object* target = nullptr;
     if (entry->function != nullptr) {
       view.Set<Code::kSCallTableFunctionTarget>(*calls[i]->function);
@@ -1259,7 +1276,7 @@
   if (FLAG_precompiled_mode) {
     // TODO(#34162): Support unchecked entry-points in precompiled mode.
     ic_data = ic_data.AsUnaryClassChecks();
-    EmitSwitchableInstanceCall(ic_data, deopt_id, token_pos, locs);
+    EmitSwitchableInstanceCall(ic_data, deopt_id, token_pos, locs, entry_kind);
     return;
   }
   ASSERT(!ic_data.IsNull());
@@ -2104,7 +2121,7 @@
   // caller side!
   const Type& int_type = Type::Handle(zone(), Type::IntType());
   bool is_non_smi = false;
-  if (int_type.IsSubtypeOf(dst_type, NULL, NULL, Heap::kOld)) {
+  if (int_type.IsSubtypeOf(dst_type, Heap::kOld)) {
     __ BranchIfSmi(instance_reg, done);
     is_non_smi = true;
   }
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index dd1cf66..f0c0af9 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -560,10 +560,12 @@
                                    intptr_t try_index,
                                    intptr_t slow_path_argument_count = 0);
 
-  void EmitSwitchableInstanceCall(const ICData& ic_data,
-                                  intptr_t deopt_id,
-                                  TokenPosition token_pos,
-                                  LocationSummary* locs);
+  void EmitSwitchableInstanceCall(
+      const ICData& ic_data,
+      intptr_t deopt_id,
+      TokenPosition token_pos,
+      LocationSummary* locs,
+      Code::EntryKind entry_kind = Code::EntryKind::kNormal);
 
   void EmitTestAndCall(const CallTargets& targets,
                        const String& function_name,
@@ -771,9 +773,11 @@
 
   void EmitFrameEntry();
 
-  void AddPcRelativeCallTarget(const Function& function);
+  void AddPcRelativeCallTarget(const Function& function,
+                               Code::EntryKind entry_kind);
   void AddPcRelativeCallStubTarget(const Code& stub_code);
-  void AddStaticCallTarget(const Function& function);
+  void AddStaticCallTarget(const Function& function,
+                           Code::EntryKind entry_kind);
 
   void GenerateDeferredCode();
 
@@ -925,14 +929,17 @@
   class StaticCallsStruct : public ZoneAllocated {
    public:
     Code::CallKind call_kind;
+    Code::CallEntryPoint entry_point;
     const intptr_t offset;
     const Function* function;  // Can be NULL.
     const Code* code;          // Can be NULL.
     StaticCallsStruct(Code::CallKind call_kind,
+                      Code::CallEntryPoint entry_point,
                       intptr_t offset_arg,
                       const Function* function_arg,
                       const Code* code_arg)
         : call_kind(call_kind),
+          entry_point(entry_point),
           offset(offset_arg),
           function(function_arg),
           code(code_arg) {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 00c9618..3d80504 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -247,12 +247,8 @@
   const Class& type_class = Class::ZoneHandle(zone(), type.type_class());
   ASSERT(type_class.NumTypeArguments() > 0);
   const Register kInstanceReg = R0;
-  Error& bound_error = Error::Handle(zone());
   const Type& smi_type = Type::Handle(zone(), Type::SmiType());
-  const bool smi_is_ok =
-      smi_type.IsSubtypeOf(type, &bound_error, NULL, Heap::kOld);
-  // Malformed type should have been handled at graph construction time.
-  ASSERT(smi_is_ok || bound_error.IsNull());
+  const bool smi_is_ok = smi_type.IsSubtypeOf(type, Heap::kOld);
   __ tst(kInstanceReg, Operand(kSmiTagMask));
   if (smi_is_ok) {
     // Fast case for type = FutureOr<int/num/top-type>.
@@ -284,12 +280,11 @@
   if (type_arguments.Length() == 1) {
     const AbstractType& tp_argument =
         AbstractType::ZoneHandle(zone(), type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
     if (tp_argument.IsType()) {
       ASSERT(tp_argument.HasTypeClass());
       // Check if type argument is dynamic, Object, or void.
       const Type& object_type = Type::Handle(zone(), Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL, NULL, Heap::kOld)) {
+      if (object_type.IsSubtypeOf(tp_argument, Heap::kOld)) {
         // Instance class test only necessary.
         return GenerateSubtype1TestCacheLookup(
             token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
@@ -339,9 +334,8 @@
   __ tst(kInstanceReg, Operand(kSmiTagMask));
   // If instance is Smi, check directly.
   const Class& smi_class = Class::Handle(zone(), Smi::Class());
-  if (smi_class.IsSubtypeOf(Object::null_type_arguments(), type_class,
-                            Object::null_type_arguments(), NULL, NULL,
-                            Heap::kOld)) {
+  if (Class::IsSubtypeOf(smi_class, Object::null_type_arguments(), type_class,
+                         Object::null_type_arguments(), Heap::kOld)) {
     // Fast case for type = int/num/top-type.
     __ b(is_instance_lbl, EQ);
   } else {
@@ -349,7 +343,7 @@
   }
   const Register kClassIdReg = R2;
   __ LoadClassId(kClassIdReg, kInstanceReg);
-  // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted
+  // See ClassFinalizer::CheckSuperTypeAndInterfaces for list of restricted
   // interfaces.
   // Bool interface can be implemented only by core class Bool.
   if (type.IsBoolType()) {
@@ -595,7 +589,7 @@
                                            intptr_t deopt_id,
                                            const AbstractType& type,
                                            LocationSummary* locs) {
-  ASSERT(type.IsFinalized() && !type.IsMalformed() && !type.IsMalbounded());
+  ASSERT(type.IsFinalized());
   ASSERT(!type.IsObjectType() && !type.IsDynamicType() && !type.IsVoidType());
   const Register kInstantiatorTypeArgumentsReg = R2;
   const Register kFunctionTypeArgumentsReg = R1;
@@ -674,32 +668,11 @@
   ASSERT(!dst_type.IsNull());
   ASSERT(dst_type.IsFinalized());
   // Assignable check is skipped in FlowGraphBuilder, not here.
-  ASSERT(dst_type.IsMalformedOrMalbounded() ||
-         (!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
-          !dst_type.IsVoidType()));
+  ASSERT(!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
+         !dst_type.IsVoidType());
   const Register kInstantiatorTypeArgumentsReg = R2;
   const Register kFunctionTypeArgumentsReg = R1;
 
-  // Generate throw new TypeError() if the type is malformed or malbounded.
-  if (dst_type.IsMalformedOrMalbounded()) {
-    // A null object is always assignable and is returned as result.
-    Label is_assignable;
-    __ CompareObject(R0, Object::null_object());
-    __ b(&is_assignable, EQ);
-
-    __ PushObject(Object::null_object());  // Make room for the result.
-    __ Push(R0);                           // Push the source object.
-    __ PushObject(dst_name);               // Push the name of the destination.
-    __ PushObject(dst_type);               // Push the type of the destination.
-    GenerateRuntimeCall(token_pos, deopt_id, kBadTypeErrorRuntimeEntry, 3,
-                        locs);
-    // We should never return here.
-    __ bkpt(0);
-
-    __ Bind(&is_assignable);  // For a null object.
-    return;
-  }
-
   if (ShouldUseTypeTestingStubFor(is_optimizing(), dst_type)) {
     GenerateAssertAssignableViaTypeTestingStub(token_pos, deopt_id, dst_type,
                                                dst_name, locs);
@@ -814,19 +787,23 @@
       extracted_method, ObjectPool::Patchability::kNotPatchable);
 
   // We use a custom pool register to preserve caller PP.
-  const Register kPoolReg = R0;
+  Register kPoolReg = R0;
 
   // R1 = extracted function
   // R4 = offset of type argument vector (or 0 if class is not generic)
-  __ LoadFieldFromOffset(kWord, kPoolReg, CODE_REG, Code::object_pool_offset());
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    kPoolReg = PP;
+  } else {
+    __ LoadFieldFromOffset(kWord, kPoolReg, CODE_REG,
+                           Code::object_pool_offset());
+  }
   __ LoadImmediate(R4, type_arguments_field_offset);
   __ LoadFieldFromOffset(kWord, R1, kPoolReg,
                          ObjectPool::element_offset(function_index));
   __ LoadFieldFromOffset(kWord, CODE_REG, kPoolReg,
                          ObjectPool::element_offset(stub_index));
-  __ LoadFieldFromOffset(kWord, R3, CODE_REG,
-                         Code::entry_point_offset(Code::EntryKind::kUnchecked));
-  __ bx(R3);
+  __ Branch(FieldAddress(
+      CODE_REG, Code::entry_point_offset(Code::EntryKind::kUnchecked)));
 }
 
 void FlowGraphCompiler::GenerateGetterIntrinsic(intptr_t offset) {
@@ -860,9 +837,11 @@
       (!is_optimizing() || may_reoptimize())) {
     __ Comment("Invocation Count Check");
     const Register function_reg = R8;
-    // The pool pointer is not setup before entering the Dart frame.
-    // Temporarily setup pool pointer for this dart function.
-    __ LoadPoolPointer(new_pp);
+    if (!FLAG_precompiled_mode || !FLAG_use_bare_instructions) {
+      // The pool pointer is not setup before entering the Dart frame.
+      // Temporarily setup pool pointer for this dart function.
+      __ LoadPoolPointer(new_pp);
+    }
     // Load function object from object pool.
     __ LoadFunctionFromCalleePool(function_reg, function, new_pp);
 
@@ -926,31 +905,13 @@
 //   R4: arguments descriptor array.
 void FlowGraphCompiler::CompileGraph() {
   InitCompiler();
-  if (FLAG_precompiled_mode) {
-    const Function& function = parsed_function().function();
-    if (function.IsDynamicFunction()) {
-      SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
-      __ MonomorphicCheckedEntry();
-      SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
-    }
 
-    // For JIT we have multiple entrypoints functionality which moved the
-    // intrinsification as well as the setup of the frame to the
-    // [TargetEntryInstr::EmitNativeCode].
-    if (TryIntrinsify()) {
-      // Skip regular code generation.
-      return;
-    }
-    EmitFrameEntry();
-    ASSERT(__ constant_pool_allowed());
-  } else {
-    // For JIT we have multiple entrypoints functionality which moved the frame
-    // setup into the [TargetEntryInstr] (which will set the constant pool
-    // allowed bit to true).  Despite this we still have to set the
-    // constant pool allowed bit to true here as well, because we can generate
-    // code for [CatchEntryInstr]s, which need the pool.
-    __ set_constant_pool_allowed(true);
-  }
+  // For JIT we have multiple entrypoints functionality which moved the frame
+  // setup into the [TargetEntryInstr] (which will set the constant pool
+  // allowed bit to true).  Despite this we still have to set the
+  // constant pool allowed bit to true here as well, because we can generate
+  // code for [CatchEntryInstr]s, which need the pool.
+  __ set_constant_pool_allowed(true);
 
   VisitBlocks();
 
@@ -963,9 +924,16 @@
                                      const Code& stub,
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
-  __ BranchLink(stub);
-  EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
-  AddStubCallTarget(stub);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions && !stub.InVMHeap()) {
+    AddPcRelativeCallStubTarget(stub);
+    __ GenerateUnRelocatedPcRelativeCall();
+    EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
+  } else {
+    ASSERT(!stub.IsNull());
+    __ BranchLink(stub);
+    EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
+    AddStubCallTarget(stub);
+  }
 }
 
 void FlowGraphCompiler::GeneratePatchableCall(TokenPosition token_pos,
@@ -992,14 +960,21 @@
                                                LocationSummary* locs,
                                                const Function& target,
                                                Code::EntryKind entry_kind) {
-  // Call sites to the same target can share object pool entries. These
-  // call sites are never patched for breakpoints: the function is deoptimized
-  // and the unoptimized code with IC calls for static calls is patched instead.
-  ASSERT(is_optimizing());
-  const auto& stub = StubCode::CallStaticFunction();
-  __ BranchLinkWithEquivalence(stub, target, entry_kind);
-  EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
-  AddStaticCallTarget(target);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    AddPcRelativeCallTarget(target, entry_kind);
+    __ GenerateUnRelocatedPcRelativeCall();
+    EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
+  } else {
+    ASSERT(is_optimizing());
+    // Call sites to the same target can share object pool entries. These
+    // call sites are never patched for breakpoints: the function is deoptimized
+    // and the unoptimized code with IC calls for static calls is patched
+    // instead.
+    const auto& stub = StubCode::CallStaticFunction();
+    __ BranchLinkWithEquivalence(stub, target, entry_kind);
+    EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
+    AddStaticCallTarget(target, entry_kind);
+  }
 }
 
 void FlowGraphCompiler::GenerateRuntimeCall(TokenPosition token_pos,
@@ -1112,16 +1087,28 @@
 void FlowGraphCompiler::EmitSwitchableInstanceCall(const ICData& ic_data,
                                                    intptr_t deopt_id,
                                                    TokenPosition token_pos,
-                                                   LocationSummary* locs) {
+                                                   LocationSummary* locs,
+                                                   Code::EntryKind entry_kind) {
+  ASSERT(entry_kind == Code::EntryKind::kNormal ||
+         entry_kind == Code::EntryKind::kUnchecked);
   ASSERT(ic_data.NumArgsTested() == 1);
   const Code& initial_stub = StubCode::ICCallThroughFunction();
 
   __ Comment("SwitchableCall");
   __ LoadFromOffset(kWord, R0, SP,
                     (ic_data.CountWithoutTypeArgs() - 1) * kWordSize);
-  __ LoadUniqueObject(CODE_REG, initial_stub);
-  __ ldr(LR, FieldAddress(CODE_REG, Code::entry_point_offset(
-                                        Code::EntryKind::kMonomorphic)));
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    // The AOT runtime will replace the slot in the object pool with the
+    // entrypoint address - see clustered_snapshot.cc.
+    __ LoadUniqueObject(LR, initial_stub);
+  } else {
+    __ LoadUniqueObject(CODE_REG, initial_stub);
+    const intptr_t entry_point_offset =
+        entry_kind == Code::EntryKind::kNormal
+            ? Code::entry_point_offset(Code::EntryKind::kMonomorphic)
+            : Code::entry_point_offset(Code::EntryKind::kMonomorphicUnchecked);
+    __ ldr(LR, FieldAddress(CODE_REG, entry_point_offset));
+  }
   __ LoadUniqueObject(R9, ic_data);
   __ blx(LR);
 
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 82e5a82..a2400a3 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -242,12 +242,8 @@
   const Class& type_class = Class::ZoneHandle(zone(), type.type_class());
   ASSERT(type_class.NumTypeArguments() > 0);
   const Register kInstanceReg = R0;
-  Error& bound_error = Error::Handle(zone());
   const Type& smi_type = Type::Handle(zone(), Type::SmiType());
-  const bool smi_is_ok =
-      smi_type.IsSubtypeOf(type, &bound_error, NULL, Heap::kOld);
-  // Malformed type should have been handled at graph construction time.
-  ASSERT(smi_is_ok || bound_error.IsNull());
+  const bool smi_is_ok = smi_type.IsSubtypeOf(type, Heap::kOld);
   // Fast case for type = FutureOr<int/num/top-type>.
   __ BranchIfSmi(kInstanceReg,
                  smi_is_ok ? is_instance_lbl : is_not_instance_lbl);
@@ -276,11 +272,10 @@
   if (type_arguments.Length() == 1) {
     const AbstractType& tp_argument =
         AbstractType::ZoneHandle(zone(), type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
     if (tp_argument.IsType()) {
       // Check if type argument is dynamic, Object, or void.
       const Type& object_type = Type::Handle(zone(), Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL, NULL, Heap::kOld)) {
+      if (object_type.IsSubtypeOf(tp_argument, Heap::kOld)) {
         // Instance class test only necessary.
         return GenerateSubtype1TestCacheLookup(
             token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
@@ -328,9 +323,8 @@
   const Register kInstanceReg = R0;
   // If instance is Smi, check directly.
   const Class& smi_class = Class::Handle(zone(), Smi::Class());
-  if (smi_class.IsSubtypeOf(Object::null_type_arguments(), type_class,
-                            Object::null_type_arguments(), NULL, NULL,
-                            Heap::kOld)) {
+  if (Class::IsSubtypeOf(smi_class, Object::null_type_arguments(), type_class,
+                         Object::null_type_arguments(), Heap::kOld)) {
     // Fast case for type = int/num/top-type.
     __ BranchIfSmi(kInstanceReg, is_instance_lbl);
   } else {
@@ -338,7 +332,7 @@
   }
   const Register kClassIdReg = R2;
   __ LoadClassId(kClassIdReg, kInstanceReg);
-  // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted
+  // See ClassFinalizer::CheckSuperTypeAndInterfaces for list of restricted
   // interfaces.
   // Bool interface can be implemented only by core class Bool.
   if (type.IsBoolType()) {
@@ -579,7 +573,7 @@
                                            intptr_t deopt_id,
                                            const AbstractType& type,
                                            LocationSummary* locs) {
-  ASSERT(type.IsFinalized() && !type.IsMalformed() && !type.IsMalbounded());
+  ASSERT(type.IsFinalized());
   ASSERT(!type.IsObjectType() && !type.IsDynamicType() && !type.IsVoidType());
   const Register kInstantiatorTypeArgumentsReg = R1;
   const Register kFunctionTypeArgumentsReg = R2;
@@ -657,32 +651,11 @@
   ASSERT(!dst_type.IsNull());
   ASSERT(dst_type.IsFinalized());
   // Assignable check is skipped in FlowGraphBuilder, not here.
-  ASSERT(dst_type.IsMalformedOrMalbounded() ||
-         (!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
-          !dst_type.IsVoidType()));
+  ASSERT(!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
+         !dst_type.IsVoidType());
   const Register kInstantiatorTypeArgumentsReg = R1;
   const Register kFunctionTypeArgumentsReg = R2;
 
-  // Generate throw new TypeError() if the type is malformed or malbounded.
-  if (dst_type.IsMalformedOrMalbounded()) {
-    // A null object is always assignable and is returned as result.
-    Label is_assignable, runtime_call;
-    __ CompareObject(R0, Object::null_object());
-    __ b(&is_assignable, EQ);
-
-    __ PushObject(Object::null_object());  // Make room for the result.
-    __ Push(R0);                           // Push the source object.
-    __ PushObject(dst_name);               // Push the name of the destination.
-    __ PushObject(dst_type);               // Push the type of the destination.
-    GenerateRuntimeCall(token_pos, deopt_id, kBadTypeErrorRuntimeEntry, 3,
-                        locs);
-    // We should never return here.
-    __ brk(0);
-
-    __ Bind(&is_assignable);  // For a null object.
-    return;
-  }
-
   if (ShouldUseTypeTestingStubFor(is_optimizing(), dst_type)) {
     GenerateAssertAssignableViaTypeTestingStub(token_pos, deopt_id, dst_type,
                                                dst_name, locs);
@@ -793,17 +766,23 @@
       extracted_method, ObjectPool::Patchability::kNotPatchable);
 
   // We use a custom pool register to preserve caller PP.
-  const Register kPoolReg = R0;
+  Register kPoolReg = R0;
 
   // R1 = extracted function
   // R4 = offset of type argument vector (or 0 if class is not generic)
-  __ ldr(kPoolReg, FieldAddress(CODE_REG, Code::object_pool_offset()));
-  __ LoadFieldFromOffset(kPoolReg, CODE_REG, Code::object_pool_offset());
+  intptr_t pp_offset = 0;
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    // PP is not tagged on arm64.
+    kPoolReg = PP;
+    pp_offset = kHeapObjectTag;
+  } else {
+    __ LoadFieldFromOffset(kPoolReg, CODE_REG, Code::object_pool_offset());
+  }
   __ LoadImmediate(R4, type_arguments_field_offset);
-  __ LoadFieldFromOffset(R1, kPoolReg,
-                         ObjectPool::element_offset(function_index));
+  __ LoadFieldFromOffset(
+      R1, kPoolReg, ObjectPool::element_offset(function_index) + pp_offset);
   __ LoadFieldFromOffset(CODE_REG, kPoolReg,
-                         ObjectPool::element_offset(stub_index));
+                         ObjectPool::element_offset(stub_index) + pp_offset);
   __ LoadFieldFromOffset(R0, CODE_REG,
                          Code::entry_point_offset(Code::EntryKind::kUnchecked));
   __ br(R0);
@@ -840,9 +819,11 @@
     __ Comment("Invocation Count Check");
     const Register function_reg = R6;
     new_pp = R13;
-    // The pool pointer is not setup before entering the Dart frame.
-    // Temporarily setup pool pointer for this dart function.
-    __ LoadPoolPointer(new_pp);
+    if (!FLAG_precompiled_mode || !FLAG_use_bare_instructions) {
+      // The pool pointer is not setup before entering the Dart frame.
+      // Temporarily setup pool pointer for this dart function.
+      __ LoadPoolPointer(new_pp);
+    }
 
     // Load function object using the callee's pool pointer.
     __ LoadFunctionFromCalleePool(function_reg, function, new_pp);
@@ -939,9 +920,16 @@
                                      const Code& stub,
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
-  __ BranchLink(stub);
-  EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
-  AddStubCallTarget(stub);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions && !stub.InVMHeap()) {
+    AddPcRelativeCallStubTarget(stub);
+    __ GenerateUnRelocatedPcRelativeCall();
+    EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
+  } else {
+    ASSERT(!stub.IsNull());
+    __ BranchLink(stub);
+    EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
+    AddStubCallTarget(stub);
+  }
 }
 
 void FlowGraphCompiler::GeneratePatchableCall(TokenPosition token_pos,
@@ -970,14 +958,21 @@
                                                const Function& target,
                                                Code::EntryKind entry_kind) {
   // TODO(sjindel/entrypoints): Support multiple entrypoints on ARM64.
-  // Call sites to the same target can share object pool entries. These
-  // call sites are never patched for breakpoints: the function is deoptimized
-  // and the unoptimized code with IC calls for static calls is patched instead.
-  ASSERT(is_optimizing());
-  const Code& stub = StubCode::CallStaticFunction();
-  __ BranchLinkWithEquivalence(stub, target);
-  EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
-  AddStaticCallTarget(target);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    AddPcRelativeCallTarget(target, entry_kind);
+    __ GenerateUnRelocatedPcRelativeCall();
+    EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
+  } else {
+    // Call sites to the same target can share object pool entries. These
+    // call sites are never patched for breakpoints: the function is deoptimized
+    // and the unoptimized code with IC calls for static calls is patched
+    // instead.
+    ASSERT(is_optimizing());
+    const auto& stub = StubCode::CallStaticFunction();
+    __ BranchLinkWithEquivalence(stub, target);
+    EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
+    AddStaticCallTarget(target, entry_kind);
+  }
 }
 
 void FlowGraphCompiler::GenerateRuntimeCall(TokenPosition token_pos,
@@ -1084,7 +1079,9 @@
 void FlowGraphCompiler::EmitSwitchableInstanceCall(const ICData& ic_data,
                                                    intptr_t deopt_id,
                                                    TokenPosition token_pos,
-                                                   LocationSummary* locs) {
+                                                   LocationSummary* locs,
+                                                   Code::EntryKind entry_kind) {
+  // TODO(34162): Support multiple entry-points on ARM64.
   ASSERT(ic_data.NumArgsTested() == 1);
   const Code& initial_stub = StubCode::ICCallThroughFunction();
 
@@ -1099,11 +1096,18 @@
       op.AddObject(initial_stub, ObjectPool::Patchability::kPatchable);
   ASSERT((ic_data_index + 1) == initial_stub_index);
 
-  __ LoadDoubleWordFromPoolOffset(R5, CODE_REG,
-                                  ObjectPool::element_offset(ic_data_index));
-  __ ldr(TMP, FieldAddress(CODE_REG, Code::entry_point_offset(
-                                         Code::EntryKind::kMonomorphic)));
-  __ blr(TMP);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    // The AOT runtime will replace the slot in the object pool with the
+    // entrypoint address - see clustered_snapshot.cc.
+    __ LoadDoubleWordFromPoolOffset(R5, LR,
+                                    ObjectPool::element_offset(ic_data_index));
+  } else {
+    __ LoadDoubleWordFromPoolOffset(R5, CODE_REG,
+                                    ObjectPool::element_offset(ic_data_index));
+    __ ldr(LR, FieldAddress(CODE_REG, Code::entry_point_offset(
+                                          Code::EntryKind::kMonomorphic)));
+  }
+  __ blr(LR);
 
   EmitCallsiteMetadata(token_pos, DeoptId::kNone, RawPcDescriptors::kOther,
                        locs);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc b/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
index 009ecb9..b28c6cd 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
@@ -231,21 +231,17 @@
   __ PushConstant(dst_type);
   __ PushConstant(dst_name);
 
-  if (dst_type.IsMalformedOrMalbounded()) {
-    __ BadTypeError();
-  } else {
-    bool may_be_smi = false;
-    if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) {
-      const Class& type_class = Class::Handle(zone(), dst_type.type_class());
-      if (type_class.NumTypeArguments() == 0) {
-        const Class& smi_class = Class::Handle(zone(), Smi::Class());
-        may_be_smi = smi_class.IsSubtypeOf(
-            TypeArguments::Handle(zone()), type_class,
-            TypeArguments::Handle(zone()), NULL, NULL, Heap::kOld);
-      }
+  bool may_be_smi = false;
+  if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) {
+    const Class& type_class = Class::Handle(zone(), dst_type.type_class());
+    if (type_class.NumTypeArguments() == 0) {
+      const Class& smi_class = Class::Handle(zone(), Smi::Class());
+      may_be_smi = Class::IsSubtypeOf(smi_class, TypeArguments::Handle(zone()),
+                                      type_class, TypeArguments::Handle(zone()),
+                                      Heap::kOld);
     }
-    __ AssertAssignable(may_be_smi ? 1 : 0, __ AddConstant(test_cache));
   }
+  __ AssertAssignable(may_be_smi ? 1 : 0, __ AddConstant(test_cache));
 
   if (is_optimizing()) {
     // Register allocator does not think that our first input (also used as
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index c60cdb3..31be382 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -255,12 +255,8 @@
   const Class& type_class = Class::ZoneHandle(zone(), type.type_class());
   ASSERT(type_class.NumTypeArguments() > 0);
   const Register kInstanceReg = EAX;
-  Error& bound_error = Error::Handle(zone());
   const Type& smi_type = Type::Handle(zone(), Type::SmiType());
-  const bool smi_is_ok =
-      smi_type.IsSubtypeOf(type, &bound_error, NULL, Heap::kOld);
-  // Malformed type should have been handled at graph construction time.
-  ASSERT(smi_is_ok || bound_error.IsNull());
+  const bool smi_is_ok = smi_type.IsSubtypeOf(type, Heap::kOld);
   __ testl(kInstanceReg, Immediate(kSmiTagMask));
   if (smi_is_ok) {
     // Fast case for type = FutureOr<int/num/top-type>.
@@ -292,11 +288,10 @@
   if (type_arguments.Length() == 1) {
     const AbstractType& tp_argument =
         AbstractType::ZoneHandle(zone(), type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
     if (tp_argument.IsType()) {
       // Check if type argument is dynamic, Object, or void.
       const Type& object_type = Type::Handle(zone(), Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL, NULL, Heap::kOld)) {
+      if (object_type.IsSubtypeOf(tp_argument, Heap::kOld)) {
         // Instance class test only necessary.
         return GenerateSubtype1TestCacheLookup(
             token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
@@ -344,9 +339,8 @@
   __ testl(kInstanceReg, Immediate(kSmiTagMask));
   // If instance is Smi, check directly.
   const Class& smi_class = Class::Handle(zone(), Smi::Class());
-  if (smi_class.IsSubtypeOf(Object::null_type_arguments(), type_class,
-                            Object::null_type_arguments(), NULL, NULL,
-                            Heap::kOld)) {
+  if (Class::IsSubtypeOf(smi_class, Object::null_type_arguments(), type_class,
+                         Object::null_type_arguments(), Heap::kOld)) {
     // Fast case for type = int/num/top-type.
     __ j(ZERO, is_instance_lbl);
   } else {
@@ -354,7 +348,7 @@
   }
   const Register kClassIdReg = ECX;
   __ LoadClassId(kClassIdReg, kInstanceReg);
-  // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted
+  // See ClassFinalizer::CheckSuperTypeAndInterfaces for list of restricted
   // interfaces.
   // Bool interface can be implemented only by core class Bool.
   if (type.IsBoolType()) {
@@ -601,7 +595,7 @@
                                            intptr_t deopt_id,
                                            const AbstractType& type,
                                            LocationSummary* locs) {
-  ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
+  ASSERT(type.IsFinalized());
   ASSERT(!type.IsObjectType() && !type.IsDynamicType() && !type.IsVoidType());
 
   __ pushl(EDX);  // Store instantiator type arguments.
@@ -681,9 +675,8 @@
   ASSERT(!dst_type.IsNull());
   ASSERT(dst_type.IsFinalized());
   // Assignable check is skipped in FlowGraphBuilder, not here.
-  ASSERT(dst_type.IsMalformedOrMalbounded() ||
-         (!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
-          !dst_type.IsVoidType()));
+  ASSERT(!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
+         !dst_type.IsVoidType());
   __ pushl(EDX);  // Store instantiator type arguments.
   __ pushl(ECX);  // Store function type arguments.
   // A null object is always assignable and is returned as result.
@@ -693,23 +686,6 @@
   __ cmpl(EAX, raw_null);
   __ j(EQUAL, &is_assignable);
 
-  // Generate throw new TypeError() if the type is malformed or malbounded.
-  if (dst_type.IsMalformedOrMalbounded()) {
-    __ PushObject(Object::null_object());  // Make room for the result.
-    __ pushl(EAX);                         // Push the source object.
-    __ PushObject(dst_name);               // Push the name of the destination.
-    __ PushObject(dst_type);               // Push the type of the destination.
-    GenerateRuntimeCall(token_pos, deopt_id, kBadTypeErrorRuntimeEntry, 3,
-                        locs);
-    // We should never return here.
-    __ int3();
-
-    __ Bind(&is_assignable);  // For a null object.
-    __ popl(ECX);             // Remove pushed function type arguments.
-    __ popl(EDX);             // Remove pushed instantiator type arguments.
-    return;
-  }
-
   // Generate inline type check, linking to runtime call if not assignable.
   SubtypeTestCache& test_cache = SubtypeTestCache::ZoneHandle(zone());
   test_cache = GenerateInlineInstanceof(token_pos, dst_type, &is_assignable,
@@ -884,7 +860,7 @@
   const auto& stub = StubCode::CallStaticFunction();
   __ Call(stub, true /* movable_target */);
   EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
-  AddStaticCallTarget(target);
+  AddStaticCallTarget(target, entry_kind);
 }
 
 void FlowGraphCompiler::GenerateRuntimeCall(TokenPosition token_pos,
@@ -992,7 +968,8 @@
 void FlowGraphCompiler::EmitSwitchableInstanceCall(const ICData& ic_data,
                                                    intptr_t deopt_id,
                                                    TokenPosition token_pos,
-                                                   LocationSummary* locs) {
+                                                   LocationSummary* locs,
+                                                   Code::EntryKind entry_kind) {
   // Only generated with precompilation.
   UNREACHABLE();
 }
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 579e9f1..7d0bb49 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -247,12 +247,8 @@
   const Class& type_class = Class::ZoneHandle(zone(), type.type_class());
   ASSERT(type_class.NumTypeArguments() > 0);
   const Register kInstanceReg = RAX;
-  Error& bound_error = Error::Handle(zone());
   const Type& smi_type = Type::Handle(zone(), Type::SmiType());
-  const bool smi_is_ok =
-      smi_type.IsSubtypeOf(type, &bound_error, NULL, Heap::kOld);
-  // Malformed type should have been handled at graph construction time.
-  ASSERT(smi_is_ok || bound_error.IsNull());
+  const bool smi_is_ok = smi_type.IsSubtypeOf(type, Heap::kOld);
   __ testq(kInstanceReg, Immediate(kSmiTagMask));
   if (smi_is_ok) {
     // Fast case for type = FutureOr<int/num/top-type>.
@@ -285,12 +281,11 @@
   if (type_arguments.Length() == 1) {
     const AbstractType& tp_argument =
         AbstractType::ZoneHandle(zone(), type_arguments.TypeAt(0));
-    ASSERT(!tp_argument.IsMalformed());
     if (tp_argument.IsType()) {
       ASSERT(tp_argument.HasTypeClass());
       // Check if type argument is dynamic, Object, or void.
       const Type& object_type = Type::Handle(zone(), Type::ObjectType());
-      if (object_type.IsSubtypeOf(tp_argument, NULL, NULL, Heap::kOld)) {
+      if (object_type.IsSubtypeOf(tp_argument, Heap::kOld)) {
         // Instance class test only necessary.
         return GenerateSubtype1TestCacheLookup(
             token_pos, type_class, is_instance_lbl, is_not_instance_lbl);
@@ -343,9 +338,8 @@
   __ testq(kInstanceReg, Immediate(kSmiTagMask));
   // If instance is Smi, check directly.
   const Class& smi_class = Class::Handle(zone(), Smi::Class());
-  if (smi_class.IsSubtypeOf(Object::null_type_arguments(), type_class,
-                            Object::null_type_arguments(), NULL, NULL,
-                            Heap::kOld)) {
+  if (Class::IsSubtypeOf(smi_class, Object::null_type_arguments(), type_class,
+                         Object::null_type_arguments(), Heap::kOld)) {
     // Fast case for type = int/num/top-type.
     __ j(ZERO, is_instance_lbl);
   } else {
@@ -353,7 +347,7 @@
   }
   const Register kClassIdReg = R10;
   __ LoadClassId(kClassIdReg, kInstanceReg);
-  // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted
+  // See ClassFinalizer::CheckSuperTypeAndInterfaces for list of restricted
   // interfaces.
   // Bool interface can be implemented only by core class Bool.
   if (type.IsBoolType()) {
@@ -602,7 +596,7 @@
                                            intptr_t deopt_id,
                                            const AbstractType& type,
                                            LocationSummary* locs) {
-  ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
+  ASSERT(type.IsFinalized());
   ASSERT(!type.IsObjectType() && !type.IsDynamicType() && !type.IsVoidType());
 
   Label is_instance, is_not_instance;
@@ -674,33 +668,12 @@
   ASSERT(!dst_type.IsNull());
   ASSERT(dst_type.IsFinalized());
   // Assignable check is skipped in FlowGraphBuilder, not here.
-  ASSERT(dst_type.IsMalformedOrMalbounded() ||
-         (!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
-          !dst_type.IsVoidType()));
+  ASSERT(!dst_type.IsDynamicType() && !dst_type.IsObjectType() &&
+         !dst_type.IsVoidType());
 
   const Register kInstantiatorTypeArgumentsReg = RDX;
   const Register kFunctionTypeArgumentsReg = RCX;
 
-  // A null object is always assignable and is returned as result.
-  // Generate throw new TypeError() if the type is malformed or malbounded.
-  if (dst_type.IsMalformedOrMalbounded()) {
-    Label is_assignable;
-    __ CompareObject(RAX, Object::null_object());
-    __ j(EQUAL, &is_assignable);
-
-    __ PushObject(Object::null_object());  // Make room for the result.
-    __ pushq(RAX);                         // Push the source object.
-    __ PushObject(dst_name);               // Push the name of the destination.
-    __ PushObject(dst_type);               // Push the type of the destination.
-    GenerateRuntimeCall(token_pos, deopt_id, kBadTypeErrorRuntimeEntry, 3,
-                        locs);
-    // We should never return here.
-    __ int3();
-
-    __ Bind(&is_assignable);  // For a null object.
-    return;
-  }
-
   if (ShouldUseTypeTestingStubFor(is_optimizing(), dst_type)) {
     GenerateAssertAssignableViaTypeTestingStub(token_pos, deopt_id, dst_type,
                                                dst_name, locs);
@@ -804,6 +777,7 @@
 
   const Code& build_method_extractor = Code::ZoneHandle(
       isolate()->object_store()->build_method_extractor_code());
+  ASSERT(!build_method_extractor.IsNull());
 
   const intptr_t stub_index = __ object_pool_wrapper().AddObject(
       build_method_extractor, ObjectPool::Patchability::kNotPatchable);
@@ -811,11 +785,15 @@
       extracted_method, ObjectPool::Patchability::kNotPatchable);
 
   // We use a custom pool register to preserve caller PP.
-  const Register kPoolReg = RAX;
+  Register kPoolReg = RAX;
 
   // RBX = extracted function
   // RDX = offset of type argument vector (or 0 if class is not generic)
-  __ movq(kPoolReg, FieldAddress(CODE_REG, Code::object_pool_offset()));
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    kPoolReg = PP;
+  } else {
+    __ movq(kPoolReg, FieldAddress(CODE_REG, Code::object_pool_offset()));
+  }
   __ movq(RDX, Immediate(type_arguments_field_offset));
   __ movq(RBX,
           FieldAddress(kPoolReg, ObjectPool::element_offset(function_index)));
@@ -857,7 +835,9 @@
     __ EnterOsrFrame(extra_slots * kWordSize);
   } else {
     const Register new_pp = R13;
-    __ LoadPoolPointer(new_pp);
+    if (!FLAG_precompiled_mode || !FLAG_use_bare_instructions) {
+      __ LoadPoolPointer(new_pp);
+    }
 
     const Function& function = parsed_function().function();
     if (CanOptimizeFunction() && function.IsOptimizable() &&
@@ -917,30 +897,12 @@
 void FlowGraphCompiler::CompileGraph() {
   InitCompiler();
 
-  if (FLAG_precompiled_mode) {
-    const Function& function = parsed_function().function();
-    if (function.IsDynamicFunction()) {
-      SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
-      __ MonomorphicCheckedEntry();
-      SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
-    }
-
-    // For JIT we have multiple entrypoints functionality which moved the
-    // intrinsification to the [TargetEntryInstr::EmitNativeCode].
-    if (TryIntrinsify()) {
-      // Skip regular code generation.
-      return;
-    }
-    EmitFrameEntry();
-    ASSERT(__ constant_pool_allowed());
-  } else {
-    // For JIT we have multiple entrypoints functionality which moved the frame
-    // setup into the [TargetEntryInstr] (which will set the constant pool
-    // allowed bit to true).  Despite this we still have to set the
-    // constant pool allowed bit to true here as well, because we can generate
-    // code for [CatchEntryInstr]s, which need the pool.
-    __ set_constant_pool_allowed(true);
-  }
+  // We have multiple entrypoints functionality which moved the frame
+  // setup into the [FunctionEntryInstr] (which will set the constant pool
+  // allowed bit to true).  Despite this we still have to set the
+  // constant pool allowed bit to true here as well, because we can generate
+  // code for [CatchEntryInstr]s, which need the pool.
+  __ set_constant_pool_allowed(true);
 
   ASSERT(!block_order().is_empty());
   VisitBlocks();
@@ -954,9 +916,16 @@
                                      const Code& stub,
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
-  __ Call(stub);
-  EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
-  AddStubCallTarget(stub);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions && !stub.InVMHeap()) {
+    AddPcRelativeCallStubTarget(stub);
+    __ GenerateUnRelocatedPcRelativeCall();
+    EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
+  } else {
+    ASSERT(!stub.IsNull());
+    __ Call(stub);
+    EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
+    AddStubCallTarget(stub);
+  }
 }
 
 void FlowGraphCompiler::GeneratePatchableCall(TokenPosition token_pos,
@@ -983,14 +952,21 @@
                                                LocationSummary* locs,
                                                const Function& target,
                                                Code::EntryKind entry_kind) {
-  // Call sites to the same target can share object pool entries. These
-  // call sites are never patched for breakpoints: the function is deoptimized
-  // and the unoptimized code with IC calls for static calls is patched instead.
   ASSERT(is_optimizing());
-  const auto& stub_entry = StubCode::CallStaticFunction();
-  __ CallWithEquivalence(stub_entry, target, entry_kind);
-  EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
-  AddStaticCallTarget(target);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    AddPcRelativeCallTarget(target, entry_kind);
+    __ GenerateUnRelocatedPcRelativeCall();
+    EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
+  } else {
+    // Call sites to the same target can share object pool entries. These
+    // call sites are never patched for breakpoints: the function is deoptimized
+    // and the unoptimized code with IC calls for static calls is patched
+    // instead.
+    const auto& stub_entry = StubCode::CallStaticFunction();
+    __ CallWithEquivalence(stub_entry, target, entry_kind);
+    EmitCallsiteMetadata(token_pos, deopt_id, kind, locs);
+    AddStaticCallTarget(target, entry_kind);
+  }
 }
 
 void FlowGraphCompiler::GenerateRuntimeCall(TokenPosition token_pos,
@@ -1104,15 +1080,27 @@
 void FlowGraphCompiler::EmitSwitchableInstanceCall(const ICData& ic_data,
                                                    intptr_t deopt_id,
                                                    TokenPosition token_pos,
-                                                   LocationSummary* locs) {
+                                                   LocationSummary* locs,
+                                                   Code::EntryKind entry_kind) {
+  ASSERT(entry_kind == Code::EntryKind::kNormal ||
+         entry_kind == Code::EntryKind::kUnchecked);
   ASSERT(ic_data.NumArgsTested() == 1);
   const Code& initial_stub = StubCode::ICCallThroughFunction();
 
   __ Comment("SwitchableCall");
   __ movq(RDI, Address(RSP, (ic_data.CountWithoutTypeArgs() - 1) * kWordSize));
-  __ LoadUniqueObject(CODE_REG, initial_stub);
-  __ movq(RCX, FieldAddress(CODE_REG, Code::entry_point_offset(
-                                          Code::EntryKind::kMonomorphic)));
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    // The AOT runtime will replace the slot in the object pool with the
+    // entrypoint address - see clustered_snapshot.cc.
+    __ LoadUniqueObject(RCX, initial_stub);
+  } else {
+    intptr_t entry_point_offset =
+        entry_kind == Code::EntryKind::kNormal
+            ? Code::entry_point_offset(Code::EntryKind::kMonomorphic)
+            : Code::entry_point_offset(Code::EntryKind::kMonomorphicUnchecked);
+    __ LoadUniqueObject(CODE_REG, initial_stub);
+    __ movq(RCX, FieldAddress(CODE_REG, entry_point_offset));
+  }
   __ LoadUniqueObject(RBX, ic_data);
   __ call(RCX);
 
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 9864b2f..65d80af 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -187,7 +187,7 @@
     bool test_succeded = false;
     if (use_subtype_test) {
       cls_type = cls.RareType();
-      test_succeded = cls_type.IsSubtypeOf(dst_type, NULL, NULL, Heap::kNew);
+      test_succeded = cls_type.IsSubtypeOf(dst_type, Heap::kNew);
     } else {
       while (!cls.IsObjectClass()) {
         if (cls.raw() == klass.raw()) {
@@ -311,7 +311,7 @@
 }
 
 bool HierarchyInfo::CanUseSubtypeRangeCheckFor(const AbstractType& type) {
-  ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
+  ASSERT(type.IsFinalized());
 
   if (!type.IsInstantiated() || !type.IsType() || type.IsFunctionType() ||
       type.IsDartFunctionType()) {
@@ -354,7 +354,7 @@
 
 bool HierarchyInfo::CanUseGenericSubtypeRangeCheckFor(
     const AbstractType& type) {
-  ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
+  ASSERT(type.IsFinalized());
 
   if (!type.IsType() || type.IsFunctionType() || type.IsDartFunctionType()) {
     return false;
@@ -839,13 +839,11 @@
     const TypeArguments& function_type_args = TypeArguments::Handle(
         Z, TypeArguments::RawCast(constant_function_type_args->value().raw()));
 
-    Error& error_bound = Error::Handle(Z);
-
     AbstractType& sub_type = AbstractType::Handle(Z, sub_type_.raw());
     AbstractType& super_type = AbstractType::Handle(Z, super_type_.raw());
-    if (AbstractType::InstantiateAndTestSubtype(
-            &sub_type, &super_type, &error_bound, instantiator_type_args,
-            function_type_args)) {
+    if (AbstractType::InstantiateAndTestSubtype(&sub_type, &super_type,
+                                                instantiator_type_args,
+                                                function_type_args)) {
       return NULL;
     }
   }
@@ -2087,7 +2085,12 @@
     case kUnboxedInt64:
       return value.IsSmi() || value.IsMint();
 
-    case kUnboxedUint32:  // Only truncating Uint32 arithmetic is supported.
+    case kUnboxedUint32:
+      if (value.IsSmi() || value.IsMint()) {
+        return Utils::IsUint(32, value.AsInt64Value());
+      }
+      return false;
+
     default:
       UNREACHABLE();
   }
@@ -2755,13 +2758,12 @@
   }
 
   if ((instantiator_type_args != nullptr) && (function_type_args != nullptr)) {
-    Error& bound_error = Error::Handle(Z);
-
     AbstractType& new_dst_type = AbstractType::Handle(
-        Z, dst_type().InstantiateFrom(
-               *instantiator_type_args, *function_type_args, kAllFree,
-               &bound_error, nullptr, nullptr, Heap::kOld));
-    if (new_dst_type.IsMalformedOrMalbounded() || !bound_error.IsNull()) {
+        Z,
+        dst_type().InstantiateFrom(*instantiator_type_args, *function_type_args,
+                                   kAllFree, nullptr, Heap::kOld));
+    if (new_dst_type.IsNull()) {
+      // Failed instantiation in dead code.
       return this;
     }
     if (new_dst_type.IsTypeRef()) {
@@ -2909,7 +2911,8 @@
         box_defn->value()->definition()->representation();
     if (from_representation == representation()) {
       return box_defn->value()->definition();
-    } else {
+    } else if (from_representation != kTagged) {
+      // Only operate on explicit unboxed operands.
       UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
           from_representation, representation(),
           box_defn->value()->CopyWithType(),
@@ -3055,14 +3058,22 @@
   return (cid == kDynamicCid) || (cid == kMintCid) || (cid == kDoubleCid);
 }
 
-static bool MaybeNumber(CompileType* type) {
-  ASSERT(Type::Handle(Type::Number())
-             .IsMoreSpecificThan(Type::Handle(Type::Number()), NULL, NULL,
-                                 Heap::kOld));
-  return type->ToAbstractType()->IsDynamicType() ||
-         type->ToAbstractType()->IsObjectType() ||
-         type->ToAbstractType()->IsTypeParameter() ||
-         type->IsMoreSpecificThan(Type::Handle(Type::Number()));
+static bool MayBeNumber(CompileType* type) {
+  if (type->IsNone()) {
+    return false;
+  }
+  auto& compile_type = AbstractType::Handle(type->ToAbstractType()->raw());
+  if (compile_type.IsType() &&
+      Class::Handle(compile_type.type_class()).IsFutureOrClass()) {
+    const auto& type_args = TypeArguments::Handle(compile_type.arguments());
+    if (type_args.IsNull()) {
+      return true;
+    }
+    compile_type = type_args.TypeAt(0);
+  }
+  // Note that type 'Number' is a subtype of itself.
+  return compile_type.IsTopType() || compile_type.IsTypeParameter() ||
+         compile_type.IsSubtypeOf(Type::Handle(Type::Number()), Heap::kOld);
 }
 
 // Returns a replacement for a strict comparison and signals if the result has
@@ -3077,8 +3088,8 @@
     if (!MayBeBoxableNumber(compare->left()->Type()->ToCid()) ||
         !MayBeBoxableNumber(compare->right()->Type()->ToCid())) {
       compare->set_needs_number_check(false);
-    } else if (!MaybeNumber(compare->left()->Type()) ||
-               !MaybeNumber(compare->right()->Type())) {
+    } else if (!MayBeNumber(compare->left()->Type()) ||
+               !MayBeNumber(compare->right()->Type())) {
       compare->set_needs_number_check(false);
     }
   }
@@ -3648,26 +3659,39 @@
 }
 
 void FunctionEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+#if defined(TARGET_ARCH_X64)
+  // Ensure the start of the monomorphic checked entry is 2-byte aligned (see
+  // also Assembler::MonomorphicCheckedEntry()).
+  if (__ CodeSize() % 2 == 1) {
+    __ nop();
+  }
+#endif
   __ Bind(compiler->GetJumpLabel(this));
 
   // In the AOT compiler we want to reduce code size, so generate no
   // fall-through code in [FlowGraphCompiler::CompileGraph()].
   // (As opposed to here where we don't check for the return value of
   // [Intrinsify]).
-  if (!FLAG_precompiled_mode) {
 #if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM)
-    // NOTE: Because in JIT X64/ARM mode the graph can have multiple
-    // entrypoints, so we generate several times the same intrinsification &
-    // frame setup.  That's why we cannot rely on the constant pool being
-    // `false` when we come in here.
-    __ set_constant_pool_allowed(false);
-    // TODO(#34162): Don't emit more code if 'TryIntrinsify' returns 'true'
-    // (meaning the function was fully intrinsified).
-    compiler->TryIntrinsify();
-    compiler->EmitPrologue();
-    ASSERT(__ constant_pool_allowed());
-#endif
+  if (FLAG_precompiled_mode) {
+    const Function& function = compiler->parsed_function().function();
+    if (function.IsDynamicFunction()) {
+      compiler->SpecialStatsBegin(CombinedCodeStatistics::kTagCheckedEntry);
+      __ MonomorphicCheckedEntry();
+      compiler->SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
+    }
   }
+  // NOTE: Because in JIT X64/ARM mode the graph can have multiple
+  // entrypoints, so we generate several times the same intrinsification &
+  // frame setup.  That's why we cannot rely on the constant pool being
+  // `false` when we come in here.
+  __ set_constant_pool_allowed(false);
+  // TODO(#34162): Don't emit more code if 'TryIntrinsify' returns 'true'
+  // (meaning the function was fully intrinsified).
+  compiler->TryIntrinsify();
+  compiler->EmitPrologue();
+  ASSERT(__ constant_pool_allowed());
+#endif
 
   if (!compiler->is_optimizing()) {
 #if !defined(TARGET_ARCH_DBC)
@@ -4547,7 +4571,7 @@
   const Register box = locs()->in(0).reg();
   const Register temp =
       (locs()->temp_count() > 0) ? locs()->temp(0).reg() : kNoRegister;
-  Label* deopt = compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptCheckClass);
+  Label* deopt = compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnbox);
   Label is_smi;
 
   if ((value()->Type()->ToNullableCid() == box_cid) &&
diff --git a/runtime/vm/compiler/backend/il_dbc.cc b/runtime/vm/compiler/backend/il_dbc.cc
index 634b9dc..42beb69 100644
--- a/runtime/vm/compiler/backend/il_dbc.cc
+++ b/runtime/vm/compiler/backend/il_dbc.cc
@@ -1850,26 +1850,6 @@
   }
 }
 
-static Token::Kind FlipCondition(Token::Kind kind) {
-  switch (kind) {
-    case Token::kEQ:
-      return Token::kNE;
-    case Token::kNE:
-      return Token::kEQ;
-    case Token::kLT:
-      return Token::kGTE;
-    case Token::kGT:
-      return Token::kLTE;
-    case Token::kLTE:
-      return Token::kGT;
-    case Token::kGTE:
-      return Token::kLT;
-    default:
-      UNREACHABLE();
-      return Token::kNE;
-  }
-}
-
 static SimulatorBytecode::Opcode OpcodeForSmiCondition(Token::Kind kind) {
   switch (kind) {
     case Token::kEQ:
@@ -1919,11 +1899,11 @@
   if (labels.fall_through != labels.false_label) {
     // If we aren't falling through to the false label, we can save a Jump
     // instruction in the case that the true case is the fall through by
-    // flipping the sense of the test such that the instruction following the
+    // negating the sense of the test such that the instruction following the
     // test is the Jump to the false label.  In the case where both labels are
-    // null we don't flip the sense of the test.
+    // null we don't negate the sense of the test.
     condition = NEXT_IS_FALSE;
-    comparison = FlipCondition(kind);
+    comparison = Token::NegateComparison(kind);
   }
   if (compiler->is_optimizing()) {
     const Register left = locs->in(0).reg();
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index 6f82314..9bd6ebb 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -587,7 +587,7 @@
 
   auto& metadata_or_error = Object::Handle(library.GetMetadata(function));
   if (metadata_or_error.IsError()) {
-    Exceptions::PropagateError(Error::Cast(metadata_or_error));
+    Report::LongJump(Error::Cast(metadata_or_error));
   }
   const Array& metadata = Array::Cast(metadata_or_error);
   if (metadata.Length() > 0) {
@@ -1263,8 +1263,7 @@
         PRINT_INLINING_TREE(NULL, &call_data->caller, &function, call);
         return true;
       } else {
-        error = thread()->sticky_error();
-        thread()->clear_sticky_error();
+        error = thread()->StealStickyError();
 
         if (error.IsLanguageError() &&
             (LanguageError::Cast(error).kind() == Report::kBailout)) {
@@ -2453,8 +2452,22 @@
       new (Z) FunctionEntryInstr(graph_entry, flow_graph->allocate_block_id(),
                                  call->GetBlock()->try_index(), DeoptId::kNone);
   (*entry)->InheritDeoptTarget(Z, call);
+
+  bool is_unchecked_call = false;
+  if (StaticCallInstr* static_call = call->AsStaticCall()) {
+    is_unchecked_call =
+        static_call->entry_kind() == Code::EntryKind::kUnchecked;
+  } else if (InstanceCallInstr* instance_call = call->AsInstanceCall()) {
+    is_unchecked_call =
+        instance_call->entry_kind() == Code::EntryKind::kUnchecked;
+  } else if (PolymorphicInstanceCallInstr* instance_call =
+                 call->AsPolymorphicInstanceCall()) {
+    is_unchecked_call =
+        instance_call->entry_kind() == Code::EntryKind::kUnchecked;
+  }
+
   Instruction* cursor = *entry;
-  if (flow_graph->isolate()->argument_type_checks() &&
+  if (flow_graph->isolate()->argument_type_checks() && !is_unchecked_call &&
       (kind != MethodRecognizer::kObjectArraySetIndexedUnchecked &&
        kind != MethodRecognizer::kGrowableArraySetIndexedUnchecked)) {
     // Only type check for the value. A type check for the index is not
@@ -3268,7 +3281,16 @@
     // Replace all uses of this definition with the result.
     if (call->HasUses()) {
       ASSERT(last->IsDefinition());
-      call->ReplaceUsesWith(last->AsDefinition());
+      Definition* ret = last->AsDefinition();
+      if (!ret->HasSSATemp()) {
+        // Currently, StoreIndexed and StoreInstanceField are defined as
+        // definitions despite producing no value. For now, catch the case
+        // where the new inlined code ends with one of those and replace
+        // the old uses of the original definition with uses of null.
+        ASSERT(ret->IsStoreIndexed() || ret->IsStoreInstanceField());
+        ret = flow_graph->constant_null();
+      }
+      call->ReplaceUsesWith(ret);
     }
     // Finally insert the sequence other definition in place of this one in the
     // graph.
@@ -3316,7 +3338,16 @@
     // Replace all uses of this definition with the result.
     if (call->HasUses()) {
       ASSERT(last->IsDefinition());
-      call->ReplaceUsesWith(last->AsDefinition());
+      Definition* ret = last->AsDefinition();
+      if (!ret->HasSSATemp()) {
+        // Currently, StoreIndexed and StoreInstanceField are defined as
+        // definitions despite producing no value. For now, catch the case
+        // where the new inlined code ends with one of those and replace
+        // the old uses of the original definition with uses of null.
+        ASSERT(ret->IsStoreIndexed() || ret->IsStoreInstanceField());
+        ret = flow_graph->constant_null();
+      }
+      call->ReplaceUsesWith(ret);
     }
     // Finally insert the sequence other definition in place of this one in the
     // graph.
@@ -4019,7 +4050,7 @@
         const Class& cls = Class::Handle(
             Z, flow_graph->isolate()->class_table()->At(receiver_cid));
         if (!cls.IsGeneric()) {
-          type = cls.CanonicalType();
+          type = cls.DeclarationType();
         }
       }
 
diff --git a/runtime/vm/compiler/backend/loops.cc b/runtime/vm/compiler/backend/loops.cc
index 168babf..f0e8a5b 100644
--- a/runtime/vm/compiler/backend/loops.cc
+++ b/runtime/vm/compiler/backend/loops.cc
@@ -64,6 +64,7 @@
   intptr_t VisitDescendant(LoopInfo* loop, Definition* def);
   void Classify(LoopInfo* loop, Definition* def);
   void ClassifySCC(LoopInfo* loop);
+  void ClassifyControl(LoopInfo* loop);
 
   // Transfer methods. Compute how induction of the operands, if any,
   // tranfers over the operation performed by the given definition.
@@ -96,6 +97,7 @@
   const GrowableArray<BlockEntryInstr*>& preorder_;
   GrowableArray<Definition*> stack_;
   GrowableArray<Definition*> scc_;
+  GrowableArray<BranchInstr*> branches_;
   DirectChainedHashMap<LoopInfo::InductionKV> cycle_;
   DirectChainedHashMap<VisitKV> map_;
   intptr_t current_index_;
@@ -130,6 +132,22 @@
   return false;
 }
 
+// Helper method to trace back to original true definition, now
+// also ignoring constraints and (un)boxing operations, since
+// these are not relevant to the induction behavior.
+static Definition* OriginalDefinition(Definition* def) {
+  while (true) {
+    Definition* orig;
+    if (def->IsConstraint() || def->IsBox() || def->IsUnbox()) {
+      orig = def->InputAt(0)->definition();
+    } else {
+      orig = def->OriginalDefinition();
+    }
+    if (orig == def) return def;
+    def = orig;
+  }
+}
+
 void InductionVarAnalysis::VisitHierarchy(LoopInfo* loop) {
   for (; loop != nullptr; loop = loop->next_) {
     VisitLoop(loop);
@@ -145,6 +163,7 @@
   current_index_ = 0;
   ASSERT(stack_.is_empty());
   ASSERT(map_.IsEmpty());
+  ASSERT(branches_.is_empty());
   for (BitVector::Iterator it(loop->blocks_); !it.Done(); it.Advance()) {
     BlockEntryInstr* block = preorder_[it.Current()];
     ASSERT(block->loop_info() != nullptr);
@@ -157,13 +176,20 @@
         Visit(loop, it.Current());
       }
     }
-    // Visit instructions.
+    // Visit instructions and collect branches.
     for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
-      Visit(loop, it.Current()->AsDefinition());
+      Instruction* instruction = it.Current();
+      Visit(loop, instruction->AsDefinition());
+      if (instruction->IsBranch()) {
+        branches_.Add(instruction->AsBranch());
+      }
     }
   }
   ASSERT(stack_.is_empty());
   map_.Clear();
+  // Classify loop control.
+  ClassifyControl(loop);
+  branches_.Clear();
 }
 
 bool InductionVarAnalysis::Visit(LoopInfo* loop, Definition* def) {
@@ -246,10 +272,8 @@
     induc = TransferBinary(loop, def);
   } else if (def->IsUnaryIntegerOp()) {
     induc = TransferUnary(loop, def);
-  } else if (def->IsConstraint() || def->IsBox() || def->IsUnbox()) {
-    induc = Lookup(loop, def->InputAt(0)->definition());  // pass-through
   } else {
-    Definition* orig = def->OriginalDefinition();
+    Definition* orig = OriginalDefinition(def);
     if (orig != def) {
       induc = Lookup(loop, orig);  // pass-through
     }
@@ -291,10 +315,8 @@
         update = SolveUnary(loop, def, init);
       } else if (def->IsConstraint()) {
         update = SolveConstraint(loop, def, init);
-      } else if (def->IsBox() || def->IsUnbox()) {
-        update = LookupCycle(def->InputAt(0)->definition());  // pass-through
       } else {
-        Definition* orig = def->OriginalDefinition();
+        Definition* orig = OriginalDefinition(def);
         if (orig != def) {
           update = LookupCycle(orig);  // pass-through
         }
@@ -327,6 +349,103 @@
   }
 }
 
+void InductionVarAnalysis::ClassifyControl(LoopInfo* loop) {
+  for (auto branch : branches_) {
+    // Proper comparison?
+    ComparisonInstr* compare = branch->comparison();
+    if (compare->InputCount() != 2) {
+      continue;
+    }
+    Token::Kind cmp = compare->kind();
+    // Proper loop exit? Express the condition in "loop while true" form.
+    TargetEntryInstr* ift = branch->true_successor();
+    TargetEntryInstr* iff = branch->false_successor();
+    if (loop->Contains(ift) && !loop->Contains(iff)) {
+      // ok as is
+    } else if (!loop->Contains(ift) && loop->Contains(iff)) {
+      cmp = Token::NegateComparison(cmp);
+    } else {
+      continue;
+    }
+    // Comparison against linear constant stride induction?
+    // Express the comparison such that induction appears left.
+    int64_t stride = 0;
+    InductionVar* x =
+        Lookup(loop, OriginalDefinition(compare->left()->definition()));
+    InductionVar* y =
+        Lookup(loop, OriginalDefinition(compare->right()->definition()));
+    if (InductionVar::IsLinear(x, &stride) && InductionVar::IsInvariant(y)) {
+      // ok as is
+    } else if (InductionVar::IsInvariant(x) &&
+               InductionVar::IsLinear(y, &stride)) {
+      InductionVar* tmp = x;
+      x = y;
+      y = tmp;
+      cmp = Token::FlipComparison(cmp);
+    } else {
+      continue;
+    }
+    // Safe, strict comparison for looping condition? Note that
+    // we reject symbolic bounds in non-strict looping conditions
+    // like i <= U as upperbound or i >= L as lowerbound since this
+    // could loop forever when U is kMaxInt64 or L is kMinInt64 under
+    // Dart's 64-bit wrap-around arithmetic. Non-unit strides could
+    // overshoot the bound with a wrap-around.
+    //
+    // TODO(ajcbik): accept more conditions when safe
+    //
+    switch (cmp) {
+      case Token::kLT:
+        // Accept i < U (i++).
+        if (stride == 1) break;
+        continue;
+      case Token::kGT:
+        // Accept i > L (i--).
+        if (stride == -1) break;
+        continue;
+      case Token::kLTE: {
+        // Accept i <= C (i++) as i < C + 1.
+        int64_t end = 0;
+        if (stride == 1 && InductionVar::IsConstant(y, &end) &&
+            end < kMaxInt64) {
+          y = new (zone_) InductionVar(end + 1);
+          break;
+        }
+        continue;
+      }
+      case Token::kGTE: {
+        // Accept i >= C (i--) as i > C - 1.
+        int64_t end = 0;
+        if (stride == -1 && InductionVar::IsConstant(y, &end) &&
+            kMinInt64 < end) {
+          y = new (zone_) InductionVar(end - 1);
+          break;
+        }
+        continue;
+      }
+      case Token::kNE: {
+        // Accept i != E as either i < E (i++) or i > E (i--)
+        // for constants bounds that make the loop always-taken.
+        int64_t start = 0;
+        int64_t end = 0;
+        if (InductionVar::IsConstant(x->initial_, &start) &&
+            InductionVar::IsConstant(y, &end)) {
+          if ((stride == +1 && start < end) || (stride == -1 && start > end)) {
+            break;
+          }
+        }
+        continue;
+      }
+      default:
+        continue;
+    }
+    // We found a safe limit on the induction variable. Note that depending
+    // on the intended use of this information, clients should still test
+    // dominance on the test and the initial value of the induction variable.
+    x->bounds_.Add(InductionVar::Bound(branch, y));
+  }
+}
+
 InductionVar* InductionVarAnalysis::TransferPhi(LoopInfo* loop,
                                                 Definition* def,
                                                 intptr_t idx) {
@@ -350,6 +469,7 @@
                                                    Definition* def) {
   InductionVar* x = Lookup(loop, def->InputAt(0)->definition());
   InductionVar* y = Lookup(loop, def->InputAt(1)->definition());
+
   switch (def->AsBinaryIntegerOp()->op_kind()) {
     case Token::kADD:
       return Add(x, y);
@@ -400,7 +520,6 @@
   InductionVar* c = LookupCycle(def->InputAt(0)->definition());
   if (c == init) {
     // Record a non-artifical bound constraint on a phi.
-    // TODO(ajcbik): detect full loop logic, trip counts, etc.
     ConstraintInstr* constraint = def->AsConstraint();
     if (constraint->target() != nullptr) {
       loop->limit_ = constraint;
@@ -467,9 +586,9 @@
 InductionVar* InductionVarAnalysis::SolveUnary(LoopInfo* loop,
                                                Definition* def,
                                                InductionVar* init) {
+  InductionVar* c = LookupCycle(def->InputAt(0)->definition());
   switch (def->AsUnaryIntegerOp()->op_kind()) {
-    case Token::kNEGATE: {
-      InductionVar* c = LookupCycle(def->InputAt(0)->definition());
+    case Token::kNEGATE:
       // Note that i = - i is periodic. The temporary
       // meaning is expressed in terms of the header phi.
       if (c == init) {
@@ -480,7 +599,6 @@
         }
       }
       return nullptr;
-    }
     default:
       return nullptr;
   }
@@ -490,13 +608,12 @@
   InductionVar* induc = loop->LookupInduction(def);
   if (induc == nullptr) {
     // Loop-invariants are added lazily.
-    if (!loop->Contains(def->GetBlock())) {
-      int64_t val = 0;
-      if (IsConstant(def, &val)) {
-        induc = new (zone_) InductionVar(val);
-      } else {
-        induc = new (zone_) InductionVar(0, 1, def);
-      }
+    int64_t val = 0;
+    if (IsConstant(def, &val)) {
+      induc = new (zone_) InductionVar(val);
+      loop->AddInduction(def, induc);
+    } else if (!loop->Contains(def->GetBlock())) {
+      induc = new (zone_) InductionVar(0, 1, def);
       loop->AddInduction(def, induc);
     }
   }
diff --git a/runtime/vm/compiler/backend/loops.h b/runtime/vm/compiler/backend/loops.h
index 30fdf59..2bd3b31 100644
--- a/runtime/vm/compiler/backend/loops.h
+++ b/runtime/vm/compiler/backend/loops.h
@@ -31,6 +31,15 @@
     kPeriodic,
   };
 
+  // Strict bound on unit stride linear induction:
+  //   i < U (i++)
+  //   i > L (i--)
+  struct Bound {
+    Bound(BranchInstr* b, InductionVar* l) : branch_(b), limit_(l) {}
+    BranchInstr* branch_;
+    InductionVar* limit_;
+  };
+
   // Constructor for an invariant.
   InductionVar(int64_t offset, int64_t mult, Definition* def)
       : kind_(kInvariant), offset_(offset), mult_(mult), def_(def) {}
@@ -95,6 +104,7 @@
     ASSERT(kind_ != kInvariant);
     return next_;
   }
+  const GrowableArray<Bound>& bounds() { return bounds_; }
 
   // For debugging.
   const char* ToCString() const;
@@ -109,11 +119,28 @@
     return x != nullptr && x->kind_ == kInvariant && x->mult_ == 0;
   }
 
+  // Returns true if x is a constant. Sets the value.
+  static bool IsConstant(InductionVar* x, int64_t* c) {
+    if (IsConstant(x)) {
+      *c = x->offset_;
+      return true;
+    }
+    return false;
+  }
+
   // Returns true if x is linear.
   static bool IsLinear(InductionVar* x) {
     return x != nullptr && x->kind_ == kLinear;
   }
 
+  // Returns true if x is linear with constant stride. Sets the stride.
+  static bool IsLinear(InductionVar* x, int64_t* s) {
+    if (IsLinear(x)) {
+      return IsConstant(x->next_, s);
+    }
+    return false;
+  }
+
   // Returns true if x is wrap-around.
   static bool IsWrapAround(InductionVar* x) {
     return x != nullptr && x->kind_ == kWrapAround;
@@ -124,9 +151,15 @@
     return x != nullptr && x->kind_ == kPeriodic;
   }
 
+  // Returns true if x is any induction.
+  static bool IsInduction(InductionVar* x) {
+    return x != nullptr && x->kind_ != kInvariant;
+  }
+
  private:
   friend class InductionVarAnalysis;
 
+  // Induction classification.
   const Kind kind_;
   union {
     struct {
@@ -140,6 +173,9 @@
     };
   };
 
+  // Bounds on induction.
+  GrowableArray<Bound> bounds_;
+
   DISALLOW_COPY_AND_ASSIGN(InductionVar);
 };
 
@@ -215,6 +251,8 @@
   DirectChainedHashMap<InductionKV> induction_;
 
   // Constraint on a header phi.
+  // TODO(ajcbik): very specific to smi range analysis,
+  //               should we really store it here?
   ConstraintInstr* limit_;
 
   // Loop hierarchy.
diff --git a/runtime/vm/compiler/backend/loops_test.cc b/runtime/vm/compiler/backend/loops_test.cc
index 8b27faa..1e9c8cd 100644
--- a/runtime/vm/compiler/backend/loops_test.cc
+++ b/runtime/vm/compiler/backend/loops_test.cc
@@ -36,15 +36,20 @@
         for (PhiIterator it(block->AsJoinEntry()); !it.Done(); it.Advance()) {
           InductionVar* induc = loop->LookupInduction(it.Current());
           if (induc != nullptr) {
-            f->Print("%*c%s\n", static_cast<int>(2 * depth), ' ',
+            // Obtain the debug string for induction and bounds.
+            f->Print("%*c%s", static_cast<int>(2 * depth), ' ',
                      induc->ToCString());
+            for (auto bound : induc->bounds()) {
+              f->Print(" %s", bound.limit_->ToCString());
+            }
+            f->Print("\n");
           }
         }
       }
       for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
         InductionVar* induc =
             loop->LookupInduction(it.Current()->AsDefinition());
-        if (induc != nullptr) {
+        if (InductionVar::IsInduction(induc)) {
           f->Print("%*c%s\n", static_cast<int>(2 * depth), ' ',
                    induc->ToCString());
         }
@@ -91,6 +96,9 @@
   flow_graph->ComputeSSA(0, nullptr);
   FlowGraphTypePropagator::Propagate(flow_graph);
   call_specializer.ApplyICData();
+  flow_graph->SelectRepresentations();
+  FlowGraphTypePropagator::Propagate(flow_graph);
+  flow_graph->Canonicalize();
 
   // Build loop hierarchy and find induction.
   const LoopHierarchy& hierarchy = flow_graph->GetLoopHierarchy();
@@ -104,7 +112,11 @@
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
-TEST_CASE(BasicInduction) {
+//
+// Induction tests.
+//
+
+TEST_CASE(BasicInductionUp) {
   const char* script_chars =
       "foo() {\n"
       "  for (int i = 0; i < 100; i++) {\n"
@@ -115,8 +127,25 @@
       "}\n";
   const char* expected =
       "  [0\n"
-      "  LIN(0 + 1 * i)\n"  // phi
-      "  LIN(1 + 1 * i)\n"  // add
+      "  LIN(0 + 1 * i) 100\n"  // phi
+      "  LIN(1 + 1 * i)\n"      // add
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+
+TEST_CASE(BasicInductionDown) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 100; i > 0; i--) {\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(100 + -1 * i) 0\n"  // phi
+      "  LIN(99 + -1 * i)\n"     // sub
       "  ]\n";
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
@@ -150,7 +179,7 @@
   const char* expected =
       "  [0\n"
       "  LIN(100 + -7 * i)\n"  // phi
-      "  LIN(93 + -7 * i)\n"   // add
+      "  LIN(93 + -7 * i)\n"   // sub
       "  ]\n";
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
@@ -170,13 +199,13 @@
       "}\n";
   const char* expected =
       "  [2\n"
-      "  LIN(0 + 1 * i)\n"  // i
+      "  LIN(0 + 1 * i) 100\n"  // i
       "  LIN(1 + 1 * i)\n"
       "    [1\n"
-      "    LIN(1 + 1 * i)\n"  // j
+      "    LIN(1 + 1 * i) 100\n"  // j
       "    LIN(2 + 1 * i)\n"
       "      [0\n"
-      "      LIN(2 + 1 * i)\n"  // k
+      "      LIN(2 + 1 * i) 100\n"  // k
       "      LIN(3 + 1 * i)\n"
       "      ]\n"
       "    ]\n"
@@ -198,11 +227,11 @@
       "}\n";
   const char* expected =
       "  [0\n"
-      "  LIN(1 + 12 * i)\n"   // phi (j)
-      "  LIN(0 + 1 * i)\n"    // phi
-      "  LIN(6 + 12 * i)\n"   // j-add
-      "  LIN(13 + 12 * i)\n"  // j-add
-      "  LIN(1 + 1 * i)\n"    // add
+      "  LIN(1 + 12 * i)\n"     // phi (j)
+      "  LIN(0 + 1 * i) 100\n"  // phi
+      "  LIN(6 + 12 * i)\n"     // j-add
+      "  LIN(13 + 12 * i)\n"    // j-add
+      "  LIN(1 + 1 * i)\n"      // add
       "  ]\n";
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
@@ -224,12 +253,12 @@
       "}\n";
   const char* expected =
       "  [0\n"
-      "  LIN(123 + 3 * i)\n"  // phi (j)
-      "  LIN(0 + 1 * i)\n"    // phi
-      "  LIN(126 + 3 * i)\n"  // j-true
-      "  LIN(126 + 3 * i)\n"  // j-false
-      "  LIN(1 + 1 * i)\n"    // add
-      "  LIN(126 + 3 * i)\n"  // phi (j)
+      "  LIN(123 + 3 * i)\n"    // phi (j)
+      "  LIN(0 + 1 * i) 100\n"  // phi
+      "  LIN(126 + 3 * i)\n"    // j-true
+      "  LIN(126 + 3 * i)\n"    // j-false
+      "  LIN(1 + 1 * i)\n"      // add
+      "  LIN(126 + 3 * i)\n"    // phi (j)
       "  ]\n";
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
@@ -249,12 +278,12 @@
       "}\n";
   const char* expected =
       "  [0\n"
-      "  LIN(1 + 1 * i)\n"    // phi
-      "  LIN(4 + 1 * i)\n"    // a
-      "  LIN(-4 + 1 * i)\n"   // b
-      "  LIN(7 + 7 * i)\n"    // c
-      "  LIN(-1 + -1 * i)\n"  // d
-      "  LIN(2 + 1 * i)\n"    // add
+      "  LIN(1 + 1 * i) 100\n"  // phi
+      "  LIN(4 + 1 * i)\n"      // a
+      "  LIN(-4 + 1 * i)\n"     // b
+      "  LIN(7 + 7 * i)\n"      // c
+      "  LIN(-1 + -1 * i)\n"    // d
+      "  LIN(2 + 1 * i)\n"      // add
       "  ]\n";
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
@@ -277,7 +306,7 @@
   const char* expected =
       "  [0\n"
       "  WRAP(99, LIN(0 + 1 * i))\n"    // phi (w)
-      "  LIN(0 + 1 * i)\n"              // phi
+      "  LIN(0 + 1 * i) 100\n"          // phi
       "  WRAP(102, LIN(3 + 1 * i))\n"   // a
       "  WRAP(94, LIN(-5 + 1 * i))\n"   // b
       "  WRAP(693, LIN(0 + 7 * i))\n"   // c
@@ -306,18 +335,174 @@
       "}\n";
   const char* expected =
       "  [0\n"
-      "  PERIOD(3, -3)\n"    // phi(p1)
-      "  PERIOD(5, 95)\n"    // phi(p2)
-      "  LIN(0 + 1 * i)\n"   // phi
-      "  PERIOD(6, 0)\n"     // a
-      "  PERIOD(-2, -8)\n"   // b
-      "  PERIOD(21, -21)\n"  // c
-      "  PERIOD(-3, 3)\n"    // d
-      "  PERIOD(-3, 3)\n"    // p1
-      "  PERIOD(95, 5)\n"    // p2
-      "  LIN(1 + 1 * i)\n"   // add
+      "  PERIOD(3, -3)\n"       // phi(p1)
+      "  PERIOD(5, 95)\n"       // phi(p2)
+      "  LIN(0 + 1 * i) 100\n"  // phi
+      "  PERIOD(6, 0)\n"        // a
+      "  PERIOD(-2, -8)\n"      // b
+      "  PERIOD(21, -21)\n"     // c
+      "  PERIOD(-3, 3)\n"       // d
+      "  PERIOD(-3, 3)\n"       // p1
+      "  PERIOD(95, 5)\n"       // p2
+      "  LIN(1 + 1 * i)\n"      // add
       "  ]\n";
   EXPECT_STREQ(ComputeInduction(thread, script_chars), expected);
 }
 
+//
+// Bound specific tests.
+//
+
+TEST_CASE(NonStrictConditionUp) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 0; i <= 100; i++) {\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(0 + 1 * i) 101\n"  // phi
+      "  LIN(1 + 1 * i)\n"      // add
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+
+#ifndef TARGET_ARCH_DBC
+TEST_CASE(NonStrictConditionUpWrap) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 0x7ffffffffffffffe; i <= 0x7fffffffffffffff; i++) {\n"
+      "    if (i < 0) break;\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(9223372036854775806 + 1 * i)\n"  // phi
+      "  LIN(9223372036854775806 + 1 * i)\n"  // (un)boxing
+      "  LIN(9223372036854775806 + 1 * i)\n"
+      "  LIN(9223372036854775806 + 1 * i)\n"
+      "  LIN(9223372036854775807 + 1 * i)\n"  // add
+      "  LIN(9223372036854775807 + 1 * i)\n"  // unbox
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+#endif
+
+TEST_CASE(NonStrictConditionDown) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 100; i >= 0; i--) {\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(100 + -1 * i) -1\n"  // phi
+      "  LIN(99 + -1 * i)\n"      // add
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+
+#ifndef TARGET_ARCH_DBC
+TEST_CASE(NonStrictConditionDownWrap) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 0x8000000000000001; i >= 0x8000000000000000; i--) {\n"
+      "    if (i > 0) break;\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(-9223372036854775807 + -1 * i)\n"  // phi
+      "  LIN(-9223372036854775807 + -1 * i)\n"  // (un)boxing
+      "  LIN(-9223372036854775807 + -1 * i)\n"
+      "  LIN(-9223372036854775807 + -1 * i)\n"
+      "  LIN(-9223372036854775808 + -1 * i)\n"  // sub
+      "  LIN(-9223372036854775808 + -1 * i)\n"  // unbox
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+#endif
+
+TEST_CASE(NotEqualConditionUp) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 10; i != 20; i++) {\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(10 + 1 * i) 20\n"  // phi
+      "  LIN(11 + 1 * i)\n"     // add
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+
+TEST_CASE(NotEqualConditionDown) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 20; i != 10; i--) {\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(20 + -1 * i) 10\n"  // phi
+      "  LIN(19 + -1 * i)\n"     // sub
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+
+TEST_CASE(SecondExitUp) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 0; i < 100; i++) {\n"
+      "     if (i >= 50) break;\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(0 + 1 * i) 100 50\n"  // phi
+      "  LIN(1 + 1 * i)\n"         // add
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+
+TEST_CASE(SecondExitDown) {
+  const char* script_chars =
+      "foo() {\n"
+      "  for (int i = 100; i > 0; i--) {\n"
+      "     if (i <= 10) break;\n"
+      "  }\n"
+      "}\n"
+      "main() {\n"
+      "  foo();\n"
+      "}\n";
+  const char* expected =
+      "  [0\n"
+      "  LIN(100 + -1 * i) 0 10\n"  // phi
+      "  LIN(99 + -1 * i)\n"        // sub
+      "  ]\n";
+  EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
+}
+
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index 554d61b..7fa08c0 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -114,28 +114,6 @@
   }
 }
 
-// For a comparison operation return an operation for the equivalent flipped
-// comparison: a (op) b === b (op') a.
-static Token::Kind FlipComparison(Token::Kind op) {
-  switch (op) {
-    case Token::kEQ:
-      return Token::kEQ;
-    case Token::kNE:
-      return Token::kNE;
-    case Token::kLT:
-      return Token::kGT;
-    case Token::kGT:
-      return Token::kLT;
-    case Token::kLTE:
-      return Token::kGTE;
-    case Token::kGTE:
-      return Token::kLTE;
-    default:
-      UNREACHABLE();
-      return Token::kILLEGAL;
-  }
-}
-
 // Given a boundary (right operand) and a comparison operation return
 // a symbolic range constraint for the left operand of the comparison assuming
 // that it evaluated to true.
@@ -208,7 +186,7 @@
       boundary = rel_op->InputAt(0)->definition();
       // InsertConstraintFor assumes that defn is left operand of a
       // comparison if it is right operand flip the comparison.
-      op_kind = FlipComparison(rel_op->kind());
+      op_kind = Token::FlipComparison(rel_op->kind());
     }
 
     // Constrain definition at the true successor.
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index 79574ea..f1c01f9 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -136,15 +136,46 @@
     }
   }
 
+  bool used_guarded_state = false;
   if (field.guarded_cid() != kIllegalCid &&
       field.guarded_cid() != kDynamicCid) {
-    nullable_cid =
-        nullable_cid != kDynamicCid ? nullable_cid : field.guarded_cid();
-    is_nullable = is_nullable && field.is_nullable();
+    // Use guarded state if it is more precise then what we already have.
+    if (nullable_cid == kDynamicCid) {
+      nullable_cid = field.guarded_cid();
+      used_guarded_state = true;
+    }
 
+    if (is_nullable && !field.is_nullable()) {
+      is_nullable = false;
+      used_guarded_state = true;
+    }
+  }
+
+  const Slot& slot = SlotCache::Instance(thread).Canonicalize(
+      Slot(Kind::kDartField,
+           IsImmutableBit::encode(field.is_final() || field.is_const()) |
+               IsNullableBit::encode(is_nullable) |
+               IsGuardedBit::encode(used_guarded_state),
+           nullable_cid, field.Offset(), &field,
+           &AbstractType::ZoneHandle(zone, field.type())));
+
+  // If properties of this slot were based on the guarded state make sure
+  // to add the field to the list of guarded fields. Note that during background
+  // compilation we might have two field clones that have incompatible guarded
+  // state - however both of these clones would correspond to the same slot.
+  // That is why we check the is_guarded_field() property of the slot rather
+  // than look at the current guarded state of the field, because current
+  // guarded state of the field might be set to kDynamicCid, while it was
+  // set to something more concrete when the slot was created.
+  // Note that we could have created this slot during an unsuccessful inlining
+  // attempt where we built and discarded the graph, in this case guarded
+  // fields associated with that graph are also discarded. However the slot
+  // itself stays behind in the compilation global cache. Thus we must always
+  // try to add it to the list of guarded fields of the current function.
+  if (slot.is_guarded_field()) {
     if (thread->isolate()->use_field_guards()) {
       ASSERT(parsed_function != nullptr);
-      parsed_function->AddToGuardedFields(&field);
+      parsed_function->AddToGuardedFields(&slot.field());
     } else {
       // In precompiled mode we use guarded_cid field for type information
       // inferred by TFA.
@@ -152,12 +183,7 @@
     }
   }
 
-  return SlotCache::Instance(thread).Canonicalize(
-      Slot(Kind::kDartField,
-           IsImmutableBit::encode(field.is_final() || field.is_const()) |
-               IsNullableBit::encode(is_nullable),
-           nullable_cid, field.Offset(), &field,
-           &AbstractType::ZoneHandle(zone, field.type())));
+  return slot;
 }
 
 CompileType Slot::ComputeCompileType() const {
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index aef5482..d448e40 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -142,6 +142,10 @@
   intptr_t nullable_cid() const { return cid_; }
   intptr_t is_nullable() const { return IsNullableBit::decode(flags_); }
 
+  // Returns true if properties of this slot were based on the guarded state
+  // of the corresponding Dart field.
+  bool is_guarded_field() const { return IsGuardedBit::decode(flags_); }
+
   // Static type of the slots if any.
   //
   // A value that is read from the slot is guaranteed to be assignable to its
@@ -183,7 +187,8 @@
              other.static_type_) {}
 
   using IsImmutableBit = BitField<int8_t, bool, 0, 1>;
-  using IsNullableBit = BitField<int8_t, bool, 1, 1>;
+  using IsNullableBit = BitField<int8_t, bool, IsImmutableBit::kNextBit, 1>;
+  using IsGuardedBit = BitField<int8_t, bool, IsNullableBit::kNextBit, 1>;
 
   template <typename T>
   const T* DataAs() const {
diff --git a/runtime/vm/compiler/backend/slot_test.cc b/runtime/vm/compiler/backend/slot_test.cc
new file mode 100644
index 0000000..9e81ee5
--- /dev/null
+++ b/runtime/vm/compiler/backend/slot_test.cc
@@ -0,0 +1,104 @@
+// Copyright (c) 2019, 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 "include/dart_api.h"
+
+#include "platform/globals.h"
+
+#include "vm/compiler/backend/slot.h"
+#include "vm/compiler/compiler_state.h"
+#include "vm/object.h"
+#include "vm/parser.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+// This is a regression test for b/121271056: there might be a race between
+// background compiler and mutator where mutator changes guarded state of
+// the field after Slot was created from it. A situation is possible where we
+// have a clone of a field with its guarded state set to unknown, however
+// Slot::Get for this field returns a Slot created from the previous clone of
+// the same field with a known guarded state. In this case we must add *old*
+// clone from which the Slot was created to guarded fields and not the new
+// clone, because new clone has no guarded state to begin with and thus
+// ParsedFunction::AddToGuardedFields(...) would simply ignore it.
+// Such slots with inconsistent guarded state that are not in the current
+// list of guarded fields arise due to unsuccessful inlining attempts.
+// If we built and discard the graph, then guarded fields associated with
+// that graph are also discarded. However the slot itself stays behind in
+// the global cache.
+// Adding old clone would lead to correct rejection of the compilation
+// attempt because Slot type information is different from the current guarded
+// state of the field.
+TEST_CASE(SlotFromGuardedField) {
+  if (!FLAG_use_field_guards) {
+    return;
+  }
+
+  TransitionNativeToVM transition(thread);
+  Zone* zone = thread->zone();
+
+  // Setup: create dummy class, function and a field.
+  const Class& dummy_class = Class::Handle(Class::New(
+      Library::Handle(), String::Handle(Symbols::New(thread, "DummyClass")),
+      Script::Handle(), TokenPosition::kNoSource));
+  dummy_class.set_is_synthesized_class();
+
+  const Function& dummy_function = Function::ZoneHandle(
+      Function::New(String::Handle(Symbols::New(thread, "foo")),
+                    RawFunction::kRegularFunction, false, false, false, false,
+                    false, dummy_class, TokenPosition::kMinSource));
+
+  const Field& field = Field::Handle(
+      Field::New(String::Handle(Symbols::New(thread, "field")),
+                 /*is_static=*/false, /*is_final=*/false, /*is_const=*/false,
+                 /*is_reflectable=*/true, dummy_class, Object::dynamic_type(),
+                 TokenPosition::kMinSource, TokenPosition::kMinSource));
+
+  // Set non-trivial guarded state on the field.
+  field.set_guarded_cid(kSmiCid);
+  field.set_is_nullable(false);
+
+  // Enter compiler state.
+  CompilerState compiler_state(thread);
+
+  const Field& field_clone_1 = Field::ZoneHandle(field.CloneFromOriginal());
+  const Field& field_clone_2 = Field::ZoneHandle(field.CloneFromOriginal());
+
+  // Check that Slot::Get() returns correctly canonicalized and configured
+  // slot that matches properties of the field.
+  ParsedFunction* parsed_function =
+      new (zone) ParsedFunction(thread, dummy_function);
+  const Slot& slot1 = Slot::Get(field_clone_1, parsed_function);
+  const Slot& slot2 = Slot::Get(field_clone_2, parsed_function);
+  EXPECT_EQ(&slot1, &slot2);
+  EXPECT(slot1.is_guarded_field());
+  EXPECT(!slot1.is_nullable());
+  EXPECT_EQ(kSmiCid, slot1.nullable_cid());
+
+  // Check that the field was added (once) to the list of guarded fields.
+  EXPECT_EQ(1, parsed_function->guarded_fields()->length());
+  EXPECT_EQ(parsed_function->guarded_fields()->At(0)->raw(),
+            field_clone_1.raw());
+
+  // Change the guarded state of the field to "unknown" - emulating concurrent
+  // modification of the guarded state in mutator) and create a new clone of
+  // the field.
+  field.set_guarded_cid(kDynamicCid);
+  field.set_is_nullable(true);
+  const Field& field_clone_3 = Field::ZoneHandle(field.CloneFromOriginal());
+
+  // Slot::Get must return the same slot and add the field from which it
+  // was created to the guarded fields list.
+  ParsedFunction* parsed_function2 =
+      new (zone) ParsedFunction(thread, dummy_function);
+  const Slot& slot3 = Slot::Get(field_clone_3, parsed_function2);
+  EXPECT_EQ(&slot1, &slot3);
+  EXPECT_EQ(1, parsed_function2->guarded_fields()->length());
+  EXPECT_EQ(parsed_function2->guarded_fields()->At(0)->raw(),
+            field_clone_1.raw());
+}
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/backend/type_propagator.cc b/runtime/vm/compiler/backend/type_propagator.cc
index 19c03ae..cb7360e 100644
--- a/runtime/vm/compiler/backend/type_propagator.cc
+++ b/runtime/vm/compiler/backend/type_propagator.cc
@@ -283,7 +283,7 @@
 void FlowGraphTypePropagator::VisitCheckNull(CheckNullInstr* check) {
   Definition* receiver = check->value()->definition();
   CompileType* type = TypeOf(receiver);
-  if (type->is_nullable()) {
+  if (type->is_nullable() && !type->IsNull()) {
     // Insert redefinition for the receiver to guard against invalid
     // code motion.
     EnsureMoreAccurateRedefinition(check, receiver, type->CopyNonNullable());
@@ -305,7 +305,7 @@
   if (target.IsNull()) {
     // If the selector is not defined on Null, we can propagate non-nullness.
     CompileType* type = TypeOf(receiver);
-    if (type->is_nullable()) {
+    if (type->is_nullable() && !type->IsNull()) {
       // Insert redefinition for the receiver to guard against invalid
       // code motion.
       EnsureMoreAccurateRedefinition(call, receiver, type->CopyNonNullable());
@@ -543,12 +543,10 @@
   }
 
   const AbstractType* other_abstract_type = other->ToAbstractType();
-  if (abstract_type->IsMoreSpecificThan(*other_abstract_type, NULL, NULL,
-                                        Heap::kOld)) {
+  if (abstract_type->IsSubtypeOf(*other_abstract_type, Heap::kOld)) {
     type_ = other_abstract_type;
     return;
-  } else if (other_abstract_type->IsMoreSpecificThan(*abstract_type, NULL, NULL,
-                                                     Heap::kOld)) {
+  } else if (other_abstract_type->IsSubtypeOf(*abstract_type, Heap::kOld)) {
     return;  // Nothing to do.
   }
 
@@ -558,7 +556,7 @@
     Class& cls = Class::Handle(abstract_type->type_class());
     for (; !cls.IsNull() && !cls.IsGeneric(); cls = cls.SuperClass()) {
       type_ = &AbstractType::ZoneHandle(cls.RareType());
-      if (other_abstract_type->IsSubtypeOf(*type_, NULL, NULL, Heap::kOld)) {
+      if (other_abstract_type->IsSubtypeOf(*type_, Heap::kOld)) {
         // Found suitable supertype: keep type_ only.
         cid_ = kDynamicCid;
         return;
@@ -596,8 +594,7 @@
   const AbstractType* new_abstract_type = new_type->ToAbstractType();
 
   CompileType* preferred_type;
-  if (old_abstract_type->IsMoreSpecificThan(*new_abstract_type, NULL, NULL,
-                                            Heap::kOld)) {
+  if (old_abstract_type->IsSubtypeOf(*new_abstract_type, Heap::kOld)) {
     // Prefer old type, as it is clearly more specific.
     preferred_type = old_type;
   } else {
@@ -692,8 +689,6 @@
     if (type_ == NULL) {
       // Type propagation is turned off or has not yet run.
       return kDynamicCid;
-    } else if (type_->IsMalformed()) {
-      cid_ = kDynamicCid;
     } else if (type_->IsVoidType()) {
       cid_ = kDynamicCid;
     } else if (type_->IsNullType()) {
@@ -774,11 +769,6 @@
                                          bool is_nullable,
                                          bool* is_instance) {
   ASSERT(is_instance != NULL);
-  // We cannot give an answer if the given type is malformed or malbounded.
-  if (type.IsMalformedOrMalbounded()) {
-    return false;
-  }
-
   if (type.IsDynamicType() || type.IsObjectType() || type.IsVoidType()) {
     *is_instance = true;
     return true;
@@ -791,10 +781,6 @@
   // Consider the compile type of the value.
   const AbstractType& compile_type = *ToAbstractType();
 
-  if (compile_type.IsMalformedOrMalbounded()) {
-    return false;
-  }
-
   // The null instance is an instance of Null, of Object, and of dynamic.
   // Functions that do not explicitly return a value, implicitly return null,
   // except generative constructors, which return the object being constructed.
@@ -811,16 +797,16 @@
     return false;
   }
 
-  *is_instance = compile_type.IsMoreSpecificThan(type, NULL, NULL, Heap::kOld);
+  *is_instance = compile_type.IsSubtypeOf(type, Heap::kOld);
   return *is_instance;
 }
 
-bool CompileType::IsMoreSpecificThan(const AbstractType& other) {
+bool CompileType::IsSubtypeOf(const AbstractType& other) {
   if (IsNone()) {
     return false;
   }
 
-  return ToAbstractType()->IsMoreSpecificThan(other, NULL, NULL, Heap::kOld);
+  return ToAbstractType()->IsSubtypeOf(other, Heap::kOld);
 }
 
 CompileType* Value::Type() {
@@ -883,8 +869,7 @@
       return CompileType::CreateNullable(is_nullable,
                                          constrained_type_->ToNullableCid());
     }
-    if (value()->Type()->IsMoreSpecificThan(
-            *constrained_type_->ToAbstractType())) {
+    if (value()->Type()->IsSubtypeOf(*constrained_type_->ToAbstractType())) {
       return is_nullable ? *value()->Type()
                          : value()->Type()->CopyNonNullable();
     } else {
@@ -1066,7 +1051,7 @@
 CompileType AssertAssignableInstr::ComputeType() const {
   CompileType* value_type = value()->Type();
 
-  if (value_type->IsMoreSpecificThan(dst_type())) {
+  if (value_type->IsSubtypeOf(dst_type())) {
     return *value_type;
   }
 
@@ -1228,7 +1213,7 @@
     const AbstractType& result_type =
         AbstractType::ZoneHandle(function().result_type());
     // TODO(dartbug.com/30480): instantiate generic result_type if possible.
-    // Also, consider fixing AbstractType::IsMoreSpecificThan to handle
+    // Also, consider fixing AbstractType::IsSubtypeOf to handle
     // non-instantiated types properly.
     if (result_type.IsInstantiated()) {
       TraceStrongModeType(this, result_type);
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index 1dd24e3..3d3404e 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -1224,7 +1224,7 @@
   ASSERT(results->is_empty());
   ASSERT(ic_data.NumArgsTested() == 1);  // Unary checks only.
   if (type.IsFunctionType() || type.IsDartFunctionType() ||
-      !type.IsInstantiated() || type.IsMalformedOrMalbounded()) {
+      !type.IsInstantiated()) {
     return Bool::null();
   }
   const Class& type_class = Class::Handle(Z, type.type_class());
@@ -1262,9 +1262,8 @@
         cls.IsNullClass()
             ? (type_class.IsNullClass() || type_class.IsObjectClass() ||
                type_class.IsDynamicClass())
-            : cls.IsSubtypeOf(Object::null_type_arguments(), type_class,
-                              Object::null_type_arguments(), NULL, NULL,
-                              Heap::kOld);
+            : Class::IsSubtypeOf(cls, Object::null_type_arguments(), type_class,
+                                 Object::null_type_arguments(), Heap::kOld);
     results->Add(cls.id());
     results->Add(is_subtype);
     if (prev.IsNull()) {
@@ -1280,7 +1279,7 @@
 
 // Returns true if checking against this type is a direct class id comparison.
 bool CallSpecializer::TypeCheckAsClassEquality(const AbstractType& type) {
-  ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
+  ASSERT(type.IsFinalized());
   // Requires CHA.
   if (!type.IsInstantiated()) return false;
   // Function types have different type checking rules.
@@ -1347,7 +1346,7 @@
   const intptr_t receiver_index = call->FirstArgIndex();
   Value* left_value = call->PushArgumentAt(receiver_index)->value();
 
-  if (left_value->Type()->IsMoreSpecificThan(type)) {
+  if (left_value->Type()->IsSubtypeOf(type)) {
     Definition* replacement = new (Z) StrictCompareInstr(
         call->token_pos(),
         type.IsNullType() ? Token::kEQ_STRICT : Token::kNE_STRICT,
@@ -1579,11 +1578,11 @@
   ASSERT(results->length() >= 2);  // At least on entry.
   const ClassTable& class_table = *Isolate::Current()->class_table();
   if ((*results)[0] != kSmiCid) {
-    const Class& cls = Class::Handle(class_table.At(kSmiCid));
+    const Class& smi_class = Class::Handle(class_table.At(kSmiCid));
     const Class& type_class = Class::Handle(type.type_class());
     const bool smi_is_subtype =
-        cls.IsSubtypeOf(Object::null_type_arguments(), type_class,
-                        Object::null_type_arguments(), NULL, NULL, Heap::kOld);
+        Class::IsSubtypeOf(smi_class, Object::null_type_arguments(), type_class,
+                           Object::null_type_arguments(), Heap::kOld);
     results->Add((*results)[results->length() - 2]);
     results->Add((*results)[results->length() - 2]);
     for (intptr_t i = results->length() - 3; i > 1; --i) {
@@ -1593,7 +1592,7 @@
     (*results)[1] = smi_is_subtype;
   }
 
-  ASSERT(type.IsInstantiated() && !type.IsMalformedOrMalbounded());
+  ASSERT(type.IsInstantiated());
   ASSERT(results->length() >= 2);
   if (type.IsSmiType()) {
     ASSERT((*results)[0] == kSmiCid);
diff --git a/runtime/vm/compiler/compiler_sources.gni b/runtime/vm/compiler/compiler_sources.gni
index afc73c3..1b6e95f 100644
--- a/runtime/vm/compiler/compiler_sources.gni
+++ b/runtime/vm/compiler/compiler_sources.gni
@@ -117,6 +117,8 @@
   "jit/jit_call_specializer.h",
   "method_recognizer.cc",
   "method_recognizer.h",
+  "relocation.cc",
+  "relocation.h",
 ]
 
 compiler_sources_tests = [
@@ -131,5 +133,6 @@
   "backend/locations_helpers_test.cc",
   "backend/loops_test.cc",
   "backend/range_analysis_test.cc",
+  "backend/slot_test.cc",
   "cha_test.cc",
 ]
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
index 20cb6a0..361da68 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
@@ -701,7 +701,49 @@
   B->Push(call);
 }
 
-void BytecodeFlowGraphBuilder::BuildInstanceCall() {
+void BytecodeFlowGraphBuilder::BuildInterfaceCall() {
+  if (is_generating_interpreter()) {
+    UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
+  }
+
+  const String& name = String::Cast(ConstantAt(DecodeOperandD()).value());
+  ASSERT(name.IsSymbol());
+
+  const Array& arg_desc_array =
+      Array::Cast(ConstantAt(DecodeOperandD(), 1).value());
+  const ArgumentsDescriptor arg_desc(arg_desc_array);
+
+  const intptr_t argc = DecodeOperandA().value();
+  Token::Kind token_kind = MethodTokenRecognizer::RecognizeTokenKind(name);
+
+  intptr_t checked_argument_count = 1;
+  if ((token_kind != Token::kILLEGAL) ||
+      (name.raw() ==
+       Library::PrivateCoreLibName(Symbols::_simpleInstanceOf()).raw())) {
+    intptr_t argument_count = arg_desc.Count();
+    ASSERT(argument_count <= 2);
+    checked_argument_count = argument_count;
+  } else if (name.raw() ==
+             Library::PrivateCoreLibName(Symbols::_instanceOf()).raw()) {
+    token_kind = Token::kIS;
+  }
+
+  const ArgumentArray arguments = GetArguments(argc);
+
+  // TODO(alexmarkov): store interface_target in bytecode and pass it here.
+
+  InstanceCallInstr* call = new (Z) InstanceCallInstr(
+      position_, name, token_kind, arguments, arg_desc.TypeArgsLen(),
+      Array::ZoneHandle(Z, arg_desc.GetArgumentNames()), checked_argument_count,
+      *ic_data_array_, B->GetNextDeoptId());
+
+  // TODO(alexmarkov): add type info - call->SetResultType()
+
+  code_ <<= call;
+  B->Push(call);
+}
+
+void BytecodeFlowGraphBuilder::BuildDynamicCall() {
   if (is_generating_interpreter()) {
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   }
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index 4a3ebfc..e1379bd 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -344,6 +344,7 @@
     kPartialTearOffInstantiation,
     kEmptyTypeArguments,
     kSymbol,
+    kInterfaceCall,
   };
 
   enum InvocationKind {
@@ -618,6 +619,22 @@
         Instance::Cast(obj).SetField(*symbol_name_field, name);
         obj = H.Canonicalize(Instance::Cast(obj));
       } break;
+      case ConstantPoolTag::kInterfaceCall: {
+        helper_->ReadByte();  // TODO(regis): Remove, unneeded.
+        name ^= ReadObject();
+        ASSERT(name.IsSymbol());
+        intptr_t arg_desc_index = helper_->ReadUInt();
+        ASSERT(arg_desc_index < i);
+        array ^= pool.ObjectAt(arg_desc_index);
+        // InterfaceCall constant occupies 2 entries.
+        // The first entry is used for selector name.
+        pool.SetTypeAt(i, ObjectPool::kTaggedObject, ObjectPool::kNotPatchable);
+        pool.SetObjectAt(i, name);
+        ++i;
+        ASSERT(i < obj_count);
+        // The second entry is used for arguments descriptor.
+        obj = array.raw();
+      } break;
       default:
         UNREACHABLE();
     }
@@ -997,8 +1014,7 @@
         ASSERT(cls.IsNull());
         return AbstractType::void_type().raw();
       }
-      // TODO(alexmarkov): inline/move here to avoid handle allocations.
-      return H.GetCanonicalType(cls).raw();
+      return cls.DeclarationType();
     }
     case kTypeParameter: {
       Object& parent = Object::Handle(Z, ReadObject());
@@ -1238,12 +1254,7 @@
 
     return Error::null();
   } else {
-    StackZone stack_zone(thread);
-    Error& error = Error::Handle();
-    // We got an error during bytecode reading.
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
-    return error.raw();
+    return thread->StealStickyError();
   }
 }
 
diff --git a/runtime/vm/compiler/frontend/constant_evaluator.cc b/runtime/vm/compiler/frontend/constant_evaluator.cc
index 872e7f2..8d1c6da 100644
--- a/runtime/vm/compiler/frontend/constant_evaluator.cc
+++ b/runtime/vm/compiler/frontend/constant_evaluator.cc
@@ -106,6 +106,11 @@
       case kConstListLiteral:
         EvaluateListLiteralInternal();
         break;
+      case kConstSetLiteral:
+        // Set literals are currently desugared in the frontend and will not
+        // reach the VM. See http://dartbug.com/35124 for discussion.
+        UNREACHABLE();
+        break;
       case kConstMapLiteral:
         EvaluateMapLiteralInternal();
         break;
@@ -245,11 +250,7 @@
   if (setjmp(*jump.Set()) == 0) {
     return EvaluateExpression(offset);
   } else {
-    Thread* thread = H.thread();
-    Error& error = Error::Handle(Z);
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
-    return error.raw();
+    return H.thread()->StealStickyError();
   }
 }
 
@@ -380,10 +381,9 @@
       }
       Thread* thread = H.thread();
       const Error& error =
-          Error::Handle(thread->zone(), thread->sticky_error());
+          Error::Handle(thread->zone(), thread->StealStickyError());
       if (!error.IsNull()) {
         field.SetStaticValue(Object::null_instance());
-        thread->clear_sticky_error();
         H.ReportError(error, script_, position, "Not a constant expression.");
         UNREACHABLE();
       }
@@ -531,8 +531,6 @@
     // TODO(27590): Can we move this code into [ReceiverType]?
     type ^= ClassFinalizer::FinalizeType(*active_class_->klass, type,
                                          ClassFinalizer::kFinalize);
-    ASSERT(!type.IsMalformedOrMalbounded());
-
     TypeArguments& canonicalized_type_arguments =
         TypeArguments::ZoneHandle(Z, type.arguments());
     canonicalized_type_arguments = canonicalized_type_arguments.Canonicalize();
@@ -608,7 +606,7 @@
   EvaluateExpression(helper_->ReaderOffset(), false);
 
   const AbstractType& type = T.BuildType();
-  if (!type.IsInstantiated() || type.IsMalformed()) {
+  if (!type.IsInstantiated()) {
     const String& type_str = String::Handle(type.UserVisibleName());
     H.ReportError(
         script_, position,
@@ -619,9 +617,8 @@
 
   const TypeArguments& instantiator_type_arguments = TypeArguments::Handle();
   const TypeArguments& function_type_arguments = TypeArguments::Handle();
-  Error& error = Error::Handle();
   if (!result_.IsInstanceOf(type, instantiator_type_arguments,
-                            function_type_arguments, &error)) {
+                            function_type_arguments)) {
     const AbstractType& rtype =
         AbstractType::Handle(result_.GetType(Heap::kNew));
     const String& result_str = String::Handle(rtype.UserVisibleName());
@@ -698,10 +695,6 @@
 
 void ConstantEvaluator::EvaluateTypeLiteral() {
   const AbstractType& type = T.BuildType();
-  if (type.IsMalformed()) {
-    H.ReportError(script_, TokenPosition::kNoSource,
-                  "Malformed type literal in constant expression.");
-  }
   result_ = type.raw();
 }
 
@@ -1176,12 +1169,11 @@
         break;
       }
       case kSymbolConstant: {
-        Tag initializer_tag = helper_.ReadTag();
-        if (initializer_tag == kSomething) {
-          const NameIndex index = helper_.ReadCanonicalNameReference();
-          temp_library_ = H.LookupLibraryByKernelLibrary(index);
-        } else {
+        const NameIndex index = helper_.ReadCanonicalNameReference();
+        if (index == -1) {
           temp_library_ = Library::null();
+        } else {
+          temp_library_ = H.LookupLibraryByKernelLibrary(index);
         }
         const String& symbol =
             H.DartIdentifier(temp_library_, helper_.ReadStringReference());
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 8524fd8..8bcbb49 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -464,7 +464,16 @@
 
 void StreamingFlowGraphBuilder::RecordUncheckedEntryPoint(
     FunctionEntryInstr* extra_entry) {
-  if (!B->IsInlining()) {
+  // Closures always check all arguments on their checked entry-point, most
+  // call-sites are unchecked, and they're inlined less often, so it's very
+  // beneficial to build multiple entry-points for them. Regular methods however
+  // have fewer checks to begin with since they have dynamic invocation
+  // forwarders, so in AOT we implement a more conservative time-space tradeoff
+  // by only building the unchecked entry-point when inlining. We should
+  // reconsider this heuristic if we identify non-inlined type-checks in
+  // hotspots of new benchmarks.
+  if (!B->IsInlining() && (parsed_function()->function().IsClosureFunction() ||
+                           !FLAG_precompiled_mode)) {
     B->graph_entry_->set_unchecked_entry(extra_entry);
   } else if (B->InliningUncheckedEntry()) {
     B->graph_entry_->set_normal_entry(extra_entry);
@@ -506,7 +515,6 @@
   BlockEntryInstr* instruction_cursor =
       flow_graph_builder_->BuildPrologue(normal_entry, &prologue_info);
 
-
   const Fragment prologue =
       flow_graph_builder_->CheckStackOverflowInPrologue(function.token_pos());
 
@@ -516,6 +524,10 @@
   const Fragment default_type_handling =
       BuildDefaultTypeHandling(function, ReaderOffset());
 
+  const ProcedureAttributesMetadata parent_attrs =
+      procedure_attributes_metadata_helper_.GetProcedureAttributes(
+          parent.kernel_offset());
+
   // We're going to throw away the explicit checks because the target will
   // always check them.
   Fragment implicit_checks;
@@ -530,10 +542,8 @@
                               nullptr);
     } else {
       // Check if parent function was annotated with no-dynamic-invocations.
-      const ProcedureAttributesMetadata attrs =
-          procedure_attributes_metadata_helper_.GetProcedureAttributes(
-              parent.kernel_offset());
-      if (MethodCanSkipTypeChecksForNonCovariantArguments(parent, attrs)) {
+      if (MethodCanSkipTypeChecksForNonCovariantArguments(parent,
+                                                          parent_attrs)) {
         // If it was then we might need to build some checks in the
         // tear-off.
         AlternativeReadingScope _(&reader_);
@@ -829,14 +839,7 @@
       AbstractType& type = AbstractType::ZoneHandle(Z);
       type ^= Type::New(owner, TypeArguments::Handle(Z), owner.token_pos(),
                         Heap::kOld);
-      // If the current class is the result of a mixin application, we must
-      // use the class scope of the class from which the function originates.
-      if (owner.IsMixinApplication()) {
-        ClassFinalizer::FinalizeType(
-            Class::Handle(Z, parsed_function()->function().origin()), type);
-      } else {
-        type ^= ClassFinalizer::FinalizeType(owner, type);
-      }
+      type ^= ClassFinalizer::FinalizeType(owner, type);
       body += Constant(type);
     } else {
       body += LoadLocal(parsed_function()->current_context_var());
@@ -2112,6 +2115,12 @@
       return BuildListLiteral(false, position);
     case kConstListLiteral:
       return BuildListLiteral(true, position);
+    case kSetLiteral:
+    case kConstSetLiteral:
+      // Set literals are currently desugared in the frontend and will not
+      // reach the VM. See http://dartbug.com/35124 for discussion.
+      UNREACHABLE();
+      break;
     case kMapLiteral:
       return BuildMapLiteral(false, position);
     case kConstMapLiteral:
@@ -2906,7 +2915,9 @@
   TokenPosition pos = ReadPosition();
   if (position != NULL) *position = pos;
   const String& message = H.DartString(ReadStringReference());
-  H.ReportError(script(), pos, "%s", message.ToCString());
+  // Invalid expression message has pointer to the source code, no need to
+  // report it twice.
+  H.ReportError(script(), TokenPosition::kNoSource, "%s", message.ToCString());
   return Fragment();
 }
 
@@ -3023,9 +3034,11 @@
       direct_call_metadata_helper_.GetDirectTargetForPropertySet(offset);
   const CallSiteAttributesMetadata call_site_attributes =
       call_site_attributes_metadata_helper_.GetCallSiteAttributes(offset);
+  const InferredTypeMetadata inferred_type =
+      inferred_type_metadata_helper_.GetInferredType(offset);
 
   // True if callee can skip argument type checks.
-  bool is_unchecked_call = false;
+  bool is_unchecked_call = inferred_type.IsSkipCheck();
 #ifndef TARGET_ARCH_DBC
   if (call_site_attributes.receiver_type != nullptr &&
       call_site_attributes.receiver_type->HasTypeClass() &&
@@ -3087,12 +3100,12 @@
   }
 
   if (!direct_call_target->IsNull()) {
-    // TODO(#34162): Pass 'is_unchecked_call' down if/when we feature multiple
-    // entry-points in AOT.
     ASSERT(FLAG_precompiled_mode);
     instructions +=
         StaticCall(position, *direct_call_target, 2, Array::null_array(),
-                   ICData::kNoRebind, /*result_type=*/nullptr);
+                   ICData::kNoRebind, /*result_type=*/nullptr,
+                   /*type_args_count=*/0,
+                   /*use_unchecked_entry=*/is_unchecked_call);
   } else {
     const intptr_t kTypeArgsLen = 0;
     const intptr_t kNumArgsChecked = 1;
@@ -3101,8 +3114,7 @@
         position, *mangled_name, Token::kSET, kTypeArgsLen, 2,
         Array::null_array(), kNumArgsChecked, *interface_target,
         /*result_type=*/nullptr,
-        /*use_unchecked_entry=*/!FLAG_precompiled_mode && is_unchecked_call,
-        &call_site_attributes);
+        /*use_unchecked_entry=*/is_unchecked_call, &call_site_attributes);
   }
 
   instructions += Drop();  // Drop result of the setter invocation.
@@ -3322,7 +3334,7 @@
         position, Function::ZoneHandle(Z, function.raw()),
         /* argument_count = */ 2, Array::null_array(), ICData::kSuper,
         /*result_type=*/nullptr, /*type_args_len=*/0,
-        /*use_unchecked_entry=*/!FLAG_precompiled_mode);
+        /*use_unchecked_entry=*/true);
     instructions += Drop();  // Drop result of the setter invocation.
   }
 
@@ -3519,7 +3531,7 @@
   const Tag receiver_tag = PeekTag();  // peek tag for receiver.
 
   bool is_unchecked_closure_call = false;
-  bool is_unchecked_call = false;
+  bool is_unchecked_call = result_type.IsSkipCheck();
 #ifndef TARGET_ARCH_DBC
   if (call_site_attributes.receiver_type != nullptr) {
     if (call_site_attributes.receiver_type->IsFunctionType()) {
@@ -3627,13 +3639,16 @@
   const Function* interface_target = &Function::null_function();
   const NameIndex itarget_name =
       ReadCanonicalNameReference();  // read interface_target_reference.
-  if (!H.IsRoot(itarget_name) && !H.IsField(itarget_name)) {
+  // TODO(dartbug.com/34497): Once front-end desugars calls via
+  // fields/getters, filtering of field and getter interface targets here
+  // can be turned into assertions.
+  if (!H.IsRoot(itarget_name) && !H.IsField(itarget_name) &&
+      !H.IsGetter(itarget_name)) {
     interface_target = &Function::ZoneHandle(
         Z, H.LookupMethodByMember(itarget_name,
                                   H.DartProcedureName(itarget_name)));
-    ASSERT((name.raw() == interface_target->name()) ||
-           (interface_target->IsGetterFunction() &&
-            Field::GetterSymbol(name) == interface_target->name()));
+    ASSERT(name.raw() == interface_target->name());
+    ASSERT(!interface_target->IsGetterFunction());
   }
 
   // TODO(sjindel): Avoid the check for null on unchecked closure calls if TFA
@@ -3674,24 +3689,19 @@
         B->ClosureCall(position, type_args_len, argument_count, argument_names,
                        /*use_unchecked_entry=*/true);
   } else if (!direct_call_target->IsNull()) {
-    // TODO(#34162): Pass 'is_unchecked_call' down if/when we feature multiple
-    // entry-points in AOT.
-
     // Even if TFA infers a concrete receiver type, the static type of the
     // call-site may still be dynamic and we need to call the dynamic invocation
     // forwarder to ensure type-checks are performed.
     ASSERT(FLAG_precompiled_mode);
-    instructions += StaticCall(position, *direct_call_target, argument_count,
-                               argument_names, ICData::kNoRebind, &result_type,
-                               type_args_len);
+    instructions +=
+        StaticCall(position, *direct_call_target, argument_count,
+                   argument_names, ICData::kNoRebind, &result_type,
+                   type_args_len, /*use_unchecked_entry=*/is_unchecked_call);
   } else {
-    // TODO(#34162): Pass 'is_unchecked_call' down if/when we feature multiple
-    // entry-points in AOT.
     instructions += InstanceCall(
         position, *mangled_name, token_kind, type_args_len, argument_count,
         argument_names, checked_argument_count, *interface_target, &result_type,
-        /*use_unchecked_entry=*/!FLAG_precompiled_mode && is_unchecked_call,
-        &call_site_attributes);
+        /*use_unchecked_entry=*/is_unchecked_call, &call_site_attributes);
   }
 
   // Drop temporaries preserving result on the top of the stack.
@@ -3924,7 +3934,7 @@
            StaticCall(position, Function::ZoneHandle(Z, function.raw()),
                       argument_count, argument_names, ICData::kSuper,
                       &result_type, type_args_len,
-                      /*use_unchecked_entry_point=*/!FLAG_precompiled_mode);
+                      /*use_unchecked_entry_point=*/true);
   }
 }
 
@@ -4077,8 +4087,6 @@
       // TODO(27590): Can we move this code into [ReceiverType]?
       type ^= ClassFinalizer::FinalizeType(*active_class()->klass, type,
                                            ClassFinalizer::kFinalize);
-      ASSERT(!type.IsMalformedOrMalbounded());
-
       TypeArguments& canonicalized_type_arguments =
           TypeArguments::ZoneHandle(Z, type.arguments());
       canonicalized_type_arguments =
@@ -4311,14 +4319,7 @@
   // special case this situation.
   const Type& object_type = Type::Handle(Z, Type::ObjectType());
 
-  if (type.IsMalformed()) {
-    instructions += Drop();
-    instructions += ThrowTypeError();
-    return instructions;
-  }
-
-  if (type.IsInstantiated() &&
-      object_type.IsSubtypeOf(type, NULL, NULL, Heap::kOld)) {
+  if (type.IsInstantiated() && object_type.IsSubtypeOf(type, Heap::kOld)) {
     // Evaluate the expression on the left but ignore it's result.
     instructions += Drop();
 
@@ -4371,10 +4372,7 @@
   Fragment instructions = BuildExpression();  // read operand.
 
   const AbstractType& type = T.BuildType();  // read type.
-  if (type.IsMalformed()) {
-    instructions += Drop();
-    instructions += ThrowTypeError();
-  } else if (type.IsInstantiated() && type.IsTopType()) {
+  if (type.IsInstantiated() && type.IsTopType()) {
     // We already evaluated the operand on the left and just leave it there as
     // the result of the `obj as dynamic` expression.
   } else {
@@ -4405,10 +4403,6 @@
   if (position != NULL) *position = TokenPosition::kNoSource;
 
   const AbstractType& type = T.BuildType();  // read type.
-  if (type.IsMalformed()) {
-    H.ReportError(script_, TokenPosition::kNoSource, "Malformed type literal");
-  }
-
   Fragment instructions;
   if (type.IsInstantiated()) {
     instructions += Constant(type);
@@ -5499,37 +5493,32 @@
     }
 
     if (type_guard != NULL) {
-      if (type_guard->IsMalformed()) {
-        catch_body += ThrowTypeError();
-        catch_body += Drop();
+      catch_body += LoadLocal(CurrentException());
+      catch_body += PushArgument();  // exception
+      if (!type_guard->IsInstantiated(kCurrentClass)) {
+        catch_body += LoadInstantiatorTypeArguments();
       } else {
-        catch_body += LoadLocal(CurrentException());
-        catch_body += PushArgument();  // exception
-        if (!type_guard->IsInstantiated(kCurrentClass)) {
-          catch_body += LoadInstantiatorTypeArguments();
-        } else {
-          catch_body += NullConstant();
-        }
-        catch_body += PushArgument();  // instantiator type arguments
-        if (!type_guard->IsInstantiated(kFunctions)) {
-          catch_body += LoadFunctionTypeArguments();
-        } else {
-          catch_body += NullConstant();
-        }
-        catch_body += PushArgument();  // function type arguments
-        catch_body += Constant(*type_guard);
-        catch_body += PushArgument();  // guard type
-        catch_body += InstanceCall(
-            position, Library::PrivateCoreLibName(Symbols::_instanceOf()),
-            Token::kIS, 4);
-
-        TargetEntryInstr* catch_entry;
-        TargetEntryInstr* next_catch_entry;
-        catch_body += BranchIfTrue(&catch_entry, &next_catch_entry, false);
-
-        Fragment(catch_entry) + catch_handler_body;
-        catch_body = Fragment(next_catch_entry);
+        catch_body += NullConstant();
       }
+      catch_body += PushArgument();  // instantiator type arguments
+      if (!type_guard->IsInstantiated(kFunctions)) {
+        catch_body += LoadFunctionTypeArguments();
+      } else {
+        catch_body += NullConstant();
+      }
+      catch_body += PushArgument();  // function type arguments
+      catch_body += Constant(*type_guard);
+      catch_body += PushArgument();  // guard type
+      catch_body += InstanceCall(
+          position, Library::PrivateCoreLibName(Symbols::_instanceOf()),
+          Token::kIS, 4);
+
+      TargetEntryInstr* catch_entry;
+      TargetEntryInstr* next_catch_entry;
+      catch_body += BranchIfTrue(&catch_entry, &next_catch_entry, false);
+
+      Fragment(catch_entry) + catch_handler_body;
+      catch_body = Fragment(next_catch_entry);
     } else {
       catch_body += catch_handler_body;
     }
diff --git a/runtime/vm/compiler/frontend/kernel_fingerprints.cc b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
index 309decf..03a4e59 100644
--- a/runtime/vm/compiler/frontend/kernel_fingerprints.cc
+++ b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
@@ -261,7 +261,14 @@
 }
 
 void KernelFingerprintHelper::CalculateInterfaceTypeFingerprint(bool simple) {
-  BuildHash(ReadUInt());  // read klass_name.
+  NameIndex kernel_class = ReadCanonicalNameReference();
+  ASSERT(H.IsClass(kernel_class));
+  const String& class_name = H.DartClassName(kernel_class);
+  NameIndex kernel_library = H.CanonicalNameParent(kernel_class);
+  const String& library_name =
+      H.DartSymbolPlain(H.CanonicalNameString(kernel_library));
+  BuildHash(class_name.Hash());
+  BuildHash(library_name.Hash());
   if (!simple) {
     CalculateListOfDartTypesFingerprint();  // read list of types.
   }
@@ -472,6 +479,12 @@
       CalculateDartTypeFingerprint();           // read type.
       CalculateListOfExpressionsFingerprint();  // read list of expressions.
       return;
+    case kSetLiteral:
+    case kConstSetLiteral:
+      // Set literals are currently desugared in the frontend and will not
+      // reach the VM. See http://dartbug.com/35124 for discussion.
+      UNREACHABLE();
+      return;
     case kMapLiteral:
     case kConstMapLiteral: {
       ReadPosition();                           // read position.
@@ -771,12 +784,6 @@
     hash = KernelFingerprintHelper::CalculateHash(hash, name.Hash());
   }
 
-  type ^= klass.mixin();
-  if (!type.IsNull()) {
-    name ^= type.Name();
-    hash = KernelFingerprintHelper::CalculateHash(hash, name.Hash());
-  }
-
   Field& field = Field::Handle(zone);
   // Calculate fingerprint for the class fields.
   for (intptr_t i = 0; i < fields.Length(); ++i) {
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 348d98f..cd0f7f7 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORp file
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -915,28 +915,13 @@
   return body + Return(TokenPosition::kNoSource, omit_result_type_check);
 }
 
-static Type& GetCanonicalType(Zone* Z, const Class& klass) {
-  ASSERT(!klass.IsNull());
-  // Note that if cls is _Closure, the returned type will be _Closure,
-  // and not the signature type.
-  Type& type = Type::ZoneHandle(Z, klass.CanonicalType());
-  if (!type.IsNull()) {
-    return type;
-  }
-  type = Type::New(klass, TypeArguments::Handle(Z, klass.type_parameters()),
-                   klass.token_pos());
-  if (klass.is_type_finalized()) {
-    type ^= ClassFinalizer::FinalizeType(klass, type);
-    // Note that the receiver type may now be a malbounded type.
-    klass.SetCanonicalType(type);
-  }
-  return type;
-}
-
 static const LocalScope* MakeImplicitClosureScope(Zone* Z,
                                                   const Function& function) {
   Class& klass = Class::Handle(Z, function.Owner());
-  Type& klass_type = GetCanonicalType(Z, klass);
+  ASSERT(!klass.IsNull());
+  // Note that if klass is _Closure, DeclarationType will be _Closure,
+  // and not the signature type.
+  Type& klass_type = Type::ZoneHandle(Z, klass.DeclarationType());
 
   LocalVariable* this_variable = new (Z)
       LocalVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
@@ -1063,9 +1048,6 @@
                                            const String& dst_name,
                                            AssertAssignableInstr::Kind kind) {
   Fragment instructions;
-  if (dst_type.IsMalformed()) {
-    return ThrowTypeError();
-  }
   if (!I->should_emit_strong_mode_checks()) {
     return Fragment();
   }
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index 17dcadb..b6a2164 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -111,7 +111,8 @@
 }
 
 void TranslationHelper::SetConstants(const Array& constants) {
-  ASSERT(constants_.IsNull());
+  ASSERT(constants_.IsNull() ||
+         (constants.IsNull() || constants.Length() == 0));
   constants_ = constants.raw();
 }
 
@@ -568,13 +569,9 @@
     Function& function = Function::ZoneHandle(
         Z, klass.LookupFunctionAllowPrivate(procedure_name));
     ASSERT(!function.IsNull());
-
-    // TODO(27590): We can probably get rid of this after no longer using
-    // core libraries from the source.
-    if (function.IsRedirectingFactory()) {
-      ClassFinalizer::ResolveRedirectingFactory(klass, function);
-      function = function.RedirectionTarget();
-    }
+    // Redirecting factory must be resolved.
+    ASSERT(!function.IsRedirectingFactory() ||
+           function.RedirectionTarget() != Function::null());
     return function.raw();
   }
 }
@@ -645,20 +642,17 @@
   return Function::null();
 }
 
-Type& TranslationHelper::GetCanonicalType(const Class& klass) {
+Type& TranslationHelper::GetDeclarationType(const Class& klass) {
   ASSERT(!klass.IsNull());
   // Note that if cls is _Closure, the returned type will be _Closure,
   // and not the signature type.
-  Type& type = Type::ZoneHandle(Z, klass.CanonicalType());
-  if (!type.IsNull()) {
-    return type;
-  }
-  type = Type::New(klass, TypeArguments::Handle(Z, klass.type_parameters()),
-                   klass.token_pos());
+  Type& type = Type::ZoneHandle(Z);
   if (klass.is_type_finalized()) {
-    type ^= ClassFinalizer::FinalizeType(klass, type);
-    // Note that the receiver type may now be a malbounded type.
-    klass.SetCanonicalType(type);
+    type = klass.DeclarationType();
+  } else {
+    // Note that the type argument vector is not yet extended.
+    type = Type::New(klass, TypeArguments::Handle(Z, klass.type_parameters()),
+                     klass.token_pos());
   }
   return type;
 }
@@ -1030,20 +1024,17 @@
     }
       /* Falls through */
     case kForwardingStubSuperTarget:
-      if (helper_->ReadTag() == kSomething) {
-        forwarding_stub_super_target_ = helper_->ReadCanonicalNameReference();
-      }
+      forwarding_stub_super_target_ = helper_->ReadCanonicalNameReference();
       if (++next_read_ == field) return;
       /* Falls through */
     case kForwardingStubInterfaceTarget:
-      if (helper_->ReadTag() == kSomething) {
-        helper_->ReadCanonicalNameReference();
-      }
+      helper_->ReadCanonicalNameReference();
       if (++next_read_ == field) return;
       /* Falls through */
     case kFunction:
-      if (helper_->ReadTag() == kSomething)
+      if (helper_->ReadTag() == kSomething) {
         helper_->SkipFunctionNode();  // read function node.
+      }
       if (++next_read_ == field) return;
       /* Falls through */
     case kEnd:
@@ -2230,6 +2221,12 @@
       SkipDartType();           // read type.
       SkipListOfExpressions();  // read list of expressions.
       return;
+    case kSetLiteral:
+    case kConstSetLiteral:
+      // Set literals are currently desugared in the frontend and will not
+      // reach the VM. See http://dartbug.com/35124 for discussion.
+      UNREACHABLE();
+      return;
     case kMapLiteral:
     case kConstMapLiteral: {
       ReadPosition();                           // read position.
@@ -2711,35 +2708,10 @@
   return AbstractType::ZoneHandle(Z, result_.raw());
 }
 
-AbstractType& TypeTranslator::BuildVariableType() {
-  AbstractType& abstract_type = BuildType();
-
-  // We return a new `ZoneHandle` here on purpose: The intermediate language
-  // instructions do not make a copy of the handle, so we do it.
-  AbstractType& type = Type::ZoneHandle(Z);
-
-  if (abstract_type.IsMalformed()) {
-    type = AbstractType::dynamic_type().raw();
-  } else {
-    type = result_.raw();
-  }
-
-  return type;
-}
-
-void TypeTranslator::BuildTypeInternal(bool invalid_as_dynamic) {
+void TypeTranslator::BuildTypeInternal() {
   Tag tag = helper_->ReadTag();
   switch (tag) {
     case kInvalidType:
-      if (invalid_as_dynamic) {
-        result_ = Object::dynamic_type().raw();
-      } else {
-        result_ = ClassFinalizer::NewFinalizedMalformedType(
-            Error::Handle(Z),  // No previous error.
-            Script::Handle(Z, Script::null()), TokenPosition::kNoSource,
-            "[InvalidType] in Kernel IR.");
-      }
-      break;
     case kDynamicType:
       result_ = Object::dynamic_type().raw();
       break;
@@ -2748,7 +2720,7 @@
       break;
     case kBottomType:
       result_ =
-          Class::Handle(Z, I->object_store()->null_class()).CanonicalType();
+          Class::Handle(Z, I->object_store()->null_class()).DeclarationType();
       break;
     case kInterfaceType:
       BuildInterfaceType(false);
@@ -2780,10 +2752,18 @@
       helper_->ReadCanonicalNameReference();  // read klass_name.
 
   const Class& klass = Class::Handle(Z, H.LookupClassByKernelClass(klass_name));
+  ASSERT(!klass.IsNull());
   if (simple) {
-    // Fast path for non-generic types: retrieve or populate the class's only
-    // canonical type.
-    result_ = H.GetCanonicalType(klass).raw();
+    if (finalize_ || klass.is_type_finalized()) {
+      // Fast path for non-generic types: retrieve or populate the class's only
+      // canonical type, which is its declaration type.
+      result_ = klass.DeclarationType();
+    } else {
+      // Note that the type argument vector is not yet extended.
+      result_ =
+          Type::New(klass, TypeArguments::Handle(Z, klass.type_parameters()),
+                    klass.token_pos());
+    }
     return;
   }
 
@@ -2851,9 +2831,6 @@
   ++pos;
   for (intptr_t i = 0; i < positional_count; ++i, ++pos) {
     BuildTypeInternal();  // read ith positional parameter.
-    if (result_.IsMalformed()) {
-      result_ = AbstractType::dynamic_type().raw();
-    }
     parameter_types.SetAt(pos, result_);
     parameter_names.SetAt(pos, H.DartSymbolPlain("noname"));
   }
@@ -2870,9 +2847,6 @@
       // read string reference (i.e. named_parameters[i].name).
       String& name = H.DartSymbolObfuscate(helper_->ReadStringReference());
       BuildTypeInternal();  // read named_parameters[i].type.
-      if (result_.IsMalformed()) {
-        result_ = AbstractType::dynamic_type().raw();
-      }
       parameter_types.SetAt(pos, result_);
       parameter_names.SetAt(pos, name);
     }
@@ -2883,9 +2857,6 @@
   }
 
   BuildTypeInternal();  // read return type.
-  if (result_.IsMalformed()) {
-    result_ = AbstractType::dynamic_type().raw();
-  }
   signature_function.set_result_type(result_);
 
   finalize_ = finalize;
@@ -3001,7 +2972,7 @@
   if (!only_dynamic) {
     type_arguments = TypeArguments::New(length);
     for (intptr_t i = 0; i < length; ++i) {
-      BuildTypeInternal(true);  // read ith type.
+      BuildTypeInternal();  // read ith type.
       type_arguments.SetTypeAt(i, result_);
     }
 
@@ -3101,9 +3072,6 @@
       parameter.set_bound(Type::Handle(Z, I->object_store()->object_type()));
     } else {
       AbstractType& bound = BuildTypeWithoutFinalization();  // read ith bound.
-      if (bound.IsMalformedOrMalbounded()) {
-        bound = I->object_store()->object_type();
-      }
       parameter.set_bound(bound);
     }
 
@@ -3116,15 +3084,12 @@
   ASSERT(!klass.IsTypedefClass());
   // Note that if klass is _Closure, the returned type will be _Closure,
   // and not the signature type.
-  Type& type = Type::ZoneHandle(Z, klass.CanonicalType());
-  if (!type.IsNull()) {
-    return type;
-  }
-  type = Type::New(klass, TypeArguments::Handle(Z, klass.type_parameters()),
-                   klass.token_pos());
-  if (klass.is_type_finalized()) {
-    type ^= ClassFinalizer::FinalizeType(klass, type);
-    klass.SetCanonicalType(type);
+  Type& type = Type::ZoneHandle(Z);
+  if (finalize_ || klass.is_type_finalized()) {
+    type = klass.DeclarationType();
+  } else {
+    type = Type::New(klass, TypeArguments::Handle(Z, klass.type_parameters()),
+                     klass.token_pos());
   }
   return type;
 }
@@ -3178,7 +3143,7 @@
   intptr_t pos = 0;
   if (is_method) {
     ASSERT(!klass.IsNull());
-    function.SetParameterTypeAt(pos, H.GetCanonicalType(klass));
+    function.SetParameterTypeAt(pos, H.GetDeclarationType(klass));
     function.SetParameterNameAt(pos, Symbols::This());
     pos++;
   } else if (is_closure) {
@@ -3202,8 +3167,7 @@
       helper_->SkipExpression();  // read (actual) initializer.
     }
 
-    function.SetParameterTypeAt(
-        pos, type.IsMalformed() ? Type::dynamic_type() : type);
+    function.SetParameterTypeAt(pos, type);
     function.SetParameterNameAt(pos, H.DartIdentifier(lib, helper.name_index_));
   }
 
@@ -3220,8 +3184,7 @@
       helper_->SkipExpression();  // read (actual) initializer.
     }
 
-    function.SetParameterTypeAt(
-        pos, type.IsMalformed() ? Type::dynamic_type() : type);
+    function.SetParameterTypeAt(pos, type);
     function.SetParameterNameAt(pos, H.DartIdentifier(lib, helper.name_index_));
   }
 
@@ -3231,8 +3194,7 @@
   if (!function.IsGenerativeConstructor()) {
     const AbstractType& return_type =
         BuildTypeWithoutFinalization();  // read return type.
-    function.set_result_type(return_type.IsMalformed() ? Type::dynamic_type()
-                                                       : return_type);
+    function.set_result_type(return_type);
     function_node_helper->SetJustRead(FunctionNodeHelper::kReturnType);
   }
 }
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index 43518c7..3a184a1 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -154,7 +154,7 @@
                                     const String& method_name);
   RawFunction* LookupDynamicFunction(const Class& klass, const String& name);
 
-  Type& GetCanonicalType(const Class& klass);
+  Type& GetDeclarationType(const Class& klass);
 
   void ReportError(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
   void ReportError(const Script& script,
@@ -519,14 +519,17 @@
   void SetNext(Field field) { next_read_ = field; }
   void SetJustRead(Field field) { next_read_ = field + 1; }
 
-  bool IsStatic() { return (flags_ & kStatic) != 0; }
-  bool IsAbstract() { return (flags_ & kAbstract) != 0; }
-  bool IsExternal() { return (flags_ & kExternal) != 0; }
-  bool IsConst() { return (flags_ & kConst) != 0; }
-  bool IsForwardingStub() { return (flags_ & kForwardingStub) != 0; }
-  bool IsRedirectingFactoryConstructor() {
+  bool IsStatic() const { return (flags_ & kStatic) != 0; }
+  bool IsAbstract() const { return (flags_ & kAbstract) != 0; }
+  bool IsExternal() const { return (flags_ & kExternal) != 0; }
+  bool IsConst() const { return (flags_ & kConst) != 0; }
+  bool IsForwardingStub() const { return (flags_ & kForwardingStub) != 0; }
+  bool IsRedirectingFactoryConstructor() const {
     return (flags_ & kRedirectingFactoryConstructor) != 0;
   }
+  bool IsNoSuchMethodForwarder() const {
+    return (flags_ & kNoSuchMethodForwarder) != 0;
+  }
 
   NameIndex canonical_name_;
   TokenPosition start_position_;
@@ -851,6 +854,7 @@
   enum Flag {
     kFlagNullable = 1 << 0,
     kFlagInt = 1 << 1,
+    kFlagSkipCheck = 1 << 2,
   };
 
   InferredTypeMetadata(intptr_t cid_, uint8_t flags_)
@@ -864,6 +868,7 @@
   }
   bool IsNullable() const { return (flags & kFlagNullable) != 0; }
   bool IsInt() const { return (flags & kFlagInt) != 0; }
+  bool IsSkipCheck() const { return (flags & kFlagSkipCheck) != 0; }
 
   CompileType ToCompileType(Zone* zone) const {
     if (IsInt()) {
@@ -1210,19 +1215,11 @@
                  ActiveClass* active_class,
                  bool finalize = false);
 
-  // Can return a malformed type.
   AbstractType& BuildType();
-  // Can return a malformed type.
   AbstractType& BuildTypeWithoutFinalization();
-  // Is guaranteed to be not malformed.
-  AbstractType& BuildVariableType();
 
-  // Will return `TypeArguments::null()` in case any of the arguments are
-  // malformed.
   const TypeArguments& BuildTypeArguments(intptr_t length);
 
-  // Will return `TypeArguments::null()` in case any of the arguments are
-  // malformed.
   const TypeArguments& BuildInstantiatedTypeArguments(
       const Class& receiver_class,
       intptr_t length);
@@ -1241,8 +1238,7 @@
                                FunctionNodeHelper* function_node_helper);
 
  private:
-  // Can build a malformed type.
-  void BuildTypeInternal(bool invalid_as_dynamic = false);
+  void BuildTypeInternal();
   void BuildInterfaceType(bool simple);
   void BuildFunctionType(bool simple);
   void BuildTypeParameterType();
diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc
index 54e82ee..201c724 100644
--- a/runtime/vm/compiler/frontend/scope_builder.cc
+++ b/runtime/vm/compiler/frontend/scope_builder.cc
@@ -95,7 +95,7 @@
     // captured receiver value. This ensure that AssertAssignable will correctly
     // load instantiator type arguments if they are needed.
     Class& klass = Class::Handle(Z, function.Owner());
-    Type& klass_type = H.GetCanonicalType(klass);
+    Type& klass_type = H.GetDeclarationType(klass);
     result_->this_variable =
         MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                      Symbols::This(), klass_type);
@@ -165,7 +165,7 @@
         // We use [is_static] instead of [IsStaticFunction] because the latter
         // returns `false` for constructors.
         Class& klass = Class::Handle(Z, function.Owner());
-        Type& klass_type = H.GetCanonicalType(klass);
+        Type& klass_type = H.GetDeclarationType(klass);
         LocalVariable* variable =
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                          Symbols::This(), klass_type);
@@ -279,7 +279,7 @@
       intptr_t pos = 0;
       if (is_method) {
         Class& klass = Class::Handle(Z, function.Owner());
-        Type& klass_type = H.GetCanonicalType(klass);
+        Type& klass_type = H.GetDeclarationType(klass);
         LocalVariable* variable =
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                          Symbols::This(), klass_type);
@@ -321,7 +321,7 @@
         const Class& klass = Class::Handle(Z, function.Owner());
         result_->this_variable =
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
-                         Symbols::This(), H.GetCanonicalType(klass));
+                         Symbols::This(), H.GetDeclarationType(klass));
         scope_->InsertParameterAt(0, result_->this_variable);
 
         // Create setter value variable.
@@ -340,7 +340,7 @@
         Class& klass = Class::Handle(Z, function.Owner());
         result_->this_variable =
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
-                         Symbols::This(), H.GetCanonicalType(klass));
+                         Symbols::This(), H.GetDeclarationType(klass));
         scope_->InsertParameterAt(pos++, result_->this_variable);
 
         // Create all positional and named parameters.
@@ -356,7 +356,7 @@
       // instead of using the generic code for regular functions.
       // Therefore, it isn't necessary to mark it as captured here.
       Class& klass = Class::Handle(Z, function.Owner());
-      Type& klass_type = H.GetCanonicalType(klass);
+      Type& klass_type = H.GetDeclarationType(klass);
       LocalVariable* variable =
           MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                        Symbols::This(), klass_type);
@@ -787,6 +787,13 @@
       }
       return;
     }
+    case kSetLiteral:
+    case kConstSetLiteral: {
+      // Set literals are currently desugared in the frontend and will not
+      // reach the VM. See http://dartbug.com/35124 for discussion.
+      UNREACHABLE();
+      return;
+    }
     case kMapLiteral:
     case kConstMapLiteral: {
       helper_.ReadPosition();                           // read position.
@@ -1210,7 +1217,7 @@
 
 AbstractType& ScopeBuilder::BuildAndVisitVariableType() {
   const intptr_t offset = helper_.ReaderOffset();
-  AbstractType& type = T.BuildVariableType();
+  AbstractType& type = T.BuildType();
   helper_.SetOffset(offset);  // rewind
   VisitDartType();
   return type;
@@ -1437,7 +1444,8 @@
 
   const bool needs_covariant_check_in_method =
       helper.IsCovariant() ||
-      (helper.IsGenericCovariantImpl() && attrs.has_non_this_uses);
+      (helper.IsGenericCovariantImpl() &&
+       (attrs.has_non_this_uses || attrs.has_tearoff_uses));
 
   switch (type_check_mode) {
     case kTypeCheckAllParameters:
@@ -1465,6 +1473,13 @@
       variable->set_type_check_mode(LocalVariable::kTypeCheckedByCaller);
       break;
   }
+
+  // TODO(sjindel): We can also skip these checks on dynamic invocations as
+  // well.
+  if (parameter_type.IsSkipCheck()) {
+    variable->set_type_check_mode(LocalVariable::kTypeCheckedByCaller);
+  }
+
   scope_->InsertParameterAt(pos, variable);
   result_->locals.Insert(helper_.data_program_offset_ + kernel_offset,
                          variable);
diff --git a/runtime/vm/compiler/intrinsifier_arm.cc b/runtime/vm/compiler/intrinsifier_arm.cc
index bd5a15d..9e516f0 100644
--- a/runtime/vm/compiler/intrinsifier_arm.cc
+++ b/runtime/vm/compiler/intrinsifier_arm.cc
@@ -1568,7 +1568,7 @@
 // Return type quickly for simple types (not parameterized and not signature).
 void Intrinsifier::ObjectRuntimeType(Assembler* assembler,
                                      Label* normal_ir_body) {
-  Label use_canonical_type, not_double, not_integer;
+  Label use_declaration_type, not_double, not_integer;
   __ ldr(R0, Address(SP, 0 * kWordSize));
   __ LoadClassIdMayBeSmi(R1, R0);
 
@@ -1576,7 +1576,7 @@
   __ b(normal_ir_body, EQ);  // Instance is a closure.
 
   __ CompareImmediate(R1, kNumPredefinedCids);
-  __ b(&use_canonical_type, HI);
+  __ b(&use_declaration_type, HI);
 
   __ CompareImmediate(R1, kDoubleCid);
   __ b(&not_double, NE);
@@ -1594,19 +1594,19 @@
   __ Ret();
 
   __ Bind(&not_integer);
-  JumpIfNotString(assembler, R1, R0, &use_canonical_type);
+  JumpIfNotString(assembler, R1, R0, &use_declaration_type);
   __ LoadIsolate(R0);
   __ LoadFromOffset(kWord, R0, R0, Isolate::object_store_offset());
   __ LoadFromOffset(kWord, R0, R0, ObjectStore::string_type_offset());
   __ Ret();
 
-  __ Bind(&use_canonical_type);
+  __ Bind(&use_declaration_type);
   __ LoadClassById(R2, R1);  // Overwrites R1.
   __ ldrh(R3, FieldAddress(R2, Class::num_type_arguments_offset()));
   __ CompareImmediate(R3, 0);
   __ b(normal_ir_body, NE);
 
-  __ ldr(R0, FieldAddress(R2, Class::canonical_type_offset()));
+  __ ldr(R0, FieldAddress(R2, Class::declaration_type_offset()));
   __ CompareObject(R0, Object::null_object());
   __ b(normal_ir_body, EQ);
   __ Ret();
diff --git a/runtime/vm/compiler/intrinsifier_arm64.cc b/runtime/vm/compiler/intrinsifier_arm64.cc
index e8f925b..2abf1ed 100644
--- a/runtime/vm/compiler/intrinsifier_arm64.cc
+++ b/runtime/vm/compiler/intrinsifier_arm64.cc
@@ -1629,7 +1629,7 @@
 // Return type quickly for simple types (not parameterized and not signature).
 void Intrinsifier::ObjectRuntimeType(Assembler* assembler,
                                      Label* normal_ir_body) {
-  Label use_canonical_type, not_double, not_integer;
+  Label use_declaration_type, not_double, not_integer;
   __ ldr(R0, Address(SP, 0 * kWordSize));
   __ LoadClassIdMayBeSmi(R1, R0);
 
@@ -1637,7 +1637,7 @@
   __ b(normal_ir_body, EQ);  // Instance is a closure.
 
   __ CompareImmediate(R1, kNumPredefinedCids);
-  __ b(&use_canonical_type, HI);
+  __ b(&use_declaration_type, HI);
 
   __ CompareImmediate(R1, kDoubleCid);
   __ b(&not_double, NE);
@@ -1655,19 +1655,19 @@
   __ ret();
 
   __ Bind(&not_integer);
-  JumpIfNotString(assembler, R1, R0, &use_canonical_type);
+  JumpIfNotString(assembler, R1, R0, &use_declaration_type);
   __ LoadIsolate(R0);
   __ LoadFromOffset(R0, R0, Isolate::object_store_offset());
   __ LoadFromOffset(R0, R0, ObjectStore::string_type_offset());
   __ ret();
 
-  __ Bind(&use_canonical_type);
+  __ Bind(&use_declaration_type);
   __ LoadClassById(R2, R1);  // Overwrites R1.
   __ ldr(R3, FieldAddress(R2, Class::num_type_arguments_offset()), kHalfword);
   __ CompareImmediate(R3, 0);
   __ b(normal_ir_body, NE);
 
-  __ ldr(R0, FieldAddress(R2, Class::canonical_type_offset()));
+  __ ldr(R0, FieldAddress(R2, Class::declaration_type_offset()));
   __ CompareObject(R0, Object::null_object());
   __ b(normal_ir_body, EQ);
   __ ret();
diff --git a/runtime/vm/compiler/intrinsifier_ia32.cc b/runtime/vm/compiler/intrinsifier_ia32.cc
index 395c165..cfb50f6 100644
--- a/runtime/vm/compiler/intrinsifier_ia32.cc
+++ b/runtime/vm/compiler/intrinsifier_ia32.cc
@@ -1637,7 +1637,7 @@
 // Return type quickly for simple types (not parameterized and not signature).
 void Intrinsifier::ObjectRuntimeType(Assembler* assembler,
                                      Label* normal_ir_body) {
-  Label use_canonical_type, not_double, not_integer;
+  Label use_declaration_type, not_double, not_integer;
   __ movl(EAX, Address(ESP, +1 * kWordSize));
   __ LoadClassIdMayBeSmi(EDI, EAX);
 
@@ -1645,7 +1645,7 @@
   __ j(EQUAL, normal_ir_body);  // Instance is a closure.
 
   __ cmpl(EDI, Immediate(kNumPredefinedCids));
-  __ j(ABOVE, &use_canonical_type);
+  __ j(ABOVE, &use_declaration_type);
 
   // If object is a instance of _Double return double type.
   __ cmpl(EDI, Immediate(kDoubleCid));
@@ -1670,7 +1670,7 @@
   // If object is a string (one byte, two byte or external variants) return
   // string type.
   __ movl(EAX, EDI);
-  JumpIfNotString(assembler, EAX, &use_canonical_type);
+  JumpIfNotString(assembler, EAX, &use_declaration_type);
 
   __ LoadIsolate(EAX);
   __ movl(EAX, Address(EAX, Isolate::object_store_offset()));
@@ -1678,12 +1678,12 @@
   __ ret();
 
   // Object is neither double, nor integer, nor string.
-  __ Bind(&use_canonical_type);
+  __ Bind(&use_declaration_type);
   __ LoadClassById(EBX, EDI);
   __ movzxw(EDI, FieldAddress(EBX, Class::num_type_arguments_offset()));
   __ cmpl(EDI, Immediate(0));
   __ j(NOT_EQUAL, normal_ir_body, Assembler::kNearJump);
-  __ movl(EAX, FieldAddress(EBX, Class::canonical_type_offset()));
+  __ movl(EAX, FieldAddress(EBX, Class::declaration_type_offset()));
   __ CompareObject(EAX, Object::null_object());
   __ j(EQUAL, normal_ir_body, Assembler::kNearJump);  // Not yet set.
   __ ret();
diff --git a/runtime/vm/compiler/intrinsifier_x64.cc b/runtime/vm/compiler/intrinsifier_x64.cc
index 91b1cc8..a51b665 100644
--- a/runtime/vm/compiler/intrinsifier_x64.cc
+++ b/runtime/vm/compiler/intrinsifier_x64.cc
@@ -1552,7 +1552,7 @@
 // Return type quickly for simple types (not parameterized and not signature).
 void Intrinsifier::ObjectRuntimeType(Assembler* assembler,
                                      Label* normal_ir_body) {
-  Label use_canonical_type, not_integer, not_double;
+  Label use_declaration_type, not_integer, not_double;
   __ movq(RAX, Address(RSP, +1 * kWordSize));
   __ LoadClassIdMayBeSmi(RCX, RAX);
 
@@ -1561,7 +1561,7 @@
   __ j(EQUAL, normal_ir_body);  // Instance is a closure.
 
   __ cmpl(RCX, Immediate(kNumPredefinedCids));
-  __ j(ABOVE, &use_canonical_type);
+  __ j(ABOVE, &use_declaration_type);
 
   // If object is a instance of _Double return double type.
   __ cmpl(RCX, Immediate(kDoubleCid));
@@ -1586,7 +1586,7 @@
   // If object is a string (one byte, two byte or external variants) return
   // string type.
   __ movq(RAX, RCX);
-  JumpIfNotString(assembler, RAX, &use_canonical_type);
+  JumpIfNotString(assembler, RAX, &use_declaration_type);
 
   __ LoadIsolate(RAX);
   __ movq(RAX, Address(RAX, Isolate::object_store_offset()));
@@ -1594,12 +1594,12 @@
   __ ret();
 
   // Object is neither double, nor integer, nor string.
-  __ Bind(&use_canonical_type);
+  __ Bind(&use_declaration_type);
   __ LoadClassById(RDI, RCX);
   __ movzxw(RCX, FieldAddress(RDI, Class::num_type_arguments_offset()));
   __ cmpq(RCX, Immediate(0));
   __ j(NOT_EQUAL, normal_ir_body, Assembler::kNearJump);
-  __ movq(RAX, FieldAddress(RDI, Class::canonical_type_offset()));
+  __ movq(RAX, FieldAddress(RDI, Class::declaration_type_offset()));
   __ CompareObject(RAX, Object::null_object());
   __ j(EQUAL, normal_ir_body, Assembler::kNearJump);  // Not yet set.
   __ ret();
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index 89f360a..c63af58 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -168,10 +168,8 @@
   const bool multiline = regexp.is_multi_line();
 
   RegExpCompileData* compile_data = new (zone) RegExpCompileData();
-  if (!RegExpParser::ParseRegExp(pattern, multiline, compile_data)) {
-    // Parsing failures are handled in the RegExp factory constructor.
-    UNREACHABLE();
-  }
+  // Parsing failures are handled in the RegExp factory constructor.
+  RegExpParser::ParseRegExp(pattern, multiline, compile_data);
 
   regexp.set_num_bracket_expressions(compile_data->capture_count);
   if (compile_data->simple) {
@@ -334,161 +332,6 @@
   return Error::null();
 }
 
-static void AddRelatedClassesToList(
-    const Class& cls,
-    GrowableHandlePtrArray<const Class>* parse_list,
-    GrowableHandlePtrArray<const Class>* patch_list) {
-  Zone* zone = Thread::Current()->zone();
-  Class& parse_class = Class::Handle(zone);
-  AbstractType& interface_type = Type::Handle(zone);
-  Array& interfaces = Array::Handle(zone);
-
-  // Add all the interfaces implemented by the class that have not been
-  // already parsed to the parse list. Mark the interface as parsed so that
-  // we don't recursively add it back into the list.
-  interfaces ^= cls.interfaces();
-  for (intptr_t i = 0; i < interfaces.Length(); i++) {
-    interface_type ^= interfaces.At(i);
-    parse_class ^= interface_type.type_class();
-    if (!parse_class.is_finalized() && !parse_class.is_marked_for_parsing()) {
-      parse_list->Add(parse_class);
-      parse_class.set_is_marked_for_parsing();
-    }
-  }
-
-  // Walk up the super_class chain and add these classes to the list if they
-  // have not been already parsed to the parse list. Mark the class as parsed
-  // so that we don't recursively add it back into the list.
-  parse_class ^= cls.SuperClass();
-  while (!parse_class.IsNull()) {
-    if (!parse_class.is_finalized() && !parse_class.is_marked_for_parsing()) {
-      parse_list->Add(parse_class);
-      parse_class.set_is_marked_for_parsing();
-    }
-    parse_class ^= parse_class.SuperClass();
-  }
-
-  // Add patch classes if they exist to the parse list if they have not already
-  // been parsed and patched. Mark the class as parsed so that we don't
-  // recursively add it back into the list.
-  parse_class ^= cls.GetPatchClass();
-  if (!parse_class.IsNull()) {
-    if (!parse_class.is_finalized() && !parse_class.is_marked_for_parsing()) {
-      patch_list->Add(parse_class);
-      parse_class.set_is_marked_for_parsing();
-    }
-  }
-}
-
-RawError* Compiler::CompileClass(const Class& cls) {
-  ASSERT(Thread::Current()->IsMutatorThread());
-  // If class is a top level class it is already parsed.
-  if (cls.IsTopLevel()) {
-    return Error::null();
-  }
-  // If the class is already marked for parsing return immediately.
-  if (cls.is_marked_for_parsing()) {
-    return Error::null();
-  }
-  // If the class is a typedef class there is no need to try and
-  // compile it. Just finalize it directly.
-  if (cls.IsTypedefClass()) {
-#if defined(DEBUG)
-    const Class& closure_cls =
-        Class::Handle(Isolate::Current()->object_store()->closure_class());
-    ASSERT(closure_cls.is_finalized());
-#endif
-    LongJumpScope jump;
-    if (setjmp(*jump.Set()) == 0) {
-      ClassFinalizer::FinalizeClass(cls);
-      return Error::null();
-    } else {
-      Thread* thread = Thread::Current();
-      Error& error = Error::Handle(thread->zone());
-      error = thread->sticky_error();
-      thread->clear_sticky_error();
-      return error.raw();
-    }
-  }
-
-  Thread* const thread = Thread::Current();
-  StackZone zone(thread);
-#if !defined(PRODUCT)
-  VMTagScope tagScope(thread, VMTag::kCompileClassTagId);
-  TimelineDurationScope tds(thread, Timeline::GetCompilerStream(),
-                            "CompileClass");
-  if (tds.enabled()) {
-    tds.SetNumArguments(1);
-    tds.CopyArgument(0, "class", cls.ToCString());
-  }
-#endif  // !defined(PRODUCT)
-
-  // We remember all the classes that are being compiled in these lists. This
-  // also allows us to reset the marked_for_parsing state in case we see an
-  // error.
-  GrowableHandlePtrArray<const Class> parse_list(thread->zone(), 4);
-  GrowableHandlePtrArray<const Class> patch_list(thread->zone(), 4);
-
-  // Parse the class and all the interfaces it implements and super classes.
-  LongJumpScope jump;
-  if (setjmp(*jump.Set()) == 0) {
-    if (FLAG_trace_compiler) {
-      THR_Print("Compiling Class '%s'\n", cls.ToCString());
-    }
-
-    // Add the primary class which needs to be parsed to the parse list.
-    // Mark the class as parsed so that we don't recursively add the same
-    // class back into the list.
-    parse_list.Add(cls);
-    cls.set_is_marked_for_parsing();
-
-    // Add all super classes, interface classes and patch class if one
-    // exists to the corresponding lists.
-    // NOTE: The parse_list array keeps growing as more classes are added
-    // to it by AddRelatedClassesToList. It is not OK to hoist
-    // parse_list.Length() into a local variable and iterate using the local
-    // variable.
-    for (intptr_t i = 0; i < parse_list.length(); i++) {
-      AddRelatedClassesToList(parse_list.At(i), &parse_list, &patch_list);
-    }
-
-    // Finalize these classes.
-    for (intptr_t i = (parse_list.length() - 1); i >= 0; i--) {
-      const Class& parse_class = parse_list.At(i);
-      ASSERT(!parse_class.IsNull());
-      ClassFinalizer::FinalizeClass(parse_class);
-      parse_class.reset_is_marked_for_parsing();
-    }
-    for (intptr_t i = (patch_list.length() - 1); i >= 0; i--) {
-      const Class& parse_class = patch_list.At(i);
-      ASSERT(!parse_class.IsNull());
-      ClassFinalizer::FinalizeClass(parse_class);
-      parse_class.reset_is_marked_for_parsing();
-    }
-
-    return Error::null();
-  } else {
-    // Reset the marked for parsing flags.
-    for (intptr_t i = 0; i < parse_list.length(); i++) {
-      const Class& parse_class = parse_list.At(i);
-      if (parse_class.is_marked_for_parsing()) {
-        parse_class.reset_is_marked_for_parsing();
-      }
-    }
-    for (intptr_t i = 0; i < patch_list.length(); i++) {
-      const Class& parse_class = patch_list.At(i);
-      if (parse_class.is_marked_for_parsing()) {
-        parse_class.reset_is_marked_for_parsing();
-      }
-    }
-    Thread* thread = Thread::Current();
-    Error& error = Error::Handle(thread->zone());
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
-    return error.raw();
-  }
-}
-
 class CompileParsedFunctionHelper : public ValueObject {
  public:
   CompileParsedFunctionHelper(ParsedFunction* parsed_function,
@@ -869,7 +712,7 @@
       done = true;
     } else {
       // We bailed out or we encountered an error.
-      const Error& error = Error::Handle(thread()->sticky_error());
+      const Error& error = Error::Handle(thread()->StealStickyError());
 
       if (error.raw() == Object::branch_offset_error().raw()) {
         // Compilation failed due to an out of range branch offset in the
@@ -889,12 +732,14 @@
         done = true;
       }
 
-      // If is is not a background compilation, clear the error if it was not a
-      // real error, but just a bailout. If we're it a background compilation
-      // this will be dealt with in the caller.
       if (!Compiler::IsBackgroundCompilation() && error.IsLanguageError() &&
           (LanguageError::Cast(error).kind() == Report::kBailout)) {
-        thread()->clear_sticky_error();
+        // If is is not a background compilation, discard the error if it was
+        // not a real error, but just a bailout. If we're it a background
+        // compilation this will be dealt with in the caller.
+      } else {
+        // Otherwise, continue propagating.
+        thread()->set_sticky_error(error);
       }
     }
   }
@@ -955,6 +800,8 @@
     const Code& result = Code::Handle(helper.Compile(pipeline));
 
     if (result.IsNull()) {
+      const Error& error = Error::Handle(thread->StealStickyError());
+
       if (Compiler::IsBackgroundCompilation()) {
         // Try again later, background compilation may abort because of
         // state change during compilation.
@@ -962,59 +809,58 @@
           THR_Print("Aborted background compilation: %s\n",
                     function.ToFullyQualifiedCString());
         }
-        {
-          // If it was a bailout, then disable optimization.
-          Error& error = Error::Handle();
-          // We got an error during compilation.
-          error = thread->sticky_error();
-          thread->clear_sticky_error();
 
-          if (error.raw() == Object::background_compilation_error().raw()) {
-            if (FLAG_trace_compiler) {
-              THR_Print(
-                  "--> disabling background optimizations for '%s' (will "
-                  "try to re-compile on isolate thread again)\n",
-                  function.ToFullyQualifiedCString());
-            }
-
-            // Ensure we don't attempt to re-compile the function on the
-            // background compiler.
-            function.set_is_background_optimizable(false);
-
-            // Trigger another optimization soon on the main thread.
-            function.SetUsageCounter(optimized
-                                         ? FLAG_optimization_counter_threshold
-                                         : FLAG_compilation_counter_threshold);
-          } else if ((error.IsLanguageError() &&
-                      LanguageError::Cast(error).kind() == Report::kBailout) ||
-                     error.IsUnhandledException()) {
-            if (FLAG_trace_compiler) {
-              THR_Print("--> disabling optimizations for '%s'\n",
-                        function.ToFullyQualifiedCString());
-            }
-            function.SetIsOptimizable(false);
+        // We got an error during compilation.
+        // If it was a bailout, then disable optimization.
+        if (error.raw() == Object::background_compilation_error().raw()) {
+          if (FLAG_trace_compiler) {
+            THR_Print(
+                "--> disabling background optimizations for '%s' (will "
+                "try to re-compile on isolate thread again)\n",
+                function.ToFullyQualifiedCString());
           }
+
+          // Ensure we don't attempt to re-compile the function on the
+          // background compiler.
+          function.set_is_background_optimizable(false);
+
+          // Trigger another optimization soon on the main thread.
+          function.SetUsageCounter(optimized
+                                       ? FLAG_optimization_counter_threshold
+                                       : FLAG_compilation_counter_threshold);
+          return Error::null();
+        } else if (error.IsLanguageError() &&
+                   LanguageError::Cast(error).kind() == Report::kBailout) {
+          if (FLAG_trace_compiler) {
+            THR_Print("--> disabling optimizations for '%s'\n",
+                      function.ToFullyQualifiedCString());
+          }
+          function.SetIsOptimizable(false);
+          return Error::null();
+        } else {
+          // The background compiler does not execute Dart code or handle
+          // isolate messages.
+          ASSERT(!error.IsUnwindError());
+          return error.raw();
         }
-        return Error::null();
       }
       if (optimized) {
-        // Optimizer bailed out. Disable optimizations and never try again.
-        if (trace_compiler) {
-          THR_Print("--> disabling optimizations for '%s'\n",
-                    function.ToFullyQualifiedCString());
-        } else if (FLAG_trace_failed_optimization_attempts) {
-          THR_Print("Cannot optimize: %s\n",
-                    function.ToFullyQualifiedCString());
+        if (error.IsLanguageError() &&
+            LanguageError::Cast(error).kind() == Report::kBailout) {
+          // Optimizer bailed out. Disable optimizations and never try again.
+          if (trace_compiler) {
+            THR_Print("--> disabling optimizations for '%s'\n",
+                      function.ToFullyQualifiedCString());
+          } else if (FLAG_trace_failed_optimization_attempts) {
+            THR_Print("Cannot optimize: %s\n",
+                      function.ToFullyQualifiedCString());
+          }
+          function.SetIsOptimizable(false);
+          return Error::null();
         }
-        function.SetIsOptimizable(false);
-        return Error::null();
+        return error.raw();
       } else {
         ASSERT(!optimized);
-        // Encountered error.
-        Error& error = Error::Handle();
-        // We got an error during compilation.
-        error = thread->sticky_error();
-        thread->clear_sticky_error();
         // The non-optimizing compiler can get an unhandled exception
         // due to OOM or Stack overflow errors, it should not however
         // bail out.
@@ -1051,11 +897,9 @@
   } else {
     Thread* const thread = Thread::Current();
     StackZone stack_zone(thread);
-    Error& error = Error::Handle();
     // We got an error during compilation or it is a bailout from background
     // compilation (e.g., during parsing with EnsureIsFinalized).
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
+    const Error& error = Error::Handle(thread->StealStickyError());
     if (error.raw() == Object::background_compilation_error().raw()) {
       // Exit compilation, retry it later.
       if (FLAG_trace_bailout) {
@@ -1101,20 +945,13 @@
     pipeline->ParseFunction(parsed_function);
     return Error::null();
   } else {
-    Thread* const thread = Thread::Current();
-    StackZone stack_zone(thread);
-    Error& error = Error::Handle();
     // We got an error during compilation or it is a bailout from background
     // compilation (e.g., during parsing with EnsureIsFinalized).
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
     // Unoptimized compilation or precompilation may encounter compile-time
     // errors, but regular optimized compilation should not.
     ASSERT(!optimized);
-    return error.raw();
+    return Thread::Current()->StealStickyError();
   }
-  UNREACHABLE();
-  return Error::null();
 }
 
 RawObject* Compiler::CompileFunction(Thread* thread, const Function& function) {
@@ -1249,15 +1086,9 @@
     }
     return Error::null();
   } else {
-    Error& error = Error::Handle();
-    Thread* thread = Thread::Current();
     // We got an error during compilation.
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
-    return error.raw();
+    return Thread::Current()->StealStickyError();
   }
-  UNREACHABLE();
-  return Error::null();
 }
 
 void Compiler::ComputeLocalVarDescriptors(const Code& code) {
@@ -1313,11 +1144,6 @@
     ASSERT(!func.IsNull());
     if (!func.HasCode() &&
         !func.is_abstract() && !func.IsRedirectingFactory()) {
-      if ((cls.is_mixin_app_alias() || cls.IsMixinApplication()) &&
-          func.HasOptionalParameters()) {
-        // Skipping optional parameters in mixin application.
-        continue;
-      }
       result = CompileFunction(thread, func);
       if (result.IsError()) {
         return Error::Cast(result).raw();
@@ -1425,11 +1251,7 @@
     }
   }
 
-  Thread* const thread = Thread::Current();
-  StackZone zone(thread);
-  const Error& error = Error::Handle(thread->zone(), thread->sticky_error());
-  thread->clear_sticky_error();
-  return error.raw();
+  return Thread::Current()->StealStickyError();
 }
 
 RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
@@ -1493,10 +1315,7 @@
     }
   }
 
-  Thread* const thread = Thread::Current();
-  const Object& result = PassiveObject::Handle(thread->sticky_error());
-  thread->clear_sticky_error();
-  return result.raw();
+  return Thread::Current()->StealStickyError();
 }
 
 void Compiler::AbortBackgroundCompilation(intptr_t deopt_id, const char* msg) {
@@ -1848,11 +1667,6 @@
   return Error::null();
 }
 
-RawError* Compiler::CompileClass(const Class& cls) {
-  FATAL1("Attempt to compile class %s", cls.ToCString());
-  return Error::null();
-}
-
 RawObject* Compiler::CompileFunction(Thread* thread, const Function& function) {
   FATAL1("Attempt to compile function %s", function.ToCString());
   return Error::null();
diff --git a/runtime/vm/compiler/jit/compiler.h b/runtime/vm/compiler/jit/compiler.h
index 53e41fd..43f4320 100644
--- a/runtime/vm/compiler/jit/compiler.h
+++ b/runtime/vm/compiler/jit/compiler.h
@@ -88,12 +88,6 @@
   // Returns Error::null() if there is no compilation error.
   static RawError* Compile(const Library& library, const Script& script);
 
-  // Extracts function and field symbols from the class and populates
-  // the class.
-  //
-  // Returns Error::null() if there is no compilation error.
-  static RawError* CompileClass(const Class& cls);
-
   // Generates code for given function without optimization and sets its code
   // field.
   //
diff --git a/runtime/vm/compiler/relocation.cc b/runtime/vm/compiler/relocation.cc
new file mode 100644
index 0000000..fc568c3
--- /dev/null
+++ b/runtime/vm/compiler/relocation.cc
@@ -0,0 +1,173 @@
+// 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/relocation.h"
+
+#include "vm/code_patcher.h"
+#include "vm/instructions.h"
+#include "vm/object_store.h"
+#include "vm/stub_code.h"
+
+namespace dart {
+
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
+    !defined(TARGET_ARCH_IA32)
+
+class InstructionsMapTraits {
+ public:
+  struct Pair {
+    RawInstructions* instructions;
+    intptr_t inst_nr;
+
+    Pair() : instructions(nullptr), inst_nr(-1) {}
+    Pair(RawInstructions* i, intptr_t nr) : instructions(i), inst_nr(nr) {}
+  };
+
+  typedef const RawInstructions* Key;
+  typedef const intptr_t Value;
+
+  static Key KeyOf(Pair kv) { return kv.instructions; }
+  static Value ValueOf(Pair kv) { return kv.inst_nr; }
+  static inline intptr_t Hashcode(Key key) {
+    return reinterpret_cast<intptr_t>(key);
+  }
+  static inline bool IsKeyEqual(Pair pair, Key key) {
+    return pair.instructions == key;
+  }
+};
+
+typedef DirectChainedHashMap<InstructionsMapTraits> InstructionsMap;
+
+void CodeRelocator::Relocate(bool is_vm_isolate) {
+  auto zone = Thread::Current()->zone();
+  intptr_t next_text_offsets = 0;
+
+  // Keeps track of mapping from Code to the index in [commands_] at which the
+  // code object's instructions are located. This allows us to calculate the
+  // distance to the destination using commands_[index].expected_offset.
+  InstructionsMap instructions_map;
+
+  // The callers which has an unresolved call.
+  GrowableArray<RawCode*> callers;
+  // The offset from the instruction at which the call happens.
+  GrowableArray<intptr_t> call_offsets;
+  // Type entry-point type we call in the destination.
+  GrowableArray<Code::CallEntryPoint> call_entry_points;
+  // The offset in the .text segment where the call happens.
+  GrowableArray<intptr_t> text_offsets;
+  // The target of the forward call.
+  GrowableArray<RawCode*> callees;
+
+  auto& targets = Array::Handle(zone);
+  auto& kind_type_and_offset = Smi::Handle(zone);
+  auto& target = Object::Handle(zone);
+  auto& destination = Code::Handle(zone);
+  auto& instructions = Instructions::Handle(zone);
+  auto& caller = Code::Handle(zone);
+  for (intptr_t i = 0; i < code_objects_->length(); ++i) {
+    caller = (*code_objects_)[i];
+    instructions = caller.instructions();
+
+    // If two [Code] objects point to the same [Instructions] object, we'll just
+    // use the first one (they are equivalent for all practical purposes).
+    if (instructions_map.HasKey(instructions.raw())) {
+      continue;
+    }
+    instructions_map.Insert({instructions.raw(), commands_->length()});
+
+    // First we'll add the instructions of [caller] itself.
+    const intptr_t active_code_text_offsets = next_text_offsets;
+    commands_->Add(ImageWriterCommand(
+        next_text_offsets, ImageWriterCommand::InsertInstructionOfCode,
+        caller.raw()));
+
+    next_text_offsets += instructions.raw()->Size();
+
+    targets = caller.static_calls_target_table();
+    if (!targets.IsNull()) {
+      StaticCallsTable calls(targets);
+      for (auto call : calls) {
+        kind_type_and_offset = call.Get<Code::kSCallTableKindAndOffset>();
+        auto kind = Code::KindField::decode(kind_type_and_offset.Value());
+        auto offset = Code::OffsetField::decode(kind_type_and_offset.Value());
+        auto entry_point =
+            Code::EntryPointField::decode(kind_type_and_offset.Value());
+
+        if (kind == Code::kCallViaCode) {
+          continue;
+        }
+
+        target = call.Get<Code::kSCallTableFunctionTarget>();
+        if (target.IsFunction()) {
+          auto& fun = Function::Cast(target);
+          ASSERT(fun.HasCode());
+          destination = fun.CurrentCode();
+          ASSERT(!destination.IsStubCode());
+        } else {
+          target = call.Get<Code::kSCallTableCodeTarget>();
+          ASSERT(target.IsCode());
+          destination = Code::Cast(target).raw();
+        }
+
+        const intptr_t start_of_call =
+            active_code_text_offsets + instructions.HeaderSize() + offset;
+
+        callers.Add(caller.raw());
+        callees.Add(destination.raw());
+        text_offsets.Add(start_of_call);
+        call_offsets.Add(offset);
+        call_entry_points.Add(entry_point);
+      }
+    }
+  }
+
+  auto& callee = Code::Handle(zone);
+  auto& caller_instruction = Instructions::Handle(zone);
+  auto& destination_instruction = Instructions::Handle(zone);
+  for (intptr_t i = 0; i < callees.length(); ++i) {
+    caller = callers[i];
+    callee = callees[i];
+    const intptr_t text_offset = text_offsets[i];
+    const intptr_t call_offset = call_offsets[i];
+    const bool use_unchecked_entry =
+        call_entry_points[i] == Code::kUncheckedEntry;
+    caller_instruction = caller.instructions();
+    destination_instruction = callee.instructions();
+
+    const uword entry_point = use_unchecked_entry ? callee.UncheckedEntryPoint()
+                                                  : callee.EntryPoint();
+    const intptr_t unchecked_offset =
+        destination_instruction.HeaderSize() +
+        (entry_point - destination_instruction.PayloadStart());
+
+    auto map_entry = instructions_map.Lookup(destination_instruction.raw());
+    auto& dst = (*commands_)[map_entry->inst_nr];
+    ASSERT(dst.op == ImageWriterCommand::InsertInstructionOfCode);
+
+    const int32_t distance =
+        (dst.expected_offset + unchecked_offset) - text_offset;
+    {
+      NoSafepointScope no_safepoint_scope;
+
+      PcRelativeCallPattern call(caller_instruction.PayloadStart() +
+                                 call_offset);
+      ASSERT(call.IsValid());
+      call.set_distance(static_cast<int32_t>(distance));
+      ASSERT(call.distance() == distance);
+    }
+  }
+
+  // We're done now, so we clear out the targets tables.
+  if (!is_vm_isolate) {
+    for (intptr_t i = 0; i < code_objects_->length(); ++i) {
+      caller = (*code_objects_)[i];
+      caller.set_static_calls_target_table(Array::empty_array());
+    }
+  }
+}
+
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&           \
+        // !defined(TARGET_ARCH_IA32)
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/relocation.h b/runtime/vm/compiler/relocation.h
new file mode 100644
index 0000000..4c2714f
--- /dev/null
+++ b/runtime/vm/compiler/relocation.h
@@ -0,0 +1,58 @@
+// 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_RELOCATION_H_
+#define RUNTIME_VM_COMPILER_RELOCATION_H_
+
+#include "vm/allocation.h"
+#include "vm/image_snapshot.h"
+#include "vm/object.h"
+#include "vm/type_testing_stubs.h"
+#include "vm/visitor.h"
+
+namespace dart {
+
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
+    !defined(TARGET_ARCH_IA32)
+
+// Relocates the given code objects by patching the instructions with the
+// correct pc offsets.
+//
+// Produces a set of [ImageWriterCommand]s which tell the image writer in which
+// order (and at which offset) to emit instructions.
+class CodeRelocator : public StackResource {
+ public:
+  // Relocates instructions of the code objects provided by patching any
+  // pc-relative calls/jumps.
+  //
+  // Populates the image writer command array which must be used later to write
+  // the ".text" segment.
+  static void Relocate(Thread* thread,
+                       GrowableArray<RawCode*>* code_objects,
+                       GrowableArray<ImageWriterCommand>* commands,
+                       bool is_vm_isolate) {
+    CodeRelocator relocator(thread, code_objects, commands);
+    relocator.Relocate(is_vm_isolate);
+  }
+
+ private:
+  CodeRelocator(Thread* thread,
+                GrowableArray<RawCode*>* code_objects,
+                GrowableArray<ImageWriterCommand>* commands)
+      : StackResource(thread),
+        code_objects_(code_objects),
+        commands_(commands) {}
+
+  void Relocate(bool is_vm_isolate);
+
+  GrowableArray<RawCode*>* code_objects_;
+  GrowableArray<ImageWriterCommand>* commands_;
+};
+
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&           \
+        // !defined(TARGET_ARCH_IA32)
+
+}  // namespace dart
+
+#endif  // RUNTIME_VM_COMPILER_RELOCATION_H_
diff --git a/runtime/vm/constants_kbc.h b/runtime/vm/constants_kbc.h
index 67772ab..15506e5 100644
--- a/runtime/vm/constants_kbc.h
+++ b/runtime/vm/constants_kbc.h
@@ -271,7 +271,16 @@
 //    SP[-(1+ArgC)], ..., SP[-1] and argument descriptor PP[D], which
 //    indicates whether the first argument is a type argument vector.
 //
-//  - InstanceCall ArgC, D
+//  - InterfaceCall ArgC, D
+//
+//    Lookup and invoke method using ICData in PP[D]
+//    with arguments SP[-(1+ArgC)], ..., SP[-1].
+//    Method has to be declared (explicitly or implicitly) in an interface
+//    implemented by a receiver, and passed arguments are valid for the
+//    interface method declaration.
+//    The ICData indicates whether the first argument is a type argument vector.
+//
+//  - DynamicCall ArgC, D
 //
 //    Lookup and invoke method using ICData in PP[D]
 //    with arguments SP[-(1+ArgC)], ..., SP[-1].
@@ -439,7 +448,8 @@
   V(JumpIfNull,                            T, tgt, ___, ___)                   \
   V(JumpIfNotNull,                         T, tgt, ___, ___)                   \
   V(IndirectStaticCall,                  A_D, num, num, ___)                   \
-  V(InstanceCall,                        A_D, num, num, ___)                   \
+  V(InterfaceCall,                       A_D, num, num, ___)                   \
+  V(DynamicCall,                         A_D, num, num, ___)                   \
   V(NativeCall,                            D, lit, ___, ___)                   \
   V(ReturnTOS,                             0, ___, ___, ___)                   \
   V(AssertAssignable,                    A_D, num, lit, ___)                   \
@@ -595,7 +605,8 @@
   DART_FORCE_INLINE static bool IsCallOpcode(KBCInstr instr) {
     switch (DecodeOpcode(instr)) {
       case KernelBytecode::kIndirectStaticCall:
-      case KernelBytecode::kInstanceCall:
+      case KernelBytecode::kInterfaceCall:
+      case KernelBytecode::kDynamicCall:
         return true;
 
       default:
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 3ea0f09..e1ee86a 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -27,6 +27,7 @@
 #include "vm/object_store.h"
 #include "vm/port.h"
 #include "vm/profiler.h"
+#include "vm/reverse_pc_lookup_cache.h"
 #include "vm/service_isolate.h"
 #include "vm/simulator.h"
 #include "vm/snapshot.h"
@@ -101,7 +102,7 @@
   // These offsets are embedded in precompiled instructions. We need simarm64
   // (compiler) and arm64 (runtime) to agree.
   CHECK_OFFSET(Thread::stack_limit_offset(), 8);
-  CHECK_OFFSET(Thread::object_null_offset(), 112);
+  CHECK_OFFSET(Thread::object_null_offset(), 120);
   CHECK_OFFSET(SingleTargetCache::upper_limit_offset(), 26);
   CHECK_OFFSET(Isolate::object_store_offset(), 40);
   NOT_IN_PRODUCT(CHECK_OFFSET(sizeof(ClassHeapStats), 288));
@@ -248,6 +249,9 @@
         // Must copy before leaving the zone.
         return strdup(error.ToErrorCString());
       }
+
+      ReversePcLookupCache::BuildAndAttachToIsolate(vm_isolate_);
+
       Object::FinishInit(vm_isolate_);
 #if !defined(PRODUCT)
       if (tds.enabled()) {
@@ -604,6 +608,9 @@
     if (!error.IsNull()) {
       return error.raw();
     }
+
+    ReversePcLookupCache::BuildAndAttachToIsolate(I);
+
 #if !defined(PRODUCT)
     if (tds.enabled()) {
       tds.SetNumArguments(2);
@@ -630,17 +637,17 @@
 #if defined(DART_PRECOMPILED_RUNTIME)
   // AOT: The megamorphic miss function and code come from the snapshot.
   ASSERT(I->object_store()->megamorphic_miss_code() != Code::null());
+  ASSERT(I->object_store()->build_method_extractor_code() != Code::null());
 #else
   // JIT: The megamorphic miss function and code come from the snapshot in JIT
   // app snapshot, otherwise create them.
   if (I->object_store()->megamorphic_miss_code() == Code::null()) {
     MegamorphicCacheTable::InitMissHandler(I);
   }
-
 #if !defined(TARGET_ARCH_DBC) && !defined(TARGET_ARCH_IA32)
   if (I != Dart::vm_isolate()) {
     I->object_store()->set_build_method_extractor_code(
-        Code::Handle(StubCode::GetBuildMethodExtractorStub()));
+        Code::Handle(StubCode::GetBuildMethodExtractorStub(nullptr)));
   }
 #endif
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
@@ -714,8 +721,10 @@
   if (Snapshot::IncludesCode(kind)) {
     // enabling assertions affects deopt ids.
     ADD_FLAG(asserts, enable_asserts, FLAG_enable_asserts);
-    // sync-async affects deopt_ids.
-    buffer.AddString(FLAG_sync_async ? " sync_async" : " no-sync_async");
+    if (kind == Snapshot::kFullAOT) {
+      ADD_FLAG(use_bare_instructions, use_bare_instructions,
+               FLAG_use_bare_instructions);
+    }
     if (kind == Snapshot::kFullJIT) {
       ADD_FLAG(use_field_guards, use_field_guards, FLAG_use_field_guards);
       ADD_FLAG(use_osr, use_osr, FLAG_use_osr);
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 1c862ff..7d9b8f5 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -111,15 +111,13 @@
       // Verify that the result type of a function is canonical or a
       // TypeParameter.
       typeHandle_ ^= funcHandle_.result_type();
-      ASSERT(typeHandle_.IsMalformed() || typeHandle_.IsTypeParameter() ||
-             typeHandle_.IsCanonical());
+      ASSERT(typeHandle_.IsTypeParameter() || typeHandle_.IsCanonical());
       // Verify that the types in the function signature are all canonical or
       // a TypeParameter.
       const intptr_t num_parameters = funcHandle_.NumParameters();
       for (intptr_t i = 0; i < num_parameters; i++) {
         typeHandle_ = funcHandle_.ParameterTypeAt(i);
-        ASSERT(typeHandle_.IsMalformed() || typeHandle_.IsTypeParameter() ||
-               typeHandle_.IsCanonical());
+        ASSERT(typeHandle_.IsTypeParameter() || typeHandle_.IsCanonical());
       }
     }
   }
@@ -139,11 +137,8 @@
     ASSERT(!list_class.IsNull());
     const Instance& instance = Instance::Cast(obj);
     const Class& obj_class = Class::Handle(zone, obj.clazz());
-    Error& malformed_type_error = Error::Handle(zone);
-    if (obj_class.IsSubtypeOf(Object::null_type_arguments(), list_class,
-                              Object::null_type_arguments(),
-                              &malformed_type_error, NULL, Heap::kNew)) {
-      ASSERT(malformed_type_error.IsNull());  // Type is a raw List.
+    if (Class::IsSubtypeOf(obj_class, Object::null_type_arguments(), list_class,
+                           Object::null_type_arguments(), Heap::kNew)) {
       return instance.raw();
     }
   }
@@ -158,11 +153,8 @@
     ASSERT(!map_class.IsNull());
     const Instance& instance = Instance::Cast(obj);
     const Class& obj_class = Class::Handle(zone, obj.clazz());
-    Error& malformed_type_error = Error::Handle(zone);
-    if (obj_class.IsSubtypeOf(Object::null_type_arguments(), map_class,
-                              Object::null_type_arguments(),
-                              &malformed_type_error, NULL, Heap::kNew)) {
-      ASSERT(malformed_type_error.IsNull());  // Type is a raw Map.
+    if (Class::IsSubtypeOf(obj_class, Object::null_type_arguments(), map_class,
+                           Object::null_type_arguments(), Heap::kNew)) {
       return instance.raw();
     }
   }
@@ -1619,9 +1611,7 @@
   if (I->sticky_error() != Object::null()) {
     Thread* T = Thread::Current();
     TransitionNativeToVM transition(T);
-    Dart_Handle error = Api::NewHandle(T, I->sticky_error());
-    I->clear_sticky_error();
-    return error;
+    return Api::NewHandle(T, I->StealStickyError());
   }
   if (FLAG_print_class_table) {
     HANDLESCOPE(Thread::Current());
@@ -1638,9 +1628,7 @@
   API_TIMELINE_BEGIN_END_BASIC(T);
   TransitionNativeToVM transition(T);
   if (I->message_handler()->HandleNextMessage() != MessageHandler::kOK) {
-    Dart_Handle error = Api::NewHandle(T, T->sticky_error());
-    T->clear_sticky_error();
-    return error;
+    return Api::NewHandle(T, T->StealStickyError());
   }
   return Api::Success();
 }
@@ -1685,7 +1673,7 @@
     const Error* error;
     {
       NoSafepointScope no_safepoint;
-      RawError* raw_error = T->get_and_clear_sticky_error();
+      RawError* raw_error = T->StealStickyError();
       T->UnwindScopes(T->top_exit_frame_info());
       error = &Error::Handle(T->zone(), raw_error);
     }
@@ -1880,11 +1868,8 @@
     RETURN_TYPE_ERROR(Z, object, Instance);
   }
   CHECK_CALLBACK_STATE(T);
-  Error& malformed_type_error = Error::Handle(Z);
   *value = instance.IsInstanceOf(type_obj, Object::null_type_arguments(),
-                                 Object::null_type_arguments(),
-                                 &malformed_type_error);
-  ASSERT(malformed_type_error.IsNull());  // Type was created from a class.
+                                 Object::null_type_arguments());
   return Api::Success();
 }
 
@@ -1998,11 +1983,9 @@
         Class::Handle(I->object_store()->future_class());
     ASSERT(!future_class.IsNull());
     const Class& obj_class = Class::Handle(Z, obj.clazz());
-    Error& malformed_type_error = Error::Handle(Z);
-    bool is_future = obj_class.IsSubtypeOf(
-        Object::null_type_arguments(), future_class,
-        Object::null_type_arguments(), &malformed_type_error, NULL, Heap::kNew);
-    ASSERT(malformed_type_error.IsNull());  // Type is a raw Future.
+    bool is_future = Class::IsSubtypeOf(
+        obj_class, Object::null_type_arguments(), future_class,
+        Object::null_type_arguments(), Heap::kNew);
     return is_future;
   }
   return false;
@@ -2359,7 +2342,7 @@
 
 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) {
   Thread* thread = Thread::Current();
-  CHECK_ISOLATE(thread->isolate());
+  DARTSCOPE(thread);
   ReusableObjectHandleScope reused_obj_handle(thread);
   const String& str_obj = Api::UnwrapStringHandle(reused_obj_handle, str);
   if (str_obj.IsNull()) {
@@ -3818,26 +3801,18 @@
 
   Instance& new_object = Instance::Handle(Z);
   if (constructor.IsRedirectingFactory()) {
-    ClassFinalizer::ResolveRedirectingFactory(cls, constructor);
     Type& redirect_type = Type::Handle(constructor.RedirectionType());
     constructor = constructor.RedirectionTarget();
-    if (constructor.IsNull()) {
-      ASSERT(redirect_type.IsMalformed());
-      return Api::NewHandle(T, redirect_type.error());
-    }
+    ASSERT(!constructor.IsNull());
 
     if (!redirect_type.IsInstantiated()) {
       // The type arguments of the redirection type are instantiated from the
       // type arguments of the type argument.
       // We do not support generic constructors.
       ASSERT(redirect_type.IsInstantiated(kFunctions));
-      Error& bound_error = Error::Handle();
       redirect_type ^= redirect_type.InstantiateFrom(
-          type_arguments, Object::null_type_arguments(), kNoneFree,
-          &bound_error, NULL, NULL, Heap::kNew);
-      if (!bound_error.IsNull()) {
-        return Api::NewHandle(T, bound_error.raw());
-      }
+          type_arguments, Object::null_type_arguments(), kNoneFree, NULL,
+          Heap::kNew);
       redirect_type ^= redirect_type.Canonicalize();
     }
 
@@ -4426,38 +4401,6 @@
 
 // --- Native fields and functions ---
 
-DART_EXPORT Dart_Handle Dart_CreateNativeWrapperClass(Dart_Handle library,
-                                                      Dart_Handle name,
-                                                      int field_count) {
-#if defined(DART_PRECOMPILED_RUNTIME)
-  return Api::NewError("%s: Cannot compile on an AOT runtime.", CURRENT_FUNC);
-#else
-  DARTSCOPE(Thread::Current());
-  const String& cls_name = Api::UnwrapStringHandle(Z, name);
-  if (cls_name.IsNull()) {
-    RETURN_TYPE_ERROR(Z, name, String);
-  }
-  const Library& lib = Api::UnwrapLibraryHandle(Z, library);
-  if (lib.IsNull()) {
-    RETURN_TYPE_ERROR(Z, library, Library);
-  }
-  if (!Utils::IsUint(16, field_count)) {
-    return Api::NewError(
-        "Invalid field_count passed to Dart_CreateNativeWrapperClass");
-  }
-  CHECK_CALLBACK_STATE(T);
-
-  String& cls_symbol = String::Handle(Z, Symbols::New(T, cls_name));
-  const Class& cls =
-      Class::Handle(Z, Class::NewNativeWrapper(lib, cls_symbol, field_count));
-  if (cls.IsNull()) {
-    return Api::NewError(
-        "Unable to create native wrapper class : already exists");
-  }
-  return Api::NewHandle(T, cls.RareType());
-#endif  // defined(DART_PRECOMPILED_RUNTIME)
-}
-
 DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj,
                                                          int* count) {
   Thread* thread = Thread::Current();
@@ -4684,6 +4627,7 @@
 DART_EXPORT Dart_Handle Dart_GetNativeReceiver(Dart_NativeArguments args,
                                                intptr_t* value) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
+  TransitionNativeToVM transition(arguments->thread());
   ASSERT(arguments->thread()->isolate() == Isolate::Current());
   if (value == NULL) {
     RETURN_NULL_ERROR(value);
@@ -5027,7 +4971,6 @@
         "https://github.com/dart-lang/sdk/blob/master/runtime/docs/compiler/"
         "aot/entry_point_pragma.md\n",
         String::Handle(klass.UserVisibleName()).ToCString());
-    UNREACHABLE();
   }
 #endif
 }
@@ -5570,6 +5513,12 @@
   return NULL;
 }
 
+DART_EXPORT void Dart_SetNativeServiceStreamCallback(
+    Dart_NativeStreamConsumer consumer,
+    const char* stream_id) {
+  return;
+}
+
 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
                                                   const char* event_kind,
                                                   const uint8_t* bytes,
@@ -5674,6 +5623,12 @@
   return NULL;
 }
 
+DART_EXPORT void Dart_SetNativeServiceStreamCallback(
+    Dart_NativeStreamConsumer consumer,
+    const char* stream_id) {
+  Service::SetNativeServiceStreamCallback(consumer, stream_id);
+}
+
 DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
                                                   const char* event_kind,
                                                   const uint8_t* bytes,
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index d959a93..3a3c425 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -4233,6 +4233,16 @@
   EXPECT_STREQ("myerror", Dart_GetError(result));
 }
 
+TEST_CASE(DartAPI_SetField_BadType) {
+  const char* kScriptChars = "int foo;\n";
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+  Dart_Handle name = NewString("foo");
+  Dart_Handle result = Dart_SetField(lib, name, Dart_True());
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING("type 'bool' is not a subtype of type 'int' of 'foo'",
+                   Dart_GetError(result));
+}
+
 void NativeFieldLookup(Dart_NativeArguments args) {
   UNREACHABLE();
 }
@@ -5217,6 +5227,88 @@
   EXPECT_STREQ("myerror", Dart_GetError(result));
 }
 
+TEST_CASE(DartAPI_Invoke_BadArgs) {
+  const char* kScriptChars =
+      "class BaseMethods {\n"
+      "  inheritedMethod(int arg) => 'inherited $arg';\n"
+      "  static nonInheritedMethod(int arg) => 'noninherited $arg';\n"
+      "}\n"
+      "\n"
+      "class Methods extends BaseMethods {\n"
+      "  instanceMethod(int arg) => 'instance $arg';\n"
+      "  _instanceMethod(int arg) => 'hidden instance $arg';\n"
+      "  static staticMethod(int arg) => 'static $arg';\n"
+      "  static _staticMethod(int arg) => 'hidden static $arg';\n"
+      "}\n"
+      "\n"
+      "topMethod(int arg) => 'top $arg';\n"
+      "_topMethod(int arg) => 'hidden top $arg';\n"
+      "\n"
+      "Methods test() {\n"
+      "  return new Methods();\n"
+      "}\n";
+
+#if defined(PRODUCT)
+  const char* error_msg =
+      "type '_OneByteString' is not a subtype of type 'int' of 'arg'";
+#else
+  const char* error_msg =
+      "type 'String' is not a subtype of type 'int' of 'arg'";
+#endif  // defined(PRODUCT)
+
+  // Shared setup.
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
+  Dart_Handle type = Dart_GetType(lib, NewString("Methods"), 0, NULL);
+  EXPECT_VALID(type);
+  Dart_Handle instance = Dart_Invoke(lib, NewString("test"), 0, NULL);
+  EXPECT_VALID(instance);
+  Dart_Handle args[1];
+  args[0] = NewString("!!!");
+  Dart_Handle result;
+  Dart_Handle name;
+
+  // Instance method.
+  name = NewString("instanceMethod");
+  result = Dart_Invoke(instance, name, 1, args);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING(error_msg, Dart_GetError(result));
+
+  name = PrivateLibName(lib, "_instanceMethod");
+  result = Dart_Invoke(instance, name, 1, args);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING(error_msg, Dart_GetError(result));
+
+  // Inherited method.
+  name = NewString("inheritedMethod");
+  result = Dart_Invoke(instance, name, 1, args);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING(error_msg, Dart_GetError(result));
+
+  // Static method.
+  name = NewString("staticMethod");
+  result = Dart_Invoke(type, name, 1, args);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING(error_msg, Dart_GetError(result));
+
+  // Hidden static method.
+  name = NewString("_staticMethod");
+  result = Dart_Invoke(type, name, 1, args);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING(error_msg, Dart_GetError(result));
+
+  // Top-Level method.
+  name = NewString("topMethod");
+  result = Dart_Invoke(lib, name, 1, args);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING(error_msg, Dart_GetError(result));
+
+  // Hidden top-level method.
+  name = NewString("_topMethod");
+  result = Dart_Invoke(lib, name, 1, args);
+  EXPECT(Dart_IsError(result));
+  EXPECT_SUBSTRING(error_msg, Dart_GetError(result));
+}
+
 TEST_CASE(DartAPI_Invoke_Null) {
   Dart_Handle result = Dart_Invoke(Dart_Null(), NewString("toString"), 0, NULL);
   EXPECT_VALID(result);
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 677be143..4e0acbc 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -21,6 +21,7 @@
 namespace dart {
 
 DECLARE_FLAG(bool, enable_interpreter);
+DECLARE_FLAG(bool, precompiled_mode);
 
 // A cache of VM heap allocated arguments descriptors.
 RawArray* ArgumentsDescriptor::cached_args_descriptors_[kCachedDescriptorCount];
@@ -59,9 +60,9 @@
     ASSERT(thread->isolate() == Isolate::Current());
     saved_stack_limit_ = thread->saved_stack_limit();
 #if defined(USING_SIMULATOR)
-    thread->SetStackLimit(Simulator::Current()->stack_limit());
+    thread->SetStackLimit(Simulator::Current()->overflow_stack_limit());
 #else
-    thread->SetStackLimit(OSThread::Current()->stack_limit_with_headroom());
+    thread->SetStackLimit(OSThread::Current()->overflow_stack_limit());
     // TODO(regis): For now, the interpreter is using its own stack limit.
 #endif
 
@@ -116,11 +117,18 @@
   // We use a kernel2kernel constant evaluator in Dart 2.0 AOT compilation
   // and never start the VM service isolate. So we should never end up invoking
   // any dart code in the Dart 2.0 AOT compiler.
-#if !defined(DART_PRECOMPILED_RUNTIME)
   if (FLAG_precompiled_mode) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
     UNREACHABLE();
-  }
+#else
+    if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+      Thread* thread = Thread::Current();
+      thread->set_global_object_pool(
+          thread->isolate()->object_store()->global_object_pool());
+      ASSERT(thread->global_object_pool() != Object::null());
+    }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
+  }
 
   ASSERT(!function.IsNull());
 
diff --git a/runtime/vm/dart_entry.h b/runtime/vm/dart_entry.h
index 65a6f0d..23342d3 100644
--- a/runtime/vm/dart_entry.h
+++ b/runtime/vm/dart_entry.h
@@ -86,7 +86,6 @@
   enum {
     kTypeArgsLenIndex,
     kCountIndex,
-
     kPositionalCountIndex,
     kFirstNamedEntryIndex,
   };
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 4dbbe42..1153d2c 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -324,7 +324,7 @@
   if (ignore_breakpoints_ || IsPaused()) {
     // We don't let the isolate get interrupted if we are already
     // paused or ignoring breakpoints.
-    return Error::null();
+    return Thread::Current()->StealStickyError();
   }
   ServiceEvent event(isolate_, kind);
   DebuggerStackTrace* trace = CollectStackTrace();
@@ -339,10 +339,10 @@
   ClearCachedStackTraces();
 
   // If any error occurred while in the debug message loop, return it here.
-  const Error& error = Error::Handle(Thread::Current()->sticky_error());
-  ASSERT(error.IsNull() || error.IsUnwindError());
-  Thread::Current()->clear_sticky_error();
-  return error.raw();
+  NoSafepointScope no_safepoint;
+  RawError* error = Thread::Current()->StealStickyError();
+  ASSERT((error == Error::null()) || error->IsUnwindError());
+  return error;
 }
 
 void Debugger::SendBreakpointEvent(ServiceEvent::EventKind kind,
@@ -718,7 +718,9 @@
         ASSERT(kind == RawLocalVarDescriptors::kContextVar);
         if (!live_frame_) {
           ASSERT(!ctx_.IsNull());
-          return ctx_.At(variable_index.value());
+          return GetRelativeContextVar(var_info.scope_id,
+                                       variable_index.value(),
+                                       /* frame_ctx_level = */ 0);
         }
         return GetContextVar(var_info.scope_id, variable_index.value());
       }
@@ -732,25 +734,19 @@
 }
 
 RawObject* ActivationFrame::GetAsyncCompleterAwaiter(const Object& completer) {
-  Instance& future = Instance::Handle();
-  if (FLAG_sync_async) {
-    const Class& completer_cls = Class::Handle(completer.clazz());
-    ASSERT(!completer_cls.IsNull());
-    const Function& future_getter = Function::Handle(
-        completer_cls.LookupGetterFunction(Symbols::CompleterFuture()));
-    ASSERT(!future_getter.IsNull());
-    const Array& args = Array::Handle(Array::New(1));
-    args.SetAt(0, Instance::Cast(completer));
-    future ^= DartEntry::InvokeFunction(future_getter, args);
-  } else {
-    const Class& sync_completer_cls = Class::Handle(completer.clazz());
-    ASSERT(!sync_completer_cls.IsNull());
-    const Class& completer_cls = Class::Handle(sync_completer_cls.SuperClass());
-    const Field& future_field =
-        Field::Handle(completer_cls.LookupInstanceFieldAllowPrivate(
-            Symbols::CompleterFuture()));
-    ASSERT(!future_field.IsNull());
-    future ^= Instance::Cast(completer).GetField(future_field);
+  DEBUG_ASSERT(Thread::Current()->TopErrorHandlerIsExitFrame());
+
+  Object& future = Object::Handle();
+  const Class& completer_cls = Class::Handle(completer.clazz());
+  ASSERT(!completer_cls.IsNull());
+  const Function& future_getter = Function::Handle(
+      completer_cls.LookupGetterFunction(Symbols::CompleterFuture()));
+  ASSERT(!future_getter.IsNull());
+  const Array& args = Array::Handle(Array::New(1));
+  args.SetAt(0, Instance::Cast(completer));
+  future = DartEntry::InvokeFunction(future_getter, args);
+  if (future.IsError()) {
+    Exceptions::PropagateError(Error::Cast(future));
   }
   if (future.IsNull()) {
     // The completer object may not be fully initialized yet.
@@ -761,7 +757,7 @@
   const Field& awaiter_field = Field::Handle(
       future_cls.LookupInstanceFieldAllowPrivate(Symbols::_Awaiter()));
   ASSERT(!awaiter_field.IsNull());
-  return future.GetField(awaiter_field);
+  return Instance::Cast(future).GetField(awaiter_field);
 }
 
 RawObject* ActivationFrame::GetAsyncStreamControllerStream() {
@@ -827,14 +823,11 @@
         ASSERT(!type.IsNull());
         // Uninstantiated types are not added to ExceptionHandlers data.
         ASSERT(type.IsInstantiated());
-        if (type.IsMalformed()) {
-          continue;
-        }
         if (type.IsDynamicType()) {
           return true;
         }
         if (exc_obj.IsInstanceOf(type, Object::null_type_arguments(),
-                                 Object::null_type_arguments(), NULL)) {
+                                 Object::null_type_arguments())) {
           return true;
         }
       }
@@ -1225,12 +1218,18 @@
 
 RawObject* ActivationFrame::GetContextVar(intptr_t var_ctx_level,
                                           intptr_t ctx_slot) {
-  const Context& ctx = GetSavedCurrentContext();
-  ASSERT(!ctx.IsNull());
-
   // The context level at the PC/token index of this activation frame.
   intptr_t frame_ctx_level = ContextLevel();
 
+  return GetRelativeContextVar(var_ctx_level, ctx_slot, frame_ctx_level);
+}
+
+RawObject* ActivationFrame::GetRelativeContextVar(intptr_t var_ctx_level,
+                                                  intptr_t ctx_slot,
+                                                  intptr_t frame_ctx_level) {
+  const Context& ctx = GetSavedCurrentContext();
+  ASSERT(!ctx.IsNull());
+
   intptr_t level_diff = frame_ctx_level - var_ctx_level;
   if (level_diff == 0) {
     if ((ctx_slot < 0) || (ctx_slot >= ctx.num_variables())) {
@@ -2105,20 +2104,16 @@
             // Grab the awaiter.
             async_activation ^= activation->GetAsyncAwaiter();
             found_async_awaiter = true;
-            if (FLAG_sync_async) {
-              // async function might have been called synchronously, in which
-              // case we need to keep going down the stack.
-              // To determine how we are called we peek few more frames further
-              // expecting to see Closure_call followed by
-              // AsyncAwaitCompleter_start.
-              // If we are able to see those functions we continue going down
-              // thestack, if we are not, we break out of the loop as we are
-              // not interested in exploring rest of the stack - there is only
-              // dart-internal code left.
-              skip_sync_async_frames_count = 2;
-            } else {
-              break;
-            }
+            // async function might have been called synchronously, in which
+            // case we need to keep going down the stack.
+            // To determine how we are called we peek few more frames further
+            // expecting to see Closure_call followed by
+            // AsyncAwaitCompleter_start.
+            // If we are able to see those functions we continue going down
+            // thestack, if we are not, we break out of the loop as we are
+            // not interested in exploring rest of the stack - there is only
+            // dart-internal code left.
+            skip_sync_async_frames_count = 2;
           } else {
             stack_trace->AddActivation(
                 CollectDartFrame(isolate, it.pc(), frame, inlined_code,
@@ -2138,7 +2133,7 @@
           if (CheckAndSkipAsync(skip_sync_async_frames_count, function_name)) {
             skip_sync_async_frames_count--;
           } else {
-            // Unexpected function in sync async call.
+            // Unexpected function in synchronous call of async function.
             break;
           }
         }
@@ -2153,12 +2148,9 @@
           // Grab the awaiter.
           async_activation ^= activation->GetAsyncAwaiter();
           async_stack_trace ^= activation->GetCausalStack();
-          if (FLAG_sync_async) {
-            // see comment regarding skipping sync-async frames above.
-            skip_sync_async_frames_count = 2;
-          } else {
-            break;
-          }
+          // see comment regarding skipping frames of async functions called
+          // synchronously above.
+          skip_sync_async_frames_count = 2;
         } else {
           stack_trace->AddActivation(CollectDartFrame(
               isolate, frame->pc(), frame, code, Object::null_array(), 0));
@@ -3645,9 +3637,7 @@
   ClearCachedStackTraces();
 
   // If any error occurred while in the debug message loop, return it here.
-  const Error& error = Error::Handle(Thread::Current()->sticky_error());
-  Thread::Current()->clear_sticky_error();
-  return error.raw();
+  return Thread::Current()->StealStickyError();
 }
 
 RawError* Debugger::PauseBreakpoint() {
@@ -3717,9 +3707,7 @@
   ClearCachedStackTraces();
 
   // If any error occurred while in the debug message loop, return it here.
-  const Error& error = Error::Handle(Thread::Current()->sticky_error());
-  Thread::Current()->clear_sticky_error();
-  return error.raw();
+  return Thread::Current()->StealStickyError();
 }
 
 Breakpoint* Debugger::FindHitBreakpoint(BreakpointLocation* location,
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 63db376..3e1a0c0 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -390,6 +390,9 @@
   }
 
   RawObject* GetStackVar(VariableIndex var_index);
+  RawObject* GetRelativeContextVar(intptr_t ctxt_level,
+                                   intptr_t slot_index,
+                                   intptr_t frame_ctx_level);
   RawObject* GetContextVar(intptr_t ctxt_level, intptr_t slot_index);
 
   uword pc_;
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 7015a75..0f499e1 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -184,6 +184,7 @@
 }
 
 void DeoptContext::VisitObjectPointers(ObjectPointerVisitor* visitor) {
+  visitor->VisitPointer(reinterpret_cast<RawObject**>(&code_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&object_pool_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&deopt_info_));
 
diff --git a/runtime/vm/deopt_instructions.h b/runtime/vm/deopt_instructions.h
index e2096b6..9270768 100644
--- a/runtime/vm/deopt_instructions.h
+++ b/runtime/vm/deopt_instructions.h
@@ -97,9 +97,9 @@
 
   double FpuRegisterValue(FpuRegister reg) const {
     ASSERT(FlowGraphCompiler::SupportsUnboxedDoubles());
+#if !defined(TARGET_ARCH_DBC)
     ASSERT(fpu_registers_ != NULL);
     ASSERT(reg >= 0);
-#if !defined(TARGET_ARCH_DBC)
     ASSERT(reg < kNumberOfFpuRegisters);
     return *reinterpret_cast<double*>(&fpu_registers_[reg]);
 #else
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 7a857cc..2783bd7 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -21,7 +21,6 @@
 #include "vm/stack_frame.h"
 #include "vm/stub_code.h"
 #include "vm/symbols.h"
-#include "vm/tags.h"
 
 namespace dart {
 
@@ -249,7 +248,7 @@
       switch (move.source_kind()) {
         case CatchEntryMove::SourceKind::kConstant:
           if (pool == nullptr) {
-            pool = &ObjectPool::Handle(code_->object_pool());
+            pool = &ObjectPool::Handle(code_->GetObjectPool());
           }
           value = pool->ObjectAt(move.src_slot());
           break;
@@ -619,10 +618,12 @@
   return GetStackTraceForException();
 }
 
+DART_NORETURN
 static void ThrowExceptionHelper(Thread* thread,
                                  const Instance& incoming_exception,
                                  const Instance& existing_stacktrace,
                                  const bool is_rethrow) {
+  DEBUG_ASSERT(thread->TopErrorHandlerIsExitFrame());
   Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
   bool use_preallocated_stacktrace = false;
@@ -752,18 +753,14 @@
 void Exceptions::CreateAndThrowTypeError(TokenPosition location,
                                          const AbstractType& src_type,
                                          const AbstractType& dst_type,
-                                         const String& dst_name,
-                                         const String& bound_error_msg) {
+                                         const String& dst_name) {
   ASSERT(!dst_name.IsNull());  // Pass Symbols::Empty() instead.
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   const Array& args = Array::Handle(zone, Array::New(4));
 
   ExceptionType exception_type =
-      (bound_error_msg.IsNull() &&
-       (dst_name.raw() == Symbols::InTypeCast().raw()))
-          ? kCast
-          : kType;
+      (dst_name.raw() == Symbols::InTypeCast().raw()) ? kCast : kType;
 
   DartFrameIterator iterator(thread,
                              StackFrameIterator::kNoCrossThreadIteration);
@@ -787,51 +784,38 @@
   const GrowableObjectArray& pieces =
       GrowableObjectArray::Handle(zone, GrowableObjectArray::New(20));
 
-  // Print bound error first, if any.
-  if (!bound_error_msg.IsNull() && (bound_error_msg.Length() > 0)) {
-    pieces.Add(bound_error_msg);
-    pieces.Add(Symbols::NewLine());
-  }
-
   // If dst_type is malformed or malbounded, only print the embedded error.
   if (!dst_type.IsNull()) {
-    const LanguageError& error = LanguageError::Handle(zone, dst_type.error());
-    if (!error.IsNull()) {
-      // Print the embedded error only.
-      pieces.Add(String::Handle(zone, String::New(error.ToErrorCString())));
-      pieces.Add(Symbols::NewLine());
-    } else {
-      // Describe the type error.
-      if (!src_type.IsNull()) {
-        pieces.Add(Symbols::TypeQuote());
-        pieces.Add(String::Handle(zone, src_type.UserVisibleName()));
-        pieces.Add(Symbols::QuoteIsNotASubtypeOf());
-      }
+    // Describe the type error.
+    if (!src_type.IsNull()) {
       pieces.Add(Symbols::TypeQuote());
-      pieces.Add(String::Handle(zone, dst_type.UserVisibleName()));
+      pieces.Add(String::Handle(zone, src_type.UserVisibleName()));
+      pieces.Add(Symbols::QuoteIsNotASubtypeOf());
+    }
+    pieces.Add(Symbols::TypeQuote());
+    pieces.Add(String::Handle(zone, dst_type.UserVisibleName()));
+    pieces.Add(Symbols::SingleQuote());
+    if (exception_type == kCast) {
+      pieces.Add(dst_name);
+    } else if (dst_name.Length() > 0) {
+      pieces.Add(Symbols::SpaceOfSpace());
       pieces.Add(Symbols::SingleQuote());
-      if (exception_type == kCast) {
-        pieces.Add(dst_name);
-      } else if (dst_name.Length() > 0) {
-        pieces.Add(Symbols::SpaceOfSpace());
-        pieces.Add(Symbols::SingleQuote());
-        pieces.Add(dst_name);
-        pieces.Add(Symbols::SingleQuote());
-      }
-      // Print ambiguous URIs of src and dst types.
-      URIs uris(zone, 12);
-      if (!src_type.IsNull()) {
-        src_type.EnumerateURIs(&uris);
-      }
-      if (!dst_type.IsDynamicType() && !dst_type.IsVoidType()) {
-        dst_type.EnumerateURIs(&uris);
-      }
-      const String& formatted_uris =
-          String::Handle(zone, AbstractType::PrintURIs(&uris));
-      if (formatted_uris.Length() > 0) {
-        pieces.Add(Symbols::SpaceWhereNewLine());
-        pieces.Add(formatted_uris);
-      }
+      pieces.Add(dst_name);
+      pieces.Add(Symbols::SingleQuote());
+    }
+    // Print ambiguous URIs of src and dst types.
+    URIs uris(zone, 12);
+    if (!src_type.IsNull()) {
+      src_type.EnumerateURIs(&uris);
+    }
+    if (!dst_type.IsDynamicType() && !dst_type.IsVoidType()) {
+      dst_type.EnumerateURIs(&uris);
+    }
+    const String& formatted_uris =
+        String::Handle(zone, AbstractType::PrintURIs(&uris));
+    if (formatted_uris.Length() > 0) {
+      pieces.Add(Symbols::SpaceWhereNewLine());
+      pieces.Add(formatted_uris);
     }
   }
   const Array& arr = Array::Handle(zone, Array::MakeFixedLength(pieces));
@@ -875,9 +859,10 @@
 }
 
 void Exceptions::PropagateError(const Error& error) {
+  ASSERT(!error.IsNull());
   Thread* thread = Thread::Current();
+  DEBUG_ASSERT(thread->TopErrorHandlerIsExitFrame());
   Zone* zone = thread->zone();
-  ASSERT(thread->top_exit_frame_info() != 0);
   if (error.IsUnhandledException()) {
     // If the error object represents an unhandled exception, then
     // rethrow the exception in the normal fashion.
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index b681b0f..d43201f 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -30,14 +30,14 @@
 
 class Exceptions : AllStatic {
  public:
-  static void Throw(Thread* thread, const Instance& exception);
-  static void ReThrow(Thread* thread,
-                      const Instance& exception,
-                      const Instance& stacktrace);
-  static void PropagateError(const Error& error);
+  DART_NORETURN static void Throw(Thread* thread, const Instance& exception);
+  DART_NORETURN static void ReThrow(Thread* thread,
+                                    const Instance& exception,
+                                    const Instance& stacktrace);
+  DART_NORETURN static void PropagateError(const Error& error);
 
   // Propagate an error to the entry frame, skipping over Dart frames.
-  static void PropagateToEntry(const Error& error);
+  DART_NORETURN static void PropagateToEntry(const Error& error);
 
   // Helpers to create and throw errors.
   static RawStackTrace* CurrentStackTrace();
@@ -46,8 +46,7 @@
   static void CreateAndThrowTypeError(TokenPosition location,
                                       const AbstractType& src_type,
                                       const AbstractType& dst_type,
-                                      const String& dst_name,
-                                      const String& bound_error_msg);
+                                      const String& dst_name);
 
   enum ExceptionType {
     kNone,
@@ -72,28 +71,29 @@
     kCompileTimeError,
   };
 
-  static void ThrowByType(ExceptionType type, const Array& arguments);
+  DART_NORETURN static void ThrowByType(ExceptionType type,
+                                        const Array& arguments);
   // Uses the preallocated out of memory exception to avoid calling
   // into Dart code or allocating any code.
-  static void ThrowOOM();
-  static void ThrowStackOverflow();
-  static void ThrowArgumentError(const Instance& arg);
-  static void ThrowRangeError(const char* argument_name,
-                              const Integer& argument_value,
-                              intptr_t expected_from,
-                              intptr_t expected_to);
-  static void ThrowRangeErrorMsg(const char* msg);
-  static void ThrowCompileTimeError(const LanguageError& error);
+  DART_NORETURN static void ThrowOOM();
+  DART_NORETURN static void ThrowStackOverflow();
+  DART_NORETURN static void ThrowArgumentError(const Instance& arg);
+  DART_NORETURN static void ThrowRangeError(const char* argument_name,
+                                            const Integer& argument_value,
+                                            intptr_t expected_from,
+                                            intptr_t expected_to);
+  DART_NORETURN static void ThrowRangeErrorMsg(const char* msg);
+  DART_NORETURN static void ThrowCompileTimeError(const LanguageError& error);
 
   // Returns a RawInstance if the exception is successfully created,
   // otherwise returns a RawError.
   static RawObject* Create(ExceptionType type, const Array& arguments);
 
-  static void JumpToFrame(Thread* thread,
-                          uword program_counter,
-                          uword stack_pointer,
-                          uword frame_pointer,
-                          bool clear_deopt_at_target);
+  DART_NORETURN static void JumpToFrame(Thread* thread,
+                                        uword program_counter,
+                                        uword stack_pointer,
+                                        uword frame_pointer,
+                                        bool clear_deopt_at_target);
 
  private:
   DISALLOW_COPY_AND_ASSIGN(Exceptions);
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index 4fb3c06..d11e203 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -156,7 +156,7 @@
   P(reorder_basic_blocks, bool, true, "Reorder basic blocks")                  \
   C(stress_async_stacks, false, false, bool, false,                            \
     "Stress test async stack traces")                                          \
-  P(sync_async, bool, true, "Start `async` functions synchronously.")          \
+  P(use_bare_instructions, bool, false, "Enable bare instructions mode.")      \
   R(support_disassembler, false, bool, true, "Support the disassembler.")      \
   R(support_il_printer, false, bool, true, "Support the IL printer.")          \
   C(support_reload, false, false, bool, true, "Support isolate reload.")       \
@@ -188,7 +188,7 @@
   D(trace_zones, bool, false, "Traces allocation sizes in the zone.")          \
   P(truncating_left_shift, bool, true,                                         \
     "Optimize left shift to truncate if possible")                             \
-  C(use_bytecode_compiler, false, false, bool, false, "Compile from bytecode") \
+  P(use_bytecode_compiler, bool, false, "Compile from bytecode")               \
   P(use_compactor, bool, false, "Compact the heap during old-space GC.")       \
   P(use_cha_deopt, bool, true,                                                 \
     "Use class hierarchy analysis even if it can cause deoptimization.")       \
diff --git a/runtime/vm/hash_map.h b/runtime/vm/hash_map.h
index 95194aa..0a2b76c 100644
--- a/runtime/vm/hash_map.h
+++ b/runtime/vm/hash_map.h
@@ -27,6 +27,8 @@
 
   BaseDirectChainedHashMap(const BaseDirectChainedHashMap& other);
 
+  intptr_t Length() const { return count_; }
+
   virtual ~BaseDirectChainedHashMap() {
     allocator_->template Free<HashMapListElement>(array_, array_size_);
     allocator_->template Free<HashMapListElement>(lists_, lists_size_);
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index 96b0eec..a9c9e5d 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -395,7 +395,8 @@
   ASSERT((reason != kOldSpace) && (reason != kPromotion));
   if (BeginNewSpaceGC(thread)) {
     RecordBeforeGC(kScavenge, reason);
-    VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId);
+    VMTagScope tagScope(thread, reason == kIdle ? VMTag::kGCIdleTagId
+                                                : VMTag::kGCNewSpaceTagId);
     TIMELINE_FUNCTION_GC_DURATION(thread, "EvacuateNewGeneration");
     new_space_.Evacuate();
     RecordAfterGC(kScavenge);
@@ -410,7 +411,8 @@
   if (BeginNewSpaceGC(thread)) {
     RecordBeforeGC(kScavenge, reason);
     {
-      VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId);
+      VMTagScope tagScope(thread, reason == kIdle ? VMTag::kGCIdleTagId
+                                                  : VMTag::kGCNewSpaceTagId);
       TIMELINE_FUNCTION_GC_DURATION_BASIC(thread, "CollectNewGeneration");
       new_space_.Scavenge();
       RecordAfterGC(kScavenge);
@@ -438,7 +440,8 @@
   }
   if (BeginOldSpaceGC(thread)) {
     RecordBeforeGC(type, reason);
-    VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId);
+    VMTagScope tagScope(thread, reason == kIdle ? VMTag::kGCIdleTagId
+                                                : VMTag::kGCOldSpaceTagId);
     TIMELINE_FUNCTION_GC_DURATION_BASIC(thread, "CollectOldGeneration");
     old_space_.CollectGarbage(type == kMarkCompact, true /* finish */);
     RecordAfterGC(type);
@@ -977,6 +980,15 @@
   }
 }
 
+WritableCodePages::WritableCodePages(Thread* thread, Isolate* isolate)
+    : StackResource(thread), isolate_(isolate) {
+  isolate_->heap()->WriteProtectCode(false);
+}
+
+WritableCodePages::~WritableCodePages() {
+  isolate_->heap()->WriteProtectCode(true);
+}
+
 BumpAllocateScope::BumpAllocateScope(Thread* thread)
     : StackResource(thread), no_reload_scope_(thread->isolate(), thread) {
   ASSERT(!thread->bump_allocate());
diff --git a/runtime/vm/heap/heap.h b/runtime/vm/heap/heap.h
index 04739b0..8cedd89 100644
--- a/runtime/vm/heap/heap.h
+++ b/runtime/vm/heap/heap.h
@@ -426,13 +426,23 @@
   DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope);
 };
 
-// Note: During this scope, the code pages are non-executable.
+// Note: During this scope all pages are writable and the code pages are
+// non-executable.
 class WritableVMIsolateScope : StackResource {
  public:
   explicit WritableVMIsolateScope(Thread* thread);
   ~WritableVMIsolateScope();
 };
 
+class WritableCodePages : StackResource {
+ public:
+  explicit WritableCodePages(Thread* thread, Isolate* isolate);
+  ~WritableCodePages();
+
+ private:
+  Isolate* isolate_;
+};
+
 // This scope forces heap growth, forces use of the bump allocator, and
 // takes the page lock. It is useful e.g. at program startup when allocating
 // many objects into old gen (like libraries, classes, and functions).
diff --git a/runtime/vm/heap/marker.cc b/runtime/vm/heap/marker.cc
index 7d5ac17..23fe586 100644
--- a/runtime/vm/heap/marker.cc
+++ b/runtime/vm/heap/marker.cc
@@ -172,6 +172,7 @@
   MarkingVisitorBase(Isolate* isolate,
                      PageSpace* page_space,
                      MarkingStack* marking_stack,
+                     MarkingStack* deferred_marking_stack,
                      SkippedCodeFunctions* skipped_code_functions)
       : ObjectPointerVisitor(isolate),
         thread_(Thread::Current()),
@@ -182,6 +183,7 @@
 #endif  // !PRODUCT
         page_space_(page_space),
         work_list_(marking_stack),
+        deferred_work_list_(deferred_marking_stack),
         delayed_weak_properties_(NULL),
         skipped_code_functions_(skipped_code_functions),
         marked_bytes_(0),
@@ -315,19 +317,21 @@
   }
 
   void FinalizeInstructions() {
-    while (!delayed_instructions_.is_empty()) {
-      RawInstructions* instr = delayed_instructions_.RemoveLast();
+    RawObject* raw_obj;
+    while ((raw_obj = deferred_work_list_.Pop()) != NULL) {
+      ASSERT(raw_obj->IsInstructions());
+      RawInstructions* instr = static_cast<RawInstructions*>(raw_obj);
       if (TryAcquireMarkBit(instr)) {
         intptr_t size = instr->Size();
         marked_bytes_ += size;
         NOT_IN_PRODUCT(UpdateLiveOld(kInstructionsCid, size));
       }
     }
+    deferred_work_list_.Finalize();
   }
 
   // Called when all marking is complete.
   void Finalize() {
-    ASSERT(delayed_instructions_.is_empty());
     work_list_.Finalize();
     // Detach code from functions.
     if (skipped_code_functions_ != NULL) {
@@ -348,7 +352,10 @@
     }
   }
 
-  void AbandonWork() { work_list_.AbandonWork(); }
+  void AbandonWork() {
+    work_list_.AbandonWork();
+    deferred_work_list_.AbandonWork();
+  }
 
  private:
   void PushMarked(RawObject* raw_obj) {
@@ -387,7 +394,7 @@
     if (sync && UNLIKELY(class_id == kInstructionsCid)) {
       // If this is the concurrent marker, instruction pages may be
       // non-writable.
-      delayed_instructions_.Add(static_cast<RawInstructions*>(raw_obj));
+      deferred_work_list_.Push(raw_obj);
       return;
     }
 
@@ -415,8 +422,8 @@
 #endif  // !PRODUCT
   PageSpace* page_space_;
   MarkerWorkList work_list_;
+  MarkerWorkList deferred_work_list_;
   RawWeakProperty* delayed_weak_properties_;
-  MallocGrowableArray<RawInstructions*> delayed_instructions_;
   SkippedCodeFunctions* skipped_code_functions_;
   uintptr_t marked_bytes_;
   int64_t marked_micros_;
@@ -472,6 +479,15 @@
 
 void GCMarker::Prologue() {
   isolate_->ReleaseStoreBuffers();
+
+#ifndef DART_PRECOMPILED_RUNTIME
+  if (isolate_->IsMutatorThreadScheduled()) {
+    Interpreter* interpreter = isolate_->mutator_thread()->interpreter();
+    if (interpreter != NULL) {
+      interpreter->MajorGC();
+    }
+  }
+#endif
 }
 
 void GCMarker::Epilogue() {
@@ -837,7 +853,7 @@
 }
 
 void GCMarker::StartConcurrentMark(PageSpace* page_space, bool collect_code) {
-  isolate_->EnableIncrementalBarrier(&marking_stack_);
+  isolate_->EnableIncrementalBarrier(&marking_stack_, &deferred_marking_stack_);
 
   const intptr_t num_tasks = FLAG_marker_tasks;
 
@@ -860,6 +876,7 @@
     SkippedCodeFunctions* skipped_code_functions =
         collect_code ? new SkippedCodeFunctions() : NULL;
     visitors_[i] = new SyncMarkingVisitor(isolate_, page_space, &marking_stack_,
+                                          &deferred_marking_stack_,
                                           skipped_code_functions);
 
     // Begin marking on a helper thread.
@@ -892,6 +909,7 @@
       SkippedCodeFunctions* skipped_code_functions =
           collect_code ? new SkippedCodeFunctions() : NULL;
       UnsyncMarkingVisitor mark(isolate_, page_space, &marking_stack_,
+                                &deferred_marking_stack_,
                                 skipped_code_functions);
       IterateRoots(&mark, 0, 1);
       mark.DrainMarkingStack();
@@ -920,7 +938,8 @@
           SkippedCodeFunctions* skipped_code_functions =
               collect_code ? new SkippedCodeFunctions() : NULL;
           visitor = new SyncMarkingVisitor(
-              isolate_, page_space, &marking_stack_, skipped_code_functions);
+              isolate_, page_space, &marking_stack_, &deferred_marking_stack_,
+              skipped_code_functions);
         }
 
         MarkTask* mark_task =
diff --git a/runtime/vm/heap/marker.h b/runtime/vm/heap/marker.h
index 10fde88..a4424cf 100644
--- a/runtime/vm/heap/marker.h
+++ b/runtime/vm/heap/marker.h
@@ -63,6 +63,7 @@
   Isolate* const isolate_;
   Heap* const heap_;
   MarkingStack marking_stack_;
+  MarkingStack deferred_marking_stack_;
   MarkingVisitorBase<true>** visitors_;
 
   Mutex stats_mutex_;
diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc
index 90ac254..d90c9ec 100644
--- a/runtime/vm/heap/pages.cc
+++ b/runtime/vm/heap/pages.cc
@@ -260,7 +260,8 @@
       marker_(NULL),
       gc_time_micros_(0),
       collections_(0),
-      mark_words_per_micro_(kConservativeInitialMarkSpeed) {
+      mark_words_per_micro_(kConservativeInitialMarkSpeed),
+      enable_concurrent_mark_(FLAG_concurrent_mark) {
   // We aren't holding the lock but no one can reference us yet.
   UpdateMaxCapacityLocked();
   UpdateMaxUsed();
@@ -289,6 +290,13 @@
 }
 
 HeapPage* PageSpace::AllocatePage(HeapPage::PageType type, bool link) {
+  {
+    MutexLocker ml(pages_lock_);
+    if (!CanIncreaseCapacityInWordsLocked(kPageSizeInWords)) {
+      return NULL;
+    }
+    IncreaseCapacityInWordsLocked(kPageSizeInWords);
+  }
   const bool is_exec = (type == HeapPage::kExecutable);
   const intptr_t kVmNameSize = 128;
   char vm_name[kVmNameSize];
@@ -297,6 +305,7 @@
   HeapPage* page = HeapPage::Allocate(kPageSizeInWords, type, vm_name);
   if (page == NULL) {
     RELEASE_ASSERT(!FLAG_abort_on_oom);
+    IncreaseCapacityInWords(-kPageSizeInWords);
     return NULL;
   }
 
@@ -329,25 +338,31 @@
     }
   }
 
-  IncreaseCapacityInWordsLocked(kPageSizeInWords);
   page->set_object_end(page->memory_->end());
   return page;
 }
 
 HeapPage* PageSpace::AllocateLargePage(intptr_t size, HeapPage::PageType type) {
-  const bool is_exec = (type == HeapPage::kExecutable);
   const intptr_t page_size_in_words = LargePageSizeInWordsFor(size);
+  {
+    MutexLocker ml(pages_lock_);
+    if (!CanIncreaseCapacityInWordsLocked(page_size_in_words)) {
+      return NULL;
+    }
+    IncreaseCapacityInWordsLocked(page_size_in_words);
+  }
+  const bool is_exec = (type == HeapPage::kExecutable);
   const intptr_t kVmNameSize = 128;
   char vm_name[kVmNameSize];
   Heap::RegionName(heap_, is_exec ? Heap::kCode : Heap::kOld, vm_name,
                    kVmNameSize);
   HeapPage* page = HeapPage::Allocate(page_size_in_words, type, vm_name);
   if (page == NULL) {
+    IncreaseCapacityInWords(-page_size_in_words);
     return NULL;
   }
   page->set_next(large_pages_);
   large_pages_ = page;
-  IncreaseCapacityInWords(page_size_in_words);
   // Only one object in this page (at least until String::MakeExternal or
   // Array::MakeFixedLength is called).
   page->set_object_end(page->object_start() + size);
@@ -441,9 +456,8 @@
   after_allocation.used_in_words += size >> kWordSizeLog2;
   // Can we grow by one page?
   after_allocation.capacity_in_words += kPageSizeInWords;
-  if ((growth_policy == kForceGrowth ||
-       !page_space_controller_.NeedsGarbageCollection(after_allocation)) &&
-      CanIncreaseCapacityInWords(kPageSizeInWords)) {
+  if (growth_policy == kForceGrowth ||
+      !page_space_controller_.NeedsGarbageCollection(after_allocation)) {
     HeapPage* page = AllocatePage(type);
     if (page == NULL) {
       return 0;
@@ -498,9 +512,8 @@
     SpaceUsage after_allocation = GetCurrentUsage();
     after_allocation.used_in_words += size >> kWordSizeLog2;
     after_allocation.capacity_in_words += page_size_in_words;
-    if ((growth_policy == kForceGrowth ||
-         !page_space_controller_.NeedsGarbageCollection(after_allocation)) &&
-        CanIncreaseCapacityInWords(page_size_in_words)) {
+    if (growth_policy == kForceGrowth ||
+        !page_space_controller_.NeedsGarbageCollection(after_allocation)) {
       HeapPage* page = AllocateLargePage(size, type);
       if (page != NULL) {
         result = page->object_start();
@@ -1005,9 +1018,8 @@
 #if defined(TARGET_ARCH_IA32)
     return;  // Barrier not implemented.
 #else
-    if (!FLAG_concurrent_mark) return;    // Disabled.
+    if (!enable_concurrent_mark()) return;  // Disabled.
     if (FLAG_marker_tasks == 0) return;   // Disabled.
-    if (FLAG_write_protect_code) return;  // Not implemented.
 #endif
   }
 
@@ -1393,7 +1405,7 @@
   if (heap_growth_ratio_ == 100) {
     return false;
   }
-#if defined(TARGET_ARCH_IA32) || !defined(CONCURRENT_MARKING)
+#if defined(TARGET_ARCH_IA32)
   intptr_t headroom = 0;
 #else
   intptr_t headroom = heap_->new_space()->CapacityInWords();
diff --git a/runtime/vm/heap/pages.h b/runtime/vm/heap/pages.h
index 4f93e24..7829cc0 100644
--- a/runtime/vm/heap/pages.h
+++ b/runtime/vm/heap/pages.h
@@ -403,6 +403,11 @@
   // Have threads release marking stack blocks, etc.
   void AbandonMarkingForShutdown();
 
+  bool enable_concurrent_mark() const { return enable_concurrent_mark_; }
+  void set_enable_concurrent_mark(bool enable_concurrent_mark) {
+    enable_concurrent_mark_ = enable_concurrent_mark;
+  }
+
  private:
   // Ids for time and data records in Heap::GCStats.
   enum {
@@ -453,16 +458,13 @@
 
   static intptr_t LargePageSizeInWordsFor(intptr_t size);
 
-  bool CanIncreaseCapacityInWords(intptr_t increase_in_words) {
+  bool CanIncreaseCapacityInWordsLocked(intptr_t increase_in_words) {
     if (max_capacity_in_words_ == 0) {
       // Unlimited.
       return true;
     }
-    // TODO(issue 27413): Make the check against capacity and the bump
-    // of capacity atomic so that CapacityInWords does not exceed
-    // max_capacity_in_words_.
     intptr_t free_capacity_in_words =
-        (max_capacity_in_words_ - CapacityInWords());
+        (max_capacity_in_words_ - usage_.capacity_in_words);
     return ((free_capacity_in_words > 0) &&
             (increase_in_words <= free_capacity_in_words));
   }
@@ -509,6 +511,8 @@
   intptr_t collections_;
   intptr_t mark_words_per_micro_;
 
+  bool enable_concurrent_mark_;
+
   friend class ExclusivePageIterator;
   friend class ExclusiveCodePageIterator;
   friend class ExclusiveLargePageIterator;
diff --git a/runtime/vm/image_snapshot.cc b/runtime/vm/image_snapshot.cc
index cd8ef90..9be1458 100644
--- a/runtime/vm/image_snapshot.cc
+++ b/runtime/vm/image_snapshot.cc
@@ -10,6 +10,7 @@
 #include "vm/hash.h"
 #include "vm/hash_map.h"
 #include "vm/heap/heap.h"
+#include "vm/instructions.h"
 #include "vm/json_writer.h"
 #include "vm/object.h"
 #include "vm/object_store.h"
@@ -93,6 +94,30 @@
   SetupShared(&reuse_instructions_, reused_instructions);
 }
 
+void ImageWriter::PrepareForSerialization(
+    GrowableArray<ImageWriterCommand>* commands) {
+  if (commands != nullptr) {
+    const intptr_t initial_offset = next_text_offset_;
+    for (auto& inst : *commands) {
+      ASSERT((initial_offset + inst.expected_offset) == next_text_offset_);
+      switch (inst.op) {
+        case ImageWriterCommand::InsertInstructionOfCode: {
+          RawCode* code = inst.insert_instruction_of_code.code;
+          RawInstructions* instructions = Code::InstructionsOf(code);
+          const intptr_t offset = next_text_offset_;
+          instructions_.Add(InstructionsData(instructions, code, offset));
+          next_text_offset_ += instructions->Size();
+          ASSERT(heap_->GetObjectId(instructions) == 0);
+          heap_->SetObjectId(instructions, offset);
+          break;
+        }
+        default:
+          UNREACHABLE();
+      }
+    }
+  }
+}
+
 void ImageWriter::SetupShared(ObjectOffsetMap* map, const void* shared_image) {
   if (shared_image == NULL) {
     return;
@@ -136,11 +161,11 @@
     return -pair->offset;
   }
 
-  intptr_t heap_size = instructions->Size();
   offset = next_text_offset_;
   heap_->SetObjectId(instructions, offset);
-  next_text_offset_ += heap_size;
+  next_text_offset_ += instructions->Size();
   instructions_.Add(InstructionsData(instructions, code, offset));
+
   return offset;
 }
 
@@ -324,7 +349,7 @@
                                          void* callback_data,
                                          const void* shared_objects,
                                          const void* shared_instructions)
-    : ImageWriter(thread->heap(), shared_objects, shared_instructions, NULL),
+    : ImageWriter(thread->heap(), shared_objects, shared_instructions, nullptr),
       assembly_stream_(512 * KB, callback, callback_data),
       dwarf_(NULL) {
 #if defined(DART_PRECOMPILER)
@@ -379,12 +404,19 @@
   ObjectStore* object_store = Isolate::Current()->object_store();
 
   TypeTestingStubFinder tts;
-  intptr_t offset = Image::kHeaderSize;
+  intptr_t text_offset = 0;
+
   for (intptr_t i = 0; i < instructions_.length(); i++) {
-    const Instructions& insns = *instructions_[i].insns_;
-    const Code& code = *instructions_[i].code_;
+    auto& instr = instructions_[i];
+    ASSERT((instr.text_offset_ - instructions_[0].text_offset_) == text_offset);
+
+    const intptr_t instr_start = text_offset;
+
+    const Instructions& insns = *instr.insns_;
+    const Code& code = *instr.code_;
 
     if (profile_writer_ != nullptr) {
+      const intptr_t offset = Image::kHeaderSize + text_offset;
       ASSERT(offset_space_ != V8SnapshotProfileWriter::kSnapshot);
       profile_writer_->SetObjectTypeAndName({offset_space_, offset},
                                             "Instructions",
@@ -392,7 +424,6 @@
       profile_writer_->AttributeBytesTo({offset_space_, offset},
                                         insns.raw()->Size());
     }
-    offset += insns.raw()->Size();
 
     ASSERT(insns.raw()->Size() % sizeof(uint64_t) == 0);
 
@@ -419,8 +450,12 @@
 
       WriteWordLiteralText(marked_tags);
       beginning += sizeof(uword);
+      text_offset += sizeof(uword);
 
       WriteByteSequence(beginning, entry);
+      text_offset += (entry - beginning);
+
+      ASSERT((text_offset - instr_start) == insns.HeaderSize());
     }
 
     // 2. Write a label at the entry point.
@@ -468,10 +503,9 @@
     {
       // 3. Write from the entry point to the end.
       NoSafepointScope no_safepoint;
-      uword beginning = reinterpret_cast<uword>(insns.raw()) - kHeapObjectTag;
+      uword beginning = reinterpret_cast<uword>(insns.raw_ptr());
       uword entry = beginning + Instructions::HeaderSize();
-      uword payload_size = insns.Size();
-      payload_size = Utils::RoundUp(payload_size, OS::PreferredCodeAlignment());
+      uword payload_size = insns.raw()->Size() - insns.HeaderSize();
       uword end = entry + payload_size;
 
       ASSERT(Utils::IsAligned(beginning, sizeof(uword)));
@@ -479,7 +513,10 @@
       ASSERT(Utils::IsAligned(end, sizeof(uword)));
 
       WriteByteSequence(entry, end);
+      text_offset += (end - entry);
     }
+
+    ASSERT((text_offset - instr_start) == insns.raw()->Size());
   }
 
   FrameUnwindEpilogue();
@@ -612,11 +649,16 @@
     instructions_blob_stream_.WriteWord(0);
   }
 
+  intptr_t text_offset = 0;
+
   NoSafepointScope no_safepoint;
   for (intptr_t i = 0; i < instructions_.length(); i++) {
+    auto& instr = instructions_[i];
     const Instructions& insns = *instructions_[i].insns_;
     AutoTraceImage(insns, 0, &this->instructions_blob_stream_);
+    ASSERT((instr.text_offset_ - instructions_[0].text_offset_) == text_offset);
 
+    const intptr_t instr_start = text_offset;
     uword beginning = reinterpret_cast<uword>(insns.raw_ptr());
     uword entry = beginning + Instructions::HeaderSize();
     uword payload_size = insns.Size();
@@ -640,12 +682,16 @@
 #endif
 
     instructions_blob_stream_.WriteWord(marked_tags);
+    text_offset += sizeof(uword);
     beginning += sizeof(uword);
 
     for (uword* cursor = reinterpret_cast<uword*>(beginning);
          cursor < reinterpret_cast<uword*>(end); cursor++) {
       instructions_blob_stream_.WriteWord(*cursor);
+      text_offset += sizeof(uword);
     }
+
+    ASSERT((text_offset - instr_start) == insns.raw()->Size());
   }
 }
 
diff --git a/runtime/vm/image_snapshot.h b/runtime/vm/image_snapshot.h
index a56c87e..939a653 100644
--- a/runtime/vm/image_snapshot.h
+++ b/runtime/vm/image_snapshot.h
@@ -99,6 +99,35 @@
 
 typedef DirectChainedHashMap<ObjectOffsetTrait> ObjectOffsetMap;
 
+// A command which instructs the image writer to emit something into the ".text"
+// segment.
+//
+// For now this just supports emitting the instructions of a [Code] object.
+// In the future we might also want to add support for emitting trampolines.
+struct ImageWriterCommand {
+  enum Opcode {
+    InsertInstructionOfCode,
+  };
+
+  ImageWriterCommand(intptr_t expected_offset,
+                     ImageWriterCommand::Opcode opcode,
+                     RawCode* code)
+      : expected_offset(expected_offset),
+        op(opcode),
+        insert_instruction_of_code({code}) {}
+
+  // The offset (relative to the very first [ImageWriterCommand]) we expect
+  // this [ImageWriterCommand] to have.
+  intptr_t expected_offset;
+
+  Opcode op;
+  union {
+    struct {
+      RawCode* code;
+    } insert_instruction_of_code;
+  };
+};
+
 class ImageWriter : public ValueObject {
  public:
   ImageWriter(Heap* heap,
@@ -115,6 +144,10 @@
     instructions_.Clear();
   }
 
+  // Will start preparing the ".text" segment by interpreting the provided
+  // [ImageWriterCommand]s.
+  void PrepareForSerialization(GrowableArray<ImageWriterCommand>* commands);
+
   int32_t GetTextOffsetFor(RawInstructions* instructions, RawCode* code);
   bool GetSharedDataOffsetFor(RawObject* raw_object, uint32_t* offset);
   uint32_t GetDataOffsetFor(RawObject* raw_object);
@@ -141,10 +174,10 @@
   void DumpInstructionsSizes();
 
   struct InstructionsData {
-    explicit InstructionsData(RawInstructions* insns,
-                              RawCode* code,
-                              intptr_t offset)
-        : raw_insns_(insns), raw_code_(code), offset_(offset) {}
+    InstructionsData(RawInstructions* insns,
+                     RawCode* code,
+                     intptr_t text_offset)
+        : raw_insns_(insns), raw_code_(code), text_offset_(text_offset) {}
 
     union {
       RawInstructions* raw_insns_;
@@ -154,7 +187,7 @@
       RawCode* raw_code_;
       const Code* code_;
     };
-    intptr_t offset_;
+    intptr_t text_offset_;
   };
 
   struct ObjectData {
diff --git a/runtime/vm/instructions_arm.cc b/runtime/vm/instructions_arm.cc
index d7cc494..f9137ac 100644
--- a/runtime/vm/instructions_arm.cc
+++ b/runtime/vm/instructions_arm.cc
@@ -12,6 +12,7 @@
 #include "vm/constants_arm.h"
 #include "vm/cpu.h"
 #include "vm/object.h"
+#include "vm/reverse_pc_lookup_cache.h"
 
 namespace dart {
 
@@ -232,10 +233,22 @@
   object_pool_.SetObjectAt(target_code_pool_index_, target_code);
 }
 
-SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
+SwitchableCallPatternBase::SwitchableCallPatternBase(const Code& code)
     : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
       data_pool_index_(-1),
-      target_pool_index_(-1) {
+      target_pool_index_(-1) {}
+
+RawObject* SwitchableCallPatternBase::data() const {
+  return object_pool_.ObjectAt(data_pool_index_);
+}
+
+void SwitchableCallPatternBase::SetData(const Object& data) const {
+  ASSERT(!Object::Handle(object_pool_.ObjectAt(data_pool_index_)).IsCode());
+  object_pool_.SetObjectAt(data_pool_index_, data);
+}
+
+SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
+    : SwitchableCallPatternBase(code) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blx lr.
   ASSERT(*(reinterpret_cast<uword*>(pc) - 1) == 0xe12fff3e);
@@ -249,24 +262,49 @@
   ASSERT(reg == CODE_REG);
 }
 
-RawObject* SwitchableCallPattern::data() const {
-  return object_pool_.ObjectAt(data_pool_index_);
-}
-
 RawCode* SwitchableCallPattern::target() const {
   return reinterpret_cast<RawCode*>(object_pool_.ObjectAt(target_pool_index_));
 }
-
-void SwitchableCallPattern::SetData(const Object& data) const {
-  ASSERT(!Object::Handle(object_pool_.ObjectAt(data_pool_index_)).IsCode());
-  object_pool_.SetObjectAt(data_pool_index_, data);
-}
-
 void SwitchableCallPattern::SetTarget(const Code& target) const {
   ASSERT(Object::Handle(object_pool_.ObjectAt(target_pool_index_)).IsCode());
   object_pool_.SetObjectAt(target_pool_index_, target);
 }
 
+BareSwitchableCallPattern::BareSwitchableCallPattern(uword pc, const Code& code)
+    : SwitchableCallPatternBase(code) {
+  ASSERT(code.ContainsInstructionAt(pc));
+  // Last instruction: blx lr.
+  ASSERT(*(reinterpret_cast<uword*>(pc) - 1) == 0xe12fff3e);
+
+  Register reg;
+  uword data_load_end = InstructionPattern::DecodeLoadWordFromPool(
+      pc - Instr::kInstrSize, &reg, &data_pool_index_);
+  ASSERT(reg == R9);
+
+  InstructionPattern::DecodeLoadWordFromPool(data_load_end, &reg,
+                                             &target_pool_index_);
+  ASSERT(reg == LR);
+}
+
+RawCode* BareSwitchableCallPattern::target() const {
+  const uword pc = object_pool_.RawValueAt(target_pool_index_);
+  auto rct = Isolate::Current()->reverse_pc_lookup_cache();
+  if (rct->Contains(pc)) {
+    return rct->Lookup(pc);
+  }
+  rct = Dart::vm_isolate()->reverse_pc_lookup_cache();
+  if (rct->Contains(pc)) {
+    return rct->Lookup(pc);
+  }
+  UNREACHABLE();
+}
+
+void BareSwitchableCallPattern::SetTarget(const Code& target) const {
+  ASSERT(object_pool_.TypeAt(target_pool_index_) == ObjectPool::kImmediate);
+  object_pool_.SetRawValueAt(target_pool_index_,
+                             target.MonomorphicEntryPoint());
+}
+
 ReturnPattern::ReturnPattern(uword pc) : pc_(pc) {}
 
 bool ReturnPattern::IsValid() const {
diff --git a/runtime/vm/instructions_arm.h b/runtime/vm/instructions_arm.h
index ceb65e5..70a7636 100644
--- a/runtime/vm/instructions_arm.h
+++ b/runtime/vm/instructions_arm.h
@@ -97,23 +97,52 @@
 //   load guarded cid            load ICData             load MegamorphicCache
 //   load monomorphic target <-> load ICLookup stub  ->  load MMLookup stub
 //   call target.entry           call stub.entry         call stub.entry
-class SwitchableCallPattern : public ValueObject {
+class SwitchableCallPatternBase : public ValueObject {
  public:
-  SwitchableCallPattern(uword pc, const Code& code);
+  explicit SwitchableCallPatternBase(const Code& code);
 
   RawObject* data() const;
-  RawCode* target() const;
   void SetData(const Object& data) const;
-  void SetTarget(const Code& target) const;
 
- private:
+ protected:
   const ObjectPool& object_pool_;
   intptr_t data_pool_index_;
   intptr_t target_pool_index_;
 
+ private:
+  DISALLOW_COPY_AND_ASSIGN(SwitchableCallPatternBase);
+};
+
+// See [SwitchableCallBase] for a switchable calls in general.
+//
+// The target slot is always a [Code] object: Either the code of the
+// monomorphic function or a stub code.
+class SwitchableCallPattern : public SwitchableCallPatternBase {
+ public:
+  SwitchableCallPattern(uword pc, const Code& code);
+
+  RawCode* target() const;
+  void SetTarget(const Code& target) const;
+
+ private:
   DISALLOW_COPY_AND_ASSIGN(SwitchableCallPattern);
 };
 
+// See [SwitchableCallBase] for a switchable calls in general.
+//
+// The target slot is always a direct entrypoint address: Either the entry point
+// of the monomorphic function or a stub entry point.
+class BareSwitchableCallPattern : public SwitchableCallPatternBase {
+ public:
+  BareSwitchableCallPattern(uword pc, const Code& code);
+
+  RawCode* target() const;
+  void SetTarget(const Code& target) const;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(BareSwitchableCallPattern);
+};
+
 class ReturnPattern : public ValueObject {
  public:
   explicit ReturnPattern(uword pc);
diff --git a/runtime/vm/instructions_arm64.cc b/runtime/vm/instructions_arm64.cc
index 314ee86..2bf7c37 100644
--- a/runtime/vm/instructions_arm64.cc
+++ b/runtime/vm/instructions_arm64.cc
@@ -260,8 +260,7 @@
   Instr* ldr_instr = Instr::At(start);
 
   // Last instruction is always an ldp into two 64-bit X registers.
-  RELEASE_ASSERT(ldr_instr->IsLoadStoreRegPairOp() &&
-                 (ldr_instr->Bit(22) == 1));
+  ASSERT(ldr_instr->IsLoadStoreRegPairOp() && (ldr_instr->Bit(22) == 1));
 
   // Grab the destination register from the ldp instruction.
   *reg1 = ldr_instr->RtField();
@@ -276,30 +275,30 @@
     pool_offset = base_offset;
   } else {
     // Case 2 & 3.
-    RELEASE_ASSERT(base_reg == TMP);
+    ASSERT(base_reg == TMP);
 
     pool_offset = base_offset;
 
     start -= Instr::kInstrSize;
     Instr* add_instr = Instr::At(start);
-    RELEASE_ASSERT(add_instr->IsAddSubImmOp());
-    RELEASE_ASSERT(add_instr->RdField() == TMP);
+    ASSERT(add_instr->IsAddSubImmOp());
+    ASSERT(add_instr->RdField() == TMP);
 
     const auto shift = add_instr->Imm12ShiftField();
-    RELEASE_ASSERT(shift == 0 || shift == 1);
+    ASSERT(shift == 0 || shift == 1);
     pool_offset += (add_instr->Imm12Field() << (shift == 1 ? 12 : 0));
 
     if (add_instr->RnField() == TMP) {
       start -= Instr::kInstrSize;
       Instr* prev_add_instr = Instr::At(start);
-      RELEASE_ASSERT(prev_add_instr->IsAddSubImmOp());
-      RELEASE_ASSERT(prev_add_instr->RnField() == PP);
+      ASSERT(prev_add_instr->IsAddSubImmOp());
+      ASSERT(prev_add_instr->RnField() == PP);
 
       const auto shift = prev_add_instr->Imm12ShiftField();
-      RELEASE_ASSERT(shift == 0 || shift == 1);
+      ASSERT(shift == 0 || shift == 1);
       pool_offset += (prev_add_instr->Imm12Field() << (shift == 1 ? 12 : 0));
     } else {
-      RELEASE_ASSERT(add_instr->RnField() == PP);
+      ASSERT(add_instr->RnField() == PP);
     }
   }
   *index = ObjectPool::IndexFromOffset(pool_offset - kHeapObjectTag);
@@ -373,10 +372,22 @@
   // No need to flush the instruction cache, since the code is not modified.
 }
 
-SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
+SwitchableCallPatternBase::SwitchableCallPatternBase(const Code& code)
     : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
       data_pool_index_(-1),
-      target_pool_index_(-1) {
+      target_pool_index_(-1) {}
+
+RawObject* SwitchableCallPatternBase::data() const {
+  return object_pool_.ObjectAt(data_pool_index_);
+}
+
+void SwitchableCallPatternBase::SetData(const Object& data) const {
+  ASSERT(!Object::Handle(object_pool_.ObjectAt(data_pool_index_)).IsCode());
+  object_pool_.SetObjectAt(data_pool_index_, data);
+}
+
+SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
+    : SwitchableCallPatternBase(code) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blr ip0.
   ASSERT(*(reinterpret_cast<uint32_t*>(pc) - 1) == 0xd63f0200);
@@ -385,31 +396,58 @@
   intptr_t pool_index;
   InstructionPattern::DecodeLoadDoubleWordFromPool(
       pc - 2 * Instr::kInstrSize, &ic_data_reg, &code_reg, &pool_index);
-  RELEASE_ASSERT(ic_data_reg == R5);
-  RELEASE_ASSERT(code_reg == CODE_REG);
+  ASSERT(ic_data_reg == R5);
+  ASSERT(code_reg == CODE_REG);
 
   data_pool_index_ = pool_index;
   target_pool_index_ = pool_index + 1;
 }
 
-RawObject* SwitchableCallPattern::data() const {
-  return object_pool_.ObjectAt(data_pool_index_);
-}
-
 RawCode* SwitchableCallPattern::target() const {
   return reinterpret_cast<RawCode*>(object_pool_.ObjectAt(target_pool_index_));
 }
 
-void SwitchableCallPattern::SetData(const Object& data) const {
-  ASSERT(!Object::Handle(object_pool_.ObjectAt(data_pool_index_)).IsCode());
-  object_pool_.SetObjectAt(data_pool_index_, data);
-}
-
 void SwitchableCallPattern::SetTarget(const Code& target) const {
   ASSERT(Object::Handle(object_pool_.ObjectAt(target_pool_index_)).IsCode());
   object_pool_.SetObjectAt(target_pool_index_, target);
 }
 
+BareSwitchableCallPattern::BareSwitchableCallPattern(uword pc, const Code& code)
+    : SwitchableCallPatternBase(code) {
+  ASSERT(code.ContainsInstructionAt(pc));
+  // Last instruction: blr ip0.
+  ASSERT(*(reinterpret_cast<uint32_t*>(pc) - 1) == 0xd63f0200);
+
+  Register ic_data_reg, code_reg;
+  intptr_t pool_index;
+  InstructionPattern::DecodeLoadDoubleWordFromPool(
+      pc - Instr::kInstrSize, &ic_data_reg, &code_reg, &pool_index);
+  ASSERT(ic_data_reg == R5);
+  ASSERT(code_reg == TMP);
+
+  data_pool_index_ = pool_index;
+  target_pool_index_ = pool_index + 1;
+}
+
+RawCode* BareSwitchableCallPattern::target() const {
+  const uword pc = object_pool_.RawValueAt(target_pool_index_);
+  auto rct = Isolate::Current()->reverse_pc_lookup_cache();
+  if (rct->Contains(pc)) {
+    return rct->Lookup(pc);
+  }
+  rct = Dart::vm_isolate()->reverse_pc_lookup_cache();
+  if (rct->Contains(pc)) {
+    return rct->Lookup(pc);
+  }
+  UNREACHABLE();
+}
+
+void BareSwitchableCallPattern::SetTarget(const Code& target) const {
+  ASSERT(object_pool_.TypeAt(target_pool_index_) == ObjectPool::kImmediate);
+  object_pool_.SetRawValueAt(target_pool_index_,
+                             target.MonomorphicEntryPoint());
+}
+
 ReturnPattern::ReturnPattern(uword pc) : pc_(pc) {}
 
 bool ReturnPattern::IsValid() const {
diff --git a/runtime/vm/instructions_arm64.h b/runtime/vm/instructions_arm64.h
index 3107db6..18a8cc3 100644
--- a/runtime/vm/instructions_arm64.h
+++ b/runtime/vm/instructions_arm64.h
@@ -13,6 +13,7 @@
 #include "vm/constants_arm64.h"
 #include "vm/native_entry.h"
 #include "vm/object.h"
+#include "vm/reverse_pc_lookup_cache.h"
 
 namespace dart {
 
@@ -116,23 +117,52 @@
 //   load guarded cid            load ICData             load MegamorphicCache
 //   load monomorphic target <-> load ICLookup stub  ->  load MMLookup stub
 //   call target.entry           call stub.entry         call stub.entry
-class SwitchableCallPattern : public ValueObject {
+class SwitchableCallPatternBase : public ValueObject {
  public:
-  SwitchableCallPattern(uword pc, const Code& code);
+  explicit SwitchableCallPatternBase(const Code& code);
 
   RawObject* data() const;
-  RawCode* target() const;
   void SetData(const Object& data) const;
-  void SetTarget(const Code& target) const;
 
- private:
+ protected:
   const ObjectPool& object_pool_;
   intptr_t data_pool_index_;
   intptr_t target_pool_index_;
 
+ private:
+  DISALLOW_COPY_AND_ASSIGN(SwitchableCallPatternBase);
+};
+
+// See [SwitchableCallBase] for a switchable calls in general.
+//
+// The target slot is always a [Code] object: Either the code of the
+// monomorphic function or a stub code.
+class SwitchableCallPattern : public SwitchableCallPatternBase {
+ public:
+  SwitchableCallPattern(uword pc, const Code& code);
+
+  RawCode* target() const;
+  void SetTarget(const Code& target) const;
+
+ private:
   DISALLOW_COPY_AND_ASSIGN(SwitchableCallPattern);
 };
 
+// See [SwitchableCallBase] for a switchable calls in general.
+//
+// The target slot is always a direct entrypoint address: Either the entry point
+// of the monomorphic function or a stub entry point.
+class BareSwitchableCallPattern : public SwitchableCallPatternBase {
+ public:
+  BareSwitchableCallPattern(uword pc, const Code& code);
+
+  RawCode* target() const;
+  void SetTarget(const Code& target) const;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(BareSwitchableCallPattern);
+};
+
 class ReturnPattern : public ValueObject {
  public:
   explicit ReturnPattern(uword pc);
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index a921f60..1e1c0f1 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -117,6 +117,9 @@
                                : static_cast<intptr_t>(kSmiCid);
   }
 
+  // The usage counter is actually a 'hotness' counter.
+  // For an instance call, both the usage counters of the caller and of the
+  // calle will get incremented, as well as the ICdata counter at the call site.
   DART_FORCE_INLINE static void IncrementUsageCounter(RawFunction* f) {
     f->ptr()->usage_counter_++;
   }
@@ -131,38 +134,6 @@
     *reinterpret_cast<intptr_t*>(&entries[offset + count_offset]) = raw_smi_new;
   }
 
-  DART_FORCE_INLINE static bool IsStrictEqualWithNumberCheck(RawObject* lhs,
-                                                             RawObject* rhs) {
-    if (lhs == rhs) {
-      return true;
-    }
-
-    if (lhs->IsHeapObject() && rhs->IsHeapObject()) {
-      const intptr_t lhs_cid = lhs->GetClassId();
-      const intptr_t rhs_cid = rhs->GetClassId();
-      if (lhs_cid == rhs_cid) {
-        switch (lhs_cid) {
-          case kDoubleCid:
-            return (bit_cast<uint64_t, double>(
-                        static_cast<RawDouble*>(lhs)->ptr()->value_) ==
-                    bit_cast<uint64_t, double>(
-                        static_cast<RawDouble*>(rhs)->ptr()->value_));
-
-          case kMintCid:
-            return (static_cast<RawMint*>(lhs)->ptr()->value_ ==
-                    static_cast<RawMint*>(rhs)->ptr()->value_);
-        }
-      }
-    }
-
-    return false;
-  }
-
-  template <typename T>
-  DART_FORCE_INLINE static T* Untag(T* tagged) {
-    return tagged->ptr();
-  }
-
   DART_FORCE_INLINE static bool CheckIndex(RawSmi* index, RawSmi* length) {
     return !index->IsHeapObject() && (reinterpret_cast<intptr_t>(index) >= 0) &&
            (reinterpret_cast<intptr_t>(index) <
@@ -187,302 +158,10 @@
         Array::element_offset(ArgumentsDescriptor::kPositionalCountIndex)));
   }
 
-  static bool ObjectArraySetIndexed(Thread* thread,
-                                    RawObject** FP,
-                                    RawObject** result) {
-    return ObjectArraySetIndexedUnchecked(thread, FP, result);
-  }
-
-  static bool ObjectArraySetIndexedUnchecked(Thread* thread,
-                                             RawObject** FP,
-                                             RawObject** result) {
-    RawObject** args = FrameArguments(FP, 3);
-    RawSmi* index = static_cast<RawSmi*>(args[1]);
-    RawArray* array = static_cast<RawArray*>(args[0]);
-    if (CheckIndex(index, array->ptr()->length_)) {
-      array->StorePointer(array->ptr()->data() + Smi::Value(index), args[2],
-                          thread);
-      return true;
-    }
-    return false;
-  }
-
-  static bool ObjectArrayGetIndexed(Thread* thread,
-                                    RawObject** FP,
-                                    RawObject** result) {
-    RawObject** args = FrameArguments(FP, 2);
-    RawSmi* index = static_cast<RawSmi*>(args[1]);
-    RawArray* array = static_cast<RawArray*>(args[0]);
-    if (CheckIndex(index, array->ptr()->length_)) {
-      *result = array->ptr()->data()[Smi::Value(index)];
-      return true;
-    }
-    return false;
-  }
-
-  static bool GrowableArraySetIndexed(Thread* thread,
-                                      RawObject** FP,
-                                      RawObject** result) {
-    return GrowableArraySetIndexedUnchecked(thread, FP, result);
-  }
-
-  static bool GrowableArraySetIndexedUnchecked(Thread* thread,
-                                               RawObject** FP,
-                                               RawObject** result) {
-    RawObject** args = FrameArguments(FP, 3);
-    RawSmi* index = static_cast<RawSmi*>(args[1]);
-    RawGrowableObjectArray* array =
-        static_cast<RawGrowableObjectArray*>(args[0]);
-    if (CheckIndex(index, array->ptr()->length_)) {
-      RawArray* data = array->ptr()->data_;
-      data->StorePointer(data->ptr()->data() + Smi::Value(index), args[2],
-                         thread);
-      return true;
-    }
-    return false;
-  }
-
-  static bool GrowableArrayGetIndexed(Thread* thread,
-                                      RawObject** FP,
-                                      RawObject** result) {
-    RawObject** args = FrameArguments(FP, 2);
-    RawSmi* index = static_cast<RawSmi*>(args[1]);
-    RawGrowableObjectArray* array =
-        static_cast<RawGrowableObjectArray*>(args[0]);
-    if (CheckIndex(index, array->ptr()->length_)) {
-      *result = array->ptr()->data_->ptr()->data()[Smi::Value(index)];
-      return true;
-    }
-    return false;
-  }
-
-  static bool Double_getIsNan(Thread* thread,
-                              RawObject** FP,
-                              RawObject** result) {
-    RawObject** args = FrameArguments(FP, 1);
-    RawDouble* d = static_cast<RawDouble*>(args[0]);
-    *result =
-        isnan(d->ptr()->value_) ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool Double_getIsInfinite(Thread* thread,
-                                   RawObject** FP,
-                                   RawObject** result) {
-    RawObject** args = FrameArguments(FP, 1);
-    RawDouble* d = static_cast<RawDouble*>(args[0]);
-    *result =
-        isinf(d->ptr()->value_) ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool ObjectEquals(Thread* thread, RawObject** FP, RawObject** result) {
-    RawObject** args = FrameArguments(FP, 2);
-    *result = args[0] == args[1] ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool ObjectRuntimeType(Thread* thread,
-                                RawObject** FP,
-                                RawObject** result) {
-    RawObject** args = FrameArguments(FP, 1);
-    const intptr_t cid = GetClassId(args[0]);
-    if (cid == kClosureCid) {
-      return false;
-    }
-    if (cid < kNumPredefinedCids) {
-      if (cid == kDoubleCid) {
-        *result = thread->isolate()->object_store()->double_type();
-        return true;
-      } else if (RawObject::IsStringClassId(cid)) {
-        *result = thread->isolate()->object_store()->string_type();
-        return true;
-      } else if (RawObject::IsIntegerClassId(cid)) {
-        *result = thread->isolate()->object_store()->int_type();
-        return true;
-      }
-    }
-    RawClass* cls = thread->isolate()->class_table()->At(cid);
-    if (cls->ptr()->num_type_arguments_ != 0) {
-      return false;
-    }
-    RawType* typ = cls->ptr()->canonical_type_;
-    if (typ == Object::null()) {
-      return false;
-    }
-    *result = static_cast<RawObject*>(typ);
-    return true;
-  }
-
-  static bool GetDoubleOperands(RawObject** args, double* d1, double* d2) {
-    RawObject* obj2 = args[1];
-    if (!obj2->IsHeapObject()) {
-      *d2 =
-          static_cast<double>(reinterpret_cast<intptr_t>(obj2) >> kSmiTagSize);
-    } else if (obj2->GetClassId() == kDoubleCid) {
-      RawDouble* obj2d = static_cast<RawDouble*>(obj2);
-      *d2 = obj2d->ptr()->value_;
-    } else {
-      return false;
-    }
-    RawDouble* obj1 = static_cast<RawDouble*>(args[0]);
-    *d1 = obj1->ptr()->value_;
-    return true;
-  }
-
-  static RawObject* AllocateDouble(Thread* thread, double value) {
-    const intptr_t instance_size = Double::InstanceSize();
-    const uword start =
-        thread->heap()->new_space()->TryAllocateInTLAB(thread, instance_size);
-    if (LIKELY(start != 0)) {
-      uword tags = 0;
-      tags = RawObject::ClassIdTag::update(kDoubleCid, tags);
-      tags = RawObject::SizeTag::update(instance_size, tags);
-      tags = RawObject::NewBit::update(true, tags);
-      // Also writes zero in the hash_ field.
-      *reinterpret_cast<uword*>(start + Double::tags_offset()) = tags;
-      *reinterpret_cast<double*>(start + Double::value_offset()) = value;
-      return reinterpret_cast<RawObject*>(start + kHeapObjectTag);
-    }
-    return NULL;
-  }
-
-  static bool Double_add(Thread* thread, RawObject** FP, RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    RawObject* new_double = AllocateDouble(thread, d1 + d2);
-    if (new_double != NULL) {
-      *result = new_double;
-      return true;
-    }
-    return false;
-  }
-
-  static bool Double_mul(Thread* thread, RawObject** FP, RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    RawObject* new_double = AllocateDouble(thread, d1 * d2);
-    if (new_double != NULL) {
-      *result = new_double;
-      return true;
-    }
-    return false;
-  }
-
-  static bool Double_sub(Thread* thread, RawObject** FP, RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    RawObject* new_double = AllocateDouble(thread, d1 - d2);
-    if (new_double != NULL) {
-      *result = new_double;
-      return true;
-    }
-    return false;
-  }
-
-  static bool Double_div(Thread* thread, RawObject** FP, RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    RawObject* new_double = AllocateDouble(thread, d1 / d2);
-    if (new_double != NULL) {
-      *result = new_double;
-      return true;
-    }
-    return false;
-  }
-
-  static bool Double_greaterThan(Thread* thread,
-                                 RawObject** FP,
-                                 RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    *result = d1 > d2 ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool Double_greaterEqualThan(Thread* thread,
-                                      RawObject** FP,
-                                      RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    *result = d1 >= d2 ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool Double_lessThan(Thread* thread,
-                              RawObject** FP,
-                              RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    *result = d1 < d2 ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool Double_equal(Thread* thread, RawObject** FP, RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    *result = d1 == d2 ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool Double_lessEqualThan(Thread* thread,
-                                   RawObject** FP,
-                                   RawObject** result) {
-    double d1, d2;
-    if (!GetDoubleOperands(FrameArguments(FP, 2), &d1, &d2)) {
-      return false;
-    }
-    *result = d1 <= d2 ? Bool::True().raw() : Bool::False().raw();
-    return true;
-  }
-
-  static bool ClearAsyncThreadStack(Thread* thread,
-                                    RawObject** FP,
-                                    RawObject** result) {
-    thread->clear_async_stack_trace();
-    *result = Object::null();
-    return true;
-  }
-
-  static bool SetAsyncThreadStackTrace(Thread* thread,
-                                       RawObject** FP,
-                                       RawObject** result) {
-    RawObject** args = FrameArguments(FP, 1);
-    thread->set_raw_async_stack_trace(
-        reinterpret_cast<RawStackTrace*>(args[0]));
-    *result = Object::null();
-    return true;
-  }
-
   DART_FORCE_INLINE static RawBytecode* FrameBytecode(RawObject** FP) {
     ASSERT(GetClassId(FP[kKBCPcMarkerSlotFromFp]) == kBytecodeCid);
     return static_cast<RawBytecode*>(FP[kKBCPcMarkerSlotFromFp]);
   }
-
-  DART_FORCE_INLINE static uint8_t* GetTypedData(RawObject* obj,
-                                                 RawObject* index) {
-    ASSERT(RawObject::IsTypedDataClassId(obj->GetClassId()));
-    RawTypedData* array = reinterpret_cast<RawTypedData*>(obj);
-    const intptr_t byte_offset = Smi::Value(RAW_CAST(Smi, index));
-    ASSERT(byte_offset >= 0);
-    return array->ptr()->data() + byte_offset;
-  }
 };
 
 DART_FORCE_INLINE static uint32_t* SavedCallerPC(RawObject** FP) {
@@ -496,53 +175,68 @@
   return function;
 }
 
-IntrinsicHandler Interpreter::intrinsics_[Interpreter::kIntrinsicCount];
+void LookupCache::Clear() {
+  for (intptr_t i = 0; i < kNumEntries; i++) {
+    entries_[i].receiver_cid = kIllegalCid;
+  }
+}
 
-// Synchronization primitives support.
-void Interpreter::InitOnce() {
-  for (intptr_t i = 0; i < kIntrinsicCount; i++) {
-    intrinsics_[i] = 0;
+bool LookupCache::Lookup(intptr_t receiver_cid,
+                         RawString* function_name,
+                         RawFunction** target) const {
+  ASSERT(receiver_cid != kIllegalCid);  // Sentinel value.
+
+  const intptr_t hash =
+      receiver_cid ^ reinterpret_cast<intptr_t>(function_name);
+  const intptr_t probe1 = hash & kTableMask;
+  if (entries_[probe1].receiver_cid == receiver_cid &&
+      entries_[probe1].function_name == function_name) {
+    *target = entries_[probe1].target;
+    return true;
   }
 
-  intrinsics_[kObjectArraySetIndexedIntrinsic] =
-      InterpreterHelpers::ObjectArraySetIndexed;
-  intrinsics_[kObjectArraySetIndexedUncheckedIntrinsic] =
-      InterpreterHelpers::ObjectArraySetIndexedUnchecked;
-  intrinsics_[kObjectArrayGetIndexedIntrinsic] =
-      InterpreterHelpers::ObjectArrayGetIndexed;
-  intrinsics_[kGrowableArraySetIndexedIntrinsic] =
-      InterpreterHelpers::GrowableArraySetIndexed;
-  intrinsics_[kGrowableArraySetIndexedUncheckedIntrinsic] =
-      InterpreterHelpers::GrowableArraySetIndexedUnchecked;
-  intrinsics_[kGrowableArrayGetIndexedIntrinsic] =
-      InterpreterHelpers::GrowableArrayGetIndexed;
-  intrinsics_[kObjectEqualsIntrinsic] = InterpreterHelpers::ObjectEquals;
-  intrinsics_[kObjectRuntimeTypeIntrinsic] =
-      InterpreterHelpers::ObjectRuntimeType;
+  intptr_t probe2 = (hash >> 3) & kTableMask;
+  if (entries_[probe2].receiver_cid == receiver_cid &&
+      entries_[probe2].function_name == function_name) {
+    *target = entries_[probe2].target;
+    return true;
+  }
 
-  intrinsics_[kDouble_getIsNaNIntrinsic] = InterpreterHelpers::Double_getIsNan;
-  intrinsics_[kDouble_getIsInfiniteIntrinsic] =
-      InterpreterHelpers::Double_getIsInfinite;
-  intrinsics_[kDouble_addIntrinsic] = InterpreterHelpers::Double_add;
-  intrinsics_[kDouble_mulIntrinsic] = InterpreterHelpers::Double_mul;
-  intrinsics_[kDouble_subIntrinsic] = InterpreterHelpers::Double_sub;
-  intrinsics_[kDouble_divIntrinsic] = InterpreterHelpers::Double_div;
-  intrinsics_[kDouble_greaterThanIntrinsic] =
-      InterpreterHelpers::Double_greaterThan;
-  intrinsics_[kDouble_greaterEqualThanIntrinsic] =
-      InterpreterHelpers::Double_greaterEqualThan;
-  intrinsics_[kDouble_lessThanIntrinsic] = InterpreterHelpers::Double_lessThan;
-  intrinsics_[kDouble_equalIntrinsic] = InterpreterHelpers::Double_equal;
-  intrinsics_[kDouble_lessEqualThanIntrinsic] =
-      InterpreterHelpers::Double_lessEqualThan;
-  intrinsics_[kClearAsyncThreadStackTraceIntrinsic] =
-      InterpreterHelpers::ClearAsyncThreadStack;
-  intrinsics_[kSetAsyncThreadStackTraceIntrinsic] =
-      InterpreterHelpers::SetAsyncThreadStackTrace;
+  return false;
+}
+
+void LookupCache::Insert(intptr_t receiver_cid,
+                         RawString* function_name,
+                         RawFunction* target) {
+  // Otherwise we have to clear the cache or rehash on scavenges too.
+  ASSERT(function_name->IsOldObject());
+  ASSERT(target->IsOldObject());
+
+  const intptr_t hash =
+      receiver_cid ^ reinterpret_cast<intptr_t>(function_name);
+  const intptr_t probe1 = hash & kTableMask;
+  if (entries_[probe1].receiver_cid == kIllegalCid) {
+    entries_[probe1].receiver_cid = receiver_cid;
+    entries_[probe1].function_name = function_name;
+    entries_[probe1].target = target;
+    return;
+  }
+
+  const intptr_t probe2 = (hash >> 3) & kTableMask;
+  if (entries_[probe2].receiver_cid == kIllegalCid) {
+    entries_[probe2].receiver_cid = receiver_cid;
+    entries_[probe2].function_name = function_name;
+    entries_[probe2].target = target;
+    return;
+  }
+
+  entries_[probe1].receiver_cid = receiver_cid;
+  entries_[probe1].function_name = function_name;
+  entries_[probe1].target = target;
 }
 
 Interpreter::Interpreter()
-    : stack_(NULL), fp_(NULL), pp_(NULL), argdesc_(NULL) {
+    : stack_(NULL), fp_(NULL), pp_(NULL), argdesc_(NULL), lookup_cache_() {
   // Setup interpreter support first. Some of this information is needed to
   // setup the architecture state.
   // We allocate the stack here, the size is computed as the sum of
@@ -556,8 +250,10 @@
   // Low address.
   stack_base_ =
       reinterpret_cast<uword>(stack_) + kInterpreterStackUnderflowSize;
+  // Limit for StackOverflowError.
+  overflow_stack_limit_ = stack_base_ + OSThread::GetSpecifiedStackSize();
   // High address.
-  stack_limit_ = stack_base_ + OSThread::GetSpecifiedStackSize();
+  stack_limit_ = overflow_stack_limit_ + OSThread::kStackSizeBuffer;
 
   last_setjmp_buffer_ = NULL;
 
@@ -579,6 +275,8 @@
 
 Interpreter::~Interpreter() {
   delete[] stack_;
+  pp_ = NULL;
+  argdesc_ = NULL;
 #if defined(DEBUG)
   if (trace_file_ != NULL) {
     FlushTraceBuffer();
@@ -596,8 +294,10 @@
 
 // Get the active Interpreter for the current isolate.
 Interpreter* Interpreter::Current() {
-  Interpreter* interpreter = Thread::Current()->interpreter();
+  Thread* thread = Thread::Current();
+  Interpreter* interpreter = thread->interpreter();
   if (interpreter == NULL) {
+    TransitionGeneratedToVM transition(thread);
     interpreter = new Interpreter();
     Thread::Current()->set_interpreter(interpreter);
   }
@@ -692,19 +392,6 @@
 #endif
 }
 
-void Interpreter::CallRuntime(Thread* thread,
-                              RawObject** base,
-                              RawObject** exit_frame,
-                              uint32_t* pc,
-                              intptr_t argc_tag,
-                              RawObject** args,
-                              RawObject** result,
-                              uword target) {
-  Exit(thread, base, exit_frame, pc);
-  NativeArguments native_args(thread, argc_tag, args, result);
-  reinterpret_cast<RuntimeFunction>(target)(native_args);
-}
-
 // Calling into runtime may trigger garbage collection and relocate objects,
 // so all RawObject* pointers become outdated and should not be used across
 // runtime calls.
@@ -1166,8 +853,48 @@
   // Handler arguments: arguments to check and an ICData object.
   const intptr_t miss_handler_argc = checked_args + 1;
   RawObject** exit_frame = miss_handler_args + miss_handler_argc;
-  CallRuntime(thread, FP, exit_frame, pc, miss_handler_argc, miss_handler_args,
-              result, reinterpret_cast<uword>(handler));
+  Exit(thread, FP, exit_frame, pc);
+  NativeArguments native_args(thread, miss_handler_argc, miss_handler_args,
+                              result);
+  handler(native_args);
+}
+
+DART_FORCE_INLINE bool Interpreter::InterfaceCall(Thread* thread,
+                                                  RawString* target_name,
+                                                  RawObject** call_base,
+                                                  RawObject** top,
+                                                  uint32_t** pc,
+                                                  RawObject*** FP,
+                                                  RawObject*** SP) {
+  const intptr_t type_args_len =
+      InterpreterHelpers::ArgDescTypeArgsLen(argdesc_);
+  const intptr_t receiver_idx = type_args_len > 0 ? 1 : 0;
+
+  intptr_t receiver_cid =
+      InterpreterHelpers::GetClassId(call_base[receiver_idx]);
+
+  RawFunction* target;
+  if (UNLIKELY(!lookup_cache_.Lookup(receiver_cid, target_name, &target))) {
+    // Table lookup miss.
+    top[1] = call_base[receiver_idx];
+    top[2] = target_name;
+    top[3] = argdesc_;
+    top[4] = 0;  // Result slot.
+
+    Exit(thread, *FP, top + 5, *pc);
+    NativeArguments native_args(thread, 3, /* argv */ top + 1,
+                                /* result */ top + 4);
+    DRT_InterpretedInterfaceCallMissHandler(native_args);
+
+    target = static_cast<RawFunction*>(top[4]);
+    target_name = static_cast<RawString*>(top[2]);
+    argdesc_ = static_cast<RawArray*>(top[3]);
+    ASSERT(target->IsFunction());
+    lookup_cache_.Insert(receiver_cid, target_name, target);
+  }
+
+  top[0] = target;
+  return Invoke(thread, call_base, top, pc, FP, SP);
 }
 
 DART_FORCE_INLINE bool Interpreter::InstanceCall1(Thread* thread,
@@ -1380,7 +1107,7 @@
                   reinterpret_cast<uword>(this), reinterpret_cast<uword>(fp_), \
                   exit_fp);                                                    \
       }                                                                        \
-      ASSERT(reinterpret_cast<uword>(fp_) < stack_limit());                    \
+      ASSERT(HasFrame(reinterpret_cast<uword>(fp_)));                          \
       return special_[KernelBytecode::kExceptionSpecialIndex];                 \
     }                                                                          \
     goto DispatchAfterException;                                               \
@@ -1886,7 +1613,7 @@
     {
       // Check the interpreter's own stack limit for actual interpreter's stack
       // overflows, and also the thread's stack limit for scheduled interrupts.
-      if (reinterpret_cast<uword>(SP) >= stack_limit() ||
+      if (reinterpret_cast<uword>(SP) >= overflow_stack_limit() ||
           thread->HasScheduledInterrupts()) {
         Exit(thread, FP, SP + 1, pc);
         NativeArguments args(thread, 0, NULL, NULL);
@@ -2106,7 +1833,36 @@
   }
 
   {
-    BYTECODE(InstanceCall, A_D);
+    BYTECODE(InterfaceCall, A_D);
+
+    // Check if single stepping.
+    if (thread->isolate()->single_step()) {
+      Exit(thread, FP, SP + 1, pc);
+      NativeArguments args(thread, 0, NULL, NULL);
+      INVOKE_RUNTIME(DRT_SingleStepHandler, args);
+    }
+
+    {
+      const uint16_t argc = rA;
+      const uint16_t kidx = rD;
+
+      RawObject** call_base = SP - argc + 1;
+      RawObject** call_top = SP + 1;
+
+      InterpreterHelpers::IncrementUsageCounter(FrameFunction(FP));
+      RawString* target_name = static_cast<RawString*>(LOAD_CONSTANT(kidx));
+      argdesc_ = static_cast<RawArray*>(LOAD_CONSTANT(kidx + 1));
+      if (!InterfaceCall(thread, target_name, call_base, call_top, &pc, &FP,
+                         &SP)) {
+        HANDLE_EXCEPTION;
+      }
+    }
+
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(DynamicCall, A_D);
 
     // Check if single stepping.
     if (thread->isolate()->single_step()) {
@@ -2319,7 +2075,6 @@
     DISPATCH();
   }
 
-  // Return and return like instructions (Intrinsic).
   {
     RawObject* result;  // result to return to the caller.
 
@@ -2349,7 +2104,7 @@
                   reinterpret_cast<uword>(this), reinterpret_cast<uword>(fp_),
                   exit_fp);
       }
-      ASSERT(reinterpret_cast<uword>(fp_) < stack_limit());
+      ASSERT(HasFrame(reinterpret_cast<uword>(fp_)));
       const intptr_t argc = reinterpret_cast<uword>(pc) >> 2;
       ASSERT(fp_ == FrameArguments(FP, argc + kKBCEntrySavedSlots));
       // Exception propagation should have been done.
@@ -3016,11 +2771,6 @@
   // in the previous C++ frames.
   StackResource::Unwind(thread);
 
-  // Set the tag.
-  thread->set_vm_tag(VMTag::kDartInterpretedTagId);
-  // Clear top exit frame.
-  thread->set_top_exit_frame_info(0);
-
   fp_ = reinterpret_cast<RawObject**>(fp);
 
   if (pc == StubCode::RunExceptionHandler().EntryPoint()) {
@@ -3038,6 +2788,11 @@
     pc_ = pc;
   }
 
+  // Set the tag.
+  thread->set_vm_tag(VMTag::kDartInterpretedTagId);
+  // Clear top exit frame.
+  thread->set_top_exit_frame_info(0);
+
   buf->Longjmp();
   UNREACHABLE();
 }
diff --git a/runtime/vm/interpreter.h b/runtime/vm/interpreter.h
index badbffd..22d27a2 100644
--- a/runtime/vm/interpreter.h
+++ b/runtime/vm/interpreter.h
@@ -27,6 +27,36 @@
 class RawSubtypeTestCache;
 class ObjectPointerVisitor;
 
+class LookupCache : public ValueObject {
+ public:
+  LookupCache() {
+    ASSERT(Utils::IsPowerOfTwo(sizeof(Entry)));
+    ASSERT(Utils::IsPowerOfTwo(sizeof(kNumEntries)));
+    Clear();
+  }
+
+  void Clear();
+  bool Lookup(intptr_t receiver_cid,
+              RawString* function_name,
+              RawFunction** target) const;
+  void Insert(intptr_t receiver_cid,
+              RawString* function_name,
+              RawFunction* target);
+
+ private:
+  struct Entry {
+    intptr_t receiver_cid;
+    RawString* function_name;
+    RawFunction* target;
+    intptr_t padding;
+  };
+
+  static const intptr_t kNumEntries = 1024;
+  static const intptr_t kTableMask = kNumEntries - 1;
+
+  Entry entries_[kNumEntries];
+};
+
 // Interpreter intrinsic handler. It is invoked on entry to the intrinsified
 // function via Intrinsic bytecode before the frame is setup.
 // If the handler returns true then Intrinsic bytecode works as a return
@@ -49,6 +79,8 @@
 
   // Low address (KBC stack grows up).
   uword stack_base() const { return stack_base_; }
+  // Limit for StackOverflowError.
+  uword overflow_stack_limit() const { return overflow_stack_limit_; }
   // High address (KBC stack grows up).
   uword stack_limit() const { return stack_limit_; }
 
@@ -56,15 +88,12 @@
   // TODO(regis): We should rely on a new thread vm_tag to identify an
   // interpreter frame and not need this HasFrame() method.
   bool HasFrame(uword frame) const {
-    return frame >= stack_base() && frame <= get_fp();
+    return frame >= stack_base() && frame < stack_limit();
   }
 
   // Identify an entry frame by looking at its pc marker value.
   static bool IsEntryFrameMarker(uword pc) { return (pc & 2) != 0; }
 
-  // Call on program start.
-  static void InitOnce();
-
   RawObject* Call(const Function& function,
                   const Array& arguments_descriptor,
                   const Array& arguments,
@@ -82,23 +111,13 @@
   uword get_fp() const { return reinterpret_cast<uword>(fp_); }
   uword get_pc() const { return pc_; }
 
-  enum IntrinsicId {
-#define V(test_class_name, test_function_name, enum_name, fp)                  \
-  k##enum_name##Intrinsic,
-    ALL_INTRINSICS_LIST(V) GRAPH_INTRINSICS_LIST(V)
-#undef V
-        kIntrinsicCount,
-  };
-
-  static bool IsSupportedIntrinsic(IntrinsicId id) {
-    return intrinsics_[id] != NULL;
-  }
-
   void VisitObjectPointers(ObjectPointerVisitor* visitor);
+  void MajorGC() { lookup_cache_.Clear(); }
 
  private:
   uintptr_t* stack_;
   uword stack_base_;
+  uword overflow_stack_limit_;
   uword stack_limit_;
 
   RawObject** fp_;
@@ -112,22 +131,13 @@
                        // call instruction and the function entry.
   RawObject* special_[KernelBytecode::kSpecialIndexCount];
 
-  static IntrinsicHandler intrinsics_[kIntrinsicCount];
+  LookupCache lookup_cache_;
 
   void Exit(Thread* thread,
             RawObject** base,
             RawObject** exit_frame,
             uint32_t* pc);
 
-  void CallRuntime(Thread* thread,
-                   RawObject** base,
-                   RawObject** exit_frame,
-                   uint32_t* pc,
-                   intptr_t argc_tag,
-                   RawObject** args,
-                   RawObject** result,
-                   uword target);
-
   bool Invoke(Thread* thread,
               RawObject** call_base,
               RawObject** call_top,
@@ -161,6 +171,14 @@
                        RawObject** FP,
                        RawObject** SP);
 
+  bool InterfaceCall(Thread* thread,
+                     RawString* target_name,
+                     RawObject** call_base,
+                     RawObject** call_top,
+                     uint32_t** pc,
+                     RawObject*** FP,
+                     RawObject*** SP);
+
   bool InstanceCall1(Thread* thread,
                      RawICData* icdata,
                      RawObject** call_base,
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 6d640dc..df87172 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -36,6 +36,7 @@
 #include "vm/port.h"
 #include "vm/profiler.h"
 #include "vm/reusable_handles.h"
+#include "vm/reverse_pc_lookup_cache.h"
 #include "vm/service.h"
 #include "vm/service_event.h"
 #include "vm/service_isolate.h"
@@ -741,7 +742,7 @@
     bool has_listener = I->NotifyErrorListeners(exc_str, stacktrace_str);
     if (I->ErrorsFatal()) {
       if (has_listener) {
-        T->clear_sticky_error();
+        T->ClearStickyError();
       } else {
         T->set_sticky_error(result);
       }
@@ -779,6 +780,7 @@
 #undef INIT_FROM_FLAG
   api_flags->entry_points = NULL;
   api_flags->load_vmservice_library = false;
+  api_flags->copy_parent_code = false;
 }
 
 void Isolate::FlagsCopyTo(Dart_IsolateFlags* api_flags) const {
@@ -789,6 +791,7 @@
 #undef INIT_FROM_FIELD
   api_flags->entry_points = NULL;
   api_flags->load_vmservice_library = should_load_vmservice();
+  api_flags->copy_parent_code = false;
 }
 
 void Isolate::FlagsCopyFrom(const Dart_IsolateFlags& api_flags) {
@@ -946,7 +949,8 @@
       handler_info_cache_(),
       catch_entry_moves_cache_(),
       embedder_entry_points_(NULL),
-      obfuscation_map_(NULL) {
+      obfuscation_map_(NULL),
+      reverse_pc_lookup_cache_(nullptr) {
   FlagsCopyFrom(api_flags);
   SetErrorsFatal(true);
   set_compilation_allowed(true);
@@ -974,6 +978,9 @@
   // RELEASE_ASSERT(reload_context_ == NULL);
 #endif  // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 
+  delete reverse_pc_lookup_cache_;
+  reverse_pc_lookup_cache_ = nullptr;
+
   delete background_compiler_;
   background_compiler_ = NULL;
 
@@ -2041,9 +2048,11 @@
   thread_registry()->ReleaseStoreBuffers();
 }
 
-void Isolate::EnableIncrementalBarrier(MarkingStack* marking_stack) {
+void Isolate::EnableIncrementalBarrier(MarkingStack* marking_stack,
+                                       MarkingStack* deferred_marking_stack) {
   ASSERT(marking_stack_ == NULL);
   marking_stack_ = marking_stack;
+  deferred_marking_stack_ = deferred_marking_stack;
   thread_registry()->AcquireMarkingStacks();
   ASSERT(Thread::Current()->is_marking());
 }
@@ -2052,6 +2061,7 @@
   thread_registry()->ReleaseMarkingStacks();
   ASSERT(marking_stack_ != NULL);
   marking_stack_ = NULL;
+  deferred_marking_stack_ = NULL;
   ASSERT(!Thread::Current()->is_marking());
 }
 
@@ -2318,8 +2328,11 @@
   deoptimized_code.Add(code);
 }
 
-void Isolate::clear_sticky_error() {
+RawError* Isolate::StealStickyError() {
+  NoSafepointScope no_safepoint;
+  RawError* return_value = sticky_error_;
   sticky_error_ = Error::null();
+  return return_value;
 }
 
 #if !defined(PRODUCT)
@@ -2848,12 +2861,12 @@
   if (is_mutator) {
     if (thread->sticky_error() != Error::null()) {
       ASSERT(sticky_error_ == Error::null());
-      sticky_error_ = thread->sticky_error();
-      thread->clear_sticky_error();
+      sticky_error_ = thread->StealStickyError();
     }
   } else {
     ASSERT(thread->api_top_scope_ == NULL);
     ASSERT(thread->zone_ == NULL);
+    ASSERT(thread->sticky_error() == Error::null());
   }
   if (!bypass_safepoint) {
     // Ensure that the thread reports itself as being at a safepoint.
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 27fde4b..278857f 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -64,6 +64,7 @@
 class RawFloat32x4;
 class RawInt32x4;
 class RawUserTag;
+class ReversePcLookupCache;
 class SafepointHandler;
 class SampleBuffer;
 class SendPort;
@@ -133,10 +134,12 @@
 // List of Isolate flags with corresponding members of Dart_IsolateFlags and
 // corresponding global command line flags.
 //
-//       V(when, name, Dart_IsolateFlags-member-name, command-line-flag-name)
+//       V(when, name, bit-name, Dart_IsolateFlags-name, command-line-flag-name)
 //
 #define ISOLATE_FLAG_LIST(V)                                                   \
   V(NONPRODUCT, asserts, EnableAsserts, enable_asserts, FLAG_enable_asserts)   \
+  V(PRODUCT, use_bare_instructions, Bare, use_bare_instructions,               \
+    FLAG_use_bare_instructions)                                                \
   V(NONPRODUCT, use_field_guards, UseFieldGuards, use_field_guards,            \
     FLAG_use_field_guards)                                                     \
   V(NONPRODUCT, use_osr, UseOsr, use_osr, FLAG_use_osr)                        \
@@ -195,11 +198,15 @@
 
   // Prepares all threads in an isolate for Garbage Collection.
   void ReleaseStoreBuffers();
-  void EnableIncrementalBarrier(MarkingStack* marking_stack);
+  void EnableIncrementalBarrier(MarkingStack* marking_stack,
+                                MarkingStack* deferred_marking_stack);
   void DisableIncrementalBarrier();
 
   StoreBuffer* store_buffer() const { return store_buffer_; }
   MarkingStack* marking_stack() const { return marking_stack_; }
+  MarkingStack* deferred_marking_stack() const {
+    return deferred_marking_stack_;
+  }
 
   ThreadRegistry* thread_registry() const { return thread_registry_; }
   SafepointHandler* safepoint_handler() const { return safepoint_handler_; }
@@ -602,7 +609,7 @@
   void SetStickyError(RawError* sticky_error);
 
   RawError* sticky_error() const { return sticky_error_; }
-  void clear_sticky_error();
+  DART_WARN_UNUSED_RESULT RawError* StealStickyError();
 
   void RetainKernelBlob(const ExternalTypedData& kernel_blob);
 
@@ -704,6 +711,17 @@
   void set_obfuscation_map(const char** map) { obfuscation_map_ = map; }
   const char** obfuscation_map() const { return obfuscation_map_; }
 
+  // Returns the pc -> code lookup cache object for this isolate.
+  ReversePcLookupCache* reverse_pc_lookup_cache() const {
+    return reverse_pc_lookup_cache_;
+  }
+
+  // Sets the pc -> code lookup cache object for this isolate.
+  void set_reverse_pc_lookup_cache(ReversePcLookupCache* table) {
+    ASSERT(reverse_pc_lookup_cache_ == nullptr);
+    reverse_pc_lookup_cache_ = table;
+  }
+
   // Isolate-specific flag handling.
   static void FlagsInitialize(Dart_IsolateFlags* api_flags);
   void FlagsCopyTo(Dart_IsolateFlags* api_flags) const;
@@ -848,6 +866,7 @@
 
   StoreBuffer* store_buffer_;
   MarkingStack* marking_stack_;
+  MarkingStack* deferred_marking_stack_;
   Heap* heap_;
 
 #define ISOLATE_FLAG_BITS(V)                                                   \
@@ -865,6 +884,7 @@
   V(EnableAsserts)                                                             \
   V(ErrorOnBadType)                                                            \
   V(ErrorOnBadOverride)                                                        \
+  V(Bare)                                                                      \
   V(UseFieldGuards)                                                            \
   V(UseOsr)                                                                    \
   V(Obfuscate)                                                                 \
@@ -1006,6 +1026,8 @@
   Dart_QualifiedFunctionName* embedder_entry_points_;
   const char** obfuscation_map_;
 
+  ReversePcLookupCache* reverse_pc_lookup_cache_;
+
   static Dart_IsolateCreateCallback create_callback_;
   static Dart_IsolateShutdownCallback shutdown_callback_;
   static Dart_IsolateCleanupCallback cleanup_callback_;
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 3a3e6ab..81b77be 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -587,6 +587,12 @@
     packages_url = String::New(packages_url_);
   }
 
+  // Reset stats.
+  num_received_libs_ = 0;
+  bytes_received_libs_ = 0;
+  num_received_classes_ = 0;
+  num_received_procedures_ = 0;
+
   bool did_kernel_compilation = false;
   bool skip_reload = false;
   {
@@ -595,13 +601,20 @@
         GrowableObjectArray::Handle(object_store()->libraries());
     intptr_t num_libs = libs.Length();
     modified_libs_ = new (Z) BitVector(Z, num_libs);
+    intptr_t* p_num_received_classes = nullptr;
+    intptr_t* p_num_received_procedures = nullptr;
 
     // ReadKernelFromFile checks to see if the file at
     // root_script_url is a valid .dill file. If that's the case, a Program*
     // is returned. Otherwise, this is likely a source file that needs to be
     // compiled, so ReadKernelFromFile returns NULL.
     kernel_program.set(kernel::Program::ReadFromFile(root_script_url));
-    if (kernel_program.get() == NULL) {
+    if (kernel_program.get() != NULL) {
+      num_received_libs_ = kernel_program.get()->library_count();
+      bytes_received_libs_ = kernel_program.get()->kernel_data_size();
+      p_num_received_classes = &num_received_classes_;
+      p_num_received_procedures = &num_received_procedures_;
+    } else {
       Dart_KernelCompilationResult retval;
       if (kernel_buffer != NULL && kernel_buffer_size != 0) {
         retval.kernel = const_cast<uint8_t*>(kernel_buffer);
@@ -659,7 +672,8 @@
     }
 
     kernel::KernelLoader::FindModifiedLibraries(
-        kernel_program.get(), I, modified_libs_, force_reload, &skip_reload);
+        kernel_program.get(), I, modified_libs_, force_reload, &skip_reload,
+        p_num_received_classes, p_num_received_procedures);
   }
   if (skip_reload) {
     ASSERT(modified_libs_->IsEmpty());
@@ -697,6 +711,18 @@
   // Disable the background compiler while we are performing the reload.
   BackgroundCompiler::Disable(I);
 
+  // Wait for any concurrent marking tasks to finish and turn off the
+  // concurrent marker during reload as we might be allocating new instances
+  // (constants) when loading the new kernel file and this could cause
+  // inconsistency between the saved class table and the new class table.
+  Heap* heap = thread->heap();
+  const bool old_concurrent_mark_flag =
+      heap->old_space()->enable_concurrent_mark();
+  if (old_concurrent_mark_flag) {
+    heap->WaitForMarkerTasks(thread);
+    heap->old_space()->set_enable_concurrent_mark(false);
+  }
+
   // Ensure all functions on the stack have unoptimized code.
   EnsuredUnoptimizedCodeForStack();
   // Deoptimize all code that had optimizing decisions that are dependent on
@@ -758,6 +784,9 @@
   // Re-enable the background compiler. Do this before propagating any errors.
   BackgroundCompiler::Enable(I);
 
+  // Reenable concurrent marking if it was initially on.
+  heap->old_space()->set_enable_concurrent_mark(old_concurrent_mark_flag);
+
   if (result.IsUnwindError()) {
     if (thread->top_exit_frame_info() == 0) {
       // We can only propagate errors when there are Dart frames on the stack.
@@ -800,7 +829,7 @@
   if (!old_cls.is_enum_class()) {
     new_cls.CopyCanonicalConstants(old_cls);
   }
-  new_cls.CopyCanonicalType(old_cls);
+  new_cls.CopyDeclarationType(old_cls);
   AddBecomeMapping(old_cls, new_cls);
   AddClassMapping(new_cls, old_cls);
 }
@@ -850,32 +879,35 @@
   jsobj.AddProperty("type", "ReloadReport");
   jsobj.AddProperty("success", reload_skipped_ || !HasReasonsForCancelling());
   {
-    JSONObject details(&jsobj, "details");
-    if (reload_skipped_) {
-      // Reload was skipped.
-      const GrowableObjectArray& libs =
-          GrowableObjectArray::Handle(object_store()->libraries());
-      const intptr_t final_library_count = libs.Length();
-      details.AddProperty("savedLibraryCount", final_library_count);
-      details.AddProperty("loadedLibraryCount", static_cast<intptr_t>(0));
-      details.AddProperty("finalLibraryCount", final_library_count);
-    } else if (HasReasonsForCancelling()) {
+    if (HasReasonsForCancelling()) {
       // Reload was rejected.
       JSONArray array(&jsobj, "notices");
       for (intptr_t i = 0; i < reasons_to_cancel_reload_.length(); i++) {
         ReasonForCancelling* reason = reasons_to_cancel_reload_.At(i);
         reason->AppendTo(&array);
       }
+      return;
+    }
+
+    JSONObject details(&jsobj, "details");
+    const GrowableObjectArray& libs =
+        GrowableObjectArray::Handle(object_store()->libraries());
+    const intptr_t final_library_count = libs.Length();
+    details.AddProperty("finalLibraryCount", final_library_count);
+    details.AddProperty("receivedLibraryCount", num_received_libs_);
+    details.AddProperty("receivedLibrariesBytes", bytes_received_libs_);
+    details.AddProperty("receivedClassesCount", num_received_classes_);
+    details.AddProperty("receivedProceduresCount", num_received_procedures_);
+    if (reload_skipped_) {
+      // Reload was skipped.
+      details.AddProperty("savedLibraryCount", final_library_count);
+      details.AddProperty("loadedLibraryCount", static_cast<intptr_t>(0));
     } else {
       // Reload was successful.
-      const GrowableObjectArray& libs =
-          GrowableObjectArray::Handle(object_store()->libraries());
-      const intptr_t final_library_count = libs.Length();
       const intptr_t loaded_library_count =
           final_library_count - num_saved_libs_;
       details.AddProperty("savedLibraryCount", num_saved_libs_);
       details.AddProperty("loadedLibraryCount", loaded_library_count);
-      details.AddProperty("finalLibraryCount", final_library_count);
       JSONArray array(&jsobj, "shapeChangeMappings");
       for (intptr_t i = 0; i < instance_morphers_.length(); i++) {
         instance_morphers_.At(i)->AppendTo(&array);
@@ -1324,13 +1356,6 @@
     return;
   }
 
-  // Don't report synthetic classes like the superclass of
-  // `class MA extends S with M {}` or `class MA = S with M'. The relevant
-  // changes with be reported as changes in M.
-  if (new_cls.IsMixinApplication() || new_cls.is_mixin_app_alias()) {
-    return;
-  }
-
   // Don't report `typedef bool Predicate(Object o)` as unused. There is nothing
   // to execute.
   if (new_cls.IsTypedefClass()) {
diff --git a/runtime/vm/isolate_reload.h b/runtime/vm/isolate_reload.h
index 082bc48..e8dbfe5 100644
--- a/runtime/vm/isolate_reload.h
+++ b/runtime/vm/isolate_reload.h
@@ -286,6 +286,10 @@
   intptr_t saved_num_cids_;
   ClassAndSize* saved_class_table_;
   intptr_t num_saved_libs_;
+  intptr_t num_received_libs_;
+  intptr_t bytes_received_libs_;
+  intptr_t num_received_classes_;
+  intptr_t num_received_procedures_;
 
   // Collect the necessary instance transformation for schema changes.
   ZoneGrowableArray<InstanceMorpher*> instance_morphers_;
diff --git a/runtime/vm/kernel.cc b/runtime/vm/kernel.cc
index 0abd6e7..c5d5442 100644
--- a/runtime/vm/kernel.cc
+++ b/runtime/vm/kernel.cc
@@ -473,11 +473,7 @@
                                                is_annotations_offset);
 
   } else {
-    Thread* thread = Thread::Current();
-    Error& error = Error::Handle();
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
-    return error.raw();
+    return Thread::Current()->StealStickyError();
   }
 }
 
@@ -584,11 +580,7 @@
 
     return builder.BuildParameterDescriptor(function.kernel_offset());
   } else {
-    Thread* thread = Thread::Current();
-    Error& error = Error::Handle();
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
-    return error.raw();
+    return Thread::Current()->StealStickyError();
   }
 }
 
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index 517e02c..5440ddf 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -148,8 +148,8 @@
       memmove(kernel_buffer, data, kernel_buffer_size);
       Dart_TypedDataReleaseData(retval);
 
-      kernel_program =
-          kernel::Program::ReadFromBuffer(kernel_buffer, kernel_buffer_size);
+      kernel_program = kernel::Program::ReadFromBuffer(
+          kernel_buffer, kernel_buffer_size, error);
     } else if (error != nullptr) {
       *error = Dart_GetError(retval);
     }
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index 3b7d847..ddc9884 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -17,7 +17,7 @@
 // package:kernel/binary.md.
 
 static const uint32_t kMagicProgramFile = 0x90ABCDEFu;
-static const uint32_t kBinaryFormatVersion = 13;
+static const uint32_t kBinaryFormatVersion = 15;
 
 // Keep in sync with package:kernel/lib/binary/tag.dart
 #define KERNEL_TAG_LIST(V)                                                     \
@@ -72,6 +72,7 @@
   V(Rethrow, 47)                                                               \
   V(Throw, 48)                                                                 \
   V(ListLiteral, 49)                                                           \
+  V(SetLiteral, 109)                                                           \
   V(MapLiteral, 50)                                                            \
   V(AwaitExpression, 51)                                                       \
   V(FunctionExpression, 52)                                                    \
@@ -81,6 +82,7 @@
   V(NegativeIntLiteral, 56)                                                    \
   V(BigIntLiteral, 57)                                                         \
   V(ConstListLiteral, 58)                                                      \
+  V(ConstSetLiteral, 110)                                                      \
   V(ConstMapLiteral, 59)                                                       \
   V(ExpressionStatement, 61)                                                   \
   V(Block, 62)                                                                 \
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index 09c9575..d629c76 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -295,6 +295,7 @@
 }
 
 Dart_Port KernelIsolate::WaitForKernelPort() {
+  VMTagScope tagScope(Thread::Current(), VMTag::kLoadWaitTagId);
   MonitorLocker ml(monitor_);
   while (initializing_ && (kernel_port_ == ILLEGAL_PORT)) {
     ml.Wait();
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index a11f25c..43a4dbe 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -246,10 +246,7 @@
 
   if (process_pending_classes && !ClassFinalizer::ProcessPendingClasses()) {
     // Class finalization failed -> sticky error would be set.
-    Error& error = Error::Handle(zone);
-    error = thread->sticky_error();
-    thread->clear_sticky_error();
-    return error;
+    return Error::Handle(thread->StealStickyError());
   }
 
   return library;
@@ -393,6 +390,9 @@
 }
 
 const Array& KernelLoader::ReadConstantTable() {
+  if (program_->library_count() == 0) {
+    return Array::empty_array();
+  }
   // We use the very first library's toplevel class as an owner for an
   // [ActiveClassScope]
   //
@@ -630,9 +630,7 @@
     if (process_pending_classes) {
       if (!ClassFinalizer::ProcessPendingClasses()) {
         // Class finalization failed -> sticky error would be set.
-        RawError* error = H.thread()->sticky_error();
-        H.thread()->clear_sticky_error();
-        return error;
+        return H.thread()->StealStickyError();
       }
     }
 
@@ -663,9 +661,7 @@
 
   // Either class finalization failed or we caught a compile error.
   // In both cases sticky error would be set.
-  RawError* error = thread_->sticky_error();
-  thread_->clear_sticky_error();
-  return error;
+  return Thread::Current()->StealStickyError();
 }
 
 RawObject* KernelLoader::LoadExpressionEvaluationFunction(
@@ -715,7 +711,9 @@
                                          Isolate* isolate,
                                          BitVector* modified_libs,
                                          bool force_reload,
-                                         bool* is_empty_program) {
+                                         bool* is_empty_program,
+                                         intptr_t* p_num_classes,
+                                         intptr_t* p_num_procedures) {
   LongJumpScope jump;
   Zone* zone = Thread::Current()->zone();
   if (setjmp(*jump.Set()) == 0) {
@@ -735,40 +733,53 @@
       return;
     }
 
+    if (p_num_classes != nullptr) {
+      *p_num_classes = 0;
+    }
+    if (p_num_procedures != nullptr) {
+      *p_num_procedures = 0;
+    }
+
     // Now go through all the libraries that are present in the incremental
     // kernel files, these will constitute the modified libraries.
     *is_empty_program = true;
     if (program->is_single_program()) {
       KernelLoader loader(program);
-      return loader.walk_incremental_kernel(modified_libs, is_empty_program);
-    } else {
-      kernel::Reader reader(program->kernel_data(),
-                            program->kernel_data_size());
-      GrowableArray<intptr_t> subprogram_file_starts;
-      index_programs(&reader, &subprogram_file_starts);
+      loader.walk_incremental_kernel(modified_libs, is_empty_program,
+                                     p_num_classes, p_num_procedures);
+    }
+    kernel::Reader reader(program->kernel_data(), program->kernel_data_size());
+    GrowableArray<intptr_t> subprogram_file_starts;
+    index_programs(&reader, &subprogram_file_starts);
 
-      // Create "fake programs" for each sub-program.
-      intptr_t subprogram_count = subprogram_file_starts.length() - 1;
-      for (intptr_t i = 0; i < subprogram_count; ++i) {
-        intptr_t subprogram_start = subprogram_file_starts.At(i);
-        intptr_t subprogram_end = subprogram_file_starts.At(i + 1);
-        reader.set_raw_buffer(program->kernel_data() + subprogram_start);
-        reader.set_size(subprogram_end - subprogram_start);
-        reader.set_offset(0);
-        Program* subprogram = Program::ReadFrom(&reader);
-        ASSERT(subprogram->is_single_program());
-        KernelLoader loader(subprogram);
-        loader.walk_incremental_kernel(modified_libs, is_empty_program);
-        delete subprogram;
-      }
+    // Create "fake programs" for each sub-program.
+    intptr_t subprogram_count = subprogram_file_starts.length() - 1;
+    for (intptr_t i = 0; i < subprogram_count; ++i) {
+      intptr_t subprogram_start = subprogram_file_starts.At(i);
+      intptr_t subprogram_end = subprogram_file_starts.At(i + 1);
+      reader.set_raw_buffer(program->kernel_data() + subprogram_start);
+      reader.set_size(subprogram_end - subprogram_start);
+      reader.set_offset(0);
+      Program* subprogram = Program::ReadFrom(&reader);
+      ASSERT(subprogram->is_single_program());
+      KernelLoader loader(subprogram);
+      loader.walk_incremental_kernel(modified_libs, is_empty_program,
+                                     p_num_classes, p_num_procedures);
+      delete subprogram;
     }
   }
 }
 
 void KernelLoader::walk_incremental_kernel(BitVector* modified_libs,
-                                           bool* is_empty_program) {
+                                           bool* is_empty_program,
+                                           intptr_t* p_num_classes,
+                                           intptr_t* p_num_procedures) {
   intptr_t length = program_->library_count();
   *is_empty_program = *is_empty_program && (length == 0);
+  bool collect_library_stats =
+      p_num_classes != nullptr || p_num_procedures != nullptr;
+  intptr_t num_classes = 0;
+  intptr_t num_procedures = 0;
   Library& lib = Library::Handle(Z);
   for (intptr_t i = 0; i < length; i++) {
     intptr_t kernel_offset = library_offset(i);
@@ -780,6 +791,21 @@
       // This is a library that already exists so mark it as being modified.
       modified_libs->Add(lib.index());
     }
+    if (collect_library_stats) {
+      intptr_t library_end = library_offset(i + 1);
+      library_kernel_data_ =
+          helper_.reader_.ExternalDataFromTo(kernel_offset, library_end);
+
+      LibraryIndex library_index(library_kernel_data_);
+      num_classes += library_index.class_count();
+      num_procedures += library_index.procedure_count();
+    }
+  }
+  if (p_num_classes != nullptr) {
+    *p_num_classes += num_classes;
+  }
+  if (p_num_procedures != nullptr) {
+    *p_num_procedures += num_procedures;
   }
 }
 
@@ -1126,7 +1152,6 @@
   if (type_tag == kSomething) {
     AbstractType& super_type =
         T.BuildTypeWithoutFinalization();  // read super class type (part 2).
-    if (super_type.IsMalformed()) H.ReportError("Malformed super type");
     klass->set_super_type(super_type);
   }
 
@@ -1140,7 +1165,6 @@
   for (intptr_t i = 0; i < interface_count; i++) {
     const AbstractType& type =
         T.BuildTypeWithoutFinalization();  // read ith type.
-    if (type.IsMalformed()) H.ReportError("Malformed interface type.");
     interfaces.SetAt(i, type);
   }
   class_helper->SetJustRead(ClassHelper::kImplementedClasses);
@@ -1670,6 +1694,8 @@
                        script_class, procedure_helper.start_position_));
   function.set_has_pragma(has_pragma_annotation);
   function.set_end_token_pos(procedure_helper.end_position_);
+  function.set_is_no_such_method_forwarder(
+      procedure_helper.IsNoSuchMethodForwarder());
   if (register_function) {
     functions_.Add(&function);
   } else {
diff --git a/runtime/vm/kernel_loader.h b/runtime/vm/kernel_loader.h
index 9ad3b0a..e162a3a2 100644
--- a/runtime/vm/kernel_loader.h
+++ b/runtime/vm/kernel_loader.h
@@ -164,11 +164,17 @@
 
   // Finds all libraries that have been modified in this incremental
   // version of the kernel program file.
+  //
+  // When [force_reload] is false and if [p_num_classes], [p_num_procedures] are
+  // not nullptr, then they are populated with number of classes and top-level
+  // procedures in [program].
   static void FindModifiedLibraries(Program* program,
                                     Isolate* isolate,
                                     BitVector* modified_libs,
                                     bool force_reload,
-                                    bool* is_empty_kernel);
+                                    bool* is_empty_program,
+                                    intptr_t* p_num_classes,
+                                    intptr_t* p_num_procedures);
 
   RawLibrary* LoadLibrary(intptr_t index);
 
@@ -242,7 +248,9 @@
   static void index_programs(kernel::Reader* reader,
                              GrowableArray<intptr_t>* subprogram_file_starts);
   void walk_incremental_kernel(BitVector* modified_libs,
-                               bool* is_empty_program);
+                               bool* is_empty_program,
+                               intptr_t* p_num_classes,
+                               intptr_t* p_num_procedures);
 
   void LoadPreliminaryClass(ClassHelper* class_helper,
                             intptr_t type_parameter_count);
diff --git a/runtime/vm/longjump.cc b/runtime/vm/longjump.cc
index f5238c1..e56106c 100644
--- a/runtime/vm/longjump.cc
+++ b/runtime/vm/longjump.cc
@@ -9,7 +9,6 @@
 #include "vm/dart_api_impl.h"
 #include "vm/isolate.h"
 #include "vm/object.h"
-#include "vm/object_store.h"
 #include "vm/os.h"
 
 namespace dart {
@@ -24,8 +23,10 @@
   // A zero is the default return value from setting up a LongJumpScope
   // using Set.
   ASSERT(value != 0);
+  ASSERT(!error.IsNull());
 
   Thread* thread = Thread::Current();
+  DEBUG_ASSERT(thread->TopErrorHandlerIsSetJump());
 
 #if defined(DEBUG)
 #define CHECK_REUSABLE_HANDLE(name)                                            \
diff --git a/runtime/vm/longjump.h b/runtime/vm/longjump.h
index bb6a79c..9da35b9 100644
--- a/runtime/vm/longjump.h
+++ b/runtime/vm/longjump.h
@@ -19,14 +19,17 @@
   LongJumpScope()
       : StackResource(Thread::Current()),
         top_(NULL),
-        base_(Thread::Current()->long_jump_base()) {
-    Thread::Current()->set_long_jump_base(this);
+        base_(thread()->long_jump_base()) {
+    thread()->set_long_jump_base(this);
   }
 
-  ~LongJumpScope() { Thread::Current()->set_long_jump_base(base_); }
+  ~LongJumpScope() {
+    ASSERT(thread() == Thread::Current());
+    thread()->set_long_jump_base(base_);
+  }
 
   jmp_buf* Set();
-  void Jump(int value, const Error& error);
+  DART_NORETURN void Jump(int value, const Error& error);
 
  private:
   jmp_buf environment_;
diff --git a/runtime/vm/megamorphic_cache_table.cc b/runtime/vm/megamorphic_cache_table.cc
index 75d42a5a..eba6c5f 100644
--- a/runtime/vm/megamorphic_cache_table.cc
+++ b/runtime/vm/megamorphic_cache_table.cc
@@ -86,6 +86,21 @@
          Function::null());
   isolate->object_store()->SetMegamorphicMissHandler(code, function);
 }
+
+void MegamorphicCacheTable::ReInitMissHandlerCode(Isolate* isolate,
+                                                  ObjectPoolWrapper* wrapper) {
+  ASSERT(FLAG_precompiled_mode && FLAG_use_bare_instructions);
+
+  const Code& code = Code::Handle(StubCode::Generate(
+      "_stub_MegamorphicMiss", wrapper, StubCode::GenerateMegamorphicMissStub));
+  code.set_exception_handlers(Object::empty_exception_handlers());
+
+  auto object_store = isolate->object_store();
+  auto& function = Function::Handle(object_store->megamorphic_miss_function());
+  function.AttachCode(code);
+  object_store->SetMegamorphicMissHandler(code, function);
+}
+
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 void MegamorphicCacheTable::PrintSizes(Isolate* isolate) {
diff --git a/runtime/vm/megamorphic_cache_table.h b/runtime/vm/megamorphic_cache_table.h
index cc813e8..8d7788a 100644
--- a/runtime/vm/megamorphic_cache_table.h
+++ b/runtime/vm/megamorphic_cache_table.h
@@ -13,6 +13,7 @@
 class Function;
 class Isolate;
 class ObjectPointerVisitor;
+class ObjectPoolWrapper;
 class RawArray;
 class RawFunction;
 class RawCode;
@@ -25,6 +26,15 @@
   static RawFunction* miss_handler(Isolate* isolate);
   NOT_IN_PRECOMPILED(static void InitMissHandler(Isolate* isolate));
 
+  // Re-initializes the megamorphic miss handler function in the object store.
+  //
+  // Normally we initialize the megamorphic miss handler during isolate startup.
+  // Though if we AOT compile with bare instructions support, we need to
+  // re-generate the handler to ensure it uses the common object pool.
+  NOT_IN_PRECOMPILED(
+      static void ReInitMissHandlerCode(Isolate* isolate,
+                                        ObjectPoolWrapper* wrapper));
+
   static RawMegamorphicCache* Lookup(Isolate* isolate,
                                      const String& name,
                                      const Array& descriptor);
diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc
index 5c6e00a..6f12a68 100644
--- a/runtime/vm/native_api_impl.cc
+++ b/runtime/vm/native_api_impl.cc
@@ -17,16 +17,16 @@
 
 // --- Message sending/receiving from native code ---
 
-class IsolateSaver {
+class IsolateLeaveScope {
  public:
-  explicit IsolateSaver(Isolate* current_isolate)
+  explicit IsolateLeaveScope(Isolate* current_isolate)
       : saved_isolate_(current_isolate) {
     if (current_isolate != NULL) {
       ASSERT(current_isolate == Isolate::Current());
       Dart_ExitIsolate();
     }
   }
-  ~IsolateSaver() {
+  ~IsolateLeaveScope() {
     if (saved_isolate_ != NULL) {
       Dart_Isolate I = reinterpret_cast<Dart_Isolate>(saved_isolate_);
       Dart_EnterIsolate(I);
@@ -36,7 +36,7 @@
  private:
   Isolate* saved_isolate_;
 
-  DISALLOW_COPY_AND_ASSIGN(IsolateSaver);
+  DISALLOW_COPY_AND_ASSIGN(IsolateLeaveScope);
 };
 
 static bool PostCObjectHelper(Dart_Port port_id, Dart_CObject* message) {
@@ -79,7 +79,7 @@
     return ILLEGAL_PORT;
   }
   // Start the native port without a current isolate.
-  IsolateSaver saver(Isolate::Current());
+  IsolateLeaveScope saver(Isolate::Current());
 
   NativeMessageHandler* nmh = new NativeMessageHandler(name, handler);
   Dart_Port port_id = PortMap::CreatePort(nmh);
@@ -90,7 +90,7 @@
 
 DART_EXPORT bool Dart_CloseNativePort(Dart_Port native_port_id) {
   // Close the native port without a current isolate.
-  IsolateSaver saver(Isolate::Current());
+  IsolateLeaveScope saver(Isolate::Current());
 
   // TODO(turnidge): Check that the port is native before trying to close.
   return PortMap::ClosePort(native_port_id);
@@ -105,7 +105,7 @@
                                             char** error) {
   Isolate* isolate = Isolate::Current();
   ASSERT(isolate == nullptr || !isolate->is_service_isolate());
-  IsolateSaver saver(isolate);
+  IsolateLeaveScope saver(isolate);
 
   // We only allow one isolate reload at a time.  If this turns out to be on the
   // critical path, we can change it to have a global datastructure which is
diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h
index 7c2a30a..251740e 100644
--- a/runtime/vm/native_arguments.h
+++ b/runtime/vm/native_arguments.h
@@ -131,11 +131,33 @@
     return ArgAt(actual_index);
   }
 
-  RawTypeArguments* NativeTypeArgs() {
+  RawTypeArguments* NativeTypeArgs() const {
     ASSERT(ToGenericFunction());
     return TypeArguments::RawCast(ArgAt(0));
   }
 
+  int NativeTypeArgCount() const {
+    if (ToGenericFunction()) {
+      TypeArguments& type_args = TypeArguments::Handle(NativeTypeArgs());
+      if (type_args.IsNull()) {
+        // null vector represents infinite list of dynamics
+        return INT_MAX;
+      }
+      return type_args.Length();
+    }
+    return 0;
+  }
+
+  RawAbstractType* NativeTypeArgAt(int index) const {
+    ASSERT((index >= 0) && (index < NativeTypeArgCount()));
+    TypeArguments& type_args = TypeArguments::Handle(NativeTypeArgs());
+    if (type_args.IsNull()) {
+      // null vector represents infinite list of dynamics
+      return Type::dynamic_type().raw();
+    }
+    return TypeArguments::Handle(NativeTypeArgs()).TypeAt(index);
+  }
+
   void SetReturn(const Object& value) const { *retval_ = value.raw(); }
 
   RawObject* ReturnValue() const {
diff --git a/runtime/vm/native_entry.h b/runtime/vm/native_entry.h
index 0d7a930..b98e2f4 100644
--- a/runtime/vm/native_entry.h
+++ b/runtime/vm/native_entry.h
@@ -61,7 +61,7 @@
 #define SET_NATIVE_RETVAL(arguments, value) arguments->SetReturnUnsafe(value);
 #endif
 
-#define DEFINE_NATIVE_ENTRY(name, argument_count)                              \
+#define DEFINE_NATIVE_ENTRY(name, type_argument_count, argument_count)         \
   static RawObject* DN_Helper##name(Isolate* isolate, Thread* thread,          \
                                     Zone* zone, NativeArguments* arguments);   \
   void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) {                \
@@ -71,6 +71,8 @@
     /* Tell MemorySanitizer 'arguments' is initialized by generated code. */   \
     MSAN_UNPOISON(arguments, sizeof(*arguments));                              \
     ASSERT(arguments->NativeArgCount() == argument_count);                     \
+    /* Note: a longer type arguments vector may be passed */                   \
+    ASSERT(arguments->NativeTypeArgCount() >= type_argument_count);            \
     TRACE_NATIVE_CALL("%s", "" #name);                                         \
     {                                                                          \
       Thread* thread = arguments->thread();                                    \
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f10702a..55009dc 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -83,6 +83,7 @@
 DECLARE_FLAG(bool, trace_deoptimization_verbose);
 DECLARE_FLAG(bool, trace_reload);
 DECLARE_FLAG(bool, write_protect_code);
+DECLARE_FLAG(bool, precompiled_mode);
 
 static const char* const kGetterPrefix = "get:";
 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
@@ -869,7 +870,7 @@
   // initialized until now.
   Thread* thr = Thread::Current();
   ASSERT(thr != NULL);
-  thr->clear_sticky_error();
+  thr->ClearStickyError();
   thr->clear_pending_functions();
 
   ASSERT(!null_object_->IsSmi());
@@ -1343,7 +1344,7 @@
         GrowableObjectArray::type_arguments_offset());
     cls.set_num_type_arguments(1);
 
-    // Initialize hash set for canonical_type_.
+    // Initialize hash set for canonical types.
     const intptr_t kInitialCanonicalTypeSize = 16;
     array = HashTables::New<CanonicalTypeSet>(kInitialCanonicalTypeSize,
                                               Heap::kOld);
@@ -1360,10 +1361,6 @@
     const Class& type_ref_cls = Class::Handle(zone, Class::New<TypeRef>());
     const Class& type_parameter_cls =
         Class::Handle(zone, Class::New<TypeParameter>());
-    const Class& bounded_type_cls =
-        Class::Handle(zone, Class::New<BoundedType>());
-    const Class& mixin_app_type_cls =
-        Class::Handle(zone, Class::New<MixinAppType>());
     const Class& library_prefix_cls =
         Class::Handle(zone, Class::New<LibraryPrefix>());
 
@@ -1523,13 +1520,6 @@
                          core_lib);
     pending_classes.Add(type_parameter_cls);
 
-    RegisterPrivateClass(bounded_type_cls, Symbols::_BoundedType(), core_lib);
-    pending_classes.Add(bounded_type_cls);
-
-    RegisterPrivateClass(mixin_app_type_cls, Symbols::_MixinAppType(),
-                         core_lib);
-    pending_classes.Add(mixin_app_type_cls);
-
     cls = Class::New<Integer>();
     object_store->set_integer_implementation_class(cls);
     RegisterPrivateClass(cls, Symbols::_IntegerImplementation(), core_lib);
@@ -1865,8 +1855,6 @@
     cls = Class::New<Type>();
     cls = Class::New<TypeRef>();
     cls = Class::New<TypeParameter>();
-    cls = Class::New<BoundedType>();
-    cls = Class::New<MixinAppType>();
 
     cls = Class::New<Array>();
     object_store->set_array_class(cls);
@@ -2173,13 +2161,6 @@
   return ClassFinalizer::FinalizeType(*this, type);
 }
 
-RawAbstractType* Class::DeclarationType() const {
-  const TypeArguments& args = TypeArguments::Handle(type_parameters());
-  const Type& type =
-      Type::Handle(Type::New(*this, args, TokenPosition::kNoSource));
-  return ClassFinalizer::FinalizeType(*this, type);
-}
-
 template <class FakeObject>
 RawClass* Class::New() {
   ASSERT(Object::class_class() != Class::null());
@@ -2515,9 +2496,6 @@
 }
 
 intptr_t Class::NumTypeParameters(Thread* thread) const {
-  if (IsMixinApplication() && !is_mixin_type_applied()) {
-    ClassFinalizer::ApplyMixinType(*this);
-  }
   if (type_parameters() == TypeArguments::null()) {
     const intptr_t cid = id();
     if ((cid == kArrayCid) || (cid == kImmutableArrayCid) ||
@@ -2546,7 +2524,6 @@
     set_num_own_type_arguments(num_type_params);
     return num_type_params;
   }
-  ASSERT(!IsMixinApplication() || is_mixin_type_applied());
   const AbstractType& sup_type = AbstractType::Handle(zone, super_type());
   const TypeArguments& sup_type_args =
       TypeArguments::Handle(zone, sup_type.arguments());
@@ -2562,7 +2539,6 @@
   // The value of num_sup_type_args may increase when the super type is
   // finalized, but the last num_sup_type_args type arguments will not be
   // modified by finalization, only shifted to higher indices in the vector.
-  // They may however get wrapped in a BoundedType, which we skip.
   // The super type may not even be resolved yet. This is not necessary, since
   // we only check for matching type parameters, which are resolved by default.
   const TypeArguments& type_params =
@@ -2586,11 +2562,6 @@
       type_param ^= type_params.TypeAt(i);
       sup_type_arg = sup_type_args.TypeAt(num_sup_type_args -
                                           num_overlapping_type_args + i);
-      // BoundedType can nest in case the finalized super type has bounded type
-      // arguments that overlap multiple times in its own super class chain.
-      while (sup_type_arg.IsBoundedType()) {
-        sup_type_arg = BoundedType::Cast(sup_type_arg).type();
-      }
       if (!type_param.Equals(sup_type_arg)) break;
     }
     if (i == num_overlapping_type_args) {
@@ -2611,7 +2582,6 @@
   }
   // To work properly, this call requires the super class of this class to be
   // resolved, which is checked by the type_class() call on the super type.
-  // Note that calling type_class() on a MixinAppType fails.
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
@@ -2620,8 +2590,6 @@
   cls = raw();
   intptr_t num_type_args = 0;
   do {
-    // Calling NumOwnTypeArguments() on a mixin application class will setup the
-    // type parameters if not already done.
     num_type_args += cls.NumOwnTypeArguments();
     // Super type of Object class is null.
     if ((cls.super_type() == AbstractType::null()) ||
@@ -2629,10 +2597,9 @@
       break;
     }
     sup_type = cls.super_type();
-    // A BoundedType, TypeRef, or function type can appear as type argument of
+    // A TypeRef or function type can appear as type argument of
     // sup_type, but not as sup_type itself.
     ASSERT(sup_type.IsType());
-    ClassFinalizer::ResolveTypeClass(cls, Type::Cast(sup_type));
     cls = sup_type.type_class();
     ASSERT(!cls.IsTypedefClass());
   } while (true);
@@ -2661,8 +2628,7 @@
 }
 
 void Class::set_super_type(const AbstractType& value) const {
-  ASSERT(value.IsNull() || (value.IsType() && !value.IsDynamicType()) ||
-         value.IsMixinAppType());
+  ASSERT(value.IsNull() || (value.IsType() && !value.IsDynamicType()));
   StorePointer(&raw_ptr()->super_type_, value.raw());
 }
 
@@ -3047,31 +3013,17 @@
 bool AbstractType::InstantiateAndTestSubtype(
     AbstractType* subtype,
     AbstractType* supertype,
-    Error* bound_error,
     const TypeArguments& instantiator_type_args,
     const TypeArguments& function_type_args) {
   if (!subtype->IsInstantiated()) {
-    *subtype =
-        subtype->InstantiateFrom(instantiator_type_args, function_type_args,
-                                 kAllFree, bound_error, NULL, NULL, Heap::kOld);
-  }
-  if (!bound_error->IsNull()) {
-    return false;
+    *subtype = subtype->InstantiateFrom(
+        instantiator_type_args, function_type_args, kAllFree, NULL, Heap::kOld);
   }
   if (!supertype->IsInstantiated()) {
     *supertype = supertype->InstantiateFrom(
-        instantiator_type_args, function_type_args, kAllFree, bound_error, NULL,
-        NULL, Heap::kOld);
+        instantiator_type_args, function_type_args, kAllFree, NULL, Heap::kOld);
   }
-  if (!bound_error->IsNull()) {
-    return false;
-  }
-  bool is_subtype_of =
-      subtype->IsSubtypeOf(*supertype, bound_error, NULL, Heap::kOld);
-  if (!bound_error->IsNull()) {
-    return false;
-  }
-  return is_subtype_of;
+  return subtype->IsSubtypeOf(*supertype, Heap::kOld);
 }
 
 RawArray* Class::invocation_dispatcher_cache() const {
@@ -3192,181 +3144,10 @@
 #endif
 }
 
-bool Class::ValidatePostFinalizePatch(const Class& orig_class,
-                                      Error* error) const {
-  ASSERT(error != NULL);
-  // Not allowed to add new fields in a post finalization patch.
-  if (fields() != Object::empty_array().raw()) {
-    *error = LanguageError::NewFormatted(
-        *error,  // No previous error.
-        Script::Handle(script()), token_pos(), Report::AtLocation,
-        Report::kError, Heap::kNew,
-        "new fields are not allowed for this patch");
-    return false;
-  }
-  // There seem to be no functions, the patch is pointless.
-  if (functions() == Object::empty_array().raw()) {
-    *error = LanguageError::NewFormatted(*error,  // No previous error.
-                                         Script::Handle(script()), token_pos(),
-                                         Report::AtLocation, Report::kError,
-                                         Heap::kNew, "no functions to patch");
-    return false;
-  }
-  // Iterate over all functions that will be patched and make sure
-  // the original function was declared 'external' and has not executed
-  // so far i.e no code has been generated for it.
-  Thread* thread = Thread::Current();
-  ASSERT(thread->IsMutatorThread());
-  Zone* zone = thread->zone();
-  const Array& funcs = Array::Handle(zone, functions());
-  Function& func = Function::Handle(zone);
-  Function& orig_func = Function::Handle(zone);
-  String& name = String::Handle(zone);
-  for (intptr_t i = 0; i < funcs.Length(); i++) {
-    func ^= funcs.At(i);
-    name ^= func.name();
-    orig_func ^= orig_class.LookupFunctionAllowPrivate(name);
-    if (!orig_func.IsNull()) {
-      if (!orig_func.is_external() || orig_func.HasCode()) {
-        // We can only patch external functions in a post finalized class.
-        *error = LanguageError::NewFormatted(
-            *error,  // No previous error.
-            Script::Handle(script()), token_pos(), Report::AtLocation,
-            Report::kError, Heap::kNew,
-            !orig_func.is_external()
-                ? "'%s' is not external and therefore cannot be patched"
-                : "'%s' has already executed and therefore cannot be patched",
-            name.ToCString());
-        return false;
-      }
-    } else if (!Library::IsPrivate(name)) {
-      // We can only have new private functions that are added.
-      *error = LanguageError::NewFormatted(
-          *error,  // No previous error.
-          Script::Handle(script()), token_pos(), Report::AtLocation,
-          Report::kError, Heap::kNew,
-          "'%s' is not private and therefore cannot be patched",
-          name.ToCString());
-      return false;
-    }
-  }
-  return true;
-}
-
 void Class::set_dependent_code(const Array& array) const {
   StorePointer(&raw_ptr()->dependent_code_, array.raw());
 }
 
-// Apply the members from the patch class to the original class.
-bool Class::ApplyPatch(const Class& patch, Error* error) const {
-  ASSERT(error != NULL);
-  ASSERT(!is_finalized());
-  // Shared handles used during the iteration.
-  String& member_name = String::Handle();
-
-  const PatchClass& patch_class = PatchClass::Handle(
-      PatchClass::New(*this, Script::Handle(patch.script())));
-
-  Array& orig_list = Array::Handle(functions());
-  intptr_t orig_len = orig_list.Length();
-  Array& patch_list = Array::Handle(patch.functions());
-  intptr_t patch_len = patch_list.Length();
-
-  Function& func = Function::Handle();
-  Function& orig_func = Function::Handle();
-  // Lookup the original implicit constructor, if any.
-  member_name = Name();
-  member_name = String::Concat(member_name, Symbols::Dot());
-  Function& orig_implicit_ctor = Function::Handle(LookupFunction(member_name));
-  if (!orig_implicit_ctor.IsNull() &&
-      !orig_implicit_ctor.IsImplicitConstructor()) {
-    // Not an implicit constructor, but a user declared one.
-    orig_implicit_ctor = Function::null();
-  }
-  const GrowableObjectArray& new_functions =
-      GrowableObjectArray::Handle(GrowableObjectArray::New(orig_len));
-  for (intptr_t i = 0; i < orig_len; i++) {
-    orig_func ^= orig_list.At(i);
-    member_name ^= orig_func.name();
-    func = patch.LookupFunction(member_name);
-    if (func.IsNull()) {
-      // Non-patched function is preserved, all patched functions are added in
-      // the loop below.
-      // However, an implicitly created constructor should not be preserved if
-      // the patch provides a constructor or a factory. Wait for now.
-      if (orig_func.raw() != orig_implicit_ctor.raw()) {
-        new_functions.Add(orig_func);
-      }
-    } else if (func.UserVisibleSignature() !=
-               orig_func.UserVisibleSignature()) {
-      // Compare user visible signatures to ignore different implicit parameters
-      // when patching a constructor with a factory.
-      *error = LanguageError::NewFormatted(
-          *error,  // No previous error.
-          Script::Handle(patch.script()), func.token_pos(), Report::AtLocation,
-          Report::kError, Heap::kNew, "signature mismatch: '%s'",
-          member_name.ToCString());
-      return false;
-    }
-  }
-  for (intptr_t i = 0; i < patch_len; i++) {
-    func ^= patch_list.At(i);
-    if (func.IsGenerativeConstructor() || func.IsFactory()) {
-      // Do not preserve the original implicit constructor, if any.
-      orig_implicit_ctor = Function::null();
-    }
-    func.set_owner(patch_class);
-    new_functions.Add(func);
-  }
-  if (!orig_implicit_ctor.IsNull()) {
-    // Preserve the original implicit constructor.
-    new_functions.Add(orig_implicit_ctor);
-  }
-  Array& new_list = Array::Handle(Array::MakeFixedLength(new_functions));
-  SetFunctions(new_list);
-
-  // Merge the two list of fields. Raise an error when duplicates are found or
-  // when a public field is being added.
-  orig_list = fields();
-  orig_len = orig_list.Length();
-  patch_list = patch.fields();
-  patch_len = patch_list.Length();
-
-  Field& field = Field::Handle();
-  Field& orig_field = Field::Handle();
-  new_list = Array::New(patch_len + orig_len);
-  for (intptr_t i = 0; i < patch_len; i++) {
-    field ^= patch_list.At(i);
-    field.set_owner(patch_class);
-    member_name = field.name();
-    // TODO(iposva): Verify non-public fields only.
-
-    // Verify no duplicate additions.
-    orig_field ^= LookupField(member_name);
-    if (!orig_field.IsNull()) {
-      *error = LanguageError::NewFormatted(
-          *error,  // No previous error.
-          Script::Handle(patch.script()), field.token_pos(), Report::AtLocation,
-          Report::kError, Heap::kNew, "duplicate field: %s",
-          member_name.ToCString());
-      return false;
-    }
-    new_list.SetAt(i, field);
-  }
-  for (intptr_t i = 0; i < orig_len; i++) {
-    field ^= orig_list.At(i);
-    new_list.SetAt(patch_len + i, field);
-  }
-  SetFields(new_list);
-
-  // The functions and fields in the patch class are no longer needed.
-  // The patch class itself is also no longer needed.
-  patch.SetFunctions(Object::empty_array());
-  patch.SetFields(Object::empty_array());
-  Library::Handle(patch.library()).RemovePatchClass(patch);
-  return true;
-}
-
 // Conventions:
 // * For throwing a NSM in a class klass we use its runtime type as receiver,
 //   i.e., klass.RareType().
@@ -3398,6 +3179,25 @@
   return DartEntry::InvokeFunction(throwNew, args);
 }
 
+static RawObject* ThrowTypeError(const TokenPosition token_pos,
+                                 const Instance& src_value,
+                                 const AbstractType& dst_type,
+                                 const String& dst_name) {
+  const Array& args = Array::Handle(Array::New(4));
+  const Smi& pos = Smi::Handle(Smi::New(token_pos.value()));
+  args.SetAt(0, pos);
+  args.SetAt(1, src_value);
+  args.SetAt(2, dst_type);
+  args.SetAt(3, dst_name);
+
+  const Library& libcore = Library::Handle(Library::CoreLibrary());
+  const Class& TypeError =
+      Class::Handle(libcore.LookupClassAllowPrivate(Symbols::TypeError()));
+  const Function& throwNew = Function::Handle(
+      TypeError.LookupFunctionAllowPrivate(Symbols::ThrowNew()));
+  return DartEntry::InvokeFunction(throwNew, args);
+}
+
 RawObject* Class::InvokeGetter(const String& getter_name,
                                bool throw_nsm_if_absent,
                                bool respect_reflectable) const {
@@ -3462,21 +3262,31 @@
   const String& internal_setter_name =
       String::Handle(zone, Field::SetterName(setter_name));
 
+  AbstractType& parameter_type = AbstractType::Handle(zone);
+  AbstractType& argument_type =
+      AbstractType::Handle(zone, value.GetType(Heap::kOld));
+
   if (field.IsNull()) {
     const Function& setter =
         Function::Handle(zone, LookupStaticFunction(internal_setter_name));
-
     const int kNumArgs = 1;
     const Array& args = Array::Handle(zone, Array::New(kNumArgs));
     args.SetAt(0, value);
-
     if (setter.IsNull() || (respect_reflectable && !setter.is_reflectable())) {
       return ThrowNoSuchMethod(AbstractType::Handle(zone, RareType()),
                                internal_setter_name, args, Object::null_array(),
                                InvocationMirror::kStatic,
                                InvocationMirror::kSetter);
     }
-
+    parameter_type ^= setter.ParameterTypeAt(0);
+    if (!argument_type.IsNullType() && !parameter_type.IsDynamicType() &&
+        !value.IsInstanceOf(parameter_type, Object::null_type_arguments(),
+                            Object::null_type_arguments())) {
+      const String& argument_name =
+          String::Handle(zone, setter.ParameterNameAt(0));
+      return ThrowTypeError(setter.token_pos(), value, parameter_type,
+                            argument_name);
+    }
     // Invoke the setter and return the result.
     return DartEntry::InvokeFunction(setter, args);
   }
@@ -3485,13 +3295,20 @@
     const int kNumArgs = 1;
     const Array& args = Array::Handle(zone, Array::New(kNumArgs));
     args.SetAt(0, value);
-
     return ThrowNoSuchMethod(AbstractType::Handle(zone, RareType()),
                              internal_setter_name, args, Object::null_array(),
                              InvocationMirror::kStatic,
                              InvocationMirror::kSetter);
   }
 
+  parameter_type ^= field.type();
+  if (!argument_type.IsNullType() && !parameter_type.IsDynamicType() &&
+      !value.IsInstanceOf(parameter_type, Object::null_type_arguments(),
+                          Object::null_type_arguments())) {
+    const String& argument_name = String::Handle(zone, field.name());
+    return ThrowTypeError(field.token_pos(), value, parameter_type,
+                          argument_name);
+  }
   field.SetStaticValue(value);
   return value.raw();
 }
@@ -3541,19 +3358,21 @@
       return DartEntry::InvokeClosure(call_args, call_args_descriptor_array);
     }
   }
-
   const Array& args_descriptor_array = Array::Handle(
       zone, ArgumentsDescriptor::New(kTypeArgsLen, args.Length(), arg_names));
-
   ArgumentsDescriptor args_descriptor(args_descriptor_array);
-
+  const TypeArguments& type_args = Object::null_type_arguments();
   if (function.IsNull() || !function.AreValidArguments(args_descriptor, NULL) ||
       (respect_reflectable && !function.is_reflectable())) {
     return ThrowNoSuchMethod(
         AbstractType::Handle(zone, RareType()), function_name, args, arg_names,
         InvocationMirror::kStatic, InvocationMirror::kMethod);
   }
-
+  RawObject* type_error =
+      function.DoArgumentTypesMatch(args, args_descriptor, type_args);
+  if (type_error != Error::null()) {
+    return type_error;
+  }
   return DartEntry::InvokeFunction(function, args, args_descriptor_array);
 }
 
@@ -3600,7 +3419,7 @@
   ASSERT(thread->IsMutatorThread());
   ASSERT(thread != NULL);
   const Error& error =
-      Error::Handle(thread->zone(), Compiler::CompileClass(*this));
+      Error::Handle(thread->zone(), ClassFinalizer::LoadClassMembers(*this));
   if (!error.IsNull()) {
     ASSERT(thread == Thread::Current());
     if (thread->long_jump_base() != NULL) {
@@ -3999,7 +3818,7 @@
   return TokenPosition::kNoSource;
 #else
   // Return the begin token for synthetic classes.
-  if (is_synthesized_class() || IsMixinApplication() || IsTopLevel()) {
+  if (is_synthesized_class() || IsTopLevel()) {
     return token_pos();
   }
 
@@ -4087,14 +3906,6 @@
   set_state_bits(ConstBit::update(true, raw_ptr()->state_bits_));
 }
 
-void Class::set_is_mixin_app_alias() const {
-  set_state_bits(MixinAppAliasBit::update(true, raw_ptr()->state_bits_));
-}
-
-void Class::set_is_mixin_type_applied() const {
-  set_state_bits(MixinTypeAppliedBit::update(true, raw_ptr()->state_bits_));
-}
-
 void Class::set_is_transformed_mixin_application() const {
   set_state_bits(
       TransformedMixinApplicationBit::update(true, raw_ptr()->state_bits_));
@@ -4119,13 +3930,6 @@
       ClassFinalizedBits::update(RawClass::kFinalized, raw_ptr()->state_bits_));
 }
 
-void Class::SetRefinalizeAfterPatch() const {
-  ASSERT(!IsTopLevel());
-  set_state_bits(ClassFinalizedBits::update(RawClass::kRefinalizeAfterPatch,
-                                            raw_ptr()->state_bits_));
-  set_state_bits(TypeFinalizedBit::update(false, raw_ptr()->state_bits_));
-}
-
 void Class::ResetFinalization() const {
   ASSERT(IsTopLevel() || IsClosureClass());
   set_state_bits(
@@ -4139,12 +3943,13 @@
                                             raw_ptr()->state_bits_));
 }
 
-void Class::set_is_marked_for_parsing() const {
-  set_state_bits(MarkedForParsingBit::update(true, raw_ptr()->state_bits_));
+void Class::set_is_marked_for_lazy_loading() const {
+  set_state_bits(MarkedForLazyLoadingBit::update(true, raw_ptr()->state_bits_));
 }
 
-void Class::reset_is_marked_for_parsing() const {
-  set_state_bits(MarkedForParsingBit::update(false, raw_ptr()->state_bits_));
+void Class::reset_is_marked_for_lazy_loading() const {
+  set_state_bits(
+      MarkedForLazyLoadingBit::update(false, raw_ptr()->state_bits_));
 }
 
 void Class::set_interfaces(const Array& value) const {
@@ -4152,15 +3957,6 @@
   StorePointer(&raw_ptr()->interfaces_, value.raw());
 }
 
-void Class::set_mixin(const Type& value) const {
-  ASSERT(!value.IsNull());
-  StorePointer(&raw_ptr()->mixin_, value.raw());
-}
-
-bool Class::IsMixinApplication() const {
-  return mixin() != Type::null();
-}
-
 RawClass* Class::GetPatchClass() const {
   const Library& lib = Library::Handle(library());
   return lib.GetPatchClass(String::Handle(Name()));
@@ -4221,23 +4017,22 @@
   StorePointer(&raw_ptr()->constants_, value.raw());
 }
 
-RawType* Class::canonical_type() const {
-  return raw_ptr()->canonical_type_;
-}
-
-void Class::set_canonical_type(const Type& value) const {
+void Class::set_declaration_type(const Type& value) const {
   ASSERT(!value.IsNull() && value.IsCanonical() && value.IsOld());
-  StorePointer(&raw_ptr()->canonical_type_, value.raw());
+  ASSERT((declaration_type() == Object::null()) ||
+         (declaration_type() == value.raw()));  // Set during own finalization.
+  StorePointer(&raw_ptr()->declaration_type_, value.raw());
 }
 
-RawType* Class::CanonicalType() const {
-  return raw_ptr()->canonical_type_;
-}
-
-void Class::SetCanonicalType(const Type& type) const {
-  ASSERT((canonical_type() == Object::null()) ||
-         (canonical_type() == type.raw()));  // Set during own finalization.
-  set_canonical_type(type);
+RawType* Class::DeclarationType() const {
+  if (declaration_type() != Type::null()) {
+    return declaration_type();
+  }
+  Type& type = Type::Handle(
+      Type::New(*this, TypeArguments::Handle(type_parameters()), token_pos()));
+  type ^= ClassFinalizer::FinalizeType(*this, type);
+  set_declaration_type(type);
+  return type.raw();
 }
 
 void Class::set_allocation_stub(const Code& value) const {
@@ -4280,20 +4075,16 @@
          (library() == Library::AsyncLibrary());
 }
 
-// If test_kind == kIsSubtypeOf, checks if type S is a subtype of type T.
-// If test_kind == kIsMoreSpecificThan, checks if S is more specific than T.
-// Type S is specified by this class parameterized with 'type_arguments', and
+// Checks if type S is a subtype of type T.
+// Type S is specified by class 'cls' parameterized with 'type_arguments', and
 // type T by class 'other' parameterized with 'other_type_arguments'.
 // This class and class 'other' do not need to be finalized, however, they must
 // be resolved as well as their interfaces.
-bool Class::TypeTestNonRecursive(const Class& cls,
-                                 Class::TypeTestKind test_kind,
-                                 const TypeArguments& type_arguments,
-                                 const Class& other,
-                                 const TypeArguments& other_type_arguments,
-                                 Error* bound_error,
-                                 TrailPtr bound_trail,
-                                 Heap::Space space) {
+bool Class::IsSubtypeOf(const Class& cls,
+                        const TypeArguments& type_arguments,
+                        const Class& other,
+                        const TypeArguments& other_type_arguments,
+                        Heap::Space space) {
   // Use the 'this_class' object as if it was the receiver of this method, but
   // instead of recursing, reset it to the super class and loop.
   Thread* thread = Thread::Current();
@@ -4311,11 +4102,9 @@
     if (this_class.IsNullClass()) {
       return true;
     }
-    // In strong mode, check if 'other' is 'FutureOr'.
-    // If so, apply additional subtyping rules.
-    if (this_class.FutureOrTypeTest(zone, type_arguments, other,
-                                    other_type_arguments, bound_error,
-                                    bound_trail, space)) {
+    // Apply additional subtyping rules if 'other' is 'FutureOr'.
+    if (Class::IsSubtypeOfFutureOr(zone, this_class, type_arguments, other,
+                                   other_type_arguments, space)) {
       return true;
     }
     // DynamicType is not more specific than any type.
@@ -4349,9 +4138,8 @@
         // above.
         return false;
       }
-      return type_arguments.TypeTest(test_kind, other_type_arguments,
-                                     from_index, num_type_params, bound_error,
-                                     bound_trail, space);
+      return type_arguments.IsSubtypeOf(other_type_arguments, from_index,
+                                        num_type_params, space);
     }
     // Check for 'direct super type' specified in the implements clause
     // and check for transitivity at the same time.
@@ -4359,7 +4147,6 @@
     AbstractType& interface = AbstractType::Handle(zone);
     Class& interface_class = Class::Handle(zone);
     TypeArguments& interface_args = TypeArguments::Handle(zone);
-    Error& error = Error::Handle(zone);
     for (intptr_t i = 0; i < interfaces.Length(); i++) {
       interface ^= interfaces.At(i);
       if (!interface.IsFinalized()) {
@@ -4374,13 +4161,6 @@
         ClassFinalizer::FinalizeType(this_class, interface);
         interfaces.SetAt(i, interface);
       }
-      if (interface.IsMalbounded()) {
-        // Return the first bound error to the caller if it requests it.
-        if ((bound_error != NULL) && bound_error->IsNull()) {
-          *bound_error = interface.error();
-        }
-        continue;  // Another interface may work better.
-      }
       interface_class = interface.type_class();
       interface_args = interface.arguments();
       if (!interface_args.IsNull() && !interface_args.IsInstantiated()) {
@@ -4392,25 +4172,16 @@
         // parameters of the interface are at the end of the type vector,
         // after the type arguments of the super type of this type.
         // The index of the type parameters is adjusted upon finalization.
-        error = Error::null();
         interface_args = interface_args.InstantiateFrom(
-            type_arguments, Object::null_type_arguments(), kNoneFree, &error,
-            NULL, bound_trail, space);
-        if (!error.IsNull()) {
-          // Return the first bound error to the caller if it requests it.
-          if ((bound_error != NULL) && bound_error->IsNull()) {
-            *bound_error = error.raw();
-          }
-          continue;  // Another interface may work better.
-        }
+            type_arguments, Object::null_type_arguments(), kNoneFree, NULL,
+            space);
       }
       // In Dart 2, implementing Function has no meaning.
       if (interface_class.IsDartFunctionClass()) {
         continue;
       }
-      if (interface_class.TypeTest(test_kind, interface_args, other,
-                                   other_type_arguments, bound_error,
-                                   bound_trail, space)) {
+      if (Class::IsSubtypeOf(interface_class, interface_args, other,
+                             other_type_arguments, space)) {
         return true;
       }
     }
@@ -4424,33 +4195,12 @@
   return false;
 }
 
-// If test_kind == kIsSubtypeOf, checks if type S is a subtype of type T.
-// If test_kind == kIsMoreSpecificThan, checks if S is more specific than T.
-// Type S is specified by this class parameterized with 'type_arguments', and
-// type T by class 'other' parameterized with 'other_type_arguments'.
-// This class and class 'other' do not need to be finalized, however, they must
-// be resolved as well as their interfaces.
-bool Class::TypeTest(TypeTestKind test_kind,
-                     const TypeArguments& type_arguments,
-                     const Class& other,
-                     const TypeArguments& other_type_arguments,
-                     Error* bound_error,
-                     TrailPtr bound_trail,
-                     Heap::Space space) const {
-  return TypeTestNonRecursive(*this, test_kind, type_arguments, other,
-                              other_type_arguments, bound_error, bound_trail,
-                              space);
-}
-
-bool Class::FutureOrTypeTest(Zone* zone,
-                             const TypeArguments& type_arguments,
-                             const Class& other,
-                             const TypeArguments& other_type_arguments,
-                             Error* bound_error,
-                             TrailPtr bound_trail,
-                             Heap::Space space) const {
-  // In strong mode, there is no difference between 'is subtype of' and
-  // 'is more specific than'.
+bool Class::IsSubtypeOfFutureOr(Zone* zone,
+                                const Class& cls,
+                                const TypeArguments& type_arguments,
+                                const Class& other,
+                                const TypeArguments& other_type_arguments,
+                                Heap::Space space) {
   if (other.IsFutureOrClass()) {
     if (other_type_arguments.IsNull()) {
       return true;
@@ -4460,19 +4210,18 @@
     if (other_type_arg.IsTopType()) {
       return true;
     }
-    if (!type_arguments.IsNull() && IsFutureClass()) {
+    if (!type_arguments.IsNull() && cls.IsFutureClass()) {
       const AbstractType& type_arg =
           AbstractType::Handle(zone, type_arguments.TypeAt(0));
-      if (type_arg.TypeTest(Class::kIsSubtypeOf, other_type_arg, bound_error,
-                            bound_trail, space)) {
+      if (type_arg.IsSubtypeOf(other_type_arg, space)) {
         return true;
       }
     }
     if (other_type_arg.HasTypeClass() &&
-        TypeTest(Class::kIsSubtypeOf, type_arguments,
-                 Class::Handle(zone, other_type_arg.type_class()),
-                 TypeArguments::Handle(other_type_arg.arguments()), bound_error,
-                 bound_trail, space)) {
+        Class::IsSubtypeOf(cls, type_arguments,
+                           Class::Handle(zone, other_type_arg.type_class()),
+                           TypeArguments::Handle(other_type_arg.arguments()),
+                           space)) {
       return true;
     }
   }
@@ -5103,7 +4852,6 @@
       type = TypeAt(from_index + i);
       name = type.BuildName(name_visibility);
     } else {
-      // Show dynamic type argument in strong mode.
       name = Symbols::Dynamic().raw();
     }
     pieces.Add(name);
@@ -5160,18 +4908,6 @@
   return false;
 }
 
-void TypeArguments::SetScopeFunction(const Function& function) const {
-  if (IsNull()) return;
-  const intptr_t num_types = Length();
-  AbstractType& type = AbstractType::Handle();
-  for (intptr_t i = 0; i < num_types; i++) {
-    type = TypeAt(i);
-    if (!type.IsNull()) {
-      type.SetScopeFunction(function);
-    }
-  }
-}
-
 bool TypeArguments::IsDynamicTypes(bool raw_instantiated,
                                    intptr_t from_index,
                                    intptr_t len) const {
@@ -5185,8 +4921,7 @@
     }
     if (!type.HasTypeClass()) {
       if (raw_instantiated && type.IsTypeParameter()) {
-        // An uninstantiated type parameter is equivalent to dynamic (even in
-        // the presence of a malformed bound in checked mode).
+        // An uninstantiated type parameter is equivalent to dynamic.
         continue;
       }
       return false;
@@ -5211,13 +4946,10 @@
   return true;
 }
 
-bool TypeArguments::TypeTest(TypeTestKind test_kind,
-                             const TypeArguments& other,
-                             intptr_t from_index,
-                             intptr_t len,
-                             Error* bound_error,
-                             TrailPtr bound_trail,
-                             Heap::Space space) const {
+bool TypeArguments::IsSubtypeOf(const TypeArguments& other,
+                                intptr_t from_index,
+                                intptr_t len,
+                                Heap::Space space) const {
   ASSERT(Length() >= (from_index + len));
   ASSERT(!other.IsNull());
   ASSERT(other.Length() >= (from_index + len));
@@ -5227,8 +4959,7 @@
     type = TypeAt(from_index + i);
     other_type = other.TypeAt(from_index + i);
     if (type.IsNull() || other_type.IsNull() ||
-        !type.TypeTest(test_kind, other_type, bound_error, bound_trail,
-                       space)) {
+        !type.IsSubtypeOf(other_type, space)) {
       return false;
     }
   }
@@ -5278,21 +5009,6 @@
   StorePointer(TypeAddr(index), value.raw());
 }
 
-bool TypeArguments::IsResolved() const {
-  if (IsCanonical()) {
-    return true;
-  }
-  AbstractType& type = AbstractType::Handle();
-  const intptr_t num_types = Length();
-  for (intptr_t i = 0; i < num_types; i++) {
-    type = TypeAt(i);
-    if (!type.IsResolved()) {
-      return false;
-    }
-  }
-  return true;
-}
-
 bool TypeArguments::IsSubvectorInstantiated(intptr_t from_index,
                                             intptr_t len,
                                             Genericity genericity,
@@ -5332,15 +5048,11 @@
     if ((type_param.index() != i) || type_param.IsFunctionTypeParameter()) {
       return false;
     }
-    // TODO(regis): Do the bounds really matter, since they are checked at
-    // finalization time (creating BoundedTypes where required)? Understand
-    // why ignoring bounds here causes failures.
     // If this type parameter specifies an upper bound, then the type argument
     // vector does not really represent the identity vector. It cannot be
     // substituted by the instantiator's type argument vector without checking
     // the upper bound.
     const AbstractType& bound = AbstractType::Handle(type_param.bound());
-    ASSERT(bound.IsResolved());
     if (!bound.IsObjectType() && !bound.IsDynamicType()) {
       return false;
     }
@@ -5463,38 +5175,11 @@
   return true;
 }
 
-bool TypeArguments::IsBounded() const {
-  AbstractType& type = AbstractType::Handle();
-  const intptr_t num_types = Length();
-  for (intptr_t i = 0; i < num_types; i++) {
-    type = TypeAt(i);
-    if (type.IsBoundedType()) {
-      return true;
-    }
-    if (type.IsTypeParameter()) {
-      const AbstractType& bound =
-          AbstractType::Handle(TypeParameter::Cast(type).bound());
-      if (!bound.IsObjectType() && !bound.IsDynamicType()) {
-        return true;
-      }
-      continue;
-    }
-    const TypeArguments& type_args =
-        TypeArguments::Handle(Type::Cast(type).arguments());
-    if (!type_args.IsNull() && type_args.IsBounded()) {
-      return true;
-    }
-  }
-  return false;
-}
-
 RawTypeArguments* TypeArguments::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     const TypeArguments& function_type_arguments,
     intptr_t num_free_fun_type_params,
-    Error* bound_error,
     TrailPtr instantiation_trail,
-    TrailPtr bound_trail,
     Heap::Space space) const {
   ASSERT(!IsInstantiated(kAny, num_free_fun_type_params));
   if ((instantiator_type_arguments.IsNull() ||
@@ -5516,10 +5201,14 @@
     // type before A is marked as finalized.
     if (!type.IsNull() &&
         !type.IsInstantiated(kAny, num_free_fun_type_params)) {
-      type = type.InstantiateFrom(instantiator_type_arguments,
-                                  function_type_arguments,
-                                  num_free_fun_type_params, bound_error,
-                                  instantiation_trail, bound_trail, space);
+      type = type.InstantiateFrom(
+          instantiator_type_arguments, function_type_arguments,
+          num_free_fun_type_params, instantiation_trail, space);
+      // A returned null type indicates a failed instantiation in dead code that
+      // must be propagated up to the caller, the optimizing compiler.
+      if (type.IsNull()) {
+        return Object::empty_type_arguments().raw();
+      }
     }
     instantiated_array.SetTypeAt(i, type);
   }
@@ -5528,8 +5217,7 @@
 
 RawTypeArguments* TypeArguments::InstantiateAndCanonicalizeFrom(
     const TypeArguments& instantiator_type_arguments,
-    const TypeArguments& function_type_arguments,
-    Error* bound_error) const {
+    const TypeArguments& function_type_arguments) const {
   ASSERT(!IsInstantiated());
   ASSERT(instantiator_type_arguments.IsNull() ||
          instantiator_type_arguments.IsCanonical());
@@ -5555,10 +5243,7 @@
   // Cache lookup failed. Instantiate the type arguments.
   TypeArguments& result = TypeArguments::Handle();
   result = InstantiateFrom(instantiator_type_arguments, function_type_arguments,
-                           kAllFree, bound_error, NULL, NULL, Heap::kOld);
-  if ((bound_error != NULL) && !bound_error->IsNull()) {
-    return result.raw();
-  }
+                           kAllFree, NULL, Heap::kOld);
   // Instantiation did not result in bound error. Canonicalize type arguments.
   result = result.Canonicalize();
   // InstantiateAndCanonicalizeFrom is not reentrant. It cannot have been called
@@ -5620,44 +5305,6 @@
   StoreSmi(&raw_ptr()->length_, Smi::New(value));
 }
 
-RawTypeArguments* TypeArguments::CloneUnfinalized() const {
-  if (IsNull() || IsFinalized()) {
-    return raw();
-  }
-  ASSERT(IsResolved());
-  AbstractType& type = AbstractType::Handle();
-  const intptr_t num_types = Length();
-  const TypeArguments& clone =
-      TypeArguments::Handle(TypeArguments::New(num_types));
-  for (intptr_t i = 0; i < num_types; i++) {
-    type = TypeAt(i);
-    type = type.CloneUnfinalized();
-    clone.SetTypeAt(i, type);
-  }
-  ASSERT(clone.IsResolved());
-  return clone.raw();
-}
-
-RawTypeArguments* TypeArguments::CloneUninstantiated(const Class& new_owner,
-                                                     TrailPtr trail) const {
-  ASSERT(!IsNull());
-  ASSERT(IsFinalized());
-  ASSERT(!IsInstantiated());
-  AbstractType& type = AbstractType::Handle();
-  const intptr_t num_types = Length();
-  const TypeArguments& clone =
-      TypeArguments::Handle(TypeArguments::New(num_types));
-  for (intptr_t i = 0; i < num_types; i++) {
-    type = TypeAt(i);
-    if (!type.IsInstantiated()) {
-      type = type.CloneUninstantiated(new_owner, trail);
-    }
-    clone.SetTypeAt(i, type);
-  }
-  ASSERT(clone.IsFinalized());
-  return clone.raw();
-}
-
 RawTypeArguments* TypeArguments::Canonicalize(TrailPtr trail) const {
   if (IsNull() || IsCanonical()) {
     ASSERT(IsOld());
@@ -5949,8 +5596,9 @@
 
 void Function::EnsureHasCompiledUnoptimizedCode() const {
   Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
   ASSERT(thread->IsMutatorThread());
+  DEBUG_ASSERT(thread->TopErrorHandlerIsExitFrame());
+  Zone* zone = thread->zone();
 
   const Error& error =
       Error::Handle(zone, Compiler::EnsureUnoptimizedCode(thread, *this));
@@ -5965,6 +5613,7 @@
   Isolate* isolate = thread->isolate();
   Zone* zone = thread->zone();
   ASSERT(thread->IsMutatorThread());
+  // TODO(35224): DEBUG_ASSERT(thread->TopErrorHandlerIsExitFrame());
   const Code& current_code = Code::Handle(zone, CurrentCode());
 
   if (FLAG_trace_deoptimization_verbose) {
@@ -6903,6 +6552,87 @@
   return true;
 }
 
+RawObject* Function::DoArgumentTypesMatch(
+    const Array& args,
+    const ArgumentsDescriptor& args_desc,
+    const TypeArguments& instantiator_type_args) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Function& instantiated_func = Function::Handle(zone, raw());
+
+  if (!HasInstantiatedSignature()) {
+    instantiated_func ^= InstantiateSignatureFrom(instantiator_type_args,
+                                                  Object::null_type_arguments(),
+                                                  kAllFree, Heap::kOld);
+  }
+  AbstractType& argument_type = AbstractType::Handle(zone);
+  AbstractType& parameter_type = AbstractType::Handle(zone);
+  Instance& argument = Instance::Handle(zone);
+
+  // Check types of the provided arguments against the expected parameter types.
+  for (intptr_t i = args_desc.FirstArgIndex(); i < args_desc.PositionalCount();
+       ++i) {
+    argument ^= args.At(i);
+    argument_type ^= argument.GetType(Heap::kOld);
+    parameter_type ^= instantiated_func.ParameterTypeAt(i);
+
+    // If the argument type is dynamic or the parameter is null, move on.
+    if (parameter_type.IsDynamicType() || argument_type.IsNullType()) {
+      continue;
+    }
+    if (!argument.IsInstanceOf(parameter_type, instantiator_type_args,
+                               Object::null_type_arguments())) {
+      String& argument_name = String::Handle(zone, ParameterNameAt(i));
+      return ThrowTypeError(token_pos(), argument, parameter_type,
+                            argument_name);
+    }
+  }
+
+  const intptr_t num_arguments = args_desc.Count();
+  const intptr_t num_named_arguments = args_desc.NamedCount();
+  if (num_named_arguments == 0) {
+    return Error::null();
+  }
+
+  String& argument_name = String::Handle(zone);
+  String& parameter_name = String::Handle(zone);
+
+  // Check types of named arguments against expected parameter type.
+  for (intptr_t i = 0; i < num_named_arguments; i++) {
+    argument_name ^= args_desc.NameAt(i);
+    ASSERT(argument_name.IsSymbol());
+    bool found = false;
+    const intptr_t num_positional_args = num_arguments - num_named_arguments;
+    const int num_parameters = NumParameters();
+
+    // Try to find the named parameter that matches the provided argument.
+    for (intptr_t j = num_positional_args; !found && (j < num_parameters);
+         j++) {
+      parameter_name = ParameterNameAt(j);
+      ASSERT(argument_name.IsSymbol());
+      if (argument_name.Equals(parameter_name)) {
+        found = true;
+        argument ^= args.At(args_desc.PositionAt(i));
+        argument_type ^= argument.GetType(Heap::kOld);
+        parameter_type ^= instantiated_func.ParameterTypeAt(j);
+
+        // If the argument type is dynamic or the parameter is null, move on.
+        if (parameter_type.IsDynamicType() || argument_type.IsNullType()) {
+          continue;
+        }
+        if (!argument.IsInstanceOf(parameter_type, instantiator_type_args,
+                                   Object::null_type_arguments())) {
+          String& argument_name = String::Handle(zone, ParameterNameAt(i));
+          return ThrowTypeError(token_pos(), argument, parameter_type,
+                                argument_name);
+        }
+      }
+    }
+    ASSERT(found);
+  }
+  return Error::null();
+}
+
 // Helper allocating a C string buffer in the zone, printing the fully qualified
 // name of a function in it, and replacing ':' by '_' to make sure the
 // constructed name is a valid C++ identifier for debugging purpose.
@@ -7046,9 +6776,14 @@
         type_param ^= type_params.TypeAt(i);
         type = type_param.bound();
         if (!type.IsInstantiated(kAny, num_free_fun_type_params)) {
-          type = type.InstantiateFrom(
-              instantiator_type_arguments, function_type_arguments,
-              num_free_fun_type_params, NULL, NULL, NULL, space);
+          type = type.InstantiateFrom(instantiator_type_arguments,
+                                      function_type_arguments,
+                                      num_free_fun_type_params, NULL, space);
+          // A returned null type indicates a failed instantiation in dead code
+          // that must be propagated up to the caller, the optimizing compiler.
+          if (type.IsNull()) {
+            return Function::null();
+          }
           cls = type_param.parameterized_class();
           param_name = type_param.name();
           ASSERT(type_param.IsFinalized());
@@ -7076,9 +6811,14 @@
 
   type = result_type();
   if (!type.IsInstantiated(kAny, num_free_fun_type_params)) {
-    type = type.InstantiateFrom(
-        instantiator_type_arguments, function_type_arguments,
-        num_free_fun_type_params, NULL, NULL, NULL, space);
+    type = type.InstantiateFrom(instantiator_type_arguments,
+                                function_type_arguments,
+                                num_free_fun_type_params, NULL, space);
+    // A returned null type indicates a failed instantiation in dead code that
+    // must be propagated up to the caller, the optimizing compiler.
+    if (type.IsNull()) {
+      return Function::null();
+    }
   }
   sig.set_result_type(type);
   const intptr_t num_params = NumParameters();
@@ -7089,9 +6829,14 @@
   for (intptr_t i = 0; i < num_params; i++) {
     type = ParameterTypeAt(i);
     if (!type.IsInstantiated(kAny, num_free_fun_type_params)) {
-      type = type.InstantiateFrom(
-          instantiator_type_arguments, function_type_arguments,
-          num_free_fun_type_params, NULL, NULL, NULL, space);
+      type = type.InstantiateFrom(instantiator_type_arguments,
+                                  function_type_arguments,
+                                  num_free_fun_type_params, NULL, space);
+      // A returned null type indicates a failed instantiation in dead code that
+      // must be propagated up to the caller, the optimizing compiler.
+      if (type.IsNull()) {
+        return Function::null();
+      }
     }
     sig.SetParameterTypeAt(i, type);
   }
@@ -7103,24 +6848,14 @@
   return sig.raw();
 }
 
-// If test_kind == kIsSubtypeOf, checks if the type of the specified parameter
-// of this function is a subtype or a supertype of the type of the specified
-// parameter of the other function. In strong mode, we only check for supertype,
-// i.e. contravariance.
+// Checks if the type of the specified parameter of this function is a supertype
+// of the type of the specified parameter of the other function (i.e. check
+// parameter contravariance).
 // Note that types marked as covariant are already dealt with in the front-end.
-// If test_kind == kIsMoreSpecificThan, checks if the type of the specified
-// parameter of this function is more specific than the type of the specified
-// parameter of the other function.
-// Note that for kIsMoreSpecificThan (non-strong mode only), we do not apply
-// contravariance of parameter types, but covariance of both parameter types and
-// result type.
-bool Function::TestParameterType(TypeTestKind test_kind,
-                                 intptr_t parameter_position,
-                                 intptr_t other_parameter_position,
-                                 const Function& other,
-                                 Error* bound_error,
-                                 TrailPtr bound_trail,
-                                 Heap::Space space) const {
+bool Function::IsContravariantParameter(intptr_t parameter_position,
+                                        const Function& other,
+                                        intptr_t other_parameter_position,
+                                        Heap::Space space) const {
   const AbstractType& param_type =
       AbstractType::Handle(ParameterTypeAt(parameter_position));
   if (param_type.IsTopType()) {
@@ -7128,8 +6863,7 @@
   }
   const AbstractType& other_param_type =
       AbstractType::Handle(other.ParameterTypeAt(other_parameter_position));
-  return other_param_type.IsSubtypeOf(param_type, bound_error, bound_trail,
-                                      space);
+  return other_param_type.IsSubtypeOf(param_type, space);
 }
 
 bool Function::HasSameTypeParametersAndBounds(const Function& other) const {
@@ -7166,11 +6900,7 @@
   return true;
 }
 
-bool Function::TypeTest(TypeTestKind test_kind,
-                        const Function& other,
-                        Error* bound_error,
-                        TrailPtr bound_trail,
-                        Heap::Space space) const {
+bool Function::IsSubtypeOf(const Function& other, Heap::Space space) const {
   const intptr_t num_fixed_params = num_fixed_parameters();
   const intptr_t num_opt_pos_params = NumOptionalPositionalParameters();
   const intptr_t num_opt_named_params = NumOptionalNamedParameters();
@@ -7200,11 +6930,10 @@
   // Check the result type.
   const AbstractType& other_res_type =
       AbstractType::Handle(zone, other.result_type());
-  // In strong mode, 'void Function()' is a subtype of 'Object Function()'.
+  // 'void Function()' is a subtype of 'Object Function()'.
   if (!other_res_type.IsTopType()) {
     const AbstractType& res_type = AbstractType::Handle(zone, result_type());
-    if (!res_type.IsSubtypeOf(other_res_type, bound_error, bound_trail,
-                              space)) {
+    if (!res_type.IsSubtypeOf(other_res_type, space)) {
       return false;
     }
   }
@@ -7212,9 +6941,8 @@
   for (intptr_t i = 0; i < (other_num_fixed_params - other_num_ignored_params +
                             other_num_opt_pos_params);
        i++) {
-    if (!TestParameterType(test_kind, i + num_ignored_params,
-                           i + other_num_ignored_params, other, bound_error,
-                           bound_trail, space)) {
+    if (!IsContravariantParameter(i + num_ignored_params, other,
+                                  i + other_num_ignored_params, space)) {
       return false;
     }
   }
@@ -7224,10 +6952,7 @@
   }
   // Check that for each optional named parameter of type T of the other
   // function type, there exists an optional named parameter of this function
-  // type with an identical name and with a type S that is a either a subtype
-  // or supertype of T (if test_kind == kIsSubtypeOf) or that is more specific
-  // than T (if test_kind == kIsMoreSpecificThan). In strong mode, we only check
-  // for supertype, i.e. contravariance.
+  // type with an identical name and with a type S that is a supertype of T.
   // Note that SetParameterNameAt() guarantees that names are symbols, so we
   // can compare their raw pointers.
   const int num_params = num_fixed_params + num_opt_named_params;
@@ -7243,8 +6968,7 @@
       ASSERT(String::Handle(zone, ParameterNameAt(j)).IsSymbol());
       if (ParameterNameAt(j) == other_param_name.raw()) {
         found_param_name = true;
-        if (!TestParameterType(test_kind, j, i, other, bound_error, bound_trail,
-                               space)) {
+        if (!IsContravariantParameter(j, other, i, space)) {
           return false;
         }
         break;
@@ -7313,6 +7037,7 @@
   result.set_has_pragma(false);
   result.set_always_inline(false);
   result.set_is_polymorphic_target(false);
+  result.set_is_no_such_method_forwarder(false);
   NOT_IN_PRECOMPILED(result.set_state_bits(0));
   result.set_owner(owner);
   NOT_IN_PRECOMPILED(result.set_token_pos(token_pos));
@@ -7346,57 +7071,6 @@
   return result.raw();
 }
 
-RawFunction* Function::Clone(const Class& new_owner) const {
-  ASSERT(!IsGenerativeConstructor());
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  Function& clone = Function::Handle(zone);
-  clone ^= Object::Clone(*this, Heap::kOld);
-  const Class& origin = Class::Handle(zone, this->origin());
-  const PatchClass& clone_owner =
-      PatchClass::Handle(zone, PatchClass::New(new_owner, origin));
-  clone.set_owner(clone_owner);
-  clone.ClearICDataArray();
-  clone.ClearCode();
-  clone.set_data(Object::null_object());
-  clone.set_usage_counter(0);
-  clone.set_deoptimization_counter(0);
-  clone.set_optimized_instruction_count(0);
-  clone.set_inlining_depth(0);
-  clone.set_optimized_call_site_count(0);
-
-  if (new_owner.NumTypeParameters() > 0) {
-    // Adjust uninstantiated types to refer to type parameters of the new owner.
-    const TypeArguments& type_params =
-        TypeArguments::Handle(zone, type_parameters());
-    if (!type_params.IsNull()) {
-      const intptr_t num_type_params = type_params.Length();
-      const TypeArguments& type_params_clone =
-          TypeArguments::Handle(zone, TypeArguments::New(num_type_params));
-      TypeParameter& type_param = TypeParameter::Handle(zone);
-      for (intptr_t i = 0; i < num_type_params; i++) {
-        type_param ^= type_params.TypeAt(i);
-        type_param ^= type_param.CloneUninstantiated(new_owner);
-        type_params_clone.SetTypeAt(i, type_param);
-      }
-      clone.set_type_parameters(type_params_clone);
-    }
-    AbstractType& type = AbstractType::Handle(zone, clone.result_type());
-    type ^= type.CloneUninstantiated(new_owner);
-    clone.set_result_type(type);
-    const intptr_t num_params = clone.NumParameters();
-    Array& array = Array::Handle(zone, clone.parameter_types());
-    array ^= Object::Clone(array, Heap::kOld);
-    clone.set_parameter_types(array);
-    for (intptr_t i = 0; i < num_params; i++) {
-      type = clone.ParameterTypeAt(i);
-      type ^= type.CloneUninstantiated(new_owner);
-      clone.SetParameterTypeAt(i, type);
-    }
-  }
-  return clone.raw();
-}
-
 RawFunction* Function::NewClosureFunctionWithKind(RawFunction::Kind kind,
                                                   const String& name,
                                                   const Function& parent,
@@ -7543,10 +7217,8 @@
   }
   closure_function.set_kernel_offset(kernel_offset());
 
-  // In strong mode, change covariant parameter types to Object in the implicit
-  // closure of a method compiled by kernel.
-  // The VM's parser erases covariant types immediately in strong mode.
-  if (!is_static() && kernel_offset() > 0) {
+  // Change covariant parameter types to Object in the implicit closure.
+  if (!is_static()) {
     const Script& function_script = Script::Handle(zone, script());
     kernel::TranslationHelper translation_helper(thread);
     translation_helper.InitFromScript(function_script);
@@ -8093,11 +7765,12 @@
 }
 
 void Function::set_ic_data_array(const Array& value) const {
-  StorePointer(&raw_ptr()->ic_data_array_, value.raw());
+  StorePointer<RawArray*, MemoryOrder::kRelease>(&raw_ptr()->ic_data_array_,
+                                                 value.raw());
 }
 
 RawArray* Function::ic_data_array() const {
-  return raw_ptr()->ic_data_array_;
+  return AtomicOperations::LoadAcquire(&raw_ptr()->ic_data_array_);
 }
 
 void Function::ClearICDataArray() const {
@@ -8139,6 +7812,8 @@
 RawCode* Function::EnsureHasCode() const {
   if (HasCode()) return CurrentCode();
   Thread* thread = Thread::Current();
+  ASSERT(thread->IsMutatorThread());
+  DEBUG_ASSERT(thread->TopErrorHandlerIsExitFrame());
   Zone* zone = thread->zone();
   const Object& result =
       Object::Handle(zone, Compiler::CompileFunction(thread, *this));
@@ -8154,10 +7829,8 @@
 
 bool Function::MayHaveUncheckedEntryPoint(Isolate* I) const {
 // TODO(#34162): Support the other architectures.
-// TODO(#34162): Enable multiple-entrypoints for AOT if we
-// consider them beneficial.
 #if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM)
-  return !FLAG_precompiled_mode && FLAG_enable_multiple_entrypoints &&
+  return FLAG_enable_multiple_entrypoints &&
          (NeedsArgumentTypeChecks(I) || IsImplicitClosureFunction());
 #else
   return false;
@@ -8587,25 +8260,6 @@
   return result.raw();
 }
 
-RawField* Field::Clone(const Class& new_owner) const {
-  Field& clone = Field::Handle();
-  clone ^= Object::Clone(*this, Heap::kOld);
-  const Class& owner = Class::Handle(this->Owner());
-  const PatchClass& clone_owner =
-      PatchClass::Handle(PatchClass::New(new_owner, owner));
-  clone.set_owner(clone_owner);
-  if (!clone.is_static()) {
-    clone.SetOffset(0);
-  }
-  if (new_owner.NumTypeParameters() > 0) {
-    // Adjust the field type to refer to type parameters of the new owner.
-    AbstractType& type = AbstractType::Handle(clone.type());
-    type ^= type.CloneUninstantiated(new_owner);
-    clone.SetFieldType(type);
-  }
-  return clone.raw();
-}
-
 RawField* Field::Clone(const Field& original) const {
   if (original.IsNull()) {
     return Field::null();
@@ -8801,31 +8455,29 @@
          raw_ptr()->initializer_.precompiled_->IsFunction();
 }
 
-void Field::EvaluateInitializer() const {
+RawError* Field::EvaluateInitializer() const {
   ASSERT(IsOriginal());
   ASSERT(is_static());
   if (StaticValue() == Object::sentinel().raw()) {
     SetStaticValue(Object::transition_sentinel());
     const Object& value =
         Object::Handle(Compiler::EvaluateStaticInitializer(*this));
-    if (value.IsError()) {
+    if (!value.IsNull() && value.IsError()) {
       SetStaticValue(Object::null_instance());
-      Exceptions::PropagateError(Error::Cast(value));
-      UNREACHABLE();
+      return Error::Cast(value).raw();
     }
     ASSERT(value.IsNull() || value.IsInstance());
     SetStaticValue(value.IsNull() ? Instance::null_instance()
                                   : Instance::Cast(value));
-    return;
+    return Error::null();
   } else if (StaticValue() == Object::transition_sentinel().raw()) {
     const Array& ctor_args = Array::Handle(Array::New(1));
     const String& field_name = String::Handle(name());
     ctor_args.SetAt(0, field_name);
     Exceptions::ThrowByType(Exceptions::kCyclicInitializationError, ctor_args);
     UNREACHABLE();
-    return;
   }
-  UNREACHABLE();
+  return Error::null();
 }
 
 static intptr_t GetListLength(const Object& value) {
@@ -9091,14 +8743,13 @@
   // To compute C<X0, ..., Xn> at G we walk the chain backwards and
   // instantiate Si using type parameters of S{i-1} which gives us a type
   // depending on type parameters of S{i-2}.
-  Error& error = Error::Handle();
   AbstractType& type = AbstractType::Handle(path.Last()->raw());
   for (intptr_t i = path.length() - 2; (i >= 0) && !type.IsInstantiated();
        i--) {
     args = path[i]->arguments();
-    type = type.InstantiateFrom(
-        args, TypeArguments::null_type_arguments(), kAllFree, &error,
-        /*instantiation_trail=*/nullptr, /*bound_trail=*/nullptr, Heap::kNew);
+    type = type.InstantiateFrom(args, TypeArguments::null_type_arguments(),
+                                kAllFree,
+                                /*instantiation_trail=*/nullptr, Heap::kNew);
   }
 
   if (type.IsInstantiated()) {
@@ -9378,8 +9029,6 @@
       return "library";
     case RawScript::kSourceTag:
       return "source";
-    case RawScript::kPatchTag:
-      return "patch";
     case RawScript::kEvaluateTag:
       return "evaluate";
     case RawScript::kKernelTag:
@@ -11041,12 +10690,14 @@
 }
 
 // Invoke the function, or noSuchMethod if it is null.
-static RawObject* InvokeInstanceFunction(const Instance& receiver,
-                                         const Function& function,
-                                         const String& target_name,
-                                         const Array& args,
-                                         const Array& args_descriptor_array,
-                                         bool respect_reflectable) {
+static RawObject* InvokeInstanceFunction(
+    const Instance& receiver,
+    const Function& function,
+    const String& target_name,
+    const Array& args,
+    const Array& args_descriptor_array,
+    bool respect_reflectable,
+    const TypeArguments& instantiator_type_args) {
   // Note "args" is already the internal arguments with the receiver as the
   // first element.
   ArgumentsDescriptor args_descriptor(args_descriptor_array);
@@ -11055,6 +10706,11 @@
     return DartEntry::InvokeNoSuchMethod(receiver, target_name, args,
                                          args_descriptor_array);
   }
+  RawObject* type_error = function.DoArgumentTypesMatch(args, args_descriptor,
+                                                        instantiator_type_args);
+  if (type_error != Error::null()) {
+    return type_error;
+  }
   return DartEntry::InvokeFunction(function, args, args_descriptor_array);
 }
 
@@ -11116,9 +10772,16 @@
   Object& obj = Object::Handle(LookupLocalOrReExportObject(setter_name));
   const String& internal_setter_name =
       String::Handle(Field::SetterName(setter_name));
-
+  AbstractType& setter_type = AbstractType::Handle();
+  AbstractType& argument_type = AbstractType::Handle(value.GetType(Heap::kOld));
   if (obj.IsField()) {
     const Field& field = Field::Cast(obj);
+    setter_type ^= field.type();
+    if (!argument_type.IsNullType() && !setter_type.IsDynamicType() &&
+        !value.IsInstanceOf(setter_type, Object::null_type_arguments(),
+                            Object::null_type_arguments())) {
+      return ThrowTypeError(field.token_pos(), value, setter_type, setter_name);
+    }
     if (field.is_final() || (respect_reflectable && !field.is_reflectable())) {
       const int kNumArgs = 1;
       const Array& args = Array::Handle(Array::New(kNumArgs));
@@ -11149,6 +10812,13 @@
         InvocationMirror::kTopLevel, InvocationMirror::kSetter);
   }
 
+  setter_type ^= setter.ParameterTypeAt(0);
+  if (!argument_type.IsNullType() && !setter_type.IsDynamicType() &&
+      !value.IsInstanceOf(setter_type, Object::null_type_arguments(),
+                          Object::null_type_arguments())) {
+    return ThrowTypeError(setter.token_pos(), value, setter_type, setter_name);
+  }
+
   return DartEntry::InvokeFunction(setter, args);
 }
 
@@ -11190,7 +10860,7 @@
   const Array& args_descriptor_array = Array::Handle(
       ArgumentsDescriptor::New(kTypeArgsLen, args.Length(), arg_names));
   ArgumentsDescriptor args_descriptor(args_descriptor_array);
-
+  const TypeArguments& type_args = Object::null_type_arguments();
   if (function.IsNull() || !function.AreValidArguments(args_descriptor, NULL) ||
       (respect_reflectable && !function.is_reflectable())) {
     return ThrowNoSuchMethod(
@@ -11198,7 +10868,11 @@
         function_name, args, arg_names, InvocationMirror::kTopLevel,
         InvocationMirror::kMethod);
   }
-
+  RawObject* type_error =
+      function.DoArgumentTypesMatch(args, args_descriptor, type_args);
+  if (type_error != Error::null()) {
+    return type_error;
+  }
   return DartEntry::InvokeFunction(function, args, args_descriptor_array);
 }
 
@@ -11341,11 +11015,6 @@
   return lib.raw();
 }
 
-RawError* Library::Patch(const Script& script) const {
-  ASSERT(script.kind() == RawScript::kPatchTag);
-  return Compiler::Compile(*this, script);
-}
-
 bool Library::IsPrivate(const String& name) {
   if (ShouldBePrivate(name)) return true;
   // Factory names: List._fromLiteral.
@@ -13415,45 +13084,6 @@
   SetCountAt(index, 0);
 }
 
-void ICData::ClearWithSentinel() const {
-  if (IsImmutable()) {
-    return;
-  }
-  // Write the sentinel value into all entries except the first one.
-  const intptr_t len = Length();
-  if (len == 0) {
-    return;
-  }
-  // The final entry is always the sentinel.
-  ASSERT(IsSentinelAt(len - 1));
-  for (intptr_t i = len - 1; i > 0; i--) {
-    WriteSentinelAt(i);
-  }
-  if (NumArgsTested() != 2) {
-    // Not the smi fast path case, write sentinel to first one and exit.
-    WriteSentinelAt(0);
-    return;
-  }
-  if (IsSentinelAt(0)) {
-    return;
-  }
-  Zone* zone = Thread::Current()->zone();
-  const String& name = String::Handle(target_name());
-  const Class& smi_class = Class::Handle(Smi::Class());
-  const Function& smi_op_target =
-      Function::Handle(Resolver::ResolveDynamicAnyArgs(zone, smi_class, name));
-  GrowableArray<intptr_t> class_ids(2);
-  Function& target = Function::Handle();
-  GetCheckAt(0, &class_ids, &target);
-  if ((target.raw() == smi_op_target.raw()) && (class_ids[0] == kSmiCid) &&
-      (class_ids[1] == kSmiCid)) {
-    // The smi fast path case, preserve the initial entry but reset the count.
-    ClearCountAt(0);
-    return;
-  }
-  WriteSentinelAt(0);
-}
-
 void ICData::ClearAndSetStaticTarget(const Function& func) const {
   if (IsImmutable()) {
     return;
@@ -13625,7 +13255,7 @@
     }
   }
   intptr_t index = -1;
-  data = FindFreeIndex(&index);
+  data = Grow(&index);
   ASSERT(!data.IsNull());
   intptr_t data_pos = index * TestEntryLength();
   Smi& value = Smi::Handle();
@@ -13644,21 +13274,14 @@
   set_ic_data_array(data);
 }
 
-RawArray* ICData::FindFreeIndex(intptr_t* index) const {
-  // The final entry is always the sentinel value, don't consider it
-  // when searching.
-  const intptr_t len = Length() - 1;
+RawArray* ICData::Grow(intptr_t* index) const {
   Array& data = Array::Handle(ic_data());
-  for (intptr_t i = 0; i < len; i++) {
-    if (IsSentinelAt(i)) {
-      *index = i;
-      return data.raw();
-    }
-  }
-  // Append case.
-  *index = len;
+  // Last entry in array should be a sentinel and will be the new entry
+  // that can be updated after growing.
+  *index = Length() - 1;
   ASSERT(*index >= 0);
-  // Grow array.
+  ASSERT(IsSentinelAt(*index));
+  // Grow the array and write the new final sentinel into place.
   const intptr_t new_len = data.Length() + TestEntryLength();
   data = Array::Grow(data, new_len, Heap::kOld);
   WriteSentinel(data, TestEntryLength());
@@ -13698,7 +13321,7 @@
   ASSERT(receiver_class_id != kIllegalCid);
 
   intptr_t index = -1;
-  Array& data = Array::Handle(FindFreeIndex(&index));
+  Array& data = Array::Handle(Grow(&index));
   intptr_t data_pos = index * TestEntryLength();
   if ((receiver_class_id == kSmiCid) && (data_pos > 0)) {
     ASSERT(GetReceiverClassIdAt(0) != kSmiCid);
@@ -14367,6 +13990,15 @@
 #endif  // DEBUG
 }
 
+RawObjectPool* Code::GetObjectPool() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  if (FLAG_use_bare_instructions) {
+    return Isolate::Current()->object_store()->global_object_pool();
+  }
+#endif
+  return object_pool();
+}
+
 bool Code::HasBreakpoint() const {
 #if defined(PRODUCT)
   return false;
@@ -14915,6 +14547,9 @@
                   Instructions::MonomorphicEntryPoint(instructions.raw()));
   StoreNonPointer(&raw_ptr()->unchecked_entry_point_,
                   Instructions::UncheckedEntryPoint(instructions.raw()));
+  StoreNonPointer(
+      &raw_ptr()->monomorphic_unchecked_entry_point_,
+      Instructions::MonomorphicUncheckedEntryPoint(instructions.raw()));
 #endif
 }
 
@@ -15419,8 +15054,8 @@
     const Array& new_buckets =
         Array::Handle(Array::New(kEntryLength * new_capacity));
 
-    Function& target = Function::Handle(
-        MegamorphicCacheTable::miss_handler(Isolate::Current()));
+    auto& target =
+        Object::Handle(MegamorphicCacheTable::miss_handler(Isolate::Current()));
     for (intptr_t i = 0; i < new_capacity; ++i) {
       SetEntry(new_buckets, i, smi_illegal_cid(), target);
     }
@@ -15433,15 +15068,14 @@
     for (intptr_t i = 0; i < old_capacity; ++i) {
       class_id ^= GetClassId(old_buckets, i);
       if (class_id.Value() != kIllegalCid) {
-        target ^= GetTargetFunction(old_buckets, i);
+        target = GetTargetFunction(old_buckets, i);
         Insert(class_id, target);
       }
     }
   }
 }
 
-void MegamorphicCache::Insert(const Smi& class_id,
-                              const Function& target) const {
+void MegamorphicCache::Insert(const Smi& class_id, const Object& target) const {
   ASSERT(static_cast<double>(filled_entry_count() + 1) <=
          (kLoadFactor * static_cast<double>(mask() + 1)));
   const Array& backing_array = Array::Handle(buckets());
@@ -15465,6 +15099,23 @@
                      name.ToCString());
 }
 
+void MegamorphicCache::SwitchToBareInstructions() {
+  NoSafepointScope no_safepoint_scope;
+
+  intptr_t capacity = mask() + 1;
+  for (intptr_t i = 0; i < capacity; ++i) {
+    const intptr_t target_index = i * kEntryLength + kTargetFunctionIndex;
+    RawObject** slot = &Array::DataOf(buckets())[target_index];
+    const intptr_t cid = (*slot)->GetClassIdMayBeSmi();
+    if (cid == kFunctionCid) {
+      RawCode* code = Function::CurrentCodeOf(Function::RawCast(*slot));
+      *slot = Smi::FromAlignedAddress(Code::EntryPoint(code));
+    } else {
+      ASSERT(cid == kSmiCid);
+    }
+  }
+}
+
 RawSubtypeTestCache* SubtypeTestCache::New() {
   ASSERT(Object::subtypetestcache_class() != Class::null());
   SubtypeTestCache& result = SubtypeTestCache::Handle();
@@ -15838,6 +15489,10 @@
   Zone* zone = Thread::Current()->zone();
 
   Class& klass = Class::Handle(zone, clazz());
+  TypeArguments& type_args = TypeArguments::Handle(zone);
+  if (klass.NumTypeArguments() > 0) {
+    type_args ^= GetTypeArguments();
+  }
 
   const String& internal_getter_name =
       String::Handle(zone, Field::GetterName(getter_name));
@@ -15862,7 +15517,8 @@
       zone, ArgumentsDescriptor::New(kTypeArgsLen, args.Length()));
 
   return InvokeInstanceFunction(*this, function, internal_getter_name, args,
-                                args_descriptor, respect_reflectable);
+                                args_descriptor, respect_reflectable,
+                                type_args);
 }
 
 RawObject* Instance::InvokeSetter(const String& setter_name,
@@ -15871,6 +15527,11 @@
   Zone* zone = Thread::Current()->zone();
 
   const Class& klass = Class::Handle(zone, clazz());
+  TypeArguments& type_args = TypeArguments::Handle(zone);
+  if (klass.NumTypeArguments() > 0) {
+    type_args ^= GetTypeArguments();
+  }
+
   const String& internal_setter_name =
       String::Handle(zone, Field::SetterName(setter_name));
   const Function& setter = Function::Handle(
@@ -15885,7 +15546,8 @@
       zone, ArgumentsDescriptor::New(kTypeArgsLen, args.Length()));
 
   return InvokeInstanceFunction(*this, setter, internal_setter_name, args,
-                                args_descriptor, respect_reflectable);
+                                args_descriptor, respect_reflectable,
+                                type_args);
 }
 
 RawObject* Instance::Invoke(const String& function_name,
@@ -15902,6 +15564,11 @@
   const Array& args_descriptor = Array::Handle(
       zone, ArgumentsDescriptor::New(kTypeArgsLen, args.Length(), arg_names));
 
+  TypeArguments& type_args = TypeArguments::Handle(zone);
+  if (klass.NumTypeArguments() > 0) {
+    type_args ^= GetTypeArguments();
+  }
+
   if (function.IsNull()) {
     // Didn't find a method: try to find a getter and invoke call on its result.
     const String& getter_name =
@@ -15916,9 +15583,9 @@
       const Array& getter_args_descriptor = Array::Handle(
           zone, ArgumentsDescriptor::New(kTypeArgsLen, getter_args.Length()));
       const Object& getter_result = Object::Handle(
-          zone,
-          InvokeInstanceFunction(*this, function, getter_name, getter_args,
-                                 getter_args_descriptor, respect_reflectable));
+          zone, InvokeInstanceFunction(*this, function, getter_name,
+                                       getter_args, getter_args_descriptor,
+                                       respect_reflectable, type_args));
       if (getter_result.IsError()) {
         return getter_result.raw();
       }
@@ -15931,7 +15598,8 @@
 
   // Found an ordinary method.
   return InvokeInstanceFunction(*this, function, function_name, args,
-                                args_descriptor, respect_reflectable);
+                                args_descriptor, respect_reflectable,
+                                type_args);
 }
 
 RawObject* Instance::EvaluateCompiledExpression(
@@ -16143,7 +15811,7 @@
   }
   Type& type = Type::Handle();
   if (!cls.IsGeneric()) {
-    type = cls.CanonicalType();
+    type = cls.DeclarationType();
   }
   if (type.IsNull()) {
     TypeArguments& type_arguments = TypeArguments::Handle();
@@ -16158,6 +15826,7 @@
 }
 
 RawTypeArguments* Instance::GetTypeArguments() const {
+  ASSERT(!IsType());
   const Class& cls = Class::Handle(clazz());
   intptr_t field_offset = cls.type_arguments_field_offset();
   ASSERT(field_offset != Class::kNoTypeArguments);
@@ -16167,6 +15836,7 @@
 }
 
 void Instance::SetTypeArguments(const TypeArguments& value) const {
+  ASSERT(!IsType());
   ASSERT(value.IsNull() || value.IsCanonical());
   const Class& cls = Class::Handle(clazz());
   intptr_t field_offset = cls.type_arguments_field_offset();
@@ -16177,13 +15847,10 @@
 bool Instance::IsInstanceOf(
     const AbstractType& other,
     const TypeArguments& other_instantiator_type_arguments,
-    const TypeArguments& other_function_type_arguments,
-    Error* bound_error) const {
+    const TypeArguments& other_function_type_arguments) const {
   ASSERT(other.IsFinalized());
   ASSERT(!other.IsDynamicType());
   ASSERT(!other.IsTypeRef());  // Must be dereferenced at compile time.
-  ASSERT(!other.IsMalformed());
-  ASSERT(!other.IsMalbounded());
   if (other.IsVoidType()) {
     return true;
   }
@@ -16200,10 +15867,7 @@
     if (!other.IsInstantiated()) {
       instantiated_other = other.InstantiateFrom(
           other_instantiator_type_arguments, other_function_type_arguments,
-          kAllFree, bound_error, NULL, NULL, Heap::kOld);
-      if ((bound_error != NULL) && !bound_error->IsNull()) {
-        UNREACHABLE();
-      }
+          kAllFree, NULL, Heap::kOld);
       if (instantiated_other.IsTypeRef()) {
         instantiated_other = TypeRef::Cast(instantiated_other).type();
       }
@@ -16212,7 +15876,7 @@
         return true;
       }
     }
-    if (IsFutureOrInstanceOf(zone, instantiated_other, bound_error)) {
+    if (IsFutureOrInstanceOf(zone, instantiated_other)) {
       return true;
     }
     if (!instantiated_other.IsFunctionType()) {
@@ -16222,7 +15886,7 @@
         Function::Handle(zone, Type::Cast(instantiated_other).signature());
     const Function& sig_fun =
         Function::Handle(Closure::Cast(*this).GetInstantiatedSignature(zone));
-    return sig_fun.IsSubtypeOf(other_signature, bound_error, NULL, Heap::kOld);
+    return sig_fun.IsSubtypeOf(other_signature, Heap::kOld);
   }
   TypeArguments& type_arguments = TypeArguments::Handle(zone);
   if (cls.NumTypeArguments() > 0) {
@@ -16246,11 +15910,7 @@
   if (!other.IsInstantiated()) {
     instantiated_other = other.InstantiateFrom(
         other_instantiator_type_arguments, other_function_type_arguments,
-        kAllFree, bound_error, NULL, NULL, Heap::kOld);
-    if ((bound_error != NULL) && !bound_error->IsNull()) {
-      UNREACHABLE();
-      return false;
-    }
+        kAllFree, NULL, Heap::kOld);
     if (instantiated_other.IsTypeRef()) {
       instantiated_other = TypeRef::Cast(instantiated_other).type();
     }
@@ -16267,18 +15927,17 @@
     ASSERT(cls.IsNullClass());
     // As of Dart 2.0, the null instance and Null type are handled differently.
     // We already checked other for dynamic and void.
-    if (IsFutureOrInstanceOf(zone, instantiated_other, bound_error)) {
+    if (IsFutureOrInstanceOf(zone, instantiated_other)) {
       return true;
     }
     return other_class.IsNullClass() || other_class.IsObjectClass();
   }
-  return cls.IsSubtypeOf(type_arguments, other_class, other_type_arguments,
-                         bound_error, NULL, Heap::kOld);
+  return Class::IsSubtypeOf(cls, type_arguments, other_class,
+                            other_type_arguments, Heap::kOld);
 }
 
 bool Instance::IsFutureOrInstanceOf(Zone* zone,
-                                    const AbstractType& other,
-                                    Error* bound_error) const {
+                                    const AbstractType& other) const {
   if (other.IsType() &&
       Class::Handle(zone, other.type_class()).IsFutureOrClass()) {
     if (other.arguments() == TypeArguments::null()) {
@@ -16297,15 +15956,14 @@
       if (!type_arguments.IsNull()) {
         const AbstractType& type_arg =
             AbstractType::Handle(zone, type_arguments.TypeAt(0));
-        if (type_arg.IsSubtypeOf(other_type_arg, bound_error, NULL,
-                                 Heap::kOld)) {
+        if (type_arg.IsSubtypeOf(other_type_arg, Heap::kOld)) {
           return true;
         }
       }
     }
     // Retry the IsInstanceOf function after unwrapping type arg of FutureOr.
     if (IsInstanceOf(other_type_arg, Object::null_type_arguments(),
-                     Object::null_type_arguments(), bound_error)) {
+                     Object::null_type_arguments())) {
       return true;
     }
   }
@@ -16484,17 +16142,6 @@
   }
 }
 
-bool AbstractType::IsResolved() const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-  return false;
-}
-
-void AbstractType::SetIsResolved() const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-}
-
 classid_t AbstractType::type_class_id() const {
   // AbstractType is an abstract class.
   UNREACHABLE();
@@ -16554,35 +16201,6 @@
   UNREACHABLE();
 }
 
-bool AbstractType::IsMalformed() const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-  return false;
-}
-
-bool AbstractType::IsMalbounded() const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-  return false;
-}
-
-bool AbstractType::IsMalformedOrMalbounded() const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-  return false;
-}
-
-RawLanguageError* AbstractType::error() const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-  return LanguageError::null();
-}
-
-void AbstractType::set_error(const LanguageError& value) const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-}
-
 bool AbstractType::IsEquivalent(const Instance& other, TrailPtr trail) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
@@ -16595,37 +16213,17 @@
   return false;
 }
 
-void AbstractType::SetScopeFunction(const Function& function) const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-}
-
 RawAbstractType* AbstractType::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     const TypeArguments& function_type_arguments,
     intptr_t num_free_fun_type_params,
-    Error* bound_error,
     TrailPtr instantiation_trail,
-    TrailPtr bound_trail,
     Heap::Space space) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
   return NULL;
 }
 
-RawAbstractType* AbstractType::CloneUnfinalized() const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-  return NULL;
-}
-
-RawAbstractType* AbstractType::CloneUninstantiated(const Class& new_owner,
-                                                   TrailPtr trail) const {
-  // AbstractType is an abstract class.
-  UNREACHABLE();
-  return NULL;
-}
-
 RawAbstractType* AbstractType::Canonicalize(TrailPtr trail) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
@@ -16756,40 +16354,9 @@
   ASSERT(name_visibility != kScrubbedName);
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
-  if (IsBoundedType()) {
-    const AbstractType& type =
-        AbstractType::Handle(zone, BoundedType::Cast(*this).type());
-    if (name_visibility == kUserVisibleName) {
-      return type.BuildName(kUserVisibleName);
-    }
-    GrowableHandlePtrArray<const String> pieces(zone, 5);
-    String& type_name = String::Handle(zone, type.BuildName(kInternalName));
-    pieces.Add(type_name);
-    pieces.Add(Symbols::SpaceExtendsSpace());
-    // Build the bound name without causing divergence.
-    const AbstractType& bound =
-        AbstractType::Handle(zone, BoundedType::Cast(*this).bound());
-    String& bound_name = String::Handle(zone);
-    if (bound.IsTypeParameter()) {
-      bound_name = TypeParameter::Cast(bound).name();
-      pieces.Add(bound_name);
-    } else if (bound.IsType()) {
-      const Class& cls = Class::Handle(zone, Type::Cast(bound).type_class());
-      bound_name = cls.Name();
-      pieces.Add(bound_name);
-      if (Type::Cast(bound).arguments() != TypeArguments::null()) {
-        pieces.Add(Symbols::OptimizedOut());
-      }
-    } else {
-      pieces.Add(Symbols::OptimizedOut());
-    }
-    return Symbols::FromConcatAll(thread, pieces);
-  }
   if (IsTypeParameter()) {
     return TypeParameter::Cast(*this).name();
   }
-  // If the type is still being finalized, we may be reporting an error about
-  // a malformed type, so proceed with caution.
   const TypeArguments& args = TypeArguments::Handle(zone, arguments());
   const intptr_t num_args = args.IsNull() ? 0 : args.Length();
   String& class_name = String::Handle(zone);
@@ -16805,45 +16372,37 @@
     // Instead of printing the actual signature, use the typedef name with
     // its type arguments, if any.
     class_name = cls.Name();  // Typedef name.
-    // We may be reporting an error about a malformed function type. In that
-    // case, avoid instantiating the signature, since it may cause divergence.
-    if (!IsFinalized() || IsBeingFinalized() || IsMalformed()) {
+    if (!IsFinalized() || IsBeingFinalized()) {
+      // TODO(regis): Check if this is dead code.
       return class_name.raw();
     }
     // Print the name of a typedef as a regular, possibly parameterized, class.
   }
-    if (IsResolved() || !cls.IsMixinApplication()) {
-      // Do not print the full vector, but only the declared type parameters.
-      num_type_params = cls.NumTypeParameters();
+  // Do not print the full vector, but only the declared type parameters.
+  num_type_params = cls.NumTypeParameters();
+  if (name_visibility == kInternalName) {
+    class_name = cls.Name();
+  } else {
+    ASSERT(name_visibility == kUserVisibleName);
+    // Map internal types to their corresponding public interfaces.
+    class_name = cls.UserVisibleName();
+  }
+  if (num_type_params > num_args) {
+    first_type_param_index = 0;
+    if (!IsFinalized() || IsBeingFinalized()) {
+      // TODO(regis): Check if this is dead code.
+      num_type_params = num_args;
     } else {
-      // Do not print the type parameters of an unresolved mixin application,
-      // since it would prematurely trigger the application of the mixin type.
-      num_type_params = 0;
+      ASSERT(num_args == 0);  // Type is raw.
     }
-    if (name_visibility == kInternalName) {
-      class_name = cls.Name();
+  } else {
+    // The actual type argument vector can be longer than necessary, because
+    // of type optimizations.
+    if (IsFinalized() && cls.is_type_finalized()) {
+      first_type_param_index = cls.NumTypeArguments() - num_type_params;
     } else {
-      ASSERT(name_visibility == kUserVisibleName);
-      // Map internal types to their corresponding public interfaces.
-      class_name = cls.UserVisibleName();
+      first_type_param_index = num_args - num_type_params;
     }
-    if (num_type_params > num_args) {
-      first_type_param_index = 0;
-      if (!IsFinalized() || IsBeingFinalized() || IsMalformed()) {
-        // Most probably a malformed type. Do not fill up with "dynamic",
-        // but use actual vector.
-        num_type_params = num_args;
-      } else {
-        ASSERT(num_args == 0);  // Type is raw.
-      }
-    } else {
-      // The actual type argument vector can be longer than necessary, because
-      // of type optimizations.
-      if (IsFinalized() && cls.is_type_finalized()) {
-        first_type_param_index = cls.NumTypeArguments() - num_type_params;
-      } else {
-        first_type_param_index = num_args - num_type_params;
-      }
   }
   GrowableHandlePtrArray<const String> pieces(zone, 4);
   pieces.Add(class_name);
@@ -16897,7 +16456,7 @@
   if ((cid == kDynamicCid) || (cid == kInstanceCid)) {
     return true;
   }
-  // In strong mode, FutureOr<T> where T is a top type behaves as a top type.
+  // FutureOr<T> where T is a top type behaves as a top type.
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   if (Class::Handle(zone, type_class()).IsFutureOrClass()) {
@@ -16975,39 +16534,10 @@
   return !IsFunctionType() && (type_class_id() == kClosureCid);
 }
 
-bool AbstractType::TypeTest(TypeTestKind test_kind,
-                            const AbstractType& other,
-                            Error* bound_error,
-                            TrailPtr bound_trail,
-                            Heap::Space space) const {
+bool AbstractType::IsSubtypeOf(const AbstractType& other,
+                               Heap::Space space) const {
   ASSERT(IsFinalized());
   ASSERT(other.IsFinalized());
-  if (IsMalformed() || other.IsMalformed()) {
-    // Malformed types involved in subtype tests should be handled specially
-    // by the caller. Malformed types should only be encountered here in a
-    // more specific than test.
-    ASSERT(test_kind == kIsMoreSpecificThan);
-    return false;
-  }
-  // In case the type checked in a type test is malbounded, the code generator
-  // may compile a throw instead of a run time call performing the type check.
-  // However, in checked mode, a function type may include malbounded result
-  // type and/or malbounded parameter types, which will then be encountered here
-  // at run time.
-  // TODO(regis): malformed types needs to be cleaned up as we won't be
-  // seeing any malformed types in the VM.
-  if (IsMalbounded()) {
-    if ((bound_error != NULL) && bound_error->IsNull()) {
-      UNREACHABLE();
-    }
-    return false;
-  }
-  if (other.IsMalbounded()) {
-    if ((bound_error != NULL) && bound_error->IsNull()) {
-      UNREACHABLE();
-    }
-    return false;
-  }
   // Any type is a subtype of (and is more specific than) Object and dynamic.
   // As of Dart 2.0, the Null type is a subtype of (and is more specific than)
   // any type.
@@ -17016,34 +16546,7 @@
   }
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
-  if (IsBoundedType() || other.IsBoundedType()) {
-    if (Equals(other)) {
-      return true;
-    }
-    // Redundant check if other type is equal to the upper bound of this type.
-    if (IsBoundedType() &&
-        AbstractType::Handle(BoundedType::Cast(*this).bound()).Equals(other)) {
-      return true;
-    }
-    // Bound checking at run time occurs when allocating an instance of a
-    // generic bounded type using a valid instantiator. The instantiator is
-    // the type of an instance successfully allocated, i.e. not containing
-    // unchecked bounds anymore.
-    // Therefore, when performing a type test at compile time (what is happening
-    // here), it is safe to ignore the bounds, since they will not exist at run
-    // time anymore.
-    if (IsBoundedType()) {
-      const AbstractType& bounded_type =
-          AbstractType::Handle(zone, BoundedType::Cast(*this).type());
-      return bounded_type.TypeTest(test_kind, other, bound_error, bound_trail,
-                                   space);
-    }
-    const AbstractType& other_bounded_type =
-        AbstractType::Handle(zone, BoundedType::Cast(other).type());
-    return TypeTest(test_kind, other_bounded_type, bound_error, bound_trail,
-                    space);
-  }
-  // Type parameters cannot be handled by Class::TypeTest().
+  // Type parameters cannot be handled by Class::IsSubtypeOf().
   // When comparing two uninstantiated function types, one returning type
   // parameter K, the other returning type parameter V, we cannot assume that K
   // is a subtype of V, or vice versa. We only return true if K equals V, as
@@ -17088,14 +16591,12 @@
     if (!bound.IsFinalized()) {
       return false;  // TODO(regis): Return "maybe after instantiation".
     }
-    // The current bound_trail cannot be used, because operands are swapped and
-    // the test is different anyway (more specific vs. subtype).
-    if (bound.IsMoreSpecificThan(other, bound_error, NULL, space)) {
+    // The current bound_trail cannot be used, because operands are swapped.
+    if (bound.IsSubtypeOf(other, space)) {
       return true;
     }
-    // In strong mode, check if 'other' is 'FutureOr'.
-    // If so, apply additional subtyping rules.
-    if (FutureOrTypeTest(zone, other, bound_error, bound_trail, space)) {
+    // Apply additional subtyping rules if 'other' is 'FutureOr'.
+    if (IsSubtypeOfFutureOr(zone, other, space)) {
       return true;
     }
     return false;  // TODO(regis): We should return "maybe after instantiation".
@@ -17105,7 +16606,7 @@
   }
   const Class& type_cls = Class::Handle(zone, type_class());
   const Class& other_type_cls = Class::Handle(zone, other.type_class());
-  // Function types cannot be handled by Class::TypeTest().
+  // Function types cannot be handled by Class::IsSubtypeOf().
   const bool other_is_dart_function_type = other.IsDartFunctionType();
   if (other_is_dart_function_type || other.IsFunctionType()) {
     if (IsFunctionType()) {
@@ -17117,14 +16618,12 @@
       // Check for two function types.
       const Function& fun =
           Function::Handle(zone, Type::Cast(*this).signature());
-      return fun.TypeTest(test_kind, other_fun, bound_error, bound_trail,
-                          space);
+      return fun.IsSubtypeOf(other_fun, space);
     }
     if (other.IsFunctionType() && !other_type_cls.IsTypedefClass()) {
-      // [this] is not a function type (and, in non-strong mode, does not
-      // declare a compatible call() method as verified above). Therefore,
-      // non-function type [this] cannot be a subtype of function type [other],
-      // unless [other] is not only a function type, but also a named typedef.
+      // [this] is not a function type. Therefore, non-function type [this]
+      // cannot be a subtype of function type [other], unless [other] is not
+      // only a function type, but also a named typedef.
       // Indeed a typedef also behaves as a regular class-based type (with type
       // arguments when generic).
       // This check is needed to avoid falling through to class-based type
@@ -17135,26 +16634,20 @@
     }
   }
   if (IsFunctionType()) {
-    // In strong mode, check if 'other' is 'FutureOr'.
-    // If so, apply additional subtyping rules.
-    if (FutureOrTypeTest(zone, other, bound_error, bound_trail, space)) {
+    // Apply additional subtyping rules if 'other' is 'FutureOr'.
+    if (IsSubtypeOfFutureOr(zone, other, space)) {
       return true;
     }
     return false;
   }
-  return type_cls.TypeTest(test_kind, TypeArguments::Handle(zone, arguments()),
-                           other_type_cls,
-                           TypeArguments::Handle(zone, other.arguments()),
-                           bound_error, bound_trail, space);
+  return Class::IsSubtypeOf(
+      type_cls, TypeArguments::Handle(zone, arguments()), other_type_cls,
+      TypeArguments::Handle(zone, other.arguments()), space);
 }
 
-bool AbstractType::FutureOrTypeTest(Zone* zone,
-                                    const AbstractType& other,
-                                    Error* bound_error,
-                                    TrailPtr bound_trail,
-                                    Heap::Space space) const {
-  // In strong mode, there is no difference between 'is subtype of' and
-  // 'is more specific than'.
+bool AbstractType::IsSubtypeOfFutureOr(Zone* zone,
+                                       const AbstractType& other,
+                                       Heap::Space space) const {
   if (other.IsType() &&
       Class::Handle(zone, other.type_class()).IsFutureOrClass()) {
     if (other.arguments() == TypeArguments::null()) {
@@ -17171,9 +16664,8 @@
     if (other_type_arg.IsTopType()) {
       return true;
     }
-    // Retry the TypeTest function after unwrapping type arg of FutureOr.
-    if (TypeTest(Class::kIsSubtypeOf, other_type_arg, bound_error, bound_trail,
-                 space)) {
+    // Retry the IsSubtypeOf check after unwrapping type arg of FutureOr.
+    if (IsSubtypeOf(other_type_arg, space)) {
       return true;
     }
   }
@@ -17277,12 +16769,15 @@
 
 RawType* Type::NewNonParameterizedType(const Class& type_class) {
   ASSERT(type_class.NumTypeArguments() == 0);
-  Type& type = Type::Handle(type_class.CanonicalType());
+  // It is too early to use the class finalizer, as type_class may not be named
+  // yet, so do not call DeclarationType().
+  Type& type = Type::Handle(type_class.declaration_type());
   if (type.IsNull()) {
     type ^= Type::New(Class::Handle(type_class.raw()),
                       Object::null_type_arguments(), TokenPosition::kNoSource);
     type.SetIsFinalized();
     type ^= type.Canonicalize();
+    type_class.set_declaration_type(type);
   }
   ASSERT(type.IsFinalized());
   return type.raw();
@@ -17304,71 +16799,21 @@
 }
 
 void Type::SetIsBeingFinalized() const {
-  ASSERT(IsResolved() && !IsFinalized() && !IsBeingFinalized());
+  ASSERT(!IsFinalized() && !IsBeingFinalized());
   set_type_state(RawType::kBeingFinalized);
 }
 
-bool Type::IsMalformed() const {
-  if (raw_ptr()->sig_or_err_.error_ == LanguageError::null()) {
-    return false;  // Valid type, but not a function type.
-  }
-  if (!raw_ptr()->sig_or_err_.error_->IsLanguageError()) {
-    return false;  // Valid function type.
-  }
-  const LanguageError& type_error = LanguageError::Handle(error());
-  ASSERT(!type_error.IsNull());
-  return type_error.kind() == Report::kMalformedType;
-}
-
-bool Type::IsMalbounded() const {
-  return false;
-}
-
-bool Type::IsMalformedOrMalbounded() const {
-  if (raw_ptr()->sig_or_err_.error_ == LanguageError::null()) {
-    return false;  // Valid type, but not a function type.
-  }
-  const LanguageError& type_error = LanguageError::Handle(error());
-  if (type_error.IsNull()) {
-    return false;  // Valid function type.
-  }
-  if (type_error.kind() == Report::kMalformedType) {
-    return true;
-  }
-  ASSERT(type_error.kind() == Report::kMalboundedType);
-  return false;
-}
-
-RawLanguageError* Type::error() const {
-  if (raw_ptr()->sig_or_err_.error_->IsLanguageError()) {
-    return LanguageError::RawCast(raw_ptr()->sig_or_err_.error_);
-  }
-  return LanguageError::null();
-}
-
-void Type::set_error(const LanguageError& value) const {
-  StorePointer(&raw_ptr()->sig_or_err_.error_, value.raw());
-}
-
 RawFunction* Type::signature() const {
-  intptr_t cid = raw_ptr()->sig_or_err_.signature_->GetClassId();
+  intptr_t cid = raw_ptr()->signature_->GetClassId();
   if (cid == kNullCid) {
     return Function::null();
   }
-  if (cid == kFunctionCid) {
-    return Function::RawCast(raw_ptr()->sig_or_err_.signature_);
-  }
-  ASSERT(cid == kLanguageErrorCid);  // Type is malformed or malbounded.
-  return Function::null();
+  ASSERT(cid == kFunctionCid);
+  return Function::RawCast(raw_ptr()->signature_);
 }
 
 void Type::set_signature(const Function& value) const {
-  StorePointer(&raw_ptr()->sig_or_err_.signature_, value.raw());
-}
-
-void Type::SetIsResolved() const {
-  ASSERT(!IsResolved());
-  set_type_state(RawType::kResolved);
+  StorePointer(&raw_ptr()->signature_, value.raw());
 }
 
 classid_t Type::type_class_id() const {
@@ -17424,17 +16869,11 @@
     const TypeArguments& instantiator_type_arguments,
     const TypeArguments& function_type_arguments,
     intptr_t num_free_fun_type_params,
-    Error* bound_error,
     TrailPtr instantiation_trail,
-    TrailPtr bound_trail,
     Heap::Space space) const {
   Zone* zone = Thread::Current()->zone();
   ASSERT(IsFinalized() || IsBeingFinalized());
   ASSERT(!IsInstantiated());
-  // Return the uninstantiated type unchanged if malformed. No copy needed.
-  if (IsMalformed()) {
-    return raw();
-  }
   // Note that the type class has to be resolved at this time, but not
   // necessarily finalized yet. We may be checking bounds at compile time or
   // finalizing the type argument vector of a recursive type.
@@ -17450,18 +16889,17 @@
     ASSERT(type_arguments.Length() == cls.NumTypeArguments());
     type_arguments = type_arguments.InstantiateFrom(
         instantiator_type_arguments, function_type_arguments,
-        num_free_fun_type_params, bound_error, instantiation_trail, bound_trail,
-        space);
+        num_free_fun_type_params, instantiation_trail, space);
+    // A returned empty_type_arguments indicates a failed instantiation in dead
+    // code that must be propagated up to the caller, the optimizing compiler.
+    if (type_arguments.raw() == Object::empty_type_arguments().raw()) {
+      return Type::null();
+    }
   }
   // This uninstantiated type is not modified, as it can be instantiated
   // with different instantiators. Allocate a new instantiated version of it.
   const Type& instantiated_type =
       Type::Handle(zone, Type::New(cls, type_arguments, token_pos(), space));
-  // Preserve the bound error if any.
-  if (IsMalbounded()) {
-    const LanguageError& bound_error = LanguageError::Handle(zone, error());
-    instantiated_type.set_error(bound_error);
-  }
   // For a function type, possibly instantiate and set its signature.
   if (!sig_fun.IsNull()) {
     // If we are finalizing a typedef, do not yet instantiate its signature,
@@ -17474,6 +16912,12 @@
         sig_fun = sig_fun.InstantiateSignatureFrom(
             instantiator_type_arguments, function_type_arguments,
             num_free_fun_type_params, space);
+        // A returned null signature indicates a failed instantiation in dead
+        // code that must be propagated up to the caller, the optimizing
+        // compiler.
+        if (sig_fun.IsNull()) {
+          return Type::null();
+        }
       }
     } else {
       // The Kernel frontend does not keep the information that a function type
@@ -17484,7 +16928,6 @@
   if (IsFinalized()) {
     instantiated_type.SetIsFinalized();
   } else {
-    instantiated_type.SetIsResolved();
     if (IsBeingFinalized()) {
       instantiated_type.SetIsBeingFinalized();
     }
@@ -17512,13 +16955,6 @@
   if (IsFunctionType() != other_type.IsFunctionType()) {
     return false;
   }
-  ASSERT(IsResolved() && other_type.IsResolved());
-  if (IsMalformed() || other_type.IsMalformed()) {
-    return false;  // Malformed types do not get canonicalized.
-  }
-  if (IsMalbounded() != other_type.IsMalbounded()) {
-    return false;  // Do not drop bound error.
-  }
   if (type_class_id() != other_type.type_class_id()) {
     return false;
   }
@@ -17568,13 +17004,6 @@
         for (intptr_t i = 0; i < from_index; i++) {
           type_arg = type_args.TypeAt(i);
           other_type_arg = other_type_args.TypeAt(i);
-          // Ignore bounds of bounded types.
-          while (type_arg.IsBoundedType()) {
-            type_arg = BoundedType::Cast(type_arg).type();
-          }
-          while (other_type_arg.IsBoundedType()) {
-            other_type_arg = BoundedType::Cast(other_type_arg).type();
-          }
           ASSERT(type_arg.IsEquivalent(other_type_arg, trail));
         }
       }
@@ -17658,164 +17087,10 @@
   return TypeArguments::Handle(arguments()).IsRecursive();
 }
 
-void Type::SetScopeFunction(const Function& function) const {
-  TypeArguments::Handle(arguments()).SetScopeFunction(function);
-  if (IsFunctionType()) {
-    const Function& sig_fun = Function::Handle(signature());
-    sig_fun.set_parent_function(function);
-    // No need to traverse result type and parameter types (and bounds, in case
-    // sig_fun is generic), since they have sig_fun as scope function.
-  }
-}
-
-RawAbstractType* Type::CloneUnfinalized() const {
-  ASSERT(IsResolved());
-  if (IsFinalized()) {
-    return raw();
-  }
-  ASSERT(!IsMalformed());       // Malformed types are finalized.
-  ASSERT(!IsBeingFinalized());  // Cloning must occur prior to finalization.
-  Zone* zone = Thread::Current()->zone();
-  const TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
-  const TypeArguments& type_args_clone =
-      TypeArguments::Handle(zone, type_args.CloneUnfinalized());
-  if (type_args_clone.raw() == type_args.raw()) {
-    return raw();
-  }
-  const Type& clone = Type::Handle(
-      zone,
-      Type::New(Class::Handle(zone, type_class()), type_args, token_pos()));
-  // Preserve the bound error if any.
-  if (IsMalbounded()) {
-    const LanguageError& bound_error = LanguageError::Handle(zone, error());
-    clone.set_error(bound_error);
-  }
-  // Clone the signature if this type represents a function type.
-  Function& fun = Function::Handle(zone, signature());
-  if (!fun.IsNull()) {
-    const Class& owner = Class::Handle(zone, fun.Owner());
-    const Function& parent = Function::Handle(zone, fun.parent_function());
-    Function& fun_clone =
-        Function::Handle(zone, Function::NewSignatureFunction(
-                                   owner, parent, TokenPosition::kNoSource));
-    const TypeArguments& type_params =
-        TypeArguments::Handle(zone, fun.type_parameters());
-    if (!type_params.IsNull()) {
-      const intptr_t num_type_params = type_params.Length();
-      const TypeArguments& type_params_clone =
-          TypeArguments::Handle(zone, TypeArguments::New(num_type_params));
-      TypeParameter& type_param = TypeParameter::Handle(zone);
-      for (intptr_t i = 0; i < num_type_params; i++) {
-        type_param ^= type_params.TypeAt(i);
-        type_param ^= type_param.CloneUnfinalized();
-        type_params_clone.SetTypeAt(i, type_param);
-      }
-      fun_clone.set_type_parameters(type_params_clone);
-    }
-    AbstractType& type = AbstractType::Handle(zone, fun.result_type());
-    type = type.CloneUnfinalized();
-    fun_clone.set_result_type(type);
-    const intptr_t num_params = fun.NumParameters();
-    fun_clone.set_num_fixed_parameters(fun.num_fixed_parameters());
-    fun_clone.SetNumOptionalParameters(fun.NumOptionalParameters(),
-                                       fun.HasOptionalPositionalParameters());
-    fun_clone.set_parameter_types(
-        Array::Handle(Array::New(num_params, Heap::kOld)));
-    for (intptr_t i = 0; i < num_params; i++) {
-      type = fun.ParameterTypeAt(i);
-      type = type.CloneUnfinalized();
-      fun_clone.SetParameterTypeAt(i, type);
-    }
-    fun_clone.set_parameter_names(Array::Handle(zone, fun.parameter_names()));
-    clone.set_signature(fun_clone);
-    fun_clone.SetSignatureType(clone);
-  }
-  clone.SetIsResolved();
-  return clone.raw();
-}
-
-RawAbstractType* Type::CloneUninstantiated(const Class& new_owner,
-                                           TrailPtr trail) const {
-  ASSERT(IsFinalized());
-  ASSERT(!IsMalformed());
-  if (IsInstantiated()) {
-    return raw();
-  }
-  // We may recursively encounter a type already being cloned, because we clone
-  // the upper bounds of its uninstantiated type arguments in the same pass.
-  Zone* zone = Thread::Current()->zone();
-  Type& clone = Type::Handle(zone);
-  clone ^= OnlyBuddyInTrail(trail);
-  if (!clone.IsNull()) {
-    return clone.raw();
-  }
-  const Class& type_cls = Class::Handle(zone, type_class());
-  clone = Type::New(type_cls, TypeArguments::Handle(zone), token_pos());
-  // Preserve the bound error if any.
-  if (IsMalbounded()) {
-    const LanguageError& bound_error = LanguageError::Handle(zone, error());
-    clone.set_error(bound_error);
-  }
-  // Clone the signature if this type represents a function type.
-  const Function& fun = Function::Handle(zone, signature());
-  if (!fun.IsNull()) {
-    ASSERT(type_cls.IsTypedefClass() || type_cls.IsClosureClass());
-    // If the scope class is not a typedef and if it is generic, it must be the
-    // mixin class, set it to the new owner.
-    const Function& parent = Function::Handle(zone, fun.parent_function());
-    // TODO(regis): Is it safe to reuse the parent function with the old owner?
-    Function& fun_clone = Function::Handle(
-        zone, Function::NewSignatureFunction(new_owner, parent,
-                                             TokenPosition::kNoSource));
-    const TypeArguments& type_params =
-        TypeArguments::Handle(zone, fun.type_parameters());
-    if (!type_params.IsNull()) {
-      const intptr_t num_type_params = type_params.Length();
-      const TypeArguments& type_params_clone =
-          TypeArguments::Handle(zone, TypeArguments::New(num_type_params));
-      TypeParameter& type_param = TypeParameter::Handle(zone);
-      for (intptr_t i = 0; i < num_type_params; i++) {
-        type_param ^= type_params.TypeAt(i);
-        type_param ^= type_param.CloneUninstantiated(new_owner, trail);
-        type_params_clone.SetTypeAt(i, type_param);
-      }
-      fun_clone.set_type_parameters(type_params_clone);
-    }
-    AbstractType& type = AbstractType::Handle(zone, fun.result_type());
-    type = type.CloneUninstantiated(new_owner, trail);
-    fun_clone.set_result_type(type);
-    const intptr_t num_params = fun.NumParameters();
-    fun_clone.set_num_fixed_parameters(fun.num_fixed_parameters());
-    fun_clone.SetNumOptionalParameters(fun.NumOptionalParameters(),
-                                       fun.HasOptionalPositionalParameters());
-    fun_clone.set_parameter_types(
-        Array::Handle(Array::New(num_params, Heap::kOld)));
-    for (intptr_t i = 0; i < num_params; i++) {
-      type = fun.ParameterTypeAt(i);
-      type = type.CloneUninstantiated(new_owner, trail);
-      fun_clone.SetParameterTypeAt(i, type);
-    }
-    fun_clone.set_parameter_names(Array::Handle(zone, fun.parameter_names()));
-    clone.set_signature(fun_clone);
-  }
-  TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
-  if (!type_args.IsNull()) {
-    // Upper bounds of uninstantiated type arguments may form a cycle.
-    if (type_args.IsRecursive() || !type_args.IsInstantiated()) {
-      AddOnlyBuddyToTrail(&trail, clone);
-    }
-    type_args = type_args.CloneUninstantiated(new_owner, trail);
-    clone.set_arguments(type_args);
-  }
-  clone.SetIsFinalized();
-  clone ^= clone.Canonicalize();
-  return clone.raw();
-}
-
 RawAbstractType* Type::Canonicalize(TrailPtr trail) const {
   ASSERT(IsFinalized());
-  if (IsCanonical() || IsMalformed()) {
-    ASSERT(IsMalformed() || TypeArguments::Handle(arguments()).IsOld());
+  if (IsCanonical()) {
+    ASSERT(TypeArguments::Handle(arguments()).IsOld());
     return this->raw();
   }
   Thread* thread = Thread::Current();
@@ -17837,7 +17112,7 @@
   // Fast canonical lookup/registry for simple types.
   if (!cls.IsGeneric() && !cls.IsClosureClass() && !cls.IsTypedefClass()) {
     ASSERT(!IsFunctionType());
-    Type& type = Type::Handle(zone, cls.CanonicalType());
+    Type& type = Type::Handle(zone, cls.declaration_type());
     if (type.IsNull()) {
       ASSERT(!cls.raw()->IsVMHeapObject() || (isolate == Dart::vm_isolate()));
       // Canonicalize the type arguments of the supertype, if any.
@@ -17849,11 +17124,12 @@
         return this->raw();
       }
       set_arguments(type_args);
-      type = cls.CanonicalType();  // May be set while canonicalizing type args.
+      type = cls.declaration_type();
+      // May be set while canonicalizing type args.
       if (type.IsNull()) {
         SafepointMutexLocker ml(isolate->type_canonicalization_mutex());
         // Recheck if type exists.
-        type = cls.CanonicalType();
+        type = cls.declaration_type();
         if (type.IsNull()) {
           if (this->IsNew()) {
             type ^= Object::Clone(*this, Heap::kOld);
@@ -17863,7 +17139,7 @@
           ASSERT(type.IsOld());
           type.ComputeHash();
           type.SetCanonical();
-          cls.set_canonical_type(type);
+          cls.set_declaration_type(type);
           return type.raw();
         }
       }
@@ -17947,7 +17223,7 @@
 
 #if defined(DEBUG)
 bool Type::CheckIsCanonical(Thread* thread) const {
-  if (IsMalformed() || IsRecursive()) {
+  if (IsRecursive()) {
     return true;
   }
   if (type_class_id() == kDynamicCid) {
@@ -17961,7 +17237,7 @@
   // Fast canonical lookup/registry for simple types.
   if (!cls.IsGeneric() && !cls.IsClosureClass() && !cls.IsTypedefClass()) {
     ASSERT(!IsFunctionType());
-    type = cls.CanonicalType();
+    type = cls.declaration_type();
     return (raw() == type.raw());
   }
 
@@ -18010,7 +17286,6 @@
 intptr_t Type::ComputeHash() const {
   ASSERT(IsFinalized());
   uint32_t result = 1;
-  if (IsMalformed()) return result;
   result = CombineHashes(result, type_class_id());
   result = CombineHashes(result, TypeArguments::Handle(arguments()).Hash());
   if (IsFunctionType()) {
@@ -18138,19 +17413,11 @@
   return !ref_type.IsNull() && ref_type.IsEquivalent(other, trail);
 }
 
-void TypeRef::SetScopeFunction(const Function& function) const {
-  // TypeRefs are created during finalization, when scope functions have
-  // already been adjusted.
-  UNREACHABLE();
-}
-
 RawTypeRef* TypeRef::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     const TypeArguments& function_type_arguments,
     intptr_t num_free_fun_type_params,
-    Error* bound_error,
     TrailPtr instantiation_trail,
-    TrailPtr bound_trail,
     Heap::Space space) const {
   TypeRef& instantiated_type_ref = TypeRef::Handle();
   instantiated_type_ref ^= OnlyBuddyInTrail(instantiation_trail);
@@ -18165,8 +17432,12 @@
   AbstractType& instantiated_ref_type = AbstractType::Handle();
   instantiated_ref_type = ref_type.InstantiateFrom(
       instantiator_type_arguments, function_type_arguments,
-      num_free_fun_type_params, bound_error, instantiation_trail, bound_trail,
-      space);
+      num_free_fun_type_params, instantiation_trail, space);
+  // A returned null type indicates a failed instantiation in dead code that
+  // must be propagated up to the caller, the optimizing compiler.
+  if (instantiated_ref_type.IsNull()) {
+    return TypeRef::null();
+  }
   ASSERT(!instantiated_ref_type.IsTypeRef());
   instantiated_type_ref.set_type(instantiated_ref_type);
 
@@ -18175,26 +17446,6 @@
   return instantiated_type_ref.raw();
 }
 
-RawTypeRef* TypeRef::CloneUninstantiated(const Class& new_owner,
-                                         TrailPtr trail) const {
-  TypeRef& cloned_type_ref = TypeRef::Handle();
-  cloned_type_ref ^= OnlyBuddyInTrail(trail);
-  if (!cloned_type_ref.IsNull()) {
-    return cloned_type_ref.raw();
-  }
-  cloned_type_ref = TypeRef::New();
-  AddOnlyBuddyToTrail(&trail, cloned_type_ref);
-  AbstractType& ref_type = AbstractType::Handle(type());
-  ASSERT(!ref_type.IsNull() && !ref_type.IsTypeRef());
-  AbstractType& cloned_ref_type = AbstractType::Handle();
-  cloned_ref_type = ref_type.CloneUninstantiated(new_owner, trail);
-  ASSERT(!cloned_ref_type.IsTypeRef());
-  cloned_type_ref.set_type(cloned_ref_type);
-  cloned_type_ref.SetTypeTestingStub(Instructions::Handle(
-      TypeTestingStubGenerator::DefaultCodeForType(cloned_type_ref)));
-  return cloned_type_ref.raw();
-}
-
 void TypeRef::set_type(const AbstractType& value) const {
   ASSERT(value.IsFunctionType() || value.HasTypeClass());
   ASSERT(!value.IsTypeRef());
@@ -18366,9 +17617,7 @@
     const TypeArguments& instantiator_type_arguments,
     const TypeArguments& function_type_arguments,
     intptr_t num_free_fun_type_params,
-    Error* bound_error,
     TrailPtr instantiation_trail,
-    TrailPtr bound_trail,
     Heap::Space space) const {
   ASSERT(IsFinalized());
   if (IsFunctionTypeParameter()) {
@@ -18390,132 +17639,15 @@
     // mismatching type arguments vector. This can only happen for
     // a dynamically unreachable code - which compiler can't remove
     // statically for some reason.
-    // To prevent crashes we treat it as a bound error.
+    // To prevent crashes we return AbstractType::null(), understood by caller
     // (see AssertAssignableInstr::Canonicalize).
-    auto space = Thread::Current()->IsMutatorThread() ? Heap::kNew : Heap::kOld;
-    *bound_error = LanguageError::New(
-        String::Handle(String::New("Mismatching type argument vector.", space)),
-        Report::kError, space);
-    return raw();
+    return AbstractType::null();
   }
   return instantiator_type_arguments.TypeAt(index());
   // There is no need to canonicalize the instantiated type parameter, since all
   // type arguments are canonicalized at type finalization time. It would be too
   // early to canonicalize the returned type argument here, since instantiation
   // not only happens at run time, but also during type finalization.
-
-  // If the instantiated type parameter type_arg is a BoundedType, it means that
-  // it is still uninstantiated and that we are instantiating at finalization
-  // time (i.e. compile time).
-  // Indeed, the instantiator (type arguments of an instance) is always
-  // instantiated at run time and any bounds were checked during allocation.
-  // Similarly, function type arguments are always instantiated before being
-  // passed to a function at run time and bounds are checked as part of the
-  // signature compatibility check (during call resolution or in the function
-  // prolog).
-}
-
-bool TypeParameter::CheckBound(const AbstractType& bounded_type,
-                               const AbstractType& upper_bound,
-                               Error* bound_error,
-                               TrailPtr bound_trail,
-                               Heap::Space space) const {
-  ASSERT((bound_error != NULL) && bound_error->IsNull());
-  ASSERT(bounded_type.IsFinalized());
-  ASSERT(upper_bound.IsFinalized());
-  ASSERT(!bounded_type.IsMalformed());
-  if (bounded_type.IsTypeRef() || upper_bound.IsTypeRef()) {
-    // Shortcut the bound check if the pair <bounded_type, upper_bound> is
-    // already in the trail.
-    if (bounded_type.TestAndAddBuddyToTrail(&bound_trail, upper_bound)) {
-      return true;
-    }
-  }
-
-  if (bounded_type.IsSubtypeOf(upper_bound, bound_error, bound_trail, space)) {
-    return true;
-  }
-  // Set bound_error if the caller is interested and if this is the first error.
-  if ((bound_error != NULL) && bound_error->IsNull()) {
-    // Report the bound error only if both the bounded type and the upper bound
-    // are instantiated. Otherwise, we cannot tell yet it is a bound error.
-    if (bounded_type.IsInstantiated() && upper_bound.IsInstantiated()) {
-      // There is another special case where we do not want to report a bound
-      // error yet: if the upper bound is a function type, but the bounded type
-      // is not and its class is not compiled yet, i.e. we cannot look for
-      // a call method yet.
-      if (!bounded_type.IsFunctionType() && upper_bound.IsFunctionType() &&
-          bounded_type.HasTypeClass() &&
-          !Class::Handle(bounded_type.type_class()).is_finalized()) {
-        return false;  // Not a subtype yet, but no bound error yet.
-      }
-      const String& bounded_type_name =
-          String::Handle(bounded_type.UserVisibleName());
-      const String& upper_bound_name =
-          String::Handle(upper_bound.UserVisibleName());
-      const AbstractType& declared_bound = AbstractType::Handle(bound());
-      const String& declared_bound_name =
-          String::Handle(declared_bound.UserVisibleName());
-      const String& type_param_name = String::Handle(UserVisibleName());
-      const Class& cls = Class::Handle(parameterized_class());
-      const String& class_name = String::Handle(cls.Name());
-      const Script& script = Script::Handle(cls.script());
-      // Since the bound may have been canonicalized, its token index is
-      // meaningless, therefore use the token index of this type parameter.
-      *bound_error = LanguageError::NewFormatted(
-          *bound_error, script, token_pos(), Report::AtLocation,
-          Report::kMalboundedType, Heap::kOld,
-          "type parameter '%s' of class '%s' must extend bound '%s', "
-          "but type argument '%s' is not a subtype of '%s'",
-          type_param_name.ToCString(), class_name.ToCString(),
-          declared_bound_name.ToCString(), bounded_type_name.ToCString(),
-          upper_bound_name.ToCString());
-    }
-  }
-  return false;
-}
-
-RawAbstractType* TypeParameter::CloneUnfinalized() const {
-  if (IsFinalized()) {
-    return raw();
-  }
-  // No need to clone bound, as it is not part of the finalization state.
-  return TypeParameter::New(Class::Handle(parameterized_class()),
-                            Function::Handle(parameterized_function()), index(),
-                            String::Handle(name()),
-                            AbstractType::Handle(bound()), token_pos());
-}
-
-RawAbstractType* TypeParameter::CloneUninstantiated(const Class& new_owner,
-                                                    TrailPtr trail) const {
-  ASSERT(IsFinalized());
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  TypeParameter& clone = TypeParameter::Handle(zone);
-  clone ^= OnlyBuddyInTrail(trail);
-  if (!clone.IsNull()) {
-    return clone.raw();
-  }
-  intptr_t new_index = index();
-  AbstractType& upper_bound = AbstractType::Handle(zone, bound());
-  const Function& fun = Function::Handle(zone, parameterized_function());
-  Class& cls = Class::Handle(zone, parameterized_class());
-  if (!cls.IsNull()) {
-    ASSERT(fun.IsNull());
-    new_index += new_owner.NumTypeArguments() - cls.NumTypeArguments();
-    cls = new_owner.raw();
-  } else {
-    ASSERT(IsFunctionTypeParameter());
-    // Only the bounds of function type parameters need cloning.
-  }
-  clone = TypeParameter::New(cls, fun, new_index, String::Handle(zone, name()),
-                             upper_bound,  // Not cloned yet.
-                             token_pos());
-  clone.SetIsFinalized();
-  AddOnlyBuddyToTrail(&trail, clone);
-  upper_bound = upper_bound.CloneUninstantiated(new_owner, trail);
-  clone.set_bound(upper_bound);
-  return clone.raw();
 }
 
 void TypeParameter::EnumerateURIs(URIs* uris) const {
@@ -18634,253 +17766,6 @@
   }
 }
 
-bool BoundedType::IsMalformed() const {
-  return AbstractType::Handle(type()).IsMalformed();
-}
-
-bool BoundedType::IsMalbounded() const {
-  return AbstractType::Handle(type()).IsMalbounded();
-}
-
-bool BoundedType::IsMalformedOrMalbounded() const {
-  return AbstractType::Handle(type()).IsMalformedOrMalbounded();
-}
-
-RawLanguageError* BoundedType::error() const {
-  return AbstractType::Handle(type()).error();
-}
-
-bool BoundedType::IsEquivalent(const Instance& other, TrailPtr trail) const {
-  // BoundedType are not canonicalized, because their bound may get finalized
-  // after the BoundedType is created and initialized.
-  if (raw() == other.raw()) {
-    return true;
-  }
-  if (other.IsTypeRef()) {
-    // Unfold right hand type. Divergence is controlled by left hand type.
-    const AbstractType& other_ref_type =
-        AbstractType::Handle(TypeRef::Cast(other).type());
-    ASSERT(!other_ref_type.IsTypeRef());
-    return IsEquivalent(other_ref_type, trail);
-  }
-  if (!other.IsBoundedType()) {
-    return false;
-  }
-  const BoundedType& other_bounded = BoundedType::Cast(other);
-  if (type_parameter() != other_bounded.type_parameter()) {
-    return false;
-  }
-  const AbstractType& this_type = AbstractType::Handle(type());
-  const AbstractType& other_type = AbstractType::Handle(other_bounded.type());
-  if (!this_type.IsEquivalent(other_type, trail)) {
-    return false;
-  }
-  const AbstractType& this_bound = AbstractType::Handle(bound());
-  const AbstractType& other_bound = AbstractType::Handle(other_bounded.bound());
-  return this_bound.IsFinalized() && other_bound.IsFinalized() &&
-         this_bound.Equals(other_bound);  // Different graph, do not pass trail.
-}
-
-bool BoundedType::IsRecursive() const {
-  return AbstractType::Handle(type()).IsRecursive();
-}
-
-void BoundedType::SetScopeFunction(const Function& function) const {
-  AbstractType::Handle(type()).SetScopeFunction(function);
-  AbstractType::Handle(bound()).SetScopeFunction(function);
-}
-
-void BoundedType::set_type(const AbstractType& value) const {
-  ASSERT(value.IsFinalized() || value.IsBeingFinalized() ||
-         value.IsTypeParameter());
-  ASSERT(!value.IsMalformed());
-  StorePointer(&raw_ptr()->type_, value.raw());
-}
-
-void BoundedType::set_bound(const AbstractType& value) const {
-  // The bound may still be unfinalized because of legal cycles.
-  // It must be finalized before it is checked at run time, though.
-  ASSERT(value.IsFinalized() || value.IsBeingFinalized());
-  StorePointer(&raw_ptr()->bound_, value.raw());
-}
-
-void BoundedType::set_type_parameter(const TypeParameter& value) const {
-  // A null type parameter is set when marking a type malformed because of a
-  // bound error at compile time.
-  ASSERT(value.IsNull() || value.IsFinalized());
-  StorePointer(&raw_ptr()->type_parameter_, value.raw());
-}
-
-RawAbstractType* BoundedType::InstantiateFrom(
-    const TypeArguments& instantiator_type_arguments,
-    const TypeArguments& function_type_arguments,
-    intptr_t num_free_fun_type_params,
-    Error* bound_error,
-    TrailPtr instantiation_trail,
-    TrailPtr bound_trail,
-    Heap::Space space) const {
-  ASSERT(IsFinalized());
-  AbstractType& bounded_type = AbstractType::Handle(type());
-  ASSERT(bounded_type.IsFinalized());
-  AbstractType& instantiated_bounded_type =
-      AbstractType::Handle(bounded_type.raw());
-  if (!bounded_type.IsInstantiated(kAny, num_free_fun_type_params)) {
-    instantiated_bounded_type = bounded_type.InstantiateFrom(
-        instantiator_type_arguments, function_type_arguments,
-        num_free_fun_type_params, bound_error, instantiation_trail, bound_trail,
-        space);
-    // In case types of instantiator_type_arguments are not finalized
-    // (or instantiated), then the instantiated_bounded_type is not finalized
-    // (or instantiated) either.
-    // Note that instantiator_type_arguments must have the final length, though.
-  }
-  return instantiated_bounded_type.raw();
-}
-
-RawAbstractType* BoundedType::CloneUnfinalized() const {
-  if (IsFinalized()) {
-    return raw();
-  }
-  const AbstractType& bounded_type = AbstractType::Handle(type());
-  const AbstractType& bounded_type_clone =
-      AbstractType::Handle(bounded_type.CloneUnfinalized());
-  if (bounded_type_clone.raw() == bounded_type.raw()) {
-    return raw();
-  }
-  // No need to clone bound or type parameter, as they are not part of the
-  // finalization state of this bounded type.
-  return BoundedType::New(bounded_type, AbstractType::Handle(bound()),
-                          TypeParameter::Handle(type_parameter()));
-}
-
-RawAbstractType* BoundedType::CloneUninstantiated(const Class& new_owner,
-                                                  TrailPtr trail) const {
-  if (IsInstantiated()) {
-    return raw();
-  }
-  AbstractType& bounded_type = AbstractType::Handle(type());
-  bounded_type = bounded_type.CloneUninstantiated(new_owner, trail);
-  AbstractType& upper_bound = AbstractType::Handle(bound());
-  upper_bound = upper_bound.CloneUninstantiated(new_owner, trail);
-  TypeParameter& type_param = TypeParameter::Handle(type_parameter());
-  type_param ^= type_param.CloneUninstantiated(new_owner, trail);
-  return BoundedType::New(bounded_type, upper_bound, type_param);
-}
-
-void BoundedType::EnumerateURIs(URIs* uris) const {
-  // The bound does not appear in the user visible name.
-  AbstractType::Handle(type()).EnumerateURIs(uris);
-}
-
-intptr_t BoundedType::ComputeHash() const {
-  uint32_t result = AbstractType::Handle(type()).Hash();
-  // No need to include the hash of the bound, since the bound is defined by the
-  // type parameter (modulo instantiation state).
-  result =
-      CombineHashes(result, TypeParameter::Handle(type_parameter()).Hash());
-  result = FinalizeHash(result, kHashBits);
-  SetHash(result);
-  return result;
-}
-
-RawBoundedType* BoundedType::New() {
-  RawObject* raw = Object::Allocate(BoundedType::kClassId,
-                                    BoundedType::InstanceSize(), Heap::kOld);
-  return reinterpret_cast<RawBoundedType*>(raw);
-}
-
-RawBoundedType* BoundedType::New(const AbstractType& type,
-                                 const AbstractType& bound,
-                                 const TypeParameter& type_parameter) {
-  Zone* Z = Thread::Current()->zone();
-  const BoundedType& result = BoundedType::Handle(Z, BoundedType::New());
-  result.set_type(type);
-  result.set_bound(bound);
-  result.SetHash(0);
-  result.set_type_parameter(type_parameter);
-
-  result.SetTypeTestingStub(Instructions::Handle(
-      Z, TypeTestingStubGenerator::DefaultCodeForType(result)));
-  return result.raw();
-}
-
-const char* BoundedType::ToCString() const {
-  const char* format = "BoundedType: type %s; bound: %s; type param: %s of %s";
-  const char* type_cstr =
-      String::Handle(AbstractType::Handle(type()).Name()).ToCString();
-  const char* bound_cstr =
-      String::Handle(AbstractType::Handle(bound()).Name()).ToCString();
-  const TypeParameter& type_param = TypeParameter::Handle(type_parameter());
-  const char* type_param_cstr = String::Handle(type_param.name()).ToCString();
-  const Class& cls = Class::Handle(type_param.parameterized_class());
-  const char* cls_cstr = String::Handle(cls.Name()).ToCString();
-  intptr_t len = Utils::SNPrint(NULL, 0, format, type_cstr, bound_cstr,
-                                type_param_cstr, cls_cstr) +
-                 1;
-  char* chars = Thread::Current()->zone()->Alloc<char>(len);
-  Utils::SNPrint(chars, len, format, type_cstr, bound_cstr, type_param_cstr,
-                 cls_cstr);
-  return chars;
-}
-
-TokenPosition MixinAppType::token_pos() const {
-  return AbstractType::Handle(MixinTypeAt(0)).token_pos();
-}
-
-intptr_t MixinAppType::Depth() const {
-  return Array::Handle(mixin_types()).Length();
-}
-
-RawString* MixinAppType::Name() const {
-  return String::New("MixinAppType");
-}
-
-const char* MixinAppType::ToCString() const {
-  const char* format = "MixinAppType: super type: %s; first mixin type: %s";
-  const char* super_type_cstr =
-      String::Handle(AbstractType::Handle(super_type()).Name()).ToCString();
-  const char* first_mixin_type_cstr =
-      String::Handle(AbstractType::Handle(MixinTypeAt(0)).Name()).ToCString();
-  intptr_t len =
-      Utils::SNPrint(NULL, 0, format, super_type_cstr, first_mixin_type_cstr) +
-      1;
-  char* chars = Thread::Current()->zone()->Alloc<char>(len);
-  Utils::SNPrint(chars, len, format, super_type_cstr, first_mixin_type_cstr);
-  return chars;
-}
-
-RawAbstractType* MixinAppType::MixinTypeAt(intptr_t depth) const {
-  return AbstractType::RawCast(Array::Handle(mixin_types()).At(depth));
-}
-
-void MixinAppType::set_super_type(const AbstractType& value) const {
-  StorePointer(&raw_ptr()->super_type_, value.raw());
-}
-
-void MixinAppType::set_mixin_types(const Array& value) const {
-  StorePointer(&raw_ptr()->mixin_types_, value.raw());
-}
-
-RawMixinAppType* MixinAppType::New() {
-  // MixinAppType objects do not survive finalization, so allocate
-  // on new heap.
-  RawObject* raw = Object::Allocate(MixinAppType::kClassId,
-                                    MixinAppType::InstanceSize(), Heap::kOld);
-  return reinterpret_cast<RawMixinAppType*>(raw);
-}
-
-RawMixinAppType* MixinAppType::New(const AbstractType& super_type,
-                                   const Array& mixin_types) {
-  Zone* Z = Thread::Current()->zone();
-  const MixinAppType& result = MixinAppType::Handle(Z, MixinAppType::New());
-  result.set_super_type(super_type);
-  result.set_mixin_types(mixin_types);
-
-  result.SetTypeTestingStub(Instructions::Handle(
-      Z, TypeTestingStubGenerator::DefaultCodeForType(result)));
-  return result.raw();
-}
-
 RawInstance* Number::CheckAndCanonicalize(Thread* thread,
                                           const char** error_str) const {
   intptr_t cid = GetClassId();
@@ -19783,16 +18668,22 @@
     const String& strobj = String::Handle(OneByteString::New(len, space));
     if (len > 0) {
       NoSafepointScope no_safepoint;
-      Utf8::DecodeToLatin1(utf8_array, array_len,
-                           OneByteString::DataStart(strobj), len);
+      if (!Utf8::DecodeToLatin1(utf8_array, array_len,
+                                OneByteString::DataStart(strobj), len)) {
+        Utf8::ReportInvalidByte(utf8_array, array_len, len);
+        return String::null();
+      }
     }
     return strobj.raw();
   }
   ASSERT((type == Utf8::kBMP) || (type == Utf8::kSupplementary));
   const String& strobj = String::Handle(TwoByteString::New(len, space));
   NoSafepointScope no_safepoint;
-  Utf8::DecodeToUTF16(utf8_array, array_len, TwoByteString::DataStart(strobj),
-                      len);
+  if (!Utf8::DecodeToUTF16(utf8_array, array_len,
+                           TwoByteString::DataStart(strobj), len)) {
+    Utf8::ReportInvalidByte(utf8_array, array_len, len);
+    return String::null();
+  }
   return strobj.raw();
 }
 
@@ -21090,6 +19981,47 @@
   return result.raw();
 }
 
+void Array::Truncate(intptr_t new_len) const {
+  if (IsNull()) {
+    return;
+  }
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const Array& array = Array::Handle(zone, this->raw());
+
+  intptr_t old_len = array.Length();
+  ASSERT(new_len <= old_len);
+  intptr_t old_size = Array::InstanceSize(old_len);
+  intptr_t new_size = Array::InstanceSize(new_len);
+
+  NoSafepointScope no_safepoint;
+
+  // If there is any left over space fill it with either an Array object or
+  // just a plain object (depending on the amount of left over space) so
+  // that it can be traversed over successfully during garbage collection.
+  Object::MakeUnusedSpaceTraversable(array, old_size, new_size);
+
+  // Update the size in the header field and length of the array object.
+  uword tags = array.raw_ptr()->tags_;
+  ASSERT(kArrayCid == RawObject::ClassIdTag::decode(tags));
+  uint32_t old_tags;
+  do {
+    old_tags = tags;
+    uint32_t new_tags = RawObject::SizeTag::update(new_size, old_tags);
+    tags = CompareAndSwapTags(old_tags, new_tags);
+  } while (tags != old_tags);
+  // TODO(22501): For the heap to remain walkable by the sweeper, it must
+  // observe the creation of the filler object no later than the new length
+  // of the array. This assumption holds on ia32/x64 or if the CAS above is a
+  // full memory barrier.
+  //
+  // Also, between the CAS of the header above and the SetLength below,
+  // the array is temporarily in an inconsistent state. The header is considered
+  // the overriding source of object size by RawObject::Size, but the ASSERTs
+  // in RawObject::SizeFromClass must handle this special case.
+  array.SetLength(new_len);
+}
+
 RawArray* Array::MakeFixedLength(const GrowableObjectArray& growable_array,
                                  bool unique) {
   ASSERT(!growable_array.IsNull());
@@ -21113,43 +20045,16 @@
     array.SetTypeArguments(type_arguments);
     return array.raw();
   }
-  intptr_t capacity_len = growable_array.Capacity();
   const Array& array = Array::Handle(zone, growable_array.data());
   ASSERT(array.IsArray());
   array.SetTypeArguments(type_arguments);
-  intptr_t capacity_size = Array::InstanceSize(capacity_len);
-  intptr_t used_size = Array::InstanceSize(used_len);
-  NoSafepointScope no_safepoint;
-
-  // If there is any left over space fill it with either an Array object or
-  // just a plain object (depending on the amount of left over space) so
-  // that it can be traversed over successfully during garbage collection.
-  Object::MakeUnusedSpaceTraversable(array, capacity_size, used_size);
-
-  // Update the size in the header field and length of the array object.
-  uword tags = array.raw_ptr()->tags_;
-  ASSERT(kArrayCid == RawObject::ClassIdTag::decode(tags));
-  uint32_t old_tags;
-  do {
-    old_tags = tags;
-    uint32_t new_tags = RawObject::SizeTag::update(used_size, old_tags);
-    tags = array.CompareAndSwapTags(old_tags, new_tags);
-  } while (tags != old_tags);
-  // TODO(22501): For the heap to remain walkable by the sweeper, it must
-  // observe the creation of the filler object no later than the new length
-  // of the array. This assumption holds on ia32/x64 or if the CAS above is a
-  // full memory barrier.
-  //
-  // Also, between the CAS of the header above and the SetLength below,
-  // the array is temporarily in an inconsistent state. The header is considered
-  // the overriding source of object size by RawObject::Size, but the ASSERTs
-  // in RawObject::SizeFromClass must handle this special case.
-  array.SetLength(used_len);
 
   // Null the GrowableObjectArray, we are removing its backing array.
   growable_array.SetLength(0);
   growable_array.SetData(Object::empty_array());
 
+  // Truncate the old backing array and return it.
+  array.Truncate(used_len);
   return array.raw();
 }
 
@@ -21785,7 +20690,9 @@
 }
 
 int64_t Closure::ComputeHash() const {
-  Zone* zone = Thread::Current()->zone();
+  Thread* thread = Thread::Current();
+  DEBUG_ASSERT(thread->TopErrorHandlerIsExitFrame());
+  Zone* zone = thread->zone();
   const Function& func = Function::Handle(zone, function());
   uint32_t result = 0;
   if (func.IsImplicitInstanceClosureFunction()) {
@@ -21974,6 +20881,14 @@
       String::Handle(zone, function.QualifiedUserVisibleName());
   const String& url = String::Handle(
       zone, script.IsNull() ? String::New("Kernel") : script.url());
+
+  // If the URI starts with "data:application/dart;" this is a URI encoded
+  // script so we shouldn't print the entire URI because it could be very long.
+  const char* url_string = url.ToCString();
+  if (strstr(url_string, "data:application/dart;") == url_string) {
+    url_string = "<data:application/dart>";
+  }
+
   intptr_t line = -1;
   intptr_t column = -1;
   if (FLAG_precompiled_mode) {
@@ -21988,7 +20903,6 @@
     }
   }
 
-  const char* url_string = url.ToCString();
   if (column >= 0) {
     buffer->Printf("#%-6" Pd " %s (%s:%" Pd ":%" Pd ")\n", frame_index,
                    function_name.ToCString(), url_string, line, column);
@@ -22212,18 +21126,6 @@
   return result.raw();
 }
 
-void* RegExp::GetDataStartAddress() const {
-  intptr_t addr = reinterpret_cast<intptr_t>(raw_ptr());
-  return reinterpret_cast<void*>(addr + sizeof(RawRegExp));
-}
-
-RawRegExp* RegExp::FromDataStartAddress(void* data) {
-  RegExp& regexp = RegExp::Handle();
-  intptr_t addr = reinterpret_cast<intptr_t>(data) - sizeof(RawRegExp);
-  regexp ^= RawObject::FromAddr(addr);
-  return regexp.raw();
-}
-
 const char* RegExp::Flags() const {
   switch (flags()) {
     case kGlobal | kIgnoreCase | kMultiLine:
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 796913f..22bd10f 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -485,9 +485,6 @@
 
   static const ClassId kClassId = kObjectCid;
 
-  // Different kinds of type tests.
-  enum TypeTestKind { kIsSubtypeOf = 0, kIsMoreSpecificThan };
-
   // Different kinds of name visibility.
   enum NameVisibility {
     // Internal names are the true names of classes, fields,
@@ -866,7 +863,11 @@
   // class B<T, S>
   // class C<R> extends B<R, int>
   // C.DeclarationType() --> C [R, int, R]
-  RawAbstractType* DeclarationType() const;
+  RawType* DeclarationType() const;
+
+  static intptr_t declaration_type_offset() {
+    return OFFSET_OF(RawClass, declaration_type_);
+  }
 
   RawLibrary* library() const { return raw_ptr()->library_; }
   void set_library(const Library& value) const;
@@ -926,23 +927,7 @@
     return OFFSET_OF(RawClass, type_arguments_field_offset_in_words_);
   }
 
-  // Returns the cached canonical type of this class, i.e. the canonical type
-  // whose type class is this class and whose type arguments are the
-  // uninstantiated type parameters declared by this class if it is generic,
-  // e.g. Map<K, V>.
-  // Returns Type::null() if the canonical type is not cached yet.
-  RawType* CanonicalType() const;
-
-  // Caches the canonical type of this class.
-  void SetCanonicalType(const Type& type) const;
-
-  static intptr_t canonical_type_offset() {
-    return OFFSET_OF(RawClass, canonical_type_);
-  }
-
   // The super type of this class, Object type if not explicitly specified.
-  // Note that the super type may be bounded, as in this example:
-  // class C<T> extends S<T> { }; class S<T extends num> { };
   RawAbstractType* super_type() const { return raw_ptr()->super_type_; }
   void set_super_type(const AbstractType& value) const;
   static intptr_t super_type_offset() {
@@ -955,12 +940,6 @@
   // classes.
   RawClass* SuperClass(bool original_classes = false) const;
 
-  RawType* mixin() const { return raw_ptr()->mixin_; }
-  void set_mixin(const Type& value) const;
-
-  // Note this returns false for mixin application aliases.
-  bool IsMixinApplication() const;
-
   RawClass* GetPatchClass() const;
 
   // Interfaces is an array of Types.
@@ -1020,27 +999,23 @@
     return cls->ptr()->library_->ptr()->is_in_fullsnapshot_;
   }
 
-  // Check the subtype relationship.
-  bool IsSubtypeOf(const TypeArguments& type_arguments,
-                   const Class& other,
-                   const TypeArguments& other_type_arguments,
-                   Error* bound_error,
-                   TrailPtr bound_trail,
-                   Heap::Space space) const {
-    return TypeTest(kIsSubtypeOf, type_arguments, other, other_type_arguments,
-                    bound_error, bound_trail, space);
-  }
-
-  // Check the 'more specific' relationship.
-  bool IsMoreSpecificThan(const TypeArguments& type_arguments,
+  // Returns true if the type specified by cls and type_arguments is a
+  // subtype of the type specified by other class and other_type_arguments.
+  static bool IsSubtypeOf(const Class& cls,
+                          const TypeArguments& type_arguments,
                           const Class& other,
                           const TypeArguments& other_type_arguments,
-                          Error* bound_error,
-                          TrailPtr bound_trail,
-                          Heap::Space space) const {
-    return TypeTest(kIsMoreSpecificThan, type_arguments, other,
-                    other_type_arguments, bound_error, bound_trail, space);
-  }
+                          Heap::Space space);
+
+  // Returns true if the type specified by cls and type_arguments is a
+  // subtype of FutureOr<T> specified by other class and other_type_arguments.
+  // Returns false if other class is not a FutureOr.
+  static bool IsSubtypeOfFutureOr(Zone* zone,
+                                  const Class& cls,
+                                  const TypeArguments& type_arguments,
+                                  const Class& other,
+                                  const TypeArguments& other_type_arguments,
+                                  Heap::Space space);
 
   // Check if this is the top level class.
   bool IsTopLevel() const;
@@ -1153,33 +1128,17 @@
 
   void set_is_prefinalized() const;
 
-  bool is_refinalize_after_patch() const {
-    return ClassFinalizedBits::decode(raw_ptr()->state_bits_) ==
-           RawClass::kRefinalizeAfterPatch;
-  }
-
-  void SetRefinalizeAfterPatch() const;
   void ResetFinalization() const;
 
-  bool is_marked_for_parsing() const {
-    return MarkedForParsingBit::decode(raw_ptr()->state_bits_);
+  bool is_marked_for_lazy_loading() const {
+    return MarkedForLazyLoadingBit::decode(raw_ptr()->state_bits_);
   }
-  void set_is_marked_for_parsing() const;
-  void reset_is_marked_for_parsing() const;
+  void set_is_marked_for_lazy_loading() const;
+  void reset_is_marked_for_lazy_loading() const;
 
   bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); }
   void set_is_const() const;
 
-  bool is_mixin_app_alias() const {
-    return MixinAppAliasBit::decode(raw_ptr()->state_bits_);
-  }
-  void set_is_mixin_app_alias() const;
-
-  bool is_mixin_type_applied() const {
-    return MixinTypeAppliedBit::decode(raw_ptr()->state_bits_);
-  }
-  void set_is_mixin_type_applied() const;
-
   // Tests if this is a mixin application class which was desugared
   // to a normal class by kernel mixin transformation
   // (pkg/kernel/lib/transformations/mixin_full_resolution.dart).
@@ -1241,10 +1200,6 @@
 
   void Finalize() const;
 
-  // Apply given patch class to this class.
-  // Return true on success, or false and error otherwise.
-  bool ApplyPatch(const Class& patch, Error* error) const;
-
   RawObject* Invoke(const String& selector,
                     const Array& arguments,
                     const Array& argument_names,
@@ -1316,14 +1271,13 @@
   bool TraceAllocation(Isolate* isolate) const;
   void SetTraceAllocation(bool trace_allocation) const;
 
-  bool ValidatePostFinalizePatch(const Class& orig_class, Error* error) const;
   void ReplaceEnum(const Class& old_enum) const;
   void CopyStaticFieldValues(const Class& old_cls) const;
   void PatchFieldsAndFunctions() const;
   void MigrateImplicitStaticClosures(IsolateReloadContext* context,
                                      const Class& new_cls) const;
   void CopyCanonicalConstants(const Class& old_cls) const;
-  void CopyCanonicalType(const Class& old_cls) const;
+  void CopyDeclarationType(const Class& old_cls) const;
   void CheckReload(const Class& replacement,
                    IsolateReloadContext* context) const;
 
@@ -1332,6 +1286,11 @@
                                const Function& dispatcher) const;
 
  private:
+  RawType* declaration_type() const { return raw_ptr()->declaration_type_; }
+
+  // Caches the declaration type of this class.
+  void set_declaration_type(const Type& type) const;
+
   bool CanReloadFinalized(const Class& replacement,
                           IsolateReloadContext* context) const;
   bool CanReloadPreFinalized(const Class& replacement,
@@ -1360,7 +1319,7 @@
     kAbstractBit = kClassFinalizedPos + kClassFinalizedSize,  // = 5
     kPatchBit = 6,
     kSynthesizedClassBit = 7,
-    kMarkedForParsingBit = 8,
+    kMarkedForLazyLoadingBit = 8,
     kMixinAppAliasBit = 9,
     kMixinTypeAppliedBit = 10,
     kFieldsMarkedNullableBit = 11,
@@ -1381,12 +1340,8 @@
   class PatchBit : public BitField<uint16_t, bool, kPatchBit, 1> {};
   class SynthesizedClassBit
       : public BitField<uint16_t, bool, kSynthesizedClassBit, 1> {};
-  class MarkedForParsingBit
-      : public BitField<uint16_t, bool, kMarkedForParsingBit, 1> {};
-  class MixinAppAliasBit
-      : public BitField<uint16_t, bool, kMixinAppAliasBit, 1> {};
-  class MixinTypeAppliedBit
-      : public BitField<uint16_t, bool, kMixinTypeAppliedBit, 1> {};
+  class MarkedForLazyLoadingBit
+      : public BitField<uint16_t, bool, kMarkedForLazyLoadingBit, 1> {};
   class FieldsMarkedNullableBit
       : public BitField<uint16_t, bool, kFieldsMarkedNullableBit, 1> {};
   class CycleFreeBit : public BitField<uint16_t, bool, kCycleFreeBit, 1> {};
@@ -1400,9 +1355,6 @@
   RawString* GenerateUserVisibleName() const;
   void set_state_bits(intptr_t bits) const;
 
-  void set_canonical_type(const Type& value) const;
-  RawType* canonical_type() const;
-
   RawArray* invocation_dispatcher_cache() const;
   void set_invocation_dispatcher_cache(const Array& cache) const;
   RawFunction* CreateInvocationDispatcher(const String& target_name,
@@ -1472,35 +1424,6 @@
   // Helper that calls 'Class::New<Instance>(kIllegalCid)'.
   static RawClass* NewInstanceClass();
 
-  // Check the subtype or 'more specific' relationship.
-  bool TypeTest(TypeTestKind test_kind,
-                const TypeArguments& type_arguments,
-                const Class& other,
-                const TypeArguments& other_type_arguments,
-                Error* bound_error,
-                TrailPtr bound_trail,
-                Heap::Space space) const;
-
-  // Returns true if the type specified by this class and type_arguments is a
-  // subtype of FutureOr<T> specified by other class and other_type_arguments.
-  // Returns false if other class is not a FutureOr.
-  bool FutureOrTypeTest(Zone* zone,
-                        const TypeArguments& type_arguments,
-                        const Class& other,
-                        const TypeArguments& other_type_arguments,
-                        Error* bound_error,
-                        TrailPtr bound_trail,
-                        Heap::Space space) const;
-
-  static bool TypeTestNonRecursive(const Class& cls,
-                                   TypeTestKind test_kind,
-                                   const TypeArguments& type_arguments,
-                                   const Class& other,
-                                   const TypeArguments& other_type_arguments,
-                                   Error* bound_error,
-                                   TrailPtr bound_trail,
-                                   Heap::Space space);
-
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Class, Object);
   friend class AbstractType;
   friend class Instance;
@@ -1810,6 +1733,7 @@
   V(BinaryDoubleOp)                                                            \
   V(UnaryOp)                                                                   \
   V(UnboxInteger)                                                              \
+  V(Unbox)                                                                     \
   V(CheckArrayBound)                                                           \
   V(AtCall)                                                                    \
   V(GuardField)                                                                \
@@ -1905,18 +1829,10 @@
   // Clears the count for entry |index|.
   void ClearCountAt(intptr_t index) const;
 
-  // Clear all entries with the sentinel value (but will preserve initial
-  // smi smi checks).
-  void ClearWithSentinel() const;
-
   // Clear all entries with the sentinel value and reset the first entry
   // with the dummy target entry.
   void ClearAndSetStaticTarget(const Function& func) const;
 
-  // Returns the first index that should be used to for a new entry. Will
-  // grow the array if necessary.
-  RawArray* FindFreeIndex(intptr_t* index) const;
-
   void DebugDump() const;
 
   // Returns true if this is a two arg smi operation.
@@ -2069,6 +1985,10 @@
     return AtomicOperations::LoadAcquire(&raw_ptr()->ic_data_);
   }
 
+  // Grows the array and also sets the argument to the index that should be used
+  // for the new entry.
+  RawArray* Grow(intptr_t* index) const;
+
   void set_owner(const Function& value) const;
   void set_target_name(const String& value) const;
   void set_arguments_descriptor(const Array& value) const;
@@ -2308,7 +2228,11 @@
 
   // Return the most recently compiled and installed code for this function.
   // It is not the only Code object that points to this function.
-  RawCode* CurrentCode() const { return raw_ptr()->code_; }
+  RawCode* CurrentCode() const { return CurrentCodeOf(raw()); }
+
+  static RawCode* CurrentCodeOf(const RawFunction* function) {
+    return function->ptr()->code_;
+  }
 
   RawCode* unoptimized_code() const {
 #if defined(DART_PRECOMPILED_RUNTIME)
@@ -2635,6 +2559,13 @@
                               intptr_t num_named_arguments,
                               String* error_message) const;
 
+  // Returns a TypeError if the provided arguments don't match the function
+  // parameter types, NULL otherwise. Assumes AreValidArguments is called first.
+  RawObject* DoArgumentTypesMatch(
+      const Array& args,
+      const ArgumentsDescriptor& arg_names,
+      const TypeArguments& instantiator_type_args) const;
+
   // Returns true if the type argument count, total argument count and the names
   // of optional arguments are valid for calling this function.
   // Otherwise, it returns false and the reason (if error_message is not NULL).
@@ -2655,29 +2586,7 @@
 
   // Returns true if the type of this function is a subtype of the type of
   // the other function.
-  bool IsSubtypeOf(const Function& other,
-                   Error* bound_error,
-                   TrailPtr bound_trail,
-                   Heap::Space space) const {
-    return TypeTest(kIsSubtypeOf, other, bound_error, bound_trail, space);
-  }
-
-  // Returns true if the type of this function is more specific than the type of
-  // the other function.
-  bool IsMoreSpecificThan(const Function& other,
-                          Error* bound_error,
-                          TrailPtr bound_trail,
-                          Heap::Space space) const {
-    return TypeTest(kIsMoreSpecificThan, other, bound_error, bound_trail,
-                    space);
-  }
-
-  // Check the subtype or 'more specific' relationship.
-  bool TypeTest(TypeTestKind test_kind,
-                const Function& other,
-                Error* bound_error,
-                TrailPtr bound_trail,
-                Heap::Space space) const;
+  bool IsSubtypeOf(const Function& other, Heap::Space space) const;
 
   bool IsDispatcherOrImplicitAccessor() const {
     switch (kind()) {
@@ -2862,10 +2771,6 @@
                                              bool allow_add = true) const;
 #endif
 
-  // Allocate new function object, clone values from this function. The
-  // owner of the clone is new_owner.
-  RawFunction* Clone(const Class& new_owner) const;
-
   // Slow function, use in asserts to track changes in important library
   // functions.
   int32_t SourceFingerprint() const;
@@ -2956,6 +2861,11 @@
   // redirecting: Redirecting generative or factory constructor.
   // external: Just a declaration that expects to be defined in another patch
   //           file.
+  // generated_body: Has a generated body.
+  // always_inline: Should always be inlined.
+  // polymorphic_target: A polymorphic method.
+  // has_pragma: Has a @pragma decoration.
+  // no_such_method_forwarder: A stub method that just calls noSuchMethod.
 
 #define FOR_EACH_FUNCTION_KIND_BIT(V)                                          \
   V(Static, is_static)                                                         \
@@ -2973,7 +2883,8 @@
   V(GeneratedBody, is_generated_body)                                          \
   V(AlwaysInline, always_inline)                                               \
   V(PolymorphicTarget, is_polymorphic_target)                                  \
-  V(HasPragma, has_pragma)
+  V(HasPragma, has_pragma)                                                     \
+  V(IsNoSuchMethodForwarder, is_no_such_method_forwarder)
 
 #define DEFINE_ACCESSORS(name, accessor_name)                                  \
   void set_##accessor_name(bool value) const {                                 \
@@ -3063,16 +2974,13 @@
       GrowableHandlePtrArray<const String>* pieces) const;
   RawString* BuildSignature(NameVisibility name_visibility) const;
 
-  // Checks the type of the formal parameter at the given position for
-  // subtyping or 'more specific' relationship between the type of this function
-  // and the type of the other function.
-  bool TestParameterType(TypeTestKind test_kind,
-                         intptr_t parameter_position,
-                         intptr_t other_parameter_position,
-                         const Function& other,
-                         Error* bound_error,
-                         TrailPtr bound_trail,
-                         Heap::Space space) const;
+  // Returns true if the type of the formal parameter at the given position in
+  // this function is contravariant with the type of the other formal parameter
+  // at the given position in the other function.
+  bool IsContravariantParameter(intptr_t parameter_position,
+                                const Function& other,
+                                intptr_t other_parameter_position,
+                                Heap::Space space) const;
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Function, Object);
   friend class Class;
@@ -3284,9 +3192,6 @@
                                TokenPosition end_token_pos);
 
   // Allocate new field object, clone values from this field. The
-  // owner of the clone is new_owner.
-  RawField* Clone(const Class& new_owner) const;
-  // Allocate new field object, clone values from this field. The
   // original is specified.
   RawField* Clone(const Field& original) const;
 
@@ -3430,7 +3335,7 @@
 
   bool IsUninitialized() const;
 
-  void EvaluateInitializer() const;
+  DART_WARN_UNUSED_RESULT RawError* EvaluateInitializer() const;
 
   RawFunction* PrecompiledInitializer() const {
     return raw_ptr()->initializer_.precompiled_;
@@ -3870,8 +3775,6 @@
     StoreNonPointer(&raw_ptr()->is_in_fullsnapshot_, value);
   }
 
-  RawError* Patch(const Script& script) const;
-
   RawString* PrivateName(const String& name) const;
 
   intptr_t index() const { return raw_ptr()->index_; }
@@ -4323,26 +4226,32 @@
 
   uword PayloadStart() const { return PayloadStart(raw()); }
   uword MonomorphicEntryPoint() const { return MonomorphicEntryPoint(raw()); }
+  uword MonomorphicUncheckedEntryPoint() const {
+    return MonomorphicUncheckedEntryPoint(raw());
+  }
   uword EntryPoint() const { return EntryPoint(raw()); }
+  uword UncheckedEntryPoint() const { return UncheckedEntryPoint(raw()); }
   static uword PayloadStart(const RawInstructions* instr) {
     return reinterpret_cast<uword>(instr->ptr()) + HeaderSize();
   }
 
+  // Note: We keep the checked entrypoint offsets even (emitting NOPs if
+  // necessary) to allow them to be seen as Smis by the GC.
 #if defined(TARGET_ARCH_IA32)
-  static const intptr_t kCheckedEntryOffset = 0;
-  static const intptr_t kUncheckedEntryOffset = 0;
+  static const intptr_t kPolymorphicEntryOffset = 0;
+  static const intptr_t kMonomorphicEntryOffset = 0;
 #elif defined(TARGET_ARCH_X64)
-  static const intptr_t kCheckedEntryOffset = 15;
-  static const intptr_t kUncheckedEntryOffset = 34;
+  static const intptr_t kPolymorphicEntryOffset = 16;
+  static const intptr_t kMonomorphicEntryOffset = 36;
 #elif defined(TARGET_ARCH_ARM)
-  static const intptr_t kCheckedEntryOffset = 0;
-  static const intptr_t kUncheckedEntryOffset = 20;
+  static const intptr_t kPolymorphicEntryOffset = 0;
+  static const intptr_t kMonomorphicEntryOffset = 20;
 #elif defined(TARGET_ARCH_ARM64)
-  static const intptr_t kCheckedEntryOffset = 8;
-  static const intptr_t kUncheckedEntryOffset = 28;
+  static const intptr_t kPolymorphicEntryOffset = 8;
+  static const intptr_t kMonomorphicEntryOffset = 28;
 #elif defined(TARGET_ARCH_DBC)
-  static const intptr_t kCheckedEntryOffset = 0;
-  static const intptr_t kUncheckedEntryOffset = 0;
+  static const intptr_t kPolymorphicEntryOffset = 0;
+  static const intptr_t kMonomorphicEntryOffset = 0;
 #else
 #error Missing entry offsets for current architecture
 #endif
@@ -4350,7 +4259,7 @@
   static uword MonomorphicEntryPoint(const RawInstructions* instr) {
     uword entry = PayloadStart(instr);
     if (!HasSingleEntryPoint(instr)) {
-      entry += kCheckedEntryOffset;
+      entry += kPolymorphicEntryOffset;
     }
     return entry;
   }
@@ -4358,13 +4267,27 @@
   static uword EntryPoint(const RawInstructions* instr) {
     uword entry = PayloadStart(instr);
     if (!HasSingleEntryPoint(instr)) {
-      entry += kUncheckedEntryOffset;
+      entry += kMonomorphicEntryOffset;
     }
     return entry;
   }
 
   static uword UncheckedEntryPoint(const RawInstructions* instr) {
-    return PayloadStart(instr) + instr->ptr()->unchecked_entrypoint_pc_offset_;
+    uword entry =
+        PayloadStart(instr) + instr->ptr()->unchecked_entrypoint_pc_offset_;
+    if (!HasSingleEntryPoint(instr)) {
+      entry += kMonomorphicEntryOffset;
+    }
+    return entry;
+  }
+
+  static uword MonomorphicUncheckedEntryPoint(const RawInstructions* instr) {
+    uword entry =
+        PayloadStart(instr) + instr->ptr()->unchecked_entrypoint_pc_offset_;
+    if (!HasSingleEntryPoint(instr)) {
+      entry += kPolymorphicEntryOffset;
+    }
+    return entry;
   }
 
   static const intptr_t kMaxElements =
@@ -4825,6 +4748,7 @@
     kNormal,
     kUnchecked,
     kMonomorphic,
+    kMonomorphicUnchecked,
   };
 
   static intptr_t entry_point_offset(EntryKind kind = EntryKind::kNormal) {
@@ -4835,6 +4759,8 @@
         return OFFSET_OF(RawCode, unchecked_entry_point_);
       case EntryKind::kMonomorphic:
         return OFFSET_OF(RawCode, monomorphic_entry_point_);
+      case EntryKind::kMonomorphicUnchecked:
+        return OFFSET_OF(RawCode, monomorphic_unchecked_entry_point_);
       default:
         UNREACHABLE();
     }
@@ -4876,12 +4802,13 @@
     return Instructions::UncheckedEntryPoint(instructions());
   }
   uword MonomorphicEntryPoint() const {
-    const Instructions& instr = Instructions::Handle(instructions());
-    return instr.MonomorphicEntryPoint();
+    return Instructions::MonomorphicEntryPoint(instructions());
+  }
+  uword MonomorphicUncheckedEntryPoint() const {
+    return Instructions::MonomorphicUncheckedEntryPoint(instructions());
   }
   intptr_t Size() const { return Instructions::Size(instructions()); }
-  RawObjectPool* GetObjectPool() const { return object_pool(); }
-
+  RawObjectPool* GetObjectPool() const;
   bool ContainsInstructionAt(uword addr) const {
     return ContainsInstructionAt(raw(), addr);
   }
@@ -4943,13 +4870,17 @@
   RawStackMap* GetStackMap(uint32_t pc_offset,
                            Array* stackmaps,
                            StackMap* map) const;
-
   enum CallKind {
     kPcRelativeCall = 1,
     kPcRelativeTailCall = 2,
     kCallViaCode = 3,
   };
 
+  enum CallEntryPoint {
+    kDefaultEntry,
+    kUncheckedEntry,
+  };
+
   enum SCallTableEntry {
     kSCallTableKindAndOffset = 0,
     kSCallTableCodeTarget = 1,
@@ -4963,7 +4894,10 @@
   };
 
   class KindField : public BitField<intptr_t, CallKind, 0, 2> {};
-  class OffsetField : public BitField<intptr_t, intptr_t, 2, 28> {};
+  class EntryPointField
+      : public BitField<intptr_t, CallEntryPoint, KindField::kNextBit, 1> {};
+  class OffsetField
+      : public BitField<intptr_t, intptr_t, EntryPointField::kNextBit, 27> {};
 
   void set_static_calls_target_table(const Array& value) const;
   RawArray* static_calls_target_table() const {
@@ -5273,6 +5207,8 @@
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Code, Object);
   friend class Class;
   friend class SnapshotWriter;
+  friend class StubCode;     // for set_object_pool
+  friend class Precompiler;  // for set_object_pool
   friend class FunctionSerializationCluster;
   friend class CodeSerializationCluster;
   friend class StubCode;               // for set_object_pool
@@ -5552,7 +5488,9 @@
 
   void EnsureCapacity() const;
 
-  void Insert(const Smi& class_id, const Function& target) const;
+  void Insert(const Smi& class_id, const Object& target) const;
+
+  void SwitchToBareInstructions();
 
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(RawMegamorphicCache));
@@ -5577,7 +5515,7 @@
   static inline void SetEntry(const Array& array,
                               intptr_t index,
                               const Smi& class_id,
-                              const Function& target);
+                              const Object& target);
 
   static inline RawObject* GetClassId(const Array& array, intptr_t index);
   static inline RawObject* GetTargetFunction(const Array& array,
@@ -5839,6 +5777,9 @@
 
   RawAbstractType* GetType(Heap::Space space) const;
 
+  // Access the arguments of the [Type] of this [Instance].
+  // Note: for [Type]s instead of [Instance]s with a [Type] attached, use
+  // [arguments()] and [set_arguments()]
   virtual RawTypeArguments* GetTypeArguments() const;
   virtual void SetTypeArguments(const TypeArguments& value) const;
 
@@ -5846,15 +5787,12 @@
   // The type argument vectors are used to instantiate the other type if needed.
   bool IsInstanceOf(const AbstractType& other,
                     const TypeArguments& other_instantiator_type_arguments,
-                    const TypeArguments& other_function_type_arguments,
-                    Error* bound_error) const;
+                    const TypeArguments& other_function_type_arguments) const;
 
   // Returns true if the type of this instance is a subtype of FutureOr<T>
   // specified by instantiated type 'other'.
   // Returns false if other type is not a FutureOr.
-  bool IsFutureOrInstanceOf(Zone* zone,
-                            const AbstractType& other,
-                            Error* bound_error) const;
+  bool IsFutureOrInstanceOf(Zone* zone, const AbstractType& other) const;
 
   bool IsValidNativeIndex(int index) const {
     return ((index >= 0) && (index < clazz()->ptr()->num_native_fields_));
@@ -6080,24 +6018,7 @@
   bool IsSubtypeOf(const TypeArguments& other,
                    intptr_t from_index,
                    intptr_t len,
-                   Error* bound_error,
-                   TrailPtr bound_trail,
-                   Heap::Space space) const {
-    return TypeTest(kIsSubtypeOf, other, from_index, len, bound_error,
-                    bound_trail, space);
-  }
-
-  // Check the 'more specific' relationship, considering only a subvector of
-  // length 'len' starting at 'from_index'.
-  bool IsMoreSpecificThan(const TypeArguments& other,
-                          intptr_t from_index,
-                          intptr_t len,
-                          Error* bound_error,
-                          TrailPtr bound_trail,
-                          Heap::Space space) const {
-    return TypeTest(kIsMoreSpecificThan, other, from_index, len, bound_error,
-                    bound_trail, space);
-  }
+                   Heap::Space space) const;
 
   // Check if the vectors are equal (they may be null).
   bool Equals(const TypeArguments& other) const {
@@ -6128,28 +6049,12 @@
   bool CanShareInstantiatorTypeArguments(const Class& instantiator_class) const;
   bool CanShareFunctionTypeArguments(const Function& function) const;
 
-  // Return true if all types of this vector are respectively, resolved,
-  // finalized, or bounded.
-  bool IsResolved() const;
+  // Return true if all types of this vector are finalized.
   bool IsFinalized() const;
-  bool IsBounded() const;
 
   // Return true if this vector contains a recursive type argument.
   bool IsRecursive() const;
 
-  // Set the scope of this type argument vector to the given function.
-  void SetScopeFunction(const Function& function) const;
-
-  // Clone this type argument vector and clone all unfinalized type arguments.
-  // Finalized type arguments are shared.
-  RawTypeArguments* CloneUnfinalized() const;
-
-  // Clone this type argument vector and clone all uninstantiated type
-  // arguments, changing the class owner of type parameters.
-  // Instantiated type arguments are shared.
-  RawTypeArguments* CloneUninstantiated(const Class& new_owner,
-                                        TrailPtr trail = NULL) const;
-
   // Canonicalize only if instantiated, otherwise returns 'this'.
   RawTypeArguments* Canonicalize(TrailPtr trail = NULL) const;
 
@@ -6162,22 +6067,18 @@
   // where each reference to a type parameter is replaced with the corresponding
   // type from the various type argument vectors (class instantiator, function,
   // or parent functions via the current context).
-  // If bound_error is not NULL, it may be set to reflect a bound error.
   RawTypeArguments* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       const TypeArguments& function_type_arguments,
       intptr_t num_free_fun_type_params,
-      Error* bound_error,
       TrailPtr instantiation_trail,
-      TrailPtr bound_trail,
       Heap::Space space) const;
 
   // Runtime instantiation with canonicalization. Not to be used during type
   // finalization at compile time.
   RawTypeArguments* InstantiateAndCanonicalizeFrom(
       const TypeArguments& instantiator_type_arguments,
-      const TypeArguments& function_type_arguments,
-      Error* bound_error) const;
+      const TypeArguments& function_type_arguments) const;
 
   // Return true if this type argument vector has cached instantiations.
   bool HasInstantiations() const;
@@ -6228,16 +6129,6 @@
                       intptr_t from_index,
                       intptr_t len) const;
 
-  // Check the subtype or 'more specific' relationship, considering only a
-  // subvector of length 'len' starting at 'from_index'.
-  bool TypeTest(TypeTestKind test_kind,
-                const TypeArguments& other,
-                intptr_t from_index,
-                intptr_t len,
-                Error* bound_error,
-                TrailPtr bound_trail,
-                Heap::Space space) const;
-
   // Return the internal or public name of a subvector of this type argument
   // vector, e.g. "<T, dynamic, List<T>, int>".
   RawString* SubvectorName(intptr_t from_index,
@@ -6271,13 +6162,6 @@
   virtual void SetIsFinalized() const;
   virtual bool IsBeingFinalized() const;
   virtual void SetIsBeingFinalized() const;
-  virtual bool IsMalformed() const;
-  virtual bool IsMalbounded() const;
-  virtual bool IsMalformedOrMalbounded() const;
-  virtual RawLanguageError* error() const;
-  virtual void set_error(const LanguageError& value) const;
-  virtual bool IsResolved() const;
-  virtual void SetIsResolved() const;
   virtual bool HasTypeClass() const { return type_class_id() != kIllegalCid; }
   virtual classid_t type_class_id() const;
   virtual RawClass* type_class() const;
@@ -6297,9 +6181,6 @@
   virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const;
 
-  // Set the scope of this type to the given function.
-  virtual void SetScopeFunction(const Function& function) const;
-
   // Check if this type represents a function type.
   virtual bool IsFunctionType() const { return false; }
 
@@ -6314,29 +6195,13 @@
   // must remain uninstantiated, because only T is a free variable in this type.
   //
   // Return a new type, or return 'this' if it is already instantiated.
-  // If bound_error is not NULL, it may be set to reflect a bound error.
   virtual RawAbstractType* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       const TypeArguments& function_type_arguments,
       intptr_t num_free_fun_type_params,
-      Error* bound_error,
       TrailPtr instantiation_trail,
-      TrailPtr bound_trail,
       Heap::Space space) const;
 
-  // Return a clone of this unfinalized type or the type itself if it is
-  // already finalized. Apply recursively to type arguments, i.e. finalized
-  // type arguments of an unfinalized type are not cloned, but shared.
-  virtual RawAbstractType* CloneUnfinalized() const;
-
-  // Return a clone of this uninstantiated type where all references to type
-  // parameters are replaced with references to type parameters of the same name
-  // but belonging to the new owner class.
-  // Apply recursively to type arguments, i.e. instantiated type arguments of
-  // an uninstantiated type are not cloned, but shared.
-  virtual RawAbstractType* CloneUninstantiated(const Class& new_owner,
-                                               TrailPtr trail = NULL) const;
-
   virtual RawInstance* CheckAndCanonicalize(Thread* thread,
                                             const char** error_str) const {
     return Canonicalize();
@@ -6400,9 +6265,7 @@
   // Check if this type is a still uninitialized TypeRef.
   bool IsNullTypeRef() const;
 
-  // Check if this type represents the 'dynamic' type or if it is malformed,
-  // since a malformed type is mapped to 'dynamic'.
-  // Call IsMalformed() first, if distinction is required.
+  // Check if this type represents the 'dynamic' type.
   bool IsDynamicType() const;
 
   // Check if this type represents the 'void' type.
@@ -6452,28 +6315,13 @@
   bool IsDartClosureType() const;
 
   // Check the subtype relationship.
-  bool IsSubtypeOf(const AbstractType& other,
-                   Error* bound_error,
-                   TrailPtr bound_trail,
-                   Heap::Space space) const {
-    return TypeTest(kIsSubtypeOf, other, bound_error, bound_trail, space);
-  }
-
-  // Check the 'more specific' relationship.
-  bool IsMoreSpecificThan(const AbstractType& other,
-                          Error* bound_error,
-                          TrailPtr bound_trail,
-                          Heap::Space space) const {
-    return TypeTest(kIsMoreSpecificThan, other, bound_error, bound_trail,
-                    space);
-  }
+  bool IsSubtypeOf(const AbstractType& other, Heap::Space space) const;
 
   // Returns true iff subtype is a subtype of supertype, false otherwise or if
   // an error occurred.
   static bool InstantiateAndTestSubtype(
       AbstractType* subtype,
       AbstractType* supertype,
-      Error* bound_error,
       const TypeArguments& instantiator_type_args,
       const TypeArguments& function_type_args);
 
@@ -6488,20 +6336,11 @@
   void SetTypeTestingStub(const Instructions& instr) const;
 
  private:
-  // Check the 'is subtype of' or 'is more specific than' relationship.
-  bool TypeTest(TypeTestKind test_kind,
-                const AbstractType& other,
-                Error* bound_error,
-                TrailPtr bound_trail,
-                Heap::Space space) const;
-
   // Returns true if this type is a subtype of FutureOr<T> specified by 'other'.
   // Returns false if other type is not a FutureOr.
-  bool FutureOrTypeTest(Zone* zone,
-                        const AbstractType& other,
-                        Error* bound_error,
-                        TrailPtr bound_trail,
-                        Heap::Space space) const;
+  bool IsSubtypeOfFutureOr(Zone* zone,
+                           const AbstractType& other,
+                           Heap::Space space) const;
 
   // Return the internal or public name of this type, including the names of its
   // type arguments, if any.
@@ -6540,15 +6379,6 @@
     return raw_ptr()->type_state_ == RawType::kBeingFinalized;
   }
   virtual void SetIsBeingFinalized() const;
-  virtual bool IsMalformed() const;
-  virtual bool IsMalbounded() const;
-  virtual bool IsMalformedOrMalbounded() const;
-  virtual RawLanguageError* error() const;
-  virtual void set_error(const LanguageError& value) const;
-  virtual bool IsResolved() const {
-    return raw_ptr()->type_state_ >= RawType::kResolved;
-  }
-  virtual void SetIsResolved() const;
   virtual bool HasTypeClass() const {
     ASSERT(type_class_id() != kIllegalCid);
     return true;
@@ -6564,14 +6394,13 @@
                               TrailPtr trail = NULL) const;
   virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const;
-  virtual void SetScopeFunction(const Function& function) const;
   // If signature is not null, this type represents a function type. Note that
   // the signature fully represents the type and type arguments can be ignored.
   // However, in case of a generic typedef, they document how the typedef class
   // was parameterized to obtain the actual signature.
   RawFunction* signature() const;
   void set_signature(const Function& value) const;
-  static intptr_t signature_offset() { return OFFSET_OF(RawType, sig_or_err_); }
+  static intptr_t signature_offset() { return OFFSET_OF(RawType, signature_); }
 
   virtual bool IsFunctionType() const {
     return signature() != Function::null();
@@ -6580,13 +6409,8 @@
       const TypeArguments& instantiator_type_arguments,
       const TypeArguments& function_type_arguments,
       intptr_t num_free_fun_type_params,
-      Error* bound_error,
       TrailPtr instantiation_trail,
-      TrailPtr bound_trail,
       Heap::Space space) const;
-  virtual RawAbstractType* CloneUnfinalized() const;
-  virtual RawAbstractType* CloneUninstantiated(const Class& new_owner,
-                                               TrailPtr trail = NULL) const;
   virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const;
 #if defined(DEBUG)
   // Check if type is canonical.
@@ -6690,19 +6514,6 @@
     const AbstractType& ref_type = AbstractType::Handle(type());
     return ref_type.IsNull() || ref_type.IsBeingFinalized();
   }
-  virtual bool IsMalformed() const {
-    return AbstractType::Handle(type()).IsMalformed();
-  }
-  virtual bool IsMalbounded() const {
-    return AbstractType::Handle(type()).IsMalbounded();
-  }
-  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 HasTypeClass() const {
     return (type() != AbstractType::null()) &&
            AbstractType::Handle(type()).HasTypeClass();
@@ -6726,17 +6537,16 @@
                               TrailPtr trail = NULL) const;
   virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const { return true; }
-  virtual void SetScopeFunction(const Function& function) const;
+  virtual bool IsFunctionType() const {
+    const AbstractType& ref_type = AbstractType::Handle(type());
+    return !ref_type.IsNull() && ref_type.IsFunctionType();
+  }
   virtual RawTypeRef* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       const TypeArguments& function_type_arguments,
       intptr_t num_free_fun_type_params,
-      Error* bound_error,
       TrailPtr instantiation_trail,
-      TrailPtr bound_trail,
       Heap::Space space) const;
-  virtual RawTypeRef* CloneUninstantiated(const Class& new_owner,
-                                          TrailPtr trail = NULL) const;
   virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const;
 #if defined(DEBUG)
   // Check if typeref is canonical.
@@ -6777,10 +6587,6 @@
   }
   virtual void SetIsFinalized() const;
   virtual bool IsBeingFinalized() const { return false; }
-  virtual bool IsMalformed() const { return false; }
-  virtual bool IsMalbounded() const { return false; }
-  virtual bool IsMalformedOrMalbounded() const { return false; }
-  virtual bool IsResolved() const { return true; }
   virtual bool HasTypeClass() const { return false; }
   virtual classid_t type_class_id() const { return kIllegalCid; }
   classid_t parameterized_class_id() const;
@@ -6799,33 +6605,18 @@
   void set_index(intptr_t value) const;
   RawAbstractType* bound() const { return raw_ptr()->bound_; }
   void set_bound(const AbstractType& value) const;
-  // Returns true if bounded_type is below upper_bound, otherwise return false
-  // and set bound_error if both bounded_type and upper_bound are instantiated.
-  // If one or both are not instantiated, returning false only means that the
-  // bound cannot be checked yet and this is not an error.
-  bool CheckBound(const AbstractType& bounded_type,
-                  const AbstractType& upper_bound,
-                  Error* bound_error,
-                  TrailPtr bound_trail,
-                  Heap::Space space) const;
   virtual TokenPosition token_pos() const { return raw_ptr()->token_pos_; }
   virtual bool IsInstantiated(Genericity genericity = kAny,
                               intptr_t num_free_fun_type_params = kAllFree,
                               TrailPtr trail = NULL) const;
   virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const { return false; }
-  virtual void SetScopeFunction(const Function& function) const {}
   virtual RawAbstractType* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       const TypeArguments& function_type_arguments,
       intptr_t num_free_fun_type_params,
-      Error* bound_error,
       TrailPtr instantiation_trail,
-      TrailPtr bound_trail,
       Heap::Space space) const;
-  virtual RawAbstractType* CloneUnfinalized() const;
-  virtual RawAbstractType* CloneUninstantiated(const Class& new_owner,
-                                               TrailPtr trail = NULL) const;
   virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const {
     return raw();
   }
@@ -6866,154 +6657,6 @@
   friend class ClearTypeHashVisitor;
 };
 
-// A BoundedType represents a type instantiated at compile time from a type
-// parameter specifying a bound that either cannot be checked at compile time
-// because the type or the bound are still uninstantiated or can be checked and
-// would trigger a bound error in checked mode. The bound must be checked at
-// runtime once the type and its bound are instantiated and when the execution
-// mode is known to be checked mode.
-class BoundedType : public AbstractType {
- public:
-  virtual bool IsFinalized() const {
-    return AbstractType::Handle(type()).IsFinalized();
-  }
-  virtual bool IsBeingFinalized() const {
-    return AbstractType::Handle(type()).IsBeingFinalized();
-  }
-  virtual bool IsMalformed() const;
-  virtual bool IsMalbounded() const;
-  virtual bool IsMalformedOrMalbounded() const;
-  virtual RawLanguageError* error() const;
-  virtual bool IsResolved() const { return true; }
-  virtual bool HasTypeClass() const {
-    return AbstractType::Handle(type()).HasTypeClass();
-  }
-  virtual classid_t type_class_id() const {
-    return AbstractType::Handle(type()).type_class_id();
-  }
-  virtual RawClass* type_class() const {
-    return AbstractType::Handle(type()).type_class();
-  }
-  virtual RawTypeArguments* arguments() const {
-    return AbstractType::Handle(type()).arguments();
-  }
-  RawAbstractType* type() const { return raw_ptr()->type_; }
-  RawAbstractType* bound() const { return raw_ptr()->bound_; }
-  RawTypeParameter* type_parameter() const {
-    return raw_ptr()->type_parameter_;
-  }
-  virtual TokenPosition token_pos() const {
-    return AbstractType::Handle(type()).token_pos();
-  }
-  virtual bool IsInstantiated(Genericity genericity = kAny,
-                              intptr_t num_free_fun_type_params = kAllFree,
-                              TrailPtr trail = NULL) const {
-    // It is not possible to encounter an instantiated bounded type with an
-    // uninstantiated upper bound. Therefore, we do not need to check if the
-    // bound is instantiated. Moreover, doing so could lead into cycles, as in
-    // class C<T extends C<C>> { }.
-    return AbstractType::Handle(type()).IsInstantiated(
-        genericity, num_free_fun_type_params, trail);
-  }
-  virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
-  virtual bool IsRecursive() const;
-  virtual void SetScopeFunction(const Function& function) const;
-  virtual RawAbstractType* InstantiateFrom(
-      const TypeArguments& instantiator_type_arguments,
-      const TypeArguments& function_type_arguments,
-      intptr_t num_free_fun_type_params,
-      Error* bound_error,
-      TrailPtr instantiation_trail,
-      TrailPtr bound_trail,
-      Heap::Space space) const;
-  virtual RawAbstractType* CloneUnfinalized() const;
-  virtual RawAbstractType* CloneUninstantiated(const Class& new_owner,
-                                               TrailPtr trail = NULL) const;
-  virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const {
-    return raw();
-  }
-#if defined(DEBUG)
-  // Check if bounded type is canonical.
-  virtual bool CheckIsCanonical(Thread* thread) const { return true; }
-#endif  // DEBUG
-  virtual void EnumerateURIs(URIs* uris) const;
-
-  virtual intptr_t Hash() const;
-
-  static intptr_t InstanceSize() {
-    return RoundedAllocationSize(sizeof(RawBoundedType));
-  }
-
-  static RawBoundedType* New(const AbstractType& type,
-                             const AbstractType& bound,
-                             const TypeParameter& type_parameter);
-
- private:
-  intptr_t ComputeHash() const;
-  void SetHash(intptr_t value) const;
-
-  void set_type(const AbstractType& value) const;
-  void set_bound(const AbstractType& value) const;
-  void set_type_parameter(const TypeParameter& value) const;
-
-  static RawBoundedType* New();
-
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(BoundedType, AbstractType);
-  friend class Class;
-  friend class ClearTypeHashVisitor;
-};
-
-// A MixinAppType represents a parsed mixin application clause, e.g.
-// "S<T> with M<U>, N<V>".
-// MixinAppType objects do not survive finalization, so they do not
-// need to be written to and read from snapshots.
-// The class finalizer creates synthesized classes S&M and S&M&N if they do not
-// yet exist in the library declaring the mixin application clause.
-class MixinAppType : public AbstractType {
- public:
-  // A MixinAppType object is unfinalized by definition, since it is replaced at
-  // class finalization time with a finalized (and possibly malformed or
-  // malbounded) Type object.
-  virtual bool IsFinalized() const { return false; }
-  virtual bool IsMalformed() const { return false; }
-  virtual bool IsMalbounded() const { return false; }
-  virtual bool IsMalformedOrMalbounded() const { return false; }
-  virtual bool IsResolved() const { return false; }
-  virtual bool HasTypeClass() const { return false; }
-  virtual RawString* Name() const;
-  virtual TokenPosition token_pos() const;
-
-  // Returns the mixin composition depth of this mixin application type.
-  intptr_t Depth() const;
-
-  // Returns the declared super type of the mixin application, which will also
-  // be the super type of the first synthesized class, e.g. class "S&M" will
-  // refer to super type "S<T>".
-  RawAbstractType* super_type() const { return raw_ptr()->super_type_; }
-
-  // Returns the mixin type at the given mixin composition depth, e.g. N<V> at
-  // depth 0 and M<U> at depth 1.
-  RawAbstractType* MixinTypeAt(intptr_t depth) const;
-
-  static intptr_t InstanceSize() {
-    return RoundedAllocationSize(sizeof(RawMixinAppType));
-  }
-
-  static RawMixinAppType* New(const AbstractType& super_type,
-                              const Array& mixin_types);
-
- private:
-  void set_super_type(const AbstractType& value) const;
-
-  RawArray* mixin_types() const { return raw_ptr()->mixin_types_; }
-  void set_mixin_types(const Array& value) const;
-
-  static RawMixinAppType* New();
-
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(MixinAppType, AbstractType);
-  friend class Class;
-};
-
 class Number : public Instance {
  public:
   // TODO(iposva): Add more useful Number methods.
@@ -8103,6 +7746,7 @@
   static intptr_t LengthOf(const RawArray* array) {
     return Smi::Value(array->ptr()->length_);
   }
+
   static intptr_t length_offset() { return OFFSET_OF(RawArray, length_); }
   static intptr_t data_offset() {
     return OFFSET_OF_RETURNED_VALUE(RawArray, data);
@@ -8120,12 +7764,24 @@
     return memcmp(a->ptr()->data(), b->ptr()->data(), kWordSize * length) == 0;
   }
 
+  static RawObject** DataOf(RawArray* array) { return array->ptr()->data(); }
+
   RawObject* At(intptr_t index) const { return *ObjectAddr(index); }
   void SetAt(intptr_t index, const Object& value) const {
     // TODO(iposva): Add storing NoSafepointScope.
     StoreArrayPointer(ObjectAddr(index), value.raw());
   }
 
+  // Access to the array with acquire release semantics.
+  RawObject* AtAcquire(intptr_t index) const {
+    return AtomicOperations::LoadAcquire(ObjectAddr(index));
+  }
+  void SetAtRelease(intptr_t index, const Object& value) const {
+    // TODO(iposva): Add storing NoSafepointScope.
+    StoreArrayPointer<RawObject*, MemoryOrder::kRelease>(ObjectAddr(index),
+                                                         value.raw());
+  }
+
   bool IsImmutable() const { return raw()->GetClassId() == kImmutableArrayCid; }
 
   virtual RawTypeArguments* GetTypeArguments() const {
@@ -8187,13 +7843,17 @@
                         intptr_t new_length,
                         Heap::Space space = Heap::kNew);
 
+  // Truncates the array to a given length. 'new_length' must be less than
+  // or equal to 'source.Length()'. The remaining unused part of the array is
+  // marked as an Array object or a regular Object so that it can be traversed
+  // during garbage collection.
+  void Truncate(intptr_t new_length) const;
+
   // Return an Array object that contains all the elements currently present
   // in the specified Growable Object Array. This is done by first truncating
   // the Growable Object Array's backing array to the currently used size and
   // returning the truncated backing array.
-  // The remaining unused part of the backing array is marked as an Array
-  // object or a regular Object so that it can be traversed during garbage
-  // collection. The backing array of the original Growable Object Array is
+  // The backing array of the original Growable Object Array is
   // set to an empty array.
   // If the unique parameter is false, the function is allowed to return
   // a shared Array instance.
@@ -8222,9 +7882,9 @@
     StoreSmi(&raw_ptr()->length_, Smi::New(value));
   }
 
-  template <typename type>
+  template <typename type, MemoryOrder order = MemoryOrder::kRelaxed>
   void StoreArrayPointer(type const* addr, type value) const {
-    raw()->StoreArrayPointer(addr, value);
+    raw()->StoreArrayPointer<type, order>(addr, value);
   }
 
   // Store a range of pointers [from, from + count) into [to, to + count).
@@ -9282,8 +8942,6 @@
     StoreNonPointer(&raw_ptr()->num_registers_, value);
   }
 
-  void* GetDataStartAddress() const;
-  static RawRegExp* FromDataStartAddress(void* data);
   const char* Flags() const;
 
   virtual bool CanonicalizeEquals(const Instance& other) const;
@@ -9534,8 +9192,20 @@
 void MegamorphicCache::SetEntry(const Array& array,
                                 intptr_t index,
                                 const Smi& class_id,
-                                const Function& target) {
+                                const Object& target) {
+  ASSERT(target.IsFunction() || target.IsSmi());
   array.SetAt((index * kEntryLength) + kClassIdIndex, class_id);
+#if defined(DART_PRECOMPILED_RUNTIME)
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    if (target.IsFunction()) {
+      const auto& function = Function::Cast(target);
+      const auto& entry_point = Smi::Handle(
+          Smi::FromAlignedAddress(Code::EntryPoint(function.CurrentCode())));
+      array.SetAt((index * kEntryLength) + kTargetFunctionIndex, entry_point);
+      return;
+    }
+  }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
   array.SetAt((index * kEntryLength) + kTargetFunctionIndex, target);
 }
 
@@ -9577,20 +9247,6 @@
   StoreSmi(&raw_ptr()->hash_, Smi::New(value));
 }
 
-inline intptr_t BoundedType::Hash() const {
-  intptr_t result = Smi::Value(raw_ptr()->hash_);
-  if (result != 0) {
-    return result;
-  }
-  return ComputeHash();
-}
-
-inline void BoundedType::SetHash(intptr_t value) const {
-  // This is only safe because we create a new Smi, which does not cause
-  // heap allocation.
-  StoreSmi(&raw_ptr()->hash_, Smi::New(value));
-}
-
 inline intptr_t TypeArguments::Hash() const {
   if (IsNull()) return 0;
   intptr_t result = Smi::Value(raw_ptr()->hash_);
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 95e3f16..89fe81a 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -16,6 +16,12 @@
 
 namespace dart {
 
+static bool IsUserClass(intptr_t cid) {
+  if (cid == kContextCid) return true;
+  if (cid == kTypeArgumentsCid) return false;
+  return cid >= kInstanceCid;
+}
+
 // The state of a pre-order, depth-first traversal of an object graph.
 // When a node is visited, *all* its children are pushed to the stack at once.
 // We insert a sentinel between the node and its children on the stack, to
@@ -35,12 +41,8 @@
   virtual void VisitPointers(RawObject** first, RawObject** last) {
     for (RawObject** current = first; current <= last; ++current) {
       if ((*current)->IsHeapObject() && !(*current)->IsGraphMarked()) {
-        if (!include_vm_objects_) {
-          intptr_t cid = (*current)->GetClassId();
-          if (((cid < kInstanceCid) || (cid == kTypeArgumentsCid)) &&
-              (cid != kContextCid) && (cid != kFieldCid)) {
-            continue;
-          }
+        if (!include_vm_objects_ && !IsUserClass((*current)->GetClassId())) {
+          continue;
         }
         (*current)->SetGraphMarked();
         Node node;
@@ -536,8 +538,7 @@
         // we'll need to encode which fields were omitted here.
         continue;
       }
-      if (only_instances_ && ((object->GetClassId() < kInstanceCid) ||
-                              (object->GetClassId() == kTypeArgumentsCid))) {
+      if (only_instances_ && !IsUserClass(object->GetClassId())) {
         continue;
       }
       WritePtr(object, stream_);
diff --git a/runtime/vm/object_id_ring_test.cc b/runtime/vm/object_id_ring_test.cc
index 92d3400..23593a7 100644
--- a/runtime/vm/object_id_ring_test.cc
+++ b/runtime/vm/object_id_ring_test.cc
@@ -201,18 +201,12 @@
   intptr_t raw_obj_id1 = -1;
   intptr_t raw_obj_id2 = -1;
   {
-    Api::Scope api_scope(thread);
-    Dart_Handle result;
-    // Create a string in the old heap.
-    result = Api::NewHandle(thread, String::New("old", Heap::kOld));
-    EXPECT_VALID(result);
-    intptr_t string_length = 0;
-    // Inspect string.
-    EXPECT(!Dart_IsNull(result));
-    EXPECT(Dart_IsString(result));
-    EXPECT_VALID(Dart_StringLength(result, &string_length));
-    EXPECT_EQ(3, string_length);
-    RawObject* raw_obj = Api::UnwrapHandle(result);
+    HandleScope handle_scope(thread);
+    const String& str = String::Handle(String::New("old", Heap::kOld));
+    EXPECT(!str.IsNull());
+    EXPECT_EQ(3, str.Length());
+
+    RawObject* raw_obj = Object::RawCast(str.raw());
     // Verify that it is located in old heap.
     EXPECT(raw_obj->IsOldObject());
     EXPECT_NE(Object::null(), raw_obj);
@@ -228,7 +222,7 @@
     EXPECT_NE(Object::null(), raw_obj2);
     EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj1));
     EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj2));
-    // Exit scope. Freeing result handle.
+    // Exit scope. Freeing String handle.
   }
   // Force a GC. No reference exist to the old string anymore. It should be
   // collected and the object id ring will now return the null object for
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc
index e63ed7a..c519034 100644
--- a/runtime/vm/object_reload.cc
+++ b/runtime/vm/object_reload.cc
@@ -174,12 +174,12 @@
   set_constants(old_constants);
 }
 
-void Class::CopyCanonicalType(const Class& old_cls) const {
-  const Type& old_canonical_type = Type::Handle(old_cls.canonical_type());
-  if (old_canonical_type.IsNull()) {
+void Class::CopyDeclarationType(const Class& old_cls) const {
+  const Type& old_declaration_type = Type::Handle(old_cls.declaration_type());
+  if (old_declaration_type.IsNull()) {
     return;
   }
-  set_canonical_type(old_canonical_type);
+  set_declaration_type(old_declaration_type);
 }
 
 class EnumMapTraits {
@@ -704,13 +704,36 @@
   if (rule == kInstance) {
     const intptr_t num_args = NumArgsTested();
     const bool tracking_exactness = IsTrackingExactness();
-    if (num_args == 2) {
-      ClearWithSentinel();
-    } else {
-      const Array& data_array = Array::Handle(
-          zone, CachedEmptyICDataArray(num_args, tracking_exactness));
-      set_ic_data_array(data_array);
+    const intptr_t len = Length();
+    // We need at least one non-sentinel entry to require a check
+    // for the smi fast path case.
+    if (num_args == 2 && len >= 2) {
+      if (IsImmutable()) {
+        return;
+      }
+      Zone* zone = Thread::Current()->zone();
+      const String& name = String::Handle(target_name());
+      const Class& smi_class = Class::Handle(Smi::Class());
+      const Function& smi_op_target = Function::Handle(
+          Resolver::ResolveDynamicAnyArgs(zone, smi_class, name));
+      GrowableArray<intptr_t> class_ids(2);
+      Function& target = Function::Handle();
+      GetCheckAt(0, &class_ids, &target);
+      if ((target.raw() == smi_op_target.raw()) && (class_ids[0] == kSmiCid) &&
+          (class_ids[1] == kSmiCid)) {
+        // The smi fast path case, preserve the initial entry but reset the
+        // count.
+        ClearCountAt(0);
+        WriteSentinelAt(1);
+        const Array& array = Array::Handle(ic_data());
+        array.Truncate(2 * TestEntryLength());
+        return;
+      }
+      // Fall back to the normal behavior with cached empty ICData arrays.
     }
+    const Array& data_array = Array::Handle(
+        zone, CachedEmptyICDataArray(num_args, tracking_exactness));
+    set_ic_data_array(data_array);
     return;
   } else if (rule == kNoRebind || rule == kNSMDispatch) {
     // TODO(30877) we should account for addition/removal of NSM.
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index fe68a1b..5299079 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -107,8 +107,10 @@
   if (!superType.IsNull()) {
     jsobj.AddProperty("superType", superType);
   }
-  const Type& mix = Type::Handle(mixin());
-  if (!mix.IsNull()) {
+  const Array& interface_array = Array::Handle(interfaces());
+  if (is_transformed_mixin_application()) {
+    Type& mix = Type::Handle();
+    mix ^= interface_array.At(interface_array.Length() - 1);
     jsobj.AddProperty("mixin", mix);
   }
   jsobj.AddProperty("library", Object::Handle(library()));
@@ -118,7 +120,6 @@
   }
   {
     JSONArray interfaces_array(&jsobj, "interfaces");
-    const Array& interface_array = Array::Handle(interfaces());
     Type& interface_type = Type::Handle();
     if (!interface_array.IsNull()) {
       for (intptr_t i = 0; i < interface_array.Length(); ++i) {
@@ -485,9 +486,7 @@
     Class& klass = Class::Handle();
     while (class_iter.HasNext()) {
       klass = class_iter.GetNextClass();
-      if (!klass.IsMixinApplication()) {
-        jsarr.AddValue(klass);
-      }
+      jsarr.AddValue(klass);
     }
   }
   {
@@ -1103,7 +1102,7 @@
   PrintSharedInstanceJSON(&jsobj, ref);
   jsobj.AddProperty("kind", "Type");
   const Class& type_cls = Class::Handle(type_class());
-  if (type_cls.CanonicalType() == raw()) {
+  if (type_cls.DeclarationType() == raw()) {
     intptr_t cid = type_cls.id();
     jsobj.AddFixedServiceId("classes/%" Pd "/types/%d", cid, 0);
   } else {
@@ -1154,25 +1153,6 @@
   jsobj.AddProperty("bound", upper_bound);
 }
 
-void BoundedType::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  JSONObject jsobj(stream);
-  PrintSharedInstanceJSON(&jsobj, ref);
-  jsobj.AddProperty("kind", "BoundedType");
-  jsobj.AddServiceId(*this);
-  const String& user_name = String::Handle(UserVisibleName());
-  const String& vm_name = String::Handle(Name());
-  AddNameProperties(&jsobj, user_name.ToCString(), vm_name.ToCString());
-  if (ref) {
-    return;
-  }
-  jsobj.AddProperty("targetType", AbstractType::Handle(type()));
-  jsobj.AddProperty("bound", AbstractType::Handle(bound()));
-}
-
-void MixinAppType::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  UNREACHABLE();
-}
-
 void Number::PrintJSONImpl(JSONStream* stream, bool ref) const {
   UNREACHABLE();
 }
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index cd760de..77c99ee 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -120,12 +120,14 @@
   RW(Function, async_star_move_next_helper)                                    \
   RW(Function, complete_on_async_return)                                       \
   RW(Class, async_star_stream_controller)                                      \
+  RW(ObjectPool, global_object_pool)                                           \
   RW(Array, library_load_error_table)                                          \
   RW(Array, unique_dynamic_targets)                                            \
   RW(GrowableObjectArray, megamorphic_cache_table)                             \
   RW(Code, build_method_extractor_code)                                        \
   R_(Code, megamorphic_miss_code)                                              \
   R_(Function, megamorphic_miss_function)                                      \
+  RW(Array, code_order_table)                                                  \
   RW(Array, obfuscation_map)                                                   \
   RW(GrowableObjectArray, type_testing_stubs)                                  \
   RW(GrowableObjectArray, changed_in_last_reload)                              \
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index e79b54a..bb8bc1f 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -123,9 +123,9 @@
   // Cleanup the OS class.
   static void Cleanup();
 
-  static DART_NORETURN void Abort();
+  DART_NORETURN static void Abort();
 
-  static DART_NORETURN void Exit(int code);
+  DART_NORETURN static void Exit(int code);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/os_fuchsia.cc b/runtime/vm/os_fuchsia.cc
index 1034547..6534a9b 100644
--- a/runtime/vm/os_fuchsia.cc
+++ b/runtime/vm/os_fuchsia.cc
@@ -65,9 +65,15 @@
 const char* OS::GetTimeZoneName(int64_t seconds_since_epoch) {
   // TODO(abarth): Handle time zone changes.
   static const auto* tz_name = new std::string([] {
+#ifdef USE_STD_FOR_NON_NULLABLE_FIDL_FIELDS
+    std::string result;
+    tz->GetTimezoneId(&result);
+    return result;
+#else
     fidl::StringPtr result;
     tz->GetTimezoneId(&result);
     return *result;
+#endif
   }());
   return tz_name->c_str();
 }
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index 1f30787..aefca34 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -100,9 +100,7 @@
 
   uword stack_base() const { return stack_base_; }
   uword stack_limit() const { return stack_limit_; }
-  uword stack_limit_with_headroom() const {
-    return stack_limit_ + kStackSizeBuffer;
-  }
+  uword overflow_stack_limit() const { return stack_limit_ + kStackSizeBuffer; }
 
   bool HasStackHeadroom(intptr_t headroom = kStackSizeBuffer) {
     return GetCurrentStackPointer() > (stack_limit_ + headroom);
@@ -211,7 +209,7 @@
   static void DisableOSThreadCreation();
   static void EnableOSThreadCreation();
 
-  static const intptr_t kStackSizeBuffer = (4 * KB * kWordSize);
+  static const intptr_t kStackSizeBuffer = (16 * KB * kWordSize);
 
   static const ThreadId kInvalidThreadId;
   static const ThreadJoinId kInvalidThreadJoinId;
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 8a0eb23..482dac0 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -515,11 +515,8 @@
   ProfilerDartStackWalker(Thread* thread,
                           Sample* sample,
                           SampleBuffer* sample_buffer,
-                          uword stack_lower,
-                          uword stack_upper,
                           uword pc,
                           uword fp,
-                          uword sp,
                           bool allocation_sample,
                           intptr_t skip_count = 0)
       : ProfilerStackWalker((thread->isolate() != NULL)
@@ -530,10 +527,7 @@
                             skip_count),
         thread_(thread),
         pc_(reinterpret_cast<uword*>(pc)),
-        fp_(reinterpret_cast<uword*>(fp)),
-        sp_(reinterpret_cast<uword*>(sp)),
-        stack_upper_(stack_upper),
-        stack_lower_(stack_lower) {}
+        fp_(reinterpret_cast<uword*>(fp)) {}
 
   bool IsInterpretedFrame(uword* fp) {
 #if defined(DART_PRECOMPILED_RUNTIME)
@@ -600,6 +594,19 @@
 
     sample_->set_exit_frame_sample(has_exit_frame);
 
+    if (!has_exit_frame && !in_interpreted_frame &&
+        (CallerPC(in_interpreted_frame) == EntryMarker(in_interpreted_frame))) {
+      // During the prologue of a function, CallerPC will return the caller's
+      // caller. For most frames, the missing PC will be added during profile
+      // processing. However, during this stack walk, it can cause us to fail
+      // to identify the entry frame and lead the stack walk into the weeds.
+      // Do not continue the stalk walk since this might be a false positive
+      // from a Smi or unboxed value.
+      RELEASE_ASSERT(!has_exit_frame);
+      sample_->set_ignore_sample(true);
+      return;
+    }
+
     for (;;) {
       // Skip entry frame.
       if (StubCode::InInvocationStub(reinterpret_cast<uword>(pc_),
@@ -620,20 +627,6 @@
                                                    in_interpreted_frame));
       }
 
-#if !defined(TARGET_ARCH_DBC)
-      RawCode* marker = PCMarker(in_interpreted_frame);
-      if (marker == StubCode::InvokeDartCode().raw() ||
-          marker == StubCode::InvokeDartCodeFromBytecode().raw()) {
-        // During the prologue of a function, CallerPC will return the caller's
-        // caller. For most frames, the missing PC will be added during profile
-        // processing. However, during this stack walk, it can cause us to fail
-        // to identify the entry frame and lead the stack walk into the weeds.
-        RELEASE_ASSERT(!has_exit_frame);
-        sample_->set_ignore_sample(true);
-        return;
-      }
-#endif
-
       if (!Append(reinterpret_cast<uword>(pc_))) {
         break;  // Sample is full.
       }
@@ -648,14 +641,6 @@
   }
 
  private:
-  uword InitialReturnAddress() const {
-    ASSERT(sp_ != NULL);
-    // MSan/ASan are unaware of frames initialized by generated code.
-    MSAN_UNPOISON(sp_, kWordSize);
-    ASAN_UNPOISON(sp_, kWordSize);
-    return *(sp_);
-  }
-
   uword* CallerPC(bool interp) const {
     ASSERT(fp_ != NULL);
     uword* caller_pc_ptr =
@@ -676,20 +661,6 @@
     return reinterpret_cast<uword*>(*caller_fp_ptr);
   }
 
-  RawCode* PCMarker(bool interp) const {
-    ASSERT(fp_ != NULL);
-    if (interp) {
-      // We don't need this extra check for the interpreter because its frame
-      // build is atomic from the profiler's point of view.
-      return NULL;
-    }
-    uword* pc_marker_ptr = fp_ + kPcMarkerSlotFromFp;
-    // MSan/ASan are unaware of frames initialized by generated code.
-    MSAN_UNPOISON(pc_marker_ptr, kWordSize);
-    ASAN_UNPOISON(pc_marker_ptr, kWordSize);
-    return reinterpret_cast<RawCode*>(*pc_marker_ptr);
-  }
-
   uword* ExitLink(bool interp) const {
     ASSERT(fp_ != NULL);
     uword* exit_link_ptr =
@@ -700,23 +671,21 @@
     return reinterpret_cast<uword*>(*exit_link_ptr);
   }
 
-  bool ValidFramePointer() const { return ValidFramePointer(fp_); }
-
-  bool ValidFramePointer(uword* fp) const {
-    if (fp == NULL) {
-      return false;
-    }
-    uword cursor = reinterpret_cast<uword>(fp);
-    cursor += sizeof(fp);
-    return (cursor >= stack_lower_) && (cursor < stack_upper_);
+  // Note because of stack guards, it is important that this marker lives
+  // above FP.
+  uword* EntryMarker(bool interp) const {
+    ASSERT(!interp);
+    ASSERT(fp_ != NULL);
+    uword* entry_marker_ptr = fp_ + kSavedCallerPcSlotFromFp + 1;
+    // MSan/ASan are unaware of frames initialized by generated code.
+    MSAN_UNPOISON(entry_marker_ptr, kWordSize);
+    ASAN_UNPOISON(entry_marker_ptr, kWordSize);
+    return reinterpret_cast<uword*>(*entry_marker_ptr);
   }
 
   Thread* const thread_;
   uword* pc_;
   uword* fp_;
-  uword* sp_;
-  const uword stack_upper_;
-  const uword stack_lower_;
 };
 
 // If the VM is compiled without frame pointers (which is the default on
@@ -1218,8 +1187,7 @@
     native_stack_walker.walk();
   } else if (exited_dart_code) {
     ProfilerDartStackWalker dart_exit_stack_walker(
-        thread, sample, sample_buffer, stack_lower, stack_upper, pc, fp, sp,
-        /* allocation_sample*/ true);
+        thread, sample, sample_buffer, pc, fp, /* allocation_sample*/ true);
     dart_exit_stack_walker.walk();
   } else {
     // Fall back.
@@ -1418,9 +1386,8 @@
       &counters_, (isolate != NULL) ? isolate->main_port() : ILLEGAL_PORT,
       sample, sample_buffer, stack_lower, stack_upper, pc, fp, sp);
   const bool exited_dart_code = thread->HasExitedDartCode();
-  ProfilerDartStackWalker dart_stack_walker(thread, sample, sample_buffer,
-                                            stack_lower, stack_upper, pc, fp,
-                                            sp, /* allocation_sample*/ false);
+  ProfilerDartStackWalker dart_stack_walker(thread, sample, sample_buffer, pc,
+                                            fp, /* allocation_sample*/ false);
 
   // All memory access is done inside CollectSample.
   CollectSample(isolate, exited_dart_code, in_dart_code, sample,
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 27eb4fe..4251002 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -1922,36 +1922,26 @@
                                   uword user_tag,
                                   ProfileCodeTrieNode* current,
                                   ProcessedSample* sample) {
-    if (FLAG_profile_vm) {
-      // None.
-      if (tag_order() == Profile::kNoTags) {
-        return current;
-      }
-      // User first.
-      if ((tag_order() == Profile::kUserVM) ||
-          (tag_order() == Profile::kUser)) {
-        current = AppendUserTag(user_tag, current, sample);
-        // Only user.
-        if (tag_order() == Profile::kUser) {
-          return current;
-        }
-        return AppendVMTags(vm_tag, current, sample);
-      }
-      // VM first.
-      ASSERT((tag_order() == Profile::kVMUser) ||
-             (tag_order() == Profile::kVM));
-      current = AppendVMTags(vm_tag, current, sample);
-      // Only VM.
-      if (tag_order() == Profile::kVM) {
-        return current;
-      }
-      return AppendUserTag(user_tag, current, sample);
-    }
-
+    // None.
     if (tag_order() == Profile::kNoTags) {
       return current;
     }
-
+    // User first.
+    if ((tag_order() == Profile::kUserVM) || (tag_order() == Profile::kUser)) {
+      current = AppendUserTag(user_tag, current, sample);
+      // Only user.
+      if (tag_order() == Profile::kUser) {
+        return current;
+      }
+      return AppendVMTags(vm_tag, current, sample);
+    }
+    // VM first.
+    ASSERT((tag_order() == Profile::kVMUser) || (tag_order() == Profile::kVM));
+    current = AppendVMTags(vm_tag, current, sample);
+    // Only VM.
+    if (tag_order() == Profile::kVM) {
+      return current;
+    }
     return AppendUserTag(user_tag, current, sample);
   }
 
@@ -2081,36 +2071,26 @@
                                       uword user_tag,
                                       ProfileFunctionTrieNode* current,
                                       ProcessedSample* sample) {
-    if (FLAG_profile_vm) {
-      // None.
-      if (tag_order() == Profile::kNoTags) {
-        return current;
-      }
-      // User first.
-      if ((tag_order() == Profile::kUserVM) ||
-          (tag_order() == Profile::kUser)) {
-        current = AppendUserTag(user_tag, current, sample);
-        // Only user.
-        if (tag_order() == Profile::kUser) {
-          return current;
-        }
-        return AppendVMTags(vm_tag, current, sample);
-      }
-      // VM first.
-      ASSERT((tag_order() == Profile::kVMUser) ||
-             (tag_order() == Profile::kVM));
-      current = AppendVMTags(vm_tag, current, sample);
-      // Only VM.
-      if (tag_order() == Profile::kVM) {
-        return current;
-      }
-      return AppendUserTag(user_tag, current, sample);
-    }
-
+    // None.
     if (tag_order() == Profile::kNoTags) {
       return current;
     }
-
+    // User first.
+    if ((tag_order() == Profile::kUserVM) || (tag_order() == Profile::kUser)) {
+      current = AppendUserTag(user_tag, current, sample);
+      // Only user.
+      if (tag_order() == Profile::kUser) {
+        return current;
+      }
+      return AppendVMTags(vm_tag, current, sample);
+    }
+    // VM first.
+    ASSERT((tag_order() == Profile::kVMUser) || (tag_order() == Profile::kVM));
+    current = AppendVMTags(vm_tag, current, sample);
+    // Only VM.
+    if (tag_order() == Profile::kVM) {
+      return current;
+    }
     return AppendUserTag(user_tag, current, sample);
   }
 
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 2fe8841..2eecb7b 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -129,8 +129,7 @@
       zone, Array::New(MegamorphicCache::kEntryLength * capacity, Heap::kOld));
   const Function& handler =
       Function::Handle(zone, MegamorphicCacheTable::miss_handler(isolate));
-  MegamorphicCache::SetEntry(buckets, 0, MegamorphicCache::smi_illegal_cid(),
-                             handler);
+  MegamorphicCache::SetEntry(buckets, 0, Object::smi_illegal_cid(), handler);
 
   for (intptr_t i = 0; i < table.Length(); i++) {
     cache ^= table.At(i);
@@ -636,6 +635,12 @@
   ProgramVisitor::VisitFunctions(&visitor);
 }
 
+// Traits for comparing two [Instructions] objects for equality, which is
+// implemented as bit-wise equality.
+//
+// This considers two instruction objects to be equal even if they have
+// different static call targets.  Since the static call targets are called via
+// the object pool this is ok.
 class InstructionsKeyValueTrait {
  public:
   // Typedefs needed for the DirectChainedHashMap template.
@@ -656,6 +661,52 @@
 
 typedef DirectChainedHashMap<InstructionsKeyValueTrait> InstructionsSet;
 
+// Traits for comparing two [Code] objects for equality.
+//
+// It considers two [Code] objects to be equal if
+//
+//   * their [RawInstruction]s are bit-wise equal
+//   * their [RawPcDescriptor]s are the same
+//   * their [RawStackMaps]s are the same
+//   * their static call targets are the same
+#if defined(DART_PRECOMPILER)
+class CodeKeyValueTrait {
+ public:
+  // Typedefs needed for the DirectChainedHashMap template.
+  typedef const Code* Key;
+  typedef const Code* Value;
+  typedef const Code* Pair;
+
+  static Key KeyOf(Pair kv) { return kv; }
+
+  static Value ValueOf(Pair kv) { return kv; }
+
+  static inline intptr_t Hashcode(Key key) { return key->Size(); }
+
+  static inline bool IsKeyEqual(Pair pair, Key key) {
+    if (pair->raw() == key->raw()) return true;
+
+    // Notice we assume that these entries have already been de-duped, so we
+    // can use pointer equality.
+    if (pair->static_calls_target_table() != key->static_calls_target_table()) {
+      return false;
+    }
+    if (pair->pc_descriptors() == key->pc_descriptors()) {
+      return false;
+    }
+    if (pair->stackmaps() == key->stackmaps()) {
+      return false;
+    }
+    if (pair->catch_entry_moves_maps() == key->catch_entry_moves_maps()) {
+      return false;
+    }
+    return Instructions::Equals(pair->instructions(), key->instructions());
+  }
+};
+
+typedef DirectChainedHashMap<CodeKeyValueTrait> CodeSet;
+#endif  // defined(DART_PRECOMPILER)
+
 void ProgramVisitor::DedupInstructions() {
   class DedupInstructionsVisitor : public FunctionVisitor,
                                    public ObjectVisitor {
@@ -712,6 +763,59 @@
   ProgramVisitor::VisitFunctions(&visitor);
 }
 
+void ProgramVisitor::DedupInstructionsWithSameMetadata() {
+#if defined(DART_PRECOMPILER)
+  class DedupInstructionsWithSameMetadataVisitor : public FunctionVisitor,
+                                                   public ObjectVisitor {
+   public:
+    explicit DedupInstructionsWithSameMetadataVisitor(Zone* zone)
+        : zone_(zone),
+          canonical_set_(),
+          code_(Code::Handle(zone)),
+          owner_(Object::Handle(zone)),
+          instructions_(Instructions::Handle(zone)) {}
+
+    void VisitObject(RawObject* obj) {
+      if (obj->IsCode()) {
+        canonical_set_.Insert(&Code::ZoneHandle(zone_, Code::RawCast(obj)));
+      }
+    }
+
+    void Visit(const Function& function) {
+      if (!function.HasCode()) {
+        return;
+      }
+      code_ = function.CurrentCode();
+      instructions_ = DedupOneInstructions(code_);
+      code_.SetActiveInstructions(instructions_);
+      code_.set_instructions(instructions_);
+      function.SetInstructions(code_);  // Update cached entry point.
+    }
+
+    RawInstructions* DedupOneInstructions(const Code& code) {
+      const Code* canonical = canonical_set_.LookupValue(&code);
+      if (canonical == NULL) {
+        canonical_set_.Insert(&Code::ZoneHandle(zone_, code.raw()));
+        return code.instructions();
+      } else {
+        owner_ = code.owner();
+        return canonical->instructions();
+      }
+    }
+
+   private:
+    Zone* zone_;
+    CodeSet canonical_set_;
+    Code& code_;
+    Object& owner_;
+    Instructions& instructions_;
+  };
+
+  DedupInstructionsWithSameMetadataVisitor visitor(Thread::Current()->zone());
+  ProgramVisitor::VisitFunctions(&visitor);
+#endif  // defined(DART_PRECOMPILER)
+}
+
 void ProgramVisitor::Dedup() {
   Thread* thread = Thread::Current();
   StackZone stack_zone(thread);
@@ -731,7 +835,11 @@
 
 #if defined(PRODUCT)
   // Reduces binary size but obfuscates profiler results.
-  DedupInstructions();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    DedupInstructionsWithSameMetadata();
+  } else {
+    DedupInstructions();
+  }
 #endif
 }
 
diff --git a/runtime/vm/program_visitor.h b/runtime/vm/program_visitor.h
index f2b255a..c24abe5 100644
--- a/runtime/vm/program_visitor.h
+++ b/runtime/vm/program_visitor.h
@@ -40,6 +40,7 @@
   static void DedupCodeSourceMaps();
   static void DedupLists();
   static void DedupInstructions();
+  static void DedupInstructionsWithSameMetadata();
 };
 
 }  // namespace dart
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 3dbbd42..e0d7945 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -386,8 +386,6 @@
 REGULAR_VISITOR(Type)
 REGULAR_VISITOR(TypeRef)
 REGULAR_VISITOR(TypeParameter)
-REGULAR_VISITOR(BoundedType)
-REGULAR_VISITOR(MixinAppType)
 REGULAR_VISITOR(PatchClass)
 COMPRESSED_VISITOR(Closure)
 REGULAR_VISITOR(ClosureData)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index dc57e75..3fcb8cf 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -60,8 +60,6 @@
   V(Type)                                                                      \
   V(TypeRef)                                                                   \
   V(TypeParameter)                                                             \
-  V(BoundedType)                                                               \
-  V(MixinAppType)                                                              \
   V(Closure)                                                                   \
   V(Number)                                                                    \
   V(Integer)                                                                   \
@@ -718,6 +716,7 @@
     if (order == MemoryOrder::kRelease) {
       AtomicOperations::StoreRelease(const_cast<type*>(addr), value);
     } else {
+      ASSERT(order == MemoryOrder::kRelaxed);
       *const_cast<type*>(addr) = value;
     }
     if (value->IsHeapObject()) {
@@ -749,6 +748,13 @@
         // Incremental barrier: record when a store creates an
         // old -> old-and-not-marked reference.
         ASSERT(value->IsOldObject());
+#if !defined(TARGET_ARCH_IA32)
+        if (ClassIdTag::decode(target_tags) == kInstructionsCid) {
+          // Instruction pages may be non-writable. Defer marking.
+          thread->DeferredMarkingStackAddObject(value);
+          return;
+        }
+#endif
         if (value->TryAcquireMarkBit()) {
           thread->MarkingStackAddObject(value);
         }
@@ -756,9 +762,14 @@
     }
   }
 
-  template <typename type>
+  template <typename type, MemoryOrder order = MemoryOrder::kRelaxed>
   void StoreArrayPointer(type const* addr, type value) {
-    *const_cast<type*>(addr) = value;
+    if (order == MemoryOrder::kRelease) {
+      AtomicOperations::StoreRelease(const_cast<type*>(addr), value);
+    } else {
+      ASSERT(order == MemoryOrder::kRelaxed);
+      *const_cast<type*>(addr) = value;
+    }
     if (value->IsHeapObject()) {
       CheckArrayPointerStore(addr, value, Thread::Current());
     }
@@ -788,12 +799,19 @@
           RememberCard(reinterpret_cast<RawObject* const*>(addr));
         } else {
           this->SetRememberedBit();
-          Thread::Current()->StoreBufferAddObject(this);
+          thread->StoreBufferAddObject(this);
         }
       } else {
         // Incremental barrier: record when a store creates an
         // old -> old-and-not-marked reference.
         ASSERT(value->IsOldObject());
+#if !defined(TARGET_ARCH_IA32)
+        if (ClassIdTag::decode(target_tags) == kInstructionsCid) {
+          // Instruction pages may be non-writable. Defer marking.
+          thread->DeferredMarkingStackAddObject(value);
+          return;
+        }
+#endif
         if (value->TryAcquireMarkBit()) {
           thread->MarkingStackAddObject(value);
         }
@@ -891,7 +909,6 @@
     kAllocated = 0,         // Initial state.
     kPreFinalized,          // VM classes: size precomputed, but no checks done.
     kFinalized,             // Class parsed, finalized and ready for use.
-    kRefinalizeAfterPatch,  // Class needs to be refinalized (patched).
   };
 
  private:
@@ -909,10 +926,9 @@
   RawLibrary* library_;
   RawTypeArguments* type_parameters_;  // Array of TypeParameter.
   RawAbstractType* super_type_;
-  RawType* mixin_;  // Generic mixin type, e.g. M<T>, not M<int>.
   RawFunction* signature_function_;  // Associated function for typedef class.
   RawArray* constants_;      // Canonicalized const instances of this class.
-  RawType* canonical_type_;  // Canonical type for this class.
+  RawType* declaration_type_;              // Declaration type for this class.
   RawArray* invocation_dispatcher_cache_;  // Cache for dispatcher functions.
   RawCode* allocation_stub_;  // Stub code for allocation of instances.
   RawGrowableObjectArray* direct_implementors_;  // Array of Class.
@@ -1235,7 +1251,6 @@
     kScriptTag = 0,
     kLibraryTag,
     kSourceTag,
-    kPatchTag,
     kEvaluateTag,
     kKernelTag,
   };
@@ -1413,6 +1428,7 @@
   // 'unchecked_entry_point_' will refer to the same position as 'entry_point_'.
   //
   uword unchecked_entry_point_;  // Accessed from generated code.
+  uword monomorphic_unchecked_entry_point_;  // Accessed from generated code.
 
   VISIT_FROM(RawObject*, object_pool_);
   RawObjectPool* object_pool_;     // Accessed from generated code.
@@ -1524,6 +1540,7 @@
   // Instructions size in bytes and flags.
   // Currently, only flag indicates 1 or 2 entry points.
   uint32_t size_and_flags_;
+  uint32_t unchecked_entrypoint_pc_offset_;
 
 #if defined(DART_PRECOMPILER)
   // There is a gap between size_and_flags_ and the entry point
@@ -1535,8 +1552,6 @@
   CodeStatistics* stats_;
 #endif
 
-  uword unchecked_entrypoint_pc_offset_;
-
   // Variable length data follows here.
   uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
 
@@ -2005,7 +2020,6 @@
  protected:
   enum TypeState {
     kAllocated,                // Initial state.
-    kResolved,                 // Type class and type arguments resolved.
     kBeingFinalized,           // In the process of being finalized.
     kFinalizedInstantiated,    // Instantiated type ready for use.
     kFinalizedUninstantiated,  // Uninstantiated type ready for use.
@@ -2036,15 +2050,8 @@
   RawSmi* hash_;
   // This type object represents a function type if its signature field is a
   // non-null function object.
-  // If this type is malformed or malbounded, the signature field gets
-  // overwritten by the error object in order to save space. If the type is a
-  // function type, its signature is lost, but the message in the error object
-  // can describe the issue without needing the signature.
-  union {
-    RawFunction* signature_;   // If not null, this type is a function type.
-    RawLanguageError* error_;  // If not null, type is malformed or malbounded.
-  } sig_or_err_;
-  VISIT_TO(RawObject*, sig_or_err_.error_)
+  RawFunction* signature_;  // If not null, this type is a function type.
+  VISIT_TO(RawObject*, signature_)
   TokenPosition token_pos_;
   int8_t type_state_;
 
@@ -2084,29 +2091,6 @@
   friend class CidRewriteVisitor;
 };
 
-class RawBoundedType : public RawAbstractType {
- private:
-  RAW_HEAP_OBJECT_IMPLEMENTATION(BoundedType);
-
-  VISIT_FROM(RawObject*, type_);
-  RawAbstractType* type_;
-  RawAbstractType* bound_;
-  RawSmi* hash_;
-  RawTypeParameter* type_parameter_;  // For more detailed error reporting.
-  VISIT_TO(RawObject*, type_parameter_);
-  RawObject** to_snapshot(Snapshot::Kind kind) { return to(); }
-};
-
-class RawMixinAppType : public RawAbstractType {
- private:
-  RAW_HEAP_OBJECT_IMPLEMENTATION(MixinAppType);
-
-  VISIT_FROM(RawObject*, super_type_);
-  RawAbstractType* super_type_;
-  RawArray* mixin_types_;  // Array of AbstractType.
-  VISIT_TO(RawObject*, mixin_types_);
-};
-
 class RawClosure : public RawInstance {
  private:
   RAW_HEAP_OBJECT_IMPLEMENTATION(Closure);
@@ -2274,6 +2258,7 @@
 
   friend class LinkedHashMapSerializationCluster;
   friend class LinkedHashMapDeserializationCluster;
+  friend class CodeDeserializationCluster;
   friend class Deserializer;
   friend class RawCode;
   friend class RawImmutableArray;
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index 4fc24ad..03cbffb 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -20,10 +20,9 @@
   F(Class, library_)                                                           \
   F(Class, type_parameters_)                                                   \
   F(Class, super_type_)                                                        \
-  F(Class, mixin_)                                                             \
   F(Class, signature_function_)                                                \
   F(Class, constants_)                                                         \
-  F(Class, canonical_type_)                                                    \
+  F(Class, declaration_type_)                                                  \
   F(Class, invocation_dispatcher_cache_)                                       \
   F(Class, allocation_stub_)                                                   \
   F(Class, direct_implementors_)                                               \
@@ -141,17 +140,12 @@
   F(Type, type_class_id_)                                                      \
   F(Type, arguments_)                                                          \
   F(Type, hash_)                                                               \
+  F(Type, signature_)                                                          \
   F(TypeRef, type_)                                                            \
   F(TypeParameter, name_)                                                      \
   F(TypeParameter, hash_)                                                      \
   F(TypeParameter, bound_)                                                     \
   F(TypeParameter, parameterized_function_)                                    \
-  F(BoundedType, type_)                                                        \
-  F(BoundedType, bound_)                                                       \
-  F(BoundedType, hash_)                                                        \
-  F(BoundedType, type_parameter_)                                              \
-  F(MixinAppType, super_type_)                                                 \
-  F(MixinAppType, mixin_types_)                                                \
   F(Closure, instantiator_type_arguments_)                                     \
   F(Closure, function_type_arguments_)                                         \
   F(Closure, delayed_type_arguments_)                                          \
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index e9eac58..286beb6 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -297,62 +297,6 @@
   writer->WriteObjectImpl(param_class, kAsReference);
 }
 
-RawBoundedType* BoundedType::ReadFrom(SnapshotReader* reader,
-                                      intptr_t object_id,
-                                      intptr_t tags,
-                                      Snapshot::Kind kind,
-                                      bool as_reference) {
-  ASSERT(reader != NULL);
-
-  // Allocate bounded type object.
-  BoundedType& bounded_type =
-      BoundedType::ZoneHandle(reader->zone(), BoundedType::New());
-  reader->AddBackRef(object_id, &bounded_type, kIsDeserialized);
-
-  // Read the code object for the type testing stub and set its entrypoint.
-  reader->EnqueueTypePostprocessing(bounded_type);
-
-  // Set all the object fields.
-  READ_OBJECT_FIELDS(bounded_type, bounded_type.raw()->from(),
-                     bounded_type.raw()->to(), kAsReference);
-
-  return bounded_type.raw();
-}
-
-void RawBoundedType::WriteTo(SnapshotWriter* writer,
-                             intptr_t object_id,
-                             Snapshot::Kind kind,
-                             bool as_reference) {
-  ASSERT(writer != NULL);
-
-  // Write out the serialization header value for this object.
-  writer->WriteInlinedObjectHeader(object_id);
-
-  // Write out the class and tags information.
-  writer->WriteIndexedObject(kBoundedTypeCid);
-  writer->WriteTags(writer->GetObjectTags(this));
-
-  // Write out all the object pointer fields.
-  SnapshotWriterVisitor visitor(writer, kAsReference);
-  visitor.VisitPointers(from(), to());
-}
-
-RawMixinAppType* MixinAppType::ReadFrom(SnapshotReader* reader,
-                                        intptr_t object_id,
-                                        intptr_t tags,
-                                        Snapshot::Kind kind,
-                                        bool as_reference) {
-  UNREACHABLE();  // MixinAppType objects do not survive finalization.
-  return MixinAppType::null();
-}
-
-void RawMixinAppType::WriteTo(SnapshotWriter* writer,
-                              intptr_t object_id,
-                              Snapshot::Kind kind,
-                              bool as_reference) {
-  UNREACHABLE();  // MixinAppType objects do not survive finalization.
-}
-
 RawTypeArguments* TypeArguments::ReadFrom(SnapshotReader* reader,
                                           intptr_t object_id,
                                           intptr_t tags,
diff --git a/runtime/vm/regexp_assembler_bytecode.cc b/runtime/vm/regexp_assembler_bytecode.cc
index 01a5259..3847c62 100644
--- a/runtime/vm/regexp_assembler_bytecode.cc
+++ b/runtime/vm/regexp_assembler_bytecode.cc
@@ -430,10 +430,9 @@
 
     const bool multiline = regexp.is_multi_line();
     RegExpCompileData* compile_data = new (zone) RegExpCompileData();
-    if (!RegExpParser::ParseRegExp(pattern, multiline, compile_data)) {
-      // Parsing failures are handled in the RegExp factory constructor.
-      UNREACHABLE();
-    }
+
+    // Parsing failures are handled in the RegExp factory constructor.
+    RegExpParser::ParseRegExp(pattern, multiline, compile_data);
 
     regexp.set_num_bracket_expressions(compile_data->capture_count);
     if (compile_data->simple) {
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index aa69b57..888061d 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -11,6 +11,7 @@
 #include "vm/compiler/frontend/flow_graph_builder.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/dart_entry.h"
+#include "vm/longjump.h"
 #include "vm/object_store.h"
 #include "vm/regexp.h"
 #include "vm/resolver.h"
@@ -321,6 +322,9 @@
 
   const Object& retval =
       Object::Handle(zone, DartEntry::InvokeFunction(fun, args));
+  if (retval.IsUnwindError()) {
+    Exceptions::PropagateError(Error::Cast(retval));
+  }
   if (retval.IsError()) {
     const Error& error = Error::Cast(retval);
     OS::PrintErr("%s\n", error.ToErrorCString());
@@ -385,9 +389,14 @@
       regexp_class.LookupStaticFieldAllowPrivate(Symbols::_wordCharacterMap()));
   ASSERT(!word_character_field.IsNull());
 
+  DEBUG_ASSERT(Thread::Current()->TopErrorHandlerIsSetJump());
   if (word_character_field.IsUninitialized()) {
     ASSERT(!Compiler::IsBackgroundCompilation());
-    word_character_field.EvaluateInitializer();
+    const Error& error =
+        Error::Handle(Z, word_character_field.EvaluateInitializer());
+    if (!error.IsNull()) {
+      Report::LongJump(error);
+    }
   }
   ASSERT(!word_character_field.IsUninitialized());
 
diff --git a/runtime/vm/regexp_parser.cc b/runtime/vm/regexp_parser.cc
index bd6b1e3..cbe851c 100644
--- a/runtime/vm/regexp_parser.cc
+++ b/runtime/vm/regexp_parser.cc
@@ -190,7 +190,6 @@
 
 RegExpParser::RegExpParser(const String& in, String* error, bool multiline)
     : zone_(Thread::Current()->zone()),
-      error_(error),
       captures_(NULL),
       in_(in),
       current_(kEndMarker),
@@ -200,8 +199,7 @@
       multiline_(multiline),
       simple_(false),
       contains_anchor_(false),
-      is_scanned_for_captures_(false),
-      failed_(false) {
+      is_scanned_for_captures_(false) {
   Advance();
 }
 
@@ -239,14 +237,16 @@
 }
 
 void RegExpParser::ReportError(const char* message) {
-  failed_ = true;
-  *error_ = String::New(message);
   // Zip to the end to make sure the no more input is read.
   current_ = kEndMarker;
   next_pos_ = in().Length();
 
-  const Error& error = Error::Handle(LanguageError::New(*error_));
-  Report::LongJump(error);
+  // Throw a FormatException on parsing failures.
+  const String& msg = String::Handle(
+      String::Concat(String::Handle(String::New(message)), in()));
+  const Array& args = Array::Handle(Array::New(1));
+  args.SetAt(0, msg);
+  Exceptions::ThrowByType(Exceptions::kFormat, args);
   UNREACHABLE();
 }
 
@@ -1012,34 +1012,20 @@
 // ----------------------------------------------------------------------------
 // The Parser interface.
 
-bool RegExpParser::ParseRegExp(const String& input,
+void RegExpParser::ParseRegExp(const String& input,
                                bool multiline,
                                RegExpCompileData* result) {
   ASSERT(result != NULL);
-  LongJumpScope jump;
   RegExpParser parser(input, &result->error, multiline);
-  if (setjmp(*jump.Set()) == 0) {
-    RegExpTree* tree = parser.ParsePattern();
-    ASSERT(tree != NULL);
-    ASSERT(result->error.IsNull());
-    result->tree = tree;
-    intptr_t capture_count = parser.captures_started();
-    result->simple = tree->IsAtom() && parser.simple() && capture_count == 0;
-    result->contains_anchor = parser.contains_anchor();
-    result->capture_count = capture_count;
-  } else {
-    ASSERT(!result->error.IsNull());
-    Thread::Current()->clear_sticky_error();
-
-    // Throw a FormatException on parsing failures.
-    const String& message =
-        String::Handle(String::Concat(result->error, input));
-    const Array& args = Array::Handle(Array::New(1));
-    args.SetAt(0, message);
-
-    Exceptions::ThrowByType(Exceptions::kFormat, args);
-  }
-  return !parser.failed();
+  // Throws an exception if 'input' is not valid.
+  RegExpTree* tree = parser.ParsePattern();
+  ASSERT(tree != NULL);
+  ASSERT(result->error.IsNull());
+  result->tree = tree;
+  intptr_t capture_count = parser.captures_started();
+  result->simple = tree->IsAtom() && parser.simple() && capture_count == 0;
+  result->contains_anchor = parser.contains_anchor();
+  result->capture_count = capture_count;
 }
 
 }  // namespace dart
diff --git a/runtime/vm/regexp_parser.h b/runtime/vm/regexp_parser.h
index 6536fde..51e44c5 100644
--- a/runtime/vm/regexp_parser.h
+++ b/runtime/vm/regexp_parser.h
@@ -53,7 +53,7 @@
  public:
   RegExpParser(const String& in, String* error, bool multiline_mode);
 
-  static bool ParseRegExp(const String& input,
+  static void ParseRegExp(const String& input,
                           bool multiline,
                           RegExpCompileData* result);
 
@@ -97,7 +97,6 @@
     return captures_ == NULL ? 0 : captures_->length();
   }
   intptr_t position() { return next_pos_ - 1; }
-  bool failed() { return failed_; }
 
   static const intptr_t kMaxCaptures = 1 << 16;
   static const uint32_t kEndMarker = (1 << 21);
@@ -154,7 +153,6 @@
   void ScanForCaptures();
 
   Zone* zone_;
-  String* error_;
   ZoneGrowableArray<RegExpCapture*>* captures_;
   const String& in_;
   uint32_t current_;
@@ -166,7 +164,6 @@
   bool simple_;
   bool contains_anchor_;
   bool is_scanned_for_captures_;
-  bool failed_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/report.cc b/runtime/vm/report.cc
index 980fedc..5d0c407 100644
--- a/runtime/vm/report.cc
+++ b/runtime/vm/report.cc
@@ -30,12 +30,6 @@
     case kError:
       message_header = "error";
       break;
-    case kMalformedType:
-      message_header = "malformed type";
-      break;
-    case kMalboundedType:
-      message_header = "malbounded type";
-      break;
     case kBailout:
       message_header = "bailout";
       break;
diff --git a/runtime/vm/report.h b/runtime/vm/report.h
index 00d45bd..30aaf5c 100644
--- a/runtime/vm/report.h
+++ b/runtime/vm/report.h
@@ -23,8 +23,6 @@
   enum Kind {
     kWarning,
     kError,
-    kMalformedType,
-    kMalboundedType,
     kBailout,
   };
 
@@ -32,19 +30,19 @@
   static const bool AfterLocation = true;
 
   // Report an already formatted error via a long jump.
-  static void LongJump(const Error& error);
+  DART_NORETURN static void LongJump(const Error& error);
 
   // Concatenate and report an already formatted error and a new error message.
-  static void LongJumpF(const Error& prev_error,
-                        const Script& script,
-                        TokenPosition token_pos,
-                        const char* format,
-                        ...) PRINTF_ATTRIBUTE(4, 5);
-  static void LongJumpV(const Error& prev_error,
-                        const Script& script,
-                        TokenPosition token_pos,
-                        const char* format,
-                        va_list args);
+  DART_NORETURN static void LongJumpF(const Error& prev_error,
+                                      const Script& script,
+                                      TokenPosition token_pos,
+                                      const char* format,
+                                      ...) PRINTF_ATTRIBUTE(4, 5);
+  DART_NORETURN static void LongJumpV(const Error& prev_error,
+                                      const Script& script,
+                                      TokenPosition token_pos,
+                                      const char* format,
+                                      va_list args);
 
   // Report a warning/jswarning/error/bailout message.
   static void MessageF(Kind kind,
diff --git a/runtime/vm/reverse_pc_lookup_cache.cc b/runtime/vm/reverse_pc_lookup_cache.cc
new file mode 100644
index 0000000..325d98f
--- /dev/null
+++ b/runtime/vm/reverse_pc_lookup_cache.cc
@@ -0,0 +1,56 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/reverse_pc_lookup_cache.h"
+
+#include "vm/isolate.h"
+
+namespace dart {
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+
+static uword BeginPcFromCode(const RawCode* code) {
+  auto instr = Code::InstructionsOf(code);
+  return Instructions::PayloadStart(instr);
+}
+
+static uword EndPcFromCode(const RawCode* code) {
+  auto instr = Code::InstructionsOf(code);
+  return Instructions::PayloadStart(instr) + Instructions::Size(instr);
+}
+
+void ReversePcLookupCache::BuildAndAttachToIsolate(Isolate* isolate) {
+  auto object_store = isolate->object_store();
+  auto& array = Array::Handle(object_store->code_order_table());
+  if (!array.IsNull()) {
+    const intptr_t length = array.Length();
+    {
+      NoSafepointScope no_safepoint_scope;
+
+      const uword begin =
+          BeginPcFromCode(reinterpret_cast<RawCode*>(array.At(0)));
+      const uword end =
+          EndPcFromCode(reinterpret_cast<RawCode*>(array.At(length - 1)));
+
+      auto pc_array = new uint32_t[length];
+      for (intptr_t i = 0; i < length; i++) {
+        const auto end_pc =
+            EndPcFromCode(reinterpret_cast<RawCode*>(array.At(i)));
+        pc_array[i] = end_pc - begin;
+      }
+#if defined(DEBUG)
+      for (intptr_t i = 1; i < length; i++) {
+        ASSERT(pc_array[i - 1] <= pc_array[i]);
+      }
+#endif  // defined(DEBUG)
+      auto cache =
+          new ReversePcLookupCache(isolate, pc_array, length, begin, end);
+      isolate->set_reverse_pc_lookup_cache(cache);
+    }
+  }
+}
+
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+}  // namespace dart
diff --git a/runtime/vm/reverse_pc_lookup_cache.h b/runtime/vm/reverse_pc_lookup_cache.h
new file mode 100644
index 0000000..8300b62
--- /dev/null
+++ b/runtime/vm/reverse_pc_lookup_cache.h
@@ -0,0 +1,126 @@
+// 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_REVERSE_PC_LOOKUP_CACHE_H_
+#define RUNTIME_VM_REVERSE_PC_LOOKUP_CACHE_H_
+
+#include "vm/allocation.h"
+#include "vm/growable_array.h"
+#include "vm/object.h"
+#include "vm/object_store.h"
+
+namespace dart {
+
+class Isolate;
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+
+// A cache for looking up a Code object based on pc (currently the cache is
+// implemented as a binary-searchable uint32 array)
+//
+// If an AOT snapshot was created with --use_bare_instructions the isolate's
+// object store will contain a `code_order_table` - which is a sorted array
+// of [Code] objects.  The order is based on addresses of the code's
+// instructions in memory.
+//
+// For a binary search we would need to touch O(log(array-size)) array entries,
+// code objects and instruction objects.
+//
+// To avoid this we make another uint32 array which is initialized from the end
+// PCs of the instructions (relative to the start pc of the first instruction
+// object).
+//
+// We have the following invariants:
+//
+//   BeginPcFromCode(code_array[0]) <= pc_array[0]
+//   pc_array[i] == EndPcFromCode(code_array[i])
+//   pc_array[i] <= pc_array[i+1]
+//
+// The lookup will then do a binary search in pc_array. The index can then be
+// used in the `code_order_table` of the object store.
+//
+// WARNING: This class cannot do memory allocation or handle allocation!
+class ReversePcLookupCache {
+ public:
+  ReversePcLookupCache(Isolate* isolate,
+                       uint32_t* pc_array,
+                       intptr_t length,
+                       uword first_absolute_pc,
+                       uword last_absolute_pc)
+      : isolate_(isolate),
+        pc_array_(pc_array),
+        length_(length),
+        first_absolute_pc_(first_absolute_pc),
+        last_absolute_pc_(last_absolute_pc) {}
+  ~ReversePcLookupCache() { delete[] pc_array_; }
+
+  // Builds a [ReversePcLookupCache] and attaches it to the isolate (if
+  // `code_order_table` is non-`null`).
+  static void BuildAndAttachToIsolate(Isolate* isolate);
+
+  // Returns `true` if the given [pc] contains can be mapped to a [Code] object
+  // using this cache.
+  inline bool Contains(uword pc) {
+    return first_absolute_pc_ <= pc && pc <= last_absolute_pc_;
+  }
+
+  // Looks up the [Code] object from a given [pc].
+  inline RawCode* Lookup(uword pc) {
+    NoSafepointScope no_safepoint_scope;
+
+    intptr_t left = 0;
+    intptr_t right = length_ - 1;
+
+    ASSERT(first_absolute_pc_ <= pc && pc < last_absolute_pc_);
+    uint32_t pc_offset = static_cast<uint32_t>(pc - first_absolute_pc_);
+
+    while (left < right) {
+      intptr_t middle = left + (right - left) / 2;
+
+      uword middle_pc = pc_array_[middle];
+      if (middle_pc < pc_offset) {
+        left = middle + 1;
+      } else {
+        right = middle;
+      }
+    }
+
+    auto code_array = isolate_->object_store()->code_order_table();
+    auto raw_code = reinterpret_cast<RawCode*>(Array::DataOf(code_array)[left]);
+
+#if defined(DEBUG)
+    ASSERT(raw_code->GetClassIdMayBeSmi() == kCodeCid);
+    ASSERT(Code::ContainsInstructionAt(raw_code, pc));
+#endif
+
+    return raw_code;
+  }
+
+ private:
+  Isolate* isolate_;
+  uint32_t* pc_array_;
+  intptr_t length_;
+  uword first_absolute_pc_;
+  uword last_absolute_pc_;
+};
+
+#else  // defined(DART_PRECOMPILED_RUNTIME
+
+class ReversePcLookupCache {
+ public:
+  ReversePcLookupCache() {}
+  ~ReversePcLookupCache() {}
+
+  static void BuildAndAttachToIsolate(Isolate* isolate) {}
+
+  inline bool Contains(uword pc) { return false; }
+
+  inline RawCode* Lookup(uword pc) { UNREACHABLE(); }
+};
+
+#endif  // defined(DART_PRECOMPILED_RUNTIME
+
+}  // namespace dart
+
+#endif  // RUNTIME_VM_REVERSE_PC_LOOKUP_CACHE_H_
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 1ff2d59..2ae6c18 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -60,6 +60,7 @@
 
 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement.");
 
+DEFINE_FLAG(int, gc_every, 0, "Run major GC on every N stack overflow checks");
 DEFINE_FLAG(int,
             stacktrace_every,
             0,
@@ -182,7 +183,7 @@
   const intptr_t name_index = reader.GetNullCheckNameIndexAt(pc_offset);
   RELEASE_ASSERT(name_index >= 0);
 
-  const ObjectPool& pool = ObjectPool::Handle(zone, code.object_pool());
+  const ObjectPool& pool = ObjectPool::Handle(zone, code.GetObjectPool());
   const String& member_name =
       String::CheckedHandle(zone, pool.ObjectAt(name_index));
 
@@ -323,20 +324,9 @@
          instantiator_type_arguments.IsInstantiated());
   ASSERT(function_type_arguments.IsNull() ||
          function_type_arguments.IsInstantiated());
-  Error& bound_error = Error::Handle(zone);
   type =
       type.InstantiateFrom(instantiator_type_arguments, function_type_arguments,
-                           kAllFree, &bound_error, NULL, NULL, Heap::kOld);
-  if (!bound_error.IsNull()) {
-    // Throw a dynamic type error.
-    const TokenPosition location = GetCallerLocation();
-    String& bound_error_message =
-        String::Handle(zone, String::New(bound_error.ToErrorCString()));
-    Exceptions::CreateAndThrowTypeError(location, AbstractType::Handle(zone),
-                                        AbstractType::Handle(zone),
-                                        Symbols::Empty(), bound_error_message);
-    UNREACHABLE();
-  }
+                           kAllFree, NULL, Heap::kOld);
   if (type.IsTypeRef()) {
     type = TypeRef::Cast(type).type();
     ASSERT(!type.IsTypeRef());
@@ -367,7 +357,7 @@
   // instantiator can be reused as type argument vector.
   ASSERT(!type_arguments.IsUninstantiatedIdentity());
   type_arguments = type_arguments.InstantiateAndCanonicalizeFrom(
-      instantiator_type_arguments, function_type_arguments, NULL);
+      instantiator_type_arguments, function_type_arguments);
   ASSERT(type_arguments.IsNull() || type_arguments.IsInstantiated());
   arguments.SetReturn(type_arguments);
 }
@@ -389,25 +379,18 @@
       AbstractType::CheckedHandle(zone, arguments.ArgAt(3));
   const String& dst_name = String::CheckedHandle(zone, arguments.ArgAt(4));
 
-  ASSERT(!subtype.IsNull() && !subtype.IsMalformedOrMalbounded());
-  ASSERT(!supertype.IsNull() && !supertype.IsMalformedOrMalbounded());
+  ASSERT(!subtype.IsNull());
+  ASSERT(!supertype.IsNull());
 
   // The supertype or subtype may not be instantiated.
-  Error& bound_error = Error::Handle(zone);
   if (AbstractType::InstantiateAndTestSubtype(
-          &subtype, &supertype, &bound_error, instantiator_type_args,
-          function_type_args)) {
+          &subtype, &supertype, instantiator_type_args, function_type_args)) {
     return;
   }
 
   // Throw a dynamic type error.
   const TokenPosition location = GetCallerLocation();
-  String& bound_error_message = String::Handle(zone);
-  if (!bound_error.IsNull()) {
-    bound_error_message = String::New(bound_error.ToErrorCString());
-  }
-  Exceptions::CreateAndThrowTypeError(location, subtype, supertype, dst_name,
-                                      bound_error_message);
+  Exceptions::CreateAndThrowTypeError(location, subtype, supertype, dst_name);
   UNREACHABLE();
 }
 
@@ -473,8 +456,8 @@
 
 // Result of an invoke may be an unhandled exception, in which case we
 // rethrow it.
-static void CheckResultError(const Object& result) {
-  if (result.IsError()) {
+static void ThrowIfError(const Object& result) {
+  if (!result.IsNull() && result.IsError()) {
     Exceptions::PropagateError(Error::Cast(result));
   }
 }
@@ -501,7 +484,7 @@
   args.SetAt(0, receiver);
   const Object& result =
       Object::Handle(zone, DartEntry::InvokeFunction(getter, args));
-  CheckResultError(result);
+  ThrowIfError(result);
   arguments.SetReturn(result);
 }
 
@@ -549,19 +532,15 @@
                  Class::Handle(type.type_class()).id(), caller_frame->pc());
   } else {
     // Instantiate type before printing.
-    Error& bound_error = Error::Handle();
     const AbstractType& instantiated_type =
-        AbstractType::Handle(type.InstantiateFrom(
-            instantiator_type_arguments, function_type_arguments, kAllFree,
-            &bound_error, NULL, NULL, Heap::kOld));
+        AbstractType::Handle(type.InstantiateFrom(instantiator_type_arguments,
+                                                  function_type_arguments,
+                                                  kAllFree, NULL, Heap::kOld));
     OS::PrintErr("%s: '%s' %s '%s' instantiated from '%s' (pc: %#" Px ").\n",
                  message, String::Handle(instance_type.Name()).ToCString(),
                  (result.raw() == Bool::True().raw()) ? "is" : "is !",
                  String::Handle(instantiated_type.Name()).ToCString(),
                  String::Handle(type.Name()).ToCString(), caller_frame->pc());
-    if (!bound_error.IsNull()) {
-      OS::PrintErr("  bound error: %s\n", bound_error.ToErrorCString());
-    }
   }
   const Function& function =
       Function::Handle(caller_frame->LookupDartFunction());
@@ -675,11 +654,9 @@
   if (FLAG_trace_type_checks) {
     AbstractType& test_type = AbstractType::Handle(zone, type.raw());
     if (!test_type.IsInstantiated()) {
-      Error& bound_error = Error::Handle(zone);
       test_type = type.InstantiateFrom(instantiator_type_arguments,
-                                       function_type_arguments, kAllFree,
-                                       &bound_error, NULL, NULL, Heap::kNew);
-      ASSERT(bound_error.IsNull());  // Malbounded types are not optimized.
+                                       function_type_arguments, kAllFree, NULL,
+                                       Heap::kNew);
     }
     const auto& type_class = Class::Handle(zone, test_type.type_class());
     const auto& instance_class_name =
@@ -727,28 +704,13 @@
   const SubtypeTestCache& cache =
       SubtypeTestCache::CheckedHandle(zone, arguments.ArgAt(4));
   ASSERT(type.IsFinalized());
-  ASSERT(!type.IsMalformed());    // Already checked in code generator.
-  ASSERT(!type.IsMalbounded());   // Already checked in code generator.
   ASSERT(!type.IsDynamicType());  // No need to check assignment.
-  Error& bound_error = Error::Handle(zone);
-  const Bool& result =
-      Bool::Get(instance.IsInstanceOf(type, instantiator_type_arguments,
-                                      function_type_arguments, &bound_error));
+  const Bool& result = Bool::Get(instance.IsInstanceOf(
+      type, instantiator_type_arguments, function_type_arguments));
   if (FLAG_trace_type_checks) {
     PrintTypeCheck("InstanceOf", instance, type, instantiator_type_arguments,
                    function_type_arguments, result);
   }
-  if (!result.value() && !bound_error.IsNull()) {
-    // Throw a dynamic type error only if the instanceof test fails.
-    const TokenPosition location = GetCallerLocation();
-    String& bound_error_message =
-        String::Handle(zone, String::New(bound_error.ToErrorCString()));
-    Exceptions::CreateAndThrowTypeError(location, AbstractType::Handle(zone),
-                                        AbstractType::Handle(zone),
-                                        Symbols::Empty(), bound_error_message);
-    UNREACHABLE();
-  }
-
   UpdateTypeTestCache(zone, instance, type, instantiator_type_arguments,
                       function_type_arguments, result, cache);
   arguments.SetReturn(result);
@@ -788,15 +750,11 @@
   ASSERT(mode == kTypeCheckFromInline);
 #endif
 
-  ASSERT(!dst_type.IsMalformed());    // Already checked in code generator.
-  ASSERT(!dst_type.IsMalbounded());   // Already checked in code generator.
   ASSERT(!dst_type.IsDynamicType());  // No need to check assignment.
   ASSERT(!src_instance.IsNull());     // Already checked in inlined code.
 
-  Error& bound_error = Error::Handle(zone);
-  const bool is_instance_of =
-      src_instance.IsInstanceOf(dst_type, instantiator_type_arguments,
-                                function_type_arguments, &bound_error);
+  const bool is_instance_of = src_instance.IsInstanceOf(
+      dst_type, instantiator_type_arguments, function_type_arguments);
 
   if (FLAG_trace_type_checks) {
     PrintTypeCheck("TypeCheck", src_instance, dst_type,
@@ -812,13 +770,9 @@
       // Instantiate dst_type before reporting the error.
       dst_type = dst_type.InstantiateFrom(instantiator_type_arguments,
                                           function_type_arguments, kAllFree,
-                                          NULL, NULL, NULL, Heap::kNew);
+                                          NULL, Heap::kNew);
       // Note that instantiated dst_type may be malbounded.
     }
-    String& bound_error_message = String::Handle(zone);
-    if (!bound_error.IsNull()) {
-      UNREACHABLE();
-    }
     if (dst_name.IsNull()) {
 #if !defined(TARGET_ARCH_DBC) && !defined(TARGET_ARCH_IA32)
       // Can only come here from type testing stub.
@@ -833,7 +787,7 @@
       const Code& caller_code =
           Code::Handle(zone, caller_frame->LookupDartCode());
       const ObjectPool& pool =
-          ObjectPool::Handle(zone, caller_code.object_pool());
+          ObjectPool::Handle(zone, caller_code.GetObjectPool());
       TypeTestingStubCallPattern tts_pattern(caller_frame->pc());
       const intptr_t stc_pool_idx = tts_pattern.GetSubtypeTestCachePoolIndex();
       const intptr_t dst_name_idx = stc_pool_idx + 1;
@@ -843,8 +797,7 @@
 #endif
     }
 
-    Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name,
-                                        bound_error_message);
+    Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name);
     UNREACHABLE();
   }
 
@@ -871,7 +824,7 @@
       const Code& caller_code =
           Code::Handle(zone, caller_frame->LookupDartCode());
       const ObjectPool& pool =
-          ObjectPool::Handle(zone, caller_code.object_pool());
+          ObjectPool::Handle(zone, caller_code.GetObjectPool());
       TypeTestingStubCallPattern tts_pattern(caller_frame->pc());
       const intptr_t stc_pool_idx = tts_pattern.GetSubtypeTestCachePoolIndex();
 
@@ -924,10 +877,8 @@
   const Type& bool_interface = Type::Handle(Type::BoolType());
   const AbstractType& src_type =
       AbstractType::Handle(zone, src_instance.GetType(Heap::kNew));
-  const String& no_bound_error = String::Handle(zone);
   Exceptions::CreateAndThrowTypeError(location, src_type, bool_interface,
-                                      Symbols::BooleanExpression(),
-                                      no_bound_error);
+                                      Symbols::BooleanExpression());
   UNREACHABLE();
 }
 
@@ -944,8 +895,7 @@
       AbstractType::CheckedHandle(zone, arguments.ArgAt(2));
   const AbstractType& src_type =
       AbstractType::Handle(zone, src_value.GetType(Heap::kNew));
-  Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name,
-                                      String::Handle(zone));
+  Exceptions::CreateAndThrowTypeError(location, src_type, dst_type, dst_name);
   UNREACHABLE();
 }
 
@@ -1013,20 +963,14 @@
       zone, isolate->debugger()->GetPatchedStubAddress(caller_frame->pc()));
   const Error& error =
       Error::Handle(zone, isolate->debugger()->PauseBreakpoint());
-  if (!error.IsNull()) {
-    Exceptions::PropagateError(error);
-    UNREACHABLE();
-  }
+  ThrowIfError(error);
   arguments.SetReturn(orig_stub);
 }
 #else
 // Gets called from the simulator when the breakpoint is reached.
 DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
   const Error& error = Error::Handle(isolate->debugger()->PauseBreakpoint());
-  if (!error.IsNull()) {
-    Exceptions::PropagateError(error);
-    UNREACHABLE();
-  }
+  ThrowIfError(error);
 }
 #endif  // !defined(TARGET_ARCH_DBC)
 
@@ -1036,10 +980,7 @@
 #else
   const Error& error =
       Error::Handle(zone, isolate->debugger()->PauseStepping());
-  if (!error.IsNull()) {
-    Exceptions::PropagateError(error);
-    UNREACHABLE();
-  }
+  ThrowIfError(error);
 #endif
 }
 
@@ -1119,10 +1060,8 @@
 static RawFunction* ComputeTypeCheckTarget(const Instance& receiver,
                                            const AbstractType& type,
                                            const ArgumentsDescriptor& desc) {
-  Error& error = Error::Handle();
   bool result = receiver.IsInstanceOf(type, Object::null_type_arguments(),
-                                      Object::null_type_arguments(), &error);
-  ASSERT(error.IsNull());
+                                      Object::null_type_arguments());
   ObjectStore* store = Isolate::Current()->object_store();
   const Function& target =
       Function::Handle(result ? store->simple_instance_of_true_function()
@@ -1679,6 +1618,37 @@
 #endif  // !defined(TARGET_ARCH_DBC)
 }
 
+// Handles interpreted interface call cache miss.
+//   Arg0: receiver
+//   Arg1: target name
+//   Arg2: arguments descriptor
+//   Returns: target function
+// Modifies the instance call table in current interpreter.
+DEFINE_RUNTIME_ENTRY(InterpretedInterfaceCallMissHandler, 3) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
+  ASSERT(FLAG_enable_interpreter);
+  const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  const String& target_name = String::CheckedHandle(zone, arguments.ArgAt(1));
+  const Array& arg_desc = Array::CheckedHandle(zone, arguments.ArgAt(2));
+
+  ArgumentsDescriptor arguments_descriptor(arg_desc);
+  Function& target_function = Function::Handle(
+      zone,
+      Resolver::ResolveDynamic(receiver, target_name, arguments_descriptor));
+
+  // TODO(regis): In order to substitute 'simple_instance_of_function', the 2nd
+  // arg to the call, the type, is needed.
+
+  if (target_function.IsNull()) {
+    target_function = InlineCacheMissHelper(receiver, arg_desc, target_name);
+  }
+  ASSERT(!target_function.IsNull());
+  arguments.SetReturn(target_function);
+#endif
+}
+
 // Invoke appropriate noSuchMethod or closure from getter.
 // Arg0: receiver
 // Arg1: ICData or MegamorphicCache
@@ -1715,7 +1685,7 @@
   const Object& result = Object::Handle(                                       \
       zone, DartEntry::InvokeNoSuchMethod(                                     \
                 receiver, target_name, orig_arguments, orig_arguments_desc));  \
-  CheckResultError(result);                                                    \
+  ThrowIfError(result);                                                    \
   arguments.SetReturn(result);
 
 #define CLOSURIZE(some_function)                                               \
@@ -1750,7 +1720,7 @@
       // would perform the closure call.
       const Object& result = Object::Handle(
           zone, DartEntry::InvokeClosure(orig_arguments, orig_arguments_desc));
-      CheckResultError(result);
+      ThrowIfError(result);
       arguments.SetReturn(result);
       return;
     }
@@ -1770,14 +1740,14 @@
         getter_arguments.SetAt(0, receiver);
         const Object& getter_result = Object::Handle(
             zone, DartEntry::InvokeFunction(function, getter_arguments));
-        CheckResultError(getter_result);
+        ThrowIfError(getter_result);
         ASSERT(getter_result.IsNull() || getter_result.IsInstance());
 
         orig_arguments.SetAt(args_desc.FirstArgIndex(), getter_result);
         const Object& call_result = Object::Handle(
             zone,
             DartEntry::InvokeClosure(orig_arguments, orig_arguments_desc));
-        CheckResultError(call_result);
+        ThrowIfError(call_result);
         arguments.SetReturn(call_result);
         return;
       }
@@ -1810,7 +1780,7 @@
       String::Handle(function.QualifiedUserVisibleName());
   const Object& result = Object::Handle(DartEntry::InvokeNoSuchMethod(
       receiver, original_function_name, orig_arguments, orig_arguments_desc));
-  CheckResultError(result);
+  ThrowIfError(result);
   arguments.SetReturn(result);
 }
 
@@ -1818,16 +1788,18 @@
 // The following code is used to stress test
 //  - deoptimization
 //  - debugger stack tracing
+//  - garbage collection
 //  - hot reload
 static void HandleStackOverflowTestCases(Thread* thread) {
   Isolate* isolate = thread->isolate();
   bool do_deopt = false;
   bool do_stacktrace = false;
   bool do_reload = false;
+  bool do_gc = false;
   const intptr_t isolate_reload_every =
       isolate->reload_every_n_stack_overflow_checks();
   if ((FLAG_deoptimize_every > 0) || (FLAG_stacktrace_every > 0) ||
-      (isolate_reload_every > 0)) {
+      (FLAG_gc_every > 0) || (isolate_reload_every > 0)) {
     if (!Isolate::IsVMInternalIsolate(isolate)) {
       // TODO(turnidge): To make --deoptimize_every and
       // --stacktrace-every faster we could move this increment/test to
@@ -1839,6 +1811,9 @@
       if (FLAG_stacktrace_every > 0 && (count % FLAG_stacktrace_every) == 0) {
         do_stacktrace = true;
       }
+      if (FLAG_gc_every > 0 && (count % FLAG_gc_every) == 0) {
+        do_gc = true;
+      }
       if ((isolate_reload_every > 0) && (count % isolate_reload_every) == 0) {
         do_reload = isolate->CanReload();
       }
@@ -1961,6 +1936,9 @@
     }
     FLAG_stacktrace_every = saved_stacktrace_every;
   }
+  if (do_gc) {
+    isolate->heap()->CollectAllGarbage(Heap::kDebugging);
+  }
 }
 #endif  // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 
@@ -2010,9 +1988,7 @@
   // it cannot have been removed from the function.
   const Object& result = Object::Handle(
       Compiler::CompileOptimizedFunction(thread, function, osr_id));
-  if (result.IsError()) {
-    Exceptions::PropagateError(Error::Cast(result));
-  }
+  ThrowIfError(result);
 
   if (!result.IsNull()) {
     const Code& code = Code::Cast(result);
@@ -2045,7 +2021,7 @@
     Interpreter* interpreter = Thread::Current()->interpreter();
     if (interpreter != NULL) {
       interpreter_stack_overflow =
-          interpreter->get_sp() >= interpreter->stack_limit();
+          interpreter->get_sp() >= interpreter->overflow_stack_limit();
     }
   }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -2072,10 +2048,7 @@
   //  - store buffer overflow
   //  - OOB message (vm-service or dart:isolate)
   const Error& error = Error::Handle(thread->HandleInterrupts());
-  if (!error.IsNull()) {
-    Exceptions::PropagateError(error);
-    UNREACHABLE();
-  }
+  ThrowIfError(error);
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
   if ((stack_overflow_flags & Thread::kOsrRequest) != 0) {
@@ -2165,9 +2138,7 @@
     } else {
       result = Compiler::CompileFunction(thread, function);
     }
-    if (result.IsError()) {
-      Exceptions::PropagateError(Error::Cast(result));
-    }
+    ThrowIfError(result);
   }
   arguments.SetReturn(function);
 #else
@@ -2587,7 +2558,8 @@
 
 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
   const Field& field = Field::CheckedHandle(zone, arguments.ArgAt(0));
-  field.EvaluateInitializer();
+  const Error& result = Error::Handle(zone, field.EvaluateInitializer());
+  ThrowIfError(result);
 }
 
 // Print the stop message.
@@ -2709,16 +2681,21 @@
   ASSERT(Function::HasBytecode(function));
   ASSERT(interpreter != NULL);
 #endif
-  const Object& result = Object::Handle(
-      thread->zone(), interpreter->Call(function, argdesc, argc, argv, thread));
+  RawObject* result = interpreter->Call(function, argdesc, argc, argv, thread);
   DEBUG_ASSERT(thread->top_exit_frame_info() == exit_fp);
-  if (result.IsError()) {
+  if (RawObject::IsErrorClassId(result->GetClassIdMayBeSmi())) {
+    // Must not allocate handles in the caller's zone.
+    StackZone stack_zone(thread);
+    // Protect the result in a handle before transitioning, which may trigger
+    // GC.
+    const Error& error =
+        Error::Handle(stack_zone.GetZone(), static_cast<RawError*>(result));
     // Propagating an error may cause allocation. Check if we need to block for
     // a safepoint by switching to "in VM" execution state.
     TransitionGeneratedToVM transition(thread);
-    Exceptions::PropagateError(Error::Cast(result));
+    Exceptions::PropagateError(error);
   }
-  return result.raw();
+  return result;
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
diff --git a/runtime/vm/runtime_entry_list.h b/runtime/vm/runtime_entry_list.h
index 5bafc0e..fa97c63 100644
--- a/runtime/vm/runtime_entry_list.h
+++ b/runtime/vm/runtime_entry_list.h
@@ -24,6 +24,7 @@
   V(InlineCacheMissHandlerTwoArgs)                                             \
   V(StaticCallMissHandlerOneArg)                                               \
   V(StaticCallMissHandlerTwoArgs)                                              \
+  V(InterpretedInterfaceCallMissHandler)                                       \
   V(Instanceof)                                                                \
   V(SubtypeCheck)                                                              \
   V(TypeCheck)                                                                 \
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index d51dad6..25fd47c 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -866,7 +866,7 @@
         // For now, always return an error.
         PrintInvalidParamError(&js, "_idZone");
         js.PostReply();
-        return T->get_and_clear_sticky_error();
+        return T->StealStickyError();
       }
     }
     const char* c_method_name = method_name.ToCString();
@@ -875,7 +875,7 @@
     if (method != NULL) {
       if (!ValidateParameters(method->parameters, &js)) {
         js.PostReply();
-        return T->get_and_clear_sticky_error();
+        return T->StealStickyError();
       }
       if (method->entry(T, &js)) {
         js.PostReply();
@@ -884,7 +884,7 @@
         // so this case shouldn't be reached, at present.
         UNIMPLEMENTED();
       }
-      return T->get_and_clear_sticky_error();
+      return T->StealStickyError();
     }
 
     EmbedderServiceHandler* handler = FindIsolateEmbedderHandler(c_method_name);
@@ -894,7 +894,7 @@
 
     if (handler != NULL) {
       EmbedderHandleMessage(handler, &js);
-      return T->get_and_clear_sticky_error();
+      return T->StealStickyError();
     }
 
     const Instance& extension_handler =
@@ -904,12 +904,12 @@
                                param_values, reply_port, seq);
       // Schedule was successful. Extension code will post a reply
       // asynchronously.
-      return T->get_and_clear_sticky_error();
+      return T->StealStickyError();
     }
 
     PrintUnrecognizedMethodError(&js);
     js.PostReply();
-    return T->get_and_clear_sticky_error();
+    return T->StealStickyError();
   }
 }
 
@@ -1095,6 +1095,14 @@
     params.AddProperty("event", event);
   }
   PostEvent(event->isolate(), stream_id, event->KindAsCString(), &js);
+
+  // Post event to the native Service Stream handlers if set.
+  if (event->stream_info() != nullptr &&
+      event->stream_info()->consumer() != nullptr) {
+    auto length = js.buffer()->length();
+    event->stream_info()->consumer()(
+        reinterpret_cast<uint8_t*>(js.buffer()->buf()), length);
+  }
 }
 
 void Service::PostEvent(Isolate* isolate,
@@ -1261,6 +1269,17 @@
   stream_cancel_callback_ = cancel_callback;
 }
 
+void Service::SetNativeServiceStreamCallback(Dart_NativeStreamConsumer consumer,
+                                             const char* stream_id) {
+  for (auto stream : streams_) {
+    if (stream->id() == stream_id) {
+      stream->set_consumer(consumer);
+    }
+  }
+  // Enable stream.
+  ListenStream(stream_id);
+}
+
 void Service::SetGetServiceAssetsCallback(
     Dart_GetVMServiceAssetsArchive get_service_assets) {
   get_service_assets_callback_ = get_service_assets;
@@ -1796,7 +1815,7 @@
     if (id != 0) {
       return Object::sentinel().raw();
     }
-    const Type& type = Type::Handle(zone, cls.CanonicalType());
+    const Type& type = Type::Handle(zone, cls.DeclarationType());
     if (!type.IsNull()) {
       return type.raw();
     }
@@ -2413,7 +2432,6 @@
     // We don't use Instance::Cast here because it doesn't allow null.
     Instance& instance = Instance::Handle(zone);
     instance ^= receiver.raw();
-
     const Object& result =
         Object::Handle(zone, instance.Invoke(selector, args, arg_names));
     result.PrintJSON(js, true);
@@ -4667,7 +4685,7 @@
   }
   {
     JSONArray internals(&map, "Type");
-    for (intptr_t id = kAbstractTypeCid; id <= kMixinAppTypeCid; ++id) {
+    for (intptr_t id = kAbstractTypeCid; id <= kTypeParameterCid; ++id) {
       DEFINE_ADD_VALUE_F(id);
     }
   }
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index ca29775..90f3e64 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -15,7 +15,7 @@
 namespace dart {
 
 #define SERVICE_PROTOCOL_MAJOR_VERSION 3
-#define SERVICE_PROTOCOL_MINOR_VERSION 12
+#define SERVICE_PROTOCOL_MINOR_VERSION 13
 
 class Array;
 class EmbedderServiceHandler;
@@ -73,9 +73,15 @@
   void set_enabled(bool value) { enabled_ = value; }
   bool enabled() const { return enabled_; }
 
+  void set_consumer(Dart_NativeStreamConsumer consumer) {
+    callback_ = consumer;
+  }
+  Dart_NativeStreamConsumer consumer() const { return callback_; }
+
  private:
   const char* id_;
   bool enabled_;
+  Dart_NativeStreamConsumer callback_;
 };
 
 class Service : public AllStatic {
@@ -108,6 +114,9 @@
       Dart_ServiceStreamListenCallback listen_callback,
       Dart_ServiceStreamCancelCallback cancel_callback);
 
+  static void SetNativeServiceStreamCallback(Dart_NativeStreamConsumer consumer,
+                                             const char* stream_id);
+
   static void SetGetServiceAssetsCallback(
       Dart_GetVMServiceAssetsArchive get_service_assets);
 
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index 50b2691c..44351459b3c1 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -1,8 +1,8 @@
-# Dart VM Service Protocol 3.12
+# Dart VM Service Protocol 3.13
 
 > Please post feedback to the [observatory-discuss group][discuss-list]
 
-This document describes of _version 3.12_ of the Dart VM Service Protocol. This
+This document describes of _version 3.13_ of the Dart VM Service Protocol. This
 protocol is used to communicate with a running Dart Virtual Machine.
 
 To use the Service Protocol, start the VM with the *--observe* flag.
@@ -31,7 +31,7 @@
   - [evaluateInFrame](#evaluateinframe)
   - [getFlagList](#getflaglist)
   - [getIsolate](#getisolate)
-  - [getScripts](#getisolatescripts)
+  - [getScripts](#getscripts)
   - [getObject](#getobject)
   - [getSourceReport](#getsourcereport)
   - [getStack](#getstack)
@@ -2731,5 +2731,6 @@
 3.10 | Add 'invoke'.
 3.11 | Rename 'invoke' parameter 'receiverId' to 'targetId.
 3.12 | Add 'getScripts' RPC and `ScriptList` object.
+3.13 | Class 'mixin' field now properly set for kernel transformed mixin applications.
 
 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
diff --git a/runtime/vm/service/service_dev.md b/runtime/vm/service/service_dev.md
index afb751c..869811e 100644
--- a/runtime/vm/service/service_dev.md
+++ b/runtime/vm/service/service_dev.md
@@ -1,8 +1,8 @@
-# Dart VM Service Protocol 3.13-dev
+# Dart VM Service Protocol 3.14-dev
 
 > Please post feedback to the [observatory-discuss group][discuss-list]
 
-This document describes of _version 3.13-dev_ of the Dart VM Service Protocol. This
+This document describes of _version 3.14-dev_ of the Dart VM Service Protocol. This
 protocol is used to communicate with a running Dart Virtual Machine.
 
 To use the Service Protocol, start the VM with the *--observe* flag.
@@ -2731,5 +2731,6 @@
 3.10 | Add 'invoke'.
 3.11 | Rename 'invoke' parameter 'receiverId' to 'targetId.
 3.12 | Add 'getScripts' RPC and `ScriptList` object.
+3.13 | Class 'mixin' field now properly set for kernel transformed mixin applications.
 
 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 8eddb65..8d13ec6 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -143,6 +143,7 @@
 }
 
 Dart_Port ServiceIsolate::WaitForLoadPort() {
+  VMTagScope tagScope(Thread::Current(), VMTag::kLoadWaitTagId);
   MonitorLocker ml(monitor_);
   while (initializing_ && (load_port_ == ILLEGAL_PORT)) {
     ml.Wait();
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index 779a863..992dd24 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -673,9 +673,11 @@
       new char[(OSThread::GetSpecifiedStackSize() + OSThread::kStackSizeBuffer +
                 kSimulatorStackUnderflowSize)];
   // Low address.
-  stack_limit_ = reinterpret_cast<uword>(stack_) + OSThread::kStackSizeBuffer;
+  stack_limit_ = reinterpret_cast<uword>(stack_);
+  // Limit for StackOverflowError.
+  overflow_stack_limit_ = stack_limit_ + OSThread::kStackSizeBuffer;
   // High address.
-  stack_base_ = stack_limit_ + OSThread::GetSpecifiedStackSize();
+  stack_base_ = overflow_stack_limit_ + OSThread::GetSpecifiedStackSize();
 
   pc_modified_ = false;
   icount_ = 0;
@@ -3743,8 +3745,11 @@
   // Restore pool pointer.
   int32_t code =
       *reinterpret_cast<int32_t*>(fp + kPcMarkerSlotFromFp * kWordSize);
-  int32_t pp = *reinterpret_cast<int32_t*>(code + Code::object_pool_offset() -
-                                           kHeapObjectTag);
+  int32_t pp = (FLAG_precompiled_mode && FLAG_use_bare_instructions)
+                   ? reinterpret_cast<int32_t>(thread->global_object_pool())
+                   : *reinterpret_cast<int32_t*>(
+                         (code + Code::object_pool_offset() - kHeapObjectTag));
+
   set_register(CODE_REG, code);
   set_register(PP, pp);
   buf->Longjmp();
diff --git a/runtime/vm/simulator_arm.h b/runtime/vm/simulator_arm.h
index 0365f80..406f7ce 100644
--- a/runtime/vm/simulator_arm.h
+++ b/runtime/vm/simulator_arm.h
@@ -79,6 +79,8 @@
 
   // High address.
   uword stack_base() const { return stack_base_; }
+  // Limit for StackOverflowError.
+  uword overflow_stack_limit() const { return overflow_stack_limit_; }
   // Low address.
   uword stack_limit() const { return stack_limit_; }
 
@@ -149,6 +151,7 @@
   // Simulator support.
   char* stack_;
   uword stack_limit_;
+  uword overflow_stack_limit_;
   uword stack_base_;
   bool pc_modified_;
   uint64_t icount_;
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index 12a2b71..82f12b1 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -723,9 +723,11 @@
       new char[(OSThread::GetSpecifiedStackSize() + OSThread::kStackSizeBuffer +
                 kSimulatorStackUnderflowSize)];
   // Low address.
-  stack_limit_ = reinterpret_cast<uword>(stack_) + OSThread::kStackSizeBuffer;
+  stack_limit_ = reinterpret_cast<uword>(stack_);
+  // Limit for StackOverflowError.
+  overflow_stack_limit_ = stack_limit_ + OSThread::kStackSizeBuffer;
   // High address.
-  stack_base_ = stack_limit_ + OSThread::GetSpecifiedStackSize();
+  stack_base_ = overflow_stack_limit_ + OSThread::GetSpecifiedStackSize();
 
   pc_modified_ = false;
   icount_ = 0;
@@ -3563,8 +3565,10 @@
   // Restore pool pointer.
   int64_t code =
       *reinterpret_cast<int64_t*>(fp + kPcMarkerSlotFromFp * kWordSize);
-  int64_t pp = *reinterpret_cast<int64_t*>(code + Code::object_pool_offset() -
-                                           kHeapObjectTag);
+  int64_t pp = (FLAG_precompiled_mode && FLAG_use_bare_instructions)
+                   ? reinterpret_cast<int64_t>(thread->global_object_pool())
+                   : *reinterpret_cast<int64_t*>(
+                         code + Code::object_pool_offset() - kHeapObjectTag);
   pp -= kHeapObjectTag;  // In the PP register, the pool pointer is untagged.
   set_register(NULL, CODE_REG, code);
   set_register(NULL, PP, pp);
diff --git a/runtime/vm/simulator_arm64.h b/runtime/vm/simulator_arm64.h
index f85ebf3..43ae2ea 100644
--- a/runtime/vm/simulator_arm64.h
+++ b/runtime/vm/simulator_arm64.h
@@ -75,6 +75,8 @@
 
   // High address.
   uword stack_base() const { return stack_base_; }
+  // Limit for StackOverflowError.
+  uword overflow_stack_limit() const { return overflow_stack_limit_; }
   // Low address.
   uword stack_limit() const { return stack_limit_; }
 
@@ -136,6 +138,7 @@
   int64_t pc_;
   char* stack_;
   uword stack_limit_;
+  uword overflow_stack_limit_;
   uword stack_base_;
   bool pc_modified_;
   uint64_t icount_;
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 2c7f573..2e97a9a 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -304,7 +304,7 @@
     if (cls->ptr()->num_type_arguments_ != 0) {
       return false;
     }
-    RawType* typ = cls->ptr()->canonical_type_;
+    RawType* typ = cls->ptr()->declaration_type_;
     if (typ == Object::null()) {
       return false;
     }
@@ -557,8 +557,10 @@
                          sizeof(uintptr_t)];
   // Low address.
   stack_base_ = reinterpret_cast<uword>(stack_) + kSimulatorStackUnderflowSize;
+  // Limit for StackOverflowError.
+  overflow_stack_limit_ = stack_base_ + OSThread::GetSpecifiedStackSize();
   // High address.
-  stack_limit_ = stack_base_ + OSThread::GetSpecifiedStackSize();
+  stack_limit_ = overflow_stack_limit_ + OSThread::kStackSizeBuffer;
 
   last_setjmp_buffer_ = NULL;
 
@@ -3981,11 +3983,6 @@
   // in the previous C++ frames.
   StackResource::Unwind(thread);
 
-  // Set the tag.
-  thread->set_vm_tag(VMTag::kDartCompiledTagId);
-  // Clear top exit frame.
-  thread->set_top_exit_frame_info(0);
-
   fp_ = reinterpret_cast<RawObject**>(fp);
 
   if (pc == StubCode::RunExceptionHandler().EntryPoint()) {
@@ -4003,6 +4000,11 @@
     pc_ = pc;
   }
 
+  // Set the tag.
+  thread->set_vm_tag(VMTag::kDartCompiledTagId);
+  // Clear top exit frame.
+  thread->set_top_exit_frame_info(0);
+
   buf->Longjmp();
   UNREACHABLE();
 }
diff --git a/runtime/vm/simulator_dbc.h b/runtime/vm/simulator_dbc.h
index 18aee10..03608d0 100644
--- a/runtime/vm/simulator_dbc.h
+++ b/runtime/vm/simulator_dbc.h
@@ -49,6 +49,8 @@
 
   // Low address (DBC stack grows up).
   uword stack_base() const { return stack_base_; }
+  // Limit for StackOverflowError.
+  uword overflow_stack_limit() const { return overflow_stack_limit_; }
   // High address (DBC stack grows up).
   uword stack_limit() const { return stack_limit_; }
 
@@ -89,6 +91,7 @@
  private:
   uintptr_t* stack_;
   uword stack_base_;
+  uword overflow_stack_limit_;
   uword stack_limit_;
 
   RawObject** fp_;
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 61521ac..5a4d2f5 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -262,9 +262,7 @@
     return result.raw();
   } else {
     // An error occurred while reading, return the error object.
-    const Error& err = Error::Handle(thread()->sticky_error());
-    thread()->clear_sticky_error();
-    return err.raw();
+    return Thread::Current()->StealStickyError();
   }
 }
 
@@ -1434,7 +1432,12 @@
 
 void SnapshotWriter::ThrowException(Exceptions::ExceptionType type,
                                     const char* msg) {
-  thread()->clear_sticky_error();
+  {
+    NoSafepointScope no_safepoint;
+    RawError* error = thread()->StealStickyError();
+    ASSERT(error == Object::snapshot_writer_error().raw());
+  }
+
   if (msg != NULL) {
     const String& msg_obj = String::Handle(String::New(msg));
     const Array& args = Array::Handle(Array::New(1));
@@ -1504,12 +1507,18 @@
 
   // Setup for long jump in case there is an exception while writing
   // the message.
-  LongJumpScope jump;
-  if (setjmp(*jump.Set()) == 0) {
-    NoSafepointScope no_safepoint;
-    WriteObject(obj.raw());
-  } else {
-    FreeBuffer();
+  bool has_exception = false;
+  {
+    LongJumpScope jump;
+    if (setjmp(*jump.Set()) == 0) {
+      NoSafepointScope no_safepoint;
+      WriteObject(obj.raw());
+    } else {
+      FreeBuffer();
+      has_exception = true;
+    }
+  }
+  if (has_exception) {
     ThrowException(exception_type(), exception_msg());
   }
 
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 8bded02..1432259 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -39,7 +39,6 @@
 class PageSpace;
 class RawApiError;
 class RawArray;
-class RawBoundedType;
 class RawCapability;
 class RawClass;
 class RawClosure;
@@ -66,7 +65,6 @@
 class RawLocalVarDescriptors;
 class RawMegamorphicCache;
 class RawMint;
-class RawMixinAppType;
 class RawNamespace;
 class RawObject;
 class RawObjectPool;
@@ -447,7 +445,6 @@
 
   friend class ApiError;
   friend class Array;
-  friend class BoundedType;
   friend class Class;
   friend class Closure;
   friend class ClosureData;
@@ -465,7 +462,6 @@
   friend class LibraryPrefix;
   friend class LinkedHashMap;
   friend class MirrorReference;
-  friend class MixinAppType;
   friend class Namespace;
   friend class PatchClass;
   friend class RedirectionData;
@@ -747,7 +743,6 @@
   friend class RawSubtypeTestCache;
   friend class RawType;
   friend class RawTypeRef;
-  friend class RawBoundedType;
   friend class RawTypeArguments;
   friend class RawTypeParameter;
   friend class RawUserTag;
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index f1f05d7..52bda42 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -776,7 +776,7 @@
     // Write snapshot with object content.
     FullSnapshotWriter writer(Snapshot::kFull, NULL,
                               &isolate_snapshot_data_buffer, &malloc_allocator,
-                              NULL, NULL /* image_writer */);
+                              NULL, /*image_writer*/ nullptr);
     writer.WriteFullSnapshot();
   }
 
@@ -832,7 +832,7 @@
       TransitionNativeToVM transition(thread);
       FullSnapshotWriter writer(
           Snapshot::kFull, NULL, &isolate_snapshot_data_buffer,
-          &malloc_allocator, NULL, NULL /* image_writer */);
+          &malloc_allocator, NULL, /*image_writer*/ nullptr);
       writer.WriteFullSnapshot();
     }
 
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index edc5923..9fea664 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -98,7 +98,7 @@
       return true;
   }
   if (func.is_abstract() || func.IsImplicitConstructor() ||
-      func.IsRedirectingFactory()) {
+      func.IsRedirectingFactory() || func.is_no_such_method_forwarder()) {
     return true;
   }
   if (func.IsNonImplicitClosureFunction() &&
@@ -476,7 +476,7 @@
     if (!cls.is_finalized()) {
       if (compile_mode_ == kForceCompile) {
         Error& err = Error::Handle();
-        if (cls.is_marked_for_parsing()) {
+        if (cls.is_marked_for_lazy_loading()) {
           const String& error_message = String::Handle(
               String::New("Unable to process 'force compile' request, "
                           "while the class is being finalized."));
diff --git a/runtime/vm/source_report_test.cc b/runtime/vm/source_report_test.cc
index 78ad2ba..5e37a9b 100644
--- a/runtime/vm/source_report_test.cc
+++ b/runtime/vm/source_report_test.cc
@@ -667,6 +667,51 @@
       buffer);
 }
 
+ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_Issue35453_NoSuchMethod) {
+  char buffer[1024];
+  const char* kScript =
+      "class Foo {\n"
+      "  void bar() {}\n"
+      "}\n"
+      "class Unused implements Foo {\n"
+      "  dynamic noSuchMethod(_) {}\n"
+      "}\n"
+      "void main() {\n"
+      "  Foo().bar();\n"
+      "}\n";
+
+  Library& lib = Library::Handle();
+  lib ^= ExecuteScript(kScript);
+  ASSERT(!lib.IsNull());
+  const Script& script =
+      Script::Handle(lib.LookupScript(String::Handle(String::New("test-lib"))));
+
+  SourceReport report(SourceReport::kCoverage, SourceReport::kForceCompile);
+  JSONStream js;
+  report.PrintJSON(&js, script);
+  ElideJSONSubstring("classes", js.ToCString(), buffer);
+  ElideJSONSubstring("libraries", buffer, buffer);
+  EXPECT_STREQ(
+      "{\"type\":\"SourceReport\",\"ranges\":["
+
+      // Foo is hit.
+      "{\"scriptIndex\":0,\"startPos\":14,\"endPos\":26,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[14],\"misses\":[]}},"
+
+      // Unused is missed.
+      "{\"scriptIndex\":0,\"startPos\":62,\"endPos\":87,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[],\"misses\":[62]}},"
+
+      // Main is hit.
+      "{\"scriptIndex\":0,\"startPos\":91,\"endPos\":120,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[91,107,113],\"misses\":[]}}],"
+
+      // Only one script in the script table.
+      "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
+      buffer);
+}
+
 #endif  // !PRODUCT
 
 }  // namespace dart
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 09a452c..5f174f8 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -15,6 +15,7 @@
 #include "vm/parser.h"
 #include "vm/raw_object.h"
 #include "vm/reusable_handles.h"
+#include "vm/reverse_pc_lookup_cache.h"
 #include "vm/scopes.h"
 #include "vm/stub_code.h"
 #include "vm/visitor.h"
@@ -42,6 +43,18 @@
     /*.saved_caller_pp_from_fp = */ kSavedCallerPpSlotFromFp,
     /*.code_from_fp = */ kPcMarkerSlotFromFp,
 };
+const FrameLayout bare_instructions_frame_layout = {
+    /*.first_object_from_pc =*/kFirstObjectSlotFromFp,  // No saved PP slot.
+    /*.last_fixed_object_from_fp = */ kLastFixedObjectSlotFromFp +
+        2,  // No saved CODE, PP slots
+    /*.param_end_from_fp = */ kParamEndSlotFromFp,
+    /*.first_local_from_fp =*/kFirstLocalSlotFromFp +
+        2,  // No saved CODE, PP slots.
+    /*.dart_fixed_frame_size =*/kDartFrameFixedSize -
+        2,                              // No saved CODE, PP slots.
+    /*.saved_caller_pp_from_fp = */ 0,  // No saved PP slot.
+    /*.code_from_fp = */ 0,             // No saved CODE
+};
 
 FrameLayout compiler_frame_layout = invalid_frame_layout;
 FrameLayout runtime_frame_layout = invalid_frame_layout;
@@ -61,20 +74,84 @@
 }
 
 void FrameLayout::Init() {
+  // By default we use frames with CODE_REG/PP in the frame.
   compiler_frame_layout = default_frame_layout;
   runtime_frame_layout = default_frame_layout;
+
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    compiler_frame_layout = bare_instructions_frame_layout;
+  }
+#if defined(DART_PRECOMPILED_RUNTIME)
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    compiler_frame_layout = invalid_frame_layout;
+    runtime_frame_layout = bare_instructions_frame_layout;
+  }
+#endif
+}
+
+Isolate* StackFrame::IsolateOfBareInstructionsFrame() const {
+  auto isolate = this->isolate();
+
+  if (isolate->object_store()->code_order_table() != Object::null()) {
+    auto rct = isolate->reverse_pc_lookup_cache();
+    if (rct->Contains(pc())) return isolate;
+  }
+
+  isolate = Dart::vm_isolate();
+  if (isolate->object_store()->code_order_table() != Object::null()) {
+    auto rct = isolate->reverse_pc_lookup_cache();
+    if (rct->Contains(pc())) return isolate;
+  }
+
+  return nullptr;
+}
+
+bool StackFrame::IsBareInstructionsDartFrame() const {
+  NoSafepointScope no_safepoint;
+
+  if (auto isolate = IsolateOfBareInstructionsFrame()) {
+    Code code;
+    auto rct = isolate->reverse_pc_lookup_cache();
+    code = rct->Lookup(pc());
+
+    const intptr_t cid = code.owner()->GetClassId();
+    ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
+    return cid == kFunctionCid;
+  }
+  return false;
+}
+
+bool StackFrame::IsBareInstructionsStubFrame() const {
+  NoSafepointScope no_safepoint;
+
+  if (auto isolate = IsolateOfBareInstructionsFrame()) {
+    Code code;
+    auto rct = isolate->reverse_pc_lookup_cache();
+    code = rct->Lookup(pc());
+
+    const intptr_t cid = code.owner()->GetClassId();
+    ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
+    return cid == kNullCid || cid == kClassCid;
+  }
+  return false;
 }
 
 bool StackFrame::IsStubFrame() const {
   if (is_interpreted()) {
     return false;
   }
+
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    return IsBareInstructionsStubFrame();
+  }
+
   ASSERT(!(IsEntryFrame() || IsExitFrame()));
 #if !defined(HOST_OS_WINDOWS) && !defined(HOST_OS_FUCHSIA)
   // On Windows and Fuchsia, the profiler calls this from a separate thread
   // where Thread::Current() is NULL, so we cannot create a NoSafepointScope.
   NoSafepointScope no_safepoint;
 #endif
+
   RawCode* code = GetCodeObject();
   ASSERT(code != Object::null());
   const intptr_t cid = code->ptr()->owner_->GetClassId();
@@ -172,21 +249,27 @@
   // be able to reuse the handle based code and avoid having to add
   // helper functions to the raw object interface.
   NoSafepointScope no_safepoint;
-  RawObject* pc_marker = *(reinterpret_cast<RawObject**>(
-      fp() + ((is_interpreted() ? kKBCPcMarkerSlotFromFp
-                                : runtime_frame_layout.code_from_fp) *
-              kWordSize)));
-  // May forward raw code. Note we don't just visit the pc marker slot first
-  // because the visitor's forwarding might not be idempotent.
-  visitor->VisitPointer(&pc_marker);
   Code code;
-  if (pc_marker->IsHeapObject() && (pc_marker->GetClassId() == kCodeCid)) {
-    code ^= pc_marker;
+
+  if (auto isolate = IsolateOfBareInstructionsFrame()) {
+    code = isolate->reverse_pc_lookup_cache()->Lookup(pc());
   } else {
-    ASSERT(pc_marker == Object::null() ||
-           (is_interpreted() && (!pc_marker->IsHeapObject() ||
-                                 (pc_marker->GetClassId() == kBytecodeCid))));
+    RawObject* pc_marker = *(reinterpret_cast<RawObject**>(
+        fp() + ((is_interpreted() ? kKBCPcMarkerSlotFromFp
+                                  : runtime_frame_layout.code_from_fp) *
+                kWordSize)));
+    // May forward raw code. Note we don't just visit the pc marker slot first
+    // because the visitor's forwarding might not be idempotent.
+    visitor->VisitPointer(&pc_marker);
+    if (pc_marker->IsHeapObject() && (pc_marker->GetClassId() == kCodeCid)) {
+      code ^= pc_marker;
+    } else {
+      ASSERT(pc_marker == Object::null() ||
+             (is_interpreted() && (!pc_marker->IsHeapObject() ||
+                                   (pc_marker->GetClassId() == kBytecodeCid))));
+    }
   }
+
   if (!code.IsNull()) {
     // Optimized frames have a stack map. We need to visit the frame based
     // on the stack map.
@@ -328,6 +411,10 @@
   // where Thread::Current() is NULL, so we cannot create a NoSafepointScope.
   NoSafepointScope no_safepoint;
 #endif
+  if (auto isolate = IsolateOfBareInstructionsFrame()) {
+    return isolate->reverse_pc_lookup_cache()->Lookup(pc());
+  }
+
   RawCode* code = GetCodeObject();
   if ((code != Code::null()) &&
       (code->ptr()->owner_->GetClassId() == kFunctionCid)) {
@@ -338,11 +425,15 @@
 
 RawCode* StackFrame::GetCodeObject() const {
   ASSERT(!is_interpreted());
-  RawObject* pc_marker = *(reinterpret_cast<RawObject**>(
-      fp() + runtime_frame_layout.code_from_fp * kWordSize));
-  ASSERT((pc_marker == Object::null()) ||
-         (pc_marker->GetClassId() == kCodeCid));
-  return reinterpret_cast<RawCode*>(pc_marker);
+  if (auto isolate = IsolateOfBareInstructionsFrame()) {
+    return isolate->reverse_pc_lookup_cache()->Lookup(pc());
+  } else {
+    RawObject* pc_marker = *(reinterpret_cast<RawObject**>(
+        fp() + runtime_frame_layout.code_from_fp * kWordSize));
+    ASSERT((pc_marker == Object::null()) ||
+           (pc_marker->GetClassId() == kCodeCid));
+    return reinterpret_cast<RawCode*>(pc_marker);
+  }
 }
 
 RawBytecode* StackFrame::LookupDartBytecode() const {
diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h
index 85ba367..c8b59b9 100644
--- a/runtime/vm/stack_frame.h
+++ b/runtime/vm/stack_frame.h
@@ -152,6 +152,18 @@
   // Check validity of a frame, used for assertion purposes.
   virtual bool IsValid() const;
 
+  // Returns the isolate containing the bare instructions of the current frame.
+  //
+  // If the frame does not belong to a bare instructions snapshot, it will
+  // return nullptr.
+  Isolate* IsolateOfBareInstructionsFrame() const;
+
+  // Returns true iff the current frame is a bare instructions dart frame.
+  bool IsBareInstructionsDartFrame() const;
+
+  // Returns true iff the current frame is a bare instructions stub frame.
+  bool IsBareInstructionsStubFrame() const;
+
   // Frame type.
   virtual bool IsDartFrame(bool validate = true) const {
     ASSERT(!validate || IsValid());
@@ -160,6 +172,7 @@
   virtual bool IsStubFrame() const;
   virtual bool IsEntryFrame() const { return false; }
   virtual bool IsExitFrame() const { return false; }
+
   virtual bool is_interpreted() const { return is_interpreted_; }
 
   RawFunction* LookupDartFunction() const;
@@ -180,7 +193,9 @@
 
   // Name of the frame, used for generic frame printing functionality.
   virtual const char* GetName() const {
-    return IsStubFrame() ? "stub" : "dart";
+    if (IsBareInstructionsStubFrame()) return "bare-stub";
+    if (IsStubFrame()) return "stub";
+    return IsBareInstructionsDartFrame() ? "bare-dart" : "dart";
   }
 
   Isolate* isolate() const { return thread_->isolate(); }
diff --git a/runtime/vm/stack_frame_arm64.h b/runtime/vm/stack_frame_arm64.h
index c0a9435..70000da 100644
--- a/runtime/vm/stack_frame_arm64.h
+++ b/runtime/vm/stack_frame_arm64.h
@@ -42,7 +42,6 @@
 
 static const int kParamEndSlotFromFp = 1;  // One slot past last parameter.
 static const int kCallerSpSlotFromFp = 2;
-static const int kSavedAboveReturnAddress = 3;  // Saved above return address.
 
 // Entry and exit frame layout.
 static const int kExitLinkSlotFromEntryFp = -22;
diff --git a/runtime/vm/stack_frame_x64.h b/runtime/vm/stack_frame_x64.h
index 1435777..84d9652 100644
--- a/runtime/vm/stack_frame_x64.h
+++ b/runtime/vm/stack_frame_x64.h
@@ -43,7 +43,6 @@
 
 static const int kParamEndSlotFromFp = 1;  // One slot past last parameter.
 static const int kCallerSpSlotFromFp = 2;
-static const int kSavedAboveReturnAddress = 3;  // Saved above return address.
 
 // Entry and exit frame layout.
 #if defined(_WIN64)
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 95e53c1..9f48a07 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -7,6 +7,7 @@
 #include "platform/assert.h"
 #include "platform/globals.h"
 #include "vm/clustered_snapshot.h"
+#include "vm/compiler/aot/precompiler.h"
 #include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/assembler/disassembler.h"
 #include "vm/flags.h"
@@ -20,6 +21,7 @@
 namespace dart {
 
 DEFINE_FLAG(bool, disassemble_stubs, false, "Disassemble generated stubs.");
+DECLARE_FLAG(bool, precompiled_mode);
 
 DECLARE_FLAG(bool, enable_interpreter);
 
@@ -162,13 +164,24 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
   if (stub.IsNull()) {
     ObjectPoolWrapper object_pool_wrapper;
-    Assembler assembler(&object_pool_wrapper);
+    Precompiler* precompiler = Precompiler::Instance();
+
+    ObjectPoolWrapper* wrapper =
+        FLAG_use_bare_instructions && precompiler != NULL
+            ? precompiler->global_object_pool_wrapper()
+            : &object_pool_wrapper;
+
+    const auto pool_attachment =
+        FLAG_precompiled_mode && FLAG_use_bare_instructions
+            ? Code::PoolAttachment::kNotAttachPool
+            : Code::PoolAttachment::kAttachPool;
+
+    Assembler assembler(wrapper);
     const char* name = cls.ToCString();
     StubCode::GenerateAllocationStubForClass(&assembler, cls);
 
     if (thread->IsMutatorThread()) {
-      stub ^= Code::FinalizeCode(name, nullptr, &assembler,
-                                 Code::PoolAttachment::kAttachPool,
+      stub ^= Code::FinalizeCode(name, nullptr, &assembler, pool_attachment,
                                  /*optimized1*/ false);
       // Check if background compilation thread has not already added the stub.
       if (cls.allocation_stub() == Code::null()) {
@@ -193,8 +206,7 @@
         // Do not Garbage collect during this stage and instead allow the
         // heap to grow.
         NoHeapGrowthControlScope no_growth_control;
-        stub ^= Code::FinalizeCode(name, nullptr, &assembler,
-                                   Code::PoolAttachment::kAttachPool,
+        stub ^= Code::FinalizeCode(name, nullptr, &assembler, pool_attachment,
                                    false /* optimized */);
         stub.set_owner(cls);
         cls.set_allocation_stub(stub);
@@ -226,16 +238,23 @@
 }
 
 #if !defined(TARGET_ARCH_DBC) && !defined(TARGET_ARCH_IA32)
-RawCode* StubCode::GetBuildMethodExtractorStub() {
+RawCode* StubCode::GetBuildMethodExtractorStub(ObjectPoolWrapper* pool) {
 #if !defined(DART_PRECOMPILED_RUNTIME)
   ObjectPoolWrapper object_pool_wrapper;
-  Assembler assembler(&object_pool_wrapper);
+  Assembler assembler(pool != nullptr ? pool : &object_pool_wrapper);
   StubCode::GenerateBuildMethodExtractorStub(&assembler);
 
   const char* name = "BuildMethodExtractor";
   const Code& stub = Code::Handle(Code::FinalizeCode(
-      name, nullptr, &assembler, Code::PoolAttachment::kAttachPool,
+      name, nullptr, &assembler, Code::PoolAttachment::kNotAttachPool,
       /*optimized=*/false));
+
+  if (pool == nullptr) {
+    const ObjectPool& object_pool =
+        ObjectPool::Handle(object_pool_wrapper.MakeObjectPool());
+    stub.set_object_pool(object_pool.raw());
+  }
+
 #ifndef PRODUCT
   if (FLAG_support_disassembler && FLAG_disassemble_stubs) {
     LogBlock lb;
diff --git a/runtime/vm/stub_code.h b/runtime/vm/stub_code.h
index 637371b..fe2fcbe 100644
--- a/runtime/vm/stub_code.h
+++ b/runtime/vm/stub_code.h
@@ -14,6 +14,7 @@
 class Code;
 class Isolate;
 class ObjectPointerVisitor;
+class ObjectPoolWrapper;
 class RawCode;
 class SnapshotReader;
 class SnapshotWriter;
@@ -151,7 +152,7 @@
   static RawCode* GetAllocationStubForClass(const Class& cls);
 
 #if !defined(TARGET_ARCH_DBC) && !defined(TARGET_ARCH_IA32)
-  static RawCode* GetBuildMethodExtractorStub();
+  static RawCode* GetBuildMethodExtractorStub(ObjectPoolWrapper* pool);
   static void GenerateBuildMethodExtractorStub(Assembler* assembler);
 #endif
 
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 2d04003..71a8559 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -29,6 +29,7 @@
             use_slow_path,
             false,
             "Set to true for debugging & verifying the slow paths.");
+DECLARE_FLAG(bool, precompiled_mode);
 
 // Input parameters:
 //   LR : return address.
@@ -938,7 +939,7 @@
 //   R2 : arguments array.
 //   R3 : current thread.
 void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
-  // Save frame pointer coming in.
+  __ Push(LR);  // Marker for the profiler.
   __ EnterFrame((1 << FP) | (1 << LR), 0);
 
   // Push code object to PC marker slot.
@@ -1018,7 +1019,11 @@
   __ Bind(&done_push_arguments);
 
   // Call the Dart code entrypoint.
-  __ LoadImmediate(PP, 0);  // GC safe value into PP.
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, Thread::global_object_pool_offset()));
+  } else {
+    __ LoadImmediate(PP, 0);  // GC safe value into PP.
+  }
   __ ldr(CODE_REG, Address(R0, VMHandles::kOffsetOfRawPtrInHandle));
   __ ldr(R0, FieldAddress(CODE_REG, Code::entry_point_offset()));
   __ blx(R0);  // R4 is the arguments descriptor array.
@@ -1050,6 +1055,7 @@
 
   // Restore the frame pointer and return.
   __ LeaveFrame((1 << FP) | (1 << LR));
+  __ Drop(1);
   __ Ret();
 }
 
@@ -2465,7 +2471,12 @@
   __ StoreToOffset(kWord, R2, THR, Thread::top_exit_frame_info_offset());
   // Restore the pool pointer.
   __ RestoreCodePointer();
-  __ LoadPoolPointer();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, Thread::global_object_pool_offset()));
+    __ set_constant_pool_allowed(true);
+  } else {
+    __ LoadPoolPointer();
+  }
   __ bx(LR);  // Jump to continuation point.
 }
 
@@ -2669,10 +2680,18 @@
   // proper target for the given name and arguments descriptor.  If the
   // illegal class id was found, the target is a cache miss handler that can
   // be invoked as a normal Dart function.
-  __ ldr(R0, FieldAddress(IP, base + kWordSize));
-  __ ldr(R4, FieldAddress(R9, MegamorphicCache::arguments_descriptor_offset()));
-  __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset()));
-  __ Branch(FieldAddress(R0, Function::entry_point_offset()));
+  const auto target_address = FieldAddress(IP, base + kWordSize);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(ARGS_DESC_REG,
+           FieldAddress(R9, MegamorphicCache::arguments_descriptor_offset()));
+    __ Branch(target_address);
+  } else {
+    __ ldr(R0, target_address);
+    __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset()));
+    __ ldr(ARGS_DESC_REG,
+           FieldAddress(R9, MegamorphicCache::arguments_descriptor_offset()));
+    __ Branch(FieldAddress(R0, Function::entry_point_offset()));
+  }
 
   // Probe failed, check if it is a miss.
   __ Bind(&probe_failed);
@@ -2693,7 +2712,8 @@
 //  R4: arguments descriptor
 void StubCode::GenerateICCallThroughFunctionStub(Assembler* assembler) {
   Label loop, found, miss;
-  __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset()));
+  __ ldr(ARGS_DESC_REG,
+         FieldAddress(R9, ICData::arguments_descriptor_offset()));
   __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset()));
   __ AddImmediate(R8, Array::data_offset() - kHeapObjectTag);
   // R8: first IC entry
@@ -2726,8 +2746,8 @@
 
 void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) {
   Label loop, found, miss;
-  __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset()));
   __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset()));
+  __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset()));
   __ AddImmediate(R8, Array::data_offset() - kHeapObjectTag);
   // R8: first IC entry
   __ LoadTaggedClassIdMayBeSmi(R1, R0);
@@ -2748,7 +2768,9 @@
   __ Bind(&found);
   const intptr_t code_offset = ICData::CodeIndexFor(1) * kWordSize;
   const intptr_t entry_offset = ICData::EntryPointIndexFor(1) * kWordSize;
-  __ ldr(CODE_REG, Address(R8, code_offset));
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    __ ldr(CODE_REG, Address(R8, code_offset));
+  }
   __ Branch(Address(R8, entry_offset));
 
   __ Bind(&miss);
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 384b31a..91996d9 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -28,6 +28,7 @@
             false,
             "Set to true for debugging & verifying the slow paths.");
 DECLARE_FLAG(bool, enable_interpreter);
+DECLARE_FLAG(bool, precompiled_mode);
 
 // Input parameters:
 //   LR : return address.
@@ -1015,6 +1016,7 @@
   // Copy the C stack pointer (R31) into the stack pointer we'll actually use
   // to access the stack.
   __ SetupDartSP();
+  __ Push(LR);  // Marker for the profiler.
   __ EnterFrame(0);
 
   // Push code object to PC marker slot.
@@ -1093,10 +1095,15 @@
   __ b(&push_arguments, LT);
   __ Bind(&done_push_arguments);
 
-  // We now load the pool pointer(PP) with a GC safe value as we are about to
-  // invoke dart code. We don't need a real object pool here.
-  // Smi zero does not work because ARM64 assumes PP to be untagged.
-  __ LoadObject(PP, Object::null_object());
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  } else {
+    // We now load the pool pointer(PP) with a GC safe value as we are about to
+    // invoke dart code. We don't need a real object pool here.
+    // Smi zero does not work because ARM64 assumes PP to be untagged.
+    __ LoadObject(PP, Object::null_object());
+  }
 
   // Call the Dart code entrypoint.
   __ ldr(CODE_REG, Address(R0, VMHandles::kOffsetOfRawPtrInHandle));
@@ -1136,6 +1143,7 @@
 
   // Restore the frame pointer and C stack pointer and return.
   __ LeaveFrame();
+  __ Drop(1);
   __ RestoreCSP();
   __ ret();
 }
@@ -1154,6 +1162,7 @@
   // Copy the C stack pointer (R31) into the stack pointer we'll actually use
   // to access the stack.
   __ SetupDartSP();
+  __ Push(LR);  // Marker for the profiler.
   __ EnterFrame(0);
 
   // Push code object to PC marker slot.
@@ -1272,6 +1281,7 @@
 
   // Restore the frame pointer and C stack pointer and return.
   __ LeaveFrame();
+  __ Drop(1);
   __ RestoreCSP();
   __ ret();
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
@@ -2730,7 +2740,12 @@
   __ StoreToOffset(ZR, THR, Thread::top_exit_frame_info_offset());
   // Restore the pool pointer.
   __ RestoreCodePointer();
-  __ LoadPoolPointer();
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  } else {
+    __ LoadPoolPointer();
+  }
   __ ret();  // Jump to continuation point.
 }
 
@@ -2930,10 +2945,18 @@
   // proper target for the given name and arguments descriptor.  If the
   // illegal class id was found, the target is a cache miss handler that can
   // be invoked as a normal Dart function.
-  __ ldr(R0, FieldAddress(TMP, base + kWordSize));
-  __ ldr(R4, FieldAddress(R5, MegamorphicCache::arguments_descriptor_offset()));
-  __ ldr(R1, FieldAddress(R0, Function::entry_point_offset()));
-  __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset()));
+  const auto target_address = FieldAddress(TMP, base + kWordSize);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(R1, target_address);
+    __ ldr(ARGS_DESC_REG,
+           FieldAddress(R5, MegamorphicCache::arguments_descriptor_offset()));
+  } else {
+    __ ldr(R0, target_address);
+    __ ldr(R1, FieldAddress(R0, Function::entry_point_offset()));
+    __ ldr(ARGS_DESC_REG,
+           FieldAddress(R5, MegamorphicCache::arguments_descriptor_offset()));
+    __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset()));
+  }
   __ br(R1);
 
   // Probe failed, check if it is a miss.
@@ -2960,7 +2983,8 @@
 //  R4: arguments descriptor
 void StubCode::GenerateICCallThroughFunctionStub(Assembler* assembler) {
   Label loop, found, miss;
-  __ ldr(R4, FieldAddress(R5, ICData::arguments_descriptor_offset()));
+  __ ldr(ARGS_DESC_REG,
+         FieldAddress(R5, ICData::arguments_descriptor_offset()));
   __ ldr(R8, FieldAddress(R5, ICData::ic_data_offset()));
   __ AddImmediate(R8, Array::data_offset() - kHeapObjectTag);
   // R8: first IC entry
@@ -2995,8 +3019,8 @@
 
 void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) {
   Label loop, found, miss;
-  __ ldr(R4, FieldAddress(R5, ICData::arguments_descriptor_offset()));
   __ ldr(R8, FieldAddress(R5, ICData::ic_data_offset()));
+  __ ldr(R4, FieldAddress(R5, ICData::arguments_descriptor_offset()));
   __ AddImmediate(R8, Array::data_offset() - kHeapObjectTag);
   // R8: first IC entry
   __ LoadTaggedClassIdMayBeSmi(R1, R0);
@@ -3018,7 +3042,9 @@
   const intptr_t code_offset = ICData::CodeIndexFor(1) * kWordSize;
   const intptr_t entry_offset = ICData::EntryPointIndexFor(1) * kWordSize;
   __ ldr(R1, Address(R8, entry_offset));
-  __ ldr(CODE_REG, Address(R8, code_offset));
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    __ ldr(CODE_REG, Address(R8, code_offset));
+  }
   __ br(R1);
 
   __ Bind(&miss);
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 93884e2..4c59d09 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -732,12 +732,12 @@
 //   ESP + 16 : current thread.
 // Uses EAX, EDX, ECX, EDI as temporary registers.
 void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
-  const intptr_t kTargetCodeOffset = 2 * kWordSize;
-  const intptr_t kArgumentsDescOffset = 3 * kWordSize;
-  const intptr_t kArgumentsOffset = 4 * kWordSize;
-  const intptr_t kThreadOffset = 5 * kWordSize;
+  const intptr_t kTargetCodeOffset = 3 * kWordSize;
+  const intptr_t kArgumentsDescOffset = 4 * kWordSize;
+  const intptr_t kArgumentsOffset = 5 * kWordSize;
+  const intptr_t kThreadOffset = 6 * kWordSize;
 
-  // Save frame pointer coming in.
+  __ pushl(Address(ESP, 0));  // Marker for the profiler.
   __ EnterFrame(0);
 
   // Push code object to PC marker slot.
@@ -833,6 +833,7 @@
 
   // Restore the frame pointer.
   __ LeaveFrame();
+  __ popl(ECX);
 
   __ ret();
 }
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 9033c2a..7184e25 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -33,6 +33,7 @@
             false,
             "Set to true for debugging & verifying the slow paths.");
 DECLARE_FLAG(bool, enable_interpreter);
+DECLARE_FLAG(bool, precompiled_mode);
 
 // Input parameters:
 //   RSP : points to return address.
@@ -926,7 +927,7 @@
 //   RDX : arguments array.
 //   RCX : current thread.
 void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
-  // Save frame pointer coming in.
+  __ pushq(Address(RSP, 0));  // Marker for the profiler.
   __ EnterFrame(0);
 
   const Register kTargetCodeReg = CallingConventions::kArg1Reg;
@@ -1025,7 +1026,11 @@
   __ Bind(&done_push_arguments);
 
   // Call the Dart code entrypoint.
-  __ xorq(PP, PP);  // GC-safe value into PP.
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(PP, Address(THR, Thread::global_object_pool_offset()));
+  } else {
+    __ xorq(PP, PP);  // GC-safe value into PP.
+  }
   __ movq(CODE_REG,
           Address(kTargetCodeReg, VMHandles::kOffsetOfRawPtrInHandle));
   __ movq(kTargetCodeReg, FieldAddress(CODE_REG, Code::entry_point_offset()));
@@ -1052,6 +1057,7 @@
 
   // Restore the frame pointer.
   __ LeaveFrame();
+  __ popq(RCX);
 
   __ ret();
 }
@@ -1067,7 +1073,7 @@
 #if defined(DART_PRECOMPILED_RUNTIME)
   __ Stop("Not using interpreter");
 #else
-  // Save frame pointer coming in.
+  __ pushq(Address(RSP, 0));  // Marker for the profiler.
   __ EnterFrame(0);
 
   const Register kTargetCodeReg = CallingConventions::kArg1Reg;
@@ -1193,6 +1199,7 @@
 
   // Restore the frame pointer.
   __ LeaveFrame();
+  __ popq(RCX);
 
   __ ret();
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
@@ -2735,7 +2742,11 @@
   __ movq(Address(THR, Thread::top_exit_frame_info_offset()), Immediate(0));
   // Restore the pool pointer.
   __ RestoreCodePointer();
-  __ LoadPoolPointer(PP);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(PP, Address(THR, Thread::global_object_pool_offset()));
+  } else {
+    __ LoadPoolPointer(PP);
+  }
   __ jmp(CallingConventions::kArg1Reg);  // Jump to program counter.
 }
 
@@ -2941,12 +2952,19 @@
   // proper target for the given name and arguments descriptor.  If the
   // illegal class id was found, the target is a cache miss handler that can
   // be invoked as a normal Dart function.
-  __ movq(RAX, FieldAddress(RDI, RCX, TIMES_8, base + kWordSize));
-  __ movq(R10,
-          FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset()));
-  __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
-  __ movq(CODE_REG, FieldAddress(RAX, Function::code_offset()));
-  __ jmp(RCX);
+  const auto target_address = FieldAddress(RDI, RCX, TIMES_8, base + kWordSize);
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(R10,
+            FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset()));
+    __ jmp(target_address);
+  } else {
+    __ movq(RAX, target_address);
+    __ movq(R10,
+            FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset()));
+    __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
+    __ movq(CODE_REG, FieldAddress(RAX, Function::code_offset()));
+    __ jmp(RCX);
+  }
 
   // Probe failed, check if it is a miss.
   __ Bind(&probe_failed);
@@ -3033,9 +3051,10 @@
   __ Bind(&found);
   const intptr_t code_offset = ICData::CodeIndexFor(1) * kWordSize;
   const intptr_t entry_offset = ICData::EntryPointIndexFor(1) * kWordSize;
-  __ movq(RCX, Address(R13, entry_offset));
-  __ movq(CODE_REG, Address(R13, code_offset));
-  __ jmp(RCX);
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    __ movq(CODE_REG, Address(R13, code_offset));
+  }
+  __ jmp(Address(R13, entry_offset));
 
   __ Bind(&miss);
   __ LoadIsolate(RAX);
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 572bd1b..741239a 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -417,12 +417,18 @@
   Zone* zone = thread->zone();
   if (type == Utf8::kLatin1) {
     uint8_t* characters = zone->Alloc<uint8_t>(len);
-    Utf8::DecodeToLatin1(utf8_array, array_len, characters, len);
+    if (!Utf8::DecodeToLatin1(utf8_array, array_len, characters, len)) {
+      Utf8::ReportInvalidByte(utf8_array, array_len, len);
+      return String::null();
+    }
     return FromLatin1(thread, characters, len);
   }
   ASSERT((type == Utf8::kBMP) || (type == Utf8::kSupplementary));
   uint16_t* characters = zone->Alloc<uint16_t>(len);
-  Utf8::DecodeToUTF16(utf8_array, array_len, characters, len);
+  if (!Utf8::DecodeToUTF16(utf8_array, array_len, characters, len)) {
+    Utf8::ReportInvalidByte(utf8_array, array_len, len);
+    return String::null();
+  }
   return FromUTF16(thread, characters, len);
 }
 
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 38bfdf5..536ad2b 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -80,7 +80,6 @@
   V(_CompileTimeError, "_CompileTimeError")                                    \
   V(ThrowNew, "_throwNew")                                                     \
   V(ThrowNewInvocation, "_throwNewInvocation")                                 \
-  V(ThrowNewIfNotLoaded, "_throwNewIfNotLoaded")                               \
   V(EvaluateAssertion, "_evaluateAssertion")                                   \
   V(Symbol, "Symbol")                                                          \
   V(SymbolCtor, "Symbol.")                                                     \
@@ -168,8 +167,6 @@
   V(_Type, "_Type")                                                            \
   V(_TypeRef, "_TypeRef")                                                      \
   V(_TypeParameter, "_TypeParameter")                                          \
-  V(_BoundedType, "_BoundedType")                                              \
-  V(_MixinAppType, "_MixinAppType")                                            \
   V(TypeArguments, "TypeArguments")                                            \
   V(Patch, "patch")                                                            \
   V(Pragma, "pragma")                                                          \
diff --git a/runtime/vm/tags.h b/runtime/vm/tags.h
index e2b08a1..7bd6aa9 100644
--- a/runtime/vm/tags.h
+++ b/runtime/vm/tags.h
@@ -20,12 +20,13 @@
   V(LoadBytecode)                                                              \
   V(CompileOptimized)                                                          \
   V(CompileUnoptimized)                                                        \
-  V(CompileClass)                                                              \
+  V(ClassLoading)                                                              \
   V(CompileParseRegExp)                                                        \
   V(DartCompiled)                                                              \
   V(DartInterpreted)                                                           \
   V(GCNewSpace)                                                                \
   V(GCOldSpace)                                                                \
+  V(GCIdle)                                                                    \
   V(Embedder)                                                                  \
   V(Runtime)                                                                   \
   V(Native)
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 65feb3b..109ccd4 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -278,12 +278,12 @@
   sticky_error_ = value.raw();
 }
 
-void Thread::clear_sticky_error() {
+void Thread::ClearStickyError() {
   sticky_error_ = Error::null();
 }
 
-RawError* Thread::get_and_clear_sticky_error() {
-  NoSafepointScope nss;
+RawError* Thread::StealStickyError() {
+  NoSafepointScope no_safepoint;
   RawError* return_value = sticky_error_;
   sticky_error_ = Error::null();
   return return_value;
@@ -334,6 +334,7 @@
     if (isolate->marking_stack() != NULL) {
       // Concurrent mark in progress. Enable barrier for this thread.
       thread->MarkingStackAcquire();
+      thread->DeferredMarkingStackAcquire();
     }
     return true;
   }
@@ -352,6 +353,7 @@
   thread->ClearReusableHandles();
   if (thread->is_marking()) {
     thread->MarkingStackRelease();
+    thread->DeferredMarkingStackRelease();
   }
   thread->StoreBufferRelease();
   if (isolate->is_runnable()) {
@@ -379,6 +381,7 @@
     if (isolate->marking_stack() != NULL) {
       // Concurrent mark in progress. Enable barrier for this thread.
       thread->MarkingStackAcquire();
+      thread->DeferredMarkingStackAcquire();
     }
     // This thread should not be the main mutator.
     thread->task_kind_ = kind;
@@ -398,6 +401,7 @@
   thread->ClearReusableHandles();
   if (thread->is_marking()) {
     thread->MarkingStackRelease();
+    thread->DeferredMarkingStackRelease();
   }
   thread->StoreBufferRelease();
   Isolate* isolate = thread->isolate();
@@ -552,11 +556,10 @@
             "\tisolate:    %s\n",
             isolate()->name());
       }
-      Thread* thread = Thread::Current();
-      const Error& error = Error::Handle(thread->sticky_error());
-      ASSERT(!error.IsNull() && error.IsUnwindError());
-      thread->clear_sticky_error();
-      return error.raw();
+      NoSafepointScope no_safepoint;
+      RawError* error = Thread::Current()->StealStickyError();
+      ASSERT(error->IsUnwindError());
+      return error;
     }
   }
   return Error::null();
@@ -602,6 +605,11 @@
   MarkingStackAcquire();
 }
 
+void Thread::DeferredMarkingStackBlockProcess() {
+  DeferredMarkingStackRelease();
+  DeferredMarkingStackAcquire();
+}
+
 void Thread::MarkingStackAddObject(RawObject* obj) {
   marking_stack_block_->Push(obj);
   if (marking_stack_block_->IsFull()) {
@@ -609,6 +617,13 @@
   }
 }
 
+void Thread::DeferredMarkingStackAddObject(RawObject* obj) {
+  deferred_marking_stack_block_->Push(obj);
+  if (deferred_marking_stack_block_->IsFull()) {
+    DeferredMarkingStackBlockProcess();
+  }
+}
+
 void Thread::MarkingStackRelease() {
   MarkingStackBlock* block = marking_stack_block_;
   marking_stack_block_ = NULL;
@@ -622,6 +637,17 @@
       RawObject::kGenerationalBarrierMask | RawObject::kIncrementalBarrierMask;
 }
 
+void Thread::DeferredMarkingStackRelease() {
+  MarkingStackBlock* block = deferred_marking_stack_block_;
+  deferred_marking_stack_block_ = NULL;
+  isolate()->deferred_marking_stack()->PushBlock(block);
+}
+
+void Thread::DeferredMarkingStackAcquire() {
+  deferred_marking_stack_block_ =
+      isolate()->deferred_marking_stack()->PopEmptyBlock();
+}
+
 bool Thread::IsMutatorThread() const {
   return ((isolate_ != NULL) && (isolate_->mutator_thread() == this));
 }
@@ -690,15 +716,15 @@
   // Only the mutator thread can run Dart code.
   if (IsMutatorThread()) {
     // The MarkTask, which calls this method, can run on a different thread.  We
-    // therefore assume the mutator is at a safepoint and we can iterate it's
+    // therefore assume the mutator is at a safepoint and we can iterate its
     // stack.
     // TODO(vm-team): It would be beneficial to be able to ask the mutator
     // thread whether it is in fact blocked at the moment (at a "safepoint") so
-    // we can safely iterate it's stack.
+    // we can safely iterate its stack.
     //
     // Unfortunately we cannot use `this->IsAtSafepoint()` here because that
     // will return `false` even though the mutator thread is waiting for mark
-    // tasks (which iterate it's stack) to finish.
+    // tasks (which iterate its stack) to finish.
     const StackFrameIterator::CrossThreadPolicy cross_thread_policy =
         StackFrameIterator::kAllowCrossThreadIteration;
 
@@ -804,6 +830,40 @@
   return -1;
 }
 
+#if defined(DEBUG)
+bool Thread::TopErrorHandlerIsSetJump() const {
+  if (long_jump_base_ == nullptr) return false;
+  if (top_exit_frame_info_ == 0) return true;
+#if defined(USING_SIMULATOR) || defined(USING_SAFE_STACK)
+  // False positives: simulator stack and native stack are unordered.
+  return true;
+#else
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  // False positives: interpreter stack and native stack are unordered.
+  if ((interpreter_ != nullptr) && interpreter_->HasFrame(top_exit_frame_info_))
+    return true;
+#endif
+  return reinterpret_cast<uword>(long_jump_base_) < top_exit_frame_info_;
+#endif
+}
+
+bool Thread::TopErrorHandlerIsExitFrame() const {
+  if (top_exit_frame_info_ == 0) return false;
+  if (long_jump_base_ == nullptr) return true;
+#if defined(USING_SIMULATOR) || defined(USING_SAFE_STACK)
+  // False positives: simulator stack and native stack are unordered.
+  return true;
+#else
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  // False positives: interpreter stack and native stack are unordered.
+  if ((interpreter_ != nullptr) && interpreter_->HasFrame(top_exit_frame_info_))
+    return true;
+#endif
+  return top_exit_frame_info_ < reinterpret_cast<uword>(long_jump_base_);
+#endif
+}
+#endif  // defined(DEBUG)
+
 bool Thread::IsValidHandle(Dart_Handle object) const {
   return IsValidLocalHandle(object) || IsValidZoneHandle(object) ||
          IsValidScopedHandle(object);
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 5b0ab13..9cd5fb5 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -48,6 +48,7 @@
 class RawCode;
 class RawError;
 class RawGrowableObjectArray;
+class RawObjectPool;
 class RawStackTrace;
 class RawString;
 class RuntimeEntry;
@@ -121,7 +122,8 @@
 #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)
+  V(RawBool*, bool_false_, Object::bool_false().raw(), NULL)                   \
+  V(RawObjectPool*, global_object_pool_, ObjectPool::null(), NULL)
 
 // List of VM-global objects/addresses cached in each Thread object.
 // Important: constant false must immediately follow constant true.
@@ -437,7 +439,9 @@
 
   bool is_marking() const { return marking_stack_block_ != NULL; }
   void MarkingStackAddObject(RawObject* obj);
+  void DeferredMarkingStackAddObject(RawObject* obj);
   void MarkingStackBlockProcess();
+  void DeferredMarkingStackBlockProcess();
   static intptr_t marking_stack_block_offset() {
     return OFFSET_OF(Thread, marking_stack_block_);
   }
@@ -550,6 +554,11 @@
   LEAF_RUNTIME_ENTRY_LIST(DEFINE_OFFSET_METHOD)
 #undef DEFINE_OFFSET_METHOD
 
+  RawObjectPool* global_object_pool() const { return global_object_pool_; }
+  void set_global_object_pool(RawObjectPool* raw_value) {
+    global_object_pool_ = raw_value;
+  }
+
   static bool CanLoadFromThread(const Object& object);
   static intptr_t OffsetFromThread(const Object& object);
   static bool ObjectAtOffset(intptr_t offset, Object* object);
@@ -558,6 +567,13 @@
   LongJumpScope* long_jump_base() const { return long_jump_base_; }
   void set_long_jump_base(LongJumpScope* value) { long_jump_base_ = value; }
 
+#if defined(DEBUG)
+  // For asserts only. Has false positives when running with a simulator or
+  // SafeStack.
+  bool TopErrorHandlerIsSetJump() const;
+  bool TopErrorHandlerIsExitFrame() const;
+#endif
+
   uword vm_tag() const { return vm_tag_; }
   void set_vm_tag(uword tag) { vm_tag_ = tag; }
   static intptr_t vm_tag_offset() { return OFFSET_OF(Thread, vm_tag_); }
@@ -593,8 +609,8 @@
 
   RawError* sticky_error() const;
   void set_sticky_error(const Error& value);
-  void clear_sticky_error();
-  RawError* get_and_clear_sticky_error();
+  void ClearStickyError();
+  DART_WARN_UNUSED_RESULT RawError* StealStickyError();
 
   RawStackTrace* async_stack_trace() const;
   void set_async_stack_trace(const StackTrace& stack_trace);
@@ -811,6 +827,7 @@
   uword top_exit_frame_info_;
   StoreBufferBlock* store_buffer_block_;
   MarkingStackBlock* marking_stack_block_;
+  MarkingStackBlock* deferred_marking_stack_block_;
   uword vm_tag_;
   RawStackTrace* async_stack_trace_;
   // Memory location dedicated for passing unboxed int64 values from
@@ -919,6 +936,8 @@
 
   void MarkingStackRelease();
   void MarkingStackAcquire();
+  void DeferredMarkingStackRelease();
+  void DeferredMarkingStackAcquire();
 
   void set_zone(Zone* zone) { zone_ = zone; }
 
diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
index bb02973..a390528 100644
--- a/runtime/vm/thread_registry.cc
+++ b/runtime/vm/thread_registry.cc
@@ -99,6 +99,7 @@
   while (thread != NULL) {
     if (!thread->BypassSafepoints()) {
       thread->MarkingStackAcquire();
+      thread->DeferredMarkingStackAcquire();
     }
     thread = thread->next_;
   }
@@ -110,6 +111,7 @@
   while (thread != NULL) {
     if (!thread->BypassSafepoints()) {
       thread->MarkingStackRelease();
+      thread->DeferredMarkingStackRelease();
     }
     thread = thread->next_;
   }
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 48df459..d71628e 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -419,7 +419,7 @@
       while (true) {
         for (intptr_t cnt = 0; cnt < 0x1000; cnt++) {
           for (intptr_t i = 0; i < len_; i++) {
-            ic_data ^= ic_datas_.At(i);
+            ic_data ^= ic_datas_.AtAcquire(i);
             arr = ic_data.ic_data();
             intptr_t num_checks = arr.Length() / 3;
             if (num_checks < 0 || num_checks > 5) {
@@ -492,7 +492,7 @@
     ic_data = ICData::New(owner, name, args_desc, /*deopt_id=*/0,
                           /*num_args_tested=*/1, ICData::kInstance,
                           Object::null_abstract_type());
-    ic_datas.SetAt(i, ic_data);
+    ic_datas.SetAtRelease(i, ic_data);
   }
 
   for (int i = 0; i < ICDataTestTask::kTaskCount; i++) {
@@ -510,7 +510,7 @@
         ic_data = ICData::New(owner, name, args_desc, /*deopt_id=*/0,
                               /*num_args_tested=*/1, ICData::kInstance,
                               Object::null_abstract_type());
-        ic_datas.SetAt(i, ic_data);
+        ic_datas.SetAtRelease(i, ic_data);
       }
     }
   }
diff --git a/runtime/vm/token.h b/runtime/vm/token.h
index adb0fba..ff8c682 100644
--- a/runtime/vm/token.h
+++ b/runtime/vm/token.h
@@ -322,6 +322,32 @@
     }
   }
 
+  // For a comparison operation return an operation for the equivalent flipped
+  // comparison: a (op) b === b (op') a.
+  static Token::Kind FlipComparison(Token::Kind op) {
+    switch (op) {
+      case Token::kEQ:
+        return Token::kEQ;
+      case Token::kNE:
+        return Token::kNE;
+      case Token::kLT:
+        return Token::kGT;
+      case Token::kGT:
+        return Token::kLT;
+      case Token::kLTE:
+        return Token::kGTE;
+      case Token::kGTE:
+        return Token::kLTE;
+      case Token::kEQ_STRICT:
+        return Token::kEQ_STRICT;
+      case Token::kNE_STRICT:
+        return Token::kNE_STRICT;
+      default:
+        UNREACHABLE();
+        return Token::kILLEGAL;
+    }
+  }
+
  private:
   static const char* name_[];
   static const char* tok_str_[];
diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc
index ae8855e..c38fd76 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -117,7 +117,6 @@
     return should_specialize ? StubCode::LazySpecializeTypeTest().instructions()
                              : StubCode::DefaultTypeTest().instructions();
   } else {
-    ASSERT(type.IsBoundedType() || type.IsMixinAppType());
     return StubCode::UnreachableTypeTest().instructions();
   }
 }
@@ -346,9 +345,11 @@
   BuildOptimizedTypeTestStub(&assembler, hi, type, type_class);
 
   const char* name = namer_.StubNameForType(type);
+  const auto pool_attachment = FLAG_use_bare_instructions
+                                   ? Code::PoolAttachment::kNotAttachPool
+                                   : Code::PoolAttachment::kAttachPool;
   const Code& code = Code::Handle(Code::FinalizeCode(
-      name, nullptr, &assembler, Code::PoolAttachment::kAttachPool,
-      false /* optimized */));
+      name, nullptr, &assembler, pool_attachment, false /* optimized */));
 #ifndef PRODUCT
   if (FLAG_support_disassembler && FLAG_disassemble_stubs) {
     LogBlock lb;
@@ -400,7 +401,7 @@
     const CidRangeVector& ranges = hi->SubtypeRangesForClass(type_class);
 
     const Type& int_type = Type::Handle(Type::IntType());
-    const bool smi_is_ok = int_type.IsSubtypeOf(type, NULL, NULL, Heap::kNew);
+    const bool smi_is_ok = int_type.IsSubtypeOf(type, Heap::kNew);
 
     BuildOptimizedSubtypeRangeCheck(assembler, ranges, class_id_reg,
                                     instance_reg, smi_is_ok);
@@ -636,8 +637,8 @@
         //
         // We use the declaration type arguments for the instance creation,
         // which is a non-instantiated, expanded, type arguments vector.
-        const AbstractType& declaration_type =
-            AbstractType::Handle(instance_klass.DeclarationType());
+        const Type& declaration_type =
+            Type::Handle(instance_klass.DeclarationType());
         TypeArguments& declaration_type_args =
             TypeArguments::Handle(declaration_type.arguments());
         type_usage_info->UseTypeArgumentsInInstanceCreation(
@@ -650,12 +651,12 @@
     // where we forward the type argument vector to object allocation.
     //
     // Theoretically this could be a false-positive, which is still ok, but
-    // practically it's guranteed that this is a forward of a type argument
+    // practically it's guaranteed that this is a forward of a type argument
     // vector passed in by the caller.
     if (function.IsFactory()) {
       const Class& enclosing_class = Class::Handle(function.Owner());
-      const AbstractType& declaration_type =
-          AbstractType::Handle(enclosing_class.DeclarationType());
+      const Type& declaration_type =
+          Type::Handle(enclosing_class.DeclarationType());
       TypeArguments& declaration_type_args =
           TypeArguments::Handle(declaration_type.arguments());
       type_usage_info->UseTypeArgumentsInInstanceCreation(
diff --git a/runtime/vm/type_testing_stubs.h b/runtime/vm/type_testing_stubs.h
index b1dac5a..423b4d7 100644
--- a/runtime/vm/type_testing_stubs.h
+++ b/runtime/vm/type_testing_stubs.h
@@ -10,6 +10,8 @@
 
 namespace dart {
 
+class ObjectPoolWrapper;
+
 class TypeTestingStubNamer {
  public:
   TypeTestingStubNamer();
@@ -266,9 +268,6 @@
         }
       }
       return true;
-    } else if (type.IsBoundedType()) {
-      // No support for bounded types.
-      return false;
     }
     UNREACHABLE();
     return false;
diff --git a/runtime/vm/unicode.cc b/runtime/vm/unicode.cc
index e051320..a3b4fb9 100644
--- a/runtime/vm/unicode.cc
+++ b/runtime/vm/unicode.cc
@@ -280,6 +280,31 @@
   *dst = ch;
   return i;
 }
+intptr_t Utf8::ReportInvalidByte(const uint8_t* utf8_array,
+                                 intptr_t array_len,
+                                 intptr_t len) {
+  intptr_t i = 0;
+  intptr_t j = 0;
+  intptr_t num_bytes;
+  for (; (i < array_len) && (j < len); i += num_bytes, ++j) {
+    int32_t ch;
+    bool is_supplementary = IsSupplementarySequenceStart(utf8_array[i]);
+    num_bytes = Utf8::Decode(&utf8_array[i], (array_len - i), &ch);
+    if (ch == -1) {
+      break;  // Invalid input.
+    }
+    if (is_supplementary) {
+      j = j + 1;
+    }
+  }
+  OS::PrintErr("Invalid UTF8 sequence encountered, ");
+  for (intptr_t idx = 0; idx < 10 && (i + idx) < array_len; idx++) {
+    OS::PrintErr("(Error Code: %X + idx: %" Pd " )", utf8_array[idx + i],
+                 (idx + i));
+  }
+  OS::PrintErr("\n");
+  return i;
+}
 
 bool Utf8::DecodeToLatin1(const uint8_t* utf8_array,
                           intptr_t array_len,
diff --git a/runtime/vm/unicode.h b/runtime/vm/unicode.h
index 23b64b7..d2050be 100644
--- a/runtime/vm/unicode.h
+++ b/runtime/vm/unicode.h
@@ -74,6 +74,9 @@
                             intptr_t array_len,
                             int32_t* dst,
                             intptr_t len);
+  static intptr_t ReportInvalidByte(const uint8_t* utf8_array,
+                                    intptr_t array_len,
+                                    intptr_t len);
   static bool DecodeCStringToUTF32(const char* str, int32_t* dst, intptr_t len);
 
   static const int32_t kMaxOneByteChar = 0x7F;
diff --git a/runtime/vm/unicode_test.cc b/runtime/vm/unicode_test.cc
index b8807f1..bfd4f0a 100644
--- a/runtime/vm/unicode_test.cc
+++ b/runtime/vm/unicode_test.cc
@@ -27,6 +27,40 @@
   }
 }
 
+ISOLATE_UNIT_TEST_CASE(Utf8InvalidByte) {
+  {
+    uint8_t array[] = {0x41, 0xF0, 0x92};
+    intptr_t encode_len = 3;
+    intptr_t decode_len = 3;
+    intptr_t pos = Utf8::ReportInvalidByte(array, encode_len, decode_len);
+    EXPECT(pos == 1);
+  }
+
+  {
+    uint8_t array[] = {0x81, 0x40, 0x42};
+    intptr_t encode_len = 3;
+    intptr_t decode_len = 3;
+    intptr_t pos = Utf8::ReportInvalidByte(array, encode_len, decode_len);
+    EXPECT(pos == 0);
+  }
+
+  {
+    uint8_t array[] = {0x42, 0x40, 0x80};
+    intptr_t encode_len = 3;
+    intptr_t decode_len = 3;
+    intptr_t pos = Utf8::ReportInvalidByte(array, encode_len, decode_len);
+    EXPECT(pos == 2);
+  }
+
+  {
+    uint8_t array[] = {0x41, 0xF0, 0x92, 0x92, 0x91};
+    intptr_t encode_len = 5;
+    intptr_t decode_len = 2;
+    intptr_t pos = Utf8::ReportInvalidByte(array, encode_len, decode_len);
+    EXPECT(pos == encode_len);
+  }
+}
+
 ISOLATE_UNIT_TEST_CASE(Utf8Decode) {
   // Examples from the Unicode specification, chapter 3
   {
diff --git a/runtime/vm/vm_sources.gni b/runtime/vm/vm_sources.gni
index a9b02fc..593b76d 100644
--- a/runtime/vm/vm_sources.gni
+++ b/runtime/vm/vm_sources.gni
@@ -239,6 +239,8 @@
   "resolver.cc",
   "resolver.h",
   "reusable_handles.h",
+  "reverse_pc_lookup_cache.cc",
+  "reverse_pc_lookup_cache.h",
   "ring_buffer.h",
   "runtime_entry.cc",
   "runtime_entry.h",
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 1de45ab..ec27270 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -35,7 +35,6 @@
 # ......dart2js
 # ......dartanalyzer
 # ......dartdevc
-# ......dartdevk
 # ......pub
 # ......snapshots/
 # ........analysis_server.dart.snapshot
@@ -44,7 +43,6 @@
 # ........dartdoc.dart.snapshot
 # ........dartfmt.dart.snapshot
 # ........dartdevc.dart.snapshot
-# ........dartdevk.dart.snapshot
 # ........kernel_worker.dart.snapshot
 # ........pub.dart.snapshot
 #.........resources/
@@ -93,7 +91,6 @@
   "dart2js",
   "dartanalyzer",
   "dartdevc",
-  "dartdevk",
   "dartfmt",
   "pub",
 ]
@@ -151,10 +148,6 @@
     "../utils/dartdevc",
   ],
   [
-    "dartdevk",
-    "../utils/dartdevc:dartdevk",
-  ],
-  [
     "dartdoc",
     "../utils/dartdoc",
   ],
@@ -523,7 +516,7 @@
   deps = [
     ":copy_libraries",
     "../utils/dartdevc:dartdevc_sdk",
-    "../utils/dartdevc:dartdevk_sdk",
+    "../utils/dartdevc:dartdevc_kernel_sdk",
   ]
   gen_dir = get_label_info("../utils/dartdevc:dartdevc_sdk", "target_gen_dir")
   sources = [
@@ -610,9 +603,9 @@
 copy("copy_dev_compiler_js_amd_kernel") {
   visibility = [ ":copy_dev_compiler_js" ]
   deps = [
-    "../utils/dartdevc:dartdevk_sdk",
+    "../utils/dartdevc:dartdevc_kernel_sdk",
   ]
-  gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
+  gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
                            "target_gen_dir")
   sources = [
     "$gen_dir/kernel/amd/dart_sdk.js",
@@ -628,9 +621,9 @@
 copy("copy_dev_compiler_js_common_kernel") {
   visibility = [ ":copy_dev_compiler_js" ]
   deps = [
-    "../utils/dartdevc:dartdevk_sdk",
+    "../utils/dartdevc:dartdevc_kernel_sdk",
   ]
-  gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
+  gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
                            "target_gen_dir")
   sources = [
     "$gen_dir/kernel/common/dart_sdk.js",
@@ -646,9 +639,9 @@
 copy("copy_dev_compiler_js_es6_kernel") {
   visibility = [ ":copy_dev_compiler_js" ]
   deps = [
-    "../utils/dartdevc:dartdevk_sdk",
+    "../utils/dartdevc:dartdevc_kernel_sdk",
   ]
-  gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
+  gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
                            "target_gen_dir")
   sources = [
     "$gen_dir/kernel/es6/dart_sdk.js",
@@ -663,9 +656,9 @@
 copy("copy_dev_compiler_js_legacy_kernel") {
   visibility = [ ":copy_dev_compiler_js" ]
   deps = [
-    "../utils/dartdevc:dartdevk_sdk",
+    "../utils/dartdevc:dartdevc_kernel_sdk",
   ]
-  gen_dir = get_label_info("../utils/dartdevc:dartdevk_sdk",
+  gen_dir = get_label_info("../utils/dartdevc:dartdevc_kernel_sdk",
                            "target_gen_dir")
   sources = [
     "$gen_dir/kernel/legacy/dart_sdk.js",
diff --git a/sdk/bin/dartdevk b/sdk/bin/dartdevk
deleted file mode 100755
index f6111dc..0000000
--- a/sdk/bin/dartdevk
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Run dev compiler using the common front-end on the Dart VM. This script
-# assumes the Dart repo's directory structure.
-
-function follow_links() {
-  file="$1"
-  while [ -h "$file" ]; do
-    # On Mac OS, readlink -f doesn't work.
-    file="$(readlink "$file")"
-  done
-  echo "$file"
-}
-
-# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
-PROG_NAME="$(follow_links "$BASH_SOURCE")"
-
-# Handle the case where dart-sdk/bin has been symlinked to.
-BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
-SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)"
-
-DART="$BIN_DIR/dart"
-
-unset EXTRA_VM_OPTIONS
-declare -a EXTRA_VM_OPTIONS
-
-case $0 in
-  *_developer)
-    EXTRA_VM_OPTIONS+=('--checked')
-    ;;
-esac
-
-# We allow extra vm options to be passed in through an environment variable.
-if [[ $DART_VM_OPTIONS ]]; then
-  read -a OPTIONS <<< "$DART_VM_OPTIONS"
-  EXTRA_VM_OPTIONS+=("${OPTIONS[@]}")
-fi
-
-DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
-
-DEV_COMPILER="$DART_ROOT/pkg/dev_compiler/bin/dartdevk.dart"
-
-exec "$DART" "--packages=$DART_ROOT/.packages" "${EXTRA_VM_OPTIONS[@]}" "$DEV_COMPILER" "$@"
diff --git a/sdk/bin/dartdevk.bat b/sdk/bin/dartdevk.bat
deleted file mode 100644
index 154162a..0000000
--- a/sdk/bin/dartdevk.bat
+++ /dev/null
@@ -1,64 +0,0 @@
-@echo off
-REM Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-REM for details. All rights reserved. Use of this source code is governed by a
-REM BSD-style license that can be found in the LICENSE file.
-
-setlocal
-rem Handle the case where dart-sdk/bin has been symlinked to.
-set DIR_NAME_WITH_SLASH=%~dp0
-set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
-call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
-rem Get rid of surrounding quotes.
-for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
-
-set DART=%BIN_DIR%\dart
-
-rem Get absolute full name for SDK_DIR.
-for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
-
-rem Remove trailing backslash if there is one
-if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
-
-set EXTRA_VM_OPTIONS=
-
-rem We allow extra vm options to be passed in through an environment variable.
-if not "_%DART_VM_OPTIONS%_" == "__" (
-  set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% %DART_VM_OPTIONS%
-)
-
-rem Get absolute full name for DART_ROOT.
-for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi
-
-rem Remove trailing backslash if there is one
-if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
-
-set DEV_COMPILER=%DART_ROOT%\pkg\dev_compiler\bin\dartdevk.dart
-
-"%DART%" "--packages=%DART_ROOT%\.packages" %EXTRA_VM_OPTIONS% "%DEV_COMPILER%" %*
-
-endlocal
-
-exit /b %errorlevel%
-
-rem Follow the symbolic links (junctions points) using `dir to determine the
-rem canonical path. Output with a link looks something like this
-rem
-rem 01/03/2013  10:11 PM    <JUNCTION>     abc def
-rem [c:\dart_bleeding\dart-repo.9\dart\out\ReleaseIA32\dart-sdk]
-rem
-rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename
-rem surrounded by right angle bracket and left square bracket. Once we get
-rem the filename, which is name of the link, we recursively follow that.
-:follow_links
-setlocal
-for %%i in (%1) do set result=%%~fi
-set current=
-for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
-                                             ^| find ">     %~n1 [" 2^>nul`) do (
-  set current=%%i
-)
-if not "%current%"=="" call :follow_links "%current%", result
-endlocal & set %~2=%result%
-goto :eof
-
-:end
diff --git a/sdk/bin/dartdevk_sdk b/sdk/bin/dartdevk_sdk
deleted file mode 100755
index 9917871..0000000
--- a/sdk/bin/dartdevk_sdk
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Run dev compiler using the common front-end on the Dart VM. This script
-# assumes the Dart SDK's directory structure.
-
-function follow_links() {
-  file="$1"
-  while [ -h "$file" ]; do
-    # On Mac OS, readlink -f doesn't work.
-    file="$(readlink "$file")"
-  done
-  echo "$file"
-}
-
-# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
-PROG_NAME="$(follow_links "$BASH_SOURCE")"
-
-# Handle the case where dart-sdk/bin has been symlinked to.
-BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
-
-SNAPSHOT="$BIN_DIR/snapshots/dartdevk.dart.snapshot"
-
-# We are running the snapshot in the built SDK.
-DART="$BIN_DIR/dart"
-exec "$DART" "$SNAPSHOT" "$@"
diff --git a/sdk/bin/dartdevk_sdk.bat b/sdk/bin/dartdevk_sdk.bat
deleted file mode 100644
index 8e490ef..0000000
--- a/sdk/bin/dartdevk_sdk.bat
+++ /dev/null
@@ -1,50 +0,0 @@
-@echo off
-REM Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-REM for details. All rights reserved. Use of this source code is governed by a
-REM BSD-style license that can be found in the LICENSE file.
-
-setlocal
-rem Handle the case where dart-sdk/bin has been symlinked to.
-set DIR_NAME_WITH_SLASH=%~dp0
-set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
-call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
-rem Get rid of surrounding quotes.
-for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
-
-set DART=%BIN_DIR%\dart
-set SNAPSHOT=%BIN_DIR%\snapshots\dartdevk.dart.snapshot
-
-rem Get absolute full name for SDK_DIR.
-for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
-
-rem Remove trailing backslash if there is one
-if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
-
-"%DART%" "%SNAPSHOT%" "--packages=%SDK_DIR%\..\..\..\.packages" %*
-
-endlocal
-
-exit /b %errorlevel%
-
-rem Follow the symbolic links (junctions points) using `dir to determine the
-rem canonical path. Output with a link looks something like this
-rem
-rem 01/03/2013  10:11 PM    <JUNCTION>     abc def
-rem [c:\dart_bleeding\dart-repo.9\dart\out\ReleaseIA32\dart-sdk]
-rem
-rem So in the output of 'dir /a:l "targetdir"' we are looking for a filename
-rem surrounded by right angle bracket and left square bracket. Once we get
-rem the filename, which is name of the link, we recursively follow that.
-:follow_links
-setlocal
-for %%i in (%1) do set result=%%~fi
-set current=
-for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
-                                             ^| find ">     %~n1 ["`) do (
-  set current=%%i
-)
-if not "%current%"=="" call :follow_links "%current%", result
-endlocal & set %~2=%result%
-goto :eof
-
-:end
diff --git a/sdk/lib/_http/http.dart b/sdk/lib/_http/http.dart
index 1021892..393045f 100644
--- a/sdk/lib/_http/http.dart
+++ b/sdk/lib/_http/http.dart
@@ -1166,7 +1166,7 @@
  * that contains the content of and information about an HTTP request.
  *
  * __Note__: Check out the
- * [http_server](http://pub.dartlang.org/packages/http_server)
+ * [http_server](https://pub.dartlang.org/packages/http_server)
  * package, which makes working with the low-level
  * dart:io HTTP server subsystem easier.
  *
diff --git a/sdk/lib/_http/http_impl.dart b/sdk/lib/_http/http_impl.dart
index 018a8ea..80a5589 100644
--- a/sdk/lib/_http/http_impl.dart
+++ b/sdk/lib/_http/http_impl.dart
@@ -2110,6 +2110,10 @@
   set findProxy(String f(Uri uri)) => _findProxy = f;
 
   Future<_HttpClientRequest> _openUrl(String method, Uri uri) {
+    if (_closing) {
+      throw new StateError("Client is closed");
+    }
+
     // Ignore any fragments on the request URI.
     uri = uri.removeFragment();
 
diff --git a/sdk/lib/_http/websocket_impl.dart b/sdk/lib/_http/websocket_impl.dart
index e27ab20..331a064 100644
--- a/sdk/lib/_http/websocket_impl.dart
+++ b/sdk/lib/_http/websocket_impl.dart
@@ -649,6 +649,15 @@
       result = result.sublist(0, result.length - 4);
     }
 
+    // RFC 7692 7.2.3.6. "Generating an Empty Fragment" says that if the
+    // compression library doesn't generate any data when the bufer is empty,
+    // then an empty uncompressed deflate block is used for this purpose. The
+    // 0x00 block has the BFINAL header bit set to 0 and the BTYPE header set to
+    // 00 along with 5 bits of padding. This block decodes to zero bytes.
+    if (result.length == 0) {
+      return [0x00];
+    }
+
     return result;
   }
 }
diff --git a/sdk/lib/_internal/js_runtime/lib/async_patch.dart b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
index 09b75af..87fab54 100644
--- a/sdk/lib/_internal/js_runtime/lib/async_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
@@ -229,13 +229,6 @@
   return new _AsyncAwaitCompleter<T>();
 }
 
-/// Creates a Completer for an `async` function.
-///
-/// Used as part of the runtime support for the async/await transformation.
-Completer<T> _makeSyncCompleter<T>() {
-  return new Completer<T>.sync();
-}
-
 /// Initiates the computation of an `async` function and starts the body
 /// synchronously.
 ///
@@ -251,19 +244,6 @@
   return completer.future;
 }
 
-/// Initiates the computation of an `async` function.
-///
-/// Used as part of the runtime support for the async/await transformation.
-///
-/// This function sets up the first call into the transformed [bodyFunction].
-/// Independently, it takes the [completer] and returns the future of the
-/// completer for convenience of the transformed code.
-dynamic _asyncStart(_WrappedAsyncBody bodyFunction, Completer completer) {
-  // TODO(sra): Specialize this implementation of `await null`.
-  _awaitOnObject(null, bodyFunction);
-  return completer.future;
-}
-
 /// Performs the `await` operation of an `async` function.
 ///
 /// Used as part of the runtime support for the async/await transformation.
diff --git a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
index c5d1177..7138c65 100644
--- a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
@@ -830,7 +830,7 @@
   factory HashSet.identity() = _IdentityHashSet<E>;
 }
 
-class _HashSet<E> extends _HashSetBase<E> implements HashSet<E> {
+class _HashSet<E> extends _SetBase<E> implements HashSet<E> {
   int _length = 0;
 
   // The hash set contents are divided into three parts: one part for
@@ -1239,7 +1239,7 @@
   factory LinkedHashSet.identity() = _LinkedIdentityHashSet<E>;
 }
 
-class _LinkedHashSet<E> extends _HashSetBase<E> implements LinkedHashSet<E> {
+class _LinkedHashSet<E> extends _SetBase<E> implements LinkedHashSet<E> {
   int _length = 0;
 
   // The hash set contents are divided into three parts: one part for
diff --git a/sdk/lib/_internal/js_runtime/lib/instantiation.dart b/sdk/lib/_internal/js_runtime/lib/instantiation.dart
new file mode 100644
index 0000000..0ed4974
--- /dev/null
+++ b/sdk/lib/_internal/js_runtime/lib/instantiation.dart
@@ -0,0 +1,330 @@
+// 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.
+
+part of _js_helper;
+
+/// 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.
+
+    // Mark support code as used.  The JS condition is inscrutable to dart2js,
+    // so the 'if (false)' is in the final program.
+    // TODO(sra): Find a better way to do this. Generating the signature methods
+    // earlier as SSA on the instantiation closures should achieve this.
+    if (JS('bool', 'false')) {
+      // [instantiatedGenericFunctionType] is called from injected $signature
+      // methods with runtime type representations.
+      instantiatedGenericFunctionType(JS('', '0'), JS('', '0'));
+    }
+  }
+
+  /// 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
+/// fixed number of 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];
+}
+
+class Instantiation4<T1, T2, T3, T4> extends Instantiation {
+  Instantiation4(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4];
+}
+
+class Instantiation5<T1, T2, T3, T4, T5> extends Instantiation {
+  Instantiation5(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5];
+}
+
+class Instantiation6<T1, T2, T3, T4, T5, T6> extends Instantiation {
+  Instantiation6(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6];
+}
+
+class Instantiation7<T1, T2, T3, T4, T5, T6, T7> extends Instantiation {
+  Instantiation7(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6, T7];
+}
+
+class Instantiation8<T1, T2, T3, T4, T5, T6, T7, T8> extends Instantiation {
+  Instantiation8(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8];
+}
+
+class Instantiation9<T1, T2, T3, T4, T5, T6, T7, T8, T9> extends Instantiation {
+  Instantiation9(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9];
+}
+
+class Instantiation10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
+    extends Instantiation {
+  Instantiation10(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10];
+}
+
+class Instantiation11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
+    extends Instantiation {
+  Instantiation11(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11];
+}
+
+class Instantiation12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
+    extends Instantiation {
+  Instantiation12(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12];
+}
+
+class Instantiation13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
+    extends Instantiation {
+  Instantiation13(Closure f) : super(f);
+  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13];
+}
+
+class Instantiation14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
+    T14> extends Instantiation {
+  Instantiation14(Closure f) : super(f);
+  List get _types =>
+      [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14];
+}
+
+class Instantiation15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
+    T14, T15> extends Instantiation {
+  Instantiation15(Closure f) : super(f);
+  List get _types =>
+      [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15];
+}
+
+class Instantiation16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
+    T14, T15, T16> extends Instantiation {
+  Instantiation16(Closure f) : super(f);
+  List get _types =>
+      [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16];
+}
+
+class Instantiation17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
+    T14, T15, T16, T17> extends Instantiation {
+  Instantiation17(Closure f) : super(f);
+  List get _types => [
+        T1,
+        T2,
+        T3,
+        T4,
+        T5,
+        T6,
+        T7,
+        T8,
+        T9,
+        T10,
+        T11,
+        T12,
+        T13,
+        T14,
+        T15,
+        T16,
+        T17
+      ];
+}
+
+class Instantiation18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
+    T14, T15, T16, T17, T18> extends Instantiation {
+  Instantiation18(Closure f) : super(f);
+  List get _types => [
+        T1,
+        T2,
+        T3,
+        T4,
+        T5,
+        T6,
+        T7,
+        T8,
+        T9,
+        T10,
+        T11,
+        T12,
+        T13,
+        T14,
+        T15,
+        T16,
+        T17,
+        T18
+      ];
+}
+
+class Instantiation19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
+    T14, T15, T16, T17, T18, T19> extends Instantiation {
+  Instantiation19(Closure f) : super(f);
+  List get _types => [
+        T1,
+        T2,
+        T3,
+        T4,
+        T5,
+        T6,
+        T7,
+        T8,
+        T9,
+        T10,
+        T11,
+        T12,
+        T13,
+        T14,
+        T15,
+        T16,
+        T17,
+        T18,
+        T19
+      ];
+}
+
+class Instantiation20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
+    T14, T15, T16, T17, T18, T19, T20> extends Instantiation {
+  Instantiation20(Closure f) : super(f);
+  List get _types => [
+        T1,
+        T2,
+        T3,
+        T4,
+        T5,
+        T6,
+        T7,
+        T8,
+        T9,
+        T10,
+        T11,
+        T12,
+        T13,
+        T14,
+        T15,
+        T16,
+        T17,
+        T18,
+        T19,
+        T20
+      ];
+}
+
+Instantiation instantiate1<T1>(Closure f) {
+  return new Instantiation1<T1>(f);
+}
+
+Instantiation instantiate2<T1, T2>(Closure f) {
+  return new Instantiation2<T1, T2>(f);
+}
+
+Instantiation instantiate3<T1, T2, T3>(Closure f) {
+  return new Instantiation3<T1, T2, T3>(f);
+}
+
+Instantiation instantiate4<T1, T2, T3, T4>(Closure f) {
+  return new Instantiation4<T1, T2, T3, T4>(f);
+}
+
+Instantiation instantiate5<T1, T2, T3, T4, T5>(Closure f) {
+  return new Instantiation5<T1, T2, T3, T4, T5>(f);
+}
+
+Instantiation instantiate6<T1, T2, T3, T4, T5, T6>(Closure f) {
+  return new Instantiation6<T1, T2, T3, T4, T5, T6>(f);
+}
+
+Instantiation instantiate7<T1, T2, T3, T4, T5, T6, T7>(Closure f) {
+  return new Instantiation7<T1, T2, T3, T4, T5, T6, T7>(f);
+}
+
+Instantiation instantiate8<T1, T2, T3, T4, T5, T6, T7, T8>(Closure f) {
+  return new Instantiation8<T1, T2, T3, T4, T5, T6, T7, T8>(f);
+}
+
+Instantiation instantiate9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Closure f) {
+  return new Instantiation9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(f);
+}
+
+Instantiation instantiate10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
+    Closure f) {
+  return new Instantiation10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(f);
+}
+
+Instantiation instantiate11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(
+    Closure f) {
+  return new Instantiation11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(f);
+}
+
+Instantiation instantiate12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(
+    Closure f) {
+  return new Instantiation12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(
+      f);
+}
+
+Instantiation
+    instantiate13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(
+        Closure f) {
+  return new Instantiation13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13>(f);
+}
+
+Instantiation
+    instantiate14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(
+        Closure f) {
+  return new Instantiation14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13, T14>(f);
+}
+
+Instantiation instantiate15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+    T13, T14, T15>(Closure f) {
+  return new Instantiation15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13, T14, T15>(f);
+}
+
+Instantiation instantiate16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+    T13, T14, T15, T16>(Closure f) {
+  return new Instantiation16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13, T14, T15, T16>(f);
+}
+
+Instantiation instantiate17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+    T13, T14, T15, T16, T17>(Closure f) {
+  return new Instantiation17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13, T14, T15, T16, T17>(f);
+}
+
+Instantiation instantiate18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+    T13, T14, T15, T16, T17, T18>(Closure f) {
+  return new Instantiation18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13, T14, T15, T16, T17, T18>(f);
+}
+
+Instantiation instantiate19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+    T13, T14, T15, T16, T17, T18, T19>(Closure f) {
+  return new Instantiation19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13, T14, T15, T16, T17, T18, T19>(f);
+}
+
+Instantiation instantiate20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+    T13, T14, T15, T16, T17, T18, T19, T20>(Closure f) {
+  return new Instantiation20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
+      T13, T14, T15, T16, T17, T18, T19, T20>(f);
+}
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 0f14426..3338e9d 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -57,6 +57,7 @@
 
 part 'annotations.dart';
 part 'constant_map.dart';
+part 'instantiation.dart';
 part 'native_helper.dart';
 part 'regexp_helper.dart';
 part 'string_helper.dart';
@@ -2904,331 +2905,6 @@
   }
 }
 
-/// 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.
-
-    // Mark support code as used.  The JS condition is inscrutable to dart2js,
-    // so the 'if (false)' is in the final program.
-    // TODO(sra): Find a better way to do this. Generating the signature methods
-    // earlier as SSA on the instantiation closures should achieve this.
-    if (JS('bool', 'false')) {
-      // [instantiatedGenericFunctionType] is called from injected $signature
-      // methods with runtime type representations.
-      instantiatedGenericFunctionType(JS('', '0'), JS('', '0'));
-    }
-  }
-
-  /// 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
-/// fixed number of 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];
-}
-
-class Instantiation4<T1, T2, T3, T4> extends Instantiation {
-  Instantiation4(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4];
-}
-
-class Instantiation5<T1, T2, T3, T4, T5> extends Instantiation {
-  Instantiation5(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5];
-}
-
-class Instantiation6<T1, T2, T3, T4, T5, T6> extends Instantiation {
-  Instantiation6(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6];
-}
-
-class Instantiation7<T1, T2, T3, T4, T5, T6, T7> extends Instantiation {
-  Instantiation7(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6, T7];
-}
-
-class Instantiation8<T1, T2, T3, T4, T5, T6, T7, T8> extends Instantiation {
-  Instantiation8(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8];
-}
-
-class Instantiation9<T1, T2, T3, T4, T5, T6, T7, T8, T9> extends Instantiation {
-  Instantiation9(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9];
-}
-
-class Instantiation10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
-    extends Instantiation {
-  Instantiation10(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10];
-}
-
-class Instantiation11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
-    extends Instantiation {
-  Instantiation11(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11];
-}
-
-class Instantiation12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
-    extends Instantiation {
-  Instantiation12(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12];
-}
-
-class Instantiation13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
-    extends Instantiation {
-  Instantiation13(Closure f) : super(f);
-  List get _types => [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13];
-}
-
-class Instantiation14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
-    T14> extends Instantiation {
-  Instantiation14(Closure f) : super(f);
-  List get _types =>
-      [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14];
-}
-
-class Instantiation15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
-    T14, T15> extends Instantiation {
-  Instantiation15(Closure f) : super(f);
-  List get _types =>
-      [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15];
-}
-
-class Instantiation16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
-    T14, T15, T16> extends Instantiation {
-  Instantiation16(Closure f) : super(f);
-  List get _types =>
-      [T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16];
-}
-
-class Instantiation17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
-    T14, T15, T16, T17> extends Instantiation {
-  Instantiation17(Closure f) : super(f);
-  List get _types => [
-        T1,
-        T2,
-        T3,
-        T4,
-        T5,
-        T6,
-        T7,
-        T8,
-        T9,
-        T10,
-        T11,
-        T12,
-        T13,
-        T14,
-        T15,
-        T16,
-        T17
-      ];
-}
-
-class Instantiation18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
-    T14, T15, T16, T17, T18> extends Instantiation {
-  Instantiation18(Closure f) : super(f);
-  List get _types => [
-        T1,
-        T2,
-        T3,
-        T4,
-        T5,
-        T6,
-        T7,
-        T8,
-        T9,
-        T10,
-        T11,
-        T12,
-        T13,
-        T14,
-        T15,
-        T16,
-        T17,
-        T18
-      ];
-}
-
-class Instantiation19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
-    T14, T15, T16, T17, T18, T19> extends Instantiation {
-  Instantiation19(Closure f) : super(f);
-  List get _types => [
-        T1,
-        T2,
-        T3,
-        T4,
-        T5,
-        T6,
-        T7,
-        T8,
-        T9,
-        T10,
-        T11,
-        T12,
-        T13,
-        T14,
-        T15,
-        T16,
-        T17,
-        T18,
-        T19
-      ];
-}
-
-class Instantiation20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
-    T14, T15, T16, T17, T18, T19, T20> extends Instantiation {
-  Instantiation20(Closure f) : super(f);
-  List get _types => [
-        T1,
-        T2,
-        T3,
-        T4,
-        T5,
-        T6,
-        T7,
-        T8,
-        T9,
-        T10,
-        T11,
-        T12,
-        T13,
-        T14,
-        T15,
-        T16,
-        T17,
-        T18,
-        T19,
-        T20
-      ];
-}
-
-Instantiation instantiate1<T1>(Closure f) {
-  return new Instantiation1<T1>(f);
-}
-
-Instantiation instantiate2<T1, T2>(Closure f) {
-  return new Instantiation2<T1, T2>(f);
-}
-
-Instantiation instantiate3<T1, T2, T3>(Closure f) {
-  return new Instantiation3<T1, T2, T3>(f);
-}
-
-Instantiation instantiate4<T1, T2, T3, T4>(Closure f) {
-  return new Instantiation4<T1, T2, T3, T4>(f);
-}
-
-Instantiation instantiate5<T1, T2, T3, T4, T5>(Closure f) {
-  return new Instantiation5<T1, T2, T3, T4, T5>(f);
-}
-
-Instantiation instantiate6<T1, T2, T3, T4, T5, T6>(Closure f) {
-  return new Instantiation6<T1, T2, T3, T4, T5, T6>(f);
-}
-
-Instantiation instantiate7<T1, T2, T3, T4, T5, T6, T7>(Closure f) {
-  return new Instantiation7<T1, T2, T3, T4, T5, T6, T7>(f);
-}
-
-Instantiation instantiate8<T1, T2, T3, T4, T5, T6, T7, T8>(Closure f) {
-  return new Instantiation8<T1, T2, T3, T4, T5, T6, T7, T8>(f);
-}
-
-Instantiation instantiate9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Closure f) {
-  return new Instantiation9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(f);
-}
-
-Instantiation instantiate10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
-    Closure f) {
-  return new Instantiation10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(f);
-}
-
-Instantiation instantiate11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(
-    Closure f) {
-  return new Instantiation11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(f);
-}
-
-Instantiation instantiate12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(
-    Closure f) {
-  return new Instantiation12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(
-      f);
-}
-
-Instantiation
-    instantiate13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(
-        Closure f) {
-  return new Instantiation13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13>(f);
-}
-
-Instantiation
-    instantiate14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(
-        Closure f) {
-  return new Instantiation14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13, T14>(f);
-}
-
-Instantiation instantiate15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-    T13, T14, T15>(Closure f) {
-  return new Instantiation15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13, T14, T15>(f);
-}
-
-Instantiation instantiate16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-    T13, T14, T15, T16>(Closure f) {
-  return new Instantiation16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13, T14, T15, T16>(f);
-}
-
-Instantiation instantiate17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-    T13, T14, T15, T16, T17>(Closure f) {
-  return new Instantiation17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13, T14, T15, T16, T17>(f);
-}
-
-Instantiation instantiate18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-    T13, T14, T15, T16, T17, T18>(Closure f) {
-  return new Instantiation18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13, T14, T15, T16, T17, T18>(f);
-}
-
-Instantiation instantiate19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-    T13, T14, T15, T16, T17, T18, T19>(Closure f) {
-  return new Instantiation19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13, T14, T15, T16, T17, T18, T19>(f);
-}
-
-Instantiation instantiate20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-    T13, T14, T15, T16, T17, T18, T19, T20>(Closure f) {
-  return new Instantiation20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
-      T13, T14, T15, T16, T17, T18, T19, T20>(f);
-}
-
 bool jsHasOwnProperty(var jsObject, String property) {
   return JS('bool', r'#.hasOwnProperty(#)', jsObject, property);
 }
diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart
index 8f3f715..d93e550 100644
--- a/sdk/lib/collection/hash_set.dart
+++ b/sdk/lib/collection/hash_set.dart
@@ -4,37 +4,6 @@
 
 part of dart.collection;
 
-/** Common parts of [HashSet] and [LinkedHashSet] implementations. */
-abstract class _HashSetBase<E> extends SetBase<E> {
-  // The following two methods override the ones in SetBase.
-  // It's possible to be more efficient if we have a way to create an empty
-  // set of the correct type.
-
-  Set<E> _newSet();
-
-  Set<R> _newSimilarSet<R>();
-
-  Set<R> cast<R>() => Set.castFrom<E, R>(this, newSet: _newSimilarSet);
-  Set<E> difference(Set<Object> other) {
-    Set<E> result = _newSet();
-    for (var element in this) {
-      if (!other.contains(element)) result.add(element);
-    }
-    return result;
-  }
-
-  Set<E> intersection(Set<Object> other) {
-    Set<E> result = _newSet();
-    for (var element in this) {
-      if (other.contains(element)) result.add(element);
-    }
-    return result;
-  }
-
-  // Subclasses can optimize this further.
-  Set<E> toSet() => _newSet()..addAll(this);
-}
-
 /**
  * An unordered hash-table based [Set] implementation.
  *
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart
index c63bf30..4f21b77 100644
--- a/sdk/lib/collection/set.dart
+++ b/sdk/lib/collection/set.dart
@@ -181,13 +181,13 @@
     StringBuffer buffer = new StringBuffer();
     if (separator == null || separator == "") {
       do {
-        buffer.write("${iterator.current}");
+        buffer.write(iterator.current);
       } while (iterator.moveNext());
     } else {
-      buffer.write("${iterator.current}");
+      buffer.write(iterator.current);
       while (iterator.moveNext()) {
         buffer.write(separator);
-        buffer.write("${iterator.current}");
+        buffer.write(iterator.current);
       }
     }
     return buffer.toString();
@@ -304,7 +304,7 @@
  * `clear` in constant time. The default implementation works by removing every
  * element.
  */
-abstract class SetBase<E> extends SetMixin<E> {
+abstract class SetBase<E> extends Object with SetMixin<E> {
   /**
    * Convert a `Set` to a string as `{each, element, as, string}`.
    *
@@ -314,3 +314,325 @@
   static String setToString(Set set) =>
       IterableBase.iterableToFullString(set, '{', '}');
 }
+
+/** Common internal implementation of some [Set] methods. */
+// TODO(35548): Make this mix-in SetMixin, by adding `with SetMixin<E>`
+// and removing the copied members below,
+// when analyzer supports const constructors for mixin applications.
+abstract class _SetBase<E> implements Set<E> {
+  // The following two methods override the ones in SetBase.
+  // It's possible to be more efficient if we have a way to create an empty
+  // set of the correct type.
+  const _SetBase();
+
+  Set<E> _newSet();
+
+  Set<R> _newSimilarSet<R>();
+
+  Set<R> cast<R>() => Set.castFrom<E, R>(this, newSet: _newSimilarSet);
+
+  Set<E> difference(Set<Object> other) {
+    Set<E> result = _newSet();
+    for (var element in this) {
+      if (!other.contains(element)) result.add(element);
+    }
+    return result;
+  }
+
+  Set<E> intersection(Set<Object> other) {
+    Set<E> result = _newSet();
+    for (var element in this) {
+      if (other.contains(element)) result.add(element);
+    }
+    return result;
+  }
+
+  // Subclasses can optimize this further.
+  Set<E> toSet() => _newSet()..addAll(this);
+
+  /// TODO(35548): Remove the following declarations again when the analyzer
+  /// supports mixins with const constructors, and mix in `SetMixin` instead.
+
+  bool get isEmpty => length == 0;
+
+  bool get isNotEmpty => length != 0;
+
+  Iterable<E> followedBy(Iterable<E> other) =>
+      new FollowedByIterable<E>.firstEfficient(this, other);
+
+  Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);
+
+  void clear() {
+    removeAll(toList());
+  }
+
+  void addAll(Iterable<E> elements) {
+    for (E element in elements) add(element);
+  }
+
+  void removeAll(Iterable<Object> elements) {
+    for (Object element in elements) remove(element);
+  }
+
+  void retainAll(Iterable<Object> elements) {
+    // Create a copy of the set, remove all of elements from the copy,
+    // then remove all remaining elements in copy from this.
+    Set<E> toRemove = toSet();
+    for (Object o in elements) {
+      toRemove.remove(o);
+    }
+    removeAll(toRemove);
+  }
+
+  void removeWhere(bool test(E element)) {
+    List toRemove = [];
+    for (E element in this) {
+      if (test(element)) toRemove.add(element);
+    }
+    removeAll(toRemove);
+  }
+
+  void retainWhere(bool test(E element)) {
+    List toRemove = [];
+    for (E element in this) {
+      if (!test(element)) toRemove.add(element);
+    }
+    removeAll(toRemove);
+  }
+
+  bool containsAll(Iterable<Object> other) {
+    for (Object o in other) {
+      if (!contains(o)) return false;
+    }
+    return true;
+  }
+
+  Set<E> union(Set<E> other) {
+    return toSet()..addAll(other);
+  }
+
+  List<E> toList({bool growable: true}) {
+    List<E> result = growable ? (<E>[]..length = length) : new List<E>(length);
+    int i = 0;
+    for (E element in this) result[i++] = element;
+    return result;
+  }
+
+  Iterable<T> map<T>(T f(E element)) =>
+      new EfficientLengthMappedIterable<E, T>(this, f);
+
+  E get single {
+    if (length > 1) throw IterableElementError.tooMany();
+    Iterator<E> it = iterator;
+    if (!it.moveNext()) throw IterableElementError.noElement();
+    E result = it.current;
+    return result;
+  }
+
+  String toString() => IterableBase.iterableToFullString(this, '{', '}');
+
+  Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f);
+
+  Iterable<T> expand<T>(Iterable<T> f(E element)) =>
+      new ExpandIterable<E, T>(this, f);
+
+  void forEach(void f(E element)) {
+    for (E element in this) f(element);
+  }
+
+  E reduce(E combine(E value, E element)) {
+    Iterator<E> iterator = this.iterator;
+    if (!iterator.moveNext()) {
+      throw IterableElementError.noElement();
+    }
+    E value = iterator.current;
+    while (iterator.moveNext()) {
+      value = combine(value, iterator.current);
+    }
+    return value;
+  }
+
+  T fold<T>(T initialValue, T combine(T previousValue, E element)) {
+    var value = initialValue;
+    for (E element in this) value = combine(value, element);
+    return value;
+  }
+
+  bool every(bool f(E element)) {
+    for (E element in this) {
+      if (!f(element)) return false;
+    }
+    return true;
+  }
+
+  String join([String separator = ""]) {
+    Iterator<E> iterator = this.iterator;
+    if (!iterator.moveNext()) return "";
+    StringBuffer buffer = new StringBuffer();
+    if (separator == null || separator == "") {
+      do {
+        buffer.write(iterator.current);
+      } while (iterator.moveNext());
+    } else {
+      buffer.write(iterator.current);
+      while (iterator.moveNext()) {
+        buffer.write(separator);
+        buffer.write(iterator.current);
+      }
+    }
+    return buffer.toString();
+  }
+
+  bool any(bool test(E element)) {
+    for (E element in this) {
+      if (test(element)) return true;
+    }
+    return false;
+  }
+
+  Iterable<E> take(int n) {
+    return new TakeIterable<E>(this, n);
+  }
+
+  Iterable<E> takeWhile(bool test(E value)) {
+    return new TakeWhileIterable<E>(this, test);
+  }
+
+  Iterable<E> skip(int n) {
+    return new SkipIterable<E>(this, n);
+  }
+
+  Iterable<E> skipWhile(bool test(E value)) {
+    return new SkipWhileIterable<E>(this, test);
+  }
+
+  E get first {
+    Iterator<E> it = iterator;
+    if (!it.moveNext()) {
+      throw IterableElementError.noElement();
+    }
+    return it.current;
+  }
+
+  E get last {
+    Iterator<E> it = iterator;
+    if (!it.moveNext()) {
+      throw IterableElementError.noElement();
+    }
+    E result;
+    do {
+      result = it.current;
+    } while (it.moveNext());
+    return result;
+  }
+
+  E firstWhere(bool test(E value), {E orElse()}) {
+    for (E element in this) {
+      if (test(element)) return element;
+    }
+    if (orElse != null) return orElse();
+    throw IterableElementError.noElement();
+  }
+
+  E lastWhere(bool test(E value), {E orElse()}) {
+    E result;
+    bool foundMatching = false;
+    for (E element in this) {
+      if (test(element)) {
+        result = element;
+        foundMatching = true;
+      }
+    }
+    if (foundMatching) return result;
+    if (orElse != null) return orElse();
+    throw IterableElementError.noElement();
+  }
+
+  E singleWhere(bool test(E value), {E orElse()}) {
+    E result;
+    bool foundMatching = false;
+    for (E element in this) {
+      if (test(element)) {
+        if (foundMatching) {
+          throw IterableElementError.tooMany();
+        }
+        result = element;
+        foundMatching = true;
+      }
+    }
+    if (foundMatching) return result;
+    if (orElse != null) return orElse();
+    throw IterableElementError.noElement();
+  }
+
+  E elementAt(int index) {
+    ArgumentError.checkNotNull(index, "index");
+    RangeError.checkNotNegative(index, "index");
+    int elementIndex = 0;
+    for (E element in this) {
+      if (index == elementIndex) return element;
+      elementIndex++;
+    }
+    throw new RangeError.index(index, this, "index", null, elementIndex);
+  }
+}
+
+/** Class used to implement const sets. */
+class _UnmodifiableSet<E> extends _SetBase<E> {
+  final Map<E, Null> _map;
+
+  const _UnmodifiableSet(this._map);
+
+  Set<E> _newSet() => LinkedHashSet<E>();
+
+  Set<R> _newSimilarSet<R>() => LinkedHashSet<R>();
+
+  // Lookups use map methods.
+
+  bool contains(Object element) => _map.containsKey(element);
+
+  Iterator<E> get iterator => _map.keys.iterator;
+
+  int get length => _map.length;
+
+  E lookup(Object element) {
+    for (var key in _map.keys) {
+      if (key == element) return key;
+    }
+    return null;
+  }
+
+  // Mutating methods throw.
+
+  bool add(E value) {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+
+  void clear() {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+
+  void addAll(Iterable<E> elements) {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+
+  void removeAll(Iterable<Object> elements) {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+
+  void retainAll(Iterable<Object> elements) {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+
+  void removeWhere(bool test(E element)) {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+
+  void retainWhere(bool test(E element)) {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+
+  bool remove(Object value) {
+    throw UnsupportedError("Cannot change unmodifiable set");
+  }
+}
diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart
index c541c66..1f46d11 100644
--- a/sdk/lib/core/date_time.dart
+++ b/sdk/lib/core/date_time.dart
@@ -117,7 +117,7 @@
  *
  * The DateTime class does not provide internationalization.
  * To internationalize your code, use
- * the [intl](http://pub.dartlang.org/packages/intl) package.
+ * the [intl](https://pub.dartlang.org/packages/intl) package.
  *
  */
 class DateTime implements Comparable<DateTime> {
@@ -552,7 +552,7 @@
    * The returned string is constructed for the time zone of this instance.
    * The `toString()` method provides a simply formatted string.
    * It does not support internationalized strings.
-   * Use the [intl](http://pub.dartlang.org/packages/intl) package
+   * Use the [intl](https://pub.dartlang.org/packages/intl) package
    * at the pub shared packages repo.
    *
    * The resulting string can be parsed back using [parse].
diff --git a/sdk/lib/core/int.dart b/sdk/lib/core/int.dart
index 6964269..69b3eae 100644
--- a/sdk/lib/core/int.dart
+++ b/sdk/lib/core/int.dart
@@ -346,8 +346,8 @@
   /**
    * Parse [source] as a, possibly signed, integer literal and return its value.
    *
-   * Like [parse] except that this function returns `null` for invalid inputs
-   * instead of throwing.
+   * Like [parse] except that this function returns `null` where a
+   * similar call to [parse] would throw a [FormatException].
    */
   external static int tryParse(String source, {int radix});
 }
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index 78f82ab..7b477df 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -180,8 +180,16 @@
   /**
    * If an object equal to [object] is in the set, return it.
    *
-   * Checks if there is an object in the set that is equal to [object].
-   * If so, that object is returned, otherwise returns null.
+   * Checks whether [object] is in the set, like [contains], and if so,
+   * returns the object in the set, otherwise returns `null`.
+   *
+   * If the equality relation used by the set is not identity,
+   * then the returned object may not be *identical* to [object].
+   * Some set implementations may not be able to implement this method.
+   * If the [contains] method is computed,
+   * rather than being based on an actual object instance,
+   * then there may not be a specific object instance representing the
+   * set element.
    */
   E lookup(Object object);
 
diff --git a/sdk/lib/io/embedder_config.dart b/sdk/lib/io/embedder_config.dart
index 89265cf..cbc94f7 100644
--- a/sdk/lib/io/embedder_config.dart
+++ b/sdk/lib/io/embedder_config.dart
@@ -11,6 +11,7 @@
 /// permitted to use (e.g. exit()). By default, the whole dart:io API is
 /// enabled. When a disallowed operation is attempted, an `UnsupportedError` is
 /// thrown.
+@pragma('vm:entry-point')
 abstract class _EmbedderConfig {
   /// The Isolate may set Directory.current.
   static bool _mayChdir = true;
@@ -20,12 +21,15 @@
   static bool _mayExit = true;
 
   // The Isolate may set Stdin.echoMode.
+  @pragma('vm:entry-point')
   static bool _maySetEchoMode = true;
 
   // The Isolate may set Stdin.lineMode.
+  @pragma('vm:entry-point')
   static bool _maySetLineMode = true;
 
   /// The Isolate may call sleep().
+  @pragma('vm:entry-point')
   static bool _maySleep = true;
 
   // TODO(zra): Consider adding:
diff --git a/sdk/lib/libraries.json b/sdk/lib/libraries.json
index 3265de2..db0bf0c 100644
--- a/sdk/lib/libraries.json
+++ b/sdk/lib/libraries.json
@@ -342,8 +342,8 @@
       },
       "isolate": {
         "patches": "../../pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart",
-        "uri": "isolate/isolate.dart",
-        "supported": false
+        "supported": false,
+        "uri": "isolate/isolate.dart"
       },
       "web_gl": {
         "uri": "web_gl/dart2js/web_gl_dart2js.dart"
diff --git a/sdk/lib/libraries.yaml b/sdk/lib/libraries.yaml
index e7da30f..e2d0f7c 100644
--- a/sdk/lib/libraries.yaml
+++ b/sdk/lib/libraries.yaml
@@ -411,6 +411,7 @@
       isolate:
         uri: "isolate/isolate.dart"
         patches: "../../pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart"
+        supported: false
 
       mirrors:
         uri: "mirrors/mirrors.dart"
diff --git a/tests/co19_2/co19_2-analyzer.status b/tests/co19_2/co19_2-analyzer.status
index a13758c..9de243e 100644
--- a/tests/co19_2/co19_2-analyzer.status
+++ b/tests/co19_2/co19_2-analyzer.status
@@ -119,8 +119,6 @@
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l1_t04: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t03: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t04: CompileTimeError # Please triage this failure
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t07: CompileTimeError # Please triage this failure
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t08: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l3_t02: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/01: MissingCompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/02: MissingCompileTimeError # Please triage this failure
@@ -132,10 +130,11 @@
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t03/none: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t04/none: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t05/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t07/none: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/none: CompileTimeError # Please triage this failure
+LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t09/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_l3_t02/none: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/class/static/class_l4_t01/none: CompileTimeError # Please triage this failure
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_FutureOr_l1_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t02/none: CompileTimeError # Please triage this failure
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/01: MissingCompileTimeError # Please triage this failure
@@ -174,37 +173,72 @@
 LanguageFeatures/Set-literals/non_constant_set_literals_A01_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/non_constant_set_literals_A02_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/semantics_A04_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/semantics_A05_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/set_literals_A01_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/set_literals_A02_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/set_literals_A04_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Simple-bounds/dynamic/class_typedef_l1_t02: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t01/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t02/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t03/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t05: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t06: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t07: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_FutureOr_l1_t02: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_l1_t07: CompileTimeError
+LanguageFeatures/Set-literals/syntax_compatibility_A01_t01: CompileTimeError # This feature is not implemented yet
+LanguageFeatures/Simple-bounds/static/typedef_FutureOr_l1_t02/none: CompileTimeError
+LanguageFeatures/Simple-bounds/static/typedef_l1_t07/none: CompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_l2_t02/none: CompileTimeError # Please triage this failure
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t06/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t07/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t08/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t09: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t10: MissingCompileTimeError
 LanguageFeatures/Super-bounded-types/static_analysis_A01_t02: CompileTimeError # Issue 32903
 LanguageFeatures/Super-bounded-types/static_analysis_A01_t05: CompileTimeError # Issue 32903
 LanguageFeatures/Super-bounded-types/static_analysis_A01_t08: CompileTimeError # Issue 32903
 LanguageFeatures/Super-mixins/covariance_t03: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t06: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t07: MissingCompileTimeError # Issue 35111
-LanguageFeatures/Super-mixins/super_invocation_t19: CompileTimeError # Issue 35090
-LanguageFeatures/regression/33585_t01: MissingCompileTimeError # Please triage this failure
-LanguageFeatures/regression/33585_t02: MissingCompileTimeError # Please triage this failure
 LanguageFeatures/regression/33597_t01: MissingCompileTimeError # Please triage this failure
 LanguageFeatures/regression/33701_t02: CompileTimeError # Please triage this failure
 LanguageFeatures/regression/34635_t01: CompileTimeError # Please triage this failure
 LanguageFeatures/regression/34635_t02: CompileTimeError # Please triage this failure
 LanguageFeatures/regression/34635_t03: CompileTimeError # Please triage this failure
 LibTest/async/Future/Future_A01_t01: CompileTimeError # Please triage this failure
+
+[ $compiler == dart2analyzer && $system != macos && $system != windows ]
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t08: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t10: MissingCompileTimeError
+LanguageFeatures/Simple-bounds/static/class_typedef_l1_t02/none: CompileTimeError
+LanguageFeatures/regression/33585_t01: MissingCompileTimeError # Please triage this failure
+LanguageFeatures/regression/33585_t02: MissingCompileTimeError # Please triage this failure
+
+[ $compiler == dart2analyzer && ($system == macos || $system == windows) ]
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t03/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t02/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t06/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t07/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t02/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t04/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t12: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t13: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t01/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t03/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t05: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t10: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t11: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t05: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t02/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t03/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/02: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/05: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/06: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/07: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t06/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/02: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/05: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/06: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/07: MissingCompileTimeError
+LanguageFeatures/Set-literals/semantics_A05_t01: CompileTimeError
+LanguageFeatures/Set-literals/syntax_compatibility_A01_t02: CompileTimeError
diff --git a/tests/co19_2/co19_2-dart2js.status b/tests/co19_2/co19_2-dart2js.status
index 6843d27..a5c9730 100644
--- a/tests/co19_2/co19_2-dart2js.status
+++ b/tests/co19_2/co19_2-dart2js.status
@@ -3,8092 +3,14 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == dart2js ]
-Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError
-Language/Expressions/Assignment/null_aware_assignment_static_type_t01: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t03: RuntimeError
-Language/Expressions/Booleans/Boolean_Conversion/definition_t01: RuntimeError
-Language/Expressions/Constants/literal_number_t01: CompileTimeError
-Language/Expressions/Constants/math_operators_t01: CompileTimeError
-Language/Expressions/Constants/math_operators_t06: CompileTimeError
-Language/Expressions/Function_Invocation/async_invokation_t02: RuntimeError
-Language/Expressions/Instance_Creation/New/evaluation_t19: RuntimeError
-Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError
-Language/Expressions/Numbers/integer_size_t03: CompileTimeError
-Language/Expressions/Numbers/static_type_of_int_t01: CompileTimeError
-Language/Expressions/Object_Identity/constant_objects_t01: RuntimeError
-Language/Expressions/Object_Identity/double_t03: RuntimeError
-Language/Expressions/Object_Identity/object_t02: RuntimeError
-Language/Expressions/Shift/integer_t01: CompileTimeError
 Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
-Language/Functions/External_Functions/not_connected_to_a_body_t01: CompileTimeError
-Language/Libraries_and_Scripts/Parts/compilation_t03: RuntimeError
-Language/Libraries_and_Scripts/Parts/compilation_t05: RuntimeError
-Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: CompileTimeError
-Language/Metadata/before_class_t01: RuntimeError
-Language/Metadata/before_ctor_t01: RuntimeError
-Language/Metadata/before_export_t01: RuntimeError
-Language/Metadata/before_factory_t01: RuntimeError
-Language/Metadata/before_function_t05: RuntimeError
-Language/Metadata/before_function_t06: RuntimeError
-Language/Metadata/before_library_t01: RuntimeError
-Language/Metadata/before_param_t01: RuntimeError
-Language/Metadata/before_param_t02: RuntimeError
-Language/Metadata/before_param_t04: RuntimeError
-Language/Metadata/before_param_t06: RuntimeError
-Language/Metadata/before_param_t08: RuntimeError
-Language/Metadata/before_type_param_t01: RuntimeError
-Language/Metadata/before_typedef_t01: RuntimeError
-Language/Metadata/before_variable_t01: RuntimeError
-Language/Statements/Assert/execution_t03: RuntimeError
-Language/Statements/Assert/execution_t08: RuntimeError
-Language/Statements/Assert/execution_t11: RuntimeError
-Language/Statements/Do/execution_t06: RuntimeError
-Language/Statements/For/For_Loop/execution_t11: RuntimeError
-Language/Statements/For/For_in/execution_t02: RuntimeError
-Language/Statements/If/condition_evaluation_t02: RuntimeError
-Language/Statements/If/condition_evaluation_t03: RuntimeError
-Language/Statements/While/execution_t02: RuntimeError
-Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t02: RuntimeError
-Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_sync_t05: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t01: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t04: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t12: RuntimeError
-Language/Types/Function_Types/subtype_no_args_t04: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t03: RuntimeError
-Language/Types/Function_Types/subtype_required_args_t01: RuntimeError
-Language/Types/Function_Types/subtype_required_args_t02: RuntimeError
-Language/Types/Interface_Types/subtype_t02: RuntimeError
-Language/Types/Interface_Types/subtype_t03: RuntimeError
-Language/Types/Interface_Types/subtype_t17: RuntimeError
-Language/Types/Interface_Types/subtype_t22: RuntimeError
-Language/Types/Interface_Types/subtype_t26: RuntimeError
-Language/Types/Interface_Types/subtype_t27: Pass, Crash # Issue 34389
-Language/Types/Type_Declarations/Typedef/dynamic_param_type_t02: RuntimeError
-Language/Variables/constant_initialization_t03: RuntimeError
-LanguageFeatures/Constant_update2018/CastOperator_A01_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/CastOperator_A02_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/CastOperator_A02_t02: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/CastOperator_A03_t01/none: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/CastOperator_A03_t02/none: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A01_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A01_t02: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A02_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A02_t02: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A02_t04: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A02_t05: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A02_t07: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/NewOperators_A02_t08: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t02: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t03: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t03: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t05: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t02: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t02: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t02: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t03/none: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t04/none: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Instantiate-to-bound/FutureOr/dynamic/FutureOr_l1_t01: RuntimeError
-LanguageFeatures/Instantiate-to-bound/FutureOr/dynamic/FutureOr_l1_t02: RuntimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t02: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t03: Crash
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t04: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t07: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t08: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l3_t02: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_typedef_l1_t02: RuntimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t03/01: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t03/02: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t03/none: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t04/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t07/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l3_t02/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t04/none: Crash, Pass
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_FutureOr_l1_t02: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_FutureOr_l1_t05: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l1_t05: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l1_t07: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t01: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t06: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t07: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t08: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t09: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t10: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t11: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t12: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t13: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t14: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t15: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t16: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t20: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t21: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t07/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_t01/none: CompileTimeError
-LanguageFeatures/Set-literals/constant_set_literals_A02_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/constant_set_literals_A03_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/constant_set_literals_A04_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/exact_types_of_literals_A01_t03: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/non_constant_set_literals_A01_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/non_constant_set_literals_A02_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/semantics_A04_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/semantics_A05_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/semantics_A05_t02: RuntimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/set_literals_A01_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/set_literals_A02_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Set-literals/set_literals_A04_t01: CompileTimeError # This feature is not implemented yet
-LanguageFeatures/Simple-bounds/dynamic/FutureOr_l1_t01: RuntimeError, Pass
-LanguageFeatures/Simple-bounds/dynamic/class_FutureOr_l1_t02: CompileTimeError
-LanguageFeatures/Simple-bounds/dynamic/class_typedef_l1_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_FutureOr_l1_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t07: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l2_t01: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t01: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t03: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t07: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t08: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t10: RuntimeError
-LanguageFeatures/Simple-bounds/static/class_FutureOr_l1_t02: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t03: CompileTimeError, Pass
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_global_variable_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_global_variable_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A31_t01: RuntimeError
-LanguageFeatures/Super-mixins/mixin_member_t06: RuntimeError
-LanguageFeatures/regression/33585_t01: MissingCompileTimeError
-LanguageFeatures/regression/33585_t02: MissingCompileTimeError
-LanguageFeatures/regression/33597_t01: MissingCompileTimeError
-LanguageFeatures/regression/33701_t01: MissingCompileTimeError
-LanguageFeatures/regression/34635_t01: CompileTimeError
-LanguageFeatures/regression/34635_t02: CompileTimeError
-LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError
-LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError
-LayoutTests/fast/alignment/parse-justify-self_t01: RuntimeError
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.gradient_t01: RuntimeError, Timeout
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.veryLarge_t01: RuntimeError
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.verySmall_t01: RuntimeError
-LayoutTests/fast/canvas/alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-clipping_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-color-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-color-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-color-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-fill-style_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-currentTransform_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-empty-image-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-large-crash_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-largeNonintegralDimensions_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-large-dimensions_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-large-fills_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lineDash-input-sequence_t01: RuntimeError
-LayoutTests/fast/canvas/draw-custom-focus-ring_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/bad-arguments-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-t01: RuntimeError
-LayoutTests/fast/canvas/webgl/draw-arrays-out-of-bounds_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/drawingbuffer-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/error-reporting_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/framebuffer-object-attachment_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/functions-returning-strings_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-verifies-too-many-indices_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/null-object-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/null-uniform-location_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/object-deletion-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgb565_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-uniform-binding-bugs_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texImage2DImageDataTest_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/triangle_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/uniform-location_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-depth-texture_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-large-texture_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-element-events_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-transition_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/auto-content-resolution-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/display-grid-set-get_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-and-minmax-content-resolution-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-container-change-explicit-grid-recompute-child_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-empty-row-column_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-min-max-height_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-padding-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-shrink-to-fit_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-bad-resolution-double-span_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-display_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-lr_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/implicit-rows-auto-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/minmax-fixed-logical-width-only_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-resolution-grid-item_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/css-tables_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-absolutes_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/tables_t01: RuntimeError
-LayoutTests/fast/css/aspect-ratio-parsing-tests_t01: RuntimeError
-LayoutTests/fast/css/checked-pseudo-selector_t01: RuntimeError
-LayoutTests/fast/css/comment-before-charset-external_t01: RuntimeError
-LayoutTests/fast/css/content/content-normal_t01: RuntimeError
-LayoutTests/fast/css/css-escaped-identifier_t01: RuntimeError
-LayoutTests/fast/css/css3-nth-tokens-style_t01: RuntimeError
-LayoutTests/fast/css/deprecated-flexbox-auto-min-size_t01: RuntimeError
-LayoutTests/fast/css/first-child-display-change-inverse_t01: RuntimeError
-LayoutTests/fast/css/fontfaceset-loadingdone_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-font_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-clip_t01: RuntimeError
-LayoutTests/fast/css/id-or-class-before-stylesheet_t01: RuntimeError
-LayoutTests/fast/css/inherit-initial-shorthand-values_t01: RuntimeError
-LayoutTests/fast/css/invalid-hex-color_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-shadow-combinator_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-2_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-3_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-4_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-5_t01: RuntimeError
-LayoutTests/fast/css/link-disabled-attr-parser_t01: RuntimeError
-LayoutTests/fast/css/max-device-aspect-ratio_t01: RuntimeError
-LayoutTests/fast/css/min-device-aspect-ratio_t01: RuntimeError
-LayoutTests/fast/css/parsing-at-rule-recovery_t01: RuntimeError
-LayoutTests/fast/css/parsing-css-allowed-string-characters_t01: RuntimeError
-LayoutTests/fast/css/parsing-selector-error-recovery_t01: RuntimeError
-LayoutTests/fast/css/percent-width-img-src-change_t01: Timeout, Pass
-LayoutTests/fast/css/readonly-pseudoclass-opera-001_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-002_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-nested_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-link_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-second-alternate-link_t01: RuntimeError
-LayoutTests/fast/css/webkit-keyframes-errors_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify_t01: RuntimeError
-LayoutTests/fast/dom/52776_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/basic_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport_t01: RuntimeError
-LayoutTests/fast/dom/Document/createElementNS-namespace-err_t01: RuntimeError
-LayoutTests/fast/dom/Document/document-title-get_t01: RuntimeError
-LayoutTests/fast/dom/Element/setAttributeNS-namespace-err_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-autofocus_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unfocusable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/non-anchored-dialog-positioning_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/show-modal-focusing-steps_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-inner-outer-optimization_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/spellcheck_t01: RuntimeError
-LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-loading-gc_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-existent-and-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/resolve-url-on-insertion_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/async-inline-script_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/script-load-events_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLTemplateElement/custom-element-wrapper-gc_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/ownerDocumentXHTML_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-childList_t01: RuntimeError
-LayoutTests/fast/dom/Node/fragment-mutation_t01: RuntimeError
-LayoutTests/fast/dom/Node/initial-values_t01: RuntimeError
-LayoutTests/fast/dom/Range/insertNode-empty-fragment-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/mutation_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-constructor_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-expand_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-separate-endContainer_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/css-medialist-item_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/discarded-sheet-owner-null_t01: RuntimeError
-LayoutTests/fast/dom/Window/window-resize-contents_t01: RuntimeError
-LayoutTests/fast/dom/Window/window-resize_t01: RuntimeError
-LayoutTests/fast/dom/Window/window-scroll-arguments_t01: RuntimeError
-LayoutTests/fast/dom/attribute-namespaces-get-set_t01: RuntimeError
-LayoutTests/fast/dom/client-width-height-quirks_t01: RuntimeError
-LayoutTests/fast/dom/custom/document-register-basic_t01: RuntimeError
-LayoutTests/fast/dom/custom/document-register-svg-extends_t01: RuntimeError
-LayoutTests/fast/dom/custom/element-names_t01: RuntimeError
-LayoutTests/fast/dom/dataset-xhtml_t01: RuntimeError
-LayoutTests/fast/dom/dataset_t01: RuntimeError
-LayoutTests/fast/dom/document-importNode-arguments_t01: RuntimeError
-LayoutTests/fast/dom/image-object_t01: RuntimeError
-LayoutTests/fast/dom/option-properties_t01: RuntimeError
-LayoutTests/fast/dom/shadow/distribution-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/distribution-update-recalcs-style_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-list-menu-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/nested-reprojection-inconsistent_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-enabled-optgroup_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-enabled-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-aware-shadow-root_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-element-inactive_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-js-api_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowdom-for-input-spellcheck_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowroot-clonenode_t01: RuntimeError
-LayoutTests/fast/dom/shadow/style-sharing-styles-in-older-shadow-roots_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-quote_t01: RuntimeError
-LayoutTests/fast/dynamic/insertAdjacentElement_t01: RuntimeError
-LayoutTests/fast/dynamic/recursive-layout_t01: RuntimeError
-LayoutTests/fast/events/add-event-without-document_t01: RuntimeError
-LayoutTests/fast/events/clipboard-clearData_t01: RuntimeError
-LayoutTests/fast/events/clipboard-dataTransferItemList_t01: RuntimeError
-LayoutTests/fast/events/div-focus_t01: RuntimeError, Pass
-LayoutTests/fast/events/event-attributes-after-exception_t01: RuntimeError
-LayoutTests/fast/events/event-trace_t01: RuntimeError
-LayoutTests/fast/events/invalid-001_t01: RuntimeError
-LayoutTests/fast/events/invalid-004_t01: RuntimeError
-LayoutTests/fast/events/invalid-005_t01: RuntimeError
-LayoutTests/fast/events/mutation-during-replace-child-2_t01: RuntimeError
-LayoutTests/fast/events/nested-event-remove-node-crash_t01: RuntimeError
-LayoutTests/fast/events/xhr-onclick-crash_t01: RuntimeError
-LayoutTests/fast/exclusions/parsing/parsing-wrap-flow_t01: RuntimeError
-LayoutTests/fast/files/blob-close-revoke_t01: RuntimeError
-LayoutTests/fast/files/blob-parts-slice-test_t01: CompileTimeError
-LayoutTests/fast/files/blob-slice-overflow_t01: CompileTimeError
-LayoutTests/fast/files/blob-slice-test_t01: CompileTimeError
-LayoutTests/fast/files/xhr-response-blob_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-abort_t01: RuntimeError
-LayoutTests/fast/flexbox/flexing-overflow-scroll-item_t01: RuntimeError
-LayoutTests/fast/flexbox/intrinsic-min-width-applies-with-fixed-width_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-001_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-002_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-003_t01: RuntimeError
-LayoutTests/fast/forms/clone-input-with-dirty-value_t01: RuntimeError
-LayoutTests/fast/forms/datalist/datalist_t01: RuntimeError
-LayoutTests/fast/forms/date/input-valueasdate-date_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/ValidityState-typeMismatch-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/file/file-input-capture_t01: RuntimeError
-LayoutTests/fast/forms/form-attribute_t01: RuntimeError
-LayoutTests/fast/forms/input-width-height-attributes-without-renderer-loaded-image_t01: RuntimeError
-LayoutTests/fast/forms/menulist-disabled-selected-option_t01: RuntimeError
-LayoutTests/fast/forms/menulist-selection-reset_t01: RuntimeError
-LayoutTests/fast/forms/multiple-selected-options-innerHTML_t01: RuntimeError
-LayoutTests/fast/forms/search-popup-crasher_t01: RuntimeError
-LayoutTests/fast/forms/setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/submit-form-attributes_t01: RuntimeError
-LayoutTests/fast/forms/submit-nil-value-field-assert_t01: RuntimeError
-LayoutTests/fast/forms/textarea-maxlength_t01: RuntimeError
-LayoutTests/fast/html/imports/import-element-removed-flag_t01: RuntimeError
-LayoutTests/fast/html/imports/import-events_t01: RuntimeError
-LayoutTests/fast/inline/empty-inline-before-collapsed-space_t01: RuntimeError
-LayoutTests/fast/inline/inline-with-empty-inline-children_t01: RuntimeError
-LayoutTests/fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline_t01: RuntimeError
-LayoutTests/fast/lists/list-style-position-inside_t01: RuntimeError
-LayoutTests/fast/loader/scroll-position-restored-on-reload-at-load-event_t01: RuntimeError
-LayoutTests/fast/multicol/break-properties_t01: RuntimeError
-LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
-LayoutTests/fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-above-or-below_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-end-of-column-with-line-height_t01: RuntimeError
-LayoutTests/fast/parser/foster-parent-adopted_t02: RuntimeError
-LayoutTests/fast/parser/innerhtml-with-prefixed-elements_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-height-text-controls_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-lengths_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-diamond-margin-polygon_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-left_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-margin-right_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-right_t01: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-uses-voice_t01: RuntimeError, Timeout
-LayoutTests/fast/speechsynthesis/speech-synthesis-voices_t01: RuntimeError
-LayoutTests/fast/storage/disallowed-storage_t01: RuntimeError
-LayoutTests/fast/sub-pixel/cssom-subpixel-precision_t01: RuntimeError
-LayoutTests/fast/table/anonymous-table-section-removed_t01: RuntimeError
-LayoutTests/fast/table/caption-orthogonal-writing-mode-sizing_t01: RuntimeError
-LayoutTests/fast/table/css-table-max-width_t01: RuntimeError
-LayoutTests/fast/table/large-shrink-wrapped-width_t01: RuntimeError
-LayoutTests/fast/table/min-width-css-inline-table_t01: RuntimeError
-LayoutTests/fast/table/min-width-html-block-table_t01: RuntimeError
-LayoutTests/fast/table/min-width-html-inline-table_t01: RuntimeError
-LayoutTests/fast/table/padding-height-and-override-height_t01: RuntimeError
-LayoutTests/fast/table/table-cell-offset-width_t01: RuntimeError
-LayoutTests/fast/text/international/thai-offsetForPosition-inside-character_t01: RuntimeError
-LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
-LayoutTests/fast/text/line-break-after-question-mark_t01: RuntimeError
-LayoutTests/fast/text/remove-zero-length-run_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-pixel_t01: RuntimeError
-LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError
-LayoutTests/fast/url/host_t01: RuntimeError
-LayoutTests/fast/url/relative-unix_t01: RuntimeError
-LayoutTests/fast/url/segments-from-data-url_t01: RuntimeError
-LayoutTests/fast/url/trivial-segments_t01: RuntimeError
-LayoutTests/fast/url/trivial_t01: RuntimeError
-LayoutTests/fast/writing-mode/auto-sizing-orthogonal-flows_t01: RuntimeError
-LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow-scroll_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-invalid-xml_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-document-responsetype_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-arraybuffer_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-document_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/cz_20030217_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/namespace-nodes_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_core_functions_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_core_functions_t02: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t01: RuntimeError
-LayoutTests/fast/xpath/attr-namespace_t02: RuntimeError
-LayoutTests/fast/xpath/node-name-case-sensitivity_t01: RuntimeError
-LayoutTests/fast/xpath/position_t01: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/abbreviations_t01: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/axes_t01: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/data_t01: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/paths_t01: RuntimeError
-LayoutTests/fast/xpath/reverse-axes_t01: RuntimeError
-LibTest/async/Future/Future_A01_t01: CompileTimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t03: RuntimeError
-LibTest/async/Stream/Stream.periodic_A02_t01: RuntimeError
-LibTest/async/Stream/Stream.periodic_A03_t01: RuntimeError
-LibTest/async/StreamController/StreamController_A03_t03: RuntimeError
-LibTest/async/StreamController/stream_A02_t02: RuntimeError
-LibTest/async/StreamController/stream_A03_t03: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t04: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer_A01_t02: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer_A01_t03: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer_A02_t01: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer_A02_t02: RuntimeError
-LibTest/collection/DoubleLinkedQueue/DoubleLinkedQueue.from_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/reduce_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t02: RuntimeError
-LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t03: RuntimeError
-LibTest/collection/HashMap/HashMap_A06_t01: RuntimeError
-LibTest/collection/IterableMixin/IterableMixin_class_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/any_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/every_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/first_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/reduce_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/single_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/skipWhile_A03_t01: RuntimeError
-LibTest/collection/IterableMixin/skipWhile_A04_t01: RuntimeError
-LibTest/collection/LinkedHashSet/LinkedHashSet.from_A03_t01: RuntimeError
-LibTest/collection/LinkedHashSet/LinkedHashSet_class_A01_t01: RuntimeError
-LibTest/collection/LinkedList/LinkedList_A01_t01: RuntimeError
-LibTest/collection/LinkedList/LinkedList_class_A03_t01: RuntimeError
-LibTest/collection/LinkedList/remove_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t03: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A02_t03: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t03: RuntimeError
-LibTest/collection/ListBase/ListBase_class_A01_t01: RuntimeError
-LibTest/collection/ListQueue/ListQueue_class_A01_t01: RuntimeError
-LibTest/collection/Queue/Queue.from_A01_t01: RuntimeError
-LibTest/collection/Queue/Queue_class_A01_t01: RuntimeError
-LibTest/collection/SetBase/SetBase_class_A01_t01: RuntimeError
-LibTest/collection/SetMixin/SetMixin_class_A01_t01: RuntimeError
-LibTest/collection/SplayTreeSet/SplayTreeSet_class_A01_t01: RuntimeError
-LibTest/collection/UnmodifiableListView/UnmodifiableListView_class_A01_t01: RuntimeError
-LibTest/convert/ByteConversionSink/ByteConversionSink.from_A01_t01: RuntimeError
-LibTest/convert/ByteConversionSink/ByteConversionSink_class_A01_t01: RuntimeError
-LibTest/convert/JsonCodec/encode_A01_t01: RuntimeError
-LibTest/convert/JsonCodec/encode_A01_t02: RuntimeError
-LibTest/convert/JsonCodec/encoder_A01_t01: RuntimeError
-LibTest/convert/JsonDecoder/fuse_A01_t01: RuntimeError
-LibTest/convert/JsonEncoder/convert_A01_t01: RuntimeError
-LibTest/convert/JsonUtf8Encoder/convert_A01_t01: RuntimeError
-LibTest/convert/StringConversionSink/StringConversionSink.from_A01_t01: RuntimeError
-LibTest/convert/StringConversionSink/asStringSink_A02_t01: RuntimeError
-LibTest/convert/StringConversionSink/asUtf8Sink_A02_t01: RuntimeError
-LibTest/convert/Utf8Codec/Utf8Codec_A01_t02: RuntimeError
-LibTest/convert/Utf8Codec/Utf8Codec_A01_t03: RuntimeError
-LibTest/convert/Utf8Codec/decode_A03_t01: RuntimeError
-LibTest/convert/Utf8Codec/decode_A03_t02: RuntimeError
-LibTest/convert/Utf8Decoder/Utf8Decoder_A02_t01: RuntimeError
-LibTest/convert/Utf8Decoder/Utf8Decoder_A02_t02: RuntimeError
-LibTest/core/AssertionError/toString_A01_t01: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t03: RuntimeError
-LibTest/core/Duration/inMinutes_A01_t01: CompileTimeError
-LibTest/core/Expando/operator_square_brackets_A01_t03: RuntimeError
-LibTest/core/List/Iterable_A01_t01: RuntimeError
-LibTest/core/List/List_class_A01_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterEscape_A06_t02: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_DecimalEscape_A01_t02: RuntimeError
-LibTest/core/StackOverflowError/stackTrace_A01_t01: RuntimeError
-LibTest/core/StackOverflowError/stackTrace_A01_t02: RuntimeError
-LibTest/core/String/String.fromEnvironment_A01_t01: RuntimeError
-LibTest/core/String/replaceAllMapped_A03_t01: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t01: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t02: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t05: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A02_t01: RuntimeError
-LibTest/core/Uri/Uri.directory_A05_t01: RuntimeError
-LibTest/core/Uri/parse_A07_t01: RuntimeError
-LibTest/core/Uri/queryParametersAll_A01_t01: RuntimeError
-LibTest/core/Uri/queryParametersAll_A01_t02: RuntimeError
-LibTest/core/Uri/queryParametersAll_A04_t01: RuntimeError
-LibTest/core/UriData/UriData.fromString_A02_t03: RuntimeError
-LibTest/core/UriData/UriData.fromUri_A01_t03: RuntimeError
-LibTest/core/UriData/isBase64_A01_t01: RuntimeError
-LibTest/core/UriData/toString_A01_t01: RuntimeError
-LibTest/core/double/operator_LE_A01_t02: CompileTimeError
-LibTest/core/double/operator_addition_A01_t06: RuntimeError
-LibTest/core/int/abs_A01_t01: CompileTimeError
-LibTest/core/int/ceilToDouble_A01_t01: CompileTimeError
-LibTest/core/int/isEven_A01_t01: CompileTimeError
-LibTest/core/int/isNaN_A01_t01: CompileTimeError
-LibTest/core/int/operator_GT_A01_t01: CompileTimeError
-LibTest/core/int/operator_LE_A01_t01: CompileTimeError
-LibTest/core/int/operator_NOT_A01_t01: CompileTimeError
-LibTest/core/int/operator_OR_A01_t01: CompileTimeError
-LibTest/core/int/operator_division_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A02_t01: CompileTimeError
-LibTest/core/int/operator_multiplication_A01_t01: RuntimeError
-LibTest/core/int/operator_remainder_A01_t01: CompileTimeError
-LibTest/core/int/operator_right_shift_A01_t01: RuntimeError
-LibTest/core/int/parse_A01_t01: CompileTimeError
-LibTest/core/int/parse_A01_t02: RuntimeError
-LibTest/core/int/remainder_A01_t01: CompileTimeError
-LibTest/core/int/remainder_A01_t03: RuntimeError
-LibTest/core/int/round_A01_t01: CompileTimeError
-LibTest/core/int/toDouble_A01_t01: CompileTimeError
-LibTest/core/int/toInt_A01_t01: CompileTimeError
-LibTest/core/int/truncate_A01_t01: CompileTimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: RuntimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t06: RuntimeError
-LibTest/html/Document/clone_A01_t01: RuntimeError
-LibTest/html/Document/clone_A01_t02: RuntimeError
-LibTest/html/Element/Element.tag_A01_t01: RuntimeError
-LibTest/html/Element/addEventListener_A01_t03: RuntimeError
-LibTest/html/Element/borderEdge_A01_t01: RuntimeError
-LibTest/html/Element/clickEvent_A01_t01: RuntimeError
-LibTest/html/Element/contentEdge_A01_t01: RuntimeError
-LibTest/html/Element/contextMenuEvent_A01_t01: RuntimeError
-LibTest/html/Element/copyEvent_A01_t01: RuntimeError
-LibTest/html/Element/cutEvent_A01_t01: RuntimeError
-LibTest/html/Element/dataset_A02_t01: RuntimeError
-LibTest/html/Element/dragEndEvent_A01_t01: RuntimeError
-LibTest/html/Element/dragEnterEvent_A01_t01: RuntimeError
-LibTest/html/Element/dragEvent_A01_t01: RuntimeError
-LibTest/html/Element/dragLeaveEvent_A01_t01: RuntimeError
-LibTest/html/Element/dragOverEvent_A01_t01: RuntimeError
-LibTest/html/Element/dragStartEvent_A01_t01: RuntimeError
-LibTest/html/Element/dropEvent_A01_t01: RuntimeError
-LibTest/html/Element/getAttributeNS_A01_t01: RuntimeError
-LibTest/html/Element/getNamespacedAttributes_A01_t01: RuntimeError
-LibTest/html/Element/isTagSupported_A01_t01: RuntimeError
-LibTest/html/Element/loadEvent_A01_t01: RuntimeError
-LibTest/html/Element/marginEdge_A01_t01: RuntimeError
-LibTest/html/Element/mouseWheelEvent_A01_t01: RuntimeError
-LibTest/html/Element/onClick_A01_t01: RuntimeError
-LibTest/html/Element/onContextMenu_A01_t01: RuntimeError
-LibTest/html/Element/onCopy_A01_t01: RuntimeError
-LibTest/html/Element/onCut_A01_t01: RuntimeError
-LibTest/html/Element/onDragEnd_A01_t01: RuntimeError
-LibTest/html/Element/onDragEnter_A01_t01: RuntimeError
-LibTest/html/Element/onDragLeave_A01_t01: RuntimeError
-LibTest/html/Element/onDragOver_A01_t01: RuntimeError
-LibTest/html/Element/onDragStart_A01_t01: RuntimeError
-LibTest/html/Element/onDrag_A01_t01: RuntimeError
-LibTest/html/Element/onDrop_A01_t01: RuntimeError
-LibTest/html/Element/onKeyDown_A01_t01: RuntimeError
-LibTest/html/Element/onKeyPress_A01_t01: RuntimeError
-LibTest/html/Element/onKeyUp_A01_t01: RuntimeError
-LibTest/html/Element/onMouseDown_A01_t01: RuntimeError
-LibTest/html/Element/onMouseEnter_A01_t01: RuntimeError
-LibTest/html/Element/onMouseLeave_A01_t01: RuntimeError
-LibTest/html/Element/onMouseMove_A01_t01: RuntimeError
-LibTest/html/Element/onMouseOut_A01_t01: RuntimeError
-LibTest/html/Element/onMouseOver_A01_t01: RuntimeError
-LibTest/html/Element/onMouseUp_A01_t01: RuntimeError
-LibTest/html/Element/onMouseWheel_A01_t01: RuntimeError
-LibTest/html/Element/onPaste_A01_t01: RuntimeError
-LibTest/html/Element/onTouchCancel_A01_t01: RuntimeError
-LibTest/html/Element/onTouchEnd_A01_t01: RuntimeError
-LibTest/html/Element/onTouchEnter_A01_t01: RuntimeError
-LibTest/html/Element/onTouchLeave_A01_t01: RuntimeError
-LibTest/html/Element/onTouchMove_A01_t01: RuntimeError
-LibTest/html/Element/onTouchStart_A01_t01: RuntimeError
-LibTest/html/Element/onTransitionEnd_A01_t01: Timeout, Pass
-LibTest/html/Element/paddingEdge_A01_t01: RuntimeError
-LibTest/html/Element/pasteEvent_A01_t01: RuntimeError
-LibTest/html/Element/previousNode_A01_t01: RuntimeError
-LibTest/html/Element/querySelectorAll_A01_t02: RuntimeError
-LibTest/html/Element/replaceWith_A01_t01: RuntimeError
-LibTest/html/Element/replaceWith_A01_t02: RuntimeError
-LibTest/html/Element/touchCancelEvent_A01_t01: RuntimeError
-LibTest/html/Element/touchEndEvent_A01_t01: RuntimeError
-LibTest/html/Element/touchEnterEvent_A01_t01: RuntimeError
-LibTest/html/Element/touchLeaveEvent_A01_t01: RuntimeError
-LibTest/html/Element/touchMoveEvent_A01_t01: RuntimeError
-LibTest/html/Element/touchStartEvent_A01_t01: RuntimeError
-LibTest/html/Element/transitionEndEvent_A01_t01: RuntimeError
-LibTest/html/Event/Event_A01_t01: RuntimeError
-LibTest/html/Event/currentTarget_A01_t01: RuntimeError
-LibTest/html/Event/defaultPrevented_A01_t01: RuntimeError
-LibTest/html/Event/eventPhase_A01_t01: RuntimeError
-LibTest/html/Event/preventDefault_A01_t01: RuntimeError
-LibTest/html/Event/stopPropagation_A01_t01: RuntimeError
-LibTest/html/Event/target_A01_t01: RuntimeError
-LibTest/html/HttpRequest/getAllResponseHeaders_A01_t01: RuntimeError
-LibTest/html/HttpRequest/getResponseHeader_A01_t01: RuntimeError
-LibTest/html/HttpRequest/getString_A01_t01: RuntimeError
-LibTest/html/HttpRequest/onError_A01_t02: Timeout, Pass
-LibTest/html/HttpRequest/readyStateChangeEvent_A01_t01: RuntimeError
-LibTest/html/HttpRequest/request_A01_t01: RuntimeError
-LibTest/html/HttpRequest/responseText_A01_t02: RuntimeError
-LibTest/html/HttpRequest/responseType_A01_t01: RuntimeError
-LibTest/html/HttpRequest/responseType_A01_t03: RuntimeError
-LibTest/html/HttpRequest/setRequestHeader_A01_t01: RuntimeError
-LibTest/html/HttpRequest/statusText_A01_t01: RuntimeError
-LibTest/html/HttpRequest/status_A01_t01: RuntimeError
-LibTest/html/HttpRequestUpload/onError_A01_t02: RuntimeError
-LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: RuntimeError
-LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: RuntimeError
-LibTest/html/IFrameElement/addEventListener_A01_t03: RuntimeError
-LibTest/html/IFrameElement/appendHtml_A01_t01: RuntimeError
-LibTest/html/IFrameElement/appendHtml_A01_t02: RuntimeError
-LibTest/html/IFrameElement/attributeChanged_A01_t01: RuntimeError
-LibTest/html/IFrameElement/attributes_setter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/blur_A01_t01: Timeout, Pass
-LibTest/html/IFrameElement/borderEdge_A01_t01: RuntimeError
-LibTest/html/IFrameElement/clone_A01_t02: RuntimeError
-LibTest/html/IFrameElement/contentWindow_A01_t01: RuntimeError
-LibTest/html/IFrameElement/createFragment_A01_t01: RuntimeError
-LibTest/html/IFrameElement/createFragment_A01_t02: RuntimeError
-LibTest/html/IFrameElement/createFragment_A01_t03: RuntimeError
-LibTest/html/IFrameElement/createShadowRoot_A01_t01: RuntimeError
-LibTest/html/IFrameElement/innerHtml_A01_t01: RuntimeError
-LibTest/html/IFrameElement/leftView_A01_t01: RuntimeError
-LibTest/html/IFrameElement/marginEdge_A01_t01: RuntimeError
-LibTest/html/IFrameElement/offsetTo_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onClick_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onContextMenu_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onCopy_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onCut_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDragEnd_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDragEnter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDragLeave_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDragOver_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDragStart_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDrag_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDrop_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onKeyDown_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onKeyPress_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onKeyUp_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseDown_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseEnter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseLeave_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseMove_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseOut_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseOver_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseUp_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onMouseWheel_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onPaste_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onTouchCancel_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onTouchEnd_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onTouchEnter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onTouchLeave_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onTouchMove_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onTouchStart_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onTransitionEnd_A01_t01: RuntimeError
-LibTest/html/IFrameElement/paddingEdge_A01_t01: RuntimeError
-LibTest/html/IFrameElement/querySelector_A01_t01: RuntimeError
-LibTest/html/IFrameElement/replaceWith_A01_t01: RuntimeError
-LibTest/html/IFrameElement/setInnerHtml_A01_t01: RuntimeError
-LibTest/html/Node/append_A01_t02: RuntimeError
-LibTest/html/Node/nodes_A01_t02: RuntimeError
-LibTest/html/Node/ownerDocument_A01_t01: RuntimeError
-LibTest/html/Node/parent_A01_t01: RuntimeError
-LibTest/html/Node/previousNode_A01_t01: RuntimeError
-LibTest/html/Window/document_A01_t01: RuntimeError
-LibTest/html/Window/find_A01_t01: RuntimeError
-LibTest/html/Window/find_A03_t01: RuntimeError
-LibTest/html/Window/find_A06_t01: RuntimeError
-LibTest/html/Window/moveBy_A01_t01: RuntimeError
-LibTest/html/Window/moveTo_A01_t01: RuntimeError
-LibTest/html/Window/moveTo_A02_t01: RuntimeError
-LibTest/html/Window/postMessage_A01_t01: RuntimeError
-LibTest/html/Window/postMessage_A01_t02: RuntimeError
-LibTest/html/Window/requestFileSystem_A02_t01: RuntimeError
-LibTest/html/Window/resizeBy_A01_t01: RuntimeError
-LibTest/html/Window/resizeTo_A01_t01: RuntimeError
 LibTest/io/*: SkipByDesign # dart:io not supported.
 LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
-LibTest/math/MutableRectangle/MutableRectangle_A03_t04: RuntimeError
-LibTest/math/MutableRectangle/height_A03_t02: RuntimeError
-LibTest/math/MutableRectangle/width_A03_t02: RuntimeError
-LibTest/math/Point/operator_mult_A02_t01: RuntimeError
-LibTest/math/Rectangle/Rectangle_A03_t04: RuntimeError
-LibTest/math/acos_A01_t01: RuntimeError
-LibTest/math/asin_A01_t01: RuntimeError
-LibTest/math/pow_A04_t01: RuntimeError
-LibTest/math/pow_A10_t01: CompileTimeError
-LibTest/math/pow_A14_t01: RuntimeError
-LibTest/math/pow_A16_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asByteData_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asByteData_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asByteData_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32x4List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32x4List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32x4List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64x2List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64x2List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64x2List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt16List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt16List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt16List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32x4List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32x4List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32x4List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt64List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt64List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt8List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt8List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt8List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint16List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint16List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint16List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint32List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint32List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint32List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint64List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint64List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint64List_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8ClampedList_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8ClampedList_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8ClampedList_A03_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8List_A02_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8List_A03_t01: RuntimeError
-LibTest/typed_data/ByteData/ByteData.view_A05_t01: RuntimeError
-LibTest/typed_data/ByteData/ByteData.view_A05_t02: RuntimeError
-LibTest/typed_data/ByteData/ByteData.view_A05_t03: RuntimeError
-LibTest/typed_data/ByteData/getFloat32_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getFloat32_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getFloat64_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getFloat64_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getInt16_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getInt16_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getInt32_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getInt32_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getInt64_A01_t01: CompileTimeError
-LibTest/typed_data/ByteData/getInt64_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getInt64_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getInt8_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getInt8_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getUint16_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getUint16_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getUint32_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getUint32_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getUint64_A01_t01: CompileTimeError
-LibTest/typed_data/ByteData/getUint64_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getUint64_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/getUint8_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/getUint8_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setFloat32_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setFloat32_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setFloat64_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setFloat64_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setInt16_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setInt16_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setInt32_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setInt32_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setInt64_A01_t01: CompileTimeError
-LibTest/typed_data/ByteData/setInt64_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setInt64_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setInt8_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setInt8_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setUint16_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setUint16_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setUint32_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setUint32_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setUint64_A01_t01: CompileTimeError
-LibTest/typed_data/ByteData/setUint64_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setUint64_A02_t02: RuntimeError
-LibTest/typed_data/ByteData/setUint8_A02_t01: RuntimeError
-LibTest/typed_data/ByteData/setUint8_A02_t02: RuntimeError
-LibTest/typed_data/Float32List/Float32List.view_A05_t01: RuntimeError
-LibTest/typed_data/Float32List/Float32List.view_A05_t02: RuntimeError
-LibTest/typed_data/Float32List/Float32List.view_A05_t03: RuntimeError
-LibTest/typed_data/Float32List/Float32List_A02_t01: RuntimeError
-LibTest/typed_data/Float32List/any_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/every_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/first_A01_t02: RuntimeError
-LibTest/typed_data/Float32List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/join_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/join_A01_t02: RuntimeError
-LibTest/typed_data/Float32List/last_A01_t02: RuntimeError
-LibTest/typed_data/Float32x4List/Float32x4List.view_A05_t01: RuntimeError
-LibTest/typed_data/Float32x4List/Float32x4List.view_A05_t02: RuntimeError
-LibTest/typed_data/Float32x4List/Float32x4List.view_A05_t03: RuntimeError
-LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: RuntimeError
-LibTest/typed_data/Float32x4List/Float32x4List_A02_t01: RuntimeError
-LibTest/typed_data/Float32x4List/any_A01_t01: RuntimeError
-LibTest/typed_data/Float32x4List/every_A01_t01: RuntimeError
-LibTest/typed_data/Float32x4List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Float32x4List/join_A01_t01: RuntimeError
-LibTest/typed_data/Float32x4List/join_A01_t02: RuntimeError
-LibTest/typed_data/Float64List/Float64List.view_A05_t01: RuntimeError
-LibTest/typed_data/Float64List/Float64List.view_A05_t02: RuntimeError
-LibTest/typed_data/Float64List/Float64List.view_A05_t03: RuntimeError
-LibTest/typed_data/Float64List/Float64List_A02_t01: RuntimeError
-LibTest/typed_data/Float64List/any_A01_t01: RuntimeError
-LibTest/typed_data/Float64List/every_A01_t01: RuntimeError
-LibTest/typed_data/Float64List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Float64List/join_A01_t01: RuntimeError
-LibTest/typed_data/Float64List/join_A01_t02: RuntimeError
-LibTest/typed_data/Float64List/setAll_A04_t01: RuntimeError
-LibTest/typed_data/Float64x2List/Float64x2List.view_A05_t01: RuntimeError
-LibTest/typed_data/Float64x2List/Float64x2List.view_A05_t02: RuntimeError
-LibTest/typed_data/Float64x2List/Float64x2List.view_A05_t03: RuntimeError
-LibTest/typed_data/Float64x2List/Float64x2List.view_A06_t01: RuntimeError
-LibTest/typed_data/Float64x2List/Float64x2List_A02_t01: RuntimeError
-LibTest/typed_data/Float64x2List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Float64x2List/join_A01_t01: RuntimeError
-LibTest/typed_data/Float64x2List/join_A01_t02: RuntimeError
-LibTest/typed_data/Float64x2List/setAll_A04_t01: RuntimeError
-LibTest/typed_data/Float64x2List/sort_A01_t01: RuntimeError
-LibTest/typed_data/Float64x2List/toString_A01_t01: RuntimeError
-LibTest/typed_data/Int16List/Int16List.view_A05_t01: RuntimeError
-LibTest/typed_data/Int16List/Int16List.view_A05_t02: RuntimeError
-LibTest/typed_data/Int16List/Int16List.view_A05_t03: RuntimeError
-LibTest/typed_data/Int16List/Int16List_A02_t01: RuntimeError
-LibTest/typed_data/Int16List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int16List/every_A01_t01: RuntimeError
-LibTest/typed_data/Int32List/Int32List.view_A05_t01: RuntimeError
-LibTest/typed_data/Int32List/Int32List.view_A05_t02: RuntimeError
-LibTest/typed_data/Int32List/Int32List.view_A05_t03: RuntimeError
-LibTest/typed_data/Int32List/Int32List_A02_t01: RuntimeError
-LibTest/typed_data/Int32List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int32List/every_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4/operator_OR_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.fromList_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.fromList_A01_t02: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.view_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.view_A05_t01: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.view_A05_t02: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.view_A05_t03: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.view_A06_t01: RuntimeError
-LibTest/typed_data/Int32x4List/clear_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/forEach_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/join_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/join_A01_t02: RuntimeError
-LibTest/typed_data/Int32x4List/lengthInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/length_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/offsetInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/setAll_A04_t01: RuntimeError
-LibTest/typed_data/Int32x4List/skip_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/skip_A02_t01: RuntimeError
-LibTest/typed_data/Int32x4List/sublist_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/take_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/take_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/Int64List.fromList_A01_t01: CompileTimeError
-LibTest/typed_data/Int64List/Int64List.fromList_A01_t02: CompileTimeError
-LibTest/typed_data/Int64List/Int64List.view_A01_t01: CompileTimeError
-LibTest/typed_data/Int64List/Int64List.view_A01_t02: CompileTimeError
-LibTest/typed_data/Int64List/Int64List.view_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/Int64List.view_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/Int64List.view_A04_t01: RuntimeError
-LibTest/typed_data/Int64List/Int64List.view_A05_t01: RuntimeError
-LibTest/typed_data/Int64List/Int64List.view_A05_t02: RuntimeError
-LibTest/typed_data/Int64List/Int64List.view_A05_t03: RuntimeError
-LibTest/typed_data/Int64List/Int64List.view_A06_t01: RuntimeError
-LibTest/typed_data/Int64List/Int64List_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/Int64List_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/addAll_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/add_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/asMap_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/asMap_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/asMap_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/buffer_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/buffer_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/clear_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/contains_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/elementAt_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/elementAt_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/elementSizeInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/elementSizeInBytes_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/every_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/expand_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/expand_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/fillRange_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/fillRange_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/firstWhere_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/firstWhere_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/firstWhere_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/first_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/first_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/first_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/first_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/forEach_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/getRange_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/getRange_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/getRange_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/getRange_A04_t01: RuntimeError
-LibTest/typed_data/Int64List/hashCode_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/hashCode_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/indexOf_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/indexOf_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/indexOf_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/indexOf_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/insertAll_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/insert_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/isEmpty_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/isEmpty_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/isNotEmpty_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/isNotEmpty_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/iterator_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/iterator_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/iterator_current_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/iterator_moveNext_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/join_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/join_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/lastIndexOf_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/lastIndexOf_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/lastIndexOf_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/lastIndexOf_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/lastWhere_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/lastWhere_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/lastWhere_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/last_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/last_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/last_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/lengthInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/lengthInBytes_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/length_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/length_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/map_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/map_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/map_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/offsetInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/offsetInBytes_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/operator_equality_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/operator_subscript_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/operator_subscript_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/operator_subscripted_assignment_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/operator_subscripted_assignment_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/reduce_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/reduce_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/removeAt_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/removeLast_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/removeRange_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/removeWhere_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/remove_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/replaceRange_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/retainWhere_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/reversed_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/reversed_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/runtimeType_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/runtimeType_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/setAll_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/setAll_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/setAll_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/setAll_A04_t01: RuntimeError
-LibTest/typed_data/Int64List/setRange_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/setRange_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/setRange_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/setRange_A04_t01: RuntimeError
-LibTest/typed_data/Int64List/setRange_A05_t01: RuntimeError
-LibTest/typed_data/Int64List/shuffle_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/shuffle_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/shuffle_A01_t03: RuntimeError
-LibTest/typed_data/Int64List/singleWhere_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/singleWhere_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/singleWhere_A02_t02: RuntimeError
-LibTest/typed_data/Int64List/single_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/single_A01_t02: RuntimeError
-LibTest/typed_data/Int64List/single_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/single_A02_t02: RuntimeError
-LibTest/typed_data/Int64List/skipWhile_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/skipWhile_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/skipWhile_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/skipWhile_A04_t01: RuntimeError
-LibTest/typed_data/Int64List/skip_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/skip_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/skip_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/sort_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/sublist_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/sublist_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/sublist_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/sublist_A03_t02: RuntimeError
-LibTest/typed_data/Int64List/takeWhile_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/takeWhile_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/takeWhile_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/takeWhile_A04_t01: RuntimeError
-LibTest/typed_data/Int64List/take_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/take_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/take_A03_t01: RuntimeError
-LibTest/typed_data/Int64List/toList_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/toList_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/toList_A02_t02: RuntimeError
-LibTest/typed_data/Int64List/toSet_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/toString_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/where_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/where_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/where_A03_t01: RuntimeError
-LibTest/typed_data/Int8List/Int8List.view_A05_t01: RuntimeError
-LibTest/typed_data/Int8List/Int8List.view_A05_t02: RuntimeError
-LibTest/typed_data/Int8List/Int8List.view_A05_t03: RuntimeError
-LibTest/typed_data/Int8List/Int8List_A02_t01: RuntimeError
-LibTest/typed_data/Int8List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int8List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint16List/Uint16List.view_A05_t01: RuntimeError
-LibTest/typed_data/Uint16List/Uint16List.view_A05_t02: RuntimeError
-LibTest/typed_data/Uint16List/Uint16List.view_A05_t03: RuntimeError
-LibTest/typed_data/Uint16List/Uint16List_A02_t01: RuntimeError
-LibTest/typed_data/Uint16List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint16List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint32List/Uint32List.view_A05_t01: RuntimeError
-LibTest/typed_data/Uint32List/Uint32List.view_A05_t02: RuntimeError
-LibTest/typed_data/Uint32List/Uint32List.view_A05_t03: RuntimeError
-LibTest/typed_data/Uint32List/Uint32List_A02_t01: RuntimeError
-LibTest/typed_data/Uint32List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint32List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t01: CompileTimeError
-LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t02: CompileTimeError
-LibTest/typed_data/Uint64List/Uint64List.fromList_A02_t01: CompileTimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A01_t01: CompileTimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A01_t02: CompileTimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A04_t01: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A05_t01: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A05_t02: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A05_t03: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List.view_A06_t01: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/Uint64List_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/addAll_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/add_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/asMap_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/asMap_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/asMap_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/buffer_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/buffer_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/clear_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/contains_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/elementAt_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/elementAt_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/elementSizeInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/elementSizeInBytes_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/expand_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/expand_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/fillRange_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/fillRange_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/firstWhere_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/firstWhere_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/firstWhere_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/first_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/first_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/first_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/first_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/forEach_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/getRange_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/getRange_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/getRange_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/getRange_A04_t01: RuntimeError
-LibTest/typed_data/Uint64List/hashCode_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/hashCode_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/indexOf_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/indexOf_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/indexOf_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/indexOf_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/insertAll_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/insert_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/isEmpty_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/isEmpty_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/isNotEmpty_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/isNotEmpty_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/iterator_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/iterator_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/iterator_current_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/iterator_moveNext_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/join_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/join_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/lastIndexOf_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/lastIndexOf_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/lastIndexOf_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/lastIndexOf_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/lastWhere_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/lastWhere_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/lastWhere_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/last_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/last_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/last_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/lengthInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/lengthInBytes_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/length_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/length_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/map_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/map_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/map_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/offsetInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/offsetInBytes_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/operator_equality_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/operator_subscript_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/operator_subscript_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/operator_subscripted_assignment_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/operator_subscripted_assignment_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/reduce_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/reduce_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/reduce_A03_t01: CompileTimeError
-LibTest/typed_data/Uint64List/removeAt_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/removeLast_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/removeRange_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/removeWhere_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/remove_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/replaceRange_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/retainWhere_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/reversed_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/reversed_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/runtimeType_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/runtimeType_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/setAll_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/setAll_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/setAll_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/setAll_A04_t01: RuntimeError
-LibTest/typed_data/Uint64List/setRange_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/setRange_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/setRange_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/setRange_A04_t01: RuntimeError
-LibTest/typed_data/Uint64List/setRange_A05_t01: RuntimeError
-LibTest/typed_data/Uint64List/shuffle_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/shuffle_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/shuffle_A01_t03: RuntimeError
-LibTest/typed_data/Uint64List/singleWhere_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/singleWhere_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/singleWhere_A02_t02: RuntimeError
-LibTest/typed_data/Uint64List/single_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/single_A01_t02: RuntimeError
-LibTest/typed_data/Uint64List/single_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/single_A02_t02: RuntimeError
-LibTest/typed_data/Uint64List/skipWhile_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/skipWhile_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/skipWhile_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/skipWhile_A04_t01: RuntimeError
-LibTest/typed_data/Uint64List/skip_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/skip_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/skip_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/sort_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/sublist_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/sublist_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/sublist_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/sublist_A03_t02: RuntimeError
-LibTest/typed_data/Uint64List/takeWhile_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/takeWhile_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/takeWhile_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/takeWhile_A04_t01: RuntimeError
-LibTest/typed_data/Uint64List/take_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/take_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/take_A03_t01: RuntimeError
-LibTest/typed_data/Uint64List/toList_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/toList_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/toList_A02_t02: RuntimeError
-LibTest/typed_data/Uint64List/toSet_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/toSet_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/toString_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/where_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/where_A02_t01: RuntimeError
-LibTest/typed_data/Uint64List/where_A03_t01: RuntimeError
-LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A05_t01: RuntimeError
-LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A05_t02: RuntimeError
-LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A05_t03: RuntimeError
-LibTest/typed_data/Uint8ClampedList/Uint8ClampedList_A02_t01: RuntimeError
-LibTest/typed_data/Uint8ClampedList/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint8ClampedList/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint8List/Uint8List.view_A05_t01: RuntimeError
-LibTest/typed_data/Uint8List/Uint8List.view_A05_t02: RuntimeError
-LibTest/typed_data/Uint8List/Uint8List.view_A05_t03: RuntimeError
-LibTest/typed_data/Uint8List/Uint8List_A02_t01: RuntimeError
-LibTest/typed_data/Uint8List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint8List/every_A01_t01: RuntimeError
-Utils/tests/Expect/identical_A01_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/EventObject.after.dispatchEvenr_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: RuntimeError
-WebPlatformTest/Utils/test/testFail_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A05_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A06_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A05_t01: RuntimeError
-WebPlatformTest/dom/EventTarget/dispatchEvent_A02_t01: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createHTMLDocument_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-createElement_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-getElementsByTagName_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-appendChild_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-appendChild_t02: RuntimeError
-WebPlatformTest/dom/nodes/Node-isEqualNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-replaceChild_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A05_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A06_t03: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t02: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A08_t01: RuntimeError
-WebPlatformTest/dom/ranges/Range-comparePoint_t02: RuntimeError
-WebPlatformTest/html-imports/link-import_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-context_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-row-context_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/creating-an-element-for-the-token/template-owner-document_t01: RuntimeError
-WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-image_t01: RuntimeError
-WebPlatformTest/html/browsers/browsing-the-web/read-text/load-text-plain_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t02: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-delete_t01: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-set_t01: RuntimeError
-WebPlatformTest/html/semantics/document-metadata/styling/LinkStyle_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/src_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/mode_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/attributes-common-to-form-controls/formaction_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-datalist-element/datalistoptions_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-autocomplete_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-elements-nameditem_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/date_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/datetime-local_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/datetime_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/email_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/hidden_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/input-textselection_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/text_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/valueMode_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-meter-element/meter_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-option-element/option-text-recurse_t01: RuntimeError
-WebPlatformTest/html/semantics/grouping-content/the-blockquote-element/grouping-blockquote_t01: RuntimeError
-WebPlatformTest/html/semantics/grouping-content/the-ol-element/ol.start-reflection_t02: RuntimeError
-WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-showModal_t01: RuntimeError
-WebPlatformTest/html/semantics/scripting-1/the-script-element/script-text_t02: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/dir_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/enabled_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/tBodies_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-004_t02: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/elements-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t02: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-dispatch/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-dispatch/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/composition/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/rendering-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/selectors-api-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/selectors-api-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-007_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-009_t01: RuntimeError
-WebPlatformTest/webstorage/event_constructor_t01: RuntimeError
-WebPlatformTest/webstorage/event_local_key_t01: RuntimeError
-WebPlatformTest/webstorage/event_local_oldvalue_t01: RuntimeError
-WebPlatformTest/webstorage/event_local_storagearea_t01: RuntimeError
-WebPlatformTest/webstorage/event_session_newvalue_t01: RuntimeError
-WebPlatformTest/webstorage/event_session_oldvalue_t01: RuntimeError
-WebPlatformTest/webstorage/event_session_storagearea_t01: RuntimeError
 
 [ $builder_tag != run_webgl_tests && $compiler == dart2js ]
 LayoutTests/fast/canvas/webgl*: Skip # Only run WebGL on special builders, issue 29961
 
-[ $compiler == dart2js && $runtime == chrome ]
-Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
-Language/Expressions/Constants/depending_on_itself_t03: Crash
-Language/Expressions/Constants/exception_t02/01: CompileTimeError
-Language/Expressions/Constants/integer_size_t03: CompileTimeError
-Language/Expressions/Constants/integer_size_t04: CompileTimeError
-Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
-Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
-Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
-Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
-Language/Expressions/Lists/identical_t02: RuntimeError
-Language/Expressions/Maps/identical_t02: RuntimeError
-Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
-Language/Expressions/Numbers/syntax_t06: CompileTimeError
-Language/Expressions/Numbers/syntax_t09: CompileTimeError
-Language/Expressions/Object_Identity/double_t02: RuntimeError
-Language/Expressions/Shift/integer_t02: CompileTimeError
-Language/Expressions/Type_Cast/syntax_t01: RuntimeError
-Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
-Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
-Language/Metadata/before_ctor_t02: RuntimeError
-Language/Metadata/before_function_t01: RuntimeError
-Language/Metadata/before_function_t02: RuntimeError
-Language/Metadata/before_function_t03: RuntimeError
-Language/Metadata/before_function_t04: RuntimeError
-Language/Metadata/before_function_t07: RuntimeError
-Language/Metadata/before_import_t01: RuntimeError
-Language/Metadata/before_param_t03: RuntimeError
-Language/Metadata/before_param_t05: RuntimeError
-Language/Metadata/before_param_t07: RuntimeError
-Language/Metadata/before_param_t09: RuntimeError
-Language/Metadata/before_variable_t02: RuntimeError
-Language/Overview/Privacy/private_and_public_t18: RuntimeError
-Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
-Language/Statements/Assert/execution_t09: RuntimeError
-Language/Types/Function_Types/call_t01: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
-Language/Types/Interface_Types/subtype_t06: RuntimeError
-Language/Types/Interface_Types/subtype_t21: RuntimeError
-Language/Types/Interface_Types/subtype_t23: RuntimeError
-Language/Variables/constant_variable_t09: RuntimeError
-LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l1_t02: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l1_t10: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_FutureOr_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t10: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l2_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t06: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/static/generated/left_promoted_variable_arguments_binding_A03_t02: Timeout, Pass
-LanguageFeatures/regression/34803_t01: Crash
-LanguageFeatures/regression/34803_t02: Crash
-LayoutTests/fast/animation/request-animation-frame-cancel2_t01: Timeout, Pass
-LayoutTests/fast/animation/request-animation-frame-cancel_t01: Timeout, Pass
-LayoutTests/fast/animation/request-animation-frame-prefix_t01: Timeout, Pass
-LayoutTests/fast/animation/request-animation-frame-timestamps-advance_t01: Timeout, Pass
-LayoutTests/fast/animation/request-animation-frame-timestamps_t01: Timeout, Pass
-LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
-LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
-LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
-LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
-LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
-LayoutTests/fast/canvas/canvas-as-image-incremental-repaint_t01: Timeout, Pass
-LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: Timeout, Pass
-LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-resize-after-paint_t01: Timeout, Pass
-LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
-LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
-LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
-LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
-LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/context-destroyed-crash_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-bind-attrib-location-test_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/gl-getshadersource_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/gl-getstring_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/point-size_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/premultiplyalpha-test_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgb565_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba4444_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout, RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout, RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-bindings-uneffected-on-resize_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
-LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
-LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError, Pass
-LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError, Pass
-LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
-LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout, Pass
-LayoutTests/fast/css-generated-content/reset-content-to-initial_t01: Timeout, Pass
-LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
-LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError, Pass
-LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
-LayoutTests/fast/css/auto-min-size_t01: RuntimeError
-LayoutTests/fast/css/background-serialize_t01: RuntimeError
-LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
-LayoutTests/fast/css/content/content-none_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-01_t01: RuntimeError, Pass
-LayoutTests/fast/css/content/content-quotes-05_t01: RuntimeError, Pass
-LayoutTests/fast/css/counters/complex-before_t01: RuntimeError, Pass
-LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
-LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
-LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError, Pass
-LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError, Pass
-LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError, Timeout
-LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError, Timeout
-LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
-LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
-LayoutTests/fast/css/implicit-attach-marking_t01: Timeout, Pass
-LayoutTests/fast/css/insertRule-media_t01: RuntimeError
-LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
-LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
-LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
-LayoutTests/fast/css/overflow-property_t01: RuntimeError, Pass
-LayoutTests/fast/css/padding-no-renderer_t01: RuntimeError, Pass
-LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
-LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout, Pass
-LayoutTests/fast/css/pseudo-any_t01: RuntimeError, Pass
-LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
-LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout, Pass
-LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
-LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
-LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
-LayoutTests/fast/css/style-element-process-crash_t01: Timeout, Pass
-LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
-LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
-LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
-LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
-LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
-LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
-LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
-LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: Timeout
-LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
-LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout, Pass
-LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError, Pass
-LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-style-2_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-stylesheet-without-wrapper_t01: RuntimeError
-LayoutTests/fast/dom/blur-contenteditable_t01: RuntimeError, Pass
-LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
-LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
-LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError
-LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
-LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
-LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
-LayoutTests/fast/dom/focus-contenteditable_t01: RuntimeError, Pass
-LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
-LayoutTests/fast/dom/gc-image-element_t01: Timeout
-LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
-LayoutTests/fast/dom/image-object_t01: Timeout
-LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
-LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
-LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError, Pass
-LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowhost-keyframes_t01: RuntimeError, Pass
-LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
-LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
-LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
-LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Timeout
-LayoutTests/fast/events/clipboard-clearData_t01: Timeout
-LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
-LayoutTests/fast/events/event-creation_t01: RuntimeError
-LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
-LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
-LayoutTests/fast/events/fire-scroll-event-element_t01: Timeout, Pass
-LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError, Timeout
-LayoutTests/fast/events/init-message-event_t01: RuntimeError
-LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError, Pass
-LayoutTests/fast/events/invalid-002_t01: RuntimeError
-LayoutTests/fast/events/invalid-003_t01: RuntimeError
-LayoutTests/fast/events/label-focus_t01: RuntimeError, Pass
-LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
-LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout, Pass
-LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError, Timeout
-LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
-LayoutTests/fast/events/scroll-during-zoom-change_t01: Timeout, Pass
-LayoutTests/fast/events/scroll-event-phase_t01: Timeout, Pass
-LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError, Pass
-LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
-LayoutTests/fast/files/blob-close-read_t01: RuntimeError
-LayoutTests/fast/files/blob-constructor_t01: RuntimeError
-LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError, Pass
-LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-focus-only-once_t01: Timeout, Pass
-LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Timeout, Pass
-LayoutTests/fast/forms/autofocus-opera-007_t01: Timeout, Pass
-LayoutTests/fast/forms/autofocus-readonly-attribute_t01: Timeout, Pass
-LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError, Pass
-LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError, Pass
-LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/focus-style-pending_t01: Timeout, Pass
-LayoutTests/fast/forms/focus_t01: RuntimeError, Pass
-LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
-LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
-LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
-LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
-LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
-LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
-LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
-LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
-LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
-LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
-LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: Timeout
-LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
-LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
-LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
-LayoutTests/fast/forms/textfield-focus-out_t01: Timeout, Pass
-LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
-LayoutTests/fast/html/article-element_t01: RuntimeError
-LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
-LayoutTests/fast/html/figure-element_t01: RuntimeError
-LayoutTests/fast/html/header-element_t01: RuntimeError
-LayoutTests/fast/html/hgroup-element_t01: RuntimeError
-LayoutTests/fast/html/hidden-attr_t01: RuntimeError
-LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
-LayoutTests/fast/html/main-element_t01: RuntimeError
-LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
-LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
-LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
-LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-change_t01: Timeout
-LayoutTests/fast/loader/about-blank-hash-kept_t01: Timeout
-LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
-LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout, Pass
-LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
-LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
-LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
-LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
-LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
-LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
-LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance-images_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance-maxheight_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
-LayoutTests/fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
-LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
-LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
-LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
-LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
-LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout, Pass
-LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: Timeout, RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout, Pass
-LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout, Pass
-LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
-LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError, Pass
-LayoutTests/fast/table/col-width-span-expand_t01: RuntimeError, Pass
-LayoutTests/fast/table/fixed-table-layout-toggle-colwidth_t01: RuntimeError, Pass
-LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01: RuntimeError, Pass
-LayoutTests/fast/table/hittest-tablecell-bottom-edge_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-with-borders-bottom-edge_t01: RuntimeError
-LayoutTests/fast/table/html-table-width-max-width-constrained_t01: RuntimeError
-LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
-LayoutTests/fast/table/margins-flipped-text-direction_t01: RuntimeError
-LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
-LayoutTests/fast/table/nested-tables-with-div-offset_t01: RuntimeError
-LayoutTests/fast/table/resize-table-binding-cell_t01: RuntimeError, Pass
-LayoutTests/fast/table/resize-table-cell_t01: RuntimeError, Pass
-LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows_t01: RuntimeError
-LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-cell-with-empty-cell_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t02: RuntimeError
-LayoutTests/fast/table/table-with-content-width-exceeding-max-width_t01: RuntimeError
-LayoutTests/fast/text/font-ligatures-linebreak-word_t01: RuntimeError, Pass
-LayoutTests/fast/text/font-ligatures-linebreak_t01: RuntimeError, Pass
-LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
-LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
-LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError, Pass
-LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
-LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
-LayoutTests/fast/url/anchor_t01: RuntimeError
-LayoutTests/fast/url/file-http-base_t01: RuntimeError
-LayoutTests/fast/url/file_t01: RuntimeError
-LayoutTests/fast/url/idna2003_t01: RuntimeError
-LayoutTests/fast/url/idna2008_t01: RuntimeError
-LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
-LayoutTests/fast/url/ipv4_t01: RuntimeError
-LayoutTests/fast/url/ipv6_t01: RuntimeError
-LayoutTests/fast/url/mailto_t01: RuntimeError
-LayoutTests/fast/url/path_t01: RuntimeError
-LayoutTests/fast/url/query_t01: RuntimeError
-LayoutTests/fast/url/relative-win_t01: RuntimeError
-LayoutTests/fast/url/relative_t01: RuntimeError
-LayoutTests/fast/url/segments_t01: RuntimeError
-LayoutTests/fast/url/standard-url_t01: RuntimeError
-LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
-LayoutTests/fast/writing-mode/percentage-margins-absolute-replaced_t01: RuntimeError, Pass
-LayoutTests/fast/writing-mode/percentage-margins-absolute_t01: RuntimeError, Pass
-LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
-LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
-LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
-LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
-LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
-LayoutTests/fast/xsl/default-html_t01: RuntimeError
-LibTest/async/Future/asStream_A01_t02: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError, Pass
-LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
-LibTest/async/StreamController/addStream_A03_t01: RuntimeError
-LibTest/async/StreamController/stream_A02_t03: RuntimeError
-LibTest/async/StreamController/stream_A03_t02: RuntimeError
-LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
-LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
-LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
-LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
-LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
-LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
-LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
-LibTest/collection/LinkedList/join_A01_t01: RuntimeError
-LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
-LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
-LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
-LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
-LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
-LibTest/core/AssertionError/message_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
-LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/parse_A01_t03: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
-LibTest/core/Duration/Duration_A01_t01: CompileTimeError
-LibTest/core/Duration/Duration_A02_t01: CompileTimeError
-LibTest/core/Duration/inDays_A01_t01: CompileTimeError
-LibTest/core/Duration/inHours_A01_t01: CompileTimeError
-LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
-LibTest/core/Error/stackTrace_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
-LibTest/core/Function/Function_class_A01_t01: RuntimeError
-LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
-LibTest/core/Runes/any_A01_t01: RuntimeError
-LibTest/core/Runes/every_A01_t01: RuntimeError
-LibTest/core/String/padRight_A01_t01: RuntimeError
-LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
-LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
-LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
-LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
-LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
-LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
-LibTest/core/UriData/charset_A01_t01: RuntimeError
-LibTest/core/UriData/contentText_A01_t01: RuntimeError
-LibTest/core/UriData/parse_A01_t01: RuntimeError
-LibTest/core/double/INFINITY_A01_t04: RuntimeError
-LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
-LibTest/core/double/isInfinite_A01_t03: CompileTimeError
-LibTest/core/double/operator_GE_A01_t02: CompileTimeError
-LibTest/core/double/operator_GT_A01_t02: CompileTimeError
-LibTest/core/double/operator_LT_A01_t02: CompileTimeError
-LibTest/core/double/operator_addition_A01_t08: Crash
-LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
-LibTest/core/double/operator_subtraction_A01_t09: Crash
-LibTest/core/int/ceil_A01_t01: CompileTimeError
-LibTest/core/int/compareTo_A01_t01: CompileTimeError
-LibTest/core/int/floorToDouble_A01_t01: CompileTimeError
-LibTest/core/int/floor_A01_t01: CompileTimeError
-LibTest/core/int/hashCode_A01_t01: CompileTimeError
-LibTest/core/int/isInfinite_A01_t01: CompileTimeError
-LibTest/core/int/isNegative_A01_t01: CompileTimeError
-LibTest/core/int/isOdd_A01_t01: RuntimeError
-LibTest/core/int/operator_AND_A01_t01: CompileTimeError
-LibTest/core/int/operator_GE_A01_t01: CompileTimeError
-LibTest/core/int/operator_LT_A01_t01: CompileTimeError
-LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
-LibTest/core/int/operator_addition_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A03_t01: CompileTimeError
-LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
-LibTest/core/int/operator_remainder_A01_t03: RuntimeError
-LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t02: RuntimeError
-LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
-LibTest/core/int/parse_A03_t02: CompileTimeError
-LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
-LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
-LibTest/html/Element/blur_A01_t01: Timeout, Pass
-LibTest/html/Element/focus_A01_t01: Timeout, Pass
-LibTest/html/Element/loadEvent_A01_t01: Timeout
-LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
-LibTest/html/Element/onLoad_A01_t01: Timeout, Pass
-LibTest/html/Element/onMouseWheel_A01_t01: Timeout
-LibTest/html/Element/transitionEndEvent_A01_t01: Timeout
-LibTest/html/HttpRequest/responseText_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout, Pass
-LibTest/html/IFrameElement/enteredView_A01_t01: Timeout, Pass
-LibTest/html/IFrameElement/focus_A01_t01: Timeout, Pass
-LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
-LibTest/html/IFrameElement/onTransitionEnd_A01_t01: Timeout
-LibTest/typed_data/Float64List/shuffle_A01_t01: RuntimeError, Pass
-LibTest/typed_data/Int16List/shuffle_A01_t01: RuntimeError, Pass
-Utils/tests/Expect/throws_A01_t04: RuntimeError
-WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
-WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
-WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
-WebPlatformTest/custom-elements/concepts/type_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
-WebPlatformTest/dom/events/type_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
-WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
-WebPlatformTest/html-imports/link-import_t02: RuntimeError
-WebPlatformTest/html-imports/loading-import_t01: RuntimeError
-WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
-WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError, Pass
-WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
-WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError, Pass
-WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/link_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
-WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: Timeout, Pass
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t02: Timeout, Pass
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t05: Timeout, Pass
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: Timeout, Pass
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError, Pass
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-002_t01: RuntimeError, Pass
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
-WebPlatformTest/webstorage/event_local_key_t01: Timeout
-WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_local_url_t01: Timeout, Pass
-WebPlatformTest/webstorage/event_session_key_t01: Timeout, Pass
-WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_session_url_t01: Timeout
-
-[ $compiler == dart2js && $runtime == chrome && $system == linux && $fast_startup ]
-LayoutTests/fast/animation/request-animation-frame-cancel_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/read-pixels-test_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data_t01: RuntimeError, Pass
-LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: Timeout, Pass
-LayoutTests/fast/text/international/combining-marks-position_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime == chrome && $system == macos ]
-LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError, Pass
-LayoutTests/fast/css/fontface-properties_t01: RuntimeError, Pass
-LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError, Pass
-LayoutTests/fast/dom/vertical-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError, Pass
-LayoutTests/fast/events/scroll-event-does-not-bubble_t01: Timeout, Pass
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError, Pass
-LayoutTests/fast/forms/button-baseline-and-collapsing_t01: RuntimeError
-LayoutTests/fast/forms/percent-height-auto-width-form-controls_t01: RuntimeError, Pass
-LayoutTests/fast/multicol/column-width-zero_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/parsing/parsing-shape-outside_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError, Pass
-LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: RuntimeError, Pass
-LayoutTests/fast/text/sub-pixel/text-scaling-rtl_t01: RuntimeError, Pass
-WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError, Pass
-
-[ $compiler == dart2js && $runtime == chrome && $system == macos && $fast_startup ]
-LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError
-LayoutTests/fast/css/overflow-property_t01: RuntimeError, Pass
-LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError, Pass
-LayoutTests/fast/forms/percent-height-auto-width-form-controls_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-outside_t01: RuntimeError, Pass
-LayoutTests/fast/text/sub-pixel/text-scaling-rtl_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime == chrome && $system == windows ]
-LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError, Pass
-LayoutTests/fast/text/regional-indicator-symobls_t01: RuntimeError
-LibTest/typed_data/Uint8List/shuffle_A01_t01: RuntimeError, Pass
-
-[ $compiler == dart2js && $runtime == chrome && $fast_startup ]
-LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/gl-bind-attrib-location-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError, Pass
-LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError
-LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError, Pass
-LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError
-LayoutTests/fast/dom/vertical-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError, Pass
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError, Pass
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError
-LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError, Pass
-LayoutTests/fast/table/css-table-max-height_t01: RuntimeError
-LayoutTests/fast/table/css-table-width-with-border-padding_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-right-edge_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-with-borders-right-edge_t01: RuntimeError
-LayoutTests/fast/table/margins-perpendicular-containing-block_t01: RuntimeError
-LayoutTests/fast/table/min-max-width-preferred-size_t01: RuntimeError
-LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: RuntimeError
-LayoutTests/fast/table/table-width-exceeding-max-width_t01: RuntimeError
-LayoutTests/fast/text-autosizing/vertical-writing-mode_t01: RuntimeError
-LayoutTests/fast/text/find-spaces_t01: RuntimeError
-LayoutTests/fast/text/international/cjk-segmentation_t01: RuntimeError
-LayoutTests/fast/transforms/bounding-rect-zoom_t01: RuntimeError
-LayoutTests/fast/transforms/hit-test-large-scale_t01: RuntimeError
-LibTest/math/cos_A01_t01: RuntimeError
-WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t11: RuntimeError
-WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime == chrome && !$fast_startup ]
-WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome ]
-LayoutTests/fast/backgrounds/background-repeat-computed-style_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-ellipse-zero-lineto_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-strokePath-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-teximage_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgb565_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-color-profile_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: RuntimeError
-LayoutTests/fast/css/dynamic-class-backdrop-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/detach-reattach-shadow_t01: RuntimeError
-LayoutTests/fast/css/invalidation/shadow-host-toggle_t01: RuntimeError
-LayoutTests/fast/css/percent-min-width-img-src-change_t01: RuntimeError
-LayoutTests/fast/css/percent-width-img-src-change_t01: RuntimeError
-LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-in-shadow_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-show-modal_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/inert-does-not-match-disabled-selector_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-loading-gc_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/script-load-events_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/css-insert-import-rule-to-shadow-stylesheets_t01: RuntimeError
-LayoutTests/fast/dom/anchor-without-content_t01: RuntimeError
-LayoutTests/fast/dom/blur-contenteditable_t01: RuntimeError, Pass
-LayoutTests/fast/dom/custom/constructor-calls-created-synchronously_t01: RuntimeError
-LayoutTests/fast/dom/custom/document-register-namespace_t01: RuntimeError
-LayoutTests/fast/dom/custom/document-register-on-create-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/document-register-type-extensions_t01: RuntimeError
-LayoutTests/fast/dom/custom/element-type_t01: RuntimeError
-LayoutTests/fast/dom/custom/element-upgrade_t01: RuntimeError
-LayoutTests/fast/dom/custom/type-extensions_t01: RuntimeError
-LayoutTests/fast/dom/importNode-unsupported-node-type_t01: RuntimeError
-LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler_t01: RuntimeError, Pass
-LayoutTests/fast/dom/shadow/content-element-api_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-element-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-element-outside-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-css-text_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-overridden_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-reprojection-fallback-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/custom-pseudo-in-selector-api_t01: RuntimeError
-LayoutTests/fast/dom/shadow/form-in-shadow_t01: RuntimeError
-LayoutTests/fast/dom/shadow/get-distributed-nodes-orphan_t01: RuntimeError
-LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-mutation_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getelementbyid-shadow_t01: RuntimeError
-LayoutTests/fast/dom/shadow/host-context-pseudo-class-css-text_t01: RuntimeError
-LayoutTests/fast/dom/shadow/host-wrapper-reclaimed_t01: RuntimeError
-LayoutTests/fast/dom/shadow/reinsert-insertion-point_t01: RuntimeError
-LayoutTests/fast/dom/shadow/remove-and-insert-style_t01: RuntimeError
-LayoutTests/fast/dom/shadow/remove-styles-in-shadow-crash-2_t01: RuntimeError
-LayoutTests/fast/dom/shadow/remove-styles-in-shadow-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-element_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-append_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowdom-dynamic-styling_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowdom-for-unknown-with-form_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowhost-keyframes_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowroot-keyframes_t01: RuntimeError
-LayoutTests/fast/dom/shadow/style-insertion-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/style-of-distributed-node_t01: RuntimeError
-LayoutTests/fast/dom/shadow/style-sharing-sibling-shadow_t01: RuntimeError
-LayoutTests/fast/dom/shadow/suppress-mutation-events-in-shadow-characterdata_t01: RuntimeError
-LayoutTests/fast/dom/shadow/title-element-in-shadow_t01: RuntimeError
-LayoutTests/fast/events/label-focus_t01: RuntimeError, Pass
-LayoutTests/fast/filesystem/file-from-file-entry_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-abort-depth_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-empty-blob_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-gc-blob_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-reference_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-entry_t01: RuntimeError
-LayoutTests/fast/filesystem/op-move_t01: RuntimeError
-LayoutTests/fast/filesystem/op-remove_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-unicode_t01: RuntimeError
-LayoutTests/fast/filesystem/read-directory-many_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-readonly_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-required-arguments-getdirectory_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-required-arguments-getfile_t01: RuntimeError
-LayoutTests/fast/forms/button-baseline-and-collapsing_t01: RuntimeError
-LayoutTests/fast/forms/datalist/datalist-child-validation_t01: RuntimeError
-LayoutTests/fast/forms/datalist/input-list_t01: RuntimeError
-LayoutTests/fast/forms/date/ValidityState-rangeOverflow-date_t01: RuntimeError
-LayoutTests/fast/forms/date/ValidityState-rangeUnderflow-date_t01: RuntimeError
-LayoutTests/fast/forms/date/ValidityState-stepMismatch-date_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-change-layout-by-value_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/ValidityState-rangeOverflow-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/ValidityState-rangeUnderflow-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/ValidityState-stepMismatch-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-pseudo-classes_t01: RuntimeError
-LayoutTests/fast/forms/select-max-length_t01: RuntimeError
-LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-outside_t01: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: RuntimeError
-LayoutTests/fast/svg/tabindex-focus_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-integer_t01: RuntimeError
-LayoutTests/fast/table/col-width-span-expand_t01: RuntimeError, Pass
-LayoutTests/fast/text/international/listbox-width-rtl_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-rtl_t01: RuntimeError
-LayoutTests/fast/url/port_t01: RuntimeError
-LibTest/html/Element/attributeChanged_A01_t01: RuntimeError
-LibTest/html/Element/enteredView_A01_t01: RuntimeError
-LibTest/html/Element/leftView_A01_t01: RuntimeError
-LibTest/html/Element/onLoad_A01_t01: RuntimeError
-LibTest/html/Element/onTransitionEnd_A01_t01: RuntimeError
-LibTest/html/Element/tagName_A01_t03: RuntimeError
-LibTest/html/HttpRequest/onError_A01_t02: RuntimeError
-LibTest/html/HttpRequestUpload/onLoad_A01_t01: RuntimeError
-LibTest/html/IFrameElement/IFrameElement.created_A01_t01: RuntimeError
-LibTest/html/IFrameElement/blur_A01_t01: RuntimeError
-LibTest/html/IFrameElement/enteredView_A01_t01: RuntimeError
-LibTest/html/IFrameElement/tagName_A01_t03: RuntimeError
-LibTest/html/Window/requestFileSystem_A01_t01: RuntimeError
-LibTest/html/Window/requestFileSystem_A01_t02: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A01_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A07_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A01_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A02_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A02_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/namespace_A01_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-007_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-008_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-012_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-007_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-010_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-009_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t02: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t03: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t05: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/inert-html-elements/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-017_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/dom-tree-accessors-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/shadow-root-001_t01: RuntimeError
-WebPlatformTest/webstorage/event_local_url_t01: RuntimeError
-WebPlatformTest/webstorage/event_session_key_t01: RuntimeError
-WebPlatformTest/webstorage/storage_session_setitem_quotaexceedederr_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome && $runtime != ff ]
-LayoutTests/fast/dom/shadow/host-pseudo-class-css-text_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome && $runtime != ff && $runtime != safari ]
-LayoutTests/fast/dom/HTMLInputElement/input-hidden-value_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-attributes_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome && $runtime != ff && $runtime != safari && !$fast_startup ]
-LayoutTests/fast/animation/request-animation-frame-callback-id_t01: RuntimeError
-LayoutTests/fast/animation/request-animation-frame-cancel_t01: RuntimeError
-LayoutTests/fast/animation/request-animation-frame-timestamps-advance_t01: RuntimeError
-LayoutTests/fast/animation/request-animation-frame-timestamps_t01: RuntimeError
-LayoutTests/fast/animation/request-animation-frame-within-callback_t01: RuntimeError
-LayoutTests/fast/backgrounds/001_t01: RuntimeError
-LayoutTests/fast/backgrounds/multiple-backgrounds-computed-style_t01: RuntimeError
-LayoutTests/fast/backgrounds/multiple-backgrounds-initial-values_t01: RuntimeError
-LayoutTests/fast/box-shadow/box-shadow-parsing-invalid_t01: RuntimeError
-LayoutTests/fast/box-sizing/css-table-with-box-sizing_t01: RuntimeError
-LayoutTests/fast/canvas/access-zero-sized-canvas_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-2d-imageData-create-nonfinite_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-arc-negative-radius_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-arc-zero-lineto_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-as-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-bezier-same-endpoint_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-color-clamping_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-canvas_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-copyPixels_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-css-crazy_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-drawImage-incomplete_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-ellipse_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fill-rule_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-negative-source_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-gradient-without-path_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-invalid-strokestyle_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-largedraws_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lineDash-invalid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lineWidth_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-measureText_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-pattern-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-pattern-transform_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-radial-gradient-spreadMethod_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-resize-after-paint_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-save-restore_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-set-properties-with-non-invertible-ctm_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-skia-excessive-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokePath-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-toDataURL-case-insensitive-mimetype_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-toDataURL-jpeg-crash_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-with-incorrect-args_t01: RuntimeError
-LayoutTests/fast/canvas/canvas_arc_largeangles_t01: RuntimeError
-LayoutTests/fast/canvas/change-context_t01: RuntimeError
-LayoutTests/fast/canvas/drawImage-with-negative-source-destination_t01: RuntimeError
-LayoutTests/fast/canvas/drawImageFromRect_withToDataURLAsSource_t01: RuntimeError
-LayoutTests/fast/canvas/fallback-content_t01: RuntimeError
-LayoutTests/fast/canvas/fillrect-gradient-zero-stops_t01: RuntimeError
-LayoutTests/fast/canvas/invalid-set-font-crash_t01: RuntimeError
-LayoutTests/fast/canvas/pointInPath_t01: RuntimeError
-LayoutTests/fast/canvas/radialGradient-infinite-values_t01: RuntimeError
-LayoutTests/fast/canvas/shadow-huge-blur_t01: RuntimeError
-LayoutTests/fast/canvas/text-globalAlpha_t01: RuntimeError
-LayoutTests/fast/canvas/transformed-canvas-reset_t01: RuntimeError
-LayoutTests/fast/canvas/translate-text_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/array-bounds-clamping_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/buffer-bind-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/canvas-2d-webgl-texture_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/canvas-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/compressed-tex-image_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/context-lost-restored_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/draw-webgl-to-canvas-2d_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/framebuffer-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-enable-enum-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-uniformmatrix4fv_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib-zero-issues_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-vertexattribpointer_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-crash-with-buffer-sub-data_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/invalid-UTF-16_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/invalid-passed-params_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/is-object_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/program-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/read-pixels-pack-alignment_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/renderbuffer-initialization_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba5551_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-webgl_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-sub-image-2d-bad-args_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-sub-image-2d_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-sub-image-cube-maps_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/uniform-location-length-limits_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-composite-modes-repaint_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-composite-modes_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-exceptions_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-texture-binding-preserved_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-viewport-parameters-preserved_t01: RuntimeError
-LayoutTests/fast/canvas/winding-enumeration_t01: RuntimeError
-LayoutTests/fast/css-generated-content/after-with-first-letter-float-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/block-after_t01: RuntimeError
-LayoutTests/fast/css-generated-content/empty-first-letter-with-columns-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/first-letter-next-sibling-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/float-first-letter-siblings-convert-to-inline_t01: RuntimeError
-LayoutTests/fast/css-generated-content/hit-test-generated-content_t01: RuntimeError
-LayoutTests/fast/css-generated-content/inline-splitting-with-after-float-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/media-generated-content_t01: RuntimeError
-LayoutTests/fast/css-generated-content/positioned-generated-content-under-run-in-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-animation-display_t01: RuntimeError
-LayoutTests/fast/css-generated-content/quote-first-letter-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/table-row-after-no-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/text-before-table-col-crash_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-remove-svg-child_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-strict-ordering-crash_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/should-not-collapse-anonymous-blocks_t01: RuntimeError
-LayoutTests/fast/css/add-remove-stylesheets-at-once-minimal-recalc-style_t01: RuntimeError
-LayoutTests/fast/css/assert-marquee-not-last-element_t01: RuntimeError
-LayoutTests/fast/css/background-position-inherit_t01: RuntimeError
-LayoutTests/fast/css/border-spacing-without-vertical-value_t01: RuntimeError
-LayoutTests/fast/css/case-sensitive-attr_t01: RuntimeError
-LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc_t01: RuntimeError
-LayoutTests/fast/css/content-language-dynamically-added_t01: RuntimeError
-LayoutTests/fast/css/content-language-dynamically-removed_t01: RuntimeError
-LayoutTests/fast/css/content-language-multiple_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-02_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-03_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-04_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-crash_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-function-input_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-ruby-text-cleared_t01: RuntimeError
-LayoutTests/fast/css/counters/render-tree-reorg-crash_t01: RuntimeError
-LayoutTests/fast/css/crash-comparing-equal_t01: RuntimeError
-LayoutTests/fast/css/crash-on-gradient-with-derived-color_t01: RuntimeError
-LayoutTests/fast/css/css-selector-deeply-nested_t01: RuntimeError
-LayoutTests/fast/css/css-selector-text_t01: RuntimeError
-LayoutTests/fast/css/css3-nth-space_t01: RuntimeError
-LayoutTests/fast/css/cssText-cache_t01: RuntimeError
-LayoutTests/fast/css/dfn-default-font-style_t01: RuntimeError
-LayoutTests/fast/css/display-inline-block-scrollbar_t01: RuntimeError
-LayoutTests/fast/css/display-none-inline-style-change-crash_t01: RuntimeError
-LayoutTests/fast/css/duplicate-property-in-rule-important_t01: RuntimeError
-LayoutTests/fast/css/duplicate-property-in-rule_t01: RuntimeError
-LayoutTests/fast/css/empty-display-none_t01: RuntimeError
-LayoutTests/fast/css/empty-first-line-crash_t01: RuntimeError
-LayoutTests/fast/css/end-of-buffer-crash_t01: RuntimeError
-LayoutTests/fast/css/ex-unit-with-no-x-height_t01: RuntimeError
-LayoutTests/fast/css/fill-layer-crash_t01: RuntimeError
-LayoutTests/fast/css/first-child-display-change_t01: RuntimeError
-LayoutTests/fast/css/first-letter-anonymous-block-crash_t01: RuntimeError
-LayoutTests/fast/css/first-letter-inline-flow-split-crash_t01: RuntimeError
-LayoutTests/fast/css/first-letter-inline-flow-split-table-crash_t01: RuntimeError
-LayoutTests/fast/css/first-letter-nested_t01: RuntimeError
-LayoutTests/fast/css/first-letter-wbr_t01: RuntimeError
-LayoutTests/fast/css/font-face-descending-unicode-range_t01: RuntimeError
-LayoutTests/fast/css/font-face-font-family-descriptor_t01: RuntimeError
-LayoutTests/fast/css/font-face-html-as-svg_t01: RuntimeError
-LayoutTests/fast/css/font-face-in-media-rule_t01: RuntimeError
-LayoutTests/fast/css/font-face-inherit-initial_t01: RuntimeError
-LayoutTests/fast/css/font-face-multiple-families_t01: RuntimeError
-LayoutTests/fast/css/font-face-unused-source-loaded_t01: RuntimeError
-LayoutTests/fast/css/font-family-initial-shorthand_t01: RuntimeError
-LayoutTests/fast/css/fontfaceset-download-error_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/counterIncrement-without-counter_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/pending-stylesheet_t01: RuntimeError
-LayoutTests/fast/css/id-or-class-before-stylesheet-strict_t01: RuntimeError
-LayoutTests/fast/css/image-set-value-crash-in-fillImageSet_t01: RuntimeError
-LayoutTests/fast/css/important-js-override_t01: RuntimeError
-LayoutTests/fast/css/infinite-floating-value_t01: RuntimeError
-LayoutTests/fast/css/invalid-appearance-progress-bar-meter_t01: RuntimeError
-LayoutTests/fast/css/invalid-cursor-property-crash_t01: RuntimeError
-LayoutTests/fast/css/invalid-parsercontext-valid-keyword-crash_t01: RuntimeError
-LayoutTests/fast/css/invalid-rule-value_t01: RuntimeError
-LayoutTests/fast/css/invalidation/style-update-with-added-stylesheet_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-attribute-style-invalidation_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-id_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-id-style-invalidation_t01: RuntimeError
-LayoutTests/fast/css/large-number-round-trip_t01: RuntimeError
-LayoutTests/fast/css/large-value-csstext_t01: RuntimeError
-LayoutTests/fast/css/many-spaces-before-charset_t01: RuntimeError
-LayoutTests/fast/css/max-height-and-max-width_t01: RuntimeError
-LayoutTests/fast/css/media-rule-screenDepthPerComponent_t01: RuntimeError
-LayoutTests/fast/css/min-max-width_t01: RuntimeError
-LayoutTests/fast/css/misplaced-charset_t01: RuntimeError
-LayoutTests/fast/css/negative-orphans-crash_t01: RuntimeError
-LayoutTests/fast/css/nested-rule-parent-sheet_t01: RuntimeError
-LayoutTests/fast/css/next-sibling-changed_t01: RuntimeError
-LayoutTests/fast/css/nth-child-negative-a-param_t01: RuntimeError
-LayoutTests/fast/css/nth-child-odd-case-insensitive_t01: RuntimeError
-LayoutTests/fast/css/number-parsing-crash-2_t01: RuntimeError
-LayoutTests/fast/css/number-parsing-crash_t01: RuntimeError
-LayoutTests/fast/css/orphaned_units_crash_t01: RuntimeError
-LayoutTests/fast/css/outline-currentcolor_t01: RuntimeError
-LayoutTests/fast/css/outline-hidden-illegal-value_t01: RuntimeError
-LayoutTests/fast/css/outline-invert-assertion_t01: RuntimeError
-LayoutTests/fast/css/outline-offset-crash_t01: RuntimeError
-LayoutTests/fast/css/parse-color-int-or-percent-crash_t01: RuntimeError
-LayoutTests/fast/css/parse-timing-function-crash_t01: RuntimeError
-LayoutTests/fast/css/parsing-css-nonascii_t01: RuntimeError
-LayoutTests/fast/css/parsing-not-after-supports_t01: RuntimeError
-LayoutTests/fast/css/parsing-object-fit_t01: RuntimeError
-LayoutTests/fast/css/pending-images-crash_t01: RuntimeError
-LayoutTests/fast/css/positioned-in-relative-position-inline-crash_t01: RuntimeError
-LayoutTests/fast/css/pseudo-default-003_t01: RuntimeError
-LayoutTests/fast/css/pseudo-default-004_t01: RuntimeError
-LayoutTests/fast/css/pseudo-element-opagedxy-crash_t01: RuntimeError
-LayoutTests/fast/css/pseudo-empty-dynamic-empty_t01: RuntimeError
-LayoutTests/fast/css/pseudo-in-range-invalid-value_t01: RuntimeError
-LayoutTests/fast/css/pseudo-in-range_t01: RuntimeError
-LayoutTests/fast/css/pseudo-invalid-002_t01: RuntimeError
-LayoutTests/fast/css/pseudo-out-of-range_t01: RuntimeError
-LayoutTests/fast/css/pseudo-valid-001_t01: RuntimeError
-LayoutTests/fast/css/pseudo-valid-004_t01: RuntimeError
-LayoutTests/fast/css/pseudo-valid-007_t01: RuntimeError
-LayoutTests/fast/css/pseudo-valid-dynamic_t01: RuntimeError
-LayoutTests/fast/css/pseudostyle-anonymous-text_t01: RuntimeError
-LayoutTests/fast/css/recursive-delay-update-scroll_t01: RuntimeError
-LayoutTests/fast/css/relative-position-replaced-in-table-display-crash_t01: RuntimeError
-LayoutTests/fast/css/rem-units-body_t01: RuntimeError
-LayoutTests/fast/css/remove-class-name_t01: RuntimeError
-LayoutTests/fast/css/remove-style-after-insert-import-rule-crash_t01: RuntimeError
-LayoutTests/fast/css/resize-object-crash_t01: RuntimeError
-LayoutTests/fast/css/selector-text-escape_t01: RuntimeError
-LayoutTests/fast/css/sheet-title_t01: RuntimeError
-LayoutTests/fast/css/shorthands-four-values_t01: RuntimeError
-LayoutTests/fast/css/sibling-selectors-dynamic_t01: RuntimeError
-LayoutTests/fast/css/space-before-charset_t01: RuntimeError
-LayoutTests/fast/css/sticky/sticky-table-col-crash_t01: RuntimeError
-LayoutTests/fast/css/string-quote-binary_t01: RuntimeError
-LayoutTests/fast/css/style-sharing-inline-stylesheet_t01: RuntimeError
-LayoutTests/fast/css/use-incorrect-svg-crash_t01: RuntimeError
-LayoutTests/fast/css/visited-link-hang_t01: RuntimeError
-LayoutTests/fast/css/webfont-lighter-weight-crash_t01: RuntimeError
-LayoutTests/fast/css/webkit-marquee-speed-unit-in-quirksmode_t01: RuntimeError
-LayoutTests/fast/dom/DOMException/prototype-object_t01: RuntimeError
-LayoutTests/fast/dom/Document/replace-child_t01: RuntimeError
-LayoutTests/fast/dom/Document/title-property-creates-title-element_t01: RuntimeError
-LayoutTests/fast/dom/Document/title-property-set-multiple-times_t01: RuntimeError
-LayoutTests/fast/dom/Element/class-name_t01: RuntimeError
-LayoutTests/fast/dom/Element/hostname-host_t01: RuntimeError
-LayoutTests/fast/dom/Element/id-in-map_t01: RuntimeError
-LayoutTests/fast/dom/Element/id-in-param_t01: RuntimeError
-LayoutTests/fast/dom/Element/node-list-identity_t01: RuntimeError
-LayoutTests/fast/dom/Element/remove_t01: RuntimeError
-LayoutTests/fast/dom/Element/setAttribute-with-colon_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/anchor-ismap-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/get-href-attribute-port_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-whitespace_t01: RuntimeError
-LayoutTests/fast/dom/HTMLBaseElement/multiple-base-elements_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/activeElement_t01: RuntimeError
-LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1_t01: RuntimeError
-LayoutTests/fast/dom/HTMLFormElement/htmlformelement-indexed-getter_t01: RuntimeError
-LayoutTests/fast/dom/HTMLHtmlElement/duplicate-html-element-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/constructor-mutation-event-dispatch_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-src-absolute-url_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/cloned-input-checked-state_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/size-attribute_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/focus-label_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-beforeload_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-too-many-clients_t01: RuntimeError
-LayoutTests/fast/dom/HTMLMetaElement/meta-attributes_t01: RuntimeError
-LayoutTests/fast/dom/HTMLObjectElement/set-type-to-null-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/progress-element-indeterminate-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/isURLAttribute_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/script-async-attr_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/listbox-select-reset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/named-options_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/select-element-item-argument_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/insert-parser-generated_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/programmatically-add-style-with-onload-handler_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/style-onerror_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/style-onload-before-page-load_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/early-acid3-66-excerpt_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/table-with-invalid-border_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableRowElement/cells_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/inertContents_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/no-form-association_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/callback-arguments_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/cross-document_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/disconnect-cancel-pending_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/mutate-during-delivery_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/mutation-record-nullity_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-characterdata_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/NodeIterator/NodeIterator-basic_t01: RuntimeError
-LayoutTests/fast/dom/NodeList/nodelist-reachable_t01: RuntimeError
-LayoutTests/fast/dom/Range-insertNode-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/13000_t01: RuntimeError
-LayoutTests/fast/dom/Range/create-contextual-fragment-script-not-ran_t01: RuntimeError
-LayoutTests/fast/dom/Range/create-contextual-fragment_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-clone-empty_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-delete-contents-mutation-event-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-extract-contents-event-fire-crash2_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-extract-contents_t01: RuntimeError
-LayoutTests/fast/dom/Range/remove-all-children-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/remove-twice-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/select-node-different-document_t01: RuntimeError
-LayoutTests/fast/dom/Range/split-text-in-range_t01: RuntimeError
-LayoutTests/fast/dom/Range/surroundContents-1_t01: RuntimeError
-LayoutTests/fast/dom/Range/surroundContents-check-boundary-points_t01: RuntimeError
-LayoutTests/fast/dom/Selection/collapseToX-empty-selection_t01: RuntimeError
-LayoutTests/fast/dom/Selection/getRangeAt_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/caseID-almost-strict_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/caseID-strict_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/dumpNodeList-2_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/dumpNodeList-almost-strict_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/duplicate-id-scope_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/elementRoot_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/id-fastpath-almost-strict_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/id-fastpath_t01: RuntimeError
-LayoutTests/fast/dom/Text/next-element-sibling_t01: RuntimeError
-LayoutTests/fast/dom/Text/normalize-crash-in-spell-checker_t01: RuntimeError
-LayoutTests/fast/dom/Text/remove_t01: RuntimeError
-LayoutTests/fast/dom/Text/replaceWholeText_t01: RuntimeError
-LayoutTests/fast/dom/Window/atob-btoa_t01: RuntimeError
-LayoutTests/fast/dom/Window/console-functions_t01: RuntimeError
-LayoutTests/fast/dom/Window/dispatchEvent_t01: RuntimeError
-LayoutTests/fast/dom/Window/querySelectorAll-with-pseudo-elements_t01: RuntimeError
-LayoutTests/fast/dom/Window/window-remove-event-listener_t01: RuntimeError
-LayoutTests/fast/dom/Window/window-screen-properties_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-attribute-namespaces_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-doctype2_t01: RuntimeError
-LayoutTests/fast/dom/anchor-text_t01: RuntimeError
-LayoutTests/fast/dom/clone-node-default-argument_t01: RuntimeError
-LayoutTests/fast/dom/clone-node-form-elements_t01: RuntimeError
-LayoutTests/fast/dom/clone-node-style_t01: RuntimeError
-LayoutTests/fast/dom/clone-node-z-index_t01: RuntimeError
-LayoutTests/fast/dom/cloneNode_t01: RuntimeError
-LayoutTests/fast/dom/comment-dom-node_t01: RuntimeError
-LayoutTests/fast/dom/computed-style-set-property_t01: RuntimeError
-LayoutTests/fast/dom/createDocumentType-ownerDocument_t01: RuntimeError
-LayoutTests/fast/dom/createDocumentType_t01: RuntimeError
-LayoutTests/fast/dom/createElement-with-column_t01: RuntimeError
-LayoutTests/fast/dom/createElement-with-column_xml_t01: RuntimeError
-LayoutTests/fast/dom/createElementNS-namespace-errors_t01: RuntimeError
-LayoutTests/fast/dom/css-inline-style-declaration-crash_t01: RuntimeError
-LayoutTests/fast/dom/css-mediarule-deleteRule-update_t01: RuntimeError
-LayoutTests/fast/dom/custom/html-element-type-extension-assert_t01: RuntimeError
-LayoutTests/fast/dom/custom/type-extension-undo-assert_t01: RuntimeError
-LayoutTests/fast/dom/delete-contents_t01: RuntimeError
-LayoutTests/fast/dom/destroy-selected-radio-button-crash_t01: RuntimeError
-LayoutTests/fast/dom/document-set-title-no-child-on-empty_t01: RuntimeError
-LayoutTests/fast/dom/dom-method-document-change_t01: RuntimeError
-LayoutTests/fast/dom/duplicate-ids-document-order_t01: RuntimeError
-LayoutTests/fast/dom/elementFromPoint-scaled-scrolled_t01: RuntimeError
-LayoutTests/fast/dom/getElementById-consistency3_t01: RuntimeError
-LayoutTests/fast/dom/getElementById-consistency5_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/002_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/005_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/008_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/013_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/015_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/dumpNodeList_t01: RuntimeError
-LayoutTests/fast/dom/getelementsbyname-invalidation-cache_t01: RuntimeError
-LayoutTests/fast/dom/htmlcollection-namedItem_t01: RuntimeError
-LayoutTests/fast/dom/icon-size-property_t01: RuntimeError
-LayoutTests/fast/dom/icon-url-change_t01: RuntimeError
-LayoutTests/fast/dom/implementation-api-args_t01: RuntimeError
-LayoutTests/fast/dom/implementation-createHTMLDocument_t01: RuntimeError
-LayoutTests/fast/dom/import-document-fragment_t01: RuntimeError
-LayoutTests/fast/dom/importNodeXML_t01: RuntimeError
-LayoutTests/fast/dom/insert-span-into-long-text-bug-28245_t01: RuntimeError
-LayoutTests/fast/dom/left-overflow-in-ltr_t01: RuntimeError
-LayoutTests/fast/dom/move-style-element-to-inactive-document-crash_t01: RuntimeError
-LayoutTests/fast/dom/mutation-event-remove-inserted-node_t01: RuntimeError
-LayoutTests/fast/dom/no-elements_t01: RuntimeError
-LayoutTests/fast/dom/noscript-canvas-in-created-html-document_t01: RuntimeError
-LayoutTests/fast/dom/noscript-style_t01: RuntimeError
-LayoutTests/fast/dom/object-plugin-hides-properties_t01: RuntimeError
-LayoutTests/fast/dom/offset-parent-positioned-and-inline_t01: RuntimeError
-LayoutTests/fast/dom/onerror-img_t01: RuntimeError
-LayoutTests/fast/dom/partial-layout-block_t01: RuntimeError
-LayoutTests/fast/dom/remove-children-notification-order_t01: RuntimeError
-LayoutTests/fast/dom/remove-named-attribute-crash_t01: RuntimeError
-LayoutTests/fast/dom/replace-first-child_t01: RuntimeError
-LayoutTests/fast/dom/setAttribute-using-initial-input-value_t01: RuntimeError
-LayoutTests/fast/dom/setAttributeNS-namespace-errors_t01: RuntimeError
-LayoutTests/fast/dom/setter-type-enforcement_t01: RuntimeError
-LayoutTests/fast/dom/shadow/event-path_t01: RuntimeError
-LayoutTests/fast/dom/shadow/ol-with-distribution-recalc-crash_t01: RuntimeError
-LayoutTests/fast/dom/shared-inline-style-after-node-removal_t01: RuntimeError
-LayoutTests/fast/dom/stripNullFromTextNodes_t01: RuntimeError
-LayoutTests/fast/dom/text-control-crash-on-select_t01: RuntimeError
-LayoutTests/fast/dom/title-content-set-innerText-get_t01: RuntimeError
-LayoutTests/fast/dom/xhtml-fragment-parsing-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/xmlserializer-serialize-to-string-exception_t01: RuntimeError
-LayoutTests/fast/dynamic/5872671_t01: RuntimeError
-LayoutTests/fast/dynamic/float-remove-above-line-2_t01: RuntimeError
-LayoutTests/fast/dynamic/insertAdjacentHTML-allowed-parents_t01: RuntimeError
-LayoutTests/fast/dynamic/insertAdjacentHTML_t01: RuntimeError
-LayoutTests/fast/dynamic/insertAdjacentText_t01: RuntimeError
-LayoutTests/fast/dynamic/position-absolute-to-fixed-crash_t01: RuntimeError
-LayoutTests/fast/events/dispatch-event-no-document_t01: RuntimeError
-LayoutTests/fast/events/dispatch-synthetic-mouseevent_t01: RuntimeError
-LayoutTests/fast/events/domnodeinsertedintodocument-dispatched-post-rendering_t01: RuntimeError
-LayoutTests/fast/events/event-listener-sharing_t01: RuntimeError
-LayoutTests/fast/events/event-on-created-document_t01: RuntimeError
-LayoutTests/fast/events/focus-remove-focuesed-node_t01: RuntimeError
-LayoutTests/fast/events/init-event-null-view_t01: RuntimeError
-LayoutTests/fast/events/initkeyboardevent-crash_t01: RuntimeError
-LayoutTests/fast/events/keyboardevent-mousedown-crash_t01: RuntimeError
-LayoutTests/fast/events/onerror-img-after-gc_t01: RuntimeError
-LayoutTests/fast/events/page-visibility-null-view_t01: RuntimeError
-LayoutTests/fast/events/programmatic-check-no-change-event_t01: RuntimeError
-LayoutTests/fast/events/scroll-event-phase_t01: RuntimeError
-LayoutTests/fast/events/stop-immediate-propagation_t01: RuntimeError
-LayoutTests/fast/events/stopPropagation-checkbox_t01: RuntimeError
-LayoutTests/fast/events/submit-reset-nested-bubble_t01: RuntimeError
-LayoutTests/fast/files/file-reader-immediate-abort_t01: RuntimeError
-LayoutTests/fast/files/file-reader-methods-illegal-arguments_t01: RuntimeError
-LayoutTests/fast/files/not-enough-arguments_t01: RuntimeError
-LayoutTests/fast/files/revoke-blob-url_t01: RuntimeError
-LayoutTests/fast/filesystem/input-access-entries_t01: RuntimeError
-LayoutTests/fast/flexbox/child-flexing_t01: RuntimeError
-LayoutTests/fast/flexbox/crash-anonymous-box_t01: RuntimeError
-LayoutTests/fast/flexbox/crash-button-keygen_t01: RuntimeError
-LayoutTests/fast/flexbox/crash-button-relayout_t01: RuntimeError
-LayoutTests/fast/flexbox/crash-flexbox-no-layout-child_t01: RuntimeError
-LayoutTests/fast/flexbox/layoutHorizontalBox-crash_t01: RuntimeError
-LayoutTests/fast/flexbox/line-clamp-crash_t01: RuntimeError
-LayoutTests/fast/flexbox/overhanging-floats-not-removed-crash_t01: RuntimeError
-LayoutTests/fast/forms/HTMLOptionElement_selected_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-patternMismatch-unsupported_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-removed-control_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-stepMismatch_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-005_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-009_t01: RuntimeError
-LayoutTests/fast/forms/activate-and-disabled-elements_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-attribute_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-opera-008_t01: RuntimeError
-LayoutTests/fast/forms/checkValidity-001_t01: RuntimeError
-LayoutTests/fast/forms/checkValidity-002_t01: RuntimeError
-LayoutTests/fast/forms/checkValidity-004_t01: RuntimeError
-LayoutTests/fast/forms/checkValidity-cancel_t01: RuntimeError
-LayoutTests/fast/forms/checkbox-click-indeterminate_t01: RuntimeError
-LayoutTests/fast/forms/checkbox-onchange_t01: RuntimeError
-LayoutTests/fast/forms/datalist/datalist-nonoption-child_t01: RuntimeError
-LayoutTests/fast/forms/datalist/slider-appearance-with-ticks-crash_t01: RuntimeError
-LayoutTests/fast/forms/date/date-click-on-label_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-interactive-validation-required_t01: RuntimeError
-LayoutTests/fast/forms/disabled-attr-checkvalidity_t01: RuntimeError
-LayoutTests/fast/forms/enctype-attribute_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/fieldset-crash_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/focus-in-fieldset-disabled_t01: RuntimeError
-LayoutTests/fast/forms/file/file-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/formmethod-attribute-button-html_t01: RuntimeError
-LayoutTests/fast/forms/formmethod-attribute-input-2_t01: RuntimeError
-LayoutTests/fast/forms/formmethod-attribute-input-html_t01: RuntimeError
-LayoutTests/fast/forms/formnovalidate-attribute_t01: RuntimeError
-LayoutTests/fast/forms/hidden-input-enabled_t01: RuntimeError
-LayoutTests/fast/forms/hidden/change-type-to-hidden-after-updating-value_t01: RuntimeError
-LayoutTests/fast/forms/hidden/hidden-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/image/image-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/input-minmax_t01: RuntimeError
-LayoutTests/fast/forms/input-pattern_t01: RuntimeError
-LayoutTests/fast/forms/input-selection-hidden_t01: RuntimeError
-LayoutTests/fast/forms/input-setvalue-selection_t01: RuntimeError
-LayoutTests/fast/forms/input-stepup-stepdown_t01: RuntimeError
-LayoutTests/fast/forms/input-text-maxlength_t01: RuntimeError
-LayoutTests/fast/forms/input-type-change3_t01: RuntimeError
-LayoutTests/fast/forms/input-valueasnumber-unsupported_t01: RuntimeError
-LayoutTests/fast/forms/input-width-height-attributes-without-renderer_t01: RuntimeError
-LayoutTests/fast/forms/input-zero-height-focus_t01: RuntimeError
-LayoutTests/fast/forms/interactive-validation-assertion-by-validate-twice_t01: RuntimeError
-LayoutTests/fast/forms/interactive-validation-attach-assertion_t01: RuntimeError
-LayoutTests/fast/forms/large-parts_t01: RuntimeError
-LayoutTests/fast/forms/legend-display-none_t01: RuntimeError
-LayoutTests/fast/forms/menulist-no-renderer-onmousedown_t01: RuntimeError
-LayoutTests/fast/forms/missing-action_t01: RuntimeError
-LayoutTests/fast/forms/novalidate-attribute_t01: RuntimeError
-LayoutTests/fast/forms/option-index_t01: RuntimeError
-LayoutTests/fast/forms/pattern-attribute-001_t01: RuntimeError
-LayoutTests/fast/forms/pattern-attribute-003_t01: RuntimeError
-LayoutTests/fast/forms/required-attribute-001_t01: RuntimeError
-LayoutTests/fast/forms/select-change-listbox-to-popup-roundtrip_t01: RuntimeError
-LayoutTests/fast/forms/select-reset-multiple-selections-4-single-selection_t01: RuntimeError
-LayoutTests/fast/forms/select-reset_t01: RuntimeError
-LayoutTests/fast/forms/select-set-length-with-mutation-reorder_t01: RuntimeError
-LayoutTests/fast/forms/select-set-length-with-mutation-reparent_t01: RuntimeError
-LayoutTests/fast/forms/select-set-length-with-mutation_t01: RuntimeError
-LayoutTests/fast/forms/select-set-length_t01: RuntimeError
-LayoutTests/fast/forms/select-width-font-change_t01: RuntimeError
-LayoutTests/fast/forms/selected-index-assert_t01: RuntimeError
-LayoutTests/fast/forms/setCustomValidity_t01: RuntimeError
-LayoutTests/fast/forms/text-control-select-blurred_t01: RuntimeError
-LayoutTests/fast/forms/textarea-and-mutation-events-appending-text_t01: RuntimeError
-LayoutTests/fast/forms/textarea-default-value-leading-newline_t01: RuntimeError
-LayoutTests/fast/forms/textarea-initial-caret-position_t01: RuntimeError
-LayoutTests/fast/forms/textarea-newline_t01: RuntimeError
-LayoutTests/fast/forms/textarea-scrollbar-height_t01: RuntimeError
-LayoutTests/fast/forms/textarea-setvalue-without-renderer_t01: RuntimeError
-LayoutTests/fast/forms/textarea-wrap-attribute_t01: RuntimeError
-LayoutTests/fast/forms/update-from-element-during-editing-crash-1_t01: RuntimeError
-LayoutTests/fast/forms/update-from-element-during-editing-crash-2_t01: RuntimeError
-LayoutTests/fast/html/clone-range_t01: RuntimeError
-LayoutTests/fast/html/hidden-attr-dom_t01: RuntimeError
-LayoutTests/fast/html/input-type-change-crash_t01: RuntimeError
-LayoutTests/fast/html/numbered-header-element_t01: RuntimeError
-LayoutTests/fast/html/range-point-in-range-for-different-documents_t01: RuntimeError
-LayoutTests/fast/html/tabindex-removal_t01: RuntimeError
-LayoutTests/fast/html/text-field-input-types_t01: RuntimeError
-LayoutTests/fast/html/unknown-tag_t01: RuntimeError
-LayoutTests/fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor_t01: RuntimeError
-LayoutTests/fast/inline/skipped-whitespace-client-rect_t01: RuntimeError
-LayoutTests/fast/innerHTML/005_t01: RuntimeError
-LayoutTests/fast/innerHTML/additional-inline-style_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-iframe_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-nbsp_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-special-elements_t01: RuntimeError
-LayoutTests/fast/loader/hashchange-event-properties_t01: RuntimeError
-LayoutTests/fast/loader/loadInProgress_t01: RuntimeError
-LayoutTests/fast/loader/onload-policy-ignore-for-frame_t01: RuntimeError
-LayoutTests/fast/loader/stateobjects/pushstate-updates-location_t01: RuntimeError
-LayoutTests/fast/loader/stateobjects/replacestate-updates-location_t01: RuntimeError
-LayoutTests/fast/media/color-does-not-include-alpha_t01: RuntimeError
-LayoutTests/fast/media/mq-color-index_t01: RuntimeError
-LayoutTests/fast/media/mq-js-media-except_t01: RuntimeError
-LayoutTests/fast/media/mq-js-media-except_t02: RuntimeError
-LayoutTests/fast/media/mq-parsing_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance-maxheight_t02: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t07: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t09: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/image-inside-nested-blocks-with-border_t01: RuntimeError
-LayoutTests/fast/multicol/widows-and-orphans_t01: RuntimeError
-LayoutTests/fast/multicol/widows_t02: RuntimeError
-LayoutTests/fast/parser/foster-parent-adopted_t01: RuntimeError
-LayoutTests/fast/parser/pop-all-after-after-body_t01: RuntimeError
-LayoutTests/fast/parser/pre-first-line-break_t01: RuntimeError
-LayoutTests/fast/parser/stray-end-tags-with-attributes-002-alt_t01: RuntimeError
-LayoutTests/fast/replaced/table-replaced-element_t01: RuntimeError
-LayoutTests/fast/ruby/modify-positioned-ruby-text-crash_t01: RuntimeError
-LayoutTests/fast/scrolling/scroll-max-value_t01: RuntimeError
-LayoutTests/fast/selectors/style-sharing-adjacent-selector_t01: RuntimeError
-LayoutTests/fast/sub-pixel/float-containing-block-with-margin_t01: RuntimeError
-LayoutTests/fast/sub-pixel/float-list-inside_t01: RuntimeError
-LayoutTests/fast/sub-pixel/float-with-margin-in-container_t01: RuntimeError
-LayoutTests/fast/sub-pixel/float-with-right-margin-zoom_t01: RuntimeError
-LayoutTests/fast/sub-pixel/layout-boxes-with-zoom_t01: RuntimeError
-LayoutTests/fast/sub-pixel/replaced-element-baseline_t01: RuntimeError
-LayoutTests/fast/sub-pixel/size-of-span-with-different-positions_t01: RuntimeError
-LayoutTests/fast/sub-pixel/table-cells-with-padding-do-not-wrap_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-length-invalid_t01: RuntimeError
-LayoutTests/fast/table/auto-table-layout-colgroup-removal-crash_t01: RuntimeError
-LayoutTests/fast/table/col-width-span-expand_t01: RuntimeError
-LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01: RuntimeError
-LayoutTests/fast/table/resize-table-binding-cell_t01: RuntimeError
-LayoutTests/fast/table/table-sections-border-spacing_t01: RuntimeError
-LayoutTests/fast/text-autosizing/display-type-change-lineHeight_t01: RuntimeError
-LayoutTests/fast/text-autosizing/inline-width_t01: RuntimeError
-LayoutTests/fast/text/find-backwards_t01: RuntimeError
-LayoutTests/fast/text/find-quotes_t01: RuntimeError
-LayoutTests/fast/text/font-fallback-synthetic-italics_t01: RuntimeError
-LayoutTests/fast/text/font-linux-normalize_t01: RuntimeError
-LayoutTests/fast/text/international/complex-text-rectangle_t01: RuntimeError
-LayoutTests/fast/text/international/rtl-text-wrapping_t01: RuntimeError
-LayoutTests/fast/text/ipa-tone-letters_t01: RuntimeError
-LayoutTests/fast/text/justification-padding-mid-word_t01: RuntimeError
-LayoutTests/fast/text/line-breaks-after-ideographic-comma-or-full-stop_t01: RuntimeError
-LayoutTests/fast/text/line-breaks-after-ideographic-comma-or-full-stop_t02: RuntimeError
-LayoutTests/fast/text/regional-indicator-symobls_t01: RuntimeError
-LayoutTests/fast/text/split-text-crash_t01: RuntimeError
-LayoutTests/fast/text/text-between-two-brs-in-nowrap-overflow_t01: RuntimeError
-LayoutTests/fast/text/whitespace/nowrap-line-break-after-white-space_t01: RuntimeError
-LayoutTests/fast/tokenizer/entities_t01: RuntimeError
-LayoutTests/fast/transforms/scrollIntoView-transformed_t01: RuntimeError
-LayoutTests/fast/url/scheme_t01: RuntimeError
-LayoutTests/fast/writing-mode/broken-ideographic-font_t01: RuntimeError
-LayoutTests/fast/writing-mode/percentage-margins-absolute-replaced_t01: RuntimeError
-LayoutTests/fast/writing-mode/percentage-margins-absolute_t01: RuntimeError
-LayoutTests/fast/writing-mode/relative-positioning-percentages_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/null-document-xmlhttprequest-open_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-bad-mimetype_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-get_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-invalid-values_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-no-responsetype_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-before-open_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/kd_20010423_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/rs_20010831_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/sr_20021217_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_boolean_expr_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_location_path_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_predicate_list_t01: RuntimeError
-LayoutTests/fast/xpath/ancestor-axis_t01: RuntimeError
-LayoutTests/fast/xpath/detached-subtree-invalidate-iterator_t01: RuntimeError
-LayoutTests/fast/xpath/evaluator-exceptions_t01: RuntimeError
-LayoutTests/fast/xpath/name-null-namespace_t01: RuntimeError
-LayoutTests/fast/xpath/nodeset-duplicates_t01: RuntimeError
-LayoutTests/fast/xpath/substring-after_t01: RuntimeError
-LayoutTests/fast/xpath/substring-non-positive-postion_t01: RuntimeError
-LayoutTests/fast/xpath/xpath-empty-string_t01: RuntimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t01: RuntimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t02: RuntimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t04: RuntimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t05: RuntimeError
-LibTest/html/CanvasRenderingContext2D/arc_A01_t01: RuntimeError
-LibTest/html/Document/addEventListener_A01_t01: RuntimeError
-LibTest/html/Document/adoptNode_A01_t01: RuntimeError
-LibTest/html/Document/append_A01_t01: RuntimeError
-LibTest/html/Document/append_A02_t01: RuntimeError
-LibTest/html/Document/append_A02_t02: RuntimeError
-LibTest/html/Document/childNodes_A01_t01: RuntimeError
-LibTest/html/Document/contains_A01_t02: RuntimeError
-LibTest/html/Document/createDocumentFragment_A01_t01: RuntimeError
-LibTest/html/Document/createElement_A01_t01: RuntimeError
-LibTest/html/Document/dispatchEvent_A01_t01: RuntimeError
-LibTest/html/Document/documentElement_A01_t01: RuntimeError
-LibTest/html/Document/firstChild_A01_t01: RuntimeError
-LibTest/html/Document/getElementById_A01_t01: RuntimeError
-LibTest/html/Document/getElementsByClassName_A01_t01: RuntimeError
-LibTest/html/Document/getElementsByName_A01_t01: RuntimeError
-LibTest/html/Document/getElementsByTagName_A01_t01: RuntimeError
-LibTest/html/Document/hasChildNodes_A01_t01: RuntimeError
-LibTest/html/Document/importNode_A01_t01: RuntimeError
-LibTest/html/Document/insertAllBefore_A01_t01: RuntimeError
-LibTest/html/Document/insertAllBefore_A02_t01: RuntimeError
-LibTest/html/Document/insertBefore_A01_t01: RuntimeError
-LibTest/html/Document/insertBefore_A02_t01: RuntimeError
-LibTest/html/Document/lastChild_A01_t01: RuntimeError
-LibTest/html/Document/nodeName_A01_t01: RuntimeError
-LibTest/html/Document/nodeType_A01_t01: RuntimeError
-LibTest/html/Document/nodes_A01_t01: RuntimeError
-LibTest/html/Document/on_A01_t01: RuntimeError
-LibTest/html/Document/on_A01_t02: RuntimeError
-LibTest/html/Document/querySelectorAll_A01_t01: RuntimeError
-LibTest/html/Document/querySelector_A01_t01: RuntimeError
-LibTest/html/Document/readyState_A01_t01: RuntimeError
-LibTest/html/Document/removeEventListener_A01_t01: RuntimeError
-LibTest/html/Document/window_A01_t01: RuntimeError
-LibTest/html/Element/Element.html_A01_t01: RuntimeError
-LibTest/html/Element/Element.html_A02_t01: RuntimeError
-LibTest/html/Element/Element.html_A03_t01: RuntimeError
-LibTest/html/Element/Element.html_A04_t01: RuntimeError
-LibTest/html/Element/Element.html_A04_t02: RuntimeError
-LibTest/html/Element/Element.tag_A01_t02: RuntimeError
-LibTest/html/Element/Element_element_ctors_A01_t01: RuntimeError
-LibTest/html/Element/abortEvent_A01_t01: RuntimeError
-LibTest/html/Element/addEventListener_A01_t01: RuntimeError
-LibTest/html/Element/addEventListener_A01_t02: RuntimeError
-LibTest/html/Element/addEventListener_A01_t04: RuntimeError
-LibTest/html/Element/addEventListener_A01_t05: RuntimeError
-LibTest/html/Element/addEventListener_A01_t06: RuntimeError
-LibTest/html/Element/appendHtml_A01_t01: RuntimeError
-LibTest/html/Element/appendText_A01_t01: RuntimeError
-LibTest/html/Element/append_A01_t01: RuntimeError
-LibTest/html/Element/append_A02_t01: RuntimeError
-LibTest/html/Element/append_A02_t02: RuntimeError
-LibTest/html/Element/attributes_A01_t01: RuntimeError
-LibTest/html/Element/attributes_A02_t01: RuntimeError
-LibTest/html/Element/beforeCopyEvent_A01_t01: RuntimeError
-LibTest/html/Element/beforeCutEvent_A01_t01: RuntimeError
-LibTest/html/Element/beforePasteEvent_A01_t01: RuntimeError
-LibTest/html/Element/blurEvent_A01_t01: RuntimeError
-LibTest/html/Element/changeEvent_A01_t01: RuntimeError
-LibTest/html/Element/childNodes_A01_t01: RuntimeError
-LibTest/html/Element/childNodes_A01_t02: RuntimeError
-LibTest/html/Element/children_A01_t01: RuntimeError
-LibTest/html/Element/children_A01_t02: RuntimeError
-LibTest/html/Element/className_A01_t01: RuntimeError
-LibTest/html/Element/classes_A01_t01: RuntimeError
-LibTest/html/Element/click_A01_t01: RuntimeError
-LibTest/html/Element/clone_A01_t01: RuntimeError
-LibTest/html/Element/clone_A01_t02: RuntimeError
-LibTest/html/Element/clone_A02_t01: RuntimeError
-LibTest/html/Element/clone_A03_t01: RuntimeError
-LibTest/html/Element/contains_A01_t01: RuntimeError
-LibTest/html/Element/contains_A01_t02: RuntimeError
-LibTest/html/Element/contains_A01_t03: RuntimeError
-LibTest/html/Element/contentEditable_A01_t01: RuntimeError
-LibTest/html/Element/contentEditable_A01_t02: RuntimeError
-LibTest/html/Element/createFragment_A01_t01: RuntimeError
-LibTest/html/Element/createFragment_A01_t02: RuntimeError
-LibTest/html/Element/createFragment_A01_t03: RuntimeError
-LibTest/html/Element/dataset_A01_t01: RuntimeError
-LibTest/html/Element/dataset_A01_t02: RuntimeError
-LibTest/html/Element/dir_A01_t01: RuntimeError
-LibTest/html/Element/dir_A01_t02: RuntimeError
-LibTest/html/Element/documentOffset_A01_t01: RuntimeError
-LibTest/html/Element/doubleClickEvent_A01_t01: RuntimeError
-LibTest/html/Element/draggable_A01_t01: RuntimeError
-LibTest/html/Element/draggable_A01_t02: RuntimeError
-LibTest/html/Element/errorEvent_A01_t01: RuntimeError
-LibTest/html/Element/firstChild_A01_t01: RuntimeError
-LibTest/html/Element/focusEvent_A01_t01: RuntimeError
-LibTest/html/Element/fullscreenChangeEvent_A01_t01: RuntimeError
-LibTest/html/Element/fullscreenErrorEvent_A01_t01: RuntimeError
-LibTest/html/Element/getAttributeNS_A02_t01: RuntimeError
-LibTest/html/Element/getAttribute_A01_t01: RuntimeError
-LibTest/html/Element/getBoundingClientRect_A01_t01: RuntimeError
-LibTest/html/Element/getBoundingClientRect_A01_t02: RuntimeError
-LibTest/html/Element/getClientRects_A01_t01: RuntimeError
-LibTest/html/Element/getElementsByClassName_A01_t01: RuntimeError
-LibTest/html/Element/getElementsByClassName_A02_t01: RuntimeError
-LibTest/html/Element/hasChildNodes_A01_t01: RuntimeError
-LibTest/html/Element/hidden_A01_t01: RuntimeError
-LibTest/html/Element/id_A01_t01: RuntimeError
-LibTest/html/Element/innerHtml_A01_t01: RuntimeError
-LibTest/html/Element/innerHtml_A02_t01: RuntimeError
-LibTest/html/Element/inputEvent_A01_t01: RuntimeError
-LibTest/html/Element/insertAdjacentElement_A01_t01: RuntimeError
-LibTest/html/Element/insertAdjacentHtml_A01_t01: RuntimeError
-LibTest/html/Element/insertAdjacentText_A01_t01: RuntimeError
-LibTest/html/Element/insertAllBefore_A01_t01: RuntimeError
-LibTest/html/Element/insertAllBefore_A02_t01: RuntimeError
-LibTest/html/Element/insertBefore_A01_t01: RuntimeError
-LibTest/html/Element/insertBefore_A02_t01: RuntimeError
-LibTest/html/Element/invalidEvent_A01_t01: RuntimeError
-LibTest/html/Element/isContentEditable_A01_t01: RuntimeError
-LibTest/html/Element/isTagSupported_A01_t02: RuntimeError
-LibTest/html/Element/isTagSupported_A01_t03: RuntimeError
-LibTest/html/Element/keyDownEvent_A01_t01: RuntimeError
-LibTest/html/Element/keyPressEvent_A01_t01: RuntimeError
-LibTest/html/Element/keyUpEvent_A01_t01: RuntimeError
-LibTest/html/Element/lang_A01_t01: RuntimeError
-LibTest/html/Element/lang_A01_t02: RuntimeError
-LibTest/html/Element/lastChild_A01_t01: RuntimeError
-LibTest/html/Element/matchesWithAncestors_A01_t01: RuntimeError
-LibTest/html/Element/matches_A01_t01: RuntimeError
-LibTest/html/Element/mouseDownEvent_A01_t01: RuntimeError
-LibTest/html/Element/mouseEnterEvent_A01_t01: RuntimeError
-LibTest/html/Element/mouseLeaveEvent_A01_t01: RuntimeError
-LibTest/html/Element/mouseMoveEvent_A01_t01: RuntimeError
-LibTest/html/Element/mouseOutEvent_A01_t01: RuntimeError
-LibTest/html/Element/mouseOverEvent_A01_t01: RuntimeError
-LibTest/html/Element/mouseUpEvent_A01_t01: RuntimeError
-LibTest/html/Element/namespaceUri_A01_t01: RuntimeError
-LibTest/html/Element/nextElementSibling_A01_t01: RuntimeError
-LibTest/html/Element/nextNode_A01_t01: RuntimeError
-LibTest/html/Element/nodeName_A03_t01: RuntimeError
-LibTest/html/Element/nodeName_A04_t01: RuntimeError
-LibTest/html/Element/nodeName_A05_t01: RuntimeError
-LibTest/html/Element/nodeName_A06_t01: RuntimeError
-LibTest/html/Element/nodeName_A07_t01: RuntimeError
-LibTest/html/Element/nodeName_A12_t01: RuntimeError
-LibTest/html/Element/nodes_A01_t01: RuntimeError
-LibTest/html/Element/nodes_A01_t02: RuntimeError
-LibTest/html/Element/offsetHeight_A01_t01: RuntimeError
-LibTest/html/Element/offsetLeft_A01_t01: RuntimeError
-LibTest/html/Element/offsetParent_A01_t01: RuntimeError
-LibTest/html/Element/offsetTo_A01_t01: RuntimeError
-LibTest/html/Element/offsetTo_A01_t02: RuntimeError
-LibTest/html/Element/offsetTop_A01_t01: RuntimeError
-LibTest/html/Element/offsetWidth_A01_t01: RuntimeError
-LibTest/html/Element/offset_A01_t01: RuntimeError
-LibTest/html/Element/onAbort_A01_t01: RuntimeError
-LibTest/html/Element/onBeforeCopy_A01_t01: RuntimeError
-LibTest/html/Element/onBeforeCut_A01_t01: RuntimeError
-LibTest/html/Element/onBeforePaste_A01_t01: RuntimeError
-LibTest/html/Element/onBlur_A01_t01: RuntimeError
-LibTest/html/Element/onChange_A01_t01: RuntimeError
-LibTest/html/Element/onDoubleClick_A01_t01: RuntimeError
-LibTest/html/Element/onError_A01_t01: RuntimeError
-LibTest/html/Element/onFocus_A01_t01: RuntimeError
-LibTest/html/Element/onFullscreenChange_A01_t01: RuntimeError
-LibTest/html/Element/onFullscreenError_A01_t01: RuntimeError
-LibTest/html/Element/onInput_A01_t01: RuntimeError
-LibTest/html/Element/onInvalid_A01_t01: RuntimeError
-LibTest/html/Element/onReset_A01_t01: RuntimeError
-LibTest/html/Element/onScroll_A01_t01: RuntimeError
-LibTest/html/Element/onSearch_A01_t01: RuntimeError
-LibTest/html/Element/onSelectStart_A01_t01: RuntimeError
-LibTest/html/Element/onSelect_A01_t01: RuntimeError
-LibTest/html/Element/onSubmit_A01_t01: RuntimeError
-LibTest/html/Element/on_A01_t01: RuntimeError
-LibTest/html/Element/outerHtml_A01_t01: RuntimeError
-LibTest/html/Element/ownerDocument_A01_t01: RuntimeError
-LibTest/html/Element/ownerDocument_A01_t02: RuntimeError
-LibTest/html/Element/ownerDocument_A01_t03: RuntimeError
-LibTest/html/Element/ownerDocument_A01_t04: RuntimeError
-LibTest/html/Element/ownerDocument_A01_t05: RuntimeError
-LibTest/html/Element/parentNode_A01_t01: RuntimeError
-LibTest/html/Element/parentNode_A01_t02: RuntimeError
-LibTest/html/Element/parentNode_A01_t03: RuntimeError
-LibTest/html/Element/parent_A01_t01: RuntimeError
-LibTest/html/Element/parent_A01_t02: RuntimeError
-LibTest/html/Element/parent_A01_t03: RuntimeError
-LibTest/html/Element/previousElementSibling_A01_t01: RuntimeError
-LibTest/html/Element/querySelectorAll_A01_t01: RuntimeError
-LibTest/html/Element/querySelector_A01_t01: RuntimeError
-LibTest/html/Element/removeEventListener_A01_t01: RuntimeError
-LibTest/html/Element/removeEventListener_A01_t02: RuntimeError
-LibTest/html/Element/remove_A01_t01: RuntimeError
-LibTest/html/Element/resetEvent_A01_t01: RuntimeError
-LibTest/html/Element/scrollEvent_A01_t01: RuntimeError
-LibTest/html/Element/searchEvent_A01_t01: RuntimeError
-LibTest/html/Element/selectEvent_A01_t01: RuntimeError
-LibTest/html/Element/selectStartEvent_A01_t01: RuntimeError
-LibTest/html/Element/setAttributeNS_A01_t01: RuntimeError
-LibTest/html/Element/setAttribute_A01_t01: RuntimeError
-LibTest/html/Element/setInnerHtml_A01_t01: RuntimeError
-LibTest/html/Element/setInnerHtml_A01_t02: RuntimeError
-LibTest/html/Element/setInnerHtml_A01_t03: RuntimeError
-LibTest/html/Element/spellcheck_A01_t01: RuntimeError
-LibTest/html/Element/spellcheck_A01_t02: RuntimeError
-LibTest/html/Element/style_A01_t01: RuntimeError
-LibTest/html/Element/style_A01_t02: RuntimeError
-LibTest/html/Element/submitEvent_A01_t01: RuntimeError
-LibTest/html/Element/tabIndex_A01_t01: RuntimeError
-LibTest/html/Element/tagName_A01_t01: RuntimeError
-LibTest/html/Element/tagName_A01_t02: RuntimeError
-LibTest/html/Element/text_A01_t01: RuntimeError
-LibTest/html/Element/text_A02_t01: RuntimeError
-LibTest/html/Element/text_A03_t01: RuntimeError
-LibTest/html/Element/text_A04_t01: RuntimeError
-LibTest/html/Element/title_A01_t01: RuntimeError
-LibTest/html/Event/Event.eventType_A01_t01: RuntimeError
-LibTest/html/Event/Event_A01_t02: RuntimeError
-LibTest/html/Event/Event_A01_t03: RuntimeError
-LibTest/html/Event/Event_A01_t04: RuntimeError
-LibTest/html/Event/bubbles_A01_t01: RuntimeError
-LibTest/html/Event/cancelable_A01_t01: RuntimeError
-LibTest/html/Event/matchingTarget_A01_t01: RuntimeError
-LibTest/html/Event/matchingTarget_A01_t02: RuntimeError
-LibTest/html/Event/stopImmediatePropagation_A01_t01: RuntimeError
-LibTest/html/Event/stopImmediatePropagation_A01_t02: RuntimeError
-LibTest/html/Event/type_A01_t01: RuntimeError
-LibTest/html/HttpRequest/HttpRequest_A01_t01: RuntimeError
-LibTest/html/HttpRequest/abort_A01_t01: RuntimeError
-LibTest/html/HttpRequest/addEventListener_A01_t01: RuntimeError
-LibTest/html/HttpRequest/dispatchEvent_A01_t01: RuntimeError
-LibTest/html/HttpRequest/onAbort_A01_t01: RuntimeError
-LibTest/html/HttpRequest/onLoadEnd_A01_t01: RuntimeError
-LibTest/html/HttpRequest/onLoadStart_A01_t01: RuntimeError
-LibTest/html/HttpRequest/onLoad_A01_t01: RuntimeError
-LibTest/html/HttpRequest/onReadyStateChange_A01_t01: RuntimeError
-LibTest/html/HttpRequest/open_A01_t01: RuntimeError
-LibTest/html/HttpRequest/removeEventListener_A01_t01: RuntimeError
-LibTest/html/HttpRequest/responseText_A01_t01: RuntimeError
-LibTest/html/HttpRequest/responseType_A01_t02: RuntimeError
-LibTest/html/IFrameElement/addEventListener_A01_t01: RuntimeError
-LibTest/html/IFrameElement/addEventListener_A01_t02: RuntimeError
-LibTest/html/IFrameElement/addEventListener_A01_t04: RuntimeError
-LibTest/html/IFrameElement/addEventListener_A01_t05: RuntimeError
-LibTest/html/IFrameElement/addEventListener_A01_t06: RuntimeError
-LibTest/html/IFrameElement/appendText_A01_t01: RuntimeError
-LibTest/html/IFrameElement/append_A01_t01: RuntimeError
-LibTest/html/IFrameElement/append_A02_t01: RuntimeError
-LibTest/html/IFrameElement/append_A02_t02: RuntimeError
-LibTest/html/IFrameElement/attributes_A01_t01: RuntimeError
-LibTest/html/IFrameElement/attributes_A02_t01: RuntimeError
-LibTest/html/IFrameElement/childNodes_A01_t01: RuntimeError
-LibTest/html/IFrameElement/childNodes_A01_t02: RuntimeError
-LibTest/html/IFrameElement/children_A01_t01: RuntimeError
-LibTest/html/IFrameElement/children_A01_t02: RuntimeError
-LibTest/html/IFrameElement/children_setter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/className_A01_t01: RuntimeError
-LibTest/html/IFrameElement/classes_A01_t01: RuntimeError
-LibTest/html/IFrameElement/classes_setter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/click_A01_t01: RuntimeError
-LibTest/html/IFrameElement/clone_A01_t01: RuntimeError
-LibTest/html/IFrameElement/clone_A02_t01: RuntimeError
-LibTest/html/IFrameElement/clone_A03_t01: RuntimeError
-LibTest/html/IFrameElement/contains_A01_t01: RuntimeError
-LibTest/html/IFrameElement/contains_A01_t02: RuntimeError
-LibTest/html/IFrameElement/contentEdge_A01_t01: RuntimeError
-LibTest/html/IFrameElement/dataset_A01_t01: RuntimeError
-LibTest/html/IFrameElement/dataset_A01_t02: RuntimeError
-LibTest/html/IFrameElement/dataset_setter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/dispatchEvent_A01_t01: RuntimeError
-LibTest/html/IFrameElement/documentOffset_A01_t01: RuntimeError
-LibTest/html/IFrameElement/draggable_A01_t01: RuntimeError
-LibTest/html/IFrameElement/draggable_A01_t02: RuntimeError
-LibTest/html/IFrameElement/firstChild_A01_t01: RuntimeError
-LibTest/html/IFrameElement/getAttributeNS_A01_t01: RuntimeError
-LibTest/html/IFrameElement/getAttribute_A01_t01: RuntimeError
-LibTest/html/IFrameElement/getBoundingClientRect_A01_t01: RuntimeError
-LibTest/html/IFrameElement/getClientRects_A01_t01: RuntimeError
-LibTest/html/IFrameElement/getClientRects_A01_t02: RuntimeError
-LibTest/html/IFrameElement/getElementsByClassName_A01_t01: RuntimeError
-LibTest/html/IFrameElement/getElementsByClassName_A02_t01: RuntimeError
-LibTest/html/IFrameElement/getNamespacedAttributes_A01_t01: RuntimeError
-LibTest/html/IFrameElement/hasChildNodes_A01_t01: RuntimeError
-LibTest/html/IFrameElement/hasChildNodes_A01_t02: RuntimeError
-LibTest/html/IFrameElement/hidden_A01_t01: RuntimeError
-LibTest/html/IFrameElement/id_A01_t01: RuntimeError
-LibTest/html/IFrameElement/insertAdjacentElement_A01_t01: RuntimeError
-LibTest/html/IFrameElement/insertAdjacentHtml_A01_t01: RuntimeError
-LibTest/html/IFrameElement/insertAdjacentText_A01_t01: RuntimeError
-LibTest/html/IFrameElement/insertAllBefore_A01_t01: RuntimeError
-LibTest/html/IFrameElement/insertAllBefore_A02_t01: RuntimeError
-LibTest/html/IFrameElement/insertBefore_A01_t01: RuntimeError
-LibTest/html/IFrameElement/insertBefore_A02_t01: RuntimeError
-LibTest/html/IFrameElement/lang_A01_t01: RuntimeError
-LibTest/html/IFrameElement/lang_A01_t02: RuntimeError
-LibTest/html/IFrameElement/lastChild_A01_t01: RuntimeError
-LibTest/html/IFrameElement/matchesWithAncestors_A01_t01: RuntimeError
-LibTest/html/IFrameElement/matches_A01_t01: RuntimeError
-LibTest/html/IFrameElement/namespaceUri_A01_t01: RuntimeError
-LibTest/html/IFrameElement/nextElementSibling_A01_t01: RuntimeError
-LibTest/html/IFrameElement/nextNode_A01_t01: RuntimeError
-LibTest/html/IFrameElement/nodeName_A01_t01: RuntimeError
-LibTest/html/IFrameElement/nodeType_A01_t01: RuntimeError
-LibTest/html/IFrameElement/nodeValue_A01_t01: RuntimeError
-LibTest/html/IFrameElement/nodes_A01_t01: RuntimeError
-LibTest/html/IFrameElement/nodes_A01_t02: RuntimeError
-LibTest/html/IFrameElement/nodes_setter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/offsetTo_A01_t02: RuntimeError
-LibTest/html/IFrameElement/onAbort_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onBeforeCopy_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onBeforeCut_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onBeforePaste_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onBlur_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onChange_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onDoubleClick_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onError_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onFocus_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onFullscreenChange_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onFullscreenError_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onInput_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onInvalid_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onLoad_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onReset_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onScroll_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onSearch_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onSelectStart_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onSelect_A01_t01: RuntimeError
-LibTest/html/IFrameElement/onSubmit_A01_t01: RuntimeError
-LibTest/html/IFrameElement/on_A01_t01: RuntimeError
-LibTest/html/IFrameElement/outerHtml_A01_t01: RuntimeError
-LibTest/html/IFrameElement/ownerDocument_A01_t01: RuntimeError
-LibTest/html/IFrameElement/ownerDocument_A01_t02: RuntimeError
-LibTest/html/IFrameElement/ownerDocument_A01_t03: RuntimeError
-LibTest/html/IFrameElement/ownerDocument_A01_t04: RuntimeError
-LibTest/html/IFrameElement/ownerDocument_A01_t05: RuntimeError
-LibTest/html/IFrameElement/parentNode_A01_t01: RuntimeError
-LibTest/html/IFrameElement/parent_A01_t01: RuntimeError
-LibTest/html/IFrameElement/parent_A01_t02: RuntimeError
-LibTest/html/IFrameElement/previousElementSibling_A01_t01: RuntimeError
-LibTest/html/IFrameElement/previousNode_A01_t01: RuntimeError
-LibTest/html/IFrameElement/removeEventListener_A01_t01: RuntimeError
-LibTest/html/IFrameElement/removeEventListener_A01_t02: RuntimeError
-LibTest/html/IFrameElement/remove_A01_t01: RuntimeError
-LibTest/html/IFrameElement/resetEvent_A01_t01: RuntimeError
-LibTest/html/IFrameElement/scrollEvent_A01_t01: RuntimeError
-LibTest/html/IFrameElement/searchEvent_A01_t01: RuntimeError
-LibTest/html/IFrameElement/selectEvent_A01_t01: RuntimeError
-LibTest/html/IFrameElement/selectStartEvent_A01_t01: RuntimeError
-LibTest/html/IFrameElement/setAttributeNS_A01_t01: RuntimeError
-LibTest/html/IFrameElement/setAttribute_A01_t01: RuntimeError
-LibTest/html/IFrameElement/spellcheck_A01_t02: RuntimeError
-LibTest/html/IFrameElement/style_A01_t01: RuntimeError
-LibTest/html/IFrameElement/style_A01_t02: RuntimeError
-LibTest/html/IFrameElement/tabIndex_A01_t01: RuntimeError
-LibTest/html/IFrameElement/tagName_A01_t01: RuntimeError
-LibTest/html/IFrameElement/tagName_A01_t02: RuntimeError
-LibTest/html/IFrameElement/text_A01_t01: RuntimeError
-LibTest/html/IFrameElement/text_A02_t01: RuntimeError
-LibTest/html/IFrameElement/text_A03_t01: RuntimeError
-LibTest/html/IFrameElement/text_A04_t01: RuntimeError
-LibTest/html/IFrameElement/text_setter_A01_t01: RuntimeError
-LibTest/html/IFrameElement/title_A01_t01: RuntimeError
-LibTest/html/Node/addEventListener_A01_t01: RuntimeError
-LibTest/html/Node/addEventListener_A01_t02: RuntimeError
-LibTest/html/Node/addEventListener_A01_t03: RuntimeError
-LibTest/html/Node/addEventListener_A01_t04: RuntimeError
-LibTest/html/Node/addEventListener_A01_t05: RuntimeError
-LibTest/html/Node/append_A01_t01: RuntimeError
-LibTest/html/Node/append_A02_t01: RuntimeError
-LibTest/html/Node/childNodes_A01_t01: RuntimeError
-LibTest/html/Node/childNodes_A01_t02: RuntimeError
-LibTest/html/Node/clone_A01_t01: RuntimeError
-LibTest/html/Node/clone_A01_t02: RuntimeError
-LibTest/html/Node/contains_A01_t01: RuntimeError
-LibTest/html/Node/contains_A01_t02: RuntimeError
-LibTest/html/Node/dispatchEvent_A01_t01: RuntimeError
-LibTest/html/Node/firstChild_A01_t01: RuntimeError
-LibTest/html/Node/hasChildNodes_A01_t01: RuntimeError
-LibTest/html/Node/lastChild_A01_t01: RuntimeError
-LibTest/html/Node/nextNode_A01_t01: RuntimeError
-LibTest/html/Node/nodeType_A03_t01: RuntimeError
-LibTest/html/Node/nodeType_A04_t01: RuntimeError
-LibTest/html/Node/nodeType_A05_t01: RuntimeError
-LibTest/html/Node/nodeType_A06_t01: RuntimeError
-LibTest/html/Node/nodeType_A07_t01: RuntimeError
-LibTest/html/Node/nodeType_A12_t01: RuntimeError
-LibTest/html/Node/nodeValue_A03_t01: RuntimeError
-LibTest/html/Node/nodeValue_A04_t01: RuntimeError
-LibTest/html/Node/nodeValue_A06_t01: RuntimeError
-LibTest/html/Node/nodeValue_A07_t01: RuntimeError
-LibTest/html/Node/nodeValue_A12_t01: RuntimeError
-LibTest/html/Node/nodes_A01_t01: RuntimeError
-LibTest/html/Node/on_A01_t01: RuntimeError
-LibTest/html/Node/parentNode_A01_t01: RuntimeError
-LibTest/html/Node/removeEventListener_A01_t01: RuntimeError
-LibTest/html/Node/removeEventListener_A01_t02: RuntimeError
-LibTest/html/Node/remove_A01_t01: RuntimeError
-LibTest/html/Node/replaceWith_A01_t01: RuntimeError
-LibTest/html/Window/addEventListener_A01_t01: RuntimeError
-LibTest/html/Window/animationFrame_A01_t01: RuntimeError
-LibTest/html/Window/dispatchEvent_A01_t01: RuntimeError
-LibTest/html/Window/find_A01_t02: RuntimeError
-LibTest/html/Window/find_A02_t01: RuntimeError
-LibTest/html/Window/find_A03_t02: RuntimeError
-LibTest/html/Window/find_A05_t01: RuntimeError
-LibTest/html/Window/find_A07_t01: RuntimeError
-LibTest/html/Window/open_A01_t01: RuntimeError
-LibTest/html/Window/removeEventListener_A01_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/DOM.event.flow_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/EventListener.eventHandler_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/Propagation.path.target.moved_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/dispatchEvent.return.value_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/stopImmediatePropagation.effect_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/stopPropagation.dispatchEvent_t01: RuntimeError
-WebPlatformTest/Utils/test/testPass_t01: RuntimeError
-WebPlatformTest/dom/EventTarget/dispatchEvent_A01_t01: RuntimeError
-WebPlatformTest/dom/EventTarget/dispatchEvent_A03_t01: RuntimeError
-WebPlatformTest/dom/EventTarget/dispatchEvent_A04_t01: RuntimeError
-WebPlatformTest/dom/collections/emptyName_A01_t01: RuntimeError
-WebPlatformTest/dom/collections/emptyName_A01_t06: RuntimeError
-WebPlatformTest/dom/collections/emptyName_A01_t07: RuntimeError
-WebPlatformTest/dom/events/defaultPrevented_A01_t01: RuntimeError
-WebPlatformTest/dom/events/defaultPrevented_A01_t02: RuntimeError
-WebPlatformTest/dom/events/defaultPrevented_A01_t03: RuntimeError
-WebPlatformTest/dom/events/defaultPrevented_A01_t04: RuntimeError
-WebPlatformTest/dom/events/defaultPrevented_A01_t05: RuntimeError
-WebPlatformTest/dom/events/event_constructors/Event_A02_t01: RuntimeError
-WebPlatformTest/dom/lists/DOMTokenList.toString_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/appendData_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/deleteData_A02_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/insertData_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/remove_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/remove_A01_t02: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/remove_A02_t01: RuntimeError
-WebPlatformTest/dom/nodes/Comment-constructor_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-getElementById_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-importNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Element-childElementCount-dynamic-add_t01: RuntimeError
-WebPlatformTest/dom/nodes/Element-childElementCount-nochild_t01: RuntimeError
-WebPlatformTest/dom/nodes/Element-childElementCount_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-cloneNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/attributes_A03_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/attributes_A06_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A09_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A09_t01: RuntimeError
-WebPlatformTest/dom/ranges/Range-attributes_t01: RuntimeError
-WebPlatformTest/dom/ranges/Range-comparePoint_t03: RuntimeError
-WebPlatformTest/dom/ranges/Range-detach_t01: RuntimeError
-WebPlatformTest/html-imports/link-import-null_t01: RuntimeError
-WebPlatformTest/html-templates/definitions/template-contents-owner-test-001_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-foster-parenting/template-is-not-a-foster-parent-element_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-head-token_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/start-tag-body_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/template-end-tag-without-start-one_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/content-attribute_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/template-content-node-document_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-getter_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-case_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-id_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-param_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.title_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.title_t03: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.title_t07: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t03: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/classlist-nonstring_t01: RuntimeError
-WebPlatformTest/html/semantics/edits/the-del-element/del_effect_t01: RuntimeError
-WebPlatformTest/html/semantics/edits/the-ins-element/ins_effect_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/textTracks_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/readyState_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/srclang_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-fieldset-element/HTMLFieldSetElement_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/required_attribute_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/search_input_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-option-element/option-text-backslash_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-output-element/output_t01: RuntimeError
-WebPlatformTest/html/semantics/interactive-elements/the-details-element/toggleEvent_t01: RuntimeError
-WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t01: RuntimeError
-WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t02: RuntimeError
-WebPlatformTest/html/semantics/scripting-1/the-script-element/script-text_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/default_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/disabled_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-caption-element/caption_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/border_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/insertRow-method_t01: RuntimeError
-WebPlatformTest/html/syntax/parsing/math-parse_t01: RuntimeError
-WebPlatformTest/html/syntax/serializing-html-fragments/outerHTML_t01: RuntimeError
-WebPlatformTest/webstorage/event_session_storageeventinit_t01: RuntimeError
-WebPlatformTest/webstorage/storage_builtins_t01: RuntimeError
-WebPlatformTest/webstorage/storage_clear_t01: RuntimeError
-WebPlatformTest/webstorage/storage_local_getitem_t01: RuntimeError
-WebPlatformTest/webstorage/storage_local_key_t01: RuntimeError
-WebPlatformTest/webstorage/storage_local_length_t01: RuntimeError
-WebPlatformTest/webstorage/storage_session_getitem_t01: RuntimeError
-WebPlatformTest/webstorage/storage_session_key_t01: RuntimeError
-WebPlatformTest/webstorage/storage_session_setitem_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome && $runtime != ff && !$fast_startup ]
-LayoutTests/fast/canvas/canvas-blend-image_t01: RuntimeError
-LayoutTests/fast/css/computed-offset-with-zoom_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-monospace_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError
-LayoutTests/fast/css/invalid-not-with-simple-selector-sequence_t01: RuntimeError
-LayoutTests/fast/css/parsing-object-position_t01: RuntimeError
-LayoutTests/fast/css/shadow-current-color_t01: RuntimeError, Pass
-LayoutTests/fast/css/sticky/parsing-position-sticky_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last_t01: RuntimeError
-LayoutTests/fast/dom/Attr/direction-attribute-set-and-cleared_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/selected-index-preserved-when-option-text-changes_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-options-attributes_t01: RuntimeError
-LayoutTests/fast/files/file-reader-readystate_t01: RuntimeError
-LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-change-layout-by-value_t01: RuntimeError
-LayoutTests/fast/forms/date/date-input-type_t01: RuntimeError
-LayoutTests/fast/forms/date/input-valueasnumber-date_t01: RuntimeError
-LayoutTests/fast/inline/continuation-inlines-inserted-in-reverse-after-block_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-uri-resolution_t01: RuntimeError
-LayoutTests/fast/media/media-query-list_t01: RuntimeError
-LayoutTests/fast/multicol/balance-short-trailing-empty-block_t01: RuntimeError
-LayoutTests/fast/multicol/balance-trailing-border_t01: RuntimeError
-LayoutTests/fast/multicol/balance-trailing-border_t02: RuntimeError
-LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError
-LayoutTests/fast/sub-pixel/table-rows-have-stable-height_t01: RuntimeError
-LayoutTests/fast/table/absolute-table-percent-lengths_t01: RuntimeError
-LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01: RuntimeError
-LayoutTests/fast/text/font-ligatures-linebreak-word_t01: RuntimeError
-LayoutTests/fast/text/font-ligatures-linebreak_t01: RuntimeError
-LayoutTests/fast/text/selection-exceptions_t01: RuntimeError
-LayoutTests/fast/writing-mode/vertical-font-vmtx-units-per-em_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request_t01: RuntimeError
-LibTest/html/Element/getClientRects_A01_t02: RuntimeError
-LibTest/html/Element/isContentEditable_A02_t01: RuntimeError, Pass
-LibTest/html/IFrameElement/isContentEditable_A01_t01: RuntimeError
-LibTest/html/Window/close_A01_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome && $runtime != safari ]
-LayoutTests/fast/animation/request-animation-frame-cancel2_t01: RuntimeError, Timeout
-LayoutTests/fast/backgrounds/mask-box-image-width_t01: RuntimeError
-LayoutTests/fast/borders/border-color-visited_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fill-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-frameless-document-text_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeText-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-enum-tests_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/renderer-and-vendor-strings_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-template-areas-get-set_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/height-property-value_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/width-property-value_t01: RuntimeError
-LayoutTests/fast/css/background-parser-crash_t01: RuntimeError
-LayoutTests/fast/css/border-width-large_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-06_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-reset-subtree-insert-crash_t01: RuntimeError
-LayoutTests/fast/css/font-shorthand-mix-inherit_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-properties_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-radius-shorthand_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-column-rule_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-webkit-text-stroke_t01: RuntimeError
-LayoutTests/fast/css/insertRule-font-face_t01: RuntimeError
-LayoutTests/fast/css/invalidation/clears-invalidation-whole-tree_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-any-pseudo_t01: RuntimeError
-LayoutTests/fast/css/legacy-opacity-styles_t01: RuntimeError
-LayoutTests/fast/css/margin-start-end_t01: RuntimeError
-LayoutTests/fast/css/parsing-webkit-font-smoothing_t01: RuntimeError
-LayoutTests/fast/css/pseudo-any_t01: RuntimeError
-LayoutTests/fast/css/pseudo-valid-unapplied_t01: RuntimeError
-LayoutTests/fast/css/readwrite-contenteditable-recalc_t01: RuntimeError
-LayoutTests/fast/css/recalc-optgroup-inherit_t01: RuntimeError
-LayoutTests/fast/css/sibling-selectors_t01: RuntimeError
-LayoutTests/fast/css/style-element-process-crash_t01: RuntimeError
-LayoutTests/fast/css/text-align-webkit-match-parent-parse_t01: RuntimeError
-LayoutTests/fast/css/vertical-align-length-copy-bug_t01: RuntimeError
-LayoutTests/fast/css/webkit-keyframes-crash_t01: RuntimeError
-LayoutTests/fast/dom/Element/fixed-position-offset-parent_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-text-form-control-child_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-text-form-control_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-value-change_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-invalid-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-true-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-value-caseinsensitive_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-hidden-value_t01: Pass, RuntimeError
-LayoutTests/fast/dom/MutationObserver/database-callback-delivery_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/caseTagX_t01: RuntimeError
-LayoutTests/fast/dom/background-shorthand-csstext_t01: RuntimeError
-LayoutTests/fast/dom/boolean-attribute-reflection_t01: RuntimeError
-LayoutTests/fast/dom/css-rule-functions_t01: RuntimeError
-LayoutTests/fast/dom/css-shortHands_t01: RuntimeError
-LayoutTests/fast/dom/dom-parse-serialize-display_t01: RuntimeError
-LayoutTests/fast/dom/dom-parse-serialize_t01: RuntimeError
-LayoutTests/fast/dom/fragment-activation-focuses-target_t01: RuntimeError
-LayoutTests/fast/dom/insertBefore-refChild-crash_t01: RuntimeError
-LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars_t01: RuntimeError
-LayoutTests/fast/dom/remove-body-during-body-replacement_t01: RuntimeError
-LayoutTests/fast/dom/shadow/no-renderers-for-light-children_t01: RuntimeError
-LayoutTests/fast/dom/subtree-modified-attributes_t01: RuntimeError
-LayoutTests/fast/dom/vertical-scrollbar-when-dir-change_t01: RuntimeError
-LayoutTests/fast/events/event-fire-order_t01: RuntimeError
-LayoutTests/fast/events/form-onchange_t01: RuntimeError
-LayoutTests/fast/events/selectstart-prevent-selectall_t01: RuntimeError
-LayoutTests/fast/flexbox/box-size-integer-overflow_t01: RuntimeError
-LayoutTests/fast/forms/11423_t01: RuntimeError
-LayoutTests/fast/forms/8250_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-patternMismatch_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-opera-005_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-readonly-attribute_t01: RuntimeError
-LayoutTests/fast/forms/checkValidity-handler-updates-dom_t01: RuntimeError
-LayoutTests/fast/forms/delete-text-with-invisible-br_t01: RuntimeError
-LayoutTests/fast/forms/form-dirname-attribute_t01: RuntimeError
-LayoutTests/fast/forms/input-text-paste-maxlength_t01: RuntimeError
-LayoutTests/fast/forms/input-widths_t01: RuntimeError
-LayoutTests/fast/forms/min-content-form-controls_t01: RuntimeError
-LayoutTests/fast/forms/paste-multiline-text-input_t01: RuntimeError
-LayoutTests/fast/forms/select-change-popup-to-listbox-roundtrip_t01: RuntimeError
-LayoutTests/fast/forms/select-namedItem_t01: RuntimeError
-LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor_t01: RuntimeError
-LayoutTests/fast/forms/textarea-no-scroll-on-blur_t01: RuntimeError
-LayoutTests/fast/forms/textfield-clone_t01: RuntimeError
-LayoutTests/fast/forms/textfield-focus-out_t01: RuntimeError
-LayoutTests/fast/inline/inline-relative-offset-boundingbox_t01: RuntimeError
-LayoutTests/fast/masking/parsing-clip-path-iri_t01: RuntimeError
-LayoutTests/fast/media/media-query-serialization_t01: RuntimeError
-LayoutTests/fast/multicol/column-width-zero_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-gap-between-pages_t01: RuntimeError
-LayoutTests/fast/multicol/inherit-column-values_t01: RuntimeError
-LayoutTests/fast/multicol/initial-column-values_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t06: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/break-properties_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/gap-non-negative_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/image-inside-nested-blocks-with-border_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/break-properties_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/gap-non-negative_t01: RuntimeError
-LayoutTests/fast/overflow/height-during-simplified-layout_t01: RuntimeError
-LayoutTests/fast/overflow/overflow-rtl-vertical-origin_t01: RuntimeError
-LayoutTests/fast/parser/block-nesting-cap_t01: RuntimeError
-LayoutTests/fast/selectors/specificity-overflow_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-image-threshold_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/parsing/parsing-shape-property-aliases_t01: RuntimeError, Pass
-LayoutTests/fast/table/border-changes_t01: RuntimeError
-LayoutTests/fast/text/line-breaks-after-hyphen-before-number_t01: RuntimeError
-LayoutTests/fast/writing-mode/block-formatting-context_t01: RuntimeError
-LayoutTests/fast/writing-mode/display-mutation_t01: RuntimeError
-LayoutTests/fast/writing-mode/percentage-padding_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-abort_t01: RuntimeError
-LibTest/html/Element/translate_A01_t01: RuntimeError
-LibTest/html/HttpRequestUpload/onAbort_A01_t01: RuntimeError
-LibTest/html/IFrameElement/spellcheck_A01_t01: RuntimeError
-LibTest/html/IFrameElement/translate_A01_t01: RuntimeError
-LibTest/html/Window/find_A04_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A10_t01: RuntimeError
-WebPlatformTest/html-templates/additions-to-the-steps-to-clone-a-node/templates-copy-document-owner_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/template-content_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/range_t02: RuntimeError
-WebPlatformTest/html/syntax/parsing/math-parse_t03: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome && $runtime != safari && !$fast_startup ]
-LayoutTests/fast/text/find-backwards_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != chrome && $system != macos ]
-LayoutTests/fast/canvas/canvas-alphaImageData-behavior_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-drawImage-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-fillRect-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokePath-alpha-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-zoom-and-background-size_t01: RuntimeError
-
 [ $compiler == dart2js && $runtime == d8 ]
-Language/Classes/Instance_Methods/Operators/return_type_t01: MissingCompileTimeError
-Language/Classes/Setters/return_type_not_void_t01: MissingCompileTimeError
-Language/Classes/Setters/syntax_t04: MissingCompileTimeError
-Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
-Language/Expressions/Constants/depending_on_itself_t03: Crash
-Language/Expressions/Constants/exception_t02/01: CompileTimeError
-Language/Expressions/Constants/integer_size_t03: CompileTimeError
-Language/Expressions/Constants/integer_size_t04: CompileTimeError
-Language/Expressions/Function_Invocation/async_generator_invokation_t08: Fail
-Language/Expressions/Function_Invocation/async_generator_invokation_t10: Fail
-Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
-Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
-Language/Expressions/Lists/identical_t02: RuntimeError
-Language/Expressions/Maps/identical_t02: RuntimeError
-Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
-Language/Expressions/Numbers/syntax_t06: CompileTimeError
-Language/Expressions/Numbers/syntax_t09: CompileTimeError
-Language/Expressions/Object_Identity/double_t02: RuntimeError
-Language/Expressions/Shift/integer_t02: CompileTimeError
-Language/Expressions/Type_Cast/syntax_t01: RuntimeError
-Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
-Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
-Language/Metadata/before_ctor_t02: RuntimeError
-Language/Metadata/before_function_t01: RuntimeError
-Language/Metadata/before_function_t02: RuntimeError
-Language/Metadata/before_function_t03: RuntimeError
-Language/Metadata/before_function_t04: RuntimeError
-Language/Metadata/before_function_t07: RuntimeError
-Language/Metadata/before_import_t01: RuntimeError
-Language/Metadata/before_param_t03: RuntimeError
-Language/Metadata/before_param_t05: RuntimeError
-Language/Metadata/before_param_t07: RuntimeError
-Language/Metadata/before_param_t09: RuntimeError
-Language/Metadata/before_variable_t02: RuntimeError
-Language/Mixins/Mixin_Application/superclass_t01: MissingCompileTimeError
-Language/Overview/Privacy/private_and_public_t18: RuntimeError
-Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
-Language/Statements/Assert/execution_t09: RuntimeError
-Language/Statements/For/syntax_t13: Crash
-Language/Statements/For/syntax_t20: Crash
-Language/Types/Function_Types/call_t01: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
-Language/Types/Interface_Types/subtype_t06: RuntimeError
-Language/Types/Interface_Types/subtype_t21: RuntimeError
-Language/Types/Interface_Types/subtype_t23: RuntimeError
-Language/Variables/constant_variable_t09: RuntimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t01: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t03: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t04: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t05: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t06: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t07: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t08: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t09: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/Callable/Callable_ret_extends_neg_assign_l1_t10: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
-LanguageFeatures/Instantiate-to-bound/class/class_extends_neg_l1_t05: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t01: Crash
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l1_t04: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t03: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t04: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/01: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/02: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/03: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/04: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/none: Crash
-LanguageFeatures/Instantiate-to-bound/class/static/class_l1_t04/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t03/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t04/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l4_t01/01: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l4_t01/03: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/function/function_ret_extends_Future_neg_assign_l1_t06: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/function/function_ret_extends_Future_neg_assign_l1_t07: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l1_t02: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l1_t10: RuntimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t02/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/01: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/02: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/03: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/04: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/05: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/06: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/07: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/01: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/02: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/03: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/04: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/05: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/06: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/07: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_FutureOr_l1_t05: RuntimeError, Pass
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t05: RuntimeError, Pass
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t10: RuntimeError, Pass
-LanguageFeatures/Simple-bounds/dynamic/typedef_l2_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t06: RuntimeError
-LanguageFeatures/Simple-bounds/static/typedef_l2_t02/none: CompileTimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
-LanguageFeatures/regression/34635_t03: CompileTimeError
-LanguageFeatures/regression/34803_t01: Crash, Pass
-LanguageFeatures/regression/34803_t02: Crash, Pass
-LayoutTests/fast/animation/request-animation-frame-prefix_t01: RuntimeError
-LayoutTests/fast/backgrounds/animated-gif-as-background_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-fill-zero-area-crash_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
-LayoutTests/fast/backgrounds/composite-highlight-is-invalid_t01: RuntimeError
-LayoutTests/fast/backgrounds/multiple-backgrounds-assert_t01: RuntimeError
-LayoutTests/fast/backgrounds/repeat/margin-shorthand_t01: RuntimeError
-LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
-LayoutTests/fast/borders/border-image-width-negative_t01: RuntimeError
-LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
-LayoutTests/fast/borders/border-radius-child_t01: RuntimeError
-LayoutTests/fast/borders/border-width-percent_t01: RuntimeError
-LayoutTests/fast/box-sizing/table-cell_t01: RuntimeError
-LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
-LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
-LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: RuntimeError
-LayoutTests/fast/canvas/arc-crash_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-arc-360-winding_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-arc-connecting-line_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-as-image-incremental-repaint_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-before-css_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-clearRect_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-clip-rule_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-closePath-single-point_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-stroke-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-currentColor_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-ellipse-360-winding_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-ellipse-negative-radius_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillRect-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillRect_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillStyle-no-quirks-parsing_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillText-invalid-maxWidth_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillText-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-font-consistency_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-font-ex-units-crash_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getContext-invalid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-invalid-fillstyle_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lineWidth-intact-after-strokeRect_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-longlived-context_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-modify-emptyPath_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-pattern-modify_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-quadratic-same-endpoint_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-resetTransform_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-save-restore-with-path_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-setTransform_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-state-intact-after-putImageData_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-stroke-empty-fill_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-stroke-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokePath-cap-join_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeText-invalid-maxWidth_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeText-strokes-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-style-intact-after-text_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-to-canvas_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-toDataURL-crash_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-transparency-and-composite_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-with-illegal-args_t01: RuntimeError
-LayoutTests/fast/canvas/crash-set-font_t01: RuntimeError
-LayoutTests/fast/canvas/drawImage-with-bad-canvas_t01: RuntimeError
-LayoutTests/fast/canvas/drawImage-with-broken-image_t01: RuntimeError
-LayoutTests/fast/canvas/drawImage-with-valid-image_t01: RuntimeError
-LayoutTests/fast/canvas/fillText-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
-LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
-LayoutTests/fast/canvas/gradient-with-clip_t01: RuntimeError
-LayoutTests/fast/canvas/linearGradient-infinite-values_t01: RuntimeError
-LayoutTests/fast/canvas/pattern-with-transform_t01: RuntimeError
-LayoutTests/fast/canvas/resize-while-save-active_t01: RuntimeError
-LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
-LayoutTests/fast/canvas/set-colors_t01: RuntimeError
-LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: RuntimeError
-LayoutTests/fast/canvas/toDataURL-noData_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/attrib-location-length-limits_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/canvas-resize-crash_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/canvas-zero-size_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/context-destroyed-crash_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/css-webkit-canvas-repaint_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/css-webkit-canvas_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-bind-attrib-location-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-getshadersource_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-getstring_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-pixelstorei_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-vertex-attrib_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/point-size_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/premultiplyalpha-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/read-pixels-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/shader-precision-format_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgb565_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba4444_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-bindings-uneffected-on-resize_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-npot_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/webgl-unprefixed-context-id_t01: RuntimeError
-LayoutTests/fast/canvas/zero-size-fill-rect_t01: RuntimeError
-LayoutTests/fast/cookies/local-file-can-set-cookies_t01: RuntimeError
-LayoutTests/fast/css-generated-content/bug-106384_t01: RuntimeError
-LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
-LayoutTests/fast/css-generated-content/details-before-after-content_t01: RuntimeError
-LayoutTests/fast/css-generated-content/empty-content-with-float-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/floating-before-content-with-list-marker-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError
-LayoutTests/fast/css-generated-content/quote-layout-focus-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/remove-div-from-flexible-box-with-floating-after-content-crash_t01: RuntimeError
-LayoutTests/fast/css-generated-content/reset-content-to-initial_t01: RuntimeError
-LayoutTests/fast/css-generated-content/summary-before-after-content_t01: RuntimeError
-LayoutTests/fast/css-generated-content/table-with-scrollbar-corner_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/anonymous-grid-items_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-crash-out-of-flow-positioned-element_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-bad-cast-addchild_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
-LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError
-LayoutTests/fast/css/appearance-caps-lock-indicator_t01: RuntimeError
-LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
-LayoutTests/fast/css/attribute-selector-begin-dynamic-no-elementstyle_t01: RuntimeError
-LayoutTests/fast/css/attribute-selector-recursive-update-on-setAttribute_t01: RuntimeError
-LayoutTests/fast/css/auto-min-size_t01: RuntimeError
-LayoutTests/fast/css/background-currentcolor_t01: RuntimeError
-LayoutTests/fast/css/background-position-serialize_t01: RuntimeError
-LayoutTests/fast/css/background-serialize_t01: RuntimeError
-LayoutTests/fast/css/border-image-fill-crash_t01: RuntimeError
-LayoutTests/fast/css/border-image-null-image-crash_t01: RuntimeError
-LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
-LayoutTests/fast/css/border-shorthand-initialize-longhands_t01: RuntimeError
-LayoutTests/fast/css/border-start-end_t01: RuntimeError
-LayoutTests/fast/css/box-sizing-backwards-compat-prefix_t01: RuntimeError
-LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
-LayoutTests/fast/css/button-height_t01: RuntimeError
-LayoutTests/fast/css/cached-sheet-restore-crash_t01: RuntimeError
-LayoutTests/fast/css/comment-before-charset_t01: RuntimeError
-LayoutTests/fast/css/content-language-case-insensitivity_t01: RuntimeError
-LayoutTests/fast/css/content-language-mapped-to-webkit-locale_t01: RuntimeError
-LayoutTests/fast/css/content-language-no-content_t01: RuntimeError
-LayoutTests/fast/css/content/content-none_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-01_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-05_t01: RuntimeError
-LayoutTests/fast/css/counters/asterisk-counter-update-after-layout-crash_t01: RuntimeError
-LayoutTests/fast/css/counters/complex-before_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-before-selector-crash_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-function-input-2_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-number-input_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-reparent-table-children-crash_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-traverse-object-crash_t01: RuntimeError
-LayoutTests/fast/css/counters/reparent-table-children-with-counters-crash_t01: RuntimeError
-LayoutTests/fast/css/crash-on-incomplete-not_t01: RuntimeError
-LayoutTests/fast/css/crash-on-incomplete-webkit-any_t01: RuntimeError
-LayoutTests/fast/css/css-escaped-identifier-crash_t01: RuntimeError
-LayoutTests/fast/css/css-keyframe-style-crash_t01: RuntimeError
-LayoutTests/fast/css/css-keyframe-unexpected-end_t01: RuntimeError
-LayoutTests/fast/css/css-properties-case-insensitive_t01: RuntimeError
-LayoutTests/fast/css/css-set-selector-text-crash_t01: RuntimeError
-LayoutTests/fast/css/css3-nth-tokens-script_t01: RuntimeError
-LayoutTests/fast/css/cssom-remove-shorthand-property_t01: RuntimeError
-LayoutTests/fast/css/csstext-of-content-string_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing-quirks_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing_t01: RuntimeError
-LayoutTests/fast/css/dashboard-regions-attr-crash_t01: RuntimeError
-LayoutTests/fast/css/dashboard-regions-undefined-length-assertion_t01: RuntimeError
-LayoutTests/fast/css/delete-rule-crash_t01: RuntimeError
-LayoutTests/fast/css/deprecated-flex-box-zero-width-intrinsic-max-width_t01: RuntimeError
-LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
-LayoutTests/fast/css/div_plus_nav_bug47971_t01: RuntimeError
-LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
-LayoutTests/fast/css/dynamic-class-pseudo-elements_t01: RuntimeError
-LayoutTests/fast/css/dynamic-pseudo-class_t01: RuntimeError
-LayoutTests/fast/css/dynamic-style-attribute-query_t01: RuntimeError
-LayoutTests/fast/css/emptyStyleTag_t01: RuntimeError
-LayoutTests/fast/css/first-letter-block-form-controls-crash_t01: RuntimeError
-LayoutTests/fast/css/first-letter-capitalized-edit-select-crash_t01: RuntimeError
-LayoutTests/fast/css/first-line-parent-style-different_t01: RuntimeError
-LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
-LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError
-LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError
-LayoutTests/fast/css/font-face-data-uri-invalid_t01: RuntimeError
-LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
-LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError
-LayoutTests/fast/css/font-face-svg-decoding-error_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError
-LayoutTests/fast/css/font-face-used-after-retired_t01: RuntimeError
-LayoutTests/fast/css/font-family-builtins_t01: RuntimeError
-LayoutTests/fast/css/font-family-trailing-bracket-gunk_t01: RuntimeError
-LayoutTests/fast/css/font-property-priority_t01: RuntimeError
-LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError
-LayoutTests/fast/css/fontface-properties_t01: RuntimeError
-LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-display-none_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-negative-top_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-page-break-inside_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-select-overflow_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-with-zoom_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-box_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-image-slice_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-style-shorthand_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-2_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-height_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-length-unit_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-outline-offset_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-relayout_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-text-overflow_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/zoom-on-display-none_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-column-rule_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse_t01: RuntimeError
-LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
-LayoutTests/fast/css/image-set-parsing-invalid_t01: RuntimeError
-LayoutTests/fast/css/image-set-setting_t01: RuntimeError
-LayoutTests/fast/css/implicit-attach-marking_t01: RuntimeError
-LayoutTests/fast/css/inherited-properties-explicit_t01: RuntimeError
-LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
-LayoutTests/fast/css/input-search-table-column-crash_t01: RuntimeError
-LayoutTests/fast/css/inputtext-crash_t01: RuntimeError
-LayoutTests/fast/css/insertRule-media_t01: RuntimeError
-LayoutTests/fast/css/invalid-import-rule-insertion_t01: RuntimeError
-LayoutTests/fast/css/invalid-not-with-pseudo-element_t01: RuntimeError
-LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
-LayoutTests/fast/css/invalidation/detach-reattach_t01: RuntimeError
-LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators_t01: RuntimeError
-LayoutTests/fast/css/invalidation/no-invalidation-set-local-style_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-style-invalidation_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-type-selectors_t01: RuntimeError
-LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
-LayoutTests/fast/css/large-font-size-crash_t01: RuntimeError
-LayoutTests/fast/css/last-child-innerhtml_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
-LayoutTests/fast/css/list-item-text-align_t01: RuntimeError
-LayoutTests/fast/css/max-width-none_t01: RuntimeError
-LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
-LayoutTests/fast/css/media-rule-dyn_t01: RuntimeError
-LayoutTests/fast/css/media-rule-no-whitespace_t01: RuntimeError
-LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
-LayoutTests/fast/css/named-colors_t01: RuntimeError
-LayoutTests/fast/css/nested-at-rules_t01: RuntimeError
-LayoutTests/fast/css/nested-first-letter-with-float-crash_t01: RuntimeError
-LayoutTests/fast/css/nth-child-implied-step_t01: RuntimeError
-LayoutTests/fast/css/nth-child-n_t01: RuntimeError
-LayoutTests/fast/css/nth-child-no-mutations_t01: RuntimeError
-LayoutTests/fast/css/nth-child-unary-prefix_t01: RuntimeError
-LayoutTests/fast/css/overflow-property_t01: RuntimeError
-LayoutTests/fast/css/padding-no-renderer_t01: RuntimeError
-LayoutTests/fast/css/padding-start-end_t01: RuntimeError
-LayoutTests/fast/css/parse-border-image-repeat-null-crash_t01: RuntimeError
-LayoutTests/fast/css/parsing-css-comment_t01: RuntimeError
-LayoutTests/fast/css/parsing-css-escapes_t01: RuntimeError
-LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError
-LayoutTests/fast/css/parsing-css-surrogate-pairs_t01: RuntimeError
-LayoutTests/fast/css/parsing-expr-error-recovery_t01: RuntimeError
-LayoutTests/fast/css/parsing-font-variant-ligatures_t01: RuntimeError
-LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
-LayoutTests/fast/css/parsing-text-rendering_t01: RuntimeError
-LayoutTests/fast/css/parsing-unexpected-eof_t01: RuntimeError
-LayoutTests/fast/css/percent-character-as-value_t01: RuntimeError
-LayoutTests/fast/css/position-absolute-float_t01: RuntimeError
-LayoutTests/fast/css/positioned-overflow-scroll_t01: RuntimeError
-LayoutTests/fast/css/pseudo-default-001_t01: RuntimeError
-LayoutTests/fast/css/pseudo-default-002_t01: RuntimeError
-LayoutTests/fast/css/pseudo-empty-display-none_t01: RuntimeError
-LayoutTests/fast/css/pseudo-escaped-parenthesis_t01: RuntimeError
-LayoutTests/fast/css/pseudo-invalid-001_t01: RuntimeError
-LayoutTests/fast/css/pseudo-invalid-novalidate-001_t01: RuntimeError
-LayoutTests/fast/css/pseudo-not_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-001_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-002_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-003_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-004_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-005_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-006_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-unapplied_t01: RuntimeError
-LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: RuntimeError
-LayoutTests/fast/css/pseudo-valid-002_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
-LayoutTests/fast/css/recalc-direct-adjacent-001_t01: RuntimeError
-LayoutTests/fast/css/relative-positioned-block-crash_t01: RuntimeError
-LayoutTests/fast/css/remove-attribute-style_t01: RuntimeError
-LayoutTests/fast/css/remove-fixed-resizer-crash_t01: RuntimeError
-LayoutTests/fast/css/resize-value-compared_t01: RuntimeError
-LayoutTests/fast/css/rgba-custom-text_t01: RuntimeError
-LayoutTests/fast/css/scrollbar-crash_t01: RuntimeError
-LayoutTests/fast/css/shadow-dom-scope_t01: RuntimeError
-LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
-LayoutTests/fast/css/short-inline-style_t01: RuntimeError
-LayoutTests/fast/css/shorthand-priority_t01: RuntimeError
-LayoutTests/fast/css/shorthand-setProperty-important_t01: RuntimeError
-LayoutTests/fast/css/small-caps-crash_t01: RuntimeError
-LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
-LayoutTests/fast/css/sticky/remove-inline-sticky-crash_t01: RuntimeError
-LayoutTests/fast/css/sticky/remove-sticky-crash_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
-LayoutTests/fast/css/style-sharing-grand-parent-invalidate_t01: RuntimeError
-LayoutTests/fast/css/style-sharing-type-and-readonly_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-parentStyleSheet_t01: RuntimeError
-LayoutTests/fast/css/test-setting-canvas-color_t01: RuntimeError
-LayoutTests/fast/css/text-align-initial_t01: RuntimeError
-LayoutTests/fast/css/text-align-webkit-match-parent_t01: RuntimeError
-LayoutTests/fast/css/text-rendering-priority_t01: RuntimeError
-LayoutTests/fast/css/transform-origin-parsing_t01: RuntimeError
-LayoutTests/fast/css/transition_shorthand_parsing_t01: RuntimeError
-LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError
-LayoutTests/fast/css/visibility-collapse-form-buttons_t01: RuntimeError
-LayoutTests/fast/css/webkit-color-adjust_t01: RuntimeError
-LayoutTests/fast/css/webkit-empty-transform-preserve3d-crash_t01: RuntimeError
-LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
-LayoutTests/fast/css/zoom-in-length-round-trip_t01: RuntimeError
-LayoutTests/fast/css/zoom-property-parsing_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
-LayoutTests/fast/dom/Attr/access-after-element-destruction_t01: RuntimeError
-LayoutTests/fast/dom/Attr/change-id-via-attr-node-value_t01: RuntimeError
-LayoutTests/fast/dom/Comment/comment-constructor_t01: RuntimeError
-LayoutTests/fast/dom/Comment/remove_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
-LayoutTests/fast/dom/Document/clone-node_t01: RuntimeError
-LayoutTests/fast/dom/Document/createElement-invalid-names_t01: RuntimeError
-LayoutTests/fast/dom/Document/createElement-valid-names_t01: RuntimeError
-LayoutTests/fast/dom/Document/title-with-multiple-children_t01: RuntimeError
-LayoutTests/fast/dom/DocumentFragment/document-fragment-constructor_t01: RuntimeError
-LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
-LayoutTests/fast/dom/Element/client-rect-list-argument_t01: RuntimeError
-LayoutTests/fast/dom/Element/dimension-properties-unrendered_t01: RuntimeError
-LayoutTests/fast/dom/Element/getBoundingClientRect-getClientRects-relative-to-viewport_t01: RuntimeError
-LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
-LayoutTests/fast/dom/Element/id-in-frame_t01: RuntimeError
-LayoutTests/fast/dom/Element/id-in-getelement01_t01: RuntimeError
-LayoutTests/fast/dom/Element/id-in-insert-hr_t01: RuntimeError
-LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
-LayoutTests/fast/dom/Element/scrollWidth_t01: RuntimeError
-LayoutTests/fast/dom/Element/setAttribute-case-insensitivity_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-prevents-rebase_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-rebase_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAreaElement/area-islink-focus-null-ptr-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
-LayoutTests/fast/dom/HTMLButtonElement/change-type_t01: RuntimeError
-LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/clone-node_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/title-get_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/title-set_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-before-text-node_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-child-node_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text-form-control_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-children_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-remove-add-children_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-empty-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-false-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-ancestor-missing_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/innerHTML-selection-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-inherit-parent-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-inherit-parent-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-invalid-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/translate_t01: RuntimeError
-LayoutTests/fast/dom/HTMLFontElement/size-attribute_t01: RuntimeError
-LayoutTests/fast/dom/HTMLFormElement/adopt-assertion_t01: RuntimeError
-LayoutTests/fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail2_t01: RuntimeError
-LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-without-renderer-width_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/checked-pseudo-selector_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/clone-input-checked_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/duplicate-element-names_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-checked-reset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-size-attribute_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-text-reset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/size-as-number_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/label-control_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onerror_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-sheet-out-of-tree_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/subresource_t01: RuntimeError
-LayoutTests/fast/dom/HTMLMeterElement/meter-percent-size_t01: RuntimeError
-LayoutTests/fast/dom/HTMLMeterElement/set-meter-properties_t01: RuntimeError
-LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLObjectElement/children-changed_t01: RuntimeError
-LayoutTests/fast/dom/HTMLObjectElement/form/test1_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-children-removed_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/progress-element-with-child-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/progress-element-with-style-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/select-selectedOptions_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/selected-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/programmatically-add-style-with-onerror-handler_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/style-onload2_t01: RuntimeError
-LayoutTests/fast/dom/HTMLStyleElement/style-onload_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/createCaption_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/early-acid3-65-excerpt_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/exceptions_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/rows_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/tBodies_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableRowElement/exceptions_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableRowElement/insertCell_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/cloneNode_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/content-outlives-template-crash_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/contentWrappers_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/cycles_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/ownerDocument_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/added-out-of-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/clear-transient-without-delivery_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/create-during-delivery_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/delivery-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/document-fragment-insertion_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/mutation-record-constructor_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-options-character-data_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-subtree_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observer-wrapper-dropoff-transient_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observer-wrapper-dropoff_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/takeRecords_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/transient-gc-crash_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
-LayoutTests/fast/dom/Node/DOMNodeRemovedEvent_t01: RuntimeError
-LayoutTests/fast/dom/Node/contains-method_t01: RuntimeError
-LayoutTests/fast/dom/NodeList/childNodes-reset-cache_t01: RuntimeError
-LayoutTests/fast/dom/NodeList/childNodes-reverse-iteration_t01: RuntimeError
-LayoutTests/fast/dom/NodeList/invalidate-node-lists-when-parsing_t01: RuntimeError
-LayoutTests/fast/dom/NodeList/nodelist-moved-to-fragment-2_t01: RuntimeError
-LayoutTests/fast/dom/Range/31684_t01: RuntimeError
-LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
-LayoutTests/fast/dom/Range/create-contextual-fragment-script-unmark-already-started_t01: RuntimeError
-LayoutTests/fast/dom/Range/deleted-range-endpoints_t01: RuntimeError
-LayoutTests/fast/dom/Range/getClientRects-character_t01: RuntimeError
-LayoutTests/fast/dom/Range/missing-arguments_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-clone-contents_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-comparePoint_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-delete-contents-event-fire-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-extract-contents-event-fire-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-extractContents_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-assertion_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-isPointInRange_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-modifycontents_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-on-detached-node_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-processing-instructions_t01: RuntimeError
-LayoutTests/fast/dom/Range/surroundContents-for-detached-node_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/bug-17313_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/caseID_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/caseTag_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/detached-element_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/dumpNodeList_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/id-fastpath-strict_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector_t01: RuntimeError
-LayoutTests/fast/dom/SelectorAPI/viewless-document_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-style-2_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-stylesheet-without-wrapper_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/Text/previous-element-sibling_t01: RuntimeError
-LayoutTests/fast/dom/Text/text-constructor_t01: RuntimeError
-LayoutTests/fast/dom/TreeWalker/TreeWalker-basic_t01: RuntimeError
-LayoutTests/fast/dom/TreeWalker/TreeWalker-currentNode_t01: RuntimeError
-LayoutTests/fast/dom/Window/invalid-protocol_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-attribute-entities_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-doctype_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-double-xmlns_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-element-ns-no-reemit_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer_t01: RuntimeError
-LayoutTests/fast/dom/allowed-children_t01: RuntimeError
-LayoutTests/fast/dom/anchor-origin_t01: RuntimeError
-LayoutTests/fast/dom/anchor-toString_t01: RuntimeError
-LayoutTests/fast/dom/assertion-on-node-removal_t01: RuntimeError
-LayoutTests/fast/dom/capturing-event-listeners_t01: RuntimeError
-LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
-LayoutTests/fast/dom/class-attr-change-double-mutation-fire_t01: RuntimeError
-LayoutTests/fast/dom/click-method-on-html-element_t01: RuntimeError
-LayoutTests/fast/dom/clone-contents-0-end-offset_t01: RuntimeError
-LayoutTests/fast/dom/clone-node-form-elements-with-attr_t01: RuntimeError
-LayoutTests/fast/dom/clone-node-load-event-crash_t01: RuntimeError
-LayoutTests/fast/dom/cloneNode-below-body-attribute-merging_t01: RuntimeError
-LayoutTests/fast/dom/comment-not-documentElement_t01: RuntimeError
-LayoutTests/fast/dom/containerNode_t01: RuntimeError
-LayoutTests/fast/dom/createDocumentType2_t01: RuntimeError
-LayoutTests/fast/dom/createDocument_t01: RuntimeError
-LayoutTests/fast/dom/createElementNS-empty-namespace_t01: RuntimeError
-LayoutTests/fast/dom/createElementNS_t01: RuntimeError
-LayoutTests/fast/dom/createElement_t01: RuntimeError
-LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError
-LayoutTests/fast/dom/css-inline-style-important_t01: RuntimeError
-LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError
-LayoutTests/fast/dom/css-mediarule-insertRule-update_t01: RuntimeError
-LayoutTests/fast/dom/css-mediarule-parentRule_t01: RuntimeError
-LayoutTests/fast/dom/css-selectorText_t01: RuntimeError
-LayoutTests/fast/dom/css-set-property-exception_t01: RuntimeError
-LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
-LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError
-LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/invalid-type-extension-crash_t01: RuntimeError
-LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
-LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
-LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
-LayoutTests/fast/dom/document-set-title-mutations_t01: RuntimeError
-LayoutTests/fast/dom/document-set-title-no-reuse_t01: RuntimeError
-LayoutTests/fast/dom/document-stylesheets-empty-style_t01: RuntimeError
-LayoutTests/fast/dom/document-width-height-force-layout_t01: RuntimeError
-LayoutTests/fast/dom/dom-instanceof_t01: RuntimeError
-LayoutTests/fast/dom/dom-parse-serialize-xmldecl_t01: RuntimeError
-LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
-LayoutTests/fast/dom/domtimestamp-is-number_t01: RuntimeError
-LayoutTests/fast/dom/duplicate-ids_t01: RuntimeError
-LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
-LayoutTests/fast/dom/focus-contenteditable_t01: RuntimeError, Pass
-LayoutTests/fast/dom/gc-image-element-2_t01: RuntimeError
-LayoutTests/fast/dom/gc-image-element_t01: RuntimeError
-LayoutTests/fast/dom/getElementById-consistency2_t01: RuntimeError
-LayoutTests/fast/dom/getElementById-consistency4_t01: RuntimeError
-LayoutTests/fast/dom/getElementById-consistency_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/001_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/003_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/004_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/006_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/007_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/009_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/012_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/014_t01: RuntimeError
-LayoutTests/fast/dom/getelementbyname-invalidation_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
-LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg_t01: RuntimeError
-LayoutTests/fast/dom/htmlcollection-length-after-item_t01: RuntimeError
-LayoutTests/fast/dom/icon-url-list_t01: RuntimeError
-LayoutTests/fast/dom/id-attribute-with-namespace-crash_t01: RuntimeError
-LayoutTests/fast/dom/importNode-confusing-localName_t01: RuntimeError
-LayoutTests/fast/dom/importNode-prefix_t01: RuntimeError
-LayoutTests/fast/dom/importNodeHTML_t01: RuntimeError
-LayoutTests/fast/dom/inner-text-first-letter_t01: RuntimeError
-LayoutTests/fast/dom/inner-text_t01: RuntimeError
-LayoutTests/fast/dom/inner-width-height_t01: RuntimeError
-LayoutTests/fast/dom/innerHTML-detached-element_t01: RuntimeError
-LayoutTests/fast/dom/innerHTML-escaping-attribute_t01: RuntimeError
-LayoutTests/fast/dom/innerHTML-nbsp_t01: RuntimeError
-LayoutTests/fast/dom/insertAdjacentHTML-DocumentFragment-crash_t01: RuntimeError
-LayoutTests/fast/dom/javascript-backslash_t01: RuntimeError
-LayoutTests/fast/dom/jsDevicePixelRatio_t01: RuntimeError
-LayoutTests/fast/dom/legend-display-inline_t01: RuntimeError
-LayoutTests/fast/dom/length-attribute-mapping_t01: RuntimeError
-LayoutTests/fast/dom/location-hash_t01: RuntimeError
-LayoutTests/fast/dom/multiple-ids_t01: RuntimeError
-LayoutTests/fast/dom/navigator-userAgent_t01: RuntimeError
-LayoutTests/fast/dom/navigator-vendorSub_t01: RuntimeError
-LayoutTests/fast/dom/node-childNodes-idempotence_t01: RuntimeError
-LayoutTests/fast/dom/node-iterator-reference-node-removed_t01: RuntimeError
-LayoutTests/fast/dom/node-iterator-with-doctype-root_t01: RuntimeError
-LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
-LayoutTests/fast/dom/null-chardata-crash_t01: RuntimeError
-LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
-LayoutTests/fast/dom/remove-style-element_t01: RuntimeError
-LayoutTests/fast/dom/replace-child-siblings_t01: RuntimeError
-LayoutTests/fast/dom/script-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/serialize-attribute_t01: RuntimeError
-LayoutTests/fast/dom/set-custom-validity-with-too-few-arguments_t01: RuntimeError
-LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
-LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
-LayoutTests/fast/dom/shadow/event-path-not-in-document_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
-LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
-LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
-LayoutTests/fast/dom/style-sheet-candidate-remove-unrendered-document_t01: RuntimeError
-LayoutTests/fast/dom/text-api-arguments_t01: RuntimeError
-LayoutTests/fast/dom/text-node-attach-crash_t01: RuntimeError
-LayoutTests/fast/dom/xhtml-fragment-whitespace_t01: RuntimeError
-LayoutTests/fast/dynamic/ancestor-to-absolute_t01: RuntimeError
-LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
-LayoutTests/fast/dynamic/continuation-detach-crash_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
-LayoutTests/fast/dynamic/float-remove-above-line_t01: RuntimeError
-LayoutTests/fast/dynamic/inline-to-block-crash_t01: RuntimeError
-LayoutTests/fast/dynamic/jQuery-animation-crash_t01: RuntimeError
-LayoutTests/fast/dynamic/layer-no-longer-paginated_t01: RuntimeError
-LayoutTests/fast/dynamic/position-change-layout_t01: RuntimeError
-LayoutTests/fast/dynamic/style-access-late-stylesheet-load_t01: RuntimeError
-LayoutTests/fast/dynamic/subtree-common-root_t01: RuntimeError
-LayoutTests/fast/encoding/bom-in-content_t01: RuntimeError
-LayoutTests/fast/events/change-overflow-on-overflow-change_t01: RuntimeError
-LayoutTests/fast/events/clipboard-dataTransferItemList-remove_t01: RuntimeError
-LayoutTests/fast/events/create-document-crash-on-attach-event_t01: RuntimeError
-LayoutTests/fast/events/defaultprevented_t01: RuntimeError
-LayoutTests/fast/events/delayed-style-mutation-event-crash_t01: RuntimeError
-LayoutTests/fast/events/dispatch-event-being-dispatched_t01: RuntimeError
-LayoutTests/fast/events/dispatchEvent-crash_t01: RuntimeError
-LayoutTests/fast/events/event-creation_t01: RuntimeError
-LayoutTests/fast/events/event-fired-after-removal_t01: RuntimeError
-LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
-LayoutTests/fast/events/event-listener-list-mutation_t01: RuntimeError
-LayoutTests/fast/events/event-listener-moving-documents_t01: RuntimeError
-LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
-LayoutTests/fast/events/fire-scroll-event-element_t01: RuntimeError
-LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError
-LayoutTests/fast/events/init-message-event_t01: RuntimeError
-LayoutTests/fast/events/invalid-002_t01: RuntimeError
-LayoutTests/fast/events/invalid-003_t01: RuntimeError
-LayoutTests/fast/events/mutation-during-append-child_t01: RuntimeError
-LayoutTests/fast/events/mutation-during-insert-before_t01: RuntimeError
-LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
-LayoutTests/fast/events/no-window-load_t01: RuntimeError
-LayoutTests/fast/events/onerror-bubbling_t01: RuntimeError
-LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError
-LayoutTests/fast/events/remove-event-listener_t01: RuntimeError
-LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
-LayoutTests/fast/events/scroll-during-zoom-change_t01: RuntimeError
-LayoutTests/fast/events/scroll-event-does-not-bubble_t01: RuntimeError
-LayoutTests/fast/events/selectstart-on-selectall_t01: RuntimeError
-LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError
-LayoutTests/fast/events/wheelevent-constructor_t01: RuntimeError
-LayoutTests/fast/events/window-load-capture_t01: RuntimeError
-LayoutTests/fast/eventsource/eventsource-attribute-listeners_t01: RuntimeError
-LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
-LayoutTests/fast/files/blob-close-read_t01: RuntimeError
-LayoutTests/fast/files/blob-constructor_t01: RuntimeError
-LayoutTests/fast/files/file-reader-abort-in-last-progress_t01: RuntimeError
-LayoutTests/fast/files/file-reader-done-reading-abort_t01: RuntimeError
-LayoutTests/fast/files/file-reader-fffd_t01: RuntimeError
-LayoutTests/fast/files/file-reader-result-twice_t01: RuntimeError
-LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
-LayoutTests/fast/files/workers/inline-worker-via-blob-url_t01: RuntimeError
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
-LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
-LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
-LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
-LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
-LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
-LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
-LayoutTests/fast/flexbox/box-orient-button_t01: RuntimeError
-LayoutTests/fast/flexbox/crash-button-input-autofocus_t01: RuntimeError
-LayoutTests/fast/flexbox/inline-children-crash_t01: RuntimeError
-LayoutTests/fast/flexbox/order-iterator-crash_t01: RuntimeError
-LayoutTests/fast/flexbox/repaint-scrollbar_t01: RuntimeError
-LayoutTests/fast/flexbox/vertical-box-form-controls_t01: RuntimeError
-LayoutTests/fast/forms/4628409_t01: RuntimeError
-LayoutTests/fast/forms/HTMLOptionElement_selected2_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-rangeOverflow_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-rangeUnderflow_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-typeMismatch-email_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-006_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-008_t01: RuntimeError
-LayoutTests/fast/forms/add-remove-form-elements-stress-test_t01: RuntimeError
-LayoutTests/fast/forms/autocomplete_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-focus-only-once_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-input-css-style-change_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-opera-004_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-opera-007_t01: RuntimeError
-LayoutTests/fast/forms/button-click-DOM_t01: RuntimeError
-LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
-LayoutTests/fast/forms/change-form-element-document-crash_t01: RuntimeError
-LayoutTests/fast/forms/checkValidity-003_t01: RuntimeError
-LayoutTests/fast/forms/checkbox-default-value_t01: RuntimeError
-LayoutTests/fast/forms/color/color-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/color/input-value-sanitization-color_t01: RuntimeError
-LayoutTests/fast/forms/control-detach-crash_t01: RuntimeError
-LayoutTests/fast/forms/cursor-position_t01: RuntimeError
-LayoutTests/fast/forms/dangling-form-element-crash_t01: RuntimeError
-LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError
-LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
-LayoutTests/fast/forms/date/date-interactive-validation-required_t01: RuntimeError
-LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
-LayoutTests/fast/forms/date/date-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/double-focus_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/fieldset-disabled_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/fieldset-name_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/fieldset-type_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/validation-in-fieldset_t01: RuntimeError
-LayoutTests/fast/forms/focus-style-pending_t01: RuntimeError
-LayoutTests/fast/forms/focus_t01: RuntimeError
-LayoutTests/fast/forms/form-added-to-table_t01: RuntimeError
-LayoutTests/fast/forms/form-associated-element-crash_t01: RuntimeError
-LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
-LayoutTests/fast/forms/form-attribute-not-in-document_t01: RuntimeError
-LayoutTests/fast/forms/form-input-named-arguments_t01: RuntimeError
-LayoutTests/fast/forms/form-submission-create-crash_t01: RuntimeError
-LayoutTests/fast/forms/formmethod-attribute-test_t01: RuntimeError
-LayoutTests/fast/forms/image/image-error-event-crash_t01: RuntimeError
-LayoutTests/fast/forms/image/image-error-event-modifies-type-crash_t01: RuntimeError
-LayoutTests/fast/forms/image/width-and-height-of-detached-input_t01: RuntimeError
-LayoutTests/fast/forms/incremental-dom-property_t01: RuntimeError
-LayoutTests/fast/forms/indeterminate-input-types_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-maxlength_t01: RuntimeError
-LayoutTests/fast/forms/input-changing-value_t01: RuntimeError
-LayoutTests/fast/forms/input-file-set-value_t01: RuntimeError
-LayoutTests/fast/forms/input-hit-test-border_t01: RuntimeError
-LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
-LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
-LayoutTests/fast/forms/input-maxlength-unsupported_t01: RuntimeError
-LayoutTests/fast/forms/input-maxlength_t01: RuntimeError
-LayoutTests/fast/forms/input-multiple_t01: RuntimeError
-LayoutTests/fast/forms/input-select-webkit-user-select-none_t01: RuntimeError
-LayoutTests/fast/forms/input-type-change-focusout_t01: RuntimeError
-LayoutTests/fast/forms/input-type-change_t01: RuntimeError
-LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
-LayoutTests/fast/forms/input-width-height-attributes_t01: RuntimeError
-LayoutTests/fast/forms/interactive-validation-select-crash_t01: RuntimeError
-LayoutTests/fast/forms/legend-absolute-position-auto-width_t01: RuntimeError
-LayoutTests/fast/forms/listbox-scroll-after-options-removed_t01: RuntimeError
-LayoutTests/fast/forms/listbox-select-all_t01: RuntimeError
-LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
-LayoutTests/fast/forms/method-attribute_t01: RuntimeError
-LayoutTests/fast/forms/misplaced-img-form-registration_t01: RuntimeError
-LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
-LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
-LayoutTests/fast/forms/option-label-trim-html-spaces_t01: RuntimeError
-LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
-LayoutTests/fast/forms/option-value-and-label-changed-by-js_t01: RuntimeError
-LayoutTests/fast/forms/option-value-and-label_t01: RuntimeError
-LayoutTests/fast/forms/option-value-trim-html-spaces_t01: RuntimeError
-LayoutTests/fast/forms/output-reset-assertion-failed_t01: RuntimeError
-LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
-LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
-LayoutTests/fast/forms/pattern-attribute-002_t01: RuntimeError
-LayoutTests/fast/forms/percent-height-auto-width-form-controls_t01: RuntimeError
-LayoutTests/fast/forms/placeholder-dom-property_t01: RuntimeError
-LayoutTests/fast/forms/placeholder-non-textfield_t01: RuntimeError
-LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
-LayoutTests/fast/forms/radio-checkbox-restore-indeterminate_t01: RuntimeError
-LayoutTests/fast/forms/required-attribute-002_t01: RuntimeError
-LayoutTests/fast/forms/search-placeholder-value-changed_t01: RuntimeError
-LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
-LayoutTests/fast/forms/select-display-none-style-resolve_t01: RuntimeError
-LayoutTests/fast/forms/select-generated-content_t01: RuntimeError
-LayoutTests/fast/forms/select-out-of-bounds-index_t01: RuntimeError
-LayoutTests/fast/forms/select-remove-option_t01: RuntimeError
-LayoutTests/fast/forms/select-set-inner_t01: RuntimeError
-LayoutTests/fast/forms/select-set-length-with-mutation-remove_t01: RuntimeError
-LayoutTests/fast/forms/selection-direction_t01: RuntimeError
-LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
-LayoutTests/fast/forms/setCustomValidity-arguments_t01: RuntimeError
-LayoutTests/fast/forms/setCustomValidity-existence_t01: RuntimeError
-LayoutTests/fast/forms/shadow-tree-exposure_t01: RuntimeError
-LayoutTests/fast/forms/slow-click_t01: RuntimeError
-LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute_t01: RuntimeError
-LayoutTests/fast/forms/submit-form-with-dirname-attribute_t01: RuntimeError
-LayoutTests/fast/forms/text-control-selection-crash_t01: RuntimeError
-LayoutTests/fast/forms/text-set-value-crash_t01: RuntimeError
-LayoutTests/fast/forms/textarea-and-mutation-events_t01: RuntimeError
-LayoutTests/fast/forms/textarea-checkValidity-crash_t01: RuntimeError
-LayoutTests/fast/forms/textarea-crlf_t01: RuntimeError
-LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
-LayoutTests/fast/forms/textarea-placeholder-dom-property_t01: RuntimeError
-LayoutTests/fast/forms/textarea-placeholder-relayout-assertion_t01: RuntimeError
-LayoutTests/fast/forms/textarea-rows-cols_t01: RuntimeError
-LayoutTests/fast/forms/textarea-selection-preservation_t01: RuntimeError
-LayoutTests/fast/forms/textarea-set-defaultvalue-after-value_t01: RuntimeError
-LayoutTests/fast/forms/textarea-submit-crash_t01: RuntimeError
-LayoutTests/fast/forms/textarea-trailing-newline_t01: RuntimeError
-LayoutTests/fast/forms/validationMessage_t01: RuntimeError
-LayoutTests/fast/forms/validity-property_t01: RuntimeError
-LayoutTests/fast/forms/willvalidate_t01: RuntimeError
-LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
-LayoutTests/fast/html/article-element_t01: RuntimeError
-LayoutTests/fast/html/body-offset-properties_t01: RuntimeError
-LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
-LayoutTests/fast/html/details-click-controls_t01: RuntimeError
-LayoutTests/fast/html/details-mouse-click_t01: RuntimeError
-LayoutTests/fast/html/disable-style-element_t01: RuntimeError
-LayoutTests/fast/html/draggable_t01: RuntimeError
-LayoutTests/fast/html/empty-fragment-id-goto-top_t01: RuntimeError
-LayoutTests/fast/html/eventhandler-attribute-non-callable_t01: RuntimeError
-LayoutTests/fast/html/figure-element_t01: RuntimeError
-LayoutTests/fast/html/header-element_t01: RuntimeError
-LayoutTests/fast/html/hgroup-element_t01: RuntimeError
-LayoutTests/fast/html/hidden-attr_t01: RuntimeError
-LayoutTests/fast/html/layout-with-pending-stylesheet_t01: RuntimeError
-LayoutTests/fast/html/main-element_t01: RuntimeError
-LayoutTests/fast/html/object-border_t01: RuntimeError
-LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
-LayoutTests/fast/html/xhtml-serialize_t01: RuntimeError
-LayoutTests/fast/inline-block/inline-block-vertical-align-t02: RuntimeError
-LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
-LayoutTests/fast/inline/fixed-pos-moves-with-abspos-inline-parent_t01: RuntimeError
-LayoutTests/fast/inline/fixed-pos-moves-with-abspos-parent_t01: RuntimeError
-LayoutTests/fast/inline/fixed-pos-with-transform-container-moves-with-abspos-parent_t01: RuntimeError
-LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
-LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/inline/reattach-inlines-in-anonymous-blocks-with-out-of-flow-siblings_t01: RuntimeError
-LayoutTests/fast/innerHTML/001_t01: RuntimeError
-LayoutTests/fast/innerHTML/002_t01: RuntimeError
-LayoutTests/fast/innerHTML/003_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-case_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-custom-tag_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-svg-read_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-svg-write_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-template-crash_t01: RuntimeError
-LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
-LayoutTests/fast/layers/negative-scroll-positions_t01: RuntimeError
-LayoutTests/fast/layers/normal-flow-hit-test_t01: RuntimeError
-LayoutTests/fast/layers/zindex-hit-test_t01: RuntimeError
-LayoutTests/fast/lists/calc-width-with-space_t01: RuntimeError
-LayoutTests/fast/lists/item-not-in-list-line-wrapping_t01: RuntimeError
-LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-change_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-kept_t01: RuntimeError
-LayoutTests/fast/loader/hashchange-event-async_t01: RuntimeError
-LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
-LayoutTests/fast/loader/scroll-position-restored-on-back_t01: RuntimeError
-LayoutTests/fast/loader/stateobjects/replacestate-in-onunload_t01: RuntimeError
-LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
-LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
-LayoutTests/fast/media/invalid-lengths_t01: RuntimeError
-LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
-LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
-LayoutTests/fast/media/mq-append-delete_t01: RuntimeError
-LayoutTests/fast/media/mq-color-index_t02: RuntimeError
-LayoutTests/fast/media/mq-js-media-except_t03: RuntimeError
-LayoutTests/fast/media/mq-js-update-media_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCIceCandidate_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
-LayoutTests/fast/mediastream/constructors_t01: RuntimeError
-LayoutTests/fast/multicol/balance-unbreakable_t01: RuntimeError
-LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
-LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/gap-non-negative_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-gap-between-pages-flipped_t01: RuntimeError
-LayoutTests/fast/multicol/image-inside-nested-blocks-with-border_t01: RuntimeError
-LayoutTests/fast/multicol/inline-getclientrects_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance-images_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance-maxheight_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t02: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t03: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t04: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t05: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t08: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance_t10: RuntimeError
-LayoutTests/fast/multicol/orphans-relayout_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/widows_t01: RuntimeError
-LayoutTests/fast/multicol/zeroColumnCount_t01: RuntimeError
-LayoutTests/fast/overflow/child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
-LayoutTests/fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
-LayoutTests/fast/overflow/scroll-vertical-not-horizontal_t01: RuntimeError
-LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
-LayoutTests/fast/parser/foster-parent_t01: RuntimeError
-LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
-LayoutTests/fast/parser/href-whitespace_t01: RuntimeError
-LayoutTests/fast/parser/image-tag-parses-to-HTMLImageElement_t01: RuntimeError
-LayoutTests/fast/parser/parse-wbr_t01: RuntimeError
-LayoutTests/fast/parser/residual-style-close-across-n-blocks_t01: RuntimeError
-LayoutTests/fast/parser/stray-end-tags-with-attributes-001_t01: RuntimeError
-LayoutTests/fast/parser/stray-end-tags-with-attributes-002_t01: RuntimeError
-LayoutTests/fast/parser/stray-param_t01: RuntimeError
-LayoutTests/fast/parser/strict-img-in-map_t01: RuntimeError
-LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
-LayoutTests/fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr_t01: RuntimeError
-LayoutTests/fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor_t01: RuntimeError
-LayoutTests/fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor-vertical-lr_t01: RuntimeError
-LayoutTests/fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor_t01: RuntimeError
-LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError
-LayoutTests/fast/replaced/preferred-widths_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
-LayoutTests/fast/ruby/after-doesnt-crash_t01: RuntimeError
-LayoutTests/fast/ruby/before-block-doesnt-crash_t01: RuntimeError
-LayoutTests/fast/ruby/parse-rp_t01: RuntimeError
-LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
-LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
-LayoutTests/fast/selectors/querySelector-in-range-crash_t01: RuntimeError
-LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-ancestor_t01: RuntimeError
-LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode_t01: RuntimeError
-LayoutTests/fast/selectors/querySelector-scope_t01: RuntimeError
-LayoutTests/fast/selectors/style-sharing-last-child_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-outside-none_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: RuntimeError
-LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
-LayoutTests/fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping_t01: RuntimeError
-LayoutTests/fast/sub-pixel/block-preferred-widths-with-sub-pixel-floats_t01: RuntimeError
-LayoutTests/fast/sub-pixel/boundingclientrect-subpixel-margin_t01: RuntimeError
-LayoutTests/fast/sub-pixel/client-and-offset-width_t01: RuntimeError
-LayoutTests/fast/sub-pixel/computedstylemargin_t01: RuntimeError
-LayoutTests/fast/sub-pixel/float-percentage-widths_t01: RuntimeError
-LayoutTests/fast/sub-pixel/inline-block-with-padding_t01: RuntimeError
-LayoutTests/fast/sub-pixel/shadows-computed-style_t01: RuntimeError
-LayoutTests/fast/sub-pixel/table-cells-have-stable-width_t01: RuntimeError
-LayoutTests/fast/sub-pixel/tiled-canvas-elements_t01: RuntimeError
-LayoutTests/fast/sub-pixel/vertical-align-middle-overflow_t01: RuntimeError
-LayoutTests/fast/svg/getbbox_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
-LayoutTests/fast/table/before-child-non-table-section-add-table-crash_t01: RuntimeError
-LayoutTests/fast/table/columngroup-inside-columngroup_t01: RuntimeError
-LayoutTests/fast/table/css-table-width_t01: RuntimeError
-LayoutTests/fast/table/fixed-table-layout-toggle-colwidth_t01: RuntimeError
-LayoutTests/fast/table/fixed-table-layout-width-change_t01: RuntimeError
-LayoutTests/fast/table/form-with-non-table-display-inside-table-elements_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-bottom-edge_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-with-borders-bottom-edge_t01: RuntimeError
-LayoutTests/fast/table/html-table-width-max-width-constrained_t01: RuntimeError
-LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
-LayoutTests/fast/table/margins-flipped-text-direction_t01: RuntimeError
-LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
-LayoutTests/fast/table/nested-tables-with-div-offset_t01: RuntimeError
-LayoutTests/fast/table/prepend-in-anonymous-table_t01: RuntimeError
-LayoutTests/fast/table/resize-table-cell_t01: RuntimeError
-LayoutTests/fast/table/resize-table-row_t01: RuntimeError
-LayoutTests/fast/table/rowindex-comment-nodes_t01: RuntimeError
-LayoutTests/fast/table/switch-table-layout-multiple-section_t01: RuntimeError
-LayoutTests/fast/table/switch-table-layout_t01: RuntimeError
-LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows_t01: RuntimeError
-LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-cell-with-empty-cell_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t02: RuntimeError
-LayoutTests/fast/table/table-size-integer-overflow_t01: RuntimeError
-LayoutTests/fast/table/table-with-borderattr-null_t01: RuntimeError
-LayoutTests/fast/table/table-with-borderattr-set-to-null_t01: RuntimeError
-LayoutTests/fast/table/table-with-content-width-exceeding-max-width_t01: RuntimeError
-LayoutTests/fast/table/td-bordercolor-attribute_t01: RuntimeError
-LayoutTests/fast/text-autosizing/table-inline-width_t01: RuntimeError
-LayoutTests/fast/text-autosizing/text-removal_t01: RuntimeError
-LayoutTests/fast/text/container-align-with-inlines_t01: RuntimeError
-LayoutTests/fast/text/decomposed-after-stacked-diacritics_t01: RuntimeError
-LayoutTests/fast/text/find-case-folding_t01: RuntimeError
-LayoutTests/fast/text/find-hidden-text_t01: RuntimeError
-LayoutTests/fast/text/find-kana_t01: RuntimeError
-LayoutTests/fast/text/find-russian_t01: RuntimeError
-LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
-LayoutTests/fast/text/font-ligature-letter-spacing_t01: RuntimeError
-LayoutTests/fast/text/font-size-zero_t01: RuntimeError
-LayoutTests/fast/text/glyph-reordering_t01: RuntimeError
-LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
-LayoutTests/fast/text/line-break-after-empty-inline-hebrew_t01: RuntimeError
-LayoutTests/fast/text/line-breaks-after-closing-punctuations_t01: RuntimeError
-LayoutTests/fast/text/multiglyph-characters_t01: RuntimeError
-LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
-LayoutTests/fast/text/soft-hyphen-5_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
-LayoutTests/fast/text/text-combine-first-line-crash_t01: RuntimeError
-LayoutTests/fast/text/text-fragment-first-letter-update-crash_t01: RuntimeError
-LayoutTests/fast/text/window-find_t01: RuntimeError
-LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
-LayoutTests/fast/tokenizer/doctype-search-reset_t01: RuntimeError
-LayoutTests/fast/tokenizer/entities_t02: RuntimeError
-LayoutTests/fast/tokenizer/entities_t03: RuntimeError
-LayoutTests/fast/transforms/topmost-becomes-bottomost-for-scrolling_t01: RuntimeError
-LayoutTests/fast/transforms/transform-hit-test-flipped_t01: RuntimeError
-LayoutTests/fast/transforms/transform-inside-overflow-scroll_t01: RuntimeError
-LayoutTests/fast/url/anchor_t01: RuntimeError
-LayoutTests/fast/url/file-http-base_t01: RuntimeError
-LayoutTests/fast/url/file_t01: RuntimeError
-LayoutTests/fast/url/host-lowercase-per-scheme_t01: RuntimeError
-LayoutTests/fast/url/idna2003_t01: RuntimeError
-LayoutTests/fast/url/idna2008_t01: RuntimeError
-LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
-LayoutTests/fast/url/ipv4_t01: RuntimeError
-LayoutTests/fast/url/ipv6_t01: RuntimeError
-LayoutTests/fast/url/mailto_t01: RuntimeError
-LayoutTests/fast/url/path-url_t01: RuntimeError
-LayoutTests/fast/url/path_t01: RuntimeError
-LayoutTests/fast/url/query_t01: RuntimeError
-LayoutTests/fast/url/relative-win_t01: RuntimeError
-LayoutTests/fast/url/relative_t01: RuntimeError
-LayoutTests/fast/url/safari-extension_t01: RuntimeError
-LayoutTests/fast/url/segments_t01: RuntimeError
-LayoutTests/fast/url/standard-url_t01: RuntimeError
-LayoutTests/fast/writing-mode/auto-margins-across-boundaries_t01: RuntimeError
-LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
-LayoutTests/fast/writing-mode/flipped-blocks-text-map-local-to-container_t01: RuntimeError
-LayoutTests/fast/writing-mode/overhanging-float-legend-crash_t01: RuntimeError
-LayoutTests/fast/writing-mode/positionForPoint_t01: RuntimeError
-LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
-LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-html-response-encoding_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-text_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-set-responsetype_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_literal_expr_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_nodeset_expr_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_numeric_expr_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_step_t01: RuntimeError
-LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
-LayoutTests/fast/xpath/attr-namespace_t01: RuntimeError
-LayoutTests/fast/xpath/attribute-node-predicate_t01: RuntimeError
-LayoutTests/fast/xpath/complex-id_t01: RuntimeError
-LayoutTests/fast/xpath/empty-string-substring_t01: RuntimeError
-LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
-LayoutTests/fast/xpath/id-path_t01: RuntimeError
-LayoutTests/fast/xpath/id-simple_t01: RuntimeError
-LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
-LayoutTests/fast/xpath/invalid-resolver_t01: RuntimeError
-LayoutTests/fast/xpath/nan-to-boolean_t01: RuntimeError
-LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
-LayoutTests/fast/xpath/substring-nan-position_t01: RuntimeError
-LayoutTests/fast/xpath/xpath-detached-nodes_t01: RuntimeError
-LayoutTests/fast/xpath/xpath-result-eventlistener-crash_t01: RuntimeError
-LayoutTests/fast/xpath/xpath-template-element_t01: RuntimeError
-LayoutTests/fast/xsl/default-html_t01: RuntimeError
-LayoutTests/fast/xsl/extra-lf-at-end_t01: RuntimeError
-LayoutTests/fast/xsl/nbsp-in-stylesheet_t01: RuntimeError
-LayoutTests/fast/xsl/transformToFragment-XML-declaration_t01: RuntimeError
-LayoutTests/fast/xsl/xslt-bad-import-uri_t01: RuntimeError
-LayoutTests/fast/xsl/xslt-fragment-in-empty-doc_t01: RuntimeError
-LayoutTests/fast/xsl/xslt-string-parameters_t01: RuntimeError
-LayoutTests/fast/xsl/xslt-transform-to-fragment-crash_t01: RuntimeError
-LibTest/async/Future/asStream_A01_t02: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError, Pass
-LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
-LibTest/async/StreamController/addStream_A03_t01: RuntimeError
-LibTest/async/StreamController/stream_A02_t03: RuntimeError
-LibTest/async/StreamController/stream_A03_t02: RuntimeError
-LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
-LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
-LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
-LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
-LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
-LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
-LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
-LibTest/collection/LinkedList/join_A01_t01: RuntimeError
-LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
-LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
-LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
-LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
-LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
-LibTest/core/AssertionError/message_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
-LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/parse_A01_t03: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
-LibTest/core/Duration/Duration_A01_t01: CompileTimeError
-LibTest/core/Duration/Duration_A02_t01: CompileTimeError
-LibTest/core/Duration/inDays_A01_t01: CompileTimeError
-LibTest/core/Duration/inHours_A01_t01: CompileTimeError
-LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
-LibTest/core/Error/stackTrace_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
-LibTest/core/Function/Function_class_A01_t01: RuntimeError
-LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
-LibTest/core/Runes/any_A01_t01: RuntimeError
-LibTest/core/Runes/every_A01_t01: RuntimeError
-LibTest/core/String/padRight_A01_t01: RuntimeError
-LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
-LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
-LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
-LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
-LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
-LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
-LibTest/core/UriData/charset_A01_t01: RuntimeError
-LibTest/core/UriData/contentText_A01_t01: RuntimeError
-LibTest/core/UriData/parse_A01_t01: RuntimeError
-LibTest/core/double/INFINITY_A01_t04: RuntimeError
-LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
-LibTest/core/double/isInfinite_A01_t03: CompileTimeError
-LibTest/core/double/operator_GE_A01_t02: CompileTimeError
-LibTest/core/double/operator_GT_A01_t02: CompileTimeError
-LibTest/core/double/operator_LT_A01_t02: CompileTimeError
-LibTest/core/double/operator_addition_A01_t08: Crash
-LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
-LibTest/core/double/operator_subtraction_A01_t09: Crash
-LibTest/core/int/ceil_A01_t01: CompileTimeError
-LibTest/core/int/compareTo_A01_t01: CompileTimeError
-LibTest/core/int/floorToDouble_A01_t01: CompileTimeError
-LibTest/core/int/floor_A01_t01: CompileTimeError
-LibTest/core/int/hashCode_A01_t01: CompileTimeError
-LibTest/core/int/isInfinite_A01_t01: CompileTimeError
-LibTest/core/int/isNegative_A01_t01: CompileTimeError
-LibTest/core/int/isOdd_A01_t01: RuntimeError
-LibTest/core/int/operator_AND_A01_t01: CompileTimeError
-LibTest/core/int/operator_GE_A01_t01: CompileTimeError
-LibTest/core/int/operator_LT_A01_t01: CompileTimeError
-LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
-LibTest/core/int/operator_addition_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A03_t01: CompileTimeError
-LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
-LibTest/core/int/operator_remainder_A01_t03: RuntimeError
-LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t02: RuntimeError
-LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
-LibTest/core/int/parse_A03_t02: CompileTimeError
-LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
-LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
-LibTest/html/Element/focus_A01_t01: RuntimeError
-LibTest/typed_data/Float64List/shuffle_A01_t01: RuntimeError, Pass
-Utils/tests/Expect/throws_A01_t04: RuntimeError
-WebPlatformTest/DOMEvents/approved/Event.bubbles.false_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/EventObject.multiple.dispatchEvent_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/Propagation.path.target.removed_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
-WebPlatformTest/DOMEvents/approved/stopPropagation.deferred.effect_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
-WebPlatformTest/Utils/test/asyncTestPass_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestTimeout_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
-WebPlatformTest/dom/collections/emptyName_A01_t02: RuntimeError
-WebPlatformTest/dom/collections/emptyName_A01_t05: RuntimeError
-WebPlatformTest/dom/events/defaultPrevented_A01_t06: RuntimeError
-WebPlatformTest/dom/events/event_constructors/Event_A01_t01: RuntimeError
-WebPlatformTest/dom/events/propagation_A01_t01: RuntimeError
-WebPlatformTest/dom/events/type_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/deleteData_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/insertData_A02_t01: RuntimeError
-WebPlatformTest/dom/nodes/CharacterData/remove_A02_t02: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-createElementNS_t02: RuntimeError
-WebPlatformTest/dom/nodes/DocumentType-remove_t01: RuntimeError
-WebPlatformTest/dom/nodes/Element-childElementCount-dynamic-remove_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-contains_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-parentElement_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-parentNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-textContent_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/attributes_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/attributes_A02_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/attributes_A04_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/attributes_A05_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A03_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A04_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A06_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A06_t02: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A09_t02: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A10_t02: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A02_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A02_t02: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A04_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A06_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A07_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A08_t01: RuntimeError
-WebPlatformTest/dom/ranges/Range-attributes_t02: RuntimeError
-WebPlatformTest/html-imports/link-import_t02: RuntimeError
-WebPlatformTest/html-imports/loading-import_t01: RuntimeError
-WebPlatformTest/html-templates/additions-to-the-steps-to-clone-a-node/template-clone-children_t01: RuntimeError
-WebPlatformTest/html-templates/definitions/template-contents-owner-document-type_t01: RuntimeError
-WebPlatformTest/html-templates/definitions/template-contents_t01: RuntimeError
-WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-foster-parenting/template-is-a-foster-parent-element_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-body-token_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-frameset-token_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-body-insertion-mode/ignore-html-token_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-table-insertion-mode/end-tag-table_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/appending-to-a-template/template-child-nodes_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
-WebPlatformTest/html-templates/serializing-html-templates/outerhtml_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/node-document-changes_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
-WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/Document.getElementsByClassName-null_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/Element.getElementsByClassName-null_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-newelements_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.head_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.head_t02: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t04: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t05: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/nameditem_t06: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-enumeration_t01: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/id-name_t01: RuntimeError
-WebPlatformTest/html/semantics/disabled-elements/disabledElement_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/default_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/label_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/track_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/the-audio-element/audio_constructor_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/selection-not-application-textarea_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-datalist-element/datalistelement_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-fieldset-element/disabled_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/color_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/input-type-checkbox_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/pattern_attribute_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/telephone_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/url_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
-WebPlatformTest/html/semantics/grouping-content/the-li-element/grouping-li_t01: RuntimeError
-WebPlatformTest/html/semantics/grouping-content/the-ol-element/ol.start-reflection_t01: RuntimeError
-WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/inrange-outofrange_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/link_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/required-optional_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/valid-invalid_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/caption-methods_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/createTBody_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/insertRow-method_t02: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/table-insertRow_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-tr-element/rowIndex_t01: RuntimeError
-WebPlatformTest/html/semantics/text-level-semantics/the-a-element/a.text-getter_t01: RuntimeError
-WebPlatformTest/html/semantics/text-level-semantics/the-a-element/a.text-setter_t01: RuntimeError
-WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t01: RuntimeError, Pass
-WebPlatformTest/html/syntax/parsing/Document.getElementsByTagName-foreign_t02: RuntimeError
-WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
-WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
-WebPlatformTest/webstorage/event_local_newvalue_t01: RuntimeError
-WebPlatformTest/webstorage/event_local_storageeventinit_t01: RuntimeError
-WebPlatformTest/webstorage/event_session_url_t01: RuntimeError
-WebPlatformTest/webstorage/storage_local_remove_t01: RuntimeError
-WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: RuntimeError
-WebPlatformTest/webstorage/storage_local_setitem_t01: RuntimeError
-WebPlatformTest/webstorage/storage_session_getitem_t02: RuntimeError
-WebPlatformTest/webstorage/storage_session_length_t01: RuntimeError
-WebPlatformTest/webstorage/storage_session_removeitem_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime == d8 && $system == linux && !$fast_startup ]
-LayoutTests/fast/canvas/canvas-drawImage-scaled-copy-to-self_t01: RuntimeError
-LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime == ff ]
-Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
-Language/Expressions/Constants/depending_on_itself_t03: Crash
-Language/Expressions/Constants/exception_t02/01: CompileTimeError
-Language/Expressions/Constants/integer_size_t03: CompileTimeError
-Language/Expressions/Constants/integer_size_t04: CompileTimeError
-Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
-Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
-Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
-Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
-Language/Expressions/Lists/identical_t02: RuntimeError
-Language/Expressions/Maps/identical_t02: RuntimeError
-Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
-Language/Expressions/Numbers/syntax_t06: CompileTimeError
-Language/Expressions/Numbers/syntax_t09: CompileTimeError
-Language/Expressions/Object_Identity/double_t02: RuntimeError
-Language/Expressions/Shift/integer_t02: CompileTimeError
-Language/Expressions/Type_Cast/syntax_t01: RuntimeError
-Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
-Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
-Language/Metadata/before_ctor_t02: RuntimeError
-Language/Metadata/before_function_t01: RuntimeError
-Language/Metadata/before_function_t02: RuntimeError
-Language/Metadata/before_function_t03: RuntimeError
-Language/Metadata/before_function_t04: RuntimeError
-Language/Metadata/before_function_t07: RuntimeError
-Language/Metadata/before_import_t01: RuntimeError
-Language/Metadata/before_param_t03: RuntimeError
-Language/Metadata/before_param_t05: RuntimeError
-Language/Metadata/before_param_t07: RuntimeError
-Language/Metadata/before_param_t09: RuntimeError
-Language/Metadata/before_variable_t02: RuntimeError
-Language/Overview/Privacy/private_and_public_t18: RuntimeError
-Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
-Language/Statements/Assert/execution_t09: RuntimeError
-Language/Types/Function_Types/call_t01: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
-Language/Types/Interface_Types/subtype_t06: RuntimeError
-Language/Types/Interface_Types/subtype_t21: RuntimeError
-Language/Types/Interface_Types/subtype_t23: RuntimeError
-Language/Variables/constant_variable_t09: RuntimeError
-LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_FutureOr_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t10: RuntimeError, Pass
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t05: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
-LayoutTests/fast/animation/request-animation-frame-cancel_t01: Timeout, Pass
-LayoutTests/fast/animation/request-animation-frame-timestamps-advance_t01: Timeout, Pass
-LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
-LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
-LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
-LayoutTests/fast/borders/border-width-percent_t01: RuntimeError
-LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
-LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
-LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
-LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillRect-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillText-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-font-ex-units-crash_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: Timeout, Pass
-LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-resize-after-paint_t01: Timeout, Pass
-LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-stroke-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-toDataURL-crash_t01: RuntimeError
-LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
-LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
-LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
-LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
-LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-get-calls_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout
-LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout
-LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout
-LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
-LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
-LayoutTests/fast/css-generated-content/details-before-after-content_t01: RuntimeError
-LayoutTests/fast/css-generated-content/malformed-url_t01: Timeout, RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-animation-before-onload_t01: RuntimeError, Pass
-LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError, Pass
-LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
-LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout
-LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
-LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError, Pass
-LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
-LayoutTests/fast/css/auto-min-size_t01: RuntimeError
-LayoutTests/fast/css/background-serialize_t01: RuntimeError
-LayoutTests/fast/css/border-image-null-image-crash_t01: RuntimeError
-LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
-LayoutTests/fast/css/border-shorthand-initialize-longhands_t01: RuntimeError
-LayoutTests/fast/css/border-start-end_t01: RuntimeError
-LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
-LayoutTests/fast/css/content/content-none_t01: RuntimeError
-LayoutTests/fast/css/counters/complex-before_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing_t01: RuntimeError
-LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
-LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
-LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
-LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError, Pass
-LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError
-LayoutTests/fast/css/font-property-priority_t01: RuntimeError
-LayoutTests/fast/css/fontface-properties_t01: RuntimeError
-LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-style-shorthand_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-2_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-length-unit_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-column-rule_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse_t01: RuntimeError
-LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
-LayoutTests/fast/css/image-set-setting_t01: RuntimeError
-LayoutTests/fast/css/implicit-attach-marking_t01: Timeout, Pass
-LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
-LayoutTests/fast/css/insertRule-media_t01: RuntimeError
-LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
-LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
-LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
-LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
-LayoutTests/fast/css/nested-at-rules_t01: RuntimeError
-LayoutTests/fast/css/overflow-property_t01: RuntimeError
-LayoutTests/fast/css/padding-start-end_t01: RuntimeError
-LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
-LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout
-LayoutTests/fast/css/pseudo-required-optional-004_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-005_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-unapplied_t01: RuntimeError
-LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
-LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout
-LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
-LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
-LayoutTests/fast/css/shorthand-setProperty-important_t01: RuntimeError
-LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
-LayoutTests/fast/css/style-element-process-crash_t01: Timeout
-LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
-LayoutTests/fast/css/text-align-webkit-match-parent_t01: RuntimeError
-LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError
-LayoutTests/fast/css/webkit-color-adjust_t01: RuntimeError
-LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
-LayoutTests/fast/css/zoom-property-parsing_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
-LayoutTests/fast/dom/Document/createElement-valid-names_t01: RuntimeError
-LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
-LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
-LayoutTests/fast/dom/Element/id-in-insert-hr_t01: RuntimeError
-LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
-LayoutTests/fast/dom/Element/scrollWidth_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: Timeout, Pass
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
-LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
-LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: Timeout, RuntimeError
-LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-before-text-node_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-child-node_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text-form-control_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-children_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-remove-add-children_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-empty-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-false-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-ancestor-missing_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-inherit-parent-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-inherit-parent-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-invalid-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/translate_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
-LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
-LayoutTests/fast/dom/HTMLMeterElement/set-meter-properties_t01: RuntimeError
-LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: Timeout
-LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
-LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout
-LayoutTests/fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/added-out-of-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
-LayoutTests/fast/dom/Range/getClientRects-character_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-assertion_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/anchor-origin_t01: RuntimeError
-LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
-LayoutTests/fast/dom/containerNode_t01: Timeout
-LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError
-LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError
-LayoutTests/fast/dom/css-selectorText_t01: RuntimeError, Pass
-LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
-LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError, Pass
-LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/invalid-type-extension-crash_t01: RuntimeError
-LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
-LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
-LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
-LayoutTests/fast/dom/dom-parse-serialize-xmldecl_t01: RuntimeError
-LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
-LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
-LayoutTests/fast/dom/focus-contenteditable_t01: RuntimeError, Pass
-LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
-LayoutTests/fast/dom/gc-image-element_t01: Timeout
-LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
-LayoutTests/fast/dom/image-object_t01: Timeout
-LayoutTests/fast/dom/javascript-backslash_t01: RuntimeError
-LayoutTests/fast/dom/length-attribute-mapping_t01: RuntimeError
-LayoutTests/fast/dom/location-hash_t01: RuntimeError
-LayoutTests/fast/dom/navigator-userAgent_t01: RuntimeError
-LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
-LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
-LayoutTests/fast/dom/remove-body-during-body-replacement_t01: Timeout
-LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
-LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
-LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
-LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
-LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
-LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Timeout
-LayoutTests/fast/events/clipboard-clearData_t01: Timeout
-LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
-LayoutTests/fast/events/event-creation_t01: RuntimeError
-LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
-LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
-LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError, Timeout
-LayoutTests/fast/events/init-message-event_t01: RuntimeError
-LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError, Pass
-LayoutTests/fast/events/invalid-002_t01: RuntimeError
-LayoutTests/fast/events/invalid-003_t01: RuntimeError
-LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
-LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout
-LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError
-LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
-LayoutTests/fast/events/scroll-during-zoom-change_t01: Timeout, Pass
-LayoutTests/fast/events/scroll-event-phase_t01: Timeout, Pass
-LayoutTests/fast/events/selectstart-on-selectall_t01: RuntimeError
-LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError
-LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
-LayoutTests/fast/files/blob-close-read_t01: RuntimeError
-LayoutTests/fast/files/blob-constructor_t01: RuntimeError
-LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
-LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
-LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
-LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
-LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
-LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
-LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-typeMismatch-email_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
-LayoutTests/fast/forms/autocomplete_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-focus-only-once_t01: Timeout
-LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Timeout
-LayoutTests/fast/forms/autofocus-opera-004_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-opera-007_t01: Timeout
-LayoutTests/fast/forms/autofocus-readonly-attribute_t01: Timeout
-LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
-LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError, Pass
-LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
-LayoutTests/fast/forms/date/date-interactive-validation-required_t01: RuntimeError, Pass
-LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
-LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-interactive-validation-required_t01: RuntimeError, Pass
-LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/fieldset-disabled_t01: RuntimeError
-LayoutTests/fast/forms/focus-style-pending_t01: Timeout, Pass
-LayoutTests/fast/forms/focus_t01: RuntimeError
-LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
-LayoutTests/fast/forms/formmethod-attribute-button-html_t01: RuntimeError, Pass
-LayoutTests/fast/forms/formmethod-attribute-input-2_t01: RuntimeError, Pass
-LayoutTests/fast/forms/incremental-dom-property_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-maxlength_t01: RuntimeError
-LayoutTests/fast/forms/input-changing-value_t01: RuntimeError
-LayoutTests/fast/forms/input-file-set-value_t01: RuntimeError
-LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
-LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
-LayoutTests/fast/forms/input-maxlength-unsupported_t01: RuntimeError
-LayoutTests/fast/forms/input-type-change_t01: RuntimeError
-LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
-LayoutTests/fast/forms/input-width-height-attributes_t01: RuntimeError
-LayoutTests/fast/forms/listbox-select-all_t01: RuntimeError
-LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
-LayoutTests/fast/forms/missing-action_t01: RuntimeError, Pass
-LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
-LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
-LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
-LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
-LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
-LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
-LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: Timeout
-LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
-LayoutTests/fast/forms/selection-direction_t01: RuntimeError
-LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
-LayoutTests/fast/forms/shadow-tree-exposure_t01: RuntimeError
-LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute_t01: RuntimeError, Pass
-LayoutTests/fast/forms/submit-form-with-dirname-attribute_t01: RuntimeError, Pass
-LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
-LayoutTests/fast/forms/textarea-set-defaultvalue-after-value_t01: RuntimeError
-LayoutTests/fast/forms/textarea-submit-crash_t01: RuntimeError, Pass
-LayoutTests/fast/forms/textarea-trailing-newline_t01: RuntimeError
-LayoutTests/fast/forms/textfield-focus-out_t01: Timeout, Pass
-LayoutTests/fast/forms/validationMessage_t01: RuntimeError
-LayoutTests/fast/forms/willvalidate_t01: RuntimeError
-LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
-LayoutTests/fast/html/article-element_t01: RuntimeError
-LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
-LayoutTests/fast/html/details-click-controls_t01: RuntimeError
-LayoutTests/fast/html/figure-element_t01: RuntimeError
-LayoutTests/fast/html/header-element_t01: RuntimeError
-LayoutTests/fast/html/hgroup-element_t01: RuntimeError
-LayoutTests/fast/html/hidden-attr_t01: RuntimeError
-LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
-LayoutTests/fast/html/main-element_t01: RuntimeError
-LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
-LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
-LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
-LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
-LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-change_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-kept_t01: RuntimeError
-LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
-LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout
-LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
-LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
-LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
-LayoutTests/fast/media/invalid-lengths_t01: RuntimeError
-LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
-LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
-LayoutTests/fast/media/mq-append-delete_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
-LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
-LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
-LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/gap-non-negative_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-gap-between-pages-flipped_t01: RuntimeError
-LayoutTests/fast/multicol/image-inside-nested-blocks-with-border_t01: RuntimeError
-LayoutTests/fast/multicol/inline-getclientrects_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/widows_t01: RuntimeError
-LayoutTests/fast/multicol/zeroColumnCount_t01: RuntimeError
-LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
-LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
-LayoutTests/fast/parser/stray-param_t01: RuntimeError
-LayoutTests/fast/parser/strict-img-in-map_t01: RuntimeError
-LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
-LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
-LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
-LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/parsing/parsing-shape-outside-none_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout
-LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: Timeout, RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout
-LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout
-LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
-LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
-LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
-LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: Pass, RuntimeError
-LayoutTests/fast/table/table-size-integer-overflow_t01: RuntimeError
-LayoutTests/fast/table/td-bordercolor-attribute_t01: RuntimeError
-LayoutTests/fast/text/find-backwards_t01: Pass, RuntimeError
-LayoutTests/fast/text/find-kana_t01: RuntimeError
-LayoutTests/fast/text/find-russian_t01: RuntimeError
-LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
-LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
-LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
-LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
-LayoutTests/fast/text/window-find_t01: RuntimeError
-LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
-LayoutTests/fast/url/anchor_t01: RuntimeError
-LayoutTests/fast/url/file-http-base_t01: RuntimeError
-LayoutTests/fast/url/file_t01: RuntimeError
-LayoutTests/fast/url/host-lowercase-per-scheme_t01: RuntimeError
-LayoutTests/fast/url/idna2003_t01: RuntimeError
-LayoutTests/fast/url/idna2008_t01: RuntimeError
-LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
-LayoutTests/fast/url/ipv4_t01: RuntimeError
-LayoutTests/fast/url/ipv6_t01: RuntimeError
-LayoutTests/fast/url/mailto_t01: RuntimeError, Pass
-LayoutTests/fast/url/path_t01: RuntimeError
-LayoutTests/fast/url/query_t01: RuntimeError
-LayoutTests/fast/url/relative-win_t01: RuntimeError
-LayoutTests/fast/url/relative_t01: RuntimeError
-LayoutTests/fast/url/segments_t01: RuntimeError
-LayoutTests/fast/url/standard-url_t01: RuntimeError
-LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
-LayoutTests/fast/writing-mode/positionForPoint_t01: RuntimeError
-LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
-LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
-LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
-LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
-LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
-LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
-LayoutTests/fast/xsl/default-html_t01: RuntimeError
-LibTest/async/Future/Future.delayed_A01_t02: RuntimeError, Pass
-LibTest/async/Future/asStream_A01_t02: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A03_t01: RuntimeError, Timeout, Pass
-LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A01_t01: RuntimeError, Pass
-LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t01: Timeout, Pass
-LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
-LibTest/async/StreamController/addStream_A03_t01: RuntimeError
-LibTest/async/StreamController/stream_A02_t01: Timeout, Pass
-LibTest/async/StreamController/stream_A02_t03: RuntimeError
-LibTest/async/StreamController/stream_A03_t01: Timeout, Pass
-LibTest/async/StreamController/stream_A03_t02: RuntimeError
-LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
-LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
-LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
-LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
-LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
-LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
-LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
-LibTest/collection/LinkedList/join_A01_t01: RuntimeError
-LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
-LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
-LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
-LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
-LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
-LibTest/core/AssertionError/message_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
-LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/parse_A01_t03: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
-LibTest/core/Duration/Duration_A01_t01: CompileTimeError
-LibTest/core/Duration/Duration_A02_t01: CompileTimeError
-LibTest/core/Duration/inDays_A01_t01: CompileTimeError
-LibTest/core/Duration/inHours_A01_t01: CompileTimeError
-LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
-LibTest/core/Error/stackTrace_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
-LibTest/core/Function/Function_class_A01_t01: RuntimeError
-LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
-LibTest/core/Runes/any_A01_t01: RuntimeError
-LibTest/core/Runes/every_A01_t01: RuntimeError
-LibTest/core/String/padRight_A01_t01: RuntimeError
-LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
-LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
-LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
-LibTest/core/Uri/Uri_A06_t03: Timeout, Pass
-LibTest/core/Uri/decodeComponent_A01_t02: Timeout, Pass
-LibTest/core/Uri/encodeQueryComponent_A01_t02: Timeout, Pass
-LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
-LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
-LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
-LibTest/core/UriData/charset_A01_t01: RuntimeError
-LibTest/core/UriData/contentText_A01_t01: RuntimeError
-LibTest/core/UriData/parse_A01_t01: RuntimeError
-LibTest/core/double/INFINITY_A01_t04: RuntimeError
-LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
-LibTest/core/double/isInfinite_A01_t03: CompileTimeError
-LibTest/core/double/operator_GE_A01_t02: CompileTimeError
-LibTest/core/double/operator_GT_A01_t02: CompileTimeError
-LibTest/core/double/operator_LT_A01_t02: CompileTimeError
-LibTest/core/double/operator_addition_A01_t08: Crash
-LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
-LibTest/core/double/operator_subtraction_A01_t09: Crash
-LibTest/core/int/ceil_A01_t01: CompileTimeError
-LibTest/core/int/compareTo_A01_t01: CompileTimeError
-LibTest/core/int/floorToDouble_A01_t01: CompileTimeError
-LibTest/core/int/floor_A01_t01: CompileTimeError
-LibTest/core/int/hashCode_A01_t01: CompileTimeError
-LibTest/core/int/isInfinite_A01_t01: CompileTimeError
-LibTest/core/int/isNegative_A01_t01: CompileTimeError
-LibTest/core/int/isOdd_A01_t01: RuntimeError
-LibTest/core/int/operator_AND_A01_t01: CompileTimeError
-LibTest/core/int/operator_GE_A01_t01: CompileTimeError
-LibTest/core/int/operator_LT_A01_t01: CompileTimeError
-LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
-LibTest/core/int/operator_addition_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A03_t01: CompileTimeError
-LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
-LibTest/core/int/operator_remainder_A01_t03: RuntimeError
-LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t02: RuntimeError
-LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
-LibTest/core/int/parse_A03_t02: CompileTimeError
-LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
-LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
-LibTest/html/Element/blur_A01_t01: Timeout, Pass
-LibTest/html/Element/focus_A01_t01: Timeout, Pass
-LibTest/html/Element/loadEvent_A01_t01: Timeout
-LibTest/html/Element/mouseEnterEvent_A01_t01: RuntimeError, Pass
-LibTest/html/Element/mouseOverEvent_A01_t01: RuntimeError, Pass
-LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
-LibTest/html/Element/onLoad_A01_t01: Timeout
-LibTest/html/Element/onMouseWheel_A01_t01: Timeout
-LibTest/html/HttpRequest/responseText_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onAbort_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout
-LibTest/html/IFrameElement/enteredView_A01_t01: Timeout
-LibTest/html/IFrameElement/focus_A01_t01: Timeout
-LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
-LibTest/typed_data/Int16List/shuffle_A01_t01: RuntimeError, Pass
-Utils/tests/Expect/throws_A01_t04: RuntimeError
-WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
-WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
-WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
-WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
-WebPlatformTest/dom/events/type_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
-WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
-WebPlatformTest/html-imports/link-import_t02: RuntimeError
-WebPlatformTest/html-imports/loading-import_t01: RuntimeError
-WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/node-document-changes_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
-WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-newelements_t01: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
-WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError, Pass
-WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
-WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
-WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
-WebPlatformTest/webstorage/event_local_key_t01: Timeout
-WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_local_url_t01: Timeout
-WebPlatformTest/webstorage/event_session_key_t01: Timeout
-WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_session_url_t01: Timeout
-WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime == ff && $system == windows ]
-LayoutTests/fast/css/font-face-multiple-ranges-for-unicode-range_t01: RuntimeError
-LayoutTests/fast/svg/getbbox_t01: RuntimeError
-LibTest/html/Window/close_A01_t01: RuntimeError, Pass
-LibTest/math/cos_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/shuffle_A01_t01: RuntimeError, Pass
-
-[ $compiler == dart2js && $runtime == ff && $fast_startup ]
-Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
-Language/Expressions/Constants/depending_on_itself_t03: Crash
-Language/Expressions/Constants/exception_t02/01: CompileTimeError
-Language/Expressions/Constants/integer_size_t03: CompileTimeError
-Language/Expressions/Constants/integer_size_t04: CompileTimeError
-Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
-Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
-Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
-Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
-Language/Expressions/Lists/identical_t02: RuntimeError
-Language/Expressions/Maps/identical_t02: RuntimeError
-Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
-Language/Expressions/Numbers/syntax_t06: CompileTimeError
-Language/Expressions/Numbers/syntax_t09: CompileTimeError
-Language/Expressions/Object_Identity/double_t02: RuntimeError
-Language/Expressions/Shift/integer_t02: CompileTimeError
-Language/Expressions/Type_Cast/syntax_t01: RuntimeError
-Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
-Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
-Language/Metadata/before_ctor_t02: RuntimeError
-Language/Metadata/before_function_t01: RuntimeError
-Language/Metadata/before_function_t02: RuntimeError
-Language/Metadata/before_function_t03: RuntimeError
-Language/Metadata/before_function_t04: RuntimeError
-Language/Metadata/before_function_t07: RuntimeError
-Language/Metadata/before_import_t01: RuntimeError
-Language/Metadata/before_param_t03: RuntimeError
-Language/Metadata/before_param_t05: RuntimeError
-Language/Metadata/before_param_t07: RuntimeError
-Language/Metadata/before_param_t09: RuntimeError
-Language/Metadata/before_variable_t02: RuntimeError
-Language/Overview/Privacy/private_and_public_t18: RuntimeError
-Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
-Language/Statements/Assert/execution_t09: RuntimeError
-Language/Types/Function_Types/call_t01: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
-Language/Types/Interface_Types/subtype_t06: RuntimeError
-Language/Types/Interface_Types/subtype_t21: RuntimeError
-Language/Types/Interface_Types/subtype_t23: RuntimeError
-Language/Variables/constant_variable_t09: RuntimeError
-LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
-LayoutTests/fast/animation/request-animation-frame-prefix_t01: Timeout, Pass
-LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
-LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
-LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
-LayoutTests/fast/borders/border-width-percent_t01: RuntimeError
-LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
-LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
-LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
-LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillRect-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillText-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-font-ex-units-crash_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-repaint_t01: Timeout, Pass
-LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-stroke-zeroSizeGradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-toDataURL-crash_t01: RuntimeError
-LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
-LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
-LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError
-LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout
-LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-vertex-array-object_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout
-LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout
-LayoutTests/fast/canvas/webgl/webgl-layer-update_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
-LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
-LayoutTests/fast/css-generated-content/details-before-after-content_t01: RuntimeError
-LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-animation_t01: RuntimeError, Pass
-LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
-LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout
-LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
-LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
-LayoutTests/fast/css/auto-min-size_t01: RuntimeError
-LayoutTests/fast/css/background-serialize_t01: RuntimeError
-LayoutTests/fast/css/border-image-null-image-crash_t01: RuntimeError
-LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
-LayoutTests/fast/css/border-shorthand-initialize-longhands_t01: RuntimeError
-LayoutTests/fast/css/border-start-end_t01: RuntimeError
-LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
-LayoutTests/fast/css/content/content-none_t01: RuntimeError
-LayoutTests/fast/css/counters/complex-before_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing_t01: RuntimeError
-LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
-LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
-LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
-LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError
-LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-load_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: RuntimeError
-LayoutTests/fast/css/font-property-priority_t01: RuntimeError
-LayoutTests/fast/css/fontface-properties_t01: RuntimeError
-LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-style-shorthand_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-borderRadius-2_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-length-unit_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-zIndex-auto_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-column-rule_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-webkit-margin-collapse_t01: RuntimeError
-LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
-LayoutTests/fast/css/image-set-setting_t01: RuntimeError
-LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
-LayoutTests/fast/css/insertRule-media_t01: RuntimeError
-LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
-LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
-LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
-LayoutTests/fast/css/modify-ua-rules-from-javascript_t01: RuntimeError
-LayoutTests/fast/css/nested-at-rules_t01: RuntimeError
-LayoutTests/fast/css/overflow-property_t01: RuntimeError
-LayoutTests/fast/css/padding-start-end_t01: RuntimeError
-LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
-LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout
-LayoutTests/fast/css/pseudo-required-optional-004_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-005_t01: RuntimeError
-LayoutTests/fast/css/pseudo-required-optional-unapplied_t01: RuntimeError
-LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
-LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout
-LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
-LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
-LayoutTests/fast/css/shorthand-setProperty-important_t01: RuntimeError
-LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
-LayoutTests/fast/css/style-element-process-crash_t01: Timeout
-LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
-LayoutTests/fast/css/text-align-webkit-match-parent_t01: RuntimeError
-LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError
-LayoutTests/fast/css/webkit-color-adjust_t01: RuntimeError
-LayoutTests/fast/css/word-break-user-modify-allowed-values_t01: RuntimeError
-LayoutTests/fast/css/zoom-property-parsing_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
-LayoutTests/fast/dom/Document/createElement-valid-names_t01: RuntimeError
-LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
-LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
-LayoutTests/fast/dom/Element/id-in-insert-hr_t01: RuntimeError
-LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
-LayoutTests/fast/dom/Element/scrollWidth_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-port_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
-LayoutTests/fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document_t01: RuntimeError
-LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-before-text-node_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-child-node_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text-form-control_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-change-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-children_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto-remove-add-children_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-dir-auto_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-empty-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-false-string_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-ancestor-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-ancestor-missing_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/attr-missing-parent-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-inherit-parent-false_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-inherit-parent-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-invalid-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/set-true_t01: RuntimeError
-LayoutTests/fast/dom/HTMLElement/translate_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
-LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/click-label_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-beforeload-recursive_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
-LayoutTests/fast/dom/HTMLMeterElement/set-meter-properties_t01: RuntimeError
-LayoutTests/fast/dom/HTMLObjectElement/beforeload-set-text-crash_t01: Timeout
-LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
-LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
-LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/cellpadding-attribute_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout
-LayoutTests/fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/added-out-of-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/removed-out-of-order_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-assertion_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/anchor-origin_t01: RuntimeError
-LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
-LayoutTests/fast/dom/containerNode_t01: Timeout
-LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError
-LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError
-LayoutTests/fast/dom/css-selectorText_t01: RuntimeError
-LayoutTests/fast/dom/css-shorthand-common-value_t01: RuntimeError
-LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError
-LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/invalid-type-extension-crash_t01: RuntimeError
-LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
-LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
-LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
-LayoutTests/fast/dom/dom-parse-serialize-xmldecl_t01: RuntimeError
-LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
-LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
-LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
-LayoutTests/fast/dom/gc-image-element_t01: Timeout
-LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
-LayoutTests/fast/dom/image-object_t01: Timeout
-LayoutTests/fast/dom/javascript-backslash_t01: RuntimeError
-LayoutTests/fast/dom/length-attribute-mapping_t01: RuntimeError
-LayoutTests/fast/dom/location-hash_t01: RuntimeError
-LayoutTests/fast/dom/navigator-userAgent_t01: RuntimeError
-LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
-LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
-LayoutTests/fast/dom/remove-body-during-body-replacement_t01: Timeout
-LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
-LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
-LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
-LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
-LayoutTests/fast/dynamic/checkbox-selection-crash_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
-LayoutTests/fast/events/change-overflow-on-overflow-change_t01: Timeout
-LayoutTests/fast/events/clipboard-clearData_t01: Timeout
-LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
-LayoutTests/fast/events/event-creation_t01: RuntimeError
-LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
-LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
-LayoutTests/fast/events/fire-scroll-event_t01: RuntimeError
-LayoutTests/fast/events/init-message-event_t01: RuntimeError
-LayoutTests/fast/events/input-focus-no-duplicate-events_t01: RuntimeError, Pass
-LayoutTests/fast/events/invalid-002_t01: RuntimeError
-LayoutTests/fast/events/invalid-003_t01: RuntimeError
-LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
-LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout
-LayoutTests/fast/events/overflowchanged-event-raf-timing_t01: RuntimeError
-LayoutTests/fast/events/scoped/editing-commands_t01: RuntimeError
-LayoutTests/fast/events/selectstart-on-selectall_t01: RuntimeError
-LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError, Pass
-LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
-LayoutTests/fast/files/blob-close-read_t01: RuntimeError
-LayoutTests/fast/files/blob-constructor_t01: RuntimeError
-LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
-LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
-LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
-LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
-LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
-LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
-LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-tooLong-textarea_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-typeMismatch-email_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
-LayoutTests/fast/forms/autocomplete_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-focus-only-once_t01: Timeout
-LayoutTests/fast/forms/autofocus-input-css-style-change_t01: Timeout
-LayoutTests/fast/forms/autofocus-opera-004_t01: RuntimeError
-LayoutTests/fast/forms/autofocus-opera-007_t01: Timeout
-LayoutTests/fast/forms/autofocus-readonly-attribute_t01: Timeout
-LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
-LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError
-LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
-LayoutTests/fast/forms/date/date-interactive-validation-required_t01: RuntimeError, Pass
-LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
-LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/fieldset-disabled_t01: RuntimeError
-LayoutTests/fast/forms/focus-style-pending_t01: Timeout
-LayoutTests/fast/forms/focus_t01: RuntimeError
-LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
-LayoutTests/fast/forms/formmethod-attribute-input-2_t01: RuntimeError, Pass
-LayoutTests/fast/forms/formmethod-attribute-input-html_t01: RuntimeError, Pass
-LayoutTests/fast/forms/incremental-dom-property_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-maxlength_t01: RuntimeError
-LayoutTests/fast/forms/input-changing-value_t01: RuntimeError
-LayoutTests/fast/forms/input-file-set-value_t01: RuntimeError
-LayoutTests/fast/forms/input-implicit-length-limit_t01: RuntimeError
-LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
-LayoutTests/fast/forms/input-maxlength-unsupported_t01: RuntimeError
-LayoutTests/fast/forms/input-type-change_t01: RuntimeError
-LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
-LayoutTests/fast/forms/input-width-height-attributes_t01: RuntimeError
-LayoutTests/fast/forms/listbox-select-all_t01: RuntimeError
-LayoutTests/fast/forms/listbox-selection-2_t01: RuntimeError
-LayoutTests/fast/forms/missing-action_t01: RuntimeError, Pass
-LayoutTests/fast/forms/onchange-change-type_t01: RuntimeError
-LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
-LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
-LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
-LayoutTests/fast/forms/paste-into-textarea_t01: RuntimeError
-LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
-LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: Timeout
-LayoutTests/fast/forms/select-clientheight-large-size_t01: RuntimeError
-LayoutTests/fast/forms/selection-direction_t01: RuntimeError
-LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
-LayoutTests/fast/forms/shadow-tree-exposure_t01: RuntimeError
-LayoutTests/fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute_t01: RuntimeError, Pass
-LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
-LayoutTests/fast/forms/textarea-set-defaultvalue-after-value_t01: RuntimeError
-LayoutTests/fast/forms/textarea-trailing-newline_t01: RuntimeError
-LayoutTests/fast/forms/textfield-focus-out_t01: Timeout
-LayoutTests/fast/forms/validationMessage_t01: RuntimeError
-LayoutTests/fast/forms/willvalidate_t01: RuntimeError
-LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
-LayoutTests/fast/html/article-element_t01: RuntimeError
-LayoutTests/fast/html/details-add-child-2_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-1_t01: RuntimeError
-LayoutTests/fast/html/details-add-details-child-2_t01: RuntimeError
-LayoutTests/fast/html/details-click-controls_t01: RuntimeError
-LayoutTests/fast/html/figure-element_t01: RuntimeError
-LayoutTests/fast/html/header-element_t01: RuntimeError
-LayoutTests/fast/html/hgroup-element_t01: RuntimeError
-LayoutTests/fast/html/hidden-attr_t01: RuntimeError
-LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
-LayoutTests/fast/html/main-element_t01: RuntimeError
-LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
-LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
-LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
-LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
-LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-change_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-kept_t01: RuntimeError
-LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
-LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout
-LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
-LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
-LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
-LayoutTests/fast/media/invalid-lengths_t01: RuntimeError
-LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
-LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
-LayoutTests/fast/media/mq-append-delete_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
-LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
-LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
-LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/gap-non-negative_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-gap-between-pages-flipped_t01: RuntimeError
-LayoutTests/fast/multicol/image-inside-nested-blocks-with-border_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/widows_t01: RuntimeError
-LayoutTests/fast/multicol/zeroColumnCount_t01: RuntimeError
-LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
-LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
-LayoutTests/fast/parser/stray-param_t01: RuntimeError
-LayoutTests/fast/parser/strict-img-in-map_t01: RuntimeError
-LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
-LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
-LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
-LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-outside-none_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout, RuntimeError, Pass
-LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: Timeout
-LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout
-LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout
-LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
-LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError
-LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
-LayoutTests/fast/table/table-size-integer-overflow_t01: RuntimeError
-LayoutTests/fast/table/td-bordercolor-attribute_t01: RuntimeError
-LayoutTests/fast/text/find-kana_t01: RuntimeError
-LayoutTests/fast/text/find-russian_t01: RuntimeError
-LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
-LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
-LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
-LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
-LayoutTests/fast/text/window-find_t01: RuntimeError
-LayoutTests/fast/text/zero-width-characters-complex-script_t01: RuntimeError
-LayoutTests/fast/url/anchor_t01: RuntimeError
-LayoutTests/fast/url/file-http-base_t01: RuntimeError
-LayoutTests/fast/url/file_t01: RuntimeError
-LayoutTests/fast/url/host-lowercase-per-scheme_t01: RuntimeError
-LayoutTests/fast/url/idna2003_t01: RuntimeError
-LayoutTests/fast/url/idna2008_t01: RuntimeError
-LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
-LayoutTests/fast/url/ipv4_t01: RuntimeError
-LayoutTests/fast/url/ipv6_t01: RuntimeError
-LayoutTests/fast/url/mailto_t01: RuntimeError
-LayoutTests/fast/url/path_t01: RuntimeError
-LayoutTests/fast/url/query_t01: RuntimeError
-LayoutTests/fast/url/relative-win_t01: RuntimeError
-LayoutTests/fast/url/relative_t01: RuntimeError
-LayoutTests/fast/url/segments_t01: RuntimeError
-LayoutTests/fast/url/standard-url_t01: RuntimeError
-LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow_t01: RuntimeError
-LayoutTests/fast/writing-mode/positionForPoint_t01: RuntimeError
-LayoutTests/fast/writing-mode/table-hit-test_t01: RuntimeError
-LayoutTests/fast/writing-mode/vertical-inline-block-hittest_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
-LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
-LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
-LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
-LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
-LayoutTests/fast/xsl/default-html_t01: RuntimeError
-LibTest/async/Future/Future.delayed_A01_t02: RuntimeError, Pass
-LibTest/async/Future/asStream_A01_t02: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A03_t01: Timeout, Pass
-LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t01: Timeout, Pass
-LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
-LibTest/async/StreamController/addStream_A03_t01: RuntimeError
-LibTest/async/StreamController/stream_A02_t01: Timeout, Pass
-LibTest/async/StreamController/stream_A02_t03: RuntimeError
-LibTest/async/StreamController/stream_A03_t01: Timeout, Pass
-LibTest/async/StreamController/stream_A03_t02: RuntimeError
-LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
-LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
-LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
-LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
-LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
-LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
-LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
-LibTest/collection/LinkedList/join_A01_t01: RuntimeError
-LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
-LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
-LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
-LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
-LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
-LibTest/core/AssertionError/message_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
-LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/parse_A01_t03: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
-LibTest/core/Duration/Duration_A01_t01: CompileTimeError
-LibTest/core/Duration/Duration_A02_t01: CompileTimeError
-LibTest/core/Duration/inDays_A01_t01: CompileTimeError
-LibTest/core/Duration/inHours_A01_t01: CompileTimeError
-LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
-LibTest/core/Error/stackTrace_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
-LibTest/core/Function/Function_class_A01_t01: RuntimeError
-LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
-LibTest/core/Runes/any_A01_t01: RuntimeError
-LibTest/core/Runes/every_A01_t01: RuntimeError
-LibTest/core/String/padRight_A01_t01: RuntimeError
-LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
-LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
-LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
-LibTest/core/Uri/decodeComponent_A01_t02: Timeout, Pass
-LibTest/core/Uri/encodeQueryComponent_A01_t02: Timeout
-LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
-LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
-LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
-LibTest/core/UriData/charset_A01_t01: RuntimeError
-LibTest/core/UriData/contentText_A01_t01: RuntimeError
-LibTest/core/UriData/parse_A01_t01: RuntimeError
-LibTest/core/double/INFINITY_A01_t04: RuntimeError
-LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
-LibTest/core/double/isInfinite_A01_t03: CompileTimeError
-LibTest/core/double/operator_GE_A01_t02: CompileTimeError
-LibTest/core/double/operator_GT_A01_t02: CompileTimeError
-LibTest/core/double/operator_LT_A01_t02: CompileTimeError
-LibTest/core/double/operator_addition_A01_t08: Crash
-LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
-LibTest/core/double/operator_subtraction_A01_t09: Crash
-LibTest/core/int/ceil_A01_t01: CompileTimeError
-LibTest/core/int/compareTo_A01_t01: CompileTimeError
-LibTest/core/int/floorToDouble_A01_t01: CompileTimeError
-LibTest/core/int/floor_A01_t01: CompileTimeError
-LibTest/core/int/hashCode_A01_t01: CompileTimeError
-LibTest/core/int/isInfinite_A01_t01: CompileTimeError
-LibTest/core/int/isNegative_A01_t01: CompileTimeError
-LibTest/core/int/isOdd_A01_t01: RuntimeError
-LibTest/core/int/operator_AND_A01_t01: CompileTimeError
-LibTest/core/int/operator_GE_A01_t01: CompileTimeError
-LibTest/core/int/operator_LT_A01_t01: CompileTimeError
-LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
-LibTest/core/int/operator_addition_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A03_t01: CompileTimeError
-LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
-LibTest/core/int/operator_remainder_A01_t03: RuntimeError
-LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t02: RuntimeError
-LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
-LibTest/core/int/parse_A03_t02: CompileTimeError
-LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
-LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
-LibTest/html/Element/blur_A01_t01: Timeout
-LibTest/html/Element/focus_A01_t01: Timeout
-LibTest/html/Element/loadEvent_A01_t01: Timeout
-LibTest/html/Element/mouseEnterEvent_A01_t01: RuntimeError
-LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
-LibTest/html/Element/onLoad_A01_t01: Timeout
-LibTest/html/Element/onMouseWheel_A01_t01: Timeout
-LibTest/html/HttpRequest/responseText_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onAbort_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout
-LibTest/html/IFrameElement/enteredView_A01_t01: Timeout
-LibTest/html/IFrameElement/focus_A01_t01: Timeout
-LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
-Utils/tests/Expect/throws_A01_t04: RuntimeError
-WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
-WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
-WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
-WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
-WebPlatformTest/dom/events/type_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
-WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
-WebPlatformTest/html-imports/link-import_t02: RuntimeError
-WebPlatformTest/html-imports/loading-import_t01: RuntimeError
-WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/node-document-changes_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
-WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-newelements_t01: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
-WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
-WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
-WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
-WebPlatformTest/webstorage/event_local_key_t01: Timeout
-WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_local_url_t01: Timeout
-WebPlatformTest/webstorage/event_session_key_t01: Timeout
-WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_session_url_t01: Timeout
-WebPlatformTest/webstorage/storage_local_setitem_quotaexceedederr_t01: RuntimeError
-
-[ $compiler == dart2js && $runtime != ff && $system != macos && !$fast_startup ]
-LayoutTests/fast/canvas/webgl/tex-input-validation_t01: RuntimeError
-LayoutTests/fast/dom/vertical-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError
-
-[ $compiler == dart2js && $runtime != ff && !$fast_startup ]
-LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError
-LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError
-LayoutTests/fast/table/css-table-max-height_t01: RuntimeError
-LayoutTests/fast/table/css-table-width-with-border-padding_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-right-edge_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-with-borders-right-edge_t01: RuntimeError
-LayoutTests/fast/table/margins-perpendicular-containing-block_t01: RuntimeError
-LayoutTests/fast/table/min-max-width-preferred-size_t01: RuntimeError
-LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: RuntimeError
-LayoutTests/fast/table/table-width-exceeding-max-width_t01: RuntimeError
-LayoutTests/fast/text-autosizing/vertical-writing-mode_t01: RuntimeError
-LayoutTests/fast/text/find-spaces_t01: RuntimeError
-LayoutTests/fast/text/international/cjk-segmentation_t01: RuntimeError
-LayoutTests/fast/text/international/combining-marks-position_t01: RuntimeError, Pass
-LayoutTests/fast/transforms/bounding-rect-zoom_t01: RuntimeError
-LayoutTests/fast/transforms/hit-test-large-scale_t01: RuntimeError
-LibTest/math/cos_A01_t01: RuntimeError
-WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t11: RuntimeError
-
-[ $compiler == dart2js && $runtime == safari ]
-Language/Expressions/Additive_Expressions/syntax_t01: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError
-Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError
-Language/Expressions/Constants/depending_on_itself_t03: Crash
-Language/Expressions/Constants/exception_t02/01: CompileTimeError
-Language/Expressions/Constants/integer_size_t03: CompileTimeError
-Language/Expressions/Constants/integer_size_t04: CompileTimeError
-Language/Expressions/Function_Invocation/async_generator_invokation_t08: Timeout
-Language/Expressions/Function_Invocation/async_generator_invokation_t10: Timeout
-Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError
-Language/Expressions/If_null_Expressions/static_type_t01: RuntimeError
-Language/Expressions/Lists/identical_t02: RuntimeError
-Language/Expressions/Maps/identical_t02: RuntimeError
-Language/Expressions/Null/instance_of_class_null_t01: RuntimeError
-Language/Expressions/Numbers/syntax_t06: CompileTimeError
-Language/Expressions/Numbers/syntax_t09: CompileTimeError
-Language/Expressions/Object_Identity/double_t02: RuntimeError
-Language/Expressions/Shift/integer_t02: CompileTimeError
-Language/Expressions/Type_Cast/syntax_t01: RuntimeError
-Language/Expressions/Unary_Expressions/variable_negative_t03: RuntimeError
-Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError
-Language/Libraries_and_Scripts/top_level_syntax_t01: CompileTimeError
-Language/Metadata/before_ctor_t02: RuntimeError
-Language/Metadata/before_function_t01: RuntimeError
-Language/Metadata/before_function_t02: RuntimeError
-Language/Metadata/before_function_t03: RuntimeError
-Language/Metadata/before_function_t04: RuntimeError
-Language/Metadata/before_function_t07: RuntimeError
-Language/Metadata/before_import_t01: RuntimeError
-Language/Metadata/before_param_t03: RuntimeError
-Language/Metadata/before_param_t05: RuntimeError
-Language/Metadata/before_param_t07: RuntimeError
-Language/Metadata/before_param_t09: RuntimeError
-Language/Metadata/before_variable_t02: RuntimeError
-Language/Overview/Privacy/private_and_public_t18: RuntimeError
-Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError
-Language/Statements/Assert/execution_t09: RuntimeError
-Language/Types/Function_Types/call_t01: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t03: RuntimeError
-Language/Types/Function_Types/subtype_named_args_t11: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t01: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t02: RuntimeError
-Language/Types/Function_Types/subtype_optional_args_t04: RuntimeError
-Language/Types/Interface_Types/subtype_t06: RuntimeError
-Language/Types/Interface_Types/subtype_t21: RuntimeError
-Language/Types/Interface_Types/subtype_t23: RuntimeError
-Language/Variables/constant_variable_t09: RuntimeError
-LanguageFeatures/Instantiate-to-bound/check_types/typedef_param_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_FutureOr_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t05: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t10: RuntimeError, Pass
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t05: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A31_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_arguments_binding_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A31_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t02: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_class_member_fail_A32_t03: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A31_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_local_variable_fail_A32_t01: RuntimeError
-LanguageFeatures/Subtyping/dynamic/generated/positional_function_types_fail_return_value_fail_A32_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-position-parsing-2_t01: RuntimeError
-LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style_t01: RuntimeError
-LayoutTests/fast/backgrounds/repeat/parsing-background-repeat_t01: RuntimeError
-LayoutTests/fast/borders/border-image-width-numbers-computed-style_t01: RuntimeError
-LayoutTests/fast/canvas/2d.composite.globalAlpha.fillPath_t01: RuntimeError
-LayoutTests/fast/canvas/2d.fillText.gradient_t01: RuntimeError
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.gradient_t01: Timeout
-LayoutTests/fast/canvas/2d.text.draw.fill.maxWidth.negative_t01: RuntimeError
-LayoutTests/fast/canvas/DrawImageSinglePixelStretch_t01: Timeout
-LayoutTests/fast/canvas/canvas-blend-solid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-color-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-global-alpha_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-color_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-image-over-gradient_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-pattern-over-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-text_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-blending-transforms_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-canvas_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-composite-stroke-alpha_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-composite-text-alpha_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-currentColor_t01: Pass, RuntimeError
-LayoutTests/fast/canvas/canvas-drawImage-scaled-copy-to-self_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-fillRect_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-fillStyle-no-quirks-parsing_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-font-consistency_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-invalid_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-getImageData-rounding_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lose-restore-googol-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lose-restore-max-int-size_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-modify-emptyPath_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-putImageData_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-quadratic-same-endpoint_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-scale-shadowBlur_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-state-intact-after-putImageData_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokePath-alpha-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokePath-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/drawImage-with-broken-image_t01: RuntimeError
-LayoutTests/fast/canvas/drawImage-with-valid-image_t01: Timeout
-LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError
-LayoutTests/fast/canvas/set-colors_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/WebGLContextEvent_t01: Timeout, Pass
-LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/copy-tex-image-and-sub-image-2d_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/draw-elements-out-of-bounds_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/get-active-test_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-object-get-calls_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/gl-teximage_t01: Timeout
-LayoutTests/fast/canvas/webgl/glsl-conformance_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-copies-indices_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/index-validation-with-resized-buffer_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/oes-element-index-uint_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-array-buffer-view_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444_t01: Timeout
-LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551_t01: Timeout
-LayoutTests/fast/canvas/webgl/texImageTest_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/texture-active-bind_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-color-profile_t01: Timeout
-LayoutTests/fast/canvas/webgl/texture-complete_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/texture-transparent-pixels-initialized_t01: Timeout
-LayoutTests/fast/canvas/webgl/viewport-unchanged-upon-resize_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/webgl-specific_t01: RuntimeError
-LayoutTests/fast/css-generated-content/bug91547_t01: RuntimeError
-LayoutTests/fast/css-generated-content/malformed-url_t01: RuntimeError
-LayoutTests/fast/css-generated-content/pseudo-element-events_t01: Timeout
-LayoutTests/fast/css-generated-content/pseudo-transition-event_t01: Timeout
-LayoutTests/fast/css-grid-layout/breadth-size-resolution-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/calc-resolution-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-columns_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/flex-content-resolution-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-auto-flow-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-border-padding-grid-item_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-element-padding-margin_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-area-get-set_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-change-order-auto-flow_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-horiz-bt_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows-vert-rl_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-auto-columns-rows_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-margin-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/grid-item-order-auto-flow-resolution_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/justify-self-cell_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-grid-item-in-percent-grid-track_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update_t01: RuntimeError
-LayoutTests/fast/css-grid-layout/place-cell-by-index_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-blocks_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-column-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-flex-items_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes_t01: RuntimeError
-LayoutTests/fast/css-intrinsic-dimensions/width-shrinks-avoid-floats_t01: RuntimeError
-LayoutTests/fast/css/MarqueeLayoutTest_t01: RuntimeError
-LayoutTests/fast/css/aspect-ratio-inheritance_t01: RuntimeError
-LayoutTests/fast/css/auto-min-size_t01: RuntimeError
-LayoutTests/fast/css/background-serialize_t01: RuntimeError
-LayoutTests/fast/css/border-image-style-length_t01: RuntimeError
-LayoutTests/fast/css/box-sizing-border-box-dynamic-padding-border-update_t01: RuntimeError
-LayoutTests/fast/css/content/content-none_t01: RuntimeError
-LayoutTests/fast/css/content/content-quotes-05_t01: RuntimeError
-LayoutTests/fast/css/cursor-parsing-image-set_t01: RuntimeError
-LayoutTests/fast/css/device-aspect-ratio_t01: RuntimeError
-LayoutTests/fast/css/draggable-region-parser_t01: RuntimeError
-LayoutTests/fast/css/dynamic-class-pseudo-elements_t01: Pass, RuntimeError
-LayoutTests/fast/css/fixed-width-intrinsic-width-excludes-scrollbars_t01: RuntimeError
-LayoutTests/fast/css/font-face-cache-bug_t01: RuntimeError
-LayoutTests/fast/css/font-face-insert-link_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-load_t01: Timeout
-LayoutTests/fast/css/font-face-unicode-range-overlap-load_t01: Timeout
-LayoutTests/fast/css/font-shorthand-from-longhands_t01: RuntimeError
-LayoutTests/fast/css/fontface-properties_t01: RuntimeError
-LayoutTests/fast/css/fontfaceset-events_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-border-image_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade_t01: RuntimeError
-LayoutTests/fast/css/getComputedStyle/counterIncrement-without-counter_t01: RuntimeError, Pass
-LayoutTests/fast/css/getComputedStyle/font-family-fallback-reset_t01: RuntimeError, Pass
-LayoutTests/fast/css/getComputedStyle/getComputedStyle-zoom-and-background-size_t01: RuntimeError, Pass
-LayoutTests/fast/css/html-attr-case-sensitivity_t01: RuntimeError
-LayoutTests/fast/css/image-set-setting_t01: RuntimeError
-LayoutTests/fast/css/inherited-properties-rare-text_t01: RuntimeError
-LayoutTests/fast/css/invalid-predefined-color_t01: RuntimeError
-LayoutTests/fast/css/invalidation/targeted-class-host-pseudo_t01: RuntimeError
-LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root_t01: RuntimeError
-LayoutTests/fast/css/link-alternate-stylesheet-1_t01: RuntimeError
-LayoutTests/fast/css/media-query-recovery_t01: RuntimeError
-LayoutTests/fast/css/parsing-css-nth-child_t01: RuntimeError
-LayoutTests/fast/css/parsing-page-rule_t01: RuntimeError
-LayoutTests/fast/css/parsing-unexpected-eof_t01: RuntimeError
-LayoutTests/fast/css/percent-min-width-img-src-change_t01: Timeout
-LayoutTests/fast/css/pseudo-target-indirect-sibling-001_t01: Timeout
-LayoutTests/fast/css/pseudo-target-indirect-sibling-002_t01: Timeout
-LayoutTests/fast/css/readonly-pseudoclass-opera-003_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-004_t01: RuntimeError
-LayoutTests/fast/css/readonly-pseudoclass-opera-005_t01: RuntimeError
-LayoutTests/fast/css/sheet-collection-link_t01: RuntimeError
-LayoutTests/fast/css/space-before-charset-external_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-shadow-crash_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-dom-operation_t01: RuntimeError
-LayoutTests/fast/css/style-scoped/style-scoped-with-important-rule_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-link_t01: RuntimeError
-LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-sheet_t01: RuntimeError
-LayoutTests/fast/css/unicode-bidi-computed-value_t01: RuntimeError, Pass
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createDocumentType-err_t01: RuntimeError, Pass
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-strict-mode-wtih-checkbox_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-user-select-none_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-with-first-letter-style_t01: RuntimeError
-LayoutTests/fast/dom/Element/attribute-uppercase_t01: RuntimeError
-LayoutTests/fast/dom/Element/getClientRects_t01: RuntimeError
-LayoutTests/fast/dom/Element/offsetTop-table-cell_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/remove-href-from-focused-anchor_t01: Timeout
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol_t01: RuntimeError
-LayoutTests/fast/dom/HTMLButtonElement/value/getset_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-open_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/dialog-scrolled-viewport_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/inert-node-is-unselectable_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/multiple-centered-dialogs_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/submit-dialog-close-event_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/synthetic-click-inert_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-relative_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDialogElement/top-layer-position-static_t01: RuntimeError
-LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable_t01: Timeout
-LayoutTests/fast/dom/HTMLDocument/set-focus-on-valid-element_t01: Timeout
-LayoutTests/fast/dom/HTMLImageElement/image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height_t01: Timeout
-LayoutTests/fast/dom/HTMLImageElement/parse-src_t01: RuntimeError
-LayoutTests/fast/dom/HTMLInputElement/input-image-alt-text_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLabelElement/form/test1_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/link-onerror-stylesheet-with-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/link-onload2_t01: RuntimeError
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-onerror_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/prefetch-onload_t01: Timeout
-LayoutTests/fast/dom/HTMLLinkElement/prefetch_t01: Timeout
-LayoutTests/fast/dom/HTMLOptionElement/collection-setter-getter_t01: RuntimeError
-LayoutTests/fast/dom/HTMLProgressElement/indeterminate-progress-002_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/async-false-inside-async-false-load_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/async-onbeforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/defer-inline-script_t01: RuntimeError
-LayoutTests/fast/dom/HTMLScriptElement/defer-onbeforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/defer-script-invalid-url_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/dont-load-unknown-type_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/remove-in-beforeload_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-reexecution_t01: Timeout
-LayoutTests/fast/dom/HTMLScriptElement/script-set-src_t01: Timeout
-LayoutTests/fast/dom/HTMLStyleElement/style-onerror-with-existent-and-non-existent-import_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableElement/insert-row_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTableSectionElement/rows_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/cycles-in-shadow_t01: RuntimeError
-LayoutTests/fast/dom/HTMLTemplateElement/innerHTML-inert_t01: Timeout
-LayoutTests/fast/dom/MutationObserver/observe-options-character-data_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash_t01: RuntimeError
-LayoutTests/fast/dom/Range/bug-19527_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-created-during-remove-children_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-detached-exceptions_t01: RuntimeError
-LayoutTests/fast/dom/Range/range-insertNode-splittext_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-style_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/empty-shadow-style_t01: RuntimeError
-LayoutTests/fast/dom/XMLSerializer-double-xmlns_t01: RuntimeError
-LayoutTests/fast/dom/characterdata-api-arguments_t01: RuntimeError
-LayoutTests/fast/dom/css-cached-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule-twice_t01: RuntimeError
-LayoutTests/fast/dom/css-insert-import-rule_t01: RuntimeError
-LayoutTests/fast/dom/css-selectorText_t01: RuntimeError
-LayoutTests/fast/dom/cssTarget-crash_t01: RuntimeError, Pass
-LayoutTests/fast/dom/custom/attribute-changed-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/created-callback_t01: RuntimeError
-LayoutTests/fast/dom/custom/lifecycle-created-createElement-recursion_t01: RuntimeError
-LayoutTests/fast/dom/custom/unresolved-pseudoclass_t01: RuntimeError
-LayoutTests/fast/dom/custom/upgrade-candidate-remove-crash_t01: RuntimeError
-LayoutTests/fast/dom/domparser-parsefromstring-mimetype-support_t01: RuntimeError
-LayoutTests/fast/dom/empty-hash-and-search_t01: RuntimeError
-LayoutTests/fast/dom/gc-image-element-2_t01: Timeout
-LayoutTests/fast/dom/gc-image-element_t01: Timeout
-LayoutTests/fast/dom/getElementsByClassName/010_t01: RuntimeError
-LayoutTests/fast/dom/getElementsByClassName/011_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-doesnt-fire-onscroll_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-in-rtl_t01: RuntimeError
-LayoutTests/fast/dom/horizontal-scrollbar-when-dir-change_t01: RuntimeError
-LayoutTests/fast/dom/image-object_t01: Timeout
-LayoutTests/fast/dom/non-styled-element-id-crash_t01: RuntimeError
-LayoutTests/fast/dom/partial-layout-overlay-scrollbars_t01: RuntimeError
-LayoutTests/fast/dom/set-innerHTML_t01: RuntimeError
-LayoutTests/fast/dom/shadow/access-document-of-detached-stylesheetlist-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/base-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-element-includer_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-relative-selector-css-text_t01: RuntimeError
-LayoutTests/fast/dom/shadow/content-pseudo-element-with-host-pseudo-class_t01: RuntimeError
-LayoutTests/fast/dom/shadow/distribution-for-event-path_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elementfrompoint_t01: RuntimeError
-LayoutTests/fast/dom/shadow/elements-in-frameless-document_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getComputedStyle-composed-parent-dirty_t01: RuntimeError
-LayoutTests/fast/dom/shadow/getelementbyid-in-orphan_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-shadow-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/insertion-point-video-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/link-in-shadow-tree_t01: RuntimeError
-LayoutTests/fast/dom/shadow/offsetWidth-host-style-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/olderShadowRoot_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-checked-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup_t01: RuntimeError
-LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-content-crash_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-disable_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-hierarchy-exception_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-removechild-and-blur-event_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-node-list_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-root-text-child_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadow-ul-li_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowdom-for-input-type-change_t01: RuntimeError
-LayoutTests/fast/dom/shadow/shadowroot-host_t01: RuntimeError
-LayoutTests/fast/dom/shadow/sibling-rules-dynamic-changes_t01: RuntimeError
-LayoutTests/fast/dom/shadow/stale-distribution-after-shadow-removal_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-counter_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-image_t01: RuntimeError
-LayoutTests/fast/dynamic/crash-generated-text_t01: RuntimeError
-LayoutTests/fast/events/clipboard-clearData_t01: Timeout
-LayoutTests/fast/events/clipboard-dataTransferItemList_t01: Timeout
-LayoutTests/fast/events/event-creation_t01: RuntimeError
-LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError
-LayoutTests/fast/events/event-on-xhr-document_t01: RuntimeError
-LayoutTests/fast/events/init-message-event_t01: RuntimeError
-LayoutTests/fast/events/invalid-002_t01: RuntimeError
-LayoutTests/fast/events/invalid-003_t01: RuntimeError
-LayoutTests/fast/events/mutation-during-replace-child_t01: RuntimeError
-LayoutTests/fast/events/nested-event-remove-node-crash_t01: Timeout
-LayoutTests/fast/events/tabindex-removal-from-focused-element_t01: RuntimeError
-LayoutTests/fast/exclusions/parsing/parsing-wrap-through_t01: RuntimeError
-LayoutTests/fast/files/blob-close-read_t01: RuntimeError
-LayoutTests/fast/files/blob-constructor_t01: RuntimeError
-LayoutTests/fast/files/file-reader-abort-in-last-progress_t01: RuntimeError
-LayoutTests/fast/files/file-reader-done-reading-abort_t01: RuntimeError, Pass
-LayoutTests/fast/files/read-blob-as-array-buffer_t01: RuntimeError
-LayoutTests/fast/filesystem/async-operations_t01: RuntimeError
-LayoutTests/fast/filesystem/directory-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-after-reload-crash_t01: RuntimeError
-LayoutTests/fast/filesystem/file-entry-to-uri_t01: RuntimeError
-LayoutTests/fast/filesystem/file-metadata-after-write_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-abort-continue_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-events_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-truncate-extend_t01: RuntimeError
-LayoutTests/fast/filesystem/file-writer-write-overlapped_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-unserializable_t01: RuntimeError
-LayoutTests/fast/filesystem/filesystem-uri-origin_t01: RuntimeError
-LayoutTests/fast/filesystem/op-copy_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-metadata_t01: RuntimeError
-LayoutTests/fast/filesystem/op-get-parent_t01: RuntimeError
-LayoutTests/fast/filesystem/op-read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-chars_t01: RuntimeError
-LayoutTests/fast/filesystem/op-restricted-names_t01: RuntimeError
-LayoutTests/fast/filesystem/read-directory_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-readonly-file-object_t01: RuntimeError
-LayoutTests/fast/filesystem/simple-temporary_t01: RuntimeError
-LayoutTests/fast/filesystem/snapshot-file-with-gc_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-customError_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-typeMismatch-url_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-valueMissing-004_t01: RuntimeError
-LayoutTests/fast/forms/autocomplete_t01: RuntimeError
-LayoutTests/fast/forms/button/button-disabled-blur_t01: RuntimeError
-LayoutTests/fast/forms/color/color-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/color/input-value-sanitization-color_t01: RuntimeError
-LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved_t01: RuntimeError, Pass
-LayoutTests/fast/forms/date/ValidityState-typeMismatch-date_t01: RuntimeError
-LayoutTests/fast/forms/date/date-pseudo-classes_t01: RuntimeError
-LayoutTests/fast/forms/date/date-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/date/input-date-validation-message_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-input-type_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/datetimelocal-setrangetext_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/input-valueasdate-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal_t01: RuntimeError
-LayoutTests/fast/forms/form-attribute-nonexistence-form-id_t01: RuntimeError
-LayoutTests/fast/forms/input-appearance-elementFromPoint_t01: RuntimeError
-LayoutTests/fast/forms/input-inputmode_t01: RuntimeError
-LayoutTests/fast/forms/input-value-sanitization_t01: RuntimeError
-LayoutTests/fast/forms/menulist-submit-without-selection_t01: RuntimeError, Pass
-LayoutTests/fast/forms/option-change-single-selected_t01: RuntimeError
-LayoutTests/fast/forms/option-strip-unicode-spaces_t01: RuntimeError
-LayoutTests/fast/forms/parser-associated-form-removal_t01: RuntimeError
-LayoutTests/fast/forms/plaintext-mode-1_t01: RuntimeError
-LayoutTests/fast/forms/selection-wrongtype_t01: RuntimeError
-LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError
-LayoutTests/fast/forms/textarea-selection-preservation_t01: RuntimeError
-LayoutTests/fast/html/adjacent-html-context-element_t01: RuntimeError
-LayoutTests/fast/html/hidden-attr_t01: RuntimeError
-LayoutTests/fast/html/imports/import-element-removed-flag_t01: Timeout
-LayoutTests/fast/html/select-dropdown-consistent-background-color_t01: RuntimeError
-LayoutTests/fast/inline/boundingBox-with-continuation_t01: RuntimeError
-LayoutTests/fast/inline/inline-position-top-align_t01: RuntimeError
-LayoutTests/fast/inline/parent-inline-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/inline/positioned-element-padding-contributes-width_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-svg-write_t01: RuntimeError
-LayoutTests/fast/innerHTML/javascript-url_t01: RuntimeError
-LayoutTests/fast/lists/marker-preferred-margins_t01: RuntimeError
-LayoutTests/fast/loader/about-blank-hash-change_t01: Timeout
-LayoutTests/fast/loader/about-blank-hash-kept_t01: Timeout
-LayoutTests/fast/loader/loadInProgress_t01: RuntimeError, Pass
-LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01: RuntimeError
-LayoutTests/fast/loader/onhashchange-attribute-listeners_t01: Timeout
-LayoutTests/fast/loader/scroll-position-restored-on-back_t01: Timeout
-LayoutTests/fast/masking/parsing-clip-path-shape_t01: RuntimeError
-LayoutTests/fast/masking/parsing-mask_t01: RuntimeError
-LayoutTests/fast/media/matchmedium-query-api_t01: RuntimeError
-LayoutTests/fast/media/media-query-list-syntax_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCIceCandidate_t01: RuntimeError
-LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: Timeout, Pass
-LayoutTests/fast/mediastream/RTCPeerConnection_t01: RuntimeError
-LayoutTests/fast/mediastream/constructors_t01: RuntimeError
-LayoutTests/fast/multicol/balance-unbreakable_t01: RuntimeError
-LayoutTests/fast/multicol/break-after-always-bottom-margin_t01: RuntimeError
-LayoutTests/fast/multicol/cssom-view_t01: RuntimeError
-LayoutTests/fast/multicol/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-end-of-column_t01: RuntimeError
-LayoutTests/fast/multicol/hit-test-float_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance-images_t01: RuntimeError
-LayoutTests/fast/multicol/newmulticol/balance-maxheight_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: RuntimeError
-LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: RuntimeError
-LayoutTests/fast/overflow/replaced-child-100percent-height-inside-fixed-container-with-overflow-auto_t01: RuntimeError
-LayoutTests/fast/overflow/scrollbar-restored_t01: RuntimeError
-LayoutTests/fast/parser/fragment-parser-doctype_t01: RuntimeError
-LayoutTests/fast/replaced/available-height-for-content_t01: RuntimeError
-LayoutTests/fast/replaced/container-width-zero_t01: RuntimeError
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-height_t01: RuntimeError
-LayoutTests/fast/replaced/table-percent-width_t01: RuntimeError
-LayoutTests/fast/ruby/ruby-line-height_t01: RuntimeError
-LayoutTests/fast/scrolling/scroll-element-into-view_t01: RuntimeError
-LayoutTests/fast/shapes/parsing/parsing-shape-margin_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t01: RuntimeError
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-rounded-boxes_t02: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-boundary-events_t01: Timeout, Pass, RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-cancel_t01: RuntimeError
-LayoutTests/fast/speechsynthesis/speech-synthesis-pause-resume_t01: Timeout, Pass
-LayoutTests/fast/speechsynthesis/speech-synthesis-speak_t01: Timeout, Pass
-LayoutTests/fast/speechsynthesis/speech-synthesis-utterance-uses-voice_t01: Timeout, Pass
-LayoutTests/fast/storage/storage-disallowed-in-data-url_t01: RuntimeError
-LayoutTests/fast/sub-pixel/shadows-computed-style_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-angle_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-length_t01: RuntimeError
-LayoutTests/fast/svg/whitespace-number_t01: RuntimeError
-LayoutTests/fast/table/fixed-table-layout-width-change_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-bottom-edge_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-with-borders-bottom-edge_t01: RuntimeError
-LayoutTests/fast/table/html-table-width-max-width-constrained_t01: RuntimeError
-LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError, Pass
-LayoutTests/fast/table/margins-flipped-text-direction_t01: RuntimeError
-LayoutTests/fast/table/min-width-css-block-table_t01: RuntimeError
-LayoutTests/fast/table/nested-tables-with-div-offset_t01: RuntimeError
-LayoutTests/fast/table/switch-table-layout-multiple-section_t01: RuntimeError
-LayoutTests/fast/table/switch-table-layout_t01: RuntimeError
-LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows_t01: RuntimeError
-LayoutTests/fast/table/table-colgroup-present-after-table-row_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-cell-with-empty-cell_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t01: RuntimeError
-LayoutTests/fast/table/table-rowspan-height-distribution-in-rows_t02: RuntimeError
-LayoutTests/fast/table/table-with-content-width-exceeding-max-width_t01: RuntimeError
-LayoutTests/fast/text/find-case-folding_t01: RuntimeError
-LayoutTests/fast/text/find-russian_t01: RuntimeError
-LayoutTests/fast/text/find-soft-hyphen_t01: RuntimeError
-LayoutTests/fast/text/glyph-reordering_t01: RuntimeError
-LayoutTests/fast/text/international/iso-8859-8_t01: RuntimeError
-LayoutTests/fast/text/line-break-after-inline-latin1_t01: RuntimeError
-LayoutTests/fast/text/multiglyph-characters_t01: RuntimeError, Pass
-LayoutTests/fast/text/offsetForPosition-cluster-at-zero_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-ltr_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-vertical_t01: RuntimeError
-LayoutTests/fast/text/sub-pixel/text-scaling-webfont_t01: RuntimeError
-LayoutTests/fast/url/anchor_t01: RuntimeError
-LayoutTests/fast/url/file-http-base_t01: RuntimeError
-LayoutTests/fast/url/file_t01: RuntimeError
-LayoutTests/fast/url/idna2003_t01: RuntimeError
-LayoutTests/fast/url/idna2008_t01: RuntimeError
-LayoutTests/fast/url/invalid-urls-utf8_t01: RuntimeError
-LayoutTests/fast/url/ipv4_t01: RuntimeError
-LayoutTests/fast/url/ipv6_t01: RuntimeError
-LayoutTests/fast/url/path_t01: RuntimeError
-LayoutTests/fast/url/query_t01: RuntimeError
-LayoutTests/fast/url/relative-win_t01: RuntimeError
-LayoutTests/fast/url/relative_t01: RuntimeError
-LayoutTests/fast/url/segments_t01: RuntimeError
-LayoutTests/fast/url/standard-url_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Borrowed/od_20000608_t01: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_node_test_t02: RuntimeError
-LayoutTests/fast/xpath/4XPath/Core/test_parser_t01: RuntimeError
-LayoutTests/fast/xpath/ambiguous-operators_t01: RuntimeError
-LayoutTests/fast/xpath/ensure-null-namespace_t01: RuntimeError
-LayoutTests/fast/xpath/implicit-node-args_t01: RuntimeError
-LayoutTests/fast/xpath/node-name-case-sensitivity_t02: RuntimeError
-LayoutTests/fast/xpath/py-dom-xpath/expressions_t01: RuntimeError
-LayoutTests/fast/xsl/default-html_t01: RuntimeError
-LibTest/async/Future/asStream_A01_t02: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t01: RuntimeError
-LibTest/async/Stream/Stream.fromFutures_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError
-LibTest/async/Stream/Stream.fromIterable_A03_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t02: RuntimeError
-LibTest/async/Stream/Stream.periodic_A04_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A03_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A09_t03: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t02: RuntimeError
-LibTest/async/StreamController/StreamController.broadcast_A10_t03: RuntimeError
-LibTest/async/StreamController/addStream_A03_t01: RuntimeError
-LibTest/async/StreamController/stream_A02_t03: RuntimeError
-LibTest/async/StreamController/stream_A03_t02: RuntimeError
-LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
-LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t03: RuntimeError
-LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
-LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
-LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
-LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
-LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
-LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
-LibTest/collection/LinkedList/join_A01_t01: RuntimeError
-LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
-LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
-LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
-LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
-LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
-LibTest/core/AssertionError/message_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/CyclicInitializationError.class_A01_t01: RuntimeError
-LibTest/core/CyclicInitializationError/variableName_A01_t01: RuntimeError
-LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecond_A01_t01: RuntimeError
-LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: RuntimeError
-LibTest/core/DateTime/parse_A01_t03: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t01: RuntimeError
-LibTest/core/DateTime/to8601String_A01_t02: RuntimeError
-LibTest/core/Duration/Duration_A01_t01: CompileTimeError
-LibTest/core/Duration/Duration_A02_t01: CompileTimeError
-LibTest/core/Duration/inDays_A01_t01: CompileTimeError
-LibTest/core/Duration/inHours_A01_t01: CompileTimeError
-LibTest/core/Duration/inMicroseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inMilliseconds_A01_t01: CompileTimeError
-LibTest/core/Duration/inSeconds_A01_t01: CompileTimeError
-LibTest/core/Error/stackTrace_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
-LibTest/core/Function/Function_class_A01_t01: RuntimeError
-LibTest/core/IndexError/stackTrace_A01_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A03_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
-LibTest/core/RegExp/Pattern_semantics/splitQueryString_A02_t01: RuntimeError
-LibTest/core/Runes/any_A01_t01: RuntimeError
-LibTest/core/Runes/every_A01_t01: RuntimeError
-LibTest/core/String/padRight_A01_t01: RuntimeError
-LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
-LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t02: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromBytes_A01_t05: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t03: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A01_t04: RuntimeError
-LibTest/core/Uri/Uri.dataFromString_A02_t03: RuntimeError
-LibTest/core/Uri/Uri.file_A02_t03: RuntimeError
-LibTest/core/Uri/queryParametersAll_A01_t04: RuntimeError
-LibTest/core/Uri/queryParametersAll_A03_t01: RuntimeError
-LibTest/core/UriData/UriData.fromBytes_A01_t03: RuntimeError
-LibTest/core/UriData/charset_A01_t01: RuntimeError
-LibTest/core/UriData/contentText_A01_t01: RuntimeError
-LibTest/core/UriData/parse_A01_t01: RuntimeError
-LibTest/core/double/INFINITY_A01_t04: RuntimeError
-LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError
-LibTest/core/double/isInfinite_A01_t03: CompileTimeError
-LibTest/core/double/operator_GE_A01_t02: CompileTimeError
-LibTest/core/double/operator_GT_A01_t02: CompileTimeError
-LibTest/core/double/operator_LT_A01_t02: CompileTimeError
-LibTest/core/double/operator_addition_A01_t08: Crash
-LibTest/core/double/operator_subtraction_A01_t06: RuntimeError
-LibTest/core/double/operator_subtraction_A01_t09: Crash
-LibTest/core/double/roundToDouble_A01_t01: RuntimeError
-LibTest/core/double/round_A01_t01: RuntimeError
-LibTest/core/int/ceil_A01_t01: CompileTimeError
-LibTest/core/int/compareTo_A01_t01: CompileTimeError
-LibTest/core/int/floorToDouble_A01_t01: CompileTimeError
-LibTest/core/int/floor_A01_t01: CompileTimeError
-LibTest/core/int/hashCode_A01_t01: CompileTimeError
-LibTest/core/int/isInfinite_A01_t01: CompileTimeError
-LibTest/core/int/isNegative_A01_t01: CompileTimeError
-LibTest/core/int/isOdd_A01_t01: RuntimeError
-LibTest/core/int/operator_AND_A01_t01: CompileTimeError
-LibTest/core/int/operator_GE_A01_t01: CompileTimeError
-LibTest/core/int/operator_LT_A01_t01: CompileTimeError
-LibTest/core/int/operator_XOR_A01_t01: CompileTimeError
-LibTest/core/int/operator_addition_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A01_t01: CompileTimeError
-LibTest/core/int/operator_equality_A03_t01: CompileTimeError
-LibTest/core/int/operator_left_shift_A01_t01: RuntimeError
-LibTest/core/int/operator_remainder_A01_t03: RuntimeError
-LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError
-LibTest/core/int/operator_truncating_division_A01_t02: RuntimeError
-LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError
-LibTest/core/int/parse_A03_t02: CompileTimeError
-LibTest/core/int/roundToDouble_A01_t01: CompileTimeError
-LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError
-LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Timeout
-LibTest/html/Element/getClientRects_A01_t02: RuntimeError, Pass
-LibTest/html/Element/isContentEditable_A01_t01: RuntimeError, Pass
-LibTest/html/Element/loadEvent_A01_t01: Timeout
-LibTest/html/Element/mouseWheelEvent_A01_t01: Timeout
-LibTest/html/Element/onLoad_A01_t01: Timeout
-LibTest/html/Element/onMouseWheel_A01_t01: Timeout
-LibTest/html/Element/transitionEndEvent_A01_t01: Timeout
-LibTest/html/HttpRequest/responseText_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onError_A01_t02: Timeout
-LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Timeout
-LibTest/html/HttpRequestUpload/onLoad_A01_t01: Timeout
-LibTest/html/IFrameElement/enteredView_A01_t01: Timeout
-LibTest/html/IFrameElement/getClientRects_A01_t02: RuntimeError, Pass
-LibTest/html/IFrameElement/onMouseWheel_A01_t01: Timeout
-LibTest/html/IFrameElement/onTransitionEnd_A01_t01: Timeout, Pass
-LibTest/math/atan_A01_t01: RuntimeError
-Utils/tests/Expect/throws_A01_t04: RuntimeError
-WebPlatformTest/DOMEvents/approved/ProcessingInstruction.DOMCharacterDataModified_t01: Timeout
-WebPlatformTest/DOMEvents/approved/addEventListener.optional.useCapture_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t01: RuntimeError
-WebPlatformTest/Utils/test/asyncTestFail_t02: RuntimeError
-WebPlatformTest/Utils/test/asyncTestTimeout_t01: Timeout
-WebPlatformTest/custom-elements/concepts/type_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/concepts/type_A08_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElementNS_A05_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A01_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A02_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A01_t02: RuntimeError
-WebPlatformTest/custom-elements/instantiating/isAttribute_A03_t01: RuntimeError
-WebPlatformTest/custom-elements/instantiating/localName_A01_t01: RuntimeError
-WebPlatformTest/dom/events/type_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createDocumentType_t01: RuntimeError, Pass
-WebPlatformTest/dom/nodes/DOMImplementation-createDocument_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-adoptNode_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-insertBefore_t01: RuntimeError
-WebPlatformTest/dom/nodes/Node-isEqualNode_t01: Timeout
-WebPlatformTest/dom/nodes/Node-nodeName_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A02_t01: RuntimeError, Pass
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A07_t03: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttribute_A03_t01: RuntimeError
-WebPlatformTest/html-imports/link-import_t02: RuntimeError
-WebPlatformTest/html-imports/loading-import_t01: RuntimeError
-WebPlatformTest/html-templates/innerhtml-on-templates/innerhtml_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags_t01: RuntimeError
-WebPlatformTest/html-templates/parsing-html-templates/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context_t01: RuntimeError
-WebPlatformTest/html-templates/template-element/template-as-a-descendant_t01: RuntimeError
-WebPlatformTest/html/browsers/browsing-the-web/read-media/pageload-video_t01: Timeout
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.body-setter_t01: RuntimeError
-WebPlatformTest/html/dom/documents/dom-tree-accessors/document.getElementsByName-namespace_t01: RuntimeError
-WebPlatformTest/html/dom/elements/global-attributes/dataset-get_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/error-codes/error_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/addTextTrack_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues_t01: Timeout
-WebPlatformTest/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/selection_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/textfieldselection/textfieldselection-setRangeText_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-button-element/button-validation_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-datalist-element/datalistelement_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-elements-matches_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-form-element/form-nameditem_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/color_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/datetime_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/input-type-button_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/mobiles_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/month_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/password_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/range_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/time_t02: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/type-change-state_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-input-element/week_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-option-element/option-text-spaces_t01: RuntimeError
-WebPlatformTest/html/semantics/forms/the-textarea-element/textarea-type_t01: RuntimeError
-WebPlatformTest/html/semantics/interactive-elements/the-dialog-element/dialog-close_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/checked_t01: RuntimeError
-WebPlatformTest/html/semantics/selectors/pseudo-classes/focus_t01: RuntimeError, Pass
-WebPlatformTest/html/semantics/selectors/pseudo-classes/indeterminate_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/attributes-common-to-td-and-th-elements/cellIndex_t01: RuntimeError
-WebPlatformTest/html/semantics/tabular-data/the-table-element/table-rows_t01: RuntimeError
-WebPlatformTest/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol_t00: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-event-interface/event-path-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-009_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-011_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-013_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-004_t02: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-content-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/elements-and-dom-objects/the-shadow-html-element/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-dispatch/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/event-retargeting/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-007_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/events-that-are-always-stopped/test-008_t01: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t04: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-001_t06: RuntimeError
-WebPlatformTest/shadow-dom/events/retargeting-relatedtarget/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-and-their-shadow-trees/test-004_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/html-elements-in-shadow-trees/html-forms/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/custom-pseudo-elements/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/distributed-pseudo-element/test-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/hosting-multiple-shadow-trees/test-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/distribution-003_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/lower-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/nested-shadow-trees/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/reprojection/test-001_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/satisfying-matching-criteria/test-006_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/ownerdocument-002_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-005_t01: RuntimeError
-WebPlatformTest/shadow-dom/shadow-trees/upper-boundary-encapsulation/test-011_t01: RuntimeError
-WebPlatformTest/webstorage/event_constructor_t02: RuntimeError
-WebPlatformTest/webstorage/event_local_key_t01: Timeout
-WebPlatformTest/webstorage/event_local_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_local_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_local_url_t01: Timeout
-WebPlatformTest/webstorage/event_session_key_t01: Timeout
-WebPlatformTest/webstorage/event_session_newvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_oldvalue_t01: Timeout
-WebPlatformTest/webstorage/event_session_storagearea_t01: Timeout
-WebPlatformTest/webstorage/event_session_url_t01: Timeout
-WebPlatformTest/webstorage/storage_session_setitem_quotaexceedederr_t01: Timeout
-
-[ $compiler == dart2js && $runtime == safari && $fast_startup ]
-LayoutTests/fast/canvas/canvas-alphaImageData-behavior_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-blend-image_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-composite-alpha_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-composite-canvas_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-composite-image_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-drawImage-scaled-copy-to-self_t01: RuntimeError
-LayoutTests/fast/canvas/canvas-lineDash_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-lineWidth-intact-after-strokeRect_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-scale-drawImage-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-scale-fillRect-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokePath-alpha-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokePath-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokeRect-gradient-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-style-intact-after-text_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/fillText-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/text-globalAlpha_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/canvas-test_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError, Pass
-LayoutTests/fast/css/computed-offset-with-zoom_t01: RuntimeError
-LayoutTests/fast/css/counters/counter-cssText_t01: RuntimeError
-LayoutTests/fast/css/cssText-shorthand_t01: RuntimeError
-LayoutTests/fast/css/font-face-unicode-range-monospace_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-columns_t01: RuntimeError
-LayoutTests/fast/css/invalid-not-with-simple-selector-sequence_t01: RuntimeError
-LayoutTests/fast/css/parsing-object-position_t01: RuntimeError
-LayoutTests/fast/css/pseudo-any_t01: RuntimeError, Pass
-LayoutTests/fast/css/shadow-current-color_t01: RuntimeError
-LayoutTests/fast/css/sticky/parsing-position-sticky_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited_t01: RuntimeError
-LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last_t01: RuntimeError
-LayoutTests/fast/dom/Attr/direction-attribute-set-and-cleared_t01: RuntimeError
-LayoutTests/fast/dom/DOMException/XPathException_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search_t01: RuntimeError, Pass
-LayoutTests/fast/dom/HTMLSelectElement/selected-index-preserved-when-option-text-changes_t01: RuntimeError
-LayoutTests/fast/dom/MutationObserver/observe-options-attributes_t01: RuntimeError
-LayoutTests/fast/files/file-reader-readystate_t01: RuntimeError
-LayoutTests/fast/filesystem/input-access-entries_t01: RuntimeError
-LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-change-layout-by-value_t01: RuntimeError
-LayoutTests/fast/forms/date/date-input-type_t01: RuntimeError
-LayoutTests/fast/forms/date/input-valueasnumber-date_t01: RuntimeError
-LayoutTests/fast/forms/menulist-submit-without-selection_t01: RuntimeError, Pass
-LayoutTests/fast/inline/continuation-inlines-inserted-in-reverse-after-block_t01: RuntimeError
-LayoutTests/fast/innerHTML/innerHTML-uri-resolution_t01: RuntimeError
-LayoutTests/fast/media/media-query-list_t01: RuntimeError
-LayoutTests/fast/mediastream/getusermedia_t01: RuntimeError, Pass
-LayoutTests/fast/multicol/balance-short-trailing-empty-block_t01: RuntimeError
-LayoutTests/fast/multicol/balance-trailing-border_t01: RuntimeError
-LayoutTests/fast/multicol/balance-trailing-border_t02: RuntimeError
-LayoutTests/fast/multicol/columns-shorthand-parsing_t02: RuntimeError
-LayoutTests/fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell_t01: RuntimeError
-LayoutTests/fast/replaced/preferred-widths_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError, Pass
-LayoutTests/fast/sub-pixel/table-rows-have-stable-height_t01: RuntimeError
-LayoutTests/fast/table/absolute-table-percent-lengths_t01: RuntimeError
-LayoutTests/fast/table/css-table-max-height_t01: RuntimeError
-LayoutTests/fast/table/css-table-width-with-border-padding_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-right-edge_t01: RuntimeError
-LayoutTests/fast/table/hittest-tablecell-with-borders-right-edge_t01: RuntimeError
-LayoutTests/fast/table/margins-perpendicular-containing-block_t01: RuntimeError
-LayoutTests/fast/table/min-max-width-preferred-size_t01: RuntimeError
-LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01: RuntimeError
-LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: RuntimeError
-LayoutTests/fast/table/table-width-exceeding-max-width_t01: RuntimeError
-LayoutTests/fast/text-autosizing/vertical-writing-mode_t01: RuntimeError
-LayoutTests/fast/text/find-spaces_t01: RuntimeError
-LayoutTests/fast/text/font-ligatures-linebreak-word_t01: RuntimeError
-LayoutTests/fast/text/font-ligatures-linebreak_t01: RuntimeError
-LayoutTests/fast/text/international/cjk-segmentation_t01: RuntimeError
-LayoutTests/fast/text/selection-exceptions_t01: RuntimeError
-LayoutTests/fast/transforms/bounding-rect-zoom_t01: RuntimeError
-LayoutTests/fast/transforms/hit-test-large-scale_t01: RuntimeError
-LayoutTests/fast/writing-mode/vertical-font-vmtx-units-per-em_t01: RuntimeError
-LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request_t01: RuntimeError
-LibTest/html/Element/isContentEditable_A02_t01: RuntimeError
-LibTest/html/IFrameElement/getClientRects_A01_t02: RuntimeError, Pass
-LibTest/html/IFrameElement/isContentEditable_A01_t01: RuntimeError
-LibTest/html/Window/close_A01_t01: RuntimeError
-LibTest/math/cos_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createDocumentType_t01: RuntimeError, Pass
-WebPlatformTest/dom/nodes/Document-createElementNS_t01: RuntimeError, Pass
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A02_t01: RuntimeError, Pass
-WebPlatformTest/html/semantics/scripting-1/the-script-element/async_t11: RuntimeError
-
-[ $compiler == dart2js && $runtime == safari && !$fast_startup ]
-LayoutTests/fast/canvas/canvas-alphaImageData-behavior_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-composite-alpha_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-composite-image_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-getImageData_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-lineDash_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-lineWidth-intact-after-strokeRect_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-scale-drawImage-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-scale-fillPath-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-scale-fillRect-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-strokeRect-alpha-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-style-intact-after-text_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/fillText-shadow_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/text-globalAlpha_t01: RuntimeError, Pass
-LayoutTests/fast/canvas/webgl/canvas-test_t01: RuntimeError, Pass
-LayoutTests/fast/css/focus-display-block-inline_t01: RuntimeError, Pass
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search_t01: RuntimeError, Pass
-LayoutTests/fast/forms/autofocus-input-css-style-change_t01: RuntimeError, Pass
-LayoutTests/fast/mediastream/getusermedia_t01: RuntimeError, Pass
-LayoutTests/fast/replaced/preferred-widths_t01: RuntimeError, Pass
-LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t02: RuntimeError, Pass
-WebPlatformTest/dom/nodes/Document-createElementNS_t01: RuntimeError, Pass
-
-[ $compiler == dart2js && $runtime != safari ]
-LayoutTests/fast/canvas/canvas-lineDash_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/buffer-data-array-buffer_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/context-lost_t01: RuntimeError
-LayoutTests/fast/canvas/webgl/uninitialized-test_t01: RuntimeError
-LayoutTests/fast/css/background-clip-text_t01: RuntimeError
-LayoutTests/fast/css/border-radius-property-value_t01: RuntimeError
-LayoutTests/fast/css/child-selector-implicit-tbody_t01: RuntimeError
-LayoutTests/fast/css/getPropertyValue-border_t01: RuntimeError
-LayoutTests/fast/css/url-with-multi-byte-unicode-escape_t01: RuntimeError
-LayoutTests/fast/dom/DOMImplementation/createDocumentType-err_t01: RuntimeError
-LayoutTests/fast/dom/Document/CaretRangeFromPoint/replace-element_t01: RuntimeError
-LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search_t01: RuntimeError
-LayoutTests/fast/dom/HTMLSelectElement/change-multiple-preserve-selection_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/detached-parent-rule-without-wrapper_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/removed-media-rule-deleted-parent-crash_t01: RuntimeError
-LayoutTests/fast/dom/StyleSheet/removed-stylesheet-rule-deleted-parent-crash_t01: RuntimeError
-LayoutTests/fast/dom/offset-position-writing-modes_t01: RuntimeError
-LayoutTests/fast/events/document-elementFromPoint_t01: RuntimeError
-LayoutTests/fast/eventsource/eventsource-constructor_t01: RuntimeError
-LayoutTests/fast/forms/ValidityState-tooLong-input_t01: RuntimeError
-LayoutTests/fast/forms/fieldset/fieldset-elements_t01: RuntimeError
-LayoutTests/fast/forms/menulist-submit-without-selection_t01: RuntimeError, Pass
-LayoutTests/fast/forms/select-change-popup-to-listbox-in-event-handler_t01: RuntimeError
-LayoutTests/fast/forms/select-clientheight-with-multiple-attr_t01: RuntimeError
-LayoutTests/fast/forms/select-list-box-mouse-focus_t01: RuntimeError
-LayoutTests/fast/forms/selection-start-end-readonly_t01: RuntimeError
-LayoutTests/fast/html/aside-element_t01: RuntimeError
-LayoutTests/fast/html/details-add-child-1_t01: RuntimeError
-LayoutTests/fast/html/figcaption-element_t01: RuntimeError
-LayoutTests/fast/html/footer-element_t01: RuntimeError
-LayoutTests/fast/html/mark-element_t01: RuntimeError
-LayoutTests/fast/html/section-element_t01: RuntimeError
-LayoutTests/fast/masking/parsing-mask-source-type_t01: RuntimeError
-LayoutTests/fast/mediastream/getusermedia_t01: RuntimeError
-LayoutTests/fast/multicol/flipped-blocks-hit-test_t01: RuntimeError
-LayoutTests/fast/text/pre-wrap-trailing-tab_t01: RuntimeError
-LibTest/html/Element/blur_A01_t01: RuntimeError
-LibTest/html/HttpRequest/overrideMimeType_A01_t01: RuntimeError
-LibTest/html/IFrameElement/focus_A01_t01: RuntimeError
-LibTest/math/log_A01_t01: RuntimeError
-WebPlatformTest/dom/nodes/DOMImplementation-createDocumentType_t01: RuntimeError
-WebPlatformTest/dom/nodes/Document-createElementNS_t01: RuntimeError
-WebPlatformTest/dom/nodes/attributes/setAttributeNS_A02_t01: RuntimeError
-
-[ $compiler == dart2js && $system != macos ]
-LayoutTests/fast/text/zero-width-characters_t01: RuntimeError
+LayoutTests/*: SkipByDesign # d8 is not a browser
+LibTest/html/*: SkipByDesign # d8 is not a browser
+WebPlatformTest/*: SkipByDesign # d8 is not a browser
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index 380c44a..10ad9d2 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -2,14 +2,6 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-LibTest/io/Stdin/readLineSync_A03_t02: Pass, Fail # https://github.com/dart-lang/co19/issues/184
-LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, ExtraSlow  # https://github.com/dart-lang/sdk/issues/35316
-LibTest/collection/ListMixin/ListMixin_class_A01_t02: Pass, ExtraSlow  # https://github.com/dart-lang/sdk/issues/35316
-LibTest/core/List/List_class_A01_t02: Pass, Slow  # Does many calls
-LibTest/io/FileSystemCreateEvent/isDirectory_A01_t06: Pass, RuntimeError # https://github.com/dart-lang/co19/issues/186
-LibTest/io/RawDatagramSocket/close_A01_t01: Pass, RuntimeError # https://github.com/dart-lang/co19/issues/195
-LibTest/io/RawDatagramSocket/singleWhere_A03_t01: Pass, RuntimeError # https://github.com/dart-lang/co19/issues/195
-
 [ $compiler == dartkp ]
 Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError
 Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: DartkCrash
@@ -25,13 +17,7 @@
 LanguageFeatures/Subtyping/static/generated/left_bottom_global_variable_A02_t01: DartkCrash
 LanguageFeatures/Subtyping/static/generated/left_promoted_variable_global_variable_A02_t01: DartkCrash
 LibTest/async/Stream/Stream.periodic_A02_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/DoubleLinkedQueue.from_A01_t01: RuntimeError
 LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t02: RuntimeError
-LibTest/collection/IterableMixin/reduce_A01_t01: RuntimeError
-LibTest/collection/LinkedHashSet/LinkedHashSet_class_A01_t01: RuntimeError
-LibTest/collection/Queue/Queue.from_A01_t01: RuntimeError
-LibTest/collection/SetBase/SetBase_class_A01_t01: RuntimeError
-LibTest/core/List/List_class_A01_t01: RuntimeError
 LibTest/core/StackOverflowError/stackTrace_A01_t02: RuntimeError
 LibTest/core/Uri/Uri.dataFromString_A01_t01: RuntimeError
 LibTest/core/double/round_A01_t03: RuntimeError
@@ -66,12 +52,6 @@
 LibTest/isolate/Isolate/spawnUri_A01_t02: RuntimeError
 LibTest/isolate/Isolate/spawnUri_A05_t05: RuntimeError
 LibTest/isolate/ReceivePort/lastWhere_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32x4List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32List_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/first_A01_t02: RuntimeError
-LibTest/typed_data/Float32x4List/every_A01_t01: RuntimeError
-LibTest/typed_data/Int32List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/clear_A01_t01: RuntimeError
 
 [ $compiler == fasta ]
 Language/Statements/For/syntax_t13: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
@@ -79,6 +59,11 @@
 Language/Statements/For/syntax_t20 tatements/For/syntax_t20: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
 
 [ $runtime == vm ]
+LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Slow # Does many calls
+LibTest/collection/ListMixin/ListMixin_class_A01_t02: Pass, Slow # Does many calls
+LibTest/core/List/List_class_A01_t02: Pass, Slow # Does many calls
+LibTest/io/FileSystemCreateEvent/isDirectory_A01_t06: Pass, RuntimeError # https://github.com/dart-lang/co19/issues/186
+LibTest/io/RawDatagramSocket/*: Skip # RawDatagramSocket are flacky. Skip them all until rewritten
 LibTest/io/RawDatagramSocket/any_A01_t02: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 LibTest/io/RawDatagramSocket/any_A01_t03: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 LibTest/io/RawDatagramSocket/asBroadcastStream_A01_t02: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
@@ -86,11 +71,21 @@
 LibTest/io/RawDatagramSocket/lastWhere_A01_t02: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 LibTest/io/RawDatagramSocket/listen_A02_t02: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 LibTest/io/RawDatagramSocket/receive_A01_t01: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
-LibTest/io/RawDatagramSocket/where_A01_t01: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 LibTest/io/RawDatagramSocket/timeout_A02_t01: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 LibTest/io/RawDatagramSocket/timeout_A06_t01: Pass, Fail # Next roll might fix it (see https://github.com/dart-lang/co19/commit/8b2e2be5bc3bb9fec41efec8ac6fc777e231d915)
+LibTest/io/RawDatagramSocket/where_A01_t01: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 LibTest/io/Stdin/first_A04_t01: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/193
 LibTest/io/Stdin/last_A02_t01: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/182
+LibTest/io/Stdout/add_A02_t03: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/add_A02_t04: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/add_A02_t05: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/add_A02_t06: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/add_A02_t07: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/add_A02_t08: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/add_A02_t09: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/writeCharCode_A01_t03: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/write_A01_t04: Skip # https://github.com/dart-lang/co19/pull/204
+LibTest/io/Stdout/write_A01_t05: Skip # https://github.com/dart-lang/co19/pull/204
 
 [ $fasta ]
 Language/Classes/Abstract_Instance_Members/override_default_value_t01: MissingCompileTimeError # Issue 34190
@@ -220,9 +215,8 @@
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l1_t04: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t03: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t04: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t07: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l2_t08: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_l3_t02: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/dynamic/class_typedef_l2_t02: RuntimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01: Crash
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/01: Crash
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t01/02: Crash
@@ -237,20 +231,57 @@
 LanguageFeatures/Instantiate-to-bound/class/static/class_l1_t04/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t03/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t04/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t07/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_l3_t02/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l4_t01/01: MissingCompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l4_t01/03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t02/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t03/01: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/01: Crash, Pass
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/02: Crash, Pass
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: Crash
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t04/01: Crash, Pass
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t04/none: Crash, Pass
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t06/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t07/01: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t08/01: Crash, Pass
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t08/02: Crash, Pass
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t08/none: Crash, Pass
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l1_t07: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t03: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t04: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t12: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t13: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t15: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t03: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t04: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t05: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t12: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t14: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t15: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t01: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t10: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t11: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t12: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t14: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t03: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t12: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t01: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t03: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t05: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t11: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t12: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t13: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t14: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t15: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t11: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t12: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t15: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_typedef_l1_t05: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_typedef_l1_t06: RuntimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_FutureOr_l1_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/01: MissingCompileTimeError
@@ -268,9 +299,44 @@
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/05: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/06: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/07: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t02/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t04/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t12: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t13: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t01/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t03/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t05: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t10: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t11: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t05: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t05/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_t01/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_t06/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_t15: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t02/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t03/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/02: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/05: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/06: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t04/07: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t05/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t06/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/02: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/04: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/05: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/06: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t08/07: MissingCompileTimeError
 LanguageFeatures/Set-literals/constant_set_literals_A02_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/constant_set_literals_A03_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/constant_set_literals_A04_t01: CompileTimeError # This feature is not implemented yet
@@ -283,26 +349,17 @@
 LanguageFeatures/Set-literals/set_literals_A01_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/set_literals_A02_t01: CompileTimeError # This feature is not implemented yet
 LanguageFeatures/Set-literals/set_literals_A04_t01: CompileTimeError # This feature is not implemented yet
+LanguageFeatures/Set-literals/syntax_compatibility_A01_t01: CompileTimeError # This feature is not implemented yet
+LanguageFeatures/Set-literals/syntax_compatibility_A01_t02: CompileTimeError
 LanguageFeatures/Simple-bounds/dynamic/class_FutureOr_l1_t02: CompileTimeError
 LanguageFeatures/Simple-bounds/static/class_FutureOr_l1_t02: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t01/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t02/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t03/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t05: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t06: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/static/class_typedef_l1_t07: MissingCompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_FutureOr_l1_t02: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_l1_t07: CompileTimeError
+LanguageFeatures/Simple-bounds/static/typedef_FutureOr_l1_t02/none: CompileTimeError
+LanguageFeatures/Simple-bounds/static/typedef_l1_t07/none: CompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_l2_t02/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t06/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t07/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t08/none: CompileTimeError
-LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t09: MissingCompileTimeError
+LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t10: CompileTimeError
 LanguageFeatures/Super-mixins/covariance_t03: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t06: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t07: MissingCompileTimeError # Issue 35111
-LanguageFeatures/regression/33585_t01: MissingCompileTimeError
-LanguageFeatures/regression/33585_t02: MissingCompileTimeError
 LanguageFeatures/regression/33597_t01: MissingCompileTimeError
 LanguageFeatures/regression/33701_t01: MissingCompileTimeError
 LanguageFeatures/regression/34635_t01: CompileTimeError
@@ -420,9 +477,12 @@
 LibTest/isolate/Isolate/spawn_A06_t03: Crash, Pass
 
 [ $runtime == vm && $system == macos && ($compiler == dartk || $compiler == dartkb) ]
-LibTest/collection/ListBase/ListBase_class_A01_t02: Timeout, Pass, ExtraSlow  # https://github.com/dart-lang/co19/issues/198 https://github.com/dart-lang/sdk/issues/35316
-LibTest/collection/ListMixin/ListMixin_class_A01_t02: Timeout, Pass, ExtraSlow  # https://github.com/dart-lang/co19/issues/198 https://github.com/dart-lang/sdk/issues/35316
-LibTest/core/List/List_class_A01_t02: Timeout, Pass, ExtraSlow  # https://github.com/dart-lang/co19/issues/198 https://github.com/dart-lang/sdk/issues/35316
+LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Slow
+LibTest/collection/ListBase/ListBase_class_A01_t03: Pass, Slow
+LibTest/collection/ListMixin/ListMixin_class_A01_t02: Pass, Slow
+LibTest/collection/ListMixin/ListMixin_class_A01_t03: Pass, Slow
+LibTest/core/List/List_class_A01_t02: Pass, Slow
+LibTest/core/List/List_class_A01_t03: Pass, Slow
 LibTest/io/Directory/watch_A01_t02: RuntimeError, Pass
 LibTest/io/Directory/watch_A02_t01: RuntimeError, Pass
 LibTest/io/FileSystemCreateEvent/isDirectory_A01_t03: RuntimeError, Pass
@@ -566,6 +626,7 @@
 LibTest/io/Stdin/readByteSync_A02_t01: RuntimeError
 LibTest/io/Stdin/readLineSync_A03_t01: RuntimeError, Pass
 LibTest/io/Stdin/readLineSync_A03_t03: RuntimeError, Pass
+LibTest/io/Stdout/add_A02_t04: RuntimeError, Pass
 LibTest/io/WebSocket/pingInterval_A01_t01: RuntimeError, Pass
 LibTest/math/acos_A01_t01: RuntimeError
 LibTest/math/asin_A01_t01: RuntimeError
@@ -586,12 +647,44 @@
 Language/Mixins/Mixin_Application/syntax_t16: CompileTimeError
 Language/Statements/Assert/execution_t08: RuntimeError
 Language/Types/Function_Types/call_t01: RuntimeError
-LanguageFeatures/Instantiate-to-bound/class/dynamic/class_typedef_l1_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/class/dynamic/class_typedef_l2_t06: RuntimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t04/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/none: CompileTimeError
-LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: DartkCrash
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: DartkCrash
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_FutureOr_l1_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t01: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t05: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t10: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t11: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_01_t14: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t01: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t10: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t11: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_02_t13: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t03: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t04: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t05: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t13: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_03_t15: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t01: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t04: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t05: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t10: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t11: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t13: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t14: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_04_t15: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t04: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_05_t10: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t01: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t03: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t04: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t05: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t10: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t13: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_06_t14: RuntimeError
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t06: RuntimeError
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t11: RuntimeError
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t12: RuntimeError
@@ -599,11 +692,11 @@
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t14: RuntimeError
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t15: RuntimeError
 LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_l2_t16: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/class_typedef_l1_t02: RuntimeError
+LanguageFeatures/Instantiate-to-bound/typedef/dynamic/typedef_typedef_l1_t02: RuntimeError
 LanguageFeatures/Simple-bounds/dynamic/typedef_FutureOr_l1_t02: RuntimeError
 LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t07: RuntimeError
+LanguageFeatures/Simple-bounds/dynamic/typedef_l1_t12: RuntimeError
 LanguageFeatures/Simple-bounds/dynamic/typedef_l2_t02: RuntimeError
-LanguageFeatures/Simple-bounds/dynamic/typedef_typedef_l1_t07: RuntimeError
 LanguageFeatures/regression/33701_t01: MissingCompileTimeError
 LanguageFeatures/regression/34803_t01: DartkCrash
 LanguageFeatures/regression/34803_t02: DartkCrash
@@ -611,41 +704,7 @@
 LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError
 LibTest/async/StreamController/addStream_A03_t01: RuntimeError
 LibTest/async/StreamSink/addStream_A01_t02: RuntimeError
-LibTest/collection/HashSet/HashSet_class_A01_t01: RuntimeError
-LibTest/collection/IterableBase/IterableBase_class_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/IterableMixin_class_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/contains_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/every_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/every_A02_t01: RuntimeError
-LibTest/collection/IterableMixin/expand_A02_t01: RuntimeError
-LibTest/collection/LinkedList/LinkedList_A01_t01: RuntimeError
-LibTest/collection/LinkedList/LinkedList_class_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/LinkedListEntry_class_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A02_t03: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A02_t02: RuntimeError
-LibTest/collection/LinkedListEntry/insertBefore_A02_t03: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/next_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/previous_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t02: RuntimeError
-LibTest/collection/ListBase/ListBase_class_A01_t01: RuntimeError
-LibTest/collection/ListMixin/ListMixin_class_A01_t01: RuntimeError
-LibTest/collection/ListQueue/ListQueue_class_A01_t01: RuntimeError
-LibTest/collection/Queue/Queue_class_A01_t01: RuntimeError
-LibTest/collection/SetMixin/SetMixin_class_A01_t01: RuntimeError
-LibTest/collection/SplayTreeSet/SplayTreeSet_class_A01_t01: RuntimeError
-LibTest/collection/UnmodifiableListView/UnmodifiableListView_class_A01_t01: RuntimeError
 LibTest/core/Function/Function_class_A01_t01: RuntimeError
-LibTest/core/List/Iterable_A01_t01: RuntimeError
-LibTest/core/int/abs_A01_t01: RuntimeError
-LibTest/core/int/isOdd_A01_t01: RuntimeError
 LibTest/io/Cookie/Cookie_A01_t04: RuntimeError
 LibTest/io/Directory/watch_A01_t01: Fail, Pass
 LibTest/io/Directory/watch_A02_t01: Fail
@@ -699,9 +758,6 @@
 LibTest/io/RawDatagramSocket/single_A02_t01: RuntimeError, Pass
 LibTest/io/RawDatagramSocket/single_A03_t01: RuntimeError, Pass
 LibTest/io/RawDatagramSocket/skipWhile_A04_t01: RuntimeError, Pass
-LibTest/io/Stdout/addError_A02_t02: RuntimeError
-LibTest/io/Stdout/addStream_A01_t01: RuntimeError
-LibTest/io/Stdout/add_A02_t07: RuntimeError
 LibTest/io/WebSocket/connect_A01_t01: RuntimeError
 LibTest/io/WebSocket/connect_A01_t02: RuntimeError
 LibTest/isolate/Isolate/pause_A01_t01: Timeout, Pass
@@ -950,35 +1006,10 @@
 LibTest/async/StreamTransformer/StreamTransformer_A02_t01: RuntimeError
 LibTest/async/StreamTransformer/StreamTransformer_A02_t02: RuntimeError
 LibTest/async/Zone/registerBinaryCallback_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/DoubleLinkedQueue.from_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/fold_A01_t01: RuntimeError
-LibTest/collection/DoubleLinkedQueue/reduce_A01_t01: RuntimeError
 LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t02: RuntimeError
 LibTest/collection/DoubleLinkedQueue/removeWhere_A02_t03: RuntimeError
 LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t02: RuntimeError
 LibTest/collection/DoubleLinkedQueue/retainWhere_A02_t03: RuntimeError
-LibTest/collection/HashMap/HashMap_A06_t01: RuntimeError
-LibTest/collection/HashSet/HashSet_A04_t01: RuntimeError
-LibTest/collection/IterableMixin/any_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/expand_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/first_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/fold_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/reduce_A01_t01: RuntimeError
-LibTest/collection/IterableMixin/single_A01_t02: RuntimeError
-LibTest/collection/IterableMixin/skipWhile_A03_t01: RuntimeError
-LibTest/collection/IterableMixin/skipWhile_A04_t01: RuntimeError
-LibTest/collection/LinkedHashSet/LinkedHashSet_class_A01_t01: RuntimeError
-LibTest/collection/LinkedList/addAll_A01_t02: RuntimeError
-LibTest/collection/LinkedList/join_A01_t01: RuntimeError
-LibTest/collection/LinkedList/remove_A01_t03: RuntimeError
-LibTest/collection/LinkedList/toString_A03_t01: RuntimeError
-LibTest/collection/LinkedListEntry/insertAfter_A01_t02: RuntimeError
-LibTest/collection/LinkedListEntry/list_A01_t01: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A01_t03: RuntimeError
-LibTest/collection/LinkedListEntry/unlink_A02_t02: RuntimeError
-LibTest/collection/ListQueue/ListQueue.from_A01_t01: RuntimeError
-LibTest/collection/Queue/Queue.from_A01_t01: RuntimeError
-LibTest/collection/SetBase/SetBase_class_A01_t01: RuntimeError
 LibTest/convert/ByteConversionSink/ByteConversionSink.from_A01_t01: RuntimeError
 LibTest/convert/ByteConversionSink/ByteConversionSink_class_A01_t01: RuntimeError
 LibTest/convert/LineSplitter/fuse_A01_t01: RuntimeError
@@ -994,21 +1025,11 @@
 LibTest/core/AssertionError/AssertionError_A01_t01: RuntimeError
 LibTest/core/AssertionError/message_A01_t01: RuntimeError
 LibTest/core/AssertionError/toString_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t01: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t03: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t04: RuntimeError
-LibTest/core/Expando/operator_square_brackets_A01_t05: RuntimeError
-LibTest/core/List/List_class_A01_t01: RuntimeError
 LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterEscape_A06_t02: RuntimeError
 LibTest/core/RegExp/Pattern_semantics/firstMatch_DecimalEscape_A01_t02: RuntimeError
 LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError
-LibTest/core/Runes/any_A01_t01: RuntimeError
-LibTest/core/Runes/every_A01_t01: RuntimeError
 LibTest/core/StackOverflowError/stackTrace_A01_t01: RuntimeError
 LibTest/core/StackOverflowError/stackTrace_A01_t02: RuntimeError
-LibTest/core/String/padRight_A01_t01: RuntimeError
-LibTest/core/String/replaceAllMapped_A03_t01: RuntimeError
-LibTest/core/String/replaceFirstMapped_A03_t01: RuntimeError
 LibTest/core/Symbol/Symbol_A01_t03: RuntimeError
 LibTest/core/Symbol/Symbol_A01_t04: RuntimeError
 LibTest/core/Symbol/Symbol_A01_t05: RuntimeError
@@ -1058,11 +1079,6 @@
 LibTest/io/Directory/exists_A02_t02: RuntimeError
 LibTest/io/Directory/statSync_A01_t05: RuntimeError
 LibTest/io/Directory/stat_A01_t05: RuntimeError
-LibTest/io/File/openRead_A01_t04: RuntimeError
-LibTest/io/File/openRead_A02_t01: RuntimeError
-LibTest/io/File/openSync_A01_t03: RuntimeError
-LibTest/io/File/openWrite_A03_t01: RuntimeError
-LibTest/io/File/open_A01_t03: RuntimeError
 LibTest/io/File/statSync_A01_t05: RuntimeError
 LibTest/io/File/stat_A01_t05: RuntimeError
 LibTest/io/FileStat/changed_A01_t01: RuntimeError
@@ -1171,25 +1187,13 @@
 LibTest/io/Stdin/echoMode_A01_t02: RuntimeError
 LibTest/io/Stdin/lineMode_A01_t01: RuntimeError
 LibTest/io/Stdin/lineMode_A01_t02: RuntimeError
-LibTest/io/Stdout/Stdout_class_A02_t01: RuntimeError
-LibTest/io/Stdout/Stdout_class_A03_t01: RuntimeError
-LibTest/io/Stdout/addError_A02_t01: RuntimeError
-LibTest/io/Stdout/addStream_A02_t01: RuntimeError
-LibTest/io/Stdout/addStream_A03_t01: RuntimeError
-LibTest/io/Stdout/addStream_A03_t02: RuntimeError
-LibTest/io/Stdout/add_A03_t01: RuntimeError
-LibTest/io/Stdout/add_A03_t02: RuntimeError
-LibTest/io/Stdout/close_A02_t01: RuntimeError
-LibTest/io/Stdout/close_A02_t02: RuntimeError
-LibTest/io/Stdout/flush_A01_t01: RuntimeError
-LibTest/io/Stdout/flush_A02_t01: RuntimeError
-LibTest/io/Stdout/nonBlocking_A01_t01: RuntimeError
 LibTest/io/SystemEncoding/name_A01_t01: RuntimeError
 LibTest/io/WebSocket/isEmpty_A01_t01: RuntimeError
 LibTest/io/WebSocketTransformer/bind_A01_t01: RuntimeError
 LibTest/io/ZLibDecoder/fuse_A01_t01: RuntimeError
 LibTest/io/ZLibEncoder/fuse_A01_t01: RuntimeError
 LibTest/isolate/Isolate/addOnExitListener_A04_t01: RuntimeError
+LibTest/isolate/Isolate/kill_A01_t01: Timeout, Pass
 LibTest/isolate/Isolate/ping_A01_t01: Timeout, Pass
 LibTest/isolate/Isolate/ping_A04_t01: RuntimeError
 LibTest/isolate/Isolate/spawnUri_A05_t04: RuntimeError, Pass
@@ -1202,63 +1206,4 @@
 LibTest/math/MutableRectangle/height_A03_t02: RuntimeError
 LibTest/math/MutableRectangle/width_A03_t02: RuntimeError
 LibTest/math/Rectangle/Rectangle_A03_t04: RuntimeError
-LibTest/typed_data/ByteBuffer/asByteData_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat32x4List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asFloat64x2List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt16List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt32x4List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asInt8List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint16List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint32List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint64List_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8ClampedList_A01_t01: RuntimeError
-LibTest/typed_data/ByteBuffer/asUint8List_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/any_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/every_A01_t01: RuntimeError
-LibTest/typed_data/Float32List/first_A01_t02: RuntimeError
-LibTest/typed_data/Float32List/last_A01_t02: RuntimeError
-LibTest/typed_data/Float32x4List/any_A01_t01: RuntimeError
-LibTest/typed_data/Float32x4List/every_A01_t01: RuntimeError
-LibTest/typed_data/Float64List/any_A01_t01: RuntimeError
-LibTest/typed_data/Float64List/every_A01_t01: RuntimeError
-LibTest/typed_data/Float64x2List/sort_A01_t01: RuntimeError
-LibTest/typed_data/Int16List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int16List/every_A01_t01: RuntimeError
-LibTest/typed_data/Int32List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int32List/every_A01_t01: RuntimeError
-LibTest/typed_data/Int32List/shuffle_A01_t01: RuntimeError, Pass
-LibTest/typed_data/Int32x4List/Int32x4List.fromList_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.fromList_A01_t02: RuntimeError
-LibTest/typed_data/Int32x4List/Int32x4List.view_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/clear_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/fold_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/forEach_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/lengthInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/length_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/offsetInBytes_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/skip_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/skip_A02_t01: RuntimeError
-LibTest/typed_data/Int32x4List/sublist_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/take_A01_t01: RuntimeError
-LibTest/typed_data/Int32x4List/take_A02_t01: RuntimeError
-LibTest/typed_data/Int64List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int64List/every_A01_t01: RuntimeError
-LibTest/typed_data/Int8List/any_A01_t01: RuntimeError
-LibTest/typed_data/Int8List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint16List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint16List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint32List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint32List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint32List/shuffle_A01_t01: RuntimeError, Pass
-LibTest/typed_data/Uint64List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint64List/last_A01_t02: RuntimeError
-LibTest/typed_data/Uint8ClampedList/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint8ClampedList/every_A01_t01: RuntimeError
-LibTest/typed_data/Uint8List/any_A01_t01: RuntimeError
-LibTest/typed_data/Uint8List/every_A01_t01: RuntimeError
 Utils/tests/Expect/throws_A01_t04: RuntimeError
diff --git a/tests/compiler/dart2js/analyses/analysis_helper.dart b/tests/compiler/dart2js/analyses/analysis_helper.dart
index c5f2dd0..9e1560e 100644
--- a/tests/compiler/dart2js/analyses/analysis_helper.dart
+++ b/tests/compiler/dart2js/analyses/analysis_helper.dart
@@ -7,15 +7,19 @@
 
 import 'package:args/args.dart';
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/common.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/diagnostics/messages.dart';
 import 'package:compiler/src/diagnostics/source_span.dart';
+import 'package:compiler/src/ir/scope.dart';
 import 'package:compiler/src/ir/static_type.dart';
 import 'package:compiler/src/ir/util.dart';
 import 'package:compiler/src/kernel/loader.dart';
 import 'package:compiler/src/util/uri_extras.dart';
 import 'package:expect/expect.dart';
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir
+    show RedirectingFactoryBody;
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/class_hierarchy.dart' as ir;
 import 'package:kernel/core_types.dart' as ir;
@@ -64,7 +68,60 @@
   });
 }
 
-class DynamicVisitor extends StaticTypeVisitor {
+class StaticTypeVisitorBase extends StaticTypeVisitor {
+  VariableScopeModel variableScopeModel;
+
+  StaticTypeVisitorBase(ir.Component component)
+      : super(new ir.TypeEnvironment(
+            new ir.CoreTypes(component), new ir.ClassHierarchy(component)));
+
+  @override
+  bool get useAsserts => false;
+
+  @override
+  bool get inferEffectivelyFinalVariableTypes => true;
+
+  @override
+  Null visitProcedure(ir.Procedure node) {
+    if (node.kind == ir.ProcedureKind.Factory) {
+      if (node.function.body is ir.RedirectingFactoryBody) {
+        // Don't visit redirecting factories.
+        return;
+      }
+    }
+    if (node.name.name.contains('#')) {
+      // Skip synthetic .dill members.
+      return;
+    }
+    variableScopeModel = ScopeModel.computeScopeModel(node)?.variableScopeModel;
+    super.visitProcedure(node);
+    variableScopeModel = null;
+  }
+
+  @override
+  Null visitField(ir.Field node) {
+    if (node.name.name.contains('#')) {
+      // Skip synthetic .dill members.
+      return;
+    }
+    variableScopeModel = ScopeModel.computeScopeModel(node)?.variableScopeModel;
+    super.visitField(node);
+    variableScopeModel = null;
+  }
+
+  @override
+  Null visitConstructor(ir.Constructor node) {
+    if (node.name.name.contains('#')) {
+      // Skip synthetic .dill members.
+      return;
+    }
+    variableScopeModel = ScopeModel.computeScopeModel(node)?.variableScopeModel;
+    super.visitConstructor(node);
+    variableScopeModel = null;
+  }
+}
+
+class DynamicVisitor extends StaticTypeVisitorBase {
   final DiagnosticReporter reporter;
   final ir.Component component;
   final String _allowedListPath;
@@ -75,8 +132,7 @@
 
   DynamicVisitor(this.reporter, this.component, this._allowedListPath,
       this.analyzedUrisFilter)
-      : super(new ir.TypeEnvironment(
-            new ir.CoreTypes(component), new ir.ClassHierarchy(component)));
+      : super(component);
 
   void run({bool verbose = false, bool generate = false}) {
     if (!generate && _allowedListPath != null) {
@@ -149,18 +205,16 @@
             }
           }
         });
-        _actualMessages.forEach((String uri,
-            Map<String, List<DiagnosticMessage>> actualMessagesMap) {
-          if (!_expectedJson.containsKey(uri)) {
-            actualMessagesMap.forEach(
-                (String message, List<DiagnosticMessage> actualMessages) {
-              if (!expectedMessages.containsKey(message)) {
-                for (DiagnosticMessage message in actualMessages) {
-                  reporter.reportError(message);
-                  errorCount++;
-                }
-              }
-            });
+      }
+    });
+    _actualMessages.forEach(
+        (String uri, Map<String, List<DiagnosticMessage>> actualMessagesMap) {
+      if (!_expectedJson.containsKey(uri)) {
+        actualMessagesMap
+            .forEach((String message, List<DiagnosticMessage> actualMessages) {
+          for (DiagnosticMessage message in actualMessages) {
+            reporter.reportError(message);
+            errorCount++;
           }
         });
       }
@@ -239,9 +293,13 @@
     ir.DartType staticType = node?.accept(this);
     assert(
         node is! ir.Expression ||
-            staticType == _getStaticTypeFromExpression(node),
-        "Static type mismatch for ${node.runtimeType}: "
-        "Found ${staticType}, expected ${_getStaticTypeFromExpression(node)}.");
+            staticType == typeEnvironment.nullType ||
+            typeEnvironment.isSubtypeOf(
+                staticType, _getStaticTypeFromExpression(node)),
+        reportAssertionFailure(
+            node,
+            "Unexpected static type for $node (${node.runtimeType}): "
+            "Found ${staticType}, expected ${_getStaticTypeFromExpression(node)}."));
     return staticType;
   }
 
@@ -260,7 +318,7 @@
   void handlePropertyGet(
       ir.PropertyGet node, ir.DartType receiverType, ir.DartType resultType) {
     if (receiverType is ir.DynamicType) {
-      reportError(node, "Dynamic access of '${node.name}'.");
+      registerError(node, "Dynamic access of '${node.name}'.");
     }
   }
 
@@ -268,7 +326,7 @@
   void handlePropertySet(
       ir.PropertySet node, ir.DartType receiverType, ir.DartType valueType) {
     if (receiverType is ir.DynamicType) {
-      reportError(node, "Dynamic update to '${node.name}'.");
+      registerError(node, "Dynamic update to '${node.name}'.");
     }
   }
 
@@ -279,11 +337,24 @@
       ArgumentTypes argumentTypes,
       ir.DartType returnType) {
     if (receiverType is ir.DynamicType) {
-      reportError(node, "Dynamic invocation of '${node.name}'.");
+      registerError(node, "Dynamic invocation of '${node.name}'.");
     }
   }
 
-  void reportError(ir.Node node, String message) {
+  String reportAssertionFailure(ir.Node node, String message) {
+    SourceSpan span = computeSourceSpanFromTreeNode(node);
+    Uri uri = span.uri;
+    if (uri.scheme == 'org-dartlang-sdk') {
+      span = new SourceSpan(
+          Uri.base.resolve(uri.path.substring(1)), span.begin, span.end);
+    }
+    DiagnosticMessage diagnosticMessage =
+        reporter.createMessage(span, MessageKind.GENERIC, {'text': message});
+    reporter.reportError(diagnosticMessage);
+    return message;
+  }
+
+  void registerError(ir.Node node, String message) {
     SourceSpan span = computeSourceSpanFromTreeNode(node);
     Uri uri = span.uri;
     String uriString = relativize(Uri.base, uri, Platform.isWindows);
diff --git a/tests/compiler/dart2js/analyses/api_allowed.json b/tests/compiler/dart2js/analyses/api_allowed.json
index ec57e7e..3139ef5 100644
--- a/tests/compiler/dart2js/analyses/api_allowed.json
+++ b/tests/compiler/dart2js/analyses/api_allowed.json
@@ -13,14 +13,10 @@
     "Dynamic invocation of '-'.": 4,
     "Dynamic invocation of '>>'.": 2,
     "Dynamic invocation of '&'.": 3,
-    "Dynamic invocation of '<'.": 6,
-    "Dynamic invocation of '>'.": 4,
+    "Dynamic invocation of '<'.": 3,
+    "Dynamic invocation of '>'.": 2,
     "Dynamic invocation of '+'.": 1,
-    "Dynamic access of '_js_helper::_self'.": 1,
-    "Dynamic access of '_js_helper::_target'.": 1,
-    "Dynamic access of '_js_helper::_receiver'.": 1,
-    "Dynamic access of 'length'.": 2,
-    "Dynamic invocation of '>='.": 1
+    "Dynamic access of 'length'.": 1
   },
   "org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/string_helper.dart": {
     "Dynamic invocation of '<'.": 1,
@@ -86,19 +82,12 @@
   },
   "org-dartlang-sdk:///sdk/lib/html/dart2js/html_dart2js.dart": {
     "Dynamic access of 'style'.": 1,
-    "Dynamic access of 'left'.": 3,
-    "Dynamic access of 'top'.": 3,
-    "Dynamic access of 'width'.": 2,
-    "Dynamic access of 'height'.": 2,
     "Dynamic invocation of 'remove'.": 2,
     "Dynamic update to 'dart.dom.html::_innerHtml'.": 1,
     "Dynamic access of 'firstChild'.": 2,
     "Dynamic invocation of 'append'.": 1,
     "Dynamic access of 'tagName'.": 2,
     "Dynamic invocation of 'round'.": 20,
-    "Dynamic invocation of 'toList'.": 1,
-    "Dynamic access of 'right'.": 1,
-    "Dynamic access of 'bottom'.": 1,
     "Dynamic invocation of 'call'.": 1,
     "Dynamic invocation of 'dart.dom.html::_initKeyboardEvent'.": 1,
     "Dynamic access of 'attributes'.": 1,
@@ -166,11 +155,9 @@
     "Dynamic update to 'dart.io::_owner'.": 1
   },
   "org-dartlang-sdk:///sdk/lib/io/secure_socket.dart": {
-    "Dynamic invocation of 'dart.io::_detachRaw'.": 2,
     "Dynamic invocation of '[]'.": 10,
-    "Dynamic access of 'dart.io::_socket'.": 1,
+    "Dynamic invocation of 'dart.io::_detachRaw'.": 2,
     "Dynamic access of 'closedReadEventSent'.": 1,
-    "Dynamic access of 'host'.": 1,
     "Dynamic update to 'dart.io::_owner'.": 1,
     "Dynamic access of 'length'.": 1,
     "Dynamic invocation of '~/'.": 1,
@@ -180,8 +167,7 @@
   "org-dartlang-sdk:///sdk/lib/io/stdio.dart": {
     "Dynamic invocation of 'writeFromSync'.": 1,
     "Dynamic invocation of 'cancel'.": 1,
-    "Dynamic invocation of 'closeSync'.": 1,
-    "Dynamic access of 'dart.io::_stream'.": 1
+    "Dynamic invocation of 'closeSync'.": 1
   },
   "org-dartlang-sdk:///sdk/lib/io/common.dart": {
     "Dynamic invocation of '[]'.": 3
@@ -198,8 +184,8 @@
   "org-dartlang-sdk:///sdk/lib/_internal/js_runtime/lib/core_patch.dart": {
     "Dynamic access of 'dart.core::_digits'.": 2,
     "Dynamic invocation of '<'.": 2,
-    "Dynamic invocation of '+'.": 2,
     "Dynamic invocation of '[]'.": 19,
+    "Dynamic invocation of '+'.": 2,
     "Dynamic invocation of 'dart.core::_absSubSetSign'.": 3,
     "Dynamic invocation of 'dart.core::_absAndNotSetSign'.": 2,
     "Dynamic invocation of 'dart.core::_absAddSetSign'.": 2,
@@ -221,8 +207,8 @@
   "org-dartlang-sdk:///sdk/lib/_http/crypto.dart": {
     "Dynamic invocation of '+'.": 2,
     "Dynamic invocation of '&'.": 3,
-    "Dynamic invocation of '-'.": 2,
-    "Dynamic invocation of 'unary-'.": 1
+    "Dynamic invocation of 'unary-'.": 1,
+    "Dynamic invocation of '-'.": 2
   },
   "org-dartlang-sdk:///sdk/lib/_http/http_date.dart": {
     "Dynamic access of 'length'.": 3,
@@ -231,15 +217,13 @@
     "Dynamic invocation of '[]'.": 7
   },
   "org-dartlang-sdk:///sdk/lib/_http/http_headers.dart": {
-    "Dynamic invocation of 'toLowerCase'.": 1,
-    "Dynamic access of 'length'.": 1,
-    "Dynamic invocation of 'codeUnitAt'.": 1
+    "Dynamic invocation of 'toLowerCase'.": 1
   },
   "org-dartlang-sdk:///sdk/lib/_http/http_impl.dart": {
     "Dynamic access of 'message'.": 3,
-    "Dynamic invocation of 'split'.": 1,
     "Dynamic invocation of 'trim'.": 1,
     "Dynamic invocation of 'toLowerCase'.": 1,
+    "Dynamic invocation of 'split'.": 1,
     "Dynamic invocation of 'call'.": 1,
     "Dynamic invocation of 'destroy'.": 2,
     "Dynamic invocation of 'setOption'.": 1,
@@ -260,4 +244,4 @@
     "Dynamic access of 'port'.": 1,
     "Dynamic invocation of 'dart._http::_toJSON'.": 1
   }
-}
+}
\ No newline at end of file
diff --git a/tests/compiler/dart2js/analyses/dart2js_allowed.json b/tests/compiler/dart2js/analyses/dart2js_allowed.json
index 5c2d364..cb3e829 100644
--- a/tests/compiler/dart2js/analyses/dart2js_allowed.json
+++ b/tests/compiler/dart2js/analyses/dart2js_allowed.json
@@ -8,8 +8,6 @@
     "Dynamic invocation of 'call'.": 3
   },
   "pkg/compiler/lib/src/util/util.dart": {
-    "Dynamic access of 'a'.": 1,
-    "Dynamic access of 'b'.": 1,
     "Dynamic invocation of 'write'.": 11,
     "Dynamic invocation of 'writeCharCode'.": 1
   },
@@ -45,75 +43,51 @@
     "Dynamic invocation of 'toSet'.": 1,
     "Dynamic invocation of 'toList'.": 1
   },
-  "pkg/compiler/lib/src/diagnostics/messages.dart": {
-    "Dynamic access of 'template'.": 1,
-    "Dynamic invocation of 'toDartText'.": 1
-  },
-  "pkg/compiler/lib/src/diagnostics/source_span.dart": {
-    "Dynamic access of 'uri'.": 1,
-    "Dynamic access of 'begin'.": 1,
-    "Dynamic access of 'end'.": 1
-  },
   "pkg/compiler/lib/src/deferred_load.dart": {
     "Dynamic access of 'memberContext'.": 1,
     "Dynamic access of 'name'.": 1,
     "Dynamic invocation of '[]='.": 1
   },
-  "pkg/compiler/lib/src/elements/entities.dart": {
-    "Dynamic access of 'requiredParameters'.": 1,
-    "Dynamic access of 'positionalParameters'.": 1,
-    "Dynamic access of 'typeParameters'.": 1,
-    "Dynamic access of 'namedParameters'.": 2,
-    "Dynamic access of 'length'.": 1,
-    "Dynamic invocation of '[]'.": 1
-  },
   "pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart": {
-    "Dynamic access of 'allocationNode'.": 2,
-    "Dynamic access of 'elementType'.": 3,
-    "Dynamic access of 'length'.": 2,
     "Dynamic access of 'isNullable'.": 2,
     "Dynamic access of 'isEmptyOrNull'.": 1,
     "Dynamic access of 'isContainer'.": 1,
+    "Dynamic access of 'elementType'.": 2,
+    "Dynamic access of 'length'.": 1,
     "Dynamic access of 'forwardTo'.": 1,
+    "Dynamic access of 'allocationNode'.": 1,
     "Dynamic access of 'allocationElement'.": 1
   },
   "pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart": {
-    "Dynamic access of 'allocationNode'.": 1,
-    "Dynamic access of 'keyType'.": 4,
-    "Dynamic access of 'valueType'.": 4,
-    "Dynamic access of 'masks::_typeMap'.": 5,
-    "Dynamic invocation of 'containsKey'.": 2,
-    "Dynamic invocation of '[]'.": 1,
-    "Dynamic access of 'keys'.": 1,
-    "Dynamic invocation of 'every'.": 1,
     "Dynamic access of 'isNullable'.": 2,
     "Dynamic access of 'isEmptyOrNull'.": 1,
     "Dynamic access of 'isDictionary'.": 1,
     "Dynamic access of 'forwardTo'.": 2,
+    "Dynamic access of 'keyType'.": 3,
+    "Dynamic access of 'valueType'.": 3,
+    "Dynamic access of 'masks::_typeMap'.": 2,
+    "Dynamic invocation of 'containsKey'.": 1,
     "Dynamic invocation of 'nullable'.": 2,
     "Dynamic invocation of 'union'.": 1,
     "Dynamic invocation of 'forEach'.": 1,
     "Dynamic access of 'isMap'.": 1
   },
   "pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart": {
-    "Dynamic access of 'forwardTo'.": 2,
-    "Dynamic invocation of 'nullable'.": 1,
-    "Dynamic invocation of 'nonNullable'.": 1,
     "Dynamic access of 'isNullable'.": 1
   },
   "pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart": {
-    "Dynamic access of 'allocationNode'.": 2,
-    "Dynamic access of 'keyType'.": 5,
-    "Dynamic access of 'valueType'.": 3,
     "Dynamic access of 'isNullable'.": 2,
     "Dynamic access of 'isEmptyOrNull'.": 1,
     "Dynamic access of 'isMap'.": 1,
+    "Dynamic access of 'keyType'.": 4,
+    "Dynamic access of 'valueType'.": 2,
     "Dynamic access of 'forwardTo'.": 2,
     "Dynamic access of 'isDictionary'.": 1,
     "Dynamic invocation of 'union'.": 1,
     "Dynamic access of 'typeMap'.": 1,
     "Dynamic access of 'values'.": 1,
     "Dynamic invocation of 'fold'.": 1,
+    "Dynamic access of 'allocationNode'.": 1,
     "Dynamic access of 'allocationElement'.": 1
   },
   "pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart": {
@@ -127,32 +101,6 @@
     "Dynamic invocation of 'nonNullable'.": 1,
     "Dynamic invocation of 'every'.": 1
   },
-  "pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart": {
-    "Dynamic access of 'value'.": 1
-  },
-  "pkg/compiler/lib/src/io/source_information.dart": {
-    "Dynamic access of 'sourceUri'.": 1,
-    "Dynamic access of 'offset'.": 1,
-    "Dynamic access of 'sourceName'.": 1
-  },
-  "pkg/compiler/lib/src/ssa/nodes.dart": {
-    "Dynamic invocation of 'replaceWith'.": 1
-  },
-  "pkg/compiler/lib/src/universe/resolution_world_builder.dart": {
-    "Dynamic access of 'type'.": 1,
-    "Dynamic access of 'kind'.": 1,
-    "Dynamic access of 'isRedirection'.": 1
-  },
-  "pkg/compiler/lib/src/constants/expressions.dart": {
-    "Dynamic access of 'kind'.": 1
-  },
-  "pkg/compiler/lib/src/helpers/trace.dart": {
-    "Dynamic access of 'index'.": 1,
-    "Dynamic access of 'file'.": 1,
-    "Dynamic access of 'lineNo'.": 1,
-    "Dynamic access of 'columnNo'.": 1,
-    "Dynamic access of 'method'.": 1
-  },
   "pkg/compiler/lib/src/helpers/expensive_map.dart": {
     "Dynamic access of 'length'.": 1,
     "Dynamic access of 'isEmpty'.": 1,
@@ -191,69 +139,33 @@
     "Dynamic invocation of '+'.": 2,
     "Dynamic invocation of '-'.": 1
   },
-  "pkg/compiler/lib/src/js_backend/native_data.dart": {
-    "Dynamic access of 'names'.": 1,
-    "Dynamic access of 'isNonLeaf'.": 1
-  },
-  "pkg/compiler/lib/src/elements/names.dart": {
-    "Dynamic access of 'library'.": 1
-  },
-  "pkg/compiler/lib/src/constants/values.dart": {
-    "Dynamic access of 'element'.": 1,
-    "Dynamic access of 'type'.": 1,
-    "Dynamic access of 'length'.": 1
-  },
-  "pkg/compiler/lib/src/elements/types.dart": {
-    "Dynamic access of 'element'.": 1
-  },
   "pkg/compiler/lib/src/js_backend/constant_system_javascript.dart": {
-    "Dynamic invocation of 'remainder'.": 1,
-    "Dynamic access of 'isString'.": 1,
-    "Dynamic access of 'stringValue'.": 1
+    "Dynamic invocation of 'remainder'.": 1
   },
   "pkg/compiler/lib/src/serialization/binary_sink.dart": {
     "Dynamic access of 'index'.": 1
   },
-  "pkg/compiler/lib/src/serialization/helpers.dart": {
-    "Dynamic access of 'value'.": 1
-  },
-  "pkg/compiler/lib/src/universe/use.dart": {
-    "Dynamic access of 'selector'.": 1,
-    "Dynamic access of 'receiverConstraint'.": 1,
-    "Dynamic access of 'typeArguments'.": 2,
-    "Dynamic access of 'element'.": 1,
-    "Dynamic access of 'kind'.": 2,
-    "Dynamic access of 'type'.": 2,
-    "Dynamic access of 'callStructure'.": 1,
-    "Dynamic access of 'value'.": 1
-  },
   "third_party/pkg/dart2js_info/lib/json_info_codec.dart": {
     "Dynamic invocation of '[]'.": 13,
     "Dynamic invocation of 'forEach'.": 3,
     "Dynamic invocation of 'map'.": 2,
     "Dynamic access of 'length'.": 1
   },
-  "pkg/compiler/lib/src/universe/member_usage.dart": {
-    "Dynamic access of 'entity'.": 1
-  },
   "pkg/compiler/lib/src/util/enumset.dart": {
-    "Dynamic access of 'index'.": 4,
-    "Dynamic access of 'value'.": 1
+    "Dynamic access of 'index'.": 4
   },
   "pkg/compiler/lib/src/native/enqueue.dart": {
     "Dynamic access of 'isDynamic'.": 1
   },
+  "pkg/compiler/lib/src/inferrer/inferrer_engine.dart": {
+    "Dynamic access of 'isVoid'.": 1,
+    "Dynamic access of 'isDynamic'.": 1,
+    "Dynamic access of 'isInterfaceType'.": 1,
+    "Dynamic access of 'element'.": 1
+  },
   "pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart": {
     "Dynamic access of 'name'.": 1
   },
-  "pkg/compiler/lib/src/js_backend/namer_names.dart": {
-    "Dynamic access of 'js_backend.namer::_target'.": 4,
-    "Dynamic access of 'base'.": 1,
-    "Dynamic access of 'prefix'.": 1,
-    "Dynamic access of 'js_backend.namer::_parts'.": 2,
-    "Dynamic access of 'length'.": 1,
-    "Dynamic invocation of '[]'.": 1
-  },
   "pkg/compiler/lib/src/universe/side_effects.dart": {
     "Dynamic access of 'universe.side_effects::_flags'.": 1
   },
@@ -273,56 +185,11 @@
     "Dynamic access of 'treatAsDynamic'.": 1,
     "Dynamic access of 'element'.": 1
   },
-  "pkg/compiler/lib/src/js_model/closure.dart": {
-    "Dynamic access of 'closureClass'.": 1
-  },
-  "pkg/compiler/lib/src/ir/closure.dart": {
-    "Dynamic access of 'kind'.": 1,
-    "Dynamic access of 'member'.": 1,
-    "Dynamic access of 'localFunction'.": 1,
-    "Dynamic access of 'invocation'.": 1,
-    "Dynamic access of 'instantiation'.": 1,
-    "Dynamic access of 'type'.": 1,
-    "Dynamic access of 'context'.": 1
-  },
-  "pkg/compiler/lib/src/closure.dart": {
-    "Dynamic access of 'typeVariable'.": 1
-  },
   "pkg/compiler/lib/src/ssa/validate.dart": {
     "Dynamic invocation of 'isInBasicBlock'.": 2,
     "Dynamic access of 'usedBy'.": 2,
     "Dynamic access of 'inputs'.": 1
   },
-  "pkg/compiler/lib/src/inferrer/inferrer_engine.dart": {
-    "Dynamic access of 'isVoid'.": 1,
-    "Dynamic access of 'isDynamic'.": 1,
-    "Dynamic access of 'isInterfaceType'.": 1,
-    "Dynamic access of 'element'.": 1
-  },
-  "pkg/compiler/lib/src/constants/constructors.dart": {
-    "Dynamic access of 'type'.": 1,
-    "Dynamic access of 'superConstructorInvocation'.": 1,
-    "Dynamic access of 'defaultValues'.": 2,
-    "Dynamic access of 'fieldMap'.": 1,
-    "Dynamic access of 'thisConstructorInvocation'.": 1,
-    "Dynamic access of 'targetConstructorInvocation'.": 1
-  },
-  "pkg/compiler/lib/src/ssa/optimize.dart": {
-    "Dynamic access of 'isEmpty'.": 1,
-    "Dynamic invocation of 'replaceWith'.": 1,
-    "Dynamic access of 'inputs'.": 2,
-    "Dynamic invocation of '[]'.": 2,
-    "Dynamic invocation of 'isInteger'.": 1,
-    "Dynamic invocation of 'isConstantList'.": 1,
-    "Dynamic invocation of 'isConstantString'.": 1,
-    "Dynamic access of 'constant'.": 1,
-    "Dynamic access of 'length'.": 4,
-    "Dynamic access of 'instructionType'.": 2,
-    "Dynamic access of 'isContainer'.": 2,
-    "Dynamic access of 'isNullable'.": 1,
-    "Dynamic invocation of 'containsOnly'.": 2,
-    "Dynamic invocation of 'containsOnlyString'.": 1
-  },
   "pkg/compiler/lib/src/constant_system_dart.dart": {
     "Dynamic invocation of '|'.": 1,
     "Dynamic invocation of '&'.": 1,
@@ -362,16 +229,6 @@
     "Dynamic invocation of '[]'.": 9,
     "Dynamic invocation of 'toStatement'.": 3
   },
-  "pkg/compiler/lib/src/universe/feature.dart": {
-    "Dynamic access of 'type'.": 2,
-    "Dynamic access of 'isConstant'.": 2,
-    "Dynamic access of 'isEmpty'.": 2,
-    "Dynamic access of 'kind'.": 1,
-    "Dynamic access of 'receiverType'.": 1,
-    "Dynamic access of 'argumentType'.": 1,
-    "Dynamic access of 'functionType'.": 1,
-    "Dynamic access of 'typeArguments'.": 1
-  },
   "pkg/compiler/lib/src/inferrer/type_graph_nodes.dart": {
     "Dynamic invocation of 'add'.": 1,
     "Dynamic invocation of 'remove'.": 1,
@@ -380,14 +237,6 @@
     "Dynamic access of 'isEmpty'.": 1,
     "Dynamic invocation of 'satisfies'.": 2
   },
-  "pkg/compiler/lib/src/io/position_information.dart": {
-    "Dynamic access of 'startPosition'.": 1,
-    "Dynamic access of 'innerPosition'.": 1
-  },
-  "pkg/compiler/lib/src/universe/function_set.dart": {
-    "Dynamic access of 'selector'.": 1,
-    "Dynamic access of 'receiver'.": 1
-  },
   "pkg/compiler/lib/src/inferrer/locals_handler.dart": {
     "Dynamic access of 'isEmpty'.": 1,
     "Dynamic access of 'positional'.": 2,
@@ -395,41 +244,28 @@
     "Dynamic access of 'named'.": 2,
     "Dynamic invocation of '[]'.": 2
   },
-  "pkg/compiler/lib/src/inferrer/type_graph_dump.dart": {
-    "Dynamic invocation of 'contains'.": 2
+  "pkg/compiler/lib/src/universe/function_set.dart": {
+    "Dynamic access of 'selector'.": 1,
+    "Dynamic access of 'receiver'.": 1
   },
   "pkg/compiler/lib/src/ssa/variable_allocator.dart": {
-    "Dynamic access of 'checkedInput'.": 1,
     "Dynamic access of 'usedBy'.": 1,
     "Dynamic access of 'isEmpty'.": 1,
     "Dynamic invocation of 'nonCheck'.": 1,
     "Dynamic invocation of 'isCodeMotionInvariant'.": 1
   },
-  "pkg/compiler/lib/src/ssa/interceptor_simplifier.dart": {
-    "Dynamic access of 'interceptedClasses'.": 1
-  },
   "pkg/compiler/lib/src/ssa/value_range_analyzer.dart": {
     "Dynamic access of 'isZero'.": 2,
     "Dynamic invocation of '+'.": 2,
-    "Dynamic access of 'value'.": 7,
-    "Dynamic access of 'isInt'.": 3,
-    "Dynamic access of 'intValue'.": 4,
     "Dynamic invocation of 'unary-'.": 1,
     "Dynamic invocation of 'min'.": 1,
-    "Dynamic invocation of 'max'.": 1,
-    "Dynamic access of 'instruction'.": 1,
-    "Dynamic access of 'left'.": 4,
-    "Dynamic access of 'right'.": 4,
-    "Dynamic access of 'lower'.": 1,
-    "Dynamic access of 'upper'.": 1,
-    "Dynamic invocation of 'operation'.": 1
+    "Dynamic invocation of 'max'.": 1
   },
   "pkg/compiler/lib/src/ssa/value_set.dart": {
     "Dynamic invocation of 'add'.": 2
   },
   "pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart": {
-    "Dynamic access of 'scheme'.": 1,
-    "Dynamic invocation of 'finalizeTokens'.": 1
+    "Dynamic access of 'scheme'.": 1
   },
   "pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart": {
     "Dynamic access of 'keys'.": 1,
@@ -437,11 +273,9 @@
     "Dynamic invocation of '[]='.": 1,
     "Dynamic invocation of 'add'.": 1
   },
-  "pkg/compiler/lib/src/inferrer/node_tracer.dart": {
-    "Dynamic access of 'receiver'.": 2,
-    "Dynamic access of 'selector'.": 6,
-    "Dynamic access of 'name'.": 4,
-    "Dynamic access of 'isIndex'.": 1
+  "pkg/compiler/lib/src/util/features.dart": {
+    "Dynamic invocation of 'sort'.": 1,
+    "Dynamic invocation of 'join'.": 1
   },
   "pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart": {
     "Dynamic access of 'superclass'.": 1,
diff --git a/tests/compiler/dart2js/analyses/static_type_visitor_test.dart b/tests/compiler/dart2js/analyses/static_type_visitor_test.dart
index 00403a7..6d8613f 100644
--- a/tests/compiler/dart2js/analyses/static_type_visitor_test.dart
+++ b/tests/compiler/dart2js/analyses/static_type_visitor_test.dart
@@ -12,6 +12,7 @@
 import 'package:kernel/type_environment.dart' as ir;
 
 import '../helpers/memory_compiler.dart';
+import 'analysis_helper.dart';
 
 const String source = '''
 main() {}
@@ -29,10 +30,8 @@
   });
 }
 
-class Visitor extends StaticTypeVisitor {
-  Visitor(ir.Component component)
-      : super(new ir.TypeEnvironment(
-            new ir.CoreTypes(component), new ir.ClassHierarchy(component)));
+class Visitor extends StaticTypeVisitorBase {
+  Visitor(ir.Component component) : super(component);
 
   ir.DartType getStaticType(ir.Expression node) {
     if (typeEnvironment == null) {
diff --git a/tests/compiler/dart2js/closure/closure_test.dart b/tests/compiler/dart2js/closure/closure_test.dart
index 3cc81e2..705638c 100644
--- a/tests/compiler/dart2js/closure/closure_test.dart
+++ b/tests/compiler/dart2js/closure/closure_test.dart
@@ -13,6 +13,7 @@
 import 'package:compiler/src/js_model/js_world.dart';
 import 'package:compiler/src/js_model/locals.dart';
 import 'package:compiler/src/universe/codegen_world_builder.dart';
+import 'package:compiler/src/util/features.dart';
 import 'package:expect/expect.dart';
 import '../equivalence/id_equivalence.dart';
 import '../equivalence/id_equivalence_helper.dart';
@@ -22,17 +23,16 @@
 main(List<String> args) {
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
-    await checkTests(dataDir, const ClosureDataComputer(),
-        args: args, testOmit: true);
+    await checkTests(dataDir, const ClosureDataComputer(), args: args);
   });
 }
 
-class ClosureDataComputer extends DataComputer {
+class ClosureDataComputer extends DataComputer<String> {
   const ClosureDataComputer();
 
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -54,10 +54,13 @@
             verbose: verbose)
         .run(definition.node);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 /// Kernel IR visitor for computing closure data.
-class ClosureIrChecker extends IrDataExtractor {
+class ClosureIrChecker extends IrDataExtractor<String> {
   final MemberEntity member;
   final ClosureData closureDataLookup;
   final CodegenWorldBuilder codegenWorldBuilder;
@@ -73,7 +76,7 @@
 
   ClosureIrChecker(
       DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap,
+      Map<Id, ActualData<String>> actualMap,
       JsToElementMap elementMap,
       this.member,
       this._localsMap,
diff --git a/tests/compiler/dart2js/closure/data/generic_strong.dart b/tests/compiler/dart2js/closure/data/generic.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/generic_strong.dart
rename to tests/compiler/dart2js/closure/data/generic.dart
diff --git a/tests/compiler/dart2js/closure/data/instantiation_strong.dart b/tests/compiler/dart2js/closure/data/instantiation.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/instantiation_strong.dart
rename to tests/compiler/dart2js/closure/data/instantiation.dart
diff --git a/tests/compiler/dart2js/closure/data/list_literal_trust.dart b/tests/compiler/dart2js/closure/data/list_literal_class.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/list_literal_trust.dart
rename to tests/compiler/dart2js/closure/data/list_literal_class.dart
diff --git a/tests/compiler/dart2js/closure/data/list_literal_strong_trust.dart b/tests/compiler/dart2js/closure/data/list_literal_method.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/list_literal_strong_trust.dart
rename to tests/compiler/dart2js/closure/data/list_literal_method.dart
diff --git a/tests/compiler/dart2js/closure/data/list_literal_untested_trust.dart b/tests/compiler/dart2js/closure/data/list_literal_untested_class.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/list_literal_untested_trust.dart
rename to tests/compiler/dart2js/closure/data/list_literal_untested_class.dart
diff --git a/tests/compiler/dart2js/closure/data/list_literal_untested_strong_trust.dart b/tests/compiler/dart2js/closure/data/list_literal_untested_method.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/list_literal_untested_strong_trust.dart
rename to tests/compiler/dart2js/closure/data/list_literal_untested_method.dart
diff --git a/tests/compiler/dart2js/closure/data/map_literal_trust.dart b/tests/compiler/dart2js/closure/data/map_literal_class.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/map_literal_trust.dart
rename to tests/compiler/dart2js/closure/data/map_literal_class.dart
diff --git a/tests/compiler/dart2js/closure/data/map_literal_strong_trust.dart b/tests/compiler/dart2js/closure/data/map_literal_method.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/map_literal_strong_trust.dart
rename to tests/compiler/dart2js/closure/data/map_literal_method.dart
diff --git a/tests/compiler/dart2js/closure/data/map_literal_untested_trust.dart b/tests/compiler/dart2js/closure/data/map_literal_untested_class.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/map_literal_untested_trust.dart
rename to tests/compiler/dart2js/closure/data/map_literal_untested_class.dart
diff --git a/tests/compiler/dart2js/closure/data/map_literal_untested_strong_trust.dart b/tests/compiler/dart2js/closure/data/map_literal_untested_method.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/map_literal_untested_strong_trust.dart
rename to tests/compiler/dart2js/closure/data/map_literal_untested_method.dart
diff --git a/tests/compiler/dart2js/closure/data/test_type.dart b/tests/compiler/dart2js/closure/data/test_type_class.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/test_type.dart
rename to tests/compiler/dart2js/closure/data/test_type_class.dart
diff --git a/tests/compiler/dart2js/closure/data/test_type_strong.dart b/tests/compiler/dart2js/closure/data/test_type_method.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/test_type_strong.dart
rename to tests/compiler/dart2js/closure/data/test_type_method.dart
diff --git a/tests/compiler/dart2js/closure/data/type_annotations.dart b/tests/compiler/dart2js/closure/data/type_annotations_class.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/type_annotations.dart
rename to tests/compiler/dart2js/closure/data/type_annotations_class.dart
diff --git a/tests/compiler/dart2js/closure/data/type_annotations_strong.dart b/tests/compiler/dart2js/closure/data/type_annotations_method.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/type_annotations_strong.dart
rename to tests/compiler/dart2js/closure/data/type_annotations_method.dart
diff --git a/tests/compiler/dart2js/closure/data/type_arguments.dart b/tests/compiler/dart2js/closure/data/type_arguments_class.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/type_arguments.dart
rename to tests/compiler/dart2js/closure/data/type_arguments_class.dart
diff --git a/tests/compiler/dart2js/closure/data/type_arguments_strong.dart b/tests/compiler/dart2js/closure/data/type_arguments_method.dart
similarity index 100%
rename from tests/compiler/dart2js/closure/data/type_arguments_strong.dart
rename to tests/compiler/dart2js/closure/data/type_arguments_method.dart
diff --git a/tests/compiler/dart2js/codegen/closure_call_of_static_reduction_test.dart b/tests/compiler/dart2js/codegen/closure_call_of_static_reduction_test.dart
new file mode 100644
index 0000000..74d86f6
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/closure_call_of_static_reduction_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
+import '../helpers/compiler_helper.dart';
+
+const String TEST1 = r"""
+aNonInstanceMethod(x) { print(x); }
+const f = aNonInstanceMethod;
+foo() {
+  f(1);
+  // Closure call is reduced to a direct static call.
+  // present: '.aNonInstanceMethod(1)'
+  // absent: '.call$1(1)'
+}
+""";
+
+const String TEST2 = r"""
+aNonInstanceMethod([x]) { print(x); }
+final f = aNonInstanceMethod;
+foo() {
+  f(1);
+  // Closure call is reduced to a direct static call.
+  // present: '.aNonInstanceMethod(1)'
+  // absent: '.call$1(1)'
+}
+""";
+
+const String TEST3 = r"""
+aNonInstanceMethod([x]) { print(x); }
+const f = aNonInstanceMethod;
+foo() {
+  f();
+  // Closure call is not reduced to a direct static call due to not wanting to
+  // add default arguments. This may change.
+  // absent: '.aNonInstanceMethod('
+  // present: '.call$0()'
+}
+""";
+
+// TODO(29147): Add tests like above where 'f' is local. The above tests fail if
+// 'f' is local due to static function references sometimes being represented by
+// HConstant (as above) and other times being referenced as HStatic.
+
+main() {
+  runTests() async {
+    Future check(String test) {
+      return compile(test, entry: 'foo', check: checkerForAbsentPresent(test));
+    }
+
+    await check(TEST1);
+    await check(TEST2);
+    await check(TEST3);
+  }
+
+  asyncTest(() async {
+    print('--test from kernel------------------------------------------------');
+    await runTests();
+  });
+}
diff --git a/tests/compiler/dart2js/codegen/expect_annotations_test.dart b/tests/compiler/dart2js/codegen/expect_annotations_test.dart
index f317c5b..bcff3bd 100644
--- a/tests/compiler/dart2js/codegen/expect_annotations_test.dart
+++ b/tests/compiler/dart2js/codegen/expect_annotations_test.dart
@@ -7,7 +7,7 @@
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
-import 'package:compiler/src/types/types.dart';
+import 'package:compiler/src/inferrer/types.dart';
 import 'package:compiler/src/world.dart' show JClosedWorld;
 import '../inference/type_mask_test_helper.dart';
 import '../helpers/memory_compiler.dart';
@@ -21,28 +21,13 @@
 @AssumeDynamic()
 int methodAssumeDynamic(String arg) => arg.length;
 
-@TrustTypeAnnotations()
-int methodTrustTypeAnnotations(String arg) => arg.length;
-
 @NoInline()
 int methodNoInline(String arg) => arg.length;
 
-@NoInline() @TrustTypeAnnotations()
-int methodNoInlineTrustTypeAnnotations(String arg) => arg.length;
-
-@AssumeDynamic() @TrustTypeAnnotations()
-int methodAssumeDynamicTrustTypeAnnotations(String arg) => arg.length;
-
-
 void main(List<String> args) {
   print(method(args[0]));
   print(methodAssumeDynamic('foo'));
-  print(methodTrustTypeAnnotations(42 as dynamic));
-  print(methodTrustTypeAnnotations("fourtyTwo"));
   print(methodNoInline('bar'));
-  print(methodNoInlineTrustTypeAnnotations(42 as dynamic));
-  print(methodNoInlineTrustTypeAnnotations("fourtyTwo"));
-  print(methodAssumeDynamicTrustTypeAnnotations(null));
 }
 """
 };
@@ -61,8 +46,6 @@
   Expect.isFalse(compiler.compilationFailed, 'Unsuccessful compilation');
   Expect.isNotNull(closedWorld.commonElements.expectNoInlineClass,
       'NoInlineClass is unresolved.');
-  Expect.isNotNull(closedWorld.commonElements.expectTrustTypeAnnotationsClass,
-      'TrustTypeAnnotations is unresolved.');
   Expect.isNotNull(closedWorld.commonElements.expectAssumeDynamicClass,
       'AssumeDynamicClass is unresolved.');
 
@@ -83,7 +66,6 @@
 
   void test(String name,
       {bool expectNoInline: false,
-      bool expectTrustTypeAnnotations: false,
       TypeMask expectedParameterType: null,
       TypeMask expectedReturnType: null,
       bool expectAssumeDynamic: false}) {
@@ -96,41 +78,18 @@
         closedWorld.annotationsData.nonInlinableFunctions.contains(method),
         "Unexpected annotation of @NoInline() on '$method'.");
     Expect.equals(
-        expectTrustTypeAnnotations,
-        closedWorld.annotationsData.trustTypeAnnotationsMembers
-            .contains(method),
-        "Unexpected annotation of @TrustTypeAnnotations() on '$method'.");
-    Expect.equals(
         expectAssumeDynamic,
         closedWorld.annotationsData.assumeDynamicMembers.contains(method),
         "Unexpected annotation of @AssumeDynamic() on '$method'.");
     GlobalTypeInferenceResults results =
         compiler.globalInference.resultsForTesting;
-    if (expectTrustTypeAnnotations && expectedParameterType != null) {
-      testTypeMatch(method, expectedParameterType, expectedReturnType, results);
-    } else if (expectAssumeDynamic) {
+    if (expectAssumeDynamic) {
       testTypeMatch(
           method, closedWorld.abstractValueDomain.dynamicType, null, results);
     }
   }
 
-  TypeMask jsStringType = closedWorld.abstractValueDomain.stringType;
-  TypeMask jsIntType = closedWorld.abstractValueDomain.intType;
-  TypeMask coreStringType =
-      new TypeMask.subtype(closedWorld.commonElements.stringClass, closedWorld);
-
   test('method');
   test('methodAssumeDynamic', expectAssumeDynamic: true);
-  test('methodTrustTypeAnnotations',
-      expectTrustTypeAnnotations: true, expectedParameterType: jsStringType);
   test('methodNoInline', expectNoInline: true);
-  test('methodNoInlineTrustTypeAnnotations',
-      expectNoInline: true,
-      expectTrustTypeAnnotations: true,
-      expectedParameterType: jsStringType,
-      expectedReturnType: jsIntType);
-  test('methodAssumeDynamicTrustTypeAnnotations',
-      expectAssumeDynamic: true,
-      expectTrustTypeAnnotations: true,
-      expectedParameterType: coreStringType);
 }
diff --git a/tests/compiler/dart2js/codegen/model_data/dynamic_get.dart b/tests/compiler/dart2js/codegen/model_data/dynamic_get.dart
new file mode 100644
index 0000000..c014519
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/dynamic_get.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, 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.
+
+main() {
+  method1(new Class1a());
+  method2(new Class2a<int>());
+  method3(new Class3a());
+  method3(new Class3b());
+  method4(new Class4a());
+  method4(new Class4b());
+}
+
+class Class1a {
+  /*element: Class1a.field1:*/
+  int field1;
+}
+
+@pragma('dart2js:noInline')
+method1(dynamic c) {
+  return c.field1;
+}
+
+class Class2a<T> {
+  /*element: Class2a.field2:*/
+  T field2;
+}
+
+@pragma('dart2js:noInline')
+method2(dynamic c) {
+  return c.field2;
+}
+
+class Class3a {
+  /*element: Class3a.field3:get=simple*/
+  int field3;
+}
+
+class Class3b {
+  /*element: Class3b.field3:get=simple*/
+  int field3;
+}
+
+@pragma('dart2js:noInline')
+method3(dynamic c) {
+  return c.field3;
+}
+
+class Class4a {
+  /*element: Class4a.field4:get=simple*/
+  int field4;
+}
+
+class Class4b implements Class4a {
+  /*element: Class4b.field4:get=simple*/
+  int field4;
+}
+
+@pragma('dart2js:noInline')
+method4(Class4a c) {
+  return c.field4;
+}
diff --git a/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart b/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
new file mode 100644
index 0000000..ac96348
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
@@ -0,0 +1,67 @@
+// Copyright (c) 2019, 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.
+
+main() {
+  method1(new Class1a());
+  method2(new Class2a<int>());
+  method3(new Class3a());
+  method3(new Class3b());
+  method4(new Class4a());
+  method4(new Class4b());
+}
+
+class Class1a {
+  /*element: Class1a.field1:*/
+  int field1;
+}
+
+@pragma('dart2js:noInline')
+method1(dynamic c) {
+  c.field1 = 42;
+}
+
+class Class2a<T> {
+  /*strong.element: Class2a.field2:checked*/
+  /*omit.element: Class2a.field2:*/
+  T field2;
+}
+
+@pragma('dart2js:noInline')
+method2(dynamic c) {
+  c.field2 = 42;
+}
+
+class Class3a {
+  /*strong.element: Class3a.field3:checked*/
+  /*omit.element: Class3a.field3:set=simple*/
+  int field3;
+}
+
+class Class3b {
+  /*strong.element: Class3b.field3:checked*/
+  /*omit.element: Class3b.field3:set=simple*/
+  int field3;
+}
+
+@pragma('dart2js:noInline')
+method3(dynamic c) {
+  c.field3 = 42;
+}
+
+class Class4a {
+  /*strong.element: Class4a.field4:checked*/
+  /*omit.element: Class4a.field4:set=simple*/
+  int field4;
+}
+
+class Class4b implements Class4a {
+  /*strong.element: Class4b.field4:checked*/
+  /*omit.element: Class4b.field4:set=simple*/
+  int field4;
+}
+
+@pragma('dart2js:noInline')
+method4(Class4a c) {
+  c.field4 = 42;
+}
diff --git a/tests/compiler/dart2js/codegen/model_test.dart b/tests/compiler/dart2js/codegen/model_test.dart
new file mode 100644
index 0000000..fffbce8
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_test.dart
@@ -0,0 +1,119 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/closure.dart';
+import 'package:compiler/src/common.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/js_emitter/model.dart';
+import 'package:compiler/src/js_model/element_map.dart';
+import 'package:compiler/src/js_model/js_world.dart';
+import 'package:compiler/src/util/features.dart';
+import 'package:kernel/ast.dart' as ir;
+import '../equivalence/id_equivalence.dart';
+import '../equivalence/id_equivalence_helper.dart';
+import '../helpers/program_lookup.dart';
+
+main(List<String> args) {
+  asyncTest(() async {
+    Directory dataDir =
+        new Directory.fromUri(Platform.script.resolve('model_data'));
+    await checkTests(dataDir, const ModelDataComputer(), args: args);
+  });
+}
+
+class ModelDataComputer extends DataComputer<String> {
+  const ModelDataComputer();
+
+  /// Compute type inference data for [member] from kernel based inference.
+  ///
+  /// Fills [actualMap] with the data.
+  @override
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
+      {bool verbose: false}) {
+    JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
+    JsToElementMap elementMap = closedWorld.elementMap;
+    MemberDefinition definition = elementMap.getMemberDefinition(member);
+    new ModelIrComputer(compiler.reporter, actualMap, elementMap, member,
+            compiler, closedWorld.closureDataLookup)
+        .run(definition.node);
+  }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
+}
+
+class Tags {
+  static const String needsCheckedSetter = 'checked';
+  static const String getterFlags = 'get';
+  static const String setterFlags = 'set';
+}
+
+/// AST visitor for computing inference data for a member.
+class ModelIrComputer extends IrDataExtractor<String> {
+  final JsToElementMap _elementMap;
+  final ClosureData _closureDataLookup;
+  final ProgramLookup _programLookup;
+
+  ModelIrComputer(
+      DiagnosticReporter reporter,
+      Map<Id, ActualData<String>> actualMap,
+      this._elementMap,
+      MemberEntity member,
+      Compiler compiler,
+      this._closureDataLookup)
+      : _programLookup = new ProgramLookup(compiler),
+        super(reporter, actualMap);
+
+  String getMemberValue(MemberEntity member) {
+    if (member is FieldEntity) {
+      Field field = _programLookup.getField(member);
+      if (field != null) {
+        Features features = new Features();
+        if (field.needsCheckedSetter) {
+          features.add(Tags.needsCheckedSetter);
+        }
+        void registerFlags(String tag, int flags) {
+          switch (flags) {
+            case 0:
+              break;
+            case 1:
+              features.add(tag, value: 'simple');
+              break;
+            case 2:
+              features.add(tag, value: 'intercepted');
+              break;
+            case 3:
+              features.add(tag, value: 'interceptedThis');
+              break;
+          }
+        }
+
+        registerFlags(Tags.getterFlags, field.getterFlags);
+        registerFlags(Tags.setterFlags, field.setterFlags);
+
+        return features.getText();
+      }
+    }
+    return null;
+  }
+
+  @override
+  String computeMemberValue(Id id, ir.Member node) {
+    return getMemberValue(_elementMap.getMember(node));
+  }
+
+  @override
+  String computeNodeValue(Id id, ir.TreeNode node) {
+    if (node is ir.FunctionExpression || node is ir.FunctionDeclaration) {
+      ClosureRepresentationInfo info = _closureDataLookup.getClosureInfo(node);
+      return getMemberValue(info.callMethod);
+    }
+    return null;
+  }
+}
diff --git a/tests/compiler/dart2js/codegen/trust_type_annotations2_test.dart b/tests/compiler/dart2js/codegen/trust_type_annotations2_test.dart
index 9f2eed7..fc46ac1 100644
--- a/tests/compiler/dart2js/codegen/trust_type_annotations2_test.dart
+++ b/tests/compiler/dart2js/codegen/trust_type_annotations2_test.dart
@@ -4,7 +4,6 @@
 
 import 'package:expect/expect.dart';
 import "package:async_helper/async_helper.dart";
-import 'package:compiler/src/commandline_options.dart';
 import '../helpers/memory_compiler.dart';
 
 const MEMORY_SOURCE_FILES = const {
@@ -26,9 +25,7 @@
 
 main() {
   runTest() async {
-    var options = [Flags.trustTypeAnnotations];
-    var result = await runCompiler(
-        memorySourceFiles: MEMORY_SOURCE_FILES, options: options);
+    var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
     var compiler = result.compiler;
     var element =
         compiler.backendClosedWorldForTesting.elementEnvironment.mainFunction;
diff --git a/tests/compiler/dart2js/codegen/value_range2_test.dart b/tests/compiler/dart2js/codegen/value_range2_test.dart
index 774fd9a..aacfc98 100644
--- a/tests/compiler/dart2js/codegen/value_range2_test.dart
+++ b/tests/compiler/dart2js/codegen/value_range2_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
+import "package:compiler/src/inferrer/abstract_value_domain.dart";
 import "package:compiler/src/ssa/nodes.dart";
 import "package:compiler/src/ssa/value_range_analyzer.dart";
-import "package:compiler/src/types/abstract_value_domain.dart";
 import "package:compiler/src/js_backend/constant_system_javascript.dart";
 
 ValueRangeInfo info = new ValueRangeInfo(JavaScriptConstantSystem.only);
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index b39dc5f4f..3df3488 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -3,6 +3,8 @@
 # BSD-style license that can be found in the LICENSE file.
 
 analyses/analyze_test: Slow, Pass
+analyses/api_dynamic_test: Slow, Pass
+analyses/dart2js_dynamic_test: Slow, Pass
 closure/closure_test: Pass, Slow
 codegen/gvn_dynamic_field_get_test: Fail # Issue 18519
 codegen/list_tracer_length_test: Fail # Issue 33051
diff --git a/tests/compiler/dart2js/deferred_loading/data/instantiation0_strong.dart b/tests/compiler/dart2js/deferred_loading/data/instantiation0.dart
similarity index 100%
rename from tests/compiler/dart2js/deferred_loading/data/instantiation0_strong.dart
rename to tests/compiler/dart2js/deferred_loading/data/instantiation0.dart
diff --git a/tests/compiler/dart2js/deferred_loading/data/instantiation1_strong.dart b/tests/compiler/dart2js/deferred_loading/data/instantiation1.dart
similarity index 100%
rename from tests/compiler/dart2js/deferred_loading/data/instantiation1_strong.dart
rename to tests/compiler/dart2js/deferred_loading/data/instantiation1.dart
diff --git a/tests/compiler/dart2js/deferred_loading/data/instantiation2_strong.dart b/tests/compiler/dart2js/deferred_loading/data/instantiation2.dart
similarity index 100%
rename from tests/compiler/dart2js/deferred_loading/data/instantiation2_strong.dart
rename to tests/compiler/dart2js/deferred_loading/data/instantiation2.dart
diff --git a/tests/compiler/dart2js/deferred_loading/data/instantiation3_strong.dart b/tests/compiler/dart2js/deferred_loading/data/instantiation3.dart
similarity index 100%
rename from tests/compiler/dart2js/deferred_loading/data/instantiation3_strong.dart
rename to tests/compiler/dart2js/deferred_loading/data/instantiation3.dart
diff --git a/tests/compiler/dart2js/deferred_loading/data/instantiation4_strong.dart b/tests/compiler/dart2js/deferred_loading/data/instantiation4.dart
similarity index 100%
rename from tests/compiler/dart2js/deferred_loading/data/instantiation4_strong.dart
rename to tests/compiler/dart2js/deferred_loading/data/instantiation4.dart
diff --git a/tests/compiler/dart2js/deferred_loading/data/instantiation5_strong.dart b/tests/compiler/dart2js/deferred_loading/data/instantiation5.dart
similarity index 100%
rename from tests/compiler/dart2js/deferred_loading/data/instantiation5_strong.dart
rename to tests/compiler/dart2js/deferred_loading/data/instantiation5.dart
diff --git a/tests/compiler/dart2js/deferred_loading/data/static_separate.dart b/tests/compiler/dart2js/deferred_loading/data/static_separate.dart
index ac5b27d..1f5a958 100644
--- a/tests/compiler/dart2js/deferred_loading/data/static_separate.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/static_separate.dart
@@ -15,7 +15,9 @@
 /*element: main:OutputUnit(main, {})*/
 void main() {
   asyncStart();
-  Expect.throws(/*OutputUnit(main, {})*/ () => new lib1.C());
+  Expect.throws(/*OutputUnit(main, {})*/ () {
+    new lib1.C();
+  });
   lib1.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
     lib2.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
       print("HERE");
diff --git a/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart b/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
index 099c508..ea3fd84 100644
--- a/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
+++ b/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
@@ -34,8 +34,7 @@
     await checkTests(dataDir, const OutputUnitDataComputer(),
         libDirectory: new Directory.fromUri(Platform.script.resolve('libs')),
         options: compilerOptions,
-        args: args,
-        testOmit: true, setUpFunction: () {
+        args: args, setUpFunction: () {
       importPrefixes.clear();
     });
   });
@@ -76,7 +75,7 @@
   return 'OutputUnit(${unit.name}, {$sb})';
 }
 
-class OutputUnitDataComputer extends DataComputer {
+class OutputUnitDataComputer extends DataComputer<String> {
   const OutputUnitDataComputer();
 
   /// OutputData for [member] as a kernel based element.
@@ -86,8 +85,8 @@
   /// fill [actualMap] with the data computed about what the resulting OutputUnit
   /// is.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -102,7 +101,7 @@
 
   @override
   void computeClassData(
-      Compiler compiler, ClassEntity cls, Map<Id, ActualData> actualMap,
+      Compiler compiler, ClassEntity cls, Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     OutputUnitData data = closedWorld.outputUnitData;
@@ -119,16 +118,19 @@
         actualMap,
         compiler.reporter);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
-class OutputUnitIrComputer extends IrDataExtractor {
+class OutputUnitIrComputer extends IrDataExtractor<String> {
   final JsToElementMap _elementMap;
   final OutputUnitData _data;
   final ClosureData _closureDataLookup;
 
   OutputUnitIrComputer(
       DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap,
+      Map<Id, ActualData<String>> actualMap,
       this._elementMap,
       MemberEntity member,
       this._data,
@@ -180,10 +182,10 @@
 /// Set [actualMap] to hold a key of [id] with the computed data [value]
 /// corresponding to [object] at location [sourceSpan]. We also perform error
 /// checking to ensure that the same [id] isn't added twice.
-void _registerValue(Id id, String value, Object object, SourceSpan sourceSpan,
-    Map<Id, ActualData> actualMap, CompilerDiagnosticReporter reporter) {
+void _registerValue<T>(Id id, T value, Object object, SourceSpan sourceSpan,
+    Map<Id, ActualData<T>> actualMap, CompilerDiagnosticReporter reporter) {
   if (actualMap.containsKey(id)) {
-    ActualData existingData = actualMap[id];
+    ActualData<T> existingData = actualMap[id];
     reportHere(reporter, sourceSpan,
         "Duplicate id ${id}, value=$value, object=$object");
     reportHere(
@@ -194,6 +196,6 @@
     Expect.fail("Duplicate id $id.");
   }
   if (value != null) {
-    actualMap[id] = new ActualData(new IdValue(id, value), sourceSpan, object);
+    actualMap[id] = new ActualData<T>(id, value, sourceSpan, object);
   }
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib1.dart
index 7587f4e..194e27d 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib1.dart
@@ -4,6 +4,6 @@
 
 import "deferred_overlapping_lib3.dart";
 
-/*class: C1:OutputUnit(1, {lib1})*/
-/*element: C1.:OutputUnit(1, {lib1})*/
+/*class: C1:OutputUnit(2, {lib1})*/
+/*element: C1.:OutputUnit(2, {lib1})*/
 class C1 extends C3 {}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib3.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib3.dart
index 5447ff9..5167cc6 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib3.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_overlapping_lib3.dart
@@ -2,6 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*class: C3:OutputUnit(2, {lib1, lib2})*/
-/*element: C3.:OutputUnit(2, {lib1, lib2})*/
+/*class: C3:OutputUnit(1, {lib1, lib2})*/
+/*element: C3.:OutputUnit(1, {lib1, lib2})*/
 class C3 {}
diff --git a/tests/compiler/dart2js/end_to_end/exit_code_test.dart b/tests/compiler/dart2js/end_to_end/exit_code_test.dart
index 52657e0..35e36e9 100644
--- a/tests/compiler/dart2js/end_to_end/exit_code_test.dart
+++ b/tests/compiler/dart2js/end_to_end/exit_code_test.dart
@@ -20,10 +20,10 @@
 import 'package:compiler/src/diagnostics/spannable.dart';
 import 'package:compiler/src/apiimpl.dart' as apiimpl;
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/inferrer/types.dart';
 import 'package:compiler/src/js_backend/js_backend.dart';
 import 'package:compiler/src/null_compiler_output.dart';
 import 'package:compiler/src/options.dart' show CompilerOptions;
-import 'package:compiler/src/types/types.dart';
 import 'package:compiler/src/universe/world_impact.dart';
 import 'package:compiler/src/world.dart';
 import 'diagnostic_reporter_helper.dart';
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence.dart b/tests/compiler/dart2js/equivalence/id_equivalence.dart
index 73f4299..4d76541 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence.dart
@@ -42,7 +42,9 @@
     return id == other.id && value == other.value;
   }
 
-  String toString() {
+  String toString() => idToString(id, value);
+
+  static String idToString(Id id, String value) {
     switch (id.kind) {
       case IdKind.element:
         ElementId elementId = id;
@@ -207,17 +209,18 @@
   String toString() => '$kind:$value';
 }
 
-class ActualData {
-  final IdValue value;
+class ActualData<T> {
+  final Id id;
+  final T value;
   final SourceSpan sourceSpan;
   final Object object;
 
-  ActualData(this.value, this.sourceSpan, this.object);
+  ActualData(this.id, this.value, this.sourceSpan, this.object);
 
   int get offset {
-    Id id = value.id;
     if (id is NodeId) {
-      return id.value;
+      NodeId nodeId = id;
+      return nodeId.value;
     } else {
       return sourceSpan.begin;
     }
@@ -228,17 +231,16 @@
   }
 
   String toString() =>
-      'ActualData(value=$value,sourceSpan=$sourceSpan,object=$objectText)';
+      'ActualData(id=$id,value=$value,sourceSpan=$sourceSpan,object=$objectText)';
 }
 
-abstract class DataRegistry {
+abstract class DataRegistry<T> {
   DiagnosticReporter get reporter;
-  Map<Id, ActualData> get actualMap;
+  Map<Id, ActualData<T>> get actualMap;
 
-  void registerValue(
-      SourceSpan sourceSpan, Id id, String value, Object object) {
+  void registerValue(SourceSpan sourceSpan, Id id, T value, Object object) {
     if (actualMap.containsKey(id)) {
-      ActualData existingData = actualMap[id];
+      ActualData<T> existingData = actualMap[id];
       reportHere(reporter, sourceSpan,
           "Duplicate id ${id}, value=$value, object=$object");
       reportHere(
@@ -249,8 +251,7 @@
       Expect.fail("Duplicate id $id.");
     }
     if (value != null) {
-      actualMap[id] =
-          new ActualData(new IdValue(id, value), sourceSpan, object);
+      actualMap[id] = new ActualData<T>(id, value, sourceSpan, object);
     }
   }
 }
@@ -270,32 +271,32 @@
 
 /// Abstract IR visitor for computing data corresponding to a node or element,
 /// and record it with a generic [Id]
-abstract class IrDataExtractor extends ir.Visitor with DataRegistry {
+abstract class IrDataExtractor<T> extends ir.Visitor with DataRegistry<T> {
   final DiagnosticReporter reporter;
-  final Map<Id, ActualData> actualMap;
+  final Map<Id, ActualData<T>> actualMap;
 
   /// Implement this to compute the data corresponding to [member].
   ///
   /// If `null` is returned, [member] has no associated data.
-  String computeMemberValue(Id id, ir.Member member);
+  T computeMemberValue(Id id, ir.Member member);
 
   /// Implement this to compute the data corresponding to [node].
   ///
   /// If `null` is returned, [node] has no associated data.
-  String computeNodeValue(Id id, ir.TreeNode node);
+  T computeNodeValue(Id id, ir.TreeNode node);
 
   IrDataExtractor(this.reporter, this.actualMap);
 
   void computeForMember(ir.Member member) {
     ElementId id = computeEntityId(member);
     if (id == null) return;
-    String value = computeMemberValue(id, member);
+    T value = computeMemberValue(id, member);
     registerValue(computeSourceSpan(member), id, value, member);
   }
 
   void computeForNode(ir.TreeNode node, NodeId id) {
     if (id == null) return;
-    String value = computeNodeValue(id, node);
+    T value = computeNodeValue(id, node);
     registerValue(computeSourceSpan(node), id, value, node);
   }
 
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index 5762f41..f9b8ebf 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -20,6 +20,15 @@
 /// `true` if ANSI colors are supported by stdout.
 bool useColors = stdout.supportsAnsiEscapes;
 
+/// Colorize a message [text], if ANSI colors are supported.
+String colorizeMessage(String text) {
+  if (useColors) {
+    return '${colors.yellow(text)}';
+  } else {
+    return text;
+  }
+}
+
 /// Colorize a matching annotation [text], if ANSI colors are supported.
 String colorizeMatch(String text) {
   if (useColors) {
@@ -78,7 +87,7 @@
   return '${colorizeDelimiter(start)}$text${colorizeDelimiter(end)}';
 }
 
-abstract class DataComputer {
+abstract class DataComputer<T> {
   const DataComputer();
 
   /// Called before testing to setup flags needed for data collection.
@@ -92,7 +101,7 @@
   /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
   /// for the data origin.
   void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+      Compiler compiler, MemberEntity member, Map<Id, ActualData<T>> actualMap,
       {bool verbose});
 
   /// Returns `true` if [computeClassData] is supported.
@@ -103,8 +112,10 @@
   /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
   /// for the data origin.
   void computeClassData(
-      Compiler compiler, ClassEntity cls, Map<Id, ActualData> actualMap,
+      Compiler compiler, ClassEntity cls, Map<Id, ActualData<T>> actualMap,
       {bool verbose}) {}
+
+  DataInterpreter<T> get dataValidator;
 }
 
 const String stopAfterTypeInference = 'stopAfterTypeInference';
@@ -130,8 +141,8 @@
 /// [entryPoint] and [memorySourceFiles].
 ///
 /// Actual data is computed using [computeMemberData].
-Future<CompiledData> computeData(Uri entryPoint,
-    Map<String, String> memorySourceFiles, DataComputer dataComputer,
+Future<CompiledData<T>> computeData<T>(Uri entryPoint,
+    Map<String, String> memorySourceFiles, DataComputer<T> dataComputer,
     {List<String> options: const <String>[],
     bool verbose: false,
     bool testFrontend: false,
@@ -159,14 +170,14 @@
   ElementEnvironment elementEnvironment = closedWorld.elementEnvironment;
   CommonElements commonElements = closedWorld.commonElements;
 
-  Map<Uri, Map<Id, ActualData>> actualMaps = <Uri, Map<Id, ActualData>>{};
-  Map<Id, ActualData> globalData = <Id, ActualData>{};
+  Map<Uri, Map<Id, ActualData<T>>> actualMaps = <Uri, Map<Id, ActualData<T>>>{};
+  Map<Id, ActualData<T>> globalData = <Id, ActualData<T>>{};
 
-  Map<Id, ActualData> actualMapFor(Entity entity) {
+  Map<Id, ActualData<T>> actualMapFor(Entity entity) {
     SourceSpan span =
         compiler.backendStrategy.spanFromSpannable(entity, entity);
     Uri uri = span.uri;
-    return actualMaps.putIfAbsent(uri, () => <Id, ActualData>{});
+    return actualMaps.putIfAbsent(uri, () => <Id, ActualData<T>>{});
   }
 
   void processMember(MemberEntity member, Map<Id, ActualData> actualMap) {
@@ -194,7 +205,7 @@
         verbose: verbose);
   }
 
-  void processClass(ClassEntity cls, Map<Id, ActualData> actualMap) {
+  void processClass(ClassEntity cls, Map<Id, ActualData<T>> actualMap) {
     if (skipUnprocessedMembers && !closedWorld.isImplemented(cls)) {
       return;
     }
@@ -281,22 +292,22 @@
     }
   }
 
-  return new CompiledData(
+  return new CompiledData<T>(
       compiler, elementEnvironment, entryPoint, actualMaps, globalData);
 }
 
-class CompiledData {
+class CompiledData<T> {
   final Compiler compiler;
   final ElementEnvironment elementEnvironment;
   final Uri mainUri;
-  final Map<Uri, Map<Id, ActualData>> actualMaps;
-  final Map<Id, ActualData> globalData;
+  final Map<Uri, Map<Id, ActualData<T>>> actualMaps;
+  final Map<Id, ActualData<T>> globalData;
 
   CompiledData(this.compiler, this.elementEnvironment, this.mainUri,
       this.actualMaps, this.globalData);
 
   Map<int, List<String>> computeAnnotations(Uri uri) {
-    Map<Id, ActualData> thisMap = actualMaps[uri];
+    Map<Id, ActualData<T>> thisMap = actualMaps[uri];
     Map<int, List<String>> annotations = <int, List<String>>{};
     thisMap.forEach((Id id, ActualData data1) {
       String value1 = '${data1.value}';
@@ -308,7 +319,7 @@
   }
 
   Map<int, List<String>> computeDiffAnnotationsAgainst(
-      Map<Id, ActualData> thisMap, Map<Id, ActualData> otherMap, Uri uri,
+      Map<Id, ActualData<T>> thisMap, Map<Id, ActualData<T>> otherMap, Uri uri,
       {bool includeMatches: false}) {
     Map<int, List<String>> annotations = <int, List<String>>{};
     thisMap.forEach((Id id, ActualData data1) {
@@ -361,15 +372,15 @@
 }
 
 /// Data collected by [computeData].
-class IdData {
+class IdData<T> {
   final Map<Uri, AnnotatedCode> code;
   final MemberAnnotations<IdValue> expectedMaps;
   final CompiledData _compiledData;
-  final MemberAnnotations<ActualData> _actualMaps = new MemberAnnotations();
+  final MemberAnnotations<ActualData<T>> _actualMaps = new MemberAnnotations();
 
   IdData(this.code, this.expectedMaps, this._compiledData) {
     for (Uri uri in code.keys) {
-      _actualMaps[uri] = _compiledData.actualMaps[uri] ?? <Id, ActualData>{};
+      _actualMaps[uri] = _compiledData.actualMaps[uri] ?? <Id, ActualData<T>>{};
     }
     _actualMaps.globalData.addAll(_compiledData.globalData);
   }
@@ -389,15 +400,20 @@
     return withAnnotations(code[uri].sourceCode, annotations);
   }
 
-  String diffCode(Uri uri) {
+  String diffCode(Uri uri, DataInterpreter<T> dataValidator) {
     Map<int, List<String>> annotations = <int, List<String>>{};
     actualMaps[uri].forEach((Id id, ActualData data) {
-      IdValue value = expectedMaps[uri][id];
-      if (data.value != value || value == null && data.value.value != '') {
-        String expected = value?.toString() ?? '';
+      IdValue expectedValue = expectedMaps[uri][id];
+      T actualValue = data.value;
+      String unexpectedMessage =
+          dataValidator.isAsExpected(actualValue, expectedValue?.value);
+      if (unexpectedMessage != null) {
+        /*if (data.value != expectedValue || expectedValue == null && data.value.value != '') {*/
+        String expected = expectedValue?.toString() ?? '';
+        String actual = dataValidator.getText(actualValue);
         int offset = getOffsetFromId(id, uri);
         String value1 = '${expected}';
-        String value2 = '${data.value}';
+        String value2 = '${actual}';
         annotations
             .putIfAbsent(offset, () => [])
             .add(colorizeDiff(value1, ' | ', value2));
@@ -492,10 +508,9 @@
 /// [setUpFunction] is called once for every test that is executed.
 /// If [forUserSourceFilesOnly] is true, we examine the elements in the main
 /// file and any supporting libraries.
-Future checkTests(Directory dataDir, DataComputer dataComputer,
-    {bool testStrongMode: true,
-    List<String> skipForStrong: const <String>[],
-    bool filterActualData(IdValue idValue, ActualData actualData),
+Future checkTests<T>(Directory dataDir, DataComputer<T> dataComputer,
+    {List<String> skipForStrong: const <String>[],
+    bool filterActualData(IdValue idValue, ActualData<T> actualData),
     List<String> options: const <String>[],
     List<String> args: const <String>[],
     Directory libDirectory: null,
@@ -504,7 +519,7 @@
     Callback setUpFunction,
     int shards: 1,
     int shardIndex: 0,
-    bool testOmit: false,
+    bool testOmit: true,
     void onTest(Uri uri)}) async {
   dataComputer.setup();
 
@@ -530,21 +545,9 @@
     if (shouldContinue) continued = true;
     testCount++;
     List<String> testOptions = options.toList();
-    bool trustTypeAnnotations = false;
     if (name.endsWith('_ea.dart')) {
       testOptions.add(Flags.enableAsserts);
     }
-    if (name.contains('_strong')) {
-      if (!testStrongMode) {
-        // TODO(johnniwinther): Remove irrelevant tests.
-      }
-    }
-    if (name.endsWith('_checked.dart')) {
-      testOptions.add(Flags.enableCheckedMode);
-    }
-    if (name.contains('_trust')) {
-      trustTypeAnnotations = true;
-    }
 
     if (onTest != null) {
       onTest(entity.uri);
@@ -593,29 +596,24 @@
 
     if (setUpFunction != null) setUpFunction();
 
-    if (testStrongMode) {
-      if (skipForStrong.contains(name)) {
-        print('--skipped for kernel (strong mode)----------------------------');
-      } else {
-        print('--from kernel (strong mode)-----------------------------------');
-        List<String> options = new List<String>.from(testOptions);
-        if (trustTypeAnnotations && !testOmit) {
-          options.add(Flags.omitImplicitChecks);
-        }
-        MemberAnnotations<IdValue> annotations = expectedMaps[strongMarker];
-        CompiledData compiledData2 = await computeData(
-            entryPoint, memorySourceFiles, dataComputer,
-            options: options,
-            verbose: verbose,
-            testFrontend: testFrontend,
-            forUserLibrariesOnly: forUserLibrariesOnly,
-            globalIds: annotations.globalData.keys);
-        if (await checkCode(
-            strongName, entity.uri, code, annotations, compiledData2,
-            filterActualData: filterActualData,
-            fatalErrors: !testAfterFailures)) {
-          hasFailures = true;
-        }
+    if (skipForStrong.contains(name)) {
+      print('--skipped for kernel (strong mode)----------------------------');
+    } else {
+      print('--from kernel (strong mode)-----------------------------------');
+      List<String> options = new List<String>.from(testOptions);
+      MemberAnnotations<IdValue> annotations = expectedMaps[strongMarker];
+      CompiledData<T> compiledData2 = await computeData(
+          entryPoint, memorySourceFiles, dataComputer,
+          options: options,
+          verbose: verbose,
+          testFrontend: testFrontend,
+          forUserLibrariesOnly: forUserLibrariesOnly,
+          globalIds: annotations.globalData.keys);
+      if (await checkCode(strongName, entity.uri, code, annotations,
+          compiledData2, dataComputer.dataValidator,
+          filterActualData: filterActualData,
+          fatalErrors: !testAfterFailures)) {
+        hasFailures = true;
       }
     }
     if (testOmit) {
@@ -628,15 +626,15 @@
           Flags.laxRuntimeTypeToString
         ]..addAll(testOptions);
         MemberAnnotations<IdValue> annotations = expectedMaps[omitMarker];
-        CompiledData compiledData2 = await computeData(
+        CompiledData<T> compiledData2 = await computeData(
             entryPoint, memorySourceFiles, dataComputer,
             options: options,
             verbose: verbose,
             testFrontend: testFrontend,
             forUserLibrariesOnly: forUserLibrariesOnly,
             globalIds: annotations.globalData.keys);
-        if (await checkCode(
-            trustName, entity.uri, code, annotations, compiledData2,
+        if (await checkCode(trustName, entity.uri, code, annotations,
+            compiledData2, dataComputer.dataValidator,
             filterActualData: filterActualData,
             fatalErrors: !testAfterFailures)) {
           hasFailures = true;
@@ -650,34 +648,75 @@
 
 final Set<String> userFiles = new Set<String>();
 
+/// Interface used for interpreting annotations.
+abstract class DataInterpreter<T> {
+  /// Returns `null` if [actualData] satisfies the [expectedData] annotation.
+  /// Otherwise, a message is returned contain the information about the
+  /// problems found.
+  String isAsExpected(T actualData, String expectedData);
+
+  /// Returns `true` if [actualData] corresponds to empty data.
+  bool isEmpty(T actualData);
+
+  /// Returns a textual representation of [actualData].
+  String getText(T actualData);
+}
+
+/// Default data interpreter for string data.
+class StringDataInterpreter implements DataInterpreter<String> {
+  const StringDataInterpreter();
+
+  @override
+  String isAsExpected(String actualData, String expectedData) {
+    actualData ??= '';
+    expectedData ??= '';
+    if (actualData != expectedData) {
+      return "Expected $expectedData, found $actualData";
+    }
+    return null;
+  }
+
+  @override
+  bool isEmpty(String actualData) {
+    return actualData == '';
+  }
+
+  @override
+  String getText(String actualData) {
+    return actualData;
+  }
+}
+
 /// Checks [compiledData] against the expected data in [expectedMap] derived
 /// from [code].
-Future<bool> checkCode(
+Future<bool> checkCode<T>(
     String mode,
     Uri mainFileUri,
     Map<Uri, AnnotatedCode> code,
     MemberAnnotations<IdValue> expectedMaps,
     CompiledData compiledData,
-    {bool filterActualData(IdValue expected, ActualData actualData),
+    DataInterpreter<T> dataValidator,
+    {bool filterActualData(IdValue expected, ActualData<T> actualData),
     bool fatalErrors: true}) async {
-  IdData data = new IdData(code, expectedMaps, compiledData);
+  IdData<T> data = new IdData<T>(code, expectedMaps, compiledData);
   bool hasFailure = false;
   Set<Uri> neededDiffs = new Set<Uri>();
 
   void checkActualMap(
-      Map<Id, ActualData> actualMap, Map<Id, IdValue> expectedMap,
+      Map<Id, ActualData<T>> actualMap, Map<Id, IdValue> expectedMap,
       [Uri uri]) {
     bool hasLocalFailure = false;
-    actualMap.forEach((Id id, ActualData actualData) {
-      IdValue actual = actualData.value;
+    actualMap.forEach((Id id, ActualData<T> actualData) {
+      T actual = actualData.value;
+      String actualText = dataValidator.getText(actual);
 
       if (!expectedMap.containsKey(id)) {
-        if (actual.value != '') {
+        if (!dataValidator.isEmpty(actual)) {
           reportError(
               data.compiler.reporter,
               actualData.sourceSpan,
               'EXTRA $mode DATA for ${id.descriptor} = '
-              '${colorizeActual('$actual')} for ${actualData.objectText}. '
+              '${colorizeActual('${IdValue.idToString(id, actualText)}')} for ${actualData.objectText}. '
               'Data was expected for these ids: ${expectedMap.keys}');
           if (filterActualData == null || filterActualData(null, actualData)) {
             hasLocalFailure = true;
@@ -685,14 +724,17 @@
         }
       } else {
         IdValue expected = expectedMap[id];
-        if (actual != expected) {
+        String unexpectedMessage =
+            dataValidator.isAsExpected(actual, expected.value);
+        if (unexpectedMessage != null) {
           reportError(
               data.compiler.reporter,
               actualData.sourceSpan,
-              'UNEXPECTED $mode DATA for ${id.descriptor}: '
-              'Object: ${actualData.objectText}\n '
+              'UNEXPECTED $mode DATA for ${id.descriptor}: \n '
+              'detail  : ${colorizeMessage(unexpectedMessage)}\n '
+              'object  : ${actualData.objectText}\n '
               'expected: ${colorizeExpected('$expected')}\n '
-              'actual  : ${colorizeActual('$actual')}');
+              'actual  : ${colorizeActual('${IdValue.idToString(id, actualText)}')}');
           if (filterActualData == null ||
               filterActualData(expected, actualData)) {
             hasLocalFailure = true;
@@ -740,7 +782,7 @@
   checkMissing(data.expectedMaps.globalData, data.actualMaps.globalData);
   for (Uri uri in neededDiffs) {
     print('--annotations diff [${uri.pathSegments.last}]-------------');
-    print(data.diffCode(uri));
+    print(data.diffCode(uri, dataValidator));
     print('----------------------------------------------------------');
   }
   if (missingIds.isNotEmpty) {
@@ -847,56 +889,3 @@
     }
   });
 }
-
-/// Set of features used in annotations.
-class Features {
-  Map<String, Object> _features = <String, Object>{};
-
-  void add(String key, {var value: ''}) {
-    _features[key] = value.toString();
-  }
-
-  void addElement(String key, [var value]) {
-    List<String> list = _features.putIfAbsent(key, () => <String>[]);
-    if (value != null) {
-      list.add(value.toString());
-    }
-  }
-
-  bool containsKey(String key) {
-    return _features.containsKey(key);
-  }
-
-  void operator []=(String key, String value) {
-    _features[key] = value;
-  }
-
-  String operator [](String key) => _features[key];
-
-  String remove(String key) => _features.remove(key);
-
-  /// Returns a string containing all features in a comma-separated list sorted
-  /// by feature names.
-  String getText() {
-    StringBuffer sb = new StringBuffer();
-    bool needsComma = false;
-    for (String name in _features.keys.toList()..sort()) {
-      dynamic value = _features[name];
-      if (value != null) {
-        if (needsComma) {
-          sb.write(',');
-        }
-        sb.write(name);
-        if (value is List<String>) {
-          value = '[${(value..sort()).join(',')}]';
-        }
-        if (value != '') {
-          sb.write('=');
-          sb.write(value);
-        }
-        needsComma = true;
-      }
-    }
-    return sb.toString();
-  }
-}
diff --git a/tests/compiler/dart2js/equivalence/show_helper.dart b/tests/compiler/dart2js/equivalence/show_helper.dart
index 9dd2342..0e1c800 100644
--- a/tests/compiler/dart2js/equivalence/show_helper.dart
+++ b/tests/compiler/dart2js/equivalence/show_helper.dart
@@ -20,8 +20,6 @@
   argParser.addFlag('strong', negatable: false, defaultsTo: false);
   argParser.addFlag('omit-implicit-checks',
       negatable: false, defaultsTo: false);
-  argParser.addFlag('trust-type-annotations',
-      negatable: false, defaultsTo: false);
   return argParser;
 }
 
@@ -34,7 +32,6 @@
   }
   bool verbose = argResults['verbose'];
   bool omitImplicitChecks = argResults['omit-implicit-checks'];
-  bool trustTypeAnnotations = argResults['trust-type-annotations'];
 
   String file = argResults.rest.first;
   Uri entryPoint = Uri.base.resolve(nativeToUriPath(file));
@@ -48,9 +45,6 @@
   }
 
   options = new List<String>.from(options);
-  if (trustTypeAnnotations) {
-    options.add(Flags.trustTypeAnnotations);
-  }
   if (omitImplicitChecks) {
     options.add(Flags.omitImplicitChecks);
   }
diff --git a/tests/compiler/dart2js/helpers/compiler_helper.dart b/tests/compiler/dart2js/helpers/compiler_helper.dart
index 345fb21..1bbca1b 100644
--- a/tests/compiler/dart2js/helpers/compiler_helper.dart
+++ b/tests/compiler/dart2js/helpers/compiler_helper.dart
@@ -89,7 +89,6 @@
 
 Future<String> compileAll(String code,
     {bool disableInlining: true,
-    bool trustTypeAnnotations: false,
     bool minify: false,
     int expectedErrors,
     int expectedWarnings}) async {
@@ -99,9 +98,6 @@
   if (disableInlining) {
     options.add(Flags.disableInlining);
   }
-  if (trustTypeAnnotations) {
-    options.add(Flags.trustTypeAnnotations);
-  }
   if (minify) {
     options.add(Flags.minify);
   }
diff --git a/tests/compiler/dart2js/helpers/ir_types.dart b/tests/compiler/dart2js/helpers/ir_types.dart
new file mode 100644
index 0000000..280ae12
--- /dev/null
+++ b/tests/compiler/dart2js/helpers/ir_types.dart
@@ -0,0 +1,137 @@
+// Copyright (c) 2019, 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:kernel/ast.dart' as ir;
+import 'package:kernel/class_hierarchy.dart' as ir;
+import 'package:kernel/core_types.dart' as ir;
+import 'package:kernel/type_algebra.dart' as ir;
+import 'package:kernel/type_environment.dart' as ir;
+
+class TypeTextVisitor implements ir.DartTypeVisitor1<void, StringBuffer> {
+  const TypeTextVisitor();
+
+  @override
+  void defaultDartType(ir.DartType node, StringBuffer sb) {
+    throw new UnsupportedError("Unhandled type $node (${node.runtimeType}).");
+  }
+
+  void writeType(ir.DartType type, StringBuffer sb) {
+    type.accept1(this, sb);
+  }
+
+  void _writeTypes(List<ir.DartType> types, StringBuffer sb) {
+    String comma = '';
+    for (ir.DartType type in types) {
+      sb.write(comma);
+      writeType(type, sb);
+      comma = ',';
+    }
+  }
+
+  void _writeTypeArguments(List<ir.DartType> typeArguments, StringBuffer sb) {
+    if (typeArguments.isNotEmpty) {
+      sb.write('<');
+      _writeTypes(typeArguments, sb);
+      sb.write('>');
+    }
+  }
+
+  @override
+  void visitTypedefType(ir.TypedefType node, StringBuffer sb) {
+    sb.write(node.typedefNode.name);
+    _writeTypeArguments(node.typeArguments, sb);
+  }
+
+  @override
+  void visitTypeParameterType(ir.TypeParameterType node, StringBuffer sb) {
+    sb.write(node.parameter.name);
+  }
+
+  @override
+  void visitFunctionType(ir.FunctionType node, StringBuffer sb) {
+    writeType(node.returnType, sb);
+    sb.write(' Function');
+    if (node.typeParameters.isNotEmpty) {
+      sb.write('<');
+      String comma = '';
+      for (ir.TypeParameter typeParameter in node.typeParameters) {
+        sb.write(comma);
+        sb.write(typeParameter.name);
+        if (typeParameter is! ir.DynamicType) {
+          sb.write(' extends ');
+          writeType(typeParameter.bound, sb);
+        }
+        comma = ',';
+      }
+      sb.write('>');
+    }
+    sb.write('(');
+    _writeTypes(
+        node.positionalParameters.take(node.requiredParameterCount), sb);
+    if (node.requiredParameterCount < node.positionalParameters.length) {
+      if (node.requiredParameterCount > 0) {
+        sb.write(',');
+      }
+      _writeTypes(
+          node.positionalParameters.skip(node.requiredParameterCount), sb);
+    }
+    if (node.namedParameters.isNotEmpty) {
+      if (node.positionalParameters.isNotEmpty) {
+        sb.write(',');
+      }
+      String comma = '';
+      for (ir.NamedType namedType in node.namedParameters) {
+        sb.write(comma);
+        sb.write(namedType.name);
+        sb.write(': ');
+        writeType(namedType.type, sb);
+        comma = ',';
+      }
+    }
+    sb.write(')');
+  }
+
+  @override
+  void visitInterfaceType(ir.InterfaceType node, StringBuffer sb) {
+    sb.write(node.classNode.name);
+    _writeTypeArguments(node.typeArguments, sb);
+  }
+
+  @override
+  void visitBottomType(ir.BottomType node, StringBuffer sb) {
+    sb.write('<bottom>');
+  }
+
+  @override
+  void visitVoidType(ir.VoidType node, StringBuffer sb) {
+    sb.write('void');
+  }
+
+  @override
+  void visitDynamicType(ir.DynamicType node, StringBuffer sb) {
+    sb.write('dynamic');
+  }
+
+  @override
+  void visitInvalidType(ir.InvalidType node, StringBuffer sb) {
+    sb.write('<invalid>');
+  }
+}
+
+String typeToText(ir.DartType type) {
+  StringBuffer sb = new StringBuffer();
+  const TypeTextVisitor().writeType(type, sb);
+  return sb.toString();
+}
+
+String typesToText(Iterable<ir.DartType> types) {
+  StringBuffer sb = new StringBuffer();
+  String comma = '';
+  for (ir.DartType type in types) {
+    sb.write(comma);
+    const TypeTextVisitor().writeType(type, sb);
+    comma = ',';
+  }
+  return sb.toString();
+}
diff --git a/tests/compiler/dart2js/helpers/program_lookup.dart b/tests/compiler/dart2js/helpers/program_lookup.dart
index ab3ecff..e01108d 100644
--- a/tests/compiler/dart2js/helpers/program_lookup.dart
+++ b/tests/compiler/dart2js/helpers/program_lookup.dart
@@ -79,13 +79,21 @@
       return getLibraryData(function.library).getMethod(function);
     }
   }
+
+  Field getField(FieldEntity field) {
+    if (field.enclosingClass != null) {
+      return getClassData(field.enclosingClass).getField(field);
+    } else {
+      return getLibraryData(field.library).getField(field);
+    }
+  }
 }
 
 class LibraryData {
   final Library library;
-  Map<ClassEntity, ClassData> _classMap = <ClassEntity, ClassData>{};
-  Map<FunctionEntity, StaticMethod> _methodMap =
-      <FunctionEntity, StaticMethod>{};
+  Map<ClassEntity, ClassData> _classMap = {};
+  Map<FunctionEntity, StaticMethod> _methodMap = {};
+  Map<FieldEntity, Field> _fieldMap = {};
 
   LibraryData(this.library) {
     for (Class cls in library.classes) {
@@ -104,6 +112,18 @@
         _methodMap[method.element] = method;
       }
     }
+    for (Field field in library.staticFieldsForReflection) {
+      ClassEntity enclosingClass = field.element?.enclosingClass;
+      if (enclosingClass != null) {
+        ClassData data =
+            _classMap.putIfAbsent(enclosingClass, () => new ClassData(null));
+        assert(!data._fieldMap.containsKey(field.element));
+        data._fieldMap[field.element] = field;
+      } else if (field.element != null) {
+        assert(!_fieldMap.containsKey(field.element));
+        _fieldMap[field.element] = field;
+      }
+    }
   }
 
   ClassData getClassData(ClassEntity element) {
@@ -113,11 +133,17 @@
   StaticMethod getMethod(FunctionEntity function) {
     return _methodMap[function];
   }
+
+  Field getField(FieldEntity field) {
+    return _fieldMap[field];
+  }
 }
 
 class ClassData {
   final Class cls;
-  Map<FunctionEntity, Method> _methodMap = <FunctionEntity, Method>{};
+  Map<FunctionEntity, Method> _methodMap = {};
+  Map<FieldEntity, Field> _fieldMap = {};
+  Map<FieldEntity, StubMethod> _checkedSetterMap = {};
 
   ClassData(this.cls) {
     if (cls != null) {
@@ -125,12 +151,28 @@
         assert(!_methodMap.containsKey(method.element));
         _methodMap[method.element] = method;
       }
+      for (Field field in cls.fields) {
+        assert(!_fieldMap.containsKey(field.element));
+        _fieldMap[field.element] = field;
+      }
+      for (StubMethod checkedSetter in cls.checkedSetters) {
+        assert(!_checkedSetterMap.containsKey(checkedSetter.element));
+        _checkedSetterMap[checkedSetter.element] = checkedSetter;
+      }
     }
   }
 
   Method getMethod(FunctionEntity function) {
     return _methodMap[function];
   }
+
+  Field getField(FieldEntity field) {
+    return _fieldMap[field];
+  }
+
+  StubMethod getCheckedSetter(FieldEntity field) {
+    return _checkedSetterMap[field];
+  }
 }
 
 void forEachNode(js.Node root,
diff --git a/tests/compiler/dart2js/impact/data/as.dart b/tests/compiler/dart2js/impact/data/as.dart
new file mode 100644
index 0000000..b7b196a
--- /dev/null
+++ b/tests/compiler/dart2js/impact/data/as.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*element: main:static=[explicitAs(1),implicitAs(1),promoted(1)],type=[inst:JSNull]*/
+main() {
+  explicitAs(null);
+  implicitAs(null);
+  promoted(null);
+}
+
+/*element: explicitAs:dynamic=[String.length],type=[inst:JSBool,param:String]*/
+explicitAs(String i) {
+  i.length;
+  // ignore: unnecessary_cast
+  return i as String;
+}
+
+/*element: implicitAs:dynamic=[String.length],type=[inst:JSBool,param:String]*/
+String implicitAs(String i) {
+  dynamic j = i;
+  i.length;
+  j.length;
+  return j;
+}
+
+/*element: promoted:dynamic=[String.length],type=[inst:JSBool,inst:JSNull,is:String]*/
+String promoted(dynamic i) {
+  if (i is! String) return null;
+  i.length;
+  return i;
+}
diff --git a/tests/compiler/dart2js/impact/data/async.dart b/tests/compiler/dart2js/impact/data/async.dart
index 7098aef..24ab850 100644
--- a/tests/compiler/dart2js/impact/data/async.dart
+++ b/tests/compiler/dart2js/impact/data/async.dart
@@ -15,7 +15,7 @@
   testLocalAsyncStar(0),
   testLocalSyncStar(0),
   testSyncStar(0)],
-  type=[inst:JSNull]
+ type=[inst:JSNull]
 */
 main() {
   testSyncStar();
diff --git a/tests/compiler/dart2js/impact/data/expressions.dart b/tests/compiler/dart2js/impact/data/expressions.dart
index e2b5552..c1570bf 100644
--- a/tests/compiler/dart2js/impact/data/expressions.dart
+++ b/tests/compiler/dart2js/impact/data/expressions.dart
@@ -3,10 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*element: main:static=[
-  testAs(0),
-  testAsGeneric(0),
-  testAsGenericDynamic(0),
-  testAsGenericRaw(0),
+  testAs(1),
+  testAsGeneric(1),
+  testAsGenericDynamic(1),
+  testAsGenericRaw(1),
   testConditional(0),
   testIfNotNull(1),
   testIfNotNullSet(1),
@@ -56,10 +56,10 @@
   testIsTypedefGenericRaw();
   testIsTypedefGenericDynamic();
   testIsTypedefDeep();
-  testAs();
-  testAsGeneric();
-  testAsGenericRaw();
-  testAsGenericDynamic();
+  testAs(null);
+  testAsGeneric(null);
+  testAsGenericRaw(null);
+  testAsGenericDynamic(null);
   testThrow();
   testIfNotNull(null);
   testTypedIfNotNull(null);
@@ -269,10 +269,10 @@
 
 /*element: testAs:
  static=[throwRuntimeError],
- type=[as:Class,inst:JSBool,inst:JSNull]
+ type=[as:Class,inst:JSBool]
 */
 // ignore: UNNECESSARY_CAST
-testAs() => null as Class;
+testAs(dynamic o) => o as Class;
 
 /*element: testAsGeneric:static=[checkSubtype,
   getRuntimeTypeArgument,
@@ -288,24 +288,23 @@
   inst:JSExtendableArray<dynamic>,
   inst:JSFixedArray<dynamic>,
   inst:JSMutableArray<dynamic>,
-  inst:JSNull,
   inst:JSUnmodifiableArray<dynamic>]*/
 // ignore: UNNECESSARY_CAST
-testAsGeneric() => null as GenericClass<int, String>;
+testAsGeneric(dynamic o) => o as GenericClass<int, String>;
 
 /*element: testAsGenericRaw:
  static=[throwRuntimeError],
- type=[as:GenericClass<dynamic,dynamic>,inst:JSBool,inst:JSNull]
+ type=[as:GenericClass<dynamic,dynamic>,inst:JSBool]
 */
 // ignore: UNNECESSARY_CAST
-testAsGenericRaw() => null as GenericClass;
+testAsGenericRaw(dynamic o) => o as GenericClass;
 
 /*element: testAsGenericDynamic:
  static=[throwRuntimeError],
- type=[as:GenericClass<dynamic,dynamic>,inst:JSBool,inst:JSNull]
+ type=[as:GenericClass<dynamic,dynamic>,inst:JSBool]
 */
 // ignore: UNNECESSARY_CAST
-testAsGenericDynamic() => null as GenericClass<dynamic, dynamic>;
+testAsGenericDynamic(dynamic o) => o as GenericClass<dynamic, dynamic>;
 
 /*element: testThrow:
  static=[throwExpression,wrapException],
diff --git a/tests/compiler/dart2js/impact/data/extract_type_arguments_strong.dart b/tests/compiler/dart2js/impact/data/extract_type_arguments.dart
similarity index 100%
rename from tests/compiler/dart2js/impact/data/extract_type_arguments_strong.dart
rename to tests/compiler/dart2js/impact/data/extract_type_arguments.dart
diff --git a/tests/compiler/dart2js/impact/data/promotion.dart b/tests/compiler/dart2js/impact/data/promotion.dart
index b076243..a36673d 100644
--- a/tests/compiler/dart2js/impact/data/promotion.dart
+++ b/tests/compiler/dart2js/impact/data/promotion.dart
@@ -47,7 +47,7 @@
   if (cls is SubClass) cls.method();
 }
 
-/*element: negativeDynamic:dynamic=[call(0),method(0)],type=[inst:JSBool,is:SubClass]*/
+/*element: negativeDynamic:dynamic=[SubClass.method(0)],type=[inst:JSBool,is:SubClass]*/
 negativeDynamic(dynamic cls) {
   if (cls is! SubClass) return;
   cls.method();
diff --git a/tests/compiler/dart2js/impact/data/runtime_type_strong.dart b/tests/compiler/dart2js/impact/data/runtime_type.dart
similarity index 100%
rename from tests/compiler/dart2js/impact/data/runtime_type_strong.dart
rename to tests/compiler/dart2js/impact/data/runtime_type.dart
diff --git a/tests/compiler/dart2js/impact/impact_test.dart b/tests/compiler/dart2js/impact/impact_test.dart
index c5a6cb9..d1cc0b1b 100644
--- a/tests/compiler/dart2js/impact/impact_test.dart
+++ b/tests/compiler/dart2js/impact/impact_test.dart
@@ -12,6 +12,7 @@
 import 'package:compiler/src/universe/feature.dart';
 import 'package:compiler/src/universe/use.dart';
 import 'package:compiler/src/universe/world_impact.dart';
+import 'package:compiler/src/util/features.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../equivalence/id_equivalence.dart';
 import '../equivalence/id_equivalence_helper.dart';
@@ -20,7 +21,7 @@
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
     await checkTests(dataDir, const ImpactDataComputer(),
-        args: args, testFrontend: true);
+        args: args, testOmit: false, testFrontend: true);
   });
 }
 
@@ -32,12 +33,12 @@
   static const String runtimeTypeUse = 'runtimeType';
 }
 
-class ImpactDataComputer extends DataComputer {
+class ImpactDataComputer extends DataComputer<String> {
   const ImpactDataComputer();
 
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
     WorldImpact impact = compiler.impactCache[member];
@@ -71,7 +72,10 @@
       }
     }
     Id id = computeEntityId(node);
-    actualMap[id] = new ActualData(new IdValue(id, features.getText()),
-        computeSourceSpanFromTreeNode(node), member);
+    actualMap[id] = new ActualData<String>(
+        id, features.getText(), computeSourceSpanFromTreeNode(node), member);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
diff --git a/tests/compiler/dart2js/inference/callers_test.dart b/tests/compiler/dart2js/inference/callers_test.dart
index cbcd56c..5a6a719 100644
--- a/tests/compiler/dart2js/inference/callers_test.dart
+++ b/tests/compiler/dart2js/inference/callers_test.dart
@@ -25,12 +25,12 @@
   });
 }
 
-class CallersDataComputer extends DataComputer {
+class CallersDataComputer extends DataComputer<String> {
   const CallersDataComputer();
 
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -43,16 +43,23 @@
             closedWorld.closureDataLookup)
         .run(definition.node);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 /// AST visitor for computing side effects data for a member.
-class CallersIrComputer extends IrDataExtractor {
+class CallersIrComputer extends IrDataExtractor<String> {
   final TypeGraphInferrer inferrer;
   final JsToElementMap _elementMap;
   final ClosureData _closureDataLookup;
 
-  CallersIrComputer(DiagnosticReporter reporter, Map<Id, ActualData> actualMap,
-      this._elementMap, this.inferrer, this._closureDataLookup)
+  CallersIrComputer(
+      DiagnosticReporter reporter,
+      Map<Id, ActualData<String>> actualMap,
+      this._elementMap,
+      this.inferrer,
+      this._closureDataLookup)
       : super(reporter, actualMap);
 
   String getMemberValue(MemberEntity member) {
diff --git a/tests/compiler/dart2js/inference/data/await.dart b/tests/compiler/dart2js/inference/data/await.dart
index 0461584..de21806 100644
--- a/tests/compiler/dart2js/inference/data/await.dart
+++ b/tests/compiler/dart2js/inference/data/await.dart
@@ -16,10 +16,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _method1:[null]*/
-_method1(
-
-    /*strong.[null|subclass=JSInt]*/
-    o) {}
+_method1(/*[null|subclass=JSInt]*/ o) {}
 
 /*element: awaitOfFuture:[exact=_Future]*/
 awaitOfFuture() async {
@@ -33,10 +30,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _method2:[null]*/
-_method2(
-
-    /*strong.[null|subclass=JSInt]*/
-    o) {}
+_method2(/*[null|subclass=JSInt]*/ o) {}
 
 /*element: awaitOfInt:[exact=_Future]*/
 awaitOfInt() async {
@@ -50,13 +44,11 @@
 
 /*element: _method3:[null]*/
 _method3(
-    /*Container([exact=JSExtendableArray], element: [exact=JSUInt31], length: 1)*/ o) {}
+    /*Container([exact=JSExtendableArray], element: [exact=JSUInt31], length: 1)*/
+    o) {}
 
 /*element: _method4:[null]*/
-_method4(
-
-    /*strong.[null|subclass=JSInt]*/
-    o) {}
+_method4(/*[null|subclass=JSInt]*/ o) {}
 
 /*element: awaitForOfStream:[exact=_Future]*/
 awaitForOfStream() async {
diff --git a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
index 64aa174..a70e567 100644
--- a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
+++ b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
@@ -6,8 +6,13 @@
 
 import "package:expect/expect.dart";
 
-/*strong.element: f:[subclass=JSInt]*/
-int f(int /*[null|subclass=Object]*/ i) => 2 /*invoke: [exact=JSUInt31]*/ * i;
+/*element: f:[subclass=JSInt]*/
+int f(
+        int
+            /*strong.[null|subclass=Object]*/
+            /*omit.[null|subclass=JSInt]*/
+            i) =>
+    2 /*invoke: [exact=JSUInt31]*/ * i;
 
 typedef int IntToInt(int x);
 
diff --git a/tests/compiler/dart2js/inference/data/closure_tracer.dart b/tests/compiler/dart2js/inference/data/closure_tracer.dart
index f1dfbb1..d419c89 100644
--- a/tests/compiler/dart2js/inference/data/closure_tracer.dart
+++ b/tests/compiler/dart2js/inference/data/closure_tracer.dart
@@ -53,8 +53,8 @@
 testStoredInMapOfList() {
   var res;
   /*[null|subclass=Object]*/ closure(/*[null|subclass=Object]*/ a) => res = a;
-  dynamic a = [closure];
-  dynamic b = {'foo': 1};
+  dynamic a = <dynamic>[closure];
+  dynamic b = <dynamic, dynamic>{'foo': 1};
 
   b
       /*update: Dictionary([subclass=JsLinkedHashMap], key: [exact=JSString], value: Union([exact=JSUInt31], [null|exact=JSExtendableArray]), map: {foo: [exact=JSUInt31], bar: Container([null|exact=JSExtendableArray], element: [null|subclass=Object], length: null)})*/
@@ -73,8 +73,8 @@
 testStoredInListOfList() {
   var res;
   /*[exact=JSUInt31]*/ closure(/*[exact=JSUInt31]*/ a) => res = a;
-  dynamic a = [closure];
-  dynamic b = [0, 1, 2];
+  dynamic a = <dynamic>[closure];
+  dynamic b = <dynamic>[0, 1, 2];
 
   b
       /*update: Container([exact=JSExtendableArray], element: Union([exact=JSExtendableArray], [exact=JSUInt31]), length: 3)*/
@@ -92,8 +92,8 @@
 testStoredInListOfListUsingInsert() {
   var res;
   /*[exact=JSUInt31]*/ closure(/*[exact=JSUInt31]*/ a) => res = a;
-  dynamic a = [closure];
-  dynamic b = [0, 1, 2];
+  dynamic a = <dynamic>[closure];
+  dynamic b = <dynamic>[0, 1, 2];
 
   b
       .
@@ -111,8 +111,8 @@
 testStoredInListOfListUsingAdd() {
   var res;
   /*[exact=JSUInt31]*/ closure(/*[exact=JSUInt31]*/ a) => res = a;
-  dynamic a = [closure];
-  dynamic b = [0, 1, 2];
+  dynamic a = <dynamic>[closure];
+  dynamic b = <dynamic>[0, 1, 2];
 
   b
       .
diff --git a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
index f948462..7f88ade 100644
--- a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
+++ b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
@@ -54,9 +54,12 @@
       i /*invoke: [subclass=JSPositiveInt]*/ != 3;
       i /*invoke: [subclass=JSPositiveInt]*/ ++) {
     methods. /*invoke: [exact=JSExtendableArray]*/ add(
-        /*[null]*/ (int /*[null|subclass=Object]*/ x) {
+        /*[null]*/ (int
+            /*strong.[null|subclass=Object]*/
+            /*omit.[null|subclass=JSInt]*/
+            x) {
       res = x;
-      sum = x /*strong.invoke: [null|subclass=JSInt]*/ + i;
+      sum = x /*invoke: [null|subclass=JSInt]*/ + i;
     });
   }
   methods /*[exact=JSExtendableArray]*/ [0](499);
@@ -64,10 +67,10 @@
   probe2methods(methods);
 }
 
-/*strong.element: probe2res:[null|subclass=JSInt]*/
+/*element: probe2res:[null|subclass=JSInt]*/
 probe2res(
 
-        /*strong.[null|subclass=JSInt]*/
+        /*[null|subclass=JSInt]*/
         x) =>
     x;
 
diff --git a/tests/compiler/dart2js/inference/data/closurization_instance_call.dart b/tests/compiler/dart2js/inference/data/closurization_instance_call.dart
index 43e20c2..f46b1a5 100644
--- a/tests/compiler/dart2js/inference/data/closurization_instance_call.dart
+++ b/tests/compiler/dart2js/inference/data/closurization_instance_call.dart
@@ -26,21 +26,9 @@
   var c = new Class();
   c.call(); // Make `Class.call` live.
   var local = c. /*[exact=Class]*/ method;
-  local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  local. /*invoke: [subclass=Closure]*/ toString();
   local();
-  local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  local. /*invoke: [subclass=Closure]*/ toString();
   local.call();
-  return local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  return local. /*invoke: [subclass=Closure]*/ toString();
 }
diff --git a/tests/compiler/dart2js/inference/data/closurization_local_call.dart b/tests/compiler/dart2js/inference/data/closurization_local_call.dart
index 9de0340..65dd652 100644
--- a/tests/compiler/dart2js/inference/data/closurization_local_call.dart
+++ b/tests/compiler/dart2js/inference/data/closurization_local_call.dart
@@ -23,21 +23,9 @@
   var c = new Class();
   c.call(); // Make `Class.call` live.
   var local = /*[exact=JSUInt31]*/ () => 42;
-  local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  local. /*invoke: [subclass=Closure]*/ toString();
   local();
-  local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  local. /*invoke: [subclass=Closure]*/ toString();
   local.call();
-  return local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  return local. /*invoke: [subclass=Closure]*/ toString();
 }
diff --git a/tests/compiler/dart2js/inference/data/closurization_static.dart b/tests/compiler/dart2js/inference/data/closurization_static.dart
index 5ddf338..0da0999 100644
--- a/tests/compiler/dart2js/inference/data/closurization_static.dart
+++ b/tests/compiler/dart2js/inference/data/closurization_static.dart
@@ -19,11 +19,7 @@
   var local = method;
   local. /*invoke: [subclass=Closure]*/ toString();
   local();
-  local
-      . /*invoke: [subclass=Closure]*/
-      toString();
+  local. /*invoke: [subclass=Closure]*/ toString();
   local.call();
-  return local
-      . /*invoke: [subclass=Closure]*/
-      toString();
+  return local. /*invoke: [subclass=Closure]*/ toString();
 }
diff --git a/tests/compiler/dart2js/inference/data/closurization_static_call.dart b/tests/compiler/dart2js/inference/data/closurization_static_call.dart
index 4f5ac7d..c45fd9f 100644
--- a/tests/compiler/dart2js/inference/data/closurization_static_call.dart
+++ b/tests/compiler/dart2js/inference/data/closurization_static_call.dart
@@ -26,21 +26,9 @@
   var c = new Class();
   c.call(); // Make `Class.call` live.
   var local = method;
-  local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  local. /*invoke: [subclass=Closure]*/ toString();
   local();
-  local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  local. /*invoke: [subclass=Closure]*/ toString();
   local.call();
-  return local
-      .
-
-      /*strong.invoke: [subclass=Closure]*/
-      toString();
+  return local. /*invoke: [subclass=Closure]*/ toString();
 }
diff --git a/tests/compiler/dart2js/inference/data/deferred_load_get.dart b/tests/compiler/dart2js/inference/data/deferred_load_get.dart
index cbe93e3..e27bf13 100644
--- a/tests/compiler/dart2js/inference/data/deferred_load_get.dart
+++ b/tests/compiler/dart2js/inference/data/deferred_load_get.dart
@@ -6,7 +6,7 @@
 
 // Synthetic getter added by kernel.
 
-/*strong.element: __loadLibrary_expect:[null|exact=_Future]*/
+/*element: __loadLibrary_expect:[null|exact=_Future]*/
 
 /*element: main:[null]*/
 main() {
diff --git a/tests/compiler/dart2js/inference/data/field_type.dart b/tests/compiler/dart2js/inference/data/field_type.dart
index ed69820..8e2e9c04 100644
--- a/tests/compiler/dart2js/inference/data/field_type.dart
+++ b/tests/compiler/dart2js/inference/data/field_type.dart
@@ -352,7 +352,7 @@
   // TODO(johnniwinther): Investigate why these include `null`. The ast version
   // didn't.
 
-  /*strong.element: A16.f16:Union([exact=JSString], [null|exact=JSUInt31])*/
+  /*element: A16.f16:Union([exact=JSString], [null|exact=JSUInt31])*/
   var f16;
 
   /*element: A16.:[exact=A16]*/
@@ -608,11 +608,7 @@
             bar24();
 
   /*element: A24.+:Value([exact=JSString], value: "foo")*/
-  operator +(
-
-          /*strong.[empty]*/
-          other) =>
-      'foo';
+  operator +(/*[empty]*/ other) => 'foo';
 
   /*element: A24.bar24:[exact=JSDouble]*/
   bar24() => 42.5;
diff --git a/tests/compiler/dart2js/inference/data/finalized_type_variable.dart b/tests/compiler/dart2js/inference/data/finalized_type_variable.dart
new file mode 100644
index 0000000..197852a
--- /dev/null
+++ b/tests/compiler/dart2js/inference/data/finalized_type_variable.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*element: AppView.:[subclass=AppView]*/
+abstract class AppView<T> {
+  /*element: AppView.ctx:Union([exact=CardComponent2], [null|exact=CardComponent])*/
+  T ctx;
+}
+
+/*element: CardComponent.:[exact=CardComponent]*/
+class CardComponent {
+  /*element: CardComponent.title:Value([null|exact=JSString], value: "foo")*/
+  String title;
+}
+
+/*element: ViewCardComponent.:[exact=ViewCardComponent]*/
+class ViewCardComponent extends AppView<CardComponent> {
+  /*element: ViewCardComponent._title:Value([null|exact=JSString], value: "foo")*/
+  var _title;
+
+  @pragma('dart2js:noInline')
+  set ng_title(String /*Value([exact=JSString], value: "foo")*/ value) {
+    if (/*invoke: [exact=ViewCardComponent]*/ checkBinding(
+        /*[exact=ViewCardComponent]*/ _title,
+        value)) {
+      /*[exact=ViewCardComponent]*/ ctx
+          . /*update: [null|exact=CardComponent]*/ title = value;
+      /*update: [exact=ViewCardComponent]*/ _title = value;
+    }
+  }
+
+  /*element: ViewCardComponent.checkBinding:Value([exact=JSBool], value: true)*/
+  checkBinding(
+          /*Value([null|exact=JSString], value: "foo")*/ a,
+          /*Value([exact=JSString], value: "foo")*/ b) =>
+      true;
+}
+
+/*element: CardComponent2.:[exact=CardComponent2]*/
+class CardComponent2 {
+  /*element: CardComponent2.title:Value([null|exact=JSString], value: "bar")*/
+  String title;
+}
+
+/*element: ViewCardComponent2.:[exact=ViewCardComponent2]*/
+class ViewCardComponent2 extends AppView<CardComponent2> {
+  /*element: ViewCardComponent2._title:Value([null|exact=JSString], value: "bar")*/
+  var _title;
+
+  @pragma('dart2js:noInline')
+  set ng_title(String /*Value([exact=JSString], value: "bar")*/ value) {
+    if (/*invoke: [exact=ViewCardComponent2]*/ checkBinding(
+        /*[exact=ViewCardComponent2]*/ _title,
+        value)) {
+      /*[exact=ViewCardComponent2]*/ ctx
+          . /*update: [null|exact=CardComponent2]*/ title = value;
+      /*update: [exact=ViewCardComponent2]*/ _title = value;
+    }
+  }
+
+  /*element: ViewCardComponent2.checkBinding:Value([exact=JSBool], value: true)*/
+  checkBinding(
+          /*Value([null|exact=JSString], value: "bar")*/ a,
+          /*Value([exact=JSString], value: "bar")*/ b) =>
+      true;
+}
+
+/*element: main:[null]*/
+main() {
+  var c1 = new ViewCardComponent();
+  c1. /*update: [exact=ViewCardComponent]*/ ctx = new CardComponent();
+  c1. /*update: [exact=ViewCardComponent]*/ ng_title = 'foo';
+  var c2 = new ViewCardComponent2();
+  c2. /*update: [exact=ViewCardComponent2]*/ ctx = new CardComponent2();
+  c2. /*update: [exact=ViewCardComponent2]*/ ng_title = 'bar';
+}
diff --git a/tests/compiler/dart2js/inference/data/for_in.dart b/tests/compiler/dart2js/inference/data/for_in.dart
index 9db65d4..231c016 100644
--- a/tests/compiler/dart2js/inference/data/for_in.dart
+++ b/tests/compiler/dart2js/inference/data/for_in.dart
@@ -32,7 +32,7 @@
 // Return element from a for-in loop on a list literal.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*strong.element: forInReturn:[null|subclass=JSInt]*/
+/*element: forInReturn:[null|subclass=JSInt]*/
 forInReturn() {
   /*iterator: Container([exact=JSExtendableArray], element: [exact=JSUInt31], length: 3)*/
   /*current: [exact=ArrayIterator]*/
@@ -78,7 +78,7 @@
   for (var a in [1, 2, 3]) {
     // TODO(johnniwinther): We should know the type of [a] here. Even if [a] has
     // type `dynamic`.
-    a. /*strong.[null|subclass=JSInt]*/ isEven;
+    a. /*[null|subclass=JSInt]*/ isEven;
     a. /*[subclass=JSInt]*/ isEven;
     return a;
   }
diff --git a/tests/compiler/dart2js/inference/data/general.dart b/tests/compiler/dart2js/inference/data/general.dart
index d12fc53..f4e11b1 100644
--- a/tests/compiler/dart2js/inference/data/general.dart
+++ b/tests/compiler/dart2js/inference/data/general.dart
@@ -594,7 +594,7 @@
   // Make [a] a captured variable. This should disable receiver
   // specialization on [a].
   (
-      /*strong.[null|exact=JSString]*/
+      /*[null|exact=JSString]*/
       () => a.toString())();
   a - 42;
   return a;
@@ -674,7 +674,7 @@
   /*element: A.generative:[exact=A]*/
   A.generative();
 
-  /*strong.element: A.==:[exact=JSBool]*/
+  /*element: A.==:[exact=JSBool]*/
   operator ==(/*Union([exact=JSString], [exact=JSUInt31])*/ other) =>
       42 as dynamic;
 
diff --git a/tests/compiler/dart2js/inference/data/js_interop.dart b/tests/compiler/dart2js/inference/data/js_interop.dart
index 34767e1..e55c5dfe 100644
--- a/tests/compiler/dart2js/inference/data/js_interop.dart
+++ b/tests/compiler/dart2js/inference/data/js_interop.dart
@@ -21,7 +21,7 @@
       {/*[exact=JSUInt31]*/ a, /*Value([exact=JSString], value: "")*/ b});
 }
 
-/*strong.element: anonymousClass:[null|subclass=JavaScriptObject]*/
+/*element: anonymousClass:[null|subclass=JavaScriptObject]*/
 anonymousClass() => new Class1(a: 1, b: '');
 
 @JS()
diff --git a/tests/compiler/dart2js/inference/data/local_functions.dart b/tests/compiler/dart2js/inference/data/local_functions.dart
index 478faf2..6570789 100644
--- a/tests/compiler/dart2js/inference/data/local_functions.dart
+++ b/tests/compiler/dart2js/inference/data/local_functions.dart
@@ -31,7 +31,7 @@
 // Invocation of an unnamed local function.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: unnamedLocalFunctionInvoke:[null|subclass=Object]*/
+/*element: unnamedLocalFunctionInvoke:[null|subclass=JSInt]*/
 unnamedLocalFunctionInvoke() {
   var local = /*[exact=JSUInt31]*/ () => 0;
   return local();
@@ -62,6 +62,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: namedLocalFunctionInvokeMissingArgument:[null|subclass=Object]*/
+@pragma('dart2js:disableFinal')
 namedLocalFunctionInvokeMissingArgument() {
   /*[exact=JSUInt31]*/ local(/*[empty]*/ x) => 0;
   dynamic b = local;
@@ -73,6 +74,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: namedLocalFunctionInvokeExtraArgument:[null|subclass=Object]*/
+@pragma('dart2js:disableFinal')
 namedLocalFunctionInvokeExtraArgument() {
   /*[exact=JSUInt31]*/ local() => 0;
   dynamic b = local;
@@ -84,6 +86,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: namedLocalFunctionInvokeExtraNamedArgument:[null|subclass=Object]*/
+@pragma('dart2js:disableFinal')
 namedLocalFunctionInvokeExtraNamedArgument() {
   /*[exact=JSUInt31]*/ local() => 0;
   dynamic b = local;
@@ -118,7 +121,7 @@
 
 /*element: _callCompare:[subclass=Closure]*/
 _callCompare(int /*[subclass=Closure]*/ compare({a, b})) {
-  compare(a: 0, b: 1) == 0;
+  compare(a: 0, b: 1) /*invoke: [null|subclass=JSInt]*/ == 0;
   return compare;
 }
 
diff --git a/tests/compiler/dart2js/inference/data/locals_notrust.dart b/tests/compiler/dart2js/inference/data/locals_notrust.dart
deleted file mode 100644
index fbd9b464..0000000
--- a/tests/compiler/dart2js/inference/data/locals_notrust.dart
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/*element: main:[null]*/
-main() {
-  dontTrustLocals();
-  dontTrustFunctions();
-  inferFromFunctions();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Test that we don't trust the explicit type of a local, unless we are in
-// strong mode.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: _dontTrustLocals:[exact=JSBool]*/ _dontTrustLocals(
-    int Function(int) /*[null|subclass=Closure]*/ f) {
-  int c = f(0);
-  return c /*strong.invoke: [null|subclass=JSInt]*/ == 0;
-}
-
-/*element: dontTrustLocals:[null]*/
-dontTrustLocals() {
-  _dontTrustLocals(/*[exact=JSUInt31]*/ (/*[exact=JSUInt31]*/ o) => o);
-  _dontTrustLocals(null);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Test that we don't infer the type of a dynamic local from the type of the
-// function.
-////////////////////////////////////////////////////////////////////////////////
-
-// TODO(johnniwinther): Trust the function type in strong mode.
-/*element: _dontTrustFunctions:[exact=JSBool]*/
-_dontTrustFunctions(int Function(int) /*[null|subclass=Closure]*/ f) {
-  dynamic c = f(0);
-  c = f(0);
-  return c == 0;
-}
-
-/*element: dontTrustFunctions:[null]*/
-dontTrustFunctions() {
-  _dontTrustFunctions(/*[exact=JSUInt31]*/ (/*[exact=JSUInt31]*/ o) => o);
-  _dontTrustFunctions(null);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Test that we don't infer the type of a 'var' local from the type of the
-// function, unless we are in strong mode.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: _inferFromFunctions:[exact=JSBool]*/
-_inferFromFunctions(int Function(int) /*[null|subclass=Closure]*/ f) {
-  var c = f(0);
-  return c /*strong.invoke: [null|subclass=JSInt]*/ == 0;
-}
-
-/*element: inferFromFunctions:[null]*/
-inferFromFunctions() {
-  _inferFromFunctions(/*[exact=JSUInt31]*/ (/*[exact=JSUInt31]*/ o) => o);
-  _inferFromFunctions(null);
-}
diff --git a/tests/compiler/dart2js/inference/data/locals_trust.dart b/tests/compiler/dart2js/inference/data/locals_trust.dart
index b937783..e57e350 100644
--- a/tests/compiler/dart2js/inference/data/locals_trust.dart
+++ b/tests/compiler/dart2js/inference/data/locals_trust.dart
@@ -5,12 +5,12 @@
 /*element: main:[null]*/
 main() {
   trustLocals();
-  dontTrustFunctions();
+  trustFunctions();
+  inferFromFunctions();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// Test that we trust the explicit type of a local with
-// --trust-type-annotations or --omit-implicit-checks.
+// Test that we trust the explicit type of a local.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _trustLocals:[exact=JSBool]*/ _trustLocals(
@@ -26,20 +26,34 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// Test that we don't trust the type of a function even with
-// --trust-type-annotations or --omit-implicit-checks.
+// Test that we infer the type of a dynamic local from the type of the function.
 ////////////////////////////////////////////////////////////////////////////////
 
-// TODO(johnniwinther): Trust the function type in strong mode.
-/*element: _dontTrustFunctions:[exact=JSBool]*/
-_dontTrustFunctions(int Function(int) /*[null|subclass=Closure]*/ f) {
+/*element: _trustFunctions:[exact=JSBool]*/
+_trustFunctions(int Function(int) /*[null|subclass=Closure]*/ f) {
   dynamic c = f(0);
   c = f(0);
-  return c == 0;
+  return c /*invoke: [null|subclass=JSInt]*/ == 0;
 }
 
-/*element: dontTrustFunctions:[null]*/
-dontTrustFunctions() {
-  _dontTrustFunctions(/*[exact=JSUInt31]*/ (/*[exact=JSUInt31]*/ o) => o);
-  _dontTrustFunctions(null);
+/*element: trustFunctions:[null]*/
+trustFunctions() {
+  _trustFunctions(/*[exact=JSUInt31]*/ (/*[exact=JSUInt31]*/ o) => o);
+  _trustFunctions(null);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Test that we infer the type of a 'var' local from the type of the function.
+////////////////////////////////////////////////////////////////////////////////
+
+/*element: _inferFromFunctions:[exact=JSBool]*/
+_inferFromFunctions(int Function(int) /*[null|subclass=Closure]*/ f) {
+  var c = f(0);
+  return c /*invoke: [null|subclass=JSInt]*/ == 0;
+}
+
+/*element: inferFromFunctions:[null]*/
+inferFromFunctions() {
+  _inferFromFunctions(/*[exact=JSUInt31]*/ (/*[exact=JSUInt31]*/ o) => o);
+  _inferFromFunctions(null);
 }
diff --git a/tests/compiler/dart2js/inference/data/map_tracer_const.dart b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
index b434740..ab50dff 100644
--- a/tests/compiler/dart2js/inference/data/map_tracer_const.dart
+++ b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
@@ -2,8 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*strong.element: closure:[exact=JSUInt31]*/
-int closure(int /*Union([exact=JSDouble], [exact=JSUInt31])*/ x) {
+/*element: closure:[exact=JSUInt31]*/
+int closure(
+    int
+        /*strong.Union([exact=JSDouble], [exact=JSUInt31])*/
+        /*omit.[exact=JSUInt31]*/
+        x) {
   return x;
 }
 
diff --git a/tests/compiler/dart2js/inference/data/map_tracer_keys.dart b/tests/compiler/dart2js/inference/data/map_tracer_keys.dart
index 994c879..af96537 100644
--- a/tests/compiler/dart2js/inference/data/map_tracer_keys.dart
+++ b/tests/compiler/dart2js/inference/data/map_tracer_keys.dart
@@ -87,7 +87,7 @@
 
 /*element: test3:[null]*/
 test3() {
-  dynamic theMap = {'a': 2.2, 'b': 3.3, 'c': 4.4};
+  dynamic theMap = <dynamic, dynamic>{'a': 2.2, 'b': 3.3, 'c': 4.4};
   theMap
       /*update: Dictionary([subclass=JsLinkedHashMap], key: [exact=JSString], value: Union([exact=JSDouble], [null|exact=JSExtendableArray]), map: {a: [exact=JSDouble], b: [exact=JSDouble], c: [exact=JSDouble], d: Container([null|exact=JSExtendableArray], element: [null|subclass=Object], length: null)})*/
       ['d'] = aList3;
diff --git a/tests/compiler/dart2js/inference/data/no_such_method.dart b/tests/compiler/dart2js/inference/data/no_such_method.dart
index 09cce06..16f5358 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method.dart
@@ -13,7 +13,12 @@
 /*element: Class1.:[exact=Class1]*/
 class Class1 {
   /*element: Class1.noSuchMethod:[exact=JSUInt31]*/
-  noSuchMethod(/*[null|subclass=Object]*/ _) => 42;
+  noSuchMethod(
+          Invocation
+              /*strong.[null|subclass=Object]*/
+              /*omit.[null|exact=JSInvocationMirror]*/
+              _) =>
+      42;
 
   /*element: Class1.method:[exact=JSUInt31]*/
   method() {
@@ -32,7 +37,12 @@
 /*element: Class2.:[exact=Class2]*/
 class Class2 {
   /*element: Class2.noSuchMethod:[exact=JSUInt31]*/
-  noSuchMethod(/*[null|subclass=Object]*/ _) => 42;
+  noSuchMethod(
+          Invocation
+              /*strong.[null|subclass=Object]*/
+              /*omit.[null|exact=JSInvocationMirror]*/
+              _) =>
+      42;
 
   /*element: Class2.method:[exact=JSUInt31]*/
   method() {
@@ -51,13 +61,17 @@
 /*element: Class3.:[exact=Class3]*/
 class Class3 {
   /*element: Class3.noSuchMethod:[null|subclass=Object]*/
-  noSuchMethod(Invocation /*[null|subclass=Object]*/ invocation) {
+  noSuchMethod(
+      Invocation
+          /*strong.[null|subclass=Object]*/
+          /*omit.[null|exact=JSInvocationMirror]*/
+          invocation) {
     return invocation
         .
-        /*strong.[null|exact=JSInvocationMirror]*/
+        /*[null|exact=JSInvocationMirror]*/
         positionalArguments
         .
-        /*strong.[exact=JSUnmodifiableArray]*/
+        /*[exact=JSUnmodifiableArray]*/
         first;
   }
 
@@ -83,13 +97,17 @@
   var field;
 
   /*element: Class4.noSuchMethod:[null]*/
-  noSuchMethod(Invocation /*[null|subclass=Object]*/ invocation) {
+  noSuchMethod(
+      Invocation
+          /*strong.[null|subclass=Object]*/
+          /*omit.[null|exact=JSInvocationMirror]*/
+          invocation) {
     this. /*update: [exact=Class4]*/ field = invocation
         .
-        /*strong.[null|exact=JSInvocationMirror]*/
+        /*[null|exact=JSInvocationMirror]*/
         positionalArguments
         .
-        /*strong.[exact=JSUnmodifiableArray]*/
+        /*[exact=JSUnmodifiableArray]*/
         first;
     return null;
   }
diff --git a/tests/compiler/dart2js/inference/data/no_such_method1.dart b/tests/compiler/dart2js/inference/data/no_such_method1.dart
index 146ea37..2e9aadb 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method1.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method1.dart
@@ -5,13 +5,17 @@
 /*element: A.:[exact=A]*/
 class A {
   /*element: A.noSuchMethod:[exact=JSUInt31]*/
-  noSuchMethod(/*[null|subclass=Object]*/ im) => 42;
+  noSuchMethod(
+          /*strong.[null|subclass=Object]*/
+          /*omit.[null|exact=JSInvocationMirror]*/
+          im) =>
+      42;
 }
 
 /*element: B.:[exact=B]*/
 class B extends A {
-  /*strong.element: B.foo:[exact=JSUInt31]*/
-  /*strong.invoke: [subclass=B]*/ foo();
+  /*element: B.foo:[exact=JSUInt31]*/
+  /*invoke: [subclass=B]*/ foo();
 }
 
 /*element: C.:[exact=C]*/
diff --git a/tests/compiler/dart2js/inference/data/no_such_method2.dart b/tests/compiler/dart2js/inference/data/no_such_method2.dart
index 0d0eb8f..2f0741b 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method2.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method2.dart
@@ -5,7 +5,11 @@
 /*element: A.:[subclass=B]*/
 abstract class A {
   /*element: A.noSuchMethod:[exact=JSUInt31]*/
-  noSuchMethod(/*[null|subclass=Object]*/ im) => 42;
+  noSuchMethod(
+          /*strong.[null|subclass=Object]*/
+          /*omit.[null|exact=JSInvocationMirror]*/
+          im) =>
+      42;
 }
 
 /*element: B.:[exact=B]*/
@@ -26,7 +30,11 @@
   foo() => {};
 
   /*element: D.noSuchMethod:[exact=JSDouble]*/
-  noSuchMethod(/*[null|subclass=Object]*/ im) => 42.5;
+  noSuchMethod(
+          /*strong.[null|subclass=Object]*/
+          /*omit.[null|exact=JSInvocationMirror]*/
+          im) =>
+      42.5;
 }
 
 /*element: a:Union([exact=D], [null|subclass=B])*/
diff --git a/tests/compiler/dart2js/inference/data/no_such_method3.dart b/tests/compiler/dart2js/inference/data/no_such_method3.dart
index ed6a5f7..c89382c 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method3.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method3.dart
@@ -7,7 +7,11 @@
   // We may ignore this for type inference because syntactically it always
   // throws an exception.
   /*element: A.noSuchMethod:[empty]*/
-  noSuchMethod(/*[null|subclass=Object]*/ im) => throw 'foo';
+  noSuchMethod(
+          /*strong.[null|subclass=Object]*/
+          /*omit.[null|exact=JSInvocationMirror]*/
+          im) =>
+      throw 'foo';
 }
 
 /*element: B.:[exact=B]*/
diff --git a/tests/compiler/dart2js/inference/data/optimizer_hints.dart b/tests/compiler/dart2js/inference/data/optimizer_hints.dart
index 85c19bd..4346d19 100644
--- a/tests/compiler/dart2js/inference/data/optimizer_hints.dart
+++ b/tests/compiler/dart2js/inference/data/optimizer_hints.dart
@@ -9,9 +9,7 @@
   assumeDynamic();
   notAssumeDynamic();
   trustReturnTypeString();
-  notTrustReturnTypeString();
   trustParameterTypeString();
-  notTrustParameterTypeString();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -44,49 +42,22 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// Use annotation to trust return type annotation.
+// No annotation is needed to trust return type annotation.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: trustReturnTypeString:[null|exact=JSString]*/
-@TrustTypeAnnotations()
 String trustReturnTypeString() {
   return _assumeDynamic(0);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// As above but without the annotation.
-////////////////////////////////////////////////////////////////////////////////
-
-/*strong.element: notTrustReturnTypeString:[null|exact=JSString]*/
-String notTrustReturnTypeString() {
-  return _assumeDynamic(0);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Use annotation to trust parameter type annotation.
+// No annotation is needed to trust parameter type annotation.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _trustParameterTypeString:[null]*/
-@TrustTypeAnnotations()
 _trustParameterTypeString(String /*[null|exact=JSString]*/ o) {}
 
 /*element: trustParameterTypeString:[null]*/
 trustParameterTypeString() {
   _trustParameterTypeString(_assumeDynamic(0));
 }
-
-////////////////////////////////////////////////////////////////////////////////
-// As above but without the annotation.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: _notTrustParameterTypeString:[null]*/
-_notTrustParameterTypeString(
-    String
-
-        /*strong.[null|exact=JSString]*/
-        o) {}
-
-/*element: notTrustParameterTypeString:[null]*/
-notTrustParameterTypeString() {
-  _notTrustParameterTypeString(_assumeDynamic(0));
-}
diff --git a/tests/compiler/dart2js/inference/data/parameters_notrust.dart b/tests/compiler/dart2js/inference/data/parameters_notrust.dart
deleted file mode 100644
index 861df2d..0000000
--- a/tests/compiler/dart2js/inference/data/parameters_notrust.dart
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:expect/expect.dart';
-
-/*element: main:[null]*/
-main() {
-  dontTrustParameters();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Test that we don't trust the explicit type of a parameter, but do trust
-// the local type of parameters in Dart 2.
-//
-// This means that in both Dart 1 and Dart 2 we infer the parameter type to be
-// either an int or a String. In Dart 1 we don't trust the static type of the
-// parameter within the method, so the return type is inferred to be either an
-// int or a String. In Dart 2 we _do_ trust the static type of the parameter
-// within the method and therefore infer the return type to be an int.
-////////////////////////////////////////////////////////////////////////////////
-
-/*strong.element: _dontTrustParameters:[exact=JSUInt31]*/
-_dontTrustParameters(int /*Union([exact=JSString], [exact=JSUInt31])*/ i) {
-  return i;
-}
-
-/*element: dontTrustParameters:[null]*/
-dontTrustParameters() {
-  dynamic f = _dontTrustParameters;
-  Expect.equals(0, f(0));
-  Expect.throws(/*[null|subclass=Object]*/ () => f('foo'));
-}
diff --git a/tests/compiler/dart2js/inference/data/parameters_trust.dart b/tests/compiler/dart2js/inference/data/parameters_trust.dart
index 3b7ff13..fae5e390 100644
--- a/tests/compiler/dart2js/inference/data/parameters_trust.dart
+++ b/tests/compiler/dart2js/inference/data/parameters_trust.dart
@@ -10,12 +10,15 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// Test that we trust the explicit type of a parameter with
-// --trust-type-annotations or --omit-implicit-checks.
+// Test that we trust the explicit type of a parameter.
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _trustParameters:[exact=JSUInt31]*/
-_trustParameters(int /*[exact=JSUInt31]*/ i) {
+_trustParameters(
+    int
+        /*strong.Union([exact=JSString], [exact=JSUInt31])*/
+        /*omit.[exact=JSUInt31]*/
+        i) {
   return i;
 }
 
diff --git a/tests/compiler/dart2js/inference/data/static.dart b/tests/compiler/dart2js/inference/data/static.dart
index c5e1196..04fa7c3 100644
--- a/tests/compiler/dart2js/inference/data/static.dart
+++ b/tests/compiler/dart2js/inference/data/static.dart
@@ -21,9 +21,18 @@
 
   invokeStaticFieldUninitialized();
   invokeStaticFieldTearOff();
+  invokeStaticTypedFieldTearOff();
   invokeStaticFieldTearOffParameters();
 
   invokeStaticGetterTearOff();
+  invokeStaticTypedGetterTearOff();
+
+  invokeStaticGenericMethod1();
+  invokeStaticGenericMethod2();
+  invokeStaticGenericGetter1();
+  invokeStaticGenericGetter2();
+  invokeStaticGenericField1();
+  invokeStaticGenericField2();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -187,6 +196,19 @@
 invokeStaticFieldTearOff() => _field2();
 
 ////////////////////////////////////////////////////////////////////////////////
+/// Call a top level field initialized to a tear-off of a top level method.
+////////////////////////////////////////////////////////////////////////////////
+
+/*element: _method5:Value([exact=JSString], value: "")*/
+String _method5() => '';
+
+/*element: _field5:[null|subclass=Closure]*/
+String Function() _field5 = _method5;
+
+/*element: invokeStaticTypedFieldTearOff:[null|exact=JSString]*/
+invokeStaticTypedFieldTearOff() => _field5();
+
+////////////////////////////////////////////////////////////////////////////////
 /// Call a top level field initialized to a tear-off of a top level method
 /// taking one argument.
 ////////////////////////////////////////////////////////////////////////////////
@@ -212,3 +234,61 @@
 
 /*element: invokeStaticGetterTearOff:[null|subclass=Object]*/
 invokeStaticGetterTearOff() => _getter1();
+
+////////////////////////////////////////////////////////////////////////////////
+/// Call a typed top level getter returning a tear-off of a top level method.
+////////////////////////////////////////////////////////////////////////////////
+
+/*element: _method6:[exact=JSUInt31]*/
+int _method6() => 0;
+
+/*element: _field7:[null|subclass=Closure]*/
+int Function() _field7 = _method6;
+
+/*element: _getter3:[null|subclass=Closure]*/
+int Function() get _getter3 => _field7;
+
+/*element: invokeStaticTypedGetterTearOff:[null|subclass=JSInt]*/
+invokeStaticTypedGetterTearOff() => _getter3();
+
+////////////////////////////////////////////////////////////////////////////////
+/// Calls to a generic static method whose return type depend upon the type
+/// arguments.
+////////////////////////////////////////////////////////////////////////////////
+
+/*element: _method4:Union([exact=JSString], [exact=JSUInt31])*/
+T _method4<T>(T /*Union([exact=JSString], [exact=JSUInt31])*/ t) => t;
+
+/*element: invokeStaticGenericMethod1:[exact=JSUInt31]*/
+invokeStaticGenericMethod1() => _method4(0);
+
+/*element: invokeStaticGenericMethod2:[exact=JSString]*/
+invokeStaticGenericMethod2() => _method4('');
+
+////////////////////////////////////////////////////////////////////////////////
+/// Calls to a generic static method whose return type depend upon the type
+/// arguments.
+////////////////////////////////////////////////////////////////////////////////
+
+/*element: _getter2:[subclass=Closure]*/
+T Function<T>(T) get _getter2 => _method4;
+
+/*element: invokeStaticGenericGetter1:[null|subclass=JSInt]*/
+invokeStaticGenericGetter1() => _getter2(0);
+
+/*element: invokeStaticGenericGetter2:[null|exact=JSString]*/
+invokeStaticGenericGetter2() => _getter2('');
+
+////////////////////////////////////////////////////////////////////////////////
+/// Calls to a generic static method whose return type depend upon the type
+/// arguments.
+////////////////////////////////////////////////////////////////////////////////
+
+/*element: _field4:[null|subclass=Closure]*/
+T Function<T>(T) _field4 = _method4;
+
+/*element: invokeStaticGenericField1:[null|subclass=JSInt]*/
+invokeStaticGenericField1() => _field4(0);
+
+/*element: invokeStaticGenericField2:[null|exact=JSString]*/
+invokeStaticGenericField2() => _field4('');
diff --git a/tests/compiler/dart2js/inference/data/static_type.dart b/tests/compiler/dart2js/inference/data/static_type.dart
new file mode 100644
index 0000000..b25a3a8
--- /dev/null
+++ b/tests/compiler/dart2js/inference/data/static_type.dart
@@ -0,0 +1,343 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C<T> {
+  /*element: C.field:Union([exact=JSString], [exact=JSUInt31])*/
+  final T field;
+
+  /*element: C.fixedFunctionField:[subclass=Closure]*/
+  int Function() fixedFunctionField = /*[exact=JSUInt31]*/ () => 0;
+
+  /*element: C.functionField:[null|subclass=Closure]*/
+  T Function() functionField;
+
+  /*element: C.genericFunctionField:[null|subclass=Closure]*/
+  S Function<S>(S) genericFunctionField;
+
+  /*element: C.:[exact=C]*/
+  C(this. /*Union([exact=JSString], [exact=JSUInt31])*/ field) {
+    /*update: [subclass=C]*/ functionField =
+        /*Union([exact=JSString], [exact=JSUInt31])*/
+        () => /*[subclass=C]*/ field;
+    /*Union([exact=JSString], [exact=JSUInt31])*/
+    S local<S>(S /*Union([exact=JSString], [exact=JSUInt31])*/ s) => s;
+    /*update: [subclass=C]*/ genericFunctionField = local;
+  }
+
+  /*element: C.method:Union([exact=JSString], [exact=JSUInt31])*/
+  T method() => /*[subclass=C]*/ field;
+
+  /*element: C.+:Union([exact=JSString], [exact=JSUInt31])*/
+  T operator +(T /*Union([exact=JSString], [exact=JSUInt31])*/ t) =>
+      /*[subclass=C]*/ field;
+
+  /*element: C.getter:Union([exact=JSString], [exact=JSUInt31])*/
+  T get getter => /*[subclass=C]*/ field;
+
+  /*element: C.fixedFunctionGetter:[subclass=Closure]*/
+  int Function() get fixedFunctionGetter => /*[exact=JSUInt31]*/ () => 0;
+
+  /*element: C.functionGetter:[null|subclass=Closure]*/
+  T Function() get functionGetter => /*[subclass=C]*/ functionField;
+
+  /*element: C.genericFunctionGetter:[null|subclass=Closure]*/
+  S Function<S>(S) get genericFunctionGetter =>
+      /*[subclass=C]*/ genericFunctionField;
+
+  /*element: C.genericMethod:Union([exact=JSString], [exact=JSUInt31])*/
+  S genericMethod<S>(S /*Union([exact=JSString], [exact=JSUInt31])*/ s) => s;
+}
+
+class D1 extends C<int> {
+  /*element: D1.:[exact=D1]*/
+  D1(int /*[exact=JSUInt31]*/ field) : super(field);
+
+  /*element: D1.superFieldAccess:[exact=JSUInt31]*/
+  superFieldAccess() => super.field;
+
+  /*element: D1.superFieldInvoke:[null|subclass=JSInt]*/
+  superFieldInvoke() => super.functionField();
+
+  /*element: D1.superFixedFieldInvoke:[null|subclass=JSInt]*/
+  superFixedFieldInvoke() => super.fixedFunctionField();
+
+  /*element: D1.superMethodInvoke:[exact=JSUInt31]*/
+  superMethodInvoke() => super.method();
+
+  /*element: D1.superOperatorInvoke:[exact=JSUInt31]*/
+  superOperatorInvoke() => super + 0;
+
+  /*element: D1.superGetterAccess:[exact=JSUInt31]*/
+  superGetterAccess() => super.getter;
+
+  /*element: D1.superGetterInvoke:[null|subclass=JSInt]*/
+  superGetterInvoke() => super.functionGetter();
+
+  /*element: D1.superFixedGetterInvoke:[null|subclass=JSInt]*/
+  superFixedGetterInvoke() => super.fixedFunctionGetter();
+
+  /*element: D1.superGenericFieldInvoke1:[null|exact=JSString]*/
+  superGenericFieldInvoke1() => super.genericFunctionField('');
+
+  /*element: D1.superGenericFieldInvoke2:[null|subclass=JSInt]*/
+  superGenericFieldInvoke2() => super.genericFunctionField(0);
+
+  /*element: D1.superGenericMethodInvoke1:[exact=JSString]*/
+  superGenericMethodInvoke1() => super.genericMethod('');
+
+  /*element: D1.superGenericMethodInvoke2:[exact=JSUInt31]*/
+  superGenericMethodInvoke2() => super.genericMethod(0);
+
+  /*element: D1.superGenericGetterInvoke1:[null|exact=JSString]*/
+  superGenericGetterInvoke1() => super.genericFunctionGetter('');
+
+  /*element: D1.superGenericGetterInvoke2:[null|subclass=JSInt]*/
+  superGenericGetterInvoke2() => super.genericFunctionGetter(0);
+}
+
+class D2 extends C<String> {
+  /*element: D2.:[exact=D2]*/
+  D2(String /*Value([exact=JSString], value: "")*/ field) : super(field);
+
+  /*element: D2.superFieldAccess:[exact=JSString]*/
+  superFieldAccess() => super.field;
+
+  /*element: D2.superFieldInvoke:[null|exact=JSString]*/
+  superFieldInvoke() => super.functionField();
+
+  /*element: D2.superFixedFieldInvoke:[null|subclass=JSInt]*/
+  superFixedFieldInvoke() => super.fixedFunctionField();
+
+  /*element: D2.superMethodInvoke:[exact=JSString]*/
+  superMethodInvoke() => super.method();
+
+  /*element: D2.superOperatorInvoke:[exact=JSString]*/
+  superOperatorInvoke() => super + '';
+
+  /*element: D2.superGetterAccess:[exact=JSString]*/
+  superGetterAccess() => super.getter;
+
+  /*element: D2.superGetterInvoke:[null|exact=JSString]*/
+  superGetterInvoke() => super.functionGetter();
+
+  /*element: D2.superFixedGetterInvoke:[null|subclass=JSInt]*/
+  superFixedGetterInvoke() => super.fixedFunctionGetter();
+
+  /*element: D2.superGenericFieldInvoke1:[null|exact=JSString]*/
+  superGenericFieldInvoke1() => super.genericFunctionField('');
+
+  /*element: D2.superGenericFieldInvoke2:[null|subclass=JSInt]*/
+  superGenericFieldInvoke2() => super.genericFunctionField(0);
+
+  /*element: D2.superGenericMethodInvoke1:[exact=JSString]*/
+  superGenericMethodInvoke1() => super.genericMethod('');
+
+  /*element: D2.superGenericMethodInvoke2:[exact=JSUInt31]*/
+  superGenericMethodInvoke2() => super.genericMethod(0);
+
+  /*element: D2.superGenericGetterInvoke1:[null|exact=JSString]*/
+  superGenericGetterInvoke1() => super.genericFunctionGetter('');
+
+  /*element: D2.superGenericGetterInvoke2:[null|subclass=JSInt]*/
+  superGenericGetterInvoke2() => super.genericFunctionGetter(0);
+}
+
+/*element: main:[null]*/
+main() {
+  closureInvoke();
+  localFunctionInvoke();
+  genericLocalFunctionInvoke();
+  fieldAccess1();
+  fieldAccess2();
+  fixedFieldInvoke();
+  fieldInvoke1();
+  fieldInvoke2();
+  methodInvoke1();
+  methodInvoke2();
+  operatorInvoke1();
+  operatorInvoke2();
+  fixedGetterInvoke();
+  getterAccess1();
+  getterAccess2();
+  getterInvoke1();
+  getterInvoke2();
+  genericFieldInvoke1();
+  genericFieldInvoke2();
+  genericMethodInvoke1();
+  genericMethodInvoke2();
+  genericGetterInvoke1();
+  genericGetterInvoke2();
+  new D1(0)
+    .. /*invoke: [exact=D1]*/ superFieldAccess()
+    .. /*invoke: [exact=D1]*/ superFieldInvoke()
+    .. /*invoke: [exact=D1]*/ superFixedFieldInvoke()
+    .. /*invoke: [exact=D1]*/ superMethodInvoke()
+    .. /*invoke: [exact=D1]*/ superOperatorInvoke()
+    .. /*invoke: [exact=D1]*/ superGetterAccess()
+    .. /*invoke: [exact=D1]*/ superGetterInvoke()
+    .. /*invoke: [exact=D1]*/ superFixedGetterInvoke()
+    .. /*invoke: [exact=D1]*/ superGenericFieldInvoke1()
+    .. /*invoke: [exact=D1]*/ superGenericFieldInvoke2()
+    .. /*invoke: [exact=D1]*/ superGenericMethodInvoke1()
+    .. /*invoke: [exact=D1]*/ superGenericMethodInvoke2()
+    .. /*invoke: [exact=D1]*/ superGenericGetterInvoke1()
+    .. /*invoke: [exact=D1]*/ superGenericGetterInvoke2();
+  new D2('')
+    .. /*invoke: [exact=D2]*/ superFieldAccess()
+    .. /*invoke: [exact=D2]*/ superFieldInvoke()
+    .. /*invoke: [exact=D2]*/ superFixedFieldInvoke()
+    .. /*invoke: [exact=D2]*/ superMethodInvoke()
+    .. /*invoke: [exact=D2]*/ superOperatorInvoke()
+    .. /*invoke: [exact=D2]*/ superGetterAccess()
+    .. /*invoke: [exact=D2]*/ superGetterInvoke()
+    .. /*invoke: [exact=D2]*/ superFixedGetterInvoke()
+    .. /*invoke: [exact=D2]*/ superGenericFieldInvoke1()
+    .. /*invoke: [exact=D2]*/ superGenericFieldInvoke2()
+    .. /*invoke: [exact=D2]*/ superGenericMethodInvoke1()
+    .. /*invoke: [exact=D2]*/ superGenericMethodInvoke2()
+    .. /*invoke: [exact=D2]*/ superGenericGetterInvoke1()
+    .. /*invoke: [exact=D2]*/ superGenericGetterInvoke2();
+}
+
+/*element: closureInvoke:[null|subclass=JSInt]*/
+closureInvoke() {
+  int Function() f = /*[exact=JSUInt31]*/ () => 0;
+  return f();
+}
+
+/*element: localFunctionInvoke:[exact=JSUInt31]*/
+localFunctionInvoke() {
+  /*[exact=JSUInt31]*/
+  int local() => 0;
+  return local();
+}
+
+/*element: genericLocalFunctionInvoke:[null]*/
+genericLocalFunctionInvoke() {
+  /*Union([exact=JSString], [exact=JSUInt31])*/
+  S local<S>(S /*Union([exact=JSString], [exact=JSUInt31])*/ s) => s;
+
+  local(0). /*invoke: [exact=JSUInt31]*/ toString();
+  local(''). /*invoke: [exact=JSString]*/ toString();
+}
+
+/*element: fieldAccess1:[exact=JSUInt31]*/
+fieldAccess1() {
+  C<int> c = new C<int>(0);
+  return c. /*[exact=C]*/ field;
+}
+
+/*element: fieldAccess2:[exact=JSString]*/
+fieldAccess2() {
+  C<String> c = new C<String>('');
+  return c. /*[exact=C]*/ field;
+}
+
+/*element: fixedFieldInvoke:[null|subclass=JSInt]*/
+fixedFieldInvoke() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ fixedFunctionField();
+}
+
+/*element: fieldInvoke1:[null|subclass=JSInt]*/
+fieldInvoke1() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ functionField();
+}
+
+/*element: fieldInvoke2:[null|exact=JSString]*/
+fieldInvoke2() {
+  C<String> c = new C<String>('');
+  return c. /*invoke: [exact=C]*/ functionField();
+}
+
+/*element: methodInvoke1:[exact=JSUInt31]*/
+methodInvoke1() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ method();
+}
+
+/*element: methodInvoke2:[exact=JSString]*/
+methodInvoke2() {
+  C<String> c = new C<String>('');
+  return c. /*invoke: [exact=C]*/ method();
+}
+
+/*element: operatorInvoke1:[exact=JSUInt31]*/
+operatorInvoke1() {
+  C<int> c = new C<int>(0);
+  return c /*invoke: [exact=C]*/ + 0;
+}
+
+/*element: operatorInvoke2:[exact=JSString]*/
+operatorInvoke2() {
+  C<String> c = new C<String>('');
+  return c /*invoke: [exact=C]*/ + '';
+}
+
+/*element: fixedGetterInvoke:[null|subclass=JSInt]*/
+fixedGetterInvoke() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ fixedFunctionGetter();
+}
+
+/*element: getterAccess1:[exact=JSUInt31]*/
+getterAccess1() {
+  C<int> c = new C<int>(0);
+  return c. /*[exact=C]*/ getter;
+}
+
+/*element: getterAccess2:[exact=JSString]*/
+getterAccess2() {
+  C<String> c = new C<String>('');
+  return c. /*[exact=C]*/ getter;
+}
+
+/*element: getterInvoke1:[null|subclass=JSInt]*/
+getterInvoke1() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ functionGetter();
+}
+
+/*element: getterInvoke2:[null|exact=JSString]*/
+getterInvoke2() {
+  C<String> c = new C<String>('');
+  return c. /*invoke: [exact=C]*/ functionGetter();
+}
+
+/*element: genericFieldInvoke1:[null|exact=JSString]*/
+genericFieldInvoke1() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ genericFunctionField('');
+}
+
+/*element: genericFieldInvoke2:[null|subclass=JSInt]*/
+genericFieldInvoke2() {
+  C<String> c = new C<String>('');
+  return c. /*invoke: [exact=C]*/ genericFunctionField(0);
+}
+
+/*element: genericMethodInvoke1:[exact=JSString]*/
+genericMethodInvoke1() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ genericMethod('');
+}
+
+/*element: genericMethodInvoke2:[exact=JSUInt31]*/
+genericMethodInvoke2() {
+  C<String> c = new C<String>('');
+  return c. /*invoke: [exact=C]*/ genericMethod(0);
+}
+
+/*element: genericGetterInvoke1:[null|exact=JSString]*/
+genericGetterInvoke1() {
+  C<int> c = new C<int>(0);
+  return c. /*invoke: [exact=C]*/ genericFunctionGetter('');
+}
+
+/*element: genericGetterInvoke2:[null|subclass=JSInt]*/
+genericGetterInvoke2() {
+  C<String> c = new C<String>('');
+  return c. /*invoke: [exact=C]*/ genericFunctionGetter(0);
+}
diff --git a/tests/compiler/dart2js/inference/data/type_literal.dart b/tests/compiler/dart2js/inference/data/type_literal.dart
index f90ee3c..46644d9 100644
--- a/tests/compiler/dart2js/inference/data/type_literal.dart
+++ b/tests/compiler/dart2js/inference/data/type_literal.dart
@@ -12,13 +12,13 @@
 /*element: typeLiteral:[exact=TypeImpl]*/
 typeLiteral() => Object;
 
-/*strong.element: typeLiteralToString:[exact=JSString]*/
+/*element: typeLiteralToString:[exact=JSString]*/
 typeLiteralToString() => (Object). /*invoke: [exact=TypeImpl]*/ toString();
 
 /*element: typeLiteralSubstring:[exact=JSString]*/
 typeLiteralSubstring() {
   String name = (List). /*invoke: [exact=TypeImpl]*/ toString();
-  name = name. /*strong.invoke: [exact=JSString]*/ substring(
-      0, name. /*strong.invoke: [exact=JSString]*/ indexOf('<'));
+  name = name. /*invoke: [exact=JSString]*/ substring(
+      0, name. /*invoke: [exact=JSString]*/ indexOf('<'));
   return name;
 }
diff --git a/tests/compiler/dart2js/inference/data/use_static_types.dart b/tests/compiler/dart2js/inference/data/use_static_types.dart
index 9906d25..1d59e90 100644
--- a/tests/compiler/dart2js/inference/data/use_static_types.dart
+++ b/tests/compiler/dart2js/inference/data/use_static_types.dart
@@ -18,17 +18,17 @@
   invokeGenericMethods();
 }
 
-/*strong.element: invokeFunction1:[null|subclass=A]*/
+/*element: invokeFunction1:[null|subclass=A]*/
 invokeFunction1(A Function() /*[subclass=Closure]*/ f) {
   return f();
 }
 
-/*strong.element: invokeFunction2:[null|exact=B]*/
+/*element: invokeFunction2:[null|exact=B]*/
 invokeFunction2(B Function() /*[subclass=Closure]*/ f) {
   return f();
 }
 
-/*strong.element: invokeFunction3:[null|exact=C]*/
+/*element: invokeFunction3:[null|exact=C]*/
 invokeFunction3(C Function() /*[subclass=Closure]*/ f) {
   return f();
 }
@@ -36,36 +36,36 @@
 /*element: genericFunction:[null|subclass=Object]*/
 T genericFunction<T>(T Function() /*[subclass=Closure]*/ f) => f();
 
-/*strong.element: invokeGenericFunction1:[null|subclass=A]*/
+/*element: invokeGenericFunction1:[null|subclass=A]*/
 invokeGenericFunction1() {
   return genericFunction<A>(/*[exact=A]*/ () => new A());
 }
 
-/*strong.element: invokeGenericFunction2:[null|exact=B]*/
+/*element: invokeGenericFunction2:[null|exact=B]*/
 invokeGenericFunction2() {
   return genericFunction<B>(/*[exact=B]*/ () => new B());
 }
 
-/*strong.element: invokeGenericFunction3:[null|exact=C]*/
+/*element: invokeGenericFunction3:[null|exact=C]*/
 invokeGenericFunction3() {
   return genericFunction<C>(/*[exact=C]*/ () => new C());
 }
 
-/*strong.element: invokeGenericLocalFunction1:[null|subclass=A]*/
+/*element: invokeGenericLocalFunction1:[null|subclass=A]*/
 invokeGenericLocalFunction1() {
   /*[null|subclass=Object]*/
   T local<T>(T Function() /*[subclass=Closure]*/ f) => f();
   return local<A>(/*[exact=A]*/ () => new A());
 }
 
-/*strong.element: invokeGenericLocalFunction2:[null|exact=B]*/
+/*element: invokeGenericLocalFunction2:[null|exact=B]*/
 invokeGenericLocalFunction2() {
   /*[null|subclass=Object]*/
   T local<T>(T Function() /*[subclass=Closure]*/ f) => f();
   return local<B>(/*[exact=B]*/ () => new B());
 }
 
-/*strong.element: invokeGenericLocalFunction3:[null|exact=C]*/
+/*element: invokeGenericLocalFunction3:[null|exact=C]*/
 invokeGenericLocalFunction3() {
   /*[null|subclass=Object]*/
   T local<T>(T Function() /*[subclass=Closure]*/ f) => f();
@@ -134,39 +134,39 @@
   superMethodInvoke() => super.functionTypedMethod()();
 }
 
-/*strong.element: invokeInstanceMethod1:[subclass=A]*/
+/*element: invokeInstanceMethod1:[subclass=A]*/
 invokeInstanceMethod1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ method();
 
-/*strong.element: invokeInstanceMethod2:[exact=B]*/
+/*element: invokeInstanceMethod2:[exact=B]*/
 invokeInstanceMethod2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ method();
 
-/*strong.element: invokeInstanceMethod3:[exact=C]*/
+/*element: invokeInstanceMethod3:[exact=C]*/
 invokeInstanceMethod3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ method();
 
-/*strong.element: invokeInstanceGetter1:[subclass=A]*/
+/*element: invokeInstanceGetter1:[subclass=A]*/
 invokeInstanceGetter1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
     c. /*[exact=GenericClass]*/ getter;
 
-/*strong.element: invokeInstanceGetter2:[exact=B]*/
+/*element: invokeInstanceGetter2:[exact=B]*/
 invokeInstanceGetter2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
     c. /*[exact=GenericClass]*/ getter;
 
-/*strong.element: invokeInstanceGetter3:[exact=C]*/
+/*element: invokeInstanceGetter3:[exact=C]*/
 invokeInstanceGetter3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
     c. /*[exact=GenericClass]*/ getter;
 
-/*strong.element: accessInstanceField1:[subclass=A]*/
+/*element: accessInstanceField1:[subclass=A]*/
 accessInstanceField1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
     c. /*[exact=GenericClass]*/ field;
 
-/*strong.element: accessInstanceField2:[exact=B]*/
+/*element: accessInstanceField2:[exact=B]*/
 accessInstanceField2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
     c. /*[exact=GenericClass]*/ field;
 
-/*strong.element: accessInstanceField3:[exact=C]*/
+/*element: accessInstanceField3:[exact=C]*/
 accessInstanceField3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
     c. /*[exact=GenericClass]*/ field;
 
@@ -206,45 +206,45 @@
 accessSuperField3(GenericSubclass<C> /*[exact=GenericSubclass]*/ c) =>
     c. /*invoke: [exact=GenericSubclass]*/ superField();
 
-/*strong.element: invokeFunctionTypedInstanceMethod1:[null|subclass=A]*/
+/*element: invokeFunctionTypedInstanceMethod1:[null|subclass=A]*/
 invokeFunctionTypedInstanceMethod1(
         GenericClass<A> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedMethod()();
 
-/*strong.element: invokeFunctionTypedInstanceMethod2:[null|exact=B]*/
+/*element: invokeFunctionTypedInstanceMethod2:[null|exact=B]*/
 invokeFunctionTypedInstanceMethod2(
         GenericClass<B> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedMethod()();
 
-/*strong.element: invokeFunctionTypedInstanceMethod3:[null|exact=C]*/
+/*element: invokeFunctionTypedInstanceMethod3:[null|exact=C]*/
 invokeFunctionTypedInstanceMethod3(
         GenericClass<C> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedMethod()();
 
-/*strong.element: invokeFunctionTypedInstanceGetter1:[null|subclass=A]*/
+/*element: invokeFunctionTypedInstanceGetter1:[null|subclass=A]*/
 invokeFunctionTypedInstanceGetter1(
         GenericClass<A> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedGetter();
 
-/*strong.element: invokeFunctionTypedInstanceGetter2:[null|exact=B]*/
+/*element: invokeFunctionTypedInstanceGetter2:[null|exact=B]*/
 invokeFunctionTypedInstanceGetter2(
         GenericClass<B> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedGetter();
 
-/*strong.element: invokeFunctionTypedInstanceGetter3:[null|exact=C]*/
+/*element: invokeFunctionTypedInstanceGetter3:[null|exact=C]*/
 invokeFunctionTypedInstanceGetter3(
         GenericClass<C> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedGetter();
 
-/*strong.element: invokeFunctionTypedInstanceField1:[null|subclass=A]*/
+/*element: invokeFunctionTypedInstanceField1:[null|subclass=A]*/
 invokeFunctionTypedInstanceField1(GenericClass<A> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedField();
 
-/*strong.element: invokeFunctionTypedInstanceField2:[null|exact=B]*/
+/*element: invokeFunctionTypedInstanceField2:[null|exact=B]*/
 invokeFunctionTypedInstanceField2(GenericClass<B> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedField();
 
-/*strong.element: invokeFunctionTypedInstanceField3:[null|exact=C]*/
+/*element: invokeFunctionTypedInstanceField3:[null|exact=C]*/
 invokeFunctionTypedInstanceField3(GenericClass<C> /*[exact=GenericClass]*/ c) =>
     c. /*invoke: [exact=GenericClass]*/ functionTypedField();
 
@@ -357,103 +357,103 @@
 
 /*element: Subclass.:[exact=Subclass]*/
 class Subclass extends Class {
-  /*strong.element: Subclass.superMethod1:[subclass=A]*/
+  /*element: Subclass.superMethod1:[subclass=A]*/
   superMethod1() {
     return super.genericMethod<A>(new A());
   }
 
-  /*strong.element: Subclass.superMethod2:[exact=B]*/
+  /*element: Subclass.superMethod2:[exact=B]*/
   superMethod2() {
     return super.genericMethod<B>(new B());
   }
 
-  /*strong.element: Subclass.superMethod3:[exact=C]*/
+  /*element: Subclass.superMethod3:[exact=C]*/
   superMethod3() {
     return super.genericMethod<C>(new C());
   }
 
-  /*strong.element: Subclass.functionTypedSuperMethod1:[null|subclass=A]*/
+  /*element: Subclass.functionTypedSuperMethod1:[null|subclass=A]*/
   functionTypedSuperMethod1() {
     return super.functionTypedGenericMethod<A>(new A())();
   }
 
-  /*strong.element: Subclass.functionTypedSuperMethod2:[null|exact=B]*/
+  /*element: Subclass.functionTypedSuperMethod2:[null|exact=B]*/
   functionTypedSuperMethod2() {
     return super.functionTypedGenericMethod<B>(new B())();
   }
 
-  /*strong.element: Subclass.functionTypedSuperMethod3:[null|exact=C]*/
+  /*element: Subclass.functionTypedSuperMethod3:[null|exact=C]*/
   functionTypedSuperMethod3() {
     return super.functionTypedGenericMethod<C>(new C())();
   }
 }
 
-/*strong.element: invokeGenericMethod1:[subclass=A]*/
+/*element: invokeGenericMethod1:[subclass=A]*/
 invokeGenericMethod1(A /*[exact=A]*/ a) => genericMethod<A>(a);
 
-/*strong.element: invokeGenericMethod2:[exact=B]*/
+/*element: invokeGenericMethod2:[exact=B]*/
 invokeGenericMethod2(B /*[exact=B]*/ b) => genericMethod<B>(b);
 
-/*strong.element: invokeGenericMethod3:[exact=C]*/
+/*element: invokeGenericMethod3:[exact=C]*/
 invokeGenericMethod3(C /*[exact=C]*/ c) => genericMethod<C>(c);
 
-/*strong.element: invokeGenericInstanceMethod1:[subclass=A]*/
+/*element: invokeGenericInstanceMethod1:[subclass=A]*/
 invokeGenericInstanceMethod1() =>
     new Class(). /*invoke: [exact=Class]*/ genericMethod<A>(new A());
 
-/*strong.element: invokeGenericInstanceMethod2:[exact=B]*/
+/*element: invokeGenericInstanceMethod2:[exact=B]*/
 invokeGenericInstanceMethod2() =>
     new Class(). /*invoke: [exact=Class]*/ genericMethod<B>(new B());
 
-/*strong.element: invokeGenericInstanceMethod3:[exact=C]*/
+/*element: invokeGenericInstanceMethod3:[exact=C]*/
 invokeGenericInstanceMethod3() =>
     new Class(). /*invoke: [exact=Class]*/ genericMethod<C>(new C());
 
-/*strong.element: invokeGenericSuperMethod1:[subclass=A]*/
+/*element: invokeGenericSuperMethod1:[subclass=A]*/
 invokeGenericSuperMethod1() =>
     new Subclass(). /*invoke: [exact=Subclass]*/ superMethod1();
 
-/*strong.element: invokeGenericSuperMethod2:[exact=B]*/
+/*element: invokeGenericSuperMethod2:[exact=B]*/
 invokeGenericSuperMethod2() =>
     new Subclass(). /*invoke: [exact=Subclass]*/ superMethod2();
 
-/*strong.element: invokeGenericSuperMethod3:[exact=C]*/
+/*element: invokeGenericSuperMethod3:[exact=C]*/
 invokeGenericSuperMethod3() =>
     new Subclass(). /*invoke: [exact=Subclass]*/ superMethod3();
 
-/*strong.element: invokeFunctionTypedGenericMethod1:[null|subclass=A]*/
+/*element: invokeFunctionTypedGenericMethod1:[null|subclass=A]*/
 invokeFunctionTypedGenericMethod1(A /*[exact=A]*/ a) =>
     functionTypedGenericMethod<A>(a)();
 
-/*strong.element: invokeFunctionTypedGenericMethod2:[null|exact=B]*/
+/*element: invokeFunctionTypedGenericMethod2:[null|exact=B]*/
 invokeFunctionTypedGenericMethod2(B /*[exact=B]*/ b) =>
     functionTypedGenericMethod<B>(b)();
 
-/*strong.element: invokeFunctionTypedGenericMethod3:[null|exact=C]*/
+/*element: invokeFunctionTypedGenericMethod3:[null|exact=C]*/
 invokeFunctionTypedGenericMethod3(C /*[exact=C]*/ c) =>
     functionTypedGenericMethod<C>(c)();
 
-/*strong.element: invokeFunctionTypedGenericInstanceMethod1:[null|subclass=A]*/
+/*element: invokeFunctionTypedGenericInstanceMethod1:[null|subclass=A]*/
 invokeFunctionTypedGenericInstanceMethod1() => new Class()
     . /*invoke: [exact=Class]*/ functionTypedGenericMethod<A>(new A())();
 
-/*strong.element: invokeFunctionTypedGenericInstanceMethod2:[null|exact=B]*/
+/*element: invokeFunctionTypedGenericInstanceMethod2:[null|exact=B]*/
 invokeFunctionTypedGenericInstanceMethod2() => new Class()
     . /*invoke: [exact=Class]*/ functionTypedGenericMethod<B>(new B())();
 
-/*strong.element: invokeFunctionTypedGenericInstanceMethod3:[null|exact=C]*/
+/*element: invokeFunctionTypedGenericInstanceMethod3:[null|exact=C]*/
 invokeFunctionTypedGenericInstanceMethod3() => new Class()
     . /*invoke: [exact=Class]*/ functionTypedGenericMethod<C>(new C())();
 
-/*strong.element: invokeFunctionTypedGenericSuperMethod1:[null|subclass=A]*/
+/*element: invokeFunctionTypedGenericSuperMethod1:[null|subclass=A]*/
 invokeFunctionTypedGenericSuperMethod1() =>
     new Subclass(). /*invoke: [exact=Subclass]*/ functionTypedSuperMethod1();
 
-/*strong.element: invokeFunctionTypedGenericSuperMethod2:[null|exact=B]*/
+/*element: invokeFunctionTypedGenericSuperMethod2:[null|exact=B]*/
 invokeFunctionTypedGenericSuperMethod2() =>
     new Subclass(). /*invoke: [exact=Subclass]*/ functionTypedSuperMethod2();
 
-/*strong.element: invokeFunctionTypedGenericSuperMethod3:[null|exact=C]*/
+/*element: invokeFunctionTypedGenericSuperMethod3:[null|exact=C]*/
 invokeFunctionTypedGenericSuperMethod3() =>
     new Subclass(). /*invoke: [exact=Subclass]*/ functionTypedSuperMethod3();
 
diff --git a/tests/compiler/dart2js/inference/inference_data_test.dart b/tests/compiler/dart2js/inference/inference_data_test.dart
index 4f3d3e9..a3cad1f 100644
--- a/tests/compiler/dart2js/inference/inference_data_test.dart
+++ b/tests/compiler/dart2js/inference/inference_data_test.dart
@@ -12,6 +12,7 @@
 import 'package:compiler/src/js_backend/inferred_data.dart';
 import 'package:compiler/src/js_model/element_map.dart';
 import 'package:compiler/src/js_model/js_world.dart';
+import 'package:compiler/src/util/features.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../equivalence/id_equivalence.dart';
 import '../equivalence/id_equivalence_helper.dart';
@@ -21,7 +22,7 @@
     Directory dataDir =
         new Directory.fromUri(Platform.script.resolve('inference_data'));
     await checkTests(dataDir, const InferenceDataComputer(),
-        args: args, options: [stopAfterTypeInference]);
+        args: args, testOmit: false, options: [stopAfterTypeInference]);
   });
 }
 
@@ -31,15 +32,15 @@
   static const String cannotThrow = 'no-throw';
 }
 
-class InferenceDataComputer extends DataComputer {
+class InferenceDataComputer extends DataComputer<String> {
   const InferenceDataComputer();
 
   /// Compute side effects data for [member] from kernel based inference.
   ///
   /// Fills [actualMap] with the data.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -48,15 +49,21 @@
             compiler.globalInference.resultsForTesting.inferredData)
         .run(definition.node);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 /// AST visitor for computing side effects data for a member.
-class InferredDataIrComputer extends IrDataExtractor {
+class InferredDataIrComputer extends IrDataExtractor<String> {
   final JsClosedWorld closedWorld;
   final InferredData inferredData;
 
-  InferredDataIrComputer(DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap, this.closedWorld, this.inferredData)
+  InferredDataIrComputer(
+      DiagnosticReporter reporter,
+      Map<Id, ActualData<String>> actualMap,
+      this.closedWorld,
+      this.inferredData)
       : super(reporter, actualMap);
 
   JsToElementMap get _elementMap => closedWorld.elementMap;
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
index 9ac41da..5b5eb7f 100644
--- a/tests/compiler/dart2js/inference/inference_test_helper.dart
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -10,11 +10,10 @@
 import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
-import 'package:compiler/src/types/types.dart';
+import 'package:compiler/src/inferrer/types.dart';
 import 'package:compiler/src/js_model/element_map.dart';
 import 'package:compiler/src/js_model/js_world.dart';
 import 'package:compiler/src/js_model/locals.dart';
-import 'package:compiler/src/inferrer/builder_kernel.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../equivalence/id_equivalence.dart';
 import '../equivalence/id_equivalence_helper.dart';
@@ -38,21 +37,19 @@
         options: [stopAfterTypeInference],
         skipForStrong: skipForStrong,
         shardIndex: shardIndex ?? 0,
-        shards: shardIndex != null ? 2 : 1, onTest: (Uri uri) {
-      useStaticResultTypes = uri.path.endsWith('/use_static_types.dart');
-    });
+        shards: shardIndex != null ? 2 : 1);
   });
 }
 
-class TypeMaskDataComputer extends DataComputer {
+class TypeMaskDataComputer extends DataComputer<String> {
   const TypeMaskDataComputer();
 
   /// Compute type inference data for [member] from kernel based inference.
   ///
   /// Fills [actualMap] with the data.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -68,10 +65,13 @@
             closedWorld.closureDataLookup)
         .run(definition.node);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 /// IR visitor for computing inference data for a member.
-class TypeMaskIrComputer extends IrDataExtractor {
+class TypeMaskIrComputer extends IrDataExtractor<String> {
   final GlobalTypeInferenceResults results;
   GlobalTypeInferenceMemberResult result;
   final JsToElementMap _elementMap;
@@ -80,7 +80,7 @@
 
   TypeMaskIrComputer(
       DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap,
+      Map<Id, ActualData<String>> actualMap,
       this._elementMap,
       MemberEntity member,
       this._localsMap,
diff --git a/tests/compiler/dart2js/inference/load_deferred_library_test.dart b/tests/compiler/dart2js/inference/load_deferred_library_test.dart
index 5ae532f..716d334 100644
--- a/tests/compiler/dart2js/inference/load_deferred_library_test.dart
+++ b/tests/compiler/dart2js/inference/load_deferred_library_test.dart
@@ -8,10 +8,10 @@
 import 'package:compiler/src/common/names.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/js_model/element_map.dart';
 import 'package:compiler/src/js_model/js_world.dart';
-import 'package:compiler/src/types/abstract_value_domain.dart';
 import 'package:expect/expect.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../helpers/memory_compiler.dart';
diff --git a/tests/compiler/dart2js/inference/map_tracer_test.dart b/tests/compiler/dart2js/inference/map_tracer_test.dart
index 2135e08..7e2b849 100644
--- a/tests/compiler/dart2js/inference/map_tracer_test.dart
+++ b/tests/compiler/dart2js/inference/map_tracer_test.dart
@@ -5,8 +5,8 @@
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/inferrer/abstract_value_domain.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
-import 'package:compiler/src/types/abstract_value_domain.dart';
 import 'package:compiler/src/world.dart';
 import 'package:expect/expect.dart';
 
diff --git a/tests/compiler/dart2js/inference/side_effects_test.dart b/tests/compiler/dart2js/inference/side_effects_test.dart
index 4b04662..0e2e5cb 100644
--- a/tests/compiler/dart2js/inference/side_effects_test.dart
+++ b/tests/compiler/dart2js/inference/side_effects_test.dart
@@ -25,7 +25,7 @@
   });
 }
 
-class SideEffectsDataComputer extends DataComputer {
+class SideEffectsDataComputer extends DataComputer<String> {
   const SideEffectsDataComputer();
 
   /// Compute side effects data for [member] from kernel based inference.
@@ -42,15 +42,21 @@
             compiler.globalInference.resultsForTesting.inferredData)
         .run(definition.node);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 /// AST visitor for computing side effects data for a member.
-class SideEffectsIrComputer extends IrDataExtractor {
+class SideEffectsIrComputer extends IrDataExtractor<String> {
   final JsClosedWorld closedWorld;
   final InferredData inferredData;
 
-  SideEffectsIrComputer(DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap, this.closedWorld, this.inferredData)
+  SideEffectsIrComputer(
+      DiagnosticReporter reporter,
+      Map<Id, ActualData<String>> actualMap,
+      this.closedWorld,
+      this.inferredData)
       : super(reporter, actualMap);
 
   JsToElementMap get _elementMap => closedWorld.elementMap;
diff --git a/tests/compiler/dart2js/inference/trivial_abstract_value_domain_test.dart b/tests/compiler/dart2js/inference/trivial_abstract_value_domain_test.dart
new file mode 100644
index 0000000..6a8f389
--- /dev/null
+++ b/tests/compiler/dart2js/inference/trivial_abstract_value_domain_test.dart
@@ -0,0 +1,28 @@
+// 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:args/args.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
+
+import '../helpers/args_helper.dart';
+import '../helpers/memory_compiler.dart';
+
+main(List<String> args) {
+  ArgParser argParser = createArgParser();
+
+  asyncTest(() async {
+    ArgResults argResults = argParser.parse(args);
+    Uri entryPoint = getEntryPoint(argResults) ??
+        Uri.base.resolve('samples-dev/swarm/swarm.dart');
+    Uri librariesSpecificationUri = getLibrariesSpec(argResults);
+    Uri packageConfig = getPackages(argResults);
+    List<String> options = getOptions(argResults);
+    await runCompiler(
+        entryPoint: entryPoint,
+        packageConfig: packageConfig,
+        librariesSpecificationUri: librariesSpecificationUri,
+        options: [Flags.useTrivialAbstractValueDomain]..addAll(options));
+  });
+}
diff --git a/tests/compiler/dart2js/inference/type_mask_test_helper.dart b/tests/compiler/dart2js/inference/type_mask_test_helper.dart
index 025d218..75fe378 100644
--- a/tests/compiler/dart2js/inference/type_mask_test_helper.dart
+++ b/tests/compiler/dart2js/inference/type_mask_test_helper.dart
@@ -7,7 +7,7 @@
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/world.dart' show JClosedWorld;
 
-export 'package:compiler/src/types/types.dart';
+export 'package:compiler/src/inferrer/types.dart';
 
 TypeMask simplify(TypeMask mask, JClosedWorld closedWorld) {
   if (mask is ForwardingTypeMask) {
diff --git a/tests/compiler/dart2js/inlining/inlining_test.dart b/tests/compiler/dart2js/inlining/inlining_test.dart
index b71d909..c6a8b92 100644
--- a/tests/compiler/dart2js/inlining/inlining_test.dart
+++ b/tests/compiler/dart2js/inlining/inlining_test.dart
@@ -26,15 +26,15 @@
   });
 }
 
-class InliningDataComputer extends DataComputer {
+class InliningDataComputer extends DataComputer<String> {
   const InliningDataComputer();
 
   /// Compute type inference data for [member] from kernel based inference.
   ///
   /// Fills [actualMap] with the data.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -43,17 +43,20 @@
             compiler.backend, closedWorld.closureDataLookup)
         .run(definition.node);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 /// AST visitor for computing inference data for a member.
-class InliningIrComputer extends IrDataExtractor {
+class InliningIrComputer extends IrDataExtractor<String> {
   final JavaScriptBackend backend;
   final JsToElementMap _elementMap;
   final ClosureData _closureDataLookup;
 
   InliningIrComputer(
       DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap,
+      Map<Id, ActualData<String>> actualMap,
       this._elementMap,
       MemberEntity member,
       this.backend,
diff --git a/tests/compiler/dart2js/jumps/jump_test.dart b/tests/compiler/dart2js/jumps/jump_test.dart
index ee33c6c..4d954d7 100644
--- a/tests/compiler/dart2js/jumps/jump_test.dart
+++ b/tests/compiler/dart2js/jumps/jump_test.dart
@@ -4,7 +4,6 @@
 
 import 'dart:io';
 import 'package:async_helper/async_helper.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';
@@ -21,12 +20,11 @@
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
     await checkTests(dataDir, const JumpDataComputer(),
-        options: [Flags.disableTypeInference, stopAfterTypeInference],
-        args: args);
+        options: [stopAfterTypeInference], args: args);
   });
 }
 
-class JumpDataComputer extends DataComputer {
+class JumpDataComputer extends DataComputer<String> {
   const JumpDataComputer();
 
   /// Compute closure data mapping for [member] as a kernel based element.
@@ -34,8 +32,8 @@
   /// Fills [actualMap] with the data and [sourceSpanMap] with the source spans
   /// for the data origin.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -45,6 +43,9 @@
             compiler.reporter, actualMap, localsMap.getLocalsMap(member))
         .run(definition.node);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 class TargetData {
@@ -70,15 +71,15 @@
 }
 
 /// Kernel IR visitor for computing jump data.
-class JumpsIrChecker extends IrDataExtractor {
+class JumpsIrChecker extends IrDataExtractor<String> {
   final KernelToLocalsMap _localsMap;
 
   int index = 0;
   Map<JumpTarget, TargetData> targets = <JumpTarget, TargetData>{};
   List<GotoData> gotos = <GotoData>[];
 
-  JumpsIrChecker(DiagnosticReporter reporter, Map<Id, ActualData> actualMap,
-      this._localsMap)
+  JumpsIrChecker(DiagnosticReporter reporter,
+      Map<Id, ActualData<String>> actualMap, this._localsMap)
       : super(reporter, actualMap);
 
   void processData() {
diff --git a/tests/compiler/dart2js/model/enqueuer_test.dart b/tests/compiler/dart2js/model/enqueuer_test.dart
index 60c3fe6..8a8a6a6 100644
--- a/tests/compiler/dart2js/model/enqueuer_test.dart
+++ b/tests/compiler/dart2js/model/enqueuer_test.dart
@@ -177,8 +177,8 @@
         elementEnvironment.lookupConstructor(cls, '');
     InterfaceType type = elementEnvironment.getRawType(cls);
     WorldImpact impact = new WorldImpactBuilderImpl()
-      ..registerStaticUse(new StaticUse.typedConstructorInvoke(
-          constructor, constructor.parameterStructure.callStructure, type));
+      ..registerStaticUse(new StaticUse.typedConstructorInvoke(constructor,
+          constructor.parameterStructure.callStructure, type, null));
     enqueuer.applyImpact(impact);
   }
 
diff --git a/tests/compiler/dart2js/optimization/data/field_get.dart b/tests/compiler/dart2js/optimization/data/field_get.dart
new file mode 100644
index 0000000..e200302
--- /dev/null
+++ b/tests/compiler/dart2js/optimization/data/field_get.dart
@@ -0,0 +1,64 @@
+// Copyright (c) 2019, 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.
+
+main() {
+  method1(new Class1a());
+  method2(new Class2a());
+  method2(new Class2b());
+  method3(new Class3a());
+  method3(new Class3b());
+  method4(new Class4a());
+  method4(new Class4b());
+}
+
+class Class1a {
+  int field1;
+}
+
+/*element: method1:FieldGet=[name=Class1a.field1]*/
+@pragma('dart2js:noInline')
+method1(Class1a c) {
+  return c.field1;
+}
+
+class Class2a {
+  int field2;
+}
+
+class Class2b extends Class2a {}
+
+/*element: method2:FieldGet=[name=Class2a.field2]*/
+@pragma('dart2js:noInline')
+method2(Class2a c) {
+  return c.field2;
+}
+
+class Class3a {
+  int field3;
+}
+
+class Class3b implements Class3a {
+  int get field3 => 42;
+  set field3(int _) {}
+}
+
+@pragma('dart2js:noInline')
+method3(Class3a c) {
+  return c.field3;
+}
+
+class Class4a {
+  int field4;
+}
+
+class Class4b implements Class4a {
+  int field4;
+}
+
+// TODO(johnniwinther,sra): Maybe we should optimize cases like this to a direct
+// property access, because all targets are simple fields?
+@pragma('dart2js:noInline')
+method4(Class4a c) {
+  return c.field4;
+}
diff --git a/tests/compiler/dart2js/optimization/data/field_set.dart b/tests/compiler/dart2js/optimization/data/field_set.dart
new file mode 100644
index 0000000..953fe07
--- /dev/null
+++ b/tests/compiler/dart2js/optimization/data/field_set.dart
@@ -0,0 +1,64 @@
+// Copyright (c) 2019, 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.
+
+main() {
+  method1(new Class1a());
+  method2(new Class2a());
+  method2(new Class2b());
+  method3(new Class3a());
+  method3(new Class3b());
+  method4(new Class4a());
+  method4(new Class4b());
+}
+
+class Class1a {
+  int field1;
+}
+
+/*element: method1:FieldSet=[name=Class1a.field1]*/
+@pragma('dart2js:noInline')
+method1(Class1a c) {
+  c.field1 = 42;
+}
+
+class Class2a {
+  int field2 = 42;
+}
+
+class Class2b extends Class2a {}
+
+/*element: method2:FieldSet=[name=Class2a.field2]*/
+@pragma('dart2js:noInline')
+method2(Class2a c) {
+  c.field2 = 42;
+}
+
+class Class3a {
+  int field3;
+}
+
+class Class3b implements Class3a {
+  int get field3 => 42;
+  set field3(int _) {}
+}
+
+@pragma('dart2js:noInline')
+method3(Class3a c) {
+  c.field3 = 42;
+}
+
+class Class4a {
+  int field4;
+}
+
+class Class4b implements Class4a {
+  int field4;
+}
+
+// TODO(johnniwinther,sra): Maybe we should optimize cases like this to a direct
+// property write, because all targets are simple fields?
+@pragma('dart2js:noInline')
+method4(Class4a c) {
+  c.field4 = 42;
+}
diff --git a/tests/compiler/dart2js/optimization/data/finalized_type_variable.dart b/tests/compiler/dart2js/optimization/data/finalized_type_variable.dart
new file mode 100644
index 0000000..6411114
--- /dev/null
+++ b/tests/compiler/dart2js/optimization/data/finalized_type_variable.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2019, 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.
+
+abstract class AppView<T> {
+  T ctx;
+}
+
+class CardComponent {
+  String title;
+}
+
+class ViewCardComponent extends AppView<CardComponent> {
+  /*element: ViewCardComponent.method1:
+   FieldGet=[name=AppView.ctx],
+   FieldSet=[name=CardComponent.title]
+  */
+  @pragma('dart2js:noInline')
+  method1(String value) {
+    ctx.title = value;
+  }
+
+  /*element: ViewCardComponent.method2:
+   FieldGet=[name=AppView.ctx,name=CardComponent.title]
+  */
+  @pragma('dart2js:noInline')
+  method2() {
+    return ctx.title;
+  }
+}
+
+class CardComponent2 {
+  String title;
+}
+
+class ViewCardComponent2 extends AppView<CardComponent2> {
+  /*element: ViewCardComponent2.method1:
+   FieldGet=[name=AppView.ctx],
+   FieldSet=[name=CardComponent2.title]
+  */
+  @pragma('dart2js:noInline')
+  method1(String value) {
+    ctx.title = value;
+  }
+
+  /*element: ViewCardComponent2.method2:
+   FieldGet=[name=AppView.ctx,name=CardComponent2.title]
+  */
+  @pragma('dart2js:noInline')
+  method2() {
+    return ctx.title;
+  }
+}
+
+/*strong.element: main:*/
+/*omit.element: main:FieldSet=[name=AppView.ctx,name=AppView.ctx]*/
+main() {
+  var c1 = new ViewCardComponent();
+  c1.ctx = new CardComponent();
+  c1.method1('foo');
+  c1.method2();
+  var c2 = new ViewCardComponent2();
+  c2.ctx = new CardComponent2();
+  c2.method1('bar');
+  c2.method2();
+}
diff --git a/tests/compiler/dart2js/optimization/optimization_test.dart b/tests/compiler/dart2js/optimization/optimization_test.dart
new file mode 100644
index 0000000..0f2d013
--- /dev/null
+++ b/tests/compiler/dart2js/optimization/optimization_test.dart
@@ -0,0 +1,163 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/closure.dart';
+import 'package:compiler/src/common.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/js_backend/backend.dart';
+import 'package:compiler/src/js_model/element_map.dart';
+import 'package:compiler/src/js_model/js_world.dart';
+import 'package:compiler/src/ssa/logging.dart';
+import 'package:compiler/src/ssa/ssa.dart';
+import 'package:compiler/src/util/features.dart';
+import 'package:kernel/ast.dart' as ir;
+import '../equivalence/id_equivalence.dart';
+import '../equivalence/id_equivalence_helper.dart';
+
+main(List<String> args) {
+  asyncTest(() async {
+    Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
+    await checkTests(dataDir, const OptimizationDataComputer(), args: args);
+  });
+}
+
+class OptimizationDataValidator implements DataInterpreter<OptimizationLog> {
+  const OptimizationDataValidator();
+
+  @override
+  String getText(OptimizationLog actualData) {
+    Features features = new Features();
+    for (OptimizationLogEntry entry in actualData.entries) {
+      features.addElement(entry.tag, entry.features.getText());
+    }
+    return features.getText();
+  }
+
+  @override
+  bool isEmpty(OptimizationLog actualData) {
+    return actualData == null || actualData.entries.isEmpty;
+  }
+
+  @override
+  String isAsExpected(OptimizationLog actualLog, String expectedLog) {
+    expectedLog ??= '';
+    if (expectedLog == '') {
+      return actualLog.entries.isEmpty
+          ? null
+          : "Expected empty optimization log.";
+    }
+    if (expectedLog == '*') {
+      return null;
+    }
+    List<OptimizationLogEntry> actualDataEntries = actualLog.entries.toList();
+    Features expectedLogEntries = Features.fromText(expectedLog);
+    List<String> errorsFound = <String>[];
+    expectedLogEntries.forEach((String tag, dynamic expectedEntryData) {
+      List<OptimizationLogEntry> actualDataForTag =
+          actualDataEntries.where((data) => data.tag == tag).toList();
+      if (expectedEntryData == '' ||
+          expectedEntryData is List && expectedEntryData.isEmpty) {
+        if (actualDataForTag.isNotEmpty) {
+          errorsFound.add('Non-empty log found for tag $tag');
+        }
+      } else if (expectedEntryData == '*') {
+        // Anything allowed.
+      } else if (expectedEntryData is List) {
+        for (Object object in expectedEntryData) {
+          Features expectedLogEntry = Features.fromText('$object');
+          bool matchFound = false;
+          for (OptimizationLogEntry actualLogEntry in actualDataForTag) {
+            bool validData = true;
+            expectedLogEntry.forEach((String key, Object expectedValue) {
+              Object actualValue = actualLogEntry.features[key];
+              if ('$actualValue' != '$expectedValue') {
+                validData = false;
+              }
+            });
+            if (validData) {
+              actualDataForTag.remove(actualLogEntry);
+              matchFound = true;
+              break;
+            }
+          }
+          if (!matchFound) {
+            errorsFound.add("No match found for $tag=[$object]");
+          }
+        }
+      } else {
+        errorsFound.add("Unknown expected entry '$expectedEntryData'");
+      }
+    });
+    return errorsFound.isNotEmpty ? errorsFound.join(', ') : null;
+  }
+}
+
+class OptimizationDataComputer extends DataComputer<OptimizationLog> {
+  const OptimizationDataComputer();
+
+  /// Compute type inference data for [member] from kernel based inference.
+  ///
+  /// Fills [actualMap] with the data.
+  @override
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<OptimizationLog>> actualMap,
+      {bool verbose: false}) {
+    JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
+    JsToElementMap elementMap = closedWorld.elementMap;
+    MemberDefinition definition = elementMap.getMemberDefinition(member);
+    new OptimizationIrComputer(compiler.reporter, actualMap, elementMap, member,
+            compiler.backend, closedWorld.closureDataLookup)
+        .run(definition.node);
+  }
+
+  @override
+  DataInterpreter<OptimizationLog> get dataValidator =>
+      const OptimizationDataValidator();
+}
+
+/// AST visitor for computing inference data for a member.
+class OptimizationIrComputer extends IrDataExtractor<OptimizationLog> {
+  final JavaScriptBackend backend;
+  final JsToElementMap _elementMap;
+  final ClosureData _closureDataLookup;
+
+  OptimizationIrComputer(
+      DiagnosticReporter reporter,
+      Map<Id, ActualData<OptimizationLog>> actualMap,
+      this._elementMap,
+      MemberEntity member,
+      this.backend,
+      this._closureDataLookup)
+      : super(reporter, actualMap);
+
+  OptimizationLog getLog(MemberEntity member) {
+    SsaFunctionCompiler functionCompiler = backend.functionCompiler;
+    return functionCompiler.optimizer.loggersForTesting[member];
+  }
+
+  OptimizationLog getMemberValue(MemberEntity member) {
+    if (member is FunctionEntity) {
+      return getLog(member);
+    }
+    return null;
+  }
+
+  @override
+  OptimizationLog computeMemberValue(Id id, ir.Member node) {
+    return getMemberValue(_elementMap.getMember(node));
+  }
+
+  @override
+  OptimizationLog computeNodeValue(Id id, ir.TreeNode node) {
+    if (node is ir.FunctionExpression || node is ir.FunctionDeclaration) {
+      ClosureRepresentationInfo info = _closureDataLookup.getClosureInfo(node);
+      return getMemberValue(info.callMethod);
+    }
+    return null;
+  }
+}
diff --git a/tests/compiler/dart2js/rti/data/as.dart b/tests/compiler/dart2js/rti/data/as.dart
new file mode 100644
index 0000000..b84f239
--- /dev/null
+++ b/tests/compiler/dart2js/rti/data/as.dart
@@ -0,0 +1,45 @@
+// 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.
+
+// Derived from dart2js_extra/generic_type_error_message_test.
+
+import 'package:expect/expect.dart';
+
+/*class: Foo:*/
+class Foo<T extends num> {}
+
+/*class: Bar:*/
+class Bar<T extends num> {}
+
+/*class: Baz:explicit=[Baz<num>],needsArgs*/
+class Baz<T extends num> {}
+
+@pragma('dart2js:disableFinal')
+main() {
+  test(new Foo(), Foo, expectTypeArguments: false);
+  // ignore: unnecessary_cast
+  test(new Bar() as Bar<num>, Bar, expectTypeArguments: false);
+  Baz<num> b = new Baz();
+  dynamic c = b;
+  test(c as Baz<num>, Baz, expectTypeArguments: true);
+}
+
+void test(dynamic object, Type type, {bool expectTypeArguments}) {
+  bool caught = false;
+  try {
+    print(type);
+    object as List<String>;
+  } catch (e) {
+    String expected = '$type';
+    if (!expectTypeArguments) {
+      expected = expected.substring(0, expected.indexOf('<'));
+    }
+    expected = "'$expected'";
+    Expect.isTrue(e.toString().contains(expected),
+        'Expected "$expected" in the message: $e');
+    caught = true;
+    print(e);
+  }
+  Expect.isTrue(caught);
+}
diff --git a/tests/compiler/dart2js/rti/data/call_typed.dart b/tests/compiler/dart2js/rti/data/call_typed.dart
index edab1dd..9731508 100644
--- a/tests/compiler/dart2js/rti/data/call_typed.dart
+++ b/tests/compiler/dart2js/rti/data/call_typed.dart
@@ -13,6 +13,6 @@
 test(o) => o is Function(int);
 
 main() {
-  Expect.isTrue(test(new A()));
+  Expect.isFalse(test(new A()));
   Expect.isFalse(test(null));
 }
diff --git a/tests/compiler/dart2js/rti/data/call_typed_generic.dart b/tests/compiler/dart2js/rti/data/call_typed_generic.dart
index 7509783..f7f5de4 100644
--- a/tests/compiler/dart2js/rti/data/call_typed_generic.dart
+++ b/tests/compiler/dart2js/rti/data/call_typed_generic.dart
@@ -17,6 +17,7 @@
 test(o) => o is Function(int);
 
 main() {
-  Expect.isTrue(test(new A<int>()));
+  Expect.isFalse(test(new A<int>()));
   Expect.isFalse(test(new A<String>()));
+  new A().call(null); // Use .call to ensure it is live.
 }
diff --git a/tests/compiler/dart2js/rti/data/call_typed_generic_strong.dart b/tests/compiler/dart2js/rti/data/call_typed_generic_strong.dart
deleted file mode 100644
index fd20af7..0000000
--- a/tests/compiler/dart2js/rti/data/call_typed_generic_strong.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
-
-/*strong.class: A:direct,explicit=[A.T],needsArgs*/
-/*omit.class: A:*/
-class A<T> {
-  /*strong.element: A.call:*/
-  /*omit.element: A.call:*/
-  call(T t) {}
-}
-
-@noInline
-test(o) => o is Function(int);
-
-main() {
-  Expect.isFalse(test(new A<int>()));
-  Expect.isFalse(test(new A<String>()));
-}
diff --git a/tests/compiler/dart2js/rti/data/call_typed_strong.dart b/tests/compiler/dart2js/rti/data/call_typed_strong.dart
deleted file mode 100644
index 9731508..0000000
--- a/tests/compiler/dart2js/rti/data/call_typed_strong.dart
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
-
-class A {
-  call(int i) {}
-}
-
-@noInline
-test(o) => o is Function(int);
-
-main() {
-  Expect.isFalse(test(new A()));
-  Expect.isFalse(test(null));
-}
diff --git a/tests/compiler/dart2js/rti/data/closure_generic_unneeded_strong.dart b/tests/compiler/dart2js/rti/data/closure_generic_unneeded.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/closure_generic_unneeded_strong.dart
rename to tests/compiler/dart2js/rti/data/closure_generic_unneeded.dart
diff --git a/tests/compiler/dart2js/rti/data/closure_unneeded_strong.dart b/tests/compiler/dart2js/rti/data/closure_unneeded_strong.dart
deleted file mode 100644
index ad98d37..0000000
--- a/tests/compiler/dart2js/rti/data/closure_unneeded_strong.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:expect/expect.dart';
-
-/*class: A:*/
-class A<T> {
-  @NoInline()
-  m() {
-    return /**/ (int i, String s) {};
-  }
-}
-
-@NoInline()
-test(o) => o is void Function(int);
-
-main() {
-  test(new A<int>().m());
-}
diff --git a/tests/compiler/dart2js/rti/data/dynamic_is_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_is.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_is_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_is.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_is2_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_is2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_is2_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_is2.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_is_closure_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_is_closure.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_is_closure_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_is_closure.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_is_closure2_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_is_closure2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_is_closure2_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_is_closure2.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_not_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_not.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_not_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_not.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_not2_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_not2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_not2_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_not2.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_not_closure_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_not_closure.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_not_closure_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_not_closure.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_not_closure2_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_not_closure2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_not_closure2_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_not_closure2.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_tear_off_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_tear_off.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_tear_off_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_tear_off.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_tear_off2_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_tear_off2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_tear_off2_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_tear_off2.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_tear_off3_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_tear_off3.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_tear_off3_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_tear_off3.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_tear_off4_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_tear_off4.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_tear_off4_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_tear_off4.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_type_literal_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_type_literal.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_type_literal_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_type_literal.dart
diff --git a/tests/compiler/dart2js/rti/data/dynamic_type_literal2_strong.dart b/tests/compiler/dart2js/rti/data/dynamic_type_literal2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/dynamic_type_literal2_strong.dart
rename to tests/compiler/dart2js/rti/data/dynamic_type_literal2.dart
diff --git a/tests/compiler/dart2js/rti/data/explicit_as.dart b/tests/compiler/dart2js/rti/data/explicit_as.dart
new file mode 100644
index 0000000..a90140a
--- /dev/null
+++ b/tests/compiler/dart2js/rti/data/explicit_as.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*strong.class: C:direct,explicit=[C.T,C<String>],needsArgs*/
+/*omit.class: C:*/
+class C<T> {
+  T field;
+}
+
+main() {
+  explicitAs(new C<String>());
+}
+
+explicitAs(C<String> i) {
+  // ignore: unnecessary_cast
+  return i as C<String>;
+}
diff --git a/tests/compiler/dart2js/rti/data/future_or_strong.dart b/tests/compiler/dart2js/rti/data/future_or.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/future_or_strong.dart
rename to tests/compiler/dart2js/rti/data/future_or.dart
diff --git a/tests/compiler/dart2js/rti/data/future_or_future_or_strong.dart b/tests/compiler/dart2js/rti/data/future_or_future_or.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/future_or_future_or_strong.dart
rename to tests/compiler/dart2js/rti/data/future_or_future_or.dart
diff --git a/tests/compiler/dart2js/rti/data/future_or_future_or_generic_strong.dart b/tests/compiler/dart2js/rti/data/future_or_future_or_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/future_or_future_or_generic_strong.dart
rename to tests/compiler/dart2js/rti/data/future_or_future_or_generic.dart
diff --git a/tests/compiler/dart2js/rti/data/future_or_generic_strong.dart b/tests/compiler/dart2js/rti/data/future_or_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/future_or_generic_strong.dart
rename to tests/compiler/dart2js/rti/data/future_or_generic.dart
diff --git a/tests/compiler/dart2js/rti/data/future_or_generic2_strong.dart b/tests/compiler/dart2js/rti/data/future_or_generic2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/future_or_generic2_strong.dart
rename to tests/compiler/dart2js/rti/data/future_or_generic2.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_bounds_strong.dart b/tests/compiler/dart2js/rti/data/generic_bounds.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_bounds_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_bounds.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_closure_instantiate_strong.dart b/tests/compiler/dart2js/rti/data/generic_closure_instantiate.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_closure_instantiate_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_closure_instantiate.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_method1_strong.dart b/tests/compiler/dart2js/rti/data/generic_method1.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_method1_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_method1.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_method2_strong.dart b/tests/compiler/dart2js/rti/data/generic_method2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_method2_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_method2.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_method3_strong.dart b/tests/compiler/dart2js/rti/data/generic_method3.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_method3_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_method3.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_method4_strong.dart b/tests/compiler/dart2js/rti/data/generic_method4.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_method4_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_method4.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_method_is2_strong.dart b/tests/compiler/dart2js/rti/data/generic_method_is2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_method_is2_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_method_is2.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05_strong.dart b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_methods_dynamic_05_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_methods_dynamic_05.dart
diff --git a/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a_strong.dart b/tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a_strong.dart
rename to tests/compiler/dart2js/rti/data/generic_methods_dynamic_05a.dart
diff --git a/tests/compiler/dart2js/rti/data/implicit_as.dart b/tests/compiler/dart2js/rti/data/implicit_as.dart
new file mode 100644
index 0000000..59db5dc
--- /dev/null
+++ b/tests/compiler/dart2js/rti/data/implicit_as.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*strong.class: C:direct,explicit=[C.T,C<String>],needsArgs*/
+/*omit.class: C:*/
+class C<T> {
+  T field;
+}
+
+main() {
+  implicitAs(new C<String>());
+}
+
+C<String> implicitAs(C<String> i) {
+  dynamic j = i;
+  return j;
+}
diff --git a/tests/compiler/dart2js/rti/data/list_literal_strong.dart b/tests/compiler/dart2js/rti/data/list_literal.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/list_literal_strong.dart
rename to tests/compiler/dart2js/rti/data/list_literal.dart
diff --git a/tests/compiler/dart2js/rti/data/local_function_generic_strong.dart b/tests/compiler/dart2js/rti/data/local_function_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/local_function_generic_strong.dart
rename to tests/compiler/dart2js/rti/data/local_function_generic.dart
diff --git a/tests/compiler/dart2js/rti/data/local_function_list_literal_strong.dart b/tests/compiler/dart2js/rti/data/local_function_list_literal.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/local_function_list_literal_strong.dart
rename to tests/compiler/dart2js/rti/data/local_function_list_literal.dart
diff --git a/tests/compiler/dart2js/rti/data/local_function_map_literal_strong.dart b/tests/compiler/dart2js/rti/data/local_function_map_literal.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/local_function_map_literal_strong.dart
rename to tests/compiler/dart2js/rti/data/local_function_map_literal.dart
diff --git a/tests/compiler/dart2js/rti/data/local_function_signature2_strong.dart b/tests/compiler/dart2js/rti/data/local_function_signature2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/local_function_signature2_strong.dart
rename to tests/compiler/dart2js/rti/data/local_function_signature2.dart
diff --git a/tests/compiler/dart2js/rti/data/local_function_signatures_strong.dart b/tests/compiler/dart2js/rti/data/local_function_signatures_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/local_function_signatures_strong.dart
rename to tests/compiler/dart2js/rti/data/local_function_signatures_generic.dart
diff --git a/tests/compiler/dart2js/rti/data/map_literal_strong.dart b/tests/compiler/dart2js/rti/data/map_literal_strong.dart
deleted file mode 100644
index 92bb292..0000000
--- a/tests/compiler/dart2js/rti/data/map_literal_strong.dart
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/*strong.class: global#Map:explicit=[Map],indirect,needsArgs*/
-/*omit.class: global#Map:*/
-
-/*strong.class: global#LinkedHashMap:deps=[Map],direct,explicit=[LinkedHashMap<LinkedHashMap.K,LinkedHashMap.V>],implicit=[LinkedHashMap.K,LinkedHashMap.V],needsArgs*/
-/*omit.class: global#LinkedHashMap:deps=[Map]*/
-
-/*strong.class: global#JsLinkedHashMap:deps=[LinkedHashMap],direct,explicit=[JsLinkedHashMap.K,JsLinkedHashMap.V,void Function(JsLinkedHashMap.K,JsLinkedHashMap.V)],implicit=[JsLinkedHashMap.K,JsLinkedHashMap.V],needsArgs*/
-/*omit.class: global#JsLinkedHashMap:deps=[LinkedHashMap]*/
-
-/*strong.class: global#double:explicit=[double],implicit=[double]*/
-/*omit.class: global#double:explicit=[double]*/
-
-/*class: global#JSDouble:*/
-
-main() {
-  <int, double>{}[0] = 0.5;
-}
diff --git a/tests/compiler/dart2js/rti/data/method_signatures_strong.dart b/tests/compiler/dart2js/rti/data/method_signatures_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/method_signatures_strong.dart
rename to tests/compiler/dart2js/rti/data/method_signatures_generic.dart
diff --git a/tests/compiler/dart2js/rti/data/no_such_method1_strong.dart b/tests/compiler/dart2js/rti/data/no_such_method1.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/no_such_method1_strong.dart
rename to tests/compiler/dart2js/rti/data/no_such_method1.dart
diff --git a/tests/compiler/dart2js/rti/data/no_such_method2_strong.dart b/tests/compiler/dart2js/rti/data/no_such_method2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/no_such_method2_strong.dart
rename to tests/compiler/dart2js/rti/data/no_such_method2.dart
diff --git a/tests/compiler/dart2js/rti/data/no_such_method3_strong.dart b/tests/compiler/dart2js/rti/data/no_such_method3.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/no_such_method3_strong.dart
rename to tests/compiler/dart2js/rti/data/no_such_method3.dart
diff --git a/tests/compiler/dart2js/rti/data/private_dynamic_strong.dart b/tests/compiler/dart2js/rti/data/private_dynamic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/private_dynamic_strong.dart
rename to tests/compiler/dart2js/rti/data/private_dynamic.dart
diff --git a/tests/compiler/dart2js/rti/data/private_dynamic2_strong.dart b/tests/compiler/dart2js/rti/data/private_dynamic2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/private_dynamic2_strong.dart
rename to tests/compiler/dart2js/rti/data/private_dynamic2.dart
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string1_strong.dart b/tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string1.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string1_strong.dart
rename to tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string1.dart
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string2_strong.dart b/tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string2_strong.dart
rename to tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string2.dart
diff --git a/tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string3_strong.dart b/tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string3.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string3_strong.dart
rename to tests/compiler/dart2js/rti/data/runtime_type_instantiate_to_string3.dart
diff --git a/tests/compiler/dart2js/rti/data/tear_off_generic_strong.dart b/tests/compiler/dart2js/rti/data/tear_off_generic_strong.dart
deleted file mode 100644
index 24cc2ee..0000000
--- a/tests/compiler/dart2js/rti/data/tear_off_generic_strong.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/*strong.class: A:direct,explicit=[A.T],needsArgs*/
-/*omit.class: A:*/
-class A<T> {
-  /*strong.element: A.m:*/
-  /*omit.element: A.m:*/
-  void m(T t) {}
-
-  /*element: A.f:*/
-  void f(int t) {}
-}
-
-main() {
-  new A<int>().m is void Function(int);
-  new A<int>().f is void Function(int);
-}
diff --git a/tests/compiler/dart2js/rti/data/tear_off_strong.dart b/tests/compiler/dart2js/rti/data/tear_off_strong.dart
deleted file mode 100644
index 421d480..0000000
--- a/tests/compiler/dart2js/rti/data/tear_off_strong.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/*class: A:*/
-class A<T> {
-  /*element: A.m:*/
-  void m(String t) {}
-
-  /*element: A.f:*/
-  void f(int t) {}
-}
-
-main() {
-  new A<int>().m is void Function(int);
-  new A<int>().f is void Function(int);
-}
diff --git a/tests/compiler/dart2js/rti/data/type_literal_strong.dart b/tests/compiler/dart2js/rti/data/type_literal_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/data/type_literal_strong.dart
rename to tests/compiler/dart2js/rti/data/type_literal_generic.dart
diff --git a/tests/compiler/dart2js/rti/emission/call_strong.dart b/tests/compiler/dart2js/rti/emission/call.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/call_strong.dart
rename to tests/compiler/dart2js/rti/emission/call.dart
diff --git a/tests/compiler/dart2js/rti/emission/call_typed_strong.dart b/tests/compiler/dart2js/rti/emission/call_typed.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/call_typed_strong.dart
rename to tests/compiler/dart2js/rti/emission/call_typed.dart
diff --git a/tests/compiler/dart2js/rti/emission/call_typed_generic_strong.dart b/tests/compiler/dart2js/rti/emission/call_typed_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/call_typed_generic_strong.dart
rename to tests/compiler/dart2js/rti/emission/call_typed_generic.dart
diff --git a/tests/compiler/dart2js/rti/emission/constructor_argument_static_strong.dart b/tests/compiler/dart2js/rti/emission/constructor_argument_static.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/constructor_argument_static_strong.dart
rename to tests/compiler/dart2js/rti/emission/constructor_argument_static.dart
diff --git a/tests/compiler/dart2js/rti/emission/dynamic_instance_strong.dart b/tests/compiler/dart2js/rti/emission/dynamic_instance.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/dynamic_instance_strong.dart
rename to tests/compiler/dart2js/rti/emission/dynamic_instance.dart
diff --git a/tests/compiler/dart2js/rti/emission/dynamic_type_argument_strong.dart b/tests/compiler/dart2js/rti/emission/dynamic_type_argument.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/dynamic_type_argument_strong.dart
rename to tests/compiler/dart2js/rti/emission/dynamic_type_argument.dart
diff --git a/tests/compiler/dart2js/rti/emission/function_type_argument_strong.dart b/tests/compiler/dart2js/rti/emission/function_type_argument.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/function_type_argument_strong.dart
rename to tests/compiler/dart2js/rti/emission/function_type_argument.dart
diff --git a/tests/compiler/dart2js/rti/emission/future_or_strong.dart b/tests/compiler/dart2js/rti/emission/future_or.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/future_or_strong.dart
rename to tests/compiler/dart2js/rti/emission/future_or.dart
diff --git a/tests/compiler/dart2js/rti/emission/future_or_as_type_argument_strong.dart b/tests/compiler/dart2js/rti/emission/future_or_as_type_argument.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/future_or_as_type_argument_strong.dart
rename to tests/compiler/dart2js/rti/emission/future_or_as_type_argument.dart
diff --git a/tests/compiler/dart2js/rti/emission/future_or_future_or_strong.dart b/tests/compiler/dart2js/rti/emission/future_or_future_or.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/future_or_future_or_strong.dart
rename to tests/compiler/dart2js/rti/emission/future_or_future_or.dart
diff --git a/tests/compiler/dart2js/rti/emission/future_or_future_or_generic_strong.dart b/tests/compiler/dart2js/rti/emission/future_or_future_or_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/future_or_future_or_generic_strong.dart
rename to tests/compiler/dart2js/rti/emission/future_or_future_or_generic.dart
diff --git a/tests/compiler/dart2js/rti/emission/future_or_generic_strong.dart b/tests/compiler/dart2js/rti/emission/future_or_generic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/future_or_generic_strong.dart
rename to tests/compiler/dart2js/rti/emission/future_or_generic.dart
diff --git a/tests/compiler/dart2js/rti/emission/future_or_generic2_strong.dart b/tests/compiler/dart2js/rti/emission/future_or_generic2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/future_or_generic2_strong.dart
rename to tests/compiler/dart2js/rti/emission/future_or_generic2.dart
diff --git a/tests/compiler/dart2js/rti/emission/future_or_type_argument_strong.dart b/tests/compiler/dart2js/rti/emission/future_or_type_argument.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/future_or_type_argument_strong.dart
rename to tests/compiler/dart2js/rti/emission/future_or_type_argument.dart
diff --git a/tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02_strong.dart b/tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02_strong.dart
rename to tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02.dart
diff --git a/tests/compiler/dart2js/rti/emission/local_function_list_literal_strong.dart b/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/local_function_list_literal_strong.dart
rename to tests/compiler/dart2js/rti/emission/local_function_list_literal.dart
diff --git a/tests/compiler/dart2js/rti/emission/local_function_map_literal_strong.dart b/tests/compiler/dart2js/rti/emission/local_function_map_literal.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/local_function_map_literal_strong.dart
rename to tests/compiler/dart2js/rti/emission/local_function_map_literal.dart
diff --git a/tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string1_strong.dart b/tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string1.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string1_strong.dart
rename to tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string1.dart
diff --git a/tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string2_strong.dart b/tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string2.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string2_strong.dart
rename to tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string2.dart
diff --git a/tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string3_strong.dart b/tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string3.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string3_strong.dart
rename to tests/compiler/dart2js/rti/emission/runtime_type_instantiate_to_string3.dart
diff --git a/tests/compiler/dart2js/rti/emission/static_argument_strong.dart b/tests/compiler/dart2js/rti/emission/static_argument.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/static_argument_strong.dart
rename to tests/compiler/dart2js/rti/emission/static_argument.dart
diff --git a/tests/compiler/dart2js/rti/emission/type_argument_dynamic_strong.dart b/tests/compiler/dart2js/rti/emission/type_argument_dynamic.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/type_argument_dynamic_strong.dart
rename to tests/compiler/dart2js/rti/emission/type_argument_dynamic.dart
diff --git a/tests/compiler/dart2js/rti/emission/type_argument_static_strong.dart b/tests/compiler/dart2js/rti/emission/type_argument_static.dart
similarity index 100%
rename from tests/compiler/dart2js/rti/emission/type_argument_static_strong.dart
rename to tests/compiler/dart2js/rti/emission/type_argument_static.dart
diff --git a/tests/compiler/dart2js/rti/rti_emission_test.dart b/tests/compiler/dart2js/rti/rti_emission_test.dart
index ba12ff1..5b7e145 100644
--- a/tests/compiler/dart2js/rti/rti_emission_test.dart
+++ b/tests/compiler/dart2js/rti/rti_emission_test.dart
@@ -14,6 +14,7 @@
 import 'package:compiler/src/js_emitter/model.dart';
 import 'package:compiler/src/js_model/element_map.dart';
 import 'package:compiler/src/js_model/js_world.dart';
+import 'package:compiler/src/util/features.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../equivalence/id_equivalence.dart';
 import '../equivalence/id_equivalence_helper.dart';
@@ -23,8 +24,7 @@
   asyncTest(() async {
     Directory dataDir =
         new Directory.fromUri(Platform.script.resolve('emission'));
-    await checkTests(dataDir, const RtiEmissionDataComputer(),
-        args: args, testOmit: true);
+    await checkTests(dataDir, const RtiEmissionDataComputer(), args: args);
   });
 }
 
@@ -91,15 +91,15 @@
   }
 }
 
-class RtiEmissionDataComputer extends DataComputer {
+class RtiEmissionDataComputer extends DataComputer<String> {
   const RtiEmissionDataComputer();
 
   @override
   bool get computesClassData => true;
 
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -111,19 +111,23 @@
 
   @override
   void computeClassData(
-      Compiler compiler, ClassEntity cls, Map<Id, ActualData> actualMap,
+      Compiler compiler, ClassEntity cls, Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
     new RtiClassEmissionIrComputer(compiler, elementMap, actualMap)
         .computeClassValue(cls);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
-class RtiClassEmissionIrComputer extends DataRegistry with ComputeValueMixin {
+class RtiClassEmissionIrComputer extends DataRegistry<String>
+    with ComputeValueMixin {
   final Compiler compiler;
   final JsToElementMap _elementMap;
-  final Map<Id, ActualData> actualMap;
+  final Map<Id, ActualData<String>> actualMap;
 
   RtiClassEmissionIrComputer(this.compiler, this._elementMap, this.actualMap);
 
@@ -137,7 +141,7 @@
   }
 }
 
-class RtiMemberEmissionIrComputer extends IrDataExtractor
+class RtiMemberEmissionIrComputer extends IrDataExtractor<String>
     with ComputeValueMixin {
   final JsToElementMap _elementMap;
   final ClosureData _closureDataLookup;
@@ -145,7 +149,7 @@
 
   RtiMemberEmissionIrComputer(
       DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap,
+      Map<Id, ActualData<String>> actualMap,
       this._elementMap,
       MemberEntity member,
       this.compiler,
diff --git a/tests/compiler/dart2js/rti/rti_need_test_helper.dart b/tests/compiler/dart2js/rti/rti_need_test_helper.dart
index 29bbaa1..f601ebc 100644
--- a/tests/compiler/dart2js/rti/rti_need_test_helper.dart
+++ b/tests/compiler/dart2js/rti/rti_need_test_helper.dart
@@ -20,6 +20,7 @@
 import 'package:compiler/src/universe/feature.dart';
 import 'package:compiler/src/universe/resolution_world_builder.dart';
 import 'package:compiler/src/universe/selector.dart';
+import 'package:compiler/src/util/features.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../equivalence/check_helpers.dart';
 import '../equivalence/id_equivalence.dart';
@@ -35,7 +36,6 @@
     await checkTests(dataDir, const RtiNeedDataComputer(),
         options: [],
         args: args,
-        testOmit: true,
         shardIndex: shardIndex ?? 0,
         shards: shardIndex != null ? 2 : 1);
   });
@@ -230,7 +230,7 @@
   }
 }
 
-class RtiNeedDataComputer extends DataComputer {
+class RtiNeedDataComputer extends DataComputer<String> {
   const RtiNeedDataComputer();
 
   @override
@@ -240,8 +240,8 @@
   ///
   /// Fills [actualMap] with the data.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
@@ -256,13 +256,16 @@
   /// Fills [actualMap] with the data.
   @override
   void computeClassData(
-      Compiler compiler, ClassEntity cls, Map<Id, ActualData> actualMap,
+      Compiler compiler, ClassEntity cls, Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
     new RtiClassNeedIrComputer(compiler, elementMap, actualMap)
         .computeClassValue(cls);
   }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 abstract class IrMixin implements ComputeValueMixin {
@@ -313,11 +316,11 @@
   }
 }
 
-class RtiClassNeedIrComputer extends DataRegistry
+class RtiClassNeedIrComputer extends DataRegistry<String>
     with ComputeValueMixin, IrMixin {
   final Compiler compiler;
   final JsToElementMap _elementMap;
-  final Map<Id, ActualData> actualMap;
+  final Map<Id, ActualData<String>> actualMap;
 
   RtiClassNeedIrComputer(this.compiler, this._elementMap, this.actualMap);
 
@@ -332,7 +335,7 @@
 }
 
 /// AST visitor for computing inference data for a member.
-class RtiMemberNeedIrComputer extends IrDataExtractor
+class RtiMemberNeedIrComputer extends IrDataExtractor<String>
     with ComputeValueMixin, IrMixin {
   final JsToElementMap _elementMap;
   final ClosureData _closureDataLookup;
@@ -340,7 +343,7 @@
 
   RtiMemberNeedIrComputer(
       DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap,
+      Map<Id, ActualData<String>> actualMap,
       this._elementMap,
       MemberEntity member,
       this.compiler,
diff --git a/tests/compiler/dart2js/serialization/serialization_test_helper.dart b/tests/compiler/dart2js/serialization/serialization_test_helper.dart
index ad0ddfd..9f48d01 100644
--- a/tests/compiler/dart2js/serialization/serialization_test_helper.dart
+++ b/tests/compiler/dart2js/serialization/serialization_test_helper.dart
@@ -4,8 +4,8 @@
 
 import 'package:compiler/compiler_new.dart';
 import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/inferrer/types.dart';
 import 'package:compiler/src/serialization/strategies.dart';
-import 'package:compiler/src/types/types.dart';
 import 'package:expect/expect.dart';
 import 'package:kernel/ast.dart' as ir;
 import '../helpers/memory_compiler.dart';
diff --git a/tests/compiler/dart2js/sourcemaps/minified/no_such_method3.dart b/tests/compiler/dart2js/sourcemaps/minified/no_such_method3.dart
new file mode 100644
index 0000000..f28344a
--- /dev/null
+++ b/tests/compiler/dart2js/sourcemaps/minified/no_such_method3.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.
+
+// Error pattern: NoSuchMethodError: method not found: '([^']*)' .*
+// Kind of minified name: instance
+// Expected deobfuscated name: g1
+
+import 'package:expect/expect.dart';
+
+main() {
+  try {
+    confuse(new A());
+    dynamic x = confuse(new B());
+    x.g1;
+  } catch (e) {
+    throw e;
+  }
+}
+
+@AssumeDynamic()
+@NoInline()
+confuse(x) => x;
+
+class A {
+  int get g1 => 0;
+}
+
+class B {}
diff --git a/tests/compiler/dart2js/sourcemaps/minified/no_such_method4.dart b/tests/compiler/dart2js/sourcemaps/minified/no_such_method4.dart
new file mode 100644
index 0000000..a8949f0
--- /dev/null
+++ b/tests/compiler/dart2js/sourcemaps/minified/no_such_method4.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.
+
+// Error pattern: NoSuchMethodError: method not found: '([^']*)' .*
+// Kind of minified name: instance
+// Expected deobfuscated name: g1=
+
+import 'package:expect/expect.dart';
+
+main() {
+  try {
+    confuse(new A());
+    dynamic x = confuse(new B());
+    x.g1 = 0;
+  } catch (e) {
+    throw e;
+  }
+}
+
+@AssumeDynamic()
+@NoInline()
+confuse(x) => x;
+
+class A {
+  set g1(int x) {}
+}
+
+class B {}
diff --git a/tests/compiler/dart2js/static_type/data/assert.dart b/tests/compiler/dart2js/static_type/data/assert.dart
index d4d5f87..0f0057e 100644
--- a/tests/compiler/dart2js/static_type/data/assert.dart
+++ b/tests/compiler/dart2js/static_type/data/assert.dart
@@ -8,11 +8,59 @@
 
 main() {
   assert1(null);
+  assert2(null);
+  assert3(null);
+  assert4(null);
+  assert5(null);
+  assert6(null);
+  assert7(null);
+  assert8(null);
 }
 
 assert1(Class c) {
+  assert(/*Class*/ c /*invoke: bool*/ != null);
+  /*Class*/ c.next;
+}
+
+assert2(Class c) {
+  assert(/*Class*/ c /*invoke: bool*/ == null);
+  /*Class*/ c.next;
+}
+
+assert3(Class c) {
   bool b;
   assert(/*Class*/ c /*invoke: bool*/ != null);
   if (/*bool*/ b) return;
   /*Class*/ c.next;
 }
+
+assert4(Class c) {
+  bool b;
+  assert(/*Class*/ c /*invoke: bool*/ == null);
+  if (/*bool*/ b) return;
+  /*Class*/ c.next;
+}
+
+assert5(dynamic c) {
+  assert(/*dynamic*/ c is Class);
+  /*dynamic*/ c.next;
+}
+
+assert6(dynamic c) {
+  assert(/*dynamic*/ c is! Class);
+  /*dynamic*/ c.next;
+}
+
+assert7(dynamic c) {
+  bool b;
+  assert(/*dynamic*/ c is Class);
+  if (/*bool*/ b) return;
+  /*dynamic*/ c.next;
+}
+
+assert8(dynamic c) {
+  bool b;
+  assert(/*dynamic*/ c is! Class);
+  if (/*bool*/ b) return;
+  /*dynamic*/ c.next;
+}
diff --git a/tests/compiler/dart2js/static_type/data/assert_ea.dart b/tests/compiler/dart2js/static_type/data/assert_ea.dart
new file mode 100644
index 0000000..9e6edbd
--- /dev/null
+++ b/tests/compiler/dart2js/static_type/data/assert_ea.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Class {
+  Class next;
+}
+
+main() {
+  assert1(null);
+  assert2(null);
+  assert3(null);
+  assert4(null);
+  assert5(null);
+  assert6(null);
+  assert7(null);
+  assert8(null);
+}
+
+assert1(Class c) {
+  assert(/*Class*/ c /*invoke: bool*/ != null);
+  /*Class*/ c.next;
+}
+
+assert2(Class c) {
+  assert(/*Class*/ c /*invoke: bool*/ == null);
+  /*Null*/ c.next;
+}
+
+assert3(Class c) {
+  bool b;
+  assert(/*Class*/ c /*invoke: bool*/ != null);
+  if (/*bool*/ b) return;
+  /*Class*/ c.next;
+}
+
+assert4(Class c) {
+  bool b;
+  assert(/*Class*/ c /*invoke: bool*/ == null);
+  if (/*bool*/ b) return;
+  /*Null*/ c.next;
+}
+
+assert5(dynamic c) {
+  assert(/*dynamic*/ c is Class);
+  /*Class*/ c.next;
+}
+
+assert6(dynamic c) {
+  assert(/*dynamic*/ c is! Class);
+  /*dynamic*/ c.next;
+}
+
+assert7(dynamic c) {
+  bool b;
+  assert(/*dynamic*/ c is Class);
+  if (/*bool*/ b) return;
+  /*Class*/ c.next;
+}
+
+assert8(dynamic c) {
+  bool b;
+  assert(/*dynamic*/ c is! Class);
+  if (/*bool*/ b) return;
+  /*dynamic*/ c.next;
+}
diff --git a/tests/compiler/dart2js/static_type/data/closure.dart b/tests/compiler/dart2js/static_type/data/closure.dart
index 7481aaf..b8768de 100644
--- a/tests/compiler/dart2js/static_type/data/closure.dart
+++ b/tests/compiler/dart2js/static_type/data/closure.dart
@@ -16,11 +16,11 @@
 
 closure1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     local() {
       /*dynamic*/ c.next;
       if (/*dynamic*/ c is Class) {
-        /*dynamic*/ c.next;
+        /*Class*/ c.next;
       }
       c = 0;
     }
@@ -46,7 +46,7 @@
 
 closure3(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     local() {
       /*dynamic*/ c.next;
     }
@@ -60,7 +60,7 @@
 
 closure4(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     local() {
       /*dynamic*/ c.next;
     }
@@ -78,7 +78,7 @@
   local() {
     /*dynamic*/ c.next;
     if (/*dynamic*/ c is! Class) return;
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
   }
 
   /*dynamic*/ c.next;
diff --git a/tests/compiler/dart2js/static_type/data/do.dart b/tests/compiler/dart2js/static_type/data/do.dart
index f24a980..205480d 100644
--- a/tests/compiler/dart2js/static_type/data/do.dart
+++ b/tests/compiler/dart2js/static_type/data/do.dart
@@ -13,7 +13,7 @@
 
 do1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     do {
       /*dynamic*/ c.next;
       if (/*dynamic*/ c is Class) {
diff --git a/tests/compiler/dart2js/static_type/data/for.dart b/tests/compiler/dart2js/static_type/data/for.dart
index 39ee89a..d755de9 100644
--- a/tests/compiler/dart2js/static_type/data/for.dart
+++ b/tests/compiler/dart2js/static_type/data/for.dart
@@ -15,8 +15,8 @@
 
 for1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
-    for (/*dynamic*/ c.next;
+    /*Class*/ c.next;
+    for (/*Class*/ c.next;
         /*dynamic*/ c /*invoke: bool*/ != null;
         /*dynamic*/ c.next) {
       /*dynamic*/ c.next;
@@ -44,7 +44,7 @@
 for3(dynamic c) {
   /*dynamic*/ c.next;
   for (/*dynamic*/ c.next; /*dynamic*/ c is Class; /*dynamic*/ c.next) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     c = 0;
     if (/*dynamic*/ c is Class) {
       /*Class*/ c.next;
@@ -55,8 +55,8 @@
 
 for4(dynamic c) {
   /*dynamic*/ c.next;
-  for (/*dynamic*/ c.next; /*dynamic*/ c is Class; /*dynamic*/ c.next) {
-    /*dynamic*/ c.next;
+  for (/*dynamic*/ c.next; /*dynamic*/ c is Class; /*Class*/ c.next) {
+    /*Class*/ c.next;
   }
   /*dynamic*/ c.next;
 }
diff --git a/tests/compiler/dart2js/static_type/data/for_in.dart b/tests/compiler/dart2js/static_type/data/for_in.dart
index a6bc326..3168538 100644
--- a/tests/compiler/dart2js/static_type/data/for_in.dart
+++ b/tests/compiler/dart2js/static_type/data/for_in.dart
@@ -13,9 +13,9 @@
 
 forIn1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     // ignore: unused_local_variable
-    for (var b in /*dynamic*/ c.next) {
+    for (var b in /*Class*/ c.next) {
       /*dynamic*/ c.next;
       if (/*dynamic*/ c is Class) {
         /*Class*/ c.next;
diff --git a/tests/compiler/dart2js/static_type/data/generic_method.dart b/tests/compiler/dart2js/static_type/data/generic_method.dart
index 0af8ea4..99a2f17 100644
--- a/tests/compiler/dart2js/static_type/data/generic_method.dart
+++ b/tests/compiler/dart2js/static_type/data/generic_method.dart
@@ -25,7 +25,7 @@
 
 genericMethod2(c) {
   if (/*dynamic*/ c is! Class1) return;
-  /*dynamic*/ c. /*invoke: dynamic*/ method('').length;
+  /*Class1*/ c. /*invoke: dynamic*/ method('').length;
 }
 
 genericMethod3() {
diff --git a/tests/compiler/dart2js/static_type/data/if.dart b/tests/compiler/dart2js/static_type/data/if.dart
index c0eb5e2..20c3f9b 100644
--- a/tests/compiler/dart2js/static_type/data/if.dart
+++ b/tests/compiler/dart2js/static_type/data/if.dart
@@ -49,17 +49,17 @@
       /*Class*/ c2.next;
     } else {
       /*Class*/ c1.next;
-      /*Class*/ c2.next;
+      /*Null*/ c2.next;
     }
   } else {
-    /*Class*/ c1.next;
+    /*Null*/ c1.next;
     /*Class*/ c2.next;
     if (/*Class*/ c2 is Class) {
-      /*Class*/ c1.next;
+      /*Null*/ c1.next;
       /*Class*/ c2.next;
     } else {
-      /*Class*/ c1.next;
-      /*Class*/ c2.next;
+      /*Null*/ c1.next;
+      /*Null*/ c2.next;
     }
   }
 }
@@ -75,17 +75,17 @@
       /*dynamic*/ c2.next;
     } else {
       /*dynamic*/ c1.next;
-      /*dynamic*/ c2.next;
+      /*Class*/ c2.next;
     }
   } else {
-    /*dynamic*/ c1.next;
+    /*Class*/ c1.next;
     /*dynamic*/ c2.next;
     if (/*dynamic*/ c2 is! Class) {
-      /*dynamic*/ c1.next;
+      /*Class*/ c1.next;
       /*dynamic*/ c2.next;
     } else {
-      /*dynamic*/ c1.next;
-      /*dynamic*/ c2.next;
+      /*Class*/ c1.next;
+      /*Class*/ c2.next;
     }
   }
 }
diff --git a/tests/compiler/dart2js/static_type/data/null.dart b/tests/compiler/dart2js/static_type/data/null.dart
index 1482e68..c0b9386 100644
--- a/tests/compiler/dart2js/static_type/data/null.dart
+++ b/tests/compiler/dart2js/static_type/data/null.dart
@@ -36,7 +36,7 @@
 
 null4(dynamic c) {
   if (/*dynamic*/ c /*invoke: bool*/ != null) return;
-  /*dynamic*/ c.next;
+  /*Null*/ c.next;
 }
 
 null5(dynamic c) {
@@ -47,7 +47,7 @@
 
 null6(dynamic c) {
   if (/*dynamic*/ c /*invoke: bool*/ == null) {
-    /*dynamic*/ c.next;
+    /*Null*/ c.next;
   }
 }
 
@@ -59,6 +59,6 @@
 
 null8(dynamic c) {
   while (/*dynamic*/ c /*invoke: bool*/ == null) {
-    /*dynamic*/ c.next;
+    /*Null*/ c.next;
   }
 }
diff --git a/tests/compiler/dart2js/static_type/data/switch.dart b/tests/compiler/dart2js/static_type/data/switch.dart
index 84c86d7..7b88d11 100644
--- a/tests/compiler/dart2js/static_type/data/switch.dart
+++ b/tests/compiler/dart2js/static_type/data/switch.dart
@@ -14,8 +14,8 @@
 
 switch1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
-    switch (/*dynamic*/ c) {
+    /*Class*/ c.next;
+    switch (/*Class*/ c) {
       label:
       case 0:
         /*dynamic*/ c.next;
@@ -34,13 +34,13 @@
 
 switch2(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
-    switch (/*dynamic*/ c) {
+    /*Class*/ c.next;
+    switch (/*Class*/ c) {
       case 0:
-        /*dynamic*/ c.next;
+        /*Class*/ c.next;
         break;
       case 1:
-        /*dynamic*/ c.next;
+        /*Class*/ c.next;
         c = 0;
         break;
     }
@@ -53,7 +53,7 @@
   switch (/*dynamic*/ c) {
     case 0:
       if (/*dynamic*/ c is! Class) return;
-      /*dynamic*/ c.next;
+      /*Class*/ c.next;
       break;
     case 1:
       /*dynamic*/ c.next;
diff --git a/tests/compiler/dart2js/static_type/data/try_catch.dart b/tests/compiler/dart2js/static_type/data/try_catch.dart
index 05f0be3..b4680d7 100644
--- a/tests/compiler/dart2js/static_type/data/try_catch.dart
+++ b/tests/compiler/dart2js/static_type/data/try_catch.dart
@@ -13,9 +13,9 @@
 
 tryCatch1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     try {
-      /*dynamic*/ c.next;
+      /*Class*/ c.next;
       c = 0;
       if (/*dynamic*/ c is Class) {
         /*Class*/ c.next;
diff --git a/tests/compiler/dart2js/static_type/data/try_finally.dart b/tests/compiler/dart2js/static_type/data/try_finally.dart
index a2b4d2c..62d0822 100644
--- a/tests/compiler/dart2js/static_type/data/try_finally.dart
+++ b/tests/compiler/dart2js/static_type/data/try_finally.dart
@@ -13,9 +13,9 @@
 
 tryFinally1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     try {
-      /*dynamic*/ c.next;
+      /*Class*/ c.next;
       c = 0;
       if (/*dynamic*/ c is Class) {
         /*Class*/ c.next;
diff --git a/tests/compiler/dart2js/static_type/data/while.dart b/tests/compiler/dart2js/static_type/data/while.dart
index d6e10a7..e646074 100644
--- a/tests/compiler/dart2js/static_type/data/while.dart
+++ b/tests/compiler/dart2js/static_type/data/while.dart
@@ -23,7 +23,7 @@
 
 while1(dynamic c) {
   if (/*dynamic*/ c is Class) {
-    /*dynamic*/ c.next;
+    /*Class*/ c.next;
     while (/*dynamic*/ c /*invoke: bool*/ != null) {
       /*dynamic*/ c.next;
       if (/*dynamic*/ c is Class) {
@@ -93,10 +93,10 @@
     GenericClass<T> c;
     while (/*GenericClass<T>*/ c /*invoke: bool*/ == null) {
       if (/*bool*/ b) {
-        GenericClass<T> next = /*GenericClass<T>*/ c.next;
+        GenericClass<T> next = /*Null*/ c.next;
         c = /*GenericClass<T>*/ next;
       } else {
-        c = /*GenericClass<T>*/ c.next;
+        c = /*Null*/ c.next;
       }
     }
     return /*GenericClass<T>*/ c;
diff --git a/tests/compiler/dart2js/static_type/static_type_test.dart b/tests/compiler/dart2js/static_type/static_type_test.dart
index 43c4078..070d0f6 100644
--- a/tests/compiler/dart2js/static_type/static_type_test.dart
+++ b/tests/compiler/dart2js/static_type/static_type_test.dart
@@ -17,32 +17,24 @@
 import 'package:kernel/type_environment.dart' as ir;
 import '../equivalence/id_equivalence.dart';
 import '../equivalence/id_equivalence_helper.dart';
+import '../helpers/ir_types.dart';
 
 main(List<String> args) {
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
     await checkTests(dataDir, new StaticTypeDataComputer(),
-        args: args, testFrontend: true);
+        args: args, testOmit: false, testFrontend: true);
   });
 }
 
-class Tags {
-  static const String typeUse = 'type';
-  static const String staticUse = 'static';
-  static const String dynamicUse = 'dynamic';
-  static const String constantUse = 'constant';
-  static const String runtimeTypeUse = 'runtimeType';
-}
-
-class StaticTypeDataComputer extends DataComputer {
+class StaticTypeDataComputer extends DataComputer<String> {
   ir.TypeEnvironment _typeEnvironment;
 
   ir.TypeEnvironment getTypeEnvironment(KernelToElementMapImpl elementMap) {
     if (_typeEnvironment == null) {
       ir.Component component = elementMap.env.mainComponent;
       _typeEnvironment = new ir.TypeEnvironment(
-          new ir.CoreTypes(component), new ir.ClassHierarchy(component),
-          strongMode: true);
+          new ir.CoreTypes(component), new ir.ClassHierarchy(component));
     }
     return _typeEnvironment;
   }
@@ -51,13 +43,13 @@
   ///
   /// Fills [actualMap] with the data.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
     KernelToElementMapImpl elementMap = frontendStrategy.elementMap;
     Map<ir.TreeNode, ir.DartType> staticTypeCache =
-        elementMap.staticTypeCacheForTesting[member];
+        elementMap.getCachedStaticTypes(member);
     ir.Member node = elementMap.getMemberNode(member);
     new StaticTypeIrComputer(
             compiler.reporter,
@@ -66,133 +58,19 @@
                 getTypeEnvironment(elementMap), staticTypeCache))
         .run(node);
   }
-}
-
-class TypeTextVisitor implements ir.DartTypeVisitor1<void, StringBuffer> {
-  const TypeTextVisitor();
 
   @override
-  void defaultDartType(ir.DartType node, StringBuffer sb) {
-    throw new UnsupportedError("Unhandled type $node (${node.runtimeType}).");
-  }
-
-  void writeType(ir.DartType type, StringBuffer sb) {
-    type.accept1(this, sb);
-  }
-
-  void _writeTypes(List<ir.DartType> types, StringBuffer sb) {
-    String comma = '';
-    for (ir.DartType type in types) {
-      sb.write(comma);
-      writeType(type, sb);
-      comma = ',';
-    }
-  }
-
-  void _writeTypeArguments(List<ir.DartType> typeArguments, StringBuffer sb) {
-    if (typeArguments.isNotEmpty) {
-      sb.write('<');
-      _writeTypes(typeArguments, sb);
-      sb.write('>');
-    }
-  }
-
-  @override
-  void visitTypedefType(ir.TypedefType node, StringBuffer sb) {
-    sb.write(node.typedefNode.name);
-    _writeTypeArguments(node.typeArguments, sb);
-  }
-
-  @override
-  void visitTypeParameterType(ir.TypeParameterType node, StringBuffer sb) {
-    sb.write(node.parameter.name);
-  }
-
-  @override
-  void visitFunctionType(ir.FunctionType node, StringBuffer sb) {
-    writeType(node.returnType, sb);
-    sb.write(' Function');
-    if (node.typeParameters.isNotEmpty) {
-      sb.write('<');
-      String comma = '';
-      for (ir.TypeParameter typeParameter in node.typeParameters) {
-        sb.write(comma);
-        sb.write(typeParameter.name);
-        if (typeParameter is! ir.DynamicType) {
-          sb.write(' extends ');
-          writeType(typeParameter.bound, sb);
-        }
-        comma = ',';
-      }
-      sb.write('>');
-    }
-    sb.write('(');
-    _writeTypes(
-        node.positionalParameters.take(node.requiredParameterCount), sb);
-    if (node.requiredParameterCount < node.positionalParameters.length) {
-      if (node.requiredParameterCount > 0) {
-        sb.write(',');
-      }
-      _writeTypes(
-          node.positionalParameters.skip(node.requiredParameterCount), sb);
-    }
-    if (node.namedParameters.isNotEmpty) {
-      if (node.positionalParameters.isNotEmpty) {
-        sb.write(',');
-      }
-      String comma = '';
-      for (ir.NamedType namedType in node.namedParameters) {
-        sb.write(comma);
-        sb.write(namedType.name);
-        sb.write(': ');
-        writeType(namedType.type, sb);
-        comma = ',';
-      }
-    }
-    sb.write(')');
-  }
-
-  @override
-  void visitInterfaceType(ir.InterfaceType node, StringBuffer sb) {
-    sb.write(node.classNode.name);
-    _writeTypeArguments(node.typeArguments, sb);
-  }
-
-  @override
-  void visitBottomType(ir.BottomType node, StringBuffer sb) {
-    sb.write('<bottom>');
-  }
-
-  @override
-  void visitVoidType(ir.VoidType node, StringBuffer sb) {
-    sb.write('void');
-  }
-
-  @override
-  void visitDynamicType(ir.DynamicType node, StringBuffer sb) {
-    sb.write('dynamic');
-  }
-
-  @override
-  void visitInvalidType(ir.InvalidType node, StringBuffer sb) {
-    sb.write('<invalid>');
-  }
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
 }
 
 /// IR visitor for computing inference data for a member.
-class StaticTypeIrComputer extends IrDataExtractor {
+class StaticTypeIrComputer extends IrDataExtractor<String> {
   final CachedStaticType staticTypeCache;
 
   StaticTypeIrComputer(DiagnosticReporter reporter,
-      Map<Id, ActualData> actualMap, this.staticTypeCache)
+      Map<Id, ActualData<String>> actualMap, this.staticTypeCache)
       : super(reporter, actualMap);
 
-  String getStaticTypeValue(ir.DartType type) {
-    StringBuffer sb = new StringBuffer();
-    const TypeTextVisitor().writeType(type, sb);
-    return sb.toString();
-  }
-
   @override
   String computeMemberValue(Id id, ir.Member node) {
     return null;
@@ -201,7 +79,7 @@
   @override
   String computeNodeValue(Id id, ir.TreeNode node) {
     if (node is ir.VariableGet || node is ir.MethodInvocation) {
-      return getStaticTypeValue(node.accept(staticTypeCache));
+      return typeToText(node.accept(staticTypeCache));
     }
     return null;
   }
diff --git a/tests/compiler/dart2js/static_type/type_promotion_data/equals.dart b/tests/compiler/dart2js/static_type/type_promotion_data/equals.dart
new file mode 100644
index 0000000..17df94a
--- /dev/null
+++ b/tests/compiler/dart2js/static_type/type_promotion_data/equals.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2019, 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.
+
+bool equals(e1, e2, bool unordered) {
+  if (/*{}*/ e1 is Set) {
+    return /*{e1:[{true:Set<dynamic>}|Set<dynamic>]}*/
+        e2 is Set &&
+            /*{
+             e1:[{true:Set<dynamic>}|Set<dynamic>],
+             e2:[{true:Set<dynamic>}|Set<dynamic>]}
+            */
+            e1 == null;
+  }
+  if (/*{e1:[{false:Set<dynamic>}|Set<dynamic>]}*/ e1 is Map) {
+    return
+        /*{e1:[{true:Map<dynamic,dynamic>,false:Set<dynamic>}|Set<dynamic>,Map<dynamic,dynamic>]}*/
+        e2 is Map &&
+            /*{
+             e1:[{true:Map<dynamic,dynamic>,false:Set<dynamic>}|Set<dynamic>,Map<dynamic,dynamic>],
+             e2:[{true:Map<dynamic,dynamic>}|Map<dynamic,dynamic>]}
+            */
+            e1 == null;
+  }
+  if (! /*{e1:[{false:Set<dynamic>,Map<dynamic,dynamic>}|Set<dynamic>,Map<dynamic,dynamic>]}*/
+      unordered) {
+    if (/*{e1:[{false:Set<dynamic>,Map<dynamic,dynamic>}|Set<dynamic>,Map<dynamic,dynamic>]}*/
+        e1 is List) {
+      return
+          /*{e1:[{true:List<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>]}*/
+          e2 is List &&
+              /*{
+               e1:[{true:List<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>],
+               e2:[{true:List<dynamic>}|List<dynamic>]}
+              */
+              e1 == null;
+    }
+    if (/*{e1:[{false:Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>]}*/
+        e1 is Iterable) {
+      return
+          /*{e1:[{true:Iterable<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>,Iterable<dynamic>]}*/
+          e2 is Iterable &&
+              /*{
+               e1:[{true:Iterable<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,List<dynamic>,Iterable<dynamic>],
+               e2:[{true:Iterable<dynamic>}|Iterable<dynamic>]}
+              */
+              e1 == null;
+    }
+  } else if (/*{e1:[{false:Set<dynamic>,Map<dynamic,dynamic>}|Set<dynamic>,Map<dynamic,dynamic>]}*/
+      e1 is Iterable) {
+    if (
+        /*{e1:[{true:Iterable<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,Iterable<dynamic>]}*/
+        e1 is List !=
+            /*{e1:[{true:Iterable<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,Iterable<dynamic>]}*/
+            e2 is List) {
+      return
+          /*{e1:[{true:Iterable<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>}|Iterable<dynamic>,Set<dynamic>,Map<dynamic,dynamic>]}*/
+          e1 == null;
+    }
+    return /*{e1:[{true:Iterable<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>}|Iterable<dynamic>,Set<dynamic>,Map<dynamic,dynamic>]}*/
+        e2 is Iterable &&
+
+            /*{
+             e1:[{true:Iterable<dynamic>,false:Set<dynamic>,Map<dynamic,dynamic>}|Iterable<dynamic>,Set<dynamic>,Map<dynamic,dynamic>],
+             e2:[{true:Iterable<dynamic>}|Iterable<dynamic>]}
+            */
+            e1 == null;
+  }
+  return
+      /*{e1:[{false:Set<dynamic>,Map<dynamic,dynamic>,Iterable<dynamic>}|Set<dynamic>,Map<dynamic,dynamic>,Iterable<dynamic>]}*/
+      e1 == null;
+}
+
+main() {
+  equals(null, null, true);
+}
diff --git a/tests/compiler/dart2js/static_type/type_promotion_data/if.dart b/tests/compiler/dart2js/static_type/type_promotion_data/if.dart
new file mode 100644
index 0000000..5c54faa
--- /dev/null
+++ b/tests/compiler/dart2js/static_type/type_promotion_data/if.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {}
+
+class B {}
+
+main() {
+  ifThen(null);
+  ifThenSequence(null);
+  ifThenElse(null);
+  ifThenElseSequence(null);
+  ifNotReturn(null);
+  nestedIf(null);
+  nestedIf2(null);
+  nestedIfNotReturn(null);
+}
+
+ifThen(o) {
+  /*{}*/ o;
+  if (/*{}*/ o is A) {
+    /*{o:[{true:A}|A]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+ifThenSequence(o) {
+  /*{}*/ o;
+  if (/*{}*/ o is A) {
+    /*{o:[{true:A}|A]}*/ o;
+  }
+  /*{}*/ o;
+  if (/*{}*/ o is B) {
+    /*{o:[{true:B}|B]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+ifThenElse(o) {
+  /*{}*/ o;
+  if (/*{}*/ o is A) {
+    /*{o:[{true:A}|A]}*/ o;
+  } else {
+    /*{o:[{false:A}|A]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+ifThenElseSequence(o) {
+  /*{}*/ o;
+  if (/*{}*/ o is A) {
+    /*{o:[{true:A}|A]}*/ o;
+  } else {
+    /*{o:[{false:A}|A]}*/ o;
+  }
+  /*{}*/ o;
+  if (/*{}*/ o is B) {
+    /*{o:[{true:B}|B]}*/ o;
+  } else {
+    /*{o:[{false:B}|B]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+ifNotReturn(o) {
+  /*{}*/ o;
+  if (/*{}*/ o is! A) {
+    return /*{o:[{false:A}|A]}*/ o;
+  }
+  /*{o:[{true:A}|A]}*/ o;
+}
+
+nestedIf(o) {
+  if (/*{}*/ o is A) {
+    if (/*{o:[{true:A}|A]}*/ o is B) {
+      return /*{o:[{true:A,B}|A,B]}*/ o;
+    }
+  }
+  /*{}*/ o;
+}
+
+nestedIf2(o) {
+  if (/*{}*/ o is A) {
+    if (/*{o:[{true:A}|A]}*/ o is B) {
+      return /*{o:[{true:A,B}|A,B]}*/ o;
+    }
+  } else if (/*{o:[{false:A}|A]}*/ o is B) {
+    /*{o:[{true:B,false:A}|A,B]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+nestedIfNotReturn(o) {
+  if (/*{}*/ o is A) {
+    if (/*{o:[{true:A}|A]}*/ o is! B) {
+      return /*{o:[{true:A,false:B}|A,B]}*/ o;
+    }
+    /*{o:[{true:A,B}|A,B]}*/ o;
+  }
+  /*{}*/ o;
+}
diff --git a/tests/compiler/dart2js/static_type/type_promotion_data/null.dart b/tests/compiler/dart2js/static_type/type_promotion_data/null.dart
new file mode 100644
index 0000000..02a3697
--- /dev/null
+++ b/tests/compiler/dart2js/static_type/type_promotion_data/null.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2019, 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.
+
+main() {
+  ifNull(null);
+  ifNullElse(null);
+  ifNotNull(null);
+  ifNotNullElse(null);
+}
+
+ifNull(o) {
+  /*{}*/ o;
+  if (/*{}*/ o == null) {
+    /*{o:[{false:dynamic}|dynamic]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+ifNullElse(o) {
+  /*{}*/ o;
+  if (/*{}*/ o == null) {
+    /*{o:[{false:dynamic}|dynamic]}*/ o;
+  } else {
+    /*{o:[{true:dynamic}|dynamic]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+ifNotNull(o) {
+  /*{}*/ o;
+  if (/*{}*/ o != null) {
+    /*{o:[{true:dynamic}|dynamic]}*/ o;
+  }
+  /*{}*/ o;
+}
+
+ifNotNullElse(o) {
+  /*{}*/ o;
+  if (/*{}*/ o != null) {
+    /*{o:[{true:dynamic}|dynamic]}*/ o;
+  } else {
+    /*{o:[{false:dynamic}|dynamic]}*/ o;
+  }
+  /*{}*/ o;
+}
diff --git a/tests/compiler/dart2js/static_type/type_promotion_test.dart b/tests/compiler/dart2js/static_type/type_promotion_test.dart
new file mode 100644
index 0000000..76f448f
--- /dev/null
+++ b/tests/compiler/dart2js/static_type/type_promotion_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/ir/static_type.dart';
+import 'package:compiler/src/kernel/element_map_impl.dart';
+import 'package:compiler/src/kernel/kernel_strategy.dart';
+import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/class_hierarchy.dart' as ir;
+import 'package:kernel/core_types.dart' as ir;
+import 'package:kernel/type_algebra.dart' as ir;
+import 'package:kernel/type_environment.dart' as ir;
+import '../equivalence/id_equivalence.dart';
+import '../equivalence/id_equivalence_helper.dart';
+import '../helpers/ir_types.dart';
+
+main(List<String> args) {
+  asyncTest(() async {
+    Directory dataDir =
+        new Directory.fromUri(Platform.script.resolve('type_promotion_data'));
+    await checkTests(dataDir, new TypePromotionDataComputer(),
+        args: args, testFrontend: true);
+  });
+}
+
+class TypePromotionDataComputer extends DataComputer<String> {
+  ir.TypeEnvironment _typeEnvironment;
+
+  ir.TypeEnvironment getTypeEnvironment(KernelToElementMapImpl elementMap) {
+    if (_typeEnvironment == null) {
+      ir.Component component = elementMap.env.mainComponent;
+      _typeEnvironment = new ir.TypeEnvironment(
+          new ir.CoreTypes(component), new ir.ClassHierarchy(component));
+    }
+    return _typeEnvironment;
+  }
+
+  /// Compute type inference data for [member] from kernel based inference.
+  ///
+  /// Fills [actualMap] with the data.
+  @override
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
+      {bool verbose: false}) {
+    KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
+    KernelToElementMapImpl elementMap = frontendStrategy.elementMap;
+    Map<ir.Expression, TypeMap> typeMaps =
+        elementMap.getTypeMapsForTesting(member);
+    ir.Member node = elementMap.getMemberNode(member);
+    new TypePromotionIrComputer(compiler.reporter, actualMap, typeMaps)
+        .run(node);
+  }
+
+  @override
+  DataInterpreter<String> get dataValidator => const StringDataInterpreter();
+}
+
+/// IR visitor for computing inference data for a member.
+class TypePromotionIrComputer extends IrDataExtractor<String> {
+  final Map<ir.Expression, TypeMap> typeMaps;
+
+  TypePromotionIrComputer(DiagnosticReporter reporter,
+      Map<Id, ActualData<String>> actualMap, this.typeMaps)
+      : super(reporter, actualMap);
+
+  @override
+  String computeMemberValue(Id id, ir.Member node) {
+    return null;
+  }
+
+  @override
+  String computeNodeValue(Id id, ir.TreeNode node) {
+    if (node is ir.VariableGet) {
+      TypeMap type = typeMaps[node];
+      return type.getText(typesToText);
+    }
+    return null;
+  }
+}
diff --git a/tests/compiler/dart2js_extra/35341_test.dart b/tests/compiler/dart2js_extra/35341_test.dart
new file mode 100644
index 0000000..027182f
--- /dev/null
+++ b/tests/compiler/dart2js_extra/35341_test.dart
@@ -0,0 +1,14 @@
+// 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.
+
+// Regression test for issue 35341.
+
+import "dart:async";
+
+@pragma('dart2js:disableFinal')
+void main() {
+  FutureOr<int> i = 0;
+  i = new Future<int>.value(0);
+  print(i.runtimeType);
+}
diff --git a/tests/compiler/dart2js_extra/35356_test.dart b/tests/compiler/dart2js_extra/35356_test.dart
new file mode 100644
index 0000000..13dc082
--- /dev/null
+++ b/tests/compiler/dart2js_extra/35356_test.dart
@@ -0,0 +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 file.
+
+main() {
+  bool b = true & true;
+  b |= true;
+  b = b ^ b;
+  print(b);
+}
diff --git a/tests/compiler/dart2js_extra/881_test.dart b/tests/compiler/dart2js_extra/881_test.dart
new file mode 100644
index 0000000..5be849c
--- /dev/null
+++ b/tests/compiler/dart2js_extra/881_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for DartPad issue 881.
+
+@pragma('dart2js:disableFinal')
+void main() {
+  String v = null;
+  print('${v.hashCode}');
+}
diff --git a/tests/compiler/dart2js_extra/generic_type_error_message_test.dart b/tests/compiler/dart2js_extra/generic_type_error_message_test.dart
index 8becaf9..038fecf 100644
--- a/tests/compiler/dart2js_extra/generic_type_error_message_test.dart
+++ b/tests/compiler/dart2js_extra/generic_type_error_message_test.dart
@@ -10,9 +10,15 @@
 
 class Bar<T extends num> {}
 
+class Baz<T extends num> {}
+
+@pragma('dart2js:disableFinal')
 main() {
   test(new Foo(), Foo, expectTypeArguments: false);
-  test(new Bar() as Bar<num>, Bar, expectTypeArguments: true);
+  test(new Bar() as Bar<num>, Bar, expectTypeArguments: false);
+  Baz<num> b = new Baz();
+  dynamic c = b;
+  test(c as Baz<num>, Baz, expectTypeArguments: true);
 }
 
 void test(dynamic object, Type type, {bool expectTypeArguments}) {
diff --git a/tests/compiler/dart2js_native/native_method_inlining_test.dart b/tests/compiler/dart2js_native/native_method_inlining_test.dart
index 1dd30c1..f673eeb 100644
--- a/tests/compiler/dart2js_native/native_method_inlining_test.dart
+++ b/tests/compiler/dart2js_native/native_method_inlining_test.dart
@@ -82,13 +82,13 @@
 void match(String s, String pattern1) {
   var pattern2 = pattern1.replaceAll(' ', '');
   Expect.isTrue(s.contains(pattern1) || s.contains(pattern2),
-      "expected $pattern1 or $pattern2");
+      "expected $pattern1 or $pattern2 in '$s'");
 }
 
 void nomatch(String s, String pattern1) {
   var pattern2 = pattern1.replaceAll(' ', '');
   Expect.isFalse(s.contains(pattern1) || s.contains(pattern2),
-      "should not have $pattern1 or $pattern2");
+      "should not have $pattern1 or $pattern2 in '$s'");
 }
 
 test1() {
diff --git a/tests/compiler/dart2js_native/native_mixin_field2_test.dart b/tests/compiler/dart2js_native/native_mixin_field2_test.dart
new file mode 100644
index 0000000..408bdb6
--- /dev/null
+++ b/tests/compiler/dart2js_native/native_mixin_field2_test.dart
@@ -0,0 +1,87 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "native_testing.dart";
+
+// Test that native classes can use ordinary Dart classes with fields
+// as mixins.
+
+@Native("A")
+class A {
+  var foo;
+}
+
+class A1 {
+  get foo => 42;
+  set foo(value) {}
+}
+
+@Native("B")
+class B extends A with M1, M2 {
+  var bar;
+}
+
+class B1 extends A1 with M1, M2 {
+  get bar => 42;
+  set bar(value) {}
+}
+
+class M1 {
+  var baz; // This field is not a native field, even when mixed in.
+}
+
+class M2 {
+  var bar;
+  var buz;
+}
+
+A makeA() native;
+B makeB() native;
+
+void setup() {
+  JS('', r"""
+(function(){
+  function A() {this.foo='A-foo';}
+  function B() {A.call(this);this.bar='B-bar';this.baz='M1-baz';}
+  makeA = function(){return new A()};
+  makeB = function(){return new B()};
+
+  self.nativeConstructor(A);
+  self.nativeConstructor(B);
+})()""");
+}
+
+@AssumeDynamic()
+confuse(x) => x;
+
+main() {
+  nativeTesting();
+  setup();
+  dynamic a = makeA();
+  a ??= new A1();
+  Expect.equals("A-foo", confuse(a).foo);
+  Expect.throws(() => confuse(a).bar, (e) => e is NoSuchMethodError);
+  Expect.throws(() => confuse(a).baz, (e) => e is NoSuchMethodError);
+  Expect.throws(() => confuse(a).buz, (e) => e is NoSuchMethodError);
+
+  dynamic b = makeB();
+  b ??= new B1();
+  Expect.equals("A-foo", confuse(b).foo);
+  Expect.equals("B-bar", confuse(b).bar);
+  // Expect.equals("M1-baz", b.baz);  // not true, see M1.
+  Expect.isNull(confuse(b).baz); // native b.baz is not the same as dart b.baz.
+  Expect.isNull(confuse(b).buz);
+
+  M1 m1 = new M1();
+  Expect.throws(() => confuse(m1).foo, (e) => e is NoSuchMethodError);
+  Expect.throws(() => confuse(m1).bar, (e) => e is NoSuchMethodError);
+  Expect.isNull(m1.baz);
+  Expect.throws(() => confuse(m1).buz, (e) => e is NoSuchMethodError);
+
+  M2 m2 = new M2();
+  Expect.throws(() => confuse(m2).foo, (e) => e is NoSuchMethodError);
+  Expect.isNull(confuse(m2).bar);
+  Expect.throws(() => confuse(m2).baz, (e) => e is NoSuchMethodError);
+  Expect.isNull(confuse(m2).buz);
+}
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index e8bc0cb..38b98dd 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -414,6 +414,9 @@
 [ !$strong && ($runtime == dart_precompiled || $runtime == vm) ]
 list_test/*: RuntimeError # VM doesn't implement strong mode covariance checks
 
+[ ($arch == simdbc || $arch == simdbc64) && ($hot_reload || $hot_reload_rollback) ]
+uri_parse_test: SkipSlow
+
 [ $arch == simarm || $arch == simarm64 || $arch == simdbc64 ]
 bigint_parse_radix_test: Skip # Issue 31659
 bigint_test: Skip # Issue 31659
diff --git a/tests/language_2/async_star/async_star_await_for_test.dart b/tests/language_2/async_star/async_star_await_for_test.dart
new file mode 100644
index 0000000..0493a1f
--- /dev/null
+++ b/tests/language_2/async_star/async_star_await_for_test.dart
@@ -0,0 +1,376 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that `await for` and `async*` interact correctly.
+
+// An `await for` must pause its subscription immediately
+// if the `await for` body does anything asynchronous
+// (any `await`, `await for`, or pausing at a `yield`/`yield*`)
+// A pause happening synchronously in an event delivery
+// must pause the `sync*` method at the `yield` sending the event.
+// A break happening synchronously in an event delivery,
+// or while paused at a `yield`, must exit at that `yield`.
+
+import "dart:async";
+import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+Stream<int> stream(List<String> log) async* {
+  log.add("^");
+  try {
+    log.add("?1");
+    yield 1;
+    log.add("?2");
+    yield 2;
+    log.add("?3");
+    yield 3;
+  } finally {
+    log.add(r"$");
+  }
+}
+
+Stream<int> consume(List<String> log,
+    {int breakAt = -1,
+    int yieldAt = -1,
+    int yieldStarAt = -1,
+    int pauseAt = -1}) async* {
+  // Create stream.
+  var s = stream(log);
+  log.add("(");
+  // The "consume loop".
+  await for (var event in s) {
+    // Should be acting synchronously wrt. the delivery of the event.
+    // The source stream should be at the yield now.
+    log.add("!$event");
+    if (event == pauseAt) {
+      log.add("p$event[");
+      // Async operation causes subscription to pause.
+      // Nothing should happen in the source stream
+      // until the end of the loop body where the subscription is resumed.
+      await Future.delayed(Duration(microseconds: 1));
+      log.add("]");
+    }
+    if (event == yieldAt) {
+      log.add("y$event[");
+      // Yield may cause subscription to pause or cancel.
+      // This loop should stay at the yield until the event has been delieverd.
+      // If the receiver pauses or cancels, we delay or break the loop here.
+      yield event;
+      log.add("]");
+    }
+    if (event == yieldStarAt) {
+      log.add("Y$event[");
+      // Yield* will always cause the subscription for this loop to pause.
+      // If the listener pauses, this stream is paused. If the listener cancels,
+      // this stream is cancelled, and the yield* acts like return, cancelling
+      // the loop subscription and waiting for the cancel future.
+      yield* Stream<int>.fromIterable([event]);
+      log.add("]");
+    }
+    if (event == breakAt) {
+      log.add("b$event");
+      // Breaks the loop. This cancels the loop subscription and waits for the
+      // cancel future.
+      break;
+    }
+  }
+  // Done event from stream or cancel future has completed.
+  log.add(")");
+}
+
+main() async {
+  asyncStart();
+
+  // Just run the loop over the stream. The consume stream emits no events.
+  {
+    var log = <String>[];
+    await for (var _ in consume(log)) {
+      throw "unreachable";
+    }
+    await Future.delayed(Duration(milliseconds: 1));
+    var trace = log.join("");
+    Expects.equals(r"(^?1!1?2!2?3!3$)", trace, "straight through");
+  }
+
+  // Pause at 1, then resume.
+  // Consume loop forces a pause when it receives the 1 event.
+  // Nothing should happen until that pause is resumed.
+  {
+    var log = <String>[];
+    await for (var _ in consume(log, pauseAt: 1)) {
+      throw "unreachable";
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "pause at 1";
+    if (trace.contains("p1[?2")) {
+      message += " (did not pause in time)";
+    }
+    Expects.equals(r"(^?1!1p1[]?2!2?3!3$)", trace, message);
+  }
+
+  // Break at 1.
+  // Consume loop breaks after receiving the 1 event.
+  // The consume stream emits no events.
+  {
+    var log = <String>[];
+    await for (var _ in consume(log, breakAt: 1)) {
+      throw "unreachable";
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "break at 1";
+    if (trace.contains("b1?2")) {
+      message += " (did not cancel in time)";
+    }
+    Expects.equals(r"(^?1!1b1$)", trace, message);
+  }
+
+  // Pause then break at 1.
+  // Consume loop pauses after receiving the 1 event,
+  // then breaks before resuming. It should still be at the yield.
+  // The consume stream emits no events.
+  {
+    var log = <String>[];
+    await for (var _ in consume(log, pauseAt: 1, breakAt: 1)) {
+      throw "unreachable";
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "pause then break at 1";
+    if (trace.contains("p1[?2")) {
+      message += " (did not pause in time)";
+    }
+    if (trace.contains("b1?2")) {
+      message += " (did not cancel in time)";
+    }
+    Expects.equals(r"(^?1!1p1[]b1$)", trace, message);
+  }
+
+  // Yield at 1.
+  // The consume loop re-emits the 1 event.
+  // The test loop should receive that event while the consume loop is still
+  // at the yield statement.
+  // The consume loop may or may not pause, it should make no difference.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldAt: 1)) {
+      log.add("e$s");
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield at 1";
+    if (trace.contains("y1[?2")) {
+      message += " (did not wait for delivery)";
+    }
+    Expects.equals(r"(^?1!1y1[e1]?2!2?3!3$)", trace, message);
+  }
+
+  // Yield at 1, then pause at yield.
+  // The consume loop re-emits the 1 event.
+  // The test loop should receive that event while the consume loop is still
+  // at the yield statement.
+  // The test loop then pauses.
+  // Nothing should happen in either the original yield
+  // or the consume-function yield until the test loop ends.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldAt: 1)) {
+      log.add("e$s<");
+      // Force pause at yield.
+      await Future.delayed(Duration(milliseconds: 1));
+      log.add(">");
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield at 1, pause at yield";
+    if (trace.contains("y1[?2")) {
+      message += " (did not wait for delivery)";
+    }
+    if (trace.contains("e1<?2")) {
+      message += " (did not pause in time)";
+    }
+    Expects.equals(r"(^?1!1y1[e1<>]?2!2?3!3$)", trace, message);
+  }
+
+  // Yield at 1, then break at yield.
+  // The consume loop re-emits the 1 event.
+  // The test loop should receive that event while the consume loop is still
+  // at the yield statement.
+  // The test loop then breaks. That makes the consume loop yield return,
+  // breaking the consume loop, which makes the source yield return.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldAt: 1)) {
+      log.add("e${s}B$s");
+      break; // Force break at yield*.
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield at 1, break at yield";
+    if (trace.contains("y1[?2")) {
+      message += " (did not wait for delivery)";
+    }
+    if (trace.contains("B1?2")) {
+      message += " (did not break in time)";
+    }
+    Expects.equals(r"(^?1!1y1[e1B1$)", trace, message);
+  }
+
+  // Yield* at 1.
+  // The consume loop re-emits a stream containing the 1 event.
+  // The test loop should receive that event before the consume loop
+  // continues from the `yield*`, which again happens before the source
+  // stream continues from its `yield`.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldStarAt: 1)) {
+      log.add("e$s");
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield* at 1";
+    if (trace.contains("Y1[?2")) {
+      message += " (did not wait for delivery)";
+    }
+    Expects.equals(r"(^?1!1Y1[e1]?2!2?3!3$)", trace, message);
+  }
+
+  // Yield* at 1, pause at yield.
+  // The consume loop re-emits a stream containing the 1 event.
+  // The test loop should receive that event before the consume loop
+  // continues from the `yield*`. The test loop then force a pause.
+  // Nothing further should happen during that pause.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldStarAt: 1)) {
+      log.add("e$s<");
+      await Future.delayed(Duration(milliseconds: 1)); // force pause.
+      log.add(">");
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield* then pause at 1";
+    if (trace.contains("Y1[?2")) {
+      message += " (did not wait for delivery)";
+    }
+    if (trace.contains("e1<?2")) {
+      message += " (did not pause in time)";
+    }
+    Expects.equals(r"(^?1!1Y1[e1<>]?2!2?3!3$)", trace, message);
+  }
+
+  // Yield* at 1, then break at 1.
+  // The consume loop re-emits a stream containing the 1 event.
+  // The test loop should receive that event before the consume loop
+  // continues from the `yield*`.
+  // When the consume loop continues, it breaks,
+  // forcing the waiting source yield to return.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldStarAt: 1, breakAt: 1)) {
+      log.add("e$s");
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield* then pause at 1";
+    if (trace.contains("Y1[?2")) {
+      message += " (did not wait for delivery)";
+    }
+    Expects.equals(r"(^?1!1Y1[e1]b1$)", trace, message);
+  }
+
+  // Yield* at 1, pause at yield, then break at 1.
+  // The consume loop re-emits a stream containing the 1 event.
+  // The test loop should receive that event before the consume loop
+  // continues from the `yield*`. After the `yield*`, the consume loop breaks.
+  // This forces the waiting source yield to return.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldStarAt: 1, breakAt: 1)) {
+      log.add("e$s<");
+      await Future.delayed(Duration(milliseconds: 1)); // force pause.
+      log.add(">");
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield* then pause at 1";
+    Expects.equals(r"(^?1!1Y1[e1<>]b1$)", trace, message);
+  }
+
+  // Yield* at 1, break at yield.
+  // The consume loop re-emits a stream containing the 1 event.
+  // The test loop should receive that event before the consume loop
+  // continues from the `yield*`. The test loop then breaks,
+  // forcing the two waiting yields to return.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldStarAt: 1)) {
+      log.add("e${s}B$s");
+      break;
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield* then break at 1";
+    if (trace.contains("Y1[?2")) {
+      message += " (did not deliver event in time)";
+    }
+    if (trace.contains("e1?2")) {
+      message += " (did not cancel in time)";
+    }
+    Expects.equals(r"(^?1!1Y1[e1B1$)", trace, message);
+  }
+
+  // Yield* at 1, pause at yield, then break at yield.
+  // The consume loop re-emits a stream containing the 1 event.
+  // The test loop should receive that event before the consume loop
+  // continues from the `yield*`. The test loop then forces a pause,
+  // and then breaks before that pause is resumed.
+  // This forces the two waiting yields to return.
+  {
+    var log = <String>[];
+    await for (var s in consume(log, yieldStarAt: 1)) {
+      log.add("e$s<");
+      await Future.delayed(Duration(milliseconds: 1)); // force pause.
+      log.add(">B$s");
+      break; // And break.
+    }
+    await Future.delayed(Duration(milliseconds: 10));
+    var trace = log.join("");
+    String message = "yield* then pause then break at 1";
+    Expects.equals(r"(^?1!1Y1[e1<>B1$)", trace, message);
+  }
+
+  Expects.summarize();
+  asyncEnd();
+}
+
+class Expects {
+  static var _errors = [];
+  static int _tests = 0;
+  static void summarize() {
+    if (_errors.isNotEmpty) {
+      var buffer = StringBuffer();
+      for (var es in _errors) {
+        buffer.writeln("FAILURE:");
+        buffer.writeln(es[0]); // error
+        buffer.writeln(es[1]); // stack trace
+      }
+      ;
+      buffer.writeln("Expectations failed: ${_errors.length}"
+          ", succeeded: ${_tests - _errors.length}");
+      throw ExpectException(buffer.toString());
+    }
+  }
+
+  static void equals(o1, o2, String message) {
+    _tests++;
+    try {
+      Expect.equals(o1, o2, message);
+    } on ExpectException catch (e) {
+      var stack = StackTrace.current;
+      _errors.add([e, stack]);
+    }
+  }
+}
diff --git a/tests/language_2/async_star/async_star_cancel_test.dart b/tests/language_2/async_star/async_star_cancel_test.dart
new file mode 100644
index 0000000..c23c6ba
--- /dev/null
+++ b/tests/language_2/async_star/async_star_cancel_test.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that stream cancellation is checked immediately after delivering the
+// event, and before continuing after the yield.
+
+import "dart:async";
+import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+main() async {
+  asyncStart();
+  var log = [];
+  Stream<int> f() async* {
+    try {
+      log.add("-1");
+      yield 1;
+      log.add("-2");
+      yield 2;
+    } finally {
+      log.add("x");
+    }
+  }
+
+  var completer = Completer();
+  var s;
+  s = f().listen((e) {
+    log.add("+$e");
+    // The `cancel` operation makes all `yield` operations act as returns.
+    // It should make the `finally` block in `f` log an "x",
+    // and nothing else.
+    completer.complete(s.cancel());
+  }, onError: (e) {
+    // Should never be reached, but if it does, we'll make the await
+    // below terminate.
+    completer.complete(new Future.sync(() {
+      Expect.fail("$e");
+    }));
+  }, onDone: () {
+    completer.complete(null);
+  });
+  await completer.future;
+  Expect.listEquals(["-1", "+1", "x"], log, "cancel");
+  asyncEnd();
+}
diff --git a/tests/language_2/async_star/async_star_invalid_test.dart b/tests/language_2/async_star/async_star_invalid_test.dart
new file mode 100644
index 0000000..529cf25
--- /dev/null
+++ b/tests/language_2/async_star/async_star_invalid_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that various invalid uses of `yield` are disallowed.
+
+import "dart:async";
+import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+var yield = 42;
+
+main() async {
+  asyncStart();
+  Stream<String> f() async* {
+    // Invalid syntax.
+    yield ("a", "b"); //# 01: compile-time error
+    yield yield "twice"; //# 02: compile-time error
+
+    // Valid but curious syntax.
+    yield throw "throw"; //# 03: runtime error
+
+    // Type error.
+    yield* "one"; //# 04: compile-time error
+
+    label: yield "ok";
+  }
+  var completer = Completer();
+  f().listen(completer.complete, onError: completer.completeError,
+      onDone: () {
+        if (!completer.isCompleted) completer.completeError("not ok?");
+      });
+  Expect.equals("ok", await completer.future);
+  asyncEnd();
+}
diff --git a/tests/language_2/async_star/async_star_test.dart b/tests/language_2/async_star/async_star_test.dart
new file mode 100644
index 0000000..819039e
--- /dev/null
+++ b/tests/language_2/async_star/async_star_test.dart
@@ -0,0 +1,195 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+main() async {
+  asyncStart();
+  // Normal operations.
+  {
+    Stream<int> f() async* {
+      yield 1;
+      yield 2;
+      yield 3;
+    }
+
+    Expect.listEquals([1, 2, 3], await f().toList(), "basic1");
+  }
+
+  {
+    Stream<int> f() async* {
+      yield 1;
+      yield 2;
+      yield 3;
+    }
+
+    var log = [];
+    var completer = Completer();
+    f().listen(log.add,
+        onError: (e) {
+          // Shouldn't be reached.
+          completer.complete(new Future.sync(() {
+            Expect.fail("$e");
+          }));
+        },
+        onDone: () => completer.complete(null));
+    await completer.future;
+    Expect.listEquals([1, 2, 3], log, "basic2");
+  }
+
+  {
+    var log = [];
+    Stream<int> f() async* {
+      log.add("-1");
+      yield 1;
+      log.add("-2");
+      yield 2;
+    }
+
+    await f().forEach((e) {
+      log.add("+$e");
+    });
+    Expect.listEquals(["-1", "+1", "-2", "+2"], log, "basic3");
+  }
+
+  {
+    var log = [];
+    Stream<int> f() async* {
+      log.add("-1");
+      yield 1;
+      log.add("-2");
+      yield 2;
+    }
+
+    await for (var e in f()) {
+      log.add("+$e");
+    }
+    Expect.listEquals(["-1", "+1", "-2", "+2"], log, "basic4");
+  }
+
+  // async
+  {
+    Stream<int> f() async* {
+      yield 1;
+      await Future(() {});
+      yield 2;
+      await Future(() {});
+      yield 3;
+    }
+
+    Expect.listEquals([1, 2, 3], await f().toList(), "async");
+  }
+
+  // Yield*
+  {
+    Stream<int> f(n) async* {
+      yield n;
+      if (n == 0) return;
+      yield* f(n - 1);
+      yield n;
+    }
+
+    Expect.listEquals([3, 2, 1, 0, 1, 2, 3], await f(3).toList(), "yield*");
+  }
+
+  // Errors
+  {
+    var log = [];
+    Stream<int> f() async* {
+      yield 1;
+      throw "error";
+    }
+
+    await f().handleError((e) {
+      log.add(e);
+    }).forEach(log.add);
+    Expect.listEquals([1, "error"], log, "error");
+  }
+
+  {
+    var log = [];
+    Stream<int> f() async* {
+      yield 1;
+      yield* Future<int>.error("error").asStream(); // Emits error as error.
+      yield 3;
+    }
+
+    await f().handleError((e) {
+      log.add(e);
+    }).forEach(log.add);
+    Expect.listEquals([1, "error", 3], log, "error2");
+  }
+
+  // Pause is checked after delivering event.
+  {
+    var log = [];
+    Stream<int> f() async* {
+      log.add("-1");
+      yield 1;
+      log.add("-2");
+      yield 2;
+    }
+
+    var completer = Completer();
+    var s;
+    s = f().listen((e) {
+      log.add("+$e");
+      s.pause(Future(() {}));
+      log.add("++$e");
+    }, onError: (e) {
+      completer.complete(new Future.sync(() {
+        Expect.fail("$e");
+      }));
+    }, onDone: () => completer.complete(null));
+    await completer.future;
+    Expect.listEquals(["-1", "+1", "++1", "-2", "+2", "++2"], log, "pause");
+  }
+
+  // Await for-loop pauses between events.
+  {
+    var log = [];
+    Stream<int> f() async* {
+      log.add("-1");
+      yield 1;
+      log.add("-2");
+      yield 2;
+    }
+
+    await for (var e in f()) {
+      log.add("+$e");
+      await Future(() {}); // One timer tick.
+      log.add("++$e");
+    }
+    Expect.listEquals(["-1", "+1", "++1", "-2", "+2", "++2"], log, "looppause");
+  }
+
+  // Await for-loop break works immediately.
+  {
+    var log = [];
+    Stream<int> f() async* {
+      try {
+        log.add("-1");
+        yield 1;
+        log.add("-2");
+        yield 2;
+        log.add("-3");
+        yield 3;
+      } finally {
+        log.add("x");
+      }
+    }
+
+    await for (var e in f()) {
+      log.add("+$e");
+      await Future(() {}); // One timer tick, pauses function at yield.
+      log.add("++$e");
+      if (e == 2) break;
+    }
+    Expect.listEquals(
+        ["-1", "+1", "++1", "-2", "+2", "++2", "x"], log, "loop-pause-break");
+  }
+  asyncEnd();
+}
diff --git a/tests/language_2/enum_initialization_near_stack_overflow_test.dart b/tests/language_2/enum_initialization_near_stack_overflow_test.dart
new file mode 100644
index 0000000..598b382
--- /dev/null
+++ b/tests/language_2/enum_initialization_near_stack_overflow_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// https://github.com/flutter/flutter/issues/25041
+
+// This test may produce a compile time exception from stack overflow during
+// enum initialization or succeed in enum initialization depending on exactly
+// how much stack is left and used by the compiler. It should never crash nor
+// produce a runtime exception.
+
+enum Fruit {
+  apple,
+  banana,
+}
+
+getFruit() => Fruit.apple;
+
+recurse() {
+  try {
+    recurse();
+  } catch (e, st) {
+    print("$e ${getFruit()}");
+  }
+}
+
+main() {
+  try {
+    recurse();
+  } on StackOverflowError catch (e) {
+    // Swallow.
+  }
+}
diff --git a/tests/language_2/issue34489_test.dart b/tests/language_2/issue34489_test.dart
new file mode 100644
index 0000000..59553a3
--- /dev/null
+++ b/tests/language_2/issue34489_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C<T> {
+  var field = T;
+}
+
+main() {
+  new C().field = 'bad'; //# 01: compile-time error
+}
diff --git a/tests/language_2/issue34495_test.dart b/tests/language_2/issue34495_test.dart
new file mode 100644
index 0000000..e599403
--- /dev/null
+++ b/tests/language_2/issue34495_test.dart
@@ -0,0 +1,7 @@
+// 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.
+
+final foo = A<B>.foo(); //# 01: compile-time error
+
+main() {}
diff --git a/tests/language_2/issue35043_test.dart b/tests/language_2/issue35043_test.dart
new file mode 100644
index 0000000..95c5f13
--- /dev/null
+++ b/tests/language_2/issue35043_test.dart
@@ -0,0 +1,7 @@
+// 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.
+
+final foo = Map<int>(); //# 01: compile-time error
+
+main() {}
diff --git a/tests/language_2/issue35090_test.dart b/tests/language_2/issue35090_test.dart
new file mode 100644
index 0000000..3e3c564
--- /dev/null
+++ b/tests/language_2/issue35090_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {
+  int get g => 0;
+}
+
+class C implements A {
+  noSuchMethod(Invocation i) {
+    return 1;
+  }
+}
+
+mixin M on A {
+  int test() {
+    return super.g;
+  }
+
+  noSuchMethod(Invocation i) {
+    return 2;
+  }
+}
+
+class MA extends C with M {}
+
+main() {
+  Expect.equals(new MA().g, 2);
+  Expect.equals(new MA().test(), 2);
+}
diff --git a/tests/language_2/issue_34091.dart b/tests/language_2/issue_34091.dart
new file mode 100644
index 0000000..5756024
--- /dev/null
+++ b/tests/language_2/issue_34091.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.
+
+// Tests that stack traces from data URIs don't contain the entire URI, and
+// instead just have the substitute file name: <data:application/dart>
+
+import "dart:isolate";
+import "package:expect/expect.dart";
+import 'dart:async';
+
+void main() {
+  // This data URI encodes:
+  /*
+    import "dart:isolate";
+    void main(_, p){
+      try {
+        throw("Hello World");
+      } catch (e, s) {
+        p.send("$e\n$s");
+      }
+    }
+  */
+  final uri = Uri.parse(
+      "data:application/dart;charset=utf8,import%20%22dart%3Aisolate%22%3Bvoi" +
+          "d%20main(_%2Cp)%7Btry%7Bthrow(%22Hello%20World%22)%3B%7Dcatch(e%2C" +
+          "%20s)%7Bp.send(%22%24e%5Cn%24s%22)%3B%7D%7D");
+  ReceivePort port = new ReceivePort();
+  Isolate.spawnUri(uri, [], port.sendPort);
+  port.listen((trace) {
+    // Test that the trace contains the exception message.
+    Expect.isTrue(trace.contains("Hello World"));
+
+    // Test that the trace contains data URI substitute.
+    Expect.isTrue(trace.contains("<data:application/dart>"));
+
+    // Test that the trace doesn't contain any leftover URL encoded junk.
+    Expect.isFalse(trace.contains("%20"));
+
+    port.close();
+  });
+}
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index a1c001a..fb08b21 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -11,7 +11,6 @@
 accessor_conflict_import_prefixed2_test: CompileTimeError # Issue 25626
 accessor_conflict_import_prefixed_test: CompileTimeError # Issue 25626
 accessor_conflict_import_test: CompileTimeError # Issue 25626
-additional_interface_adds_optional_args_test: CompileTimeError # Issue #30568
 cascaded_forwarding_stubs_test: CompileTimeError # Issue 34329
 config_import_corelib_test: CompileTimeError, StaticWarning, OK # failing-by-design: Will never pass, see Issue #34332
 const_cast2_test/01: CompileTimeError # failing-by-design: Not a const expression, see Issue #34334
@@ -72,12 +71,10 @@
 large_class_declaration_test: Slow, Pass
 malformed2_test: Pass, MissingCompileTimeError # Flaky: issue 31056.
 mixin_declaration/mixin_declaration_factory_test/02: Crash # Issue 34809
-mixin_declaration/mixin_declaration_invalid_superinvocation_test/10: CompileTimeError # Issue 30552
 mixin_method_override_test/01: MissingCompileTimeError
 mixin_super_2_test: CompileTimeError
 mixin_super_use_test: CompileTimeError
 mock_writable_final_private_field_test: CompileTimeError # failing-by-design, see Issue #34377
-multiple_interface_inheritance_test: CompileTimeError # Issue 30552
 nested_generic_closure_test: CompileTimeError # Issue #28515
 no_main_test/01: Fail # failing-by-design, the analyzer has no restriction that a library include a main function.
 no_such_constructor2_test: StaticWarning
@@ -94,16 +91,13 @@
 regress_29025_test: CompileTimeError # Issue 29081
 regress_29405_test: CompileTimeError # Issue 29421
 regress_29784_test/02: MissingCompileTimeError # Issue 29784
-regress_30121_test: CompileTimeError # Issue 31087
 regress_30339_test: CompileTimeError
 regress_33479_test/01: Crash # Issue #33479
 set_literals/*: Skip
 setter3_test/01: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
 setter3_test/02: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
 super_bound_closure_test/none: CompileTimeError
-super_no_such_method1_test: CompileTimeError # Invalid test, probably, see https://github.com/dart-lang/sdk/issues/33963
-super_no_such_method2_test: CompileTimeError # Invalid test, probably, see https://github.com/dart-lang/sdk/issues/33963
-super_no_such_method3_test: CompileTimeError # Invalid test, probably, see https://github.com/dart-lang/sdk/issues/33963
+super_call4_test/01: MissingCompileTimeError
 super_setter_test: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
 syntax_test/60: MissingCompileTimeError
 syntax_test/61: MissingCompileTimeError
@@ -130,7 +124,7 @@
 void/return_future_future_or_void_async_error1_test/none: CompileTimeError # issue #34319
 void/return_future_or_future_or_void_sync_error2_test/none: CompileTimeError # issue #34319
 void/return_future_or_void_sync_error4_test/none: CompileTimeError # issue #34319
-void/void_type_usage_test/final_local_for_in2: MissingCompileTimeError
+void/void_type_usage_test/final_local_for_in2: MissingCompileTimeError # issue 35508
 web_int_literals_test/01: MissingCompileTimeError
 web_int_literals_test/02: MissingCompileTimeError
 web_int_literals_test/03: MissingCompileTimeError
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index a2102b3..c38a4b3 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -5,6 +5,8 @@
 
 [ $compiler == dart2js ]
 arithmetic_int64_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
+async_star/async_star_await_for_test: RuntimeError
+async_star/async_star_cancel_test: RuntimeError
 async_star_cancel_while_paused_test: RuntimeError # Issue 22853
 bit_operations_test: RuntimeError, OK # non JS number semantics
 bit_operations_test/03: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
@@ -18,8 +20,6 @@
 call_method_must_not_be_getter_test/03: RuntimeError # Issue 32155
 config_import_corelib_test: CompileTimeError # we need a special platform.dill file for categories=all. Once we fix that, all dart:* are supported when using '--categories=all' so this will become a RuntimeError, OK.
 config_import_test: RuntimeError # Test flag is not passed to the compiler.
-const_constructor_mixin3_test: CompileTimeError # Issue 33644.
-const_constructor_mixin_test: CompileTimeError # Issue 33644.
 const_constructor_nonconst_param_test/01: MissingCompileTimeError
 const_dynamic_type_literal_test/03: Pass # but it shouldn't until we fix issue 17207
 deopt_inlined_function_lazy_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index f8c2bfc..310f9a1 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -10,8 +10,10 @@
 accessor_conflict_import_prefixed2_test: CompileTimeError # Issue 25626
 accessor_conflict_import_prefixed_test: CompileTimeError # Issue 25626
 accessor_conflict_import_test: CompileTimeError # Issue 25626
-additional_interface_adds_optional_args_test: CompileTimeError # Issue #30568
 assertion_test: RuntimeError # Issue 30326; Expect.equals(expected: <1>, actual: <0>) fails.
+async_star/async_star_await_for_test: RuntimeError
+async_star/async_star_cancel_test: RuntimeError
+async_star/async_star_test: RuntimeError
 async_star_test/01: RuntimeError
 async_star_test/03: RuntimeError
 async_star_test/04: RuntimeError
@@ -28,8 +30,6 @@
 const_cast2_test/01: CompileTimeError
 const_cast2_test/none: CompileTimeError
 const_constructor3_test/04: MissingCompileTimeError # Side-effect of working around issue 33441 for int-to-double
-const_constructor_mixin3_test/01: MissingCompileTimeError # Issue 33644
-const_constructor_mixin_test/01: MissingCompileTimeError # Issue 33644
 covariant_override/tear_off_type_test: RuntimeError # Issue 28395
 covariant_subtyping_with_mixin_test: CompileTimeError # Issue 34329
 deferred_load_library_wrong_args_test/01: MissingRuntimeError, RuntimeError # Issue 29920
@@ -84,7 +84,7 @@
 invalid_returns/sync_invalid_return_03_test/none: CompileTimeError # issue #34319
 invalid_returns/sync_invalid_return_04_test/none: CompileTimeError # issue #34319
 invalid_returns/sync_invalid_return_05_test/none: CompileTimeError # issue #34319
-issue31596_implement_covariant_test: CompileTimeError
+issue31596_implement_covariant_test: CompileTimeError # Issue #31596
 issue31596_override_test/01: CompileTimeError
 issue31596_override_test/02: CompileTimeError
 issue31596_override_test/03: CompileTimeError
@@ -102,12 +102,10 @@
 large_class_declaration_test: Slow, Pass
 left_shift_test: RuntimeError # Ints and doubles are unified.
 mixin_declaration/mixin_declaration_factory_test/02: Crash
-mixin_declaration/mixin_declaration_invalid_superinvocation_test/10: CompileTimeError # Analyzer chooses wrong(?) super method.
 mixin_method_override_test/01: MissingCompileTimeError
 mixin_super_2_test: CompileTimeError # Issue 34806
 mixin_super_use_test: CompileTimeError # Issue 34806
 mock_writable_final_private_field_test: CompileTimeError # Issue 30848
-multiple_interface_inheritance_test: CompileTimeError # Issue 30552
 nested_generic_closure_test: CompileTimeError
 override_inheritance_field_test/42: CompileTimeError
 part_of_multiple_libs_test/01: MissingCompileTimeError
@@ -122,17 +120,13 @@
 regress_29405_test: CompileTimeError # Issue 29421
 regress_29784_test/02: Crash # assert initializers not implemented
 regress_29784_test/02: MissingCompileTimeError
-regress_30121_test: CompileTimeError # Issue 31087
 regress_30339_test: CompileTimeError # As expected. Should we make this a multi test?
 regress_33479_test/01: Crash # Issue #33479
-set_literals/*: Skip
 setter3_test/01: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
 setter3_test/02: CompileTimeError # Invalid test, see https://github.com/dart-lang/sdk/issues/33837
 stacktrace_test: RuntimeError # Issue 29920
 super_bound_closure_test/none: CompileTimeError
-super_no_such_method1_test: CompileTimeError # Invalid test, probably, see https://github.com/dart-lang/sdk/issues/33963
-super_no_such_method2_test: CompileTimeError # Invalid test, probably, see https://github.com/dart-lang/sdk/issues/33963
-super_no_such_method3_test: CompileTimeError # Invalid test, probably, see https://github.com/dart-lang/sdk/issues/33963
+super_call4_test/01: MissingCompileTimeError
 super_operator_index5_test: RuntimeError # 33470
 super_operator_index7_test: RuntimeError # 33470
 super_operator_index8_test: RuntimeError # 33470
@@ -158,6 +152,8 @@
 void/void_type_usage_test/final_local_for_in2: MissingCompileTimeError
 
 [ $compiler == dartdevk ]
+async_star/async_star_cancel_test: RuntimeError
+async_star/async_star_test: RuntimeError
 built_in_identifier_type_annotation_test/dynamic-funarg: RuntimeError # Issue 30450, test name contains hyphen
 built_in_identifier_type_annotation_test/dynamic-funret: RuntimeError # Issue 30450, test name contains hyphen
 built_in_identifier_type_annotation_test/dynamic-list: RuntimeError # Issue 30450, test name contains hyphen
@@ -181,8 +177,6 @@
 config_import_test: RuntimeError
 const_cast1_test/02: MissingCompileTimeError
 const_constructor3_test/04: MissingCompileTimeError
-const_constructor_mixin3_test: CompileTimeError # Issue 33644.
-const_constructor_mixin_test: CompileTimeError # Issue 33644.
 const_constructor_nonconst_field_test/01: MissingCompileTimeError
 const_constructor_nonconst_param_test/01: MissingCompileTimeError
 const_dynamic_type_literal_test/02: MissingCompileTimeError
@@ -280,7 +274,6 @@
 regress_29405_test: CompileTimeError # Issue 31402 Error: A value of type '#lib2::Foo' can't be assigned to a variable of type '(#lib2::Foo) → void'.
 regress_30339_test: RuntimeError # Uncaught Expect.isTrue(false) fails.
 regress_30339_test: CompileTimeError
-set_literals/*: Skip
 setter_no_getter_test/01: CompileTimeError
 super_bound_closure_test/none: CompileTimeError # Issue 31533
 super_call4_test/01: MissingCompileTimeError
@@ -315,6 +308,7 @@
 [ $compiler == dartdevc || $compiler == dartdevk ]
 arithmetic_int64_test: CompileTimeError, OK # Error if web int literal cannot be represented exactly, see http://dartbug.com/33351
 async_covariant_type_test: RuntimeError # Check too late
+async_star/async_star_await_for_test: RuntimeError
 async_star_cancel_while_paused_test: RuntimeError # Issue 29920; Uncaught Expect.listEquals(list length, expected: <4>, actual: <3>) fails: Next element <*3>
 async_star_pause_test: RuntimeError # Uncaught Expect.listEquals(at index 2, expected: <0+>, actual: <0!>) fails
 async_star_test/02: RuntimeError
@@ -340,7 +334,6 @@
 const_switch_test/04: RuntimeError # Ints and doubles are unified.; Expect.equals(expected: <1>, actual: <1.0>) fails.
 constructor12_test: RuntimeError # Issue 29920; ReferenceError: JSArrayOfT is not defined
 ct_const_test: RuntimeError # Issue 2992; RangeError: Maximum call stack size exceeded
-custom_await_stack_trace_test: RuntimeError # Issue 29920; Uncaught Expect.equals(at index 0: Expected <Blah \x0ABloop\x0ABleep\x0A...>
 cyclic_type2_test: RuntimeError # Issue 29920; Uncaught ReferenceError: V is not defined
 cyclic_type_test/02: RuntimeError # Issue 29920; Uncaught RangeError: Maximum call stack size exceeded
 cyclic_type_test/03: RuntimeError # Issue 29920; Uncaught ReferenceError: U is not defined
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index b514980..8047938 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -4,6 +4,8 @@
 # Sections in this file should contain "$compiler == dartk" or
 # "$compiler == dartkp".
 
+enum_initialization_near_stack_overflow_test: Pass, CompileTimeError, OK
+
 [ $compiler == app_jitk ]
 assertion_initializer_const_error2_test/cc01: MissingCompileTimeError
 assertion_initializer_const_error2_test/cc02: MissingCompileTimeError
@@ -140,6 +142,7 @@
 type_promotion_functions_test/none: CompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError
 vm/bool_check_stack_traces_test/02: RuntimeError # Issue 33584
+vm/regress_27671_test: SkipByDesign # Relies on string comparison of exception message which may return '<optimized out>'
 vm/type_cast_vm_test: RuntimeError
 web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
 
@@ -190,7 +193,15 @@
 implicit_creation/implicit_const_not_default_values_test/e7: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e8: MissingCompileTimeError
 mixin_method_override_test/G4: Crash # Assertion error: mixin_full_resolution.dart': 'src.typeParameters.length == dst.typeParameters.length': is not true.
-set_literals/*: Skip
+set_literals/invalid_set_literal_test/08: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/09: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/10: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/29: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/30: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/31: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/32: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/33: MissingCompileTimeError # Requires constant evaluation
+set_literals/invalid_set_literal_test/34: MissingCompileTimeError # Requires constant evaluation
 vm/regress_33469_test/01: MissingCompileTimeError
 vm/regress_33469_test/02: MissingCompileTimeError
 vm/regress_33469_test/03: MissingCompileTimeError
@@ -204,8 +215,6 @@
 async_return_types_test/nestedFuture: MissingCompileTimeError # Issue 33068
 const_cast2_test/01: CompileTimeError # Issue 32517
 const_cast2_test/none: CompileTimeError # Issue 32517
-const_constructor_mixin3_test: CompileTimeError # Issue 33644.
-const_constructor_mixin_test: CompileTimeError # Issue 33644.
 deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
 deferred_inheritance_constraints_test/implements: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
 deferred_inheritance_constraints_test/mixin: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
@@ -264,9 +273,6 @@
 vm/causal_async_exception_stack2_test: RuntimeError
 vm/causal_async_exception_stack_test: RuntimeError
 
-[ $compiler == app_jitk && ($mode == debug || $mode == release) ]
-assertion_test: RuntimeError
-
 [ $compiler != app_jitk && $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $fasta ]
 const_optional_args_test/01: MissingCompileTimeError
 
@@ -406,6 +412,13 @@
 assertion_initializer_const_error2_test/cc11: Crash
 async_await_test: RuntimeError
 async_return_types_test/nestedFuture: Fail
+async_star/async_star_cancel_test: DartkCrash
+async_star/async_star_invalid_test/01: DartkCrash
+async_star/async_star_invalid_test/02: DartkCrash
+async_star/async_star_invalid_test/03: DartkCrash
+async_star/async_star_invalid_test/04: DartkCrash
+async_star/async_star_invalid_test/none: DartkCrash
+async_star/async_star_test: DartkCrash
 compile_time_constant_checked_test/02: MissingCompileTimeError
 covariance_type_parameter_test/01: RuntimeError
 covariance_type_parameter_test/02: RuntimeError
@@ -621,8 +634,6 @@
 vm/causal_async_exception_stack2_test: SkipByDesign
 vm/causal_async_exception_stack_test: SkipByDesign
 vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
-vm/optimized_stacktrace_test: Crash
-vm/optimized_stacktrace_test: Skip # Issue 30198
 vm/reflect_core_vm_test: SkipByDesign
 vm/regress_27671_test: Skip # Unsupported
 vm/regress_29145_test: Skip # Issue 29145
@@ -1046,8 +1057,6 @@
 conditional_import_test: CompileTimeError # KernelVM bug: Deferred loading kernel issue 30273.
 config_import_corelib_test: CompileTimeError # Issue 31533
 config_import_test: RuntimeError # KernelVM bug: Configurable imports.
-const_constructor_mixin3_test: CompileTimeError # Issue 33644.
-const_constructor_mixin_test: CompileTimeError # Issue 33644.
 const_dynamic_type_literal_test/02: RuntimeError # KernelVM bug: Constant map duplicated key.
 const_list_test: RuntimeError
 const_locals_test: RuntimeError
diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status
index 858a0572..7416230 100644
--- a/tests/language_2/language_2_precompiled.status
+++ b/tests/language_2/language_2_precompiled.status
@@ -13,6 +13,20 @@
 [ $compiler != dart2analyzer && $runtime == dart_precompiled ]
 mixin_mixin2_test: Skip
 
+[ $compiler == dartkp && $runtime == dart_precompiled ]
+async_star/async_star_await_for_test: RuntimeError
+async_star/async_star_cancel_test: RuntimeError
+async_star/async_star_test: RuntimeError
+
+[ $compiler == precompiler && $runtime == dart_precompiled ]
+async_star/async_star_await_for_test: RuntimeError
+async_star/async_star_cancel_test: RuntimeError
+async_star/async_star_invalid_test/01: MissingCompileTimeError
+async_star/async_star_invalid_test/02: MissingCompileTimeError
+async_star/async_star_invalid_test/04: MissingCompileTimeError
+async_star/async_star_invalid_test/none: RuntimeError
+async_star/async_star_test: RuntimeError
+
 [ $runtime == dart_precompiled && $minified ]
 cyclic_type_test/*: Skip
 enum_duplicate_test/*: Skip # Uses Enum.toString()
@@ -36,4 +50,4 @@
 vm/no_such_args_error_message_vm_test: Skip
 vm/no_such_method_error_message_callable_vm_test: Skip
 vm/no_such_method_error_message_vm_test: Skip
-vm/regress_28325_test: Skip
\ No newline at end of file
+vm/regress_28325_test: Skip
diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status
index b696b0f..47d27f2 100644
--- a/tests/language_2/language_2_vm.status
+++ b/tests/language_2/language_2_vm.status
@@ -18,6 +18,9 @@
 set_literals/*: Skip
 
 [ $runtime == vm ]
+async_star/async_star_await_for_test: RuntimeError
+async_star/async_star_cancel_test: RuntimeError
+async_star/async_star_test: RuntimeError
 set_literals/*: Skip
 
 [ $arch == arm64 && $runtime == vm ]
diff --git a/tests/language_2/mixin_super_test.dart b/tests/language_2/mixin_super_test.dart
index 75ad654..77f72d6 100644
--- a/tests/language_2/mixin_super_test.dart
+++ b/tests/language_2/mixin_super_test.dart
@@ -54,6 +54,25 @@
   }
 }
 
+abstract class Base {
+  static String log = '';
+  Base() {
+    log += 'Base()\n';
+  }
+}
+
+mixin Foo on Base {
+  var x = Base.log += 'Foo.x\n';
+}
+
+mixin Bar on Base {
+  var y = Base.log += 'Bar.y\n';
+}
+
+class Derived extends Base with Foo, Bar {
+  String get log => Base.log;
+}
+
 main() {
   Expect.equals(
       "S<int,String,bool>.foo\n"
@@ -77,4 +96,9 @@
       "N<bool>.foo\n"
       "MNA3<int, String, bool>.foo\n",
       MNA3<int, String, bool>().foo());
+  Expect.equals(
+      "Bar.y\n"
+      "Foo.x\n"
+      "Base()\n",
+      Derived().log);
 }
diff --git a/tests/language_2/regress_35542_test.dart b/tests/language_2/regress_35542_test.dart
new file mode 100644
index 0000000..9b4a217
--- /dev/null
+++ b/tests/language_2/regress_35542_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'package:expect/expect.dart';
+
+FutureOr<dynamic> x = 'abc';
+dynamic y = 'abc';
+
+void smi() {
+  x = 42;
+  y = 42;
+}
+
+void mint() {
+  x = 0x7fffffff00000000;
+  y = 0x7fffffff00000000;
+}
+
+void dbl() {
+  x = 1.0;
+  y = 1.0;
+}
+
+void main() {
+  smi();
+  Expect.isTrue(identical(x, y));
+  mint();
+  Expect.isTrue(identical(x, y));
+  dbl();
+  Expect.isTrue(identical(x, y));
+}
diff --git a/tests/language_2/set_literals/const_set_flag_test.dart b/tests/language_2/set_literals/const_set_flag_test.dart
new file mode 100644
index 0000000..339acaf
--- /dev/null
+++ b/tests/language_2/set_literals/const_set_flag_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Canary test to check that set literals are not enabled *without* an
+// experimental flag.
+
+// Remove this test when the set literals feature is enabled without a flag.
+
+main() {
+  var _ = {1}; //# 01: compile-time error
+  var _ = <int>{}; //# 02: compile-time error
+  Set _ = {}; //# 03: compile-time error
+  Set _ = <int>{}; //# 04: compile-time error
+  var _ = const {1}; //# 05: compile-time error
+  var _ = const <int>{}; //# 06: compile-time error
+  Set _ = const {}; //# 07: compile-time error
+  Set _ = const <int>{}; //# 08: compile-time error
+  const _ = {1}; //# 09: compile-time error
+  const _ = <int>{}; //# 10: compile-time error
+  const Set _ = {}; //# 11: compile-time error
+  const Set _ = <int>{}; //# 12: compile-time error
+}
diff --git a/tests/language_2/set_literals/invalid_set_literal_test.dart b/tests/language_2/set_literals/invalid_set_literal_test.dart
index 0d8cd43..2b6a790 100644
--- a/tests/language_2/set_literals/invalid_set_literal_test.dart
+++ b/tests/language_2/set_literals/invalid_set_literal_test.dart
@@ -20,8 +20,8 @@
       = const <int, int, int>{1} //# 06: compile-time error
       = const <int, int>{1} //# 07: compile-time error
       = const {Duration(seconds: 0)} // Overrides ==. //# 08: compile-time error
-      = {4.2} // Overrides ==. //# 09: compile-time error
-      = {d} // Overrides ==. //# 10: compile-time error
+      = const {4.2} // Overrides ==. //# 09: compile-time error
+      = const {d} // Overrides ==. //# 10: compile-time error
       = {,} //# 11: compile-time error
       = {1,,} //# 12: compile-time error
       = {1,,1} //# 13: compile-time error
@@ -33,7 +33,6 @@
       = {4.2} //# 15: compile-time error
       = {1: 1} //# 16: compile-time error
       = {{}} //# 17: compile-time error
-      = <Object>{} // Exact type. //# 18: compile-time error
       ;
   Expect.isNull(s);
 
@@ -50,16 +49,6 @@
       ;
   Expect.isNull(hs);
 
-  LinkedHashSet<int> lhs //
-      = const {} // exact type is Set //# 24: compile-time error
-      ;
-  Expect.isNull(lhs);
-
-  LinkedHashSet<LinkedHashSet<int>> lhs2 //
-      = {const {}} // exact type LHS<Set>. //# 25: compile-time error
-      ;
-  Expect.isNull(lhs2);
-
   <T>(x) {
     // Type constants are allowed, type variables are not.
     var o //
@@ -77,4 +66,25 @@
     = {}; //# 28: compile-time error
     ;
   }();
+
+  // Constant sets must not contain equal elements.
+  const cs = {
+    1,
+    "s",
+    #foo,
+    int,
+    C(1),
+    {1},
+    1, //# 29: compile-time error
+    "s", //# 30: compile-time error
+    #foo, //# 31: compile-time error
+    int, //# 32: compile-time error
+    C(1), //# 33: compile-time error
+    {1}, //# 34: compile-time error
+  };
+}
+
+class C {
+  final Object id;
+  const C(this.id);
 }
diff --git a/tests/language_2/set_literals/set_literal_test.dart b/tests/language_2/set_literals/set_literal_test.dart
index 6ea5fee..cc17fae 100644
--- a/tests/language_2/set_literals/set_literal_test.dart
+++ b/tests/language_2/set_literals/set_literal_test.dart
@@ -87,27 +87,29 @@
 
   // Nested literals.
   Object o = {{2}};
-  Expect.type<LinkedHashSet<LinkedHashSet<int>>>(o);
+  Expect.type<LinkedHashSet<Set<int>>>(o);
+  Expect.type<LinkedHashSet<int>>((o as Set).first);
   Set<Set<int>> set = o;
   Expect.equals(1, set.length);
   Expect.equals(1, set.first.length);
   Expect.equals(2, set.first.first);
 
   o = {{2}, <int>{}};
-  Expect.type<LinkedHashSet<LinkedHashSet<int>>>(o);
+  Expect.type<LinkedHashSet<Set<int>>>(o);
+  Expect.type<LinkedHashSet<int>>((o as Set).first);
   set = o;
   Expect.equals(2, set.length);
   Expect.equals(1, set.first.length);
   Expect.equals(2, set.first.first);
 
-  set = {{}};
-  Expect.type<Set<Map<dynamic, dynamic>>>(set);
-  Expect.equals(1, set.length);
-  Expect.equals(0, set.first.length);
+  var set2 = {{}};
+  Expect.type<Set<Map<dynamic, dynamic>>>(set2);
+  Expect.equals(1, set2.length);
+  Expect.equals(0, set2.first.length);
 
-  set = {{1}, {}};  // Set<Object>
-  Expect.type<Set<Object>>(set);
-  Expect.notType<Set<Set<Object>>>(set);
+  var set3 = {{1}, {}};  // Set<Object>
+  Expect.type<Set<Object>>(set3);
+  Expect.notType<Set<Set<Object>>>(set3);
 
   // Trailing comma.
   Iterable<Object> i;
@@ -117,8 +119,8 @@
 
   o = {1, 2, 3,};
   Expect.type<Set<int>>(o);
-  set = o;
-  Expect.equals(3, set.length);
+  Set<Object> set4 = o;
+  Expect.equals(3, set4.length);
 }
 
 class Equality {
diff --git a/tests/language_2/vm/regress_35321_test.dart b/tests/language_2/vm/regress_35321_test.dart
new file mode 100644
index 0000000..8823ddb
--- /dev/null
+++ b/tests/language_2/vm/regress_35321_test.dart
@@ -0,0 +1,34 @@
+// 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.
+
+// Proper CP on double op (dartbug.com/35321).
+//
+// VMOptions=--deterministic --optimization_counter_threshold=10
+
+import "package:expect/expect.dart";
+
+double foo(bool x) {
+  if (x) return 1.0;
+}
+
+int bar(int i) {
+  if (i < 0) {
+    return bar(i + 1);
+  } else if ((foo(i == 22) / 22.0) >= (1 / 0.0)) {
+    return 1;
+  }
+  return 0;
+}
+
+void main() {
+  for (int i = 0; i < 20; ++i) {
+    var x = -1;
+    try {
+      x = bar(i);
+    } catch (_) {
+      x = -2;
+    }
+    Expect.equals(-2, x);
+  }
+}
diff --git a/tests/language_2/vm/regress_35325_test.dart b/tests/language_2/vm/regress_35325_test.dart
new file mode 100644
index 0000000..cfd9772
--- /dev/null
+++ b/tests/language_2/vm/regress_35325_test.dart
@@ -0,0 +1,37 @@
+// 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.
+
+// Proper nullable comparison (dartbug.com/35325).
+//
+// VMOptions=--deterministic --optimization_counter_threshold=10
+
+import "package:expect/expect.dart";
+
+bool var1;
+int var2;
+
+bar(List<int> par1, double par2) {
+  if (par2 == 123.0) return 456.0;
+  // fall into return null
+}
+
+bool foo(double par1) {
+  return (bar(
+          [81, 17],
+          ((!(var1))
+              ? double.maxFinite
+              : (var1 ? (80).floorToDouble() : par1))) ==
+      (((~(var2))).roundToDouble()).sign);
+}
+
+void main() {
+  for (int i = 0; i < 20; ++i) {
+    var1 = true;
+    var2 = 4;
+    var x = foo(0.0);
+    Expect.isFalse(x);
+    Expect.isTrue(var1);
+    Expect.equals(4, var2);
+  }
+}
diff --git a/tests/language_2/vm/type_of_call_via_getter_test.dart b/tests/language_2/vm/type_of_call_via_getter_test.dart
new file mode 100644
index 0000000..4a6c445
--- /dev/null
+++ b/tests/language_2/vm/type_of_call_via_getter_test.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This test verifies that compiler infers correct type from call via getter.
+
+// VMOptions=--no_background_compilation --optimization_counter_threshold=10
+
+import "package:expect/expect.dart";
+
+typedef String IntFunctionType(int _);
+
+String functionImpl(int a) => 'abc';
+
+class Box {
+  IntFunctionType get fun => functionImpl;
+}
+
+var box = new Box();
+
+void test1() {
+  Expect.isFalse(box.fun(42) is Function);
+  Expect.isTrue(box.fun(42) is String);
+}
+
+class Callable {
+  String call(int i) => 'qwe';
+}
+
+class Box2 {
+  Callable get fun => new Callable();
+}
+
+var box2 = new Box2();
+
+void test2() {
+  Expect.isFalse(box2.fun is Function);
+  Expect.isTrue(box2.fun is Callable);
+  Expect.isFalse(box2.fun(42) is Function);
+  Expect.isFalse(box2.fun(42) is Callable);
+  Expect.isTrue(box2.fun(42) is String);
+}
+
+void main() {
+  for (int i = 0; i < 20; ++i) {
+    test1();
+  }
+  for (int i = 0; i < 20; ++i) {
+    test2();
+  }
+}
diff --git a/tests/lib_2/async/timer_regress22626_test.dart b/tests/lib_2/async/timer_regress22626_test.dart
deleted file mode 100644
index c3e00df..0000000
--- a/tests/lib_2/async/timer_regress22626_test.dart
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test that no wakeups are being dropped if we cancel timers.
-// WARNING: For this test to work it cannot rely on any other async features
-// and will just timeout if it is failing.
-
-library timer_regress22626_test;
-
-import 'dart:async';
-import 'dart:math';
-import 'package:expect/expect.dart';
-
-int countdown = 5;
-var rng = new Random(1234);
-
-void test(int delay, int delta) {
-  var t0 = new Timer(new Duration(milliseconds: delay + delta),
-      () => Expect.fail("should have been cancelled by now"));
-  new Timer(Duration.zero, () => t0.cancel());
-  new Timer(
-      Duration.zero,
-      () => new Timer(new Duration(milliseconds: delay), () {
-            if (--countdown == 0) {
-              print("done");
-            } else {
-              test(delay, max(0, delta + rng.nextInt(2) - 1));
-            }
-          }));
-}
-
-void main() {
-  test(200, 2);
-}
diff --git a/tests/lib_2/isolate/issue_6610_test.dart b/tests/lib_2/isolate/issue_6610_test.dart
new file mode 100644
index 0000000..96cc5e8f
--- /dev/null
+++ b/tests/lib_2/isolate/issue_6610_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Testing that Isolate.spawn copies the source code of the parent isolate,
+// rather than rereading the parent's source URI.
+// https://github.com/dart-lang/sdk/issues/6610
+
+// Isolate structure:
+//     Root 1 -> Branch 1 -> Leaf 1
+//     /
+//  main
+//     \
+//     Root 2 -> Branch 2 -> Leaf 2
+
+library spawn_tests;
+
+import "dart:io";
+import 'dart:isolate';
+import 'package:expect/expect.dart';
+
+void main() {
+  HttpServer.bind("127.0.0.1", 0).then((server) {
+    var count = 0;
+    server.listen((HttpRequest request) {
+      ++count;
+      request.response.write("""
+        import 'dart:isolate';
+
+        void main(_, SendPort port) {
+          root(port);
+        }
+
+        void root(SendPort port) {
+          port.send("Root ${count}");
+          Isolate.spawn(branch, port);
+        }
+
+        void branch(SendPort port) {
+          port.send("Branch ${count}");
+          Isolate.spawn(leaf, port);
+        }
+
+        void leaf(SendPort port) {
+          port.send("Leaf ${count}");
+        }
+      """);
+      request.response.close();
+    });
+
+    ReceivePort port = new ReceivePort();
+    var messageSet = Set();
+    port.listen((message) {
+      messageSet.add(message);
+      if (messageSet.length >= 6) {
+        server.close();
+        port.close();
+        Expect.setEquals([
+          "Root 1",
+          "Root 2",
+          "Branch 1",
+          "Branch 2",
+          "Leaf 1",
+          "Leaf 2",
+        ], messageSet);
+      }
+    });
+
+    Isolate.spawnUri(
+        Uri.parse("http://127.0.0.1:${server.port}"), [], port.sendPort);
+    Isolate.spawnUri(
+        Uri.parse("http://127.0.0.1:${server.port}"), [], port.sendPort);
+  });
+}
diff --git a/tests/lib_2/isolate/kill_regexp_test.dart b/tests/lib_2/isolate/kill_regexp_test.dart
new file mode 100644
index 0000000..33cb8eb
--- /dev/null
+++ b/tests/lib_2/isolate/kill_regexp_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--intrinsify
+// VMOptions=--no_intrinsify
+
+import "dart:isolate";
+import "dart:async";
+import "package:expect/expect.dart";
+
+isomain1(replyPort) {
+  final regexp = new RegExp('[ab]c');
+  while (true) {
+    Expect.equals(4, regexp.allMatches("acbcacbc").length);
+  }
+}
+
+void main() {
+  for (int i = 0; i < 20; ++i) {
+    ReceivePort reply = new ReceivePort();
+    Isolate.spawn(isomain1, reply.sendPort).then((Isolate isolate) {
+      new Timer(new Duration(milliseconds: 50), () {
+        print('killing isolate $i');
+        isolate.kill(priority: Isolate.immediate);
+      });
+    });
+    reply.close();
+  }
+}
diff --git a/tests/lib_2/isolate/spawn_uri_exported_main_test.dart b/tests/lib_2/isolate/spawn_uri_exported_main_test.dart
index e556dc6..cf0df43 100644
--- a/tests/lib_2/isolate/spawn_uri_exported_main_test.dart
+++ b/tests/lib_2/isolate/spawn_uri_exported_main_test.dart
@@ -4,7 +4,9 @@
 
 main() {
   print("Spawning isolate.");
-  var t = new Timer(new Duration(seconds: 5), () {
+  var t = new Timer(new Duration(seconds: 30), () {
+    // it might take some time for new isolate to get spawned from source since
+    // it needs to be compiled first.
     Expect.fail("Isolate was not spawned successfully.");
   });
   var rp = new RawReceivePort();
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index f1d2f76..f6628fa 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -108,7 +108,6 @@
 
 [ $hot_reload ]
 async/stream_periodic4_test: Pass, RuntimeError # Issue 30904
-async/timer_regress22626_test: Pass, RuntimeError # Timing dependent.
 mirrors/dynamic_load_test: RuntimeError # Issue 26869 - Reload fails to preserve library identity
 
 [ $jscl ]
@@ -212,6 +211,7 @@
 isolate/issue_21398_parent_isolate1_test: Skip # Isolate.spawnUri
 isolate/issue_21398_parent_isolate_test: Skip # Isolate.spawnUri
 isolate/issue_24243_parent_isolate_test: Skip # Isolate.spawnUri
+isolate/issue_6610_test: Skip # Isolate.spawnUri
 isolate/mandel_isolate_test: Skip # Isolate.spawnUri
 isolate/message2_test: Skip # Isolate.spawnUri
 isolate/message_test: Skip # Isolate.spawnUri
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status
index 44d8af1..449d91a 100644
--- a/tests/lib_2/lib_2_dart2js.status
+++ b/tests/lib_2/lib_2_dart2js.status
@@ -456,7 +456,6 @@
 async/timer_cancel2_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/timer_cancel_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/timer_isActive_test: RuntimeError # Timer interface not supported: Issue 7728.
-async/timer_regress22626_test: RuntimeError # Non-zero timers not supported; Issue 7728.
 async/timer_repeat_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/timer_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/zone_bind_test: Fail # Timer interface not supported: Issue 7728.
diff --git a/tests/lib_2/lib_2_kernel.status b/tests/lib_2/lib_2_kernel.status
index b636d47..b5f6efc 100644
--- a/tests/lib_2/lib_2_kernel.status
+++ b/tests/lib_2/lib_2_kernel.status
@@ -45,6 +45,9 @@
 [ $arch == simdbc64 && $hot_reload_rollback ]
 convert/streamed_conversion_json_utf8_decode_test: SkipSlow # Uses --verify_before_gc --verify_after_gc --old_gen_growth_rate=1 flags
 
+[ $arch == simdbc64 && $strong && ($compiler == dartk || $compiler == dartkb) ]
+isolate/issue_24243_parent_isolate_test: RuntimeError # dartbug.com/35373
+
 [ $arch == x64 && $builder_tag == asan && $compiler == dartk ]
 mirrors/dynamic_load_test: Fail # Memory leak (issue 34724)
 
@@ -78,6 +81,7 @@
 [ $compiler == dartkb && $strong ]
 convert/streamed_conversion_json_utf8_decode_test: Pass, Timeout # Please triage.
 isolate/isolate_complex_messages_test: Pass, Crash # runtime/vm/object.cc: 17395: error: expected: type_arguments.IsNull() || type_arguments.IsCanonical()
+isolate/kill_regexp_test: Pass, Crash # Issue 35590 - isolate.cc: 2863: error: expected: sticky_error_ == Error::null()
 isolate/mandel_isolate_test: Pass, Timeout # Please triage.
 isolate/spawn_uri_exported_main_test: Pass, RuntimeError # Please triage: Expect.fail('Isolate was not spawned successfully.')
 mirrors/invocation_fuzz_test/emptyarray: Skip # Times out, issue 32232
@@ -123,7 +127,6 @@
 mirrors/other_declarations_location_test: Crash # Issue 33325 (assertion error, TypeParameter not having position).
 
 [ $mode == debug && $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
-async/timer_regress22626_test: Skip # Timing dependent
 isolate/message3_test/constList_identical: Skip # Timeout
 
 [ $runtime == vm && $checked && $strong && ($compiler == dartk || $compiler == dartkb) ]
@@ -137,7 +140,7 @@
 html/*: SkipByDesign # dart:html not supported on VM.
 isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
 isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/issue_21398_parent_isolate1_test: RuntimeError # Issue 31402 (List literal)
+isolate/issue_21398_parent_isolate1_test: RuntimeError, Crash # Issue 31402 (List literal), Issue 35374.
 isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
 isolate/message_test: CompileTimeError # Issue 31402 (Invocation arguments)
 isolate/mint_maker_test: CompileTimeError # Issue 31402 (Invocation arguments)
@@ -249,6 +252,9 @@
 typed_data/int32x4_static_test/01: MissingCompileTimeError
 typed_data/int32x4_static_test/02: MissingCompileTimeError
 
+[ $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
+isolate/issue_6610_test: RuntimeError, Crash # Sources are looked up on every reload request.
+
 [ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
 isolate/illegal_msg_function_test: Skip # Timeout
 isolate/pause_test: Skip # Timeout
@@ -257,26 +263,8 @@
 # are to be triaged.  Isolate tests are skipped on purpose due to the usage of
 # batch mode.
 [ $strong && ($arch == simarm || $arch == simarm64 || $arch == simdbc64) && ($compiler == dartk || $compiler == dartkb) ]
-isolate/cross_isolate_message_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/error_at_spawnuri_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/error_exit_at_spawnuri_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/exit_at_spawnuri_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/issue_21398_parent_isolate_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/issue_24243_parent_isolate_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
 isolate/mandel_isolate_test: Pass, Timeout
-isolate/message2_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/nested_spawn2_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/nested_spawn_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/raw_port_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/request_reply_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/spawn_function_custom_class_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/spawn_function_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/spawn_uri_exported_main_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/spawn_uri_multi_test/none: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/spawn_uri_nested_vm_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/spawn_uri_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/spawn_uri_vm_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
-isolate/unresolved_ports_test: Skip # No support for Isolate.spawnUri in batch-mode atm.
+isolate/nested_spawn2_test: Pass, RuntimeError # RuntimeError caused by timeout
 mirrors/library_uri_io_test: RuntimeError # Please triage.
 
 [ $strong && ($compiler == dartk || $compiler == dartkb) ]
@@ -308,40 +296,8 @@
 *: SkipByDesign
 
 [ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
-async/stream_from_iterable_test: Skip # Timeout
-async/stream_iterator_test: Skip # Timeout
-async/stream_periodic2_test: Skip # Timeout
-async/stream_periodic3_test: Skip # Timeout
-async/stream_periodic4_test: Skip # Timeout
-async/stream_periodic5_test: Skip # Timeout
-async/stream_periodic6_test: Skip # Timeout
-async/stream_periodic_test: Skip # Timeout
-async/stream_single_test: Skip # Timeout
-async/stream_single_to_multi_subscriber_test: Skip # Timeout
-async/stream_state_test: Skip # Timeout
-async/stream_timeout_test: Skip # Timeout
-async/stream_transform_test: Skip # Timeout
-async/stream_transformation_broadcast_test: Skip # Timeout
-async/timer_cancel1_test: Skip # Timeout
-async/timer_isActive_test: Skip # Timeout
-async/timer_test: Skip # Timeout
-isolate/count_test: Skip # Timeout
-isolate/cross_isolate_message_test: Skip # Timeout
-isolate/isolate_complex_messages_test: Skip # Timeout
-isolate/isolate_import_test/none: Skip # Timeout
-isolate/issue_21398_parent_isolate1_test: Skip # Timeout
-isolate/mandel_isolate_test: Skip # Timeout
-isolate/message2_test: Skip # Timeout
+isolate/mandel_isolate_test: Pass, Timeout, RuntimeError # Test can time out which results in runtime error
 isolate/message4_test: Pass, Timeout, Crash # Timeout and sporadic crash (issue 33824)
-isolate/nested_spawn2_test: Skip # Timeout
-isolate/nested_spawn_test: Skip # Timeout
-isolate/raw_port_test: Skip # Timeout
-isolate/spawn_function_test: Skip # Timeout
-isolate/spawn_uri_test: Skip # Timeout
-isolate/spawn_uri_vm_test: Skip # Timeout
-isolate/timer_isolate_test: Skip # Timeout
-isolate/timer_multiple_isolates_test: Skip # Timeout
-isolate/unresolved_ports_test: Skip # Timeout
 mirrors/dynamic_load_test: Crash
 mirrors/library_uri_io_test: Skip # Timeout
 mirrors/library_uri_package_test: Skip # Timeout
diff --git a/tests/lib_2/lib_2_precompiled.status b/tests/lib_2/lib_2_precompiled.status
index 662e008..1083bc9 100644
--- a/tests/lib_2/lib_2_precompiled.status
+++ b/tests/lib_2/lib_2_precompiled.status
@@ -12,7 +12,6 @@
 [ $compiler == app_jit || $compiler == none || $compiler == precompiler ]
 async/future_or_strong_test: RuntimeError
 async/timer_not_available_test: SkipByDesign # only meant to test when there is no way to implement timer (currently only in d8)
-async/timer_regress22626_test: Pass, RuntimeError # Issue 28254
 isolate/compile_time_error_test/01: Skip # Issue 12587
 isolate/ping_pause_test: Skip # Resolve test issues
 isolate/ping_test: Skip # Resolve test issues
diff --git a/tests/lib_2/mirrors/bad_argument_types_test.dart b/tests/lib_2/mirrors/bad_argument_types_test.dart
new file mode 100644
index 0000000..8063803
--- /dev/null
+++ b/tests/lib_2/mirrors/bad_argument_types_test.dart
@@ -0,0 +1,157 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'dart:mirrors';
+
+import 'package:expect/expect.dart';
+
+int foobar = 1;
+
+set foobaz(int x) {
+  foobar = x;
+}
+
+void foo(Map<String, String> m) {
+  print(m);
+  print(m['bar']);
+}
+
+void bar<T extends num>(T a) {
+  print(a);
+}
+
+class Foo {
+  Map<String, String> bork;
+  static Map<String, String> bark;
+  static set woof(Map<String, String> x) {
+    bark = x;
+  }
+
+  Foo(Map<String, String> m) {
+    print(m);
+  }
+
+  Foo.a();
+
+  static void baz(Map<String, String> m, {String bar}) {
+    print('baz');
+    print(m['bar']);
+    print(bar);
+  }
+
+  void bar(Map<String, String> m) {
+    print('bar');
+    print(m.runtimeType);
+  }
+}
+
+class FooBar<T extends num> {
+  T bar;
+  FooBar(this.bar) {
+    print(bar);
+  }
+
+  set barz(T x) {
+    bar = x;
+  }
+
+  factory FooBar.baz(T bar) {
+    print(bar);
+    return FooBar(bar);
+  }
+
+  void foobar<S>(T a, S b) {
+    print(a);
+    print(b);
+  }
+}
+
+void badClassStaticInvoke() {
+  Map<String, String> map = Map<String, String>();
+  map['bar'] = 'Hello world!';
+  final cm = reflectClass(Foo);
+  Expect.throwsTypeError(() => cm.invoke(#baz, [
+        map
+      ], {
+        #bar: {'boo': 'bah'}
+      }));
+}
+
+void badStaticInvoke() {
+  final ClosureMirror im = reflect(foo);
+  Expect.throwsTypeError(() => im.apply(['Hello world!']));
+}
+
+void badInstanceInvoke() {
+  final fooCls = Foo.a();
+  final im = reflect(fooCls);
+  Expect.throwsTypeError(() => im.invoke(#bar, ['Hello World!']));
+}
+
+void badConstructorInvoke() {
+  final cm = reflectClass(Foo);
+  Expect.throwsTypeError(() => cm.newInstance(Symbol(''), ['Hello World!']));
+}
+
+void badSetterInvoke() {
+  final fooCls = Foo.a();
+  final im = reflect(fooCls);
+  Expect.throwsTypeError(() => im.setField(#bork, 'Hello World!'));
+}
+
+void badStaticSetterInvoke() {
+  final cm = reflectClass(Foo);
+  Expect.throwsTypeError(() => cm.setField(#bark, 'Hello World!'));
+  Expect.throwsTypeError(() => cm.setField(#woof, 'Hello World!'));
+}
+
+void badGenericConstructorInvoke() {
+  final cm = reflectType(FooBar, [int]) as ClassMirror;
+  Expect.throwsTypeError(() => cm.newInstance(Symbol(''), ['Hello World!']));
+}
+
+void badGenericClassStaticInvoke() {
+  final cm = reflectType(FooBar, [int]) as ClassMirror;
+  final im = cm.newInstance(Symbol(''), [1]);
+  Expect.throwsTypeError(() => im.invoke(#foobar, ['Hello', 'World']));
+}
+
+void badGenericFactoryInvoke() {
+  final cm = reflectType(FooBar, [int]) as ClassMirror;
+  Expect.throwsTypeError(() => cm.newInstance(Symbol('baz'), ['Hello World!']));
+}
+
+void badGenericStaticInvoke() {
+  final ClosureMirror im = reflect(bar);
+  Expect.throwsTypeError(() => im.apply(['Hello world!']));
+}
+
+void badGenericSetterInvoke() {
+  final cm = reflectType(FooBar, [int]) as ClassMirror;
+  final im = cm.newInstance(Symbol(''), [0]);
+  Expect.throwsTypeError(() => im.setField(#bar, 'Hello world!'));
+  Expect.throwsTypeError(() => im.setField(#barz, 'Hello world!'));
+}
+
+void badLibrarySetterInvoke() {
+  final lm = currentMirrorSystem().findLibrary(Symbol(''));
+  Expect.throwsTypeError(() => lm.setField(#foobar, 'Foobaz'));
+  Expect.throwsTypeError(() => lm.setField(#foobaz, 'Foobaz'));
+}
+
+void main() {
+  badClassStaticInvoke();
+  badStaticInvoke();
+  badInstanceInvoke();
+  badConstructorInvoke();
+  badSetterInvoke();
+  badStaticSetterInvoke();
+  badGenericConstructorInvoke();
+  badGenericClassStaticInvoke();
+  badGenericFactoryInvoke();
+  badGenericStaticInvoke();
+  badGenericSetterInvoke();
+  badLibrarySetterInvoke();
+}
diff --git a/tests/standalone/dwarf_stack_trace_test.dart b/tests/standalone_2/dwarf_stack_trace_test.dart
similarity index 98%
rename from tests/standalone/dwarf_stack_trace_test.dart
rename to tests/standalone_2/dwarf_stack_trace_test.dart
index 6b16966..23a35ef 100644
--- a/tests/standalone/dwarf_stack_trace_test.dart
+++ b/tests/standalone_2/dwarf_stack_trace_test.dart
@@ -102,6 +102,6 @@
         "main",
         "dwarf_stack_trace_test.dart:23",
         "main", // dispatcher
-        "dwarf_stack_trace_test.dart:20"
+        "dwarf_stack_trace_test.dart:?"
       ]));
 }
diff --git a/tests/standalone_2/io/http_compression_test.dart b/tests/standalone_2/io/http_compression_test.dart
index 35afe5a..2e0b45f 100644
--- a/tests/standalone_2/io/http_compression_test.dart
+++ b/tests/standalone_2/io/http_compression_test.dart
@@ -11,112 +11,94 @@
 import 'dart:io';
 import 'dart:typed_data';
 
-void testServerCompress({bool clientAutoUncompress: true}) {
-  void test(List<int> data) {
-    HttpServer.bind("127.0.0.1", 0).then((server) {
-      server.autoCompress = true;
-      server.listen((request) {
-        request.response.add(data);
-        request.response.close();
-      });
-      var client = new HttpClient();
-      client.autoUncompress = clientAutoUncompress;
-      client.get("127.0.0.1", server.port, "/").then((request) {
-        request.headers.set(HttpHeaders.acceptEncodingHeader, "gzip,deflate");
-        return request.close();
-      }).then((response) {
-        Expect.equals(
-            "gzip", response.headers.value(HttpHeaders.contentEncodingHeader));
-        response.fold([], (list, b) {
-          list.addAll(b);
-          return list;
-        }).then((list) {
-          if (clientAutoUncompress) {
-            Expect.listEquals(data, list);
-          } else {
-            Expect.listEquals(data, gzip.decode(list));
-          }
-          server.close();
-          client.close();
-        });
-      });
+void testServerCompress({bool clientAutoUncompress: true}) async {
+  void test(List<int> data) async {
+    final server = await HttpServer.bind("127.0.0.1", 0);
+    server.autoCompress = true;
+    server.listen((request) {
+      request.response.add(data);
+      request.response.close();
     });
+    var client = new HttpClient();
+    client.autoUncompress = clientAutoUncompress;
+    final request = await client.get("127.0.0.1", server.port, "/");
+    request.headers.set(HttpHeaders.acceptEncodingHeader, "gzip,deflate");
+    final response = await request.close();
+    Expect.equals(
+        "gzip", response.headers.value(HttpHeaders.contentEncodingHeader));
+    final list = await response.fold(<int>[], (list, b) => list..addAll(b));
+    if (clientAutoUncompress) {
+      Expect.listEquals(data, list);
+    } else {
+      Expect.listEquals(data, gzip.decode(list));
+    }
+    server.close();
+    client.close();
   }
 
-  test("My raw server provided data".codeUnits);
+  await test("My raw server provided data".codeUnits);
   var longBuffer = new Uint8List(1024 * 1024);
   for (int i = 0; i < longBuffer.length; i++) {
     longBuffer[i] = i & 0xFF;
   }
-  test(longBuffer);
+  await test(longBuffer);
 }
 
-void testAcceptEncodingHeader() {
-  void test(String encoding, bool valid) {
-    HttpServer.bind("127.0.0.1", 0).then((server) {
-      server.autoCompress = true;
-      server.listen((request) {
-        request.response.write("data");
-        request.response.close();
-      });
-      var client = new HttpClient();
-      client.get("127.0.0.1", server.port, "/").then((request) {
-        request.headers.set(HttpHeaders.acceptEncodingHeader, encoding);
-        return request.close();
-      }).then((response) {
-        Expect.equals(
-            valid,
-            ("gzip" ==
-                response.headers.value(HttpHeaders.contentEncodingHeader)));
-        response.listen((_) {}, onDone: () {
-          server.close();
-          client.close();
-        });
-      });
-    });
-  }
-
-  test('gzip', true);
-  test('deflate', false);
-  test('gzip, deflate', true);
-  test('gzip ,deflate', true);
-  test('gzip  ,  deflate', true);
-  test('deflate,gzip', true);
-  test('deflate, gzip', true);
-  test('deflate ,gzip', true);
-  test('deflate  ,  gzip', true);
-  test('abc,deflate  ,  gzip,def,,,ghi  ,jkl', true);
-  test('xgzip', false);
-  test('gzipx;', false);
-}
-
-void testDisableCompressTest() {
-  HttpServer.bind("127.0.0.1", 0).then((server) {
-    Expect.equals(false, server.autoCompress);
+void testAcceptEncodingHeader() async {
+  void test(String encoding, bool valid) async {
+    final server = await HttpServer.bind("127.0.0.1", 0);
+    server.autoCompress = true;
     server.listen((request) {
-      Expect.equals(
-          'gzip', request.headers.value(HttpHeaders.acceptEncodingHeader));
       request.response.write("data");
       request.response.close();
     });
     var client = new HttpClient();
-    client
-        .get("127.0.0.1", server.port, "/")
-        .then((request) => request.close())
-        .then((response) {
-      Expect.equals(
-          null, response.headers.value(HttpHeaders.contentEncodingHeader));
-      response.listen((_) {}, onDone: () {
-        server.close();
-        client.close();
-      });
-    });
-  });
+    final request = await client.get("127.0.0.1", server.port, "/");
+    request.headers.set(HttpHeaders.acceptEncodingHeader, encoding);
+    final response = await request.close();
+    Expect.equals(valid,
+        ("gzip" == response.headers.value(HttpHeaders.contentEncodingHeader)));
+    await response.listen((_) {}).asFuture();
+    server.close();
+    client.close();
+  }
+
+  await test('gzip', true);
+  await test('deflate', false);
+  await test('gzip, deflate', true);
+  await test('gzip ,deflate', true);
+  await test('gzip  ,  deflate', true);
+  await test('deflate,gzip', true);
+  await test('deflate, gzip', true);
+  await test('deflate ,gzip', true);
+  await test('deflate  ,  gzip', true);
+  await test('abc,deflate  ,  gzip,def,,,ghi  ,jkl', true);
+  await test('xgzip', false);
+  await test('gzipx;', false);
 }
 
-void main() {
-  testServerCompress();
-  testServerCompress(clientAutoUncompress: false);
-  testAcceptEncodingHeader();
-  testDisableCompressTest();
+void testDisableCompressTest() async {
+  final server = await HttpServer.bind("127.0.0.1", 0);
+  Expect.equals(false, server.autoCompress);
+  server.listen((request) {
+    Expect.equals(
+        'gzip', request.headers.value(HttpHeaders.acceptEncodingHeader));
+    request.response.write("data");
+    request.response.close();
+  });
+  final client = new HttpClient();
+  final request = await client.get("127.0.0.1", server.port, "/");
+  final response = await request.close();
+  Expect.equals(
+      null, response.headers.value(HttpHeaders.contentEncodingHeader));
+  await response.listen((_) {}).asFuture();
+  server.close();
+  client.close();
+}
+
+void main() async {
+  await testServerCompress();
+  await testServerCompress(clientAutoUncompress: false);
+  await testAcceptEncodingHeader();
+  await testDisableCompressTest();
 }
diff --git a/tests/standalone_2/io/issue_31492_test.dart b/tests/standalone_2/io/issue_31492_test.dart
new file mode 100644
index 0000000..ed3c67e
--- /dev/null
+++ b/tests/standalone_2/io/issue_31492_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2019, 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.
+
+// Testing that HttpClient throws an exception if a connection is opened after
+// the client is closed. https://github.com/dart-lang/sdk/issues/31492
+
+import "dart:io";
+import "package:expect/expect.dart";
+
+void main() {
+  HttpServer.bind("127.0.0.1", 0).then((server) {
+    server.listen((request) {
+      request.listen((_) {});
+    });
+    var client = new HttpClient();
+    client.close();
+    Expect.throws<StateError>(() => client.post("127.0.0.1", server.port, "/"));
+    server.close();
+  });
+}
diff --git a/tests/standalone_2/io/socket_bind_test.dart b/tests/standalone_2/io/socket_bind_test.dart
index b91b6c3..0cc540e 100644
--- a/tests/standalone_2/io/socket_bind_test.dart
+++ b/tests/standalone_2/io/socket_bind_test.dart
@@ -5,75 +5,53 @@
 import 'dart:async';
 import 'dart:io';
 
-import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
 
-import 'test_utils.dart' show freeIPv4AndIPv6Port, retry;
+import 'test_utils.dart' show retry, throws;
 
-testBindShared(String host, bool v6Only) {
-  asyncStart();
-  ServerSocket.bind(host, 0, v6Only: v6Only, shared: true).then((socket) {
-    Expect.isTrue(socket.port > 0);
+Future testBindShared(String host, bool v6Only) async {
+  final socket = await ServerSocket.bind(host, 0, v6Only: v6Only, shared: true);
+  Expect.isTrue(socket.port > 0);
 
-    asyncStart();
-    return ServerSocket
-        .bind(host, socket.port, v6Only: v6Only, shared: true)
-        .then((socket2) {
-      Expect.equals(socket.address.address, socket2.address.address);
-      Expect.equals(socket.port, socket2.port);
-      socket.close().whenComplete(asyncEnd);
-      socket2.close().whenComplete(asyncEnd);
-    });
-  });
+  final socket2 =
+      await ServerSocket.bind(host, socket.port, v6Only: v6Only, shared: true);
+
+  Expect.equals(socket.address.address, socket2.address.address);
+  Expect.equals(socket.port, socket2.port);
+
+  await socket.close();
+  await socket2.close();
 }
 
-negTestBindSharedMismatch(String host, bool v6Only) {
-  asyncStart();
-  ServerSocket.bind(host, 0, v6Only: v6Only).then((ServerSocket socket) {
-    Expect.isTrue(socket.port > 0);
+Future negTestBindSharedMismatch(String host, bool v6Only) async {
+  final socket = await ServerSocket.bind(host, 0, v6Only: v6Only);
+  Expect.isTrue(socket.port > 0);
 
-    asyncStart();
-    return ServerSocket
-        .bind(host, socket.port, v6Only: v6Only)
-        .catchError((error) {
-      Expect.isTrue(error is SocketException);
-      Expect.isTrue('$error'.contains('shared flag'));
-      socket.close().whenComplete(asyncEnd);
-      asyncEnd();
-    });
-  });
+  await throws(() => ServerSocket.bind(host, socket.port, v6Only: v6Only),
+      (error) => error is SocketException && '$error'.contains('shared flag'));
+  await socket.close();
 }
 
-negTestBindV6OnlyMismatch(String host, bool v6Only) {
-  asyncStart();
-  ServerSocket
-      .bind(host, 0, v6Only: v6Only, shared: true)
-      .then((ServerSocket socket) {
-    Expect.isTrue(socket.port > 0);
+Future negTestBindV6OnlyMismatch(String host, bool v6Only) async {
+  final socket = await ServerSocket.bind(host, 0, v6Only: v6Only, shared: true);
+  Expect.isTrue(socket.port > 0);
 
-    asyncStart();
-    return ServerSocket
-        .bind(host, socket.port, v6Only: !v6Only, shared: true)
-        .catchError((error) {
-      Expect.isTrue(error is SocketException);
-      Expect.isTrue('$error'.contains('v6Only flag'));
-      socket.close().whenComplete(asyncEnd);
-      asyncEnd();
-    });
-  });
+  await throws(
+      () => ServerSocket.bind(host, socket.port, v6Only: !v6Only, shared: true),
+      (error) => error is SocketException && '$error'.contains('v6Only flag'));
+
+  await socket.close();
 }
 
 Future testBindDifferentAddresses(InternetAddress addr1, InternetAddress addr2,
     bool addr1V6Only, bool addr2V6Only) async {
-  int freePort = await freeIPv4AndIPv6Port();
-
-  var socket = await ServerSocket.bind(addr1, freePort,
-      v6Only: addr1V6Only, shared: false);
+  var socket =
+      await ServerSocket.bind(addr1, 0, v6Only: addr1V6Only, shared: false);
 
   try {
     Expect.isTrue(socket.port > 0);
 
-    var socket2 = await ServerSocket.bind(addr2, freePort,
+    var socket2 = await ServerSocket.bind(addr2, socket.port,
         v6Only: addr2V6Only, shared: false);
     try {
       Expect.equals(socket.port, socket2.port);
@@ -85,9 +63,7 @@
   }
 }
 
-testListenCloseListenClose(String host) async {
-  asyncStart();
-
+Future testListenCloseListenClose(String host) async {
   ServerSocket socket = await ServerSocket.bind(host, 0, shared: true);
   ServerSocket socket2 =
       await ServerSocket.bind(host, socket.port, shared: true);
@@ -117,12 +93,9 @@
 
   // Close the second server socket.
   await socket2.close();
-  asyncEnd();
 }
 
 main() async {
-  asyncStart();
-
   await retry(() async {
     await testBindDifferentAddresses(
         InternetAddress.anyIPv6, InternetAddress.anyIPv4, true, false);
@@ -133,16 +106,15 @@
   });
 
   for (var host in ['127.0.0.1', '::1']) {
-    testBindShared(host, false);
-    testBindShared(host, true);
+    await testBindShared(host, false);
+    await testBindShared(host, true);
 
-    negTestBindSharedMismatch(host, false);
-    negTestBindSharedMismatch(host, true);
+    await negTestBindSharedMismatch(host, false);
+    await negTestBindSharedMismatch(host, true);
 
-    negTestBindV6OnlyMismatch(host, true);
-    negTestBindV6OnlyMismatch(host, false);
+    await negTestBindV6OnlyMismatch(host, true);
+    await negTestBindV6OnlyMismatch(host, false);
 
-    testListenCloseListenClose(host);
+    await testListenCloseListenClose(host);
   }
-  asyncEnd();
 }
diff --git a/tests/standalone_2/io/socket_source_address_test.dart b/tests/standalone_2/io/socket_source_address_test.dart
index 82f5099..4fe8b39 100644
--- a/tests/standalone_2/io/socket_source_address_test.dart
+++ b/tests/standalone_2/io/socket_source_address_test.dart
@@ -6,44 +6,19 @@
 import "dart:async";
 import "dart:io";
 
-import "package:async_helper/async_helper.dart";
-import "package:expect/expect.dart";
-
-import 'test_utils.dart' show freeIPv4AndIPv6Port, retry;
-
-Future throws(Function f, Function check) async {
-  try {
-    await f();
-    Expect.fail('Did not throw');
-  } catch (e) {
-    if (check != null) {
-      if (!check(e)) {
-        Expect.fail('Unexpected: $e');
-      }
-    }
-  }
-}
+import 'test_utils.dart' show retry, throws;
 
 Future testArguments(connectFunction) async {
-  int freePort = await freeIPv4AndIPv6Port();
-
   var sourceAddress;
-  asyncStart();
-  var server;
-  try {
-    server = await ServerSocket.bind(InternetAddress.loopbackIPv4, freePort);
-  } catch (e) {
-    asyncEnd();
-    rethrow;
-  }
+  final server = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
   server.listen((_) {
     throw 'Unexpected connection from address $sourceAddress';
-  }, onDone: () => asyncEnd());
+  });
 
-  asyncStart();
   // Illegal type for sourceAddress.
   for (sourceAddress in ['www.google.com', 'abc']) {
-    await throws(() => connectFunction('127.0.0.1', server.port,
+    await throws(
+        () => connectFunction('127.0.0.1', server.port,
             sourceAddress: sourceAddress),
         (e) => e is ArgumentError);
   }
@@ -63,8 +38,7 @@
             sourceAddress: sourceAddress),
         (e) => e is SocketException);
   }
-  asyncEnd();
-  server.close();
+  await server.close();
 }
 
 // IPv4 addresses to use as source address when connecting locally.
@@ -85,8 +59,6 @@
 
 Future testConnect(InternetAddress bindAddress, bool v6Only,
     Function connectFunction, Function closeDestroyFunction) async {
-  int freePort = await freeIPv4AndIPv6Port();
-
   var successCount = 0;
   if (!v6Only) successCount += ipV4SourceAddresses.length;
   if (bindAddress.type == InternetAddressType.IPv6) {
@@ -96,17 +68,14 @@
   var allConnected = new Completer();
   if (successCount == 0) allConnected.complete();
 
-  asyncStart();
-  var server = await ServerSocket.bind(bindAddress, freePort, v6Only: v6Only);
+  var server = await ServerSocket.bind(bindAddress, 0, v6Only: v6Only);
   server.listen((s) {
     s.destroy();
     count++;
     if (count == successCount) allConnected.complete();
-  }, onDone: () => asyncEnd());
+  });
 
-  asyncStart();
-
-  // Connect with IPv4 source addesses.
+  // Connect with IPv4 source addresses.
   for (var sourceAddress in ipV4SourceAddresses) {
     if (!v6Only) {
       var s = await connectFunction(InternetAddress.loopbackIPv4, server.port,
@@ -122,7 +91,7 @@
     }
   }
 
-  // Connect with IPv6 source addesses.
+  // Connect with IPv6 source addresses.
   for (var sourceAddress in ipV6SourceAddresses) {
     if (bindAddress.type == InternetAddressType.IPv6) {
       var s = await connectFunction(InternetAddress.loopbackIPv6, server.port,
@@ -139,12 +108,9 @@
 
   await allConnected.future;
   await server.close();
-  asyncEnd();
 }
 
 main() async {
-  asyncStart();
-
   await retry(() async {
     await testArguments(RawSocket.connect);
   });
@@ -176,6 +142,4 @@
     await testConnect(
         InternetAddress.anyIPv6, true, Socket.connect, (s) => s.destroy());
   });
-
-  asyncEnd();
 }
diff --git a/tests/standalone_2/io/test_utils.dart b/tests/standalone_2/io/test_utils.dart
index d92a372..fb3b3ef 100644
--- a/tests/standalone_2/io/test_utils.dart
+++ b/tests/standalone_2/io/test_utils.dart
@@ -5,13 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
-Future<int> freeIPv4AndIPv6Port() async {
-  var socket =
-      await ServerSocket.bind(InternetAddress.anyIPv6, 0, v6Only: false);
-  int port = socket.port;
-  await socket.close();
-  return port;
-}
+import "package:expect/expect.dart";
 
 int lastRetryId = 0;
 
@@ -31,3 +25,15 @@
   }
   return await fun();
 }
+
+Future throws(Function f, bool check(Object exception)) async {
+  try {
+    await f();
+  } catch (e) {
+    if (!check(e)) {
+      Expect.fail('Unexpected: $e');
+    }
+    return;
+  }
+  Expect.fail('Did not throw');
+}
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 081a84f..f073ec4 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -19,7 +19,6 @@
 io/file_test: RuntimeError
 io/http_auth_digest_test: RuntimeError
 io/http_auth_test: RuntimeError
-io/http_compression_test: RuntimeError
 io/http_cookie_date_test: CompileTimeError
 io/http_headers_test: CompileTimeError
 io/http_parser_test: CompileTimeError
@@ -34,8 +33,9 @@
 io/web_socket_pipe_test: RuntimeError
 io/web_socket_protocol_processor_test: CompileTimeError
 io/zlib_test: RuntimeError
-oom_error_stacktrace_test: RuntimeError
-out_of_memory_test: RuntimeError
+
+[ $compiler == dartkp ]
+io/test_runner_test: SkipByDesign # Is not relevant for AOT.
 
 [ $fasta ]
 deferred_transitive_import_error_test: CompileTimeError
@@ -63,9 +63,6 @@
 [ $builder_tag == optimization_counter_threshold && ($compiler == dartk || $compiler == dartkb) ]
 map_insert_remove_oom_test: Skip # Heap limit too low.
 
-[ $compiler == app_jitk && ($mode == debug || $mode == release) ]
-dart_developer_disabled_env_test: RuntimeError
-
 # The failures below still need to be investigated and possibly fixed, or marked as skipped.
 [ $compiler == dartkb && $strong ]
 io/code_collection_test: RuntimeError # Reruns the same script (dill file without AST) without passing --enable-interpreter or --use-bytecode-compiler.
@@ -80,7 +77,6 @@
 no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers
 
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
-io/compile_all_test: Crash # Issue 32373
 io/raw_socket_test: Crash
 io/skipping_dart2js_compilations_test: Crash
 io/socket_exception_test: Pass, Crash
@@ -97,12 +93,10 @@
 io/namespace_test: RuntimeError
 
 [ $compiler == dartkp && $runtime == dart_precompiled && $strong ]
-dwarf_stack_trace_test: RuntimeError
-io/compile_all_test: RuntimeError # Issue 32338
+io/compile_all_test: Skip # We do not support --compile-all for precompilation
 io/file_fuzz_test: RuntimeError, Pass
 io/http_client_connect_test: Skip # Flaky.
 io/http_close_test: Crash
-io/http_compression_test: RuntimeError
 io/http_content_length_test: Skip # Flaky.
 io/http_cookie_test: Skip # Flaky
 io/http_proxy_advanced_test: Skip # Flaky
@@ -154,7 +148,6 @@
 
 [ $runtime == vm && $strong && ($compiler == dartk || $compiler == dartkb) ]
 io/http_client_request_test: Pass, Timeout
-io/http_compression_test: RuntimeError
 io/platform_resolved_executable_test/03: Pass, RuntimeError
 io/platform_resolved_executable_test/04: Pass, RuntimeError
 io/secure_builtin_roots_test: Pass, Timeout
diff --git a/tests/standalone_2/standalone_2_precompiled.status b/tests/standalone_2/standalone_2_precompiled.status
index 942a80a..64e4609 100644
--- a/tests/standalone_2/standalone_2_precompiled.status
+++ b/tests/standalone_2/standalone_2_precompiled.status
@@ -2,6 +2,9 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
+[ $builder_tag == obfuscated ]
+dwarf_stack_trace_test: Pass, RuntimeError # Issue 35563
+
 [ $compiler == precompiler ]
 io/web_socket_test: Pass, RuntimeError # Issue 24674
 map_insert_remove_oom_test: Skip # Heap limit too low. Increasing iteration count to make a higher limit a meaningful test makes it too slow for simarm[64] bots.
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 9faa3c6..b0b3349 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -14,3 +14,5 @@
 !unittest.tar.gz.sha1
 !update.sh
 !/googletest
+# but ignore a subfolder of tcmalloc (some client ignores /tcmalloc/.gitignore)
+/tcmalloc/gperftools
diff --git a/third_party/tcmalloc/configure_command b/third_party/tcmalloc/configure_command
index ea06910..7249c18 100644
--- a/third_party/tcmalloc/configure_command
+++ b/third_party/tcmalloc/configure_command
@@ -1 +1,2 @@
+./auto_gen.sh
 ./configure --enable-emergency-malloc --enable-frame-pointers --disable-cpu-profiler --disable-heap-checker --disable-debugalloc --enable-sized-delete --disable-libunwind
diff --git a/third_party/tcmalloc/include/config.h b/third_party/tcmalloc/include/config.h
index 16b2d7d..3cd4982 100644
--- a/third_party/tcmalloc/include/config.h
+++ b/third_party/tcmalloc/include/config.h
@@ -7,23 +7,26 @@
 
 
 /* Build new/delete operators for overaligned types */
-/* #undef ENABLE_ALIGNED_NEW_DELETE */
+#define ENABLE_ALIGNED_NEW_DELETE 1
 
 /* Build runtime detection for sized delete */
 /* #undef ENABLE_DYNAMIC_SIZED_DELETE */
 
+/* report large allocation */
+/* #undef ENABLE_LARGE_ALLOC_REPORT */
+
 /* Build sized deletion operators */
 #define ENABLE_SIZED_DELETE 1
 
-/* Define to 1 if compiler supports __builtin_expect */
-#define HAVE_BUILTIN_EXPECT 1
-
 /* Define to 1 if compiler supports __builtin_stack_pointer */
 /* #undef HAVE_BUILTIN_STACK_POINTER */
 
 /* Define to 1 if you have the <conflict-signal.h> header file. */
 /* #undef HAVE_CONFLICT_SIGNAL_H */
 
+/* define if the compiler supports basic C++11 syntax */
+#define HAVE_CXX11 1
+
 /* Define to 1 if you have the <cygwin/signal.h> header file. */
 /* #undef HAVE_CYGWIN_SIGNAL_H */
 
@@ -88,9 +91,7 @@
 #define HAVE_GETPAGESIZE 1
 
 /* Define to 1 if you have the <glob.h> header file. */
-#if !defined(__ANDROID__)
 #define HAVE_GLOB_H 1
-#endif
 
 /* Define to 1 if you have the <grp.h> header file. */
 #define HAVE_GRP_H 1
@@ -175,15 +176,13 @@
 #define HAVE_SYS_STAT_H 1
 
 /* Define to 1 if you have the <sys/syscall.h> header file. */
-#if !defined(__ANDROID__)
 #define HAVE_SYS_SYSCALL_H 1
-#endif
 
 /* Define to 1 if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H 1
 
 /* Define to 1 if you have the <sys/ucontext.h> header file. */
-#undef HAVE_SYS_UCONTEXT_H
+#define HAVE_SYS_UCONTEXT_H 1
 
 /* Define to 1 if you have the <sys/wait.h> header file. */
 #define HAVE_SYS_WAIT_H 1
@@ -213,13 +212,14 @@
 #define HAVE___ATTRIBUTE__ALIGNED_FN 1
 
 /* Define to 1 if compiler supports __environ */
-#if !defined(__ANDROID__)
 #define HAVE___ENVIRON 1
-#endif
 
 /* Define to 1 if the system has the type `__int64'. */
 /* #undef HAVE___INT64 */
 
+/* Define to 1 if you have the `__sbrk' function. */
+#define HAVE___SBRK 1
+
 /* prefix where we look for installed files */
 #define INSTALL_PREFIX "/usr/local"
 
diff --git a/tools/FAKE_COMMITS b/tools/FAKE_COMMITS
index fbe07a6..14748a9 100644
--- a/tools/FAKE_COMMITS
+++ b/tools/FAKE_COMMITS
@@ -24,3 +24,6 @@
 Trigger mirroring of github repository
 Force build after DEPS format revert
 Force build while trybots are broken, to check builders for brokenness.
+
+Analyzer branch commits:
+Force build on new analyzer-branch linux build with new workflow
\ No newline at end of file
diff --git a/tools/VERSION b/tools/VERSION
index 3fe9a57..604b271 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 1
 PATCH 1
-PRERELEASE 0
-PRERELEASE_PATCH 1
+PRERELEASE 1
+PRERELEASE_PATCH 0
diff --git a/tools/approve_results.dart b/tools/approve_results.dart
index 0b3f4a1d..eff1878 100755
--- a/tools/approve_results.dart
+++ b/tools/approve_results.dart
@@ -171,13 +171,14 @@
         // there is no approved result yet, use the latest result from the
         // builder instead.
         final baseResult = approvedResult ?? result;
-        if ((!wasFlake &&
+        if (!wasFlake &&
             !tryResult["matches"] &&
-            tryResult["result"] != result["result"])) {
+            tryResult["result"] != result["result"]) {
           // The approved_results.json format currently does not natively
           // support preapproval, so preapproving turning one failure into
           // another will turn the builder in question red until the CL lands.
-          if (!baseResult["matches"]) {
+          if (!baseResult["matches"] &&
+              tryResult["result"] != baseResult["result"]) {
             print("Warning: Preapproving changed failure modes will turn the "
                 "CI red until the CL is submitted: $bot: $key: "
                 "${baseResult["result"]} -> ${tryResult["result"]}");
@@ -600,6 +601,18 @@
   }
   print("");
 
+  // Log who approved these results.
+  final username = Platform.environment["LOGNAME"] ??
+      Platform.environment["USER"] ??
+      Platform.environment["USERNAME"];
+  if (username == null || username == "") {
+    stderr.writeln("error: Your identity could not be established. "
+        "Please set one of the LOGNAME, USER, USERNAME environment variables.");
+    exitCode = 1;
+    return;
+  }
+  final now = new DateTime.now().toUtc().toIso8601String();
+
   // Update approved_results.json for each bot with unapproved changes.
   final outDirectory =
       await Directory.systemTemp.createTemp("approved_results.");
@@ -615,10 +628,19 @@
     print("Uploading approved results...");
     final futures = <Future>[];
     for (final String bot in unapprovedBots) {
-      final testsList = testsForBots[bot];
+      Map<String, dynamic> approveData(Test test) {
+        final data = new Map<String, dynamic>.from(test.resultData);
+        if (!test.isApproved) {
+          data["approver"] = username;
+          data["approved_at"] = now;
+        }
+        return data;
+      }
+
+      final dataList = testsForBots[bot].map(approveData).toList();
       final localPath = "${outDirectory.path}/$bot.json";
       await new File(localPath).writeAsString(
-          testsList.map((test) => jsonEncode(test.resultData) + "\n").join(""));
+          dataList.map((data) => jsonEncode(data) + "\n").join(""));
       final remotePath =
           "$approvedResultsStoragePath/$bot/approved_results.json";
       futures.add(cpGsutil(localPath, remotePath)
diff --git a/tools/bots/bot_utils.py b/tools/bots/bot_utils.py
index ed40447..4a8b23a 100755
--- a/tools/bots/bot_utils.py
+++ b/tools/bots/bot_utils.py
@@ -35,11 +35,10 @@
 }
 
 ARCH_RENAMES = {
-  '32': 'ia32',
   'ia32': 'ia32',
-
-  '64': 'x64',
   'x64': 'x64',
+  'arm': 'arm',
+  'arm64': 'arm64',
 }
 
 class Channel(object):
diff --git a/tools/bots/compare_results.dart b/tools/bots/compare_results.dart
index 62f06d9..11e2f69 100755
--- a/tools/bots/compare_results.dart
+++ b/tools/bots/compare_results.dart
@@ -148,7 +148,7 @@
           output = "$name ${event.description} "
               "(${event.after.outcome}${expect})";
         } else {
-          output = "name ${event.description} "
+          output = "$name ${event.description} "
               "(${event.before?.outcome} -> ${event.after.outcome}${expect})";
         }
       } else {
@@ -157,10 +157,15 @@
             "${before?.matches} ${after.matches} "
             "${before?.flaked} ${after.flaked}";
       }
+    } else {
+      output = name;
     }
     if (logs != null) {
       final log = logs[event.after.key];
-      if (log != null) logSection?.add("\n\nLog for $output\n${log["log"]}");
+      final bar = '=' * (output.length + 2);
+      if (log != null) {
+        logSection?.add("\n\n/$bar\\\n| $output |\n\\$bar/\n\n${log["log"]}");
+      }
     }
     if (!options["logs-only"]) {
       print(output);
diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py
index 4480fde..50f3978 100755
--- a/tools/bots/dart_sdk.py
+++ b/tools/bots/dart_sdk.py
@@ -16,24 +16,31 @@
 utils = bot_utils.GetUtils()
 
 BUILD_OS = utils.GuessOS()
+BUILD_ARCHITECTURE = utils.GuessArchitecture()
 
 (bot_name, _) = bot.GetBotName()
 CHANNEL = bot_utils.GetChannelFromName(bot_name)
 
+def BuildArchitectures():
+ if BUILD_OS == 'linux':
+   return ['ia32', 'x64', 'arm', 'arm64']
+ else:
+   return ['ia32', 'x64']
+
 def BuildSDK():
   with bot.BuildStep('Build SDK'):
     if BUILD_OS == 'linux':
       sysroot_env = dict(os.environ)
       sysroot_env['DART_USE_WHEEZY'] = '1'
       Run([sys.executable, './tools/generate_buildfiles.py'], env=sysroot_env)
-    Run([sys.executable, './tools/build.py', '--mode=release',
-         '--arch=ia32', 'create_sdk'])
-    Run([sys.executable, './tools/build.py', '--mode=release',
-         '--arch=x64', 'create_sdk'])
+    for arch in BuildArchitectures():
+      Run([sys.executable, './tools/build.py', '--mode=release',
+           '--arch=' + arch, 'create_sdk'])
 
 def BuildDartdocAPIDocs(dirname):
   dart_sdk = os.path.join(bot_utils.DART_DIR,
-                          utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
+                          utils.GetBuildRoot(BUILD_OS, 'release',
+                                             BUILD_ARCHITECTURE),
                           'dart-sdk')
   dart_exe =  os.path.join(dart_sdk, 'bin', 'dart')
   dartdoc_dart = os.path.join(bot_utils.DART_DIR,
@@ -49,7 +56,8 @@
 
 def CreateUploadVersionFile():
   file_path = os.path.join(bot_utils.DART_DIR,
-                           utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
+                           utils.GetBuildRoot(BUILD_OS, 'release',
+                                              BUILD_ARCHITECTURE),
                            'VERSION')
   with open(file_path, 'w') as fd:
     fd.write(utils.GetVersionFileContent())
@@ -64,49 +72,35 @@
 
 def CreateUploadSDKZips():
   with bot.BuildStep('Create and upload sdk zips'):
-    sdk32_path = os.path.join(bot_utils.DART_DIR,
-                              utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
+    for arch in BuildArchitectures():
+      sdk_path = os.path.join(bot_utils.DART_DIR,
+                              utils.GetBuildRoot(BUILD_OS, 'release', arch),
                               'dart-sdk')
-    sdk64_path = os.path.join(bot_utils.DART_DIR,
-                              utils.GetBuildRoot(BUILD_OS, 'release', 'x64'),
-                              'dart-sdk')
+      sdk_zip = os.path.join(bot_utils.DART_DIR,
+                             utils.GetBuildRoot(BUILD_OS, 'release', arch),
+                             'dartsdk-%s-%s.zip' % (BUILD_OS, arch))
+      FileDelete(sdk_zip)
+      CreateZip(sdk_path, sdk_zip)
+      DartArchiveUploadSDKs(BUILD_OS, arch, sdk_zip)
 
-    sdk32_zip = os.path.join(bot_utils.DART_DIR,
-                             utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
-                             'dartsdk-%s-32.zip' % BUILD_OS)
-    sdk64_zip = os.path.join(bot_utils.DART_DIR,
-                             utils.GetBuildRoot(BUILD_OS, 'release', 'x64'),
-                             'dartsdk-%s-64.zip' % BUILD_OS)
-    FileDelete(sdk32_zip)
-    FileDelete(sdk64_zip)
-    CreateZip(sdk32_path, sdk32_zip)
-    CreateZip(sdk64_path, sdk64_zip)
-    DartArchiveUploadSDKs(BUILD_OS, sdk32_zip, sdk64_zip)
-
-def DartArchiveUploadSDKs(system, sdk32_zip, sdk64_zip):
+def DartArchiveUploadSDKs(system, arch, sdk_zip):
   namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
   git_number = utils.GetArchiveVersion()
   git_hash = 'hash/%s' % utils.GetGitRevision()
   for revision in [git_number, git_hash, 'latest']:
-    path32 = namer.sdk_zipfilepath(revision, system, 'ia32', 'release')
-    path64 = namer.sdk_zipfilepath(revision, system, 'x64', 'release')
-    DartArchiveFile(sdk32_zip, path32, checksum_files=True)
-    DartArchiveFile(sdk64_zip, path64, checksum_files=True)
+    path = namer.sdk_zipfilepath(revision, system, arch, 'release')
+    DartArchiveFile(sdk_zip, path, checksum_files=True)
 
 def DartArchiveUnstrippedBinaries():
   namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
   revision = utils.GetArchiveVersion()
   binary = namer.unstripped_filename(BUILD_OS)
-  ia32_binary = os.path.join(bot_utils.DART_DIR,
-                             utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
-                             binary)
-  x64_binary = os.path.join(bot_utils.DART_DIR,
-                            utils.GetBuildRoot(BUILD_OS, 'release', 'x64'),
-                            binary)
-  gs_ia32_path = namer.unstripped_filepath(revision, BUILD_OS, 'ia32')
-  gs_x64_path = namer.unstripped_filepath(revision, BUILD_OS, 'x64')
-  DartArchiveFile(ia32_binary, gs_ia32_path)
-  DartArchiveFile(x64_binary, gs_x64_path)
+  for arch in BuildArchitectures():
+    binary = os.path.join(bot_utils.DART_DIR,
+                          utils.GetBuildRoot(BUILD_OS, 'release', arch),
+                          binary)
+    gs_path = namer.unstripped_filepath(revision, BUILD_OS, arch)
+    DartArchiveFile(binary, gs_path)
 
 def CreateUploadSDK():
   BuildSDK()
@@ -114,12 +108,14 @@
   DartArchiveUnstrippedBinaries()
 
 def CreateUploadAPIDocs():
-  dartdoc_dir =  os.path.join(bot_utils.DART_DIR,
-                              utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
-                              'gen-dartdocs')
-  dartdoc_zip =  os.path.join(bot_utils.DART_DIR,
-                              utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
-                              'dartdocs-api.zip')
+  dartdoc_dir = os.path.join(bot_utils.DART_DIR,
+                             utils.GetBuildRoot(BUILD_OS, 'release',
+                                                BUILD_ARCHITECTURE),
+                             'gen-dartdocs')
+  dartdoc_zip = os.path.join(bot_utils.DART_DIR,
+                             utils.GetBuildRoot(BUILD_OS, 'release',
+                                                BUILD_ARCHITECTURE),
+                             'dartdocs-api.zip')
   if CHANNEL == 'try':
     BuildDartdocAPIDocs(dartdoc_dir)
   else:
diff --git a/tools/bots/find_base_commit.dart b/tools/bots/find_base_commit.dart
index 2df7e35..8106385 100755
--- a/tools/bots/find_base_commit.dart
+++ b/tools/bots/find_base_commit.dart
@@ -5,6 +5,7 @@
 
 // Find the newest commit that has a full set of results on the bots.
 
+import 'dart:async';
 import 'dart:convert';
 import 'dart:io';
 import 'dart:math';
@@ -50,15 +51,31 @@
       "&max_builds=$maxBuilds"
       "&status=COMPLETED"
       "&fields=builds(url%2Cparameters_json)");
-  final client = new HttpClient();
-  final request = await client.getUrl(url).timeout(const Duration(seconds: 30));
-  final response = await request.close().timeout(const Duration(seconds: 30));
-  final Map<String, dynamic> object = await response
-      .transform(new Utf8Decoder())
-      .transform(new JsonDecoder())
-      .first
-      .timeout(const Duration(seconds: 30));
-  client.close();
+  const maxRetries = 3;
+  const timeout = const Duration(seconds: 30);
+  Map<String, dynamic> object;
+  for (int i = 1; i <= maxRetries; i++) {
+    try {
+      final client = new HttpClient();
+      final request = await client.getUrl(url).timeout(timeout);
+      final response = await request.close().timeout(timeout);
+      object = await response
+          .transform(new Utf8Decoder())
+          .transform(new JsonDecoder())
+          .first
+          .timeout(timeout);
+      client.close();
+      break;
+    } on TimeoutException catch (e) {
+      final inSeconds = e.duration.inSeconds;
+      stderr.writeln(
+          "Attempt $i of $maxRetries timed out after $inSeconds seconds");
+      if (i == maxRetries) {
+        stderr.writeln("error: Failed to download $url");
+        exit(1);
+      }
+    }
+  }
 
   // Locate the builds we're interested in and map them to each commit. The
   // builds returned by the API are sorted with the newest first. Since bots
diff --git a/tools/bots/pub_integration_test.py b/tools/bots/pub_integration_test.py
index 61168c2..16d084a 100755
--- a/tools/bots/pub_integration_test.py
+++ b/tools/bots/pub_integration_test.py
@@ -3,6 +3,7 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
+import optparse
 import os
 import subprocess
 import sys
@@ -16,10 +17,19 @@
 """
 
 def Main():
+  parser = optparse.OptionParser()
+  parser.add_option('--mode', action='store', dest='mode', type='string',
+                    default='release')
+
+  (options, args) = parser.parse_args()
+
+  out_dir_subfolder = 'DebugX64' if options.mode == 'debug' else 'ReleaseX64'
+
   out_dir = 'xcodebuild' if sys.platform == 'darwin' else 'out'
   extension = '' if not sys.platform == 'win32' else '.bat'
   pub = os.path.abspath(
-    '%s/ReleaseX64/dart-sdk/bin/pub%s' % (out_dir, extension))
+    '%s/%s/dart-sdk/bin/pub%s' % (out_dir, out_dir_subfolder, extension))
+  print(pub)
 
   working_dir = tempfile.mkdtemp()
   try:
diff --git a/tools/bots/results.dart b/tools/bots/results.dart
index 8405a6d..ec760c5 100644
--- a/tools/bots/results.dart
+++ b/tools/bots/results.dart
@@ -9,7 +9,7 @@
 import 'dart:io';
 
 /// gsutil.py binary to use.
-const gsutil = "gsutil.py";
+final gsutil = Platform.isWindows ? "gsutil.py.bat" : "gsutil.py";
 
 /// Cloud storage location containing results.
 const testResultsStoragePath = "gs://dart-test-results/builders";
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 699874f..8a731d5 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -98,6 +98,7 @@
       "third_party/observatory_pub_packages/packages/",
       "tools/sdks/dart-sdk/",
       "pkg/async_helper/",
+      "pkg/build_integration/",
       "pkg/dart_internal/",
       "pkg/expect/",
       "pkg/front_end/",
@@ -176,16 +177,15 @@
         "timeout": 240,
         "use-sdk": true
       }},
-    "unittest-asserts-(linux|mac|win)": {
+    "unittest-asserts-(release|debug)-(linux|mac|win)": {
       "options": {
         "compiler": "dartk",
         "enable-asserts": true,
-        "mode": "release",
         "runtime": "vm",
         "timeout": 240,
         "use-sdk": true
       }},
-      "unittest-asserts-no-sdk-(linux|mac|win)": {
+    "unittest-asserts-no-sdk-(linux|mac|win)": {
         "options": {
           "compiler": "dartk",
           "enable-asserts": true,
@@ -293,6 +293,10 @@
       "options": {
         "vm-options": ["--no-enable-malloc-hooks"]
     }},
+    "dartkp-bare-linux-release-x64": {
+      "options": {
+        "vm-options": ["--no-enable-malloc-hooks", "--use-bare-instructions"]
+    }},
     "dartk-(linux|mac)-(debug|release)-(ia32|x64)": { },
     "dartk-checked-linux-release-x64": {
       "options": {
@@ -348,12 +352,6 @@
         "compiler": "dart2analyzer",
         "enable-asserts": true,
         "use-sdk": true
-      }},
-    "analyzer-fasta_parser-linux": {
-      "options": {
-        "compiler": "dart2analyzer",
-        "analyzer-use-fasta-parser": true,
-        "use-sdk": true
       }}
   },
   "builder_configurations": [
@@ -380,7 +378,7 @@
         {
           "name": "unit tests",
           "arguments": [
-            "-nunittest-asserts-${system}",
+            "-nunittest-asserts-${mode}-${system}",
              "pkg/(kernel|front_end|fasta)"
           ]
         },
@@ -426,7 +424,6 @@
           "name": "vm mixed mode tests",
           "arguments": [
             "-ndartkb-mixed-linux-${mode}-x64",
-            "--compiler=dartkb",
             "language_2",
             "corelib_2",
             "lib_2",
@@ -439,7 +436,6 @@
           "name": "vm bytecode compiler tests",
           "arguments": [
             "-ndartkb-compile-linux-${mode}-x64",
-            "--compiler=dartkb",
             "language_2",
             "corelib_2",
             "lib_2",
@@ -452,7 +448,6 @@
           "name": "vm interpreter tests",
           "arguments": [
             "-ndartkb-interpret-linux-${mode}-x64",
-            "--compiler=dartkb",
             "language_2",
             "corelib_2",
             "lib_2",
@@ -525,6 +520,32 @@
     },
     {
       "builders": [
+        "vm-kernel-precomp-bare-linux-release-x64"
+      ],
+      "meta": {
+        "description": "This configuration is used by the vm kernel precomp builders using bare instructions."
+      },
+      "steps": [
+        {
+          "name": "build dart",
+          "script": "tools/build.py",
+          "arguments": [
+            "runtime_kernel",
+            "dart_precompiled_runtime"
+          ]
+        },
+        {
+          "name": "vm tests",
+          "arguments": [
+            "-ndartkp-bare-${system}-${mode}-${arch}"
+          ],
+          "fileset": "vm-kernel",
+          "shards": 10
+        }
+      ]
+    },
+    {
+      "builders": [
         "vm-kernel-precomp-obfuscate-linux-release-x64"
       ],
       "meta": {
@@ -1374,7 +1395,11 @@
       "builders": [
         "analyzer-linux-release",
         "analyzer-mac-release",
-        "analyzer-win-release"
+        "analyzer-win-release",
+        "analyzer-linux-release-analyzer",
+        "analyzer-linux-release-analyzer-new",
+        "analyzer-mac-release-analyzer",
+        "analyzer-win-release-analyzer"
       ],
       "meta": {
         "description": "This configuration is used by the analyzer builders."
@@ -1388,7 +1413,7 @@
         {
           "name": "analyzer unit tests",
           "arguments": [
-            "-nunittest-asserts-${system}",
+            "-nunittest-asserts-${mode}-${system}",
             "pkg/analyzer"
           ],
           "shards": 2,
@@ -1397,7 +1422,7 @@
         {
           "name": "analysis_server unit tests",
           "arguments": [
-            "-nunittest-asserts-${system}",
+            "-nunittest-asserts-${mode}-${system}",
             "pkg/analysis_server"
           ],
           "shards": 2,
@@ -1418,14 +1443,14 @@
         {
           "name": "analyzer_cli unit tests",
           "arguments": [
-            "-nunittest-asserts-${system}",
+            "-nunittest-asserts-${mode}-${system}",
             "pkg/analyzer_cli"
           ]
         },
         {
           "name": "analyzer_plugin unit tests",
           "arguments": [
-            "-nunittest-asserts-${system}",
+            "-nunittest-asserts-${mode}-${system}",
             "pkg/analyzer_plugin"
           ]
         },
@@ -1439,7 +1464,10 @@
       ]
     },
     {
-      "builders": ["analyzer-analysis-server-linux"],
+      "builders": [
+        "analyzer-analysis-server-linux",
+        "analyzer-analysis-server-linux-analyzer"
+      ],
       "meta": {
         "description": "Analyze analyzer related packages."
       },
@@ -1536,11 +1564,6 @@
           "arguments": ["--fatal-warnings", "pkg/meta"]
         },
         {
-          "name": "analyze pkg/microlytics",
-          "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
-          "arguments": ["--fatal-warnings", "pkg/microlytics"]
-        },
-        {
           "name": "analyze pkg/smith",
           "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
           "arguments": ["--fatal-warnings", "pkg/smith"]
@@ -1605,79 +1628,11 @@
       ]
     },
     {
-      "builders": ["analyzer-use-fasta-parser-linux"],
-      "meta": {
-        "description": "Run the analyzer using the Fasta parser."
-      },
-      "steps": [
-        {
-          "name": "build dart",
-          "script": "tools/build.py",
-          "arguments": ["create_sdk"]
-        },
-        {
-          "name": "analyze pkg/analyzer --use-fasta-parser",
-          "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
-          "arguments": [
-            "--use-fasta-parser",
-            "pkg/analyzer"
-          ]
-        },
-        {
-          "name": "analyze pkg/analyzer --no-use-fasta-parser",
-          "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
-          "arguments": [
-            "--no-use-fasta-parser",
-            "pkg/analyzer"
-          ]
-        },
-        {
-          "name": "analyze pkg/analyzer_cli --use-fasta-parser",
-          "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
-          "arguments": [
-            "--use-fasta-parser",
-            "pkg/analyzer_cli"
-          ]
-        },
-        {
-          "name": "run language2 tests",
-          "arguments": [
-            "-nanalyzer-fasta_parser-linux",
-            "language_2"
-          ]
-        },
-        {
-          "name": "analyze pkg/analyzer_cli --no-use-fasta-parser",
-          "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
-          "arguments": [
-            "--no-use-fasta-parser",
-            "pkg/analyzer_cli"
-          ]
-        },
-        {
-          "name": "analyze pkg/analysis_server --use-fasta-parser",
-          "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
-          "arguments": [
-            "--use-fasta-parser",
-            "pkg/analysis_server"
-          ]
-        },
-        {
-          "name": "analyze pkg/analysis_server --no-use-fasta-parser",
-          "script": "out/ReleaseX64/dart-sdk/bin/dartanalyzer",
-          "arguments": [
-            "--no-use-fasta-parser",
-            "pkg/analysis_server"
-          ]
-        }
-      ]
-    },
-    {
       "builders": ["pkg-linux-release",
                    "pkg-win-release",
                    "pkg-mac-release"],
       "meta": {
-        "description": "This configuration is used by the pkg builders."
+        "description": "This configuration is used by the release pkg builders."
       },
       "steps": [
         {
@@ -1688,20 +1643,57 @@
         {
           "name": "package unit tests",
           "arguments": [
-            "-nunittest-asserts-${system}",
+            "-nunittest-asserts-${mode}-${system}",
             "pkg"
           ]
         },
         {
           "name": "third_party pkg_tested unit tests",
           "arguments": [
-            "-nunittest-asserts-${system}",
+            "-nunittest-asserts-${mode}-${system}",
             "pkg_tested"
           ]
         },
         {
           "name": "pub integration tests",
-          "script": "tools/bots/pub_integration_test.py"
+          "script": "tools/bots/pub_integration_test.py",
+          "arguments": [
+            "--mode=release"
+          ]
+        }
+      ]
+    },
+    {
+      "builders": ["pkg-linux-debug"],
+      "meta": {
+        "description": "This configuration is used by the debug pkg builders."
+      },
+      "steps": [
+        {
+          "name": "build dart",
+          "script": "tools/build.py",
+          "arguments": ["create_sdk"]
+        },
+        {
+          "name": "package unit tests",
+          "arguments": [
+            "-nunittest-asserts-${mode}-${system}",
+            "pkg"
+          ]
+        },
+        {
+          "name": "third_party pkg_tested unit tests",
+          "arguments": [
+            "-nunittest-asserts-${mode}-${system}",
+            "pkg_tested"
+          ]
+        },
+        {
+          "name": "pub integration tests",
+          "script": "tools/bots/pub_integration_test.py",
+          "arguments": [
+            "--mode=debug"
+          ]
         }
       ]
     },
@@ -1804,7 +1796,7 @@
             "--time",
             "2700"
           ],
-          "shards": 10,
+          "shards": 100,
           "fileset": "fuzzer"
         }
       ]
diff --git a/tools/bots/update_flakiness.dart b/tools/bots/update_flakiness.dart
index 87c584b..c791b94 100755
--- a/tools/bots/update_flakiness.dart
+++ b/tools/bots/update_flakiness.dart
@@ -51,6 +51,22 @@
         outcomes.add(result["result"]);
         outcomes..sort();
       }
+      if (testData["current"] == result["result"]) {
+        testData["current_counter"]++;
+      } else {
+        testData["current"] = result["result"];
+        testData["current_counter"] = 1;
+      }
+      // Remove this code once all files are updated
+      const occurrencesMisspelled = "occurences";
+      var occurrences = testData[occurrencesMisspelled];
+      if (occurrences != null) {
+        testData["occurrences"] = occurrences;
+        testData.remove(occurrencesMisspelled);
+      }
+      occurrences = testData.putIfAbsent("occurrences", () => <String, dynamic>{});
+      occurrences.putIfAbsent(result["result"], () => 0);
+      occurrences[result["result"]]++;
     }
   }
 
@@ -63,6 +79,15 @@
   for (final key in keys) {
     final testData = data[key];
     if (testData["outcomes"].length < 2) continue;
+    // Forgive tests that have become deterministic again. If they flake less
+    // than once in a 100 (p<1%), then if they flake again, the probability of
+    // them getting past 5 runs of deflaking is 1%^5 = 0.00000001%.
+    // TODO(sortie): Transitional compatibility until all flaky.json files have
+    // this new field.
+    if (testData["current_counter"] != null &&
+        100 <= testData["current_counter"]) {
+      continue;
+    }
     sink.writeln(jsonEncode(testData));
   }
 }
diff --git a/tools/build.py b/tools/build.py
index 9c72266..a4ccf5e 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -301,9 +301,10 @@
   if not ProcessOptions(options, args):
     parser.print_help()
     return 1
-  # Determine which targets to build. By default we build the "all" target.
+  # Determine which targets to build. The default is the "create_sdk" target,
+  # as the "all" target is unsupported and not built on any of the bots.
   if len(args) == 0:
-    targets = ['all']
+    targets = ['create_sdk']
   else:
     targets = args
 
diff --git a/tools/capture_screenshot.ps1 b/tools/capture_screenshot.ps1
deleted file mode 100644
index 322f9af..0000000
--- a/tools/capture_screenshot.ps1
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-[Reflection.Assembly]::LoadWithPartialName("System.Drawing")
-function screenshot([Drawing.Rectangle]$bounds, $path) {
-   $bmp = New-Object Drawing.Bitmap $bounds.width, $bounds.height
-   $graphics = [Drawing.Graphics]::FromImage($bmp)
-
-   $graphics.CopyFromScreen(
-       $bounds.Location, [Drawing.Point]::Empty, $bounds.size)
-
-   $bmp.Save($path)
-
-   $graphics.Dispose()
-   $bmp.Dispose()
-}
-
-$bounds = [Drawing.Rectangle]::FromLTRB(0, 0, 2000, 4000)
-screenshot $bounds $args[0]
diff --git a/tools/create_pkg_manifest.py b/tools/create_pkg_manifest.py
index dd0c6d8..c49eac8 100755
--- a/tools/create_pkg_manifest.py
+++ b/tools/create_pkg_manifest.py
@@ -21,6 +21,11 @@
 
 # Used in parsing the DEPS file.
 class VarImpl(object):
+  _env_vars = {
+    "host_cpu": "x64",
+    "host_os": "linux",
+  }
+
   def __init__(self, local_scope):
     self._local_scope = local_scope
 
@@ -28,6 +33,9 @@
     """Implements the Var syntax."""
     if var_name in self._local_scope.get("vars", {}):
       return self._local_scope["vars"][var_name]
+    # Inject default values for env variables
+    if var_name in self._env_vars:
+      return self._env_vars[var_name]
     raise Exception("Var is not defined: %s" % var_name)
 
 
diff --git a/tools/generate_idefiles.py b/tools/generate_idefiles.py
new file mode 100755
index 0000000..51b41e6
--- /dev/null
+++ b/tools/generate_idefiles.py
@@ -0,0 +1,145 @@
+#!/usr/bin/python
+#
+# 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.
+
+"""Script to generate configuration files for analysis servers of C++ and Dart.
+
+It generates compile_commands.json for C++ clang and intellij and
+analysis_options.yaml for the Dart analyzer.
+"""
+
+import argparse
+import json
+import os
+import subprocess
+import sys
+
+import generate_buildfiles
+import utils
+
+HOST_OS = utils.GuessOS()
+
+
+def GenerateIdeFiles(options):
+  GenerateCompileCommands(options)
+  GenerateAnalysisOptions(options)
+
+
+def GenerateCompileCommands(options):
+  """Generate compile_commands.json for the C++ analysis servers.
+
+  compile_commands.json is used by the c++ clang and intellij language analysis
+  servers used in IDEs such as Visual Studio Code and Emacs.
+
+  Args:
+    options: supported options include: verbose, force, dir
+
+  Returns:
+    success (0) or failure (non zero)
+  """
+
+  fname = os.path.join(options.dir, "compile_commands.json")
+
+  if os.path.isfile(fname) and not options.force:
+    print fname + " already exists, use --force to override"
+    return
+
+  gn_result = generate_buildfiles.RunGn(options)
+  if gn_result != 0:
+    return gn_result
+
+  out_folder = utils.GetBuildRoot(HOST_OS, mode="debug", arch="x64")
+
+  if not os.path.isdir(out_folder):
+    return 1
+
+  command_set = json.loads(
+      subprocess.check_output(
+          ["ninja", "-C", out_folder, "-t", "compdb", "cxx", "cc", "h"]))
+
+  commands = []
+  for obj in command_set:
+    command = obj["command"]
+
+    # Skip precompiled mode, a lot of code is commented out in precompiled mode
+    if "-DDART_PRECOMPILED_RUNTIME" in command:
+      continue
+
+    # Remove warnings
+    command = command.replace("-Werror", "")
+
+    obj["command"] = command
+    commands += [obj]
+
+  with open(fname, "w") as f:
+    json.dump(commands, f, indent=4)
+
+  return 0
+
+
+def GenerateAnalysisOptions(options):
+  """Generate analysis_optioms.yaml for the Dart analyzer.
+
+  To prevent dartanalyzer from tripping on the non-Dart files when it is
+  started from the root dart-sdk directory.
+  https://github.com/Dart-Code/Dart-Code/issues/1295
+
+  Args:
+    options: supported options include: force, dir
+  """
+  contents = """analyzer:
+  exclude:
+    - docs/newsletter/20171103/**
+    - out/**
+    - runtime/**
+    - samples-dev/swarm/**
+    - sdk/lib/**
+    - tests/**
+    - third_party/observatory_pub_packages/**
+    - third_party/pkg/**
+    - third_party/pkg_tested/dart_style/**
+    - third_party/tcmalloc/**
+    - tools/apps/update_homebrew/**
+    - tools/dart2js/**
+    - tools/dom/**
+    - tools/sdks/dart-sdk/lib/**
+    - tools/status_clean.dart
+    - xcodebuild / **"""
+
+  fname = os.path.join(options.dir, "analysis_options.yaml")
+
+  if os.path.isfile(fname) and not options.force:
+    print fname + " already exists, use --force to override"
+    return
+
+  with open(fname, "w") as f:
+    f.write(contents)
+
+
+def main(argv):
+  parser = argparse.ArgumentParser(
+      description="Python script to generate compile_commands.json and "
+      "analysis_options.yaml which are used by the analysis servers for "
+      "c++ and Dart.")
+
+  parser.add_argument("-v", "--verbose",
+                      help="Verbose output.",
+                      action="store_true")
+
+  parser.add_argument("-f", "--force",
+                      help="Override files.",
+                      action="store_true")
+
+  parser.add_argument("-d", "--dir",
+                      help="Target directory.",
+                      default=utils.DART_DIR)
+
+  options = parser.parse_args(argv[1:])
+
+  return GenerateIdeFiles(options)
+
+
+if __name__ == "__main__":
+  sys.exit(main(sys.argv))
diff --git a/tools/patches/flutter-engine/d1817ddc91fd3aea061647b2e21860c47a5a5180.flutter.patch b/tools/patches/flutter-engine/d1817ddc91fd3aea061647b2e21860c47a5a5180.flutter.patch
new file mode 100644
index 0000000..c4dca25
--- /dev/null
+++ b/tools/patches/flutter-engine/d1817ddc91fd3aea061647b2e21860c47a5a5180.flutter.patch
@@ -0,0 +1,13 @@
+diff --git a/analysis_options.yaml b/analysis_options.yaml
+index 68eea153ee0..65056568003 100644
+--- a/analysis_options.yaml
++++ b/analysis_options.yaml
+@@ -28,6 +28,8 @@ analyzer:
+     missing_return: warning
+     # allow having TODOs in the code
+     todo: ignore
++    #
++    sdk_version_async_exported_from_core: ignore
+   exclude:
+     - 'bin/cache/**'
+     # the following two are relative to the stocks example and the flutter package respectively
diff --git a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.flutter.patch b/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.flutter.patch
index 7e5352b..eeb725b 100644
--- a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.flutter.patch
+++ b/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.flutter.patch
@@ -1,26 +1,14 @@
-diff --git a/analysis_options.yaml b/analysis_options.yaml
-index 8957dfe03..68eea153e 100644
---- a/analysis_options.yaml
-+++ b/analysis_options.yaml
-@@ -114,7 +114,6 @@ linter:
-     # - parameter_assignments # we do this commonly
-     - prefer_adjacent_string_concatenation
-     - prefer_asserts_in_initializer_lists
--    - prefer_bool_in_asserts
-     - prefer_collection_literals
-     - prefer_conditional_assignment
-     - prefer_const_constructors
 diff --git a/dev/devicelab/pubspec.yaml b/dev/devicelab/pubspec.yaml
 index 9dee6de4a..806398855 100644
 --- a/dev/devicelab/pubspec.yaml
 +++ b/dev/devicelab/pubspec.yaml
 @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/flutter
- 
+
  environment:
    # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
 -  sdk: ">=2.0.0-dev.68.0 <3.0.0"
 +  sdk: ">=2.1.0-dev.5.0 <3.0.0"
- 
+
  dependencies:
    args: 1.5.1
 diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml
@@ -28,12 +16,12 @@
 --- a/packages/flutter/pubspec.yaml
 +++ b/packages/flutter/pubspec.yaml
 @@ -5,7 +5,7 @@ homepage: http://flutter.io
- 
+
  environment:
    # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
 -  sdk: ">=2.0.0-dev.68.0 <3.0.0"
 +  sdk: ">=2.1.0-dev.5.0 <3.0.0"
- 
+
  dependencies:
    # To update these, use "flutter update-packages --force-upgrade".
 diff --git a/packages/flutter_test/pubspec.yaml b/packages/flutter_test/pubspec.yaml
@@ -41,12 +29,12 @@
 --- a/packages/flutter_test/pubspec.yaml
 +++ b/packages/flutter_test/pubspec.yaml
 @@ -2,7 +2,7 @@ name: flutter_test
- 
+
  environment:
    # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
 -  sdk: ">=2.0.0-dev.68.0 <3.0.0"
 +  sdk: ">=2.1.0-dev.5.0 <3.0.0"
- 
+
  dependencies:
    # To update these, use "flutter update-packages --force-upgrade".
 diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml
@@ -54,11 +42,11 @@
 --- a/packages/flutter_tools/pubspec.yaml
 +++ b/packages/flutter_tools/pubspec.yaml
 @@ -5,7 +5,7 @@ author: Flutter Authors <flutter-dev@googlegroups.com>
- 
+
  environment:
    # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
 -  sdk: ">=2.0.0-dev.68.0 <3.0.0"
 +  sdk: ">=2.1.0-dev.5.0 <3.0.0"
- 
+
  dependencies:
    # To update these, use "flutter update-packages --force-upgrade".
diff --git a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.patch b/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.patch
index 0d76138..f0f9e8c 100644
--- a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.patch
+++ b/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.patch
@@ -1,5 +1,5 @@
 diff --git a/DEPS b/DEPS
-index bb8bca813..701871f79 100644
+index 2f5a8532b..c4cb5da32 100644
 --- a/DEPS
 +++ b/DEPS
 @@ -47,7 +47,7 @@ vars = {
@@ -11,16 +11,25 @@
    'dart_dart_style_tag': '1.2.0',
    'dart_dartdoc_tag': 'v0.24.1',
    'dart_fixnum_tag': '0.10.8',
+@@ -60,7 +60,7 @@ vars = {
+   'dart_http_throttle_tag': '1.0.2',
+   'dart_intl_tag': '0.15.7',
+   'dart_json_rpc_2_tag': '2.0.9',
+-  'dart_linter_tag': '0.1.71',
++  'dart_linter_tag': '0.1.75',
+   'dart_logging_tag': '0.11.3+2',
+   'dart_markdown_tag': '2.0.2',
+   'dart_matcher_tag': '0.12.3',
 diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn
-index ef06063a2..fa18ebfbf 100644
+index ef06063a2..4db8600ea 100644
 --- a/lib/snapshot/BUILD.gn
 +++ b/lib/snapshot/BUILD.gn
-@@ -53,9 +53,7 @@ compiled_action("generate_snapshot_bin") {
+@@ -53,9 +53,6 @@ compiled_action("generate_snapshot_bin") {
    ]
  
    args = [
 -    "--strong",
-     "--sync-async",
+-    "--sync-async",
 -    "--reify-generic-functions",
      "--snapshot_kind=core",
      "--enable_mirrors=false",
diff --git a/tools/task_kill.py b/tools/task_kill.py
index 12b185d..8c046b7 100755
--- a/tools/task_kill.py
+++ b/tools/task_kill.py
@@ -40,6 +40,7 @@
     'dart_precompiled_runtime': 'dart_precompiled_runtime',
     'firefox': 'firefox',
     'gen_snapshot': 'gen_snapshot',
+    'flutter_tester': 'flutter_tester',
     'git': 'git',
   },
   'macos': {
@@ -230,6 +231,7 @@
   status = Kill("dart", dump_stacks=True)
   status += Kill("gen_snapshot", dump_stacks=True)
   status += Kill("dart_precompiled_runtime", dump_stacks=True)
+  status += Kill("flutter_tester", dump_stacks=True)
   return status
 
 def Main():
diff --git a/tools/test.dart b/tools/test.dart
index 1948772..cd956ef 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -15,6 +15,67 @@
 
 const int deflakingCount = 5;
 
+/// Quotes a string in shell single quote mode. This function produces a single
+/// shell argument that evaluates to the exact string provided, handling any
+/// special characters in the input string. Shell single quote mode works uses
+/// the single quote character as the delimiter and uses the characters
+/// in-between verbatim without any special processing. To insert the single
+/// quote character itself, escape single quote mode, insert an escaped single
+/// quote, and then return to single quote mode.
+///
+/// Examples:
+///   foo becomes 'foo'
+///   foo bar becomes 'foo bar'
+///   foo\ bar becomes 'foo\ bar'
+///   foo's bar becomes 'foo '\''s bar'
+///   foo "b"ar becomes 'foo "b"'
+///   foo
+///   bar becomes 'foo
+///   bar'
+String shellSingleQuote(String string) {
+  return "'${string.replaceAll("'", "'\\''")}'";
+}
+
+/// Like [shellSingleQuote], but if the string only contains safe ASCII
+/// characters, don't quote it. Note that it's not always safe to omit the
+/// quotes even if the string only has safe characters, as doing so might match
+/// a shell keyword or a shell builtin in the first argument in a command. It
+/// should be safe to use this for the second argument onwards in a command.
+String simpleShellSingleQuote(String string) {
+  return new RegExp(r"^[a-zA-Z0-9%+,./:_-]*$").hasMatch(string)
+      ? string
+      : shellSingleQuote(string);
+}
+
+/// Runs a process and exits likewise if the process exits non-zero.
+Future<ProcessResult> runProcess(
+    String executable, List<String> arguments) async {
+  final processResult = await Process.run(executable, arguments);
+  if (processResult.exitCode != 0) {
+    final command =
+        ([executable]..addAll(arguments)).map(simpleShellSingleQuote).join(" ");
+    throw new Exception("Command exited ${processResult.exitCode}: $command\n"
+        "${processResult.stdout}\n${processResult.stderr}");
+  }
+  return processResult;
+}
+
+/// Runs a process and exits likewise if the process exits non-zero, but let the
+/// child process inherit out stdio handles.
+Future<ProcessResult> runProcessInheritStdio(
+    String executable, List<String> arguments) async {
+  final process = await Process.start(executable, arguments,
+      mode: ProcessStartMode.inheritStdio);
+  final exitCode = await process.exitCode;
+  final processResult = new ProcessResult(process.pid, exitCode, "", "");
+  if (processResult.exitCode != 0) {
+    final command =
+        ([executable]..addAll(arguments)).map(simpleShellSingleQuote).join(" ");
+    throw new Exception("Command exited ${processResult.exitCode}: $command");
+  }
+  return processResult;
+}
+
 /// Returns the operating system of a builder.
 String systemOfBuilder(String builder) {
   return builder.split("-").firstWhere(
@@ -104,7 +165,7 @@
       .first;
   client.close();
   final builds = object["builds"];
-  if (builds.isEmpty) {
+  if (builds == null || builds.isEmpty) {
     throw new Exception("Builder $builder hasn't built commit $commit");
   }
   final build = builds.last;
@@ -188,6 +249,7 @@
 
     // Run each step like the builder would, deflaking tests that need it.
     final stepResultsPaths = <String>[];
+    final stepLogsPaths = <String>[];
     for (int stepIndex = 0; stepIndex < testSteps.length; stepIndex++) {
       // Run the test step.
       final testStep = testSteps[stepIndex];
@@ -200,22 +262,29 @@
           .cast<String>();
       final fullArguments = <String>[]
         ..addAll(stepArguments)
-        ..addAll(
-            ["--output-directory=${stepDirectory.path}", "--write-results"])
+        ..addAll([
+          "--output-directory=${stepDirectory.path}",
+          "--clean-exit",
+          "--silent-failures",
+          "--write-results",
+          "--write-logs",
+        ])
         ..addAll(options.rest);
+      print("".padLeft(80, "="));
       print("$stepName: Running tests");
-      final testProcess = await Process.start("tools/test.py", fullArguments);
-      await testProcess.exitCode;
+      print("".padLeft(80, "="));
+      await runProcessInheritStdio("tools/test.py", fullArguments);
       stepResultsPaths.add("${stepDirectory.path}/results.json");
+      stepLogsPaths.add("${stepDirectory.path}/logs.json");
       // Find the list of tests to deflake.
-      final deflakeListOutput = await Process.run(Platform.resolvedExecutable, [
+      final deflakeListOutput = await runProcess(Platform.resolvedExecutable, [
         "tools/bots/compare_results.dart",
         "--changed",
         "--failing",
         "--passing",
         "--flakiness-data=${outDirectory.path}/flaky.json",
         "${outDirectory.path}/previous.json",
-        "${stepDirectory.path}/results.json"
+        "${stepDirectory.path}/results.json",
       ]);
       final deflakeListPath = "${stepDirectory.path}/deflake.list";
       final deflakeListFile = new File(deflakeListPath);
@@ -225,28 +294,30 @@
       for (int i = 1;
           deflakeListOutput.stdout != "" && i <= deflakingCount;
           i++) {
+        print("".padLeft(80, "="));
         print("$stepName: Running deflaking iteration $i");
+        print("".padLeft(80, "="));
         final deflakeDirectory = new Directory("${stepDirectory.path}/$i");
         await deflakeDirectory.create();
         final deflakeArguments = <String>[]
           ..addAll(stepArguments)
           ..addAll([
             "--output-directory=${deflakeDirectory.path}",
+            "--clean-exit",
+            "--silent-failures",
             "--write-results",
-            "--write-logs",
-            "--test-list=$deflakeListPath"
+            "--test-list=$deflakeListPath",
           ])
           ..addAll(options.rest);
-        final deflakeProcess =
-            await Process.start("tools/test.py", deflakeArguments);
-        await deflakeProcess.exitCode;
+        await runProcessInheritStdio("tools/test.py", deflakeArguments);
         deflakingResultsPaths.add("${deflakeDirectory.path}/results.json");
       }
       // Update the flakiness information based on what we've learned.
       print("$stepName: Updating flakiness information");
-      await Process.run(
-          "tools/bots/update_flakiness.dart",
+      await runProcess(
+          Platform.resolvedExecutable,
           [
+            "tools/bots/update_flakiness.dart",
             "--input=${outDirectory.path}/flaky.json",
             "--output=${outDirectory.path}/flaky.json",
             "${stepDirectory.path}/results.json",
@@ -257,9 +328,16 @@
         stepResultsPaths
             .map((path) => new File(path).readAsStringSync())
             .join(""));
+    // Collect all the logs from all the steps.
+    await new File("${outDirectory.path}/logs.json").writeAsString(stepLogsPaths
+        .map((path) => new File(path).readAsStringSync())
+        .join(""));
     // Write out the final comparison.
-    print("");
-    final compareOutput = await Process.run("tools/bots/compare_results.dart", [
+    print("".padLeft(80, "="));
+    print("Test Results");
+    print("".padLeft(80, "="));
+    final compareOutput = await runProcess(Platform.resolvedExecutable, [
+      "tools/bots/compare_results.dart",
       "--human",
       "--verbose",
       "--changed",
@@ -268,9 +346,13 @@
       "--flakiness-data=${outDirectory.path}/flaky.json",
       "--logs=${outDirectory.path}/logs.json",
       "${outDirectory.path}/previous.json",
-      "${outDirectory.path}/results.json"
+      "${outDirectory.path}/results.json",
     ]);
-    stdout.write(compareOutput.stdout);
+    if (compareOutput.stdout == "") {
+      print("There were no test failures.");
+    } else {
+      stdout.write(compareOutput.stdout);
+    }
   } finally {
     await outDirectory.delete(recursive: true);
   }
diff --git a/tools/testing/dart/browser_controller.dart b/tools/testing/dart/browser_controller.dart
index 8b701a3..c29fe62 100644
--- a/tools/testing/dart/browser_controller.dart
+++ b/tools/testing/dart/browser_controller.dart
@@ -984,13 +984,6 @@
     var id = status.browser.id;
 
     status.currentTest.stopwatch.stop();
-
-    // Before closing the browser, we'll try to capture a screenshot on
-    // windows when using IE (to debug flakiness).
-    if (status.browser is IE) {
-      await captureInternetExplorerScreenshot(
-          'IE screenshot for ${status.currentTest.url}');
-    }
     await status.browser.close();
     var lastKnownMessage =
         'Dom could not be fetched, since the test timed out.';
@@ -1655,60 +1648,3 @@
     return driverContent;
   }
 }
-
-Future captureInternetExplorerScreenshot(String message) async {
-  if (Platform.environment['USERNAME'] != 'chrome-bot') {
-    return;
-  }
-
-  print('--------------------------------------------------------------------');
-  final String date =
-      new DateTime.now().toUtc().toIso8601String().replaceAll(':', '_');
-  final screenshotName = 'ie_screenshot_${date}.png';
-
-  // The "capture_screen.ps1" script is next to "test.dart" in "tools/"
-  final powerShellScript =
-      Platform.script.resolve('../../capture_screenshot.ps1').toFilePath();
-  final screenshotFile =
-      Platform.script.resolve('../../../$screenshotName').toFilePath();
-
-  final args = [
-    '-ExecutionPolicy',
-    'ByPass',
-    '-File',
-    powerShellScript,
-    screenshotFile
-  ];
-  final ProcessResult result =
-      await Process.run('powershell.exe', args, runInShell: true);
-  if (result.exitCode != 0) {
-    print('[$message] Failed to capture IE screenshot on windows: '
-        'powershell.exe "${args.join(' ')}" returned with:\n'
-        'exit code: ${result.exitCode}\n'
-        'stdout: ${result.stdout}\n'
-        'stderr: ${result.stderr}');
-  } else {
-    final gsutilScript = Platform.script
-        .resolve('../../../third_party/gsutil/gsutil.py')
-        .toFilePath();
-    final storageUrl = 'gs://dart-temp-crash-archive/$screenshotName';
-    final args = [
-      gsutilScript,
-      'cp',
-      screenshotFile,
-      storageUrl,
-    ];
-    final ProcessResult result = await Process.run('python', args);
-    if (result.exitCode != 0) {
-      print('[$message] Failed upload captured IE screenshot to cloud storage: '
-          '"${args.join(' ')}" returned with:\n'
-          'exit code: ${result.exitCode}\n'
-          'stdout: ${result.stdout}\n'
-          'stderr: ${result.stderr}');
-    } else {
-      print('[$message] Successfully uploaded screenshot to $storageUrl');
-    }
-    new File(screenshotFile).deleteSync();
-  }
-  print('--------------------------------------------------------------------');
-}
diff --git a/tools/testing/dart/command_output.dart b/tools/testing/dart/command_output.dart
index b4a0980..a392933 100644
--- a/tools/testing/dart/command_output.dart
+++ b/tools/testing/dart/command_output.dart
@@ -66,14 +66,15 @@
     // dart2js exits with code 253 in case of unhandled exceptions.
     // The dart binary exits with code 253 in case of an API error such
     // as an invalid snapshot file.
+    // The batch mode can also exit 253 (unhandledCompilerExceptionExitCode).
     // In either case an exit code of 253 is considered a crash.
-    if (exitCode == 253) return true;
+    if (exitCode == unhandledCompilerExceptionExitCode) return true;
     if (exitCode == parseFailExitCode) return false;
     if (hasTimedOut) return false;
     if (io.Platform.isWindows) {
       // The VM uses std::abort to terminate on asserts.
       // std::abort terminates with exit code 3 on Windows.
-      if (exitCode == 3 || exitCode == browserCrashExitCode) return true;
+      if (exitCode == 3) return true;
 
       // When VM is built with Crashpad support we get STATUS_FATAL_APP_EXIT
       // for all crashes that Crashpad has intercepted.
@@ -91,6 +92,11 @@
     return exitCode < 0;
   }
 
+  bool get hasCoreDump {
+    // Unhandled dart exceptions don't produce crashdumps.
+    return hasCrashed && exitCode != 253;
+  }
+
   bool _didFail(TestCase testCase) => exitCode != 0 && !hasCrashed;
 
   bool get canRunDependendCommands {
@@ -318,11 +324,6 @@
   Expectation result(TestCase testCase) {
     // Handle timeouts first.
     if (_result.didTimeout) {
-      if (testCase.configuration.runtime == Runtime.ie11) {
-        // TODO(28955): See http://dartbug.com/28955
-        DebugLogger.warning("Timeout of ie11 on test ${testCase.displayName}");
-        return Expectation.ignore;
-      }
       return Expectation.timeout;
     }
 
@@ -342,11 +343,6 @@
   Expectation realResult(TestCase testCase) {
     // Handle timeouts first.
     if (_result.didTimeout) {
-      if (testCase.configuration.runtime == Runtime.ie11) {
-        // TODO(28955): See http://dartbug.com/28955
-        DebugLogger.warning("Timeout of ie11 on test ${testCase.displayName}");
-        return Expectation.ignore;
-      }
       return Expectation.timeout;
     }
 
@@ -853,7 +849,6 @@
 
   /// Cloned code from member result(), with changes.
   /// Delete existing result() function and rename, when status files are gone.
-  /// This code can return Expectation.ignore - we may want to fix that.
   Expectation realResult(TestCase testCase) {
     if (hasCrashed) return Expectation.crash;
     if (hasTimedOut) return Expectation.timeout;
@@ -925,7 +920,6 @@
 
   /// Cloned code from member result(), with changes.
   /// Delete existing result() function and rename, when status files are gone.
-  /// This code can return Expectation.ignore - we may want to fix that.
   Expectation realResult(TestCase testCase) {
     // TODO(kustermann): Currently the batch mode runner (which can be found
     // in `test_runner.dart:BatchRunnerProcess`) does not really distinguish
@@ -991,7 +985,6 @@
 
   /// Cloned code from member result(), with changes.
   /// Delete existing result() function and rename, when status files are gone.
-  /// This code can return Expectation.ignore - we may want to fix that.
   Expectation realResult(TestCase testCase) {
     // Handle crashes and timeouts first.
     if (hasCrashed) return Expectation.crash;
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index d1c68fb..58f0143 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -478,7 +478,7 @@
   }
 }
 
-/// Configuration for `dartdevc` and `dartdevk`
+/// Configuration for `dartdevc` and `dartdevk` (DDC with Kernel)
 class DevCompilerConfiguration extends CompilerConfiguration {
   DevCompilerConfiguration(TestConfiguration configuration)
       : super._subclass(configuration);
diff --git a/tools/testing/dart/configuration.dart b/tools/testing/dart/configuration.dart
index ed7903e..aa0b4f1 100644
--- a/tools/testing/dart/configuration.dart
+++ b/tools/testing/dart/configuration.dart
@@ -33,7 +33,8 @@
       this.isVerbose,
       this.listTests,
       this.listStatusFiles,
-      this.noStatus,
+      this.cleanExit,
+      this.silentFailures,
       this.printTiming,
       this.printReport,
       this.reportInJson,
@@ -84,7 +85,8 @@
   final bool isVerbose;
   final bool listTests;
   final bool listStatusFiles;
-  final bool noStatus;
+  final bool cleanExit;
+  final bool silentFailures;
   final bool printTiming;
   final bool printReport;
   final bool reportInJson;
diff --git a/tools/testing/dart/options.dart b/tools/testing/dart/options.dart
index 7bd82b8..b647348 100644
--- a/tools/testing/dart/options.dart
+++ b/tools/testing/dart/options.dart
@@ -226,10 +226,12 @@
         'List status files for test-suites. Do not run any test suites.',
         hide: true),
     new _Option.bool(
-        'no_status',
-        'Do not use status files for test expectations. Use Skip '
-        'and Slow from status files. Return exit code 0 if tests '
-        'run and return results.',
+        'clean_exit', 'Exit 0 if tests ran and results were output.',
+        hide: true),
+    new _Option.bool(
+        'silent_failures',
+        "Don't complain about failing tests. This is useful when in "
+        "combination with --write-results.",
         hide: true),
     new _Option.bool('report_in_json',
         'When listing with --list, output result summary in JSON.',
@@ -333,14 +335,15 @@
   /// options.
   static final _blacklistedOptions = [
     'build_directory',
-    'debug_output_directory',
     'chrome',
+    'clean_exit',
     'copy_coredumps',
     'dart',
-    'flutter',
+    'debug_output_directory',
     'drt',
     'exclude_suite',
     'firefox',
+    'flutter',
     'local_ip',
     'output_directory',
     'progress',
@@ -348,15 +351,25 @@
     'safari',
     'shard',
     'shards',
+    'silent_failures',
     'step_name',
     'tasks',
     'time',
     'verbose',
-    'write_logs',
     'write_debug_log',
+    'write_logs',
     'write_results',
   ].toSet();
 
+  /// The set of objects which the named configuration should imply.
+  static final _namedConfigurationOptions = [
+    'system',
+    'arch',
+    'mode',
+    'compiler',
+    'runtime',
+  ].toSet();
+
   /// Parses a list of strings as test options.
   ///
   /// Returns a list of configurations in which to run the tests.
@@ -473,6 +486,18 @@
       }
     }
 
+    // If a named configuration was specified ensure no other options, which are
+    // implied by the named configuration, were specified.
+    if (configuration['named_configuration'] is String) {
+      for (final optionName in _namedConfigurationOptions) {
+        if (configuration.containsKey(optionName)) {
+          final namedConfig = configuration['named_configuration'];
+          _fail("The named configuration '$namedConfig' implies "
+              "'$optionName'. Try removing '$optionName'.");
+        }
+      }
+    }
+
     // Apply default values for unspecified options.
     for (var option in _options) {
       if (!configuration.containsKey(option.name)) {
@@ -489,20 +514,18 @@
     return _createConfigurations(configuration);
   }
 
-  /// Prints [message] and exits with a non-zero exit code.
-  void _fail(String message) {
-    print(message);
-    exit(1);
-  }
-
   /// Given a set of parsed option values, returns the list of command line
   /// arguments that would reproduce that configuration.
-  List<String> _reproducingCommand(Map<String, dynamic> data) {
+  List<String> _reproducingCommand(
+      Map<String, dynamic> data, bool usingNamedConfiguration) {
     var arguments = <String>[];
 
     for (var option in _options) {
       var name = option.name;
-      if (!data.containsKey(name) || _blacklistedOptions.contains(name)) {
+      if (!data.containsKey(name) ||
+          _blacklistedOptions.contains(name) ||
+          (usingNamedConfiguration &&
+              _namedConfigurationOptions.contains(name))) {
         continue;
       }
 
@@ -634,7 +657,7 @@
         // Expand compilers.
         for (var compiler in compilers) {
           // Expand modes.
-          String modes = data["mode"] ?? compiler.defaultMode.name;
+          String modes = (data["mode"] as String) ?? compiler.defaultMode.name;
           if (modes == "all") modes = "debug,release,product";
           for (var modeName in modes.split(",")) {
             var mode = Mode.find(modeName);
@@ -675,13 +698,15 @@
                 isVerbose: data["verbose"] as bool,
                 listTests: data["list"] as bool,
                 listStatusFiles: data["list_status_files"] as bool,
-                noStatus: data["no_status"] as bool,
+                cleanExit: data["clean_exit"] as bool,
+                silentFailures: data["silent_failures"] as bool,
                 printTiming: data["time"] as bool,
                 printReport: data["report"] as bool,
                 reportInJson: data["report_in_json"] as bool,
                 resetBrowser: data["reset_browser_configuration"] as bool,
                 skipCompilation: data["skip_compilation"] as bool,
-                useKernelBytecode: compiler == Compiler.dartkb,
+                useKernelBytecode:
+                    innerConfiguration.compiler == Compiler.dartkb,
                 writeDebugLog: data["write_debug_log"] as bool,
                 writeResults: data["write_results"] as bool,
                 writeLogs: data["write_logs"] as bool,
@@ -707,7 +732,8 @@
                 packageRoot: data["package_root"] as String,
                 suiteDirectory: data["suite_dir"] as String,
                 outputDirectory: data["output_directory"] as String,
-                reproducingArguments: _reproducingCommand(data),
+                reproducingArguments:
+                    _reproducingCommand(data, namedConfiguration != null),
                 fastTestsOnly: data["fast_tests"] as bool,
                 printPassingStdout: data["print_passing_stdout"] as bool);
 
@@ -872,7 +898,24 @@
 
 Configuration getNamedConfiguration(String template) {
   if (template == null) return null;
-  TestMatrix testMatrix = TestMatrix.fromPath("tools/bots/test_matrix.json");
-  return testMatrix.configurations
+  final testMatrixFile = "tools/bots/test_matrix.json";
+  TestMatrix testMatrix = TestMatrix.fromPath(testMatrixFile);
+  final configuration = testMatrix.configurations
       .singleWhere((c) => c.name == template, orElse: () => null);
+  if (configuration == null) {
+    final names = testMatrix.configurations
+        .map((configuration) => configuration.name)
+        .toList();
+    names.sort();
+    _fail('The named configuration "$template" does not exist. The following '
+        'configurations are available:\n  * ${names.join('\n  * ')}');
+  }
+
+  return configuration;
+}
+
+/// Prints [message] and exits with a non-zero exit code.
+void _fail(String message) {
+  print(message);
+  exit(1);
 }
diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
index 00e5ebf..d20f969 100644
--- a/tools/testing/dart/test_configurations.dart
+++ b/tools/testing/dart/test_configurations.dart
@@ -188,6 +188,9 @@
       printFailures = false;
       eventListener.add(new StatusFileUpdatePrinter());
     }
+    if (firstConf.silentFailures) {
+      printFailures = false;
+    }
     eventListener.add(new SummaryPrinter());
     if (printFailures) {
       // The buildbot has it's own failure summary since it needs to wrap it
@@ -222,7 +225,7 @@
   if (listTests) {
     eventListener.add(new SummaryPrinter(jsonOnly: reportInJson));
   } else {
-    if (!firstConf.noStatus) {
+    if (!firstConf.cleanExit) {
       eventListener.add(new ExitCodeSetter());
     }
     eventListener.add(new IgnoredTestMonitor());
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 43dce69..e56e891 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -126,7 +126,8 @@
   void done(TestCase test) {
     if (test.unexpectedOutput &&
         test.result == Expectation.crash &&
-        test.lastCommandExecuted is ProcessCommand) {
+        test.lastCommandExecuted is ProcessCommand &&
+        test.lastCommandOutput.hasCoreDump) {
       var pid = "${test.lastCommandOutput.pid}";
       var lastCommand = test.lastCommandExecuted as ProcessCommand;
 
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 17e0b60..2081403 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -31,7 +31,7 @@
 import 'test_suite.dart';
 import 'utils.dart';
 
-const int browserCrashExitCode = -10;
+const int unhandledCompilerExceptionExitCode = 253;
 const int parseFailExitCode = 245;
 const int slowTimeoutMultiplier = 4;
 const int extraSlowTimeoutMultiplier = 8;
@@ -712,7 +712,7 @@
 
     var outcome = _status.split(" ")[2];
     var exitCode = 0;
-    if (outcome == "CRASH") exitCode = browserCrashExitCode;
+    if (outcome == "CRASH") exitCode = unhandledCompilerExceptionExitCode;
     if (outcome == "PARSE_FAIL") exitCode = parseFailExitCode;
     if (outcome == "FAIL" || outcome == "TIMEOUT") exitCode = 1;
     var output = createCommandOutput(
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 0666aff..4cecd58 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -128,9 +128,14 @@
     _environmentOverrides = {
       'DART_CONFIGURATION': configuration.configurationDirectory,
     };
-    if (configuration.copyCoreDumps && Platform.isWindows) {
-      _environmentOverrides['DART_CRASHPAD_HANDLER'] =
-          new Path(buildDir + '/crashpad_handler.exe').absolute.toNativePath();
+    if (Platform.isWindows) {
+      _environmentOverrides['DART_SUPPRESS_WER'] = '1';
+      if (configuration.copyCoreDumps) {
+        _environmentOverrides['DART_CRASHPAD_HANDLER'] =
+            new Path(buildDir + '/crashpad_handler.exe')
+                .absolute
+                .toNativePath();
+      }
     }
   }
 
@@ -559,6 +564,7 @@
   final List<String> extraVmOptions;
   List<Uri> _dart2JsBootstrapDependencies;
   Set<String> _testListPossibleFilenames;
+  RegExp _selectorFilenameRegExp;
 
   static final Uri co19SuiteLocation = Repository.uri.resolve("tests/co19_2/");
 
@@ -570,6 +576,7 @@
         suiteDir = Repository.dir.join(suiteDirectory),
         extraVmOptions = configuration.vmOptions,
         super(configuration, suiteName, statusFilePaths) {
+    // Initialize _dart2JsBootstrapDependencies
     if (!useSdk) {
       _dart2JsBootstrapDependencies = [];
     } else {
@@ -579,6 +586,8 @@
             .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot')
       ];
     }
+
+    // Initialize _testListPossibleFilenames
     if (configuration.testList != null) {
       _testListPossibleFilenames = Set<String>();
       for (String s in configuration.testList) {
@@ -595,6 +604,18 @@
         }
       }
     }
+
+    // Initialize _selectorFilenameRegExp
+    String pattern = configuration.selectors[suiteName].pattern;
+    if (pattern.contains("/")) {
+      String lastPart = pattern.substring(pattern.lastIndexOf("/") + 1);
+      // If the selector is a multitest name ending in a number or 'none'
+      // we also accept test file names that don't contain that last part.
+      if (int.tryParse(lastPart) != null || lastPart == "none") {
+        pattern = pattern.substring(0, pattern.lastIndexOf("/"));
+      }
+    }
+    _selectorFilenameRegExp = new RegExp(pattern);
   }
 
   /**
@@ -717,28 +738,12 @@
     // The definitive check against configuration.testList is performed in
     // TestSuite.enqueueNewTestCase().
     if (_testListPossibleFilenames?.contains(filename) == false) return;
-    bool match = false;
     // Note: have to use Path instead of a filename for matching because
     // on Windows we need to convert backward slashes to forward slashes.
     // Our display test names (and filters) are given using forward slashes
     // while filenames on Windows use backwards slashes.
-    final Path filePath = new Path(filename);
-    for (var regex in configuration.selectors.values) {
-      String pattern = regex.pattern;
-      if (pattern.contains("/")) {
-        String lastPart = pattern.substring(pattern.lastIndexOf("/") + 1);
-        if (int.tryParse(lastPart) != null ||
-            lastPart.toLowerCase() == "none") {
-          pattern = pattern.substring(0, pattern.lastIndexOf("/"));
-        }
-      }
-      if (pattern != regex.pattern) {
-        regex = new RegExp(pattern);
-      }
-      if (regex.hasMatch(filePath.toString())) match = true;
-      if (match) break;
-    }
-    if (!match) return;
+    final Path filePath = Path(filename);
+    if (!_selectorFilenameRegExp.hasMatch(filePath.toString())) return;
 
     if (!isTestFile(filename)) return;
 
@@ -814,12 +819,6 @@
     var commonArguments =
         commonArgumentsFromFile(info.filePath, info.optionsFromFile);
 
-    // TODO(floitsch): Hack. When running the 2.0 tests always start
-    // async functions synchronously.
-    if (suiteName.endsWith("_2")) {
-      commonArguments.insert(0, "--sync-async");
-    }
-
     var vmOptionsList = getVmOptions(info.optionsFromFile);
     assert(!vmOptionsList.isEmpty);
 
@@ -896,7 +895,7 @@
             compilationArtifact);
 
     Map<String, String> environment = environmentOverrides;
-    Map<String, String> extraEnv = info.optionsFromFile['environment'];
+    var extraEnv = info.optionsFromFile['environment'] as Map<String, String>;
     if (extraEnv != null) {
       environment = new Map.from(environment)..addAll(extraEnv);
     }
@@ -1034,27 +1033,6 @@
     var htmlPath = '$tempDir/test.html';
     new File(htmlPath).writeAsStringSync(content);
 
-    // TODO(floitsch): Hack. When running the 2.0 tests always start
-    // async functions synchronously.
-    if (suiteName.endsWith("_2") &&
-        configuration.compiler == Compiler.dart2js) {
-      if (optionsFromFile == null) {
-        optionsFromFile = const <String, dynamic>{
-          'sharedOptions': const ['--sync-async']
-        };
-      } else {
-        optionsFromFile = new Map<String, dynamic>.from(optionsFromFile);
-        var sharedOptions = optionsFromFile['sharedOptions'];
-        if (sharedOptions == null) {
-          sharedOptions = const <String>['--sync-async'];
-        } else {
-          sharedOptions = sharedOptions.toList();
-          sharedOptions.insert(0, "--sync-async");
-        }
-        optionsFromFile['sharedOptions'] = sharedOptions;
-      }
-    }
-
     // Construct the command(s) that compile all the inputs needed by the
     // browser test.
     var commands = <Command>[];
@@ -1471,7 +1449,8 @@
       Compiler.dartkb,
       Compiler.dartkp,
       Compiler.precompiler,
-      Compiler.appJit
+      Compiler.appJit,
+      Compiler.appJitk,
     ];
 
     const runtimes = const [Runtime.none, Runtime.dartPrecompiled, Runtime.vm];
diff --git a/utils/bazel/kernel_worker.dart b/utils/bazel/kernel_worker.dart
index 45faa40..a9a0145 100644
--- a/utils/bazel/kernel_worker.dart
+++ b/utils/bazel/kernel_worker.dart
@@ -132,7 +132,7 @@
   Target target;
   var summaryOnly = parsedArgs['summary-only'] as bool;
   var excludeNonSources = parsedArgs['exclude-non-sources'] as bool;
-  var targetFlags = new TargetFlags(syncAsync: true);
+  var targetFlags = new TargetFlags();
   if (summaryOnly) {
     target = new SummaryTarget(sources, excludeNonSources, targetFlags);
   } else {
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index 13ccd28..039604a 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -33,25 +33,6 @@
   inputs = [ sdk_summary ]
 }
 
-application_snapshot("dartdevk") {
-  main_dart = "../../pkg/dev_compiler/bin/dartdevk.dart"
-
-  training_args = [
-    "--dart-sdk-summary",
-    rebase_path(sdk_dill),
-    "-o",
-    "dartdevk.js",
-    rebase_path("../../pkg/dev_compiler/bin/dartdevk.dart"),
-  ]
-
-  deps = [
-    ":dartdevc_sdk",
-    ":dartdevk_sdk",
-  ]
-
-  inputs = [ sdk_dill, sdk_libraries_json ]
-}
-
 sdk_lib_files = exec_script("../../tools/list_dart_files.py",
                             [
                               "absolute",
@@ -225,25 +206,24 @@
   ]
 }
 
-# Builds everything needed to run dartdevc and dartdevk tests using test.dart.
+# Builds everything needed to run dartdevc tests using test.dart.
 group("dartdevc_test") {
   deps = [
     ":dartdevc",
     ":dartdevc_sdk",
-    ":dartdevk_sdk",
+    ":dartdevc_kernel_sdk",
     ":dartdevc_test_pkg",
-    ":dartdevk",
     "../../sdk:create_sdk",
   ]
 }
 
-# Builds everything needed to run dartdevc and dartdevk tests locally using
-# test.dart without --use-sdk. This is the same as dartdevc_test, but skips
-# things rely on building the Dart VM and create_sdk.
+# Builds everything needed to run dartdevc tests locally using test.dart without
+# --use-sdk. This is the same as dartdevc_test, but skips things rely on
+# building the Dart VM and create_sdk.
 group("dartdevc_test_local") {
   deps = [
     ":dartdevc_sdk",
-    ":dartdevk_sdk",
+    ":dartdevc_kernel_sdk",
     ":dartdevc_test_pkg",
   ]
 }
@@ -264,7 +244,7 @@
   deps = [
     ":dartdevc_files_stamp",
     ":dartdevc_sdk",
-    ":dartdevk_sdk",
+    ":dartdevc_kernel_sdk",
     "../../pkg:pkg_files_stamp",
   ]
 
@@ -335,7 +315,7 @@
 }
 
 # Compiles the DDC SDK's kernel summary and JS code.
-prebuilt_dart_action("dartdevk_sdk") {
+prebuilt_dart_action("dartdevc_kernel_sdk") {
   deps = [
     "../../pkg:pkg_files_stamp",
     ":dartdevc_files_stamp",